@ogygie/studio 0.25.2 → 0.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function s(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(o){if(o.ep)return;o.ep=!0;const c=s(o);fetch(o.href,c)}})();function Gx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ef={exports:{}},tr={};var Tg;function Kx(){if(Tg)return tr;Tg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:t,type:r,key:d,ref:o!==void 0?o:null,props:c}}return tr.Fragment=i,tr.jsx=s,tr.jsxs=s,tr}var jg;function Yx(){return jg||(jg=1,ef.exports=Kx()),ef.exports}var b=Yx(),tf={exports:{}},fe={};var Ng;function Vx(){if(Ng)return fe;Ng=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function S(j){return j===null||typeof j!="object"?null:(j=x&&j[x]||j["@@iterator"],typeof j=="function"?j:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},O=Object.assign,T={};function R(j,Z,F){this.props=j,this.context=Z,this.refs=T,this.updater=F||E}R.prototype.isReactComponent={},R.prototype.setState=function(j,Z){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,Z,"setState")},R.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function q(){}q.prototype=R.prototype;function G(j,Z,F){this.props=j,this.context=Z,this.refs=T,this.updater=F||E}var K=G.prototype=new q;K.constructor=G,O(K,R.prototype),K.isPureReactComponent=!0;var P=Array.isArray;function C(){}var N={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function se(j,Z,F){var I=F.ref;return{$$typeof:t,type:j,key:Z,ref:I!==void 0?I:null,props:F}}function le(j,Z){return se(j.type,Z,j.props)}function ue(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function ne(j){var Z={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(F){return Z[F]})}var he=/\/+/g;function ye(j,Z){return typeof j=="object"&&j!==null&&j.key!=null?ne(""+j.key):Z.toString(36)}function de(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(C,C):(j.status="pending",j.then(function(Z){j.status==="pending"&&(j.status="fulfilled",j.value=Z)},function(Z){j.status==="pending"&&(j.status="rejected",j.reason=Z)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function U(j,Z,F,I,ce){var ge=typeof j;(ge==="undefined"||ge==="boolean")&&(j=null);var Oe=!1;if(j===null)Oe=!0;else switch(ge){case"bigint":case"string":case"number":Oe=!0;break;case"object":switch(j.$$typeof){case t:case i:Oe=!0;break;case v:return Oe=j._init,U(Oe(j._payload),Z,F,I,ce)}}if(Oe)return ce=ce(j),Oe=I===""?"."+ye(j,0):I,P(ce)?(F="",Oe!=null&&(F=Oe.replace(he,"$&/")+"/"),U(ce,Z,F,"",function(on){return on})):ce!=null&&(ue(ce)&&(ce=le(ce,F+(ce.key==null||j&&j.key===ce.key?"":(""+ce.key).replace(he,"$&/")+"/")+Oe)),Z.push(ce)),1;Oe=0;var Le=I===""?".":I+":";if(P(j))for(var Be=0;Be<j.length;Be++)I=j[Be],ge=Le+ye(I,Be),Oe+=U(I,Z,F,ge,ce);else if(Be=S(j),typeof Be=="function")for(j=Be.call(j),Be=0;!(I=j.next()).done;)I=I.value,ge=Le+ye(I,Be++),Oe+=U(I,Z,F,ge,ce);else if(ge==="object"){if(typeof j.then=="function")return U(de(j),Z,F,I,ce);throw Z=String(j),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return Oe}function J(j,Z,F){if(j==null)return j;var I=[],ce=0;return U(j,I,"","",function(ge){return Z.call(F,ge,ce++)}),I}function te(j){if(j._status===-1){var Z=j._result;Z=Z(),Z.then(function(F){(j._status===0||j._status===-1)&&(j._status=1,j._result=F)},function(F){(j._status===0||j._status===-1)&&(j._status=2,j._result=F)}),j._status===-1&&(j._status=0,j._result=Z)}if(j._status===1)return j._result.default;throw j._result}var je=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Ae={map:J,forEach:function(j,Z,F){J(j,function(){Z.apply(this,arguments)},F)},count:function(j){var Z=0;return J(j,function(){Z++}),Z},toArray:function(j){return J(j,function(Z){return Z})||[]},only:function(j){if(!ue(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return fe.Activity=g,fe.Children=Ae,fe.Component=R,fe.Fragment=s,fe.Profiler=o,fe.PureComponent=G,fe.StrictMode=r,fe.Suspense=m,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,fe.__COMPILER_RUNTIME={__proto__:null,c:function(j){return N.H.useMemoCache(j)}},fe.cache=function(j){return function(){return j.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(j,Z,F){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var I=O({},j.props),ce=j.key;if(Z!=null)for(ge in Z.key!==void 0&&(ce=""+Z.key),Z)!V.call(Z,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&Z.ref===void 0||(I[ge]=Z[ge]);var ge=arguments.length-2;if(ge===1)I.children=F;else if(1<ge){for(var Oe=Array(ge),Le=0;Le<ge;Le++)Oe[Le]=arguments[Le+2];I.children=Oe}return se(j.type,ce,I)},fe.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:c,_context:j},j},fe.createElement=function(j,Z,F){var I,ce={},ge=null;if(Z!=null)for(I in Z.key!==void 0&&(ge=""+Z.key),Z)V.call(Z,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ce[I]=Z[I]);var Oe=arguments.length-2;if(Oe===1)ce.children=F;else if(1<Oe){for(var Le=Array(Oe),Be=0;Be<Oe;Be++)Le[Be]=arguments[Be+2];ce.children=Le}if(j&&j.defaultProps)for(I in Oe=j.defaultProps,Oe)ce[I]===void 0&&(ce[I]=Oe[I]);return se(j,ge,ce)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(j){return{$$typeof:h,render:j}},fe.isValidElement=ue,fe.lazy=function(j){return{$$typeof:v,_payload:{_status:-1,_result:j},_init:te}},fe.memo=function(j,Z){return{$$typeof:p,type:j,compare:Z===void 0?null:Z}},fe.startTransition=function(j){var Z=N.T,F={};N.T=F;try{var I=j(),ce=N.S;ce!==null&&ce(F,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(C,je)}catch(ge){je(ge)}finally{Z!==null&&F.types!==null&&(Z.types=F.types),N.T=Z}},fe.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},fe.use=function(j){return N.H.use(j)},fe.useActionState=function(j,Z,F){return N.H.useActionState(j,Z,F)},fe.useCallback=function(j,Z){return N.H.useCallback(j,Z)},fe.useContext=function(j){return N.H.useContext(j)},fe.useDebugValue=function(){},fe.useDeferredValue=function(j,Z){return N.H.useDeferredValue(j,Z)},fe.useEffect=function(j,Z){return N.H.useEffect(j,Z)},fe.useEffectEvent=function(j){return N.H.useEffectEvent(j)},fe.useId=function(){return N.H.useId()},fe.useImperativeHandle=function(j,Z,F){return N.H.useImperativeHandle(j,Z,F)},fe.useInsertionEffect=function(j,Z){return N.H.useInsertionEffect(j,Z)},fe.useLayoutEffect=function(j,Z){return N.H.useLayoutEffect(j,Z)},fe.useMemo=function(j,Z){return N.H.useMemo(j,Z)},fe.useOptimistic=function(j,Z){return N.H.useOptimistic(j,Z)},fe.useReducer=function(j,Z,F){return N.H.useReducer(j,Z,F)},fe.useRef=function(j){return N.H.useRef(j)},fe.useState=function(j){return N.H.useState(j)},fe.useSyncExternalStore=function(j,Z,F){return N.H.useSyncExternalStore(j,Z,F)},fe.useTransition=function(){return N.H.useTransition()},fe.version="19.2.8",fe}var Ag;function Sr(){return Ag||(Ag=1,tf.exports=Vx()),tf.exports}var X=Sr();const wo=Gx(X);var nf={exports:{}},nr={},af={exports:{}},sf={};var Rg;function Fx(){return Rg||(Rg=1,(function(t){function i(U,J){var te=U.length;U.push(J);e:for(;0<te;){var je=te-1>>>1,Ae=U[je];if(0<o(Ae,J))U[je]=J,U[te]=Ae,te=je;else break e}}function s(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var J=U[0],te=U.pop();if(te!==J){U[0]=te;e:for(var je=0,Ae=U.length,j=Ae>>>1;je<j;){var Z=2*(je+1)-1,F=U[Z],I=Z+1,ce=U[I];if(0>o(F,te))I<Ae&&0>o(ce,F)?(U[je]=ce,U[I]=te,je=I):(U[je]=F,U[Z]=te,je=Z);else if(I<Ae&&0>o(ce,te))U[je]=ce,U[I]=te,je=I;else break e}}return J}function o(U,J){var te=U.sortIndex-J.sortIndex;return te!==0?te:U.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var m=[],p=[],v=1,g=null,x=3,S=!1,E=!1,O=!1,T=!1,R=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function K(U){for(var J=s(p);J!==null;){if(J.callback===null)r(p);else if(J.startTime<=U)r(p),J.sortIndex=J.expirationTime,i(m,J);else break;J=s(p)}}function P(U){if(O=!1,K(U),!E)if(s(m)!==null)E=!0,C||(C=!0,ne());else{var J=s(p);J!==null&&de(P,J.startTime-U)}}var C=!1,N=-1,V=5,se=-1;function le(){return T?!0:!(t.unstable_now()-se<V)}function ue(){if(T=!1,C){var U=t.unstable_now();se=U;var J=!0;try{e:{E=!1,O&&(O=!1,q(N),N=-1),S=!0;var te=x;try{t:{for(K(U),g=s(m);g!==null&&!(g.expirationTime>U&&le());){var je=g.callback;if(typeof je=="function"){g.callback=null,x=g.priorityLevel;var Ae=je(g.expirationTime<=U);if(U=t.unstable_now(),typeof Ae=="function"){g.callback=Ae,K(U),J=!0;break t}g===s(m)&&r(m),K(U)}else r(m);g=s(m)}if(g!==null)J=!0;else{var j=s(p);j!==null&&de(P,j.startTime-U),J=!1}}break e}finally{g=null,x=te,S=!1}J=void 0}}finally{J?ne():C=!1}}}var ne;if(typeof G=="function")ne=function(){G(ue)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ye=he.port2;he.port1.onmessage=ue,ne=function(){ye.postMessage(null)}}else ne=function(){R(ue,0)};function de(U,J){N=R(function(){U(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(U){switch(x){case 1:case 2:case 3:var J=3;break;default:J=x}var te=x;x=J;try{return U()}finally{x=te}},t.unstable_requestPaint=function(){T=!0},t.unstable_runWithPriority=function(U,J){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var te=x;x=U;try{return J()}finally{x=te}},t.unstable_scheduleCallback=function(U,J,te){var je=t.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?je+te:je):te=je,U){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=te+Ae,U={id:v++,callback:J,priorityLevel:U,startTime:te,expirationTime:Ae,sortIndex:-1},te>je?(U.sortIndex=te,i(p,U),s(m)===null&&U===s(p)&&(O?(q(N),N=-1):O=!0,de(P,te-je))):(U.sortIndex=Ae,i(m,U),E||S||(E=!0,C||(C=!0,ne()))),U},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(U){var J=x;return function(){var te=x;x=J;try{return U.apply(this,arguments)}finally{x=te}}}})(sf)),sf}var Cg;function Px(){return Cg||(Cg=1,af.exports=Fx()),af.exports}var rf={exports:{}},ht={};var Mg;function Xx(){if(Mg)return ht;Mg=1;var t=Sr();function i(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(m,p,v){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:m,containerInfo:p,implementation:v}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return ht.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,ht.createPortal=function(m,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return c(m,p,null,v)},ht.flushSync=function(m){var p=d.T,v=r.p;try{if(d.T=null,r.p=2,m)return m()}finally{d.T=p,r.p=v,r.d.f()}},ht.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(m,p))},ht.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},ht.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var v=p.as,g=h(v,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?r.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:S}):v==="script"&&r.d.X(m,{crossOrigin:g,integrity:x,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},ht.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=h(p.as,p.crossOrigin);r.d.M(m,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(m)},ht.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,g=h(v,p.crossOrigin);r.d.L(m,v,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},ht.preloadModule=function(m,p){if(typeof m=="string")if(p){var v=h(p.as,p.crossOrigin);r.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(m)},ht.requestFormReset=function(m){r.d.r(m)},ht.unstable_batchedUpdates=function(m,p){return m(p)},ht.useFormState=function(m,p,v){return d.H.useFormState(m,p,v)},ht.useFormStatus=function(){return d.H.useHostTransitionStatus()},ht.version="19.2.8",ht}var Dg;function mv(){if(Dg)return rf.exports;Dg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),rf.exports=Xx(),rf.exports}var kg;function Jx(){if(kg)return nr;kg=1;var t=Px(),i=Sr(),s=mv();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function d(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(r(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,l=n;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(l=u.return,l!==null){a=l;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return m(u),e;if(f===l)return m(u),n;f=f.sibling}throw Error(r(188))}if(a.return!==l.return)a=u,l=f;else{for(var y=!1,_=u.child;_;){if(_===a){y=!0,a=u,l=f;break}if(_===l){y=!0,l=u,a=f;break}_=_.sibling}if(!y){for(_=f.child;_;){if(_===a){y=!0,a=f,l=u;break}if(_===l){y=!0,l=f,a=u;break}_=_.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function v(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=v(e),n!==null)return n;e=e.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),O=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),G=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ue=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=ue&&e[ue]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case O:return"Fragment";case R:return"Profiler";case T:return"StrictMode";case P:return"Suspense";case C:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case G:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case K:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case N:return n=e.displayName||null,n!==null?n:ye(e.type)||"Memo";case V:n=e._payload,e=e._init;try{return ye(e(n))}catch{}}return null}var de=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},je=[],Ae=-1;function j(e){return{current:e}}function Z(e){0>Ae||(e.current=je[Ae],je[Ae]=null,Ae--)}function F(e,n){Ae++,je[Ae]=e.current,e.current=n}var I=j(null),ce=j(null),ge=j(null),Oe=j(null);function Le(e,n){switch(F(ge,n),F(ce,e),F(I,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Xp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Xp(n),e=Jp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(I),F(I,e)}function Be(){Z(I),Z(ce),Z(ge)}function on(e){e.memoizedState!==null&&F(Oe,e);var n=I.current,a=Jp(n,e.type);n!==a&&(F(ce,e),F(I,a))}function Ni(e){ce.current===e&&(Z(I),Z(ce)),Oe.current===e&&(Z(Oe),Js._currentValue=te)}var Uo,zd;function Ai(e){if(Uo===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Uo=n&&n[1]||"",zd=-1<a.stack.indexOf(`
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function s(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(o){if(o.ep)return;o.ep=!0;const c=s(o);fetch(o.href,c)}})();function Yx(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ef={exports:{}},nr={};var Tg;function Fx(){if(Tg)return nr;Tg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:t,type:r,key:d,ref:o!==void 0?o:null,props:c}}return nr.Fragment=i,nr.jsx=s,nr.jsxs=s,nr}var jg;function Vx(){return jg||(jg=1,ef.exports=Fx()),ef.exports}var b=Vx(),tf={exports:{}},fe={};var Ng;function Px(){if(Ng)return fe;Ng=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),S=Symbol.iterator;function x(j){return j===null||typeof j!="object"?null:(j=S&&j[S]||j["@@iterator"],typeof j=="function"?j:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,z={};function R(j,Z,V){this.props=j,this.context=Z,this.refs=z,this.updater=V||E}R.prototype.isReactComponent={},R.prototype.setState=function(j,Z){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,Z,"setState")},R.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function q(){}q.prototype=R.prototype;function G(j,Z,V){this.props=j,this.context=Z,this.refs=z,this.updater=V||E}var K=G.prototype=new q;K.constructor=G,w(K,R.prototype),K.isPureReactComponent=!0;var P=Array.isArray;function C(){}var N={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function re(j,Z,V){var I=V.ref;return{$$typeof:t,type:j,key:Z,ref:I!==void 0?I:null,props:V}}function le(j,Z){return re(j.type,Z,j.props)}function ue(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function ne(j){var Z={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(V){return Z[V]})}var he=/\/+/g;function ye(j,Z){return typeof j=="object"&&j!==null&&j.key!=null?ne(""+j.key):Z.toString(36)}function de(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(C,C):(j.status="pending",j.then(function(Z){j.status==="pending"&&(j.status="fulfilled",j.value=Z)},function(Z){j.status==="pending"&&(j.status="rejected",j.reason=Z)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function U(j,Z,V,I,ce){var ge=typeof j;(ge==="undefined"||ge==="boolean")&&(j=null);var we=!1;if(j===null)we=!0;else switch(ge){case"bigint":case"string":case"number":we=!0;break;case"object":switch(j.$$typeof){case t:case i:we=!0;break;case v:return we=j._init,U(we(j._payload),Z,V,I,ce)}}if(we)return ce=ce(j),we=I===""?"."+ye(j,0):I,P(ce)?(V="",we!=null&&(V=we.replace(he,"$&/")+"/"),U(ce,Z,V,"",function(on){return on})):ce!=null&&(ue(ce)&&(ce=le(ce,V+(ce.key==null||j&&j.key===ce.key?"":(""+ce.key).replace(he,"$&/")+"/")+we)),Z.push(ce)),1;we=0;var Le=I===""?".":I+":";if(P(j))for(var Be=0;Be<j.length;Be++)I=j[Be],ge=Le+ye(I,Be),we+=U(I,Z,V,ge,ce);else if(Be=x(j),typeof Be=="function")for(j=Be.call(j),Be=0;!(I=j.next()).done;)I=I.value,ge=Le+ye(I,Be++),we+=U(I,Z,V,ge,ce);else if(ge==="object"){if(typeof j.then=="function")return U(de(j),Z,V,I,ce);throw Z=String(j),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return we}function J(j,Z,V){if(j==null)return j;var I=[],ce=0;return U(j,I,"","",function(ge){return Z.call(V,ge,ce++)}),I}function te(j){if(j._status===-1){var Z=j._result;Z=Z(),Z.then(function(V){(j._status===0||j._status===-1)&&(j._status=1,j._result=V)},function(V){(j._status===0||j._status===-1)&&(j._status=2,j._result=V)}),j._status===-1&&(j._status=0,j._result=Z)}if(j._status===1)return j._result.default;throw j._result}var je=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},Ae={map:J,forEach:function(j,Z,V){J(j,function(){Z.apply(this,arguments)},V)},count:function(j){var Z=0;return J(j,function(){Z++}),Z},toArray:function(j){return J(j,function(Z){return Z})||[]},only:function(j){if(!ue(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return fe.Activity=y,fe.Children=Ae,fe.Component=R,fe.Fragment=s,fe.Profiler=o,fe.PureComponent=G,fe.StrictMode=r,fe.Suspense=m,fe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=N,fe.__COMPILER_RUNTIME={__proto__:null,c:function(j){return N.H.useMemoCache(j)}},fe.cache=function(j){return function(){return j.apply(null,arguments)}},fe.cacheSignal=function(){return null},fe.cloneElement=function(j,Z,V){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var I=w({},j.props),ce=j.key;if(Z!=null)for(ge in Z.key!==void 0&&(ce=""+Z.key),Z)!F.call(Z,ge)||ge==="key"||ge==="__self"||ge==="__source"||ge==="ref"&&Z.ref===void 0||(I[ge]=Z[ge]);var ge=arguments.length-2;if(ge===1)I.children=V;else if(1<ge){for(var we=Array(ge),Le=0;Le<ge;Le++)we[Le]=arguments[Le+2];I.children=we}return re(j.type,ce,I)},fe.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:c,_context:j},j},fe.createElement=function(j,Z,V){var I,ce={},ge=null;if(Z!=null)for(I in Z.key!==void 0&&(ge=""+Z.key),Z)F.call(Z,I)&&I!=="key"&&I!=="__self"&&I!=="__source"&&(ce[I]=Z[I]);var we=arguments.length-2;if(we===1)ce.children=V;else if(1<we){for(var Le=Array(we),Be=0;Be<we;Be++)Le[Be]=arguments[Be+2];ce.children=Le}if(j&&j.defaultProps)for(I in we=j.defaultProps,we)ce[I]===void 0&&(ce[I]=we[I]);return re(j,ge,ce)},fe.createRef=function(){return{current:null}},fe.forwardRef=function(j){return{$$typeof:h,render:j}},fe.isValidElement=ue,fe.lazy=function(j){return{$$typeof:v,_payload:{_status:-1,_result:j},_init:te}},fe.memo=function(j,Z){return{$$typeof:p,type:j,compare:Z===void 0?null:Z}},fe.startTransition=function(j){var Z=N.T,V={};N.T=V;try{var I=j(),ce=N.S;ce!==null&&ce(V,I),typeof I=="object"&&I!==null&&typeof I.then=="function"&&I.then(C,je)}catch(ge){je(ge)}finally{Z!==null&&V.types!==null&&(Z.types=V.types),N.T=Z}},fe.unstable_useCacheRefresh=function(){return N.H.useCacheRefresh()},fe.use=function(j){return N.H.use(j)},fe.useActionState=function(j,Z,V){return N.H.useActionState(j,Z,V)},fe.useCallback=function(j,Z){return N.H.useCallback(j,Z)},fe.useContext=function(j){return N.H.useContext(j)},fe.useDebugValue=function(){},fe.useDeferredValue=function(j,Z){return N.H.useDeferredValue(j,Z)},fe.useEffect=function(j,Z){return N.H.useEffect(j,Z)},fe.useEffectEvent=function(j){return N.H.useEffectEvent(j)},fe.useId=function(){return N.H.useId()},fe.useImperativeHandle=function(j,Z,V){return N.H.useImperativeHandle(j,Z,V)},fe.useInsertionEffect=function(j,Z){return N.H.useInsertionEffect(j,Z)},fe.useLayoutEffect=function(j,Z){return N.H.useLayoutEffect(j,Z)},fe.useMemo=function(j,Z){return N.H.useMemo(j,Z)},fe.useOptimistic=function(j,Z){return N.H.useOptimistic(j,Z)},fe.useReducer=function(j,Z,V){return N.H.useReducer(j,Z,V)},fe.useRef=function(j){return N.H.useRef(j)},fe.useState=function(j){return N.H.useState(j)},fe.useSyncExternalStore=function(j,Z,V){return N.H.useSyncExternalStore(j,Z,V)},fe.useTransition=function(){return N.H.useTransition()},fe.version="19.2.8",fe}var Ag;function xr(){return Ag||(Ag=1,tf.exports=Px()),tf.exports}var X=xr();const zo=Yx(X);var nf={exports:{}},ir={},af={exports:{}},sf={};var Rg;function Xx(){return Rg||(Rg=1,(function(t){function i(U,J){var te=U.length;U.push(J);e:for(;0<te;){var je=te-1>>>1,Ae=U[je];if(0<o(Ae,J))U[je]=J,U[te]=Ae,te=je;else break e}}function s(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var J=U[0],te=U.pop();if(te!==J){U[0]=te;e:for(var je=0,Ae=U.length,j=Ae>>>1;je<j;){var Z=2*(je+1)-1,V=U[Z],I=Z+1,ce=U[I];if(0>o(V,te))I<Ae&&0>o(ce,V)?(U[je]=ce,U[I]=te,je=I):(U[je]=V,U[Z]=te,je=Z);else if(I<Ae&&0>o(ce,te))U[je]=ce,U[I]=te,je=I;else break e}}return J}function o(U,J){var te=U.sortIndex-J.sortIndex;return te!==0?te:U.id-J.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var m=[],p=[],v=1,y=null,S=3,x=!1,E=!1,w=!1,z=!1,R=typeof setTimeout=="function"?setTimeout:null,q=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function K(U){for(var J=s(p);J!==null;){if(J.callback===null)r(p);else if(J.startTime<=U)r(p),J.sortIndex=J.expirationTime,i(m,J);else break;J=s(p)}}function P(U){if(w=!1,K(U),!E)if(s(m)!==null)E=!0,C||(C=!0,ne());else{var J=s(p);J!==null&&de(P,J.startTime-U)}}var C=!1,N=-1,F=5,re=-1;function le(){return z?!0:!(t.unstable_now()-re<F)}function ue(){if(z=!1,C){var U=t.unstable_now();re=U;var J=!0;try{e:{E=!1,w&&(w=!1,q(N),N=-1),x=!0;var te=S;try{t:{for(K(U),y=s(m);y!==null&&!(y.expirationTime>U&&le());){var je=y.callback;if(typeof je=="function"){y.callback=null,S=y.priorityLevel;var Ae=je(y.expirationTime<=U);if(U=t.unstable_now(),typeof Ae=="function"){y.callback=Ae,K(U),J=!0;break t}y===s(m)&&r(m),K(U)}else r(m);y=s(m)}if(y!==null)J=!0;else{var j=s(p);j!==null&&de(P,j.startTime-U),J=!1}}break e}finally{y=null,S=te,x=!1}J=void 0}}finally{J?ne():C=!1}}}var ne;if(typeof G=="function")ne=function(){G(ue)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ye=he.port2;he.port1.onmessage=ue,ne=function(){ye.postMessage(null)}}else ne=function(){R(ue,0)};function de(U,J){N=R(function(){U(t.unstable_now())},J)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return S},t.unstable_next=function(U){switch(S){case 1:case 2:case 3:var J=3;break;default:J=S}var te=S;S=J;try{return U()}finally{S=te}},t.unstable_requestPaint=function(){z=!0},t.unstable_runWithPriority=function(U,J){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var te=S;S=U;try{return J()}finally{S=te}},t.unstable_scheduleCallback=function(U,J,te){var je=t.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?je+te:je):te=je,U){case 1:var Ae=-1;break;case 2:Ae=250;break;case 5:Ae=1073741823;break;case 4:Ae=1e4;break;default:Ae=5e3}return Ae=te+Ae,U={id:v++,callback:J,priorityLevel:U,startTime:te,expirationTime:Ae,sortIndex:-1},te>je?(U.sortIndex=te,i(p,U),s(m)===null&&U===s(p)&&(w?(q(N),N=-1):w=!0,de(P,te-je))):(U.sortIndex=Ae,i(m,U),E||x||(E=!0,C||(C=!0,ne()))),U},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(U){var J=S;return function(){var te=S;S=J;try{return U.apply(this,arguments)}finally{S=te}}}})(sf)),sf}var Cg;function Jx(){return Cg||(Cg=1,af.exports=Xx()),af.exports}var rf={exports:{}},mt={};var Mg;function Ix(){if(Mg)return mt;Mg=1;var t=xr();function i(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)p+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(m,p,v){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:y==null?null:""+y,children:m,containerInfo:p,implementation:v}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,mt.createPortal=function(m,p){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return c(m,p,null,v)},mt.flushSync=function(m){var p=d.T,v=r.p;try{if(d.T=null,r.p=2,m)return m()}finally{d.T=p,r.p=v,r.d.f()}},mt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(m,p))},mt.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},mt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var v=p.as,y=h(v,p.crossOrigin),S=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;v==="style"?r.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:S,fetchPriority:x}):v==="script"&&r.d.X(m,{crossOrigin:y,integrity:S,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},mt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var v=h(p.as,p.crossOrigin);r.d.M(m,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(m)},mt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var v=p.as,y=h(v,p.crossOrigin);r.d.L(m,v,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},mt.preloadModule=function(m,p){if(typeof m=="string")if(p){var v=h(p.as,p.crossOrigin);r.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(m)},mt.requestFormReset=function(m){r.d.r(m)},mt.unstable_batchedUpdates=function(m,p){return m(p)},mt.useFormState=function(m,p,v){return d.H.useFormState(m,p,v)},mt.useFormStatus=function(){return d.H.useHostTransitionStatus()},mt.version="19.2.8",mt}var Dg;function mv(){if(Dg)return rf.exports;Dg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),rf.exports=Ix(),rf.exports}var kg;function Wx(){if(kg)return ir;kg=1;var t=Jx(),i=xr(),s=mv();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function d(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(r(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,l=n;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(l=u.return,l!==null){a=l;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return m(u),e;if(f===l)return m(u),n;f=f.sibling}throw Error(r(188))}if(a.return!==l.return)a=u,l=f;else{for(var g=!1,_=u.child;_;){if(_===a){g=!0,a=u,l=f;break}if(_===l){g=!0,l=u,a=f;break}_=_.sibling}if(!g){for(_=f.child;_;){if(_===a){g=!0,a=f,l=u;break}if(_===l){g=!0,l=f,a=u;break}_=_.sibling}if(!g)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function v(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=v(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,S=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),R=Symbol.for("react.profiler"),q=Symbol.for("react.consumer"),G=Symbol.for("react.context"),K=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),ue=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=ue&&e[ue]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case R:return"Profiler";case z:return"StrictMode";case P:return"Suspense";case C:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case G:return e.displayName||"Context";case q:return(e._context.displayName||"Context")+".Consumer";case K:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case N:return n=e.displayName||null,n!==null?n:ye(e.type)||"Memo";case F:n=e._payload,e=e._init;try{return ye(e(n))}catch{}}return null}var de=Array.isArray,U=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te={pending:!1,data:null,method:null,action:null},je=[],Ae=-1;function j(e){return{current:e}}function Z(e){0>Ae||(e.current=je[Ae],je[Ae]=null,Ae--)}function V(e,n){Ae++,je[Ae]=e.current,e.current=n}var I=j(null),ce=j(null),ge=j(null),we=j(null);function Le(e,n){switch(V(ge,n),V(ce,e),V(I,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?Xp(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=Xp(n),e=Jp(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(I),V(I,e)}function Be(){Z(I),Z(ce),Z(ge)}function on(e){e.memoizedState!==null&&V(we,e);var n=I.current,a=Jp(n,e.type);n!==a&&(V(ce,e),V(I,a))}function Ni(e){ce.current===e&&(Z(I),Z(ce)),we.current===e&&(Z(we),Is._currentValue=te)}var Uo,zd;function Ai(e){if(Uo===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Uo=n&&n[1]||"",zd=-1<a.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Uo+e+zd}var Lo=!1;function Zo(e,n){if(!e||Lo)return"";Lo=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(L){var k=L}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(L){k=L}e.call(Q.prototype)}}else{try{throw Error()}catch(L){k=L}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(L){if(L&&k&&typeof L.stack=="string")return[L.stack,k.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),y=f[0],_=f[1];if(y&&_){var w=y.split(`
3
+ `+Uo+e+zd}var Lo=!1;function Zo(e,n){if(!e||Lo)return"";Lo=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var Q=function(){throw Error()};if(Object.defineProperty(Q.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Q,[])}catch(L){var k=L}Reflect.construct(e,[],Q)}else{try{Q.call()}catch(L){k=L}e.call(Q.prototype)}}else{try{throw Error()}catch(L){k=L}(Q=e())&&typeof Q.catch=="function"&&Q.catch(function(){})}}catch(L){if(L&&k&&typeof L.stack=="string")return[L.stack,k.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=l.DetermineComponentFrameRoot(),g=f[0],_=f[1];if(g&&_){var O=g.split(`
4
4
  `),D=_.split(`
5
- `);for(u=l=0;l<w.length&&!w[l].includes("DetermineComponentFrameRoot");)l++;for(;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;if(l===w.length||u===D.length)for(l=w.length-1,u=D.length-1;1<=l&&0<=u&&w[l]!==D[u];)u--;for(;1<=l&&0<=u;l--,u--)if(w[l]!==D[u]){if(l!==1||u!==1)do if(l--,u--,0>u||w[l]!==D[u]){var B=`
6
- `+w[l].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=l&&0<=u);break}}}finally{Lo=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ai(a):""}function x0(e,n){switch(e.tag){case 26:case 27:case 5:return Ai(e.type);case 16:return Ai("Lazy");case 13:return e.child!==n&&n!==null?Ai("Suspense Fallback"):Ai("Suspense");case 19:return Ai("SuspenseList");case 0:case 15:return Zo(e.type,!1);case 11:return Zo(e.type.render,!1);case 1:return Zo(e.type,!0);case 31:return Ai("Activity");default:return""}}function Td(e){try{var n="",a=null;do n+=x0(e,a),a=e,e=e.return;while(e);return n}catch(l){return`
5
+ `);for(u=l=0;l<O.length&&!O[l].includes("DetermineComponentFrameRoot");)l++;for(;u<D.length&&!D[u].includes("DetermineComponentFrameRoot");)u++;if(l===O.length||u===D.length)for(l=O.length-1,u=D.length-1;1<=l&&0<=u&&O[l]!==D[u];)u--;for(;1<=l&&0<=u;l--,u--)if(O[l]!==D[u]){if(l!==1||u!==1)do if(l--,u--,0>u||O[l]!==D[u]){var B=`
6
+ `+O[l].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=l&&0<=u);break}}}finally{Lo=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ai(a):""}function E0(e,n){switch(e.tag){case 26:case 27:case 5:return Ai(e.type);case 16:return Ai("Lazy");case 13:return e.child!==n&&n!==null?Ai("Suspense Fallback"):Ai("Suspense");case 19:return Ai("SuspenseList");case 0:case 15:return Zo(e.type,!1);case 11:return Zo(e.type.render,!1);case 1:return Zo(e.type,!0);case 31:return Ai("Activity");default:return""}}function Td(e){try{var n="",a=null;do n+=E0(e,a),a=e,e=e.return;while(e);return n}catch(l){return`
7
7
  Error generating stack: `+l.message+`
8
- `+l.stack}}var qo=Object.prototype.hasOwnProperty,Bo=t.unstable_scheduleCallback,Ho=t.unstable_cancelCallback,_0=t.unstable_shouldYield,E0=t.unstable_requestPaint,Rt=t.unstable_now,O0=t.unstable_getCurrentPriorityLevel,jd=t.unstable_ImmediatePriority,Nd=t.unstable_UserBlockingPriority,Er=t.unstable_NormalPriority,w0=t.unstable_LowPriority,Ad=t.unstable_IdlePriority,z0=t.log,T0=t.unstable_setDisableYieldValue,us=null,Ct=null;function $n(e){if(typeof z0=="function"&&T0(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(us,e)}catch{}}var Mt=Math.clz32?Math.clz32:A0,j0=Math.log,N0=Math.LN2;function A0(e){return e>>>=0,e===0?32:31-(j0(e)/N0|0)|0}var Or=256,wr=262144,zr=4194304;function Ri(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Tr(e,n,a){var l=e.pendingLanes;if(l===0)return 0;var u=0,f=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var _=l&134217727;return _!==0?(l=_&~f,l!==0?u=Ri(l):(y&=_,y!==0?u=Ri(y):a||(a=_&~e,a!==0&&(u=Ri(a))))):(_=l&~f,_!==0?u=Ri(_):y!==0?u=Ri(y):a||(a=l&~e,a!==0&&(u=Ri(a)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,a=n&-n,f>=a||f===32&&(a&4194048)!==0)?n:u}function cs(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function R0(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rd(){var e=zr;return zr<<=1,(zr&62914560)===0&&(zr=4194304),e}function $o(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function fs(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function C0(e,n,a,l,u,f){var y=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var _=e.entanglements,w=e.expirationTimes,D=e.hiddenUpdates;for(a=y&~a;0<a;){var B=31-Mt(a),Q=1<<B;_[B]=0,w[B]=-1;var k=D[B];if(k!==null)for(D[B]=null,B=0;B<k.length;B++){var L=k[B];L!==null&&(L.lane&=-536870913)}a&=~Q}l!==0&&Cd(e,l,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~n))}function Cd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-Mt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Md(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var l=31-Mt(a),u=1<<l;u&n|e[l]&n&&(e[l]|=n),a&=~u}}function Dd(e,n){var a=n&-n;return a=(a&42)!==0?1:Qo(a),(a&(e.suspendedLanes|n))!==0?0:a}function Qo(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Go(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function kd(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Sg(e.type))}function Ud(e,n){var a=J.p;try{return J.p=e,n()}finally{J.p=a}}var Qn=Math.random().toString(36).slice(2),rt="__reactFiber$"+Qn,St="__reactProps$"+Qn,ra="__reactContainer$"+Qn,Ko="__reactEvents$"+Qn,M0="__reactListeners$"+Qn,D0="__reactHandles$"+Qn,Ld="__reactResources$"+Qn,ds="__reactMarker$"+Qn;function Yo(e){delete e[rt],delete e[St],delete e[Ko],delete e[M0],delete e[D0]}function la(e){var n=e[rt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[ra]||a[rt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=ag(e);e!==null;){if(a=e[rt])return a;e=ag(e)}return n}e=a,a=e.parentNode}return null}function oa(e){if(e=e[rt]||e[ra]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function hs(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ua(e){var n=e[Ld];return n||(n=e[Ld]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function at(e){e[ds]=!0}var Zd=new Set,qd={};function Ci(e,n){ca(e,n),ca(e+"Capture",n)}function ca(e,n){for(qd[e]=n,e=0;e<n.length;e++)Zd.add(n[e])}var k0=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]*$"),Bd={},Hd={};function U0(e){return qo.call(Hd,e)?!0:qo.call(Bd,e)?!1:k0.test(e)?Hd[e]=!0:(Bd[e]=!0,!1)}function jr(e,n,a){if(U0(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Nr(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function yn(e,n,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+l)}}function Qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $d(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function L0(e,n,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,f=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(y){a=""+y,f.call(this,y)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(y){a=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Vo(e){if(!e._valueTracker){var n=$d(e)?"checked":"value";e._valueTracker=L0(e,n,""+e[n])}}function Qd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return e&&(l=$d(e)?e.checked?"true":"false":e.value),e=l,e!==a?(n.setValue(e),!0):!1}function Ar(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Z0=/[\n"\\]/g;function Gt(e){return e.replace(Z0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Fo(e,n,a,l,u,f,y,_){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),n!=null?y==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Qt(n)):e.value!==""+Qt(n)&&(e.value=""+Qt(n)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),n!=null?Po(e,y,Qt(n)):a!=null?Po(e,y,Qt(a)):l!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Qt(_):e.removeAttribute("name")}function Gd(e,n,a,l,u,f,y,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),n!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Vo(e);return}a=a!=null?""+Qt(a):"",n=n!=null?""+Qt(n):a,_||n===e.value||(e.value=n),e.defaultValue=n}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=_?e.checked:!!l,e.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Vo(e)}function Po(e,n,a){n==="number"&&Ar(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function fa(e,n,a,l){if(e=e.options,n){n={};for(var u=0;u<a.length;u++)n["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=n.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Qt(a),n=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Kd(e,n,a){if(n!=null&&(n=""+Qt(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+Qt(a):""}function Yd(e,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error(r(92));if(de(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),n=a}a=Qt(n),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Vo(e)}function da(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var q0=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 Vd(e,n,a){var l=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":l?e.setProperty(n,a):typeof a!="number"||a===0||q0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Fd(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in n)l=n[u],n.hasOwnProperty(u)&&a[u]!==l&&Vd(e,u,l)}else for(var f in n)n.hasOwnProperty(f)&&Vd(e,f,n[f])}function Xo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var B0=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"]]),H0=/^[\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 Rr(e){return H0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function vn(){}var Jo=null;function Io(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ha=null,ma=null;function Pd(e){var n=oa(e);if(n&&(e=n.stateNode)){var a=e[St]||null;e:switch(e=n.stateNode,n.type){case"input":if(Fo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Gt(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==e&&l.form===e.form){var u=l[St]||null;if(!u)throw Error(r(90));Fo(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<a.length;n++)l=a[n],l.form===e.form&&Qd(l)}break e;case"textarea":Kd(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&fa(e,!!a.multiple,n,!1)}}}var Wo=!1;function Xd(e,n,a){if(Wo)return e(n,a);Wo=!0;try{var l=e(n);return l}finally{if(Wo=!1,(ha!==null||ma!==null)&&(vl(),ha&&(n=ha,e=ma,ma=ha=null,Pd(n),e)))for(n=0;n<e.length;n++)Pd(e[n])}}function ms(e,n){var a=e.stateNode;if(a===null)return null;var l=a[St]||null;if(l===null)return null;a=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=!1;if(bn)try{var ps={};Object.defineProperty(ps,"passive",{get:function(){eu=!0}}),window.addEventListener("test",ps,ps),window.removeEventListener("test",ps,ps)}catch{eu=!1}var Gn=null,tu=null,Cr=null;function Jd(){if(Cr)return Cr;var e,n=tu,a=n.length,l,u="value"in Gn?Gn.value:Gn.textContent,f=u.length;for(e=0;e<a&&n[e]===u[e];e++);var y=a-e;for(l=1;l<=y&&n[a-l]===u[f-l];l++);return Cr=u.slice(e,1<l?1-l:void 0)}function Mr(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function Dr(){return!0}function Id(){return!1}function xt(e){function n(a,l,u,f,y){this._reactName=a,this._targetInst=u,this.type=l,this.nativeEvent=f,this.target=y,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(a=e[_],this[_]=a?a(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Dr:Id,this.isPropagationStopped=Id,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Dr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Dr)},persist:function(){},isPersistent:Dr}),n}var Mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},kr=xt(Mi),gs=g({},Mi,{view:0,detail:0}),$0=xt(gs),nu,iu,ys,Ur=g({},gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ys&&(ys&&e.type==="mousemove"?(nu=e.screenX-ys.screenX,iu=e.screenY-ys.screenY):iu=nu=0,ys=e),nu)},movementY:function(e){return"movementY"in e?e.movementY:iu}}),Wd=xt(Ur),Q0=g({},Ur,{dataTransfer:0}),G0=xt(Q0),K0=g({},gs,{relatedTarget:0}),au=xt(K0),Y0=g({},Mi,{animationName:0,elapsedTime:0,pseudoElement:0}),V0=xt(Y0),F0=g({},Mi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),P0=xt(F0),X0=g({},Mi,{data:0}),eh=xt(X0),J0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},I0={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"},W0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function eS(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=W0[e])?!!n[e]:!1}function su(){return eS}var tS=g({},gs,{key:function(e){if(e.key){var n=J0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Mr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?I0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,charCode:function(e){return e.type==="keypress"?Mr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Mr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),nS=xt(tS),iS=g({},Ur,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),th=xt(iS),aS=g({},gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),sS=xt(aS),rS=g({},Mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),lS=xt(rS),oS=g({},Ur,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),uS=xt(oS),cS=g({},Mi,{newState:0,oldState:0}),fS=xt(cS),dS=[9,13,27,32],ru=bn&&"CompositionEvent"in window,vs=null;bn&&"documentMode"in document&&(vs=document.documentMode);var hS=bn&&"TextEvent"in window&&!vs,nh=bn&&(!ru||vs&&8<vs&&11>=vs),ih=" ",ah=!1;function sh(e,n){switch(e){case"keyup":return dS.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pa=!1;function mS(e,n){switch(e){case"compositionend":return rh(n);case"keypress":return n.which!==32?null:(ah=!0,ih);case"textInput":return e=n.data,e===ih&&ah?null:e;default:return null}}function pS(e,n){if(pa)return e==="compositionend"||!ru&&sh(e,n)?(e=Jd(),Cr=tu=Gn=null,pa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return nh&&n.locale!=="ko"?null:n.data;default:return null}}var gS={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 lh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!gS[e.type]:n==="textarea"}function oh(e,n,a,l){ha?ma?ma.push(l):ma=[l]:ha=l,n=wl(n,"onChange"),0<n.length&&(a=new kr("onChange","change",null,a,l),e.push({event:a,listeners:n}))}var bs=null,Ss=null;function yS(e){Gp(e,0)}function Lr(e){var n=hs(e);if(Qd(n))return e}function uh(e,n){if(e==="change")return n}var ch=!1;if(bn){var lu;if(bn){var ou="oninput"in document;if(!ou){var fh=document.createElement("div");fh.setAttribute("oninput","return;"),ou=typeof fh.oninput=="function"}lu=ou}else lu=!1;ch=lu&&(!document.documentMode||9<document.documentMode)}function dh(){bs&&(bs.detachEvent("onpropertychange",hh),Ss=bs=null)}function hh(e){if(e.propertyName==="value"&&Lr(Ss)){var n=[];oh(n,Ss,e,Io(e)),Xd(yS,n)}}function vS(e,n,a){e==="focusin"?(dh(),bs=n,Ss=a,bs.attachEvent("onpropertychange",hh)):e==="focusout"&&dh()}function bS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Lr(Ss)}function SS(e,n){if(e==="click")return Lr(n)}function xS(e,n){if(e==="input"||e==="change")return Lr(n)}function _S(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Dt=typeof Object.is=="function"?Object.is:_S;function xs(e,n){if(Dt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),l=Object.keys(n);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var u=a[l];if(!qo.call(n,u)||!Dt(e[u],n[u]))return!1}return!0}function mh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ph(e,n){var a=mh(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=n&&l>=n)return{node:a,offset:n-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=mh(a)}}function gh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?gh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function yh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Ar(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Ar(e.document)}return n}function uu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var ES=bn&&"documentMode"in document&&11>=document.documentMode,ga=null,cu=null,_s=null,fu=!1;function vh(e,n,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fu||ga==null||ga!==Ar(l)||(l=ga,"selectionStart"in l&&uu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),_s&&xs(_s,l)||(_s=l,l=wl(cu,"onSelect"),0<l.length&&(n=new kr("onSelect","select",null,n,a),e.push({event:n,listeners:l}),n.target=ga)))}function Di(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var ya={animationend:Di("Animation","AnimationEnd"),animationiteration:Di("Animation","AnimationIteration"),animationstart:Di("Animation","AnimationStart"),transitionrun:Di("Transition","TransitionRun"),transitionstart:Di("Transition","TransitionStart"),transitioncancel:Di("Transition","TransitionCancel"),transitionend:Di("Transition","TransitionEnd")},du={},bh={};bn&&(bh=document.createElement("div").style,"AnimationEvent"in window||(delete ya.animationend.animation,delete ya.animationiteration.animation,delete ya.animationstart.animation),"TransitionEvent"in window||delete ya.transitionend.transition);function ki(e){if(du[e])return du[e];if(!ya[e])return e;var n=ya[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in bh)return du[e]=n[a];return e}var Sh=ki("animationend"),xh=ki("animationiteration"),_h=ki("animationstart"),OS=ki("transitionrun"),wS=ki("transitionstart"),zS=ki("transitioncancel"),Eh=ki("transitionend"),Oh=new Map,hu="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(" ");hu.push("scrollEnd");function tn(e,n){Oh.set(e,n),Ci(n,[e])}var Zr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Kt=[],va=0,mu=0;function qr(){for(var e=va,n=mu=va=0;n<e;){var a=Kt[n];Kt[n++]=null;var l=Kt[n];Kt[n++]=null;var u=Kt[n];Kt[n++]=null;var f=Kt[n];if(Kt[n++]=null,l!==null&&u!==null){var y=l.pending;y===null?u.next=u:(u.next=y.next,y.next=u),l.pending=u}f!==0&&wh(a,u,f)}}function Br(e,n,a,l){Kt[va++]=e,Kt[va++]=n,Kt[va++]=a,Kt[va++]=l,mu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function pu(e,n,a,l){return Br(e,n,a,l),Hr(e)}function Ui(e,n){return Br(e,null,null,n),Hr(e)}function wh(e,n,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var u=!1,f=e.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&n!==null&&(u=31-Mt(a),e=f.hiddenUpdates,l=e[u],l===null?e[u]=[n]:l.push(n),n.lane=a|536870912),f):null}function Hr(e){if(50<Gs)throw Gs=0,Oc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ba={};function TS(e,n,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,n,a,l){return new TS(e,n,a,l)}function gu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Sn(e,n){var a=e.alternate;return a===null?(a=kt(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function zh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function $r(e,n,a,l,u,f){var y=0;if(l=e,typeof e=="function")gu(e)&&(y=1);else if(typeof e=="string")y=Cx(e,a,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case se:return e=kt(31,a,n,u),e.elementType=se,e.lanes=f,e;case O:return Li(a.children,u,f,n);case T:y=8,u|=24;break;case R:return e=kt(12,a,n,u|2),e.elementType=R,e.lanes=f,e;case P:return e=kt(13,a,n,u),e.elementType=P,e.lanes=f,e;case C:return e=kt(19,a,n,u),e.elementType=C,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:y=10;break e;case q:y=9;break e;case K:y=11;break e;case N:y=14;break e;case V:y=16,l=null;break e}y=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return n=kt(y,a,n,u),n.elementType=e,n.type=l,n.lanes=f,n}function Li(e,n,a,l){return e=kt(7,e,l,n),e.lanes=a,e}function yu(e,n,a){return e=kt(6,e,null,n),e.lanes=a,e}function Th(e){var n=kt(18,null,null,0);return n.stateNode=e,n}function vu(e,n,a){return n=kt(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var jh=new WeakMap;function Yt(e,n){if(typeof e=="object"&&e!==null){var a=jh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Td(n)},jh.set(e,n),n)}return{value:e,source:n,stack:Td(n)}}var Sa=[],xa=0,Qr=null,Es=0,Vt=[],Ft=0,Kn=null,un=1,cn="";function xn(e,n){Sa[xa++]=Es,Sa[xa++]=Qr,Qr=e,Es=n}function Nh(e,n,a){Vt[Ft++]=un,Vt[Ft++]=cn,Vt[Ft++]=Kn,Kn=e;var l=un;e=cn;var u=32-Mt(l)-1;l&=~(1<<u),a+=1;var f=32-Mt(n)+u;if(30<f){var y=u-u%5;f=(l&(1<<y)-1).toString(32),l>>=y,u-=y,un=1<<32-Mt(n)+u|a<<u|l,cn=f+e}else un=1<<f|a<<u|l,cn=e}function bu(e){e.return!==null&&(xn(e,1),Nh(e,1,0))}function Su(e){for(;e===Qr;)Qr=Sa[--xa],Sa[xa]=null,Es=Sa[--xa],Sa[xa]=null;for(;e===Kn;)Kn=Vt[--Ft],Vt[Ft]=null,cn=Vt[--Ft],Vt[Ft]=null,un=Vt[--Ft],Vt[Ft]=null}function Ah(e,n){Vt[Ft++]=un,Vt[Ft++]=cn,Vt[Ft++]=Kn,un=n.id,cn=n.overflow,Kn=e}var lt=null,Ze=null,Ee=!1,Yn=null,Pt=!1,xu=Error(r(519));function Vn(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Os(Yt(n,e)),xu}function Rh(e){var n=e.stateNode,a=e.type,l=e.memoizedProps;switch(n[rt]=e,n[St]=l,a){case"dialog":be("cancel",n),be("close",n);break;case"iframe":case"object":case"embed":be("load",n);break;case"video":case"audio":for(a=0;a<Ys.length;a++)be(Ys[a],n);break;case"source":be("error",n);break;case"img":case"image":case"link":be("error",n),be("load",n);break;case"details":be("toggle",n);break;case"input":be("invalid",n),Gd(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":be("invalid",n);break;case"textarea":be("invalid",n),Yd(n,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||l.suppressHydrationWarning===!0||Fp(n.textContent,a)?(l.popover!=null&&(be("beforetoggle",n),be("toggle",n)),l.onScroll!=null&&be("scroll",n),l.onScrollEnd!=null&&be("scrollend",n),l.onClick!=null&&(n.onclick=vn),n=!0):n=!1,n||Vn(e,!0)}function Ch(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Pt=!1;return;case 27:case 3:Pt=!0;return;default:lt=lt.return}}function _a(e){if(e!==lt)return!1;if(!Ee)return Ch(e),Ee=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||qc(e.type,e.memoizedProps)),a=!a),a&&Ze&&Vn(e),Ch(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ze=ig(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ze=ig(e)}else n===27?(n=Ze,li(e.type)?(e=Gc,Gc=null,Ze=e):Ze=n):Ze=lt?Jt(e.stateNode.nextSibling):null;return!0}function Zi(){Ze=lt=null,Ee=!1}function _u(){var e=Yn;return e!==null&&(wt===null?wt=e:wt.push.apply(wt,e),Yn=null),e}function Os(e){Yn===null?Yn=[e]:Yn.push(e)}var Eu=j(null),qi=null,_n=null;function Fn(e,n,a){F(Eu,n._currentValue),n._currentValue=a}function En(e){e._currentValue=Eu.current,Z(Eu)}function Ou(e,n,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===a)break;e=e.return}}function wu(e,n,a,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var y=u.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=u;for(var w=0;w<n.length;w++)if(_.context===n[w]){f.lanes|=a,_=f.alternate,_!==null&&(_.lanes|=a),Ou(f.return,a,e),l||(y=null);break e}f=_.next}}else if(u.tag===18){if(y=u.return,y===null)throw Error(r(341));y.lanes|=a,f=y.alternate,f!==null&&(f.lanes|=a),Ou(y,a,e),y=null}else y=u.child;if(y!==null)y.return=u;else for(y=u;y!==null;){if(y===e){y=null;break}if(u=y.sibling,u!==null){u.return=y.return,y=u;break}y=y.return}u=y}}function Ea(e,n,a,l){e=null;for(var u=n,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var y=u.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var _=u.type;Dt(u.pendingProps.value,y.value)||(e!==null?e.push(_):e=[_])}}else if(u===Oe.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Js):e=[Js])}u=u.return}e!==null&&wu(n,e,a,l),n.flags|=262144}function Gr(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Bi(e){qi=e,_n=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ot(e){return Mh(qi,e)}function Kr(e,n){return qi===null&&Bi(e),Mh(e,n)}function Mh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},_n===null){if(e===null)throw Error(r(308));_n=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else _n=_n.next=n;return a}var jS=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},NS=t.unstable_scheduleCallback,AS=t.unstable_NormalPriority,Je={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zu(){return{controller:new jS,data:new Map,refCount:0}}function ws(e){e.refCount--,e.refCount===0&&NS(AS,function(){e.controller.abort()})}var zs=null,Tu=0,Oa=0,wa=null;function RS(e,n){if(zs===null){var a=zs=[];Tu=0,Oa=Ac(),wa={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Tu++,n.then(Dh,Dh),n}function Dh(){if(--Tu===0&&zs!==null){wa!==null&&(wa.status="fulfilled");var e=zs;zs=null,Oa=0,wa=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function CS(e,n){var a=[],l={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){l.status="fulfilled",l.value=n;for(var u=0;u<a.length;u++)(0,a[u])(n)},function(u){for(l.status="rejected",l.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),l}var kh=U.S;U.S=function(e,n){vp=Rt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&RS(e,n),kh!==null&&kh(e,n)};var Hi=j(null);function ju(){var e=Hi.current;return e!==null?e:Ue.pooledCache}function Yr(e,n){n===null?F(Hi,Hi.current):F(Hi,n.pool)}function Uh(){var e=ju();return e===null?null:{parent:Je._currentValue,pool:e}}var za=Error(r(460)),Nu=Error(r(474)),Vr=Error(r(542)),Fr={then:function(){}};function Lh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(vn,vn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Bh(e),e;default:if(typeof n.status=="string")n.then(vn,vn);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(l){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=l}},function(l){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Bh(e),e}throw Qi=n,za}}function $i(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Qi=a,za):a}}var Qi=null;function qh(){if(Qi===null)throw Error(r(459));var e=Qi;return Qi=null,e}function Bh(e){if(e===za||e===Vr)throw Error(r(483))}var Ta=null,Ts=0;function Pr(e){var n=Ts;return Ts+=1,Ta===null&&(Ta=[]),Zh(Ta,e,n)}function js(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Xr(e,n){throw n.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Hh(e){function n(A,z){if(e){var M=A.deletions;M===null?(A.deletions=[z],A.flags|=16):M.push(z)}}function a(A,z){if(!e)return null;for(;z!==null;)n(A,z),z=z.sibling;return null}function l(A){for(var z=new Map;A!==null;)A.key!==null?z.set(A.key,A):z.set(A.index,A),A=A.sibling;return z}function u(A,z){return A=Sn(A,z),A.index=0,A.sibling=null,A}function f(A,z,M){return A.index=M,e?(M=A.alternate,M!==null?(M=M.index,M<z?(A.flags|=67108866,z):M):(A.flags|=67108866,z)):(A.flags|=1048576,z)}function y(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function _(A,z,M,H){return z===null||z.tag!==6?(z=yu(M,A.mode,H),z.return=A,z):(z=u(z,M),z.return=A,z)}function w(A,z,M,H){var ae=M.type;return ae===O?B(A,z,M.props.children,H,M.key):z!==null&&(z.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===V&&$i(ae)===z.type)?(z=u(z,M.props),js(z,M),z.return=A,z):(z=$r(M.type,M.key,M.props,null,A.mode,H),js(z,M),z.return=A,z)}function D(A,z,M,H){return z===null||z.tag!==4||z.stateNode.containerInfo!==M.containerInfo||z.stateNode.implementation!==M.implementation?(z=vu(M,A.mode,H),z.return=A,z):(z=u(z,M.children||[]),z.return=A,z)}function B(A,z,M,H,ae){return z===null||z.tag!==7?(z=Li(M,A.mode,H,ae),z.return=A,z):(z=u(z,M),z.return=A,z)}function Q(A,z,M){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=yu(""+z,A.mode,M),z.return=A,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case S:return M=$r(z.type,z.key,z.props,null,A.mode,M),js(M,z),M.return=A,M;case E:return z=vu(z,A.mode,M),z.return=A,z;case V:return z=$i(z),Q(A,z,M)}if(de(z)||ne(z))return z=Li(z,A.mode,M,null),z.return=A,z;if(typeof z.then=="function")return Q(A,Pr(z),M);if(z.$$typeof===G)return Q(A,Kr(A,z),M);Xr(A,z)}return null}function k(A,z,M,H){var ae=z!==null?z.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ae!==null?null:_(A,z,""+M,H);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case S:return M.key===ae?w(A,z,M,H):null;case E:return M.key===ae?D(A,z,M,H):null;case V:return M=$i(M),k(A,z,M,H)}if(de(M)||ne(M))return ae!==null?null:B(A,z,M,H,null);if(typeof M.then=="function")return k(A,z,Pr(M),H);if(M.$$typeof===G)return k(A,z,Kr(A,M),H);Xr(A,M)}return null}function L(A,z,M,H,ae){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return A=A.get(M)||null,_(z,A,""+H,ae);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case S:return A=A.get(H.key===null?M:H.key)||null,w(z,A,H,ae);case E:return A=A.get(H.key===null?M:H.key)||null,D(z,A,H,ae);case V:return H=$i(H),L(A,z,M,H,ae)}if(de(H)||ne(H))return A=A.get(M)||null,B(z,A,H,ae,null);if(typeof H.then=="function")return L(A,z,M,Pr(H),ae);if(H.$$typeof===G)return L(A,z,M,Kr(z,H),ae);Xr(z,H)}return null}function W(A,z,M,H){for(var ae=null,we=null,ee=z,pe=z=0,xe=null;ee!==null&&pe<M.length;pe++){ee.index>pe?(xe=ee,ee=null):xe=ee.sibling;var ze=k(A,ee,M[pe],H);if(ze===null){ee===null&&(ee=xe);break}e&&ee&&ze.alternate===null&&n(A,ee),z=f(ze,z,pe),we===null?ae=ze:we.sibling=ze,we=ze,ee=xe}if(pe===M.length)return a(A,ee),Ee&&xn(A,pe),ae;if(ee===null){for(;pe<M.length;pe++)ee=Q(A,M[pe],H),ee!==null&&(z=f(ee,z,pe),we===null?ae=ee:we.sibling=ee,we=ee);return Ee&&xn(A,pe),ae}for(ee=l(ee);pe<M.length;pe++)xe=L(ee,A,pe,M[pe],H),xe!==null&&(e&&xe.alternate!==null&&ee.delete(xe.key===null?pe:xe.key),z=f(xe,z,pe),we===null?ae=xe:we.sibling=xe,we=xe);return e&&ee.forEach(function(di){return n(A,di)}),Ee&&xn(A,pe),ae}function oe(A,z,M,H){if(M==null)throw Error(r(151));for(var ae=null,we=null,ee=z,pe=z=0,xe=null,ze=M.next();ee!==null&&!ze.done;pe++,ze=M.next()){ee.index>pe?(xe=ee,ee=null):xe=ee.sibling;var di=k(A,ee,ze.value,H);if(di===null){ee===null&&(ee=xe);break}e&&ee&&di.alternate===null&&n(A,ee),z=f(di,z,pe),we===null?ae=di:we.sibling=di,we=di,ee=xe}if(ze.done)return a(A,ee),Ee&&xn(A,pe),ae;if(ee===null){for(;!ze.done;pe++,ze=M.next())ze=Q(A,ze.value,H),ze!==null&&(z=f(ze,z,pe),we===null?ae=ze:we.sibling=ze,we=ze);return Ee&&xn(A,pe),ae}for(ee=l(ee);!ze.done;pe++,ze=M.next())ze=L(ee,A,pe,ze.value,H),ze!==null&&(e&&ze.alternate!==null&&ee.delete(ze.key===null?pe:ze.key),z=f(ze,z,pe),we===null?ae=ze:we.sibling=ze,we=ze);return e&&ee.forEach(function(Qx){return n(A,Qx)}),Ee&&xn(A,pe),ae}function ke(A,z,M,H){if(typeof M=="object"&&M!==null&&M.type===O&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case S:e:{for(var ae=M.key;z!==null;){if(z.key===ae){if(ae=M.type,ae===O){if(z.tag===7){a(A,z.sibling),H=u(z,M.props.children),H.return=A,A=H;break e}}else if(z.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===V&&$i(ae)===z.type){a(A,z.sibling),H=u(z,M.props),js(H,M),H.return=A,A=H;break e}a(A,z);break}else n(A,z);z=z.sibling}M.type===O?(H=Li(M.props.children,A.mode,H,M.key),H.return=A,A=H):(H=$r(M.type,M.key,M.props,null,A.mode,H),js(H,M),H.return=A,A=H)}return y(A);case E:e:{for(ae=M.key;z!==null;){if(z.key===ae)if(z.tag===4&&z.stateNode.containerInfo===M.containerInfo&&z.stateNode.implementation===M.implementation){a(A,z.sibling),H=u(z,M.children||[]),H.return=A,A=H;break e}else{a(A,z);break}else n(A,z);z=z.sibling}H=vu(M,A.mode,H),H.return=A,A=H}return y(A);case V:return M=$i(M),ke(A,z,M,H)}if(de(M))return W(A,z,M,H);if(ne(M)){if(ae=ne(M),typeof ae!="function")throw Error(r(150));return M=ae.call(M),oe(A,z,M,H)}if(typeof M.then=="function")return ke(A,z,Pr(M),H);if(M.$$typeof===G)return ke(A,z,Kr(A,M),H);Xr(A,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,z!==null&&z.tag===6?(a(A,z.sibling),H=u(z,M),H.return=A,A=H):(a(A,z),H=yu(M,A.mode,H),H.return=A,A=H),y(A)):a(A,z)}return function(A,z,M,H){try{Ts=0;var ae=ke(A,z,M,H);return Ta=null,ae}catch(ee){if(ee===za||ee===Vr)throw ee;var we=kt(29,ee,null,A.mode);return we.lanes=H,we.return=A,we}}}var Gi=Hh(!0),$h=Hh(!1),Pn=!1;function Au(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ru(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Xn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Jn(e,n,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Te&2)!==0){var u=l.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),l.pending=n,n=Hr(e),wh(e,null,a),n}return Br(e,l,n,a),Hr(e)}function Ns(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var l=n.lanes;l&=e.pendingLanes,a|=l,n.lanes=a,Md(e,a)}}function Cu(e,n){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var u=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var y={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?u=f=y:f=f.next=y,a=a.next}while(a!==null);f===null?u=f=n:f=f.next=n}else u=f=n;a={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Mu=!1;function As(){if(Mu){var e=wa;if(e!==null)throw e}}function Rs(e,n,a,l){Mu=!1;var u=e.updateQueue;Pn=!1;var f=u.firstBaseUpdate,y=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var w=_,D=w.next;w.next=null,y===null?f=D:y.next=D,y=w;var B=e.alternate;B!==null&&(B=B.updateQueue,_=B.lastBaseUpdate,_!==y&&(_===null?B.firstBaseUpdate=D:_.next=D,B.lastBaseUpdate=w))}if(f!==null){var Q=u.baseState;y=0,B=D=w=null,_=f;do{var k=_.lane&-536870913,L=k!==_.lane;if(L?(Se&k)===k:(l&k)===k){k!==0&&k===Oa&&(Mu=!0),B!==null&&(B=B.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var W=e,oe=_;k=n;var ke=a;switch(oe.tag){case 1:if(W=oe.payload,typeof W=="function"){Q=W.call(ke,Q,k);break e}Q=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=oe.payload,k=typeof W=="function"?W.call(ke,Q,k):W,k==null)break e;Q=g({},Q,k);break e;case 2:Pn=!0}}k=_.callback,k!==null&&(e.flags|=64,L&&(e.flags|=8192),L=u.callbacks,L===null?u.callbacks=[k]:L.push(k))}else L={lane:k,tag:_.tag,payload:_.payload,callback:_.callback,next:null},B===null?(D=B=L,w=Q):B=B.next=L,y|=k;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;L=_,_=L.next,L.next=null,u.lastBaseUpdate=L,u.shared.pending=null}}while(!0);B===null&&(w=Q),u.baseState=w,u.firstBaseUpdate=D,u.lastBaseUpdate=B,f===null&&(u.shared.lanes=0),ni|=y,e.lanes=y,e.memoizedState=Q}}function Qh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Gh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Qh(a[e],n)}var ja=j(null),Jr=j(0);function Kh(e,n){e=Cn,F(Jr,e),F(ja,n),Cn=e|n.baseLanes}function Du(){F(Jr,Cn),F(ja,ja.current)}function ku(){Cn=Jr.current,Z(ja),Z(Jr)}var Ut=j(null),Xt=null;function In(e){var n=e.alternate;F(Pe,Pe.current&1),F(Ut,e),Xt===null&&(n===null||ja.current!==null||n.memoizedState!==null)&&(Xt=e)}function Uu(e){F(Pe,Pe.current),F(Ut,e),Xt===null&&(Xt=e)}function Yh(e){e.tag===22?(F(Pe,Pe.current),F(Ut,e),Xt===null&&(Xt=e)):Wn()}function Wn(){F(Pe,Pe.current),F(Ut,Ut.current)}function Lt(e){Z(Ut),Xt===e&&(Xt=null),Z(Pe)}var Pe=j(0);function Ir(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||$c(a)||Qc(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var On=0,me=null,Me=null,Ie=null,Wr=!1,Na=!1,Ki=!1,el=0,Cs=0,Aa=null,MS=0;function Ve(){throw Error(r(321))}function Lu(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!Dt(e[a],n[a]))return!1;return!0}function Zu(e,n,a,l,u,f){return On=f,me=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Nm:Wu,Ki=!1,f=a(l,u),Ki=!1,Na&&(f=Fh(n,a,l,u)),Vh(e),f}function Vh(e){U.H=ks;var n=Me!==null&&Me.next!==null;if(On=0,Ie=Me=me=null,Wr=!1,Cs=0,Aa=null,n)throw Error(r(300));e===null||We||(e=e.dependencies,e!==null&&Gr(e)&&(We=!0))}function Fh(e,n,a,l){me=e;var u=0;do{if(Na&&(Aa=null),Cs=0,Na=!1,25<=u)throw Error(r(301));if(u+=1,Ie=Me=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=Am,f=n(a,l)}while(Na);return f}function DS(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?Ms(n):n,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(me.flags|=1024),n}function qu(){var e=el!==0;return el=0,e}function Bu(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Hu(e){if(Wr){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Wr=!1}On=0,Ie=Me=me=null,Na=!1,Cs=el=0,Aa=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?me.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function Xe(){if(Me===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var n=Ie===null?me.memoizedState:Ie.next;if(n!==null)Ie=n,Me=e;else{if(e===null)throw me.alternate===null?Error(r(467)):Error(r(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Ie===null?me.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function tl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ms(e){var n=Cs;return Cs+=1,Aa===null&&(Aa=[]),e=Zh(Aa,e,n),n=me,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Nm:Wu),e}function nl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ms(e);if(e.$$typeof===G)return ot(e)}throw Error(r(438,String(e)))}function $u(e){var n=null,a=me.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=me.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=tl(),me.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),l=0;l<e;l++)a[l]=le;return n.index++,a}function wn(e,n){return typeof n=="function"?n(e):n}function il(e){var n=Xe();return Qu(n,Me,e)}function Qu(e,n,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var u=e.baseQueue,f=l.pending;if(f!==null){if(u!==null){var y=u.next;u.next=f.next,f.next=y}n.baseQueue=u=f,l.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{n=u.next;var _=y=null,w=null,D=n,B=!1;do{var Q=D.lane&-536870913;if(Q!==D.lane?(Se&Q)===Q:(On&Q)===Q){var k=D.revertLane;if(k===0)w!==null&&(w=w.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Q===Oa&&(B=!0);else if((On&k)===k){D=D.next,k===Oa&&(B=!0);continue}else Q={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},w===null?(_=w=Q,y=f):w=w.next=Q,me.lanes|=k,ni|=k;Q=D.action,Ki&&a(f,Q),f=D.hasEagerState?D.eagerState:a(f,Q)}else k={lane:Q,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},w===null?(_=w=k,y=f):w=w.next=k,me.lanes|=Q,ni|=Q;D=D.next}while(D!==null&&D!==n);if(w===null?y=f:w.next=_,!Dt(f,e.memoizedState)&&(We=!0,B&&(a=wa,a!==null)))throw a;e.memoizedState=f,e.baseState=y,e.baseQueue=w,l.lastRenderedState=f}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Gu(e){var n=Xe(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,u=a.pending,f=n.memoizedState;if(u!==null){a.pending=null;var y=u=u.next;do f=e(f,y.action),y=y.next;while(y!==u);Dt(f,n.memoizedState)||(We=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,l]}function Ph(e,n,a){var l=me,u=Xe(),f=Ee;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=n();var y=!Dt((Me||u).memoizedState,a);if(y&&(u.memoizedState=a,We=!0),u=u.queue,Vu(Ih.bind(null,l,u,e),[e]),u.getSnapshot!==n||y||Ie!==null&&Ie.memoizedState.tag&1){if(l.flags|=2048,Ra(9,{destroy:void 0},Jh.bind(null,l,u,a,n),null),Ue===null)throw Error(r(349));f||(On&127)!==0||Xh(l,n,a)}return a}function Xh(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=me.updateQueue,n===null?(n=tl(),me.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Jh(e,n,a,l){n.value=a,n.getSnapshot=l,Wh(n)&&em(e)}function Ih(e,n,a){return a(function(){Wh(n)&&em(e)})}function Wh(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Dt(e,a)}catch{return!0}}function em(e){var n=Ui(e,2);n!==null&&zt(n,e,2)}function Ku(e){var n=gt();if(typeof e=="function"){var a=e;if(e=a(),Ki){$n(!0);try{a()}finally{$n(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wn,lastRenderedState:e},n}function tm(e,n,a,l){return e.baseState=a,Qu(e,Me,typeof l=="function"?l:wn)}function kS(e,n,a,l,u){if(rl(e))throw Error(r(485));if(e=n.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){f.listeners.push(y)}};U.T!==null?a(!0):f.isTransition=!1,l(f),a=n.pending,a===null?(f.next=n.pending=f,nm(n,f)):(f.next=a.next,n.pending=a.next=f)}}function nm(e,n){var a=n.action,l=n.payload,u=e.state;if(n.isTransition){var f=U.T,y={};U.T=y;try{var _=a(u,l),w=U.S;w!==null&&w(y,_),im(e,n,_)}catch(D){Yu(e,n,D)}finally{f!==null&&y.types!==null&&(f.types=y.types),U.T=f}}else try{f=a(u,l),im(e,n,f)}catch(D){Yu(e,n,D)}}function im(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){am(e,n,l)},function(l){return Yu(e,n,l)}):am(e,n,a)}function am(e,n,a){n.status="fulfilled",n.value=a,sm(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,nm(e,a)))}function Yu(e,n,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,sm(n),n=n.next;while(n!==l)}e.action=null}function sm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function rm(e,n){return n}function lm(e,n){if(Ee){var a=Ue.formState;if(a!==null){e:{var l=me;if(Ee){if(Ze){t:{for(var u=Ze,f=Pt;u.nodeType!==8;){if(!f){u=null;break t}if(u=Jt(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Ze=Jt(u.nextSibling),l=u.data==="F!";break e}}Vn(l)}l=!1}l&&(n=a[0])}}return a=gt(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rm,lastRenderedState:n},a.queue=l,a=zm.bind(null,me,l),l.dispatch=a,l=Ku(!1),f=Iu.bind(null,me,!1,l.queue),l=gt(),u={state:n,dispatch:null,action:e,pending:null},l.queue=u,a=kS.bind(null,me,u,f,a),u.dispatch=a,l.memoizedState=e,[n,a,!1]}function om(e){var n=Xe();return um(n,Me,e)}function um(e,n,a){if(n=Qu(e,n,rm)[0],e=il(wn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Ms(n)}catch(y){throw y===za?Vr:y}else l=n;n=Xe();var u=n.queue,f=u.dispatch;return a!==n.memoizedState&&(me.flags|=2048,Ra(9,{destroy:void 0},US.bind(null,u,a),null)),[l,f,e]}function US(e,n){e.action=n}function cm(e){var n=Xe(),a=Me;if(a!==null)return um(n,a,e);Xe(),n=n.memoizedState,a=Xe();var l=a.queue.dispatch;return a.memoizedState=e,[n,l,!1]}function Ra(e,n,a,l){return e={tag:e,create:a,deps:l,inst:n,next:null},n=me.updateQueue,n===null&&(n=tl(),me.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,n.lastEffect=e),e}function fm(){return Xe().memoizedState}function al(e,n,a,l){var u=gt();me.flags|=e,u.memoizedState=Ra(1|n,{destroy:void 0},a,l===void 0?null:l)}function sl(e,n,a,l){var u=Xe();l=l===void 0?null:l;var f=u.memoizedState.inst;Me!==null&&l!==null&&Lu(l,Me.memoizedState.deps)?u.memoizedState=Ra(n,f,a,l):(me.flags|=e,u.memoizedState=Ra(1|n,f,a,l))}function dm(e,n){al(8390656,8,e,n)}function Vu(e,n){sl(2048,8,e,n)}function LS(e){me.flags|=4;var n=me.updateQueue;if(n===null)n=tl(),me.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function hm(e){var n=Xe().memoizedState;return LS({ref:n,nextImpl:e}),function(){if((Te&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function mm(e,n){return sl(4,2,e,n)}function pm(e,n){return sl(4,4,e,n)}function gm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function ym(e,n,a){a=a!=null?a.concat([e]):null,sl(4,4,gm.bind(null,n,e),a)}function Fu(){}function vm(e,n){var a=Xe();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&Lu(n,l[1])?l[0]:(a.memoizedState=[e,n],e)}function bm(e,n){var a=Xe();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&Lu(n,l[1]))return l[0];if(l=e(),Ki){$n(!0);try{e()}finally{$n(!1)}}return a.memoizedState=[l,n],l}function Pu(e,n,a){return a===void 0||(On&1073741824)!==0&&(Se&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Sp(),me.lanes|=e,ni|=e,a)}function Sm(e,n,a,l){return Dt(a,n)?a:ja.current!==null?(e=Pu(e,a,l),Dt(e,n)||(We=!0),e):(On&42)===0||(On&1073741824)!==0&&(Se&261930)===0?(We=!0,e.memoizedState=a):(e=Sp(),me.lanes|=e,ni|=e,n)}function xm(e,n,a,l,u){var f=J.p;J.p=f!==0&&8>f?f:8;var y=U.T,_={};U.T=_,Iu(e,!1,n,a);try{var w=u(),D=U.S;if(D!==null&&D(_,w),w!==null&&typeof w=="object"&&typeof w.then=="function"){var B=CS(w,l);Ds(e,n,B,Bt(e))}else Ds(e,n,l,Bt(e))}catch(Q){Ds(e,n,{then:function(){},status:"rejected",reason:Q},Bt())}finally{J.p=f,y!==null&&_.types!==null&&(y.types=_.types),U.T=y}}function ZS(){}function Xu(e,n,a,l){if(e.tag!==5)throw Error(r(476));var u=_m(e).queue;xm(e,u,n,te,a===null?ZS:function(){return Em(e),a(l)})}function _m(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wn,lastRenderedState:te},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Em(e){var n=_m(e);n.next===null&&(n=e.alternate.memoizedState),Ds(e,n.next.queue,{},Bt())}function Ju(){return ot(Js)}function Om(){return Xe().memoizedState}function wm(){return Xe().memoizedState}function qS(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=Bt();e=Xn(a);var l=Jn(n,e,a);l!==null&&(zt(l,n,a),Ns(l,n,a)),n={cache:zu()},e.payload=n;return}n=n.return}}function BS(e,n,a){var l=Bt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},rl(e)?Tm(n,a):(a=pu(e,n,a,l),a!==null&&(zt(a,e,l),jm(a,n,l)))}function zm(e,n,a){var l=Bt();Ds(e,n,a,l)}function Ds(e,n,a,l){var u={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(rl(e))Tm(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var y=n.lastRenderedState,_=f(y,a);if(u.hasEagerState=!0,u.eagerState=_,Dt(_,y))return Br(e,n,u,0),Ue===null&&qr(),!1}catch{}if(a=pu(e,n,u,l),a!==null)return zt(a,e,l),jm(a,n,l),!0}return!1}function Iu(e,n,a,l){if(l={lane:2,revertLane:Ac(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},rl(e)){if(n)throw Error(r(479))}else n=pu(e,a,l,2),n!==null&&zt(n,e,2)}function rl(e){var n=e.alternate;return e===me||n!==null&&n===me}function Tm(e,n){Na=Wr=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function jm(e,n,a){if((a&4194048)!==0){var l=n.lanes;l&=e.pendingLanes,a|=l,n.lanes=a,Md(e,a)}}var ks={readContext:ot,use:nl,useCallback:Ve,useContext:Ve,useEffect:Ve,useImperativeHandle:Ve,useLayoutEffect:Ve,useInsertionEffect:Ve,useMemo:Ve,useReducer:Ve,useRef:Ve,useState:Ve,useDebugValue:Ve,useDeferredValue:Ve,useTransition:Ve,useSyncExternalStore:Ve,useId:Ve,useHostTransitionStatus:Ve,useFormState:Ve,useActionState:Ve,useOptimistic:Ve,useMemoCache:Ve,useCacheRefresh:Ve};ks.useEffectEvent=Ve;var Nm={readContext:ot,use:nl,useCallback:function(e,n){return gt().memoizedState=[e,n===void 0?null:n],e},useContext:ot,useEffect:dm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,al(4194308,4,gm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return al(4194308,4,e,n)},useInsertionEffect:function(e,n){al(4,2,e,n)},useMemo:function(e,n){var a=gt();n=n===void 0?null:n;var l=e();if(Ki){$n(!0);try{e()}finally{$n(!1)}}return a.memoizedState=[l,n],l},useReducer:function(e,n,a){var l=gt();if(a!==void 0){var u=a(n);if(Ki){$n(!0);try{a(n)}finally{$n(!1)}}}else u=n;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=BS.bind(null,me,e),[l.memoizedState,e]},useRef:function(e){var n=gt();return e={current:e},n.memoizedState=e},useState:function(e){e=Ku(e);var n=e.queue,a=zm.bind(null,me,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Fu,useDeferredValue:function(e,n){var a=gt();return Pu(a,e,n)},useTransition:function(){var e=Ku(!1);return e=xm.bind(null,me,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var l=me,u=gt();if(Ee){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),Ue===null)throw Error(r(349));(Se&127)!==0||Xh(l,n,a)}u.memoizedState=a;var f={value:a,getSnapshot:n};return u.queue=f,dm(Ih.bind(null,l,f,e),[e]),l.flags|=2048,Ra(9,{destroy:void 0},Jh.bind(null,l,f,a,n),null),a},useId:function(){var e=gt(),n=Ue.identifierPrefix;if(Ee){var a=cn,l=un;a=(l&~(1<<32-Mt(l)-1)).toString(32)+a,n="_"+n+"R_"+a,a=el++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=MS++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Ju,useFormState:lm,useActionState:lm,useOptimistic:function(e){var n=gt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Iu.bind(null,me,!0,a),a.dispatch=n,[e,n]},useMemoCache:$u,useCacheRefresh:function(){return gt().memoizedState=qS.bind(null,me)},useEffectEvent:function(e){var n=gt(),a={impl:e};return n.memoizedState=a,function(){if((Te&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Wu={readContext:ot,use:nl,useCallback:vm,useContext:ot,useEffect:Vu,useImperativeHandle:ym,useInsertionEffect:mm,useLayoutEffect:pm,useMemo:bm,useReducer:il,useRef:fm,useState:function(){return il(wn)},useDebugValue:Fu,useDeferredValue:function(e,n){var a=Xe();return Sm(a,Me.memoizedState,e,n)},useTransition:function(){var e=il(wn)[0],n=Xe().memoizedState;return[typeof e=="boolean"?e:Ms(e),n]},useSyncExternalStore:Ph,useId:Om,useHostTransitionStatus:Ju,useFormState:om,useActionState:om,useOptimistic:function(e,n){var a=Xe();return tm(a,Me,e,n)},useMemoCache:$u,useCacheRefresh:wm};Wu.useEffectEvent=hm;var Am={readContext:ot,use:nl,useCallback:vm,useContext:ot,useEffect:Vu,useImperativeHandle:ym,useInsertionEffect:mm,useLayoutEffect:pm,useMemo:bm,useReducer:Gu,useRef:fm,useState:function(){return Gu(wn)},useDebugValue:Fu,useDeferredValue:function(e,n){var a=Xe();return Me===null?Pu(a,e,n):Sm(a,Me.memoizedState,e,n)},useTransition:function(){var e=Gu(wn)[0],n=Xe().memoizedState;return[typeof e=="boolean"?e:Ms(e),n]},useSyncExternalStore:Ph,useId:Om,useHostTransitionStatus:Ju,useFormState:cm,useActionState:cm,useOptimistic:function(e,n){var a=Xe();return Me!==null?tm(a,Me,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:$u,useCacheRefresh:wm};Am.useEffectEvent=hm;function ec(e,n,a,l){n=e.memoizedState,a=a(l,n),a=a==null?n:g({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var tc={enqueueSetState:function(e,n,a){e=e._reactInternals;var l=Bt(),u=Xn(l);u.payload=n,a!=null&&(u.callback=a),n=Jn(e,u,l),n!==null&&(zt(n,e,l),Ns(n,e,l))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var l=Bt(),u=Xn(l);u.tag=1,u.payload=n,a!=null&&(u.callback=a),n=Jn(e,u,l),n!==null&&(zt(n,e,l),Ns(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=Bt(),l=Xn(a);l.tag=2,n!=null&&(l.callback=n),n=Jn(e,l,a),n!==null&&(zt(n,e,a),Ns(n,e,a))}};function Rm(e,n,a,l,u,f,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,y):n.prototype&&n.prototype.isPureReactComponent?!xs(a,l)||!xs(u,f):!0}function Cm(e,n,a,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,l),n.state!==e&&tc.enqueueReplaceState(n,n.state,null)}function Yi(e,n){var a=n;if("ref"in n){a={};for(var l in n)l!=="ref"&&(a[l]=n[l])}if(e=e.defaultProps){a===n&&(a=g({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function Mm(e){Zr(e)}function Dm(e){console.error(e)}function km(e){Zr(e)}function ll(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Um(e,n,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function nc(e,n,a){return a=Xn(a),a.tag=3,a.payload={element:null},a.callback=function(){ll(e,n)},a}function Lm(e){return e=Xn(e),e.tag=3,e}function Zm(e,n,a,l){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var f=l.value;e.payload=function(){return u(f)},e.callback=function(){Um(n,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Um(n,a,l),typeof u!="function"&&(ii===null?ii=new Set([this]):ii.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function HS(e,n,a,l,u){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=a.alternate,n!==null&&Ea(n,a,u,!0),a=Ut.current,a!==null){switch(a.tag){case 31:case 13:return Xt===null?bl():a.alternate===null&&Fe===0&&(Fe=3),a.flags&=-257,a.flags|=65536,a.lanes=u,l===Fr?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([l]):n.add(l),Tc(e,l,u)),!1;case 22:return a.flags|=65536,l===Fr?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([l]):a.add(l)),Tc(e,l,u)),!1}throw Error(r(435,a.tag))}return Tc(e,l,u),bl(),!1}if(Ee)return n=Ut.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==xu&&(e=Error(r(422),{cause:l}),Os(Yt(e,a)))):(l!==xu&&(n=Error(r(423),{cause:l}),Os(Yt(n,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Yt(l,a),u=nc(e.stateNode,l,u),Cu(e,u),Fe!==4&&(Fe=2)),!1;var f=Error(r(520),{cause:l});if(f=Yt(f,a),Qs===null?Qs=[f]:Qs.push(f),Fe!==4&&(Fe=2),n===null)return!0;l=Yt(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=nc(a.stateNode,l,e),Cu(a,e),!1;case 1:if(n=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(ii===null||!ii.has(f))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Lm(u),Zm(u,e,a,l),Cu(a,u),!1}a=a.return}while(a!==null);return!1}var ic=Error(r(461)),We=!1;function ut(e,n,a,l){n.child=e===null?$h(n,null,a,l):Gi(n,e.child,a,l)}function qm(e,n,a,l,u){a=a.render;var f=n.ref;if("ref"in l){var y={};for(var _ in l)_!=="ref"&&(y[_]=l[_])}else y=l;return Bi(n),l=Zu(e,n,a,y,f,u),_=qu(),e!==null&&!We?(Bu(e,n,u),zn(e,n,u)):(Ee&&_&&bu(n),n.flags|=1,ut(e,n,l,u),n.child)}function Bm(e,n,a,l,u){if(e===null){var f=a.type;return typeof f=="function"&&!gu(f)&&f.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=f,Hm(e,n,f,l,u)):(e=$r(a.type,null,l,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!fc(e,u)){var y=f.memoizedProps;if(a=a.compare,a=a!==null?a:xs,a(y,l)&&e.ref===n.ref)return zn(e,n,u)}return n.flags|=1,e=Sn(f,l),e.ref=n.ref,e.return=n,n.child=e}function Hm(e,n,a,l,u){if(e!==null){var f=e.memoizedProps;if(xs(f,l)&&e.ref===n.ref)if(We=!1,n.pendingProps=l=f,fc(e,u))(e.flags&131072)!==0&&(We=!0);else return n.lanes=e.lanes,zn(e,n,u)}return ac(e,n,a,l,u)}function $m(e,n,a,l){var u=l.children,f=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(l=n.child=e.child,u=0;l!==null;)u=u|l.lanes|l.childLanes,l=l.sibling;l=u&~f}else l=0,n.child=null;return Qm(e,n,f,a,l)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yr(n,f!==null?f.cachePool:null),f!==null?Kh(n,f):Du(),Yh(n);else return l=n.lanes=536870912,Qm(e,n,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(Yr(n,f.cachePool),Kh(n,f),Wn(),n.memoizedState=null):(e!==null&&Yr(n,null),Du(),Wn());return ut(e,n,u,a),n.child}function Us(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Qm(e,n,a,l,u){var f=ju();return f=f===null?null:{parent:Je._currentValue,pool:f},n.memoizedState={baseLanes:a,cachePool:f},e!==null&&Yr(n,null),Du(),Yh(n),e!==null&&Ea(e,n,l,!0),n.childLanes=u,null}function ol(e,n){return n=cl({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Gm(e,n,a){return Gi(n,e.child,null,a),e=ol(n,n.pendingProps),e.flags|=2,Lt(n),n.memoizedState=null,e}function $S(e,n,a){var l=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ee){if(l.mode==="hidden")return e=ol(n,l),n.lanes=536870912,Us(null,e);if(Uu(n),(e=Ze)?(e=ng(e,Pt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Kn!==null?{id:un,overflow:cn}:null,retryLane:536870912,hydrationErrors:null},a=Th(e),a.return=n,n.child=a,lt=n,Ze=null)):e=null,e===null)throw Vn(n);return n.lanes=536870912,null}return ol(n,l)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(Uu(n),u)if(n.flags&256)n.flags&=-257,n=Gm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(We||Ea(e,n,a,!1),u=(a&e.childLanes)!==0,We||u){if(l=Ue,l!==null&&(y=Dd(l,a),y!==0&&y!==f.retryLane))throw f.retryLane=y,Ui(e,y),zt(l,e,y),ic;bl(),n=Gm(e,n,a)}else e=f.treeContext,Ze=Jt(y.nextSibling),lt=n,Ee=!0,Yn=null,Pt=!1,e!==null&&Ah(n,e),n=ol(n,l),n.flags|=4096;return n}return e=Sn(e.child,{mode:l.mode,children:l.children}),e.ref=n.ref,n.child=e,e.return=n,e}function ul(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function ac(e,n,a,l,u){return Bi(n),a=Zu(e,n,a,l,void 0,u),l=qu(),e!==null&&!We?(Bu(e,n,u),zn(e,n,u)):(Ee&&l&&bu(n),n.flags|=1,ut(e,n,a,u),n.child)}function Km(e,n,a,l,u,f){return Bi(n),n.updateQueue=null,a=Fh(n,l,a,u),Vh(e),l=qu(),e!==null&&!We?(Bu(e,n,f),zn(e,n,f)):(Ee&&l&&bu(n),n.flags|=1,ut(e,n,a,f),n.child)}function Ym(e,n,a,l,u){if(Bi(n),n.stateNode===null){var f=ba,y=a.contextType;typeof y=="object"&&y!==null&&(f=ot(y)),f=new a(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=tc,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},Au(n),y=a.contextType,f.context=typeof y=="object"&&y!==null?ot(y):ba,f.state=n.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(ec(n,a,y,l),f.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(y=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),y!==f.state&&tc.enqueueReplaceState(f,f.state,null),Rs(n,l,f,u),As(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){f=n.stateNode;var _=n.memoizedProps,w=Yi(a,_);f.props=w;var D=f.context,B=a.contextType;y=ba,typeof B=="object"&&B!==null&&(y=ot(B));var Q=a.getDerivedStateFromProps;B=typeof Q=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,B||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||D!==y)&&Cm(n,f,l,y),Pn=!1;var k=n.memoizedState;f.state=k,Rs(n,l,f,u),As(),D=n.memoizedState,_||k!==D||Pn?(typeof Q=="function"&&(ec(n,a,Q,l),D=n.memoizedState),(w=Pn||Rm(n,a,w,l,k,D,y))?(B||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=D),f.props=l,f.state=D,f.context=y,l=w):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{f=n.stateNode,Ru(e,n),y=n.memoizedProps,B=Yi(a,y),f.props=B,Q=n.pendingProps,k=f.context,D=a.contextType,w=ba,typeof D=="object"&&D!==null&&(w=ot(D)),_=a.getDerivedStateFromProps,(D=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==Q||k!==w)&&Cm(n,f,l,w),Pn=!1,k=n.memoizedState,f.state=k,Rs(n,l,f,u),As();var L=n.memoizedState;y!==Q||k!==L||Pn||e!==null&&e.dependencies!==null&&Gr(e.dependencies)?(typeof _=="function"&&(ec(n,a,_,l),L=n.memoizedState),(B=Pn||Rm(n,a,B,l,k,L,w)||e!==null&&e.dependencies!==null&&Gr(e.dependencies))?(D||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,L,w),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,L,w)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=L),f.props=l,f.state=L,f.context=w,l=B):(typeof f.componentDidUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&k===e.memoizedState||(n.flags|=1024),l=!1)}return f=l,ul(e,n),l=(n.flags&128)!==0,f||l?(f=n.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,e!==null&&l?(n.child=Gi(n,e.child,null,u),n.child=Gi(n,null,a,u)):ut(e,n,a,u),n.memoizedState=f.state,e=n.child):e=zn(e,n,u),e}function Vm(e,n,a,l){return Zi(),n.flags|=256,ut(e,n,a,l),n.child}var sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rc(e){return{baseLanes:e,cachePool:Uh()}}function lc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=qt),e}function Fm(e,n,a){var l=n.pendingProps,u=!1,f=(n.flags&128)!==0,y;if((y=f)||(y=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),y&&(u=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ee){if(u?In(n):Wn(),(e=Ze)?(e=ng(e,Pt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Kn!==null?{id:un,overflow:cn}:null,retryLane:536870912,hydrationErrors:null},a=Th(e),a.return=n,n.child=a,lt=n,Ze=null)):e=null,e===null)throw Vn(n);return Qc(e)?n.lanes=32:n.lanes=536870912,null}var _=l.children;return l=l.fallback,u?(Wn(),u=n.mode,_=cl({mode:"hidden",children:_},u),l=Li(l,u,a,null),_.return=n,l.return=n,_.sibling=l,n.child=_,l=n.child,l.memoizedState=rc(a),l.childLanes=lc(e,y,a),n.memoizedState=sc,Us(null,l)):(In(n),oc(n,_))}var w=e.memoizedState;if(w!==null&&(_=w.dehydrated,_!==null)){if(f)n.flags&256?(In(n),n.flags&=-257,n=uc(e,n,a)):n.memoizedState!==null?(Wn(),n.child=e.child,n.flags|=128,n=null):(Wn(),_=l.fallback,u=n.mode,l=cl({mode:"visible",children:l.children},u),_=Li(_,u,a,null),_.flags|=2,l.return=n,_.return=n,l.sibling=_,n.child=l,Gi(n,e.child,null,a),l=n.child,l.memoizedState=rc(a),l.childLanes=lc(e,y,a),n.memoizedState=sc,n=Us(null,l));else if(In(n),Qc(_)){if(y=_.nextSibling&&_.nextSibling.dataset,y)var D=y.dgst;y=D,l=Error(r(419)),l.stack="",l.digest=y,Os({value:l,source:null,stack:null}),n=uc(e,n,a)}else if(We||Ea(e,n,a,!1),y=(a&e.childLanes)!==0,We||y){if(y=Ue,y!==null&&(l=Dd(y,a),l!==0&&l!==w.retryLane))throw w.retryLane=l,Ui(e,l),zt(y,e,l),ic;$c(_)||bl(),n=uc(e,n,a)}else $c(_)?(n.flags|=192,n.child=e.child,n=null):(e=w.treeContext,Ze=Jt(_.nextSibling),lt=n,Ee=!0,Yn=null,Pt=!1,e!==null&&Ah(n,e),n=oc(n,l.children),n.flags|=4096);return n}return u?(Wn(),_=l.fallback,u=n.mode,w=e.child,D=w.sibling,l=Sn(w,{mode:"hidden",children:l.children}),l.subtreeFlags=w.subtreeFlags&65011712,D!==null?_=Sn(D,_):(_=Li(_,u,a,null),_.flags|=2),_.return=n,l.return=n,l.sibling=_,n.child=l,Us(null,l),l=n.child,_=e.child.memoizedState,_===null?_=rc(a):(u=_.cachePool,u!==null?(w=Je._currentValue,u=u.parent!==w?{parent:w,pool:w}:u):u=Uh(),_={baseLanes:_.baseLanes|a,cachePool:u}),l.memoizedState=_,l.childLanes=lc(e,y,a),n.memoizedState=sc,Us(e.child,l)):(In(n),a=e.child,e=a.sibling,a=Sn(a,{mode:"visible",children:l.children}),a.return=n,a.sibling=null,e!==null&&(y=n.deletions,y===null?(n.deletions=[e],n.flags|=16):y.push(e)),n.child=a,n.memoizedState=null,a)}function oc(e,n){return n=cl({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function cl(e,n){return e=kt(22,e,null,n),e.lanes=0,e}function uc(e,n,a){return Gi(n,e.child,null,a),e=oc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Pm(e,n,a){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),Ou(e.return,n,a)}function cc(e,n,a,l,u,f){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:u,treeForkCount:f}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=l,y.tail=a,y.tailMode=u,y.treeForkCount=f)}function Xm(e,n,a){var l=n.pendingProps,u=l.revealOrder,f=l.tail;l=l.children;var y=Pe.current,_=(y&2)!==0;if(_?(y=y&1|2,n.flags|=128):y&=1,F(Pe,y),ut(e,n,l,a),l=Ee?Es:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pm(e,a,n);else if(e.tag===19)Pm(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(a=n.child,u=null;a!==null;)e=a.alternate,e!==null&&Ir(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=n.child,n.child=null):(u=a.sibling,a.sibling=null),cc(n,!1,u,a,f,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&Ir(e)===null){n.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}cc(n,!0,a,null,f,l);break;case"together":cc(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function zn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),ni|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ea(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=Sn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=Sn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function fc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Gr(e)))}function QS(e,n,a){switch(n.tag){case 3:Le(n,n.stateNode.containerInfo),Fn(n,Je,e.memoizedState.cache),Zi();break;case 27:case 5:on(n);break;case 4:Le(n,n.stateNode.containerInfo);break;case 10:Fn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Uu(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(In(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Fm(e,n,a):(In(n),e=zn(e,n,a),e!==null?e.sibling:null);In(n);break;case 19:var u=(e.flags&128)!==0;if(l=(a&n.childLanes)!==0,l||(Ea(e,n,a,!1),l=(a&n.childLanes)!==0),u){if(l)return Xm(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),F(Pe,Pe.current),l)break;return null;case 22:return n.lanes=0,$m(e,n,a,n.pendingProps);case 24:Fn(n,Je,e.memoizedState.cache)}return zn(e,n,a)}function Jm(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)We=!0;else{if(!fc(e,a)&&(n.flags&128)===0)return We=!1,QS(e,n,a);We=(e.flags&131072)!==0}else We=!1,Ee&&(n.flags&1048576)!==0&&Nh(n,Es,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(e=$i(n.elementType),n.type=e,typeof e=="function")gu(e)?(l=Yi(e,l),n.tag=1,n=Ym(null,n,e,l,a)):(n.tag=0,n=ac(null,n,e,l,a));else{if(e!=null){var u=e.$$typeof;if(u===K){n.tag=11,n=qm(null,n,e,l,a);break e}else if(u===N){n.tag=14,n=Bm(null,n,e,l,a);break e}}throw n=ye(e)||e,Error(r(306,n,""))}}return n;case 0:return ac(e,n,n.type,n.pendingProps,a);case 1:return l=n.type,u=Yi(l,n.pendingProps),Ym(e,n,l,u,a);case 3:e:{if(Le(n,n.stateNode.containerInfo),e===null)throw Error(r(387));l=n.pendingProps;var f=n.memoizedState;u=f.element,Ru(e,n),Rs(n,l,null,a);var y=n.memoizedState;if(l=y.cache,Fn(n,Je,l),l!==f.cache&&wu(n,[Je],a,!0),As(),l=y.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=Vm(e,n,l,a);break e}else if(l!==u){u=Yt(Error(r(424)),n),Os(u),n=Vm(e,n,l,a);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ze=Jt(e.firstChild),lt=n,Ee=!0,Yn=null,Pt=!0,a=$h(n,null,l,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Zi(),l===u){n=zn(e,n,a);break e}ut(e,n,l,a)}n=n.child}return n;case 26:return ul(e,n),e===null?(a=og(n.type,null,n.pendingProps,null))?n.memoizedState=a:Ee||(a=n.type,e=n.pendingProps,l=zl(ge.current).createElement(a),l[rt]=n,l[St]=e,ct(l,a,e),at(l),n.stateNode=l):n.memoizedState=og(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return on(n),e===null&&Ee&&(l=n.stateNode=sg(n.type,n.pendingProps,ge.current),lt=n,Pt=!0,u=Ze,li(n.type)?(Gc=u,Ze=Jt(l.firstChild)):Ze=u),ut(e,n,n.pendingProps.children,a),ul(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ee&&((u=l=Ze)&&(l=bx(l,n.type,n.pendingProps,Pt),l!==null?(n.stateNode=l,lt=n,Ze=Jt(l.firstChild),Pt=!1,u=!0):u=!1),u||Vn(n)),on(n),u=n.type,f=n.pendingProps,y=e!==null?e.memoizedProps:null,l=f.children,qc(u,f)?l=null:y!==null&&qc(u,y)&&(n.flags|=32),n.memoizedState!==null&&(u=Zu(e,n,DS,null,null,a),Js._currentValue=u),ul(e,n),ut(e,n,l,a),n.child;case 6:return e===null&&Ee&&((e=a=Ze)&&(a=Sx(a,n.pendingProps,Pt),a!==null?(n.stateNode=a,lt=n,Ze=null,e=!0):e=!1),e||Vn(n)),null;case 13:return Fm(e,n,a);case 4:return Le(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Gi(n,null,l,a):ut(e,n,l,a),n.child;case 11:return qm(e,n,n.type,n.pendingProps,a);case 7:return ut(e,n,n.pendingProps,a),n.child;case 8:return ut(e,n,n.pendingProps.children,a),n.child;case 12:return ut(e,n,n.pendingProps.children,a),n.child;case 10:return l=n.pendingProps,Fn(n,n.type,l.value),ut(e,n,l.children,a),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,Bi(n),u=ot(u),l=l(u),n.flags|=1,ut(e,n,l,a),n.child;case 14:return Bm(e,n,n.type,n.pendingProps,a);case 15:return Hm(e,n,n.type,n.pendingProps,a);case 19:return Xm(e,n,a);case 31:return $S(e,n,a);case 22:return $m(e,n,a,n.pendingProps);case 24:return Bi(n),l=ot(Je),e===null?(u=ju(),u===null&&(u=Ue,f=zu(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=a),u=f),n.memoizedState={parent:l,cache:u},Au(n),Fn(n,Je,u)):((e.lanes&a)!==0&&(Ru(e,n),Rs(n,null,null,a),As()),u=e.memoizedState,f=n.memoizedState,u.parent!==l?(u={parent:l,cache:l},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),Fn(n,Je,l)):(l=f.cache,Fn(n,Je,l),l!==u.cache&&wu(n,[Je],a,!0))),ut(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function Tn(e){e.flags|=4}function dc(e,n,a,l,u){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(Op())e.flags|=8192;else throw Qi=Fr,Nu}else e.flags&=-16777217}function Im(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hg(n))if(Op())e.flags|=8192;else throw Qi=Fr,Nu}function fl(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Rd():536870912,e.lanes|=n,ka|=n)}function Ls(e,n){if(!Ee)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function qe(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(n)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=a,n}function GS(e,n,a){var l=n.pendingProps;switch(Su(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(n),null;case 1:return qe(n),null;case 3:return a=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),En(Je),Be(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(_a(n)?Tn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,_u())),qe(n),null;case 26:var u=n.type,f=n.memoizedState;return e===null?(Tn(n),f!==null?(qe(n),Im(n,f)):(qe(n),dc(n,u,null,l,a))):f?f!==e.memoizedState?(Tn(n),qe(n),Im(n,f)):(qe(n),n.flags&=-16777217):(e=e.memoizedProps,e!==l&&Tn(n),qe(n),dc(n,u,e,l,a)),null;case 27:if(Ni(n),a=ge.current,u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&Tn(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return qe(n),null}e=I.current,_a(n)?Rh(n):(e=sg(u,l,a),n.stateNode=e,Tn(n))}return qe(n),null;case 5:if(Ni(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&Tn(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return qe(n),null}if(f=I.current,_a(n))Rh(n);else{var y=zl(ge.current);switch(f){case 1:f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=y.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=y.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=y.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?y.createElement("select",{is:l.is}):y.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?y.createElement(u,{is:l.is}):y.createElement(u)}}f[rt]=n,f[St]=l;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)f.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=f;e:switch(ct(f,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Tn(n)}}return qe(n),dc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&Tn(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(r(166));if(e=ge.current,_a(n)){if(e=n.stateNode,a=n.memoizedProps,l=null,u=lt,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[rt]=n,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Fp(e.nodeValue,a)),e||Vn(n,!0)}else e=zl(e).createTextNode(l),e[rt]=n,n.stateNode=e}return qe(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(l=_a(n),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[rt]=n}else Zi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;qe(n),e=!1}else a=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(Lt(n),n):(Lt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return qe(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=_a(n),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[rt]=n}else Zi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;qe(n),u=!1}else u=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(Lt(n),n):(Lt(n),null)}return Lt(n),(n.flags&128)!==0?(n.lanes=a,n):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=n.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==u&&(l.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),fl(n,n.updateQueue),qe(n),null);case 4:return Be(),e===null&&Dc(n.stateNode.containerInfo),qe(n),null;case 10:return En(n.type),qe(n),null;case 19:if(Z(Pe),l=n.memoizedState,l===null)return qe(n),null;if(u=(n.flags&128)!==0,f=l.rendering,f===null)if(u)Ls(l,!1);else{if(Fe!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Ir(e),f!==null){for(n.flags|=128,Ls(l,!1),e=f.updateQueue,n.updateQueue=e,fl(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)zh(a,e),a=a.sibling;return F(Pe,Pe.current&1|2),Ee&&xn(n,l.treeForkCount),n.child}e=e.sibling}l.tail!==null&&Rt()>gl&&(n.flags|=128,u=!0,Ls(l,!1),n.lanes=4194304)}else{if(!u)if(e=Ir(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,fl(n,e),Ls(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Ee)return qe(n),null}else 2*Rt()-l.renderingStartTime>gl&&a!==536870912&&(n.flags|=128,u=!0,Ls(l,!1),n.lanes=4194304);l.isBackwards?(f.sibling=n.child,n.child=f):(e=l.last,e!==null?e.sibling=f:n.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Rt(),e.sibling=null,a=Pe.current,F(Pe,u?a&1|2:a&1),Ee&&xn(n,l.treeForkCount),e):(qe(n),null);case 22:case 23:return Lt(n),ku(),l=n.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(a&536870912)!==0&&(n.flags&128)===0&&(qe(n),n.subtreeFlags&6&&(n.flags|=8192)):qe(n),a=n.updateQueue,a!==null&&fl(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==a&&(n.flags|=2048),e!==null&&Z(Hi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),En(Je),qe(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function KS(e,n){switch(Su(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return En(Je),Be(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ni(n),null;case 31:if(n.memoizedState!==null){if(Lt(n),n.alternate===null)throw Error(r(340));Zi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Lt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Zi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Z(Pe),null;case 4:return Be(),null;case 10:return En(n.type),null;case 22:case 23:return Lt(n),ku(),e!==null&&Z(Hi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return En(Je),null;case 25:return null;default:return null}}function Wm(e,n){switch(Su(n),n.tag){case 3:En(Je),Be();break;case 26:case 27:case 5:Ni(n);break;case 4:Be();break;case 31:n.memoizedState!==null&&Lt(n);break;case 13:Lt(n);break;case 19:Z(Pe);break;case 10:En(n.type);break;case 22:case 23:Lt(n),ku(),e!==null&&Z(Hi);break;case 24:En(Je)}}function Zs(e,n){try{var a=n.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var u=l.next;a=u;do{if((a.tag&e)===e){l=void 0;var f=a.create,y=a.inst;l=f(),y.destroy=l}a=a.next}while(a!==u)}}catch(_){Ce(n,n.return,_)}}function ei(e,n,a){try{var l=n.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var f=u.next;l=f;do{if((l.tag&e)===e){var y=l.inst,_=y.destroy;if(_!==void 0){y.destroy=void 0,u=n;var w=a,D=_;try{D()}catch(B){Ce(u,w,B)}}}l=l.next}while(l!==f)}}catch(B){Ce(n,n.return,B)}}function ep(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Gh(n,a)}catch(l){Ce(e,e.return,l)}}}function tp(e,n,a){a.props=Yi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ce(e,n,l)}}function qs(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(u){Ce(e,n,u)}}function fn(e,n){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(u){Ce(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Ce(e,n,u)}else a.current=null}function np(e){var n=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(u){Ce(e,e.return,u)}}function hc(e,n,a){try{var l=e.stateNode;hx(l,e.type,a,n),l[St]=n}catch(u){Ce(e,e.return,u)}}function ip(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&li(e.type)||e.tag===4}function mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ip(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&li(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pc(e,n,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=vn));else if(l!==4&&(l===27&&li(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(pc(e,n,a),e=e.sibling;e!==null;)pc(e,n,a),e=e.sibling}function dl(e,n,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(l!==4&&(l===27&&li(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(dl(e,n,a),e=e.sibling;e!==null;)dl(e,n,a),e=e.sibling}function ap(e){var n=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);ct(n,l,a),n[rt]=e,n[St]=a}catch(f){Ce(e,e.return,f)}}var jn=!1,et=!1,gc=!1,sp=typeof WeakSet=="function"?WeakSet:Set,st=null;function YS(e,n){if(e=e.containerInfo,Lc=Ml,e=yh(e),uu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var u=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var y=0,_=-1,w=-1,D=0,B=0,Q=e,k=null;t:for(;;){for(var L;Q!==a||u!==0&&Q.nodeType!==3||(_=y+u),Q!==f||l!==0&&Q.nodeType!==3||(w=y+l),Q.nodeType===3&&(y+=Q.nodeValue.length),(L=Q.firstChild)!==null;)k=Q,Q=L;for(;;){if(Q===e)break t;if(k===a&&++D===u&&(_=y),k===f&&++B===l&&(w=y),(L=Q.nextSibling)!==null)break;Q=k,k=Q.parentNode}Q=L}a=_===-1||w===-1?null:{start:_,end:w}}else a=null}a=a||{start:0,end:0}}else a=null;for(Zc={focusedElem:e,selectionRange:a},Ml=!1,st=n;st!==null;)if(n=st,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,st=e;else for(;st!==null;){switch(n=st,f=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=n,u=f.memoizedProps,f=f.memoizedState,l=a.stateNode;try{var W=Yi(a.type,u);e=l.getSnapshotBeforeUpdate(W,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(oe){Ce(a,a.return,oe)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Hc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,st=e;break}st=n.return}}function rp(e,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:An(e,a),l&4&&Zs(5,a);break;case 1:if(An(e,a),l&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(y){Ce(a,a.return,y)}else{var u=Yi(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Ce(a,a.return,y)}}l&64&&ep(a),l&512&&qs(a,a.return);break;case 3:if(An(e,a),l&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Gh(e,n)}catch(y){Ce(a,a.return,y)}}break;case 27:n===null&&l&4&&ap(a);case 26:case 5:An(e,a),n===null&&l&4&&np(a),l&512&&qs(a,a.return);break;case 12:An(e,a);break;case 31:An(e,a),l&4&&up(e,a);break;case 13:An(e,a),l&4&&cp(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=tx.bind(null,a),xx(e,a))));break;case 22:if(l=a.memoizedState!==null||jn,!l){n=n!==null&&n.memoizedState!==null||et,u=jn;var f=et;jn=l,(et=n)&&!f?Rn(e,a,(a.subtreeFlags&8772)!==0):An(e,a),jn=u,et=f}break;case 30:break;default:An(e,a)}}function lp(e){var n=e.alternate;n!==null&&(e.alternate=null,lp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Yo(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var He=null,_t=!1;function Nn(e,n,a){for(a=a.child;a!==null;)op(e,n,a),a=a.sibling}function op(e,n,a){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(us,a)}catch{}switch(a.tag){case 26:et||fn(a,n),Nn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:et||fn(a,n);var l=He,u=_t;li(a.type)&&(He=a.stateNode,_t=!1),Nn(e,n,a),Fs(a.stateNode),He=l,_t=u;break;case 5:et||fn(a,n);case 6:if(l=He,u=_t,He=null,Nn(e,n,a),He=l,_t=u,He!==null)if(_t)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(f){Ce(a,n,f)}else try{He.removeChild(a.stateNode)}catch(f){Ce(a,n,f)}break;case 18:He!==null&&(_t?(e=He,eg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Qa(e)):eg(He,a.stateNode));break;case 4:l=He,u=_t,He=a.stateNode.containerInfo,_t=!0,Nn(e,n,a),He=l,_t=u;break;case 0:case 11:case 14:case 15:ei(2,a,n),et||ei(4,a,n),Nn(e,n,a);break;case 1:et||(fn(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&tp(a,n,l)),Nn(e,n,a);break;case 21:Nn(e,n,a);break;case 22:et=(l=et)||a.memoizedState!==null,Nn(e,n,a),et=l;break;default:Nn(e,n,a)}}function up(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qa(e)}catch(a){Ce(n,n.return,a)}}}function cp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qa(e)}catch(a){Ce(n,n.return,a)}}function VS(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new sp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new sp),n;default:throw Error(r(435,e.tag))}}function hl(e,n){var a=VS(e);n.forEach(function(l){if(!a.has(l)){a.add(l);var u=nx.bind(null,e,l);l.then(u,u)}})}function Et(e,n){var a=n.deletions;if(a!==null)for(var l=0;l<a.length;l++){var u=a[l],f=e,y=n,_=y;e:for(;_!==null;){switch(_.tag){case 27:if(li(_.type)){He=_.stateNode,_t=!1;break e}break;case 5:He=_.stateNode,_t=!1;break e;case 3:case 4:He=_.stateNode.containerInfo,_t=!0;break e}_=_.return}if(He===null)throw Error(r(160));op(f,y,u),He=null,_t=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)fp(n,e),n=n.sibling}var nn=null;function fp(e,n){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(n,e),Ot(e),l&4&&(ei(3,e,e.return),Zs(3,e),ei(5,e,e.return));break;case 1:Et(n,e),Ot(e),l&512&&(et||a===null||fn(a,a.return)),l&64&&jn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var u=nn;if(Et(n,e),Ot(e),l&512&&(et||a===null||fn(a,a.return)),l&4){var f=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":f=u.getElementsByTagName("title")[0],(!f||f[ds]||f[rt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(l),u.head.insertBefore(f,u.querySelector("head > title"))),ct(f,l,a),f[rt]=e,at(f),l=f;break e;case"link":var y=fg("link","href",u).get(l+(a.href||""));if(y){for(var _=0;_<y.length;_++)if(f=y[_],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){y.splice(_,1);break t}}f=u.createElement(l),ct(f,l,a),u.head.appendChild(f);break;case"meta":if(y=fg("meta","content",u).get(l+(a.content||""))){for(_=0;_<y.length;_++)if(f=y[_],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){y.splice(_,1);break t}}f=u.createElement(l),ct(f,l,a),u.head.appendChild(f);break;default:throw Error(r(468,l))}f[rt]=e,at(f),l=f}e.stateNode=l}else dg(u,e.type,e.stateNode);else e.stateNode=cg(u,l,e.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?dg(u,e.type,e.stateNode):cg(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&hc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Et(n,e),Ot(e),l&512&&(et||a===null||fn(a,a.return)),a!==null&&l&4&&hc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Et(n,e),Ot(e),l&512&&(et||a===null||fn(a,a.return)),e.flags&32){u=e.stateNode;try{da(u,"")}catch(W){Ce(e,e.return,W)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,hc(e,u,a!==null?a.memoizedProps:u)),l&1024&&(gc=!0);break;case 6:if(Et(n,e),Ot(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(W){Ce(e,e.return,W)}}break;case 3:if(Nl=null,u=nn,nn=Tl(n.containerInfo),Et(n,e),nn=u,Ot(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Qa(n.containerInfo)}catch(W){Ce(e,e.return,W)}gc&&(gc=!1,dp(e));break;case 4:l=nn,nn=Tl(e.stateNode.containerInfo),Et(n,e),Ot(e),nn=l;break;case 12:Et(n,e),Ot(e);break;case 31:Et(n,e),Ot(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,hl(e,l)));break;case 13:Et(n,e),Ot(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(pl=Rt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,hl(e,l)));break;case 22:u=e.memoizedState!==null;var w=a!==null&&a.memoizedState!==null,D=jn,B=et;if(jn=D||u,et=B||w,Et(n,e),et=B,jn=D,Ot(e),l&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(a===null||w||jn||et||Vi(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){w=a=n;try{if(f=w.stateNode,u)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{_=w.stateNode;var Q=w.memoizedProps.style,k=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;_.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(W){Ce(w,w.return,W)}}}else if(n.tag===6){if(a===null){w=n;try{w.stateNode.nodeValue=u?"":w.memoizedProps}catch(W){Ce(w,w.return,W)}}}else if(n.tag===18){if(a===null){w=n;try{var L=w.stateNode;u?tg(L,!0):tg(w.stateNode,!1)}catch(W){Ce(w,w.return,W)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,hl(e,a))));break;case 19:Et(n,e),Ot(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,hl(e,l)));break;case 30:break;case 21:break;default:Et(n,e),Ot(e)}}function Ot(e){var n=e.flags;if(n&2){try{for(var a,l=e.return;l!==null;){if(ip(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,f=mc(e);dl(e,f,u);break;case 5:var y=a.stateNode;a.flags&32&&(da(y,""),a.flags&=-33);var _=mc(e);dl(e,_,y);break;case 3:case 4:var w=a.stateNode.containerInfo,D=mc(e);pc(e,D,w);break;default:throw Error(r(161))}}catch(B){Ce(e,e.return,B)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function dp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;dp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function An(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)rp(e,n.alternate,n),n=n.sibling}function Vi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ei(4,n,n.return),Vi(n);break;case 1:fn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&tp(n,n.return,a),Vi(n);break;case 27:Fs(n.stateNode);case 26:case 5:fn(n,n.return),Vi(n);break;case 22:n.memoizedState===null&&Vi(n);break;case 30:Vi(n);break;default:Vi(n)}e=e.sibling}}function Rn(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,u=e,f=n,y=f.flags;switch(f.tag){case 0:case 11:case 15:Rn(u,f,a),Zs(4,f);break;case 1:if(Rn(u,f,a),l=f,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(D){Ce(l,l.return,D)}if(l=f,u=l.updateQueue,u!==null){var _=l.stateNode;try{var w=u.shared.hiddenCallbacks;if(w!==null)for(u.shared.hiddenCallbacks=null,u=0;u<w.length;u++)Qh(w[u],_)}catch(D){Ce(l,l.return,D)}}a&&y&64&&ep(f),qs(f,f.return);break;case 27:ap(f);case 26:case 5:Rn(u,f,a),a&&l===null&&y&4&&np(f),qs(f,f.return);break;case 12:Rn(u,f,a);break;case 31:Rn(u,f,a),a&&y&4&&up(u,f);break;case 13:Rn(u,f,a),a&&y&4&&cp(u,f);break;case 22:f.memoizedState===null&&Rn(u,f,a),qs(f,f.return);break;case 30:break;default:Rn(u,f,a)}n=n.sibling}}function yc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&ws(a))}function vc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ws(e))}function an(e,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)hp(e,n,a,l),n=n.sibling}function hp(e,n,a,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:an(e,n,a,l),u&2048&&Zs(9,n);break;case 1:an(e,n,a,l);break;case 3:an(e,n,a,l),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&ws(e)));break;case 12:if(u&2048){an(e,n,a,l),e=n.stateNode;try{var f=n.memoizedProps,y=f.id,_=f.onPostCommit;typeof _=="function"&&_(y,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(w){Ce(n,n.return,w)}}else an(e,n,a,l);break;case 31:an(e,n,a,l);break;case 13:an(e,n,a,l);break;case 23:break;case 22:f=n.stateNode,y=n.alternate,n.memoizedState!==null?f._visibility&2?an(e,n,a,l):Bs(e,n):f._visibility&2?an(e,n,a,l):(f._visibility|=2,Ca(e,n,a,l,(n.subtreeFlags&10256)!==0||!1)),u&2048&&yc(y,n);break;case 24:an(e,n,a,l),u&2048&&vc(n.alternate,n);break;default:an(e,n,a,l)}}function Ca(e,n,a,l,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=e,y=n,_=a,w=l,D=y.flags;switch(y.tag){case 0:case 11:case 15:Ca(f,y,_,w,u),Zs(8,y);break;case 23:break;case 22:var B=y.stateNode;y.memoizedState!==null?B._visibility&2?Ca(f,y,_,w,u):Bs(f,y):(B._visibility|=2,Ca(f,y,_,w,u)),u&&D&2048&&yc(y.alternate,y);break;case 24:Ca(f,y,_,w,u),u&&D&2048&&vc(y.alternate,y);break;default:Ca(f,y,_,w,u)}n=n.sibling}}function Bs(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,l=n,u=l.flags;switch(l.tag){case 22:Bs(a,l),u&2048&&yc(l.alternate,l);break;case 24:Bs(a,l),u&2048&&vc(l.alternate,l);break;default:Bs(a,l)}n=n.sibling}}var Hs=8192;function Ma(e,n,a){if(e.subtreeFlags&Hs)for(e=e.child;e!==null;)mp(e,n,a),e=e.sibling}function mp(e,n,a){switch(e.tag){case 26:Ma(e,n,a),e.flags&Hs&&e.memoizedState!==null&&Mx(a,nn,e.memoizedState,e.memoizedProps);break;case 5:Ma(e,n,a);break;case 3:case 4:var l=nn;nn=Tl(e.stateNode.containerInfo),Ma(e,n,a),nn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Hs,Hs=16777216,Ma(e,n,a),Hs=l):Ma(e,n,a));break;default:Ma(e,n,a)}}function pp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function $s(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];st=l,yp(l,e)}pp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gp(e),e=e.sibling}function gp(e){switch(e.tag){case 0:case 11:case 15:$s(e),e.flags&2048&&ei(9,e,e.return);break;case 3:$s(e);break;case 12:$s(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,ml(e)):$s(e);break;default:$s(e)}}function ml(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];st=l,yp(l,e)}pp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ei(8,n,n.return),ml(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,ml(n));break;default:ml(n)}e=e.sibling}}function yp(e,n){for(;st!==null;){var a=st;switch(a.tag){case 0:case 11:case 15:ei(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ws(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,st=l;else e:for(a=e;st!==null;){l=st;var u=l.sibling,f=l.return;if(lp(l),l===a){st=null;break e}if(u!==null){u.return=f,st=u;break e}st=f}}}var FS={getCacheForType:function(e){var n=ot(Je),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return ot(Je).controller.signal}},PS=typeof WeakMap=="function"?WeakMap:Map,Te=0,Ue=null,ve=null,Se=0,Re=0,Zt=null,ti=!1,Da=!1,bc=!1,Cn=0,Fe=0,ni=0,Fi=0,Sc=0,qt=0,ka=0,Qs=null,wt=null,xc=!1,pl=0,vp=0,gl=1/0,yl=null,ii=null,nt=0,ai=null,Ua=null,Mn=0,_c=0,Ec=null,bp=null,Gs=0,Oc=null;function Bt(){return(Te&2)!==0&&Se!==0?Se&-Se:U.T!==null?Ac():kd()}function Sp(){if(qt===0)if((Se&536870912)===0||Ee){var e=wr;wr<<=1,(wr&3932160)===0&&(wr=262144),qt=e}else qt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),qt}function zt(e,n,a){(e===Ue&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(La(e,0),si(e,Se,qt,!1)),fs(e,a),((Te&2)===0||e!==Ue)&&(e===Ue&&((Te&2)===0&&(Fi|=a),Fe===4&&si(e,Se,qt,!1)),dn(e))}function xp(e,n,a){if((Te&6)!==0)throw Error(r(327));var l=!a&&(n&127)===0&&(n&e.expiredLanes)===0||cs(e,n),u=l?IS(e,n):zc(e,n,!0),f=l;do{if(u===0){Da&&!l&&si(e,n,0,!1);break}else{if(a=e.current.alternate,f&&!XS(a)){u=zc(e,n,!1),f=!1;continue}if(u===2){if(f=n,e.errorRecoveryDisabledLanes&f)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;e:{var _=e;u=Qs;var w=_.current.memoizedState.isDehydrated;if(w&&(La(_,y).flags|=256),y=zc(_,y,!1),y!==2){if(bc&&!w){_.errorRecoveryDisabledLanes|=f,Fi|=f,u=4;break e}f=wt,wt=u,f!==null&&(wt===null?wt=f:wt.push.apply(wt,f))}u=y}if(f=!1,u!==2)continue}}if(u===1){La(e,0),si(e,n,0,!0);break}e:{switch(l=e,f=u,f){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:si(l,n,qt,!ti);break e;case 2:wt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(u=pl+300-Rt(),10<u)){if(si(l,n,qt,!ti),Tr(l,0,!0)!==0)break e;Mn=n,l.timeoutHandle=Ip(_p.bind(null,l,a,wt,yl,xc,n,qt,Fi,ka,ti,f,"Throttled",-0,0),u);break e}_p(l,a,wt,yl,xc,n,qt,Fi,ka,ti,f,null,-0,0)}}break}while(!0);dn(e)}function _p(e,n,a,l,u,f,y,_,w,D,B,Q,k,L){if(e.timeoutHandle=-1,Q=n.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vn},mp(n,f,Q);var W=(f&62914560)===f?pl-Rt():(f&4194048)===f?vp-Rt():0;if(W=Dx(Q,W),W!==null){Mn=f,e.cancelPendingCommit=W(Ap.bind(null,e,n,f,a,l,u,y,_,w,B,Q,null,k,L)),si(e,f,y,!D);return}}Ap(e,n,f,a,l,u,y,_,w)}function XS(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var u=a[l],f=u.getSnapshot;u=u.value;try{if(!Dt(f(),u))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function si(e,n,a,l){n&=~Sc,n&=~Fi,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var u=n;0<u;){var f=31-Mt(u),y=1<<f;l[f]=-1,u&=~y}a!==0&&Cd(e,a,n)}function vl(){return(Te&6)===0?(Ks(0),!1):!0}function wc(){if(ve!==null){if(Re===0)var e=ve.return;else e=ve,_n=qi=null,Hu(e),Ta=null,Ts=0,e=ve;for(;e!==null;)Wm(e.alternate,e),e=e.return;ve=null}}function La(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,gx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Mn=0,wc(),Ue=e,ve=a=Sn(e.current,null),Se=n,Re=0,Zt=null,ti=!1,Da=cs(e,n),bc=!1,ka=qt=Sc=Fi=ni=Fe=0,wt=Qs=null,xc=!1,(n&8)!==0&&(n|=n&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=n;0<l;){var u=31-Mt(l),f=1<<u;n|=e[u],l&=~f}return Cn=n,qr(),a}function Ep(e,n){me=null,U.H=ks,n===za||n===Vr?(n=qh(),Re=3):n===Nu?(n=qh(),Re=4):Re=n===ic?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Zt=n,ve===null&&(Fe=1,ll(e,Yt(n,e.current)))}function Op(){var e=Ut.current;return e===null?!0:(Se&4194048)===Se?Xt===null:(Se&62914560)===Se||(Se&536870912)!==0?e===Xt:!1}function wp(){var e=U.H;return U.H=ks,e===null?ks:e}function zp(){var e=U.A;return U.A=FS,e}function bl(){Fe=4,ti||(Se&4194048)!==Se&&Ut.current!==null||(Da=!0),(ni&134217727)===0&&(Fi&134217727)===0||Ue===null||si(Ue,Se,qt,!1)}function zc(e,n,a){var l=Te;Te|=2;var u=wp(),f=zp();(Ue!==e||Se!==n)&&(yl=null,La(e,n)),n=!1;var y=Fe;e:do try{if(Re!==0&&ve!==null){var _=ve,w=Zt;switch(Re){case 8:wc(),y=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(n=!0);var D=Re;if(Re=0,Zt=null,Za(e,_,w,D),a&&Da){y=0;break e}break;default:D=Re,Re=0,Zt=null,Za(e,_,w,D)}}JS(),y=Fe;break}catch(B){Ep(e,B)}while(!0);return n&&e.shellSuspendCounter++,_n=qi=null,Te=l,U.H=u,U.A=f,ve===null&&(Ue=null,Se=0,qr()),y}function JS(){for(;ve!==null;)Tp(ve)}function IS(e,n){var a=Te;Te|=2;var l=wp(),u=zp();Ue!==e||Se!==n?(yl=null,gl=Rt()+500,La(e,n)):Da=cs(e,n);e:do try{if(Re!==0&&ve!==null){n=ve;var f=Zt;t:switch(Re){case 1:Re=0,Zt=null,Za(e,n,f,1);break;case 2:case 9:if(Lh(f)){Re=0,Zt=null,jp(n);break}n=function(){Re!==2&&Re!==9||Ue!==e||(Re=7),dn(e)},f.then(n,n);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Lh(f)?(Re=0,Zt=null,jp(n)):(Re=0,Zt=null,Za(e,n,f,7));break;case 5:var y=null;switch(ve.tag){case 26:y=ve.memoizedState;case 5:case 27:var _=ve;if(y?hg(y):_.stateNode.complete){Re=0,Zt=null;var w=_.sibling;if(w!==null)ve=w;else{var D=_.return;D!==null?(ve=D,Sl(D)):ve=null}break t}}Re=0,Zt=null,Za(e,n,f,5);break;case 6:Re=0,Zt=null,Za(e,n,f,6);break;case 8:wc(),Fe=6;break e;default:throw Error(r(462))}}WS();break}catch(B){Ep(e,B)}while(!0);return _n=qi=null,U.H=l,U.A=u,Te=a,ve!==null?0:(Ue=null,Se=0,qr(),Fe)}function WS(){for(;ve!==null&&!_0();)Tp(ve)}function Tp(e){var n=Jm(e.alternate,e,Cn);e.memoizedProps=e.pendingProps,n===null?Sl(e):ve=n}function jp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Km(a,n,n.pendingProps,n.type,void 0,Se);break;case 11:n=Km(a,n,n.pendingProps,n.type.render,n.ref,Se);break;case 5:Hu(n);default:Wm(a,n),n=ve=zh(n,Cn),n=Jm(a,n,Cn)}e.memoizedProps=e.pendingProps,n===null?Sl(e):ve=n}function Za(e,n,a,l){_n=qi=null,Hu(n),Ta=null,Ts=0;var u=n.return;try{if(HS(e,u,n,a,Se)){Fe=1,ll(e,Yt(a,e.current)),ve=null;return}}catch(f){if(u!==null)throw ve=u,f;Fe=1,ll(e,Yt(a,e.current)),ve=null;return}n.flags&32768?(Ee||l===1?e=!0:Da||(Se&536870912)!==0?e=!1:(ti=e=!0,(l===2||l===9||l===3||l===6)&&(l=Ut.current,l!==null&&l.tag===13&&(l.flags|=16384))),Np(n,e)):Sl(n)}function Sl(e){var n=e;do{if((n.flags&32768)!==0){Np(n,ti);return}e=n.return;var a=GS(n.alternate,n,Cn);if(a!==null){ve=a;return}if(n=n.sibling,n!==null){ve=n;return}ve=n=e}while(n!==null);Fe===0&&(Fe=5)}function Np(e,n){do{var a=KS(e.alternate,e);if(a!==null){a.flags&=32767,ve=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){ve=e;return}ve=e=a}while(e!==null);Fe=6,ve=null}function Ap(e,n,a,l,u,f,y,_,w){e.cancelPendingCommit=null;do xl();while(nt!==0);if((Te&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(f=n.lanes|n.childLanes,f|=mu,C0(e,a,f,y,_,w),e===Ue&&(ve=Ue=null,Se=0),Ua=n,ai=e,Mn=a,_c=f,Ec=u,bp=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,ix(Er,function(){return kp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,u=J.p,J.p=2,y=Te,Te|=4;try{YS(e,n,a)}finally{Te=y,J.p=u,U.T=l}}nt=1,Rp(),Cp(),Mp()}}function Rp(){if(nt===1){nt=0;var e=ai,n=Ua,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=J.p;J.p=2;var u=Te;Te|=4;try{fp(n,e);var f=Zc,y=yh(e.containerInfo),_=f.focusedElem,w=f.selectionRange;if(y!==_&&_&&_.ownerDocument&&gh(_.ownerDocument.documentElement,_)){if(w!==null&&uu(_)){var D=w.start,B=w.end;if(B===void 0&&(B=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(B,_.value.length);else{var Q=_.ownerDocument||document,k=Q&&Q.defaultView||window;if(k.getSelection){var L=k.getSelection(),W=_.textContent.length,oe=Math.min(w.start,W),ke=w.end===void 0?oe:Math.min(w.end,W);!L.extend&&oe>ke&&(y=ke,ke=oe,oe=y);var A=ph(_,oe),z=ph(_,ke);if(A&&z&&(L.rangeCount!==1||L.anchorNode!==A.node||L.anchorOffset!==A.offset||L.focusNode!==z.node||L.focusOffset!==z.offset)){var M=Q.createRange();M.setStart(A.node,A.offset),L.removeAllRanges(),oe>ke?(L.addRange(M),L.extend(z.node,z.offset)):(M.setEnd(z.node,z.offset),L.addRange(M))}}}}for(Q=[],L=_;L=L.parentNode;)L.nodeType===1&&Q.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<Q.length;_++){var H=Q[_];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Ml=!!Lc,Zc=Lc=null}finally{Te=u,J.p=l,U.T=a}}e.current=n,nt=2}}function Cp(){if(nt===2){nt=0;var e=ai,n=Ua,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=J.p;J.p=2;var u=Te;Te|=4;try{rp(e,n.alternate,n)}finally{Te=u,J.p=l,U.T=a}}nt=3}}function Mp(){if(nt===4||nt===3){nt=0,E0();var e=ai,n=Ua,a=Mn,l=bp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?nt=5:(nt=0,Ua=ai=null,Dp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(ii=null),Go(a),n=n.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(us,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=U.T,u=J.p,J.p=2,U.T=null;try{for(var f=e.onRecoverableError,y=0;y<l.length;y++){var _=l[y];f(_.value,{componentStack:_.stack})}}finally{U.T=n,J.p=u}}(Mn&3)!==0&&xl(),dn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Oc?Gs++:(Gs=0,Oc=e):Gs=0,Ks(0)}}function Dp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,ws(n)))}function xl(){return Rp(),Cp(),Mp(),kp()}function kp(){if(nt!==5)return!1;var e=ai,n=_c;_c=0;var a=Go(Mn),l=U.T,u=J.p;try{J.p=32>a?32:a,U.T=null,a=Ec,Ec=null;var f=ai,y=Mn;if(nt=0,Ua=ai=null,Mn=0,(Te&6)!==0)throw Error(r(331));var _=Te;if(Te|=4,gp(f.current),hp(f,f.current,y,a),Te=_,Ks(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(us,f)}catch{}return!0}finally{J.p=u,U.T=l,Dp(e,n)}}function Up(e,n,a){n=Yt(a,n),n=nc(e.stateNode,n,2),e=Jn(e,n,2),e!==null&&(fs(e,2),dn(e))}function Ce(e,n,a){if(e.tag===3)Up(e,e,a);else for(;n!==null;){if(n.tag===3){Up(n,e,a);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ii===null||!ii.has(l))){e=Yt(a,e),a=Lm(2),l=Jn(n,a,2),l!==null&&(Zm(a,l,n,e),fs(l,2),dn(l));break}}n=n.return}}function Tc(e,n,a){var l=e.pingCache;if(l===null){l=e.pingCache=new PS;var u=new Set;l.set(n,u)}else u=l.get(n),u===void 0&&(u=new Set,l.set(n,u));u.has(a)||(bc=!0,u.add(a),e=ex.bind(null,e,n,a),n.then(e,e))}function ex(e,n,a){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ue===e&&(Se&a)===a&&(Fe===4||Fe===3&&(Se&62914560)===Se&&300>Rt()-pl?(Te&2)===0&&La(e,0):Sc|=a,ka===Se&&(ka=0)),dn(e)}function Lp(e,n){n===0&&(n=Rd()),e=Ui(e,n),e!==null&&(fs(e,n),dn(e))}function tx(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Lp(e,a)}function nx(e,n){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(n),Lp(e,a)}function ix(e,n){return Bo(e,n)}var _l=null,qa=null,jc=!1,El=!1,Nc=!1,ri=0;function dn(e){e!==qa&&e.next===null&&(qa===null?_l=qa=e:qa=qa.next=e),El=!0,jc||(jc=!0,sx())}function Ks(e,n){if(!Nc&&El){Nc=!0;do for(var a=!1,l=_l;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var f=0;else{var y=l.suspendedLanes,_=l.pingedLanes;f=(1<<31-Mt(42|e)+1)-1,f&=u&~(y&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Hp(l,f))}else f=Se,f=Tr(l,l===Ue?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||cs(l,f)||(a=!0,Hp(l,f));l=l.next}while(a);Nc=!1}}function ax(){Zp()}function Zp(){El=jc=!1;var e=0;ri!==0&&px()&&(e=ri);for(var n=Rt(),a=null,l=_l;l!==null;){var u=l.next,f=qp(l,n);f===0?(l.next=null,a===null?_l=u:a.next=u,u===null&&(qa=a)):(a=l,(e!==0||(f&3)!==0)&&(El=!0)),l=u}nt!==0&&nt!==5||Ks(e),ri!==0&&(ri=0)}function qp(e,n){for(var a=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-Mt(f),_=1<<y,w=u[y];w===-1?((_&a)===0||(_&l)!==0)&&(u[y]=R0(_,n)):w<=n&&(e.expiredLanes|=_),f&=~_}if(n=Ue,a=Se,a=Tr(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===n&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ho(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||cs(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(l!==null&&Ho(l),Go(a)){case 2:case 8:a=Nd;break;case 32:a=Er;break;case 268435456:a=Ad;break;default:a=Er}return l=Bp.bind(null,e),a=Bo(a,l),e.callbackPriority=n,e.callbackNode=a,n}return l!==null&&l!==null&&Ho(l),e.callbackPriority=2,e.callbackNode=null,2}function Bp(e,n){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(xl()&&e.callbackNode!==a)return null;var l=Se;return l=Tr(e,e===Ue?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(xp(e,l,n),qp(e,Rt()),e.callbackNode!=null&&e.callbackNode===a?Bp.bind(null,e):null)}function Hp(e,n){if(xl())return null;xp(e,n,!0)}function sx(){yx(function(){(Te&6)!==0?Bo(jd,ax):Zp()})}function Ac(){if(ri===0){var e=Oa;e===0&&(e=Or,Or<<=1,(Or&261888)===0&&(Or=256)),ri=e}return ri}function $p(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Rr(""+e)}function Qp(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function rx(e,n,a,l,u){if(n==="submit"&&a&&a.stateNode===u){var f=$p((u[St]||null).action),y=l.submitter;y&&(n=(n=y[St]||null)?$p(n.formAction):y.getAttribute("formAction"),n!==null&&(f=n,y=null));var _=new kr("action","action",null,l,u);e.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ri!==0){var w=y?Qp(u,y):new FormData(u);Xu(a,{pending:!0,data:w,method:u.method,action:f},null,w)}}else typeof f=="function"&&(_.preventDefault(),w=y?Qp(u,y):new FormData(u),Xu(a,{pending:!0,data:w,method:u.method,action:f},f,w))},currentTarget:u}]})}}for(var Rc=0;Rc<hu.length;Rc++){var Cc=hu[Rc],lx=Cc.toLowerCase(),ox=Cc[0].toUpperCase()+Cc.slice(1);tn(lx,"on"+ox)}tn(Sh,"onAnimationEnd"),tn(xh,"onAnimationIteration"),tn(_h,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(OS,"onTransitionRun"),tn(wS,"onTransitionStart"),tn(zS,"onTransitionCancel"),tn(Eh,"onTransitionEnd"),ca("onMouseEnter",["mouseout","mouseover"]),ca("onMouseLeave",["mouseout","mouseover"]),ca("onPointerEnter",["pointerout","pointerover"]),ca("onPointerLeave",["pointerout","pointerover"]),Ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ys="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(" "),ux=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ys));function Gp(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],u=l.event;l=l.listeners;e:{var f=void 0;if(n)for(var y=l.length-1;0<=y;y--){var _=l[y],w=_.instance,D=_.currentTarget;if(_=_.listener,w!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch(B){Zr(B)}u.currentTarget=null,f=w}else for(y=0;y<l.length;y++){if(_=l[y],w=_.instance,D=_.currentTarget,_=_.listener,w!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch(B){Zr(B)}u.currentTarget=null,f=w}}}}function be(e,n){var a=n[Ko];a===void 0&&(a=n[Ko]=new Set);var l=e+"__bubble";a.has(l)||(Kp(n,e,2,!1),a.add(l))}function Mc(e,n,a){var l=0;n&&(l|=4),Kp(a,e,l,n)}var Ol="_reactListening"+Math.random().toString(36).slice(2);function Dc(e){if(!e[Ol]){e[Ol]=!0,Zd.forEach(function(a){a!=="selectionchange"&&(ux.has(a)||Mc(a,!1,e),Mc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ol]||(n[Ol]=!0,Mc("selectionchange",!1,n))}}function Kp(e,n,a,l){switch(Sg(n)){case 2:var u=Lx;break;case 8:u=Zx;break;default:u=Pc}a=u.bind(null,n,a,e),u=void 0,!eu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(n,a,{capture:!0,passive:u}):e.addEventListener(n,a,!0):u!==void 0?e.addEventListener(n,a,{passive:u}):e.addEventListener(n,a,!1)}function kc(e,n,a,l,u){var f=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var y=l.tag;if(y===3||y===4){var _=l.stateNode.containerInfo;if(_===u)break;if(y===4)for(y=l.return;y!==null;){var w=y.tag;if((w===3||w===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;_!==null;){if(y=la(_),y===null)return;if(w=y.tag,w===5||w===6||w===26||w===27){l=f=y;continue e}_=_.parentNode}}l=l.return}Xd(function(){var D=f,B=Io(a),Q=[];e:{var k=Oh.get(e);if(k!==void 0){var L=kr,W=e;switch(e){case"keypress":if(Mr(a)===0)break e;case"keydown":case"keyup":L=nS;break;case"focusin":W="focus",L=au;break;case"focusout":W="blur",L=au;break;case"beforeblur":case"afterblur":L=au;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Wd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=G0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=sS;break;case Sh:case xh:case _h:L=V0;break;case Eh:L=lS;break;case"scroll":case"scrollend":L=$0;break;case"wheel":L=uS;break;case"copy":case"cut":case"paste":L=P0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=th;break;case"toggle":case"beforetoggle":L=fS}var oe=(n&4)!==0,ke=!oe&&(e==="scroll"||e==="scrollend"),A=oe?k!==null?k+"Capture":null:k;oe=[];for(var z=D,M;z!==null;){var H=z;if(M=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||M===null||A===null||(H=ms(z,A),H!=null&&oe.push(Vs(z,H,M))),ke)break;z=z.return}0<oe.length&&(k=new L(k,W,null,a,B),Q.push({event:k,listeners:oe}))}}if((n&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",k&&a!==Jo&&(W=a.relatedTarget||a.fromElement)&&(la(W)||W[ra]))break e;if((L||k)&&(k=B.window===B?B:(k=B.ownerDocument)?k.defaultView||k.parentWindow:window,L?(W=a.relatedTarget||a.toElement,L=D,W=W?la(W):null,W!==null&&(ke=c(W),oe=W.tag,W!==ke||oe!==5&&oe!==27&&oe!==6)&&(W=null)):(L=null,W=D),L!==W)){if(oe=Wd,H="onMouseLeave",A="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(oe=th,H="onPointerLeave",A="onPointerEnter",z="pointer"),ke=L==null?k:hs(L),M=W==null?k:hs(W),k=new oe(H,z+"leave",L,a,B),k.target=ke,k.relatedTarget=M,H=null,la(B)===D&&(oe=new oe(A,z+"enter",W,a,B),oe.target=M,oe.relatedTarget=ke,H=oe),ke=H,L&&W)t:{for(oe=cx,A=L,z=W,M=0,H=A;H;H=oe(H))M++;H=0;for(var ae=z;ae;ae=oe(ae))H++;for(;0<M-H;)A=oe(A),M--;for(;0<H-M;)z=oe(z),H--;for(;M--;){if(A===z||z!==null&&A===z.alternate){oe=A;break t}A=oe(A),z=oe(z)}oe=null}else oe=null;L!==null&&Yp(Q,k,L,oe,!1),W!==null&&ke!==null&&Yp(Q,ke,W,oe,!0)}}e:{if(k=D?hs(D):window,L=k.nodeName&&k.nodeName.toLowerCase(),L==="select"||L==="input"&&k.type==="file")var we=uh;else if(lh(k))if(ch)we=xS;else{we=bS;var ee=vS}else L=k.nodeName,!L||L.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&Xo(D.elementType)&&(we=uh):we=SS;if(we&&(we=we(e,D))){oh(Q,we,a,B);break e}ee&&ee(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Po(k,"number",k.value)}switch(ee=D?hs(D):window,e){case"focusin":(lh(ee)||ee.contentEditable==="true")&&(ga=ee,cu=D,_s=null);break;case"focusout":_s=cu=ga=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,vh(Q,a,B);break;case"selectionchange":if(ES)break;case"keydown":case"keyup":vh(Q,a,B)}var pe;if(ru)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else pa?sh(e,a)&&(xe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(xe="onCompositionStart");xe&&(nh&&a.locale!=="ko"&&(pa||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&pa&&(pe=Jd()):(Gn=B,tu="value"in Gn?Gn.value:Gn.textContent,pa=!0)),ee=wl(D,xe),0<ee.length&&(xe=new eh(xe,e,null,a,B),Q.push({event:xe,listeners:ee}),pe?xe.data=pe:(pe=rh(a),pe!==null&&(xe.data=pe)))),(pe=hS?mS(e,a):pS(e,a))&&(xe=wl(D,"onBeforeInput"),0<xe.length&&(ee=new eh("onBeforeInput","beforeinput",null,a,B),Q.push({event:ee,listeners:xe}),ee.data=pe)),rx(Q,e,D,a,B)}Gp(Q,n)})}function Vs(e,n,a){return{instance:e,listener:n,currentTarget:a}}function wl(e,n){for(var a=n+"Capture",l=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=ms(e,a),u!=null&&l.unshift(Vs(e,u,f)),u=ms(e,n),u!=null&&l.push(Vs(e,u,f))),e.tag===3)return l;e=e.return}return[]}function cx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yp(e,n,a,l,u){for(var f=n._reactName,y=[];a!==null&&a!==l;){var _=a,w=_.alternate,D=_.stateNode;if(_=_.tag,w!==null&&w===l)break;_!==5&&_!==26&&_!==27||D===null||(w=D,u?(D=ms(a,f),D!=null&&y.unshift(Vs(a,D,w))):u||(D=ms(a,f),D!=null&&y.push(Vs(a,D,w)))),a=a.return}y.length!==0&&e.push({event:n,listeners:y})}var fx=/\r\n?/g,dx=/\u0000|\uFFFD/g;function Vp(e){return(typeof e=="string"?e:""+e).replace(fx,`
9
- `).replace(dx,"")}function Fp(e,n){return n=Vp(n),Vp(e)===n}function De(e,n,a,l,u,f){switch(a){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||da(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&da(e,""+l);break;case"className":Nr(e,"class",l);break;case"tabIndex":Nr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Nr(e,a,l);break;case"style":Fd(e,l,f);break;case"data":if(n!=="object"){Nr(e,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Rr(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 f=="function"&&(a==="formAction"?(n!=="input"&&De(e,n,"name",u.name,u,null),De(e,n,"formEncType",u.formEncType,u,null),De(e,n,"formMethod",u.formMethod,u,null),De(e,n,"formTarget",u.formTarget,u,null)):(De(e,n,"encType",u.encType,u,null),De(e,n,"method",u.method,u,null),De(e,n,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Rr(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=vn);break;case"onScroll":l!=null&&be("scroll",e);break;case"onScrollEnd":l!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Rr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":be("beforetoggle",e),be("toggle",e),jr(e,"popover",l);break;case"xlinkActuate":yn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":yn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":yn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":yn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":yn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":yn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":yn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":yn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":yn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":jr(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=B0.get(a)||a,jr(e,a,l))}}function Uc(e,n,a,l,u,f){switch(a){case"style":Fd(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?da(e,l):(typeof l=="number"||typeof l=="bigint")&&da(e,""+l);break;case"onScroll":l!=null&&be("scroll",e);break;case"onScrollEnd":l!=null&&be("scrollend",e);break;case"onClick":l!=null&&(e.onclick=vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),n=a.slice(2,u?a.length-7:void 0),f=e[St]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(n,f,u),typeof l=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,l,u);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):jr(e,a,l)}}}function ct(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var l=!1,u=!1,f;for(f in a)if(a.hasOwnProperty(f)){var y=a[f];if(y!=null)switch(f){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:De(e,n,f,y,a,null)}}u&&De(e,n,"srcSet",a.srcSet,a,null),l&&De(e,n,"src",a.src,a,null);return;case"input":be("invalid",e);var _=f=y=u=null,w=null,D=null;for(l in a)if(a.hasOwnProperty(l)){var B=a[l];if(B!=null)switch(l){case"name":u=B;break;case"type":y=B;break;case"checked":w=B;break;case"defaultChecked":D=B;break;case"value":f=B;break;case"defaultValue":_=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,n));break;default:De(e,n,l,B,a,null)}}Gd(e,f,_,w,D,y,u,!1);return;case"select":be("invalid",e),l=y=f=null;for(u in a)if(a.hasOwnProperty(u)&&(_=a[u],_!=null))switch(u){case"value":f=_;break;case"defaultValue":y=_;break;case"multiple":l=_;default:De(e,n,u,_,a,null)}n=f,a=y,e.multiple=!!l,n!=null?fa(e,!!l,n,!1):a!=null&&fa(e,!!l,a,!0);return;case"textarea":be("invalid",e),f=u=l=null;for(y in a)if(a.hasOwnProperty(y)&&(_=a[y],_!=null))switch(y){case"value":l=_;break;case"defaultValue":u=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:De(e,n,y,_,a,null)}Yd(e,l,u,f);return;case"option":for(w in a)a.hasOwnProperty(w)&&(l=a[w],l!=null)&&(w==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":De(e,n,w,l,a,null));return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(l=0;l<Ys.length;l++)be(Ys[l],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(l=a[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:De(e,n,D,l,a,null)}return;default:if(Xo(n)){for(B in a)a.hasOwnProperty(B)&&(l=a[B],l!==void 0&&Uc(e,n,B,l,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(l=a[_],l!=null&&De(e,n,_,l,a,null))}function hx(e,n,a,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,y=null,_=null,w=null,D=null,B=null;for(L in a){var Q=a[L];if(a.hasOwnProperty(L)&&Q!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":w=Q;default:l.hasOwnProperty(L)||De(e,n,L,null,l,Q)}}for(var k in l){var L=l[k];if(Q=a[k],l.hasOwnProperty(k)&&(L!=null||Q!=null))switch(k){case"type":f=L;break;case"name":u=L;break;case"checked":D=L;break;case"defaultChecked":B=L;break;case"value":y=L;break;case"defaultValue":_=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(137,n));break;default:L!==Q&&De(e,n,k,L,l,Q)}}Fo(e,y,_,w,D,B,f,u);return;case"select":L=y=_=k=null;for(f in a)if(w=a[f],a.hasOwnProperty(f)&&w!=null)switch(f){case"value":break;case"multiple":L=w;default:l.hasOwnProperty(f)||De(e,n,f,null,l,w)}for(u in l)if(f=l[u],w=a[u],l.hasOwnProperty(u)&&(f!=null||w!=null))switch(u){case"value":k=f;break;case"defaultValue":_=f;break;case"multiple":y=f;default:f!==w&&De(e,n,u,f,l,w)}n=_,a=y,l=L,k!=null?fa(e,!!a,k,!1):!!l!=!!a&&(n!=null?fa(e,!!a,n,!0):fa(e,!!a,a?[]:"",!1));return;case"textarea":L=k=null;for(_ in a)if(u=a[_],a.hasOwnProperty(_)&&u!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:De(e,n,_,null,l,u)}for(y in l)if(u=l[y],f=a[y],l.hasOwnProperty(y)&&(u!=null||f!=null))switch(y){case"value":k=u;break;case"defaultValue":L=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==f&&De(e,n,y,u,l,f)}Kd(e,k,L);return;case"option":for(var W in a)k=a[W],a.hasOwnProperty(W)&&k!=null&&!l.hasOwnProperty(W)&&(W==="selected"?e.selected=!1:De(e,n,W,null,l,k));for(w in l)k=l[w],L=a[w],l.hasOwnProperty(w)&&k!==L&&(k!=null||L!=null)&&(w==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":De(e,n,w,k,l,L));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 oe in a)k=a[oe],a.hasOwnProperty(oe)&&k!=null&&!l.hasOwnProperty(oe)&&De(e,n,oe,null,l,k);for(D in l)if(k=l[D],L=a[D],l.hasOwnProperty(D)&&k!==L&&(k!=null||L!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,n));break;default:De(e,n,D,k,l,L)}return;default:if(Xo(n)){for(var ke in a)k=a[ke],a.hasOwnProperty(ke)&&k!==void 0&&!l.hasOwnProperty(ke)&&Uc(e,n,ke,void 0,l,k);for(B in l)k=l[B],L=a[B],!l.hasOwnProperty(B)||k===L||k===void 0&&L===void 0||Uc(e,n,B,k,l,L);return}}for(var A in a)k=a[A],a.hasOwnProperty(A)&&k!=null&&!l.hasOwnProperty(A)&&De(e,n,A,null,l,k);for(Q in l)k=l[Q],L=a[Q],!l.hasOwnProperty(Q)||k===L||k==null&&L==null||De(e,n,Q,k,l,L)}function Pp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var u=a[l],f=u.transferSize,y=u.initiatorType,_=u.duration;if(f&&_&&Pp(y)){for(y=0,_=u.responseEnd,l+=1;l<a.length;l++){var w=a[l],D=w.startTime;if(D>_)break;var B=w.transferSize,Q=w.initiatorType;B&&Pp(Q)&&(w=w.responseEnd,y+=B*(w<_?1:(_-D)/(w-D)))}if(--l,n+=8*(f+y)/(u.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Lc=null,Zc=null;function zl(e){return e.nodeType===9?e:e.ownerDocument}function Xp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function qc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Bc=null;function px(){var e=window.event;return e&&e.type==="popstate"?e===Bc?!1:(Bc=e,!0):(Bc=null,!1)}var Ip=typeof setTimeout=="function"?setTimeout:void 0,gx=typeof clearTimeout=="function"?clearTimeout:void 0,Wp=typeof Promise=="function"?Promise:void 0,yx=typeof queueMicrotask=="function"?queueMicrotask:typeof Wp<"u"?function(e){return Wp.resolve(null).then(e).catch(vx)}:Ip;function vx(e){setTimeout(function(){throw e})}function li(e){return e==="head"}function eg(e,n){var a=n,l=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(u),Qa(n);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Fs(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Fs(a);for(var f=a.firstChild;f;){var y=f.nextSibling,_=f.nodeName;f[ds]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=y}}else a==="body"&&Fs(e.ownerDocument.body);a=u}while(a);Qa(n)}function tg(e,n){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Hc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Hc(a),Yo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function bx(e,n,a,l){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[ds])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Jt(e.nextSibling),e===null)break}return null}function Sx(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Jt(e.nextSibling),e===null))return null;return e}function ng(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Jt(e.nextSibling),e===null))return null;return e}function $c(e){return e.data==="$?"||e.data==="$~"}function Qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xx(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var l=function(){n(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Jt(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Gc=null;function ig(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return Jt(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function ag(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function sg(e,n,a){switch(n=zl(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Fs(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Yo(e)}var It=new Map,rg=new Set;function Tl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Dn=J.d;J.d={f:_x,r:Ex,D:Ox,C:wx,L:zx,m:Tx,X:Nx,S:jx,M:Ax};function _x(){var e=Dn.f(),n=vl();return e||n}function Ex(e){var n=oa(e);n!==null&&n.tag===5&&n.type==="form"?Em(n):Dn.r(e)}var Ba=typeof document>"u"?null:document;function lg(e,n,a){var l=Ba;if(l&&typeof n=="string"&&n){var u=Gt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),rg.has(u)||(rg.add(u),e={rel:e,crossOrigin:a,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),ct(n,"link",e),at(n),l.head.appendChild(n)))}}function Ox(e){Dn.D(e),lg("dns-prefetch",e,null)}function wx(e,n){Dn.C(e,n),lg("preconnect",e,n)}function zx(e,n,a){Dn.L(e,n,a);var l=Ba;if(l&&e&&n){var u='link[rel="preload"][as="'+Gt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Gt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Gt(a.imageSizes)+'"]')):u+='[href="'+Gt(e)+'"]';var f=u;switch(n){case"style":f=Ha(e);break;case"script":f=$a(e)}It.has(f)||(e=g({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),It.set(f,e),l.querySelector(u)!==null||n==="style"&&l.querySelector(Ps(f))||n==="script"&&l.querySelector(Xs(f))||(n=l.createElement("link"),ct(n,"link",e),at(n),l.head.appendChild(n)))}}function Tx(e,n){Dn.m(e,n);var a=Ba;if(a&&e){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Gt(l)+'"][href="'+Gt(e)+'"]',f=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=$a(e)}if(!It.has(f)&&(e=g({rel:"modulepreload",href:e},n),It.set(f,e),a.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Xs(f)))return}l=a.createElement("link"),ct(l,"link",e),at(l),a.head.appendChild(l)}}}function jx(e,n,a){Dn.S(e,n,a);var l=Ba;if(l&&e){var u=ua(l).hoistableStyles,f=Ha(e);n=n||"default";var y=u.get(f);if(!y){var _={loading:0,preload:null};if(y=l.querySelector(Ps(f)))_.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},a),(a=It.get(f))&&Kc(e,a);var w=y=l.createElement("link");at(w),ct(w,"link",e),w._p=new Promise(function(D,B){w.onload=D,w.onerror=B}),w.addEventListener("load",function(){_.loading|=1}),w.addEventListener("error",function(){_.loading|=2}),_.loading|=4,jl(y,n,l)}y={type:"stylesheet",instance:y,count:1,state:_},u.set(f,y)}}}function Nx(e,n){Dn.X(e,n);var a=Ba;if(a&&e){var l=ua(a).hoistableScripts,u=$a(e),f=l.get(u);f||(f=a.querySelector(Xs(u)),f||(e=g({src:e,async:!0},n),(n=It.get(u))&&Yc(e,n),f=a.createElement("script"),at(f),ct(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function Ax(e,n){Dn.M(e,n);var a=Ba;if(a&&e){var l=ua(a).hoistableScripts,u=$a(e),f=l.get(u);f||(f=a.querySelector(Xs(u)),f||(e=g({src:e,async:!0,type:"module"},n),(n=It.get(u))&&Yc(e,n),f=a.createElement("script"),at(f),ct(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function og(e,n,a,l){var u=(u=ge.current)?Tl(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Ha(a.href),a=ua(u).hoistableStyles,l=a.get(n),l||(l={type:"style",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ha(a.href);var f=ua(u).hoistableStyles,y=f.get(e);if(y||(u=u.ownerDocument||u,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,y),(f=u.querySelector(Ps(e)))&&!f._p&&(y.instance=f,y.state.loading=5),It.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},It.set(e,a),f||Rx(u,e,a,y.state))),n&&l===null)throw Error(r(528,""));return y}if(n&&l!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=$a(a),a=ua(u).hoistableScripts,l=a.get(n),l||(l={type:"script",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ha(e){return'href="'+Gt(e)+'"'}function Ps(e){return'link[rel="stylesheet"]['+e+"]"}function ug(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Rx(e,n,a,l){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=e.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),ct(n,"link",a),at(n),e.head.appendChild(n))}function $a(e){return'[src="'+Gt(e)+'"]'}function Xs(e){return"script[async]"+e}function cg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Gt(a.href)+'"]');if(l)return n.instance=l,at(l),l;var u=g({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),at(l),ct(l,"style",u),jl(l,a.precedence,e),n.instance=l;case"stylesheet":u=Ha(a.href);var f=e.querySelector(Ps(u));if(f)return n.state.loading|=4,n.instance=f,at(f),f;l=ug(a),(u=It.get(u))&&Kc(l,u),f=(e.ownerDocument||e).createElement("link"),at(f);var y=f;return y._p=new Promise(function(_,w){y.onload=_,y.onerror=w}),ct(f,"link",l),n.state.loading|=4,jl(f,a.precedence,e),n.instance=f;case"script":return f=$a(a.src),(u=e.querySelector(Xs(f)))?(n.instance=u,at(u),u):(l=a,(u=It.get(f))&&(l=g({},a),Yc(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),at(u),ct(u,"link",l),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,jl(l,a.precedence,e));return n.instance}function jl(e,n,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,f=u,y=0;y<l.length;y++){var _=l[y];if(_.dataset.precedence===n)f=_;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Kc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Yc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Nl=null;function fg(e,n,a){if(Nl===null){var l=new Map,u=Nl=new Map;u.set(a,l)}else u=Nl,l=u.get(a),l||(l=new Map,u.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var f=a[u];if(!(f[ds]||f[rt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var y=f.getAttribute(n)||"";y=e+y;var _=l.get(y);_?_.push(f):l.set(y,[f])}}return l}function dg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function Cx(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function hg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Mx(e,n,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Ha(l.href),f=n.querySelector(Ps(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Al.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=f,at(f);return}f=n.ownerDocument||n,l=ug(l),(u=It.get(u))&&Kc(l,u),f=f.createElement("link"),at(f);var y=f;y._p=new Promise(function(_,w){y.onload=_,y.onerror=w}),ct(f,"link",l),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Al.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Vc=0;function Dx(e,n){return e.stylesheets&&e.count===0&&Cl(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Cl(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+n);0<e.imgBytes&&Vc===0&&(Vc=62500*mx());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cl(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Vc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function Al(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cl(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Rl=null;function Cl(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Rl=new Map,n.forEach(kx,e),Rl=null,Al.call(e))}function kx(e,n){if(!(n.state.loading&4)){var a=Rl.get(e);if(a)var l=a.get(null);else{a=new Map,Rl.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var y=u[f];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(a.set(y.dataset.precedence,y),l=y)}l&&a.set(null,l)}u=n.instance,y=u.getAttribute("data-precedence"),f=a.get(y)||l,f===l&&a.set(null,u),a.set(y,u),this.count++,l=Al.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=4}}var Js={$$typeof:G,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Ux(e,n,a,l,u,f,y,_,w){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$o(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$o(0),this.hiddenUpdates=$o(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=w,this.incompleteTransitions=new Map}function mg(e,n,a,l,u,f,y,_,w,D,B,Q){return e=new Ux(e,n,a,y,w,D,B,Q,_),n=1,f===!0&&(n|=24),f=kt(3,null,null,n),e.current=f,f.stateNode=e,n=zu(),n.refCount++,e.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:n},Au(f),e}function pg(e){return e?(e=ba,e):ba}function gg(e,n,a,l,u,f){u=pg(u),l.context===null?l.context=u:l.pendingContext=u,l=Xn(n),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=Jn(e,l,n),a!==null&&(zt(a,e,n),Ns(a,e,n))}function yg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Fc(e,n){yg(e,n),(e=e.alternate)&&yg(e,n)}function vg(e){if(e.tag===13||e.tag===31){var n=Ui(e,67108864);n!==null&&zt(n,e,67108864),Fc(e,67108864)}}function bg(e){if(e.tag===13||e.tag===31){var n=Bt();n=Qo(n);var a=Ui(e,n);a!==null&&zt(a,e,n),Fc(e,n)}}var Ml=!0;function Lx(e,n,a,l){var u=U.T;U.T=null;var f=J.p;try{J.p=2,Pc(e,n,a,l)}finally{J.p=f,U.T=u}}function Zx(e,n,a,l){var u=U.T;U.T=null;var f=J.p;try{J.p=8,Pc(e,n,a,l)}finally{J.p=f,U.T=u}}function Pc(e,n,a,l){if(Ml){var u=Xc(l);if(u===null)kc(e,n,l,Dl,a),xg(e,l);else if(Bx(u,e,n,a,l))l.stopPropagation();else if(xg(e,l),n&4&&-1<qx.indexOf(e)){for(;u!==null;){var f=oa(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=Ri(f.pendingLanes);if(y!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;y;){var w=1<<31-Mt(y);_.entanglements[1]|=w,y&=~w}dn(f),(Te&6)===0&&(gl=Rt()+500,Ks(0))}}break;case 31:case 13:_=Ui(f,2),_!==null&&zt(_,f,2),vl(),Fc(f,2)}if(f=Xc(l),f===null&&kc(e,n,l,Dl,a),f===u)break;u=f}u!==null&&l.stopPropagation()}else kc(e,n,l,null,a)}}function Xc(e){return e=Io(e),Jc(e)}var Dl=null;function Jc(e){if(Dl=null,e=la(e),e!==null){var n=c(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=d(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return Dl=e,null}function Sg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(O0()){case jd:return 2;case Nd:return 8;case Er:case w0:return 32;case Ad:return 268435456;default:return 32}default:return 32}}var Ic=!1,oi=null,ui=null,ci=null,Is=new Map,Ws=new Map,fi=[],qx="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 xg(e,n){switch(e){case"focusin":case"focusout":oi=null;break;case"dragenter":case"dragleave":ui=null;break;case"mouseover":case"mouseout":ci=null;break;case"pointerover":case"pointerout":Is.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ws.delete(n.pointerId)}}function er(e,n,a,l,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[u]},n!==null&&(n=oa(n),n!==null&&vg(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function Bx(e,n,a,l,u){switch(n){case"focusin":return oi=er(oi,e,n,a,l,u),!0;case"dragenter":return ui=er(ui,e,n,a,l,u),!0;case"mouseover":return ci=er(ci,e,n,a,l,u),!0;case"pointerover":var f=u.pointerId;return Is.set(f,er(Is.get(f)||null,e,n,a,l,u)),!0;case"gotpointercapture":return f=u.pointerId,Ws.set(f,er(Ws.get(f)||null,e,n,a,l,u)),!0}return!1}function _g(e){var n=la(e.target);if(n!==null){var a=c(n);if(a!==null){if(n=a.tag,n===13){if(n=d(a),n!==null){e.blockedOn=n,Ud(e.priority,function(){bg(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,Ud(e.priority,function(){bg(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function kl(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Xc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Jo=l,a.target.dispatchEvent(l),Jo=null}else return n=oa(a),n!==null&&vg(n),e.blockedOn=a,!1;n.shift()}return!0}function Eg(e,n,a){kl(e)&&a.delete(n)}function Hx(){Ic=!1,oi!==null&&kl(oi)&&(oi=null),ui!==null&&kl(ui)&&(ui=null),ci!==null&&kl(ci)&&(ci=null),Is.forEach(Eg),Ws.forEach(Eg)}function Ul(e,n){e.blockedOn===n&&(e.blockedOn=null,Ic||(Ic=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Hx)))}var Ll=null;function Og(e){Ll!==e&&(Ll=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Ll===e&&(Ll=null);for(var n=0;n<e.length;n+=3){var a=e[n],l=e[n+1],u=e[n+2];if(typeof l!="function"){if(Jc(l||a)===null)continue;break}var f=oa(a);f!==null&&(e.splice(n,3),n-=3,Xu(f,{pending:!0,data:u,method:a.method,action:l},l,u))}}))}function Qa(e){function n(w){return Ul(w,e)}oi!==null&&Ul(oi,e),ui!==null&&Ul(ui,e),ci!==null&&Ul(ci,e),Is.forEach(n),Ws.forEach(n);for(var a=0;a<fi.length;a++){var l=fi[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<fi.length&&(a=fi[0],a.blockedOn===null);)_g(a),a.blockedOn===null&&fi.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var u=a[l],f=a[l+1],y=u[St]||null;if(typeof f=="function")y||Og(a);else if(y){var _=null;if(f&&f.hasAttribute("formAction")){if(u=f,y=f[St]||null)_=y.formAction;else if(Jc(u)!==null)continue}else _=y.action;typeof _=="function"?a[l+1]=_:(a.splice(l,3),l-=3),Og(a)}}}function wg(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(y){return u=y})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function Wc(e){this._internalRoot=e}Zl.prototype.render=Wc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,l=Bt();gg(a,l,e,n,null,null)},Zl.prototype.unmount=Wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;gg(e.current,2,null,e,null,null),vl(),n[ra]=null}};function Zl(e){this._internalRoot=e}Zl.prototype.unstable_scheduleHydration=function(e){if(e){var n=kd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<fi.length&&n!==0&&n<fi[a].priority;a++);fi.splice(a,0,e),a===0&&_g(e)}};var zg=i.version;if(zg!=="19.2.8")throw Error(r(527,zg,"19.2.8"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(n),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var $x={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ql=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ql.isDisabled&&ql.supportsFiber)try{us=ql.inject($x),Ct=ql}catch{}}return nr.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,l="",u=Mm,f=Dm,y=km;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=mg(e,1,!1,null,null,a,l,null,u,f,y,wg),e[ra]=n.current,Dc(e),new Wc(n)},nr.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var l=!1,u="",f=Mm,y=Dm,_=km,w=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(w=a.formState)),n=mg(e,1,!0,n,a??null,l,u,w,f,y,_,wg),n.context=pg(null),a=n.current,l=Bt(),l=Qo(l),u=Xn(l),u.callback=null,Jn(a,u,l),a=l,n.current.lanes=a,fs(n,a),dn(n),e[ra]=n.current,Dc(e),new Zl(n)},nr.version="19.2.8",nr}var Ug;function Ix(){if(Ug)return nf.exports;Ug=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),nf.exports=Jx(),nf.exports}var Wx=Ix();const pv=X.createContext(void 0),wi=t=>{const i=X.useContext(pv);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},e_=({client:t,children:i})=>(X.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),b.jsx(pv.Provider,{value:t,children:i})),t_={setTimeout:(t,i)=>setTimeout(t,i),clearTimeout:t=>clearTimeout(t),setInterval:(t,i)=>setInterval(t,i),clearInterval:t=>clearInterval(t)};var n_=class{#e=t_;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,i){return this.#e.setTimeout(t,i)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,i){return this.#e.setInterval(t,i)}clearInterval(t){this.#e.clearInterval(t)}};const Pi=new n_;function i_(t){setTimeout(t,0)}const a_=typeof window>"u"||"Deno"in globalThis;function vt(){}function s_(t,i){return typeof t=="function"?t(i):t}function zf(t){return typeof t=="number"&&t>=0&&t!==1/0}function gv(t,i){return Math.max(t+(i||0)-Date.now(),0)}function Ln(t,i){return typeof t=="function"?t(i):t}function Ht(t,i){return typeof t=="function"?t(i):t}function Lg(t,i){const{type:s="all",exact:r,fetchStatus:o,predicate:c,queryKey:d,stale:h}=t;if(d){if(r){if(i.queryHash!==Pf(d,i.options))return!1}else if(!Ia(i.queryKey,d))return!1}if(s!=="all"){const m=i.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof h=="boolean"&&i.isStale()!==h||o&&o!==i.state.fetchStatus||c&&!c(i))}function Zg(t,i){const{exact:s,status:r,predicate:o,mutationKey:c}=t;if(c){if(!i.options.mutationKey)return!1;if(s){if(Wi(i.options.mutationKey)!==Wi(c))return!1}else if(!Ia(i.options.mutationKey,c))return!1}return!(r&&i.state.status!==r||o&&!o(i))}function Pf(t,i){return(i?.queryKeyHashFn||Wi)(t)}function Wi(t){return JSON.stringify(t,(i,s)=>Tf(s)?Object.keys(s).sort().reduce((r,o)=>(r[o]=s[o],r),{}):s)}function Ia(t,i){if(t===i)return!0;if(typeof t!=typeof i)return!1;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(Array.isArray(t)&&Array.isArray(i)){for(let r=0;r<i.length;r++)if(!Ia(t[r],i[r]))return!1;return!0}const s=Object.keys(i);for(const r of s)if(!Ia(t[r],i[r]))return!1;return!0}return!1}const r_=Object.prototype.hasOwnProperty;function yv(t,i,s=0){if(t===i)return t;if(s>500)return i;const r=qg(t)&&qg(i);if(!r&&!(Tf(t)&&Tf(i)))return i;const o=(r?t:Object.keys(t)).length,c=r?i:Object.keys(i),d=c.length,h=r?new Array(d):{};let m=0;for(let p=0;p<d;p++){const v=r?p:c[p],g=t[v],x=i[v];if(g===x){h[v]=g,(r?p<o:r_.call(t,v))&&m++;continue}if(g===null||x===null||typeof g!="object"||typeof x!="object"){h[v]=x;continue}const S=yv(g,x,s+1);h[v]=S,S===g&&m++}return o===d&&m===o?t:h}function oo(t,i){if(!i||Object.keys(t).length!==Object.keys(i).length)return!1;for(const s in t)if(t[s]!==i[s])return!1;return!0}function qg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Tf(t){if(!Bg(t))return!1;const i=t.constructor;if(i===void 0)return!0;const s=i.prototype;return!(!Bg(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Bg(t){return Object.prototype.toString.call(t)==="[object Object]"}function l_(t){return new Promise(i=>{Pi.setTimeout(i,t)})}function jf(t,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,i):s.structuralSharing!==!1?yv(t,i):i}function o_(t,i,s=0){const r=[...t,i];return s&&r.length>s?r.slice(1):r}function u_(t,i,s=0){const r=[i,...t];return s&&r.length>s?r.slice(0,-1):r}const Xf=Symbol();function vv(t,i){return!t.queryFn&&i?.initialPromise?()=>i.initialPromise:!t.queryFn||t.queryFn===Xf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Jf(t,i){return typeof t=="function"?t(...i):!!t}function c_(t,i,s){let r=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=i(),r||(r=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),t}const uo=(()=>{let t=()=>a_;return{isServer(){return t()},setIsServer(i){t=i}}})();var as=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},f_=class extends as{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const If=new f_,d_=i_;function h_(){let t=[],i=0,s=h=>{h()},r=h=>{h()},o=d_;const c=h=>{i?t.push(h):o(()=>{s(h)})},d=()=>{const h=t;t=[],h.length&&o(()=>{r(()=>{h.forEach(m=>{s(m)})})})};return{batch:h=>{let m;i++;try{m=h()}finally{i--,i||d()}return m},batchCalls:h=>(...m)=>{c(()=>{h(...m)})},schedule:c,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{r=h},setScheduler:h=>{o=h}}}const it=h_();var m_=class extends as{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(i=>{i(t)}))}isOnline(){return this.#e}};const co=new m_;function p_(t){return Math.min(1e3*2**t,3e4)}function bv(t){return(t??"online")==="online"?co.isOnline():!0}var Nf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Sv(t){let i=!1,s=0,r,o="pending",c,d;const h=new Promise((q,G)=>{c=q,d=G});h.catch(vt);const m=()=>o!=="pending",p=q=>{if(!m()){const G=new Nf(q);O(G),t.onCancel?.(G)}},v=()=>{i=!0},g=()=>{i=!1},x=()=>If.isFocused()&&(t.networkMode==="always"||co.isOnline())&&t.canRun(),S=()=>bv(t.networkMode)&&t.canRun(),E=q=>{m()||(r?.(),o="resolved",c(q))},O=q=>{m()||(r?.(),o="rejected",d(q))},T=()=>new Promise(q=>{r=G=>{(m()||x())&&q(G)},t.onPause?.()}).then(()=>{r=void 0,m()||t.onContinue?.()}),R=()=>{if(m())return;let q;const G=s===0?t.initialPromise:void 0;try{q=G??t.fn()}catch(K){q=Promise.reject(K)}Promise.resolve(q).then(E).catch(K=>{if(m())return;const P=t.retry??(uo.isServer()?0:3),C=t.retryDelay??p_,N=typeof C=="function"?C(s,K):C,V=P===!0||typeof P=="number"&&s<P||typeof P=="function"&&P(s,K);if(i||!V){O(K);return}s++,t.onFail?.(s,K),l_(N).then(()=>x()?void 0:T()).then(()=>{i?O(K):R()})})};return{promise:h,status:()=>o,cancel:p,continue:()=>(r?.(),h),cancelRetry:v,continueRetry:g,canStart:S,start:()=>(S()?R():T().then(R),h)}}var xv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zf(this.gcTime)&&(this.#e=Pi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(uo.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Pi.clearTimeout(this.#e),this.#e=void 0)}};function g_(t){return{onFetch:(i,s)=>{const r=i.options,o=i.fetchOptions?.meta?.fetchMore?.direction,c=i.state.data?.pages||[],d=i.state.data?.pageParams||[];let h={pages:[],pageParams:[]},m=0;const p=async()=>{let v=!1;const g=E=>{c_(E,()=>i.signal,()=>v=!0)},x=vv(i.options,i.fetchOptions),S=async(E,O,T)=>{if(v)return Promise.reject(i.signal.reason);if(O==null&&E.pages.length)return Promise.resolve(E);const q=(()=>{const C={client:i.client,queryKey:i.queryKey,pageParam:O,direction:T?"backward":"forward",meta:i.options.meta};return g(C),C})(),G=await x(q),{maxPages:K}=i.options,P=T?u_:o_;return{pages:P(E.pages,G,K),pageParams:P(E.pageParams,O,K)}};if(o&&c.length){const E=o==="backward",O=E?y_:Hg,T={pages:c,pageParams:d};h=await S(T,O(r,T),E)}else{const E=t??c.length;do{const O=m===0?d[0]??r.initialPageParam:Hg(r,h);if(m>0&&O==null)break;h=await S(h,O),m++}while(m<E)}return h};i.options.persister?i.fetchFn=()=>i.options.persister?.(p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s):i.fetchFn=p}}}function Hg(t,{pages:i,pageParams:s}){const r=i.length-1;return i.length>0?t.getNextPageParam(i[r],i,s[r],s):void 0}function y_(t,{pages:i,pageParams:s}){return i.length>0?t.getPreviousPageParam?.(i[0],i,s[0],s):void 0}var v_=class extends xv{#e;#t;#n;#i;#s;#a;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#i=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Qg(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(t){if(this.options={...this.#r,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Qg(this.options);i.data!==void 0&&(this.setState($g(i.data,i.dataUpdatedAt)),this.#t=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#i.remove(this)}setData(t,i){const s=jf(this.state.data,t,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),s}setState(t){this.#l({type:"setState",state:t})}cancel(t){const i=this.#a?.promise;return this.#a?.cancel(t),i?i.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ht(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ln(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!gv(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const i=this.observers.indexOf(t);i!==-1&&(this.observers.splice(i,1),this.observers.length||(this.#a&&(this.#o||this.#u()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#i.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,i){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const s=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},o=()=>{const m=vv(this.options,i),v=(()=>{const g={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(g),g})();return this.#o=!1,this.options.persister?this.options.persister(m,v,this):m(v)},d=(()=>{const m={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return r(m),m})();(this.#e==="infinite"?g_(this.options.pages):this.options.behavior)?.onFetch(d,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta});const h=this.#a=Sv({initialPromise:i?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Nf&&m.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(m,p)=>{this.#l({type:"failed",failureCount:m,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await h.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#i.config.onSuccess?.(m,this),this.#i.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Nf){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#l({type:"error",error:m}),this.#i.config.onError?.(m,this),this.#i.config.onSettled?.(this.state.data,m,this),m}finally{this.#a===h&&(this.#a=void 0),this.scheduleGc()}}#l(t){const i=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,..._v(s.data,this.options),fetchMeta:t.meta??null};case"success":const r={...s,...$g(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const o=t.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=i(this.state),it.batch(()=>{this.observers.slice().forEach(s=>{s.onQueryUpdate()}),this.#i.notify({query:this,type:"updated",action:t})})}};function _v(t,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bv(i.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function $g(t,i){return{data:t,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Qg(t){const i=typeof t.initialData=="function"?t.initialData():t.initialData,s=i!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var b_=class extends as{#e;#t=void 0;#n=void 0;#i=void 0;#s;#a;#r;#o;#u;#l;#f;#d;#c;#m=new Set;constructor(t,i){super(),this.options=i,this.#e=t,this.#r=null,this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Gg(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Af(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Af(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const i=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ht(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),i._defaulted&&!oo(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Kg(this.#t,s,this.options,i)&&this.#h(),this.updateResult(),r&&(this.#t!==s||Ht(this.options.enabled,this.#t)!==Ht(i.enabled,this.#t)||Ln(this.options.staleTime,this.#t)!==Ln(i.staleTime,this.#t))&&this.#p();const o=this.#g();r&&(this.#t!==s||Ht(this.options.enabled,this.#t)!==Ht(i.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(t){const i=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(i,t);return x_(this,s)&&(this.#i=s,this.#a=this.options,this.#s=this.#t.state),s}getCurrentResult(){return this.#i}trackResult(t,i){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),i?.(r),Reflect.get(s,r))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,i);let r=()=>{},o;const c=new Promise(d=>{o=d,r=this.#e.getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===s.queryHash&&s.state.data!==void 0&&(r(),d(this.createResult(s,i)))})});return Promise.race([s.fetch().then(()=>{const d=this.createResult(s,i);return o?.(d),d}).finally(()=>{r()}),c])}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#h(t){this.#x();let i=this.#t.fetch(this.options,t);return t?.throwOnError||(i=i.catch(vt)),i}#p(){this.#b();const t=Ln(this.options.staleTime,this.#t);if(uo.isServer()||this.#i.isStale||!zf(t))return;const i=gv(this.#i.dataUpdatedAt,t)+1;this.#f=Pi.setTimeout(()=>{this.#i.isStale||this.updateResult()},i)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#S(),this.#c=t,!(uo.isServer()||Ht(this.options.enabled,this.#t)===!1||!zf(this.#c)||this.#c===0)&&(this.#d=Pi.setInterval(()=>{(this.options.refetchIntervalInBackground||If.isFocused())&&this.#h()},this.#c))}#v(){this.#p(),this.#y(this.#g())}#b(){this.#f!==void 0&&(Pi.clearTimeout(this.#f),this.#f=void 0)}#S(){this.#d!==void 0&&(Pi.clearInterval(this.#d),this.#d=void 0)}createResult(t,i){const s=this.#t,r=this.options,o=this.#i,c=this.#s,d=this.#a,h=t!==s?t.state:this.#n,{state:m}=t;let p={...m},v=!1,g;if(i._optimisticResults){const P=this.hasListeners(),C=!P&&Gg(t,i),N=P&&Kg(t,s,i,r);(C||N)&&(p={...p,..._v(m.data,t.options)}),i._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:E}=p;g=p.data;let O=!1;if(i.placeholderData!==void 0&&g===void 0&&E==="pending"){let P;o?.isPlaceholderData&&i.placeholderData===d?.placeholderData?(P=o.data,O=!0):P=typeof i.placeholderData=="function"?i.placeholderData(this.#l?.state.data,this.#l):i.placeholderData,P!==void 0&&(E="success",g=jf(o?.data,P,i),v=!0)}if(i.select&&g!==void 0&&!O)if(o&&g===c?.data&&i.select===this.#o)g=this.#u;else try{this.#o=i.select,g=i.select(g),g=jf(o?.data,g,i),this.#u=g,this.#r=null}catch(P){this.#r=P}else g===void 0&&(this.#r=null);this.#r&&(x=this.#r,g=this.#u,S=Date.now(),E="error",v=!1);const T=p.fetchStatus==="fetching",R=E==="pending",q=E==="error",G=R&&T,K=g!==void 0;return{status:E,fetchStatus:p.fetchStatus,isPending:R,isSuccess:E==="success",isError:q,isInitialLoading:G,isLoading:G,data:g,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:T,isRefetching:T&&!R,isLoadingError:q&&!K,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:q&&K,isStale:Wf(t,i),refetch:this.refetch,isEnabled:Ht(i.enabled,t)!==!1}}updateResult(){const t=this.#i,i=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#a=this.options,this.#s.data!==void 0&&(this.#l=this.#t),oo(i,t))return;this.#i=i;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const c=new Set(o??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#i).some(d=>{const h=d;return this.#i[h]!==t[h]&&c.has(h)})};this.#_({listeners:s()})}#x(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const i=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(i?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#_(t){it.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function S_(t,i){return Ht(i.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Ht(i.retryOnMount,t)===!1)}function Gg(t,i){return S_(t,i)||t.state.data!==void 0&&Af(t,i,i.refetchOnMount)}function Af(t,i,s){if(Ht(i.enabled,t)!==!1&&Ln(i.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&Wf(t,i)}return!1}function Kg(t,i,s,r){return(t!==i||Ht(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Wf(t,s)}function Wf(t,i){return Ht(i.enabled,t)!==!1&&t.isStaleByTime(Ln(i.staleTime,t))}function x_(t,i){return!oo(t.getCurrentResult(),i)}var __=class extends xv{#e;#t;#n;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Ev(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(i=>i!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const i=()=>{this.#s({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#i=Sv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(d,h)=>{this.#s({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#s({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),o=this.state.status==="pending",c=!r.canStart();try{if(o)i();else{this.#s({type:"pending",variables:t,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,s);const h=await this.options.onMutate?.(t,s);h!==this.state.context&&this.#s({type:"pending",context:h,variables:t,isPaused:c})}const d=await r.start();return await this.#n.config.onSuccess?.(d,t,this.state.context,this,s),await this.options.onSuccess?.(d,t,this.state.context,s),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(d,null,t,this.state.context,s),this.#s({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onError?.(d,t,this.state.context,s)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,s)}catch(h){Promise.reject(h)}throw this.#s({type:"error",error:d}),d}finally{this.#i===r&&(this.#i=void 0),this.#n.runNext(this)}}#s(t){const i=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),it.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Ev(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var E_=class extends as{#e;#t;#n;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}build(t,i,s){const r=new __({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(i),state:s});return this.add(r),r}add(t){this.#e.add(t);const i=Bl(t);if(typeof i=="string"){const s=this.#t.get(i);s?s.push(t):this.#t.set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const i=Bl(t);if(typeof i=="string"){const s=this.#t.get(i);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&this.#t.delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=Bl(t);if(typeof i=="string"){const s=this.#t.get(i)?.find(r=>r.state.status==="pending");return!s||s===t}else return!0}runNext(t){const i=Bl(t);return typeof i=="string"?this.#t.get(i)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){it.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const i={exact:!0,...t};return this.getAll().find(s=>Zg(i,s))}findAll(t={}){return this.getAll().filter(i=>Zg(t,i))}notify(t){it.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return it.batch(()=>Promise.all(t.map(i=>i.continue().catch(vt))))}};function Bl(t){return t.options.scope?.id}var O_=class extends as{#e;#t=void 0;#n;#i;constructor(i,s){super(),this.#e=i,this.setOptions(s),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){const s=this.options;this.options=this.#e.defaultMutationOptions(i),oo(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Wi(s.mutationKey)!==Wi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#s())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(i){this.#s(),this.#a(i)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#a()}mutate(i,s){return this.#i=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(i)}#s(){const i=this.#n?.state??Ev();this.#t={...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset}}#a(i){it.batch(()=>{if(this.#i&&this.hasListeners()){const s=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(i?.type==="success"){try{this.#i.onSuccess?.(i.data,s,r,o)}catch(c){Promise.reject(c)}try{this.#i.onSettled?.(i.data,null,s,r,o)}catch(c){Promise.reject(c)}}else if(i?.type==="error"){try{this.#i.onError?.(i.error,s,r,o)}catch(c){Promise.reject(c)}try{this.#i.onSettled?.(void 0,i.error,s,r,o)}catch(c){Promise.reject(c)}}}this.listeners.forEach(s=>{s(this.#t)})})}},w_=class extends as{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,i,s){const r=i.queryKey,o=i.queryHash??Pf(r,i);let c=this.get(o);return c||(c=new v_({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(i),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(c)),c}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=this.#e.get(t.queryHash);i&&(t.destroy(),i===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){it.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const i={exact:!0,...t};return this.getAll().find(s=>Lg(i,s))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(s=>Lg(t,s)):i}notify(t){it.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){it.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},z_=class{#e;#t;#n;#i;#s;#a;#r;#o;constructor(t={}){this.#e=t.queryCache||new w_,this.#t=t.mutationCache||new E_,this.#n=t.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#r=If.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=co.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#r?.(),this.#r=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const i=this.defaultQueryOptions({queryKey:t});return this.#e.get(i.queryHash)?.state.data}ensureQueryData(t){const i=this.defaultQueryOptions(t),s=this.#e.build(this,i),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Ln(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:i,state:s})=>[i,s.data])}setQueryData(t,i,s){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,c=s_(i,o);if(c!==void 0)return this.#e.build(this,r).setData(c,{...s,manual:!0})}setQueriesData(t,i,s){return it.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,i,s)]))}getQueryState(t){const i=this.defaultQueryOptions({queryKey:t});return this.#e.get(i.queryHash)?.state}removeQueries(t){const i=this.#e;it.batch(()=>{i.findAll(t).forEach(s=>{i.remove(s)})})}resetQueries(t,i){const s=this.#e;return it.batch(()=>{const r=s.findAll(t),o=new Set(r);return r.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>o.has(c)},i)})}cancelQueries(t,i={}){const s={revert:!0,...i},r=it.batch(()=>this.#e.findAll(t).map(o=>o.cancel(s)));return Promise.all(r).then(vt).catch(vt)}invalidateQueries(t,i={}){return it.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},i)))}refetchQueries(t,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},r=it.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,s);return s.throwOnError||(c=c.catch(vt)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(vt)}async query(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i),r=s.isStaleByTime(Ln(i.staleTime,s))?await s.fetch(i):s.state.data,o=i.select;return o?o(r):r}fetchQuery(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i);return s.isStaleByTime(Ln(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(vt).catch(vt)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(vt).catch(vt)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return co.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,i){this.#i.set(Wi(t),{queryKey:t,defaultOptions:i})}getQueryDefaults(t){const i=[...this.#i.values()],s={};return i.forEach(r=>{Ia(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,i){this.#s.set(Wi(t),{mutationKey:t,defaultOptions:i})}getMutationDefaults(t){const i=[...this.#s.values()],s={};return i.forEach(r=>{Ia(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const i={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return i.queryHash||(i.queryHash=Pf(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Xf&&(i.enabled=!1),i}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const Ov=X.createContext(!1),T_=()=>X.useContext(Ov);Ov.Provider;function j_(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const N_=X.createContext(j_()),A_=()=>X.useContext(N_),R_=(t,i,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?Jf(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||r)&&(i.isReset()||(t.retryOnMount=!1))},C_=t=>{X.useEffect(()=>{t.clearReset()},[t])},M_=({result:t,errorResetBoundary:i,throwOnError:s,query:r,suspense:o})=>t.isError&&!i.isReset()&&!t.isFetching&&r&&(o&&t.data===void 0||Jf(s,[t.error,r])),D_=t=>{if(t.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...o)=>s(r(...o)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},k_=(t,i)=>t?.suspense&&i.isPending,U_=(t,i,s)=>i.fetchOptimistic(t).catch(()=>{s.clearReset()});function L_(t,i,s){const r=T_(),o=A_(),c=wi(),d=c.defaultQueryOptions(t),h=c.getQueryCache().get(d.queryHash),m=t.subscribed!==!1;d._optimisticResults=r?"isRestoring":m?"optimistic":void 0,D_(d),R_(d,o,h),C_(o);const[p]=X.useState(()=>new i(c,d)),v=p.getOptimisticResult(d),g=!r&&m;if(X.useSyncExternalStore(X.useCallback(x=>{const S=g?p.subscribe(it.batchCalls(x)):vt;return p.updateResult(),S},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),X.useEffect(()=>{p.setOptions(d)},[d,p]),k_(d,v))throw U_(d,p,o);if(M_({result:v,errorResetBoundary:o,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw v.error;return d.notifyOnChangeProps?v:p.trackResult(v)}function Hn(t,i){return L_(t,b_)}function ss(t,i){const s=wi(),[r]=X.useState(()=>new O_(s,t));X.useEffect(()=>{r.setOptions(t)},[r,t]);const o=X.useSyncExternalStore(X.useCallback(d=>r.subscribe(it.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=X.useCallback((...d)=>{r.mutate(d[0],d[1]).catch(vt)},[r]);if(o.error&&Jf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}const Yg=!1;var wv=X.useLayoutEffect;function bi(t){return t[t.length-1]}function zv(t,i){return typeof t=="function"?t(i):t}const ed=Object.prototype.hasOwnProperty;function Tv(t){for(const i in t)if(ed.call(t,i))return!0;return!1}const to=()=>Object.create(null),Ga=(t,i)=>yi(t,i,!0);function yi(t,i,s,r=0){if(t===i)return t;if(r++>500)return i;const o=Array.isArray(t)&&Array.isArray(i);if(!o&&!(fo(t)&&fo(i)))return i;const c=Object.keys(t),d=c.length,h=Object.keys(i),m=h.length;if(o?d!==t.length||m!==i.length||d&&bi(c)!==`${d-1}`||m&&bi(h)!==`${m-1}`:d!==Object.getOwnPropertyNames(t).length||m!==Object.getOwnPropertyNames(i).length||Object.getOwnPropertySymbols(i).length)return i;let p=0,v,g,x;if(o){for(;p<m&&(x=p,g=t[x],v=i[x],v=g===v?g:typeof g=="object"?yi(g,v,s,r):v,v===g);p++);if(p===m&&d===m)return t}else{let E=d===m,O=!0;for(;p<m;p++){x=h[p],g=t[x];const T=i[x];v=g===T?g:typeof g=="object"?yi(g,T,s,r):T,E&&=v===g&&(c[p]===x||ed.call(t,x)),O&&=Object.is(v,T),c[p]=v}if(E)return Object.getOwnPropertySymbols(t).length?i:t;if(O)return i}const S=o?h.fill(0):s?to():{};for(let E=0;E<m;E++)x=o?E:h[E],o?(g=t[x],E>p&&(v=i[x],v=g===v?g:typeof g=="object"?yi(g,v,s,r):v),S[x]=E<p?g:v):S[x]=c[E];return S}function fo(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function Zn(t,i,s,r){if(t===i)return!0;if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return!1;for(let o=0,c=t.length;o<c;o++){const d=t[o],h=i[o];if(d!==h&&!Zn(d,h,s,r))return!1}return!0}if(fo(t)&&fo(i)){if(s){for(const c in i)if((r||i[c]!==void 0)&&!Zn(t[c],i[c],s,r))return!1;return!0}let o=0;if(r)o=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&o++;for(const c in i)if((r||i[c]!==void 0)&&(o--===0||!Zn(t[c],i[c],s,r)))return!1;return o===0}return!1}const Z_=/[\x00-\x1f\x7f"<>`{}]/g;function q_(t){return t.replace(Z_,i=>"%"+i.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Vg(t){let i;try{i=decodeURI(t)}catch{i=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return q_(i)}const B_=["http:","https:","mailto:","tel:"];function hr(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const jv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Nv(t,i){if(!t)return!1;if(jv.test(t))return!0;const s=hr(t);return s?!i.has(s):!1}function ir(t){if(!t)return t;let i=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const s=/%25|%5C/gi;let r=0,o;for(i="";(o=s.exec(t))!==null;)i+=Vg(t.slice(r,o.index))+o[0],r=s.lastIndex;i+=Vg(r?t.slice(r):t)}return i}function H_(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function $_(t,i){if(t===i)return!0;if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==i[s])return!1;return!0}function td(){throw new Error("Invariant failed")}function Fa(t){return t.replace(/\/{2,}/g,"/")}function Av(t){return t==="/"?t:t.replace(/^\/+/,"")}function hn(t){const i=t.length;return i>1&&t[i-1]==="/"?t.replace(/\/+$/,""):t}function Rv(t){return hn(Av(t))}function Fg(t,i){return t?.endsWith("/")&&t!=="/"&&t!==`${i}/`?t.slice(0,-1):t}function Pg(t,i,s="never",r){if(i.includes("//")&&(i=Fa(i)),i.startsWith("/"))return i.length===1||s==="preserve"?i:s==="always"?i.endsWith("/")?i:`${i}/`:i.endsWith("/")?i.slice(0,-1):i;const o=i===".";let c;if(r){c=o?t:t+"\0"+i;const p=r.get(c);if(p)return p}let d;if(o)d=t.split("/");else{for(t.includes("//")&&(t=Fa(t)),d=t.split("/");d.length>1&&bi(d)==="";)d.pop();const p=i.split("/");for(let v=0,g=p.length;v<g;v++){const x=p[v];x===""?v?v===g-1&&d.push(x):d=[x]:x===".."?d.length>1?d.pop():d=[""]:x==="."||d.push(x)}}d.length>1&&(bi(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));const h=d.join("/"),m=(o?Fa(h):h)||"/";return c&&r&&r.set(c,m),m}function Q_(t){const i=new Map(t.map(r=>[encodeURIComponent(r),r])),s=new RegExp([...i.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return r=>r.replace(s,o=>i.get(o)??o)}function G_(t){return t==null||t===""}function K_(t,i,s){if(typeof i!="string")return""+(i??void 0);const r=t==="_splat";if(r&&(!i||/^[a-zA-Z0-9\-._~!/]*$/.test(i)))return i;let o=encodeURIComponent(i);return r&&(o=o.replaceAll("%2F","/")),s?s(o):o}function Xg(t,i,s,r,o){const c=t.endsWith("/")?"/":"";let d="";for(const h of i){if(typeof h=="string"){d+=h;continue}const[m,p,v,g]=h,x=m===2,S=x&&g!==void 0?g+c:g;let E=s[p];if(!(m===3&&E==null)){if(o&&(o[p]=E,x&&(o["*"]=E)),x&&G_(E)){if(v==="/"&&!S)continue;E=""}d+=v+K_(p,E,r)+(S||"")}}return d+c||"/"}function Wa(t){return t?.isNotFound===!0}function Y_(){try{return sessionStorage}catch{return}}const V_="tsr-scroll-restoration-v1_3",Cv=Y_();function F_(){try{return JSON.parse(Cv?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Ka=F_(),Jg="data-scroll-restoration-id",P_=t=>t.state.__TSR_key||t.href;function X_(t){const i=t.getAttribute(Jg);if(i)return`[${Jg}="${i}"]`;let s="",r=t,o;for(;o=r.parentNode;){let c=1,d=r;for(;d=d.previousElementSibling;)c++;const h=`${r.localName}:nth-child(${c})`;s=s?`${h} > ${s}`:h,r=o}return s}let Hl=!1;const no="window";function Rf(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function Ig(t){const i=new Set;for(const s of t){if(s===no)continue;const r=Rf(s);r&&i.add(r)}return i}function J_(t,i){const s=t.options.scrollRestoration,r=t._scroll;s&&(r.e=!0);const o=t.options.getScrollRestorationKey||P_,c=new Set,d=h=>{const m=Ka[h]||={};for(const p of c)p===document?m[no]={scrollX,scrollY}:p.isConnected&&(m[X_(p)]={scrollX:p.scrollLeft,scrollY:p.scrollTop})};s&&!r.s&&(r.s=!0,Hl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{Hl||c.add(h.target)},!0),t.subscribe("onBeforeLoad",h=>{h.fromLocation&&d(o(h.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",d(o(t.stores.resolvedLocation.get()??t.stores.location.get()));try{Cv?.setItem(V_,JSON.stringify(Ka))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!r.r&&(r.r=!0,t.subscribe("onRendered",h=>{const m=t.options.scrollRestorationBehavior,p=t.options.scrollToTopSelectors,v=r.n,g=r.h;let x;if(c.clear(),r.n=!0,r.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const S=o(h.toLocation),E=h.fromLocation&&o(h.fromLocation);if(r.e&&E&&E!==S){const O=Ka[E];if(O){let T=Ka[S];for(const R in O){if(R===no){if(v)continue}else{const q=Rf(R);if(!q||v&&p&&(x??=Ig(p),x.has(q)))continue}T||(T=Ka[S]={}),T[R]??=O[R]}}}Hl=!0;try{const O=h.toLocation.hash,T=h.toLocation.state.__hashScrollIntoViewOptions??!0;let R=!1;if(v){!O&&p&&(x??=Ig(p));const q=O&&T&&g,G=r.e?Ka[S]:void 0;if(G)for(const K in G){const{scrollX:P,scrollY:C}=G[K];if(K===no){if(q)continue;scrollTo({top:C,left:P,behavior:m}),R=!0}else{const N=Rf(K);N&&(N.scrollLeft=P,N.scrollTop=C,x?.delete(N))}}if(!O){const K={top:0,left:0,behavior:m};if(R||scrollTo(K),x)for(const P of x)P.scrollTo(K)}}!R&&O&&T&&document.getElementById(O)?.scrollIntoView(T)}finally{Hl=!1}}))}function I_(t,i=String){let s;for(const r in t){const o=t[r];o!==void 0&&(s||=new URLSearchParams).set(r,i(o))}return s?s.toString():""}function lf(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function W_(t){const i=new URLSearchParams(t),s=Object.create(null);for(const[r,o]of i.entries()){const c=s[r];c==null?s[r]=lf(o):Array.isArray(c)?c.push(lf(o)):s[r]=[c,lf(o)]}return s}const Mv=/^(?:\s|["[{\d-]|fa|nu|tr)/,e1=n1(JSON.parse),t1=i1(JSON.stringify,JSON.parse);function n1(t){const i=t===JSON.parse;return s=>{s[0]==="?"&&(s=s.slice(1));const r=W_(s);for(const o in r){const c=r[o];if(typeof c=="string"){if(i&&!Mv.test(c))continue;try{r[o]=t(c)}catch{}}}return r}}function i1(t,i){const s=i===JSON.parse;function r(o){if(o&&typeof o=="object")try{return t(o)}catch{}else if(i&&typeof o=="string"){if(s&&!Mv.test(o))return o;try{return i(o),t(o)}catch{}}return o}return o=>{const c=I_(o,r);return c?`?${c}`:""}}const Pa="__root__";function a1(t){t.statusCode=t.statusCode||t.code||307;const i=new Headers(t.headers);t.href&&i.get("Location")===null&&i.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:i});if(s.options=t,t.throw)throw s;return s}function Dv(t){return t instanceof Response&&!!t.options}function ho(t){const i=new Map;let s,r;return{get(o){const c=i.get(o);if(c)return c.visited=!0,c.value},set(o,c){const d=i.get(o);if(d){d.value=c;return}if(i.size>=t){let m=s?.next().value;for(;!m||m.visited;)m?m.visited=!1:s=i.values(),m=s.next().value;m===r&&(s=void 0),i.delete(m.key)}const h={key:o,value:c,visited:!1};r=h,i.set(o,h)},clear(){i.clear(),s=void 0,r=void 0}}}const gi=4,kv=5;function s1(t){const i=t.names;if(i)return i;const s=[];for(const r of t)typeof r!="string"&&s.push(r[1]);return t.names=s}function r1(t,i,s){const r=t.slice(i,s);if(r.charCodeAt(0)===36)return r.length===1?[2,"_splat","",void 0]:[1,r.slice(1),"",""];const o=r.indexOf("{");if(o>=0){const c=r.indexOf("}",o),d=r.charCodeAt(o+1)===45,h=o+(d?3:2);if(c>=0&&r.charCodeAt(h-1)===36&&(!d||h<c)){const m=r.slice(h,c);return[d?3:m?1:2,m||"_splat",r.slice(0,o),t.slice(i+c+1,m?s:t.length)]}}return r}function mr(t,i,s,r,o,c){let d=s;const h=i.fullPath??i.from,m=i.options,p=h.length,v=h.endsWith("/")?p-1:p,g=m?.caseSensitive??t,x=m?.params?.parse??m?.parseParams;let S,E=c?s-1:0;if(!r||h.includes("$")){S=c?.slice()??[];const R=bi(S);R&&typeof R!="string"&&R[0]===2&&(S[S.length-1]=[R[0],R[1],R[2],R[3]===void 0?void 0:R[3]+h.substring(s-(h[s-2]==="/"?2:1),v)],E=p)}for(;d<p;){const R=d,q=h.indexOf("/",R);let G=q===-1?p:q;const K=r1(h,R,G);d=G+1;let P;if(typeof K=="string"){if(!r)continue;let C=K,N;g?N=r.static??=new Map:(C=K.toLowerCase(),N=r.staticInsensitive??=new Map);const V=N.get(C);if(V)P=V;else{const se=Xi(r);P=se,N.set(C,se)}}else{const C=K[0];let N=K[2],V=K[3]??"";if(C===2&&(G=p,d=G+1),S&&E<G&&(E<R-1&&S.push(h.slice(E,R-1)),K[2]="/"+N,C===2&&K[3]!==void 0&&v<p&&(K[3]=V.slice(0,-1)),S.push(K),E=G),!r)continue;const se=g&&!!(N||V);g||(N=N.toLowerCase(),V=V.toLowerCase());const le=C===1?r.dynamic??=[]:C===3?r.optional??=[]:r.wildcard??=[],ue=C!==2&&!x&&le.find(ne=>!ne.parse&&ne.caseSensitive===se&&ne.prefix===N&&ne.suffix===V);if(ue)P=ue;else{const ne=Xi(r,C,se,N,V);P=ne,le.push(ne),le.length===2&&o?.push(le)}}r=P}S&&E<v&&S.push(h.slice(E,v));const O=S?.slice();if(!r)return O;if(x&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const R=Xi(r,kv);(r.pathless??=[]).push(R),r=R}const T=(i.path||!i.children)&&!i.isRoot;if(T&&v<p){const R=Xi(r,gi);r.index=R,r=R}return r.parse=x??null,r.priority=m?.params?.priority??0,r.route||(r.data=O,T&&(r.route=i)),[r,d,O]}function Uv(t,i){if(t.parse&&!i.parse)return-1;if(!t.parse&&i.parse)return 1;if(t.parse&&i.parse&&(t.priority||i.priority))return i.priority-t.priority;if(t.prefix&&i.prefix&&t.prefix!==i.prefix){if(t.prefix.startsWith(i.prefix))return-1;if(i.prefix.startsWith(t.prefix))return 1}if(t.suffix&&i.suffix&&t.suffix!==i.suffix){if(t.suffix.endsWith(i.suffix))return-1;if(i.suffix.endsWith(t.suffix))return 1}return t.prefix&&!i.prefix?-1:!t.prefix&&i.prefix?1:t.suffix&&!i.suffix?-1:!t.suffix&&i.suffix?1:t.caseSensitive&&!i.caseSensitive?-1:!t.caseSensitive&&i.caseSensitive?1:0}function Xi(t,i=0,s,r,o){return{kind:i,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:s,prefix:r,suffix:o}}function l1(t,i){const s=Xi(),r=[];function o(c,d,h,m){const[p,v,g]=mr(!1,c,d,h,r,m);if(c.children)for(const x of c.children)o(x,v,p,g)}for(const c of t)o(c,1,s);for(const c of r)c.sort(Uv);i.masksTree=s,i.flatCache=ho(1e3)}function o1(t,i){t||="/";const s=i.flatCache.get(t);if(s!==void 0)return s;const r=nd(t,i.masksTree);return i.flatCache.set(t,r),r}function u1(t,i,s,r,o){t||="/",r||="/";const c=i?`case\0${t}`:t;let d=o.singleCache.get(c);return d||(d=Xi(),mr(i,{from:t},1,d),o.singleCache.set(c,d)),nd(r,d,s)}function c1(t,i,s=!1){const r=s?t:`nofuzz\0${t}`,o=i.matchCache.get(r);if(o!==void 0)return o;t||="/";let c;try{c=nd(t,i.segmentTree,s)}catch(d){if(d instanceof URIError)c=null;else throw d}return c&&(c.branch=Zv(c.route)),i.matchCache.set(r,c),c}function f1(t,i=!1){const s=Xi(),r=[],o={},c={};let d=0;function h(m,p,v,g){if(m.init(d),m.id in o&&td(),o[m.id]=m,d!==0&&m.path){const O=hn(m.fullPath);(!c[O]||m.fullPath.endsWith("/"))&&(c[O]=m)}d++;const[x,S,E]=mr(i,m,p,v,r,g);if(m._interpolation=E,m.children)for(const O of m.children)h(O,S,x,E)}h(t,1,s);for(const m of r)m.sort(Uv);return{processedTree:{segmentTree:s,singleCache:ho(1e3),matchCache:ho(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function nd(t,i,s=!1){const r=t.split("/"),o=h1(t,r,i,s);if(!o)return null;const[c]=Lv(t,r,o);return{route:o.node.route,rawParams:c}}function Lv(t,i,s){const r=d1(s.node),o=s.node.data&&s1(s.node.data),c=Object.create(null);let d=s.extract?.part??0,h=s.extract?.node??0,m=s.extract?.path??0,p=s.extract?.param??0;for(;h<r.length;d++,h++,m++){const v=r[h];if(v.kind===gi)break;if(v.kind===kv){d--,m--;continue}const g=i[d],x=m;if(g&&(m+=g.length),v.kind===1||v.kind===3){const S=o[p++];if(v.kind===3&&s.skipped&1<<h){d--,m=x-1;continue}const E=v.suffix||v.prefix?g.substring(v.prefix.length,g.length-v.suffix.length):g;(E||v.kind===1)&&(c[S]=decodeURIComponent(E))}else if(v.kind===2){const S=v,E=t.substring(x+S.prefix.length,t.length-S.suffix.length),O=decodeURIComponent(E);c["*"]=O,c._splat=O;break}}return s.rawParams&&Object.assign(c,s.rawParams),[c,{part:d,node:h,path:m,param:p}]}function Zv(t){const i=[t];for(;t.parentRoute;)t=t.parentRoute,i.push(t);return i.reverse(),i}function d1(t){const i=Array(t.depth+1);do i[t.depth]=t,t=t.parent;while(t);return i}function h1(t,i,s,r){if(t==="/"&&s.index)return{node:s.index,skipped:0};const o=!bi(i),c=o&&t!=="/",d=i.length-(o?1:0),h=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let m=null,p=null;for(;h.length;){const v=h.pop(),{node:g,index:x,skipped:S,statics:E,dynamics:O,optionals:T}=v;let{extract:R,rawParams:q}=v;if(g.kind===2&&g.route&&!Ql(p,v))continue;if(g.parse){if(!Wg(t,i,v))continue;q=v.rawParams,R=v.extract}r&&g.route&&g.kind!==gi&&Ql(m,v)&&(m=v);const G=x===d;if(G&&(g.route&&(!c||g.kind===gi||g.kind===2)&&Ql(p,v)&&(p=v),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const K=G?void 0:i[x];let P;if(G&&g.index){const C={node:g.index,index:x,skipped:S,statics:E,dynamics:O,optionals:T,extract:R,rawParams:q};let N=!0;if(g.index.parse&&(Wg(t,i,C)||(N=!1)),N){if(!O&&!T&&!S&&m1(E,d))return C;Ql(p,C)&&(p=C)}}if(g.wildcard)for(let C=g.wildcard.length-1;C>=0;C--){const N=g.wildcard[C],{prefix:V,suffix:se}=N;if(!(V&&(G||!(N.caseSensitive?K:P??=K.toLowerCase()).startsWith(V)))){if(se){if(G)continue;const le=i.slice(x).join("/"),ue=le.slice(-se.length);if((N.caseSensitive?ue:ue.toLowerCase())!==se||le.length-se.length<V.length)continue}h.push({node:N,index:d,skipped:S,statics:E,dynamics:O,optionals:T,extract:R,rawParams:q})}}if(g.optional){const C=S|1<<g.depth+1;for(let N=g.optional.length-1;N>=0;N--){const V=g.optional[N];h.push({node:V,index:x,skipped:C,statics:E,dynamics:O,optionals:T,extract:R,rawParams:q})}if(!G)for(let N=g.optional.length-1;N>=0;N--){const V=g.optional[N],{prefix:se,suffix:le}=V;if(se||le){const ue=V.caseSensitive?K:P??=K.toLowerCase();if(se&&!ue.startsWith(se)||le&&ue.indexOf(le,ue.length-le.length)<se.length)continue}h.push({node:V,index:x+1,skipped:S,statics:E,dynamics:O,optionals:T+$l(d,x),extract:R,rawParams:q})}}if(!G&&g.dynamic&&K)for(let C=g.dynamic.length-1;C>=0;C--){const N=g.dynamic[C],{prefix:V,suffix:se}=N;if(V||se){const le=N.caseSensitive?K:P??=K.toLowerCase();if(V&&!le.startsWith(V)||se&&le.indexOf(se,le.length-se.length)<V.length)continue}h.push({node:N,index:x+1,skipped:S,statics:E,dynamics:O+$l(d,x),optionals:T,extract:R,rawParams:q})}if(!G&&g.staticInsensitive){const C=g.staticInsensitive.get(P??=K.toLowerCase());C&&h.push({node:C,index:x+1,skipped:S,statics:E+$l(d,x),dynamics:O,optionals:T,extract:R,rawParams:q})}if(!G&&g.static){const C=g.static.get(K);C&&h.push({node:C,index:x+1,skipped:S,statics:E+$l(d,x),dynamics:O,optionals:T,extract:R,rawParams:q})}if(g.pathless)for(let C=g.pathless.length-1;C>=0;C--){const N=g.pathless[C];h.push({node:N,index:x,skipped:S,statics:E,dynamics:O,optionals:T,extract:R,rawParams:q})}}if(p)return p;if(r&&m){let v=m.index;for(let x=0;x<m.index;x++)v+=i[x].length;const g=v===t.length?"/":t.slice(v);return m.rawParams??=Object.create(null),m.rawParams["**"]=decodeURIComponent(g),m}return null}function $l(t,i){return 2**(t-i-1)}function m1(t,i){return t===2**(i-1)-1}function Wg(t,i,s){let r,o;try{[r,o]=Lv(t,i,s)}catch{return null}if(s.rawParams=r,s.extract=o,!s.node.parse)return!0;try{if(s.node.parse(r)===!1)return null}catch{}return!0}function Ql(t,i){return t?i.statics>t.statics||i.statics===t.statics&&(i.dynamics>t.dynamics||i.dynamics===t.dynamics&&(i.optionals>t.optionals||i.optionals===t.optionals&&((i.node.kind===gi)>(t.node.kind===gi)||i.node.kind===gi==(t.node.kind===gi)&&i.node.depth>t.node.depth))):!0}function p1(t,i,s){const r=Rv(t),o=`/${r}`,c=i?o:o.toLowerCase(),d=`${c}/`,h={input:({url:m})=>{const p=i?m.pathname:m.pathname.toLowerCase();return p===c?m.pathname="/":p.startsWith(d)&&(m.pathname=m.pathname.slice(o.length)),m},output:({url:m})=>(m.pathname=Fa(`/${r}${m.pathname}`),m)};return s?{input:({url:m})=>Cf(s,h.input({url:m})),output:({url:m})=>h.output({url:qv(s,m)})}:h}function Cf(t,i){const s=t?.input?.({url:i});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return i}function qv(t,i){const s=t?.output?.({url:i});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return i}function g1(t,i){const{createMutableStore:s,createReadonlyStore:r,batch:o}=i,c=new Map,d=s("idle"),h=s(t),m=s(void 0),p=s([]),v=r(()=>p.get().map(O=>c.get(O).get())),g=r(()=>({status:d.get(),isLoading:d.get()==="pending",matches:v.get(),location:h.get(),resolvedLocation:m.get()}));function x(O){let T=c.get(O);return T||(T=s(void 0),c.set(O,T)),T}const S={status:d,location:h,resolvedLocation:m,ids:p,matches:v,byRoute:c,__store:g,getMatchStore:x,setMatches:E};function E(O){const T=p.get(),R=O.map(q=>q.routeId);o(()=>{$_(T,R)||p.set(R);for(const q of T)R.includes(q)||c.get(q).set(()=>{});for(const q of O){const G=x(q.routeId);G.get()!==q&&G.set(q)}})}return S}var vi="__TSR_index",ey="popstate",ty="beforeunload",y1=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function io(t){const i=y1.exec(t);return i?"/"+t.slice(i[0].length):t}function Bv(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,i=>`
10
- \r`.includes(i)?"":encodeURIComponent(i))),io(t)}function v1(t){let i=t.getLocation();const s=new Set,r=d=>{i=t.getLocation(),s.forEach(h=>h({location:i,action:d}))},o=d=>{t.notifyOnIndexChange??!0?r(d):i=t.getLocation()},c=async d=>{const h=d.navigateOpts?.ignoreBlocker?void 0:t.getBlockers?.();if(typeof document<"u"&&h?.length&&(d.type==="PUSH"||d.type==="REPLACE"))for(const m of h){const p=mo(d.path,d.state);if(await m.blockerFn({currentLocation:i,nextLocation:p,action:d.type})){t.onBlocked?.();return}}d.task()};return{get location(){return i},get length(){return t.getLength()},subscribers:s,subscribe:d=>(s.add(d),()=>{s.delete(d)}),push:(d,h,m)=>{const p=i.state[vi];h=ny(p+1,h),c({task:()=>{t.pushState(d,h),r({type:"PUSH"})},navigateOpts:m,type:"PUSH",path:d,state:h})},replace:(d,h,m)=>{const p=i.state[vi];h=ny(p,h),c({task:()=>{t.replaceState(d,h),r({type:"REPLACE"})},navigateOpts:m,type:"REPLACE",path:d,state:h})},go:(d,h)=>{c({task:()=>{t.go(d,h?.ignoreBlocker??!1),o({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{c({task:()=>{t.back(d?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{c({task:()=>{t.forward(d?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>i.state[vi]!==0,createHref:d=>t.createHref(d),block:d=>{if(!t.setBlockers)return()=>{};const h=t.getBlockers?.()??[];return t.setBlockers([...h,d]),()=>{const m=t.getBlockers?.()??[];t.setBlockers?.(m.filter(p=>p!==d))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r,_getBlockers:()=>t.getBlockers?.()??[]}}function ny(t,i){const s=id();return{...i,key:s,__TSR_key:s,[vi]:t}}function b1(t){const i=typeof document<"u"?window:void 0,s=i.history.pushState,r=i.history.replaceState;let o=[];const c=()=>o,d=N=>o=N,h=N=>Bv(N),m=(()=>mo(`${i.location.pathname}${i.location.search}${i.location.hash}`,i.history.state));if(!i.history.state?.__TSR_key&&!i.history.state?.key){const N=id();i.history.replaceState({[vi]:0,key:N,__TSR_key:N},"")}let p=m(),v,g=!1,x=!1,S=!1,E=!1;const O=()=>p;let T;const R=()=>{T&&(C._ignoreSubscribers=!0,(T[2]?i.history.pushState:i.history.replaceState)(T[1],"",T[0]),C._ignoreSubscribers=!1,T=void 0,v=void 0)},q=(N,V,se)=>{const le=!!T;le||(v=p),p=mo(V,se),T=[p.href,se,T?.[2]||N],le||queueMicrotask(()=>R())},G=N=>{p=m(),C.notify({type:N})},K=async()=>{if(E=!1,x){x=!1;return}const N=m(),V=N.state[vi]-p.state[vi],se=V===1,le=V===-1,ue=!se&&!le||g;g=!1;const ne=ue?"GO":le?"BACK":"FORWARD",he=ue?{type:"GO",index:V}:{type:le?"BACK":"FORWARD"};if(S)S=!1;else{const ye=c();if(typeof document<"u"&&ye.length){for(const de of ye)if(await de.blockerFn({currentLocation:p,nextLocation:N,action:ne})){x=!0,i.history.go(-V),C.notify(he);return}}}p=m(),C.notify(he)},P=N=>{if(E){E=!1;return}let V=!1;const se=c();if(typeof document<"u"&&se.length)for(const le of se){const ue=le.enableBeforeUnload??!0;if(ue===!0){V=!0;break}if(typeof ue=="function"&&ue()===!0){V=!0;break}}if(V)return N.preventDefault(),N.returnValue=""},C=v1({getLocation:O,getLength:()=>i.history.length,pushState:(N,V)=>q(!0,N,V),replaceState:(N,V)=>q(!1,N,V),back:N=>(N&&(S=!0,E=!0),i.history.back()),forward:N=>{N&&(S=!0,E=!0),i.history.forward()},go:(N,V)=>{g=!0,V&&(S=!0,E=!0),i.history.go(N)},createHref:h,flush:R,destroy:()=>{i.history.pushState=s,i.history.replaceState=r,i.removeEventListener(ty,P,{capture:!0}),i.removeEventListener(ey,K)},onBlocked:()=>{v&&p!==v&&(p=v)},getBlockers:c,setBlockers:d,notifyOnIndexChange:!1});return C._ignoreNextBeforeUnload=N=>{E=!1;try{N=new URL(N,i.document.baseURI).href,E=/^https?:/.test(N)&&(!N.includes("#")||N.split("#")[0]!==i.location.href.split("#")[0])}catch{}},i.addEventListener(ty,P,{capture:!0}),i.addEventListener(ey,K),i.history.pushState=function(...N){const V=s.apply(i.history,N);return C._ignoreSubscribers||G("PUSH"),V},i.history.replaceState=function(...N){const V=r.apply(i.history,N);return C._ignoreSubscribers||G("REPLACE"),V},C}function mo(t,i){const s=Bv(t),r=s.indexOf("#"),o=s.indexOf("?");if(!i){const c=id();i={[vi]:0,key:c,__TSR_key:c}}return{href:s,pathname:s.slice(0,r>-1?o>-1?Math.min(r,o):r:o>-1?o:s.length),hash:r>-1?s.slice(r):"",search:o>-1?s.slice(o,r===-1?void 0:r):"",state:i}}function id(){return(Math.random()+1).toString(36).slice(7)}function of(t,i){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==i||!!t.username||!!t.password}function uf(t){return t.pathname+t.search+t.hash}function iy(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function zo(t,i){return{fromLocation:i,toLocation:t,pathChanged:i?.pathname!==t.pathname,hrefChanged:i?.href!==t.href,hashChanged:i?.hash!==t.hash}}function ay({key:t,__TSR_key:i,__TSR_index:s,__hashScrollIntoViewOptions:r,...o}){return o}function S1(t){return t.findIndex(i=>i.status==="error"||i.status==="notFound"||i._notFound)+1}function x1(t,i,s,r,o,c){r&&(i=i.slice(0,r)),o&&(s=s.slice(0,o));for(const d of i){if(c&&t._tx!==c)return;s.some(h=>h.routeId===d.routeId)||t.routesById[d.routeId].options.onLeave?.(d)}for(const d of s){if(c&&t._tx!==c)return;t.routesById[d.routeId].options[i.some(h=>h.routeId===d.routeId)?"onStay":"onEnter"]?.(d)}}var _1=class{constructor(t,i){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async s=>(s(),!1),this.update=s=>{const r=this.options;this.options={...r,...s},this.isServer=this.options.isServer??Yg??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=b1()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const o=this.options.basepath??"/",c=this.options.rewrite,d=this.basepath!==o||r?.rewrite!==c||r?.caseSensitive!==this.options.caseSensitive;if(d&&(this.basepath=o,this.rewrite=o!=="/"&&Rv(o)?p1(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||Yg){this.routeTree=this.options.routeTree;let h;h=this.buildRouteTree(),this.setRoutes(h)}if(this.stores)d&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=g1(this.latestLocation,h),J_(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=f1(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&l1(this.options.routeMasks,s.processedTree),{...s,resolvePathCache:ho(1e3)}},this.subscribe=(s,r)=>{const o={eventType:s,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=s=>{for(const r of this.subscribers)if(r.eventType===s.type)try{r.fn(s)}catch(o){console.error(o)}},this.parseLocation=(s,r)=>{const o=({pathname:m,search:p,hash:v,href:g},x)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(m)){const T=this.options.parseSearch(p),R=this.options.stringifySearch(T);return{href:m+R+v,publicHref:m+R+v,pathname:ir(m),external:!1,searchStr:R,search:Ga(r?.search,T),hash:ir(v.slice(1)),state:yi(r?.state,x)}}const S=Cf(this.rewrite,new URL(g,this.origin)),E=this.options.parseSearch(S.search),O=this.options.stringifySearch(E);return S.search=O,{href:S.href.replace(S.origin,""),publicHref:g,pathname:ir(io(S.pathname)),external:!!this.rewrite&&of(S,this.origin),searchStr:O,search:Ga(r?.search,E),hash:ir(S.hash.slice(1)),state:yi(r?.state,x)}},c=o(s,s.state),{__tempLocation:d,__tempKey:h}=c.state;if(d&&(!h||h===this.tempLocationKey)){const m=o(d,{...d.state,__tempLocation:void 0,key:c.state.key,__TSR_key:c.state.__TSR_key});return m.maskedLocation=c,m}return c},this.matchRoutes=(s,r,o)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:r},o):this.matchRoutesInternal(s,r),this.getMatchedRoutes=s=>{const r=Object.create(null),o=c1(hn(s),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[o?.branch||[this.routesById.__root__],r,o?.route]},this.buildLocation=s=>{{const d=this.staticLocations.get(s);if(d)return d}let r=!1;const o=(d={})=>{if(d.href){const ye=mo(d.href,{});d={...d,to:Cf(this.rewrite,new URL(ye.pathname,this.origin)).pathname,search:this.options.parseSearch(ye.search),hash:ye.hash.slice(1)}}const h=s._fromLocation||this._pendingLocation||this.latestLocation;let m;const p=()=>(r=!0,h),v=()=>m??=this.matchRoutesLightweight(p()),g=d.to?`${d.to}`:".",x=Pg(g[0]==="/"?"":d.unsafeRelative==="path"?p().pathname:d.from??v()[1],g,this.options.trailingSlash,this.resolvePathCache),S=this.routesByPath[hn(x)],E=x.includes("$");let O;if(S)O=S._branch??=Zv(S);else if(E)O=[];else{const[ye,de,U]=this.getMatchedRoutes(x);O=ye,this.options.notFoundRoute&&(!U||U.path!=="/"&&de["**"])&&(O=[...O,this.options.notFoundRoute])}const T=E?S?._interpolation??mr(!1,{fullPath:x},0):void 0;let R;for(const ye of O){const de=ye.options.params?.stringify??ye.options.stringifyParams;if(de){const U=v()[3];if(R??=cf(d.params,U),!Tv(R))break;R===U&&(R=Object.assign(to(),R));try{Object.assign(R,de(R))}catch{}}}R??=cf(d.params,O1(d.params,T)?v()[3]:ff);const q=s.leaveParams?x:io(ir(T?Xg(x,T,R,this.pathParamsDecoder):x)),G=w1(O,s._includeValidateSearch),K=()=>{let ye=v()[2];if(s._includeValidateSearch&&this.options.search?.strict){const de={};O.forEach(U=>{if(U.options.validateSearch)try{Object.assign(de,ao(U.options.validateSearch,{...de,...ye}))}catch{}}),ye=de}return ye},P=G.length?z1(G,K(),d):d.search===!0?K():typeof d.search=="function"?d.search(K()):d.search||ff,C=this.options.stringifySearch(P),N=d.hash===!0?p().hash:typeof d.hash=="function"?d.hash(p().hash):d.hash||void 0,V=N?`#${N}`:"",se=d.state?d.state===!0?p().state:typeof d.state=="function"?d.state(p().state):d.state:ff,le=`${q}${C}${V}`;let ue,ne,he=!1;if(this.rewrite){const ye=new URL(le,this.origin),de=ye.origin,U=qv(this.rewrite,ye);ue=uf(ye),of(U,de)?(ne=U.href,he=!0):ne=io(uf(U))}else ue=H_(le),ne=ue;return{publicHref:ne,href:ue,pathname:q,search:P,searchStr:C,state:se,hash:N??"",external:he,unmaskOnReload:d.unmaskOnReload}},c=o(s);if(s.mask)c.maskedLocation=o({from:s.from,...s.mask});else if(this.options.routeMasks){const d=o1(c.pathname,this.processedTree);if(d){const h=Object.assign(to(),d.rawParams),{from:m,params:p,...v}=d.route,g=cf(p,h);c.maskedLocation=o({from:s.from,...v,params:g})}}return!r&&s._fromLocation&&this.staticLocations.set(s,c),c},this.commitLocation=async({viewTransition:s,ignoreBlocker:r,...o})=>{const c=o.maskedLocation??o;if(c.external)return sy(this,c.publicHref,{replace:o.replace,ignoreBlocker:r});let d;const h=hn(this.latestLocation.href)===hn(o.href)&&Zn(ay(o.state),ay(this.latestLocation.state)),m=this._commitPromise;let p;const v=new Promise(g=>{p=g});if(v.resolve=()=>{p(),m?.resolve()},this._commitPromise=v,h)this.load();else{let{maskedLocation:g,hashScrollIntoView:x,...S}=o;g&&(S={...g,state:{...g.state,__tempKey:void 0,__tempLocation:{...S,search:S.searchStr,state:{...S.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(S.unmaskOnReload??this.options.unmaskOnReload??!1)&&(S.state.__tempKey=this.tempLocationKey)),S.state={...S.state,__hashScrollIntoViewOptions:x??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=s,d=o.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](S.publicHref,S.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:d}})}return this._scroll.n=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:r,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:d,...h}={})=>{const m=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=m;const p=this.commitLocation({...m,viewTransition:c,replace:s,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:d});return queueMicrotask(()=>{this._pendingLocation===m&&(this._pendingLocation=void 0)}),p},this.navigate=async({to:s,reloadDocument:r,href:o,publicHref:c,...d})=>{const h=o?hr(o):void 0;if(h||r){if(s!==void 0||!o){const p=this.buildLocation({to:s,...d}),v=p.maskedLocation??p;o??=v.publicHref,c??=v.publicHref}return sy(this,!h&&c?c:o,d)}return this.buildAndCommitLocation({...d,href:o,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s?.action&&(this._scroll.h=s.action.type==="PUSH"||s.action.type==="REPLACE"),await U1(this,s)},this.startViewTransition=s=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const c=this.latestLocation,d=this.stores.resolvedLocation.get(),h=typeof r.types=="function"?r.types(zo(c,d)):r.types;if(h===!1)return s();o={update:s,types:h}}else o=s;return document.startViewTransition(o).updateCallbackDone}return s()},this.invalidate=s=>{const r=this._committed,o=s?.filter,c=this._preloads,d=new Set,h=v=>{(!o||o(v))&&d.add(v.id)};r.forEach(h),this._cache.forEach(h),c?.forEach(v=>v.forEach(h)),this._tx?.[3].forEach(h);const m=[];for(const[v,g]of c??[])g.some(x=>d.has(x.id))&&(c.delete(v),m.push(v));const p=v=>{if(d.has(v.id)){const g=this.routesById[v.routeId],x={...v,invalid:!0,...(s?.forcePending||v.status==="error"||v.status==="notFound")&&iy(g)?{status:"pending",error:void 0}:void 0};return v._flight=void 0,x}return v};this._committed=r.map(p);for(const[v,g]of this._cache)d.has(v)&&(g.invalid=!0,s?.forcePending&&(g.status="pending"));for(const v of d){const g=this._flights?.get(v);this._flights?.delete(v),g&&!g[2]&&m.push(g[1])}for(const v of m)v.abort();return this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.resolveRedirect=s=>{const r=s.options;let o=s.headers.get("Location")||r.href;if(!o){const d=this.buildLocation(r);o=(d.maskedLocation??d).publicHref||"/"}let c;if(jv.test(o)||(c=hr(o))&&!this.protocolAllowlist.has(c))throw new Error("Redirect blocked: unsafe protocol");if(c==="http:"||c==="https:"){const d=new URL(o);d.pathname.startsWith("//")?o=d.href:of(d,this.origin)||(o=uf(d),c=void 0)}return c&&(r.reloadDocument=!0),r.href=o,s.headers.set("Location",o),s},this.clearCache=s=>{const r=this._cache,o=this._preloads,c=s?.filter,d=[],h=[];for(const[p,v]of r)(!c||c(v))&&(h.push(p),d.push(v));const m=[];for(const[p,v]of o??[])(!c||v.some(c))&&(m.push(p),d.push(...v));for(const p of h)r.delete(p);for(const p of m)o.delete(p);for(const p of d){const v=p._flight;p._flight=void 0,v&&!--v[2]&&(this._flights?.get(p.id)===v&&this._flights.delete(p.id),m.push(v[1]))}for(const p of m)p.abort()},this.loadRouteChunk=Xa,this.preloadRoute=s=>L1(this,s),this.matchRoute=(s,r)=>{const o={...s,to:s.to?Pg(s.from||"",s.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:s.params||{},leaveParams:!0},c=this.buildLocation(o),d=this.stores.status.get()==="pending";if(r?.pending&&!d)return!1;const h=r?.pending??!d?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),m=u1(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,h.pathname,this.processedTree);return!m||s.params&&!Zn(m.rawParams,s.params,!0)?!1:r?.includeSearch??!0?Zn(h.search,c.search,!0)?m.rawParams:!1:m.rawParams},this.getStoreConfig=i,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=Q_(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??t1,parseSearch:t.parseSearch??e1,protocolAllowlist:t.protocolAllowlist??B_}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const i=this.options.notFoundRoute;i&&(i.init(99999999999),this.routesById[i.id]!==i&&(i._interpolation=mr(!1,i,0)),this.routesById[i.id]=i)}matchRoutesInternal(t,i){const[s,r,o]=this.getMatchedRoutes(t.pathname);let c=s,d=!1;(o?o.path!=="/"&&r["**"]:hn(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const h=d?T1(this.options.notFoundMode,c):void 0,m=new Array(c.length),p=this._committed,v=(x,S)=>{const E=p[S];return E?.routeId===x.id?E:x===this.options.notFoundRoute?p.find(O=>O.routeId===x.id):void 0};let g;for(let x=0;x<c.length;x++){const S=c[x],E=m[x-1];let O,T,R;{const he=E?.search??t.search,ye=E?._strictSearch??void 0;try{const de=ao(S.options.validateSearch,{...he})??void 0;O={...he,...de},T={...ye,...de}}catch(de){let U=de;if(de instanceof po||(U=new po(de.message,{cause:de})),i?.throwOnError)throw U;O=he,T={},R=U}}let q="",G="";try{q=S.options.loaderDeps?.({search:O})??"",G=q&&JSON.stringify(q)||""}catch(he){if(i?.throwOnError)throw he;R??=he}const K=to(),P=S._interpolation?Xg(S.fullPath,S._interpolation,r,this.pathParamsDecoder,K):S.fullPath,C=S.id+P+G,N=v(S,x),V=this._cache.get(C)??(N?.id===C?N:void 0);g=V?._strictParams??Object.assign(K,g);let se;if(!V)try{ry(S,g)}catch(he){if(Wa(he)||Dv(he)?se=he:se=new E1(he.message,{cause:he}),i?.throwOnError)throw se}const le=N?"stay":"enter";let ue;if(V)ue={...V,cause:le,search:Ga(N?N.search:V.search,O),_strictSearch:T,searchError:R};else{const he=iy(S)?"pending":"success";ue={id:C,ssr:S.options.ssr,index:x,routeId:S.id,params:N?.params??g,_strictParams:g,pathname:P,updatedAt:Date.now(),search:N?Ga(N.search,O):O,_strictSearch:T,searchError:R,status:he,isFetching:!1,error:void 0,paramsError:se,context:{},abortController:i?._controller??new AbortController,cause:le,loaderDeps:N?yi(N.loaderDeps,q):q,invalid:!1,preload:!1,staticData:S.options.staticData||{},fullPath:S.fullPath}}const ne=h===S.id;ue._notFound&&!ne&&(ue.error=void 0),ue._notFound=ne,m[x]=ue}for(let x=0;x<m.length;x++){const S=m[x];S.params=S.cause==="stay"?Ga(S.params,g):g,i?._controller&&(S.context={})}return m}matchRoutesLightweight(t){const i=bi(this.stores.ids.get()),s=i?this.stores.byRoute.get(i).get():void 0,r=s?.id,o=this.lightweightCache.get(t);if(o&&o[0]===r)return o[1];const[c,d]=this.getMatchedRoutes(t.pathname),h=bi(c),m={...t.search};for(const x of c)try{Object.assign(m,ao(x.options.validateSearch,m))}catch{}const p=s&&s.routeId===h.id&&s.pathname===t.pathname;let v;if(p)v=s.params;else{const x=d;for(const S of c)try{ry(S,x)}catch{}v=x}const g=[c,h.fullPath,m,v];return this.lightweightCache.set(t,[r,g]),g}};async function sy(t,i,{replace:s,ignoreBlocker:r}){if(!Nv(i,t.protocolAllowlist)){if(!r){const o=t.history._getBlockers();for(const c of o)if(c?.blockerFn&&await c.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:s?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(i),s?window.location.replace(i):window.location.href=i}}var po=class extends Error{},E1=class extends Error{};function ao(t,i){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(i);if(s instanceof Promise)throw new po("Async validation not supported");if(s.issues)throw new po(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(i):typeof t=="function"?t(i):{}}function cf(t,i){if(t===void 0||t===!0)return i;const s=Object.create(null);return t===!1||t===null?s:typeof t=="function"?(Object.assign(s,i),Object.assign(s,t(s))):Object.assign(s,i,t)}function O1(t,i){return typeof t=="function"?!0:!i||t===!1||t===null?!1:t===void 0||t===!0||i.some(s=>typeof s!="string"&&!ed.call(t,s[1]))}const ff=Object.freeze({});function w1(t,i){const s=[];for(let r=0;r<t.length;r++){const o=t[r].options;if("search"in o)o.search?.middlewares&&s.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const d=({search:h,next:m})=>{const p=m(o.preSearchFilters?o.preSearchFilters.reduce((v,g)=>g(v),h):h);return o.postSearchFilters?o.postSearchFilters.reduce((v,g)=>g(v),p):p};s.push(d)}const c=o.validateSearch;if(i&&c){const d=({search:h,next:m,meta:p})=>{const v=m(h);try{const g=ao(c,v);if(p&&g)for(const x in g)x in v||(p.defaulted||=new Map).set(x,g[x]);return{...v,...g}}catch{}return v};s.push(d)}}return s}function z1(t,i,s){const r=(o,c,d)=>{if(o>=t.length){if(!s.search)return{};if(s.search===!0)return c;const m=zv(s.search,c);return d&&(d.explicit=m),m}const h=(m,p)=>{if(p){const v=d||{};return{search:r(o+1,m,v),meta:v}}return r(o+1,m,d)};return t[o]({search:c,next:h,meta:d})};return r(0,i)}function T1(t,i){if(t!=="root"){let s;for(let r=i.length-1;r>=0;r--){const o=i[r];if(o.options.notFoundComponent)return o.id;s||=o.children&&o.id}if(s)return s}return Pa}function ry(t,i){const s=t.options.params?.parse??t.options.parseParams;s&&Object.assign(i,s(i))}function Mf(t,i){return t.options[i]?.preload?.()}function j1(t,i){const s=Mf(t,"component");let r=Mf(t,"pendingComponent");return i&&(r?r=r.then(i):i()),s&&r?Promise.all([s,r]).then(()=>{}):s??r}function Xa(t,i,s){const r=()=>i===!1?void 0:i?Mf(t,i):j1(t,s),o=t._lazy;if(o)return o===!0?r():o.then(r);if(!t.lazyFn)return r();const c=t.lazyFn().then(d=>{{const{id:h,...m}=d.options;Object.assign(t.options,m),t._lazy=!0}},d=>{throw t._lazy=void 0,d});return t._lazy=c,c.then(r)}function ad(t){const i=t.findIndex(s=>s.status!=="success"||s._notFound)+1;return i&&i<t.length?t.slice(0,i):t}function N1(t,i,s){const r=t._tx;return i&&r?.[2]===s&&!r[3].some(o=>o.routeId===i)}const mn=0,qn=1,To=2,bt=3,Si=[4];function pr(t){return typeof t[0]=="number"}function na(t,i){return i.aborted?Promise.race([Promise.reject(i),t]):new Promise((s,r)=>{const o=()=>r(i);i.addEventListener("abort",o,{once:!0}),Promise.resolve(t).then(s,r).then(()=>i.removeEventListener("abort",o))})}function ia(t,i){return t.routesById[i.routeId]}function gr(t,i,s){return Dv(t)?[bt,t]:Wa(t)?(t.routeId||=s,[To,t]):i?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[qn,t]):[mn,t]}function sd(t,i){let s=gr(i,!0,t.id);if(s[0]!==qn)return s;try{t.options.onError?.(s[1])}catch(r){s=gr(r,!0,t.id)}return s}function cr(t,i,s,r,o){return o[0].signal.aborted?Si:od(t,i,s,sd(s,r),o)}async function A1(t,i,s,r,o,c){const[d,h]=i,m=s[0].signal,p=!!s[3];for(let v=s[6]??0;v<r;v++){const g=h[v],x=ia(t,g);g.abortController=s[0];const S=h[v-1]?.context??t.options.context??{},E={params:g.params,location:d,navigate:q=>t.navigate({...q,_fromLocation:d}),buildLocation:t.buildLocation,cause:p?"preload":g.cause,abortController:s[0],preload:p,matches:h,routeId:x.id};try{const q=g._ctx||=x.options.context?x.options.context({...E,deps:g.loaderDeps,context:S})||{}:void 0;g.context={...S,...q}}catch(q){return kn(t,g),[v,cr(t,i,x,q,s)]}if(m.aborted)return[v,Si];const O=g.paramsError??g.searchError;if(O!==void 0)return kn(t,g),[v,cr(t,i,x,O,s)];const T=x.options.beforeLoad;if(!T)continue;const R=g.status;v>=c&&(g.status="pending",s[7]?.());try{yr(t,g,"beforeLoad",s[0]);const q=T({...E,search:g.search,context:g.context,...t.options.additionalContext}),G=await(typeof q?.then=="function"?na(q,m):q);if(m.aborted)return[v,Si];const K=od(t,i,x,gr(G,!1,x.id),s);if(K[0]!==mn)return kn(t,g),[v,K];g.context={...g.context,...G}}catch(q){return kn(t,g),[v,cr(t,i,x,q,s)]}finally{g.status=R,yr(t,g,!1,s[0])}}o()}function rd(t,i,s){if(!(!s||--s[2])){if(t._flights?.get(i.id)===s){const r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(i)&&r[3].some(o=>o.id===i.id)&&r[3].some(o=>o.isFetching==="beforeLoad"))return;t._flights.delete(i.id)}return s[1]}}function kn(t,i){const s=i._flight;i._flight=void 0,rd(t,i,s)?.abort()}function Tt(t,i,s,r){const o=[];for(const c of i)if(!s?.includes(c)){const d=c._flight;if(c._flight=void 0,r&&d?.[2]===1&&t._flights?.get(c.id)===d&&s?.some(h=>h.id===c.id))d[2]=0;else{const h=rd(t,c,d);h&&o.push(h)}}for(const c of o)c.abort()}function ld(t){for(const i of t){const s=i._flight;s&&s[2]++}}function yr(t,i,s,r){if(i.isFetching=s,r&&t._tx?.[0]!==r)return;const o=t.stores.byRoute.get(i.routeId),c=o?.get();c?.id===i.id&&o.set({...c,isFetching:s})}function Hv(t,i,s,r,o,c,d){const h=i[0];return{params:s.params,location:h,navigate:m=>t.navigate({...m,_fromLocation:h}),cause:d?"preload":s.cause,abortController:o,preload:d,deps:s.loaderDeps,parentMatchPromise:c,context:s.context,route:r,...t.options.additionalContext}}async function ly(t,i,s,r,o,c,d){const h=d[0],m=h.signal;if(m.aborted)return Si;if(!o)return[mn,void 0];let p=s._flight;yr(t,s,"loader",h);try{if(!p){const v=new AbortController;p=[Promise.resolve().then(()=>o(Hv(t,i,s,r,v,c,!!d[3]))).then(g=>gr(g,!1,r.id),g=>gr(g,!0,r.id)).then(g=>(g[0]!==mn&&t._flights?.get(s.id)===p&&(t._flights.delete(s.id),p[2]||v.abort()),g[0]===qn&&p[2]?sd(r,g[1]):g)),v,1],(t._flights??=new Map).set(s.id,p)}return s._flight=p,s.abortController=p[1],od(t,i,r,await na(p[0],m),d)}catch(v){if(v!==m||!m.aborted)throw v;return kn(t,s),Si}finally{yr(t,s,!1,h)}}function oy(t,i,s){i[0]!==bt&&(t.status="success",t.error=void 0,i[0]===mn?(t.loaderData=i[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=s):t.invalid=!0)}function R1(t,i,s){const r=t._cache.get(i.id);if(r!==s||t._committed.some(c=>c.id===i.id&&c._flight===i._flight))return;const o={...i,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,t._cache.set(i.id,o),r&&kn(t,r)}function uy(t,i){return i[0]===qn||i[0]===To?{...t,status:i[0]===qn?"error":"notFound",error:i[1],_flight:void 0}:t}function C1(t,i,s,r,o,c,d){const h=i[1][s],m=ia(t,h),p=!!c[3],v=t._cache.get(h.id);let g,x=!1,S;try{if(h.status==="success"&&(g=m.options.shouldReload,typeof g=="function"&&(g=g(Hv(t,i,h,m,c[0],o,p))),c[0].signal.aborted&&(S=Si)),!S)if(h.status!=="success")x=!0;else{const ne=p||h.preload?m.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:m.options.staleTime??t.options.defaultStaleTime??0;x=!!(h.invalid||g||g===void 0&&Date.now()-h.updatedAt>=ne&&(c[5]||h.cause==="enter"||c[2].some(he=>he.routeId===h.routeId&&he.id!==h.id)))}}catch(ne){h.invalid=!0,kn(t,h),S=cr(t,i,m,ne,c)}const E=m.options.loader,O=typeof E=="function",T=O?E:E?.handler,R=!p||m.options.preload!==!1;let q=R&&E?t._flights?.get(h.id):void 0;q===h._flight||S?q=void 0:q&&!x&&!p&&g===void 0?x=!0:x||(q=void 0);const G=!!(E&&x&&h.status==="success"&&!p&&!c[4]&&((O?void 0:E.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),K=x&&R,P=K&&!G&&(h.status!=="success"||!!E),C=s>=d?c[7]:void 0,N=m.lazyFn&&m._lazy!==!0?C:void 0;if(K&&!E&&(h.invalid=!1,h.updatedAt=Date.now()),q&&q[2]++,P){const ne=h._flight;h._flight=q,rd(t,h,ne)?.abort(),s>=d&&(h.status="pending"),C?.()}K||(h.isFetching=!1);const V=!S&&P?ly(t,i,h,m,T,o,c).then(ne=>(oy(h,ne,p),ne[0]===mn&&(E&&!c[0].signal.aborted&&R1(t,h,v),s>=d&&(h.status="pending")),ne)):Promise.resolve(S??[mn,h.loaderData]),se=(async()=>{try{const he=Xa(m,void 0,N);he&&await na(he,c[0].signal)}catch(he){if(!i[1].some((ye,de)=>de<=s&&(ye.status==="error"||ye.status==="notFound"||ye._notFound)))return[s,cr(t,i,m,he,c)]}const ne=await V;P&&ne[0]===mn&&h.status==="pending"&&!c[0].signal.aborted&&(h.status="success",C?.())})();if(r.push([s,V,se]),!G)return V.then(ne=>uy(h,ne));const le={...h,status:"pending",preload:!1,_flight:q};h.invalid=!1,h.isFetching="loader";const ue=ly(t,i,le,m,T,o,c).then(ne=>(h.isFetching=!1,oy(le,ne,!1),ne));return(i[2]??=[]).push([s,ue,se,le]),ue.then(ne=>uy(le,ne))}async function Df(t,i,s,r,o=0){const c=s?.[1][1];let d=c?.routeId?i.findIndex(h=>h.routeId===c.routeId):s?.[0]??i.length-1;d<0&&(d=0);for(let h=d;h>=0;h--){const m=ia(t,i[h]);try{const p=Xa(m,!1);p&&await na(p,r)}catch(p){if(p===r&&r.aborted)throw p}if(m.options.notFoundComponent)return h}return c?.routeId?d:o}function Ji(t,i){i[2]&&(Tt(t,i[2].map(s=>s[3])),i[2]=void 0)}async function cy(t,i,s,r){let o;try{await Promise.all(t.map(c=>c[1].then(async d=>{const h=c[0];if(!(r&&h>=await r)){if(d[0]>=bt)throw[h,d];!o&&d[0]!==mn&&(o=[h,d],await Promise.all((s??[]).map(m=>{if(!(m[0]<=h))return m[1].then(p=>{if(p[0]===bt)throw[m[0],p]})})))}})))}catch(c){return c}return i??o}function od(t,i,s,r,o,c){for(;r[0]===bt;){const d=r[1],h=d.options;try{if((h.href||d.headers.has("Location"))&&(t.resolveRedirect(d),h.reloadDocument)||(h.reloadDocument?o[3]:o[1]>=20))return r;const m=t.buildLocation({...h,_fromLocation:i[0],_includeValidateSearch:!0}),p=m.maskedLocation??m;if(p.external){const v=d.clone();return v.options={...h},v.headers.set("Location",p.publicHref),t.resolveRedirect(v),o[3]?[bt,v]:[bt,v,p]}return[bt,d,m]}catch(m){r=c?[qn,m]:sd(s,m),c=!0}}return r}async function $v(t,i,s,r,o,c){const d=i[1];let h=await o,m=!1;const p=d.findIndex(S=>S._notFound),v=S=>S[1][0]===To?Df(t,d,S,r.signal):S[0];let g=p<0?d.length:p;if((h?.[1][0]??0)>=bt)g=0;else if(h){g=h[2]??=await v(h);for(const S of s){if(S[0]>=g)break;const E=await S[1];if(E[0]!==mn&&E[0]<bt&&!("loaderData"in d[S[0]])){h=[S[0],E],g=h[2]=await v(h);break}}}for(const S of s){if(S[0]>=g)break;const E=await S[2];if(E){h=E;break}}if((h?.[1][0]??0)>=bt){const S=h[1];if(S[0]!==bt||S[1].options.reloadDocument||S[2])return Ji(t,i),S;m=!0,h=[0,[qn,new Error("Too many redirects")]]}const x=h?h[2]??await v(h):p;if(x>=0){const S=h?.[1],E=S?.[0],O=d[x],T=S?.[1],R=()=>{S&&(O._notFound=void 0,E===qn?O.status="error":(T.routeId=O.routeId,O.routeId===t.routeTree.id?(O.status="success",O._notFound=!0):O.status="notFound"),O.error=T,O.isFetching=!1)};R(),S||c?.();const q=ia(t,O);try{await na(S?Promise.resolve().then(()=>Xa(q,E===qn?"errorComponent":"notFoundComponent")):Promise.all([Xa(q),Xa(q,"notFoundComponent")]),r.signal)}catch(G){if(G===r.signal&&r.signal.aborted)return Ji(t,i),Si}S?m&&(r.abort(),await Promise.all([...s.map(G=>G[1]),...s.map(G=>G[2]),...(i[2]??[]).map(G=>G[1])]),Ji(t,i),Tt(t,d),R()):O.status="success"}return i}async function Qv(t,i,s,r=0,o=i[1].length){const c=i[1];for(let d=r;d<o;d++){const h=c[d],m=ia(t,h).options;if(m.head||m.scripts)try{const p={ssr:t.options.ssr,matches:c,match:h,params:h.params,loaderData:h.loaderData},[v,g]=await na(Promise.all([m.head?.(p),m.scripts?.(p)]),s);h.meta=v?.meta,h.links=v?.links,h.headScripts=v?.scripts,h.styles=v?.styles,h.scripts=g}catch(p){if(p===s&&s.aborted)break;console.error(p)}if(h.status!=="success"||h._notFound)break}return i}async function Gv(t,i,s,r){const o=[i,s],c=r[0].signal;let d;try{const h=t.stores.matches.get();let m=s.findIndex(R=>R._notFound);if(t.options.notFoundMode!=="root"&&m>=0){const R=await Df(t,s,void 0,c,m);s[m]._notFound=void 0,s[R]._notFound=!0,m=R}let p=m<0?s.length:m+1,v=0;for(;v<p&&v!==m;){const R=s[v],q=r[2][v],G=h[v];if(q?.id!==R.id||q.status!=="success"||R.preload||G?.id!==R.id||G.status!=="success"||(v++,q._notFound||G._notFound))break}const g=[],x=r[6]??0;let S=x?Promise.resolve(s[x-1]):void 0;const E=()=>{for(let R=x;R<p&&!c.aborted;R++)S=C1(t,o,R,g,S,r,v)},O=await A1(t,o,r,p,E,v);if(O){if(r[4]=!0,p=O[0],O[1][0]===To){const R=await Df(t,s,O,c);O[2]=R,p=Math.min(p,R+1)}else O[1][0]>=bt&&(p=0);E()}if(!c.aborted&&!r[3]){const R=[];for(const[q,G]of t._flights??[])G[2]||(t._flights.delete(q),R.push(G[1]));for(const q of R)q.abort()}const T=$v(t,o,g,r[0],cy(g,O,o[2]),r[7]);o[2]?.length&&(o[3]=cy(o[2],void 0,void 0,T.then(R=>pr(R)?0:ad(s).length,()=>0))),d=await T}catch(h){if(Ji(t,o),h===c&&c.aborted)return Si;throw h}return pr(d)?d:Qv(t,d,c,r[6]===s.length?r[6]:0)}function kf(t,i){if(t._tx!==i)return;const s=i[3],r=t.stores.matches.get();let o=t._pending;for(let c=0;c<s.length;c++){const d=s[c],h=d.status==="success"&&!d._notFound,m=r[c]?.id===d.id&&r[c]?.status==="pending";if(h&&!m)continue;const p=ia(t,d),v=h||d.invalid?0:p.options.pendingMs??t.options.defaultPendingMs,g=p.options.pendingComponent??t.options.defaultPendingComponent;if(!g||typeof v!="number"||v===1/0){o&&(o[0]=i,o[2]=0,o[4]=!0);return}const x=p.options.pendingMinMs??t.options.defaultPendingMinMs??0;let S=!1;if(o?.[1]===d.id?(S=o[0]!==i,o[0]=i):(clearTimeout(o?.[3]),t._pending=o=void 0),o||(t._pending=o=[i,d.id,m?Date.now()+x:i[4]+v,void 0,m||void 0,g]),o[4]&&!S&&o[5]===g)return;if(o[5]=g,!o[4]){clearTimeout(o[3]);const T=o[2]-Date.now();if(T>0){o[3]=setTimeout(()=>kf(t,i),T);return}o[2]=0}const E=s.map(T=>({...T,_flight:void 0}));E[c].status="pending";const O=o[4]=t.startTransition(()=>t.stores.setMatches(E),E).then(T=>(T&&t._pending===o&&o[4]===O&&!o[2]&&(o[2]=Date.now()+x),T));return}}function ar(t,i){const s=t._pending;(t._tx===i||!t._tx?.[3].some(r=>r.id===s?.[1]))&&(clearTimeout(s?.[3]),t._pending=void 0)}async function fy(t,i){const s=t._pending;if(!s)return;clearTimeout(s[3]);const r=s[2]-Date.now();if(!s[4]||r<=0||!ad(i[3]).some(c=>c.id===s[1]))return;let o;try{await na(new Promise(c=>{o=setTimeout(c,r)}),i[0].signal)}catch{}clearTimeout(o)}function Kv(t,i){t._committed=i,t.stores.setMatches(i)}function M1(t,i,s,r){const o=t._committed,c=t._lifecycleEnd,d=t._cache;for(const v of s)v.preload=!1,r&&(v._assetEnd=void 0);const h=ad(s).length,m=new Map;{const v=Date.now(),g=new Set;for(let x=0;x<s.length;x++){const S=s[x];(x<h||S.status==="success")&&g.add(S.id)}for(const x of[...o,...d.values()]){if(x.status!=="success"||g.has(x.id))continue;const S=ia(t,x);!S.options.loader||v-x.updatedAt>=(x.preload?S.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:S.options.gcTime??t.options.defaultGcTime??3e5)||m.set(x.id,d.get(x.id)===x?x:{...x,_flight:void 0,isFetching:!1,context:{}})}}i[3]=[],t._cache=m;const p=t._lifecycleEnd=S1(s);Kv(t,s),Tt(t,[...d.values(),...o].filter(v=>v._flight&&m.get(v.id)!==v),s),x1(t,o,s,c,p,i)}async function Gl(t,i){let s=t._tx;for(;s&&s!==i;)i=s,await s[5],s=t._tx}function Yv(t,i,s){const r=s[1].options,o=s[2];if(!o)return t.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return t.navigate({href:(o.maskedLocation??o).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=i[1]+1,t._pendingLocation=o;const c=t.commitLocation({...o,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===o&&(t._pendingLocation=void 0)}),c}async function D1(t,i,s,r,o){const c=s.map(m=>({...m}));ld(c);for(const m of r)kn(t,c[m[0]]),c[m[0]]=m[3];const d=[i[2],c];let h;try{h=await $v(t,d,r,i[0],o)}catch(m){throw Tt(t,c),m}if(pr(h)){Tt(t,c),h[0]===bt&&t._tx===i&&t._committed===s&&await Yv(t,i,h);return}if(await Qv(t,h,i[0].signal),t._tx!==i||t._committed!==s){Tt(t,c);return}for(const m of c){const p=t._cache.get(m.id);p?._flight&&p._flight===m._flight&&(t._cache.delete(m.id),kn(t,p))}Kv(t,c),Tt(t,s,c)}async function k1(t,i,s,r,o,c){const d=await Gv(t,i[2],i[3],[i[0],i[1],t._committed,void 0,o,s,c,r]);if(pr(d)){const g=d[0]===bt&&t._tx===i;if((!g||d[1].options.reloadDocument)&&ar(t,i),Tt(t,i[3]),i[3]=[],!g)return;if(t._tx!==i){ar(t,i);return}await Yv(t,i,d);return}const h=d[1];if(t._tx===i&&await fy(t,i),t._tx!==i){ar(t,i),Tt(t,h),Ji(t,d);return}const m=i[2],p=zo(m,t.stores.resolvedLocation.get()),v=d[2];await t.startViewTransition(async()=>{if(t._tx===i&&await fy(t,i),t._tx!==i){ar(t,i),Tt(t,h),Ji(t,d);return}const g=()=>{ar(t,i),M1(t,i,h,c),t._tx===i&&(t.emit({type:"onLoad",...p}),t._tx===i&&t.emit({type:"onBeforeRouteMount",...p}))},x=await t.startTransition(g,h);if(t._tx!==i){Ji(t,d);return}v?.length&&D1(t,i,h,v,d[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(m),t.stores.status.set("idle"),t._tx===i&&t.emit({type:"onResolved",...p}),x&&t._tx===i&&t.emit({type:"onRendered",...p})}),t._tx===i&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function U1(t,i){const s=t._tx,r=t.stores.resolvedLocation.get(),o=r??t.stores.location.get(),c=t.latestLocation,d=t._pendingLocation,h=d?.href===c.href?d._redirects??0:0,m=t._handoff,p=m?.[0](),v=new AbortController,g=t._preflight;if(t._preflight=v,p||m?.[1](),g?.abort(),!v.signal.aborted){const K=zo(c,r);t.emit({type:"onBeforeNavigate",...K}),v.signal.aborted||t.emit({type:"onBeforeLoad",...K})}if(v.signal.aborted){await Gl(t,s);return}const x=o.href===c.href;let S=v;const E=t.matchRoutes(c,{_controller:v});ld(E);const O=p?m[1](E):void 0;if(O?S=p:p?.abort(),v.signal.aborted){Tt(t,E),await Gl(t,s);return}t._preflight=void 0;let T;const R=()=>k1(t,G,x,()=>kf(t,G),i?.sync,O),q=i?.sync?new Promise(K=>T=K):Promise.resolve().then(R),G=[S,h,c,E,Date.now(),q.then(()=>Gl(t,G))];if(t._tx=G,s){for(const K of t.stores.matches.get()){if(t._tx!==G)break;K.isFetching&&yr(t,K,!1)}s[0].abort(),Tt(t,s[3],G[3],!0)}if(t._tx!==G){Tt(t,G[3]),G[3]=[],T?.(),await Gl(t,G);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(c)}),(O||!t._committed.length&&E[0]?.status!=="success"&&!E.some(K=>K._notFound))&&kf(t,G),T?.(R()),await G[5]}async function L1(t,i){let s=t.buildLocation(i);for(let r=0;;r++){const o=t._committed,c=new AbortController;let d,h,m;try{try{d=t.matchRoutes(s,{_controller:c}),ld(d),h=(t._preloads??=new Map).set(c,d),m=await Gv(t,s,d,[c,r,o,!0])}finally{h&&(h=h.delete(c),Tt(t,d)),c.abort()}if(!pr(m))return m[1];if(!h||m.length<3)return;s=m[2]}catch(p){Wa(p)||console.error(p);return}}}const Z1="Error preloading route! ☝️";var Vv=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=i=>{this.originalIndex=i,this._branch=void 0;const s=this.options,r=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Pa:this.parentRoute||td();let o=r?Pa:s?.path;o&&o!=="/"&&(o=Av(o));const c=s?.id||o,d=r?Pa:Fa((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const h=d==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Fa(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=d,this._fullPath=h,this._to=hn(h)},this.addChildren=i=>this._addFileChildren(i),this._addFileChildren=i=>(Array.isArray(i)&&(this.children=i),typeof i=="object"&&i!==null&&(this.children=Object.values(i)),this),this._addFileTypes=()=>this,this.updateLoader=i=>(Object.assign(this.options,i),this),this.update=i=>(Object.assign(this.options,i),this),this.lazy=i=>(this.lazyFn=i,this),this.redirect=i=>a1({from:this.fullPath,...i}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},q1=class extends Vv{constructor(t){super(t)}},ud=class extends X.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,i){const s=t.getResetKey();return i.error&&i.resetKey!==s?{resetKey:s,error:0}:{resetKey:s}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,i){this.props.onCatch?.(t,i)}render(){const t=this.state.error;return t?X.createElement(this.props.errorComponent??B1,{error:t[0],reset:this.reset}):this.props.children}};function B1({error:t}){const[i,s]=X.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(r=>!r),children:i?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),i?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?b.jsx("code",{children:t.message}):null})}):null]})}var dy=()=>!0,H1=()=>!1;function $1({children:t,fallback:i=null}){return b.jsx(wo.Fragment,{children:Q1()?t:i})}function Q1(t=!0){return wo.useSyncExternalStore(G1,dy,t?H1:dy)}function G1(){return()=>{}}var Fv=X.createContext(null);function gn(t){return X.useContext(Fv)}function K1(t,i){const s=t.stores.location,r=new Set;let o,c;const d=h=>{N1(t,i,h)||(o=h,r.forEach(m=>m()))};return[()=>o??s.get(),h=>(r.size||(o=s.get(),c=s.subscribe(d).unsubscribe),r.add(h),()=>{r.delete(h),r.size||(c(),o=void 0)})]}var vr=X.createContext(void 0),Y1=X.createContext(void 0);function V1({update:t,notify:i,unwatched:s}){return{link:r,unlink:o,propagate:c,checkDirty:d,shallowPropagate:h};function r(p,v,g){const x=v.depsTail;if(x!==void 0&&x.dep===p)return;const S=x!==void 0?x.nextDep:v.deps;if(S!==void 0&&S.dep===p){S.version=g,v.depsTail=S;return}const E=p.subsTail;if(E!==void 0&&E.version===g&&E.sub===v)return;const O=v.depsTail=p.subsTail={version:g,dep:p,sub:v,prevDep:x,nextDep:S,prevSub:E,nextSub:void 0};S!==void 0&&(S.prevDep=O),x!==void 0?x.nextDep=O:v.deps=O,E!==void 0?E.nextSub=O:p.subs=O}function o(p,v=p.sub){const g=p.dep,x=p.prevDep,S=p.nextDep,E=p.nextSub,O=p.prevSub;return S!==void 0?S.prevDep=x:v.depsTail=x,x!==void 0?x.nextDep=S:v.deps=S,E!==void 0?E.prevSub=O:g.subsTail=O,O!==void 0?O.nextSub=E:(g.subs=E)===void 0&&s(g),S}function c(p){let v=p.nextSub,g;e:do{const x=p.sub;let S=x.flags;if(S&60?S&12?S&4?!(S&48)&&m(p,x)?(x.flags=S|40,S&=1):S=0:x.flags=S&-9|32:S=0:x.flags=S|32,S&2&&i(x),S&1){const E=x.subs;if(E!==void 0){const O=(p=E).nextSub;O!==void 0&&(g={value:v,prev:g},v=O);continue}}if((p=v)!==void 0){v=p.nextSub;continue}for(;g!==void 0;)if(p=g.value,g=g.prev,p!==void 0){v=p.nextSub;continue e}break}while(!0)}function d(p,v){let g,x=0,S=!1;e:do{const E=p.dep,O=E.flags;if(v.flags&16)S=!0;else if((O&17)===17){if(t(E)){const T=E.subs;T.nextSub!==void 0&&h(T),S=!0}}else if((O&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(g={value:p,prev:g}),p=E.deps,v=E,++x;continue}if(!S){const T=p.nextDep;if(T!==void 0){p=T;continue}}for(;x--;){const T=v.subs,R=T.nextSub!==void 0;if(R?(p=g.value,g=g.prev):p=T,S){if(t(v)){R&&h(T),v=p.sub;continue}S=!1}else v.flags&=-33;v=p.sub;const q=p.nextDep;if(q!==void 0){p=q;continue e}}return S}while(!0)}function h(p){do{const v=p.sub,g=v.flags;(g&48)===32&&(v.flags=g|16,(g&6)===2&&i(v))}while((p=p.nextSub)!==void 0)}function m(p,v){let g=v.depsTail;for(;g!==void 0;){if(g===p)return!0;g=g.prevDep}return!1}}function F1(t,i,s){const r=typeof t=="object",o=r?t:void 0;return{next:(r?t.next:t)?.bind(o),error:(r?t.error:i)?.bind(o),complete:(r?t.complete:s)?.bind(o)}}const Uf=[];let so=0;const{link:hy,unlink:P1,propagate:X1,checkDirty:Pv,shallowPropagate:my}=V1({update(t){return t._update()},notify(t){Uf[Lf++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,go(t))}});let Kl=0,Lf=0,sn,Zf=0;function J1(t){try{++Zf,t()}finally{--Zf||Xv()}}function go(t){const i=t.depsTail;let s=i!==void 0?i.nextDep:t.deps;for(;s!==void 0;)s=P1(s,t)}function Xv(){if(!(Zf>0)){for(;Kl<Lf;){const t=Uf[Kl];Uf[Kl++]=void 0,t.notify()}Kl=0,Lf=0}}function py(t,i){const s=typeof t=="function",r=t,o={_snapshot:s?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?0:1,get(){return sn!==void 0&&hy(o,sn,so),o._snapshot},subscribe(c){const d=F1(c),h={current:!1},m=I1(()=>{o.get(),h.current?(sn=void 0,d.next?.(o._snapshot)):h.current=!0});return{unsubscribe:()=>{m.stop()}}},_update(c){const d=sn,h=i?.compare??Object.is;if(s)sn=o,++so,o.depsTail=void 0;else if(c===void 0)return!1;s&&(o.flags=5);try{const m=o._snapshot,p=typeof c=="function"?c(m):c===void 0&&s?r(m):c;return m===void 0||!h(m,p)?(o._snapshot=p,!0):!1}finally{sn=d,s&&(o.flags&=-5),go(o)}}};return s?(o.flags=17,o.get=function(){const c=o.flags;if(c&16||c&32&&Pv(o.deps,o)){if(o._update()){const d=o.subs;d!==void 0&&my(d)}}else c&32&&(o.flags=c&-33);return sn!==void 0&&hy(o,sn,so),o._snapshot}):o.set=function(c){if(o._update(c)){const d=o.subs;d!==void 0&&(X1(d),my(d),Xv())}},o}function I1(t){const i=()=>{const r=sn;sn=s,++so,s.depsTail=void 0,s.flags=6;try{return t()}finally{sn=r,s.flags&=-5,go(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&Pv(this.deps,this)?i():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,go(this)}};return i(),s}var df={exports:{}},hf={},mf={exports:{}},pf={};var gy;function W1(){if(gy)return pf;gy=1;var t=Sr();function i(g,x){return g===x&&(g!==0||1/g===1/x)||g!==g&&x!==x}var s=typeof Object.is=="function"?Object.is:i,r=t.useState,o=t.useEffect,c=t.useLayoutEffect,d=t.useDebugValue;function h(g,x){var S=x(),E=r({inst:{value:S,getSnapshot:x}}),O=E[0].inst,T=E[1];return c(function(){O.value=S,O.getSnapshot=x,m(O)&&T({inst:O})},[g,S,x]),o(function(){return m(O)&&T({inst:O}),g(function(){m(O)&&T({inst:O})})},[g]),d(S),S}function m(g){var x=g.getSnapshot;g=g.value;try{var S=x();return!s(g,S)}catch{return!0}}function p(g,x){return x()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return pf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,pf}var yy;function eE(){return yy||(yy=1,mf.exports=W1()),mf.exports}var vy;function tE(){if(vy)return hf;vy=1;var t=Sr(),i=eE();function s(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var r=typeof Object.is=="function"?Object.is:s,o=i.useSyncExternalStore,c=t.useRef,d=t.useEffect,h=t.useMemo,m=t.useDebugValue;return hf.useSyncExternalStoreWithSelector=function(p,v,g,x,S){var E=c(null);if(E.current===null){var O={hasValue:!1,value:null};E.current=O}else O=E.current;E=h(function(){function R(C){if(!q){if(q=!0,G=C,C=x(C),S!==void 0&&O.hasValue){var N=O.value;if(S(N,C))return K=N}return K=C}if(N=K,r(G,C))return N;var V=x(C);return S!==void 0&&S(N,V)?(G=C,N):(G=C,K=V)}var q=!1,G,K,P=g===void 0?null:g;return[function(){return R(v())},P===null?void 0:function(){return R(P())}]},[v,g,x,S]);var T=o(p,E[0],E[1]);return d(function(){O.hasValue=!0,O.value=T},[T]),m(T),T},hf}var by;function nE(){return by||(by=1,df.exports=tE()),df.exports}var iE=nE();function aE(t,i){return t===i}function ea(t,i=r=>r,s){const r=s?.compare??aE,o=X.useCallback(d=>{const{unsubscribe:h}=t.subscribe(d);return h},[t]),c=X.useCallback(()=>t.get(),[t]);return iE.useSyncExternalStoreWithSelector(o,c,c,i,r)}var Sy={};function sE(t,i){const s=X.useRef();return r=>{const o=t?.select?t.select(r):r;return t?.structuralSharing??i.options.defaultStructuralSharing?s.current=yi(s.current,o):o}}function aa(t){const i=gn(),s=X.useContext(t.from?Y1:vr),r=t.from??s,o=i.stores.getMatchStore(r),c=sE(t,i),d=ea(o,h=>h?c(h):Sy);if(d!==Sy)return d;(t.shouldThrow??!0)&&td()}function Jv(t){return aa({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i=>t.select?t.select(i.loaderData):i.loaderData})}function Iv(t){const{select:i,...s}=t;return aa({...s,select:r=>i?i(r.loaderDeps):r.loaderDeps})}function Wv(t){return aa({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i=>{const s=t.strict===!1?i.params:i._strictParams;return t.select?t.select(s):s}})}function eb(t){return aa({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i=>t.select?t.select(i.search):i.search})}function jo(t){const i=gn();return X.useCallback(s=>i.navigate({...s,from:s.from??t?.from}),[t?.from,i])}function tb(t){return aa({...t,select:i=>t.select?t.select(i.context):i.context})}function rE(...t){const i=X.useRef(t),s=i.current;return t.forEach((r,o)=>{Zn(s[o],r,!1,!0)||(s[o]=r)}),i.current}function Yl(t,i){t.preloadRoute(i).catch(s=>{console.warn(s),console.warn(Z1)})}function lE(t,i){const s=typeof t=="string"&&hr(t);if(s)return i.has(s)?t:null}function oE(t,i,s,r){const o=Fg(t.pathname,r),c=Fg(i.pathname,r);return(s?.exact?o!==c:!(o.startsWith(c)&&(o.length===c.length||o[c.length]==="/")))||(s?.includeSearch??!0)&&!Zn(t.search,i.search,!s?.exact,s?.explicitUndefined)?!1:!s?.includeHash||t.hash===i.hash}function uE(t,i,s){const r=gn(),o=X.useRef(null),c=X.useCallback(Z=>{if(o.current=Z,typeof i=="function")return i(Z);i&&(i.current=Z)},[i]),{activeOptions:d,to:h,preload:m,preloadDelay:p,disabled:v,target:g,onClick:x,onBlur:S,onFocus:E,onMouseEnter:O,onMouseLeave:T,onTouchStart:R}=t,[q,G,K]=rE(t.search,t.params,d),P=X.useContext(vr),C=(r.stores._linkScopes??={})[P]??=K1(r,P),[N,V,se]=X.useMemo(()=>{const Z=lE(h,r.protocolAllowlist);if(Z!==void 0){const Le=[Z??void 0];return[t,()=>Le]}const F={...t};let I,ce,ge;const Oe=()=>{const Le=C[0]();if(Le!==I){F._fromLocation=Le;const Be=r.buildLocation(F),on=mE(Be,r,v),Ni=v||on&&!hr(on)?oE(Le,Be,K,r.basepath):void 0;(!ce||ce[0]!==on||ce[1]!==Ni)&&(ce=[on,Ni]),I=Le}return ce};return[F,Oe,K?.includeHash&&(()=>{const Le=Oe();return Le[1]?ge??=[Le[0],!1]:Le})]},[r,C,t.from,t.hash,t.href,h,q,G,t.state,t.mask,t.unsafeRelative,K,v]),[le,ue]=X.useSyncExternalStore(C[1],V,se||V),ne=ue===void 0&&le,he=v||le===void 0,ye=X.useRef(!1),de=t.reloadDocument||ne||he?!1:m??r.options.defaultPreload,U=p??r.options.defaultPreloadDelay??0,J=X.useCallback(Z=>{const F=Z?.isIntersecting;if(!(F??de==="intent")){F===!1&&Vl(o);return}if(!U){Yl(r,N);return}o.t??=setTimeout(()=>{o.t=void 0,Yl(r,N)},U)},[r,N,o,de,U]);X.useEffect(()=>{if(!de)return;de==="render"&&!ye.current&&(ye.current=!0,Yl(r,N));let Z=!0,F;return de==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(F=new IntersectionObserver(I=>{Z&&J(I.pop())},{rootMargin:"100px"}),F.observe(o.current)),()=>{Z=!1,F?.disconnect(),Vl(o)}},[r,N,de,J,o]);const te=dE(t,s);if(te.ref=i?c:o,ne)return te.href=ne,te;const je=Z=>{const F=g??Z.currentTarget.getAttribute("target");!he&&!(Z.metaKey||Z.altKey||Z.ctrlKey||Z.shiftKey)&&!Z.defaultPrevented&&(!F||F==="_self")&&Z.button===0&&(Z.preventDefault(),Vl(o),r.navigate({...t,_fromLocation:N._fromLocation}))},Ae=()=>{de==="intent"&&Yl(r,N)},j=()=>{de==="intent"&&Vl(o)};return te.onClick=Ya(x,je),te.onBlur=Ya(S,j),te.onFocus=Ya(E,J),te.onMouseEnter=Ya(O,J),te.onMouseLeave=Ya(T,j),te.onTouchStart=Ya(R,Ae),hE(te,t,ue,le,he,s)}var cE={},fE={className:"active"},nb=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function dE(t,i){const s={};for(const r in t)nb.has(r)||r==="type"&&i!==void 0||r==="disabled"&&i==="a"||(s[r]=t[r]);return s}function hE(t,i,s,r,o,c){const{activeProps:d,inactiveProps:h,className:m,style:p,target:v}=i,g=zv(s?d:h,{})??(s?fE:cE);Object.assign(t,g),t.href=r,c!=="a"&&(t.disabled=o),t.target=v;const x=g.style;(p||x)&&(t.style=p&&x?{...p,...x}:p||x);const S=g.className;return(m||S)&&(t.className=m?S?`${m} ${S}`:m:S),o&&(t.role="link",t["aria-disabled"]=!0),s&&(t["data-status"]="active",t["aria-current"]="page"),t}var Vl=t=>{clearTimeout(t.t),t.t=void 0},Ya=(t,i)=>t?s=>s.defaultPrevented||(t(s),s.defaultPrevented||i(s)):i;function mE(t,i,s){if(s)return;const r=t.maskedLocation??t,o=r.external?r.publicHref:i.history.createHref(r.publicHref)||"/";if(!((r.external||o!==r.publicHref)&&Nv(o,i.protocolAllowlist)))return o}var rs=X.memo(X.forwardRef((t,i)=>{const s=t._asChild||"a",r=uE(t,i,s),o=typeof t.children=="function"?t.children({isActive:r["data-status"]==="active"}):t.children;return X.createElement(s,r,o)}),pE);function pE(t,i){let s=0;for(const r in i)if(s++,t[r]!==i[r]&&(!nb.has(r)||!Zn(t[r],i[r],!1,!0)))return!1;for(const r in t)s--;return s===0}var gE=class extends Vv{constructor(t){super(t),this.useMatch=i=>aa({...i,from:this.id}),this.useRouteContext=i=>tb({...i,from:this.id}),this.useSearch=i=>eb({...i,from:this.id}),this.useParams=i=>Wv({...i,from:this.id}),this.useLoaderDeps=i=>Iv({...i,from:this.id}),this.useLoaderData=i=>Jv({...i,from:this.id}),this.useNavigate=()=>jo({from:this.fullPath}),this.Link=wo.forwardRef((i,s)=>b.jsx(rs,{ref:s,from:this.fullPath,...i}))}};function sa(t){return new gE(t)}var yE=class extends q1{constructor(t){super(t),this.useMatch=i=>aa({...i,from:this.id}),this.useRouteContext=i=>tb({...i,from:this.id}),this.useSearch=i=>eb({...i,from:this.id}),this.useParams=i=>Wv({...i,from:this.id}),this.useLoaderDeps=i=>Iv({...i,from:this.id}),this.useLoaderData=i=>Jv({...i,from:this.id}),this.useNavigate=()=>jo({from:this.fullPath}),this.Link=wo.forwardRef((i,s)=>b.jsx(rs,{ref:s,from:this.fullPath,...i}))}};function vE(t){return new yE(t)}function bE(t){const i=gn(),s=`not-found-${ea(i.stores.location,r=>r.pathname)}-${ea(i.stores.status)}`;return b.jsx(ud,{getResetKey:()=>s,onCatch:(r,o)=>{if(Wa(r))t.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Wa(r))return t.fallback?.(r);throw r},children:t.children})}function SE(){return b.jsx("p",{children:"Not Found"})}function ib(t,i,s){return i.options.notFoundComponent?b.jsx(i.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?b.jsx(t.options.defaultNotFoundComponent,{...s}):b.jsx(SE,{})}function No(t,i){const s=i?.options.pendingComponent??t.options.defaultPendingComponent;return s?b.jsx(s,{}):null}var xE=(t,i)=>t[0]===i[0]&&t[1]===i[1],ab=(t,i,s)=>!i.isRoot||i.options.shellComponent||i.options.wrapInSuspense||s===!1||s==="data-only"||!t.ssr,sb=X.memo(function({routeId:i}){const s=gn(),r=s.stores.getMatchStore(i);return _E(s,ea(r))});function _E(t,i){const s=t.routesById[i.routeId],r=No(t,s),o=s.options.errorComponent??t.options.defaultErrorComponent,c=s.options.onCatch??t.options.defaultOnCatch,d=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,h=i.ssr===!1||i.ssr==="data-only",m=ab(t,s,i.ssr)&&(s.options.wrapInSuspense??r??(s.options.errorComponent?.preload||h));let p=b.jsx(EE,{match:i});h&&(p=b.jsx($1,{fallback:r,children:p})),d&&(p=b.jsx(bE,{fallback:x=>{if(x.routeId??=i.routeId,x.routeId!==i.routeId)throw x;return X.createElement(d,x)},children:p})),o&&(p=b.jsx(ud,{getResetKey:()=>i,errorComponent:o,onCatch:(x,S)=>{if(Wa(x))throw x.routeId??=i.routeId,x;c?.(x,S)},children:p})),m&&(p=b.jsx(X.Suspense,{fallback:r,children:p}));const v=null,g=s.isRoot&&s.options.shellComponent;return g?b.jsx(vr.Provider,{value:i.routeId,children:b.jsxs(g,{children:[p,v]})}):b.jsxs(vr.Provider,{value:i.routeId,children:[p,v]})}var EE=X.memo(function({match:i}){const s=gn(),r=i.routeId,o=s.routesById[r],c=X.useMemo(()=>{const h=(o.options.remountDeps??s.options.defaultRemountDeps)?.({routeId:r,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return h?JSON.stringify(h):void 0},[r,i.loaderDeps,i._strictParams,i._strictSearch,o.options.remountDeps,s.options.defaultRemountDeps]),d=X.useMemo(()=>{const h=o.options.component??s.options.defaultComponent;return h?b.jsx(h,{},c):b.jsx(rb,{})},[c,o.options.component,s.options.defaultComponent]);if(i.status==="pending"){if(s.ssr&&!ab(s,o,i.ssr))return d;if(s._tx)throw s._tx[5];return No(s,o)}if(i.status==="notFound")return ib(s,o,i.error);if(i.status==="error")throw i.error;return d}),rb=X.memo(function(){const i=gn(),s=X.useContext(vr);let r,o,c;{const h=i.stores.getMatchStore(s);[r,o]=ea(h,m=>[!!m._notFound,m.error],{compare:xE}),c=ea(i.stores.ids,m=>m[m.indexOf(s)+1])}if(r)return ib(i,i.routesById[s],o);if(!c)return null;const d=b.jsx(sb,{routeId:c});return s===Pa?b.jsx(X.Suspense,{fallback:No(i),children:d}):d});function lb(t,i){const s=t[1];t.length=0,s?.(i)}function OE({t}){const i=gn(),s=i._rendered??=[];return i.startTransition=(r,o)=>new Promise(c=>{lb(s,!1),s.push(o,c),t(i),X.startTransition(r)}),wv(()=>{const r=i.history.subscribe(i.load);i.updateLatestLocation();const o=i.latestLocation,c=i.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(hn(o.publicHref)!==hn(c.publicHref))return i.commitLocation({...c,replace:!0,ignoreBlocker:!0}),r;const d=i.stores.resolvedLocation.get();return d?.href===o.href&&d.state.__TSR_key===o.state.__TSR_key?s.push(i.stores.matches.get(),h=>{h&&i.emit({type:"onRendered",...zo(d,d)})}):i._tx||i.load({sync:!0}).catch(console.error),r},[i,i.history]),null}function wE(){const t=gn(),i=t.routesById[Pa],s=No(t,i),r=b.jsxs(b.Fragment,{children:[b.jsx(OE,{t:X.useState()[1]}),t.ssr?b.jsx(xy,{}):b.jsx(X.Suspense,{fallback:s,children:b.jsx(xy,{})})]});return t.options.InnerWrap?b.jsx(t.options.InnerWrap,{children:r}):r}function xy(){const t=gn(),i=t._rendered,s=ea(t.stores.matches,d=>i[0]??d),r=s[0],o=r?.routeId;wv(()=>{i[0]===s&&lb(i,!0)},[i,s]);const c=o?b.jsx(sb,{routeId:o}):null;return t.options.disableGlobalCatchBoundary?c:b.jsx(ud,{getResetKey:()=>r,onCatch:void 0,children:c})}var zE=t=>({createMutableStore:py,createReadonlyStore:py,batch:J1}),TE=t=>new jE(t),jE=class extends _1{constructor(t){super(t,zE)}};function NE({router:t,children:i,...s}){Tv(s)&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const r=b.jsx(Fv.Provider,{value:t,children:i});return t.options.Wrap?b.jsx(t.options.Wrap,{children:r}):r}function AE({router:t,...i}){return b.jsx(NE,{router:t,...i,children:b.jsx(wE,{})})}const RE={sm:20,md:32,lg:48},CE=[{kind:"circle",cx:48,cy:48,r:10},{kind:"path",d:"M52.00 74.70 A27 27 0 1 0 44.00 74.70 L44.00 68.62 A21 21 0 1 1 52.00 68.62 Z"},{kind:"path",d:"M52.00 90.81 A43 43 0 1 0 44.00 90.81 L44.00 84.78 A37 37 0 1 1 52.00 84.78 Z"}];function ob({size:t="md",label:i,className:s=""}){const r=RE[t];return b.jsx("svg",{"data-pattern":"OgygieMark",viewBox:"0 0 96 96",width:r,height:r,fill:"currentColor",className:`shrink-0 ${s}`,...i===void 0?{"aria-hidden":!0}:{role:"img","aria-label":i},children:CE.map(o=>o.kind==="circle"?b.jsx("circle",{cx:o.cx,cy:o.cy,r:o.r},"citadel"):b.jsx("path",{d:o.d},o.d))})}const ME=t=>1-(1-t)**3;function DE(t,i){return t.toLocaleString("fr-FR",{minimumFractionDigits:i,maximumFractionDigits:i})}function kE(){if(typeof window>"u"||typeof getComputedStyle!="function")return 800;const t=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--duration-count"));return Number.isFinite(t)&&t>0?t:800}function _y(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function UE(t){const[i,s]=X.useState(()=>typeof window>"u"||typeof window.requestAnimationFrame!="function"||_y()?t:0),r=X.useRef(!1);return X.useEffect(()=>{if(r.current||typeof window.requestAnimationFrame!="function"||_y()){r.current=!0,s(t);return}r.current=!0;const o=kE();let c=null,d=0;const h=m=>{c===null&&(c=m);const p=Math.min(1,(m-c)/o);s(t*ME(p)),p<1&&(d=window.requestAnimationFrame(h))};return d=window.requestAnimationFrame(h),()=>window.cancelAnimationFrame(d)},[t]),i}function cd({value:t,format:i,decimals:s=0,className:r=""}){const o=UE(t),c=i===void 0?DE(o,s):i(o);return b.jsx("span",{"data-pattern":"Counter","data-value":t,className:`tabular-nums ${r}`,children:c})}function qf(t){const i=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>i.indexOf(+r)===-1).map(([r,o])=>o)}function Ey(t,i="|"){return t.map(s=>mb(s)).join(i)}function Bf(t,i){return typeof i=="bigint"?i.toString():i}class LE{constructor(i){this._getter=i,this._value=void 0}get value(){const i=this._getter;return i!==void 0&&(this._value=i(),this._getter=void 0),this._value}}function fd(t){return new LE(t)}function ZE(t){return t==null}function dd(t){const i=t.startsWith("^")?1:0,s=t.endsWith("$")?t.length-1:t.length;return t.slice(i,s)}function qE(t,i){const s=t/i,r=Math.round(s),o=4*Number.EPSILON*Math.max(Math.abs(s),1);return Math.abs(s-r)<o?0:s-r}function zi(t,i,s){Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}function ub(t){const i=Object.getOwnPropertyDescriptor(t,"shape");return i?.get?i.get.raw:i?.value}function Bn(t){return ub(t._zod.def)??t._zod.def.shape}function cb(t,i,s){Object.defineProperty(t,i,{get(){const r=s();return zi(this,i,r),r},enumerable:!0,configurable:!0})}function fb(t,i,s){i in t?zi(t,i,s):t[i]=s}function ta(t,i,s,r){const o=Bn(i);for(const c of s){const d=Object.getOwnPropertyDescriptor(o,c);d.enumerable&&(d.get?cb(t,c,()=>{const h=i._zod.def.shape[c];return r?r(h,c):h}):fb(t,c,r?r(d.value,c):d.value))}}function BE(t,i){for(const s of Reflect.ownKeys(i)){const r=Object.getOwnPropertyDescriptor(i,s);r.enumerable&&(r.get?cb(t,s,()=>i[s]):fb(t,s,r.value))}}function $t(...t){const i={};for(const s of t){const r=Object.getOwnPropertyDescriptors(s);Object.assign(i,r)}return Object.defineProperties({},i)}function HE(t){return JSON.stringify(t)}function $E(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const db="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function yo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const QE=fd(()=>{if(ln.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function es(t){if(yo(t)===!1)return!1;const i=t.constructor;if(i===void 0||typeof i!="function")return!0;const s=i.prototype;return!(yo(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function hb(t){return es(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}const GE=new Set(["string","number","symbol"]);function ts(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ti(t,i,s){const r=new t._zod.constr(i??t._zod.def);return(!i||s?.parent)&&(r._zod.parent=t),r}function ie(t){const i=t;if(!i)return{};if(typeof i=="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");i.error=i.message}return delete i.message,typeof i.error=="string"?{...i,error:()=>i.error}:i}function mb(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function KE(t){return Object.keys(t).filter(i=>t[i]._zod.optin!==void 0&&t[i]._zod.optout==="optional")}const pb={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]},YE={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function VE(t,i){const s=t._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return ta(c,t,Ao(t,i)),Ti(t,$t(s,{shape:c,checks:[]}))}function Ao(t,i){const s=Bn(t),r=[];for(const o of Reflect.ownKeys(i)){if(!Object.getOwnPropertyDescriptor(s,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);i[o]&&r.push(o)}return r}function FE(t,i){const s=t._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(Ao(t,i)),d={};return ta(d,t,Reflect.ownKeys(Bn(t)).filter(h=>!c.has(h))),Ti(t,$t(s,{shape:d,checks:[]}))}function PE(t,i){if(!es(i))throw new Error("Invalid input to extend: expected a plain object");const s=t._zod.def.checks;if(s&&s.length>0){const o=Bn(t);for(const c of Reflect.ownKeys(i))if(Object.getOwnPropertyDescriptor(o,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ti(t,$t(t._zod.def,{shape:gb(t,i)}))}function gb(t,i){const s={};return ta(s,t,Reflect.ownKeys(Bn(t))),BE(s,i),s}function XE(t,i){if(!es(i))throw new Error("Invalid input to safeExtend: expected a plain object");return Ti(t,$t(t._zod.def,{shape:gb(t,i)}))}function JE(t,i){if(!i?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const s={};ta(s,t,Reflect.ownKeys(Bn(t))),ta(s,i,Reflect.ownKeys(Bn(i)));const r=$t(t._zod.def,{shape:s,get catchall(){return i._zod.def.catchall},checks:i._zod.def.checks??[]});return Ti(t,r)}function Oy(t,i,s,r="partial"){const c=i._zod.def.checks;if(c&&c.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const h=s?new Set(Ao(i,s)):void 0,m={};return ta(m,i,Reflect.ownKeys(Bn(i)),t&&((p,v)=>h&&!h.has(v)?p:new t({type:"optional",innerType:p}))),Ti(i,$t(i._zod.def,{shape:m,checks:[]}))}function IE(t,i,s){const r=s?new Set(Ao(i,s)):void 0,o={};return ta(o,i,Reflect.ownKeys(Bn(i)),(c,d)=>r&&!r.has(d)?c:new t({type:"nonoptional",innerType:c})),Ti(i,$t(i._zod.def,{shape:o}))}function Un(t,i=0){if(t.aborted===!0)return!0;for(let s=i;s<t.issues.length;s++)if(t.issues[s]?.continue!==!0)return!0;return!1}function WE(t,i=0){if(t.aborted===!0)return!0;for(let s=i;s<t.issues.length;s++)if(t.issues[s]?.continue===!1)return!0;return!1}function Va(t,i){return i.map(s=>{var r;return(r=s).path??(r.path=[]),s.path.unshift(t),s})}function sr(t){return typeof t=="string"?t:t?.message}function wy(t){const i=[];for(const s of t??[]){const r=s._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&i.push([o,s])}return i}function Hf(t,i,s){var r;for(let o=i;o<t.length;o++)(r=t[o]).schema??(r.schema=s)}function xi(t,i,s){var r;const o=t.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=t).schema??(r.schema=t.inst):t.schema=t.inst);const c=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,d=t.message?t.message:sr(t.inst?._zod.def?.error?.(t))??sr(c?.(t))??sr(i?.error?.(t))??sr(s.customError?.(t))??sr(s.localeError?.(t))??"Invalid input",h={};for(const m of Object.keys(t))m==="inst"||m==="schema"||m==="continue"||m==="input"||m==="__proto__"||(h[m]=t[m]);return h.path??(h.path=[]),h.message=d,i?.reportInput&&(h.input=t.input),h}const eO=/[\uD800-\uDBFF]/;function hd(t){const i=t.length;if(!eO.test(t))return i;let s=i;for(let r=0;r<i-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(s--,r++);return s}function md(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function tO(t){const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";const s=t;if(s&&Object.getPrototypeOf(s)!==Object.prototype&&"constructor"in s&&s.constructor)return s.constructor.name}}return i}function br(...t){const[i,s,r]=t;return typeof i=="string"?{message:i,code:"custom",input:s,inst:r}:{...i}}function nO(t,i){for(const s in i){const r=Object.getOwnPropertyDescriptor(i,s);r.get?Object.defineProperty(t,s,{...r,enumerable:!1}):iO(t,s,r.value)}}function _i(t,i,s,r=!0){return Object.defineProperty(t,i,{configurable:!0,writable:!0,enumerable:r,value:s}),s}function yb(t,i,s){return _i(t,i,s,!1)}function vb(t,i){for(const s in t){const r=t[s];Object.defineProperty(i,s,{configurable:!0,enumerable:!0,get(){return _i(this,s,r(this))},set(o){_i(this,s,o)}})}return i}function iO(t,i,s){Object.defineProperty(t,i,{configurable:!0,get(){return this==null?s:_i(this,i,s.bind(this))},set(r){_i(this,i,r)}})}function aO(t,i){const s=Object.getPrototypeOf(t);return i in s?void 0:s}let gf,mi=!1;const sO={configurable:!0,get(){mi=!0}};function Ne(t,i,s){const r=Object.getPrototypeOf(t._zod);if(i in r&&gf!==t._zod){gf=void 0;return}gf=t._zod,Object.defineProperty(r,i,{configurable:!0,get(){Object.defineProperty(this,i,sO);const o=mi;mi=!1;try{const c=s(this);return mi?delete this[i]:Object.defineProperty(this,i,{configurable:!0,writable:!0,value:c}),mi=mi||o,c}catch(c){throw delete this[i],mi=mi||o,c}},set(o){Object.defineProperty(this,i,{configurable:!0,writable:!0,value:o})}})}function rO(t,i,s,r){const o=aO(t,i);o&&Object.defineProperty(o,i,{configurable:!0,get(){const c={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,i,c),c.value=s(this),Object.defineProperty(this,i,c),c.value},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:r,value:c})}})}const lO="~constantCatch";function oO(t){const i=()=>t;return i[lO]=!0,i}var zy;const yf={value:void 0,enumerable:!1};let Ty="captureStackTrace"in Error?Error:null;function uO(t){const i=Ty;if(i){const s=i.stackTraceLimit;if(typeof s=="number"){try{i.stackTraceLimit=0}catch{return Ty=null,new t}try{return new t}finally{i.stackTraceLimit=s}}}return new t}function $(t,i,s,r){const o={};function c(x){this.def=x,this.constr=g,this.traits=new Set}c.prototype=o;const d=s,h=d&&new WeakSet;function m(x,S){if(x._zod){if(x._zod.traits.has(t))return}else{yf.value=new c(S);try{Object.defineProperty(x,"_zod",yf)}finally{yf.value=void 0}}if(x._zod.traits.add(t),i(x,S),h){const O=Object.getPrototypeOf(x),T=x._zod.constr.prototype;let R=O;for(;R&&R!==T;)R=Object.getPrototypeOf(R);const q=R??O;h.has(q)||(h.add(q),nO(q,d))}const E=g.prototype;for(const O in E)Object.prototype.hasOwnProperty.call(E,O)&&(O in x||(x[O]=E[O].bind(x)))}const p=r?.Parent??Object;class v extends p{}Object.defineProperty(v,"name",{value:t});function g(x){const S=r?.Parent?uO(v):this;m(S,x);const E=S._zod.deferred;if(E){for(const T of E)T();S._zod.deferred=void 0}const O=globalThis.__zod_globalConfig?.postProcessor;return O&&O(S),S}return Object.defineProperty(g,"init",{value:m}),Object.defineProperty(g,Symbol.hasInstance,{value:x=>r?.Parent&&x instanceof r.Parent?!0:x?._zod?.traits?.has(t)}),Object.defineProperty(g,"name",{value:t}),g}class Ii extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class bb extends Error{constructor(i){super(`Encountered unidirectional transform during encode: ${i}`),this.name="ZodEncodeError"}}(zy=globalThis).__zod_globalConfig??(zy.__zod_globalConfig={});const ln=globalThis.__zod_globalConfig;function pn(t){return t&&Object.assign(ln,t),ln}function cO(){const t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Bf,2)),t.message}function fO(t){this._zod.message=t}const dO={get:cO,set:fO,enumerable:!0,configurable:!0},vf={value:void 0,enumerable:!1},jy=new WeakSet([Object.prototype,Error.prototype]),hO=(t,i)=>{t.name="$ZodError",vf.value=i,Object.defineProperty(t,"issues",vf),vf.value=void 0,Object.defineProperty(t,"message",dO);const s=Object.getPrototypeOf(t);jy.has(s)||(jy.add(s),Object.defineProperty(s,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},mO=$("$ZodError",hO);function pO(t,i,s){return Object.prototype.hasOwnProperty.call(t,i)||(i==="__proto__"?Object.defineProperty(t,i,{value:s(),writable:!0,enumerable:!0,configurable:!0}):t[i]=s()),t[i]}function gO(t,i=s=>s.message){const s={},r=[];for(const o of t.issues)o.path.length>0?pO(s,o.path[0],()=>[]).push(i(o)):r.push(i(o));return{formErrors:r,fieldErrors:s}}function yO(t,i=s=>s.message){const s={_errors:[]},r=(o,c=[])=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h},[...c,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...c,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...c,...d.path]);else{const h=[...c,...d.path];if(h.length===0)s._errors.push(i(d));else{let m=s,p=0;for(;p<h.length;){const v=h[p],g=p===h.length-1;if(v==="_errors"){g&&m._errors.push(i(d)),p++;continue}Object.prototype.hasOwnProperty.call(m,v)||Object.defineProperty(m,v,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const x=m[v];g&&x._errors.push(i(d)),m=x,p++}}}};return r(t),s}function Ro(t,i){return{callee:i?.callee??t,Err:i?.Err}}const pd=t=>{const i=(s,r,o,c)=>{const d=o?{...o,async:!1}:{async:!1},h=s._zod.run({value:r,issues:[]},d);if(h instanceof Promise)throw new Ii;if(h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>xi(p,d,pn())));throw db(m,c?.callee??i),m}return h.value};return i},gd=t=>{const i=async(s,r,o,c)=>{const d=o?{...o,async:!0}:{async:!0};let h=s._zod.run({value:r,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>xi(p,d,pn())));throw db(m,c?.callee??i),m}return h.value};return i},yd=t=>(i,s,r)=>{const o=r?{...r,async:!1}:{async:!1},c=i._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Ii;return c.issues.length?Sb(t,c.issues,o):{success:!0,data:c.value}};function Sb(t,i,s){let r;return{success:!1,get error(){return r||(r=new t(i.map(o=>xi(o,s,pn()))),i=void 0,s=void 0),r},set error(o){r=o,i=void 0,s=void 0}}}const vd=t=>async(i,s,r)=>{const o=r?{...r,async:!0}:{async:!0};let c=i._zod.run({value:s,issues:[]},o);return c instanceof Promise&&(c=await c),c.issues.length?Sb(t,c.issues,o):{success:!0,data:c.value}},vO=Symbol.for("zod.compile.invalid"),bO=Symbol.for("zod.compile.fallback"),SO=((t,i,s)=>{const r=t._zod.bag.validator;if(r!==void 0){if(r(i)!==vO)return!0;if(r.definite===!0&&s===void 0)return!1}return xO(t,i,s)});function xO(t,i,s){const r=s?{...s,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=t._zod.bag.fallbackRun;let c;if(o?(r[bO]=!0,c=o({value:i,issues:[]},r)):c=t._zod.run({value:i,issues:[]},r),c instanceof Promise)throw new Ii;return c.issues.length===0}const _O=async(t,i,s)=>{const r=s?{...s,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=t._zod.run({value:i,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},EO=t=>{const i=pd(t),s=(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return i(r,o,h,Ro(s,d))};return s},OO=t=>{const i=pd(t),s=(r,o,c,d)=>i(r,o,c,Ro(s,d));return s},wO=t=>{const i=gd(t),s=async(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return await i(r,o,h,Ro(s,d))};return s},zO=t=>{const i=gd(t),s=async(r,o,c,d)=>await i(r,o,c,Ro(s,d));return s},TO=t=>(i,s,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return yd(t)(i,s,o)},jO=t=>(i,s,r)=>yd(t)(i,s,r),NO=t=>async(i,s,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return vd(t)(i,s,o)},AO=t=>async(i,s,r)=>vd(t)(i,s,r),RO=/^[cC][0-9a-z]{6,}$/,CO=/^[0-9a-z]+$/,MO=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,DO=/^[0-9a-vA-V]{20}$/,kO=/^[A-Za-z0-9]{27}$/,UO=/^[a-zA-Z0-9_-]{21}$/;function LO(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}const ZO=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,qO=/^([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})$/,Ny=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,BO=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,HO="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function $O(){return new RegExp(HO,"u")}const QO=/^(?:(?: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])$/,GO=/^(([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}|:))$/,KO=/^((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])$/,YO=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,VO=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,FO=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,PO=/^https?$/,XO=/^\+[1-9]\d{6,14}$/,xb="(?:(?:\\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])))";function JO(t){return new RegExp(`^${t}$`)}const IO=JO(xb);function $f(t){const i="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${i}`:t.precision===0?`${i}:[0-5]\\d`:`${i}:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?`${i}:[0-5]\\d(?:\\.\\d+)?`:`${i}(?::[0-5]\\d(?:\\.\\d+)?)?`}function WO(t){return new RegExp(`^${$f(t)}$`)}function e2(t){const i=["Z"];t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${$f({precision:t.precision,seconds:!0})}(?:${i.join("|")})`,r=t.local?`${s}|${$f({precision:t.precision})}`:s;return new RegExp(`^${xb}T(?:${r})$`)}const t2=/^[\s\S]{0,}$/,n2=/^-?\d+$/,bd=/^-?\d+(?:\.\d+)?$/,i2=/^(?:true|false)$/i,a2=/^[^A-Z]*$/,s2=/^[^a-z]*$/,At=$("$ZodCheck",(t,i)=>{var s;t._zod??(t._zod={}),t._zod.def=i,(s=t._zod).onattach??(s.onattach=[])}),Sd=t=>{const i=t.value;return!ZE(i)&&i.length!==void 0},vo={number:"number",bigint:"bigint",object:"date"},_b=$("$ZodCheckLessThan",(t,i)=>{At.init(t,i);const s=vo[typeof i.value];t._zod.check=r=>{(i.inclusive?r.value<=i.value:r.value<i.value)||r.issues.push({origin:vo[typeof r.value]??s,code:"too_big",maximum:typeof i.value=="object"?i.value.getTime():i.value,input:r.value,inclusive:i.inclusive,inst:t,continue:!i.abort})}}),Eb=$("$ZodCheckGreaterThan",(t,i)=>{At.init(t,i);const s=vo[typeof i.value];t._zod.check=r=>{(i.inclusive?r.value>=i.value:r.value>i.value)||r.issues.push({origin:vo[typeof r.value]??s,code:"too_small",minimum:typeof i.value=="object"?i.value.getTime():i.value,input:r.value,inclusive:i.inclusive,inst:t,continue:!i.abort})}}),r2=$("$ZodCheckMultipleOf",(t,i)=>{At.init(t,i),t._zod.check=s=>{if(typeof s.value!=typeof i.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof s.value=="bigint"?i.value!==BigInt(0)&&s.value%i.value===BigInt(0):qE(s.value,i.value)===0)||s.issues.push({origin:typeof s.value,code:"not_multiple_of",divisor:i.value,input:s.value,inst:t,continue:!i.abort})}}),l2=$("$ZodCheckNumberFormat",(t,i)=>{At.init(t,i),i.format=i.format||"float64";const s=i.format?.includes("int"),r=s?"int":"number",[o,c]=pb[i.format];t._zod.check=d=>{const h=d.value;if(s){if(!Number.isInteger(h)){d.issues.push({expected:r,format:i.format,code:"invalid_type",continue:!1,input:h,inst:t});return}if(!Number.isSafeInteger(h)){h>0?d.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!i.abort}):d.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!i.abort});return}}h<o&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!i.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:t,continue:!i.abort})}}),o2=$("$ZodCheckMaxLength",(t,i)=>{var s;At.init(t,i),(s=t._zod.def).when??(s.when=Sd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>i.maximum?hd(o):c)<=i.maximum)return;const h=md(o);r.issues.push({origin:h,code:"too_big",maximum:i.maximum,inclusive:!0,input:o,inst:t,continue:!i.abort})}}),u2=$("$ZodCheckMinLength",(t,i)=>{var s;At.init(t,i),(s=t._zod.def).when??(s.when=Sd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>=i.minimum&&c<i.minimum*2?hd(o):c)>=i.minimum)return;const h=md(o);r.issues.push({origin:h,code:"too_small",minimum:i.minimum,inclusive:!0,input:o,inst:t,continue:!i.abort})}}),c2=$("$ZodCheckLengthEquals",(t,i)=>{var s;At.init(t,i),(s=t._zod.def).when??(s.when=Sd),t._zod.check=r=>{const o=r.value,c=o.length,d=typeof o=="string"&&c>=i.length&&c<=i.length*2?hd(o):c;if(d===i.length)return;const h=md(o),m=d>i.length;r.issues.push({origin:h,...m?{code:"too_big",maximum:i.length}:{code:"too_small",minimum:i.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!i.abort})}}),Co=$("$ZodCheckStringFormat",(t,i)=>{var s,r;At.init(t,i),i.pattern?(s=t._zod).check??(s.check=o=>{i.pattern.lastIndex=0,!i.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:i.format,input:o.value,...i.pattern?{pattern:i.pattern.toString()}:{},inst:t,continue:!i.abort})}):(r=t._zod).check??(r.check=()=>{})}),f2=$("$ZodCheckRegex",(t,i)=>{Co.init(t,i),t._zod.check=s=>{i.pattern.lastIndex=0,!i.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:i.pattern.toString(),inst:t,continue:!i.abort})}}),d2=$("$ZodCheckLowerCase",(t,i)=>{i.pattern??(i.pattern=a2),Co.init(t,i)}),h2=$("$ZodCheckUpperCase",(t,i)=>{i.pattern??(i.pattern=s2),Co.init(t,i)}),m2=$("$ZodCheckIncludes",(t,i)=>{At.init(t,i);const s=ts(i.includes),r=new RegExp(typeof i.position=="number"?`^.{${i.position},}${s}`:s);i.pattern=r,t._zod.check=o=>{o.value.includes(i.includes,i.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:i.includes,input:o.value,inst:t,continue:!i.abort})}}),p2=$("$ZodCheckStartsWith",(t,i)=>{At.init(t,i);const s=new RegExp(`^${ts(i.prefix)}.*`);i.pattern??(i.pattern=s),t._zod.check=r=>{r.value.startsWith(i.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:i.prefix,input:r.value,inst:t,continue:!i.abort})}}),g2=$("$ZodCheckEndsWith",(t,i)=>{At.init(t,i);const s=new RegExp(`.*${ts(i.suffix)}$`);i.pattern??(i.pattern=s),t._zod.check=r=>{r.value.endsWith(i.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:i.suffix,input:r.value,inst:t,continue:!i.abort})}}),y2=$("$ZodCheckOverwrite",(t,i)=>{At.init(t,i),t._zod.check=s=>{s.value=i.tx(s.value)}});class v2{constructor(i=[],s={}){this.content=[],this.indent=0,this.args=i,this.closed=s}indented(i){this.indent+=1;try{i(this)}finally{this.indent-=1}}write(i){if(typeof i=="function"){i(this,{execution:"sync"}),i(this,{execution:"async"});return}const r=i.split(`
8
+ `+l.stack}}var qo=Object.prototype.hasOwnProperty,Bo=t.unstable_scheduleCallback,Ho=t.unstable_cancelCallback,w0=t.unstable_shouldYield,O0=t.unstable_requestPaint,Rt=t.unstable_now,z0=t.unstable_getCurrentPriorityLevel,jd=t.unstable_ImmediatePriority,Nd=t.unstable_UserBlockingPriority,wr=t.unstable_NormalPriority,T0=t.unstable_LowPriority,Ad=t.unstable_IdlePriority,j0=t.log,N0=t.unstable_setDisableYieldValue,cs=null,Ct=null;function Qn(e){if(typeof j0=="function"&&N0(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(cs,e)}catch{}}var Mt=Math.clz32?Math.clz32:C0,A0=Math.log,R0=Math.LN2;function C0(e){return e>>>=0,e===0?32:31-(A0(e)/R0|0)|0}var Or=256,zr=262144,Tr=4194304;function Ri(e){var n=e&42;if(n!==0)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function jr(e,n,a){var l=e.pendingLanes;if(l===0)return 0;var u=0,f=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var _=l&134217727;return _!==0?(l=_&~f,l!==0?u=Ri(l):(g&=_,g!==0?u=Ri(g):a||(a=_&~e,a!==0&&(u=Ri(a))))):(_=l&~f,_!==0?u=Ri(_):g!==0?u=Ri(g):a||(a=l&~e,a!==0&&(u=Ri(a)))),u===0?0:n!==0&&n!==u&&(n&f)===0&&(f=u&-u,a=n&-n,f>=a||f===32&&(a&4194048)!==0)?n:u}function fs(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function M0(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return n+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rd(){var e=Tr;return Tr<<=1,(Tr&62914560)===0&&(Tr=4194304),e}function $o(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function ds(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function D0(e,n,a,l,u,f){var g=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var _=e.entanglements,O=e.expirationTimes,D=e.hiddenUpdates;for(a=g&~a;0<a;){var B=31-Mt(a),Q=1<<B;_[B]=0,O[B]=-1;var k=D[B];if(k!==null)for(D[B]=null,B=0;B<k.length;B++){var L=k[B];L!==null&&(L.lane&=-536870913)}a&=~Q}l!==0&&Cd(e,l,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(g&~n))}function Cd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-Mt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Md(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var l=31-Mt(a),u=1<<l;u&n|e[l]&n&&(e[l]|=n),a&=~u}}function Dd(e,n){var a=n&-n;return a=(a&42)!==0?1:Qo(a),(a&(e.suspendedLanes|n))!==0?0:a}function Qo(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Go(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function kd(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Sg(e.type))}function Ud(e,n){var a=J.p;try{return J.p=e,n()}finally{J.p=a}}var Gn=Math.random().toString(36).slice(2),lt="__reactFiber$"+Gn,St="__reactProps$"+Gn,ra="__reactContainer$"+Gn,Ko="__reactEvents$"+Gn,k0="__reactListeners$"+Gn,U0="__reactHandles$"+Gn,Ld="__reactResources$"+Gn,hs="__reactMarker$"+Gn;function Yo(e){delete e[lt],delete e[St],delete e[Ko],delete e[k0],delete e[U0]}function la(e){var n=e[lt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[ra]||a[lt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=ag(e);e!==null;){if(a=e[lt])return a;e=ag(e)}return n}e=a,a=e.parentNode}return null}function oa(e){if(e=e[lt]||e[ra]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function ms(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function ua(e){var n=e[Ld];return n||(n=e[Ld]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function at(e){e[hs]=!0}var Zd=new Set,qd={};function Ci(e,n){ca(e,n),ca(e+"Capture",n)}function ca(e,n){for(qd[e]=n,e=0;e<n.length;e++)Zd.add(n[e])}var L0=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]*$"),Bd={},Hd={};function Z0(e){return qo.call(Hd,e)?!0:qo.call(Bd,e)?!1:L0.test(e)?Hd[e]=!0:(Bd[e]=!0,!1)}function Nr(e,n,a){if(Z0(n))if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var l=n.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+a)}}function Ar(e,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+a)}}function vn(e,n,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+l)}}function Gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function $d(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function q0(e,n,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var u=l.get,f=l.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(g){a=""+g,f.call(this,g)}}),Object.defineProperty(e,n,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(g){a=""+g},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Fo(e){if(!e._valueTracker){var n=$d(e)?"checked":"value";e._valueTracker=q0(e,n,""+e[n])}}function Qd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return e&&(l=$d(e)?e.checked?"true":"false":e.value),e=l,e!==a?(n.setValue(e),!0):!1}function Rr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var B0=/[\n"\\]/g;function Kt(e){return e.replace(B0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Vo(e,n,a,l,u,f,g,_){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),n!=null?g==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Gt(n)):e.value!==""+Gt(n)&&(e.value=""+Gt(n)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),n!=null?Po(e,g,Gt(n)):a!=null?Po(e,g,Gt(a)):l!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Gt(_):e.removeAttribute("name")}function Gd(e,n,a,l,u,f,g,_){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),n!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||n!=null)){Fo(e);return}a=a!=null?""+Gt(a):"",n=n!=null?""+Gt(n):a,_||n===e.value||(e.value=n),e.defaultValue=n}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=_?e.checked:!!l,e.defaultChecked=!!l,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),Fo(e)}function Po(e,n,a){n==="number"&&Rr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function fa(e,n,a,l){if(e=e.options,n){n={};for(var u=0;u<a.length;u++)n["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=n.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Gt(a),n=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Kd(e,n,a){if(n!=null&&(n=""+Gt(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+Gt(a):""}function Yd(e,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error(r(92));if(de(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),n=a}a=Gt(n),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Fo(e)}function da(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var H0=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 Fd(e,n,a){var l=n.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":l?e.setProperty(n,a):typeof a!="number"||a===0||H0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function Vd(e,n,a){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||n!=null&&n.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var u in n)l=n[u],n.hasOwnProperty(u)&&a[u]!==l&&Fd(e,u,l)}else for(var f in n)n.hasOwnProperty(f)&&Fd(e,f,n[f])}function Xo(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var $0=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"]]),Q0=/^[\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 Cr(e){return Q0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function bn(){}var Jo=null;function Io(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ha=null,ma=null;function Pd(e){var n=oa(e);if(n&&(e=n.stateNode)){var a=e[St]||null;e:switch(e=n.stateNode,n.type){case"input":if(Vo(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Kt(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==e&&l.form===e.form){var u=l[St]||null;if(!u)throw Error(r(90));Vo(l,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<a.length;n++)l=a[n],l.form===e.form&&Qd(l)}break e;case"textarea":Kd(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&fa(e,!!a.multiple,n,!1)}}}var Wo=!1;function Xd(e,n,a){if(Wo)return e(n,a);Wo=!0;try{var l=e(n);return l}finally{if(Wo=!1,(ha!==null||ma!==null)&&(bl(),ha&&(n=ha,e=ma,ma=ha=null,Pd(n),e)))for(n=0;n<e.length;n++)Pd(e[n])}}function ps(e,n){var a=e.stateNode;if(a===null)return null;var l=a[St]||null;if(l===null)return null;a=l[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(r(231,n,typeof a));return a}var Sn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),eu=!1;if(Sn)try{var gs={};Object.defineProperty(gs,"passive",{get:function(){eu=!0}}),window.addEventListener("test",gs,gs),window.removeEventListener("test",gs,gs)}catch{eu=!1}var Kn=null,tu=null,Mr=null;function Jd(){if(Mr)return Mr;var e,n=tu,a=n.length,l,u="value"in Kn?Kn.value:Kn.textContent,f=u.length;for(e=0;e<a&&n[e]===u[e];e++);var g=a-e;for(l=1;l<=g&&n[a-l]===u[f-l];l++);return Mr=u.slice(e,1<l?1-l:void 0)}function Dr(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function kr(){return!0}function Id(){return!1}function xt(e){function n(a,l,u,f,g){this._reactName=a,this._targetInst=u,this.type=l,this.nativeEvent=f,this.target=g,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(a=e[_],this[_]=a?a(f):f[_]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?kr:Id,this.isPropagationStopped=Id,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=kr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=kr)},persist:function(){},isPersistent:kr}),n}var Mi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ur=xt(Mi),ys=y({},Mi,{view:0,detail:0}),G0=xt(ys),nu,iu,vs,Lr=y({},ys,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:su,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==vs&&(vs&&e.type==="mousemove"?(nu=e.screenX-vs.screenX,iu=e.screenY-vs.screenY):iu=nu=0,vs=e),nu)},movementY:function(e){return"movementY"in e?e.movementY:iu}}),Wd=xt(Lr),K0=y({},Lr,{dataTransfer:0}),Y0=xt(K0),F0=y({},ys,{relatedTarget:0}),au=xt(F0),V0=y({},Mi,{animationName:0,elapsedTime:0,pseudoElement:0}),P0=xt(V0),X0=y({},Mi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),J0=xt(X0),I0=y({},Mi,{data:0}),eh=xt(I0),W0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},eS={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"},tS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function nS(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=tS[e])?!!n[e]:!1}function su(){return nS}var iS=y({},ys,{key:function(e){if(e.key){var n=W0[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Dr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?eS[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:su,charCode:function(e){return e.type==="keypress"?Dr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Dr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),aS=xt(iS),sS=y({},Lr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),th=xt(sS),rS=y({},ys,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:su}),lS=xt(rS),oS=y({},Mi,{propertyName:0,elapsedTime:0,pseudoElement:0}),uS=xt(oS),cS=y({},Lr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),fS=xt(cS),dS=y({},Mi,{newState:0,oldState:0}),hS=xt(dS),mS=[9,13,27,32],ru=Sn&&"CompositionEvent"in window,bs=null;Sn&&"documentMode"in document&&(bs=document.documentMode);var pS=Sn&&"TextEvent"in window&&!bs,nh=Sn&&(!ru||bs&&8<bs&&11>=bs),ih=" ",ah=!1;function sh(e,n){switch(e){case"keyup":return mS.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pa=!1;function gS(e,n){switch(e){case"compositionend":return rh(n);case"keypress":return n.which!==32?null:(ah=!0,ih);case"textInput":return e=n.data,e===ih&&ah?null:e;default:return null}}function yS(e,n){if(pa)return e==="compositionend"||!ru&&sh(e,n)?(e=Jd(),Mr=tu=Kn=null,pa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return nh&&n.locale!=="ko"?null:n.data;default:return null}}var vS={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 lh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!vS[e.type]:n==="textarea"}function oh(e,n,a,l){ha?ma?ma.push(l):ma=[l]:ha=l,n=zl(n,"onChange"),0<n.length&&(a=new Ur("onChange","change",null,a,l),e.push({event:a,listeners:n}))}var Ss=null,xs=null;function bS(e){Gp(e,0)}function Zr(e){var n=ms(e);if(Qd(n))return e}function uh(e,n){if(e==="change")return n}var ch=!1;if(Sn){var lu;if(Sn){var ou="oninput"in document;if(!ou){var fh=document.createElement("div");fh.setAttribute("oninput","return;"),ou=typeof fh.oninput=="function"}lu=ou}else lu=!1;ch=lu&&(!document.documentMode||9<document.documentMode)}function dh(){Ss&&(Ss.detachEvent("onpropertychange",hh),xs=Ss=null)}function hh(e){if(e.propertyName==="value"&&Zr(xs)){var n=[];oh(n,xs,e,Io(e)),Xd(bS,n)}}function SS(e,n,a){e==="focusin"?(dh(),Ss=n,xs=a,Ss.attachEvent("onpropertychange",hh)):e==="focusout"&&dh()}function xS(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Zr(xs)}function _S(e,n){if(e==="click")return Zr(n)}function ES(e,n){if(e==="input"||e==="change")return Zr(n)}function wS(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Dt=typeof Object.is=="function"?Object.is:wS;function _s(e,n){if(Dt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),l=Object.keys(n);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var u=a[l];if(!qo.call(n,u)||!Dt(e[u],n[u]))return!1}return!0}function mh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ph(e,n){var a=mh(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=n&&l>=n)return{node:a,offset:n-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=mh(a)}}function gh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?gh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function yh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Rr(e.document);n instanceof e.HTMLIFrameElement;){try{var a=typeof n.contentWindow.location.href=="string"}catch{a=!1}if(a)e=n.contentWindow;else break;n=Rr(e.document)}return n}function uu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var OS=Sn&&"documentMode"in document&&11>=document.documentMode,ga=null,cu=null,Es=null,fu=!1;function vh(e,n,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;fu||ga==null||ga!==Rr(l)||(l=ga,"selectionStart"in l&&uu(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Es&&_s(Es,l)||(Es=l,l=zl(cu,"onSelect"),0<l.length&&(n=new Ur("onSelect","select",null,n,a),e.push({event:n,listeners:l}),n.target=ga)))}function Di(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var ya={animationend:Di("Animation","AnimationEnd"),animationiteration:Di("Animation","AnimationIteration"),animationstart:Di("Animation","AnimationStart"),transitionrun:Di("Transition","TransitionRun"),transitionstart:Di("Transition","TransitionStart"),transitioncancel:Di("Transition","TransitionCancel"),transitionend:Di("Transition","TransitionEnd")},du={},bh={};Sn&&(bh=document.createElement("div").style,"AnimationEvent"in window||(delete ya.animationend.animation,delete ya.animationiteration.animation,delete ya.animationstart.animation),"TransitionEvent"in window||delete ya.transitionend.transition);function ki(e){if(du[e])return du[e];if(!ya[e])return e;var n=ya[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in bh)return du[e]=n[a];return e}var Sh=ki("animationend"),xh=ki("animationiteration"),_h=ki("animationstart"),zS=ki("transitionrun"),TS=ki("transitionstart"),jS=ki("transitioncancel"),Eh=ki("transitionend"),wh=new Map,hu="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(" ");hu.push("scrollEnd");function tn(e,n){wh.set(e,n),Ci(n,[e])}var qr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Yt=[],va=0,mu=0;function Br(){for(var e=va,n=mu=va=0;n<e;){var a=Yt[n];Yt[n++]=null;var l=Yt[n];Yt[n++]=null;var u=Yt[n];Yt[n++]=null;var f=Yt[n];if(Yt[n++]=null,l!==null&&u!==null){var g=l.pending;g===null?u.next=u:(u.next=g.next,g.next=u),l.pending=u}f!==0&&Oh(a,u,f)}}function Hr(e,n,a,l){Yt[va++]=e,Yt[va++]=n,Yt[va++]=a,Yt[va++]=l,mu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function pu(e,n,a,l){return Hr(e,n,a,l),$r(e)}function Ui(e,n){return Hr(e,null,null,n),$r(e)}function Oh(e,n,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var u=!1,f=e.return;f!==null;)f.childLanes|=a,l=f.alternate,l!==null&&(l.childLanes|=a),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(u=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,u&&n!==null&&(u=31-Mt(a),e=f.hiddenUpdates,l=e[u],l===null?e[u]=[n]:l.push(n),n.lane=a|536870912),f):null}function $r(e){if(50<Ks)throw Ks=0,wc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ba={};function NS(e,n,a,l){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kt(e,n,a,l){return new NS(e,n,a,l)}function gu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function xn(e,n){var a=e.alternate;return a===null?(a=kt(e.tag,n,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=n,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,n=e.dependencies,a.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function zh(e,n){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,n=a.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Qr(e,n,a,l,u,f){var g=0;if(l=e,typeof e=="function")gu(e)&&(g=1);else if(typeof e=="string")g=Dx(e,a,I.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case re:return e=kt(31,a,n,u),e.elementType=re,e.lanes=f,e;case w:return Li(a.children,u,f,n);case z:g=8,u|=24;break;case R:return e=kt(12,a,n,u|2),e.elementType=R,e.lanes=f,e;case P:return e=kt(13,a,n,u),e.elementType=P,e.lanes=f,e;case C:return e=kt(19,a,n,u),e.elementType=C,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:g=10;break e;case q:g=9;break e;case K:g=11;break e;case N:g=14;break e;case F:g=16,l=null;break e}g=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return n=kt(g,a,n,u),n.elementType=e,n.type=l,n.lanes=f,n}function Li(e,n,a,l){return e=kt(7,e,l,n),e.lanes=a,e}function yu(e,n,a){return e=kt(6,e,null,n),e.lanes=a,e}function Th(e){var n=kt(18,null,null,0);return n.stateNode=e,n}function vu(e,n,a){return n=kt(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var jh=new WeakMap;function Ft(e,n){if(typeof e=="object"&&e!==null){var a=jh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Td(n)},jh.set(e,n),n)}return{value:e,source:n,stack:Td(n)}}var Sa=[],xa=0,Gr=null,ws=0,Vt=[],Pt=0,Yn=null,un=1,cn="";function _n(e,n){Sa[xa++]=ws,Sa[xa++]=Gr,Gr=e,ws=n}function Nh(e,n,a){Vt[Pt++]=un,Vt[Pt++]=cn,Vt[Pt++]=Yn,Yn=e;var l=un;e=cn;var u=32-Mt(l)-1;l&=~(1<<u),a+=1;var f=32-Mt(n)+u;if(30<f){var g=u-u%5;f=(l&(1<<g)-1).toString(32),l>>=g,u-=g,un=1<<32-Mt(n)+u|a<<u|l,cn=f+e}else un=1<<f|a<<u|l,cn=e}function bu(e){e.return!==null&&(_n(e,1),Nh(e,1,0))}function Su(e){for(;e===Gr;)Gr=Sa[--xa],Sa[xa]=null,ws=Sa[--xa],Sa[xa]=null;for(;e===Yn;)Yn=Vt[--Pt],Vt[Pt]=null,cn=Vt[--Pt],Vt[Pt]=null,un=Vt[--Pt],Vt[Pt]=null}function Ah(e,n){Vt[Pt++]=un,Vt[Pt++]=cn,Vt[Pt++]=Yn,un=n.id,cn=n.overflow,Yn=e}var ot=null,Ze=null,Ee=!1,Fn=null,Xt=!1,xu=Error(r(519));function Vn(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Os(Ft(n,e)),xu}function Rh(e){var n=e.stateNode,a=e.type,l=e.memoizedProps;switch(n[lt]=e,n[St]=l,a){case"dialog":be("cancel",n),be("close",n);break;case"iframe":case"object":case"embed":be("load",n);break;case"video":case"audio":for(a=0;a<Fs.length;a++)be(Fs[a],n);break;case"source":be("error",n);break;case"img":case"image":case"link":be("error",n),be("load",n);break;case"details":be("toggle",n);break;case"input":be("invalid",n),Gd(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":be("invalid",n);break;case"textarea":be("invalid",n),Yd(n,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||n.textContent===""+a||l.suppressHydrationWarning===!0||Vp(n.textContent,a)?(l.popover!=null&&(be("beforetoggle",n),be("toggle",n)),l.onScroll!=null&&be("scroll",n),l.onScrollEnd!=null&&be("scrollend",n),l.onClick!=null&&(n.onclick=bn),n=!0):n=!1,n||Vn(e,!0)}function Ch(e){for(ot=e.return;ot;)switch(ot.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:ot=ot.return}}function _a(e){if(e!==ot)return!1;if(!Ee)return Ch(e),Ee=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||qc(e.type,e.memoizedProps)),a=!a),a&&Ze&&Vn(e),Ch(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ze=ig(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ze=ig(e)}else n===27?(n=Ze,oi(e.type)?(e=Gc,Gc=null,Ze=e):Ze=n):Ze=ot?It(e.stateNode.nextSibling):null;return!0}function Zi(){Ze=ot=null,Ee=!1}function _u(){var e=Fn;return e!==null&&(Ot===null?Ot=e:Ot.push.apply(Ot,e),Fn=null),e}function Os(e){Fn===null?Fn=[e]:Fn.push(e)}var Eu=j(null),qi=null,En=null;function Pn(e,n,a){V(Eu,n._currentValue),n._currentValue=a}function wn(e){e._currentValue=Eu.current,Z(Eu)}function wu(e,n,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,l!==null&&(l.childLanes|=n)):l!==null&&(l.childLanes&n)!==n&&(l.childLanes|=n),e===a)break;e=e.return}}function Ou(e,n,a,l){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var f=u.dependencies;if(f!==null){var g=u.child;f=f.firstContext;e:for(;f!==null;){var _=f;f=u;for(var O=0;O<n.length;O++)if(_.context===n[O]){f.lanes|=a,_=f.alternate,_!==null&&(_.lanes|=a),wu(f.return,a,e),l||(g=null);break e}f=_.next}}else if(u.tag===18){if(g=u.return,g===null)throw Error(r(341));g.lanes|=a,f=g.alternate,f!==null&&(f.lanes|=a),wu(g,a,e),g=null}else g=u.child;if(g!==null)g.return=u;else for(g=u;g!==null;){if(g===e){g=null;break}if(u=g.sibling,u!==null){u.return=g.return,g=u;break}g=g.return}u=g}}function Ea(e,n,a,l){e=null;for(var u=n,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var g=u.alternate;if(g===null)throw Error(r(387));if(g=g.memoizedProps,g!==null){var _=u.type;Dt(u.pendingProps.value,g.value)||(e!==null?e.push(_):e=[_])}}else if(u===we.current){if(g=u.alternate,g===null)throw Error(r(387));g.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(Is):e=[Is])}u=u.return}e!==null&&Ou(n,e,a,l),n.flags|=262144}function Kr(e){for(e=e.firstContext;e!==null;){if(!Dt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Bi(e){qi=e,En=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ut(e){return Mh(qi,e)}function Yr(e,n){return qi===null&&Bi(e),Mh(e,n)}function Mh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},En===null){if(e===null)throw Error(r(308));En=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else En=En.next=n;return a}var AS=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){n.aborted=!0,e.forEach(function(a){return a()})}},RS=t.unstable_scheduleCallback,CS=t.unstable_NormalPriority,Je={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function zu(){return{controller:new AS,data:new Map,refCount:0}}function zs(e){e.refCount--,e.refCount===0&&RS(CS,function(){e.controller.abort()})}var Ts=null,Tu=0,wa=0,Oa=null;function MS(e,n){if(Ts===null){var a=Ts=[];Tu=0,wa=Ac(),Oa={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Tu++,n.then(Dh,Dh),n}function Dh(){if(--Tu===0&&Ts!==null){Oa!==null&&(Oa.status="fulfilled");var e=Ts;Ts=null,wa=0,Oa=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function DS(e,n){var a=[],l={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return e.then(function(){l.status="fulfilled",l.value=n;for(var u=0;u<a.length;u++)(0,a[u])(n)},function(u){for(l.status="rejected",l.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),l}var kh=U.S;U.S=function(e,n){vp=Rt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&MS(e,n),kh!==null&&kh(e,n)};var Hi=j(null);function ju(){var e=Hi.current;return e!==null?e:Ue.pooledCache}function Fr(e,n){n===null?V(Hi,Hi.current):V(Hi,n.pool)}function Uh(){var e=ju();return e===null?null:{parent:Je._currentValue,pool:e}}var za=Error(r(460)),Nu=Error(r(474)),Vr=Error(r(542)),Pr={then:function(){}};function Lh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(bn,bn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Bh(e),e;default:if(typeof n.status=="string")n.then(bn,bn);else{if(e=Ue,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(l){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=l}},function(l){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=l}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Bh(e),e}throw Qi=n,za}}function $i(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Qi=a,za):a}}var Qi=null;function qh(){if(Qi===null)throw Error(r(459));var e=Qi;return Qi=null,e}function Bh(e){if(e===za||e===Vr)throw Error(r(483))}var Ta=null,js=0;function Xr(e){var n=js;return js+=1,Ta===null&&(Ta=[]),Zh(Ta,e,n)}function Ns(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Jr(e,n){throw n.$$typeof===S?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Hh(e){function n(A,T){if(e){var M=A.deletions;M===null?(A.deletions=[T],A.flags|=16):M.push(T)}}function a(A,T){if(!e)return null;for(;T!==null;)n(A,T),T=T.sibling;return null}function l(A){for(var T=new Map;A!==null;)A.key!==null?T.set(A.key,A):T.set(A.index,A),A=A.sibling;return T}function u(A,T){return A=xn(A,T),A.index=0,A.sibling=null,A}function f(A,T,M){return A.index=M,e?(M=A.alternate,M!==null?(M=M.index,M<T?(A.flags|=67108866,T):M):(A.flags|=67108866,T)):(A.flags|=1048576,T)}function g(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function _(A,T,M,H){return T===null||T.tag!==6?(T=yu(M,A.mode,H),T.return=A,T):(T=u(T,M),T.return=A,T)}function O(A,T,M,H){var ae=M.type;return ae===w?B(A,T,M.props.children,H,M.key):T!==null&&(T.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===F&&$i(ae)===T.type)?(T=u(T,M.props),Ns(T,M),T.return=A,T):(T=Qr(M.type,M.key,M.props,null,A.mode,H),Ns(T,M),T.return=A,T)}function D(A,T,M,H){return T===null||T.tag!==4||T.stateNode.containerInfo!==M.containerInfo||T.stateNode.implementation!==M.implementation?(T=vu(M,A.mode,H),T.return=A,T):(T=u(T,M.children||[]),T.return=A,T)}function B(A,T,M,H,ae){return T===null||T.tag!==7?(T=Li(M,A.mode,H,ae),T.return=A,T):(T=u(T,M),T.return=A,T)}function Q(A,T,M){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=yu(""+T,A.mode,M),T.return=A,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case x:return M=Qr(T.type,T.key,T.props,null,A.mode,M),Ns(M,T),M.return=A,M;case E:return T=vu(T,A.mode,M),T.return=A,T;case F:return T=$i(T),Q(A,T,M)}if(de(T)||ne(T))return T=Li(T,A.mode,M,null),T.return=A,T;if(typeof T.then=="function")return Q(A,Xr(T),M);if(T.$$typeof===G)return Q(A,Yr(A,T),M);Jr(A,T)}return null}function k(A,T,M,H){var ae=T!==null?T.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ae!==null?null:_(A,T,""+M,H);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case x:return M.key===ae?O(A,T,M,H):null;case E:return M.key===ae?D(A,T,M,H):null;case F:return M=$i(M),k(A,T,M,H)}if(de(M)||ne(M))return ae!==null?null:B(A,T,M,H,null);if(typeof M.then=="function")return k(A,T,Xr(M),H);if(M.$$typeof===G)return k(A,T,Yr(A,M),H);Jr(A,M)}return null}function L(A,T,M,H,ae){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return A=A.get(M)||null,_(T,A,""+H,ae);if(typeof H=="object"&&H!==null){switch(H.$$typeof){case x:return A=A.get(H.key===null?M:H.key)||null,O(T,A,H,ae);case E:return A=A.get(H.key===null?M:H.key)||null,D(T,A,H,ae);case F:return H=$i(H),L(A,T,M,H,ae)}if(de(H)||ne(H))return A=A.get(M)||null,B(T,A,H,ae,null);if(typeof H.then=="function")return L(A,T,M,Xr(H),ae);if(H.$$typeof===G)return L(A,T,M,Yr(T,H),ae);Jr(T,H)}return null}function W(A,T,M,H){for(var ae=null,Oe=null,ee=T,pe=T=0,xe=null;ee!==null&&pe<M.length;pe++){ee.index>pe?(xe=ee,ee=null):xe=ee.sibling;var ze=k(A,ee,M[pe],H);if(ze===null){ee===null&&(ee=xe);break}e&&ee&&ze.alternate===null&&n(A,ee),T=f(ze,T,pe),Oe===null?ae=ze:Oe.sibling=ze,Oe=ze,ee=xe}if(pe===M.length)return a(A,ee),Ee&&_n(A,pe),ae;if(ee===null){for(;pe<M.length;pe++)ee=Q(A,M[pe],H),ee!==null&&(T=f(ee,T,pe),Oe===null?ae=ee:Oe.sibling=ee,Oe=ee);return Ee&&_n(A,pe),ae}for(ee=l(ee);pe<M.length;pe++)xe=L(ee,A,pe,M[pe],H),xe!==null&&(e&&xe.alternate!==null&&ee.delete(xe.key===null?pe:xe.key),T=f(xe,T,pe),Oe===null?ae=xe:Oe.sibling=xe,Oe=xe);return e&&ee.forEach(function(hi){return n(A,hi)}),Ee&&_n(A,pe),ae}function oe(A,T,M,H){if(M==null)throw Error(r(151));for(var ae=null,Oe=null,ee=T,pe=T=0,xe=null,ze=M.next();ee!==null&&!ze.done;pe++,ze=M.next()){ee.index>pe?(xe=ee,ee=null):xe=ee.sibling;var hi=k(A,ee,ze.value,H);if(hi===null){ee===null&&(ee=xe);break}e&&ee&&hi.alternate===null&&n(A,ee),T=f(hi,T,pe),Oe===null?ae=hi:Oe.sibling=hi,Oe=hi,ee=xe}if(ze.done)return a(A,ee),Ee&&_n(A,pe),ae;if(ee===null){for(;!ze.done;pe++,ze=M.next())ze=Q(A,ze.value,H),ze!==null&&(T=f(ze,T,pe),Oe===null?ae=ze:Oe.sibling=ze,Oe=ze);return Ee&&_n(A,pe),ae}for(ee=l(ee);!ze.done;pe++,ze=M.next())ze=L(ee,A,pe,ze.value,H),ze!==null&&(e&&ze.alternate!==null&&ee.delete(ze.key===null?pe:ze.key),T=f(ze,T,pe),Oe===null?ae=ze:Oe.sibling=ze,Oe=ze);return e&&ee.forEach(function(Kx){return n(A,Kx)}),Ee&&_n(A,pe),ae}function ke(A,T,M,H){if(typeof M=="object"&&M!==null&&M.type===w&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case x:e:{for(var ae=M.key;T!==null;){if(T.key===ae){if(ae=M.type,ae===w){if(T.tag===7){a(A,T.sibling),H=u(T,M.props.children),H.return=A,A=H;break e}}else if(T.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===F&&$i(ae)===T.type){a(A,T.sibling),H=u(T,M.props),Ns(H,M),H.return=A,A=H;break e}a(A,T);break}else n(A,T);T=T.sibling}M.type===w?(H=Li(M.props.children,A.mode,H,M.key),H.return=A,A=H):(H=Qr(M.type,M.key,M.props,null,A.mode,H),Ns(H,M),H.return=A,A=H)}return g(A);case E:e:{for(ae=M.key;T!==null;){if(T.key===ae)if(T.tag===4&&T.stateNode.containerInfo===M.containerInfo&&T.stateNode.implementation===M.implementation){a(A,T.sibling),H=u(T,M.children||[]),H.return=A,A=H;break e}else{a(A,T);break}else n(A,T);T=T.sibling}H=vu(M,A.mode,H),H.return=A,A=H}return g(A);case F:return M=$i(M),ke(A,T,M,H)}if(de(M))return W(A,T,M,H);if(ne(M)){if(ae=ne(M),typeof ae!="function")throw Error(r(150));return M=ae.call(M),oe(A,T,M,H)}if(typeof M.then=="function")return ke(A,T,Xr(M),H);if(M.$$typeof===G)return ke(A,T,Yr(A,M),H);Jr(A,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,T!==null&&T.tag===6?(a(A,T.sibling),H=u(T,M),H.return=A,A=H):(a(A,T),H=yu(M,A.mode,H),H.return=A,A=H),g(A)):a(A,T)}return function(A,T,M,H){try{js=0;var ae=ke(A,T,M,H);return Ta=null,ae}catch(ee){if(ee===za||ee===Vr)throw ee;var Oe=kt(29,ee,null,A.mode);return Oe.lanes=H,Oe.return=A,Oe}}}var Gi=Hh(!0),$h=Hh(!1),Xn=!1;function Au(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ru(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Jn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function In(e,n,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Te&2)!==0){var u=l.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),l.pending=n,n=$r(e),Oh(e,null,a),n}return Hr(e,l,n,a),$r(e)}function As(e,n,a){if(n=n.updateQueue,n!==null&&(n=n.shared,(a&4194048)!==0)){var l=n.lanes;l&=e.pendingLanes,a|=l,n.lanes=a,Md(e,a)}}function Cu(e,n){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var u=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var g={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?u=f=g:f=f.next=g,a=a.next}while(a!==null);f===null?u=f=n:f=f.next=n}else u=f=n;a={baseState:l.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=n:e.next=n,a.lastBaseUpdate=n}var Mu=!1;function Rs(){if(Mu){var e=Oa;if(e!==null)throw e}}function Cs(e,n,a,l){Mu=!1;var u=e.updateQueue;Xn=!1;var f=u.firstBaseUpdate,g=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var O=_,D=O.next;O.next=null,g===null?f=D:g.next=D,g=O;var B=e.alternate;B!==null&&(B=B.updateQueue,_=B.lastBaseUpdate,_!==g&&(_===null?B.firstBaseUpdate=D:_.next=D,B.lastBaseUpdate=O))}if(f!==null){var Q=u.baseState;g=0,B=D=O=null,_=f;do{var k=_.lane&-536870913,L=k!==_.lane;if(L?(Se&k)===k:(l&k)===k){k!==0&&k===wa&&(Mu=!0),B!==null&&(B=B.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var W=e,oe=_;k=n;var ke=a;switch(oe.tag){case 1:if(W=oe.payload,typeof W=="function"){Q=W.call(ke,Q,k);break e}Q=W;break e;case 3:W.flags=W.flags&-65537|128;case 0:if(W=oe.payload,k=typeof W=="function"?W.call(ke,Q,k):W,k==null)break e;Q=y({},Q,k);break e;case 2:Xn=!0}}k=_.callback,k!==null&&(e.flags|=64,L&&(e.flags|=8192),L=u.callbacks,L===null?u.callbacks=[k]:L.push(k))}else L={lane:k,tag:_.tag,payload:_.payload,callback:_.callback,next:null},B===null?(D=B=L,O=Q):B=B.next=L,g|=k;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;L=_,_=L.next,L.next=null,u.lastBaseUpdate=L,u.shared.pending=null}}while(!0);B===null&&(O=Q),u.baseState=O,u.firstBaseUpdate=D,u.lastBaseUpdate=B,f===null&&(u.shared.lanes=0),ii|=g,e.lanes=g,e.memoizedState=Q}}function Qh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Gh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Qh(a[e],n)}var ja=j(null),Ir=j(0);function Kh(e,n){e=Mn,V(Ir,e),V(ja,n),Mn=e|n.baseLanes}function Du(){V(Ir,Mn),V(ja,ja.current)}function ku(){Mn=Ir.current,Z(ja),Z(Ir)}var Ut=j(null),Jt=null;function Wn(e){var n=e.alternate;V(Pe,Pe.current&1),V(Ut,e),Jt===null&&(n===null||ja.current!==null||n.memoizedState!==null)&&(Jt=e)}function Uu(e){V(Pe,Pe.current),V(Ut,e),Jt===null&&(Jt=e)}function Yh(e){e.tag===22?(V(Pe,Pe.current),V(Ut,e),Jt===null&&(Jt=e)):ei()}function ei(){V(Pe,Pe.current),V(Ut,Ut.current)}function Lt(e){Z(Ut),Jt===e&&(Jt=null),Z(Pe)}var Pe=j(0);function Wr(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||$c(a)||Qc(a)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var On=0,me=null,Me=null,Ie=null,el=!1,Na=!1,Ki=!1,tl=0,Ms=0,Aa=null,kS=0;function Fe(){throw Error(r(321))}function Lu(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!Dt(e[a],n[a]))return!1;return!0}function Zu(e,n,a,l,u,f){return On=f,me=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Nm:Wu,Ki=!1,f=a(l,u),Ki=!1,Na&&(f=Vh(n,a,l,u)),Fh(e),f}function Fh(e){U.H=Us;var n=Me!==null&&Me.next!==null;if(On=0,Ie=Me=me=null,el=!1,Ms=0,Aa=null,n)throw Error(r(300));e===null||We||(e=e.dependencies,e!==null&&Kr(e)&&(We=!0))}function Vh(e,n,a,l){me=e;var u=0;do{if(Na&&(Aa=null),Ms=0,Na=!1,25<=u)throw Error(r(301));if(u+=1,Ie=Me=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}U.H=Am,f=n(a,l)}while(Na);return f}function US(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?Ds(n):n,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(me.flags|=1024),n}function qu(){var e=tl!==0;return tl=0,e}function Bu(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Hu(e){if(el){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}el=!1}On=0,Ie=Me=me=null,Na=!1,Ms=tl=0,Aa=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ie===null?me.memoizedState=Ie=e:Ie=Ie.next=e,Ie}function Xe(){if(Me===null){var e=me.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var n=Ie===null?me.memoizedState:Ie.next;if(n!==null)Ie=n,Me=e;else{if(e===null)throw me.alternate===null?Error(r(467)):Error(r(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Ie===null?me.memoizedState=Ie=e:Ie=Ie.next=e}return Ie}function nl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ds(e){var n=Ms;return Ms+=1,Aa===null&&(Aa=[]),e=Zh(Aa,e,n),n=me,(Ie===null?n.memoizedState:Ie.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Nm:Wu),e}function il(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ds(e);if(e.$$typeof===G)return ut(e)}throw Error(r(438,String(e)))}function $u(e){var n=null,a=me.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=me.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(n={data:l.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),a===null&&(a=nl(),me.updateQueue=a),a.memoCache=n,a=n.data[n.index],a===void 0)for(a=n.data[n.index]=Array(e),l=0;l<e;l++)a[l]=le;return n.index++,a}function zn(e,n){return typeof n=="function"?n(e):n}function al(e){var n=Xe();return Qu(n,Me,e)}function Qu(e,n,a){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=a;var u=e.baseQueue,f=l.pending;if(f!==null){if(u!==null){var g=u.next;u.next=f.next,f.next=g}n.baseQueue=u=f,l.pending=null}if(f=e.baseState,u===null)e.memoizedState=f;else{n=u.next;var _=g=null,O=null,D=n,B=!1;do{var Q=D.lane&-536870913;if(Q!==D.lane?(Se&Q)===Q:(On&Q)===Q){var k=D.revertLane;if(k===0)O!==null&&(O=O.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),Q===wa&&(B=!0);else if((On&k)===k){D=D.next,k===wa&&(B=!0);continue}else Q={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},O===null?(_=O=Q,g=f):O=O.next=Q,me.lanes|=k,ii|=k;Q=D.action,Ki&&a(f,Q),f=D.hasEagerState?D.eagerState:a(f,Q)}else k={lane:Q,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},O===null?(_=O=k,g=f):O=O.next=k,me.lanes|=Q,ii|=Q;D=D.next}while(D!==null&&D!==n);if(O===null?g=f:O.next=_,!Dt(f,e.memoizedState)&&(We=!0,B&&(a=Oa,a!==null)))throw a;e.memoizedState=f,e.baseState=g,e.baseQueue=O,l.lastRenderedState=f}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Gu(e){var n=Xe(),a=n.queue;if(a===null)throw Error(r(311));a.lastRenderedReducer=e;var l=a.dispatch,u=a.pending,f=n.memoizedState;if(u!==null){a.pending=null;var g=u=u.next;do f=e(f,g.action),g=g.next;while(g!==u);Dt(f,n.memoizedState)||(We=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,l]}function Ph(e,n,a){var l=me,u=Xe(),f=Ee;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=n();var g=!Dt((Me||u).memoizedState,a);if(g&&(u.memoizedState=a,We=!0),u=u.queue,Fu(Ih.bind(null,l,u,e),[e]),u.getSnapshot!==n||g||Ie!==null&&Ie.memoizedState.tag&1){if(l.flags|=2048,Ra(9,{destroy:void 0},Jh.bind(null,l,u,a,n),null),Ue===null)throw Error(r(349));f||(On&127)!==0||Xh(l,n,a)}return a}function Xh(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=me.updateQueue,n===null?(n=nl(),me.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function Jh(e,n,a,l){n.value=a,n.getSnapshot=l,Wh(n)&&em(e)}function Ih(e,n,a){return a(function(){Wh(n)&&em(e)})}function Wh(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Dt(e,a)}catch{return!0}}function em(e){var n=Ui(e,2);n!==null&&zt(n,e,2)}function Ku(e){var n=gt();if(typeof e=="function"){var a=e;if(e=a(),Ki){Qn(!0);try{a()}finally{Qn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:e},n}function tm(e,n,a,l){return e.baseState=a,Qu(e,Me,typeof l=="function"?l:zn)}function LS(e,n,a,l,u){if(ll(e))throw Error(r(485));if(e=n.action,e!==null){var f={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(g){f.listeners.push(g)}};U.T!==null?a(!0):f.isTransition=!1,l(f),a=n.pending,a===null?(f.next=n.pending=f,nm(n,f)):(f.next=a.next,n.pending=a.next=f)}}function nm(e,n){var a=n.action,l=n.payload,u=e.state;if(n.isTransition){var f=U.T,g={};U.T=g;try{var _=a(u,l),O=U.S;O!==null&&O(g,_),im(e,n,_)}catch(D){Yu(e,n,D)}finally{f!==null&&g.types!==null&&(f.types=g.types),U.T=f}}else try{f=a(u,l),im(e,n,f)}catch(D){Yu(e,n,D)}}function im(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){am(e,n,l)},function(l){return Yu(e,n,l)}):am(e,n,a)}function am(e,n,a){n.status="fulfilled",n.value=a,sm(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,nm(e,a)))}function Yu(e,n,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,sm(n),n=n.next;while(n!==l)}e.action=null}function sm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function rm(e,n){return n}function lm(e,n){if(Ee){var a=Ue.formState;if(a!==null){e:{var l=me;if(Ee){if(Ze){t:{for(var u=Ze,f=Xt;u.nodeType!==8;){if(!f){u=null;break t}if(u=It(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Ze=It(u.nextSibling),l=u.data==="F!";break e}}Vn(l)}l=!1}l&&(n=a[0])}}return a=gt(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rm,lastRenderedState:n},a.queue=l,a=zm.bind(null,me,l),l.dispatch=a,l=Ku(!1),f=Iu.bind(null,me,!1,l.queue),l=gt(),u={state:n,dispatch:null,action:e,pending:null},l.queue=u,a=LS.bind(null,me,u,f,a),u.dispatch=a,l.memoizedState=e,[n,a,!1]}function om(e){var n=Xe();return um(n,Me,e)}function um(e,n,a){if(n=Qu(e,n,rm)[0],e=al(zn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Ds(n)}catch(g){throw g===za?Vr:g}else l=n;n=Xe();var u=n.queue,f=u.dispatch;return a!==n.memoizedState&&(me.flags|=2048,Ra(9,{destroy:void 0},ZS.bind(null,u,a),null)),[l,f,e]}function ZS(e,n){e.action=n}function cm(e){var n=Xe(),a=Me;if(a!==null)return um(n,a,e);Xe(),n=n.memoizedState,a=Xe();var l=a.queue.dispatch;return a.memoizedState=e,[n,l,!1]}function Ra(e,n,a,l){return e={tag:e,create:a,deps:l,inst:n,next:null},n=me.updateQueue,n===null&&(n=nl(),me.updateQueue=n),a=n.lastEffect,a===null?n.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,n.lastEffect=e),e}function fm(){return Xe().memoizedState}function sl(e,n,a,l){var u=gt();me.flags|=e,u.memoizedState=Ra(1|n,{destroy:void 0},a,l===void 0?null:l)}function rl(e,n,a,l){var u=Xe();l=l===void 0?null:l;var f=u.memoizedState.inst;Me!==null&&l!==null&&Lu(l,Me.memoizedState.deps)?u.memoizedState=Ra(n,f,a,l):(me.flags|=e,u.memoizedState=Ra(1|n,f,a,l))}function dm(e,n){sl(8390656,8,e,n)}function Fu(e,n){rl(2048,8,e,n)}function qS(e){me.flags|=4;var n=me.updateQueue;if(n===null)n=nl(),me.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function hm(e){var n=Xe().memoizedState;return qS({ref:n,nextImpl:e}),function(){if((Te&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function mm(e,n){return rl(4,2,e,n)}function pm(e,n){return rl(4,4,e,n)}function gm(e,n){if(typeof n=="function"){e=e();var a=n(e);return function(){typeof a=="function"?a():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function ym(e,n,a){a=a!=null?a.concat([e]):null,rl(4,4,gm.bind(null,n,e),a)}function Vu(){}function vm(e,n){var a=Xe();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&Lu(n,l[1])?l[0]:(a.memoizedState=[e,n],e)}function bm(e,n){var a=Xe();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&Lu(n,l[1]))return l[0];if(l=e(),Ki){Qn(!0);try{e()}finally{Qn(!1)}}return a.memoizedState=[l,n],l}function Pu(e,n,a){return a===void 0||(On&1073741824)!==0&&(Se&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=Sp(),me.lanes|=e,ii|=e,a)}function Sm(e,n,a,l){return Dt(a,n)?a:ja.current!==null?(e=Pu(e,a,l),Dt(e,n)||(We=!0),e):(On&42)===0||(On&1073741824)!==0&&(Se&261930)===0?(We=!0,e.memoizedState=a):(e=Sp(),me.lanes|=e,ii|=e,n)}function xm(e,n,a,l,u){var f=J.p;J.p=f!==0&&8>f?f:8;var g=U.T,_={};U.T=_,Iu(e,!1,n,a);try{var O=u(),D=U.S;if(D!==null&&D(_,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var B=DS(O,l);ks(e,n,B,Bt(e))}else ks(e,n,l,Bt(e))}catch(Q){ks(e,n,{then:function(){},status:"rejected",reason:Q},Bt())}finally{J.p=f,g!==null&&_.types!==null&&(g.types=_.types),U.T=g}}function BS(){}function Xu(e,n,a,l){if(e.tag!==5)throw Error(r(476));var u=_m(e).queue;xm(e,u,n,te,a===null?BS:function(){return Em(e),a(l)})}function _m(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:te},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Em(e){var n=_m(e);n.next===null&&(n=e.alternate.memoizedState),ks(e,n.next.queue,{},Bt())}function Ju(){return ut(Is)}function wm(){return Xe().memoizedState}function Om(){return Xe().memoizedState}function HS(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=Bt();e=Jn(a);var l=In(n,e,a);l!==null&&(zt(l,n,a),As(l,n,a)),n={cache:zu()},e.payload=n;return}n=n.return}}function $S(e,n,a){var l=Bt();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ll(e)?Tm(n,a):(a=pu(e,n,a,l),a!==null&&(zt(a,e,l),jm(a,n,l)))}function zm(e,n,a){var l=Bt();ks(e,n,a,l)}function ks(e,n,a,l){var u={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ll(e))Tm(n,u);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=n.lastRenderedReducer,f!==null))try{var g=n.lastRenderedState,_=f(g,a);if(u.hasEagerState=!0,u.eagerState=_,Dt(_,g))return Hr(e,n,u,0),Ue===null&&Br(),!1}catch{}if(a=pu(e,n,u,l),a!==null)return zt(a,e,l),jm(a,n,l),!0}return!1}function Iu(e,n,a,l){if(l={lane:2,revertLane:Ac(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ll(e)){if(n)throw Error(r(479))}else n=pu(e,a,l,2),n!==null&&zt(n,e,2)}function ll(e){var n=e.alternate;return e===me||n!==null&&n===me}function Tm(e,n){Na=el=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function jm(e,n,a){if((a&4194048)!==0){var l=n.lanes;l&=e.pendingLanes,a|=l,n.lanes=a,Md(e,a)}}var Us={readContext:ut,use:il,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};Us.useEffectEvent=Fe;var Nm={readContext:ut,use:il,useCallback:function(e,n){return gt().memoizedState=[e,n===void 0?null:n],e},useContext:ut,useEffect:dm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,sl(4194308,4,gm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return sl(4194308,4,e,n)},useInsertionEffect:function(e,n){sl(4,2,e,n)},useMemo:function(e,n){var a=gt();n=n===void 0?null:n;var l=e();if(Ki){Qn(!0);try{e()}finally{Qn(!1)}}return a.memoizedState=[l,n],l},useReducer:function(e,n,a){var l=gt();if(a!==void 0){var u=a(n);if(Ki){Qn(!0);try{a(n)}finally{Qn(!1)}}}else u=n;return l.memoizedState=l.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},l.queue=e,e=e.dispatch=$S.bind(null,me,e),[l.memoizedState,e]},useRef:function(e){var n=gt();return e={current:e},n.memoizedState=e},useState:function(e){e=Ku(e);var n=e.queue,a=zm.bind(null,me,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Vu,useDeferredValue:function(e,n){var a=gt();return Pu(a,e,n)},useTransition:function(){var e=Ku(!1);return e=xm.bind(null,me,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var l=me,u=gt();if(Ee){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),Ue===null)throw Error(r(349));(Se&127)!==0||Xh(l,n,a)}u.memoizedState=a;var f={value:a,getSnapshot:n};return u.queue=f,dm(Ih.bind(null,l,f,e),[e]),l.flags|=2048,Ra(9,{destroy:void 0},Jh.bind(null,l,f,a,n),null),a},useId:function(){var e=gt(),n=Ue.identifierPrefix;if(Ee){var a=cn,l=un;a=(l&~(1<<32-Mt(l)-1)).toString(32)+a,n="_"+n+"R_"+a,a=tl++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=kS++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Ju,useFormState:lm,useActionState:lm,useOptimistic:function(e){var n=gt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=Iu.bind(null,me,!0,a),a.dispatch=n,[e,n]},useMemoCache:$u,useCacheRefresh:function(){return gt().memoizedState=HS.bind(null,me)},useEffectEvent:function(e){var n=gt(),a={impl:e};return n.memoizedState=a,function(){if((Te&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},Wu={readContext:ut,use:il,useCallback:vm,useContext:ut,useEffect:Fu,useImperativeHandle:ym,useInsertionEffect:mm,useLayoutEffect:pm,useMemo:bm,useReducer:al,useRef:fm,useState:function(){return al(zn)},useDebugValue:Vu,useDeferredValue:function(e,n){var a=Xe();return Sm(a,Me.memoizedState,e,n)},useTransition:function(){var e=al(zn)[0],n=Xe().memoizedState;return[typeof e=="boolean"?e:Ds(e),n]},useSyncExternalStore:Ph,useId:wm,useHostTransitionStatus:Ju,useFormState:om,useActionState:om,useOptimistic:function(e,n){var a=Xe();return tm(a,Me,e,n)},useMemoCache:$u,useCacheRefresh:Om};Wu.useEffectEvent=hm;var Am={readContext:ut,use:il,useCallback:vm,useContext:ut,useEffect:Fu,useImperativeHandle:ym,useInsertionEffect:mm,useLayoutEffect:pm,useMemo:bm,useReducer:Gu,useRef:fm,useState:function(){return Gu(zn)},useDebugValue:Vu,useDeferredValue:function(e,n){var a=Xe();return Me===null?Pu(a,e,n):Sm(a,Me.memoizedState,e,n)},useTransition:function(){var e=Gu(zn)[0],n=Xe().memoizedState;return[typeof e=="boolean"?e:Ds(e),n]},useSyncExternalStore:Ph,useId:wm,useHostTransitionStatus:Ju,useFormState:cm,useActionState:cm,useOptimistic:function(e,n){var a=Xe();return Me!==null?tm(a,Me,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:$u,useCacheRefresh:Om};Am.useEffectEvent=hm;function ec(e,n,a,l){n=e.memoizedState,a=a(l,n),a=a==null?n:y({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var tc={enqueueSetState:function(e,n,a){e=e._reactInternals;var l=Bt(),u=Jn(l);u.payload=n,a!=null&&(u.callback=a),n=In(e,u,l),n!==null&&(zt(n,e,l),As(n,e,l))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var l=Bt(),u=Jn(l);u.tag=1,u.payload=n,a!=null&&(u.callback=a),n=In(e,u,l),n!==null&&(zt(n,e,l),As(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=Bt(),l=Jn(a);l.tag=2,n!=null&&(l.callback=n),n=In(e,l,a),n!==null&&(zt(n,e,a),As(n,e,a))}};function Rm(e,n,a,l,u,f,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,f,g):n.prototype&&n.prototype.isPureReactComponent?!_s(a,l)||!_s(u,f):!0}function Cm(e,n,a,l){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(a,l),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(a,l),n.state!==e&&tc.enqueueReplaceState(n,n.state,null)}function Yi(e,n){var a=n;if("ref"in n){a={};for(var l in n)l!=="ref"&&(a[l]=n[l])}if(e=e.defaultProps){a===n&&(a=y({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function Mm(e){qr(e)}function Dm(e){console.error(e)}function km(e){qr(e)}function ol(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Um(e,n,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function nc(e,n,a){return a=Jn(a),a.tag=3,a.payload={element:null},a.callback=function(){ol(e,n)},a}function Lm(e){return e=Jn(e),e.tag=3,e}function Zm(e,n,a,l){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var f=l.value;e.payload=function(){return u(f)},e.callback=function(){Um(n,a,l)}}var g=a.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Um(n,a,l),typeof u!="function"&&(ai===null?ai=new Set([this]):ai.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function QS(e,n,a,l,u){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=a.alternate,n!==null&&Ea(n,a,u,!0),a=Ut.current,a!==null){switch(a.tag){case 31:case 13:return Jt===null?Sl():a.alternate===null&&Ve===0&&(Ve=3),a.flags&=-257,a.flags|=65536,a.lanes=u,l===Pr?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([l]):n.add(l),Tc(e,l,u)),!1;case 22:return a.flags|=65536,l===Pr?a.flags|=16384:(n=a.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=n):(a=n.retryQueue,a===null?n.retryQueue=new Set([l]):a.add(l)),Tc(e,l,u)),!1}throw Error(r(435,a.tag))}return Tc(e,l,u),Sl(),!1}if(Ee)return n=Ut.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==xu&&(e=Error(r(422),{cause:l}),Os(Ft(e,a)))):(l!==xu&&(n=Error(r(423),{cause:l}),Os(Ft(n,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Ft(l,a),u=nc(e.stateNode,l,u),Cu(e,u),Ve!==4&&(Ve=2)),!1;var f=Error(r(520),{cause:l});if(f=Ft(f,a),Gs===null?Gs=[f]:Gs.push(f),Ve!==4&&(Ve=2),n===null)return!0;l=Ft(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=nc(a.stateNode,l,e),Cu(a,e),!1;case 1:if(n=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(ai===null||!ai.has(f))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Lm(u),Zm(u,e,a,l),Cu(a,u),!1}a=a.return}while(a!==null);return!1}var ic=Error(r(461)),We=!1;function ct(e,n,a,l){n.child=e===null?$h(n,null,a,l):Gi(n,e.child,a,l)}function qm(e,n,a,l,u){a=a.render;var f=n.ref;if("ref"in l){var g={};for(var _ in l)_!=="ref"&&(g[_]=l[_])}else g=l;return Bi(n),l=Zu(e,n,a,g,f,u),_=qu(),e!==null&&!We?(Bu(e,n,u),Tn(e,n,u)):(Ee&&_&&bu(n),n.flags|=1,ct(e,n,l,u),n.child)}function Bm(e,n,a,l,u){if(e===null){var f=a.type;return typeof f=="function"&&!gu(f)&&f.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=f,Hm(e,n,f,l,u)):(e=Qr(a.type,null,l,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!fc(e,u)){var g=f.memoizedProps;if(a=a.compare,a=a!==null?a:_s,a(g,l)&&e.ref===n.ref)return Tn(e,n,u)}return n.flags|=1,e=xn(f,l),e.ref=n.ref,e.return=n,n.child=e}function Hm(e,n,a,l,u){if(e!==null){var f=e.memoizedProps;if(_s(f,l)&&e.ref===n.ref)if(We=!1,n.pendingProps=l=f,fc(e,u))(e.flags&131072)!==0&&(We=!0);else return n.lanes=e.lanes,Tn(e,n,u)}return ac(e,n,a,l,u)}function $m(e,n,a,l){var u=l.children,f=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((n.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,e!==null){for(l=n.child=e.child,u=0;l!==null;)u=u|l.lanes|l.childLanes,l=l.sibling;l=u&~f}else l=0,n.child=null;return Qm(e,n,f,a,l)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Fr(n,f!==null?f.cachePool:null),f!==null?Kh(n,f):Du(),Yh(n);else return l=n.lanes=536870912,Qm(e,n,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(Fr(n,f.cachePool),Kh(n,f),ei(),n.memoizedState=null):(e!==null&&Fr(n,null),Du(),ei());return ct(e,n,u,a),n.child}function Ls(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Qm(e,n,a,l,u){var f=ju();return f=f===null?null:{parent:Je._currentValue,pool:f},n.memoizedState={baseLanes:a,cachePool:f},e!==null&&Fr(n,null),Du(),Yh(n),e!==null&&Ea(e,n,l,!0),n.childLanes=u,null}function ul(e,n){return n=fl({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Gm(e,n,a){return Gi(n,e.child,null,a),e=ul(n,n.pendingProps),e.flags|=2,Lt(n),n.memoizedState=null,e}function GS(e,n,a){var l=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ee){if(l.mode==="hidden")return e=ul(n,l),n.lanes=536870912,Ls(null,e);if(Uu(n),(e=Ze)?(e=ng(e,Xt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Yn!==null?{id:un,overflow:cn}:null,retryLane:536870912,hydrationErrors:null},a=Th(e),a.return=n,n.child=a,ot=n,Ze=null)):e=null,e===null)throw Vn(n);return n.lanes=536870912,null}return ul(n,l)}var f=e.memoizedState;if(f!==null){var g=f.dehydrated;if(Uu(n),u)if(n.flags&256)n.flags&=-257,n=Gm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(We||Ea(e,n,a,!1),u=(a&e.childLanes)!==0,We||u){if(l=Ue,l!==null&&(g=Dd(l,a),g!==0&&g!==f.retryLane))throw f.retryLane=g,Ui(e,g),zt(l,e,g),ic;Sl(),n=Gm(e,n,a)}else e=f.treeContext,Ze=It(g.nextSibling),ot=n,Ee=!0,Fn=null,Xt=!1,e!==null&&Ah(n,e),n=ul(n,l),n.flags|=4096;return n}return e=xn(e.child,{mode:l.mode,children:l.children}),e.ref=n.ref,n.child=e,e.return=n,e}function cl(e,n){var a=n.ref;if(a===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(r(284));(e===null||e.ref!==a)&&(n.flags|=4194816)}}function ac(e,n,a,l,u){return Bi(n),a=Zu(e,n,a,l,void 0,u),l=qu(),e!==null&&!We?(Bu(e,n,u),Tn(e,n,u)):(Ee&&l&&bu(n),n.flags|=1,ct(e,n,a,u),n.child)}function Km(e,n,a,l,u,f){return Bi(n),n.updateQueue=null,a=Vh(n,l,a,u),Fh(e),l=qu(),e!==null&&!We?(Bu(e,n,f),Tn(e,n,f)):(Ee&&l&&bu(n),n.flags|=1,ct(e,n,a,f),n.child)}function Ym(e,n,a,l,u){if(Bi(n),n.stateNode===null){var f=ba,g=a.contextType;typeof g=="object"&&g!==null&&(f=ut(g)),f=new a(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=tc,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},Au(n),g=a.contextType,f.context=typeof g=="object"&&g!==null?ut(g):ba,f.state=n.memoizedState,g=a.getDerivedStateFromProps,typeof g=="function"&&(ec(n,a,g,l),f.state=n.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(g=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),g!==f.state&&tc.enqueueReplaceState(f,f.state,null),Cs(n,l,f,u),Rs(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){f=n.stateNode;var _=n.memoizedProps,O=Yi(a,_);f.props=O;var D=f.context,B=a.contextType;g=ba,typeof B=="object"&&B!==null&&(g=ut(B));var Q=a.getDerivedStateFromProps;B=typeof Q=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,B||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||D!==g)&&Cm(n,f,l,g),Xn=!1;var k=n.memoizedState;f.state=k,Cs(n,l,f,u),Rs(),D=n.memoizedState,_||k!==D||Xn?(typeof Q=="function"&&(ec(n,a,Q,l),D=n.memoizedState),(O=Xn||Rm(n,a,O,l,k,D,g))?(B||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(n.flags|=4194308)):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=l,n.memoizedState=D),f.props=l,f.state=D,f.context=g,l=O):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{f=n.stateNode,Ru(e,n),g=n.memoizedProps,B=Yi(a,g),f.props=B,Q=n.pendingProps,k=f.context,D=a.contextType,O=ba,typeof D=="object"&&D!==null&&(O=ut(D)),_=a.getDerivedStateFromProps,(D=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(g!==Q||k!==O)&&Cm(n,f,l,O),Xn=!1,k=n.memoizedState,f.state=k,Cs(n,l,f,u),Rs();var L=n.memoizedState;g!==Q||k!==L||Xn||e!==null&&e.dependencies!==null&&Kr(e.dependencies)?(typeof _=="function"&&(ec(n,a,_,l),L=n.memoizedState),(B=Xn||Rm(n,a,B,l,k,L,O)||e!==null&&e.dependencies!==null&&Kr(e.dependencies))?(D||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,L,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,L,O)),typeof f.componentDidUpdate=="function"&&(n.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(n.flags|=1024),n.memoizedProps=l,n.memoizedState=L),f.props=l,f.state=L,f.context=O,l=B):(typeof f.componentDidUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(n.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&k===e.memoizedState||(n.flags|=1024),l=!1)}return f=l,cl(e,n),l=(n.flags&128)!==0,f||l?(f=n.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:f.render(),n.flags|=1,e!==null&&l?(n.child=Gi(n,e.child,null,u),n.child=Gi(n,null,a,u)):ct(e,n,a,u),n.memoizedState=f.state,e=n.child):e=Tn(e,n,u),e}function Fm(e,n,a,l){return Zi(),n.flags|=256,ct(e,n,a,l),n.child}var sc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function rc(e){return{baseLanes:e,cachePool:Uh()}}function lc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=qt),e}function Vm(e,n,a){var l=n.pendingProps,u=!1,f=(n.flags&128)!==0,g;if((g=f)||(g=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),g&&(u=!0,n.flags&=-129),g=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ee){if(u?Wn(n):ei(),(e=Ze)?(e=ng(e,Xt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Yn!==null?{id:un,overflow:cn}:null,retryLane:536870912,hydrationErrors:null},a=Th(e),a.return=n,n.child=a,ot=n,Ze=null)):e=null,e===null)throw Vn(n);return Qc(e)?n.lanes=32:n.lanes=536870912,null}var _=l.children;return l=l.fallback,u?(ei(),u=n.mode,_=fl({mode:"hidden",children:_},u),l=Li(l,u,a,null),_.return=n,l.return=n,_.sibling=l,n.child=_,l=n.child,l.memoizedState=rc(a),l.childLanes=lc(e,g,a),n.memoizedState=sc,Ls(null,l)):(Wn(n),oc(n,_))}var O=e.memoizedState;if(O!==null&&(_=O.dehydrated,_!==null)){if(f)n.flags&256?(Wn(n),n.flags&=-257,n=uc(e,n,a)):n.memoizedState!==null?(ei(),n.child=e.child,n.flags|=128,n=null):(ei(),_=l.fallback,u=n.mode,l=fl({mode:"visible",children:l.children},u),_=Li(_,u,a,null),_.flags|=2,l.return=n,_.return=n,l.sibling=_,n.child=l,Gi(n,e.child,null,a),l=n.child,l.memoizedState=rc(a),l.childLanes=lc(e,g,a),n.memoizedState=sc,n=Ls(null,l));else if(Wn(n),Qc(_)){if(g=_.nextSibling&&_.nextSibling.dataset,g)var D=g.dgst;g=D,l=Error(r(419)),l.stack="",l.digest=g,Os({value:l,source:null,stack:null}),n=uc(e,n,a)}else if(We||Ea(e,n,a,!1),g=(a&e.childLanes)!==0,We||g){if(g=Ue,g!==null&&(l=Dd(g,a),l!==0&&l!==O.retryLane))throw O.retryLane=l,Ui(e,l),zt(g,e,l),ic;$c(_)||Sl(),n=uc(e,n,a)}else $c(_)?(n.flags|=192,n.child=e.child,n=null):(e=O.treeContext,Ze=It(_.nextSibling),ot=n,Ee=!0,Fn=null,Xt=!1,e!==null&&Ah(n,e),n=oc(n,l.children),n.flags|=4096);return n}return u?(ei(),_=l.fallback,u=n.mode,O=e.child,D=O.sibling,l=xn(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,D!==null?_=xn(D,_):(_=Li(_,u,a,null),_.flags|=2),_.return=n,l.return=n,l.sibling=_,n.child=l,Ls(null,l),l=n.child,_=e.child.memoizedState,_===null?_=rc(a):(u=_.cachePool,u!==null?(O=Je._currentValue,u=u.parent!==O?{parent:O,pool:O}:u):u=Uh(),_={baseLanes:_.baseLanes|a,cachePool:u}),l.memoizedState=_,l.childLanes=lc(e,g,a),n.memoizedState=sc,Ls(e.child,l)):(Wn(n),a=e.child,e=a.sibling,a=xn(a,{mode:"visible",children:l.children}),a.return=n,a.sibling=null,e!==null&&(g=n.deletions,g===null?(n.deletions=[e],n.flags|=16):g.push(e)),n.child=a,n.memoizedState=null,a)}function oc(e,n){return n=fl({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function fl(e,n){return e=kt(22,e,null,n),e.lanes=0,e}function uc(e,n,a){return Gi(n,e.child,null,a),e=oc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Pm(e,n,a){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),wu(e.return,n,a)}function cc(e,n,a,l,u,f){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:u,treeForkCount:f}:(g.isBackwards=n,g.rendering=null,g.renderingStartTime=0,g.last=l,g.tail=a,g.tailMode=u,g.treeForkCount=f)}function Xm(e,n,a){var l=n.pendingProps,u=l.revealOrder,f=l.tail;l=l.children;var g=Pe.current,_=(g&2)!==0;if(_?(g=g&1|2,n.flags|=128):g&=1,V(Pe,g),ct(e,n,l,a),l=Ee?ws:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Pm(e,a,n);else if(e.tag===19)Pm(e,a,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(a=n.child,u=null;a!==null;)e=a.alternate,e!==null&&Wr(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=n.child,n.child=null):(u=a.sibling,a.sibling=null),cc(n,!1,u,a,f,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&Wr(e)===null){n.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}cc(n,!0,a,null,f,l);break;case"together":cc(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function Tn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),ii|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Ea(e,n,a,!1),(a&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,a=xn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=xn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function fc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Kr(e)))}function KS(e,n,a){switch(n.tag){case 3:Le(n,n.stateNode.containerInfo),Pn(n,Je,e.memoizedState.cache),Zi();break;case 27:case 5:on(n);break;case 4:Le(n,n.stateNode.containerInfo);break;case 10:Pn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Uu(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(Wn(n),n.flags|=128,null):(a&n.child.childLanes)!==0?Vm(e,n,a):(Wn(n),e=Tn(e,n,a),e!==null?e.sibling:null);Wn(n);break;case 19:var u=(e.flags&128)!==0;if(l=(a&n.childLanes)!==0,l||(Ea(e,n,a,!1),l=(a&n.childLanes)!==0),u){if(l)return Xm(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),V(Pe,Pe.current),l)break;return null;case 22:return n.lanes=0,$m(e,n,a,n.pendingProps);case 24:Pn(n,Je,e.memoizedState.cache)}return Tn(e,n,a)}function Jm(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)We=!0;else{if(!fc(e,a)&&(n.flags&128)===0)return We=!1,KS(e,n,a);We=(e.flags&131072)!==0}else We=!1,Ee&&(n.flags&1048576)!==0&&Nh(n,ws,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(e=$i(n.elementType),n.type=e,typeof e=="function")gu(e)?(l=Yi(e,l),n.tag=1,n=Ym(null,n,e,l,a)):(n.tag=0,n=ac(null,n,e,l,a));else{if(e!=null){var u=e.$$typeof;if(u===K){n.tag=11,n=qm(null,n,e,l,a);break e}else if(u===N){n.tag=14,n=Bm(null,n,e,l,a);break e}}throw n=ye(e)||e,Error(r(306,n,""))}}return n;case 0:return ac(e,n,n.type,n.pendingProps,a);case 1:return l=n.type,u=Yi(l,n.pendingProps),Ym(e,n,l,u,a);case 3:e:{if(Le(n,n.stateNode.containerInfo),e===null)throw Error(r(387));l=n.pendingProps;var f=n.memoizedState;u=f.element,Ru(e,n),Cs(n,l,null,a);var g=n.memoizedState;if(l=g.cache,Pn(n,Je,l),l!==f.cache&&Ou(n,[Je],a,!0),Rs(),l=g.element,f.isDehydrated)if(f={element:l,isDehydrated:!1,cache:g.cache},n.updateQueue.baseState=f,n.memoizedState=f,n.flags&256){n=Fm(e,n,l,a);break e}else if(l!==u){u=Ft(Error(r(424)),n),Os(u),n=Fm(e,n,l,a);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ze=It(e.firstChild),ot=n,Ee=!0,Fn=null,Xt=!0,a=$h(n,null,l,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(Zi(),l===u){n=Tn(e,n,a);break e}ct(e,n,l,a)}n=n.child}return n;case 26:return cl(e,n),e===null?(a=og(n.type,null,n.pendingProps,null))?n.memoizedState=a:Ee||(a=n.type,e=n.pendingProps,l=Tl(ge.current).createElement(a),l[lt]=n,l[St]=e,ft(l,a,e),at(l),n.stateNode=l):n.memoizedState=og(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return on(n),e===null&&Ee&&(l=n.stateNode=sg(n.type,n.pendingProps,ge.current),ot=n,Xt=!0,u=Ze,oi(n.type)?(Gc=u,Ze=It(l.firstChild)):Ze=u),ct(e,n,n.pendingProps.children,a),cl(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ee&&((u=l=Ze)&&(l=xx(l,n.type,n.pendingProps,Xt),l!==null?(n.stateNode=l,ot=n,Ze=It(l.firstChild),Xt=!1,u=!0):u=!1),u||Vn(n)),on(n),u=n.type,f=n.pendingProps,g=e!==null?e.memoizedProps:null,l=f.children,qc(u,f)?l=null:g!==null&&qc(u,g)&&(n.flags|=32),n.memoizedState!==null&&(u=Zu(e,n,US,null,null,a),Is._currentValue=u),cl(e,n),ct(e,n,l,a),n.child;case 6:return e===null&&Ee&&((e=a=Ze)&&(a=_x(a,n.pendingProps,Xt),a!==null?(n.stateNode=a,ot=n,Ze=null,e=!0):e=!1),e||Vn(n)),null;case 13:return Vm(e,n,a);case 4:return Le(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Gi(n,null,l,a):ct(e,n,l,a),n.child;case 11:return qm(e,n,n.type,n.pendingProps,a);case 7:return ct(e,n,n.pendingProps,a),n.child;case 8:return ct(e,n,n.pendingProps.children,a),n.child;case 12:return ct(e,n,n.pendingProps.children,a),n.child;case 10:return l=n.pendingProps,Pn(n,n.type,l.value),ct(e,n,l.children,a),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,Bi(n),u=ut(u),l=l(u),n.flags|=1,ct(e,n,l,a),n.child;case 14:return Bm(e,n,n.type,n.pendingProps,a);case 15:return Hm(e,n,n.type,n.pendingProps,a);case 19:return Xm(e,n,a);case 31:return GS(e,n,a);case 22:return $m(e,n,a,n.pendingProps);case 24:return Bi(n),l=ut(Je),e===null?(u=ju(),u===null&&(u=Ue,f=zu(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=a),u=f),n.memoizedState={parent:l,cache:u},Au(n),Pn(n,Je,u)):((e.lanes&a)!==0&&(Ru(e,n),Cs(n,null,null,a),Rs()),u=e.memoizedState,f=n.memoizedState,u.parent!==l?(u={parent:l,cache:l},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),Pn(n,Je,l)):(l=f.cache,Pn(n,Je,l),l!==u.cache&&Ou(n,[Je],a,!0))),ct(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function jn(e){e.flags|=4}function dc(e,n,a,l,u){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(wp())e.flags|=8192;else throw Qi=Pr,Nu}else e.flags&=-16777217}function Im(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hg(n))if(wp())e.flags|=8192;else throw Qi=Pr,Nu}function dl(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Rd():536870912,e.lanes|=n,ka|=n)}function Zs(e,n){if(!Ee)switch(e.tailMode){case"hidden":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function qe(e){var n=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(n)for(var u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags&65011712,l|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)a|=u.lanes|u.childLanes,l|=u.subtreeFlags,l|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=l,e.childLanes=a,n}function YS(e,n,a){var l=n.pendingProps;switch(Su(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qe(n),null;case 1:return qe(n),null;case 3:return a=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),wn(Je),Be(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(_a(n)?jn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,_u())),qe(n),null;case 26:var u=n.type,f=n.memoizedState;return e===null?(jn(n),f!==null?(qe(n),Im(n,f)):(qe(n),dc(n,u,null,l,a))):f?f!==e.memoizedState?(jn(n),qe(n),Im(n,f)):(qe(n),n.flags&=-16777217):(e=e.memoizedProps,e!==l&&jn(n),qe(n),dc(n,u,e,l,a)),null;case 27:if(Ni(n),a=ge.current,u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&jn(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return qe(n),null}e=I.current,_a(n)?Rh(n):(e=sg(u,l,a),n.stateNode=e,jn(n))}return qe(n),null;case 5:if(Ni(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&jn(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return qe(n),null}if(f=I.current,_a(n))Rh(n);else{var g=Tl(ge.current);switch(f){case 1:f=g.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=g.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=g.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=g.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=g.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof l.is=="string"?g.createElement("select",{is:l.is}):g.createElement("select"),l.multiple?f.multiple=!0:l.size&&(f.size=l.size);break;default:f=typeof l.is=="string"?g.createElement(u,{is:l.is}):g.createElement(u)}}f[lt]=n,f[St]=l;e:for(g=n.child;g!==null;){if(g.tag===5||g.tag===6)f.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===n)break e;for(;g.sibling===null;){if(g.return===null||g.return===n)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}n.stateNode=f;e:switch(ft(f,u,l),u){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&jn(n)}}return qe(n),dc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&jn(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(r(166));if(e=ge.current,_a(n)){if(e=n.stateNode,a=n.memoizedProps,l=null,u=ot,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[lt]=n,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||Vp(e.nodeValue,a)),e||Vn(n,!0)}else e=Tl(e).createTextNode(l),e[lt]=n,n.stateNode=e}return qe(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(l=_a(n),a!==null){if(e===null){if(!l)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[lt]=n}else Zi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;qe(n),e=!1}else a=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(Lt(n),n):(Lt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return qe(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=_a(n),l!==null&&l.dehydrated!==null){if(e===null){if(!u)throw Error(r(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(r(317));u[lt]=n}else Zi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;qe(n),u=!1}else u=_u(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(Lt(n),n):(Lt(n),null)}return Lt(n),(n.flags&128)!==0?(n.lanes=a,n):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=n.child,u=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(u=l.alternate.memoizedState.cachePool.pool),f=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(f=l.memoizedState.cachePool.pool),f!==u&&(l.flags|=2048)),a!==e&&a&&(n.child.flags|=8192),dl(n,n.updateQueue),qe(n),null);case 4:return Be(),e===null&&Dc(n.stateNode.containerInfo),qe(n),null;case 10:return wn(n.type),qe(n),null;case 19:if(Z(Pe),l=n.memoizedState,l===null)return qe(n),null;if(u=(n.flags&128)!==0,f=l.rendering,f===null)if(u)Zs(l,!1);else{if(Ve!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=Wr(e),f!==null){for(n.flags|=128,Zs(l,!1),e=f.updateQueue,n.updateQueue=e,dl(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)zh(a,e),a=a.sibling;return V(Pe,Pe.current&1|2),Ee&&_n(n,l.treeForkCount),n.child}e=e.sibling}l.tail!==null&&Rt()>yl&&(n.flags|=128,u=!0,Zs(l,!1),n.lanes=4194304)}else{if(!u)if(e=Wr(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,dl(n,e),Zs(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Ee)return qe(n),null}else 2*Rt()-l.renderingStartTime>yl&&a!==536870912&&(n.flags|=128,u=!0,Zs(l,!1),n.lanes=4194304);l.isBackwards?(f.sibling=n.child,n.child=f):(e=l.last,e!==null?e.sibling=f:n.child=f,l.last=f)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Rt(),e.sibling=null,a=Pe.current,V(Pe,u?a&1|2:a&1),Ee&&_n(n,l.treeForkCount),e):(qe(n),null);case 22:case 23:return Lt(n),ku(),l=n.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?(a&536870912)!==0&&(n.flags&128)===0&&(qe(n),n.subtreeFlags&6&&(n.flags|=8192)):qe(n),a=n.updateQueue,a!==null&&dl(n,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(l=n.memoizedState.cachePool.pool),l!==a&&(n.flags|=2048),e!==null&&Z(Hi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),wn(Je),qe(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function FS(e,n){switch(Su(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return wn(Je),Be(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ni(n),null;case 31:if(n.memoizedState!==null){if(Lt(n),n.alternate===null)throw Error(r(340));Zi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Lt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));Zi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Z(Pe),null;case 4:return Be(),null;case 10:return wn(n.type),null;case 22:case 23:return Lt(n),ku(),e!==null&&Z(Hi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return wn(Je),null;case 25:return null;default:return null}}function Wm(e,n){switch(Su(n),n.tag){case 3:wn(Je),Be();break;case 26:case 27:case 5:Ni(n);break;case 4:Be();break;case 31:n.memoizedState!==null&&Lt(n);break;case 13:Lt(n);break;case 19:Z(Pe);break;case 10:wn(n.type);break;case 22:case 23:Lt(n),ku(),e!==null&&Z(Hi);break;case 24:wn(Je)}}function qs(e,n){try{var a=n.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var u=l.next;a=u;do{if((a.tag&e)===e){l=void 0;var f=a.create,g=a.inst;l=f(),g.destroy=l}a=a.next}while(a!==u)}}catch(_){Ce(n,n.return,_)}}function ti(e,n,a){try{var l=n.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var f=u.next;l=f;do{if((l.tag&e)===e){var g=l.inst,_=g.destroy;if(_!==void 0){g.destroy=void 0,u=n;var O=a,D=_;try{D()}catch(B){Ce(u,O,B)}}}l=l.next}while(l!==f)}}catch(B){Ce(n,n.return,B)}}function ep(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Gh(n,a)}catch(l){Ce(e,e.return,l)}}}function tp(e,n,a){a.props=Yi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Ce(e,n,l)}}function Bs(e,n){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(u){Ce(e,n,u)}}function fn(e,n){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(u){Ce(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){Ce(e,n,u)}else a.current=null}function np(e){var n=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(u){Ce(e,e.return,u)}}function hc(e,n,a){try{var l=e.stateNode;px(l,e.type,a,n),l[St]=n}catch(u){Ce(e,e.return,u)}}function ip(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&oi(e.type)||e.tag===4}function mc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ip(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&oi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function pc(e,n,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,n):(n=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,n.appendChild(e),a=a._reactRootContainer,a!=null||n.onclick!==null||(n.onclick=bn));else if(l!==4&&(l===27&&oi(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(pc(e,n,a),e=e.sibling;e!==null;)pc(e,n,a),e=e.sibling}function hl(e,n,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,n?a.insertBefore(e,n):a.appendChild(e);else if(l!==4&&(l===27&&oi(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(hl(e,n,a),e=e.sibling;e!==null;)hl(e,n,a),e=e.sibling}function ap(e){var n=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);ft(n,l,a),n[lt]=e,n[St]=a}catch(f){Ce(e,e.return,f)}}var Nn=!1,et=!1,gc=!1,sp=typeof WeakSet=="function"?WeakSet:Set,st=null;function VS(e,n){if(e=e.containerInfo,Lc=Dl,e=yh(e),uu(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var u=l.anchorOffset,f=l.focusNode;l=l.focusOffset;try{a.nodeType,f.nodeType}catch{a=null;break e}var g=0,_=-1,O=-1,D=0,B=0,Q=e,k=null;t:for(;;){for(var L;Q!==a||u!==0&&Q.nodeType!==3||(_=g+u),Q!==f||l!==0&&Q.nodeType!==3||(O=g+l),Q.nodeType===3&&(g+=Q.nodeValue.length),(L=Q.firstChild)!==null;)k=Q,Q=L;for(;;){if(Q===e)break t;if(k===a&&++D===u&&(_=g),k===f&&++B===l&&(O=g),(L=Q.nextSibling)!==null)break;Q=k,k=Q.parentNode}Q=L}a=_===-1||O===-1?null:{start:_,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(Zc={focusedElem:e,selectionRange:a},Dl=!1,st=n;st!==null;)if(n=st,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,st=e;else for(;st!==null;){switch(n=st,f=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)u=e[a],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,a=n,u=f.memoizedProps,f=f.memoizedState,l=a.stateNode;try{var W=Yi(a.type,u);e=l.getSnapshotBeforeUpdate(W,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(oe){Ce(a,a.return,oe)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Hc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=n.sibling,e!==null){e.return=n.return,st=e;break}st=n.return}}function rp(e,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Rn(e,a),l&4&&qs(5,a);break;case 1:if(Rn(e,a),l&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(g){Ce(a,a.return,g)}else{var u=Yi(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(g){Ce(a,a.return,g)}}l&64&&ep(a),l&512&&Bs(a,a.return);break;case 3:if(Rn(e,a),l&64&&(e=a.updateQueue,e!==null)){if(n=null,a.child!==null)switch(a.child.tag){case 27:case 5:n=a.child.stateNode;break;case 1:n=a.child.stateNode}try{Gh(e,n)}catch(g){Ce(a,a.return,g)}}break;case 27:n===null&&l&4&&ap(a);case 26:case 5:Rn(e,a),n===null&&l&4&&np(a),l&512&&Bs(a,a.return);break;case 12:Rn(e,a);break;case 31:Rn(e,a),l&4&&up(e,a);break;case 13:Rn(e,a),l&4&&cp(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=ix.bind(null,a),Ex(e,a))));break;case 22:if(l=a.memoizedState!==null||Nn,!l){n=n!==null&&n.memoizedState!==null||et,u=Nn;var f=et;Nn=l,(et=n)&&!f?Cn(e,a,(a.subtreeFlags&8772)!==0):Rn(e,a),Nn=u,et=f}break;case 30:break;default:Rn(e,a)}}function lp(e){var n=e.alternate;n!==null&&(e.alternate=null,lp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Yo(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var He=null,_t=!1;function An(e,n,a){for(a=a.child;a!==null;)op(e,n,a),a=a.sibling}function op(e,n,a){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(cs,a)}catch{}switch(a.tag){case 26:et||fn(a,n),An(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:et||fn(a,n);var l=He,u=_t;oi(a.type)&&(He=a.stateNode,_t=!1),An(e,n,a),Ps(a.stateNode),He=l,_t=u;break;case 5:et||fn(a,n);case 6:if(l=He,u=_t,He=null,An(e,n,a),He=l,_t=u,He!==null)if(_t)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(f){Ce(a,n,f)}else try{He.removeChild(a.stateNode)}catch(f){Ce(a,n,f)}break;case 18:He!==null&&(_t?(e=He,eg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Qa(e)):eg(He,a.stateNode));break;case 4:l=He,u=_t,He=a.stateNode.containerInfo,_t=!0,An(e,n,a),He=l,_t=u;break;case 0:case 11:case 14:case 15:ti(2,a,n),et||ti(4,a,n),An(e,n,a);break;case 1:et||(fn(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&tp(a,n,l)),An(e,n,a);break;case 21:An(e,n,a);break;case 22:et=(l=et)||a.memoizedState!==null,An(e,n,a),et=l;break;default:An(e,n,a)}}function up(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Qa(e)}catch(a){Ce(n,n.return,a)}}}function cp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Qa(e)}catch(a){Ce(n,n.return,a)}}function PS(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new sp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new sp),n;default:throw Error(r(435,e.tag))}}function ml(e,n){var a=PS(e);n.forEach(function(l){if(!a.has(l)){a.add(l);var u=ax.bind(null,e,l);l.then(u,u)}})}function Et(e,n){var a=n.deletions;if(a!==null)for(var l=0;l<a.length;l++){var u=a[l],f=e,g=n,_=g;e:for(;_!==null;){switch(_.tag){case 27:if(oi(_.type)){He=_.stateNode,_t=!1;break e}break;case 5:He=_.stateNode,_t=!1;break e;case 3:case 4:He=_.stateNode.containerInfo,_t=!0;break e}_=_.return}if(He===null)throw Error(r(160));op(f,g,u),He=null,_t=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)fp(n,e),n=n.sibling}var nn=null;function fp(e,n){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(n,e),wt(e),l&4&&(ti(3,e,e.return),qs(3,e),ti(5,e,e.return));break;case 1:Et(n,e),wt(e),l&512&&(et||a===null||fn(a,a.return)),l&64&&Nn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var u=nn;if(Et(n,e),wt(e),l&512&&(et||a===null||fn(a,a.return)),l&4){var f=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,u=u.ownerDocument||u;t:switch(l){case"title":f=u.getElementsByTagName("title")[0],(!f||f[hs]||f[lt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(l),u.head.insertBefore(f,u.querySelector("head > title"))),ft(f,l,a),f[lt]=e,at(f),l=f;break e;case"link":var g=fg("link","href",u).get(l+(a.href||""));if(g){for(var _=0;_<g.length;_++)if(f=g[_],f.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&f.getAttribute("rel")===(a.rel==null?null:a.rel)&&f.getAttribute("title")===(a.title==null?null:a.title)&&f.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){g.splice(_,1);break t}}f=u.createElement(l),ft(f,l,a),u.head.appendChild(f);break;case"meta":if(g=fg("meta","content",u).get(l+(a.content||""))){for(_=0;_<g.length;_++)if(f=g[_],f.getAttribute("content")===(a.content==null?null:""+a.content)&&f.getAttribute("name")===(a.name==null?null:a.name)&&f.getAttribute("property")===(a.property==null?null:a.property)&&f.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&f.getAttribute("charset")===(a.charSet==null?null:a.charSet)){g.splice(_,1);break t}}f=u.createElement(l),ft(f,l,a),u.head.appendChild(f);break;default:throw Error(r(468,l))}f[lt]=e,at(f),l=f}e.stateNode=l}else dg(u,e.type,e.stateNode);else e.stateNode=cg(u,l,e.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?dg(u,e.type,e.stateNode):cg(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&hc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Et(n,e),wt(e),l&512&&(et||a===null||fn(a,a.return)),a!==null&&l&4&&hc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Et(n,e),wt(e),l&512&&(et||a===null||fn(a,a.return)),e.flags&32){u=e.stateNode;try{da(u,"")}catch(W){Ce(e,e.return,W)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,hc(e,u,a!==null?a.memoizedProps:u)),l&1024&&(gc=!0);break;case 6:if(Et(n,e),wt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(W){Ce(e,e.return,W)}}break;case 3:if(Al=null,u=nn,nn=jl(n.containerInfo),Et(n,e),nn=u,wt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Qa(n.containerInfo)}catch(W){Ce(e,e.return,W)}gc&&(gc=!1,dp(e));break;case 4:l=nn,nn=jl(e.stateNode.containerInfo),Et(n,e),wt(e),nn=l;break;case 12:Et(n,e),wt(e);break;case 31:Et(n,e),wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ml(e,l)));break;case 13:Et(n,e),wt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(gl=Rt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ml(e,l)));break;case 22:u=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,D=Nn,B=et;if(Nn=D||u,et=B||O,Et(n,e),et=B,Nn=D,wt(e),l&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(a===null||O||Nn||et||Fi(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){O=a=n;try{if(f=O.stateNode,u)g=f.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{_=O.stateNode;var Q=O.memoizedProps.style,k=Q!=null&&Q.hasOwnProperty("display")?Q.display:null;_.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(W){Ce(O,O.return,W)}}}else if(n.tag===6){if(a===null){O=n;try{O.stateNode.nodeValue=u?"":O.memoizedProps}catch(W){Ce(O,O.return,W)}}}else if(n.tag===18){if(a===null){O=n;try{var L=O.stateNode;u?tg(L,!0):tg(O.stateNode,!1)}catch(W){Ce(O,O.return,W)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;a===n&&(a=null),n=n.return}a===n&&(a=null),n.sibling.return=n.return,n=n.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,ml(e,a))));break;case 19:Et(n,e),wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,ml(e,l)));break;case 30:break;case 21:break;default:Et(n,e),wt(e)}}function wt(e){var n=e.flags;if(n&2){try{for(var a,l=e.return;l!==null;){if(ip(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,f=mc(e);hl(e,f,u);break;case 5:var g=a.stateNode;a.flags&32&&(da(g,""),a.flags&=-33);var _=mc(e);hl(e,_,g);break;case 3:case 4:var O=a.stateNode.containerInfo,D=mc(e);pc(e,D,O);break;default:throw Error(r(161))}}catch(B){Ce(e,e.return,B)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function dp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;dp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Rn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)rp(e,n.alternate,n),n=n.sibling}function Fi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ti(4,n,n.return),Fi(n);break;case 1:fn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&tp(n,n.return,a),Fi(n);break;case 27:Ps(n.stateNode);case 26:case 5:fn(n,n.return),Fi(n);break;case 22:n.memoizedState===null&&Fi(n);break;case 30:Fi(n);break;default:Fi(n)}e=e.sibling}}function Cn(e,n,a){for(a=a&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var l=n.alternate,u=e,f=n,g=f.flags;switch(f.tag){case 0:case 11:case 15:Cn(u,f,a),qs(4,f);break;case 1:if(Cn(u,f,a),l=f,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(D){Ce(l,l.return,D)}if(l=f,u=l.updateQueue,u!==null){var _=l.stateNode;try{var O=u.shared.hiddenCallbacks;if(O!==null)for(u.shared.hiddenCallbacks=null,u=0;u<O.length;u++)Qh(O[u],_)}catch(D){Ce(l,l.return,D)}}a&&g&64&&ep(f),Bs(f,f.return);break;case 27:ap(f);case 26:case 5:Cn(u,f,a),a&&l===null&&g&4&&np(f),Bs(f,f.return);break;case 12:Cn(u,f,a);break;case 31:Cn(u,f,a),a&&g&4&&up(u,f);break;case 13:Cn(u,f,a),a&&g&4&&cp(u,f);break;case 22:f.memoizedState===null&&Cn(u,f,a),Bs(f,f.return);break;case 30:break;default:Cn(u,f,a)}n=n.sibling}}function yc(e,n){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&zs(a))}function vc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&zs(e))}function an(e,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)hp(e,n,a,l),n=n.sibling}function hp(e,n,a,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:an(e,n,a,l),u&2048&&qs(9,n);break;case 1:an(e,n,a,l);break;case 3:an(e,n,a,l),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&zs(e)));break;case 12:if(u&2048){an(e,n,a,l),e=n.stateNode;try{var f=n.memoizedProps,g=f.id,_=f.onPostCommit;typeof _=="function"&&_(g,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(O){Ce(n,n.return,O)}}else an(e,n,a,l);break;case 31:an(e,n,a,l);break;case 13:an(e,n,a,l);break;case 23:break;case 22:f=n.stateNode,g=n.alternate,n.memoizedState!==null?f._visibility&2?an(e,n,a,l):Hs(e,n):f._visibility&2?an(e,n,a,l):(f._visibility|=2,Ca(e,n,a,l,(n.subtreeFlags&10256)!==0||!1)),u&2048&&yc(g,n);break;case 24:an(e,n,a,l),u&2048&&vc(n.alternate,n);break;default:an(e,n,a,l)}}function Ca(e,n,a,l,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=e,g=n,_=a,O=l,D=g.flags;switch(g.tag){case 0:case 11:case 15:Ca(f,g,_,O,u),qs(8,g);break;case 23:break;case 22:var B=g.stateNode;g.memoizedState!==null?B._visibility&2?Ca(f,g,_,O,u):Hs(f,g):(B._visibility|=2,Ca(f,g,_,O,u)),u&&D&2048&&yc(g.alternate,g);break;case 24:Ca(f,g,_,O,u),u&&D&2048&&vc(g.alternate,g);break;default:Ca(f,g,_,O,u)}n=n.sibling}}function Hs(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var a=e,l=n,u=l.flags;switch(l.tag){case 22:Hs(a,l),u&2048&&yc(l.alternate,l);break;case 24:Hs(a,l),u&2048&&vc(l.alternate,l);break;default:Hs(a,l)}n=n.sibling}}var $s=8192;function Ma(e,n,a){if(e.subtreeFlags&$s)for(e=e.child;e!==null;)mp(e,n,a),e=e.sibling}function mp(e,n,a){switch(e.tag){case 26:Ma(e,n,a),e.flags&$s&&e.memoizedState!==null&&kx(a,nn,e.memoizedState,e.memoizedProps);break;case 5:Ma(e,n,a);break;case 3:case 4:var l=nn;nn=jl(e.stateNode.containerInfo),Ma(e,n,a),nn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=$s,$s=16777216,Ma(e,n,a),$s=l):Ma(e,n,a));break;default:Ma(e,n,a)}}function pp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function Qs(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];st=l,yp(l,e)}pp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)gp(e),e=e.sibling}function gp(e){switch(e.tag){case 0:case 11:case 15:Qs(e),e.flags&2048&&ti(9,e,e.return);break;case 3:Qs(e);break;case 12:Qs(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,pl(e)):Qs(e);break;default:Qs(e)}}function pl(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var a=0;a<n.length;a++){var l=n[a];st=l,yp(l,e)}pp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ti(8,n,n.return),pl(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,pl(n));break;default:pl(n)}e=e.sibling}}function yp(e,n){for(;st!==null;){var a=st;switch(a.tag){case 0:case 11:case 15:ti(8,a,n);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:zs(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,st=l;else e:for(a=e;st!==null;){l=st;var u=l.sibling,f=l.return;if(lp(l),l===a){st=null;break e}if(u!==null){u.return=f,st=u;break e}st=f}}}var XS={getCacheForType:function(e){var n=ut(Je),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return ut(Je).controller.signal}},JS=typeof WeakMap=="function"?WeakMap:Map,Te=0,Ue=null,ve=null,Se=0,Re=0,Zt=null,ni=!1,Da=!1,bc=!1,Mn=0,Ve=0,ii=0,Vi=0,Sc=0,qt=0,ka=0,Gs=null,Ot=null,xc=!1,gl=0,vp=0,yl=1/0,vl=null,ai=null,nt=0,si=null,Ua=null,Dn=0,_c=0,Ec=null,bp=null,Ks=0,wc=null;function Bt(){return(Te&2)!==0&&Se!==0?Se&-Se:U.T!==null?Ac():kd()}function Sp(){if(qt===0)if((Se&536870912)===0||Ee){var e=zr;zr<<=1,(zr&3932160)===0&&(zr=262144),qt=e}else qt=536870912;return e=Ut.current,e!==null&&(e.flags|=32),qt}function zt(e,n,a){(e===Ue&&(Re===2||Re===9)||e.cancelPendingCommit!==null)&&(La(e,0),ri(e,Se,qt,!1)),ds(e,a),((Te&2)===0||e!==Ue)&&(e===Ue&&((Te&2)===0&&(Vi|=a),Ve===4&&ri(e,Se,qt,!1)),dn(e))}function xp(e,n,a){if((Te&6)!==0)throw Error(r(327));var l=!a&&(n&127)===0&&(n&e.expiredLanes)===0||fs(e,n),u=l?ex(e,n):zc(e,n,!0),f=l;do{if(u===0){Da&&!l&&ri(e,n,0,!1);break}else{if(a=e.current.alternate,f&&!IS(a)){u=zc(e,n,!1),f=!1;continue}if(u===2){if(f=n,e.errorRecoveryDisabledLanes&f)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){n=g;e:{var _=e;u=Gs;var O=_.current.memoizedState.isDehydrated;if(O&&(La(_,g).flags|=256),g=zc(_,g,!1),g!==2){if(bc&&!O){_.errorRecoveryDisabledLanes|=f,Vi|=f,u=4;break e}f=Ot,Ot=u,f!==null&&(Ot===null?Ot=f:Ot.push.apply(Ot,f))}u=g}if(f=!1,u!==2)continue}}if(u===1){La(e,0),ri(e,n,0,!0);break}e:{switch(l=e,f=u,f){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:ri(l,n,qt,!ni);break e;case 2:Ot=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(u=gl+300-Rt(),10<u)){if(ri(l,n,qt,!ni),jr(l,0,!0)!==0)break e;Dn=n,l.timeoutHandle=Ip(_p.bind(null,l,a,Ot,vl,xc,n,qt,Vi,ka,ni,f,"Throttled",-0,0),u);break e}_p(l,a,Ot,vl,xc,n,qt,Vi,ka,ni,f,null,-0,0)}}break}while(!0);dn(e)}function _p(e,n,a,l,u,f,g,_,O,D,B,Q,k,L){if(e.timeoutHandle=-1,Q=n.subtreeFlags,Q&8192||(Q&16785408)===16785408){Q={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:bn},mp(n,f,Q);var W=(f&62914560)===f?gl-Rt():(f&4194048)===f?vp-Rt():0;if(W=Ux(Q,W),W!==null){Dn=f,e.cancelPendingCommit=W(Ap.bind(null,e,n,f,a,l,u,g,_,O,B,Q,null,k,L)),ri(e,f,g,!D);return}}Ap(e,n,f,a,l,u,g,_,O)}function IS(e){for(var n=e;;){var a=n.tag;if((a===0||a===11||a===15)&&n.flags&16384&&(a=n.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var u=a[l],f=u.getSnapshot;u=u.value;try{if(!Dt(f(),u))return!1}catch{return!1}}if(a=n.child,n.subtreeFlags&16384&&a!==null)a.return=n,n=a;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function ri(e,n,a,l){n&=~Sc,n&=~Vi,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var u=n;0<u;){var f=31-Mt(u),g=1<<f;l[f]=-1,u&=~g}a!==0&&Cd(e,a,n)}function bl(){return(Te&6)===0?(Ys(0),!1):!0}function Oc(){if(ve!==null){if(Re===0)var e=ve.return;else e=ve,En=qi=null,Hu(e),Ta=null,js=0,e=ve;for(;e!==null;)Wm(e.alternate,e),e=e.return;ve=null}}function La(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,vx(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Dn=0,Oc(),Ue=e,ve=a=xn(e.current,null),Se=n,Re=0,Zt=null,ni=!1,Da=fs(e,n),bc=!1,ka=qt=Sc=Vi=ii=Ve=0,Ot=Gs=null,xc=!1,(n&8)!==0&&(n|=n&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=n;0<l;){var u=31-Mt(l),f=1<<u;n|=e[u],l&=~f}return Mn=n,Br(),a}function Ep(e,n){me=null,U.H=Us,n===za||n===Vr?(n=qh(),Re=3):n===Nu?(n=qh(),Re=4):Re=n===ic?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Zt=n,ve===null&&(Ve=1,ol(e,Ft(n,e.current)))}function wp(){var e=Ut.current;return e===null?!0:(Se&4194048)===Se?Jt===null:(Se&62914560)===Se||(Se&536870912)!==0?e===Jt:!1}function Op(){var e=U.H;return U.H=Us,e===null?Us:e}function zp(){var e=U.A;return U.A=XS,e}function Sl(){Ve=4,ni||(Se&4194048)!==Se&&Ut.current!==null||(Da=!0),(ii&134217727)===0&&(Vi&134217727)===0||Ue===null||ri(Ue,Se,qt,!1)}function zc(e,n,a){var l=Te;Te|=2;var u=Op(),f=zp();(Ue!==e||Se!==n)&&(vl=null,La(e,n)),n=!1;var g=Ve;e:do try{if(Re!==0&&ve!==null){var _=ve,O=Zt;switch(Re){case 8:Oc(),g=6;break e;case 3:case 2:case 9:case 6:Ut.current===null&&(n=!0);var D=Re;if(Re=0,Zt=null,Za(e,_,O,D),a&&Da){g=0;break e}break;default:D=Re,Re=0,Zt=null,Za(e,_,O,D)}}WS(),g=Ve;break}catch(B){Ep(e,B)}while(!0);return n&&e.shellSuspendCounter++,En=qi=null,Te=l,U.H=u,U.A=f,ve===null&&(Ue=null,Se=0,Br()),g}function WS(){for(;ve!==null;)Tp(ve)}function ex(e,n){var a=Te;Te|=2;var l=Op(),u=zp();Ue!==e||Se!==n?(vl=null,yl=Rt()+500,La(e,n)):Da=fs(e,n);e:do try{if(Re!==0&&ve!==null){n=ve;var f=Zt;t:switch(Re){case 1:Re=0,Zt=null,Za(e,n,f,1);break;case 2:case 9:if(Lh(f)){Re=0,Zt=null,jp(n);break}n=function(){Re!==2&&Re!==9||Ue!==e||(Re=7),dn(e)},f.then(n,n);break e;case 3:Re=7;break e;case 4:Re=5;break e;case 7:Lh(f)?(Re=0,Zt=null,jp(n)):(Re=0,Zt=null,Za(e,n,f,7));break;case 5:var g=null;switch(ve.tag){case 26:g=ve.memoizedState;case 5:case 27:var _=ve;if(g?hg(g):_.stateNode.complete){Re=0,Zt=null;var O=_.sibling;if(O!==null)ve=O;else{var D=_.return;D!==null?(ve=D,xl(D)):ve=null}break t}}Re=0,Zt=null,Za(e,n,f,5);break;case 6:Re=0,Zt=null,Za(e,n,f,6);break;case 8:Oc(),Ve=6;break e;default:throw Error(r(462))}}tx();break}catch(B){Ep(e,B)}while(!0);return En=qi=null,U.H=l,U.A=u,Te=a,ve!==null?0:(Ue=null,Se=0,Br(),Ve)}function tx(){for(;ve!==null&&!w0();)Tp(ve)}function Tp(e){var n=Jm(e.alternate,e,Mn);e.memoizedProps=e.pendingProps,n===null?xl(e):ve=n}function jp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Km(a,n,n.pendingProps,n.type,void 0,Se);break;case 11:n=Km(a,n,n.pendingProps,n.type.render,n.ref,Se);break;case 5:Hu(n);default:Wm(a,n),n=ve=zh(n,Mn),n=Jm(a,n,Mn)}e.memoizedProps=e.pendingProps,n===null?xl(e):ve=n}function Za(e,n,a,l){En=qi=null,Hu(n),Ta=null,js=0;var u=n.return;try{if(QS(e,u,n,a,Se)){Ve=1,ol(e,Ft(a,e.current)),ve=null;return}}catch(f){if(u!==null)throw ve=u,f;Ve=1,ol(e,Ft(a,e.current)),ve=null;return}n.flags&32768?(Ee||l===1?e=!0:Da||(Se&536870912)!==0?e=!1:(ni=e=!0,(l===2||l===9||l===3||l===6)&&(l=Ut.current,l!==null&&l.tag===13&&(l.flags|=16384))),Np(n,e)):xl(n)}function xl(e){var n=e;do{if((n.flags&32768)!==0){Np(n,ni);return}e=n.return;var a=YS(n.alternate,n,Mn);if(a!==null){ve=a;return}if(n=n.sibling,n!==null){ve=n;return}ve=n=e}while(n!==null);Ve===0&&(Ve=5)}function Np(e,n){do{var a=FS(e.alternate,e);if(a!==null){a.flags&=32767,ve=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){ve=e;return}ve=e=a}while(e!==null);Ve=6,ve=null}function Ap(e,n,a,l,u,f,g,_,O){e.cancelPendingCommit=null;do _l();while(nt!==0);if((Te&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(f=n.lanes|n.childLanes,f|=mu,D0(e,a,f,g,_,O),e===Ue&&(ve=Ue=null,Se=0),Ua=n,si=e,Dn=a,_c=f,Ec=u,bp=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,sx(wr,function(){return kp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,u=J.p,J.p=2,g=Te,Te|=4;try{VS(e,n,a)}finally{Te=g,J.p=u,U.T=l}}nt=1,Rp(),Cp(),Mp()}}function Rp(){if(nt===1){nt=0;var e=si,n=Ua,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=J.p;J.p=2;var u=Te;Te|=4;try{fp(n,e);var f=Zc,g=yh(e.containerInfo),_=f.focusedElem,O=f.selectionRange;if(g!==_&&_&&_.ownerDocument&&gh(_.ownerDocument.documentElement,_)){if(O!==null&&uu(_)){var D=O.start,B=O.end;if(B===void 0&&(B=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(B,_.value.length);else{var Q=_.ownerDocument||document,k=Q&&Q.defaultView||window;if(k.getSelection){var L=k.getSelection(),W=_.textContent.length,oe=Math.min(O.start,W),ke=O.end===void 0?oe:Math.min(O.end,W);!L.extend&&oe>ke&&(g=ke,ke=oe,oe=g);var A=ph(_,oe),T=ph(_,ke);if(A&&T&&(L.rangeCount!==1||L.anchorNode!==A.node||L.anchorOffset!==A.offset||L.focusNode!==T.node||L.focusOffset!==T.offset)){var M=Q.createRange();M.setStart(A.node,A.offset),L.removeAllRanges(),oe>ke?(L.addRange(M),L.extend(T.node,T.offset)):(M.setEnd(T.node,T.offset),L.addRange(M))}}}}for(Q=[],L=_;L=L.parentNode;)L.nodeType===1&&Q.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<Q.length;_++){var H=Q[_];H.element.scrollLeft=H.left,H.element.scrollTop=H.top}}Dl=!!Lc,Zc=Lc=null}finally{Te=u,J.p=l,U.T=a}}e.current=n,nt=2}}function Cp(){if(nt===2){nt=0;var e=si,n=Ua,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=J.p;J.p=2;var u=Te;Te|=4;try{rp(e,n.alternate,n)}finally{Te=u,J.p=l,U.T=a}}nt=3}}function Mp(){if(nt===4||nt===3){nt=0,O0();var e=si,n=Ua,a=Dn,l=bp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?nt=5:(nt=0,Ua=si=null,Dp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(ai=null),Go(a),n=n.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(cs,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=U.T,u=J.p,J.p=2,U.T=null;try{for(var f=e.onRecoverableError,g=0;g<l.length;g++){var _=l[g];f(_.value,{componentStack:_.stack})}}finally{U.T=n,J.p=u}}(Dn&3)!==0&&_l(),dn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===wc?Ks++:(Ks=0,wc=e):Ks=0,Ys(0)}}function Dp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,zs(n)))}function _l(){return Rp(),Cp(),Mp(),kp()}function kp(){if(nt!==5)return!1;var e=si,n=_c;_c=0;var a=Go(Dn),l=U.T,u=J.p;try{J.p=32>a?32:a,U.T=null,a=Ec,Ec=null;var f=si,g=Dn;if(nt=0,Ua=si=null,Dn=0,(Te&6)!==0)throw Error(r(331));var _=Te;if(Te|=4,gp(f.current),hp(f,f.current,g,a),Te=_,Ys(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(cs,f)}catch{}return!0}finally{J.p=u,U.T=l,Dp(e,n)}}function Up(e,n,a){n=Ft(a,n),n=nc(e.stateNode,n,2),e=In(e,n,2),e!==null&&(ds(e,2),dn(e))}function Ce(e,n,a){if(e.tag===3)Up(e,e,a);else for(;n!==null;){if(n.tag===3){Up(n,e,a);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ai===null||!ai.has(l))){e=Ft(a,e),a=Lm(2),l=In(n,a,2),l!==null&&(Zm(a,l,n,e),ds(l,2),dn(l));break}}n=n.return}}function Tc(e,n,a){var l=e.pingCache;if(l===null){l=e.pingCache=new JS;var u=new Set;l.set(n,u)}else u=l.get(n),u===void 0&&(u=new Set,l.set(n,u));u.has(a)||(bc=!0,u.add(a),e=nx.bind(null,e,n,a),n.then(e,e))}function nx(e,n,a){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ue===e&&(Se&a)===a&&(Ve===4||Ve===3&&(Se&62914560)===Se&&300>Rt()-gl?(Te&2)===0&&La(e,0):Sc|=a,ka===Se&&(ka=0)),dn(e)}function Lp(e,n){n===0&&(n=Rd()),e=Ui(e,n),e!==null&&(ds(e,n),dn(e))}function ix(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Lp(e,a)}function ax(e,n){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,u=e.memoizedState;u!==null&&(a=u.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(n),Lp(e,a)}function sx(e,n){return Bo(e,n)}var El=null,qa=null,jc=!1,wl=!1,Nc=!1,li=0;function dn(e){e!==qa&&e.next===null&&(qa===null?El=qa=e:qa=qa.next=e),wl=!0,jc||(jc=!0,lx())}function Ys(e,n){if(!Nc&&wl){Nc=!0;do for(var a=!1,l=El;l!==null;){if(e!==0){var u=l.pendingLanes;if(u===0)var f=0;else{var g=l.suspendedLanes,_=l.pingedLanes;f=(1<<31-Mt(42|e)+1)-1,f&=u&~(g&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Hp(l,f))}else f=Se,f=jr(l,l===Ue?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||fs(l,f)||(a=!0,Hp(l,f));l=l.next}while(a);Nc=!1}}function rx(){Zp()}function Zp(){wl=jc=!1;var e=0;li!==0&&yx()&&(e=li);for(var n=Rt(),a=null,l=El;l!==null;){var u=l.next,f=qp(l,n);f===0?(l.next=null,a===null?El=u:a.next=u,u===null&&(qa=a)):(a=l,(e!==0||(f&3)!==0)&&(wl=!0)),l=u}nt!==0&&nt!==5||Ys(e),li!==0&&(li=0)}function qp(e,n){for(var a=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var g=31-Mt(f),_=1<<g,O=u[g];O===-1?((_&a)===0||(_&l)!==0)&&(u[g]=M0(_,n)):O<=n&&(e.expiredLanes|=_),f&=~_}if(n=Ue,a=Se,a=jr(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===n&&(Re===2||Re===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ho(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||fs(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(l!==null&&Ho(l),Go(a)){case 2:case 8:a=Nd;break;case 32:a=wr;break;case 268435456:a=Ad;break;default:a=wr}return l=Bp.bind(null,e),a=Bo(a,l),e.callbackPriority=n,e.callbackNode=a,n}return l!==null&&l!==null&&Ho(l),e.callbackPriority=2,e.callbackNode=null,2}function Bp(e,n){if(nt!==0&&nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(_l()&&e.callbackNode!==a)return null;var l=Se;return l=jr(e,e===Ue?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(xp(e,l,n),qp(e,Rt()),e.callbackNode!=null&&e.callbackNode===a?Bp.bind(null,e):null)}function Hp(e,n){if(_l())return null;xp(e,n,!0)}function lx(){bx(function(){(Te&6)!==0?Bo(jd,rx):Zp()})}function Ac(){if(li===0){var e=wa;e===0&&(e=Or,Or<<=1,(Or&261888)===0&&(Or=256)),li=e}return li}function $p(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Cr(""+e)}function Qp(e,n){var a=n.ownerDocument.createElement("input");return a.name=n.name,a.value=n.value,e.id&&a.setAttribute("form",e.id),n.parentNode.insertBefore(a,n),e=new FormData(e),a.parentNode.removeChild(a),e}function ox(e,n,a,l,u){if(n==="submit"&&a&&a.stateNode===u){var f=$p((u[St]||null).action),g=l.submitter;g&&(n=(n=g[St]||null)?$p(n.formAction):g.getAttribute("formAction"),n!==null&&(f=n,g=null));var _=new Ur("action","action",null,l,u);e.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(li!==0){var O=g?Qp(u,g):new FormData(u);Xu(a,{pending:!0,data:O,method:u.method,action:f},null,O)}}else typeof f=="function"&&(_.preventDefault(),O=g?Qp(u,g):new FormData(u),Xu(a,{pending:!0,data:O,method:u.method,action:f},f,O))},currentTarget:u}]})}}for(var Rc=0;Rc<hu.length;Rc++){var Cc=hu[Rc],ux=Cc.toLowerCase(),cx=Cc[0].toUpperCase()+Cc.slice(1);tn(ux,"on"+cx)}tn(Sh,"onAnimationEnd"),tn(xh,"onAnimationIteration"),tn(_h,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(zS,"onTransitionRun"),tn(TS,"onTransitionStart"),tn(jS,"onTransitionCancel"),tn(Eh,"onTransitionEnd"),ca("onMouseEnter",["mouseout","mouseover"]),ca("onMouseLeave",["mouseout","mouseover"]),ca("onPointerEnter",["pointerout","pointerover"]),ca("onPointerLeave",["pointerout","pointerover"]),Ci("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ci("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ci("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ci("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ci("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ci("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fs="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(" "),fx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fs));function Gp(e,n){n=(n&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],u=l.event;l=l.listeners;e:{var f=void 0;if(n)for(var g=l.length-1;0<=g;g--){var _=l[g],O=_.instance,D=_.currentTarget;if(_=_.listener,O!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch(B){qr(B)}u.currentTarget=null,f=O}else for(g=0;g<l.length;g++){if(_=l[g],O=_.instance,D=_.currentTarget,_=_.listener,O!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch(B){qr(B)}u.currentTarget=null,f=O}}}}function be(e,n){var a=n[Ko];a===void 0&&(a=n[Ko]=new Set);var l=e+"__bubble";a.has(l)||(Kp(n,e,2,!1),a.add(l))}function Mc(e,n,a){var l=0;n&&(l|=4),Kp(a,e,l,n)}var Ol="_reactListening"+Math.random().toString(36).slice(2);function Dc(e){if(!e[Ol]){e[Ol]=!0,Zd.forEach(function(a){a!=="selectionchange"&&(fx.has(a)||Mc(a,!1,e),Mc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Ol]||(n[Ol]=!0,Mc("selectionchange",!1,n))}}function Kp(e,n,a,l){switch(Sg(n)){case 2:var u=qx;break;case 8:u=Bx;break;default:u=Pc}a=u.bind(null,n,a,e),u=void 0,!eu||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),l?u!==void 0?e.addEventListener(n,a,{capture:!0,passive:u}):e.addEventListener(n,a,!0):u!==void 0?e.addEventListener(n,a,{passive:u}):e.addEventListener(n,a,!1)}function kc(e,n,a,l,u){var f=l;if((n&1)===0&&(n&2)===0&&l!==null)e:for(;;){if(l===null)return;var g=l.tag;if(g===3||g===4){var _=l.stateNode.containerInfo;if(_===u)break;if(g===4)for(g=l.return;g!==null;){var O=g.tag;if((O===3||O===4)&&g.stateNode.containerInfo===u)return;g=g.return}for(;_!==null;){if(g=la(_),g===null)return;if(O=g.tag,O===5||O===6||O===26||O===27){l=f=g;continue e}_=_.parentNode}}l=l.return}Xd(function(){var D=f,B=Io(a),Q=[];e:{var k=wh.get(e);if(k!==void 0){var L=Ur,W=e;switch(e){case"keypress":if(Dr(a)===0)break e;case"keydown":case"keyup":L=aS;break;case"focusin":W="focus",L=au;break;case"focusout":W="blur",L=au;break;case"beforeblur":case"afterblur":L=au;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Wd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=Y0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=lS;break;case Sh:case xh:case _h:L=P0;break;case Eh:L=uS;break;case"scroll":case"scrollend":L=G0;break;case"wheel":L=fS;break;case"copy":case"cut":case"paste":L=J0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=th;break;case"toggle":case"beforetoggle":L=hS}var oe=(n&4)!==0,ke=!oe&&(e==="scroll"||e==="scrollend"),A=oe?k!==null?k+"Capture":null:k;oe=[];for(var T=D,M;T!==null;){var H=T;if(M=H.stateNode,H=H.tag,H!==5&&H!==26&&H!==27||M===null||A===null||(H=ps(T,A),H!=null&&oe.push(Vs(T,H,M))),ke)break;T=T.return}0<oe.length&&(k=new L(k,W,null,a,B),Q.push({event:k,listeners:oe}))}}if((n&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",k&&a!==Jo&&(W=a.relatedTarget||a.fromElement)&&(la(W)||W[ra]))break e;if((L||k)&&(k=B.window===B?B:(k=B.ownerDocument)?k.defaultView||k.parentWindow:window,L?(W=a.relatedTarget||a.toElement,L=D,W=W?la(W):null,W!==null&&(ke=c(W),oe=W.tag,W!==ke||oe!==5&&oe!==27&&oe!==6)&&(W=null)):(L=null,W=D),L!==W)){if(oe=Wd,H="onMouseLeave",A="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(oe=th,H="onPointerLeave",A="onPointerEnter",T="pointer"),ke=L==null?k:ms(L),M=W==null?k:ms(W),k=new oe(H,T+"leave",L,a,B),k.target=ke,k.relatedTarget=M,H=null,la(B)===D&&(oe=new oe(A,T+"enter",W,a,B),oe.target=M,oe.relatedTarget=ke,H=oe),ke=H,L&&W)t:{for(oe=dx,A=L,T=W,M=0,H=A;H;H=oe(H))M++;H=0;for(var ae=T;ae;ae=oe(ae))H++;for(;0<M-H;)A=oe(A),M--;for(;0<H-M;)T=oe(T),H--;for(;M--;){if(A===T||T!==null&&A===T.alternate){oe=A;break t}A=oe(A),T=oe(T)}oe=null}else oe=null;L!==null&&Yp(Q,k,L,oe,!1),W!==null&&ke!==null&&Yp(Q,ke,W,oe,!0)}}e:{if(k=D?ms(D):window,L=k.nodeName&&k.nodeName.toLowerCase(),L==="select"||L==="input"&&k.type==="file")var Oe=uh;else if(lh(k))if(ch)Oe=ES;else{Oe=xS;var ee=SS}else L=k.nodeName,!L||L.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&Xo(D.elementType)&&(Oe=uh):Oe=_S;if(Oe&&(Oe=Oe(e,D))){oh(Q,Oe,a,B);break e}ee&&ee(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Po(k,"number",k.value)}switch(ee=D?ms(D):window,e){case"focusin":(lh(ee)||ee.contentEditable==="true")&&(ga=ee,cu=D,Es=null);break;case"focusout":Es=cu=ga=null;break;case"mousedown":fu=!0;break;case"contextmenu":case"mouseup":case"dragend":fu=!1,vh(Q,a,B);break;case"selectionchange":if(OS)break;case"keydown":case"keyup":vh(Q,a,B)}var pe;if(ru)e:{switch(e){case"compositionstart":var xe="onCompositionStart";break e;case"compositionend":xe="onCompositionEnd";break e;case"compositionupdate":xe="onCompositionUpdate";break e}xe=void 0}else pa?sh(e,a)&&(xe="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(xe="onCompositionStart");xe&&(nh&&a.locale!=="ko"&&(pa||xe!=="onCompositionStart"?xe==="onCompositionEnd"&&pa&&(pe=Jd()):(Kn=B,tu="value"in Kn?Kn.value:Kn.textContent,pa=!0)),ee=zl(D,xe),0<ee.length&&(xe=new eh(xe,e,null,a,B),Q.push({event:xe,listeners:ee}),pe?xe.data=pe:(pe=rh(a),pe!==null&&(xe.data=pe)))),(pe=pS?gS(e,a):yS(e,a))&&(xe=zl(D,"onBeforeInput"),0<xe.length&&(ee=new eh("onBeforeInput","beforeinput",null,a,B),Q.push({event:ee,listeners:xe}),ee.data=pe)),ox(Q,e,D,a,B)}Gp(Q,n)})}function Vs(e,n,a){return{instance:e,listener:n,currentTarget:a}}function zl(e,n){for(var a=n+"Capture",l=[];e!==null;){var u=e,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=ps(e,a),u!=null&&l.unshift(Vs(e,u,f)),u=ps(e,n),u!=null&&l.push(Vs(e,u,f))),e.tag===3)return l;e=e.return}return[]}function dx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Yp(e,n,a,l,u){for(var f=n._reactName,g=[];a!==null&&a!==l;){var _=a,O=_.alternate,D=_.stateNode;if(_=_.tag,O!==null&&O===l)break;_!==5&&_!==26&&_!==27||D===null||(O=D,u?(D=ps(a,f),D!=null&&g.unshift(Vs(a,D,O))):u||(D=ps(a,f),D!=null&&g.push(Vs(a,D,O)))),a=a.return}g.length!==0&&e.push({event:n,listeners:g})}var hx=/\r\n?/g,mx=/\u0000|\uFFFD/g;function Fp(e){return(typeof e=="string"?e:""+e).replace(hx,`
9
+ `).replace(mx,"")}function Vp(e,n){return n=Fp(n),Fp(e)===n}function De(e,n,a,l,u,f){switch(a){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||da(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&da(e,""+l);break;case"className":Ar(e,"class",l);break;case"tabIndex":Ar(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ar(e,a,l);break;case"style":Vd(e,l,f);break;case"data":if(n!=="object"){Ar(e,"data",l);break}case"src":case"href":if(l===""&&(n!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Cr(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(a,"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 f=="function"&&(a==="formAction"?(n!=="input"&&De(e,n,"name",u.name,u,null),De(e,n,"formEncType",u.formEncType,u,null),De(e,n,"formMethod",u.formMethod,u,null),De(e,n,"formTarget",u.formTarget,u,null)):(De(e,n,"encType",u.encType,u,null),De(e,n,"method",u.method,u,null),De(e,n,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Cr(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=bn);break;case"onScroll":l!=null&&be("scroll",e);break;case"onScrollEnd":l!=null&&be("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Cr(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):e.removeAttribute(a);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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":be("beforetoggle",e),be("toggle",e),Nr(e,"popover",l);break;case"xlinkActuate":vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":vn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":vn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":vn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":vn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Nr(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=$0.get(a)||a,Nr(e,a,l))}}function Uc(e,n,a,l,u,f){switch(a){case"style":Vd(e,l,f);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(a=l.__html,a!=null){if(u.children!=null)throw Error(r(60));e.innerHTML=a}}break;case"children":typeof l=="string"?da(e,l):(typeof l=="number"||typeof l=="bigint")&&da(e,""+l);break;case"onScroll":l!=null&&be("scroll",e);break;case"onScrollEnd":l!=null&&be("scrollend",e);break;case"onClick":l!=null&&(e.onclick=bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qd.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),n=a.slice(2,u?a.length-7:void 0),f=e[St]||null,f=f!=null?f[a]:null,typeof f=="function"&&e.removeEventListener(n,f,u),typeof l=="function")){typeof f!="function"&&f!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(n,l,u);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):Nr(e,a,l)}}}function ft(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":be("error",e),be("load",e);var l=!1,u=!1,f;for(f in a)if(a.hasOwnProperty(f)){var g=a[f];if(g!=null)switch(f){case"src":l=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:De(e,n,f,g,a,null)}}u&&De(e,n,"srcSet",a.srcSet,a,null),l&&De(e,n,"src",a.src,a,null);return;case"input":be("invalid",e);var _=f=g=u=null,O=null,D=null;for(l in a)if(a.hasOwnProperty(l)){var B=a[l];if(B!=null)switch(l){case"name":u=B;break;case"type":g=B;break;case"checked":O=B;break;case"defaultChecked":D=B;break;case"value":f=B;break;case"defaultValue":_=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,n));break;default:De(e,n,l,B,a,null)}}Gd(e,f,_,O,D,g,u,!1);return;case"select":be("invalid",e),l=g=f=null;for(u in a)if(a.hasOwnProperty(u)&&(_=a[u],_!=null))switch(u){case"value":f=_;break;case"defaultValue":g=_;break;case"multiple":l=_;default:De(e,n,u,_,a,null)}n=f,a=g,e.multiple=!!l,n!=null?fa(e,!!l,n,!1):a!=null&&fa(e,!!l,a,!0);return;case"textarea":be("invalid",e),f=u=l=null;for(g in a)if(a.hasOwnProperty(g)&&(_=a[g],_!=null))switch(g){case"value":l=_;break;case"defaultValue":u=_;break;case"children":f=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(r(91));break;default:De(e,n,g,_,a,null)}Yd(e,l,u,f);return;case"option":for(O in a)a.hasOwnProperty(O)&&(l=a[O],l!=null)&&(O==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":De(e,n,O,l,a,null));return;case"dialog":be("beforetoggle",e),be("toggle",e),be("cancel",e),be("close",e);break;case"iframe":case"object":be("load",e);break;case"video":case"audio":for(l=0;l<Fs.length;l++)be(Fs[l],e);break;case"image":be("error",e),be("load",e);break;case"details":be("toggle",e);break;case"embed":case"source":case"link":be("error",e),be("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(D in a)if(a.hasOwnProperty(D)&&(l=a[D],l!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:De(e,n,D,l,a,null)}return;default:if(Xo(n)){for(B in a)a.hasOwnProperty(B)&&(l=a[B],l!==void 0&&Uc(e,n,B,l,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(l=a[_],l!=null&&De(e,n,_,l,a,null))}function px(e,n,a,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,g=null,_=null,O=null,D=null,B=null;for(L in a){var Q=a[L];if(a.hasOwnProperty(L)&&Q!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":O=Q;default:l.hasOwnProperty(L)||De(e,n,L,null,l,Q)}}for(var k in l){var L=l[k];if(Q=a[k],l.hasOwnProperty(k)&&(L!=null||Q!=null))switch(k){case"type":f=L;break;case"name":u=L;break;case"checked":D=L;break;case"defaultChecked":B=L;break;case"value":g=L;break;case"defaultValue":_=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(r(137,n));break;default:L!==Q&&De(e,n,k,L,l,Q)}}Vo(e,g,_,O,D,B,f,u);return;case"select":L=g=_=k=null;for(f in a)if(O=a[f],a.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":L=O;default:l.hasOwnProperty(f)||De(e,n,f,null,l,O)}for(u in l)if(f=l[u],O=a[u],l.hasOwnProperty(u)&&(f!=null||O!=null))switch(u){case"value":k=f;break;case"defaultValue":_=f;break;case"multiple":g=f;default:f!==O&&De(e,n,u,f,l,O)}n=_,a=g,l=L,k!=null?fa(e,!!a,k,!1):!!l!=!!a&&(n!=null?fa(e,!!a,n,!0):fa(e,!!a,a?[]:"",!1));return;case"textarea":L=k=null;for(_ in a)if(u=a[_],a.hasOwnProperty(_)&&u!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:De(e,n,_,null,l,u)}for(g in l)if(u=l[g],f=a[g],l.hasOwnProperty(g)&&(u!=null||f!=null))switch(g){case"value":k=u;break;case"defaultValue":L=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==f&&De(e,n,g,u,l,f)}Kd(e,k,L);return;case"option":for(var W in a)k=a[W],a.hasOwnProperty(W)&&k!=null&&!l.hasOwnProperty(W)&&(W==="selected"?e.selected=!1:De(e,n,W,null,l,k));for(O in l)k=l[O],L=a[O],l.hasOwnProperty(O)&&k!==L&&(k!=null||L!=null)&&(O==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":De(e,n,O,k,l,L));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 oe in a)k=a[oe],a.hasOwnProperty(oe)&&k!=null&&!l.hasOwnProperty(oe)&&De(e,n,oe,null,l,k);for(D in l)if(k=l[D],L=a[D],l.hasOwnProperty(D)&&k!==L&&(k!=null||L!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,n));break;default:De(e,n,D,k,l,L)}return;default:if(Xo(n)){for(var ke in a)k=a[ke],a.hasOwnProperty(ke)&&k!==void 0&&!l.hasOwnProperty(ke)&&Uc(e,n,ke,void 0,l,k);for(B in l)k=l[B],L=a[B],!l.hasOwnProperty(B)||k===L||k===void 0&&L===void 0||Uc(e,n,B,k,l,L);return}}for(var A in a)k=a[A],a.hasOwnProperty(A)&&k!=null&&!l.hasOwnProperty(A)&&De(e,n,A,null,l,k);for(Q in l)k=l[Q],L=a[Q],!l.hasOwnProperty(Q)||k===L||k==null&&L==null||De(e,n,Q,k,l,L)}function Pp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var u=a[l],f=u.transferSize,g=u.initiatorType,_=u.duration;if(f&&_&&Pp(g)){for(g=0,_=u.responseEnd,l+=1;l<a.length;l++){var O=a[l],D=O.startTime;if(D>_)break;var B=O.transferSize,Q=O.initiatorType;B&&Pp(Q)&&(O=O.responseEnd,g+=B*(O<_?1:(_-D)/(O-D)))}if(--l,n+=8*(f+g)/(u.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Lc=null,Zc=null;function Tl(e){return e.nodeType===9?e:e.ownerDocument}function Xp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Jp(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function qc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Bc=null;function yx(){var e=window.event;return e&&e.type==="popstate"?e===Bc?!1:(Bc=e,!0):(Bc=null,!1)}var Ip=typeof setTimeout=="function"?setTimeout:void 0,vx=typeof clearTimeout=="function"?clearTimeout:void 0,Wp=typeof Promise=="function"?Promise:void 0,bx=typeof queueMicrotask=="function"?queueMicrotask:typeof Wp<"u"?function(e){return Wp.resolve(null).then(e).catch(Sx)}:Ip;function Sx(e){setTimeout(function(){throw e})}function oi(e){return e==="head"}function eg(e,n){var a=n,l=0;do{var u=a.nextSibling;if(e.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(u),Qa(n);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ps(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ps(a);for(var f=a.firstChild;f;){var g=f.nextSibling,_=f.nodeName;f[hs]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=g}}else a==="body"&&Ps(e.ownerDocument.body);a=u}while(a);Qa(n)}function tg(e,n){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?n?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(n?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Hc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var a=n;switch(n=n.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Hc(a),Yo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function xx(e,n,a,l){for(;e.nodeType===1;){var u=a;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[hs])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=It(e.nextSibling),e===null)break}return null}function _x(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=It(e.nextSibling),e===null))return null;return e}function ng(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=It(e.nextSibling),e===null))return null;return e}function $c(e){return e.data==="$?"||e.data==="$~"}function Qc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ex(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var l=function(){n(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function It(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Gc=null;function ig(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return It(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function ag(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(n===0)return e;n--}else a!=="/$"&&a!=="/&"||n++}e=e.previousSibling}return null}function sg(e,n,a){switch(n=Tl(a),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Ps(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Yo(e)}var Wt=new Map,rg=new Set;function jl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kn=J.d;J.d={f:wx,r:Ox,D:zx,C:Tx,L:jx,m:Nx,X:Rx,S:Ax,M:Cx};function wx(){var e=kn.f(),n=bl();return e||n}function Ox(e){var n=oa(e);n!==null&&n.tag===5&&n.type==="form"?Em(n):kn.r(e)}var Ba=typeof document>"u"?null:document;function lg(e,n,a){var l=Ba;if(l&&typeof n=="string"&&n){var u=Kt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),rg.has(u)||(rg.add(u),e={rel:e,crossOrigin:a,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),ft(n,"link",e),at(n),l.head.appendChild(n)))}}function zx(e){kn.D(e),lg("dns-prefetch",e,null)}function Tx(e,n){kn.C(e,n),lg("preconnect",e,n)}function jx(e,n,a){kn.L(e,n,a);var l=Ba;if(l&&e&&n){var u='link[rel="preload"][as="'+Kt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Kt(a.imageSizes)+'"]')):u+='[href="'+Kt(e)+'"]';var f=u;switch(n){case"style":f=Ha(e);break;case"script":f=$a(e)}Wt.has(f)||(e=y({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Wt.set(f,e),l.querySelector(u)!==null||n==="style"&&l.querySelector(Xs(f))||n==="script"&&l.querySelector(Js(f))||(n=l.createElement("link"),ft(n,"link",e),at(n),l.head.appendChild(n)))}}function Nx(e,n){kn.m(e,n);var a=Ba;if(a&&e){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Kt(l)+'"][href="'+Kt(e)+'"]',f=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=$a(e)}if(!Wt.has(f)&&(e=y({rel:"modulepreload",href:e},n),Wt.set(f,e),a.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Js(f)))return}l=a.createElement("link"),ft(l,"link",e),at(l),a.head.appendChild(l)}}}function Ax(e,n,a){kn.S(e,n,a);var l=Ba;if(l&&e){var u=ua(l).hoistableStyles,f=Ha(e);n=n||"default";var g=u.get(f);if(!g){var _={loading:0,preload:null};if(g=l.querySelector(Xs(f)))_.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Wt.get(f))&&Kc(e,a);var O=g=l.createElement("link");at(O),ft(O,"link",e),O._p=new Promise(function(D,B){O.onload=D,O.onerror=B}),O.addEventListener("load",function(){_.loading|=1}),O.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Nl(g,n,l)}g={type:"stylesheet",instance:g,count:1,state:_},u.set(f,g)}}}function Rx(e,n){kn.X(e,n);var a=Ba;if(a&&e){var l=ua(a).hoistableScripts,u=$a(e),f=l.get(u);f||(f=a.querySelector(Js(u)),f||(e=y({src:e,async:!0},n),(n=Wt.get(u))&&Yc(e,n),f=a.createElement("script"),at(f),ft(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function Cx(e,n){kn.M(e,n);var a=Ba;if(a&&e){var l=ua(a).hoistableScripts,u=$a(e),f=l.get(u);f||(f=a.querySelector(Js(u)),f||(e=y({src:e,async:!0,type:"module"},n),(n=Wt.get(u))&&Yc(e,n),f=a.createElement("script"),at(f),ft(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function og(e,n,a,l){var u=(u=ge.current)?jl(u):null;if(!u)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(n=Ha(a.href),a=ua(u).hoistableStyles,l=a.get(n),l||(l={type:"style",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ha(a.href);var f=ua(u).hoistableStyles,g=f.get(e);if(g||(u=u.ownerDocument||u,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,g),(f=u.querySelector(Xs(e)))&&!f._p&&(g.instance=f,g.state.loading=5),Wt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Wt.set(e,a),f||Mx(u,e,a,g.state))),n&&l===null)throw Error(r(528,""));return g}if(n&&l!==null)throw Error(r(529,""));return null;case"script":return n=a.async,a=a.src,typeof a=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=$a(a),a=ua(u).hoistableScripts,l=a.get(n),l||(l={type:"script",instance:null,count:0,state:null},a.set(n,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Ha(e){return'href="'+Kt(e)+'"'}function Xs(e){return'link[rel="stylesheet"]['+e+"]"}function ug(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function Mx(e,n,a,l){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?l.loading=1:(n=e.createElement("link"),l.preload=n,n.addEventListener("load",function(){return l.loading|=1}),n.addEventListener("error",function(){return l.loading|=2}),ft(n,"link",a),at(n),e.head.appendChild(n))}function $a(e){return'[src="'+Kt(e)+'"]'}function Js(e){return"script[async]"+e}function cg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Kt(a.href)+'"]');if(l)return n.instance=l,at(l),l;var u=y({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),at(l),ft(l,"style",u),Nl(l,a.precedence,e),n.instance=l;case"stylesheet":u=Ha(a.href);var f=e.querySelector(Xs(u));if(f)return n.state.loading|=4,n.instance=f,at(f),f;l=ug(a),(u=Wt.get(u))&&Kc(l,u),f=(e.ownerDocument||e).createElement("link"),at(f);var g=f;return g._p=new Promise(function(_,O){g.onload=_,g.onerror=O}),ft(f,"link",l),n.state.loading|=4,Nl(f,a.precedence,e),n.instance=f;case"script":return f=$a(a.src),(u=e.querySelector(Js(f)))?(n.instance=u,at(u),u):(l=a,(u=Wt.get(f))&&(l=y({},a),Yc(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),at(u),ft(u,"link",l),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(l=n.instance,n.state.loading|=4,Nl(l,a.precedence,e));return n.instance}function Nl(e,n,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=l.length?l[l.length-1]:null,f=u,g=0;g<l.length;g++){var _=l[g];if(_.dataset.precedence===n)f=_;else if(f!==u)break}f?f.parentNode.insertBefore(e,f.nextSibling):(n=a.nodeType===9?a.head:a,n.insertBefore(e,n.firstChild))}function Kc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Yc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Al=null;function fg(e,n,a){if(Al===null){var l=new Map,u=Al=new Map;u.set(a,l)}else u=Al,l=u.get(a),l||(l=new Map,u.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),u=0;u<a.length;u++){var f=a[u];if(!(f[hs]||f[lt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var g=f.getAttribute(n)||"";g=e+g;var _=l.get(g);_?_.push(f):l.set(g,[f])}}return l}function dg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function Dx(e,n,a){if(a===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function hg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function kx(e,n,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=Ha(l.href),f=n.querySelector(Xs(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Rl.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=f,at(f);return}f=n.ownerDocument||n,l=ug(l),(u=Wt.get(u))&&Kc(l,u),f=f.createElement("link"),at(f);var g=f;g._p=new Promise(function(_,O){g.onload=_,g.onerror=O}),ft(f,"link",l),a.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,n),(n=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Rl.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Fc=0;function Ux(e,n){return e.stylesheets&&e.count===0&&Ml(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ml(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+n);0<e.imgBytes&&Fc===0&&(Fc=62500*gx());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ml(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Fc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function Rl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ml(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cl=null;function Ml(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cl=new Map,n.forEach(Lx,e),Cl=null,Rl.call(e))}function Lx(e,n){if(!(n.state.loading&4)){var a=Cl.get(e);if(a)var l=a.get(null);else{a=new Map,Cl.set(e,a);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var g=u[f];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(a.set(g.dataset.precedence,g),l=g)}l&&a.set(null,l)}u=n.instance,g=u.getAttribute("data-precedence"),f=a.get(g)||l,f===l&&a.set(null,u),a.set(g,u),this.count++,l=Rl.bind(this),u.addEventListener("load",l),u.addEventListener("error",l),f?f.parentNode.insertBefore(u,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=4}}var Is={$$typeof:G,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_threadCount:0};function Zx(e,n,a,l,u,f,g,_,O){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=$o(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=$o(0),this.hiddenUpdates=$o(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function mg(e,n,a,l,u,f,g,_,O,D,B,Q){return e=new Zx(e,n,a,g,O,D,B,Q,_),n=1,f===!0&&(n|=24),f=kt(3,null,null,n),e.current=f,f.stateNode=e,n=zu(),n.refCount++,e.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:n},Au(f),e}function pg(e){return e?(e=ba,e):ba}function gg(e,n,a,l,u,f){u=pg(u),l.context===null?l.context=u:l.pendingContext=u,l=Jn(n),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=In(e,l,n),a!==null&&(zt(a,e,n),As(a,e,n))}function yg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Vc(e,n){yg(e,n),(e=e.alternate)&&yg(e,n)}function vg(e){if(e.tag===13||e.tag===31){var n=Ui(e,67108864);n!==null&&zt(n,e,67108864),Vc(e,67108864)}}function bg(e){if(e.tag===13||e.tag===31){var n=Bt();n=Qo(n);var a=Ui(e,n);a!==null&&zt(a,e,n),Vc(e,n)}}var Dl=!0;function qx(e,n,a,l){var u=U.T;U.T=null;var f=J.p;try{J.p=2,Pc(e,n,a,l)}finally{J.p=f,U.T=u}}function Bx(e,n,a,l){var u=U.T;U.T=null;var f=J.p;try{J.p=8,Pc(e,n,a,l)}finally{J.p=f,U.T=u}}function Pc(e,n,a,l){if(Dl){var u=Xc(l);if(u===null)kc(e,n,l,kl,a),xg(e,l);else if($x(u,e,n,a,l))l.stopPropagation();else if(xg(e,l),n&4&&-1<Hx.indexOf(e)){for(;u!==null;){var f=oa(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var g=Ri(f.pendingLanes);if(g!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;g;){var O=1<<31-Mt(g);_.entanglements[1]|=O,g&=~O}dn(f),(Te&6)===0&&(yl=Rt()+500,Ys(0))}}break;case 31:case 13:_=Ui(f,2),_!==null&&zt(_,f,2),bl(),Vc(f,2)}if(f=Xc(l),f===null&&kc(e,n,l,kl,a),f===u)break;u=f}u!==null&&l.stopPropagation()}else kc(e,n,l,null,a)}}function Xc(e){return e=Io(e),Jc(e)}var kl=null;function Jc(e){if(kl=null,e=la(e),e!==null){var n=c(e);if(n===null)e=null;else{var a=n.tag;if(a===13){if(e=d(n),e!==null)return e;e=null}else if(a===31){if(e=h(n),e!==null)return e;e=null}else if(a===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return kl=e,null}function Sg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(z0()){case jd:return 2;case Nd:return 8;case wr:case T0:return 32;case Ad:return 268435456;default:return 32}default:return 32}}var Ic=!1,ui=null,ci=null,fi=null,Ws=new Map,er=new Map,di=[],Hx="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 xg(e,n){switch(e){case"focusin":case"focusout":ui=null;break;case"dragenter":case"dragleave":ci=null;break;case"mouseover":case"mouseout":fi=null;break;case"pointerover":case"pointerout":Ws.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":er.delete(n.pointerId)}}function tr(e,n,a,l,u,f){return e===null||e.nativeEvent!==f?(e={blockedOn:n,domEventName:a,eventSystemFlags:l,nativeEvent:f,targetContainers:[u]},n!==null&&(n=oa(n),n!==null&&vg(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function $x(e,n,a,l,u){switch(n){case"focusin":return ui=tr(ui,e,n,a,l,u),!0;case"dragenter":return ci=tr(ci,e,n,a,l,u),!0;case"mouseover":return fi=tr(fi,e,n,a,l,u),!0;case"pointerover":var f=u.pointerId;return Ws.set(f,tr(Ws.get(f)||null,e,n,a,l,u)),!0;case"gotpointercapture":return f=u.pointerId,er.set(f,tr(er.get(f)||null,e,n,a,l,u)),!0}return!1}function _g(e){var n=la(e.target);if(n!==null){var a=c(n);if(a!==null){if(n=a.tag,n===13){if(n=d(a),n!==null){e.blockedOn=n,Ud(e.priority,function(){bg(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,Ud(e.priority,function(){bg(a)});return}}else if(n===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ul(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=Xc(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);Jo=l,a.target.dispatchEvent(l),Jo=null}else return n=oa(a),n!==null&&vg(n),e.blockedOn=a,!1;n.shift()}return!0}function Eg(e,n,a){Ul(e)&&a.delete(n)}function Qx(){Ic=!1,ui!==null&&Ul(ui)&&(ui=null),ci!==null&&Ul(ci)&&(ci=null),fi!==null&&Ul(fi)&&(fi=null),Ws.forEach(Eg),er.forEach(Eg)}function Ll(e,n){e.blockedOn===n&&(e.blockedOn=null,Ic||(Ic=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Qx)))}var Zl=null;function wg(e){Zl!==e&&(Zl=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Zl===e&&(Zl=null);for(var n=0;n<e.length;n+=3){var a=e[n],l=e[n+1],u=e[n+2];if(typeof l!="function"){if(Jc(l||a)===null)continue;break}var f=oa(a);f!==null&&(e.splice(n,3),n-=3,Xu(f,{pending:!0,data:u,method:a.method,action:l},l,u))}}))}function Qa(e){function n(O){return Ll(O,e)}ui!==null&&Ll(ui,e),ci!==null&&Ll(ci,e),fi!==null&&Ll(fi,e),Ws.forEach(n),er.forEach(n);for(var a=0;a<di.length;a++){var l=di[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<di.length&&(a=di[0],a.blockedOn===null);)_g(a),a.blockedOn===null&&di.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var u=a[l],f=a[l+1],g=u[St]||null;if(typeof f=="function")g||wg(a);else if(g){var _=null;if(f&&f.hasAttribute("formAction")){if(u=f,g=f[St]||null)_=g.formAction;else if(Jc(u)!==null)continue}else _=g.action;typeof _=="function"?a[l+1]=_:(a.splice(l,3),l-=3),wg(a)}}}function Og(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(g){return u=g})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function Wc(e){this._internalRoot=e}ql.prototype.render=Wc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,l=Bt();gg(a,l,e,n,null,null)},ql.prototype.unmount=Wc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;gg(e.current,2,null,e,null,null),bl(),n[ra]=null}};function ql(e){this._internalRoot=e}ql.prototype.unstable_scheduleHydration=function(e){if(e){var n=kd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<di.length&&n!==0&&n<di[a].priority;a++);di.splice(a,0,e),a===0&&_g(e)}};var zg=i.version;if(zg!=="19.2.8")throw Error(r(527,zg,"19.2.8"));J.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(n),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Gx={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bl.isDisabled&&Bl.supportsFiber)try{cs=Bl.inject(Gx),Ct=Bl}catch{}}return ir.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,l="",u=Mm,f=Dm,g=km;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(f=n.onCaughtError),n.onRecoverableError!==void 0&&(g=n.onRecoverableError)),n=mg(e,1,!1,null,null,a,l,null,u,f,g,Og),e[ra]=n.current,Dc(e),new Wc(n)},ir.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var l=!1,u="",f=Mm,g=Dm,_=km,O=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(g=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),n=mg(e,1,!0,n,a??null,l,u,O,f,g,_,Og),n.context=pg(null),a=n.current,l=Bt(),l=Qo(l),u=Jn(l),u.callback=null,In(a,u,l),a=l,n.current.lanes=a,ds(n,a),dn(n),e[ra]=n.current,Dc(e),new ql(n)},ir.version="19.2.8",ir}var Ug;function e_(){if(Ug)return nf.exports;Ug=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),nf.exports=Wx(),nf.exports}var t_=e_();const pv=X.createContext(void 0),Oi=t=>{const i=X.useContext(pv);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},n_=({client:t,children:i})=>(X.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),b.jsx(pv.Provider,{value:t,children:i})),i_={setTimeout:(t,i)=>setTimeout(t,i),clearTimeout:t=>clearTimeout(t),setInterval:(t,i)=>setInterval(t,i),clearInterval:t=>clearInterval(t)};var a_=class{#e=i_;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,i){return this.#e.setTimeout(t,i)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,i){return this.#e.setInterval(t,i)}clearInterval(t){this.#e.clearInterval(t)}};const Pi=new a_;function s_(t){setTimeout(t,0)}const r_=typeof window>"u"||"Deno"in globalThis;function vt(){}function l_(t,i){return typeof t=="function"?t(i):t}function zf(t){return typeof t=="number"&&t>=0&&t!==1/0}function gv(t,i){return Math.max(t+(i||0)-Date.now(),0)}function Zn(t,i){return typeof t=="function"?t(i):t}function Ht(t,i){return typeof t=="function"?t(i):t}function Lg(t,i){const{type:s="all",exact:r,fetchStatus:o,predicate:c,queryKey:d,stale:h}=t;if(d){if(r){if(i.queryHash!==Pf(d,i.options))return!1}else if(!Ia(i.queryKey,d))return!1}if(s!=="all"){const m=i.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof h=="boolean"&&i.isStale()!==h||o&&o!==i.state.fetchStatus||c&&!c(i))}function Zg(t,i){const{exact:s,status:r,predicate:o,mutationKey:c}=t;if(c){if(!i.options.mutationKey)return!1;if(s){if(Wi(i.options.mutationKey)!==Wi(c))return!1}else if(!Ia(i.options.mutationKey,c))return!1}return!(r&&i.state.status!==r||o&&!o(i))}function Pf(t,i){return(i?.queryKeyHashFn||Wi)(t)}function Wi(t){return JSON.stringify(t,(i,s)=>Tf(s)?Object.keys(s).sort().reduce((r,o)=>(r[o]=s[o],r),{}):s)}function Ia(t,i){if(t===i)return!0;if(typeof t!=typeof i)return!1;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(Array.isArray(t)&&Array.isArray(i)){for(let r=0;r<i.length;r++)if(!Ia(t[r],i[r]))return!1;return!0}const s=Object.keys(i);for(const r of s)if(!Ia(t[r],i[r]))return!1;return!0}return!1}const o_=Object.prototype.hasOwnProperty;function yv(t,i,s=0){if(t===i)return t;if(s>500)return i;const r=qg(t)&&qg(i);if(!r&&!(Tf(t)&&Tf(i)))return i;const o=(r?t:Object.keys(t)).length,c=r?i:Object.keys(i),d=c.length,h=r?new Array(d):{};let m=0;for(let p=0;p<d;p++){const v=r?p:c[p],y=t[v],S=i[v];if(y===S){h[v]=y,(r?p<o:o_.call(t,v))&&m++;continue}if(y===null||S===null||typeof y!="object"||typeof S!="object"){h[v]=S;continue}const x=yv(y,S,s+1);h[v]=x,x===y&&m++}return o===d&&m===o?t:h}function uo(t,i){if(!i||Object.keys(t).length!==Object.keys(i).length)return!1;for(const s in t)if(t[s]!==i[s])return!1;return!0}function qg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Tf(t){if(!Bg(t))return!1;const i=t.constructor;if(i===void 0)return!0;const s=i.prototype;return!(!Bg(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Bg(t){return Object.prototype.toString.call(t)==="[object Object]"}function u_(t){return new Promise(i=>{Pi.setTimeout(i,t)})}function jf(t,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,i):s.structuralSharing!==!1?yv(t,i):i}function c_(t,i,s=0){const r=[...t,i];return s&&r.length>s?r.slice(1):r}function f_(t,i,s=0){const r=[i,...t];return s&&r.length>s?r.slice(0,-1):r}const Xf=Symbol();function vv(t,i){return!t.queryFn&&i?.initialPromise?()=>i.initialPromise:!t.queryFn||t.queryFn===Xf?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function Jf(t,i){return typeof t=="function"?t(...i):!!t}function d_(t,i,s){let r=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=i(),r||(r=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),t}const co=(()=>{let t=()=>r_;return{isServer(){return t()},setIsServer(i){t=i}}})();var ss=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},h_=class extends ss{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const If=new h_,m_=s_;function p_(){let t=[],i=0,s=h=>{h()},r=h=>{h()},o=m_;const c=h=>{i?t.push(h):o(()=>{s(h)})},d=()=>{const h=t;t=[],h.length&&o(()=>{r(()=>{h.forEach(m=>{s(m)})})})};return{batch:h=>{let m;i++;try{m=h()}finally{i--,i||d()}return m},batchCalls:h=>(...m)=>{c(()=>{h(...m)})},schedule:c,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{r=h},setScheduler:h=>{o=h}}}const it=p_();var g_=class extends ss{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(i=>{i(t)}))}isOnline(){return this.#e}};const fo=new g_;function y_(t){return Math.min(1e3*2**t,3e4)}function bv(t){return(t??"online")==="online"?fo.isOnline():!0}var Nf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Sv(t){let i=!1,s=0,r,o="pending",c,d;const h=new Promise((q,G)=>{c=q,d=G});h.catch(vt);const m=()=>o!=="pending",p=q=>{if(!m()){const G=new Nf(q);w(G),t.onCancel?.(G)}},v=()=>{i=!0},y=()=>{i=!1},S=()=>If.isFocused()&&(t.networkMode==="always"||fo.isOnline())&&t.canRun(),x=()=>bv(t.networkMode)&&t.canRun(),E=q=>{m()||(r?.(),o="resolved",c(q))},w=q=>{m()||(r?.(),o="rejected",d(q))},z=()=>new Promise(q=>{r=G=>{(m()||S())&&q(G)},t.onPause?.()}).then(()=>{r=void 0,m()||t.onContinue?.()}),R=()=>{if(m())return;let q;const G=s===0?t.initialPromise:void 0;try{q=G??t.fn()}catch(K){q=Promise.reject(K)}Promise.resolve(q).then(E).catch(K=>{if(m())return;const P=t.retry??(co.isServer()?0:3),C=t.retryDelay??y_,N=typeof C=="function"?C(s,K):C,F=P===!0||typeof P=="number"&&s<P||typeof P=="function"&&P(s,K);if(i||!F){w(K);return}s++,t.onFail?.(s,K),u_(N).then(()=>S()?void 0:z()).then(()=>{i?w(K):R()})})};return{promise:h,status:()=>o,cancel:p,continue:()=>(r?.(),h),cancelRetry:v,continueRetry:y,canStart:x,start:()=>(x()?R():z().then(R),h)}}var xv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),zf(this.gcTime)&&(this.#e=Pi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(co.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Pi.clearTimeout(this.#e),this.#e=void 0)}};function v_(t){return{onFetch:(i,s)=>{const r=i.options,o=i.fetchOptions?.meta?.fetchMore?.direction,c=i.state.data?.pages||[],d=i.state.data?.pageParams||[];let h={pages:[],pageParams:[]},m=0;const p=async()=>{let v=!1;const y=E=>{d_(E,()=>i.signal,()=>v=!0)},S=vv(i.options,i.fetchOptions),x=async(E,w,z)=>{if(v)return Promise.reject(i.signal.reason);if(w==null&&E.pages.length)return Promise.resolve(E);const q=(()=>{const C={client:i.client,queryKey:i.queryKey,pageParam:w,direction:z?"backward":"forward",meta:i.options.meta};return y(C),C})(),G=await S(q),{maxPages:K}=i.options,P=z?f_:c_;return{pages:P(E.pages,G,K),pageParams:P(E.pageParams,w,K)}};if(o&&c.length){const E=o==="backward",w=E?b_:Hg,z={pages:c,pageParams:d};h=await x(z,w(r,z),E)}else{const E=t??c.length;do{const w=m===0?d[0]??r.initialPageParam:Hg(r,h);if(m>0&&w==null)break;h=await x(h,w),m++}while(m<E)}return h};i.options.persister?i.fetchFn=()=>i.options.persister?.(p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s):i.fetchFn=p}}}function Hg(t,{pages:i,pageParams:s}){const r=i.length-1;return i.length>0?t.getNextPageParam(i[r],i,s[r],s):void 0}function b_(t,{pages:i,pageParams:s}){return i.length>0?t.getPreviousPageParam?.(i[0],i,s[0],s):void 0}var S_=class extends xv{#e;#t;#n;#i;#s;#a;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#i=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Qg(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(t){if(this.options={...this.#r,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Qg(this.options);i.data!==void 0&&(this.setState($g(i.data,i.dataUpdatedAt)),this.#t=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#i.remove(this)}setData(t,i){const s=jf(this.state.data,t,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),s}setState(t){this.#l({type:"setState",state:t})}cancel(t){const i=this.#a?.promise;return this.#a?.cancel(t),i?i.then(vt).catch(vt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ht(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xf||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Zn(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!gv(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const i=this.observers.indexOf(t);i!==-1&&(this.observers.splice(i,1),this.observers.length||(this.#a&&(this.#o||this.#u()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#i.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,i){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const s=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},o=()=>{const m=vv(this.options,i),v=(()=>{const y={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(y),y})();return this.#o=!1,this.options.persister?this.options.persister(m,v,this):m(v)},d=(()=>{const m={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return r(m),m})();(this.#e==="infinite"?v_(this.options.pages):this.options.behavior)?.onFetch(d,this),this.#n=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==d.fetchOptions?.meta)&&this.#l({type:"fetch",meta:d.fetchOptions?.meta});const h=this.#a=Sv({initialPromise:i?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Nf&&m.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(m,p)=>{this.#l({type:"failed",failureCount:m,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await h.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#i.config.onSuccess?.(m,this),this.#i.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Nf){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#l({type:"error",error:m}),this.#i.config.onError?.(m,this),this.#i.config.onSettled?.(this.state.data,m,this),m}finally{this.#a===h&&(this.#a=void 0),this.scheduleGc()}}#l(t){const i=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,..._v(s.data,this.options),fetchMeta:t.meta??null};case"success":const r={...s,...$g(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const o=t.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=i(this.state),it.batch(()=>{this.observers.slice().forEach(s=>{s.onQueryUpdate()}),this.#i.notify({query:this,type:"updated",action:t})})}};function _v(t,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:bv(i.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function $g(t,i){return{data:t,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Qg(t){const i=typeof t.initialData=="function"?t.initialData():t.initialData,s=i!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var x_=class extends ss{#e;#t=void 0;#n=void 0;#i=void 0;#s;#a;#r;#o;#u;#l;#f;#d;#c;#m=new Set;constructor(t,i){super(),this.options=i,this.#e=t,this.#r=null,this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Gg(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Af(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Af(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const i=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ht(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),i._defaulted&&!uo(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Kg(this.#t,s,this.options,i)&&this.#h(),this.updateResult(),r&&(this.#t!==s||Ht(this.options.enabled,this.#t)!==Ht(i.enabled,this.#t)||Zn(this.options.staleTime,this.#t)!==Zn(i.staleTime,this.#t))&&this.#p();const o=this.#g();r&&(this.#t!==s||Ht(this.options.enabled,this.#t)!==Ht(i.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(t){const i=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(i,t);return E_(this,s)&&(this.#i=s,this.#a=this.options,this.#s=this.#t.state),s}getCurrentResult(){return this.#i}trackResult(t,i){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),i?.(r),Reflect.get(s,r))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,i);let r=()=>{},o;const c=new Promise(d=>{o=d,r=this.#e.getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===s.queryHash&&s.state.data!==void 0&&(r(),d(this.createResult(s,i)))})});return Promise.race([s.fetch().then(()=>{const d=this.createResult(s,i);return o?.(d),d}).finally(()=>{r()}),c])}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#h(t){this.#x();let i=this.#t.fetch(this.options,t);return t?.throwOnError||(i=i.catch(vt)),i}#p(){this.#b();const t=Zn(this.options.staleTime,this.#t);if(co.isServer()||this.#i.isStale||!zf(t))return;const i=gv(this.#i.dataUpdatedAt,t)+1;this.#f=Pi.setTimeout(()=>{this.#i.isStale||this.updateResult()},i)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#S(),this.#c=t,!(co.isServer()||Ht(this.options.enabled,this.#t)===!1||!zf(this.#c)||this.#c===0)&&(this.#d=Pi.setInterval(()=>{(this.options.refetchIntervalInBackground||If.isFocused())&&this.#h()},this.#c))}#v(){this.#p(),this.#y(this.#g())}#b(){this.#f!==void 0&&(Pi.clearTimeout(this.#f),this.#f=void 0)}#S(){this.#d!==void 0&&(Pi.clearInterval(this.#d),this.#d=void 0)}createResult(t,i){const s=this.#t,r=this.options,o=this.#i,c=this.#s,d=this.#a,h=t!==s?t.state:this.#n,{state:m}=t;let p={...m},v=!1,y;if(i._optimisticResults){const P=this.hasListeners(),C=!P&&Gg(t,i),N=P&&Kg(t,s,i,r);(C||N)&&(p={...p,..._v(m.data,t.options)}),i._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:S,errorUpdatedAt:x,status:E}=p;y=p.data;let w=!1;if(i.placeholderData!==void 0&&y===void 0&&E==="pending"){let P;o?.isPlaceholderData&&i.placeholderData===d?.placeholderData?(P=o.data,w=!0):P=typeof i.placeholderData=="function"?i.placeholderData(this.#l?.state.data,this.#l):i.placeholderData,P!==void 0&&(E="success",y=jf(o?.data,P,i),v=!0)}if(i.select&&y!==void 0&&!w)if(o&&y===c?.data&&i.select===this.#o)y=this.#u;else try{this.#o=i.select,y=i.select(y),y=jf(o?.data,y,i),this.#u=y,this.#r=null}catch(P){this.#r=P}else y===void 0&&(this.#r=null);this.#r&&(S=this.#r,y=this.#u,x=Date.now(),E="error",v=!1);const z=p.fetchStatus==="fetching",R=E==="pending",q=E==="error",G=R&&z,K=y!==void 0;return{status:E,fetchStatus:p.fetchStatus,isPending:R,isSuccess:E==="success",isError:q,isInitialLoading:G,isLoading:G,data:y,dataUpdatedAt:p.dataUpdatedAt,error:S,errorUpdatedAt:x,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:z,isRefetching:z&&!R,isLoadingError:q&&!K,isPaused:p.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:q&&K,isStale:Wf(t,i),refetch:this.refetch,isEnabled:Ht(i.enabled,t)!==!1}}updateResult(){const t=this.#i,i=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#a=this.options,this.#s.data!==void 0&&(this.#l=this.#t),uo(i,t))return;this.#i=i;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const c=new Set(o??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#i).some(d=>{const h=d;return this.#i[h]!==t[h]&&c.has(h)})};this.#_({listeners:s()})}#x(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const i=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(i?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#_(t){it.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function __(t,i){return Ht(i.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Ht(i.retryOnMount,t)===!1)}function Gg(t,i){return __(t,i)||t.state.data!==void 0&&Af(t,i,i.refetchOnMount)}function Af(t,i,s){if(Ht(i.enabled,t)!==!1&&Zn(i.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&Wf(t,i)}return!1}function Kg(t,i,s,r){return(t!==i||Ht(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&Wf(t,s)}function Wf(t,i){return Ht(i.enabled,t)!==!1&&t.isStaleByTime(Zn(i.staleTime,t))}function E_(t,i){return!uo(t.getCurrentResult(),i)}var w_=class extends xv{#e;#t;#n;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Ev(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(i=>i!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const i=()=>{this.#s({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#i=Sv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(d,h)=>{this.#s({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#s({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),o=this.state.status==="pending",c=!r.canStart();try{if(o)i();else{this.#s({type:"pending",variables:t,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,s);const h=await this.options.onMutate?.(t,s);h!==this.state.context&&this.#s({type:"pending",context:h,variables:t,isPaused:c})}const d=await r.start();return await this.#n.config.onSuccess?.(d,t,this.state.context,this,s),await this.options.onSuccess?.(d,t,this.state.context,s),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(d,null,t,this.state.context,s),this.#s({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onError?.(d,t,this.state.context,s)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,s)}catch(h){Promise.reject(h)}throw this.#s({type:"error",error:d}),d}finally{this.#i===r&&(this.#i=void 0),this.#n.runNext(this)}}#s(t){const i=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),it.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Ev(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var O_=class extends ss{#e;#t;#n;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}build(t,i,s){const r=new w_({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(i),state:s});return this.add(r),r}add(t){this.#e.add(t);const i=Hl(t);if(typeof i=="string"){const s=this.#t.get(i);s?s.push(t):this.#t.set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const i=Hl(t);if(typeof i=="string"){const s=this.#t.get(i);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&this.#t.delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=Hl(t);if(typeof i=="string"){const s=this.#t.get(i)?.find(r=>r.state.status==="pending");return!s||s===t}else return!0}runNext(t){const i=Hl(t);return typeof i=="string"?this.#t.get(i)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){it.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const i={exact:!0,...t};return this.getAll().find(s=>Zg(i,s))}findAll(t={}){return this.getAll().filter(i=>Zg(t,i))}notify(t){it.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return it.batch(()=>Promise.all(t.map(i=>i.continue().catch(vt))))}};function Hl(t){return t.options.scope?.id}var z_=class extends ss{#e;#t=void 0;#n;#i;constructor(i,s){super(),this.#e=i,this.setOptions(s),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){const s=this.options;this.options=this.#e.defaultMutationOptions(i),uo(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&Wi(s.mutationKey)!==Wi(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#s())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(i){this.#s(),this.#a(i)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#a()}mutate(i,s){return this.#i=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(i)}#s(){const i=this.#n?.state??Ev();this.#t={...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset}}#a(i){it.batch(()=>{if(this.#i&&this.hasListeners()){const s=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(i?.type==="success"){try{this.#i.onSuccess?.(i.data,s,r,o)}catch(c){Promise.reject(c)}try{this.#i.onSettled?.(i.data,null,s,r,o)}catch(c){Promise.reject(c)}}else if(i?.type==="error"){try{this.#i.onError?.(i.error,s,r,o)}catch(c){Promise.reject(c)}try{this.#i.onSettled?.(void 0,i.error,s,r,o)}catch(c){Promise.reject(c)}}}this.listeners.forEach(s=>{s(this.#t)})})}},T_=class extends ss{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,i,s){const r=i.queryKey,o=i.queryHash??Pf(r,i);let c=this.get(o);return c||(c=new S_({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(i),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(c)),c}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=this.#e.get(t.queryHash);i&&(t.destroy(),i===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){it.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const i={exact:!0,...t};return this.getAll().find(s=>Lg(i,s))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(s=>Lg(t,s)):i}notify(t){it.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){it.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){it.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},j_=class{#e;#t;#n;#i;#s;#a;#r;#o;constructor(t={}){this.#e=t.queryCache||new T_,this.#t=t.mutationCache||new O_,this.#n=t.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#r=If.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=fo.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#r?.(),this.#r=void 0,this.#o?.(),this.#o=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const i=this.defaultQueryOptions({queryKey:t});return this.#e.get(i.queryHash)?.state.data}ensureQueryData(t){const i=this.defaultQueryOptions(t),s=this.#e.build(this,i),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Zn(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:i,state:s})=>[i,s.data])}setQueryData(t,i,s){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,c=l_(i,o);if(c!==void 0)return this.#e.build(this,r).setData(c,{...s,manual:!0})}setQueriesData(t,i,s){return it.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,i,s)]))}getQueryState(t){const i=this.defaultQueryOptions({queryKey:t});return this.#e.get(i.queryHash)?.state}removeQueries(t){const i=this.#e;it.batch(()=>{i.findAll(t).forEach(s=>{i.remove(s)})})}resetQueries(t,i){const s=this.#e;return it.batch(()=>{const r=s.findAll(t),o=new Set(r);return r.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>o.has(c)},i)})}cancelQueries(t,i={}){const s={revert:!0,...i},r=it.batch(()=>this.#e.findAll(t).map(o=>o.cancel(s)));return Promise.all(r).then(vt).catch(vt)}invalidateQueries(t,i={}){return it.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},i)))}refetchQueries(t,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},r=it.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,s);return s.throwOnError||(c=c.catch(vt)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(vt)}async query(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i),r=s.isStaleByTime(Zn(i.staleTime,s))?await s.fetch(i):s.state.data,o=i.select;return o?o(r):r}fetchQuery(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i);return s.isStaleByTime(Zn(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(vt).catch(vt)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(vt).catch(vt)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return fo.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(t){this.#n=t}setQueryDefaults(t,i){this.#i.set(Wi(t),{queryKey:t,defaultOptions:i})}getQueryDefaults(t){const i=[...this.#i.values()],s={};return i.forEach(r=>{Ia(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,i){this.#s.set(Wi(t),{mutationKey:t,defaultOptions:i})}getMutationDefaults(t){const i=[...this.#s.values()],s={};return i.forEach(r=>{Ia(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const i={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return i.queryHash||(i.queryHash=Pf(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===Xf&&(i.enabled=!1),i}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const wv=X.createContext(!1),N_=()=>X.useContext(wv);wv.Provider;function A_(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const R_=X.createContext(A_()),C_=()=>X.useContext(R_),M_=(t,i,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?Jf(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||r)&&(i.isReset()||(t.retryOnMount=!1))},D_=t=>{X.useEffect(()=>{t.clearReset()},[t])},k_=({result:t,errorResetBoundary:i,throwOnError:s,query:r,suspense:o})=>t.isError&&!i.isReset()&&!t.isFetching&&r&&(o&&t.data===void 0||Jf(s,[t.error,r])),U_=t=>{if(t.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...o)=>s(r(...o)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},L_=(t,i)=>t?.suspense&&i.isPending,Z_=(t,i,s)=>i.fetchOptimistic(t).catch(()=>{s.clearReset()});function q_(t,i,s){const r=N_(),o=C_(),c=Oi(),d=c.defaultQueryOptions(t),h=c.getQueryCache().get(d.queryHash),m=t.subscribed!==!1;d._optimisticResults=r?"isRestoring":m?"optimistic":void 0,U_(d),M_(d,o,h),D_(o);const[p]=X.useState(()=>new i(c,d)),v=p.getOptimisticResult(d),y=!r&&m;if(X.useSyncExternalStore(X.useCallback(S=>{const x=y?p.subscribe(it.batchCalls(S)):vt;return p.updateResult(),x},[p,y]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),X.useEffect(()=>{p.setOptions(d)},[d,p]),L_(d,v))throw Z_(d,p,o);if(k_({result:v,errorResetBoundary:o,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw v.error;return d.notifyOnChangeProps?v:p.trackResult(v)}function gn(t,i){return q_(t,x_)}function rs(t,i){const s=Oi(),[r]=X.useState(()=>new z_(s,t));X.useEffect(()=>{r.setOptions(t)},[r,t]);const o=X.useSyncExternalStore(X.useCallback(d=>r.subscribe(it.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=X.useCallback((...d)=>{r.mutate(d[0],d[1]).catch(vt)},[r]);if(o.error&&Jf(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}const Yg=!1;var Ov=X.useLayoutEffect;function Si(t){return t[t.length-1]}function zv(t,i){return typeof t=="function"?t(i):t}const ed=Object.prototype.hasOwnProperty;function Tv(t){for(const i in t)if(ed.call(t,i))return!0;return!1}const no=()=>Object.create(null),Ga=(t,i)=>vi(t,i,!0);function vi(t,i,s,r=0){if(t===i)return t;if(r++>500)return i;const o=Array.isArray(t)&&Array.isArray(i);if(!o&&!(ho(t)&&ho(i)))return i;const c=Object.keys(t),d=c.length,h=Object.keys(i),m=h.length;if(o?d!==t.length||m!==i.length||d&&Si(c)!==`${d-1}`||m&&Si(h)!==`${m-1}`:d!==Object.getOwnPropertyNames(t).length||m!==Object.getOwnPropertyNames(i).length||Object.getOwnPropertySymbols(i).length)return i;let p=0,v,y,S;if(o){for(;p<m&&(S=p,y=t[S],v=i[S],v=y===v?y:typeof y=="object"?vi(y,v,s,r):v,v===y);p++);if(p===m&&d===m)return t}else{let E=d===m,w=!0;for(;p<m;p++){S=h[p],y=t[S];const z=i[S];v=y===z?y:typeof y=="object"?vi(y,z,s,r):z,E&&=v===y&&(c[p]===S||ed.call(t,S)),w&&=Object.is(v,z),c[p]=v}if(E)return Object.getOwnPropertySymbols(t).length?i:t;if(w)return i}const x=o?h.fill(0):s?no():{};for(let E=0;E<m;E++)S=o?E:h[E],o?(y=t[S],E>p&&(v=i[S],v=y===v?y:typeof y=="object"?vi(y,v,s,r):v),x[S]=E<p?y:v):x[S]=c[E];return x}function ho(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function qn(t,i,s,r){if(t===i)return!0;if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return!1;for(let o=0,c=t.length;o<c;o++){const d=t[o],h=i[o];if(d!==h&&!qn(d,h,s,r))return!1}return!0}if(ho(t)&&ho(i)){if(s){for(const c in i)if((r||i[c]!==void 0)&&!qn(t[c],i[c],s,r))return!1;return!0}let o=0;if(r)o=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&o++;for(const c in i)if((r||i[c]!==void 0)&&(o--===0||!qn(t[c],i[c],s,r)))return!1;return o===0}return!1}const B_=/[\x00-\x1f\x7f"<>`{}]/g;function H_(t){return t.replace(B_,i=>"%"+i.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function Fg(t){let i;try{i=decodeURI(t)}catch{i=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return H_(i)}const $_=["http:","https:","mailto:","tel:"];function mr(t){if(t[0]!=="/"&&t.includes(":"))return/^[\x00-\x20]*([a-z][a-z\d+.\t\n\r-]*:)/i.exec(t)?.[1]?.replace(/[\t\n\r]/g,"").toLowerCase()}const jv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Nv(t,i){if(!t)return!1;if(jv.test(t))return!0;const s=mr(t);return s?!i.has(s):!1}function ar(t){if(!t)return t;let i=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const s=/%25|%5C/gi;let r=0,o;for(i="";(o=s.exec(t))!==null;)i+=Fg(t.slice(r,o.index))+o[0],r=s.lastIndex;i+=Fg(r?t.slice(r):t)}return i}function Q_(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function G_(t,i){if(t===i)return!0;if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==i[s])return!1;return!0}function td(){throw new Error("Invariant failed")}function Va(t){return t.replace(/\/{2,}/g,"/")}function Av(t){return t==="/"?t:t.replace(/^\/+/,"")}function hn(t){const i=t.length;return i>1&&t[i-1]==="/"?t.replace(/\/+$/,""):t}function Rv(t){return hn(Av(t))}function Vg(t,i){return t?.endsWith("/")&&t!=="/"&&t!==`${i}/`?t.slice(0,-1):t}function Pg(t,i,s="never",r){if(i.includes("//")&&(i=Va(i)),i.startsWith("/"))return i.length===1||s==="preserve"?i:s==="always"?i.endsWith("/")?i:`${i}/`:i.endsWith("/")?i.slice(0,-1):i;const o=i===".";let c;if(r){c=o?t:t+"\0"+i;const p=r.get(c);if(p)return p}let d;if(o)d=t.split("/");else{for(t.includes("//")&&(t=Va(t)),d=t.split("/");d.length>1&&Si(d)==="";)d.pop();const p=i.split("/");for(let v=0,y=p.length;v<y;v++){const S=p[v];S===""?v?v===y-1&&d.push(S):d=[S]:S===".."?d.length>1?d.pop():d=[""]:S==="."||d.push(S)}}d.length>1&&(Si(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));const h=d.join("/"),m=(o?Va(h):h)||"/";return c&&r&&r.set(c,m),m}function K_(t){const i=new Map(t.map(r=>[encodeURIComponent(r),r])),s=new RegExp([...i.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return r=>r.replace(s,o=>i.get(o)??o)}function Y_(t){return t==null||t===""}function F_(t,i,s){if(typeof i!="string")return""+(i??void 0);const r=t==="_splat";if(r&&(!i||/^[a-zA-Z0-9\-._~!/]*$/.test(i)))return i;let o=encodeURIComponent(i);return r&&(o=o.replaceAll("%2F","/")),s?s(o):o}function Xg(t,i,s,r,o){const c=t.endsWith("/")?"/":"";let d="";for(const h of i){if(typeof h=="string"){d+=h;continue}const[m,p,v,y]=h,S=m===2,x=S&&y!==void 0?y+c:y;let E=s[p];if(!(m===3&&E==null)){if(o&&(o[p]=E,S&&(o["*"]=E)),S&&Y_(E)){if(v==="/"&&!x)continue;E=""}d+=v+F_(p,E,r)+(x||"")}}return d+c||"/"}function Wa(t){return t?.isNotFound===!0}function V_(){try{return sessionStorage}catch{return}}const P_="tsr-scroll-restoration-v1_3",Cv=V_();function X_(){try{return JSON.parse(Cv?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Ka=X_(),Jg="data-scroll-restoration-id",J_=t=>t.state.__TSR_key||t.href;function I_(t){const i=t.getAttribute(Jg);if(i)return`[${Jg}="${i}"]`;let s="",r=t,o;for(;o=r.parentNode;){let c=1,d=r;for(;d=d.previousElementSibling;)c++;const h=`${r.localName}:nth-child(${c})`;s=s?`${h} > ${s}`:h,r=o}return s}let $l=!1;const io="window";function Rf(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function Ig(t){const i=new Set;for(const s of t){if(s===io)continue;const r=Rf(s);r&&i.add(r)}return i}function W_(t,i){const s=t.options.scrollRestoration,r=t._scroll;s&&(r.e=!0);const o=t.options.getScrollRestorationKey||J_,c=new Set,d=h=>{const m=Ka[h]||={};for(const p of c)p===document?m[io]={scrollX,scrollY}:p.isConnected&&(m[I_(p)]={scrollX:p.scrollLeft,scrollY:p.scrollTop})};s&&!r.s&&(r.s=!0,$l=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{$l||c.add(h.target)},!0),t.subscribe("onBeforeLoad",h=>{h.fromLocation&&d(o(h.fromLocation)),c.clear()}),addEventListener("pagehide",()=>{history.scrollRestoration="auto",d(o(t.stores.resolvedLocation.get()??t.stores.location.get()));try{Cv?.setItem(P_,JSON.stringify(Ka))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!r.r&&(r.r=!0,t.subscribe("onRendered",h=>{const m=t.options.scrollRestorationBehavior,p=t.options.scrollToTopSelectors,v=r.n,y=r.h;let S;if(c.clear(),r.n=!0,r.h=!1,typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return;const x=o(h.toLocation),E=h.fromLocation&&o(h.fromLocation);if(r.e&&E&&E!==x){const w=Ka[E];if(w){let z=Ka[x];for(const R in w){if(R===io){if(v)continue}else{const q=Rf(R);if(!q||v&&p&&(S??=Ig(p),S.has(q)))continue}z||(z=Ka[x]={}),z[R]??=w[R]}}}$l=!0;try{const w=h.toLocation.hash,z=h.toLocation.state.__hashScrollIntoViewOptions??!0;let R=!1;if(v){!w&&p&&(S??=Ig(p));const q=w&&z&&y,G=r.e?Ka[x]:void 0;if(G)for(const K in G){const{scrollX:P,scrollY:C}=G[K];if(K===io){if(q)continue;scrollTo({top:C,left:P,behavior:m}),R=!0}else{const N=Rf(K);N&&(N.scrollLeft=P,N.scrollTop=C,S?.delete(N))}}if(!w){const K={top:0,left:0,behavior:m};if(R||scrollTo(K),S)for(const P of S)P.scrollTo(K)}}!R&&w&&z&&document.getElementById(w)?.scrollIntoView(z)}finally{$l=!1}}))}function e1(t,i=String){let s;for(const r in t){const o=t[r];o!==void 0&&(s||=new URLSearchParams).set(r,i(o))}return s?s.toString():""}function lf(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function t1(t){const i=new URLSearchParams(t),s=Object.create(null);for(const[r,o]of i.entries()){const c=s[r];c==null?s[r]=lf(o):Array.isArray(c)?c.push(lf(o)):s[r]=[c,lf(o)]}return s}const Mv=/^(?:\s|["[{\d-]|fa|nu|tr)/,n1=a1(JSON.parse),i1=s1(JSON.stringify,JSON.parse);function a1(t){const i=t===JSON.parse;return s=>{s[0]==="?"&&(s=s.slice(1));const r=t1(s);for(const o in r){const c=r[o];if(typeof c=="string"){if(i&&!Mv.test(c))continue;try{r[o]=t(c)}catch{}}}return r}}function s1(t,i){const s=i===JSON.parse;function r(o){if(o&&typeof o=="object")try{return t(o)}catch{}else if(i&&typeof o=="string"){if(s&&!Mv.test(o))return o;try{return i(o),t(o)}catch{}}return o}return o=>{const c=e1(o,r);return c?`?${c}`:""}}const Pa="__root__";function r1(t){t.statusCode=t.statusCode||t.code||307;const i=new Headers(t.headers);t.href&&i.get("Location")===null&&i.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:i});if(s.options=t,t.throw)throw s;return s}function Dv(t){return t instanceof Response&&!!t.options}function mo(t){const i=new Map;let s,r;return{get(o){const c=i.get(o);if(c)return c.visited=!0,c.value},set(o,c){const d=i.get(o);if(d){d.value=c;return}if(i.size>=t){let m=s?.next().value;for(;!m||m.visited;)m?m.visited=!1:s=i.values(),m=s.next().value;m===r&&(s=void 0),i.delete(m.key)}const h={key:o,value:c,visited:!1};r=h,i.set(o,h)},clear(){i.clear(),s=void 0,r=void 0}}}const yi=4,kv=5;function l1(t){const i=t.names;if(i)return i;const s=[];for(const r of t)typeof r!="string"&&s.push(r[1]);return t.names=s}function o1(t,i,s){const r=t.slice(i,s);if(r.charCodeAt(0)===36)return r.length===1?[2,"_splat","",void 0]:[1,r.slice(1),"",""];const o=r.indexOf("{");if(o>=0){const c=r.indexOf("}",o),d=r.charCodeAt(o+1)===45,h=o+(d?3:2);if(c>=0&&r.charCodeAt(h-1)===36&&(!d||h<c)){const m=r.slice(h,c);return[d?3:m?1:2,m||"_splat",r.slice(0,o),t.slice(i+c+1,m?s:t.length)]}}return r}function pr(t,i,s,r,o,c){let d=s;const h=i.fullPath??i.from,m=i.options,p=h.length,v=h.endsWith("/")?p-1:p,y=m?.caseSensitive??t,S=m?.params?.parse??m?.parseParams;let x,E=c?s-1:0;if(!r||h.includes("$")){x=c?.slice()??[];const R=Si(x);R&&typeof R!="string"&&R[0]===2&&(x[x.length-1]=[R[0],R[1],R[2],R[3]===void 0?void 0:R[3]+h.substring(s-(h[s-2]==="/"?2:1),v)],E=p)}for(;d<p;){const R=d,q=h.indexOf("/",R);let G=q===-1?p:q;const K=o1(h,R,G);d=G+1;let P;if(typeof K=="string"){if(!r)continue;let C=K,N;y?N=r.static??=new Map:(C=K.toLowerCase(),N=r.staticInsensitive??=new Map);const F=N.get(C);if(F)P=F;else{const re=Xi(r);P=re,N.set(C,re)}}else{const C=K[0];let N=K[2],F=K[3]??"";if(C===2&&(G=p,d=G+1),x&&E<G&&(E<R-1&&x.push(h.slice(E,R-1)),K[2]="/"+N,C===2&&K[3]!==void 0&&v<p&&(K[3]=F.slice(0,-1)),x.push(K),E=G),!r)continue;const re=y&&!!(N||F);y||(N=N.toLowerCase(),F=F.toLowerCase());const le=C===1?r.dynamic??=[]:C===3?r.optional??=[]:r.wildcard??=[],ue=C!==2&&!S&&le.find(ne=>!ne.parse&&ne.caseSensitive===re&&ne.prefix===N&&ne.suffix===F);if(ue)P=ue;else{const ne=Xi(r,C,re,N,F);P=ne,le.push(ne),le.length===2&&o?.push(le)}}r=P}x&&E<v&&x.push(h.slice(E,v));const w=x?.slice();if(!r)return w;if(S&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const R=Xi(r,kv);(r.pathless??=[]).push(R),r=R}const z=(i.path||!i.children)&&!i.isRoot;if(z&&v<p){const R=Xi(r,yi);r.index=R,r=R}return r.parse=S??null,r.priority=m?.params?.priority??0,r.route||(r.data=w,z&&(r.route=i)),[r,d,w]}function Uv(t,i){if(t.parse&&!i.parse)return-1;if(!t.parse&&i.parse)return 1;if(t.parse&&i.parse&&(t.priority||i.priority))return i.priority-t.priority;if(t.prefix&&i.prefix&&t.prefix!==i.prefix){if(t.prefix.startsWith(i.prefix))return-1;if(i.prefix.startsWith(t.prefix))return 1}if(t.suffix&&i.suffix&&t.suffix!==i.suffix){if(t.suffix.endsWith(i.suffix))return-1;if(i.suffix.endsWith(t.suffix))return 1}return t.prefix&&!i.prefix?-1:!t.prefix&&i.prefix?1:t.suffix&&!i.suffix?-1:!t.suffix&&i.suffix?1:t.caseSensitive&&!i.caseSensitive?-1:!t.caseSensitive&&i.caseSensitive?1:0}function Xi(t,i=0,s,r,o){return{kind:i,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:s,prefix:r,suffix:o}}function u1(t,i){const s=Xi(),r=[];function o(c,d,h,m){const[p,v,y]=pr(!1,c,d,h,r,m);if(c.children)for(const S of c.children)o(S,v,p,y)}for(const c of t)o(c,1,s);for(const c of r)c.sort(Uv);i.masksTree=s,i.flatCache=mo(1e3)}function c1(t,i){t||="/";const s=i.flatCache.get(t);if(s!==void 0)return s;const r=nd(t,i.masksTree);return i.flatCache.set(t,r),r}function f1(t,i,s,r,o){t||="/",r||="/";const c=i?`case\0${t}`:t;let d=o.singleCache.get(c);return d||(d=Xi(),pr(i,{from:t},1,d),o.singleCache.set(c,d)),nd(r,d,s)}function d1(t,i,s=!1){const r=s?t:`nofuzz\0${t}`,o=i.matchCache.get(r);if(o!==void 0)return o;t||="/";let c;try{c=nd(t,i.segmentTree,s)}catch(d){if(d instanceof URIError)c=null;else throw d}return c&&(c.branch=Zv(c.route)),i.matchCache.set(r,c),c}function h1(t,i=!1){const s=Xi(),r=[],o={},c={};let d=0;function h(m,p,v,y){if(m.init(d),m.id in o&&td(),o[m.id]=m,d!==0&&m.path){const w=hn(m.fullPath);(!c[w]||m.fullPath.endsWith("/"))&&(c[w]=m)}d++;const[S,x,E]=pr(i,m,p,v,r,y);if(m._interpolation=E,m.children)for(const w of m.children)h(w,x,S,E)}h(t,1,s);for(const m of r)m.sort(Uv);return{processedTree:{segmentTree:s,singleCache:mo(1e3),matchCache:mo(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function nd(t,i,s=!1){const r=t.split("/"),o=p1(t,r,i,s);if(!o)return null;const[c]=Lv(t,r,o);return{route:o.node.route,rawParams:c}}function Lv(t,i,s){const r=m1(s.node),o=s.node.data&&l1(s.node.data),c=Object.create(null);let d=s.extract?.part??0,h=s.extract?.node??0,m=s.extract?.path??0,p=s.extract?.param??0;for(;h<r.length;d++,h++,m++){const v=r[h];if(v.kind===yi)break;if(v.kind===kv){d--,m--;continue}const y=i[d],S=m;if(y&&(m+=y.length),v.kind===1||v.kind===3){const x=o[p++];if(v.kind===3&&s.skipped&1<<h){d--,m=S-1;continue}const E=v.suffix||v.prefix?y.substring(v.prefix.length,y.length-v.suffix.length):y;(E||v.kind===1)&&(c[x]=decodeURIComponent(E))}else if(v.kind===2){const x=v,E=t.substring(S+x.prefix.length,t.length-x.suffix.length),w=decodeURIComponent(E);c["*"]=w,c._splat=w;break}}return s.rawParams&&Object.assign(c,s.rawParams),[c,{part:d,node:h,path:m,param:p}]}function Zv(t){const i=[t];for(;t.parentRoute;)t=t.parentRoute,i.push(t);return i.reverse(),i}function m1(t){const i=Array(t.depth+1);do i[t.depth]=t,t=t.parent;while(t);return i}function p1(t,i,s,r){if(t==="/"&&s.index)return{node:s.index,skipped:0};const o=!Si(i),c=o&&t!=="/",d=i.length-(o?1:0),h=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let m=null,p=null;for(;h.length;){const v=h.pop(),{node:y,index:S,skipped:x,statics:E,dynamics:w,optionals:z}=v;let{extract:R,rawParams:q}=v;if(y.kind===2&&y.route&&!Gl(p,v))continue;if(y.parse){if(!Wg(t,i,v))continue;q=v.rawParams,R=v.extract}r&&y.route&&y.kind!==yi&&Gl(m,v)&&(m=v);const G=S===d;if(G&&(y.route&&(!c||y.kind===yi||y.kind===2)&&Gl(p,v)&&(p=v),!y.optional&&!y.wildcard&&!y.index&&!y.pathless))continue;const K=G?void 0:i[S];let P;if(G&&y.index){const C={node:y.index,index:S,skipped:x,statics:E,dynamics:w,optionals:z,extract:R,rawParams:q};let N=!0;if(y.index.parse&&(Wg(t,i,C)||(N=!1)),N){if(!w&&!z&&!x&&g1(E,d))return C;Gl(p,C)&&(p=C)}}if(y.wildcard)for(let C=y.wildcard.length-1;C>=0;C--){const N=y.wildcard[C],{prefix:F,suffix:re}=N;if(!(F&&(G||!(N.caseSensitive?K:P??=K.toLowerCase()).startsWith(F)))){if(re){if(G)continue;const le=i.slice(S).join("/"),ue=le.slice(-re.length);if((N.caseSensitive?ue:ue.toLowerCase())!==re||le.length-re.length<F.length)continue}h.push({node:N,index:d,skipped:x,statics:E,dynamics:w,optionals:z,extract:R,rawParams:q})}}if(y.optional){const C=x|1<<y.depth+1;for(let N=y.optional.length-1;N>=0;N--){const F=y.optional[N];h.push({node:F,index:S,skipped:C,statics:E,dynamics:w,optionals:z,extract:R,rawParams:q})}if(!G)for(let N=y.optional.length-1;N>=0;N--){const F=y.optional[N],{prefix:re,suffix:le}=F;if(re||le){const ue=F.caseSensitive?K:P??=K.toLowerCase();if(re&&!ue.startsWith(re)||le&&ue.indexOf(le,ue.length-le.length)<re.length)continue}h.push({node:F,index:S+1,skipped:x,statics:E,dynamics:w,optionals:z+Ql(d,S),extract:R,rawParams:q})}}if(!G&&y.dynamic&&K)for(let C=y.dynamic.length-1;C>=0;C--){const N=y.dynamic[C],{prefix:F,suffix:re}=N;if(F||re){const le=N.caseSensitive?K:P??=K.toLowerCase();if(F&&!le.startsWith(F)||re&&le.indexOf(re,le.length-re.length)<F.length)continue}h.push({node:N,index:S+1,skipped:x,statics:E,dynamics:w+Ql(d,S),optionals:z,extract:R,rawParams:q})}if(!G&&y.staticInsensitive){const C=y.staticInsensitive.get(P??=K.toLowerCase());C&&h.push({node:C,index:S+1,skipped:x,statics:E+Ql(d,S),dynamics:w,optionals:z,extract:R,rawParams:q})}if(!G&&y.static){const C=y.static.get(K);C&&h.push({node:C,index:S+1,skipped:x,statics:E+Ql(d,S),dynamics:w,optionals:z,extract:R,rawParams:q})}if(y.pathless)for(let C=y.pathless.length-1;C>=0;C--){const N=y.pathless[C];h.push({node:N,index:S,skipped:x,statics:E,dynamics:w,optionals:z,extract:R,rawParams:q})}}if(p)return p;if(r&&m){let v=m.index;for(let S=0;S<m.index;S++)v+=i[S].length;const y=v===t.length?"/":t.slice(v);return m.rawParams??=Object.create(null),m.rawParams["**"]=decodeURIComponent(y),m}return null}function Ql(t,i){return 2**(t-i-1)}function g1(t,i){return t===2**(i-1)-1}function Wg(t,i,s){let r,o;try{[r,o]=Lv(t,i,s)}catch{return null}if(s.rawParams=r,s.extract=o,!s.node.parse)return!0;try{if(s.node.parse(r)===!1)return null}catch{}return!0}function Gl(t,i){return t?i.statics>t.statics||i.statics===t.statics&&(i.dynamics>t.dynamics||i.dynamics===t.dynamics&&(i.optionals>t.optionals||i.optionals===t.optionals&&((i.node.kind===yi)>(t.node.kind===yi)||i.node.kind===yi==(t.node.kind===yi)&&i.node.depth>t.node.depth))):!0}function y1(t,i,s){const r=Rv(t),o=`/${r}`,c=i?o:o.toLowerCase(),d=`${c}/`,h={input:({url:m})=>{const p=i?m.pathname:m.pathname.toLowerCase();return p===c?m.pathname="/":p.startsWith(d)&&(m.pathname=m.pathname.slice(o.length)),m},output:({url:m})=>(m.pathname=Va(`/${r}${m.pathname}`),m)};return s?{input:({url:m})=>Cf(s,h.input({url:m})),output:({url:m})=>h.output({url:qv(s,m)})}:h}function Cf(t,i){const s=t?.input?.({url:i});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return i}function qv(t,i){const s=t?.output?.({url:i});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return i}function v1(t,i){const{createMutableStore:s,createReadonlyStore:r,batch:o}=i,c=new Map,d=s("idle"),h=s(t),m=s(void 0),p=s([]),v=r(()=>p.get().map(w=>c.get(w).get())),y=r(()=>({status:d.get(),isLoading:d.get()==="pending",matches:v.get(),location:h.get(),resolvedLocation:m.get()}));function S(w){let z=c.get(w);return z||(z=s(void 0),c.set(w,z)),z}const x={status:d,location:h,resolvedLocation:m,ids:p,matches:v,byRoute:c,__store:y,getMatchStore:S,setMatches:E};function E(w){const z=p.get(),R=w.map(q=>q.routeId);o(()=>{G_(z,R)||p.set(R);for(const q of z)R.includes(q)||c.get(q).set(()=>{});for(const q of w){const G=S(q.routeId);G.get()!==q&&G.set(q)}})}return x}var bi="__TSR_index",ey="popstate",ty="beforeunload",b1=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function ao(t){const i=b1.exec(t);return i?"/"+t.slice(i[0].length):t}function Bv(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,i=>`
10
+ \r`.includes(i)?"":encodeURIComponent(i))),ao(t)}function S1(t){let i=t.getLocation();const s=new Set,r=d=>{i=t.getLocation(),s.forEach(h=>h({location:i,action:d}))},o=d=>{t.notifyOnIndexChange??!0?r(d):i=t.getLocation()},c=async d=>{const h=d.navigateOpts?.ignoreBlocker?void 0:t.getBlockers?.();if(typeof document<"u"&&h?.length&&(d.type==="PUSH"||d.type==="REPLACE"))for(const m of h){const p=po(d.path,d.state);if(await m.blockerFn({currentLocation:i,nextLocation:p,action:d.type})){t.onBlocked?.();return}}d.task()};return{get location(){return i},get length(){return t.getLength()},subscribers:s,subscribe:d=>(s.add(d),()=>{s.delete(d)}),push:(d,h,m)=>{const p=i.state[bi];h=ny(p+1,h),c({task:()=>{t.pushState(d,h),r({type:"PUSH"})},navigateOpts:m,type:"PUSH",path:d,state:h})},replace:(d,h,m)=>{const p=i.state[bi];h=ny(p,h),c({task:()=>{t.replaceState(d,h),r({type:"REPLACE"})},navigateOpts:m,type:"REPLACE",path:d,state:h})},go:(d,h)=>{c({task:()=>{t.go(d,h?.ignoreBlocker??!1),o({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{c({task:()=>{t.back(d?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{c({task:()=>{t.forward(d?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>i.state[bi]!==0,createHref:d=>t.createHref(d),block:d=>{if(!t.setBlockers)return()=>{};const h=t.getBlockers?.()??[];return t.setBlockers([...h,d]),()=>{const m=t.getBlockers?.()??[];t.setBlockers?.(m.filter(p=>p!==d))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r,_getBlockers:()=>t.getBlockers?.()??[]}}function ny(t,i){const s=id();return{...i,key:s,__TSR_key:s,[bi]:t}}function x1(t){const i=typeof document<"u"?window:void 0,s=i.history.pushState,r=i.history.replaceState;let o=[];const c=()=>o,d=N=>o=N,h=N=>Bv(N),m=(()=>po(`${i.location.pathname}${i.location.search}${i.location.hash}`,i.history.state));if(!i.history.state?.__TSR_key&&!i.history.state?.key){const N=id();i.history.replaceState({[bi]:0,key:N,__TSR_key:N},"")}let p=m(),v,y=!1,S=!1,x=!1,E=!1;const w=()=>p;let z;const R=()=>{z&&(C._ignoreSubscribers=!0,(z[2]?i.history.pushState:i.history.replaceState)(z[1],"",z[0]),C._ignoreSubscribers=!1,z=void 0,v=void 0)},q=(N,F,re)=>{const le=!!z;le||(v=p),p=po(F,re),z=[p.href,re,z?.[2]||N],le||queueMicrotask(()=>R())},G=N=>{p=m(),C.notify({type:N})},K=async()=>{if(E=!1,S){S=!1;return}const N=m(),F=N.state[bi]-p.state[bi],re=F===1,le=F===-1,ue=!re&&!le||y;y=!1;const ne=ue?"GO":le?"BACK":"FORWARD",he=ue?{type:"GO",index:F}:{type:le?"BACK":"FORWARD"};if(x)x=!1;else{const ye=c();if(typeof document<"u"&&ye.length){for(const de of ye)if(await de.blockerFn({currentLocation:p,nextLocation:N,action:ne})){S=!0,i.history.go(-F),C.notify(he);return}}}p=m(),C.notify(he)},P=N=>{if(E){E=!1;return}let F=!1;const re=c();if(typeof document<"u"&&re.length)for(const le of re){const ue=le.enableBeforeUnload??!0;if(ue===!0){F=!0;break}if(typeof ue=="function"&&ue()===!0){F=!0;break}}if(F)return N.preventDefault(),N.returnValue=""},C=S1({getLocation:w,getLength:()=>i.history.length,pushState:(N,F)=>q(!0,N,F),replaceState:(N,F)=>q(!1,N,F),back:N=>(N&&(x=!0,E=!0),i.history.back()),forward:N=>{N&&(x=!0,E=!0),i.history.forward()},go:(N,F)=>{y=!0,F&&(x=!0,E=!0),i.history.go(N)},createHref:h,flush:R,destroy:()=>{i.history.pushState=s,i.history.replaceState=r,i.removeEventListener(ty,P,{capture:!0}),i.removeEventListener(ey,K)},onBlocked:()=>{v&&p!==v&&(p=v)},getBlockers:c,setBlockers:d,notifyOnIndexChange:!1});return C._ignoreNextBeforeUnload=N=>{E=!1;try{N=new URL(N,i.document.baseURI).href,E=/^https?:/.test(N)&&(!N.includes("#")||N.split("#")[0]!==i.location.href.split("#")[0])}catch{}},i.addEventListener(ty,P,{capture:!0}),i.addEventListener(ey,K),i.history.pushState=function(...N){const F=s.apply(i.history,N);return C._ignoreSubscribers||G("PUSH"),F},i.history.replaceState=function(...N){const F=r.apply(i.history,N);return C._ignoreSubscribers||G("REPLACE"),F},C}function po(t,i){const s=Bv(t),r=s.indexOf("#"),o=s.indexOf("?");if(!i){const c=id();i={[bi]:0,key:c,__TSR_key:c}}return{href:s,pathname:s.slice(0,r>-1?o>-1?Math.min(r,o):r:o>-1?o:s.length),hash:r>-1?s.slice(r):"",search:o>-1?s.slice(o,r===-1?void 0:r):"",state:i}}function id(){return(Math.random()+1).toString(36).slice(7)}function of(t,i){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==i||!!t.username||!!t.password}function uf(t){return t.pathname+t.search+t.hash}function iy(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function To(t,i){return{fromLocation:i,toLocation:t,pathChanged:i?.pathname!==t.pathname,hrefChanged:i?.href!==t.href,hashChanged:i?.hash!==t.hash}}function ay({key:t,__TSR_key:i,__TSR_index:s,__hashScrollIntoViewOptions:r,...o}){return o}function _1(t){return t.findIndex(i=>i.status==="error"||i.status==="notFound"||i._notFound)+1}function E1(t,i,s,r,o,c){r&&(i=i.slice(0,r)),o&&(s=s.slice(0,o));for(const d of i){if(c&&t._tx!==c)return;s.some(h=>h.routeId===d.routeId)||t.routesById[d.routeId].options.onLeave?.(d)}for(const d of s){if(c&&t._tx!==c)return;t.routesById[d.routeId].options[i.some(h=>h.routeId===d.routeId)?"onStay":"onEnter"]?.(d)}}var w1=class{constructor(t,i){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async s=>(s(),!1),this.update=s=>{const r=this.options;this.options={...r,...s},this.isServer=this.options.isServer??Yg??typeof document>"u",this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=x1()),this.origin=this.options.origin,this.origin||(window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost");const o=this.options.basepath??"/",c=this.options.rewrite,d=this.basepath!==o||r?.rewrite!==c||r?.caseSensitive!==this.options.caseSensitive;if(d&&(this.basepath=o,this.rewrite=o!=="/"&&Rv(o)?y1(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||Yg){this.routeTree=this.options.routeTree;let h;h=this.buildRouteTree(),this.setRoutes(h)}if(this.stores)d&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){const h=this.getStoreConfig(this);this.batch=h.batch,this.stores=v1(this.latestLocation,h),W_(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=h1(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&u1(this.options.routeMasks,s.processedTree),{...s,resolvePathCache:mo(1e3)}},this.subscribe=(s,r)=>{const o={eventType:s,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=s=>{for(const r of this.subscribers)if(r.eventType===s.type)try{r.fn(s)}catch(o){console.error(o)}},this.parseLocation=(s,r)=>{const o=({pathname:m,search:p,hash:v,href:y},S)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(m)){const z=this.options.parseSearch(p),R=this.options.stringifySearch(z);return{href:m+R+v,publicHref:m+R+v,pathname:ar(m),external:!1,searchStr:R,search:Ga(r?.search,z),hash:ar(v.slice(1)),state:vi(r?.state,S)}}const x=Cf(this.rewrite,new URL(y,this.origin)),E=this.options.parseSearch(x.search),w=this.options.stringifySearch(E);return x.search=w,{href:x.href.replace(x.origin,""),publicHref:y,pathname:ar(ao(x.pathname)),external:!!this.rewrite&&of(x,this.origin),searchStr:w,search:Ga(r?.search,E),hash:ar(x.hash.slice(1)),state:vi(r?.state,S)}},c=o(s,s.state),{__tempLocation:d,__tempKey:h}=c.state;if(d&&(!h||h===this.tempLocationKey)){const m=o(d,{...d.state,__tempLocation:void 0,key:c.state.key,__TSR_key:c.state.__TSR_key});return m.maskedLocation=c,m}return c},this.matchRoutes=(s,r,o)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:r},o):this.matchRoutesInternal(s,r),this.getMatchedRoutes=s=>{const r=Object.create(null),o=d1(hn(s),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[o?.branch||[this.routesById.__root__],r,o?.route]},this.buildLocation=s=>{{const d=this.staticLocations.get(s);if(d)return d}let r=!1;const o=(d={})=>{if(d.href){const ye=po(d.href,{});d={...d,to:Cf(this.rewrite,new URL(ye.pathname,this.origin)).pathname,search:this.options.parseSearch(ye.search),hash:ye.hash.slice(1)}}const h=s._fromLocation||this._pendingLocation||this.latestLocation;let m;const p=()=>(r=!0,h),v=()=>m??=this.matchRoutesLightweight(p()),y=d.to?`${d.to}`:".",S=Pg(y[0]==="/"?"":d.unsafeRelative==="path"?p().pathname:d.from??v()[1],y,this.options.trailingSlash,this.resolvePathCache),x=this.routesByPath[hn(S)],E=S.includes("$");let w;if(x)w=x._branch??=Zv(x);else if(E)w=[];else{const[ye,de,U]=this.getMatchedRoutes(S);w=ye,this.options.notFoundRoute&&(!U||U.path!=="/"&&de["**"])&&(w=[...w,this.options.notFoundRoute])}const z=E?x?._interpolation??pr(!1,{fullPath:S},0):void 0;let R;for(const ye of w){const de=ye.options.params?.stringify??ye.options.stringifyParams;if(de){const U=v()[3];if(R??=cf(d.params,U),!Tv(R))break;R===U&&(R=Object.assign(no(),R));try{Object.assign(R,de(R))}catch{}}}R??=cf(d.params,z1(d.params,z)?v()[3]:ff);const q=s.leaveParams?S:ao(ar(z?Xg(S,z,R,this.pathParamsDecoder):S)),G=T1(w,s._includeValidateSearch),K=()=>{let ye=v()[2];if(s._includeValidateSearch&&this.options.search?.strict){const de={};w.forEach(U=>{if(U.options.validateSearch)try{Object.assign(de,so(U.options.validateSearch,{...de,...ye}))}catch{}}),ye=de}return ye},P=G.length?j1(G,K(),d):d.search===!0?K():typeof d.search=="function"?d.search(K()):d.search||ff,C=this.options.stringifySearch(P),N=d.hash===!0?p().hash:typeof d.hash=="function"?d.hash(p().hash):d.hash||void 0,F=N?`#${N}`:"",re=d.state?d.state===!0?p().state:typeof d.state=="function"?d.state(p().state):d.state:ff,le=`${q}${C}${F}`;let ue,ne,he=!1;if(this.rewrite){const ye=new URL(le,this.origin),de=ye.origin,U=qv(this.rewrite,ye);ue=uf(ye),of(U,de)?(ne=U.href,he=!0):ne=ao(uf(U))}else ue=Q_(le),ne=ue;return{publicHref:ne,href:ue,pathname:q,search:P,searchStr:C,state:re,hash:N??"",external:he,unmaskOnReload:d.unmaskOnReload}},c=o(s);if(s.mask)c.maskedLocation=o({from:s.from,...s.mask});else if(this.options.routeMasks){const d=c1(c.pathname,this.processedTree);if(d){const h=Object.assign(no(),d.rawParams),{from:m,params:p,...v}=d.route,y=cf(p,h);c.maskedLocation=o({from:s.from,...v,params:y})}}return!r&&s._fromLocation&&this.staticLocations.set(s,c),c},this.commitLocation=async({viewTransition:s,ignoreBlocker:r,...o})=>{const c=o.maskedLocation??o;if(c.external)return sy(this,c.publicHref,{replace:o.replace,ignoreBlocker:r});let d;const h=hn(this.latestLocation.href)===hn(o.href)&&qn(ay(o.state),ay(this.latestLocation.state)),m=this._commitPromise;let p;const v=new Promise(y=>{p=y});if(v.resolve=()=>{p(),m?.resolve()},this._commitPromise=v,h)this.load();else{let{maskedLocation:y,hashScrollIntoView:S,...x}=o;y&&(x={...y,state:{...y.state,__tempKey:void 0,__tempLocation:{...x,search:x.searchStr,state:{...x.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(x.unmaskOnReload??this.options.unmaskOnReload??!1)&&(x.state.__tempKey=this.tempLocationKey)),x.state={...x.state,__hashScrollIntoViewOptions:S??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=s,d=o.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](x.publicHref,x.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:d}})}return this._scroll.n=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:r,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:d,...h}={})=>{const m=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=m;const p=this.commitLocation({...m,viewTransition:c,replace:s,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:d});return queueMicrotask(()=>{this._pendingLocation===m&&(this._pendingLocation=void 0)}),p},this.navigate=async({to:s,reloadDocument:r,href:o,publicHref:c,...d})=>{const h=o?mr(o):void 0;if(h||r){if(s!==void 0||!o){const p=this.buildLocation({to:s,...d}),v=p.maskedLocation??p;o??=v.publicHref,c??=v.publicHref}return sy(this,!h&&c?c:o,d)}return this.buildAndCommitLocation({...d,href:o,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s?.action&&(this._scroll.h=s.action.type==="PUSH"||s.action.type==="REPLACE"),await Z1(this,s)},this.startViewTransition=s=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const c=this.latestLocation,d=this.stores.resolvedLocation.get(),h=typeof r.types=="function"?r.types(To(c,d)):r.types;if(h===!1)return s();o={update:s,types:h}}else o=s;return document.startViewTransition(o).updateCallbackDone}return s()},this.invalidate=s=>{const r=this._committed,o=s?.filter,c=this._preloads,d=new Set,h=v=>{(!o||o(v))&&d.add(v.id)};r.forEach(h),this._cache.forEach(h),c?.forEach(v=>v.forEach(h)),this._tx?.[3].forEach(h);const m=[];for(const[v,y]of c??[])y.some(S=>d.has(S.id))&&(c.delete(v),m.push(v));const p=v=>{if(d.has(v.id)){const y=this.routesById[v.routeId],S={...v,invalid:!0,...(s?.forcePending||v.status==="error"||v.status==="notFound")&&iy(y)?{status:"pending",error:void 0}:void 0};return v._flight=void 0,S}return v};this._committed=r.map(p);for(const[v,y]of this._cache)d.has(v)&&(y.invalid=!0,s?.forcePending&&(y.status="pending"));for(const v of d){const y=this._flights?.get(v);this._flights?.delete(v),y&&!y[2]&&m.push(y[1])}for(const v of m)v.abort();return this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.resolveRedirect=s=>{const r=s.options;let o=s.headers.get("Location")||r.href;if(!o){const d=this.buildLocation(r);o=(d.maskedLocation??d).publicHref||"/"}let c;if(jv.test(o)||(c=mr(o))&&!this.protocolAllowlist.has(c))throw new Error("Redirect blocked: unsafe protocol");if(c==="http:"||c==="https:"){const d=new URL(o);d.pathname.startsWith("//")?o=d.href:of(d,this.origin)||(o=uf(d),c=void 0)}return c&&(r.reloadDocument=!0),r.href=o,s.headers.set("Location",o),s},this.clearCache=s=>{const r=this._cache,o=this._preloads,c=s?.filter,d=[],h=[];for(const[p,v]of r)(!c||c(v))&&(h.push(p),d.push(v));const m=[];for(const[p,v]of o??[])(!c||v.some(c))&&(m.push(p),d.push(...v));for(const p of h)r.delete(p);for(const p of m)o.delete(p);for(const p of d){const v=p._flight;p._flight=void 0,v&&!--v[2]&&(this._flights?.get(p.id)===v&&this._flights.delete(p.id),m.push(v[1]))}for(const p of m)p.abort()},this.loadRouteChunk=Xa,this.preloadRoute=s=>q1(this,s),this.matchRoute=(s,r)=>{const o={...s,to:s.to?Pg(s.from||"",s.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:s.params||{},leaveParams:!0},c=this.buildLocation(o),d=this.stores.status.get()==="pending";if(r?.pending&&!d)return!1;const h=r?.pending??!d?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),m=f1(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,h.pathname,this.processedTree);return!m||s.params&&!qn(m.rawParams,s.params,!0)?!1:r?.includeSearch??!0?qn(h.search,c.search,!0)?m.rawParams:!1:m.rawParams},this.getStoreConfig=i,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=K_(t.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??i1,parseSearch:t.parseSearch??n1,protocolAllowlist:t.protocolAllowlist??$_}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const i=this.options.notFoundRoute;i&&(i.init(99999999999),this.routesById[i.id]!==i&&(i._interpolation=pr(!1,i,0)),this.routesById[i.id]=i)}matchRoutesInternal(t,i){const[s,r,o]=this.getMatchedRoutes(t.pathname);let c=s,d=!1;(o?o.path!=="/"&&r["**"]:hn(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const h=d?N1(this.options.notFoundMode,c):void 0,m=new Array(c.length),p=this._committed,v=(S,x)=>{const E=p[x];return E?.routeId===S.id?E:S===this.options.notFoundRoute?p.find(w=>w.routeId===S.id):void 0};let y;for(let S=0;S<c.length;S++){const x=c[S],E=m[S-1];let w,z,R;{const he=E?.search??t.search,ye=E?._strictSearch??void 0;try{const de=so(x.options.validateSearch,{...he})??void 0;w={...he,...de},z={...ye,...de}}catch(de){let U=de;if(de instanceof go||(U=new go(de.message,{cause:de})),i?.throwOnError)throw U;w=he,z={},R=U}}let q="",G="";try{q=x.options.loaderDeps?.({search:w})??"",G=q&&JSON.stringify(q)||""}catch(he){if(i?.throwOnError)throw he;R??=he}const K=no(),P=x._interpolation?Xg(x.fullPath,x._interpolation,r,this.pathParamsDecoder,K):x.fullPath,C=x.id+P+G,N=v(x,S),F=this._cache.get(C)??(N?.id===C?N:void 0);y=F?._strictParams??Object.assign(K,y);let re;if(!F)try{ry(x,y)}catch(he){if(Wa(he)||Dv(he)?re=he:re=new O1(he.message,{cause:he}),i?.throwOnError)throw re}const le=N?"stay":"enter";let ue;if(F)ue={...F,cause:le,search:Ga(N?N.search:F.search,w),_strictSearch:z,searchError:R};else{const he=iy(x)?"pending":"success";ue={id:C,ssr:x.options.ssr,index:S,routeId:x.id,params:N?.params??y,_strictParams:y,pathname:P,updatedAt:Date.now(),search:N?Ga(N.search,w):w,_strictSearch:z,searchError:R,status:he,isFetching:!1,error:void 0,paramsError:re,context:{},abortController:i?._controller??new AbortController,cause:le,loaderDeps:N?vi(N.loaderDeps,q):q,invalid:!1,preload:!1,staticData:x.options.staticData||{},fullPath:x.fullPath}}const ne=h===x.id;ue._notFound&&!ne&&(ue.error=void 0),ue._notFound=ne,m[S]=ue}for(let S=0;S<m.length;S++){const x=m[S];x.params=x.cause==="stay"?Ga(x.params,y):y,i?._controller&&(x.context={})}return m}matchRoutesLightweight(t){const i=Si(this.stores.ids.get()),s=i?this.stores.byRoute.get(i).get():void 0,r=s?.id,o=this.lightweightCache.get(t);if(o&&o[0]===r)return o[1];const[c,d]=this.getMatchedRoutes(t.pathname),h=Si(c),m={...t.search};for(const S of c)try{Object.assign(m,so(S.options.validateSearch,m))}catch{}const p=s&&s.routeId===h.id&&s.pathname===t.pathname;let v;if(p)v=s.params;else{const S=d;for(const x of c)try{ry(x,S)}catch{}v=S}const y=[c,h.fullPath,m,v];return this.lightweightCache.set(t,[r,y]),y}};async function sy(t,i,{replace:s,ignoreBlocker:r}){if(!Nv(i,t.protocolAllowlist)){if(!r){const o=t.history._getBlockers();for(const c of o)if(c?.blockerFn&&await c.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:s?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(i),s?window.location.replace(i):window.location.href=i}}var go=class extends Error{},O1=class extends Error{};function so(t,i){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(i);if(s instanceof Promise)throw new go("Async validation not supported");if(s.issues)throw new go(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(i):typeof t=="function"?t(i):{}}function cf(t,i){if(t===void 0||t===!0)return i;const s=Object.create(null);return t===!1||t===null?s:typeof t=="function"?(Object.assign(s,i),Object.assign(s,t(s))):Object.assign(s,i,t)}function z1(t,i){return typeof t=="function"?!0:!i||t===!1||t===null?!1:t===void 0||t===!0||i.some(s=>typeof s!="string"&&!ed.call(t,s[1]))}const ff=Object.freeze({});function T1(t,i){const s=[];for(let r=0;r<t.length;r++){const o=t[r].options;if("search"in o)o.search?.middlewares&&s.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const d=({search:h,next:m})=>{const p=m(o.preSearchFilters?o.preSearchFilters.reduce((v,y)=>y(v),h):h);return o.postSearchFilters?o.postSearchFilters.reduce((v,y)=>y(v),p):p};s.push(d)}const c=o.validateSearch;if(i&&c){const d=({search:h,next:m,meta:p})=>{const v=m(h);try{const y=so(c,v);if(p&&y)for(const S in y)S in v||(p.defaulted||=new Map).set(S,y[S]);return{...v,...y}}catch{}return v};s.push(d)}}return s}function j1(t,i,s){const r=(o,c,d)=>{if(o>=t.length){if(!s.search)return{};if(s.search===!0)return c;const m=zv(s.search,c);return d&&(d.explicit=m),m}const h=(m,p)=>{if(p){const v=d||{};return{search:r(o+1,m,v),meta:v}}return r(o+1,m,d)};return t[o]({search:c,next:h,meta:d})};return r(0,i)}function N1(t,i){if(t!=="root"){let s;for(let r=i.length-1;r>=0;r--){const o=i[r];if(o.options.notFoundComponent)return o.id;s||=o.children&&o.id}if(s)return s}return Pa}function ry(t,i){const s=t.options.params?.parse??t.options.parseParams;s&&Object.assign(i,s(i))}function Mf(t,i){return t.options[i]?.preload?.()}function A1(t,i){const s=Mf(t,"component");let r=Mf(t,"pendingComponent");return i&&(r?r=r.then(i):i()),s&&r?Promise.all([s,r]).then(()=>{}):s??r}function Xa(t,i,s){const r=()=>i===!1?void 0:i?Mf(t,i):A1(t,s),o=t._lazy;if(o)return o===!0?r():o.then(r);if(!t.lazyFn)return r();const c=t.lazyFn().then(d=>{{const{id:h,...m}=d.options;Object.assign(t.options,m),t._lazy=!0}},d=>{throw t._lazy=void 0,d});return t._lazy=c,c.then(r)}function ad(t){const i=t.findIndex(s=>s.status!=="success"||s._notFound)+1;return i&&i<t.length?t.slice(0,i):t}function R1(t,i,s){const r=t._tx;return i&&r?.[2]===s&&!r[3].some(o=>o.routeId===i)}const mn=0,Bn=1,jo=2,bt=3,xi=[4];function gr(t){return typeof t[0]=="number"}function na(t,i){return i.aborted?Promise.race([Promise.reject(i),t]):new Promise((s,r)=>{const o=()=>r(i);i.addEventListener("abort",o,{once:!0}),Promise.resolve(t).then(s,r).then(()=>i.removeEventListener("abort",o))})}function ia(t,i){return t.routesById[i.routeId]}function yr(t,i,s){return Dv(t)?[bt,t]:Wa(t)?(t.routeId||=s,[jo,t]):i?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[Bn,t]):[mn,t]}function sd(t,i){let s=yr(i,!0,t.id);if(s[0]!==Bn)return s;try{t.options.onError?.(s[1])}catch(r){s=yr(r,!0,t.id)}return s}function fr(t,i,s,r,o){return o[0].signal.aborted?xi:od(t,i,s,sd(s,r),o)}async function C1(t,i,s,r,o,c){const[d,h]=i,m=s[0].signal,p=!!s[3];for(let v=s[6]??0;v<r;v++){const y=h[v],S=ia(t,y);y.abortController=s[0];const x=h[v-1]?.context??t.options.context??{},E={params:y.params,location:d,navigate:q=>t.navigate({...q,_fromLocation:d}),buildLocation:t.buildLocation,cause:p?"preload":y.cause,abortController:s[0],preload:p,matches:h,routeId:S.id};try{const q=y._ctx||=S.options.context?S.options.context({...E,deps:y.loaderDeps,context:x})||{}:void 0;y.context={...x,...q}}catch(q){return Un(t,y),[v,fr(t,i,S,q,s)]}if(m.aborted)return[v,xi];const w=y.paramsError??y.searchError;if(w!==void 0)return Un(t,y),[v,fr(t,i,S,w,s)];const z=S.options.beforeLoad;if(!z)continue;const R=y.status;v>=c&&(y.status="pending",s[7]?.());try{vr(t,y,"beforeLoad",s[0]);const q=z({...E,search:y.search,context:y.context,...t.options.additionalContext}),G=await(typeof q?.then=="function"?na(q,m):q);if(m.aborted)return[v,xi];const K=od(t,i,S,yr(G,!1,S.id),s);if(K[0]!==mn)return Un(t,y),[v,K];y.context={...y.context,...G}}catch(q){return Un(t,y),[v,fr(t,i,S,q,s)]}finally{y.status=R,vr(t,y,!1,s[0])}}o()}function rd(t,i,s){if(!(!s||--s[2])){if(t._flights?.get(i.id)===s){const r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(i)&&r[3].some(o=>o.id===i.id)&&r[3].some(o=>o.isFetching==="beforeLoad"))return;t._flights.delete(i.id)}return s[1]}}function Un(t,i){const s=i._flight;i._flight=void 0,rd(t,i,s)?.abort()}function Tt(t,i,s,r){const o=[];for(const c of i)if(!s?.includes(c)){const d=c._flight;if(c._flight=void 0,r&&d?.[2]===1&&t._flights?.get(c.id)===d&&s?.some(h=>h.id===c.id))d[2]=0;else{const h=rd(t,c,d);h&&o.push(h)}}for(const c of o)c.abort()}function ld(t){for(const i of t){const s=i._flight;s&&s[2]++}}function vr(t,i,s,r){if(i.isFetching=s,r&&t._tx?.[0]!==r)return;const o=t.stores.byRoute.get(i.routeId),c=o?.get();c?.id===i.id&&o.set({...c,isFetching:s})}function Hv(t,i,s,r,o,c,d){const h=i[0];return{params:s.params,location:h,navigate:m=>t.navigate({...m,_fromLocation:h}),cause:d?"preload":s.cause,abortController:o,preload:d,deps:s.loaderDeps,parentMatchPromise:c,context:s.context,route:r,...t.options.additionalContext}}async function ly(t,i,s,r,o,c,d){const h=d[0],m=h.signal;if(m.aborted)return xi;if(!o)return[mn,void 0];let p=s._flight;vr(t,s,"loader",h);try{if(!p){const v=new AbortController;p=[Promise.resolve().then(()=>o(Hv(t,i,s,r,v,c,!!d[3]))).then(y=>yr(y,!1,r.id),y=>yr(y,!0,r.id)).then(y=>(y[0]!==mn&&t._flights?.get(s.id)===p&&(t._flights.delete(s.id),p[2]||v.abort()),y[0]===Bn&&p[2]?sd(r,y[1]):y)),v,1],(t._flights??=new Map).set(s.id,p)}return s._flight=p,s.abortController=p[1],od(t,i,r,await na(p[0],m),d)}catch(v){if(v!==m||!m.aborted)throw v;return Un(t,s),xi}finally{vr(t,s,!1,h)}}function oy(t,i,s){i[0]!==bt&&(t.status="success",t.error=void 0,i[0]===mn?(t.loaderData=i[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=s):t.invalid=!0)}function M1(t,i,s){const r=t._cache.get(i.id);if(r!==s||t._committed.some(c=>c.id===i.id&&c._flight===i._flight))return;const o={...i,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,t._cache.set(i.id,o),r&&Un(t,r)}function uy(t,i){return i[0]===Bn||i[0]===jo?{...t,status:i[0]===Bn?"error":"notFound",error:i[1],_flight:void 0}:t}function D1(t,i,s,r,o,c,d){const h=i[1][s],m=ia(t,h),p=!!c[3],v=t._cache.get(h.id);let y,S=!1,x;try{if(h.status==="success"&&(y=m.options.shouldReload,typeof y=="function"&&(y=y(Hv(t,i,h,m,c[0],o,p))),c[0].signal.aborted&&(x=xi)),!x)if(h.status!=="success")S=!0;else{const ne=p||h.preload?m.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:m.options.staleTime??t.options.defaultStaleTime??0;S=!!(h.invalid||y||y===void 0&&Date.now()-h.updatedAt>=ne&&(c[5]||h.cause==="enter"||c[2].some(he=>he.routeId===h.routeId&&he.id!==h.id)))}}catch(ne){h.invalid=!0,Un(t,h),x=fr(t,i,m,ne,c)}const E=m.options.loader,w=typeof E=="function",z=w?E:E?.handler,R=!p||m.options.preload!==!1;let q=R&&E?t._flights?.get(h.id):void 0;q===h._flight||x?q=void 0:q&&!S&&!p&&y===void 0?S=!0:S||(q=void 0);const G=!!(E&&S&&h.status==="success"&&!p&&!c[4]&&((w?void 0:E.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),K=S&&R,P=K&&!G&&(h.status!=="success"||!!E),C=s>=d?c[7]:void 0,N=m.lazyFn&&m._lazy!==!0?C:void 0;if(K&&!E&&(h.invalid=!1,h.updatedAt=Date.now()),q&&q[2]++,P){const ne=h._flight;h._flight=q,rd(t,h,ne)?.abort(),s>=d&&(h.status="pending"),C?.()}K||(h.isFetching=!1);const F=!x&&P?ly(t,i,h,m,z,o,c).then(ne=>(oy(h,ne,p),ne[0]===mn&&(E&&!c[0].signal.aborted&&M1(t,h,v),s>=d&&(h.status="pending")),ne)):Promise.resolve(x??[mn,h.loaderData]),re=(async()=>{try{const he=Xa(m,void 0,N);he&&await na(he,c[0].signal)}catch(he){if(!i[1].some((ye,de)=>de<=s&&(ye.status==="error"||ye.status==="notFound"||ye._notFound)))return[s,fr(t,i,m,he,c)]}const ne=await F;P&&ne[0]===mn&&h.status==="pending"&&!c[0].signal.aborted&&(h.status="success",C?.())})();if(r.push([s,F,re]),!G)return F.then(ne=>uy(h,ne));const le={...h,status:"pending",preload:!1,_flight:q};h.invalid=!1,h.isFetching="loader";const ue=ly(t,i,le,m,z,o,c).then(ne=>(h.isFetching=!1,oy(le,ne,!1),ne));return(i[2]??=[]).push([s,ue,re,le]),ue.then(ne=>uy(le,ne))}async function Df(t,i,s,r,o=0){const c=s?.[1][1];let d=c?.routeId?i.findIndex(h=>h.routeId===c.routeId):s?.[0]??i.length-1;d<0&&(d=0);for(let h=d;h>=0;h--){const m=ia(t,i[h]);try{const p=Xa(m,!1);p&&await na(p,r)}catch(p){if(p===r&&r.aborted)throw p}if(m.options.notFoundComponent)return h}return c?.routeId?d:o}function Ji(t,i){i[2]&&(Tt(t,i[2].map(s=>s[3])),i[2]=void 0)}async function cy(t,i,s,r){let o;try{await Promise.all(t.map(c=>c[1].then(async d=>{const h=c[0];if(!(r&&h>=await r)){if(d[0]>=bt)throw[h,d];!o&&d[0]!==mn&&(o=[h,d],await Promise.all((s??[]).map(m=>{if(!(m[0]<=h))return m[1].then(p=>{if(p[0]===bt)throw[m[0],p]})})))}})))}catch(c){return c}return i??o}function od(t,i,s,r,o,c){for(;r[0]===bt;){const d=r[1],h=d.options;try{if((h.href||d.headers.has("Location"))&&(t.resolveRedirect(d),h.reloadDocument)||(h.reloadDocument?o[3]:o[1]>=20))return r;const m=t.buildLocation({...h,_fromLocation:i[0],_includeValidateSearch:!0}),p=m.maskedLocation??m;if(p.external){const v=d.clone();return v.options={...h},v.headers.set("Location",p.publicHref),t.resolveRedirect(v),o[3]?[bt,v]:[bt,v,p]}return[bt,d,m]}catch(m){r=c?[Bn,m]:sd(s,m),c=!0}}return r}async function $v(t,i,s,r,o,c){const d=i[1];let h=await o,m=!1;const p=d.findIndex(x=>x._notFound),v=x=>x[1][0]===jo?Df(t,d,x,r.signal):x[0];let y=p<0?d.length:p;if((h?.[1][0]??0)>=bt)y=0;else if(h){y=h[2]??=await v(h);for(const x of s){if(x[0]>=y)break;const E=await x[1];if(E[0]!==mn&&E[0]<bt&&!("loaderData"in d[x[0]])){h=[x[0],E],y=h[2]=await v(h);break}}}for(const x of s){if(x[0]>=y)break;const E=await x[2];if(E){h=E;break}}if((h?.[1][0]??0)>=bt){const x=h[1];if(x[0]!==bt||x[1].options.reloadDocument||x[2])return Ji(t,i),x;m=!0,h=[0,[Bn,new Error("Too many redirects")]]}const S=h?h[2]??await v(h):p;if(S>=0){const x=h?.[1],E=x?.[0],w=d[S],z=x?.[1],R=()=>{x&&(w._notFound=void 0,E===Bn?w.status="error":(z.routeId=w.routeId,w.routeId===t.routeTree.id?(w.status="success",w._notFound=!0):w.status="notFound"),w.error=z,w.isFetching=!1)};R(),x||c?.();const q=ia(t,w);try{await na(x?Promise.resolve().then(()=>Xa(q,E===Bn?"errorComponent":"notFoundComponent")):Promise.all([Xa(q),Xa(q,"notFoundComponent")]),r.signal)}catch(G){if(G===r.signal&&r.signal.aborted)return Ji(t,i),xi}x?m&&(r.abort(),await Promise.all([...s.map(G=>G[1]),...s.map(G=>G[2]),...(i[2]??[]).map(G=>G[1])]),Ji(t,i),Tt(t,d),R()):w.status="success"}return i}async function Qv(t,i,s,r=0,o=i[1].length){const c=i[1];for(let d=r;d<o;d++){const h=c[d],m=ia(t,h).options;if(m.head||m.scripts)try{const p={ssr:t.options.ssr,matches:c,match:h,params:h.params,loaderData:h.loaderData},[v,y]=await na(Promise.all([m.head?.(p),m.scripts?.(p)]),s);h.meta=v?.meta,h.links=v?.links,h.headScripts=v?.scripts,h.styles=v?.styles,h.scripts=y}catch(p){if(p===s&&s.aborted)break;console.error(p)}if(h.status!=="success"||h._notFound)break}return i}async function Gv(t,i,s,r){const o=[i,s],c=r[0].signal;let d;try{const h=t.stores.matches.get();let m=s.findIndex(R=>R._notFound);if(t.options.notFoundMode!=="root"&&m>=0){const R=await Df(t,s,void 0,c,m);s[m]._notFound=void 0,s[R]._notFound=!0,m=R}let p=m<0?s.length:m+1,v=0;for(;v<p&&v!==m;){const R=s[v],q=r[2][v],G=h[v];if(q?.id!==R.id||q.status!=="success"||R.preload||G?.id!==R.id||G.status!=="success"||(v++,q._notFound||G._notFound))break}const y=[],S=r[6]??0;let x=S?Promise.resolve(s[S-1]):void 0;const E=()=>{for(let R=S;R<p&&!c.aborted;R++)x=D1(t,o,R,y,x,r,v)},w=await C1(t,o,r,p,E,v);if(w){if(r[4]=!0,p=w[0],w[1][0]===jo){const R=await Df(t,s,w,c);w[2]=R,p=Math.min(p,R+1)}else w[1][0]>=bt&&(p=0);E()}if(!c.aborted&&!r[3]){const R=[];for(const[q,G]of t._flights??[])G[2]||(t._flights.delete(q),R.push(G[1]));for(const q of R)q.abort()}const z=$v(t,o,y,r[0],cy(y,w,o[2]),r[7]);o[2]?.length&&(o[3]=cy(o[2],void 0,void 0,z.then(R=>gr(R)?0:ad(s).length,()=>0))),d=await z}catch(h){if(Ji(t,o),h===c&&c.aborted)return xi;throw h}return gr(d)?d:Qv(t,d,c,r[6]===s.length?r[6]:0)}function kf(t,i){if(t._tx!==i)return;const s=i[3],r=t.stores.matches.get();let o=t._pending;for(let c=0;c<s.length;c++){const d=s[c],h=d.status==="success"&&!d._notFound,m=r[c]?.id===d.id&&r[c]?.status==="pending";if(h&&!m)continue;const p=ia(t,d),v=h||d.invalid?0:p.options.pendingMs??t.options.defaultPendingMs,y=p.options.pendingComponent??t.options.defaultPendingComponent;if(!y||typeof v!="number"||v===1/0){o&&(o[0]=i,o[2]=0,o[4]=!0);return}const S=p.options.pendingMinMs??t.options.defaultPendingMinMs??0;let x=!1;if(o?.[1]===d.id?(x=o[0]!==i,o[0]=i):(clearTimeout(o?.[3]),t._pending=o=void 0),o||(t._pending=o=[i,d.id,m?Date.now()+S:i[4]+v,void 0,m||void 0,y]),o[4]&&!x&&o[5]===y)return;if(o[5]=y,!o[4]){clearTimeout(o[3]);const z=o[2]-Date.now();if(z>0){o[3]=setTimeout(()=>kf(t,i),z);return}o[2]=0}const E=s.map(z=>({...z,_flight:void 0}));E[c].status="pending";const w=o[4]=t.startTransition(()=>t.stores.setMatches(E),E).then(z=>(z&&t._pending===o&&o[4]===w&&!o[2]&&(o[2]=Date.now()+S),z));return}}function sr(t,i){const s=t._pending;(t._tx===i||!t._tx?.[3].some(r=>r.id===s?.[1]))&&(clearTimeout(s?.[3]),t._pending=void 0)}async function fy(t,i){const s=t._pending;if(!s)return;clearTimeout(s[3]);const r=s[2]-Date.now();if(!s[4]||r<=0||!ad(i[3]).some(c=>c.id===s[1]))return;let o;try{await na(new Promise(c=>{o=setTimeout(c,r)}),i[0].signal)}catch{}clearTimeout(o)}function Kv(t,i){t._committed=i,t.stores.setMatches(i)}function k1(t,i,s,r){const o=t._committed,c=t._lifecycleEnd,d=t._cache;for(const v of s)v.preload=!1,r&&(v._assetEnd=void 0);const h=ad(s).length,m=new Map;{const v=Date.now(),y=new Set;for(let S=0;S<s.length;S++){const x=s[S];(S<h||x.status==="success")&&y.add(x.id)}for(const S of[...o,...d.values()]){if(S.status!=="success"||y.has(S.id))continue;const x=ia(t,S);!x.options.loader||v-S.updatedAt>=(S.preload?x.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:x.options.gcTime??t.options.defaultGcTime??3e5)||m.set(S.id,d.get(S.id)===S?S:{...S,_flight:void 0,isFetching:!1,context:{}})}}i[3]=[],t._cache=m;const p=t._lifecycleEnd=_1(s);Kv(t,s),Tt(t,[...d.values(),...o].filter(v=>v._flight&&m.get(v.id)!==v),s),E1(t,o,s,c,p,i)}async function Kl(t,i){let s=t._tx;for(;s&&s!==i;)i=s,await s[5],s=t._tx}function Yv(t,i,s){const r=s[1].options,o=s[2];if(!o)return t.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return t.navigate({href:(o.maskedLocation??o).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=i[1]+1,t._pendingLocation=o;const c=t.commitLocation({...o,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===o&&(t._pendingLocation=void 0)}),c}async function U1(t,i,s,r,o){const c=s.map(m=>({...m}));ld(c);for(const m of r)Un(t,c[m[0]]),c[m[0]]=m[3];const d=[i[2],c];let h;try{h=await $v(t,d,r,i[0],o)}catch(m){throw Tt(t,c),m}if(gr(h)){Tt(t,c),h[0]===bt&&t._tx===i&&t._committed===s&&await Yv(t,i,h);return}if(await Qv(t,h,i[0].signal),t._tx!==i||t._committed!==s){Tt(t,c);return}for(const m of c){const p=t._cache.get(m.id);p?._flight&&p._flight===m._flight&&(t._cache.delete(m.id),Un(t,p))}Kv(t,c),Tt(t,s,c)}async function L1(t,i,s,r,o,c){const d=await Gv(t,i[2],i[3],[i[0],i[1],t._committed,void 0,o,s,c,r]);if(gr(d)){const y=d[0]===bt&&t._tx===i;if((!y||d[1].options.reloadDocument)&&sr(t,i),Tt(t,i[3]),i[3]=[],!y)return;if(t._tx!==i){sr(t,i);return}await Yv(t,i,d);return}const h=d[1];if(t._tx===i&&await fy(t,i),t._tx!==i){sr(t,i),Tt(t,h),Ji(t,d);return}const m=i[2],p=To(m,t.stores.resolvedLocation.get()),v=d[2];await t.startViewTransition(async()=>{if(t._tx===i&&await fy(t,i),t._tx!==i){sr(t,i),Tt(t,h),Ji(t,d);return}const y=()=>{sr(t,i),k1(t,i,h,c),t._tx===i&&(t.emit({type:"onLoad",...p}),t._tx===i&&t.emit({type:"onBeforeRouteMount",...p}))},S=await t.startTransition(y,h);if(t._tx!==i){Ji(t,d);return}v?.length&&U1(t,i,h,v,d[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(m),t.stores.status.set("idle"),t._tx===i&&t.emit({type:"onResolved",...p}),S&&t._tx===i&&t.emit({type:"onRendered",...p})}),t._tx===i&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function Z1(t,i){const s=t._tx,r=t.stores.resolvedLocation.get(),o=r??t.stores.location.get(),c=t.latestLocation,d=t._pendingLocation,h=d?.href===c.href?d._redirects??0:0,m=t._handoff,p=m?.[0](),v=new AbortController,y=t._preflight;if(t._preflight=v,p||m?.[1](),y?.abort(),!v.signal.aborted){const K=To(c,r);t.emit({type:"onBeforeNavigate",...K}),v.signal.aborted||t.emit({type:"onBeforeLoad",...K})}if(v.signal.aborted){await Kl(t,s);return}const S=o.href===c.href;let x=v;const E=t.matchRoutes(c,{_controller:v});ld(E);const w=p?m[1](E):void 0;if(w?x=p:p?.abort(),v.signal.aborted){Tt(t,E),await Kl(t,s);return}t._preflight=void 0;let z;const R=()=>L1(t,G,S,()=>kf(t,G),i?.sync,w),q=i?.sync?new Promise(K=>z=K):Promise.resolve().then(R),G=[x,h,c,E,Date.now(),q.then(()=>Kl(t,G))];if(t._tx=G,s){for(const K of t.stores.matches.get()){if(t._tx!==G)break;K.isFetching&&vr(t,K,!1)}s[0].abort(),Tt(t,s[3],G[3],!0)}if(t._tx!==G){Tt(t,G[3]),G[3]=[],z?.(),await Kl(t,G);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(c)}),(w||!t._committed.length&&E[0]?.status!=="success"&&!E.some(K=>K._notFound))&&kf(t,G),z?.(R()),await G[5]}async function q1(t,i){let s=t.buildLocation(i);for(let r=0;;r++){const o=t._committed,c=new AbortController;let d,h,m;try{try{d=t.matchRoutes(s,{_controller:c}),ld(d),h=(t._preloads??=new Map).set(c,d),m=await Gv(t,s,d,[c,r,o,!0])}finally{h&&(h=h.delete(c),Tt(t,d)),c.abort()}if(!gr(m))return m[1];if(!h||m.length<3)return;s=m[2]}catch(p){Wa(p)||console.error(p);return}}}const B1="Error preloading route! ☝️";var Fv=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=i=>{this.originalIndex=i,this._branch=void 0;const s=this.options,r=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Pa:this.parentRoute||td();let o=r?Pa:s?.path;o&&o!=="/"&&(o=Av(o));const c=s?.id||o,d=r?Pa:Va((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const h=d==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Va(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=d,this._fullPath=h,this._to=hn(h)},this.addChildren=i=>this._addFileChildren(i),this._addFileChildren=i=>(Array.isArray(i)&&(this.children=i),typeof i=="object"&&i!==null&&(this.children=Object.values(i)),this),this._addFileTypes=()=>this,this.updateLoader=i=>(Object.assign(this.options,i),this),this.update=i=>(Object.assign(this.options,i),this),this.lazy=i=>(this.lazyFn=i,this),this.redirect=i=>r1({from:this.fullPath,...i}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},H1=class extends Fv{constructor(t){super(t)}},ud=class extends X.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,i){const s=t.getResetKey();return i.error&&i.resetKey!==s?{resetKey:s,error:0}:{resetKey:s}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,i){this.props.onCatch?.(t,i)}render(){const t=this.state.error;return t?X.createElement(this.props.errorComponent??$1,{error:t[0],reset:this.reset}):this.props.children}};function $1({error:t}){const[i,s]=X.useState(!1);return b.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[b.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[b.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),b.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>s(r=>!r),children:i?"Hide Error":"Show Error"})]}),b.jsx("div",{style:{height:".25rem"}}),i?b.jsx("div",{children:b.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?b.jsx("code",{children:t.message}):null})}):null]})}var dy=()=>!0,Q1=()=>!1;function G1({children:t,fallback:i=null}){return b.jsx(zo.Fragment,{children:K1()?t:i})}function K1(t=!0){return zo.useSyncExternalStore(Y1,dy,t?Q1:dy)}function Y1(){return()=>{}}var Vv=X.createContext(null);function yn(t){return X.useContext(Vv)}function F1(t,i){const s=t.stores.location,r=new Set;let o,c;const d=h=>{R1(t,i,h)||(o=h,r.forEach(m=>m()))};return[()=>o??s.get(),h=>(r.size||(o=s.get(),c=s.subscribe(d).unsubscribe),r.add(h),()=>{r.delete(h),r.size||(c(),o=void 0)})]}var br=X.createContext(void 0),V1=X.createContext(void 0);function P1({update:t,notify:i,unwatched:s}){return{link:r,unlink:o,propagate:c,checkDirty:d,shallowPropagate:h};function r(p,v,y){const S=v.depsTail;if(S!==void 0&&S.dep===p)return;const x=S!==void 0?S.nextDep:v.deps;if(x!==void 0&&x.dep===p){x.version=y,v.depsTail=x;return}const E=p.subsTail;if(E!==void 0&&E.version===y&&E.sub===v)return;const w=v.depsTail=p.subsTail={version:y,dep:p,sub:v,prevDep:S,nextDep:x,prevSub:E,nextSub:void 0};x!==void 0&&(x.prevDep=w),S!==void 0?S.nextDep=w:v.deps=w,E!==void 0?E.nextSub=w:p.subs=w}function o(p,v=p.sub){const y=p.dep,S=p.prevDep,x=p.nextDep,E=p.nextSub,w=p.prevSub;return x!==void 0?x.prevDep=S:v.depsTail=S,S!==void 0?S.nextDep=x:v.deps=x,E!==void 0?E.prevSub=w:y.subsTail=w,w!==void 0?w.nextSub=E:(y.subs=E)===void 0&&s(y),x}function c(p){let v=p.nextSub,y;e:do{const S=p.sub;let x=S.flags;if(x&60?x&12?x&4?!(x&48)&&m(p,S)?(S.flags=x|40,x&=1):x=0:S.flags=x&-9|32:x=0:S.flags=x|32,x&2&&i(S),x&1){const E=S.subs;if(E!==void 0){const w=(p=E).nextSub;w!==void 0&&(y={value:v,prev:y},v=w);continue}}if((p=v)!==void 0){v=p.nextSub;continue}for(;y!==void 0;)if(p=y.value,y=y.prev,p!==void 0){v=p.nextSub;continue e}break}while(!0)}function d(p,v){let y,S=0,x=!1;e:do{const E=p.dep,w=E.flags;if(v.flags&16)x=!0;else if((w&17)===17){if(t(E)){const z=E.subs;z.nextSub!==void 0&&h(z),x=!0}}else if((w&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(y={value:p,prev:y}),p=E.deps,v=E,++S;continue}if(!x){const z=p.nextDep;if(z!==void 0){p=z;continue}}for(;S--;){const z=v.subs,R=z.nextSub!==void 0;if(R?(p=y.value,y=y.prev):p=z,x){if(t(v)){R&&h(z),v=p.sub;continue}x=!1}else v.flags&=-33;v=p.sub;const q=p.nextDep;if(q!==void 0){p=q;continue e}}return x}while(!0)}function h(p){do{const v=p.sub,y=v.flags;(y&48)===32&&(v.flags=y|16,(y&6)===2&&i(v))}while((p=p.nextSub)!==void 0)}function m(p,v){let y=v.depsTail;for(;y!==void 0;){if(y===p)return!0;y=y.prevDep}return!1}}function X1(t,i,s){const r=typeof t=="object",o=r?t:void 0;return{next:(r?t.next:t)?.bind(o),error:(r?t.error:i)?.bind(o),complete:(r?t.complete:s)?.bind(o)}}const Uf=[];let ro=0;const{link:hy,unlink:J1,propagate:I1,checkDirty:Pv,shallowPropagate:my}=P1({update(t){return t._update()},notify(t){Uf[Lf++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,yo(t))}});let Yl=0,Lf=0,sn,Zf=0;function W1(t){try{++Zf,t()}finally{--Zf||Xv()}}function yo(t){const i=t.depsTail;let s=i!==void 0?i.nextDep:t.deps;for(;s!==void 0;)s=J1(s,t)}function Xv(){if(!(Zf>0)){for(;Yl<Lf;){const t=Uf[Yl];Uf[Yl++]=void 0,t.notify()}Yl=0,Lf=0}}function py(t,i){const s=typeof t=="function",r=t,o={_snapshot:s?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?0:1,get(){return sn!==void 0&&hy(o,sn,ro),o._snapshot},subscribe(c){const d=X1(c),h={current:!1},m=eE(()=>{o.get(),h.current?(sn=void 0,d.next?.(o._snapshot)):h.current=!0});return{unsubscribe:()=>{m.stop()}}},_update(c){const d=sn,h=i?.compare??Object.is;if(s)sn=o,++ro,o.depsTail=void 0;else if(c===void 0)return!1;s&&(o.flags=5);try{const m=o._snapshot,p=typeof c=="function"?c(m):c===void 0&&s?r(m):c;return m===void 0||!h(m,p)?(o._snapshot=p,!0):!1}finally{sn=d,s&&(o.flags&=-5),yo(o)}}};return s?(o.flags=17,o.get=function(){const c=o.flags;if(c&16||c&32&&Pv(o.deps,o)){if(o._update()){const d=o.subs;d!==void 0&&my(d)}}else c&32&&(o.flags=c&-33);return sn!==void 0&&hy(o,sn,ro),o._snapshot}):o.set=function(c){if(o._update(c)){const d=o.subs;d!==void 0&&(I1(d),my(d),Xv())}},o}function eE(t){const i=()=>{const r=sn;sn=s,++ro,s.depsTail=void 0,s.flags=6;try{return t()}finally{sn=r,s.flags&=-5,yo(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&Pv(this.deps,this)?i():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,yo(this)}};return i(),s}var df={exports:{}},hf={},mf={exports:{}},pf={};var gy;function tE(){if(gy)return pf;gy=1;var t=xr();function i(y,S){return y===S&&(y!==0||1/y===1/S)||y!==y&&S!==S}var s=typeof Object.is=="function"?Object.is:i,r=t.useState,o=t.useEffect,c=t.useLayoutEffect,d=t.useDebugValue;function h(y,S){var x=S(),E=r({inst:{value:x,getSnapshot:S}}),w=E[0].inst,z=E[1];return c(function(){w.value=x,w.getSnapshot=S,m(w)&&z({inst:w})},[y,x,S]),o(function(){return m(w)&&z({inst:w}),y(function(){m(w)&&z({inst:w})})},[y]),d(x),x}function m(y){var S=y.getSnapshot;y=y.value;try{var x=S();return!s(y,x)}catch{return!0}}function p(y,S){return S()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return pf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:v,pf}var yy;function nE(){return yy||(yy=1,mf.exports=tE()),mf.exports}var vy;function iE(){if(vy)return hf;vy=1;var t=xr(),i=nE();function s(p,v){return p===v&&(p!==0||1/p===1/v)||p!==p&&v!==v}var r=typeof Object.is=="function"?Object.is:s,o=i.useSyncExternalStore,c=t.useRef,d=t.useEffect,h=t.useMemo,m=t.useDebugValue;return hf.useSyncExternalStoreWithSelector=function(p,v,y,S,x){var E=c(null);if(E.current===null){var w={hasValue:!1,value:null};E.current=w}else w=E.current;E=h(function(){function R(C){if(!q){if(q=!0,G=C,C=S(C),x!==void 0&&w.hasValue){var N=w.value;if(x(N,C))return K=N}return K=C}if(N=K,r(G,C))return N;var F=S(C);return x!==void 0&&x(N,F)?(G=C,N):(G=C,K=F)}var q=!1,G,K,P=y===void 0?null:y;return[function(){return R(v())},P===null?void 0:function(){return R(P())}]},[v,y,S,x]);var z=o(p,E[0],E[1]);return d(function(){w.hasValue=!0,w.value=z},[z]),m(z),z},hf}var by;function aE(){return by||(by=1,df.exports=iE()),df.exports}var sE=aE();function rE(t,i){return t===i}function ea(t,i=r=>r,s){const r=s?.compare??rE,o=X.useCallback(d=>{const{unsubscribe:h}=t.subscribe(d);return h},[t]),c=X.useCallback(()=>t.get(),[t]);return sE.useSyncExternalStoreWithSelector(o,c,c,i,r)}var Sy={};function lE(t,i){const s=X.useRef();return r=>{const o=t?.select?t.select(r):r;return t?.structuralSharing??i.options.defaultStructuralSharing?s.current=vi(s.current,o):o}}function aa(t){const i=yn(),s=X.useContext(t.from?V1:br),r=t.from??s,o=i.stores.getMatchStore(r),c=lE(t,i),d=ea(o,h=>h?c(h):Sy);if(d!==Sy)return d;(t.shouldThrow??!0)&&td()}function Jv(t){return aa({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i=>t.select?t.select(i.loaderData):i.loaderData})}function Iv(t){const{select:i,...s}=t;return aa({...s,select:r=>i?i(r.loaderDeps):r.loaderDeps})}function Wv(t){return aa({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i=>{const s=t.strict===!1?i.params:i._strictParams;return t.select?t.select(s):s}})}function eb(t){return aa({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i=>t.select?t.select(i.search):i.search})}function No(t){const i=yn();return X.useCallback(s=>i.navigate({...s,from:s.from??t?.from}),[t?.from,i])}function tb(t){return aa({...t,select:i=>t.select?t.select(i.context):i.context})}function oE(...t){const i=X.useRef(t),s=i.current;return t.forEach((r,o)=>{qn(s[o],r,!1,!0)||(s[o]=r)}),i.current}function Fl(t,i){t.preloadRoute(i).catch(s=>{console.warn(s),console.warn(B1)})}function uE(t,i){const s=typeof t=="string"&&mr(t);if(s)return i.has(s)?t:null}function cE(t,i,s,r){const o=Vg(t.pathname,r),c=Vg(i.pathname,r);return(s?.exact?o!==c:!(o.startsWith(c)&&(o.length===c.length||o[c.length]==="/")))||(s?.includeSearch??!0)&&!qn(t.search,i.search,!s?.exact,s?.explicitUndefined)?!1:!s?.includeHash||t.hash===i.hash}function fE(t,i,s){const r=yn(),o=X.useRef(null),c=X.useCallback(Z=>{if(o.current=Z,typeof i=="function")return i(Z);i&&(i.current=Z)},[i]),{activeOptions:d,to:h,preload:m,preloadDelay:p,disabled:v,target:y,onClick:S,onBlur:x,onFocus:E,onMouseEnter:w,onMouseLeave:z,onTouchStart:R}=t,[q,G,K]=oE(t.search,t.params,d),P=X.useContext(br),C=(r.stores._linkScopes??={})[P]??=F1(r,P),[N,F,re]=X.useMemo(()=>{const Z=uE(h,r.protocolAllowlist);if(Z!==void 0){const Le=[Z??void 0];return[t,()=>Le]}const V={...t};let I,ce,ge;const we=()=>{const Le=C[0]();if(Le!==I){V._fromLocation=Le;const Be=r.buildLocation(V),on=gE(Be,r,v),Ni=v||on&&!mr(on)?cE(Le,Be,K,r.basepath):void 0;(!ce||ce[0]!==on||ce[1]!==Ni)&&(ce=[on,Ni]),I=Le}return ce};return[V,we,K?.includeHash&&(()=>{const Le=we();return Le[1]?ge??=[Le[0],!1]:Le})]},[r,C,t.from,t.hash,t.href,h,q,G,t.state,t.mask,t.unsafeRelative,K,v]),[le,ue]=X.useSyncExternalStore(C[1],F,re||F),ne=ue===void 0&&le,he=v||le===void 0,ye=X.useRef(!1),de=t.reloadDocument||ne||he?!1:m??r.options.defaultPreload,U=p??r.options.defaultPreloadDelay??0,J=X.useCallback(Z=>{const V=Z?.isIntersecting;if(!(V??de==="intent")){V===!1&&Vl(o);return}if(!U){Fl(r,N);return}o.t??=setTimeout(()=>{o.t=void 0,Fl(r,N)},U)},[r,N,o,de,U]);X.useEffect(()=>{if(!de)return;de==="render"&&!ye.current&&(ye.current=!0,Fl(r,N));let Z=!0,V;return de==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(V=new IntersectionObserver(I=>{Z&&J(I.pop())},{rootMargin:"100px"}),V.observe(o.current)),()=>{Z=!1,V?.disconnect(),Vl(o)}},[r,N,de,J,o]);const te=mE(t,s);if(te.ref=i?c:o,ne)return te.href=ne,te;const je=Z=>{const V=y??Z.currentTarget.getAttribute("target");!he&&!(Z.metaKey||Z.altKey||Z.ctrlKey||Z.shiftKey)&&!Z.defaultPrevented&&(!V||V==="_self")&&Z.button===0&&(Z.preventDefault(),Vl(o),r.navigate({...t,_fromLocation:N._fromLocation}))},Ae=()=>{de==="intent"&&Fl(r,N)},j=()=>{de==="intent"&&Vl(o)};return te.onClick=Ya(S,je),te.onBlur=Ya(x,j),te.onFocus=Ya(E,J),te.onMouseEnter=Ya(w,J),te.onMouseLeave=Ya(z,j),te.onTouchStart=Ya(R,Ae),pE(te,t,ue,le,he,s)}var dE={},hE={className:"active"},nb=new Set(["to","params","search","hash","state","mask","from","unsafeRelative","reloadDocument","preload","preloadDelay","preloadIntentProximity","hashScrollIntoView","replace","startTransition","resetScroll","viewTransition","ignoreBlocker","activeProps","inactiveProps","activeOptions","_asChild"]);function mE(t,i){const s={};for(const r in t)nb.has(r)||r==="type"&&i!==void 0||r==="disabled"&&i==="a"||(s[r]=t[r]);return s}function pE(t,i,s,r,o,c){const{activeProps:d,inactiveProps:h,className:m,style:p,target:v}=i,y=zv(s?d:h,{})??(s?hE:dE);Object.assign(t,y),t.href=r,c!=="a"&&(t.disabled=o),t.target=v;const S=y.style;(p||S)&&(t.style=p&&S?{...p,...S}:p||S);const x=y.className;return(m||x)&&(t.className=m?x?`${m} ${x}`:m:x),o&&(t.role="link",t["aria-disabled"]=!0),s&&(t["data-status"]="active",t["aria-current"]="page"),t}var Vl=t=>{clearTimeout(t.t),t.t=void 0},Ya=(t,i)=>t?s=>s.defaultPrevented||(t(s),s.defaultPrevented||i(s)):i;function gE(t,i,s){if(s)return;const r=t.maskedLocation??t,o=r.external?r.publicHref:i.history.createHref(r.publicHref)||"/";if(!((r.external||o!==r.publicHref)&&Nv(o,i.protocolAllowlist)))return o}var ls=X.memo(X.forwardRef((t,i)=>{const s=t._asChild||"a",r=fE(t,i,s),o=typeof t.children=="function"?t.children({isActive:r["data-status"]==="active"}):t.children;return X.createElement(s,r,o)}),yE);function yE(t,i){let s=0;for(const r in i)if(s++,t[r]!==i[r]&&(!nb.has(r)||!qn(t[r],i[r],!1,!0)))return!1;for(const r in t)s--;return s===0}var vE=class extends Fv{constructor(t){super(t),this.useMatch=i=>aa({...i,from:this.id}),this.useRouteContext=i=>tb({...i,from:this.id}),this.useSearch=i=>eb({...i,from:this.id}),this.useParams=i=>Wv({...i,from:this.id}),this.useLoaderDeps=i=>Iv({...i,from:this.id}),this.useLoaderData=i=>Jv({...i,from:this.id}),this.useNavigate=()=>No({from:this.fullPath}),this.Link=zo.forwardRef((i,s)=>b.jsx(ls,{ref:s,from:this.fullPath,...i}))}};function sa(t){return new vE(t)}var bE=class extends H1{constructor(t){super(t),this.useMatch=i=>aa({...i,from:this.id}),this.useRouteContext=i=>tb({...i,from:this.id}),this.useSearch=i=>eb({...i,from:this.id}),this.useParams=i=>Wv({...i,from:this.id}),this.useLoaderDeps=i=>Iv({...i,from:this.id}),this.useLoaderData=i=>Jv({...i,from:this.id}),this.useNavigate=()=>No({from:this.fullPath}),this.Link=zo.forwardRef((i,s)=>b.jsx(ls,{ref:s,from:this.fullPath,...i}))}};function SE(t){return new bE(t)}function xE(t){const i=yn(),s=`not-found-${ea(i.stores.location,r=>r.pathname)}-${ea(i.stores.status)}`;return b.jsx(ud,{getResetKey:()=>s,onCatch:(r,o)=>{if(Wa(r))t.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(Wa(r))return t.fallback?.(r);throw r},children:t.children})}function _E(){return b.jsx("p",{children:"Not Found"})}function ib(t,i,s){return i.options.notFoundComponent?b.jsx(i.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?b.jsx(t.options.defaultNotFoundComponent,{...s}):b.jsx(_E,{})}function Ao(t,i){const s=i?.options.pendingComponent??t.options.defaultPendingComponent;return s?b.jsx(s,{}):null}var EE=(t,i)=>t[0]===i[0]&&t[1]===i[1],ab=(t,i,s)=>!i.isRoot||i.options.shellComponent||i.options.wrapInSuspense||s===!1||s==="data-only"||!t.ssr,sb=X.memo(function({routeId:i}){const s=yn(),r=s.stores.getMatchStore(i);return wE(s,ea(r))});function wE(t,i){const s=t.routesById[i.routeId],r=Ao(t,s),o=s.options.errorComponent??t.options.defaultErrorComponent,c=s.options.onCatch??t.options.defaultOnCatch,d=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,h=i.ssr===!1||i.ssr==="data-only",m=ab(t,s,i.ssr)&&(s.options.wrapInSuspense??r??(s.options.errorComponent?.preload||h));let p=b.jsx(OE,{match:i});h&&(p=b.jsx(G1,{fallback:r,children:p})),d&&(p=b.jsx(xE,{fallback:S=>{if(S.routeId??=i.routeId,S.routeId!==i.routeId)throw S;return X.createElement(d,S)},children:p})),o&&(p=b.jsx(ud,{getResetKey:()=>i,errorComponent:o,onCatch:(S,x)=>{if(Wa(S))throw S.routeId??=i.routeId,S;c?.(S,x)},children:p})),m&&(p=b.jsx(X.Suspense,{fallback:r,children:p}));const v=null,y=s.isRoot&&s.options.shellComponent;return y?b.jsx(br.Provider,{value:i.routeId,children:b.jsxs(y,{children:[p,v]})}):b.jsxs(br.Provider,{value:i.routeId,children:[p,v]})}var OE=X.memo(function({match:i}){const s=yn(),r=i.routeId,o=s.routesById[r],c=X.useMemo(()=>{const h=(o.options.remountDeps??s.options.defaultRemountDeps)?.({routeId:r,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return h?JSON.stringify(h):void 0},[r,i.loaderDeps,i._strictParams,i._strictSearch,o.options.remountDeps,s.options.defaultRemountDeps]),d=X.useMemo(()=>{const h=o.options.component??s.options.defaultComponent;return h?b.jsx(h,{},c):b.jsx(rb,{})},[c,o.options.component,s.options.defaultComponent]);if(i.status==="pending"){if(s.ssr&&!ab(s,o,i.ssr))return d;if(s._tx)throw s._tx[5];return Ao(s,o)}if(i.status==="notFound")return ib(s,o,i.error);if(i.status==="error")throw i.error;return d}),rb=X.memo(function(){const i=yn(),s=X.useContext(br);let r,o,c;{const h=i.stores.getMatchStore(s);[r,o]=ea(h,m=>[!!m._notFound,m.error],{compare:EE}),c=ea(i.stores.ids,m=>m[m.indexOf(s)+1])}if(r)return ib(i,i.routesById[s],o);if(!c)return null;const d=b.jsx(sb,{routeId:c});return s===Pa?b.jsx(X.Suspense,{fallback:Ao(i),children:d}):d});function lb(t,i){const s=t[1];t.length=0,s?.(i)}function zE({t}){const i=yn(),s=i._rendered??=[];return i.startTransition=(r,o)=>new Promise(c=>{lb(s,!1),s.push(o,c),t(i),X.startTransition(r)}),Ov(()=>{const r=i.history.subscribe(i.load);i.updateLatestLocation();const o=i.latestLocation,c=i.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(hn(o.publicHref)!==hn(c.publicHref))return i.commitLocation({...c,replace:!0,ignoreBlocker:!0}),r;const d=i.stores.resolvedLocation.get();return d?.href===o.href&&d.state.__TSR_key===o.state.__TSR_key?s.push(i.stores.matches.get(),h=>{h&&i.emit({type:"onRendered",...To(d,d)})}):i._tx||i.load({sync:!0}).catch(console.error),r},[i,i.history]),null}function TE(){const t=yn(),i=t.routesById[Pa],s=Ao(t,i),r=b.jsxs(b.Fragment,{children:[b.jsx(zE,{t:X.useState()[1]}),t.ssr?b.jsx(xy,{}):b.jsx(X.Suspense,{fallback:s,children:b.jsx(xy,{})})]});return t.options.InnerWrap?b.jsx(t.options.InnerWrap,{children:r}):r}function xy(){const t=yn(),i=t._rendered,s=ea(t.stores.matches,d=>i[0]??d),r=s[0],o=r?.routeId;Ov(()=>{i[0]===s&&lb(i,!0)},[i,s]);const c=o?b.jsx(sb,{routeId:o}):null;return t.options.disableGlobalCatchBoundary?c:b.jsx(ud,{getResetKey:()=>r,onCatch:void 0,children:c})}var jE=t=>({createMutableStore:py,createReadonlyStore:py,batch:W1}),NE=t=>new AE(t),AE=class extends w1{constructor(t){super(t,jE)}};function RE({router:t,children:i,...s}){Tv(s)&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const r=b.jsx(Vv.Provider,{value:t,children:i});return t.options.Wrap?b.jsx(t.options.Wrap,{children:r}):r}function CE({router:t,...i}){return b.jsx(RE,{router:t,...i,children:b.jsx(TE,{})})}const ME={sm:20,md:32,lg:48},DE=[{kind:"circle",cx:48,cy:48,r:10},{kind:"path",d:"M52.00 74.70 A27 27 0 1 0 44.00 74.70 L44.00 68.62 A21 21 0 1 1 52.00 68.62 Z"},{kind:"path",d:"M52.00 90.81 A43 43 0 1 0 44.00 90.81 L44.00 84.78 A37 37 0 1 1 52.00 84.78 Z"}];function ob({size:t="md",label:i,className:s=""}){const r=ME[t];return b.jsx("svg",{"data-pattern":"OgygieMark",viewBox:"0 0 96 96",width:r,height:r,fill:"currentColor",className:`shrink-0 ${s}`,...i===void 0?{"aria-hidden":!0}:{role:"img","aria-label":i},children:DE.map(o=>o.kind==="circle"?b.jsx("circle",{cx:o.cx,cy:o.cy,r:o.r},"citadel"):b.jsx("path",{d:o.d},o.d))})}const kE=t=>1-(1-t)**3;function UE(t,i){return t.toLocaleString("fr-FR",{minimumFractionDigits:i,maximumFractionDigits:i})}function LE(){if(typeof window>"u"||typeof getComputedStyle!="function")return 800;const t=Number.parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--duration-count"));return Number.isFinite(t)&&t>0?t:800}function _y(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function ZE(t){const[i,s]=X.useState(()=>typeof window>"u"||typeof window.requestAnimationFrame!="function"||_y()?t:0),r=X.useRef(!1);return X.useEffect(()=>{if(r.current||typeof window.requestAnimationFrame!="function"||_y()){r.current=!0,s(t);return}r.current=!0;const o=LE();let c=null,d=0;const h=m=>{c===null&&(c=m);const p=Math.min(1,(m-c)/o);s(t*kE(p)),p<1&&(d=window.requestAnimationFrame(h))};return d=window.requestAnimationFrame(h),()=>window.cancelAnimationFrame(d)},[t]),i}function cd({value:t,format:i,decimals:s=0,className:r=""}){const o=ZE(t),c=i===void 0?UE(o,s):i(o);return b.jsx("span",{"data-pattern":"Counter","data-value":t,className:`tabular-nums ${r}`,children:c})}function qf(t){const i=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>i.indexOf(+r)===-1).map(([r,o])=>o)}function Ey(t,i="|"){return t.map(s=>mb(s)).join(i)}function Bf(t,i){return typeof i=="bigint"?i.toString():i}class qE{constructor(i){this._getter=i,this._value=void 0}get value(){const i=this._getter;return i!==void 0&&(this._value=i(),this._getter=void 0),this._value}}function fd(t){return new qE(t)}function BE(t){return t==null}function dd(t){const i=t.startsWith("^")?1:0,s=t.endsWith("$")?t.length-1:t.length;return t.slice(i,s)}function HE(t,i){const s=t/i,r=Math.round(s),o=4*Number.EPSILON*Math.max(Math.abs(s),1);return Math.abs(s-r)<o?0:s-r}function zi(t,i,s){Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}function ub(t){const i=Object.getOwnPropertyDescriptor(t,"shape");return i?.get?i.get.raw:i?.value}function $n(t){return ub(t._zod.def)??t._zod.def.shape}function cb(t,i,s){Object.defineProperty(t,i,{get(){const r=s();return zi(this,i,r),r},enumerable:!0,configurable:!0})}function fb(t,i,s){i in t?zi(t,i,s):t[i]=s}function ta(t,i,s,r){const o=$n(i);for(const c of s){const d=Object.getOwnPropertyDescriptor(o,c);d.enumerable&&(d.get?cb(t,c,()=>{const h=i._zod.def.shape[c];return r?r(h,c):h}):fb(t,c,r?r(d.value,c):d.value))}}function $E(t,i){for(const s of Reflect.ownKeys(i)){const r=Object.getOwnPropertyDescriptor(i,s);r.enumerable&&(r.get?cb(t,s,()=>i[s]):fb(t,s,r.value))}}function $t(...t){const i={};for(const s of t){const r=Object.getOwnPropertyDescriptors(s);Object.assign(i,r)}return Object.defineProperties({},i)}function QE(t){return JSON.stringify(t)}function GE(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const db="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function vo(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const KE=fd(()=>{if(ln.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function es(t){if(vo(t)===!1)return!1;const i=t.constructor;if(i===void 0||typeof i!="function")return!0;const s=i.prototype;return!(vo(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function hb(t){return es(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}const YE=new Set(["string","number","symbol"]);function ts(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ti(t,i,s){const r=new t._zod.constr(i??t._zod.def);return(!i||s?.parent)&&(r._zod.parent=t),r}function ie(t){const i=t;if(!i)return{};if(typeof i=="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");i.error=i.message}return delete i.message,typeof i.error=="string"?{...i,error:()=>i.error}:i}function mb(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function FE(t){return Object.keys(t).filter(i=>t[i]._zod.optin!==void 0&&t[i]._zod.optout==="optional")}const pb={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]},VE={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function PE(t,i){const s=t._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return ta(c,t,Ro(t,i)),Ti(t,$t(s,{shape:c,checks:[]}))}function Ro(t,i){const s=$n(t),r=[];for(const o of Reflect.ownKeys(i)){if(!Object.getOwnPropertyDescriptor(s,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);i[o]&&r.push(o)}return r}function XE(t,i){const s=t._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(Ro(t,i)),d={};return ta(d,t,Reflect.ownKeys($n(t)).filter(h=>!c.has(h))),Ti(t,$t(s,{shape:d,checks:[]}))}function JE(t,i){if(!es(i))throw new Error("Invalid input to extend: expected a plain object");const s=t._zod.def.checks;if(s&&s.length>0){const o=$n(t);for(const c of Reflect.ownKeys(i))if(Object.getOwnPropertyDescriptor(o,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ti(t,$t(t._zod.def,{shape:gb(t,i)}))}function gb(t,i){const s={};return ta(s,t,Reflect.ownKeys($n(t))),$E(s,i),s}function IE(t,i){if(!es(i))throw new Error("Invalid input to safeExtend: expected a plain object");return Ti(t,$t(t._zod.def,{shape:gb(t,i)}))}function WE(t,i){if(!i?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const s={};ta(s,t,Reflect.ownKeys($n(t))),ta(s,i,Reflect.ownKeys($n(i)));const r=$t(t._zod.def,{shape:s,get catchall(){return i._zod.def.catchall},checks:i._zod.def.checks??[]});return Ti(t,r)}function wy(t,i,s,r="partial"){const c=i._zod.def.checks;if(c&&c.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const h=s?new Set(Ro(i,s)):void 0,m={};return ta(m,i,Reflect.ownKeys($n(i)),t&&((p,v)=>h&&!h.has(v)?p:new t({type:"optional",innerType:p}))),Ti(i,$t(i._zod.def,{shape:m,checks:[]}))}function ew(t,i,s){const r=s?new Set(Ro(i,s)):void 0,o={};return ta(o,i,Reflect.ownKeys($n(i)),(c,d)=>r&&!r.has(d)?c:new t({type:"nonoptional",innerType:c})),Ti(i,$t(i._zod.def,{shape:o}))}function Ln(t,i=0){if(t.aborted===!0)return!0;for(let s=i;s<t.issues.length;s++)if(t.issues[s]?.continue!==!0)return!0;return!1}function tw(t,i=0){if(t.aborted===!0)return!0;for(let s=i;s<t.issues.length;s++)if(t.issues[s]?.continue===!1)return!0;return!1}function Fa(t,i){return i.map(s=>{var r;return(r=s).path??(r.path=[]),s.path.unshift(t),s})}function rr(t){return typeof t=="string"?t:t?.message}function Oy(t){const i=[];for(const s of t??[]){const r=s._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&i.push([o,s])}return i}function Hf(t,i,s){var r;for(let o=i;o<t.length;o++)(r=t[o]).schema??(r.schema=s)}function _i(t,i,s){var r;const o=t.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=t).schema??(r.schema=t.inst):t.schema=t.inst);const c=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,d=t.message?t.message:rr(t.inst?._zod.def?.error?.(t))??rr(c?.(t))??rr(i?.error?.(t))??rr(s.customError?.(t))??rr(s.localeError?.(t))??"Invalid input",h={};for(const m of Object.keys(t))m==="inst"||m==="schema"||m==="continue"||m==="input"||m==="__proto__"||(h[m]=t[m]);return h.path??(h.path=[]),h.message=d,i?.reportInput&&(h.input=t.input),h}const nw=/[\uD800-\uDBFF]/;function hd(t){const i=t.length;if(!nw.test(t))return i;let s=i;for(let r=0;r<i-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(s--,r++);return s}function md(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function iw(t){const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";const s=t;if(s&&Object.getPrototypeOf(s)!==Object.prototype&&"constructor"in s&&s.constructor)return s.constructor.name}}return i}function Sr(...t){const[i,s,r]=t;return typeof i=="string"?{message:i,code:"custom",input:s,inst:r}:{...i}}function aw(t,i){for(const s in i){const r=Object.getOwnPropertyDescriptor(i,s);r.get?Object.defineProperty(t,s,{...r,enumerable:!1}):sw(t,s,r.value)}}function Ei(t,i,s,r=!0){return Object.defineProperty(t,i,{configurable:!0,writable:!0,enumerable:r,value:s}),s}function yb(t,i,s){return Ei(t,i,s,!1)}function vb(t,i){for(const s in t){const r=t[s];Object.defineProperty(i,s,{configurable:!0,enumerable:!0,get(){return Ei(this,s,r(this))},set(o){Ei(this,s,o)}})}return i}function sw(t,i,s){Object.defineProperty(t,i,{configurable:!0,get(){return this==null?s:Ei(this,i,s.bind(this))},set(r){Ei(this,i,r)}})}function rw(t,i){const s=Object.getPrototypeOf(t);return i in s?void 0:s}let gf,pi=!1;const lw={configurable:!0,get(){pi=!0}};function Ne(t,i,s){const r=Object.getPrototypeOf(t._zod);if(i in r&&gf!==t._zod){gf=void 0;return}gf=t._zod,Object.defineProperty(r,i,{configurable:!0,get(){Object.defineProperty(this,i,lw);const o=pi;pi=!1;try{const c=s(this);return pi?delete this[i]:Object.defineProperty(this,i,{configurable:!0,writable:!0,value:c}),pi=pi||o,c}catch(c){throw delete this[i],pi=pi||o,c}},set(o){Object.defineProperty(this,i,{configurable:!0,writable:!0,value:o})}})}function ow(t,i,s,r){const o=rw(t,i);o&&Object.defineProperty(o,i,{configurable:!0,get(){const c={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,i,c),c.value=s(this),Object.defineProperty(this,i,c),c.value},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:r,value:c})}})}const uw="~constantCatch";function cw(t){const i=()=>t;return i[uw]=!0,i}var zy;const yf={value:void 0,enumerable:!1};let Ty="captureStackTrace"in Error?Error:null;function fw(t){const i=Ty;if(i){const s=i.stackTraceLimit;if(typeof s=="number"){try{i.stackTraceLimit=0}catch{return Ty=null,new t}try{return new t}finally{i.stackTraceLimit=s}}}return new t}function $(t,i,s,r){const o={};function c(S){this.def=S,this.constr=y,this.traits=new Set}c.prototype=o;const d=s,h=d&&new WeakSet;function m(S,x){if(S._zod){if(S._zod.traits.has(t))return}else{yf.value=new c(x);try{Object.defineProperty(S,"_zod",yf)}finally{yf.value=void 0}}if(S._zod.traits.add(t),i(S,x),h){const w=Object.getPrototypeOf(S),z=S._zod.constr.prototype;let R=w;for(;R&&R!==z;)R=Object.getPrototypeOf(R);const q=R??w;h.has(q)||(h.add(q),aw(q,d))}const E=y.prototype;for(const w in E)Object.prototype.hasOwnProperty.call(E,w)&&(w in S||(S[w]=E[w].bind(S)))}const p=r?.Parent??Object;class v extends p{}Object.defineProperty(v,"name",{value:t});function y(S){const x=r?.Parent?fw(v):this;m(x,S);const E=x._zod.deferred;if(E){for(const z of E)z();x._zod.deferred=void 0}const w=globalThis.__zod_globalConfig?.postProcessor;return w&&w(x),x}return Object.defineProperty(y,"init",{value:m}),Object.defineProperty(y,Symbol.hasInstance,{value:S=>r?.Parent&&S instanceof r.Parent?!0:S?._zod?.traits?.has(t)}),Object.defineProperty(y,"name",{value:t}),y}class Ii extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class bb extends Error{constructor(i){super(`Encountered unidirectional transform during encode: ${i}`),this.name="ZodEncodeError"}}(zy=globalThis).__zod_globalConfig??(zy.__zod_globalConfig={});const ln=globalThis.__zod_globalConfig;function pn(t){return t&&Object.assign(ln,t),ln}function dw(){const t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Bf,2)),t.message}function hw(t){this._zod.message=t}const mw={get:dw,set:hw,enumerable:!0,configurable:!0},vf={value:void 0,enumerable:!1},jy=new WeakSet([Object.prototype,Error.prototype]),pw=(t,i)=>{t.name="$ZodError",vf.value=i,Object.defineProperty(t,"issues",vf),vf.value=void 0,Object.defineProperty(t,"message",mw);const s=Object.getPrototypeOf(t);jy.has(s)||(jy.add(s),Object.defineProperty(s,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},gw=$("$ZodError",pw);function yw(t,i,s){return Object.prototype.hasOwnProperty.call(t,i)||(i==="__proto__"?Object.defineProperty(t,i,{value:s(),writable:!0,enumerable:!0,configurable:!0}):t[i]=s()),t[i]}function vw(t,i=s=>s.message){const s={},r=[];for(const o of t.issues)o.path.length>0?yw(s,o.path[0],()=>[]).push(i(o)):r.push(i(o));return{formErrors:r,fieldErrors:s}}function bw(t,i=s=>s.message){const s={_errors:[]},r=(o,c=[])=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h},[...c,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...c,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...c,...d.path]);else{const h=[...c,...d.path];if(h.length===0)s._errors.push(i(d));else{let m=s,p=0;for(;p<h.length;){const v=h[p],y=p===h.length-1;if(v==="_errors"){y&&m._errors.push(i(d)),p++;continue}Object.prototype.hasOwnProperty.call(m,v)||Object.defineProperty(m,v,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const S=m[v];y&&S._errors.push(i(d)),m=S,p++}}}};return r(t),s}function Co(t,i){return{callee:i?.callee??t,Err:i?.Err}}const pd=t=>{const i=(s,r,o,c)=>{const d=o?{...o,async:!1}:{async:!1},h=s._zod.run({value:r,issues:[]},d);if(h instanceof Promise)throw new Ii;if(h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>_i(p,d,pn())));throw db(m,c?.callee??i),m}return h.value};return i},gd=t=>{const i=async(s,r,o,c)=>{const d=o?{...o,async:!0}:{async:!0};let h=s._zod.run({value:r,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>_i(p,d,pn())));throw db(m,c?.callee??i),m}return h.value};return i},yd=t=>(i,s,r)=>{const o=r?{...r,async:!1}:{async:!1},c=i._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Ii;return c.issues.length?Sb(t,c.issues,o):{success:!0,data:c.value}};function Sb(t,i,s){let r;return{success:!1,get error(){return r||(r=new t(i.map(o=>_i(o,s,pn()))),i=void 0,s=void 0),r},set error(o){r=o,i=void 0,s=void 0}}}const vd=t=>async(i,s,r)=>{const o=r?{...r,async:!0}:{async:!0};let c=i._zod.run({value:s,issues:[]},o);return c instanceof Promise&&(c=await c),c.issues.length?Sb(t,c.issues,o):{success:!0,data:c.value}},Sw=Symbol.for("zod.compile.invalid"),xw=Symbol.for("zod.compile.fallback"),_w=((t,i,s)=>{const r=t._zod.bag.validator;if(r!==void 0){if(r(i)!==Sw)return!0;if(r.definite===!0&&s===void 0)return!1}return Ew(t,i,s)});function Ew(t,i,s){const r=s?{...s,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=t._zod.bag.fallbackRun;let c;if(o?(r[xw]=!0,c=o({value:i,issues:[]},r)):c=t._zod.run({value:i,issues:[]},r),c instanceof Promise)throw new Ii;return c.issues.length===0}const ww=async(t,i,s)=>{const r=s?{...s,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=t._zod.run({value:i,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},Ow=t=>{const i=pd(t),s=(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return i(r,o,h,Co(s,d))};return s},zw=t=>{const i=pd(t),s=(r,o,c,d)=>i(r,o,c,Co(s,d));return s},Tw=t=>{const i=gd(t),s=async(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return await i(r,o,h,Co(s,d))};return s},jw=t=>{const i=gd(t),s=async(r,o,c,d)=>await i(r,o,c,Co(s,d));return s},Nw=t=>(i,s,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return yd(t)(i,s,o)},Aw=t=>(i,s,r)=>yd(t)(i,s,r),Rw=t=>async(i,s,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return vd(t)(i,s,o)},Cw=t=>async(i,s,r)=>vd(t)(i,s,r),Mw=/^[cC][0-9a-z]{6,}$/,Dw=/^[0-9a-z]+$/,kw=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Uw=/^[0-9a-vA-V]{20}$/,Lw=/^[A-Za-z0-9]{27}$/,Zw=/^[a-zA-Z0-9_-]{21}$/;function qw(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}const Bw=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hw=/^([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})$/,Ny=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[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)$/,$w=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Qw="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function Gw(){return new RegExp(Qw,"u")}const Kw=/^(?:(?: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])$/,Yw=/^(([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}|:))$/,Fw=/^((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])$/,Vw=/^(([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}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Pw=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Xw=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,Jw=/^https?$/,Iw=/^\+[1-9]\d{6,14}$/,xb="(?:(?:\\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])))";function Ww(t){return new RegExp(`^${t}$`)}const eO=Ww(xb);function $f(t){const i="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${i}`:t.precision===0?`${i}:[0-5]\\d`:`${i}:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?`${i}:[0-5]\\d(?:\\.\\d+)?`:`${i}(?::[0-5]\\d(?:\\.\\d+)?)?`}function tO(t){return new RegExp(`^${$f(t)}$`)}function nO(t){const i=["Z"];t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${$f({precision:t.precision,seconds:!0})}(?:${i.join("|")})`,r=t.local?`${s}|${$f({precision:t.precision})}`:s;return new RegExp(`^${xb}T(?:${r})$`)}const iO=/^[\s\S]{0,}$/,aO=/^-?\d+$/,bd=/^-?\d+(?:\.\d+)?$/,sO=/^(?:true|false)$/i,rO=/^[^A-Z]*$/,lO=/^[^a-z]*$/,At=$("$ZodCheck",(t,i)=>{var s;t._zod??(t._zod={}),t._zod.def=i,(s=t._zod).onattach??(s.onattach=[])}),Sd=t=>{const i=t.value;return!BE(i)&&i.length!==void 0},bo={number:"number",bigint:"bigint",object:"date"},_b=$("$ZodCheckLessThan",(t,i)=>{At.init(t,i);const s=bo[typeof i.value];t._zod.check=r=>{(i.inclusive?r.value<=i.value:r.value<i.value)||r.issues.push({origin:bo[typeof r.value]??s,code:"too_big",maximum:typeof i.value=="object"?i.value.getTime():i.value,input:r.value,inclusive:i.inclusive,inst:t,continue:!i.abort})}}),Eb=$("$ZodCheckGreaterThan",(t,i)=>{At.init(t,i);const s=bo[typeof i.value];t._zod.check=r=>{(i.inclusive?r.value>=i.value:r.value>i.value)||r.issues.push({origin:bo[typeof r.value]??s,code:"too_small",minimum:typeof i.value=="object"?i.value.getTime():i.value,input:r.value,inclusive:i.inclusive,inst:t,continue:!i.abort})}}),oO=$("$ZodCheckMultipleOf",(t,i)=>{At.init(t,i),t._zod.check=s=>{if(typeof s.value!=typeof i.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof s.value=="bigint"?i.value!==BigInt(0)&&s.value%i.value===BigInt(0):HE(s.value,i.value)===0)||s.issues.push({origin:typeof s.value,code:"not_multiple_of",divisor:i.value,input:s.value,inst:t,continue:!i.abort})}}),uO=$("$ZodCheckNumberFormat",(t,i)=>{At.init(t,i),i.format=i.format||"float64";const s=i.format?.includes("int"),r=s?"int":"number",[o,c]=pb[i.format];t._zod.check=d=>{const h=d.value;if(s){if(!Number.isInteger(h)){d.issues.push({expected:r,format:i.format,code:"invalid_type",continue:!1,input:h,inst:t});return}if(!Number.isSafeInteger(h)){h>0?d.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!i.abort}):d.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!i.abort});return}}h<o&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!i.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:t,continue:!i.abort})}}),cO=$("$ZodCheckMaxLength",(t,i)=>{var s;At.init(t,i),(s=t._zod.def).when??(s.when=Sd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>i.maximum?hd(o):c)<=i.maximum)return;const h=md(o);r.issues.push({origin:h,code:"too_big",maximum:i.maximum,inclusive:!0,input:o,inst:t,continue:!i.abort})}}),fO=$("$ZodCheckMinLength",(t,i)=>{var s;At.init(t,i),(s=t._zod.def).when??(s.when=Sd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>=i.minimum&&c<i.minimum*2?hd(o):c)>=i.minimum)return;const h=md(o);r.issues.push({origin:h,code:"too_small",minimum:i.minimum,inclusive:!0,input:o,inst:t,continue:!i.abort})}}),dO=$("$ZodCheckLengthEquals",(t,i)=>{var s;At.init(t,i),(s=t._zod.def).when??(s.when=Sd),t._zod.check=r=>{const o=r.value,c=o.length,d=typeof o=="string"&&c>=i.length&&c<=i.length*2?hd(o):c;if(d===i.length)return;const h=md(o),m=d>i.length;r.issues.push({origin:h,...m?{code:"too_big",maximum:i.length}:{code:"too_small",minimum:i.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!i.abort})}}),Mo=$("$ZodCheckStringFormat",(t,i)=>{var s,r;At.init(t,i),i.pattern?(s=t._zod).check??(s.check=o=>{i.pattern.lastIndex=0,!i.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:i.format,input:o.value,...i.pattern?{pattern:i.pattern.toString()}:{},inst:t,continue:!i.abort})}):(r=t._zod).check??(r.check=()=>{})}),hO=$("$ZodCheckRegex",(t,i)=>{Mo.init(t,i),t._zod.check=s=>{i.pattern.lastIndex=0,!i.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:i.pattern.toString(),inst:t,continue:!i.abort})}}),mO=$("$ZodCheckLowerCase",(t,i)=>{i.pattern??(i.pattern=rO),Mo.init(t,i)}),pO=$("$ZodCheckUpperCase",(t,i)=>{i.pattern??(i.pattern=lO),Mo.init(t,i)}),gO=$("$ZodCheckIncludes",(t,i)=>{At.init(t,i);const s=ts(i.includes),r=new RegExp(typeof i.position=="number"?`^.{${i.position},}${s}`:s);i.pattern=r,t._zod.check=o=>{o.value.includes(i.includes,i.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:i.includes,input:o.value,inst:t,continue:!i.abort})}}),yO=$("$ZodCheckStartsWith",(t,i)=>{At.init(t,i);const s=new RegExp(`^${ts(i.prefix)}.*`);i.pattern??(i.pattern=s),t._zod.check=r=>{r.value.startsWith(i.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:i.prefix,input:r.value,inst:t,continue:!i.abort})}}),vO=$("$ZodCheckEndsWith",(t,i)=>{At.init(t,i);const s=new RegExp(`.*${ts(i.suffix)}$`);i.pattern??(i.pattern=s),t._zod.check=r=>{r.value.endsWith(i.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:i.suffix,input:r.value,inst:t,continue:!i.abort})}}),bO=$("$ZodCheckOverwrite",(t,i)=>{At.init(t,i),t._zod.check=s=>{s.value=i.tx(s.value)}});class SO{constructor(i=[],s={}){this.content=[],this.indent=0,this.args=i,this.closed=s}indented(i){this.indent+=1;try{i(this)}finally{this.indent-=1}}write(i){if(typeof i=="function"){i(this,{execution:"sync"}),i(this,{execution:"async"});return}const r=i.split(`
11
11
  `).filter(d=>d),o=Math.min(...r.map(d=>d.length-d.trimStart().length)),c=r.map(d=>d.slice(o)).map(d=>" ".repeat(this.indent*2)+d);for(const d of c)this.content.push(d)}compile(){const i=Function,s=this?.content??[""];return new i(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
12
12
  ${s.join(`
13
13
  `)}
14
- };`)(...Object.values(this.closed))}}const b2={major:4,minor:6,patch:7},Ge=$("$ZodType",(t,i)=>{var s;t??(t={}),t._zod.def=i,t._zod.bag=t._zod.bag||{},t._zod.version=b2;const r=t._zod.def.checks,o=t._zod.traits.has("$ZodCheck")?[t,...r??[]]:r?.length?[...r]:[];for(const c of o)for(const d of c._zod.onattach)d(t);if(o.length===0)(s=t._zod).deferred??(s.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const c=(h,m,p)=>{if(h.memo)return h;let v=Un(h),g;for(const x of m){if(x._zod.def.when){if(WE(h)||!x._zod.def.when(h))continue}else if(v)continue;const S=h.issues.length,E=x._zod.check(h);if(E instanceof Promise&&p?.async===!1)throw new Ii;if(g||E instanceof Promise)g=(g??Promise.resolve()).then(async()=>{await E,h.issues.length!==S&&(Hf(h.issues,S,t),v||(v=Un(h,S)))});else{if(h.issues.length===S)continue;Hf(h.issues,S,t),v||(v=Un(h,S))}}return g?g.then(()=>h):h},d=(h,m,p)=>{if(Un(h))return h.aborted=!0,h;const v=c(m,o,p);if(v instanceof Promise){if(p.async===!1)throw new Ii;return v.then(g=>t._zod.parse(g,p))}return t._zod.parse(v,p)};t._zod.run=(h,m)=>{if(m.skipChecks)return t._zod.parse(h,m);if(m.direction==="backward"){const v=t._zod.parse({value:h.value,issues:[]},{...m,skipChecks:!0});return v instanceof Promise?v.then(g=>d(g,h,m)):d(v,h,m)}const p=t._zod.parse(h,m);if(p instanceof Promise){if(m.async===!1)throw new Ii;return p.then(v=>c(v,o,m))}return c(p,o,m)}}},{get"~standard"(){return yb(this,"~standard",wb(this))},set"~standard"(t){_i(this,"~standard",t)}}),Ob=(t,i)=>t.issues.length?{issues:t.issues.map(s=>xi(s,i,pn()))}:{value:t.value};async function S2(t,i){const s={async:!0};return Ob(await t._zod.run({value:i,issues:[]},s),s)}function wb(t){return{validate:i=>{const s={async:!1};try{const r=t._zod.run({value:i,issues:[]},s);if(!(r instanceof Promise))return Ob(r,s)}catch{}return S2(t,i)},vendor:"zod",version:1}}const xd=$("$ZodString",(t,i)=>{Ge.init(t,i),t._zod.pattern=i.pattern??t2,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:t}),s}}),$e=$("$ZodStringFormat",(t,i)=>{Co.init(t,i),xd.init(t,i)}),x2=$("$ZodGUID",(t,i)=>{i.pattern??(i.pattern=qO),$e.init(t,i)}),_2=$("$ZodUUID",(t,i)=>{if(i.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if(r===void 0)throw new Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=Ny(r))}else i.pattern??(i.pattern=Ny());$e.init(t,i)}),E2=$("$ZodEmail",(t,i)=>{i.pattern??(i.pattern=BO),$e.init(t,i)}),zb=1,bo=2;function Tb(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function O2(t,i){return!("normalize"in i)&&!("hostname"in i)&&!("protocol"in i)?Tb(t)||bo:w2(t,i)}function w2(t,i){if(!i.normalize&&i.protocol?.source===PO.source&&!/^https?:\/\//i.test(t))return zb;try{if(typeof URL<"u"){const s=URL;if(typeof s.parse=="function")return s.parse(t)??bo}return new URL(t)}catch{return bo}}const z2=/[\t\n\r]/g;function Ay(t){return t.replace(z2,"")}function T2(t,i){return i.lastIndex=0,i.test(t.hostname)}function j2(t,i){return i.lastIndex=0,i.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}const N2=$("$ZodURL",(t,i)=>{$e.init(t,i),t._zod.check=s=>{try{const r=s.value.trim(),o=O2(r,i);if(o===zb){s.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:s.value,inst:t,continue:!i.abort});return}if(o===bo){s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:t,continue:!i.abort});return}if(o===!0){s.value=Ay(r);return}i.hostname&&!T2(o,i.hostname)&&s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:s.value,inst:t,continue:!i.abort}),i.protocol&&!j2(o,i.protocol)&&s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:s.value,inst:t,continue:!i.abort}),s.value=i.normalize?o.href:Ay(r);return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:t,continue:!i.abort})}}}),A2=$("$ZodEmoji",(t,i)=>{i.pattern??(i.pattern=$O()),$e.init(t,i)}),R2=$("$ZodNanoID",(t,i)=>{if(i.length!==void 0&&(!Number.isInteger(i.length)||i.length<1))throw new Error(`Invalid nanoid length: ${i.length}`);i.pattern??(i.pattern=i.length===void 0?UO:LO(i.length)),$e.init(t,i)}),C2=$("$ZodCUID",(t,i)=>{i.pattern??(i.pattern=RO),$e.init(t,i)}),M2=$("$ZodCUID2",(t,i)=>{i.pattern??(i.pattern=CO),$e.init(t,i)}),D2=$("$ZodULID",(t,i)=>{i.pattern??(i.pattern=MO),$e.init(t,i)}),k2=$("$ZodXID",(t,i)=>{i.pattern??(i.pattern=DO),$e.init(t,i)}),U2=$("$ZodKSUID",(t,i)=>{i.pattern??(i.pattern=kO),$e.init(t,i)}),L2=$("$ZodISODateTime",(t,i)=>{i.pattern??(i.pattern=e2(i)),$e.init(t,i)}),Z2=$("$ZodISODate",(t,i)=>{i.pattern??(i.pattern=IO),$e.init(t,i)}),q2=$("$ZodISOTime",(t,i)=>{i.pattern??(i.pattern=WO(i)),$e.init(t,i)}),B2=$("$ZodISODuration",(t,i)=>{i.pattern??(i.pattern=ZO),$e.init(t,i)}),H2=$("$ZodIPv4",(t,i)=>{i.pattern??(i.pattern=QO),$e.init(t,i)}),$2=/^[0-9a-fA-F:.]+$/;function jb(t){return $2.test(t)?Tb(`http://[${t}]`):!1}const Q2=$("$ZodIPv6",(t,i)=>{i.pattern??(i.pattern=GO),$e.init(t,i),t._zod.check=s=>{jb(s.value)||s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:t,continue:!i.abort})}}),G2=$("$ZodCIDRv4",(t,i)=>{i.pattern??(i.pattern=KO),$e.init(t,i)});function K2(t){const i=t.split("/");if(i.length!==2)return!1;const[s,r]=i;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:jb(s)}const Y2=$("$ZodCIDRv6",(t,i)=>{i.pattern??(i.pattern=YO),$e.init(t,i),t._zod.check=s=>{K2(s.value)||s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:t,continue:!i.abort})}});function Nb(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const Ab=/^[0-9a-zA-Z+/]*={0,2}$/,V2=$("$ZodBase64",(t,i)=>{i.pattern??(i.pattern=Ab),$e.init(t,i),t._zod.check=s=>{Nb(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:t,continue:!i.abort})}}),_d=/^[A-Za-z0-9_-]*$/;function F2(t){if(!_d.test(t))return!1;const i=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),s=i.padEnd(Math.ceil(i.length/4)*4,"=");return Nb(s)}const P2=$("$ZodBase64URL",(t,i)=>{i.pattern??(i.pattern=_d),$e.init(t,i),t._zod.check=s=>{F2(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:t,continue:!i.abort})}}),X2=$("$ZodE164",(t,i)=>{i.pattern??(i.pattern=XO),$e.init(t,i)});function J2(t,i=null){try{const s=t.split(".");if(s.length!==3)return!1;const[r]=s;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||i&&(!("alg"in o)||o.alg!==i))}catch{return!1}}const I2=$("$ZodJWT",(t,i)=>{$e.init(t,i),t._zod.check=s=>{J2(s.value,i.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:t,continue:!i.abort})}}),Rb=$("$ZodNumber",(t,i)=>{Ge.init(t,i),t._zod.pattern=bd,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=Number(s.value)}catch{}const o=s.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return s;const c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return s.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...c?{received:c}:{}}),s}}),W2=$("$ZodNumberFormat",(t,i)=>{l2.init(t,i),Rb.init(t,i)}),ew=$("$ZodBoolean",(t,i)=>{Ge.init(t,i),t._zod.pattern=i2,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=!!s.value}catch{}const o=s.value;return typeof o=="boolean"||s.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),s}}),tw=$("$ZodUnknown",(t,i)=>{Ge.init(t,i),t._zod.parse=s=>s}),nw=$("$ZodNever",(t,i)=>{Ge.init(t,i),t._zod.parse=(s,r)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:t}),s)});function iw(t,i){const s=wy(t._zod.def.checks);if(!s.length)return;const r=Math.min(...s.map(c=>c[0])),o=t._zod.parse;t._zod.parse=(c,d)=>{const h=i(c.value);if(h>r&&!d?.skipChecks&&d?.direction!=="backward"){for(const[m,p]of wy(t._zod.def.checks))if(h>m&&p._zod.def.when(c)){const v=c.issues.length;return p._zod.check(c),c.issues[v].continue=!1,Hf(c.issues,v,t),c}}return o(c,d)}}const aw=t=>Array.isArray(t)?t.length:-1;function Ry(t,i,s){t.issues.length&&i.issues.push(...Va(s,t.issues)),i.value[s]=t.value}const sw=$("$ZodArray",(t,i)=>{Ge.init(t,i);const s=ln.memoizer;s?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!Array.isArray(c))return r.issues.push({expected:"array",code:"invalid_type",input:c,inst:t}),r;r.value=s?s.alloc(t,r,Array(c.length),o):Array(c.length);const d=[],h=o?.abortEarly;for(let m=0;m<c.length;m++){const p=c[m],v=i.element._zod.run({value:p,issues:[]},o);if(v instanceof Promise)d.push(v.then(g=>Ry(g,r,m)));else if(Ry(v,r,m),h&&v.issues.length!==0&&Un(v))break}return d.length?Promise.all(d).then(()=>r):r},iw(t,aw)});function So(t,i,s,r,o,c){const d=s in r,h=c==="optional";if(!(!d&&h&&o==="optional")){if(t.issues.length){if(o!==void 0&&h&&!d)return;i.issues.push(...Va(s,t.issues))}if(!d&&o===void 0){t.issues.length||i.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[s]});return}t.value===void 0?(d||o==="defaulted"&&!h)&&(i.value[s]=void 0):i.value[s]=t.value}}const rw=[];function Cb(t){const i=Object.keys(t.shape),s=Object.getOwnPropertySymbols(t.shape),r=s.length?s:rw,o=r.length?[...i,...r]:i;for(const d of o)if(!t.shape?.[d]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const c=KE(t.shape);return{...t,allKeys:o,symbolKeys:r,keySet:new Set(i),numKeys:i.length,optionalKeys:new Set(c)}}function Mb(t,i,s,r,o,c,d){const h=[],m=o.keySet,p=o.catchall._zod,v=p.def.type,g=p.optin,x=p.optout;let S=0;for(const E in i){if(d&&s.issues.length!==S){if(Un(s,S))break;S=s.issues.length}if(m.has(E))continue;if(E==="__proto__"){v==="never"&&h.push(E);continue}if(v==="never"){h.push(E);continue}const O=p.run({value:i[E],issues:[]},r);O instanceof Promise?t.push(O.then(T=>So(T,s,E,i,g,x))):So(O,s,E,i,g,x)}return h.length&&s.issues.push({code:"unrecognized_keys",keys:h,input:i,inst:c,continue:!0}),t.length?Promise.all(t).then(()=>s):s}const lw=$("$ZodObject",(t,i)=>{Ge.init(t,i);const s=Object.getOwnPropertyDescriptor(i,"shape"),r=s?.get?s.get.raw:i.shape??{};if(r){const p=()=>{const v={...r};return Object.defineProperty(i,"shape",{value:v}),p.raw=v,v};p.raw=r,Object.defineProperty(i,"shape",{get:p})}const o=fd(()=>Cb(i));Ne(t,"propValues",p=>{const v=p.def.shape,g={};for(const x in v){const S=v[x]._zod;if(S.values){Object.prototype.hasOwnProperty.call(g,x)||zi(g,x,new Set);for(const E of S.values)g[x].add(E);S.optin!==void 0&&g[x].add(void 0)}}return g});const c=yo,d=i.catchall;let h;const m=ln.memoizer;m?.attach(t),t._zod.parse=(p,v)=>{h??(h=o.value);const g=p.value;if(!c(g))return p.issues.push({expected:"object",code:"invalid_type",input:g,inst:t}),p;p.value=m?m.alloc(t,p,{},v):{};const x=[],S=h.shape,E=v?.abortEarly;let O=p.issues.length;for(const T of h.allKeys){if(E&&p.issues.length!==O){if(Un(p,O))break;O=p.issues.length}if(T==="__proto__")continue;const R=S[T],q=R._zod.optin,G=R._zod.optout,K=R._zod.run({value:g[T],issues:[]},v);K instanceof Promise?x.push(K.then(P=>So(P,p,T,g,q,G))):So(K,p,T,g,q,G)}return d?Mb(x,g,p,v,o.value,t,E===!0):x.length?Promise.all(x).then(()=>p):p}}),ow=$("$ZodObjectJIT",(t,i)=>{lw.init(t,i);const s=t._zod.parse,r=fd(()=>Cb(i)),o=ln.memoizer,c=S=>{const E=r.value,O=E.symbolKeys,T=new v2(["payload","ctx"],{shape:S,inst:t,memo:o,syms:O}),R=P=>`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`,q=(P,C)=>`
14
+ };`)(...Object.values(this.closed))}}const xO={major:4,minor:6,patch:7},Ge=$("$ZodType",(t,i)=>{var s;t??(t={}),t._zod.def=i,t._zod.bag=t._zod.bag||{},t._zod.version=xO;const r=t._zod.def.checks,o=t._zod.traits.has("$ZodCheck")?[t,...r??[]]:r?.length?[...r]:[];for(const c of o)for(const d of c._zod.onattach)d(t);if(o.length===0)(s=t._zod).deferred??(s.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const c=(h,m,p)=>{if(h.memo)return h;let v=Ln(h),y;for(const S of m){if(S._zod.def.when){if(tw(h)||!S._zod.def.when(h))continue}else if(v)continue;const x=h.issues.length,E=S._zod.check(h);if(E instanceof Promise&&p?.async===!1)throw new Ii;if(y||E instanceof Promise)y=(y??Promise.resolve()).then(async()=>{await E,h.issues.length!==x&&(Hf(h.issues,x,t),v||(v=Ln(h,x)))});else{if(h.issues.length===x)continue;Hf(h.issues,x,t),v||(v=Ln(h,x))}}return y?y.then(()=>h):h},d=(h,m,p)=>{if(Ln(h))return h.aborted=!0,h;const v=c(m,o,p);if(v instanceof Promise){if(p.async===!1)throw new Ii;return v.then(y=>t._zod.parse(y,p))}return t._zod.parse(v,p)};t._zod.run=(h,m)=>{if(m.skipChecks)return t._zod.parse(h,m);if(m.direction==="backward"){const v=t._zod.parse({value:h.value,issues:[]},{...m,skipChecks:!0});return v instanceof Promise?v.then(y=>d(y,h,m)):d(v,h,m)}const p=t._zod.parse(h,m);if(p instanceof Promise){if(m.async===!1)throw new Ii;return p.then(v=>c(v,o,m))}return c(p,o,m)}}},{get"~standard"(){return yb(this,"~standard",Ob(this))},set"~standard"(t){Ei(this,"~standard",t)}}),wb=(t,i)=>t.issues.length?{issues:t.issues.map(s=>_i(s,i,pn()))}:{value:t.value};async function _O(t,i){const s={async:!0};return wb(await t._zod.run({value:i,issues:[]},s),s)}function Ob(t){return{validate:i=>{const s={async:!1};try{const r=t._zod.run({value:i,issues:[]},s);if(!(r instanceof Promise))return wb(r,s)}catch{}return _O(t,i)},vendor:"zod",version:1}}const xd=$("$ZodString",(t,i)=>{Ge.init(t,i),t._zod.pattern=i.pattern??iO,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:t}),s}}),$e=$("$ZodStringFormat",(t,i)=>{Mo.init(t,i),xd.init(t,i)}),EO=$("$ZodGUID",(t,i)=>{i.pattern??(i.pattern=Hw),$e.init(t,i)}),wO=$("$ZodUUID",(t,i)=>{if(i.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if(r===void 0)throw new Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=Ny(r))}else i.pattern??(i.pattern=Ny());$e.init(t,i)}),OO=$("$ZodEmail",(t,i)=>{i.pattern??(i.pattern=$w),$e.init(t,i)}),zb=1,So=2;function Tb(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function zO(t,i){return!("normalize"in i)&&!("hostname"in i)&&!("protocol"in i)?Tb(t)||So:TO(t,i)}function TO(t,i){if(!i.normalize&&i.protocol?.source===Jw.source&&!/^https?:\/\//i.test(t))return zb;try{if(typeof URL<"u"){const s=URL;if(typeof s.parse=="function")return s.parse(t)??So}return new URL(t)}catch{return So}}const jO=/[\t\n\r]/g;function Ay(t){return t.replace(jO,"")}function NO(t,i){return i.lastIndex=0,i.test(t.hostname)}function AO(t,i){return i.lastIndex=0,i.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}const RO=$("$ZodURL",(t,i)=>{$e.init(t,i),t._zod.check=s=>{try{const r=s.value.trim(),o=zO(r,i);if(o===zb){s.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:s.value,inst:t,continue:!i.abort});return}if(o===So){s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:t,continue:!i.abort});return}if(o===!0){s.value=Ay(r);return}i.hostname&&!NO(o,i.hostname)&&s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:s.value,inst:t,continue:!i.abort}),i.protocol&&!AO(o,i.protocol)&&s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:s.value,inst:t,continue:!i.abort}),s.value=i.normalize?o.href:Ay(r);return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:t,continue:!i.abort})}}}),CO=$("$ZodEmoji",(t,i)=>{i.pattern??(i.pattern=Gw()),$e.init(t,i)}),MO=$("$ZodNanoID",(t,i)=>{if(i.length!==void 0&&(!Number.isInteger(i.length)||i.length<1))throw new Error(`Invalid nanoid length: ${i.length}`);i.pattern??(i.pattern=i.length===void 0?Zw:qw(i.length)),$e.init(t,i)}),DO=$("$ZodCUID",(t,i)=>{i.pattern??(i.pattern=Mw),$e.init(t,i)}),kO=$("$ZodCUID2",(t,i)=>{i.pattern??(i.pattern=Dw),$e.init(t,i)}),UO=$("$ZodULID",(t,i)=>{i.pattern??(i.pattern=kw),$e.init(t,i)}),LO=$("$ZodXID",(t,i)=>{i.pattern??(i.pattern=Uw),$e.init(t,i)}),ZO=$("$ZodKSUID",(t,i)=>{i.pattern??(i.pattern=Lw),$e.init(t,i)}),qO=$("$ZodISODateTime",(t,i)=>{i.pattern??(i.pattern=nO(i)),$e.init(t,i)}),BO=$("$ZodISODate",(t,i)=>{i.pattern??(i.pattern=eO),$e.init(t,i)}),HO=$("$ZodISOTime",(t,i)=>{i.pattern??(i.pattern=tO(i)),$e.init(t,i)}),$O=$("$ZodISODuration",(t,i)=>{i.pattern??(i.pattern=Bw),$e.init(t,i)}),QO=$("$ZodIPv4",(t,i)=>{i.pattern??(i.pattern=Kw),$e.init(t,i)}),GO=/^[0-9a-fA-F:.]+$/;function jb(t){return GO.test(t)?Tb(`http://[${t}]`):!1}const KO=$("$ZodIPv6",(t,i)=>{i.pattern??(i.pattern=Yw),$e.init(t,i),t._zod.check=s=>{jb(s.value)||s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:t,continue:!i.abort})}}),YO=$("$ZodCIDRv4",(t,i)=>{i.pattern??(i.pattern=Fw),$e.init(t,i)});function FO(t){const i=t.split("/");if(i.length!==2)return!1;const[s,r]=i;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:jb(s)}const VO=$("$ZodCIDRv6",(t,i)=>{i.pattern??(i.pattern=Vw),$e.init(t,i),t._zod.check=s=>{FO(s.value)||s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:t,continue:!i.abort})}});function Nb(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const Ab=/^[0-9a-zA-Z+/]*={0,2}$/,PO=$("$ZodBase64",(t,i)=>{i.pattern??(i.pattern=Ab),$e.init(t,i),t._zod.check=s=>{Nb(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:t,continue:!i.abort})}}),_d=/^[A-Za-z0-9_-]*$/;function XO(t){if(!_d.test(t))return!1;const i=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),s=i.padEnd(Math.ceil(i.length/4)*4,"=");return Nb(s)}const JO=$("$ZodBase64URL",(t,i)=>{i.pattern??(i.pattern=_d),$e.init(t,i),t._zod.check=s=>{XO(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:t,continue:!i.abort})}}),IO=$("$ZodE164",(t,i)=>{i.pattern??(i.pattern=Iw),$e.init(t,i)});function WO(t,i=null){try{const s=t.split(".");if(s.length!==3)return!1;const[r]=s;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||i&&(!("alg"in o)||o.alg!==i))}catch{return!1}}const e2=$("$ZodJWT",(t,i)=>{$e.init(t,i),t._zod.check=s=>{WO(s.value,i.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:t,continue:!i.abort})}}),Rb=$("$ZodNumber",(t,i)=>{Ge.init(t,i),t._zod.pattern=bd,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=Number(s.value)}catch{}const o=s.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return s;const c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return s.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...c?{received:c}:{}}),s}}),t2=$("$ZodNumberFormat",(t,i)=>{uO.init(t,i),Rb.init(t,i)}),n2=$("$ZodBoolean",(t,i)=>{Ge.init(t,i),t._zod.pattern=sO,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=!!s.value}catch{}const o=s.value;return typeof o=="boolean"||s.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),s}}),i2=$("$ZodUnknown",(t,i)=>{Ge.init(t,i),t._zod.parse=s=>s}),a2=$("$ZodNever",(t,i)=>{Ge.init(t,i),t._zod.parse=(s,r)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:t}),s)});function s2(t,i){const s=Oy(t._zod.def.checks);if(!s.length)return;const r=Math.min(...s.map(c=>c[0])),o=t._zod.parse;t._zod.parse=(c,d)=>{const h=i(c.value);if(h>r&&!d?.skipChecks&&d?.direction!=="backward"){for(const[m,p]of Oy(t._zod.def.checks))if(h>m&&p._zod.def.when(c)){const v=c.issues.length;return p._zod.check(c),c.issues[v].continue=!1,Hf(c.issues,v,t),c}}return o(c,d)}}const r2=t=>Array.isArray(t)?t.length:-1;function Ry(t,i,s){t.issues.length&&i.issues.push(...Fa(s,t.issues)),i.value[s]=t.value}const l2=$("$ZodArray",(t,i)=>{Ge.init(t,i);const s=ln.memoizer;s?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!Array.isArray(c))return r.issues.push({expected:"array",code:"invalid_type",input:c,inst:t}),r;r.value=s?s.alloc(t,r,Array(c.length),o):Array(c.length);const d=[],h=o?.abortEarly;for(let m=0;m<c.length;m++){const p=c[m],v=i.element._zod.run({value:p,issues:[]},o);if(v instanceof Promise)d.push(v.then(y=>Ry(y,r,m)));else if(Ry(v,r,m),h&&v.issues.length!==0&&Ln(v))break}return d.length?Promise.all(d).then(()=>r):r},s2(t,r2)});function xo(t,i,s,r,o,c){const d=s in r,h=c==="optional";if(!(!d&&h&&o==="optional")){if(t.issues.length){if(o!==void 0&&h&&!d)return;i.issues.push(...Fa(s,t.issues))}if(!d&&o===void 0){t.issues.length||i.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[s]});return}t.value===void 0?(d||o==="defaulted"&&!h)&&(i.value[s]=void 0):i.value[s]=t.value}}const o2=[];function Cb(t){const i=Object.keys(t.shape),s=Object.getOwnPropertySymbols(t.shape),r=s.length?s:o2,o=r.length?[...i,...r]:i;for(const d of o)if(!t.shape?.[d]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const c=FE(t.shape);return{...t,allKeys:o,symbolKeys:r,keySet:new Set(i),numKeys:i.length,optionalKeys:new Set(c)}}function Mb(t,i,s,r,o,c,d){const h=[],m=o.keySet,p=o.catchall._zod,v=p.def.type,y=p.optin,S=p.optout;let x=0;for(const E in i){if(d&&s.issues.length!==x){if(Ln(s,x))break;x=s.issues.length}if(m.has(E))continue;if(E==="__proto__"){v==="never"&&h.push(E);continue}if(v==="never"){h.push(E);continue}const w=p.run({value:i[E],issues:[]},r);w instanceof Promise?t.push(w.then(z=>xo(z,s,E,i,y,S))):xo(w,s,E,i,y,S)}return h.length&&s.issues.push({code:"unrecognized_keys",keys:h,input:i,inst:c,continue:!0}),t.length?Promise.all(t).then(()=>s):s}const u2=$("$ZodObject",(t,i)=>{Ge.init(t,i);const s=Object.getOwnPropertyDescriptor(i,"shape"),r=s?.get?s.get.raw:i.shape??{};if(r){const p=()=>{const v={...r};return Object.defineProperty(i,"shape",{value:v}),p.raw=v,v};p.raw=r,Object.defineProperty(i,"shape",{get:p})}const o=fd(()=>Cb(i));Ne(t,"propValues",p=>{const v=p.def.shape,y={};for(const S in v){const x=v[S]._zod;if(x.values){Object.prototype.hasOwnProperty.call(y,S)||zi(y,S,new Set);for(const E of x.values)y[S].add(E);x.optin!==void 0&&y[S].add(void 0)}}return y});const c=vo,d=i.catchall;let h;const m=ln.memoizer;m?.attach(t),t._zod.parse=(p,v)=>{h??(h=o.value);const y=p.value;if(!c(y))return p.issues.push({expected:"object",code:"invalid_type",input:y,inst:t}),p;p.value=m?m.alloc(t,p,{},v):{};const S=[],x=h.shape,E=v?.abortEarly;let w=p.issues.length;for(const z of h.allKeys){if(E&&p.issues.length!==w){if(Ln(p,w))break;w=p.issues.length}if(z==="__proto__")continue;const R=x[z],q=R._zod.optin,G=R._zod.optout,K=R._zod.run({value:y[z],issues:[]},v);K instanceof Promise?S.push(K.then(P=>xo(P,p,z,y,q,G))):xo(K,p,z,y,q,G)}return d?Mb(S,y,p,v,o.value,t,E===!0):S.length?Promise.all(S).then(()=>p):p}}),c2=$("$ZodObjectJIT",(t,i)=>{u2.init(t,i);const s=t._zod.parse,r=fd(()=>Cb(i)),o=ln.memoizer,c=x=>{const E=r.value,w=E.symbolKeys,z=new SO(["payload","ctx"],{shape:x,inst:t,memo:o,syms:w}),R=P=>`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`,q=(P,C)=>`
15
15
  let ${P}_ab = false;
16
16
  for (let i = 0; i < ${P}.issues.length; i++) {
17
17
  const iss = ${P}.issues[i];
@@ -22,8 +22,8 @@ ${s.join(`
22
22
  if (${P}_ab && ctx && ctx.abortEarly) {
23
23
  payload.value = newResult;
24
24
  return payload;
25
- }`;T.write("const input = payload.value;");const G=Object.create(null);let K=0;for(const P of E.allKeys)G[P]=`key_${K++}`;T.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const P of E.allKeys){if(P==="__proto__")continue;const C=G[P],N=typeof P=="symbol"?`syms[${O.indexOf(P)}]`:HE(P),V=`${N} in input`,se=S[P],le=se?._zod?.optin,ue=le!==void 0,ne=se?._zod?.optout==="optional";if(T.write(`const ${C} = ${R(N)};`),ue&&ne){const he=le==="optional"?`${C}_present`:`${C}.value !== undefined || ${C}_present`;T.write(`
26
- const ${C}_present = ${V};
25
+ }`;z.write("const input = payload.value;");const G=Object.create(null);let K=0;for(const P of E.allKeys)G[P]=`key_${K++}`;z.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const P of E.allKeys){if(P==="__proto__")continue;const C=G[P],N=typeof P=="symbol"?`syms[${w.indexOf(P)}]`:QE(P),F=`${N} in input`,re=x[P],le=re?._zod?.optin,ue=le!==void 0,ne=re?._zod?.optout==="optional";if(z.write(`const ${C} = ${R(N)};`),ue&&ne){const he=le==="optional"?`${C}_present`:`${C}.value !== undefined || ${C}_present`;z.write(`
26
+ const ${C}_present = ${F};
27
27
  if (!${C}.issues.length || ${C}_present) {
28
28
  if (${C}.issues.length) {${q(C,N)}
29
29
  }
@@ -33,15 +33,15 @@ ${s.join(`
33
33
  }
34
34
  }
35
35
 
36
- `)}else ue?(T.write(`
36
+ `)}else ue?(z.write(`
37
37
  if (${C}.issues.length) {${q(C,N)}
38
38
  }
39
- `),le==="defaulted"?T.write(`newResult[${N}] = ${C}.value;`):T.write(`
40
- if (${C}.value !== undefined || ${V}) {
39
+ `),le==="defaulted"?z.write(`newResult[${N}] = ${C}.value;`):z.write(`
40
+ if (${C}.value !== undefined || ${F}) {
41
41
  newResult[${N}] = ${C}.value;
42
42
  }
43
- `)):T.write(`
44
- const ${C}_present = ${V};
43
+ `)):z.write(`
44
+ const ${C}_present = ${F};
45
45
  if (${C}.issues.length) {${q(C,N)}
46
46
  }
47
47
  if (!${C}_present && !${C}.issues.length) {
@@ -61,15 +61,15 @@ ${s.join(`
61
61
  newResult[${N}] = ${C}.value;
62
62
  }
63
63
 
64
- `)}return T.write("payload.value = newResult;"),T.write("return payload;"),T.compile()};let d;const h=yo,m=!ln.jitless,v=m&&QE.value,g=i.catchall;let x;t._zod.parse=(S,E)=>{x??(x=r.value);const O=S.value;return h(O)?m&&v&&E?.async===!1&&E.jitless!==!0?(d||(d=c(i.shape)),S=d(S,E),g?Mb([],O,S,E,x,t,E?.abortEarly===!0):S):s(S,E):(S.issues.push({expected:"object",code:"invalid_type",input:O,inst:t}),S)}});function Cy(t,i,s,r){for(const c of t)if(c.issues.length===0)return i.value=c.value,i;const o=t.filter(c=>!Un(c));return o.length===1?(i.value=o[0].value,o[0]):(i.issues.push({code:"invalid_union",input:i.value,inst:s,errors:t.map(c=>c.issues.map(d=>xi(d,r,pn())))}),i)}const uw=$("$ZodUnion",(t,i)=>{Ge.init(t,i),Ne(t,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Ne(t,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ne(t,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),Ne(t,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(c=>c._zod.pattern);return new RegExp(`^(${o.map(c=>dd(c.source)).join("|")})$`)}});const s=i.options.length===1?i.options[0]._zod.run:null;t._zod.parse=(r,o)=>{if(s)return s(r,o);let c=!1;const d=[];for(const h of i.options){const m=h._zod.run({value:r.value,issues:[]},o);if(m instanceof Promise)d.push(m),c=!0;else{if(m.issues.length===0)return m;d.push(m)}}return c?Promise.all(d).then(h=>Cy(h,r,t,o)):Cy(d,r,t,o)}}),cw=$("$ZodIntersection",(t,i)=>{Ge.init(t,i),t._zod.parse=(s,r)=>{const o=s.value,c=i.left._zod.run({value:o,issues:[]},r),d=i.right._zod.run({value:o,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([m,p])=>My(s,m,p)):My(s,c,d)}});function Qf(t,i){if(t===i)return{valid:!0,data:t};if(t instanceof Date&&i instanceof Date&&+t==+i)return{valid:!0,data:t};if(es(t)&&es(i)){const s=Object.keys(i),r=Object.keys(t).filter(c=>s.indexOf(c)!==-1),o={...t,...i};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const c of r){if(c==="__proto__")continue;const d=Qf(t[c],i[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};o[c]=d.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return{valid:!1,mergeErrorPath:[]};const s=[];for(let r=0;r<t.length;r++){const o=t[r],c=i[r],d=Qf(o,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};s.push(d.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function My(t,i,s){const r=new Map;let o;const c=new Map,d=(p,v)=>{let g;if(p.code==="unrecognized_keys"&&!p.path?.length)o??(o=p),g=p.keys;else if(p.code==="invalid_key"&&p.origin==="record"&&p.path?.length===1){const x=String(p.path[0]);c.has(x)||c.set(x,p),g=[x]}else return!1;for(const x of g)r.has(x)||r.set(x,{}),r.get(x)[v]=!0;return!0};for(const p of i.issues)d(p,"l")||t.issues.push(p);for(const p of s.issues)d(p,"r")||t.issues.push(p);const h=[...r].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(h.length){const p=o?h.filter(v=>o.keys.includes(v)):[];p.length&&t.issues.push({...o,keys:p});for(const v of h)!p.includes(v)&&c.has(v)&&t.issues.push(c.get(v))}const m=Qf(i.value,s.value);if(!m.valid){if(Un(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`)}return t.value=m.data,t}const fw=$("$ZodRecord",(t,i)=>{Ge.init(t,i);const s=ln.memoizer;s?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!es(c))return r.issues.push({expected:"record",code:"invalid_type",input:c,inst:t}),r;const d=[],h=i.keyType._zod.values;if(h&&!i.partial){r.value=s?s.alloc(t,r,{},o):{};const m=new Set;for(const v of h)if(typeof v=="string"||typeof v=="number"||typeof v=="symbol"){if(m.add(typeof v=="number"?v.toString():v),v==="__proto__")continue;const g=i.keyType._zod.run({value:v,issues:[]},o);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(g.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(E=>xi(E,o,pn())),input:v,path:[v],inst:t});continue}const x=g.value;if(x==="__proto__")continue;const S=i.valueType._zod.run({value:c[v],issues:[]},o);S instanceof Promise?d.push(S.then(E=>{E.issues.length&&r.issues.push(...Va(v,E.issues)),r.value[x]=E.value})):(S.issues.length&&r.issues.push(...Va(v,S.issues)),r.value[x]=S.value)}let p;for(const v in c)if(!m.has(v))if(i.mode==="loose"){if(v==="__proto__")continue;r.value[v]=c[v]}else p=p??[],p.push(v);p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:p,continue:!0})}else{r.value=s?s.alloc(t,r,{},o):{};let m;for(const p of Reflect.ownKeys(c)){if(p==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,p))continue;let v=i.keyType._zod.run({value:p,issues:[]},o);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&bd.test(p)&&v.issues.length){const E=i.keyType._zod.run({value:Number(p),issues:[]},o);if(E instanceof Promise)throw new Error("Async schemas not supported in object keys currently");E.issues.length===0&&(v=E)}if(v.issues.length){i.mode==="loose"?r.value[p]=c[p]:h?(m=m??[],m.push(p)):r.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(E=>xi(E,o,pn())),input:p,path:[p],inst:t});continue}const x=v.value;if(x==="__proto__")continue;const S=i.valueType._zod.run({value:c[p],issues:[]},o);S instanceof Promise?d.push(S.then(E=>{E.issues.length&&r.issues.push(...Va(p,E.issues)),r.value[x]=E.value})):(S.issues.length&&r.issues.push(...Va(p,S.issues)),r.value[x]=S.value)}m&&m.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:m,continue:!0})}return d.length?Promise.all(d).then(()=>r):r}}),dw=$("$ZodEnum",(t,i)=>{Ge.init(t,i);const s=qf(i.entries),r=new Set(s);t._zod.values=r,Ne(t,"pattern",o=>{const c=qf(o.def.entries).filter(d=>GE.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>ts(d.toString())).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(o,c)=>{const d=o.value;return r.has(d)||o.issues.push({code:"invalid_value",values:s,input:d,inst:t}),o}}),hw=$("$ZodLiteral",(t,i)=>{Ge.init(t,i);const s=new Set(i.values);t._zod.values=s,Ne(t,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(c=>typeof c=="string"?ts(c):c?ts(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{const c=r.value;return s.has(c)||r.issues.push({code:"invalid_value",values:i.values,input:c,inst:t}),r}}),mw=$("$ZodTransform",(t,i)=>{Ge.init(t,i),t._zod.optin="optional",ln.memoizer?.guard(t),t._zod.parse=(s,r)=>{if(r.direction==="backward")throw new bb(t.constructor.name);const o=i.transform(s.value,s);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(s.value=d,s));if(o instanceof Promise)throw new Ii;return s.value=o,s}});function Dy(t,i){return t.value=i.issues.length?void 0:i.value,t}const Db=$("$ZodOptional",(t,i)=>{Ge.init(t,i),Ne(t,"optin",s=>s.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",Ne(t,"values",s=>{const r=s.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),Ne(t,"pattern",s=>{const r=s.def.innerType._zod.pattern;return r?new RegExp(`^(${dd(r.source)})?$`):void 0}),t._zod.parse=(s,r)=>{if(s.value===void 0){if(i.innerType._zod.optin!=="defaulted")return s;const o=i.innerType._zod.run({value:s.value,issues:[]},r);return o instanceof Promise?o.then(c=>Dy(s,c)):Dy(s,o)}return i.innerType._zod.run(s,r)}}),pw=$("$ZodExactOptional",(t,i)=>{Db.init(t,i),Ne(t,"values",s=>s.def.innerType._zod.values),Ne(t,"pattern",s=>s.def.innerType._zod.pattern),t._zod.parse=(s,r)=>i.innerType._zod.run(s,r)}),gw=$("$ZodNullable",(t,i)=>{Ge.init(t,i),Ne(t,"optin",s=>s.def.innerType._zod.optin),Ne(t,"optout",s=>s.def.innerType._zod.optout),Ne(t,"pattern",s=>{const r=s.def.innerType._zod.pattern;return r?new RegExp(`^(${dd(r.source)}|null)$`):void 0}),Ne(t,"values",s=>s.def.innerType._zod.values?new Set([...s.def.innerType._zod.values,null]):void 0),t._zod.parse=(s,r)=>s.value===null?s:i.innerType._zod.run(s,r)}),yw=$("$ZodDefault",(t,i)=>{Ge.init(t,i),t._zod.optin="defaulted",Ne(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);if(s.value===void 0)return s.value=i.defaultValue,s;const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(c=>ky(c,i)):ky(o,i)}});function ky(t,i){return t.value===void 0&&(t.value=i.defaultValue),t}const vw=$("$ZodPrefault",(t,i)=>{Ge.init(t,i),t._zod.optin="defaulted",Ne(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>(r.direction==="backward"||s.value===void 0&&(s.value=i.defaultValue),i.innerType._zod.run(s,r))}),bw=$("$ZodNonOptional",(t,i)=>{Ge.init(t,i),Ne(t,"values",s=>{const r=s.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(s,r)=>{const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(c=>Uy(c,t)):Uy(o,t)}});function Uy(t,i){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:i}),t}function Ly(t,i,s,r){return i.issues.length?(t.value=s.catchValue({...i,value:t.value,error:{issues:i.issues.map(o=>xi(o,r,pn()))},input:t.value}),t):(t.value=i.value,i.memo&&(t.memo=!0),t)}const Sw=$("$ZodCatch",(t,i)=>{Ge.init(t,i),Ne(t,"optin",s=>s.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ne(t,"optout",s=>s.def.innerType._zod.optout),Ne(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);const o=i.innerType._zod.run({value:s.value,issues:[]},r);return o instanceof Promise?o.then(c=>Ly(s,c,i,r)):Ly(s,o,i,r)}}),xw=$("$ZodPipe",(t,i)=>{Ge.init(t,i),Ne(t,"values",s=>s.def.in._zod.values),Ne(t,"optin",s=>s.def.in._zod.optin),Ne(t,"optout",s=>s.def.out._zod.optout),Ne(t,"propValues",s=>s.def.in._zod.propValues),t._zod.parse=(s,r)=>{if(r.direction==="backward"){const c=i.out._zod.run(s,r);return c instanceof Promise?c.then(d=>Fl(d,i.in,r)):Fl(c,i.in,r)}const o=i.in._zod.run(s,r);return o instanceof Promise?o.then(c=>Fl(c,i.out,r)):Fl(o,i.out,r)}});function Fl(t,i,s){return t.issues.some(r=>r.code!=="unrecognized_keys")?(t.aborted=!0,t):i._zod.run({value:t.value,issues:t.issues},s)}const _w=$("$ZodReadonly",(t,i)=>{Ge.init(t,i),Ne(t,"propValues",s=>s.def.innerType._zod.propValues),Ne(t,"values",s=>s.def.innerType._zod.values),Ne(t,"optin",s=>s.def.innerType?._zod?.optin),Ne(t,"optout",s=>s.def.innerType?._zod?.optout),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(Zy):Zy(o)}});function Zy(t){return t.memo||(t.value=Object.freeze(t.value)),t}const Ew=$("$ZodCustom",(t,i)=>{At.init(t,i),Ge.init(t,i),t._zod.parse=(s,r)=>s,t._zod.check=s=>{const r=s.value,o=i.fn(r);if(o instanceof Promise)return o.then(c=>qy(c,s,r,t));qy(o,s,r,t)}});function qy(t,i,s,r){if(!t){const o={code:"custom",input:s,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),i.issues.push(br(o))}}class Ow extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Gf="~memo",By=[];function kb(t){return t!==null&&typeof t=="object"}function bf(t){return t.map(i=>i.path?{...i,path:i.path.slice()}:{...i})}const Ub=new WeakMap,or=0,ro=1,fr=2;function lo(t,i,s){const r=Ub.get(t);if(r!==void 0)return r?fr:or;if(i.has(t))return fr;i.add(t);let o=or;const c=v=>{if(o!==fr&&v?._zod){const g=lo(v,i);g>o&&(o=g)}},d=(v,g)=>{let x=or;for(const S of Reflect.ownKeys(v)){const E=Object.getOwnPropertyDescriptor(v,S);if(!E.enumerable)continue;const O=E.get?ro:E.value?._zod?lo(E.value,i):or;O>x&&(x=O)}return x},h=v=>{v>o&&(o=v)},m=t._zod.def;switch(m.type){case"object":{const v=ub(m);h(v?d(v):ro),c(m.catchall);break}case"array":c(m.element);break;case"tuple":for(const v of m.items)c(v);c(m.rest);break;case"record":case"map":c(m.keyType),c(m.valueType);break;case"set":c(m.valueType);break;case"union":for(const v of m.options)c(v);break;case"intersection":c(m.left),c(m.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":c(m.innerType);break;case"pipe":c(m.in),c(m.out);break;case"function":c(m.input),c(m.output);break;case"lazy":{const v=m._cachedInner??void 0;h(v?lo(v,i):ro);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const v in m){const g=Object.getOwnPropertyDescriptor(m,v);if(!g||g.get)continue;const x=g.value;if(!(!x||typeof x!="object")){if(x._zod)c(x);else if(Array.isArray(x))for(const S of x)c(S)}}}return i.delete(t),ww(t,o)}function ww(t,i){return i!==ro&&Ub.set(t,i===fr),i}function zw(t,i){let s=t.buckets.get(i);return s||(s=new WeakMap,t.buckets.set(i,s)),s}let Pl;const Xl=[],Tw={alloc(t,i,s){const r=Pl;if(!r)return s;Pl=void 0;const o={value:s,issues:null};return r.set(i.value,o),Xl.push(o),s},guard(t){var i;(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred.push(()=>{const s=t._zod.parse,r=(o,c)=>{if(c.direction!=="backward"&&Nw(c,o.value))throw new Ow;return s(o,c)};t._zod.parse=r,t._zod.run===s&&(t._zod.run=r)})},attach(t){var i;let s,r=!1,o,c;(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred.push(()=>{const d=t._zod.parse,h=(m,p)=>{if(s===void 0){const R=lo(t,new Set);if(R===or)return t._zod.parse=d,t._zod.run===h&&(t._zod.run=d),d(m,p);R===fr||r?s=!0:r=!0}const v=m.value;if(!kb(v))return d(m,p);let g=p[Gf];g||(g={buckets:new WeakMap,backEdges:void 0},p[Gf]=g);let x;o===p?x=c:(x=zw(g,t),o=p,c=x);const S=x.get(v);if(S)return m.value=S.value,S.issues?S.issues.length&&m.issues.push(...bf(S.issues)):(m.memo=!0,g.backEdges??(g.backEdges=new WeakSet),g.backEdges.add(S.value)),m;Pl=x;const E=Xl.length,O=d(m,p);Pl=void 0;const T=Xl.length>E?Xl.pop():void 0;return O instanceof Promise?O.then(R=>(T&&(T.issues=R.issues.length?bf(R.issues):By),R)):(T&&(T.issues=O.issues.length?bf(O.issues):By),O)};t._zod.parse=h,t._zod.run===d&&(t._zod.run=h)})}};function jw(){return Tw}function Nw(t,i){const s=t[Gf]?.backEdges;return s!==void 0&&kb(i)&&s.has(i)}const Aw=()=>{const t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function i(c){return t[c]??null}const s={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(c,d){return c==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):r[c]??c}return c=>{switch(c.code){case"invalid_type":{const d=o(c.expected),h=tO(c.input),m=o(h,c.input);return`Invalid input: expected ${d}, received ${m}`}case"invalid_value":return c.values.length===1?`Invalid input: expected ${mb(c.values[0])}`:`Invalid option: expected one of ${Ey(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",h=i(c.origin);return h?`Too big: expected ${c.origin??"value"} to have ${d}${c.maximum.toString()} ${h.unit??"elements"}`:`Too big: expected ${c.origin??"value"} to be ${d}${c.maximum.toString()}`}case"too_small":{const d=c.exact?"exactly ":c.inclusive?">=":">",h=i(c.origin);return h?`Too small: expected ${c.origin} to have ${d}${c.minimum.toString()} ${h.unit}`:`Too small: expected ${c.origin} to be ${d}${c.minimum.toString()}`}case"invalid_format":{const d=c;return d.format==="starts_with"?`Invalid string: must start with "${d.prefix}"`:d.format==="ends_with"?`Invalid string: must end with "${d.suffix}"`:d.format==="includes"?`Invalid string: must include "${d.includes}"`:d.format==="regex"?`Invalid string: must match pattern ${d.pattern}`:`Invalid ${s[d.format]??c.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${c.divisor}`;case"unrecognized_keys":return`Unrecognized key${c.keys.length>1?"s":""}: ${Ey(c.keys,", ")}`;case"invalid_key":return`Invalid key in ${c.origin}`;case"invalid_union":return c.options&&Array.isArray(c.options)&&c.options.length>0?`Invalid discriminator value. Expected ${c.options.map(h=>`'${h}'`).join(" | ")}`:c.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${c.origin}`;default:return"Invalid input"}}};function Rw(){return{localeError:Aw()}}var Hy;class Cw{constructor(){this._map=new WeakMap,this._idmap=new Map}add(i,...s){const r=s[0];return this._map.set(i,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,i),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(i){const s=this._map.get(i);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(i),this}get(i){const s=i._zod.parent;if(s){const r={...this.get(s)??{}};delete r.id;const o={...r,...this._map.get(i)};return Object.keys(o).length?o:void 0}return this._map.get(i)}has(i){return this._map.has(i)}}function Mw(){return new Cw}(Hy=globalThis).__zod_globalRegistry??(Hy.__zod_globalRegistry=Mw());const ur=globalThis.__zod_globalRegistry;function Lb(t){return t.checks&&(t.checks=[...t.checks]),t}function Dw(t,i){return new t(Lb({type:"string",...ie(i)}))}function kw(t,i){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ie(i)})}function Uw(t,i){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ie(i)})}function Lw(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ie(i)})}function Zw(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ie(i)})}function qw(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ie(i)})}function Bw(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ie(i)})}function Hw(t,i){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ie(i)})}function $w(t,i){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ie(i)})}function Qw(t,i){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ie(i)})}function Gw(t,i){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ie(i)})}function Kw(t,i){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ie(i)})}function Yw(t,i){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ie(i)})}function Vw(t,i){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ie(i)})}function Fw(t,i){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ie(i)})}function Pw(t,i){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ie(i)})}function Xw(t,i){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ie(i)})}function Jw(t,i){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ie(i)})}function Iw(t,i){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ie(i)})}function Ww(t,i){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ie(i)})}function ez(t,i){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ie(i)})}function tz(t,i){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ie(i)})}function nz(t,i){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ie(i)})}function Zb(t,i){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ie(i)})}function iz(t,i){return new t({type:"string",format:"date",check:"string_format",...ie(i)})}function az(t,i){return new t({type:"string",format:"time",check:"string_format",precision:null,...ie(i)})}function sz(t,i){return new t({type:"string",format:"duration",check:"string_format",...ie(i)})}function rz(t,i){return new t(Lb({type:"number",checks:[],...ie(i)}))}function lz(t,i){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ie(i)})}function oz(t,i){return new t({type:"boolean",...ie(i)})}function uz(t){return new t({type:"unknown"})}function cz(t,i){return new t({type:"never",...ie(i)})}function $y(t,i){return new _b({check:"less_than",...ie(i),value:t,inclusive:!1})}function Sf(t,i){return new _b({check:"less_than",...ie(i),value:t,inclusive:!0})}function Qy(t,i){return new Eb({check:"greater_than",...ie(i),value:t,inclusive:!1})}function xf(t,i){return new Eb({check:"greater_than",...ie(i),value:t,inclusive:!0})}function Gy(t,i){return new r2({check:"multiple_of",...ie(i),value:t})}function qb(t,i){return new o2({check:"max_length",...ie(i),maximum:t})}function xo(t,i){return new u2({check:"min_length",...ie(i),minimum:t})}function Bb(t,i){return new c2({check:"length_equals",...ie(i),length:t})}function fz(t,i){return new f2({check:"string_format",format:"regex",...ie(i),pattern:t})}function dz(t){return new d2({check:"string_format",format:"lowercase",...ie(t)})}function hz(t){return new h2({check:"string_format",format:"uppercase",...ie(t)})}function mz(t,i){return new m2({check:"string_format",format:"includes",...ie(i),includes:t})}function pz(t,i){return new p2({check:"string_format",format:"starts_with",...ie(i),prefix:t})}function gz(t,i){return new g2({check:"string_format",format:"ends_with",...ie(i),suffix:t})}function ls(t){return new y2({check:"overwrite",tx:t})}function yz(t){return ls(i=>i.normalize(t))}function vz(){return ls(t=>t.trim())}function bz(){return ls(t=>t.toLowerCase())}function Sz(){return ls(t=>t.toUpperCase())}function xz(){return ls(t=>$E(t))}function _z(t,i,s){return new t({type:"array",element:i,...ie(s)})}function Ez(t,i,s){return new t({type:"custom",check:"custom",fn:i,...ie(s)})}function Oz(t,i){const s=wz(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(br(o,r.value,s._zod.def));else{const c=o;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=r.value),c.inst??(c.inst=s),c.continue??(c.continue=!s._zod.def.abort),r.issues.push(br(c))}},t(r.value,r)),i);return s}function wz(t,i){const s=new At({check:"custom",...ie(i)});return s._zod.check=t,s}function dr(t,...i){for(const s of i)for(const r of Reflect.ownKeys(s))Object.prototype.propertyIsEnumerable.call(s,r)&&zi(t,r,s[r]);return t}function Hb(t){let i=t?.target??"draft-2020-12";return i==="draft-4"&&(i="draft-04"),i==="draft-7"&&(i="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??ur,target:i,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function Ei(t,i,s,r,o){const c=typeof i.unrepresentable=="function"?i.unrepresentable({zodSchema:t,path:r.path,message:o}):i.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(o);return Object.assign(s,c),!0}function tt(t,i,s={path:[],schemaPath:[]}){var r;const o=t._zod.def,c=i.seen.get(t);if(c)return c.count++,s.schemaPath.includes(t)&&(c.cycle=s.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:s.path};i.seen.set(t,d),i.sharedDefsExtractedFor=void 0,i.sharedEmitDoneFor=void 0;const h=t._zod.toJSONSchema?.();if(h)d.schema=h;else{const v={...s,schemaPath:[...s.schemaPath,t],path:s.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(i,d.schema,v);else{const x=d.schema,S=i.processors[o.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);S(t,i,x,v)}const g=t._zod.parent;g&&(d.ref||(d.ref=g),tt(g,i,v),i.seen.get(g).isParent=!0)}const m=i.metadataRegistry.get(t);return m&&dr(d.schema,m),i.io==="input"&&yt(t)&&(delete d.schema.examples,delete d.schema.default),i.io==="input"&&"_prefault"in d.schema&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,i.seen.get(t).schema}function Ky(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function $b(t,i){const s=t.seen.get(i);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;const r=new Map;for(const d of t.seen.entries()){const h=t.metadataRegistry.get(d[0])?.id;if(h){const m=r.get(h);if(m&&m!==d[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,d[0])}}const o=d=>{const h=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const g=t.external.registry.get(d[0])?.id,x=t.external.uri??(E=>E);if(g)return{ref:x(g)};const S=d[1].defId??d[1].schema.id??`schema${t.counter++}`;return d[1].defId=S,{defId:S,ref:`${x("__shared")}#/${h}/${Ky(S)}`}}const m="#",p=`${m}/${h}/`;if(d[1]===s&&!d[1].schema.id)return{ref:m};const v=d[1].schema.id??`__schema${t.counter++}`;return{defId:v,ref:p+Ky(v)}},c=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:m,defId:p}=o(d);h.def={...h.schema},p&&(h.defId=p);const v=h.schema;for(const g in v)delete v[g];v.$ref=m};if(t.cycles==="throw")for(const d of t.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
64
+ `)}return z.write("payload.value = newResult;"),z.write("return payload;"),z.compile()};let d;const h=vo,m=!ln.jitless,v=m&&KE.value,y=i.catchall;let S;t._zod.parse=(x,E)=>{S??(S=r.value);const w=x.value;return h(w)?m&&v&&E?.async===!1&&E.jitless!==!0?(d||(d=c(i.shape)),x=d(x,E),y?Mb([],w,x,E,S,t,E?.abortEarly===!0):x):s(x,E):(x.issues.push({expected:"object",code:"invalid_type",input:w,inst:t}),x)}});function Cy(t,i,s,r){for(const c of t)if(c.issues.length===0)return i.value=c.value,i;const o=t.filter(c=>!Ln(c));return o.length===1?(i.value=o[0].value,o[0]):(i.issues.push({code:"invalid_union",input:i.value,inst:s,errors:t.map(c=>c.issues.map(d=>_i(d,r,pn())))}),i)}const f2=$("$ZodUnion",(t,i)=>{Ge.init(t,i),Ne(t,"optin",r=>r.def.options.some(o=>o._zod.optin==="defaulted")?"defaulted":r.def.options.some(o=>o._zod.optin!==void 0)?"optional":void 0),Ne(t,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ne(t,"values",r=>{if(r.def.options.every(o=>o._zod.values))return new Set(r.def.options.flatMap(o=>Array.from(o._zod.values)))}),Ne(t,"pattern",r=>{if(r.def.options.every(o=>o._zod.pattern)){const o=r.def.options.map(c=>c._zod.pattern);return new RegExp(`^(${o.map(c=>dd(c.source)).join("|")})$`)}});const s=i.options.length===1?i.options[0]._zod.run:null;t._zod.parse=(r,o)=>{if(s)return s(r,o);let c=!1;const d=[];for(const h of i.options){const m=h._zod.run({value:r.value,issues:[]},o);if(m instanceof Promise)d.push(m),c=!0;else{if(m.issues.length===0)return m;d.push(m)}}return c?Promise.all(d).then(h=>Cy(h,r,t,o)):Cy(d,r,t,o)}}),d2=$("$ZodIntersection",(t,i)=>{Ge.init(t,i),t._zod.parse=(s,r)=>{const o=s.value,c=i.left._zod.run({value:o,issues:[]},r),d=i.right._zod.run({value:o,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([m,p])=>My(s,m,p)):My(s,c,d)}});function Qf(t,i){if(t===i)return{valid:!0,data:t};if(t instanceof Date&&i instanceof Date&&+t==+i)return{valid:!0,data:t};if(es(t)&&es(i)){const s=Object.keys(i),r=Object.keys(t).filter(c=>s.indexOf(c)!==-1),o={...t,...i};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const c of r){if(c==="__proto__")continue;const d=Qf(t[c],i[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};o[c]=d.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return{valid:!1,mergeErrorPath:[]};const s=[];for(let r=0;r<t.length;r++){const o=t[r],c=i[r],d=Qf(o,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};s.push(d.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function My(t,i,s){const r=new Map;let o;const c=new Map,d=(p,v)=>{let y;if(p.code==="unrecognized_keys"&&!p.path?.length)o??(o=p),y=p.keys;else if(p.code==="invalid_key"&&p.origin==="record"&&p.path?.length===1){const S=String(p.path[0]);c.has(S)||c.set(S,p),y=[S]}else return!1;for(const S of y)r.has(S)||r.set(S,{}),r.get(S)[v]=!0;return!0};for(const p of i.issues)d(p,"l")||t.issues.push(p);for(const p of s.issues)d(p,"r")||t.issues.push(p);const h=[...r].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(h.length){const p=o?h.filter(v=>o.keys.includes(v)):[];p.length&&t.issues.push({...o,keys:p});for(const v of h)!p.includes(v)&&c.has(v)&&t.issues.push(c.get(v))}const m=Qf(i.value,s.value);if(!m.valid){if(Ln(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`)}return t.value=m.data,t}const h2=$("$ZodRecord",(t,i)=>{Ge.init(t,i);const s=ln.memoizer;s?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!es(c))return r.issues.push({expected:"record",code:"invalid_type",input:c,inst:t}),r;const d=[],h=i.keyType._zod.values;if(h&&!i.partial){r.value=s?s.alloc(t,r,{},o):{};const m=new Set;for(const v of h)if(typeof v=="string"||typeof v=="number"||typeof v=="symbol"){if(m.add(typeof v=="number"?v.toString():v),v==="__proto__")continue;const y=i.keyType._zod.run({value:v,issues:[]},o);if(y instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(y.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:y.issues.map(E=>_i(E,o,pn())),input:v,path:[v],inst:t});continue}const S=y.value;if(S==="__proto__")continue;const x=i.valueType._zod.run({value:c[v],issues:[]},o);x instanceof Promise?d.push(x.then(E=>{E.issues.length&&r.issues.push(...Fa(v,E.issues)),r.value[S]=E.value})):(x.issues.length&&r.issues.push(...Fa(v,x.issues)),r.value[S]=x.value)}let p;for(const v in c)if(!m.has(v))if(i.mode==="loose"){if(v==="__proto__")continue;r.value[v]=c[v]}else p=p??[],p.push(v);p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:p,continue:!0})}else{r.value=s?s.alloc(t,r,{},o):{};let m;for(const p of Reflect.ownKeys(c)){if(p==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,p))continue;let v=i.keyType._zod.run({value:p,issues:[]},o);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&bd.test(p)&&v.issues.length){const E=i.keyType._zod.run({value:Number(p),issues:[]},o);if(E instanceof Promise)throw new Error("Async schemas not supported in object keys currently");E.issues.length===0&&(v=E)}if(v.issues.length){i.mode==="loose"?r.value[p]=c[p]:h?(m=m??[],m.push(p)):r.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(E=>_i(E,o,pn())),input:p,path:[p],inst:t});continue}const S=v.value;if(S==="__proto__")continue;const x=i.valueType._zod.run({value:c[p],issues:[]},o);x instanceof Promise?d.push(x.then(E=>{E.issues.length&&r.issues.push(...Fa(p,E.issues)),r.value[S]=E.value})):(x.issues.length&&r.issues.push(...Fa(p,x.issues)),r.value[S]=x.value)}m&&m.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:m,continue:!0})}return d.length?Promise.all(d).then(()=>r):r}}),m2=$("$ZodEnum",(t,i)=>{Ge.init(t,i);const s=qf(i.entries),r=new Set(s);t._zod.values=r,Ne(t,"pattern",o=>{const c=qf(o.def.entries).filter(d=>YE.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>ts(d.toString())).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(o,c)=>{const d=o.value;return r.has(d)||o.issues.push({code:"invalid_value",values:s,input:d,inst:t}),o}}),p2=$("$ZodLiteral",(t,i)=>{Ge.init(t,i);const s=new Set(i.values);t._zod.values=s,Ne(t,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(c=>typeof c=="string"?ts(c):c?ts(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{const c=r.value;return s.has(c)||r.issues.push({code:"invalid_value",values:i.values,input:c,inst:t}),r}}),g2=$("$ZodTransform",(t,i)=>{Ge.init(t,i),t._zod.optin="optional",ln.memoizer?.guard(t),t._zod.parse=(s,r)=>{if(r.direction==="backward")throw new bb(t.constructor.name);const o=i.transform(s.value,s);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(s.value=d,s));if(o instanceof Promise)throw new Ii;return s.value=o,s}});function Dy(t,i){return t.value=i.issues.length?void 0:i.value,t}const Db=$("$ZodOptional",(t,i)=>{Ge.init(t,i),Ne(t,"optin",s=>s.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",Ne(t,"values",s=>{const r=s.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),Ne(t,"pattern",s=>{const r=s.def.innerType._zod.pattern;return r?new RegExp(`^(${dd(r.source)})?$`):void 0}),t._zod.parse=(s,r)=>{if(s.value===void 0){if(i.innerType._zod.optin!=="defaulted")return s;const o=i.innerType._zod.run({value:s.value,issues:[]},r);return o instanceof Promise?o.then(c=>Dy(s,c)):Dy(s,o)}return i.innerType._zod.run(s,r)}}),y2=$("$ZodExactOptional",(t,i)=>{Db.init(t,i),Ne(t,"values",s=>s.def.innerType._zod.values),Ne(t,"pattern",s=>s.def.innerType._zod.pattern),t._zod.parse=(s,r)=>i.innerType._zod.run(s,r)}),v2=$("$ZodNullable",(t,i)=>{Ge.init(t,i),Ne(t,"optin",s=>s.def.innerType._zod.optin),Ne(t,"optout",s=>s.def.innerType._zod.optout),Ne(t,"pattern",s=>{const r=s.def.innerType._zod.pattern;return r?new RegExp(`^(${dd(r.source)}|null)$`):void 0}),Ne(t,"values",s=>s.def.innerType._zod.values?new Set([...s.def.innerType._zod.values,null]):void 0),t._zod.parse=(s,r)=>s.value===null?s:i.innerType._zod.run(s,r)}),b2=$("$ZodDefault",(t,i)=>{Ge.init(t,i),t._zod.optin="defaulted",Ne(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);if(s.value===void 0)return s.value=i.defaultValue,s;const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(c=>ky(c,i)):ky(o,i)}});function ky(t,i){return t.value===void 0&&(t.value=i.defaultValue),t}const S2=$("$ZodPrefault",(t,i)=>{Ge.init(t,i),t._zod.optin="defaulted",Ne(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>(r.direction==="backward"||s.value===void 0&&(s.value=i.defaultValue),i.innerType._zod.run(s,r))}),x2=$("$ZodNonOptional",(t,i)=>{Ge.init(t,i),Ne(t,"values",s=>{const r=s.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(s,r)=>{const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(c=>Uy(c,t)):Uy(o,t)}});function Uy(t,i){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:i}),t}function Ly(t,i,s,r){return i.issues.length?(t.value=s.catchValue({...i,value:t.value,error:{issues:i.issues.map(o=>_i(o,r,pn()))},input:t.value}),t):(t.value=i.value,i.memo&&(t.memo=!0),t)}const _2=$("$ZodCatch",(t,i)=>{Ge.init(t,i),Ne(t,"optin",s=>s.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ne(t,"optout",s=>s.def.innerType._zod.optout),Ne(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);const o=i.innerType._zod.run({value:s.value,issues:[]},r);return o instanceof Promise?o.then(c=>Ly(s,c,i,r)):Ly(s,o,i,r)}}),E2=$("$ZodPipe",(t,i)=>{Ge.init(t,i),Ne(t,"values",s=>s.def.in._zod.values),Ne(t,"optin",s=>s.def.in._zod.optin),Ne(t,"optout",s=>s.def.out._zod.optout),Ne(t,"propValues",s=>s.def.in._zod.propValues),t._zod.parse=(s,r)=>{if(r.direction==="backward"){const c=i.out._zod.run(s,r);return c instanceof Promise?c.then(d=>Pl(d,i.in,r)):Pl(c,i.in,r)}const o=i.in._zod.run(s,r);return o instanceof Promise?o.then(c=>Pl(c,i.out,r)):Pl(o,i.out,r)}});function Pl(t,i,s){return t.issues.some(r=>r.code!=="unrecognized_keys")?(t.aborted=!0,t):i._zod.run({value:t.value,issues:t.issues},s)}const w2=$("$ZodReadonly",(t,i)=>{Ge.init(t,i),Ne(t,"propValues",s=>s.def.innerType._zod.propValues),Ne(t,"values",s=>s.def.innerType._zod.values),Ne(t,"optin",s=>s.def.innerType?._zod?.optin),Ne(t,"optout",s=>s.def.innerType?._zod?.optout),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(Zy):Zy(o)}});function Zy(t){return t.memo||(t.value=Object.freeze(t.value)),t}const O2=$("$ZodCustom",(t,i)=>{At.init(t,i),Ge.init(t,i),t._zod.parse=(s,r)=>s,t._zod.check=s=>{const r=s.value,o=i.fn(r);if(o instanceof Promise)return o.then(c=>qy(c,s,r,t));qy(o,s,r,t)}});function qy(t,i,s,r){if(!t){const o={code:"custom",input:s,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),i.issues.push(Sr(o))}}class z2 extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Gf="~memo",By=[];function kb(t){return t!==null&&typeof t=="object"}function bf(t){return t.map(i=>i.path?{...i,path:i.path.slice()}:{...i})}const Ub=new WeakMap,ur=0,lo=1,dr=2;function oo(t,i,s){const r=Ub.get(t);if(r!==void 0)return r?dr:ur;if(i.has(t))return dr;i.add(t);let o=ur;const c=v=>{if(o!==dr&&v?._zod){const y=oo(v,i);y>o&&(o=y)}},d=(v,y)=>{let S=ur;for(const x of Reflect.ownKeys(v)){const E=Object.getOwnPropertyDescriptor(v,x);if(!E.enumerable)continue;const w=E.get?lo:E.value?._zod?oo(E.value,i):ur;w>S&&(S=w)}return S},h=v=>{v>o&&(o=v)},m=t._zod.def;switch(m.type){case"object":{const v=ub(m);h(v?d(v):lo),c(m.catchall);break}case"array":c(m.element);break;case"tuple":for(const v of m.items)c(v);c(m.rest);break;case"record":case"map":c(m.keyType),c(m.valueType);break;case"set":c(m.valueType);break;case"union":for(const v of m.options)c(v);break;case"intersection":c(m.left),c(m.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":c(m.innerType);break;case"pipe":c(m.in),c(m.out);break;case"function":c(m.input),c(m.output);break;case"lazy":{const v=m._cachedInner??void 0;h(v?oo(v,i):lo);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(const v in m){const y=Object.getOwnPropertyDescriptor(m,v);if(!y||y.get)continue;const S=y.value;if(!(!S||typeof S!="object")){if(S._zod)c(S);else if(Array.isArray(S))for(const x of S)c(x)}}}return i.delete(t),T2(t,o)}function T2(t,i){return i!==lo&&Ub.set(t,i===dr),i}function j2(t,i){let s=t.buckets.get(i);return s||(s=new WeakMap,t.buckets.set(i,s)),s}let Xl;const Jl=[],N2={alloc(t,i,s){const r=Xl;if(!r)return s;Xl=void 0;const o={value:s,issues:null};return r.set(i.value,o),Jl.push(o),s},guard(t){var i;(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred.push(()=>{const s=t._zod.parse,r=(o,c)=>{if(c.direction!=="backward"&&R2(c,o.value))throw new z2;return s(o,c)};t._zod.parse=r,t._zod.run===s&&(t._zod.run=r)})},attach(t){var i;let s,r=!1,o,c;(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred.push(()=>{const d=t._zod.parse,h=(m,p)=>{if(s===void 0){const R=oo(t,new Set);if(R===ur)return t._zod.parse=d,t._zod.run===h&&(t._zod.run=d),d(m,p);R===dr||r?s=!0:r=!0}const v=m.value;if(!kb(v))return d(m,p);let y=p[Gf];y||(y={buckets:new WeakMap,backEdges:void 0},p[Gf]=y);let S;o===p?S=c:(S=j2(y,t),o=p,c=S);const x=S.get(v);if(x)return m.value=x.value,x.issues?x.issues.length&&m.issues.push(...bf(x.issues)):(m.memo=!0,y.backEdges??(y.backEdges=new WeakSet),y.backEdges.add(x.value)),m;Xl=S;const E=Jl.length,w=d(m,p);Xl=void 0;const z=Jl.length>E?Jl.pop():void 0;return w instanceof Promise?w.then(R=>(z&&(z.issues=R.issues.length?bf(R.issues):By),R)):(z&&(z.issues=w.issues.length?bf(w.issues):By),w)};t._zod.parse=h,t._zod.run===d&&(t._zod.run=h)})}};function A2(){return N2}function R2(t,i){const s=t[Gf]?.backEdges;return s!==void 0&&kb(i)&&s.has(i)}const C2=()=>{const t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function i(c){return t[c]??null}const s={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(c,d){return c==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):r[c]??c}return c=>{switch(c.code){case"invalid_type":{const d=o(c.expected),h=iw(c.input),m=o(h,c.input);return`Invalid input: expected ${d}, received ${m}`}case"invalid_value":return c.values.length===1?`Invalid input: expected ${mb(c.values[0])}`:`Invalid option: expected one of ${Ey(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",h=i(c.origin);return h?`Too big: expected ${c.origin??"value"} to have ${d}${c.maximum.toString()} ${h.unit??"elements"}`:`Too big: expected ${c.origin??"value"} to be ${d}${c.maximum.toString()}`}case"too_small":{const d=c.exact?"exactly ":c.inclusive?">=":">",h=i(c.origin);return h?`Too small: expected ${c.origin} to have ${d}${c.minimum.toString()} ${h.unit}`:`Too small: expected ${c.origin} to be ${d}${c.minimum.toString()}`}case"invalid_format":{const d=c;return d.format==="starts_with"?`Invalid string: must start with "${d.prefix}"`:d.format==="ends_with"?`Invalid string: must end with "${d.suffix}"`:d.format==="includes"?`Invalid string: must include "${d.includes}"`:d.format==="regex"?`Invalid string: must match pattern ${d.pattern}`:`Invalid ${s[d.format]??c.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${c.divisor}`;case"unrecognized_keys":return`Unrecognized key${c.keys.length>1?"s":""}: ${Ey(c.keys,", ")}`;case"invalid_key":return`Invalid key in ${c.origin}`;case"invalid_union":return c.options&&Array.isArray(c.options)&&c.options.length>0?`Invalid discriminator value. Expected ${c.options.map(h=>`'${h}'`).join(" | ")}`:c.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${c.origin}`;default:return"Invalid input"}}};function M2(){return{localeError:C2()}}var Hy;class D2{constructor(){this._map=new WeakMap,this._idmap=new Map}add(i,...s){const r=s[0];return this._map.set(i,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,i),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(i){const s=this._map.get(i);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(i),this}get(i){const s=i._zod.parent;if(s){const r={...this.get(s)??{}};delete r.id;const o={...r,...this._map.get(i)};return Object.keys(o).length?o:void 0}return this._map.get(i)}has(i){return this._map.has(i)}}function k2(){return new D2}(Hy=globalThis).__zod_globalRegistry??(Hy.__zod_globalRegistry=k2());const cr=globalThis.__zod_globalRegistry;function Lb(t){return t.checks&&(t.checks=[...t.checks]),t}function U2(t,i){return new t(Lb({type:"string",...ie(i)}))}function L2(t,i){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ie(i)})}function Z2(t,i){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ie(i)})}function q2(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ie(i)})}function B2(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ie(i)})}function H2(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ie(i)})}function $2(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ie(i)})}function Q2(t,i){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ie(i)})}function G2(t,i){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ie(i)})}function K2(t,i){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ie(i)})}function Y2(t,i){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ie(i)})}function F2(t,i){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ie(i)})}function V2(t,i){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ie(i)})}function P2(t,i){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ie(i)})}function X2(t,i){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ie(i)})}function J2(t,i){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ie(i)})}function I2(t,i){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ie(i)})}function W2(t,i){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ie(i)})}function ez(t,i){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ie(i)})}function tz(t,i){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ie(i)})}function nz(t,i){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ie(i)})}function iz(t,i){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ie(i)})}function az(t,i){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ie(i)})}function Zb(t,i){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ie(i)})}function sz(t,i){return new t({type:"string",format:"date",check:"string_format",...ie(i)})}function rz(t,i){return new t({type:"string",format:"time",check:"string_format",precision:null,...ie(i)})}function lz(t,i){return new t({type:"string",format:"duration",check:"string_format",...ie(i)})}function oz(t,i){return new t(Lb({type:"number",checks:[],...ie(i)}))}function uz(t,i){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ie(i)})}function cz(t,i){return new t({type:"boolean",...ie(i)})}function fz(t){return new t({type:"unknown"})}function dz(t,i){return new t({type:"never",...ie(i)})}function $y(t,i){return new _b({check:"less_than",...ie(i),value:t,inclusive:!1})}function Sf(t,i){return new _b({check:"less_than",...ie(i),value:t,inclusive:!0})}function Qy(t,i){return new Eb({check:"greater_than",...ie(i),value:t,inclusive:!1})}function xf(t,i){return new Eb({check:"greater_than",...ie(i),value:t,inclusive:!0})}function Gy(t,i){return new oO({check:"multiple_of",...ie(i),value:t})}function qb(t,i){return new cO({check:"max_length",...ie(i),maximum:t})}function _o(t,i){return new fO({check:"min_length",...ie(i),minimum:t})}function Bb(t,i){return new dO({check:"length_equals",...ie(i),length:t})}function hz(t,i){return new hO({check:"string_format",format:"regex",...ie(i),pattern:t})}function mz(t){return new mO({check:"string_format",format:"lowercase",...ie(t)})}function pz(t){return new pO({check:"string_format",format:"uppercase",...ie(t)})}function gz(t,i){return new gO({check:"string_format",format:"includes",...ie(i),includes:t})}function yz(t,i){return new yO({check:"string_format",format:"starts_with",...ie(i),prefix:t})}function vz(t,i){return new vO({check:"string_format",format:"ends_with",...ie(i),suffix:t})}function os(t){return new bO({check:"overwrite",tx:t})}function bz(t){return os(i=>i.normalize(t))}function Sz(){return os(t=>t.trim())}function xz(){return os(t=>t.toLowerCase())}function _z(){return os(t=>t.toUpperCase())}function Ez(){return os(t=>GE(t))}function wz(t,i,s){return new t({type:"array",element:i,...ie(s)})}function Oz(t,i,s){return new t({type:"custom",check:"custom",fn:i,...ie(s)})}function zz(t,i){const s=Tz(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(Sr(o,r.value,s._zod.def));else{const c=o;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=r.value),c.inst??(c.inst=s),c.continue??(c.continue=!s._zod.def.abort),r.issues.push(Sr(c))}},t(r.value,r)),i);return s}function Tz(t,i){const s=new At({check:"custom",...ie(i)});return s._zod.check=t,s}function hr(t,...i){for(const s of i)for(const r of Reflect.ownKeys(s))Object.prototype.propertyIsEnumerable.call(s,r)&&zi(t,r,s[r]);return t}function Hb(t){let i=t?.target??"draft-2020-12";return i==="draft-4"&&(i="draft-04"),i==="draft-7"&&(i="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??cr,target:i,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function wi(t,i,s,r,o){const c=typeof i.unrepresentable=="function"?i.unrepresentable({zodSchema:t,path:r.path,message:o}):i.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(o);return Object.assign(s,c),!0}function tt(t,i,s={path:[],schemaPath:[]}){var r;const o=t._zod.def,c=i.seen.get(t);if(c)return c.count++,s.schemaPath.includes(t)&&(c.cycle=s.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:s.path};i.seen.set(t,d),i.sharedDefsExtractedFor=void 0,i.sharedEmitDoneFor=void 0;const h=t._zod.toJSONSchema?.();if(h)d.schema=h;else{const v={...s,schemaPath:[...s.schemaPath,t],path:s.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(i,d.schema,v);else{const S=d.schema,x=i.processors[o.type];if(!x)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);x(t,i,S,v)}const y=t._zod.parent;y&&(d.ref||(d.ref=y),tt(y,i,v),i.seen.get(y).isParent=!0)}const m=i.metadataRegistry.get(t);return m&&hr(d.schema,m),i.io==="input"&&yt(t)&&(delete d.schema.examples,delete d.schema.default),i.io==="input"&&"_prefault"in d.schema&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,i.seen.get(t).schema}function Ky(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function $b(t,i){const s=t.seen.get(i);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;const r=new Map;for(const d of t.seen.entries()){const h=t.metadataRegistry.get(d[0])?.id;if(h){const m=r.get(h);if(m&&m!==d[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,d[0])}}const o=d=>{const h=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const y=t.external.registry.get(d[0])?.id,S=t.external.uri??(E=>E);if(y)return{ref:S(y)};const x=d[1].defId??d[1].schema.id??`schema${t.counter++}`;return d[1].defId=x,{defId:x,ref:`${S("__shared")}#/${h}/${Ky(x)}`}}const m="#",p=`${m}/${h}/`;if(d[1]===s&&!d[1].schema.id)return{ref:m};const v=d[1].schema.id??`__schema${t.counter++}`;return{defId:v,ref:p+Ky(v)}},c=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:m,defId:p}=o(d);h.def={...h.schema},p&&(h.defId=p);const v=h.schema;for(const y in v)delete v[y];v.$ref=m};if(t.cycles==="throw")for(const d of t.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
65
65
 
66
- Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of t.seen.entries()){const h=d[1];if(i===d[0]){c(d);continue}if(t.external){const p=t.external.registry.get(d[0])?.id;if(i!==d[0]&&p){c(d);continue}}if(t.metadataRegistry.get(d[0])?.id){c(d);continue}if(h.cycle){c(d);continue}h.count>1&&t.reused==="ref"&&c(d)}t.external&&(t.sharedDefsExtractedFor=t.external)}function Qb(t){const i=t.anyOf;if(!Array.isArray(i)||i.length===0||t.type!==void 0)return;const s=[];for(const r of i){if(!r||typeof r!="object")return;Qb(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const c=r.type;for(const d of Array.isArray(c)?c:[c]){if(typeof d!="string")return;s.includes(d)||s.push(d)}}delete t.anyOf,t.type=s.length===1?s[0]:s}const Gb=new Set(["type","properties","required","additionalProperties"]),Yy=["oneOf","anyOf"];function Vy(t){const i=t.additionalProperties;return i===void 0||i===!1||typeof i!="object"||i===null?null:Object.keys(i).length?i:null}function Kf(t){const i=[];for(const c of t){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!Gb.has(d))return null;i.push(c)}const s={},r=new Set;for(const c of i){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(s,d))continue;const h=[];for(const p of i){const v=p.properties?.[d]??Vy(p);v!=null&&(h.some(g=>JSON.stringify(g)===JSON.stringify(v))||h.push(v))}const m=h.length===1?h[0]:Kf(h)??{allOf:h};zi(s,d,m)}for(const d of c.required??[])r.add(d)}const o={type:"object",properties:s};if(r.size&&(o.required=[...r]),i.every(c=>c.additionalProperties===!1))o.additionalProperties=!1;else{const c=[];for(const d of i){const h=Vy(d);h&&!c.some(m=>JSON.stringify(m)===JSON.stringify(h))&&c.push(h)}c.length===1?o.additionalProperties=c[0]:c.length>1&&(o.additionalProperties={allOf:c})}return o}function zz(t){const i=t.allOf;if(!Array.isArray(i)||i.length<2)return;for(const o of Gb)if(o in t)return;const s=i.filter(o=>Yy.some(c=>Array.isArray(o[c])));let r=null;if(!s.length)r=Kf(i);else{const o=s[0],c=Yy.find(m=>Array.isArray(o[m]));if(Object.keys(o).length!==1)return;const d=i.filter(m=>m!==o),h=o[c].map(m=>Kf([...d,m]));if(h.some(m=>!m))return;r={[c]:h}}r&&(delete t.allOf,dr(t,r))}function Kb(t,i){const s=t.seen.get(i);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const m=t.seen.get(h);if(m.ref===null)return;const p=m.def??m.schema,v={...p},g=m.ref;if(m.ref=null,g){r(g);const S=t.seen.get(g),E=S.schema;if(E.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(E)):dr(p,E),dr(p,v),h._zod.parent===g)for(const T in p)T==="$ref"||T==="allOf"||T in v||delete p[T];if(E.$ref&&S.def)for(const T in p)T==="$ref"||T==="allOf"||T in S.def&&JSON.stringify(p[T])===JSON.stringify(S.def[T])&&delete p[T]}const x=h._zod.parent;if(x&&x!==g){r(x);const S=t.seen.get(x);if(S?.schema.$ref&&(p.$ref=S.schema.$ref,S.def))for(const E in p)E==="$ref"||E==="allOf"||E in S.def&&JSON.stringify(p[E])===JSON.stringify(S.def[E])&&delete p[E]}t.override({zodSchema:h,jsonSchema:p,path:m.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(const h of[...t.seen.entries()].reverse())r(h[0]);if(t.target!=="openapi-3.0")for(const h of t.seen.entries())Qb(h[1].def??h[1].schema);for(const h of t.deferred)h();if(t.intersections.length){const h=new Map;for(const m of t.seen.values())for(const p of[m.schema,m.def]){const v=p?.allOf;if(!Array.isArray(v))continue;const g=h.get(v);g?g.push(p):h.set(v,[p])}for(const m of t.intersections)for(const p of h.get(m)??[])zz(p)}}const o={};if(t.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const h=t.external.registry.get(i)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(h)}dr(o,s.defId?s.schema:s.def??s.schema);const c=t.metadataRegistry.get(i)?.id;c!==void 0&&o.id===c&&delete o.id;const d=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(const h of t.seen.entries()){const m=h[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,zi(d,m.defId,m.def))}t.external&&(t.sharedEmitDoneFor=t.external),t.external||Object.keys(d).length>0&&(t.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...i["~standard"],jsonSchema:{input:_o(i,"input",t.processors),output:_o(i,"output",t.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function yt(t,i){const s=i??{seen:new Set};if(s.seen.has(t))return!1;s.seen.add(t);const r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return yt(r.element,s);if(r.type==="set")return yt(r.valueType,s);if(r.type==="lazy")return yt(r.getter(),s);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return yt(r.innerType,s);if(r.type==="intersection")return yt(r.left,s)||yt(r.right,s);if(r.type==="record"||r.type==="map")return yt(r.keyType,s)||yt(r.valueType,s);if(r.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:yt(r.in,s)||yt(r.out,s);if(r.type==="object"){for(const o in r.shape)if(yt(r.shape[o],s))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(yt(o,s))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(yt(o,s))return!0;return!!(r.rest&&yt(r.rest,s))}return!1}const Tz=(t,i={})=>s=>{const r=Hb({...s,processors:i});return tt(t,r),$b(r,t),Kb(r,t)},_o=(t,i,s={})=>r=>{const{libraryOptions:o,target:c}=r??{},d=Hb({...o??{},target:c,io:i,processors:s});return tt(t,d),$b(d,t),Kb(d,t)},ns=(t,i,s)=>{(t[i]===void 0||s>t[i])&&(t[i]=s)},is=(t,i,s)=>{(t[i]===void 0||s<t[i])&&(t[i]=s)},Fy=(t,i)=>{ns(t,"minimum",i),is(t,"maximum",i)},Yb=(t,i)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(i)||t.multipleOf.push(i)},Vb=(t,i)=>{t.patterns??(t.patterns=new Set),t.patterns.add(i)},Fb=(t,i)=>{t.mime=t.mime?t.mime.filter(s=>i.includes(s)):[...i]},Pb=(t,i)=>{t.format=i,i.includes("int")&&(t.isInt=!0)},Py=(t,i)=>ns(t,"minimum",i.minimum),Xy=(t,i)=>is(t,"maximum",i.maximum),Jy=t=>(i,s)=>{Pb(i,s.format);const[r,o]=t[s.format];ns(i,"minimum",r),is(i,"maximum",o)},jz={greater_than:(t,i)=>ns(t,i.inclusive?"minimum":"exclusiveMinimum",i.value),less_than:(t,i)=>is(t,i.inclusive?"maximum":"exclusiveMaximum",i.value),multiple_of:(t,i)=>Yb(t,i.value),number_format:Jy(pb),bigint_format:Jy(YE),min_length:Py,max_length:Xy,length_equals:(t,i)=>Fy(t,i.length),min_size:Py,max_size:Xy,size_equals:(t,i)=>Fy(t,i.size),string_format:(t,i)=>{Pb(t,i.format),i.pattern&&Vb(t,i.pattern),(i.format==="base64"||i.format==="base64url")&&(t.contentEncoding=i.format),(i.local||i.precision===-1)&&(t.laxFormat=!0)},mime_type:(t,i)=>Fb(t,i.mime)};function rn(t){const i={},s=t._zod.def,r=t._zod.traits.has("$ZodCheck")?[t,...s.checks??[]]:s.checks??[];for(const c of r)jz[c._zod.def.check]?.(i,c._zod.def);const o=t._zod.bag;o.minimum!==void 0&&ns(i,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&ns(i,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&is(i,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&is(i,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&Yb(i,o.multipleOf),o.format!==void 0&&(i.format??(i.format=o.format),o.format.includes("int")&&(i.isInt=!0)),o.mime&&Fb(i,o.mime);for(const c of o.patterns??[])Vb(i,c);return i}const Nz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Az=new Map([[Ab,VO],[_d,FO]]),Xb=t=>Az.get(t)??t,Rz=(t,i,s,r)=>{const o=s;o.type="string";const{minimum:c,maximum:d,format:h,patterns:m,contentEncoding:p,laxFormat:v}=rn(t);if(typeof c=="number"&&(o.minLength=c),typeof d=="number"&&(o.maxLength=d),h&&(o.format=Nz[h]??h,o.format===""&&delete o.format,(h==="time"||v)&&delete o.format),p&&(o.contentEncoding=p),m&&m.size>0){const g=[...m].map(Xb);g.length===1?o.pattern=g[0].source:g.length>1&&(o.allOf=[...g.map(x=>({...i.target==="draft-07"||i.target==="draft-04"||i.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},Cz=(t,i,s,r)=>{const o=s,{minimum:c,maximum:d,multipleOf:h,exclusiveMaximum:m,exclusiveMinimum:p,isInt:v}=rn(t);o.type=v?"integer":"number";const g=typeof p=="number"&&p>=(c??Number.NEGATIVE_INFINITY),x=typeof m=="number"&&m<=(d??Number.POSITIVE_INFINITY),S=i.target==="draft-04"||i.target==="openapi-3.0";if(g?S?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p:typeof c=="number"&&(o.minimum=c),x?S?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof d=="number"&&(o.maximum=d),h){const E=new Set;for(const R of h)Number.isFinite(R)&&R!==0?E.add(Math.abs(R)):Ei(t,i,o,r,`A multipleOf divisor of ${R} cannot be represented in JSON Schema`);const[O,...T]=E;O!==void 0&&(o.multipleOf=O),T.length&&(o.allOf=[...o.allOf??[],...T.map(R=>({multipleOf:R}))])}},Mz=(t,i,s,r)=>{s.type="boolean"},Dz=(t,i,s,r)=>{s.not={}},kz=(t,i,s,r)=>{},Uz=(t,i,s,r)=>{const o=t._zod.def,c=qf(o.entries);if(c.length===0){s.not={};return}c.every(d=>typeof d=="number")&&(s.type="number"),c.every(d=>typeof d=="string")&&(s.type="string"),s.enum=c},Lz=(t,i,s,r)=>{const o=t._zod.def;if(o.values.length===0){s.not={};return}const c=[];for(const d of o.values)if(d===void 0){if(Ei(t,i,s,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(Ei(t,i,s,r,"BigInt literals cannot be represented in JSON Schema"))return;c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];s.type=d===null?"null":typeof d,i.target==="draft-04"||i.target==="openapi-3.0"?s.enum=[d]:s.const=d}else c.every(d=>typeof d=="number")&&(s.type="number"),c.every(d=>typeof d=="string")&&(s.type="string"),c.every(d=>typeof d=="boolean")&&(s.type="boolean"),c.every(d=>d===null)&&(s.type="null"),s.enum=c},Zz=(t,i,s,r)=>{Ei(t,i,s,r,"Custom types cannot be represented in JSON Schema")},qz=(t,i,s,r)=>{Ei(t,i,s,r,"Transforms cannot be represented in JSON Schema")},Bz=(t,i,s,r)=>{const o=s,c=t._zod.def,{minimum:d,maximum:h}=rn(t);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=tt(c.element,i,{...r,path:[...r.path,"items"]})};function Eo(t){const i=t._zod.def;return i.type==="pipe"&&i.in._zod.traits.has("$ZodTransform")?Eo(i.out):i.type==="catch"?Eo(i.innerType):t._zod.optin}const Hz=(t,i,s,r)=>{const o=s,c=t._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&Ei(t,i,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const p in d)zi(o.properties,p,tt(d[p],i,{...r,path:[...r.path,"properties",p]}));const m=[];for(const p of Object.keys(d)){const v=c.shape[p];(i.io==="input"?Eo(v)===void 0:v._zod.optout===void 0)&&m.push(p)}m.length>0&&(o.required=m),c.catchall?._zod.def.type==="never"?o.additionalProperties=!1:c.catchall?c.catchall&&(o.additionalProperties=tt(c.catchall,i,{...r,path:[...r.path,"additionalProperties"]})):i.io==="output"&&(o.additionalProperties=!1)},$z=(t,i,s,r)=>{const o=t._zod.def,c=o.inclusive===!1,d=o.options.map((h,m)=>tt(h,i,{...r,path:[...r.path,c?"oneOf":"anyOf",m]}));c?s.oneOf=d:s.anyOf=d},Qz=(t,i,s,r)=>{const o=t._zod.def,c=tt(o.left,i,{...r,path:[...r.path,"allOf",0]}),d=tt(o.right,i,{...r,path:[...r.path,"allOf",1]}),h=p=>"allOf"in p&&Object.keys(p).length===1,m=[...h(c)?c.allOf:[c],...h(d)?d.allOf:[d]];s.allOf=m,i.intersections.push(m)};function Yf(t,i,s){if(i.$ref){if(s.has(i))return i;s.add(i);const E=t.get(i)?.def;if(!E)return i;const O=Yf(t,E,s);return O===E?i:O}for(const E of["anyOf","oneOf"]){const O=i[E];if(!Array.isArray(O))continue;const T=O.map(R=>Yf(t,R,s));T.some((R,q)=>R!==O[q])&&(i={...i,[E]:T})}const r=Array.isArray(i.type)?i.type:[i.type],o=!r.includes("string")&&r.some(E=>E==="number"||E==="integer"),c=i.enum??(i.const!==void 0?[i.const]:void 0);if(!o&&!c?.some(E=>typeof E=="number"))return i;const{minimum:d,maximum:h,exclusiveMinimum:m,exclusiveMaximum:p,multipleOf:v,format:g,id:x,...S}=i;return S.enum?S.enum=S.enum.map(E=>typeof E=="number"?String(E):E):typeof S.const=="number"&&(S.const=String(S.const)),o&&(S.type="string",c||(S.pattern=(r.includes("number")?bd:n2).source)),S}const Vf=new WeakMap;function Gz(t){const i=new Map;for(const r of t.seen.values())r.def&&!i.has(r.schema)&&i.set(r.schema,r);const s=new Map;for(const r of Vf.get(t)??[]){const o=t.seen.get(r),c=(o?.def??o?.schema)?.propertyNames;if(!c||c===!0||s.has(c))continue;const d=Yf(i,c,new Set);d!==c&&s.set(c,d)}if(s.size)for(const r of t.seen.values())for(const o of[r.schema,r.def]){const c=o&&s.get(o.propertyNames);c&&(o.propertyNames=c)}}const Kz=(t,i,s,r)=>{const o=s,c=t._zod.def;o.type="object";const d=c.keyType,h=rn(d).patterns;if(c.mode==="loose"&&h&&h.size>0){const v=tt(c.valueType,i,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const g of h)zi(o.patternProperties,Xb(g).source,v)}else{if(i.target==="draft-07"||i.target==="draft-2020-12"){o.propertyNames=tt(c.keyType,i,{...r,path:[...r.path,"propertyNames"]});let v=Vf.get(i);v||(v=[],Vf.set(i,v),i.deferred.push(()=>Gz(i))),v.push(t)}o.additionalProperties=tt(c.valueType,i,{...r,path:[...r.path,"additionalProperties"]})}const m=d._zod.values,p=i.io==="input"&&Eo(c.valueType)!==void 0;if(m&&!c.partial&&!p){const v=[...m].filter(g=>typeof g=="string"||typeof g=="number");v.length>0&&(o.required=v.map(String))}},Yz=(t,i,s,r)=>{const o=t._zod.def,c=tt(o.innerType,i,r),d=i.seen.get(t);i.target==="openapi-3.0"?(d.ref=o.innerType,s.nullable=!0):s.anyOf=[c,{type:"null"}]},Vz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType},Ed=Symbol();function Jb(t,i,s,r,o){let c=!1;const d=JSON.stringify(t,(h,m)=>typeof m!="bigint"?m:(c=!0,null));return c?(Ei(i,s,r,o,"BigInt defaults cannot be represented in JSON Schema"),Ed):JSON.parse(d)}const Fz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType;const d=Jb(o.defaultValue,t,i,s,r);d!==Ed&&(s.default=d)},Pz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);if(c.ref=o.innerType,i.io!=="input")return;const d=Jb(o.defaultValue,t,i,s,r);d!==Ed&&(s._prefault=d)},Xz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{Ei(t,i,s,r,"Dynamic catch values are not supported in JSON Schema");return}s.default=d},Jz=(t,i,s,r)=>{const o=t._zod.def,c=o.in._zod.traits.has("$ZodTransform"),d=i.io==="input"?c?o.out:o.in:o.out;tt(d,i,r);const h=i.seen.get(t);h.ref=d},Iz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType,s.readOnly=!0},Ib=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType},Iy=new WeakSet([Object.prototype,Error.prototype]);function Jl(t,i,s){Object.defineProperty(t,i,{configurable:!0,enumerable:!1,get(){const r=s(this);return Object.defineProperty(this,i,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,i,{value:r,configurable:!0,writable:!0})}})}const Wz=(t,i)=>{mO.init(t,i),t.name="ZodError";const s=Object.getPrototypeOf(t);Iy.has(s)||(Iy.add(s),Jl(s,"format",r=>o=>yO(r,o)),Jl(s,"flatten",r=>o=>gO(r,o)),Jl(s,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Bf,2)}),Jl(s,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Bf,2)}),Object.defineProperty(s,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},en=$("ZodError",Wz,void 0,{Parent:Error}),eT=pd(en),tT=gd(en),nT=yd(en),iT=vd(en),aT=EO(en),sT=OO(en),rT=wO(en),lT=zO(en),oT=TO(en),uT=jO(en),cT=NO(en),fT=AO(en);function dT(){ln.localeError||pn(Rw())}function Mo(){ln.memoizer||pn({memoizer:jw()})}const Ke=$("ZodType",(t,i)=>(dT(),Ge.init(t,i),t.def=i,t.type=i.type,t),{check(...t){const i=this.def;return this.clone($t(i,{checks:[...i.checks??[],...t.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,i){return Ti(this,t,i)},brand(){return this},register(t,i){return t.add(this,i),this},refine(t,i){return this.check(sj(t,i))},superRefine(t,i){return this.check(rj(t,i))},overwrite(t){return this.check(ls(t))},optional(){return tv(this)},exactOptional(){return VT(this)},nullable(){return nv(this)},nullish(){return tv(nv(this))},nonoptional(t){return IT(this,t)},array(){return _e(this)},or(t){return Do([this,t])},and(t){return $T(this,t)},transform(t){return iv(this,YT(t))},default(t){return PT(this,t)},prefault(t){return JT(this,t)},catch(t){return ej(this,t)},pipe(t){return iv(this,t)},readonly(){return ij(this)},describe(t){const i=this.clone();return ur.add(i,{description:t}),i},meta(...t){if(t.length===0)return ur.get(this);const i=this.clone();return ur.add(i,t[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...i){return i.length===0?t(this):t(this,...i)},get"~standard"(){return yb(this,"~standard",{...wb(this),jsonSchema:{input:_o(this,"input"),output:_o(this,"output")}})},set"~standard"(t){_i(this,"~standard",t)},parse:function t(i,s){return eT(this,i,s,{callee:t})},parseAsync:async function t(i,s){return await tT(this,i,s,{callee:t})},safeParse(t,i){return nT(this,t,i)},async safeParseAsync(t,i){return iT(this,t,i)},get spa(){return this?.safeParseAsync},set spa(t){_i(this,"spa",t)},validate(t,i){return SO(this,t,i)},validateAsync(t,i){return _O(this,t,i)},encode:function t(i,s){return aT(this,i,s,{callee:t})},decode:function t(i,s){return sT(this,i,s,{callee:t})},encodeAsync:async function t(i,s){return await rT(this,i,s,{callee:t})},decodeAsync:async function t(i,s){return await lT(this,i,s,{callee:t})},safeEncode(t,i){return oT(this,t,i)},safeDecode(t,i){return uT(this,t,i)},async safeEncodeAsync(t,i){return cT(this,t,i)},async safeDecodeAsync(t,i){return fT(this,t,i)},toJSONSchema(t){return Tz(this,{})(t)},get description(){return ur.get(this)?.description},get _def(){return this._zod.def}}),Wb=$("_ZodString",(t,i)=>{xd.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Rz(t,s,r)},vb({format:t=>rn(t).format??null,minLength:t=>rn(t).minimum??null,maxLength:t=>rn(t).maximum??null},{regex(...t){return this.check(fz(...t))},includes(...t){return this.check(mz(...t))},startsWith(...t){return this.check(pz(...t))},endsWith(...t){return this.check(gz(...t))},min(...t){return this.check(xo(...t))},max(...t){return this.check(qb(...t))},length(...t){return this.check(Bb(...t))},nonempty(...t){return this.check(xo(1,...t))},lowercase(t){return this.check(dz(t))},uppercase(t){return this.check(hz(t))},trim(){return this.check(vz())},normalize(...t){return this.check(yz(...t))},toLowerCase(){return this.check(bz())},toUpperCase(){return this.check(Sz())},slugify(){return this.check(xz())}})),e0=$("ZodString",(t,i)=>{xd.init(t,i),Wb.init(t,i)},{email(t){return this.check(kw(gT,t))},url(t){return this.check(Hw(vT,t))},jwt(t){return this.check(nz(MT,t))},emoji(t){return this.check($w(bT,t))},guid(t){return this.check(Uw(yT,t))},uuid(t){return this.check(Lw(Il,t))},uuidv4(t){return this.check(Zw(Il,t))},uuidv6(t){return this.check(qw(Il,t))},uuidv7(t){return this.check(Bw(Il,t))},nanoid(t){return this.check(Qw(ST,t))},cuid(t){return this.check(Gw(xT,t))},cuid2(t){return this.check(Kw(_T,t))},ulid(t){return this.check(Yw(ET,t))},base64(t){return this.check(Ww(AT,t))},base64url(t){return this.check(ez(RT,t))},xid(t){return this.check(Vw(OT,t))},ksuid(t){return this.check(Fw(wT,t))},ipv4(t){return this.check(Pw(zT,t))},ipv6(t){return this.check(Xw(TT,t))},cidrv4(t){return this.check(Jw(jT,t))},cidrv6(t){return this.check(Iw(NT,t))},e164(t){return this.check(tz(CT,t))},datetime(t){return this.check(Zb(t0,t))},date(t){return this.check(iz(hT,t))},time(t){return this.check(az(mT,t))},duration(t){return this.check(sz(pT,t))}});function Y(t){return Dw(e0,t)}const Ye=$("ZodStringFormat",(t,i)=>{$e.init(t,i),Wb.init(t,i)}),t0=$("ZodISODateTime",(t,i)=>{L2.init(t,i),Ye.init(t,i)}),hT=$("ZodISODate",(t,i)=>{Z2.init(t,i),Ye.init(t,i)}),mT=$("ZodISOTime",(t,i)=>{q2.init(t,i),Ye.init(t,i)}),pT=$("ZodISODuration",(t,i)=>{B2.init(t,i),Ye.init(t,i)}),gT=$("ZodEmail",(t,i)=>{E2.init(t,i),Ye.init(t,i)}),yT=$("ZodGUID",(t,i)=>{x2.init(t,i),Ye.init(t,i)}),Il=$("ZodUUID",(t,i)=>{_2.init(t,i),Ye.init(t,i)}),vT=$("ZodURL",(t,i)=>{N2.init(t,i),Ye.init(t,i)}),bT=$("ZodEmoji",(t,i)=>{A2.init(t,i),Ye.init(t,i)}),ST=$("ZodNanoID",(t,i)=>{R2.init(t,i),Ye.init(t,i)}),xT=$("ZodCUID",(t,i)=>{C2.init(t,i),Ye.init(t,i)}),_T=$("ZodCUID2",(t,i)=>{M2.init(t,i),Ye.init(t,i)}),ET=$("ZodULID",(t,i)=>{D2.init(t,i),Ye.init(t,i)}),OT=$("ZodXID",(t,i)=>{k2.init(t,i),Ye.init(t,i)}),wT=$("ZodKSUID",(t,i)=>{U2.init(t,i),Ye.init(t,i)}),zT=$("ZodIPv4",(t,i)=>{H2.init(t,i),Ye.init(t,i)}),TT=$("ZodIPv6",(t,i)=>{Q2.init(t,i),Ye.init(t,i)}),jT=$("ZodCIDRv4",(t,i)=>{G2.init(t,i),Ye.init(t,i)}),NT=$("ZodCIDRv6",(t,i)=>{Y2.init(t,i),Ye.init(t,i)}),AT=$("ZodBase64",(t,i)=>{V2.init(t,i),Ye.init(t,i)}),RT=$("ZodBase64URL",(t,i)=>{P2.init(t,i),Ye.init(t,i)}),CT=$("ZodE164",(t,i)=>{X2.init(t,i),Ye.init(t,i)}),MT=$("ZodJWT",(t,i)=>{I2.init(t,i),Ye.init(t,i)}),n0=$("ZodNumber",(t,i)=>{Rb.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Cz(t,s,r,o),t.isFinite=!0},vb({minValue:t=>{const{minimum:i,exclusiveMinimum:s}=rn(t);return Math.max(i??Number.NEGATIVE_INFINITY,s??Number.NEGATIVE_INFINITY)},maxValue:t=>{const{maximum:i,exclusiveMaximum:s}=rn(t);return Math.min(i??Number.POSITIVE_INFINITY,s??Number.POSITIVE_INFINITY)},isInt:t=>{const{isInt:i,multipleOf:s}=rn(t);return!!i||!!s?.some(Number.isSafeInteger)},format:t=>rn(t).format??null},{gt(t,i){return this.check(Qy(t,i))},gte(t,i){return this.check(xf(t,i))},min(t,i){return this.check(xf(t,i))},lt(t,i){return this.check($y(t,i))},lte(t,i){return this.check(Sf(t,i))},max(t,i){return this.check(Sf(t,i))},int(t){return this.check(Wy(t))},safe(t){return this.check(Wy(t))},positive(t){return this.check(Qy(0,t))},nonnegative(t){return this.check(xf(0,t))},negative(t){return this.check($y(0,t))},nonpositive(t){return this.check(Sf(0,t))},multipleOf(t,i){return this.check(Gy(t,i))},step(t,i){return this.check(Gy(t,i))},finite(){return this}}));function Qe(t){return rz(n0,t)}const DT=$("ZodNumberFormat",(t,i)=>{W2.init(t,i),n0.init(t,i)});function Wy(t){return lz(DT,t)}const kT=$("ZodBoolean",(t,i)=>{ew.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Mz(t,s,r)});function Wt(t){return oz(kT,t)}const UT=$("ZodUnknown",(t,i)=>{tw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>kz()});function Ff(){return uz(UT)}const LT=$("ZodNever",(t,i)=>{nw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Dz(t,s,r)});function ZT(t){return cz(LT,t)}const i0=$("ZodArray",(t,i)=>{Mo(),sw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Bz(t,s,r,o),t.element=i.element},{min(t,i){return this.check(xo(t,i))},nonempty(t){return this.check(xo(1,t))},max(t,i){return this.check(qb(t,i))},length(t,i){return this.check(Bb(t,i))},unwrap(){return this.element}});function _e(t,i){return _z(i0,t,i)}const qT=$("ZodObject",(t,i)=>{Mo(),ow.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Hz(t,s,r,o),rO(t,"shape",s=>s._zod.def.shape,!1)},{keyof(){return jt(Object.keys(this._zod.def.shape))},catchall(t){return this.clone($t(this._zod.def,{catchall:t}))},passthrough(){return this.clone($t(this._zod.def,{catchall:Ff()}))},loose(){return this.clone($t(this._zod.def,{catchall:Ff()}))},strict(){return this.clone($t(this._zod.def,{catchall:ZT()}))},strip(){return this.clone($t(this._zod.def,{catchall:void 0}))},extend(t){return PE(this,t)},safeExtend(t){return XE(this,t)},merge(t){return JE(this,t)},pick(t){return VE(this,t)},omit(t){return FE(this,t)},partial(...t){return Oy(a0,this,t[0])},exactPartial(...t){return Oy(s0,this,t[0],"exactPartial")},required(...t){return IE(l0,this,t[0])}});function re(t,i){const s={type:"object",shape:t??{},...ie(i)};return new qT(s)}const BT=$("ZodUnion",(t,i)=>{uw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>$z(t,s,r,o),t.options=i.options});function Do(t,i){return new BT({type:"union",options:t,...ie(i)})}const HT=$("ZodIntersection",(t,i)=>{cw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Qz(t,s,r,o)});function $T(t,i){return new HT({type:"intersection",left:t,right:i})}const ev=$("ZodRecord",(t,i)=>{Mo(),fw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Kz(t,s,r,o),t.keyType=i.keyType,t.valueType=i.valueType});function QT(t,i,s){return!i||!i._zod?new ev({type:"record",keyType:Y(),valueType:t,...ie(i)}):new ev({type:"record",keyType:t,valueType:i,...ie(s)})}const Oo=$("ZodEnum",(t,i)=>{dw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(r,o,c)=>Uz(t,r,o),t.enum=i.entries,t.options=[...t._zod.values];const s=new Set(Object.keys(i.entries));t.extract=(r,o)=>{const c={};for(const d of r)if(s.has(d))c[d]=i.entries[d];else throw new Error(`Key ${d} not found in enum`);return new Oo({...i,checks:[],...ie(o),entries:c})},t.exclude=(r,o)=>{const c={...i.entries};for(const d of r)if(s.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new Oo({...i,checks:[],...ie(o),entries:c})}});function jt(t,i){const s=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new Oo({type:"enum",entries:s,...ie(i)})}const GT=$("ZodLiteral",(t,i)=>{hw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Lz(t,s,r,o),t.values=new Set(i.values),Object.defineProperty(t,"value",{get(){if(i.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return i.values[0]}})});function pi(t,i){return new GT({type:"literal",values:Array.isArray(t)?t:[t],...ie(i)})}const KT=$("ZodTransform",(t,i)=>{Mo(),mw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>qz(t,s,r,o),t._zod.parse=(s,r)=>{if(r.direction==="backward")throw new bb(t.constructor.name);s.addIssue=c=>{if(typeof c=="string")s.issues.push(br(c,s.value,i));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=s.value),d.inst??(d.inst=t),s.issues.push(br(d))}};const o=i.transform(s.value,s);return o instanceof Promise?o.then(c=>(s.value=c,s)):(s.value=o,s)}});function YT(t){return new KT({type:"transform",transform:t})}const a0=$("ZodOptional",(t,i)=>{Db.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Ib(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function tv(t){return new a0({type:"optional",innerType:t})}const s0=$("ZodExactOptional",(t,i)=>{pw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Ib(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function VT(t){return new s0({type:"optional",innerType:t})}const FT=$("ZodNullable",(t,i)=>{gw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Yz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function nv(t){return new FT({type:"nullable",innerType:t})}const r0=$("ZodDefault",(t,i)=>{yw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Fz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function PT(t,i){return new r0({type:"default",innerType:t,get defaultValue(){return typeof i=="function"?i():hb(i)}})}const XT=$("ZodPrefault",(t,i)=>{vw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Pz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function JT(t,i){return new XT({type:"prefault",innerType:t,get defaultValue(){return typeof i=="function"?i():hb(i)}})}const l0=$("ZodNonOptional",(t,i)=>{bw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Vz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function IT(t,i){return new l0({type:"nonoptional",innerType:t,...ie(i)})}const WT=$("ZodCatch",(t,i)=>{Sw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Xz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function ej(t,i){return new WT({type:"catch",innerType:t,catchValue:typeof i=="function"?i:oO(i)})}const tj=$("ZodPipe",(t,i)=>{xw.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Jz(t,s,r,o),t.in=i.in,t.out=i.out});function iv(t,i){return new tj({type:"pipe",in:t,out:i})}const nj=$("ZodReadonly",(t,i)=>{_w.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Iz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function ij(t){return new nj({type:"readonly",innerType:t})}const aj=$("ZodCustom",(t,i)=>{Ew.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Zz(t,s,r,o)});function sj(t,i={}){return Ez(aj,t,i)}function rj(t,i){return Oz(t,i)}function lj(t){return Zb(t0,t)}const dt=Y().regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"kebab-case required"),o0=Y().regex(/^package:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"expected package:<kebab-case-name>"),oj=re({method:jt(["GET","POST","PUT","PATCH","DELETE"]),path:Y().startsWith("/api/"),description:Y().min(10),schemaInput:Y().describe("Exported name of the input Zod schema, e.g. CreateOrderInputSchema"),schemaOutput:Y().describe("Exported name of the output Zod schema"),invalidates:_e(Y()).optional().describe("Cache roots this mutation stales BEYOND its own path root (cross-feature dependency, read by the manifest-derived client — never guessed in a screen). Each value must be an existing feature name or route root")}),uj=jt(["reference","ownerless"]),cj=Do([Y(),re({name:Y(),shared:pi(!0),sharedKind:uj.optional()})]),fj=re({name:dt,intent:Y().min(20).max(300).describe("The feature's 'why' in 1-3 sentences"),app:Y().optional().describe("Name of the owning app (apps[].name); defaults to the api app"),folder:Y().describe("Path relative to the app root, e.g. src/features/orders"),spec:Y().nullable().describe("Path to the spec, e.g. specs/orders.spec.md, null for technical features"),routes:_e(oj),dbTables:_e(cj).describe("Drizzle tables owned by this feature (one table = one owner). String = tenant-scoped; { name, shared: true } = shared referential"),dependsOn:_e(Do([dt,o0])).describe("Features imported through their index.ts, and product packages as package:<name> — nothing else"),status:jt(["skeleton","in-progress","delivered"])}),dj=Y().regex(/^\d+\.\d+\.\d+$/,"expected a plain x.y.z version"),hj=re({packages:_e(re({name:Y().describe("Published npm name, e.g. @ogygie/core"),path:Y().describe("Folder relative to the repo root"),intent:Y().min(20),spec:Y().nullable(),status:jt(["skeleton","in-progress","delivered"])})),templates:re({project:Y().describe("Folder copied by `ogygie init`"),feature:Y().describe("Reserved for `ogygie generate feature` (not wired yet)")}),governedFiles:Y().describe("Module declaring the exhaustive list of files `upgrade` may overwrite (D3)")}),mj=re({canonical:Y().regex(/^[a-z][a-zA-Z0-9]*$/,"camelCase English term required").describe("The one machine term for this concept, e.g. gadget"),forbiddenAliases:_e(Y().min(2).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"lowercase root (kebab-case allowed) required")).min(1).describe("Roots the code may never carry for this concept, e.g. widget"),reference:Y().optional().describe("Anchor into AGENTS.product.md where the concept is explained")}),pj=re({entries:_e(mj)}),gj=re({name:dt,path:Y().describe("Folder relative to the repo root, e.g. packages/solver"),intent:Y().min(20).max(300).describe("The package's 'why' in 1-3 sentences"),spec:Y().nullable(),dependsOn:_e(o0).describe("Other PRODUCT packages, as package:<name> — never a feature: a package that depended on one would live under an app, and would be a feature"),status:jt(["skeleton","in-progress","delivered"])}),yj=re({column:Y().min(1).describe("SQL name of the tenant column, e.g. workspace_id — the one AGENTS.product.md announces"),rawDbAllowed:_e(dt).default([]).describe("Features allowed to reach the raw database: the tenancy socle, which BUILDS the contexts and therefore predates them. Every other feature goes through tenantDb")}),vj=re({version:pi(1),product:re({name:Y(),description:Y().min(20)}),ogygieVersion:dj.optional(),framework:hj.optional(),apps:_e(re({name:Y(),path:Y(),type:jt(["api","front","gateway"]),entryPoint:Y(),vendored:pi(!0).optional()})),features:_e(fj),tenancy:yj.optional().describe("Product values the framework gates need — absent, the tenancy checks do not run"),packages:_e(gj).optional().describe("Product code living outside every app — libraries, engines. Absent = the project has none"),vocabulary:pj.optional().describe("The product's closed vocabulary — declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"),conventions:re({agentsMd:pi("AGENTS.md"),failuresMd:pi("FAILURES.md"),specsFolder:pi("specs/")})}).superRefine((t,i)=>{const s=new Set(t.features.map(g=>g.name)),r=new Set;(t.packages??[]).forEach((g,x)=>{s.has(g.name)&&i.addIssue({code:"custom",path:["packages",x,"name"],message:`"${g.name}" is already the name of a feature — one name designates one thing`}),r.has(g.name)&&i.addIssue({code:"custom",path:["packages",x,"name"],message:`package "${g.name}" is declared twice`}),r.add(g.name)});const o=g=>(g.split("/").pop()??g).replace(/\.spec\.md$/,""),c=new Set([...t.features.map(g=>g.name),...r]);(t.framework?.packages??[]).forEach((g,x)=>{if(g.spec===null)return;const S=o(g.spec);c.has(S)&&i.addIssue({code:"custom",path:["framework","packages",x,"spec"],message:`spec "${S}" is already owned by a feature or a product package — one spec, one owner`})});const d=(g,x)=>{g.forEach((S,E)=>{if(!S.startsWith("package:"))return;const O=S.slice(8);r.has(O)||i.addIssue({code:"custom",path:[...x,E],message:`dependency "${S}" matches no declared package`})})};t.features.forEach((g,x)=>{d(g.dependsOn,["features",x,"dependsOn"])}),(t.packages??[]).forEach((g,x)=>{d(g.dependsOn,["packages",x,"dependsOn"])}),(t.tenancy?.rawDbAllowed??[]).forEach((g,x)=>{s.has(g)||i.addIssue({code:"custom",path:["tenancy","rawDbAllowed",x],message:`"${g}" matches no declared feature`})});const h=new Map,m=new Map;(t.vocabulary?.entries??[]).forEach((g,x)=>{const S=g.canonical.toLowerCase(),E=h.get(S);E!==void 0?i.addIssue({code:"custom",path:["vocabulary","entries",x,"canonical"],message:`canonical "${g.canonical}" is already declared by entry ${E}`}):h.set(S,x)}),(t.vocabulary?.entries??[]).forEach((g,x)=>{g.forbiddenAliases.forEach((S,E)=>{const O=["vocabulary","entries",x,"forbiddenAliases",E],T=h.get(S);if(T!==void 0){i.addIssue({code:"custom",path:O,message:`alias "${S}" is the canonical term of entry ${T} — a term cannot be both`});return}const R=m.get(S);if(R!==void 0){i.addIssue({code:"custom",path:O,message:`alias "${S}" is already forbidden by entry ${R} — one alias belongs to one concept`});return}m.set(S,x)})});const p=new Map(t.apps.map(g=>[g.name,g])),v=new Set(t.features.map(g=>g.name));for(const g of t.features)for(const x of g.routes){const S=x.path.split("/")[2];S!==void 0&&v.add(S)}t.features.forEach((g,x)=>{g.routes.forEach((S,E)=>{for(const O of S.invalidates??[])v.has(O)||i.addIssue({code:"custom",path:["features",x,"routes",E,"invalidates"],message:`invalidates target "${O}" matches no feature name and no route root`})})}),t.features.forEach((g,x)=>{if(g.app===void 0)return;const S=p.get(g.app);if(S===void 0){i.addIssue({code:"custom",path:["features",x,"app"],message:`app "${g.app}" is not declared in apps[]`});return}S.type!=="api"&&(g.routes.length>0||g.dbTables.length>0)&&i.addIssue({code:"custom",path:["features",x],message:"a non-api feature owns no HTTP routes and no DB tables — declare them on the api feature"})})}),bj=Y().regex(/^.+ blockedBy:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,'Expected "<behavior> blockedBy:<feature-name>" (feature name in kebab-case)'),os=re({id:dt.describe("Identical to the feature name in the manifest"),status:jt(["draft","validated","implemented"]),depends_on:_e(dt),priority:jt(["P0","P1","P2"]),refs:_e(Y()).default([]).describe("References to the domain model, e.g. 'modele-gally §4.2'"),deferred:_e(bj).default([]).describe("Behaviors deferred to a later feature, blocked by name")}),Ja=["# @intent","# Comportements","# Contrats de données","# États UI","# Non-objectifs","# Budget"],u0=re({ogygie:pi(!0).describe("Marker: lets an agent tell our errors from noise"),code:Y().regex(/^[A-Z][A-Z0-9_]+$/,"SCREAMING_SNAKE_CASE, stable over time"),message:Y().min(10).describe("Human-readable sentence (technical English)"),file:Y().nullable().describe("Relative path of the file involved, null when not localizable"),cause:Y().describe("The precise datum or condition that triggered the error"),suggestedFix:Y().describe("Concrete action to fix — never empty"),details:QT(Y(),Ff()).default({}),timestamp:lj()});class Od extends Error{payload;constructor(i){super(i.message),this.name="StudioApiError",this.payload=i}}async function pt(t,i,s){const r=await fetch(t,s),o=await r.json();if(!r.ok){const c=u0.safeParse(o);throw c.success?new Od(c.data):new Error(`HTTP ${r.status} on ${t} (non-OgygieError payload)`)}return i.parse(o)}function xr(t){return{headers:{"content-type":"application/json"},body:JSON.stringify(t)}}const Sj=os.shape.status,wd=re({id:dt,status:Sj,priority:os.shape.priority,depends_on:_e(dt),filePath:Y(),presentSections:_e(Y())}),xj=re({id:Y(),filePath:Y(),error:u0}),_j=Do([wd,xj]),Ej=re({specs:_e(_j)});re({specId:dt});const Oj=re({frontmatter:os,body:Y(),presentSections:_e(Y())});re({frontmatter:os,body:Y().max(2e5).optional()});const wj=re({spec:wd});re({id:dt.max(80)});const zj=re({spec:wd}),Tj=re({manifest:vj}),jj=re({name:Y().min(1).max(200),contentBase64:Y().min(1).max(57e5)});re({brief:Y().min(50).max(2e4),specId:dt.optional(),attachments:_e(jj).max(5).default([])});const Nj=re({specId:dt,attempts:Qe().int().min(1).max(2),problemsFixed:_e(Y()),isNewFeature:Wt(),isAmendment:Wt(),compositions:_e(Y()).default([]),generation:re({derivable:Qe().int().nonnegative(),hole:Qe().int().nonnegative()}).nullable().default(null),usage:_e(re({model:Y(),inputTokens:Qe().int().nonnegative(),outputTokens:Qe().int().nonnegative()}))}),c0=jt(["green","red","pending","none"]),Aj=re({specId:dt,branch:Y(),pullRequest:re({number:Qe().int().positive(),url:Y(),headSha:Y(),title:Y()}).nullable(),specStatus:jt(["draft","validated","implemented","unreadable","absent"]),checks:c0,checkRuns:_e(re({name:Y(),conclusion:Y().nullable()})),mergeable:Wt().nullable(),requiredRole:jt(["approver","operator"]),canMerge:Wt(),blockers:_e(Y()),labels:_e(Y()).default([]),needsOperator:Wt().default(!1)}),Rj=re({pullRequests:_e(re({specId:dt,number:Qe().int().positive(),url:Y(),checks:c0,needsOperator:Wt().default(!1)}))}),Cj=re({specId:dt,pullRequestNumber:Qe().int().positive(),mergeSha:Y(),mergedBy:Y(),mergedAt:Y()}),Mj=jt(["development","staging","production"]),f0=jt(["staging","production"]);re({environment:f0});const Dj=re({environments:_e(re({name:Mj,ref:Y(),sha:Y().nullable(),deployment:re({id:Qe().int(),state:Y().nullable(),createdAt:Y()}).nullable()})),releases:_e(Y())});re({sha:Y().regex(/^[0-9a-f]{40}$/),rollback:Wt().optional(),reason:Y().min(10).max(2e3).optional()});const kj=re({environment:f0,fromSha:Y().nullable(),toSha:Y(),actor:Y(),at:Y(),deploymentId:Qe().int(),releaseTag:Y().nullable(),includedPullRequests:_e(re({number:Qe().int(),specId:Y().nullable(),message:Y(),authoredAt:Y()})),destructiveMigration:Wt(),rollback:Wt()});re({month:Y().regex(/^\d{4}-\d{2}$/).optional()});const Uj=re({month:Y(),specs:_e(re({specId:Y(),pullRequestNumber:Qe().int(),runs:Qe().int(),inputTokens:Qe().int(),outputTokens:Qe().int(),estimatedUsd:Qe(),uncostedModels:_e(Y())})),totals:re({runs:Qe().int(),inputTokens:Qe().int(),outputTokens:Qe().int(),estimatedUsd:Qe()}),budgetUsd:Qe().nullable(),budgetRatio:Qe().nullable(),warning:Wt()}),av=re({state:Y(),path:Y(),sizeBytes:Qe().int().nonnegative()}),Lj=re({specId:dt,previews:_e(av),composition:Y().nullable().default(null),compositions:_e(re({name:Y(),selected:Wt(),previews:_e(av)})).default([])}),Zj=re({specId:dt,composition:Y(),alreadySelected:Wt()});function qj(){return Hn({queryKey:["specs"],queryFn:()=>pt("/api/specs",Ej)})}function Bj(t){return Hn({queryKey:["specs",t],queryFn:()=>pt(`/api/specs/${t}`,Oj)})}function Hj(){return Hn({queryKey:["manifest"],queryFn:()=>pt("/api/manifest",Tj)})}function $j(t){const i=wi();return ss({mutationFn:s=>pt(`/api/specs/${t}`,wj,{method:"PUT",...xr(s)}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}function Qj(){const t=wi();return ss({mutationFn:i=>pt("/api/specs",zj,{method:"POST",...xr(i)}),onSuccess:async()=>{await t.invalidateQueries({queryKey:["specs"]})}})}const Gj=re({email:Y(),displayName:Y(),role:Y()});function ko(){return Hn({queryKey:["me"],queryFn:()=>pt("/api/auth/me",Gj),retry:!1})}function Kj(){const t=wi();return ss({mutationFn:i=>pt("/api/briefs",Nj,{method:"POST",...xr(i)}),onSuccess:async()=>{await t.invalidateQueries({queryKey:["specs"]})}})}function Yj(t){return Hn({queryKey:["specs",t,"pull-request"],queryFn:()=>pt(`/api/specs/${t}/pull-request`,Aj),retry:!1})}function Vj(t){return Hn({queryKey:["pull-requests"],queryFn:()=>pt("/api/pull-requests",Rj),enabled:t,retry:!1})}function Fj(t){const i=wi();return ss({mutationFn:()=>pt(`/api/specs/${t}/merge`,Cj,{method:"POST"}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}function Pj(){return Hn({queryKey:["environments"],queryFn:()=>pt("/api/environments",Dj),retry:!1})}function Xj(){const t=wi();return ss({mutationFn:i=>{const{environment:s,...r}=i;return pt(`/api/environments/${s}/promotions`,kj,{method:"POST",...xr(r)})},onSuccess:async()=>{await t.invalidateQueries({queryKey:["environments"]})}})}function Jj(t){return Hn({queryKey:["consumption",t],queryFn:()=>pt(`/api/consumption?month=${t}`,Uj),retry:!1})}function Ij(t){return Hn({queryKey:["specs",t,"previews"],queryFn:()=>pt(`/api/specs/${t}/previews`,Lj),retry:!1})}function Wj(t){const i=wi();return ss({mutationFn:s=>pt(`/api/specs/${t}/compositions/${s}/select`,Zj,{method:"POST"}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}const eN={primary:"bg-accent text-accent-contrast hover:bg-accent-strong shadow-raised",secondary:"border border-border bg-surface-raised text-text hover:border-border-strong hover:bg-surface-sunken",danger:"bg-danger-soft text-danger border border-danger/40 hover:border-danger",ghost:"text-text-muted hover:text-text hover:bg-surface-sunken"};function mt({voice:t="secondary",size:i="md",className:s="",type:r="button",children:o,...c}){const d=i==="sm"?"px-2.5 py-1 text-xs":"px-3.5 py-2 text-sm";return b.jsx("button",{type:r,className:`inline-flex items-center justify-center gap-2 rounded-md font-medium transition-[background-color,border-color,color,transform] duration-(--duration-fast) ease-swell active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 ${d} ${eN[t]} ${s}`,...c,children:o})}const tN={neutral:"bg-surface-sunken text-text-muted border-border",accent:"bg-accent-soft text-accent border-accent/30",positive:"bg-positive-soft text-positive border-positive/30",warning:"bg-warning-soft text-warning border-warning/30",danger:"bg-danger-soft text-danger border-danger/30",orichalcum:"bg-surface-sunken text-orichalcum border-orichalcum/40"};function ft({tone:t="neutral",mono:i=!1,children:s,title:r}){return b.jsx("span",{title:r,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium leading-tight ${i?"font-mono":""} ${tN[t]}`,children:s})}function d0({status:t}){const i=t==="validated"?"accent":t==="implemented"?"positive":"neutral";return b.jsx(ft,{tone:i,children:t})}function h0({title:t,hint:i,action:s}){return b.jsxs("div",{className:"studio-rise flex flex-col items-center gap-3 rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 px-6 py-12 text-center",children:[b.jsx("p",{className:"font-display text-xl font-semibold text-text",children:t}),i!==void 0&&b.jsx("p",{className:"max-w-md text-sm text-text-muted",children:i}),s]})}function nN(t){return t instanceof Od?t.payload:null}function Nt({error:t}){const i=nN(t);if(i===null){const s=t instanceof Error?t.message:String(t);return b.jsx("div",{role:"alert",className:"rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:s})}return b.jsx(m0,{error:i})}function m0({error:t}){return b.jsxs("div",{role:"alert",className:"studio-rise rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:[b.jsx("p",{className:"font-mono text-xs font-bold uppercase tracking-wide text-danger",children:t.code}),b.jsx("p",{className:"mt-1 font-medium",children:t.message}),b.jsxs("dl",{className:"mt-2 space-y-1 text-xs text-text-muted",children:[t.file!=null&&b.jsxs("div",{className:"flex gap-2",children:[b.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Fichier"}),b.jsx("dd",{className:"font-mono",children:t.file})]}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Cause"}),b.jsx("dd",{className:"font-mono break-all",children:t.cause})]}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Correction suggérée"}),b.jsx("dd",{children:t.suggestedFix})]})]})]})}var iN=mv();function p0({open:t,title:i,children:s,onClose:r}){return X.useEffect(()=>{if(!t)return;const o=c=>{c.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t,r]),t?iN.createPortal(b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-surface-sunken/70 p-4 backdrop-blur-sm",children:b.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":i,className:"studio-rise w-full max-w-md rounded-lg border border-border bg-surface-raised p-5 shadow-overlay",children:[b.jsxs("div",{className:"flex items-start justify-between gap-4",children:[b.jsx("h2",{className:"font-display text-xl font-semibold text-text",children:i}),b.jsx("button",{type:"button",onClick:r,className:"rounded p-1 text-text-faint transition-colors hover:bg-surface-sunken hover:text-text","aria-label":"Fermer",children:"✕"})]}),b.jsx("div",{className:"mt-3 text-sm text-text-muted",children:s})]})}),document.body):null}function _r({eyebrow:t,title:i,explanation:s,actions:r}){return b.jsxs("header",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[b.jsxs("div",{className:"min-w-0",children:[t!==void 0&&b.jsx("p",{className:"mb-1 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:t}),b.jsx("h1",{className:"font-display text-2xl font-semibold leading-tight text-text",children:i}),s!==void 0&&b.jsx("p",{className:"mt-1 max-w-2xl text-sm text-text-muted",children:s})]}),r!==void 0&&b.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:r})]})}function Oi({children:t,className:i="",...s}){return b.jsx("section",{className:`rounded-lg border border-border bg-surface-raised p-4 shadow-raised ${i}`,...s,children:t})}const aN=[{status:"draft",title:"Draft",explanation:"en écriture",accent:"border-t-border-strong"},{status:"validated",title:"Validated",explanation:"signées, à implémenter",accent:"border-t-accent"},{status:"implemented",title:"Implemented",explanation:"livrées",accent:"border-t-positive"}],sN={P0:"danger",P1:"accent",P2:"neutral"},rN={green:"positive",red:"danger",pending:"warning",none:"neutral"},lN={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"};function sv(t){return!("error"in t)}function oN(t){return t instanceof HTMLElement&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable)}function uN(){const{data:t,isPending:i,error:s}=qj(),r=ko(),o=Vj(r.data!==void 0),[c,d]=X.useState(""),[h,m]=X.useState(!1),p=X.useRef(null);if(X.useEffect(()=>{const O=T=>{T.metaKey||T.ctrlKey||T.altKey||oN(T.target)||(T.key==="/"?(T.preventDefault(),p.current?.focus()):T.key==="n"&&(T.preventDefault(),m(!0)))};return window.addEventListener("keydown",O),()=>window.removeEventListener("keydown",O)},[]),s)return b.jsx(Nt,{error:s});if(i)return b.jsx(dN,{});const v=t.specs.filter(sv),g=t.specs.filter(O=>!sv(O));if(t.specs.length===0)return b.jsx(h0,{title:"Aucune spec dans ce repo",hint:"Créez la première depuis le template canonique — elle naîtra en draft.",action:b.jsx(rv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})});const x=c.trim().toLowerCase(),S=O=>x===""||O.id.includes(x)||O.depends_on.some(T=>T.includes(x)),E=new Map((o.data?.pullRequests??[]).map(O=>[O.specId,O]));return b.jsxs("div",{className:"space-y-6",children:[b.jsx(_r,{eyebrow:"Specs",title:"Board",explanation:`${v.length} spec${v.length>1?"s":""} lisible${v.length>1?"s":""} · le repo est l'état, le board n'est qu'une vue.`,actions:b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:p,type:"search",value:c,onChange:O=>d(O.target.value),placeholder:"Filtrer ( / )","aria-label":"Filtrer les specs",className:"w-44 rounded-md border border-border bg-surface-raised px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),b.jsx(rv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})]})}),g.length>0&&b.jsx("section",{"aria-label":"Specs illisibles",className:"space-y-2",children:g.map(O=>b.jsx(m0,{error:O.error},O.filePath))}),b.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:aN.map(O=>b.jsx(cN,{column:O,specs:v.filter(T=>T.status===O.status&&S(T)),pullsBySpec:E},O.status))})]})}function cN({column:t,specs:i,pullsBySpec:s}){return b.jsxs("section",{"aria-label":`Colonne ${t.title}`,className:`flex flex-col rounded-lg border border-border border-t-2 bg-surface-sunken/50 p-3 ${t.accent}`,children:[b.jsxs("h2",{className:"mb-3 flex items-baseline justify-between px-1",children:[b.jsxs("span",{className:"font-display text-lg font-semibold text-text",children:[t.title," ",b.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:t.explanation})]}),b.jsx(cd,{value:i.length,className:"font-mono text-xs text-text-faint"})]}),i.length===0?b.jsx("p",{className:"rounded-md border border-dashed border-border px-3 py-6 text-center text-xs text-text-faint",children:"Aucune spec ici"}):b.jsx("ul",{className:"space-y-2",children:i.map((r,o)=>b.jsx("li",{className:"studio-reveal",style:{"--i":o},children:b.jsx(fN,{summary:r,pull:s.get(r.id)})},r.id))})]})}function fN({summary:t,pull:i}){const s=new Set(t.presentSections);return b.jsxs(rs,{to:"/specs/$specId",params:{specId:t.id},className:"group block rounded-md border border-border bg-surface-raised p-3 shadow-raised transition-[border-color,transform,box-shadow] duration-(--duration-base) ease-swell hover:-translate-y-0.5 hover:border-accent/60 hover:shadow-overlay",children:[b.jsxs("div",{className:"flex items-start justify-between gap-2",children:[b.jsx("p",{className:"min-w-0 truncate font-mono text-sm font-medium text-text group-hover:text-accent",children:t.id}),b.jsx(ft,{tone:sN[t.priority]??"neutral",children:t.priority})]}),b.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[b.jsx("ul",{"aria-label":`${s.size} sections sur ${Ja.length}`,className:"flex flex-1 gap-0.5",children:Ja.map(r=>b.jsx("li",{title:r,className:`h-1 flex-1 rounded-full ${s.has(r)?"bg-accent":"bg-border"}`},r))}),b.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[s.size,"/",Ja.length]})]}),(t.depends_on.length>0||i!==void 0)&&b.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[i!==void 0&&b.jsxs(ft,{tone:i.needsOperator?"orichalcum":rN[i.checks]??"neutral",mono:!0,title:i.needsOperator?"en attente de l'opérateur (needs-operator)":lN[i.checks]??i.checks,children:["#",i.number,i.needsOperator&&b.jsx("span",{"aria-hidden":"true",children:" ⚑"})]}),t.depends_on.map(r=>b.jsxs(ft,{mono:!0,title:`dépend de ${r}`,children:["← ",r]},r))]})]})}function dN(){return b.jsx("div",{"aria-label":"Chargement du board",className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[0,1,2].map(t=>b.jsx("div",{className:"studio-breathe h-64 rounded-lg border border-border"},t))})}function rv({open:t,onOpen:i,onClose:s}){const[r,o]=X.useState(""),c=jo(),d=Qj(),h=()=>{d.mutate({id:r},{onSuccess:async m=>{s(),await c({to:"/specs/$specId",params:{specId:m.spec.id}})}})};return b.jsxs(b.Fragment,{children:[b.jsx(mt,{voice:"primary",onClick:()=>{d.reset(),o(""),i()},children:"Nouvelle spec"}),b.jsx(p0,{open:t,title:"Nouvelle spec depuis le template",onClose:s,children:b.jsxs("form",{onSubmit:m=>{m.preventDefault(),h()},className:"space-y-3",children:[b.jsxs("label",{className:"block text-sm text-text-muted",children:["Identifiant (kebab-case, il nomme le fichier specs/<id>.spec.md)",b.jsx("input",{value:r,onChange:m=>o(m.target.value),placeholder:"ma-nouvelle-feature",autoFocus:!0,className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 font-mono text-sm text-text focus:border-accent"})]}),d.error instanceof Od&&b.jsx(Nt,{error:d.error}),b.jsxs("div",{className:"flex justify-end gap-2",children:[b.jsx(mt,{voice:"ghost",onClick:s,children:"Annuler"}),b.jsx(mt,{voice:"primary",type:"submit",disabled:d.isPending||r==="",children:"Créer en draft"})]})]})})]})}function hN(t){const i=`
66
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of t.seen.entries()){const h=d[1];if(i===d[0]){c(d);continue}if(t.external){const p=t.external.registry.get(d[0])?.id;if(i!==d[0]&&p){c(d);continue}}if(t.metadataRegistry.get(d[0])?.id){c(d);continue}if(h.cycle){c(d);continue}h.count>1&&t.reused==="ref"&&c(d)}t.external&&(t.sharedDefsExtractedFor=t.external)}function Qb(t){const i=t.anyOf;if(!Array.isArray(i)||i.length===0||t.type!==void 0)return;const s=[];for(const r of i){if(!r||typeof r!="object")return;Qb(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const c=r.type;for(const d of Array.isArray(c)?c:[c]){if(typeof d!="string")return;s.includes(d)||s.push(d)}}delete t.anyOf,t.type=s.length===1?s[0]:s}const Gb=new Set(["type","properties","required","additionalProperties"]),Yy=["oneOf","anyOf"];function Fy(t){const i=t.additionalProperties;return i===void 0||i===!1||typeof i!="object"||i===null?null:Object.keys(i).length?i:null}function Kf(t){const i=[];for(const c of t){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!Gb.has(d))return null;i.push(c)}const s={},r=new Set;for(const c of i){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(s,d))continue;const h=[];for(const p of i){const v=p.properties?.[d]??Fy(p);v!=null&&(h.some(y=>JSON.stringify(y)===JSON.stringify(v))||h.push(v))}const m=h.length===1?h[0]:Kf(h)??{allOf:h};zi(s,d,m)}for(const d of c.required??[])r.add(d)}const o={type:"object",properties:s};if(r.size&&(o.required=[...r]),i.every(c=>c.additionalProperties===!1))o.additionalProperties=!1;else{const c=[];for(const d of i){const h=Fy(d);h&&!c.some(m=>JSON.stringify(m)===JSON.stringify(h))&&c.push(h)}c.length===1?o.additionalProperties=c[0]:c.length>1&&(o.additionalProperties={allOf:c})}return o}function jz(t){const i=t.allOf;if(!Array.isArray(i)||i.length<2)return;for(const o of Gb)if(o in t)return;const s=i.filter(o=>Yy.some(c=>Array.isArray(o[c])));let r=null;if(!s.length)r=Kf(i);else{const o=s[0],c=Yy.find(m=>Array.isArray(o[m]));if(Object.keys(o).length!==1)return;const d=i.filter(m=>m!==o),h=o[c].map(m=>Kf([...d,m]));if(h.some(m=>!m))return;r={[c]:h}}r&&(delete t.allOf,hr(t,r))}function Kb(t,i){const s=t.seen.get(i);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const m=t.seen.get(h);if(m.ref===null)return;const p=m.def??m.schema,v={...p},y=m.ref;if(m.ref=null,y){r(y);const x=t.seen.get(y),E=x.schema;if(E.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(p.allOf=p.allOf??[],p.allOf.push(E)):hr(p,E),hr(p,v),h._zod.parent===y)for(const z in p)z==="$ref"||z==="allOf"||z in v||delete p[z];if(E.$ref&&x.def)for(const z in p)z==="$ref"||z==="allOf"||z in x.def&&JSON.stringify(p[z])===JSON.stringify(x.def[z])&&delete p[z]}const S=h._zod.parent;if(S&&S!==y){r(S);const x=t.seen.get(S);if(x?.schema.$ref&&(p.$ref=x.schema.$ref,x.def))for(const E in p)E==="$ref"||E==="allOf"||E in x.def&&JSON.stringify(p[E])===JSON.stringify(x.def[E])&&delete p[E]}t.override({zodSchema:h,jsonSchema:p,path:m.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(const h of[...t.seen.entries()].reverse())r(h[0]);if(t.target!=="openapi-3.0")for(const h of t.seen.entries())Qb(h[1].def??h[1].schema);for(const h of t.deferred)h();if(t.intersections.length){const h=new Map;for(const m of t.seen.values())for(const p of[m.schema,m.def]){const v=p?.allOf;if(!Array.isArray(v))continue;const y=h.get(v);y?y.push(p):h.set(v,[p])}for(const m of t.intersections)for(const p of h.get(m)??[])jz(p)}}const o={};if(t.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const h=t.external.registry.get(i)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(h)}hr(o,s.defId?s.schema:s.def??s.schema);const c=t.metadataRegistry.get(i)?.id;c!==void 0&&o.id===c&&delete o.id;const d=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(const h of t.seen.entries()){const m=h[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,zi(d,m.defId,m.def))}t.external&&(t.sharedEmitDoneFor=t.external),t.external||Object.keys(d).length>0&&(t.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...i["~standard"],jsonSchema:{input:Eo(i,"input",t.processors),output:Eo(i,"output",t.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function yt(t,i){const s=i??{seen:new Set};if(s.seen.has(t))return!1;s.seen.add(t);const r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return yt(r.element,s);if(r.type==="set")return yt(r.valueType,s);if(r.type==="lazy")return yt(r.getter(),s);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return yt(r.innerType,s);if(r.type==="intersection")return yt(r.left,s)||yt(r.right,s);if(r.type==="record"||r.type==="map")return yt(r.keyType,s)||yt(r.valueType,s);if(r.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:yt(r.in,s)||yt(r.out,s);if(r.type==="object"){for(const o in r.shape)if(yt(r.shape[o],s))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(yt(o,s))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(yt(o,s))return!0;return!!(r.rest&&yt(r.rest,s))}return!1}const Nz=(t,i={})=>s=>{const r=Hb({...s,processors:i});return tt(t,r),$b(r,t),Kb(r,t)},Eo=(t,i,s={})=>r=>{const{libraryOptions:o,target:c}=r??{},d=Hb({...o??{},target:c,io:i,processors:s});return tt(t,d),$b(d,t),Kb(d,t)},ns=(t,i,s)=>{(t[i]===void 0||s>t[i])&&(t[i]=s)},is=(t,i,s)=>{(t[i]===void 0||s<t[i])&&(t[i]=s)},Vy=(t,i)=>{ns(t,"minimum",i),is(t,"maximum",i)},Yb=(t,i)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(i)||t.multipleOf.push(i)},Fb=(t,i)=>{t.patterns??(t.patterns=new Set),t.patterns.add(i)},Vb=(t,i)=>{t.mime=t.mime?t.mime.filter(s=>i.includes(s)):[...i]},Pb=(t,i)=>{t.format=i,i.includes("int")&&(t.isInt=!0)},Py=(t,i)=>ns(t,"minimum",i.minimum),Xy=(t,i)=>is(t,"maximum",i.maximum),Jy=t=>(i,s)=>{Pb(i,s.format);const[r,o]=t[s.format];ns(i,"minimum",r),is(i,"maximum",o)},Az={greater_than:(t,i)=>ns(t,i.inclusive?"minimum":"exclusiveMinimum",i.value),less_than:(t,i)=>is(t,i.inclusive?"maximum":"exclusiveMaximum",i.value),multiple_of:(t,i)=>Yb(t,i.value),number_format:Jy(pb),bigint_format:Jy(VE),min_length:Py,max_length:Xy,length_equals:(t,i)=>Vy(t,i.length),min_size:Py,max_size:Xy,size_equals:(t,i)=>Vy(t,i.size),string_format:(t,i)=>{Pb(t,i.format),i.pattern&&Fb(t,i.pattern),(i.format==="base64"||i.format==="base64url")&&(t.contentEncoding=i.format),(i.local||i.precision===-1)&&(t.laxFormat=!0)},mime_type:(t,i)=>Vb(t,i.mime)};function rn(t){const i={},s=t._zod.def,r=t._zod.traits.has("$ZodCheck")?[t,...s.checks??[]]:s.checks??[];for(const c of r)Az[c._zod.def.check]?.(i,c._zod.def);const o=t._zod.bag;o.minimum!==void 0&&ns(i,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&ns(i,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&is(i,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&is(i,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&Yb(i,o.multipleOf),o.format!==void 0&&(i.format??(i.format=o.format),o.format.includes("int")&&(i.isInt=!0)),o.mime&&Vb(i,o.mime);for(const c of o.patterns??[])Fb(i,c);return i}const Rz={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Cz=new Map([[Ab,Pw],[_d,Xw]]),Xb=t=>Cz.get(t)??t,Mz=(t,i,s,r)=>{const o=s;o.type="string";const{minimum:c,maximum:d,format:h,patterns:m,contentEncoding:p,laxFormat:v}=rn(t);if(typeof c=="number"&&(o.minLength=c),typeof d=="number"&&(o.maxLength=d),h&&(o.format=Rz[h]??h,o.format===""&&delete o.format,(h==="time"||v)&&delete o.format),p&&(o.contentEncoding=p),m&&m.size>0){const y=[...m].map(Xb);y.length===1?o.pattern=y[0].source:y.length>1&&(o.allOf=[...y.map(S=>({...i.target==="draft-07"||i.target==="draft-04"||i.target==="openapi-3.0"?{type:"string"}:{},pattern:S.source}))])}},Dz=(t,i,s,r)=>{const o=s,{minimum:c,maximum:d,multipleOf:h,exclusiveMaximum:m,exclusiveMinimum:p,isInt:v}=rn(t);o.type=v?"integer":"number";const y=typeof p=="number"&&p>=(c??Number.NEGATIVE_INFINITY),S=typeof m=="number"&&m<=(d??Number.POSITIVE_INFINITY),x=i.target==="draft-04"||i.target==="openapi-3.0";if(y?x?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p:typeof c=="number"&&(o.minimum=c),S?x?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof d=="number"&&(o.maximum=d),h){const E=new Set;for(const R of h)Number.isFinite(R)&&R!==0?E.add(Math.abs(R)):wi(t,i,o,r,`A multipleOf divisor of ${R} cannot be represented in JSON Schema`);const[w,...z]=E;w!==void 0&&(o.multipleOf=w),z.length&&(o.allOf=[...o.allOf??[],...z.map(R=>({multipleOf:R}))])}},kz=(t,i,s,r)=>{s.type="boolean"},Uz=(t,i,s,r)=>{s.not={}},Lz=(t,i,s,r)=>{},Zz=(t,i,s,r)=>{const o=t._zod.def,c=qf(o.entries);if(c.length===0){s.not={};return}c.every(d=>typeof d=="number")&&(s.type="number"),c.every(d=>typeof d=="string")&&(s.type="string"),s.enum=c},qz=(t,i,s,r)=>{const o=t._zod.def;if(o.values.length===0){s.not={};return}const c=[];for(const d of o.values)if(d===void 0){if(wi(t,i,s,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(wi(t,i,s,r,"BigInt literals cannot be represented in JSON Schema"))return;c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];s.type=d===null?"null":typeof d,i.target==="draft-04"||i.target==="openapi-3.0"?s.enum=[d]:s.const=d}else c.every(d=>typeof d=="number")&&(s.type="number"),c.every(d=>typeof d=="string")&&(s.type="string"),c.every(d=>typeof d=="boolean")&&(s.type="boolean"),c.every(d=>d===null)&&(s.type="null"),s.enum=c},Bz=(t,i,s,r)=>{wi(t,i,s,r,"Custom types cannot be represented in JSON Schema")},Hz=(t,i,s,r)=>{wi(t,i,s,r,"Transforms cannot be represented in JSON Schema")},$z=(t,i,s,r)=>{const o=s,c=t._zod.def,{minimum:d,maximum:h}=rn(t);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=tt(c.element,i,{...r,path:[...r.path,"items"]})};function wo(t){const i=t._zod.def;return i.type==="pipe"&&i.in._zod.traits.has("$ZodTransform")?wo(i.out):i.type==="catch"?wo(i.innerType):t._zod.optin}const Qz=(t,i,s,r)=>{const o=s,c=t._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&wi(t,i,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const p in d)zi(o.properties,p,tt(d[p],i,{...r,path:[...r.path,"properties",p]}));const m=[];for(const p of Object.keys(d)){const v=c.shape[p];(i.io==="input"?wo(v)===void 0:v._zod.optout===void 0)&&m.push(p)}m.length>0&&(o.required=m),c.catchall?._zod.def.type==="never"?o.additionalProperties=!1:c.catchall?c.catchall&&(o.additionalProperties=tt(c.catchall,i,{...r,path:[...r.path,"additionalProperties"]})):i.io==="output"&&(o.additionalProperties=!1)},Gz=(t,i,s,r)=>{const o=t._zod.def,c=o.inclusive===!1,d=o.options.map((h,m)=>tt(h,i,{...r,path:[...r.path,c?"oneOf":"anyOf",m]}));c?s.oneOf=d:s.anyOf=d},Kz=(t,i,s,r)=>{const o=t._zod.def,c=tt(o.left,i,{...r,path:[...r.path,"allOf",0]}),d=tt(o.right,i,{...r,path:[...r.path,"allOf",1]}),h=p=>"allOf"in p&&Object.keys(p).length===1,m=[...h(c)?c.allOf:[c],...h(d)?d.allOf:[d]];s.allOf=m,i.intersections.push(m)};function Yf(t,i,s){if(i.$ref){if(s.has(i))return i;s.add(i);const E=t.get(i)?.def;if(!E)return i;const w=Yf(t,E,s);return w===E?i:w}for(const E of["anyOf","oneOf"]){const w=i[E];if(!Array.isArray(w))continue;const z=w.map(R=>Yf(t,R,s));z.some((R,q)=>R!==w[q])&&(i={...i,[E]:z})}const r=Array.isArray(i.type)?i.type:[i.type],o=!r.includes("string")&&r.some(E=>E==="number"||E==="integer"),c=i.enum??(i.const!==void 0?[i.const]:void 0);if(!o&&!c?.some(E=>typeof E=="number"))return i;const{minimum:d,maximum:h,exclusiveMinimum:m,exclusiveMaximum:p,multipleOf:v,format:y,id:S,...x}=i;return x.enum?x.enum=x.enum.map(E=>typeof E=="number"?String(E):E):typeof x.const=="number"&&(x.const=String(x.const)),o&&(x.type="string",c||(x.pattern=(r.includes("number")?bd:aO).source)),x}const Ff=new WeakMap;function Yz(t){const i=new Map;for(const r of t.seen.values())r.def&&!i.has(r.schema)&&i.set(r.schema,r);const s=new Map;for(const r of Ff.get(t)??[]){const o=t.seen.get(r),c=(o?.def??o?.schema)?.propertyNames;if(!c||c===!0||s.has(c))continue;const d=Yf(i,c,new Set);d!==c&&s.set(c,d)}if(s.size)for(const r of t.seen.values())for(const o of[r.schema,r.def]){const c=o&&s.get(o.propertyNames);c&&(o.propertyNames=c)}}const Fz=(t,i,s,r)=>{const o=s,c=t._zod.def;o.type="object";const d=c.keyType,h=rn(d).patterns;if(c.mode==="loose"&&h&&h.size>0){const v=tt(c.valueType,i,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const y of h)zi(o.patternProperties,Xb(y).source,v)}else{if(i.target==="draft-07"||i.target==="draft-2020-12"){o.propertyNames=tt(c.keyType,i,{...r,path:[...r.path,"propertyNames"]});let v=Ff.get(i);v||(v=[],Ff.set(i,v),i.deferred.push(()=>Yz(i))),v.push(t)}o.additionalProperties=tt(c.valueType,i,{...r,path:[...r.path,"additionalProperties"]})}const m=d._zod.values,p=i.io==="input"&&wo(c.valueType)!==void 0;if(m&&!c.partial&&!p){const v=[...m].filter(y=>typeof y=="string"||typeof y=="number");v.length>0&&(o.required=v.map(String))}},Vz=(t,i,s,r)=>{const o=t._zod.def,c=tt(o.innerType,i,r),d=i.seen.get(t);i.target==="openapi-3.0"?(d.ref=o.innerType,s.nullable=!0):s.anyOf=[c,{type:"null"}]},Pz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType},Ed=Symbol();function Jb(t,i,s,r,o){let c=!1;const d=JSON.stringify(t,(h,m)=>typeof m!="bigint"?m:(c=!0,null));return c?(wi(i,s,r,o,"BigInt defaults cannot be represented in JSON Schema"),Ed):JSON.parse(d)}const Xz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType;const d=Jb(o.defaultValue,t,i,s,r);d!==Ed&&(s.default=d)},Jz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);if(c.ref=o.innerType,i.io!=="input")return;const d=Jb(o.defaultValue,t,i,s,r);d!==Ed&&(s._prefault=d)},Iz=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{wi(t,i,s,r,"Dynamic catch values are not supported in JSON Schema");return}s.default=d},Wz=(t,i,s,r)=>{const o=t._zod.def,c=o.in._zod.traits.has("$ZodTransform"),d=i.io==="input"?c?o.out:o.in:o.out;tt(d,i,r);const h=i.seen.get(t);h.ref=d},eT=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType,s.readOnly=!0},Ib=(t,i,s,r)=>{const o=t._zod.def;tt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType},Iy=new WeakSet([Object.prototype,Error.prototype]);function Il(t,i,s){Object.defineProperty(t,i,{configurable:!0,enumerable:!1,get(){const r=s(this);return Object.defineProperty(this,i,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,i,{value:r,configurable:!0,writable:!0})}})}const tT=(t,i)=>{gw.init(t,i),t.name="ZodError";const s=Object.getPrototypeOf(t);Iy.has(s)||(Iy.add(s),Il(s,"format",r=>o=>bw(r,o)),Il(s,"flatten",r=>o=>vw(r,o)),Il(s,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Bf,2)}),Il(s,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Bf,2)}),Object.defineProperty(s,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},en=$("ZodError",tT,void 0,{Parent:Error}),nT=pd(en),iT=gd(en),aT=yd(en),sT=vd(en),rT=Ow(en),lT=zw(en),oT=Tw(en),uT=jw(en),cT=Nw(en),fT=Aw(en),dT=Rw(en),hT=Cw(en);function mT(){ln.localeError||pn(M2())}function Do(){ln.memoizer||pn({memoizer:A2()})}const Ke=$("ZodType",(t,i)=>(mT(),Ge.init(t,i),t.def=i,t.type=i.type,t),{check(...t){const i=this.def;return this.clone($t(i,{checks:[...i.checks??[],...t.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,i){return Ti(this,t,i)},brand(){return this},register(t,i){return t.add(this,i),this},refine(t,i){return this.check(lj(t,i))},superRefine(t,i){return this.check(oj(t,i))},overwrite(t){return this.check(os(t))},optional(){return tv(this)},exactOptional(){return PT(this)},nullable(){return nv(this)},nullish(){return tv(nv(this))},nonoptional(t){return ej(this,t)},array(){return _e(this)},or(t){return ko([this,t])},and(t){return GT(this,t)},transform(t){return iv(this,VT(t))},default(t){return JT(this,t)},prefault(t){return WT(this,t)},catch(t){return nj(this,t)},pipe(t){return iv(this,t)},readonly(){return sj(this)},describe(t){const i=this.clone();return cr.add(i,{description:t}),i},meta(...t){if(t.length===0)return cr.get(this);const i=this.clone();return cr.add(i,t[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...i){return i.length===0?t(this):t(this,...i)},get"~standard"(){return yb(this,"~standard",{...Ob(this),jsonSchema:{input:Eo(this,"input"),output:Eo(this,"output")}})},set"~standard"(t){Ei(this,"~standard",t)},parse:function t(i,s){return nT(this,i,s,{callee:t})},parseAsync:async function t(i,s){return await iT(this,i,s,{callee:t})},safeParse(t,i){return aT(this,t,i)},async safeParseAsync(t,i){return sT(this,t,i)},get spa(){return this?.safeParseAsync},set spa(t){Ei(this,"spa",t)},validate(t,i){return _w(this,t,i)},validateAsync(t,i){return ww(this,t,i)},encode:function t(i,s){return rT(this,i,s,{callee:t})},decode:function t(i,s){return lT(this,i,s,{callee:t})},encodeAsync:async function t(i,s){return await oT(this,i,s,{callee:t})},decodeAsync:async function t(i,s){return await uT(this,i,s,{callee:t})},safeEncode(t,i){return cT(this,t,i)},safeDecode(t,i){return fT(this,t,i)},async safeEncodeAsync(t,i){return dT(this,t,i)},async safeDecodeAsync(t,i){return hT(this,t,i)},toJSONSchema(t){return Nz(this,{})(t)},get description(){return cr.get(this)?.description},get _def(){return this._zod.def}}),Wb=$("_ZodString",(t,i)=>{xd.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Mz(t,s,r)},vb({format:t=>rn(t).format??null,minLength:t=>rn(t).minimum??null,maxLength:t=>rn(t).maximum??null},{regex(...t){return this.check(hz(...t))},includes(...t){return this.check(gz(...t))},startsWith(...t){return this.check(yz(...t))},endsWith(...t){return this.check(vz(...t))},min(...t){return this.check(_o(...t))},max(...t){return this.check(qb(...t))},length(...t){return this.check(Bb(...t))},nonempty(...t){return this.check(_o(1,...t))},lowercase(t){return this.check(mz(t))},uppercase(t){return this.check(pz(t))},trim(){return this.check(Sz())},normalize(...t){return this.check(bz(...t))},toLowerCase(){return this.check(xz())},toUpperCase(){return this.check(_z())},slugify(){return this.check(Ez())}})),e0=$("ZodString",(t,i)=>{xd.init(t,i),Wb.init(t,i)},{email(t){return this.check(L2(vT,t))},url(t){return this.check(Q2(ST,t))},jwt(t){return this.check(az(kT,t))},emoji(t){return this.check(G2(xT,t))},guid(t){return this.check(Z2(bT,t))},uuid(t){return this.check(q2(Wl,t))},uuidv4(t){return this.check(B2(Wl,t))},uuidv6(t){return this.check(H2(Wl,t))},uuidv7(t){return this.check($2(Wl,t))},nanoid(t){return this.check(K2(_T,t))},cuid(t){return this.check(Y2(ET,t))},cuid2(t){return this.check(F2(wT,t))},ulid(t){return this.check(V2(OT,t))},base64(t){return this.check(tz(CT,t))},base64url(t){return this.check(nz(MT,t))},xid(t){return this.check(P2(zT,t))},ksuid(t){return this.check(X2(TT,t))},ipv4(t){return this.check(J2(jT,t))},ipv6(t){return this.check(I2(NT,t))},cidrv4(t){return this.check(W2(AT,t))},cidrv6(t){return this.check(ez(RT,t))},e164(t){return this.check(iz(DT,t))},datetime(t){return this.check(Zb(t0,t))},date(t){return this.check(sz(pT,t))},time(t){return this.check(rz(gT,t))},duration(t){return this.check(lz(yT,t))}});function Y(t){return U2(e0,t)}const Ye=$("ZodStringFormat",(t,i)=>{$e.init(t,i),Wb.init(t,i)}),t0=$("ZodISODateTime",(t,i)=>{qO.init(t,i),Ye.init(t,i)}),pT=$("ZodISODate",(t,i)=>{BO.init(t,i),Ye.init(t,i)}),gT=$("ZodISOTime",(t,i)=>{HO.init(t,i),Ye.init(t,i)}),yT=$("ZodISODuration",(t,i)=>{$O.init(t,i),Ye.init(t,i)}),vT=$("ZodEmail",(t,i)=>{OO.init(t,i),Ye.init(t,i)}),bT=$("ZodGUID",(t,i)=>{EO.init(t,i),Ye.init(t,i)}),Wl=$("ZodUUID",(t,i)=>{wO.init(t,i),Ye.init(t,i)}),ST=$("ZodURL",(t,i)=>{RO.init(t,i),Ye.init(t,i)}),xT=$("ZodEmoji",(t,i)=>{CO.init(t,i),Ye.init(t,i)}),_T=$("ZodNanoID",(t,i)=>{MO.init(t,i),Ye.init(t,i)}),ET=$("ZodCUID",(t,i)=>{DO.init(t,i),Ye.init(t,i)}),wT=$("ZodCUID2",(t,i)=>{kO.init(t,i),Ye.init(t,i)}),OT=$("ZodULID",(t,i)=>{UO.init(t,i),Ye.init(t,i)}),zT=$("ZodXID",(t,i)=>{LO.init(t,i),Ye.init(t,i)}),TT=$("ZodKSUID",(t,i)=>{ZO.init(t,i),Ye.init(t,i)}),jT=$("ZodIPv4",(t,i)=>{QO.init(t,i),Ye.init(t,i)}),NT=$("ZodIPv6",(t,i)=>{KO.init(t,i),Ye.init(t,i)}),AT=$("ZodCIDRv4",(t,i)=>{YO.init(t,i),Ye.init(t,i)}),RT=$("ZodCIDRv6",(t,i)=>{VO.init(t,i),Ye.init(t,i)}),CT=$("ZodBase64",(t,i)=>{PO.init(t,i),Ye.init(t,i)}),MT=$("ZodBase64URL",(t,i)=>{JO.init(t,i),Ye.init(t,i)}),DT=$("ZodE164",(t,i)=>{IO.init(t,i),Ye.init(t,i)}),kT=$("ZodJWT",(t,i)=>{e2.init(t,i),Ye.init(t,i)}),n0=$("ZodNumber",(t,i)=>{Rb.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Dz(t,s,r,o),t.isFinite=!0},vb({minValue:t=>{const{minimum:i,exclusiveMinimum:s}=rn(t);return Math.max(i??Number.NEGATIVE_INFINITY,s??Number.NEGATIVE_INFINITY)},maxValue:t=>{const{maximum:i,exclusiveMaximum:s}=rn(t);return Math.min(i??Number.POSITIVE_INFINITY,s??Number.POSITIVE_INFINITY)},isInt:t=>{const{isInt:i,multipleOf:s}=rn(t);return!!i||!!s?.some(Number.isSafeInteger)},format:t=>rn(t).format??null},{gt(t,i){return this.check(Qy(t,i))},gte(t,i){return this.check(xf(t,i))},min(t,i){return this.check(xf(t,i))},lt(t,i){return this.check($y(t,i))},lte(t,i){return this.check(Sf(t,i))},max(t,i){return this.check(Sf(t,i))},int(t){return this.check(Wy(t))},safe(t){return this.check(Wy(t))},positive(t){return this.check(Qy(0,t))},nonnegative(t){return this.check(xf(0,t))},negative(t){return this.check($y(0,t))},nonpositive(t){return this.check(Sf(0,t))},multipleOf(t,i){return this.check(Gy(t,i))},step(t,i){return this.check(Gy(t,i))},finite(){return this}}));function Qe(t){return oz(n0,t)}const UT=$("ZodNumberFormat",(t,i)=>{t2.init(t,i),n0.init(t,i)});function Wy(t){return uz(UT,t)}const LT=$("ZodBoolean",(t,i)=>{n2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>kz(t,s,r)});function Qt(t){return cz(LT,t)}const ZT=$("ZodUnknown",(t,i)=>{i2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Lz()});function Vf(){return fz(ZT)}const qT=$("ZodNever",(t,i)=>{a2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Uz(t,s,r)});function BT(t){return dz(qT,t)}const i0=$("ZodArray",(t,i)=>{Do(),l2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>$z(t,s,r,o),t.element=i.element},{min(t,i){return this.check(_o(t,i))},nonempty(t){return this.check(_o(1,t))},max(t,i){return this.check(qb(t,i))},length(t,i){return this.check(Bb(t,i))},unwrap(){return this.element}});function _e(t,i){return wz(i0,t,i)}const HT=$("ZodObject",(t,i)=>{Do(),c2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Qz(t,s,r,o),ow(t,"shape",s=>s._zod.def.shape,!1)},{keyof(){return jt(Object.keys(this._zod.def.shape))},catchall(t){return this.clone($t(this._zod.def,{catchall:t}))},passthrough(){return this.clone($t(this._zod.def,{catchall:Vf()}))},loose(){return this.clone($t(this._zod.def,{catchall:Vf()}))},strict(){return this.clone($t(this._zod.def,{catchall:BT()}))},strip(){return this.clone($t(this._zod.def,{catchall:void 0}))},extend(t){return JE(this,t)},safeExtend(t){return IE(this,t)},merge(t){return WE(this,t)},pick(t){return PE(this,t)},omit(t){return XE(this,t)},partial(...t){return wy(a0,this,t[0])},exactPartial(...t){return wy(s0,this,t[0],"exactPartial")},required(...t){return ew(l0,this,t[0])}});function se(t,i){const s={type:"object",shape:t??{},...ie(i)};return new HT(s)}const $T=$("ZodUnion",(t,i)=>{f2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Gz(t,s,r,o),t.options=i.options});function ko(t,i){return new $T({type:"union",options:t,...ie(i)})}const QT=$("ZodIntersection",(t,i)=>{d2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Kz(t,s,r,o)});function GT(t,i){return new QT({type:"intersection",left:t,right:i})}const ev=$("ZodRecord",(t,i)=>{Do(),h2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Fz(t,s,r,o),t.keyType=i.keyType,t.valueType=i.valueType});function KT(t,i,s){return!i||!i._zod?new ev({type:"record",keyType:Y(),valueType:t,...ie(i)}):new ev({type:"record",keyType:t,valueType:i,...ie(s)})}const Oo=$("ZodEnum",(t,i)=>{m2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(r,o,c)=>Zz(t,r,o),t.enum=i.entries,t.options=[...t._zod.values];const s=new Set(Object.keys(i.entries));t.extract=(r,o)=>{const c={};for(const d of r)if(s.has(d))c[d]=i.entries[d];else throw new Error(`Key ${d} not found in enum`);return new Oo({...i,checks:[],...ie(o),entries:c})},t.exclude=(r,o)=>{const c={...i.entries};for(const d of r)if(s.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new Oo({...i,checks:[],...ie(o),entries:c})}});function jt(t,i){const s=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new Oo({type:"enum",entries:s,...ie(i)})}const YT=$("ZodLiteral",(t,i)=>{p2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>qz(t,s,r,o),t.values=new Set(i.values),Object.defineProperty(t,"value",{get(){if(i.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return i.values[0]}})});function gi(t,i){return new YT({type:"literal",values:Array.isArray(t)?t:[t],...ie(i)})}const FT=$("ZodTransform",(t,i)=>{Do(),g2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Hz(t,s,r,o),t._zod.parse=(s,r)=>{if(r.direction==="backward")throw new bb(t.constructor.name);s.addIssue=c=>{if(typeof c=="string")s.issues.push(Sr(c,s.value,i));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=s.value),d.inst??(d.inst=t),s.issues.push(Sr(d))}};const o=i.transform(s.value,s);return o instanceof Promise?o.then(c=>(s.value=c,s)):(s.value=o,s)}});function VT(t){return new FT({type:"transform",transform:t})}const a0=$("ZodOptional",(t,i)=>{Db.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Ib(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function tv(t){return new a0({type:"optional",innerType:t})}const s0=$("ZodExactOptional",(t,i)=>{y2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Ib(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function PT(t){return new s0({type:"optional",innerType:t})}const XT=$("ZodNullable",(t,i)=>{v2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Vz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function nv(t){return new XT({type:"nullable",innerType:t})}const r0=$("ZodDefault",(t,i)=>{b2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Xz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function JT(t,i){return new r0({type:"default",innerType:t,get defaultValue(){return typeof i=="function"?i():hb(i)}})}const IT=$("ZodPrefault",(t,i)=>{S2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Jz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function WT(t,i){return new IT({type:"prefault",innerType:t,get defaultValue(){return typeof i=="function"?i():hb(i)}})}const l0=$("ZodNonOptional",(t,i)=>{x2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Pz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function ej(t,i){return new l0({type:"nonoptional",innerType:t,...ie(i)})}const tj=$("ZodCatch",(t,i)=>{_2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Iz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function nj(t,i){return new tj({type:"catch",innerType:t,catchValue:typeof i=="function"?i:cw(i)})}const ij=$("ZodPipe",(t,i)=>{E2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Wz(t,s,r,o),t.in=i.in,t.out=i.out});function iv(t,i){return new ij({type:"pipe",in:t,out:i})}const aj=$("ZodReadonly",(t,i)=>{w2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>eT(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function sj(t){return new aj({type:"readonly",innerType:t})}const rj=$("ZodCustom",(t,i)=>{O2.init(t,i),Ke.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Bz(t,s,r,o)});function lj(t,i={}){return Oz(rj,t,i)}function oj(t,i){return zz(t,i)}function uj(t){return Zb(t0,t)}const dt=Y().regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"kebab-case required"),o0=Y().regex(/^package:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"expected package:<kebab-case-name>"),cj=se({method:jt(["GET","POST","PUT","PATCH","DELETE"]),path:Y().startsWith("/api/"),description:Y().min(10),schemaInput:Y().describe("Exported name of the input Zod schema, e.g. CreateOrderInputSchema"),schemaOutput:Y().describe("Exported name of the output Zod schema"),invalidates:_e(Y()).optional().describe("Cache roots this mutation stales BEYOND its own path root (cross-feature dependency, read by the manifest-derived client — never guessed in a screen). Each value must be an existing feature name or route root")}),fj=jt(["reference","ownerless"]),dj=ko([Y(),se({name:Y(),shared:gi(!0),sharedKind:fj.optional()})]),hj=se({name:dt,intent:Y().min(20).max(300).describe("The feature's 'why' in 1-3 sentences"),app:Y().optional().describe("Name of the owning app (apps[].name); defaults to the api app"),folder:Y().describe("Path relative to the app root, e.g. src/features/orders"),spec:Y().nullable().describe("Path to the spec, e.g. specs/orders.spec.md, null for technical features"),routes:_e(cj),dbTables:_e(dj).describe("Drizzle tables owned by this feature (one table = one owner). String = tenant-scoped; { name, shared: true } = shared referential"),dependsOn:_e(ko([dt,o0])).describe("Features imported through their index.ts, and product packages as package:<name> — nothing else"),status:jt(["skeleton","in-progress","delivered"])}),mj=Y().regex(/^\d+\.\d+\.\d+$/,"expected a plain x.y.z version"),pj=se({packages:_e(se({name:Y().describe("Published npm name, e.g. @ogygie/core"),path:Y().describe("Folder relative to the repo root"),intent:Y().min(20),spec:Y().nullable(),status:jt(["skeleton","in-progress","delivered"])})),templates:se({project:Y().describe("Folder copied by `ogygie init`"),feature:Y().describe("Reserved for `ogygie generate feature` (not wired yet)")}),governedFiles:Y().describe("Module declaring the exhaustive list of files `upgrade` may overwrite (D3)")}),gj=se({canonical:Y().regex(/^[a-z][a-zA-Z0-9]*$/,"camelCase English term required").describe("The one machine term for this concept, e.g. gadget"),forbiddenAliases:_e(Y().min(2).regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"lowercase root (kebab-case allowed) required")).min(1).describe("Roots the code may never carry for this concept, e.g. widget"),reference:Y().optional().describe("Anchor into AGENTS.product.md where the concept is explained")}),yj=se({entries:_e(gj)}),vj=se({name:dt,path:Y().describe("Folder relative to the repo root, e.g. packages/solver"),intent:Y().min(20).max(300).describe("The package's 'why' in 1-3 sentences"),spec:Y().nullable(),dependsOn:_e(o0).describe("Other PRODUCT packages, as package:<name> — never a feature: a package that depended on one would live under an app, and would be a feature"),status:jt(["skeleton","in-progress","delivered"])}),bj=se({column:Y().min(1).describe("SQL name of the tenant column, e.g. workspace_id — the one AGENTS.product.md announces"),rawDbAllowed:_e(dt).default([]).describe("Features allowed to reach the raw database: the tenancy socle, which BUILDS the contexts and therefore predates them. Every other feature goes through tenantDb")}),Sj=se({version:gi(1),product:se({name:Y(),description:Y().min(20)}),ogygieVersion:mj.optional(),framework:pj.optional(),apps:_e(se({name:Y(),path:Y(),type:jt(["api","front","gateway"]),entryPoint:Y(),vendored:gi(!0).optional()})),features:_e(hj),tenancy:bj.optional().describe("Product values the framework gates need — absent, the tenancy checks do not run"),packages:_e(vj).optional().describe("Product code living outside every app — libraries, engines. Absent = the project has none"),vocabulary:yj.optional().describe("The product's closed vocabulary — declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"),conventions:se({agentsMd:gi("AGENTS.md"),failuresMd:gi("FAILURES.md"),specsFolder:gi("specs/")})}).superRefine((t,i)=>{const s=new Set(t.features.map(y=>y.name)),r=new Set;(t.packages??[]).forEach((y,S)=>{s.has(y.name)&&i.addIssue({code:"custom",path:["packages",S,"name"],message:`"${y.name}" is already the name of a feature — one name designates one thing`}),r.has(y.name)&&i.addIssue({code:"custom",path:["packages",S,"name"],message:`package "${y.name}" is declared twice`}),r.add(y.name)});const o=y=>(y.split("/").pop()??y).replace(/\.spec\.md$/,""),c=new Set([...t.features.map(y=>y.name),...r]);(t.framework?.packages??[]).forEach((y,S)=>{if(y.spec===null)return;const x=o(y.spec);c.has(x)&&i.addIssue({code:"custom",path:["framework","packages",S,"spec"],message:`spec "${x}" is already owned by a feature or a product package — one spec, one owner`})});const d=(y,S)=>{y.forEach((x,E)=>{if(!x.startsWith("package:"))return;const w=x.slice(8);r.has(w)||i.addIssue({code:"custom",path:[...S,E],message:`dependency "${x}" matches no declared package`})})};t.features.forEach((y,S)=>{d(y.dependsOn,["features",S,"dependsOn"])}),(t.packages??[]).forEach((y,S)=>{d(y.dependsOn,["packages",S,"dependsOn"])}),(t.tenancy?.rawDbAllowed??[]).forEach((y,S)=>{s.has(y)||i.addIssue({code:"custom",path:["tenancy","rawDbAllowed",S],message:`"${y}" matches no declared feature`})});const h=new Map,m=new Map;(t.vocabulary?.entries??[]).forEach((y,S)=>{const x=y.canonical.toLowerCase(),E=h.get(x);E!==void 0?i.addIssue({code:"custom",path:["vocabulary","entries",S,"canonical"],message:`canonical "${y.canonical}" is already declared by entry ${E}`}):h.set(x,S)}),(t.vocabulary?.entries??[]).forEach((y,S)=>{y.forbiddenAliases.forEach((x,E)=>{const w=["vocabulary","entries",S,"forbiddenAliases",E],z=h.get(x);if(z!==void 0){i.addIssue({code:"custom",path:w,message:`alias "${x}" is the canonical term of entry ${z} — a term cannot be both`});return}const R=m.get(x);if(R!==void 0){i.addIssue({code:"custom",path:w,message:`alias "${x}" is already forbidden by entry ${R} — one alias belongs to one concept`});return}m.set(x,S)})});const p=new Map(t.apps.map(y=>[y.name,y])),v=new Set(t.features.map(y=>y.name));for(const y of t.features)for(const S of y.routes){const x=S.path.split("/")[2];x!==void 0&&v.add(x)}t.features.forEach((y,S)=>{y.routes.forEach((x,E)=>{for(const w of x.invalidates??[])v.has(w)||i.addIssue({code:"custom",path:["features",S,"routes",E,"invalidates"],message:`invalidates target "${w}" matches no feature name and no route root`})})}),t.features.forEach((y,S)=>{if(y.app===void 0)return;const x=p.get(y.app);if(x===void 0){i.addIssue({code:"custom",path:["features",S,"app"],message:`app "${y.app}" is not declared in apps[]`});return}x.type!=="api"&&(y.routes.length>0||y.dbTables.length>0)&&i.addIssue({code:"custom",path:["features",S],message:"a non-api feature owns no HTTP routes and no DB tables — declare them on the api feature"})})}),xj=Y().regex(/^.+ blockedBy:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,'Expected "<behavior> blockedBy:<feature-name>" (feature name in kebab-case)'),us=se({id:dt.describe("Identical to the feature name in the manifest"),status:jt(["draft","validated","implemented"]),depends_on:_e(dt),priority:jt(["P0","P1","P2"]),refs:_e(Y()).default([]).describe("References to the domain model, e.g. 'modele-gally §4.2'"),deferred:_e(xj).default([]).describe("Behaviors deferred to a later feature, blocked by name")}),Ja=["# @intent","# Comportements","# Contrats de données","# États UI","# Non-objectifs","# Budget"],u0=se({ogygie:gi(!0).describe("Marker: lets an agent tell our errors from noise"),code:Y().regex(/^[A-Z][A-Z0-9_]+$/,"SCREAMING_SNAKE_CASE, stable over time"),message:Y().min(10).describe("Human-readable sentence (technical English)"),file:Y().nullable().describe("Relative path of the file involved, null when not localizable"),cause:Y().describe("The precise datum or condition that triggered the error"),suggestedFix:Y().describe("Concrete action to fix — never empty"),details:KT(Y(),Vf()).default({}),timestamp:uj()});class wd extends Error{payload;constructor(i){super(i.message),this.name="StudioApiError",this.payload=i}}async function ht(t,i,s){const r=await fetch(t,s),o=await r.json();if(!r.ok){const c=u0.safeParse(o);throw c.success?new wd(c.data):new Error(`HTTP ${r.status} on ${t} (non-OgygieError payload)`)}return i.parse(o)}function _r(t){return{headers:{"content-type":"application/json"},body:JSON.stringify(t)}}const _j=us.shape.status,Od=se({id:dt,status:_j,priority:us.shape.priority,depends_on:_e(dt),filePath:Y(),presentSections:_e(Y())}),Ej=se({id:Y(),filePath:Y(),error:u0}),wj=ko([Od,Ej]),Oj=se({specs:_e(wj)});se({specId:dt});const zj=se({frontmatter:us,body:Y(),presentSections:_e(Y())});se({frontmatter:us,body:Y().max(2e5).optional()});const Tj=se({spec:Od});se({id:dt.max(80)});const jj=se({spec:Od}),Nj=se({manifest:Sj}),Aj=se({name:Y().min(1).max(200),contentBase64:Y().min(1).max(57e5)});se({brief:Y().min(50).max(2e4),specId:dt.optional(),attachments:_e(Aj).max(5).default([])});const Rj=se({specId:dt,attempts:Qe().int().min(1).max(2),problemsFixed:_e(Y()),isNewFeature:Qt(),isAmendment:Qt(),compositions:_e(Y()).default([]),generation:se({derivable:Qe().int().nonnegative(),hole:Qe().int().nonnegative()}).nullable().default(null),usage:_e(se({model:Y(),inputTokens:Qe().int().nonnegative(),outputTokens:Qe().int().nonnegative()}))}),c0=jt(["green","red","pending","none"]),Cj=se({specId:dt,branch:Y(),pullRequest:se({number:Qe().int().positive(),url:Y(),headSha:Y(),title:Y()}).nullable(),specStatus:jt(["draft","validated","implemented","unreadable","absent"]),checks:c0,checkRuns:_e(se({name:Y(),conclusion:Y().nullable()})),mergeable:Qt().nullable(),requiredRole:jt(["approver","operator"]),canMerge:Qt(),blockers:_e(Y()),labels:_e(Y()).default([]),needsOperator:Qt().default(!1)}),Mj=se({pullRequests:_e(se({specId:dt,number:Qe().int().positive(),url:Y(),checks:c0,needsOperator:Qt().default(!1)}))}),Dj=se({specId:dt,pullRequestNumber:Qe().int().positive(),mergeSha:Y(),mergedBy:Y(),mergedAt:Y()}),kj=jt(["development","staging","production"]),f0=jt(["staging","production"]);se({environment:f0});const d0=se({environments:_e(se({name:kj,ref:Y(),sha:Y().nullable(),deployment:se({id:Qe().int(),state:Y().nullable(),createdAt:Y()}).nullable()})),releases:_e(Y())});se({sha:Y().regex(/^[0-9a-f]{40}$/),rollback:Qt().optional(),reason:Y().min(10).max(2e3).optional()});const Uj=se({environment:f0,fromSha:Y().nullable(),toSha:Y(),actor:Y(),at:Y(),deploymentId:Qe().int(),releaseTag:Y().nullable(),includedPullRequests:_e(se({number:Qe().int(),specId:Y().nullable(),message:Y(),authoredAt:Y()})),destructiveMigration:Qt(),rollback:Qt()});se({month:Y().regex(/^\d{4}-\d{2}$/).optional()});const Lj=se({month:Y(),specs:_e(se({specId:Y(),pullRequestNumber:Qe().int(),runs:Qe().int(),inputTokens:Qe().int(),outputTokens:Qe().int(),estimatedUsd:Qe(),uncostedModels:_e(Y())})),totals:se({runs:Qe().int(),inputTokens:Qe().int(),outputTokens:Qe().int(),estimatedUsd:Qe()}),budgetUsd:Qe().nullable(),budgetRatio:Qe().nullable(),warning:Qt()}),av=se({state:Y(),path:Y(),sizeBytes:Qe().int().nonnegative()}),Zj=se({specId:dt,previews:_e(av),composition:Y().nullable().default(null),compositions:_e(se({name:Y(),selected:Qt(),previews:_e(av)})).default([])}),qj=se({specId:dt,composition:Y(),alreadySelected:Qt()});function Bj(){return gn({queryKey:["specs"],queryFn:()=>ht("/api/specs",Oj)})}function Hj(t){return gn({queryKey:["specs",t],queryFn:()=>ht(`/api/specs/${t}`,zj)})}function $j(){return gn({queryKey:["manifest"],queryFn:()=>ht("/api/manifest",Nj)})}function Qj(t){const i=Oi();return rs({mutationFn:s=>ht(`/api/specs/${t}`,Tj,{method:"PUT",..._r(s)}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}function Gj(){const t=Oi();return rs({mutationFn:i=>ht("/api/specs",jj,{method:"POST",..._r(i)}),onSuccess:async()=>{await t.invalidateQueries({queryKey:["specs"]})}})}const Kj=se({email:Y(),displayName:Y(),role:Y(),host:se({environments:Qt(),mergePolicy:Y()}).optional()});function Yj(t){return t===void 0||t.pullRequest===null?!1:t.checks==="pending"||t.checks==="none"||t.mergeable===null?1e4:!1}function Fj(t,i){const s=t?.environments.find(r=>r.name==="development");return s!==void 0&&s.sha===i&&s.deployment?.state==="success"?!1:1e4}function Er(){return gn({queryKey:["me"],queryFn:()=>ht("/api/auth/me",Kj),retry:!1})}function Vj(){const t=Oi();return rs({mutationFn:i=>ht("/api/briefs",Rj,{method:"POST",..._r(i)}),onSuccess:async()=>{await t.invalidateQueries({queryKey:["specs"]})}})}function Pj(t){return gn({queryKey:["specs",t,"pull-request"],queryFn:()=>ht(`/api/specs/${t}/pull-request`,Cj),retry:!1,refetchInterval:i=>Yj(i.state.data)})}function Xj(t){return gn({queryKey:["pull-requests"],queryFn:()=>ht("/api/pull-requests",Mj),enabled:t,retry:!1})}function Jj(t){const i=Oi();return rs({mutationFn:()=>ht(`/api/specs/${t}/merge`,Dj,{method:"POST"}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}function Ij(t=!0){return gn({queryKey:["environments"],queryFn:()=>ht("/api/environments",d0),retry:!1,enabled:t})}function Wj(t,i){return gn({queryKey:["environments"],queryFn:()=>ht("/api/environments",d0),retry:!1,enabled:i,refetchInterval:s=>Fj(s.state.data,t)})}function eN(){const t=Oi();return rs({mutationFn:i=>{const{environment:s,...r}=i;return ht(`/api/environments/${s}/promotions`,Uj,{method:"POST",..._r(r)})},onSuccess:async()=>{await t.invalidateQueries({queryKey:["environments"]})}})}function tN(t){return gn({queryKey:["consumption",t],queryFn:()=>ht(`/api/consumption?month=${t}`,Lj),retry:!1})}function nN(t){return gn({queryKey:["specs",t,"previews"],queryFn:()=>ht(`/api/specs/${t}/previews`,Zj),retry:!1})}function iN(t){const i=Oi();return rs({mutationFn:s=>ht(`/api/specs/${t}/compositions/${s}/select`,qj,{method:"POST"}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}const aN={primary:"bg-accent text-accent-contrast hover:bg-accent-strong shadow-raised",secondary:"border border-border bg-surface-raised text-text hover:border-border-strong hover:bg-surface-sunken",danger:"bg-danger-soft text-danger border border-danger/40 hover:border-danger",ghost:"text-text-muted hover:text-text hover:bg-surface-sunken"};function pt({voice:t="secondary",size:i="md",className:s="",type:r="button",children:o,...c}){const d=i==="sm"?"px-2.5 py-1 text-xs":"px-3.5 py-2 text-sm";return b.jsx("button",{type:r,className:`inline-flex items-center justify-center gap-2 rounded-md font-medium transition-[background-color,border-color,color,transform] duration-(--duration-fast) ease-swell active:scale-[0.98] disabled:cursor-not-allowed disabled:opacity-50 ${d} ${aN[t]} ${s}`,...c,children:o})}const sN={neutral:"bg-surface-sunken text-text-muted border-border",accent:"bg-accent-soft text-accent border-accent/30",positive:"bg-positive-soft text-positive border-positive/30",warning:"bg-warning-soft text-warning border-warning/30",danger:"bg-danger-soft text-danger border-danger/30",orichalcum:"bg-surface-sunken text-orichalcum border-orichalcum/40"};function rt({tone:t="neutral",mono:i=!1,children:s,title:r}){return b.jsx("span",{title:r,className:`inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-xs font-medium leading-tight ${i?"font-mono":""} ${sN[t]}`,children:s})}function h0({status:t}){const i=t==="validated"?"accent":t==="implemented"?"positive":"neutral";return b.jsx(rt,{tone:i,children:t})}function m0({title:t,hint:i,action:s}){return b.jsxs("div",{className:"studio-rise flex flex-col items-center gap-3 rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 px-6 py-12 text-center",children:[b.jsx("p",{className:"font-display text-xl font-semibold text-text",children:t}),i!==void 0&&b.jsx("p",{className:"max-w-md text-sm text-text-muted",children:i}),s]})}function rN(t){return t instanceof wd?t.payload:null}function Nt({error:t}){const i=rN(t);if(i===null){const s=t instanceof Error?t.message:String(t);return b.jsx("div",{role:"alert",className:"rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:s})}return b.jsx(p0,{error:i})}function p0({error:t}){return b.jsxs("div",{role:"alert",className:"studio-rise rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:[b.jsx("p",{className:"font-mono text-xs font-bold uppercase tracking-wide text-danger",children:t.code}),b.jsx("p",{className:"mt-1 font-medium",children:t.message}),b.jsxs("dl",{className:"mt-2 space-y-1 text-xs text-text-muted",children:[t.file!=null&&b.jsxs("div",{className:"flex gap-2",children:[b.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Fichier"}),b.jsx("dd",{className:"font-mono",children:t.file})]}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Cause"}),b.jsx("dd",{className:"font-mono break-all",children:t.cause})]}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Correction suggérée"}),b.jsx("dd",{children:t.suggestedFix})]})]})]})}var lN=mv();function g0({open:t,title:i,children:s,onClose:r}){return X.useEffect(()=>{if(!t)return;const o=c=>{c.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t,r]),t?lN.createPortal(b.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-surface-sunken/70 p-4 backdrop-blur-sm",children:b.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":i,className:"studio-rise w-full max-w-md rounded-lg border border-border bg-surface-raised p-5 shadow-overlay",children:[b.jsxs("div",{className:"flex items-start justify-between gap-4",children:[b.jsx("h2",{className:"font-display text-xl font-semibold text-text",children:i}),b.jsx("button",{type:"button",onClick:r,className:"rounded p-1 text-text-faint transition-colors hover:bg-surface-sunken hover:text-text","aria-label":"Fermer",children:"✕"})]}),b.jsx("div",{className:"mt-3 text-sm text-text-muted",children:s})]})}),document.body):null}function as({eyebrow:t,title:i,explanation:s,actions:r}){return b.jsxs("header",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[b.jsxs("div",{className:"min-w-0",children:[t!==void 0&&b.jsx("p",{className:"mb-1 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:t}),b.jsx("h1",{className:"font-display text-2xl font-semibold leading-tight text-text",children:i}),s!==void 0&&b.jsx("p",{className:"mt-1 max-w-2xl text-sm text-text-muted",children:s})]}),r!==void 0&&b.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:r})]})}function Hn({children:t,className:i="",...s}){return b.jsx("section",{className:`rounded-lg border border-border bg-surface-raised p-4 shadow-raised ${i}`,...s,children:t})}const oN=[{status:"draft",title:"Draft",explanation:"en écriture",accent:"border-t-border-strong"},{status:"validated",title:"Validated",explanation:"signées, à implémenter",accent:"border-t-accent"},{status:"implemented",title:"Implemented",explanation:"livrées",accent:"border-t-positive"}],uN={P0:"danger",P1:"accent",P2:"neutral"},cN={green:"positive",red:"danger",pending:"warning",none:"neutral"},fN={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"};function sv(t){return!("error"in t)}function dN(t){return t instanceof HTMLElement&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable)}function hN(){const{data:t,isPending:i,error:s}=Bj(),r=Er(),o=Xj(r.data!==void 0),[c,d]=X.useState(""),[h,m]=X.useState(!1),p=X.useRef(null);if(X.useEffect(()=>{const w=z=>{z.metaKey||z.ctrlKey||z.altKey||dN(z.target)||(z.key==="/"?(z.preventDefault(),p.current?.focus()):z.key==="n"&&(z.preventDefault(),m(!0)))};return window.addEventListener("keydown",w),()=>window.removeEventListener("keydown",w)},[]),s)return b.jsx(Nt,{error:s});if(i)return b.jsx(gN,{});const v=t.specs.filter(sv),y=t.specs.filter(w=>!sv(w));if(t.specs.length===0)return b.jsx(m0,{title:"Aucune spec dans ce repo",hint:"Créez la première depuis le template canonique — elle naîtra en draft.",action:b.jsx(rv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})});const S=c.trim().toLowerCase(),x=w=>S===""||w.id.includes(S)||w.depends_on.some(z=>z.includes(S)),E=new Map((o.data?.pullRequests??[]).map(w=>[w.specId,w]));return b.jsxs("div",{className:"space-y-6",children:[b.jsx(as,{eyebrow:"Specs",title:"Board",explanation:`${v.length} spec${v.length>1?"s":""} lisible${v.length>1?"s":""} · le repo est l'état, le board n'est qu'une vue.`,actions:b.jsxs(b.Fragment,{children:[b.jsx("input",{ref:p,type:"search",value:c,onChange:w=>d(w.target.value),placeholder:"Filtrer ( / )","aria-label":"Filtrer les specs",className:"w-44 rounded-md border border-border bg-surface-raised px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),b.jsx(rv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})]})}),y.length>0&&b.jsx("section",{"aria-label":"Specs illisibles",className:"space-y-2",children:y.map(w=>b.jsx(p0,{error:w.error},w.filePath))}),b.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:oN.map(w=>b.jsx(mN,{column:w,specs:v.filter(z=>z.status===w.status&&x(z)),pullsBySpec:E},w.status))})]})}function mN({column:t,specs:i,pullsBySpec:s}){return b.jsxs("section",{"aria-label":`Colonne ${t.title}`,className:`flex flex-col rounded-lg border border-border border-t-2 bg-surface-sunken/50 p-3 ${t.accent}`,children:[b.jsxs("h2",{className:"mb-3 flex items-baseline justify-between px-1",children:[b.jsxs("span",{className:"font-display text-lg font-semibold text-text",children:[t.title," ",b.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:t.explanation})]}),b.jsx(cd,{value:i.length,className:"font-mono text-xs text-text-faint"})]}),i.length===0?b.jsx("p",{className:"rounded-md border border-dashed border-border px-3 py-6 text-center text-xs text-text-faint",children:"Aucune spec ici"}):b.jsx("ul",{className:"space-y-2",children:i.map((r,o)=>b.jsx("li",{className:"studio-reveal",style:{"--i":o},children:b.jsx(pN,{summary:r,pull:s.get(r.id)})},r.id))})]})}function pN({summary:t,pull:i}){const s=new Set(t.presentSections);return b.jsxs(ls,{to:"/specs/$specId",params:{specId:t.id},className:"group block rounded-md border border-border bg-surface-raised p-3 shadow-raised transition-[border-color,transform,box-shadow] duration-(--duration-base) ease-swell hover:-translate-y-0.5 hover:border-accent/60 hover:shadow-overlay",children:[b.jsxs("div",{className:"flex items-start justify-between gap-2",children:[b.jsx("p",{className:"min-w-0 truncate font-mono text-sm font-medium text-text group-hover:text-accent",children:t.id}),b.jsx(rt,{tone:uN[t.priority]??"neutral",children:t.priority})]}),b.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[b.jsx("ul",{"aria-label":`${s.size} sections sur ${Ja.length}`,className:"flex flex-1 gap-0.5",children:Ja.map(r=>b.jsx("li",{title:r,className:`h-1 flex-1 rounded-full ${s.has(r)?"bg-accent":"bg-border"}`},r))}),b.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[s.size,"/",Ja.length]})]}),(t.depends_on.length>0||i!==void 0)&&b.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[i!==void 0&&b.jsxs(rt,{tone:i.needsOperator?"orichalcum":cN[i.checks]??"neutral",mono:!0,title:i.needsOperator?"en attente de l'opérateur (needs-operator)":fN[i.checks]??i.checks,children:["#",i.number,i.needsOperator&&b.jsx("span",{"aria-hidden":"true",children:" ⚑"})]}),t.depends_on.map(r=>b.jsxs(rt,{mono:!0,title:`dépend de ${r}`,children:["← ",r]},r))]})]})}function gN(){return b.jsx("div",{"aria-label":"Chargement du board",className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[0,1,2].map(t=>b.jsx("div",{className:"studio-breathe h-64 rounded-lg border border-border"},t))})}function rv({open:t,onOpen:i,onClose:s}){const[r,o]=X.useState(""),c=No(),d=Gj(),h=()=>{d.mutate({id:r},{onSuccess:async m=>{s(),await c({to:"/specs/$specId",params:{specId:m.spec.id}})}})};return b.jsxs(b.Fragment,{children:[b.jsx(pt,{voice:"primary",onClick:()=>{d.reset(),o(""),i()},children:"Nouvelle spec"}),b.jsx(g0,{open:t,title:"Nouvelle spec depuis le template",onClose:s,children:b.jsxs("form",{onSubmit:m=>{m.preventDefault(),h()},className:"space-y-3",children:[b.jsxs("label",{className:"block text-sm text-text-muted",children:["Identifiant (kebab-case, il nomme le fichier specs/<id>.spec.md)",b.jsx("input",{value:r,onChange:m=>o(m.target.value),placeholder:"ma-nouvelle-feature",autoFocus:!0,className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 font-mono text-sm text-text focus:border-accent"})]}),d.error instanceof wd&&b.jsx(Nt,{error:d.error}),b.jsxs("div",{className:"flex justify-end gap-2",children:[b.jsx(pt,{voice:"ghost",onClick:s,children:"Annuler"}),b.jsx(pt,{voice:"primary",type:"submit",disabled:d.isPending||r==="",children:"Créer en draft"})]})]})})]})}function yN(t){const i=`
67
67
  ${t}`,s=[];let r=0;for(const o of Ja){const c=i.indexOf(`
68
- ${o}`,r);c!==-1&&(s.push(o),r=c+o.length)}return s}const mN={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"},pN={green:"positive",red:"danger",pending:"warning",none:"neutral"};function gN({specId:t,role:i}){const s=Yj(t),r=Fj(t);if(s.error)return b.jsx(Nt,{error:s.error});if(s.isPending)return b.jsx("div",{"aria-label":"Chargement de la pull request",className:"h-20 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const o=s.data;if(r.isSuccess)return b.jsxs("section",{role:"status",className:"studio-rise rounded-lg border border-positive/40 bg-positive-soft p-4 text-sm text-text",children:["Pull request #",r.data.pullRequestNumber," fusionnée : la spec est sur la branche par défaut, le déploiement de développement suit."]});const c=o.canMerge&&ov(i,o.requiredRole);return b.jsxs(Oi,{"aria-label":"Pull request de la spec",className:"text-sm",children:[b.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Pull request"}),o.pullRequest!==null&&b.jsxs(b.Fragment,{children:[b.jsxs("a",{className:"font-mono text-accent underline-offset-4 hover:underline",href:o.pullRequest.url,target:"_blank",rel:"noreferrer",children:["#",o.pullRequest.number]}),b.jsx(ft,{tone:pN[o.checks]??"neutral",children:mN[o.checks]??o.checks}),b.jsx(d0,{status:o.specStatus}),o.needsOperator&&b.jsx(ft,{tone:"orichalcum",children:"en attente de l'opérateur"})]})]}),b.jsx(mt,{voice:"primary",size:"sm",disabled:!c||r.isPending,onClick:()=>r.mutate(),children:r.isPending?"Fusion…":"Fusionner"})]}),o.pullRequest===null?b.jsxs("p",{className:"mt-2 text-text-muted",children:["Aucune pull request ouverte : la prochaine sauvegarde en ouvre une sur ",b.jsx("code",{className:"font-mono text-text",children:o.branch}),"."]}):b.jsxs("p",{className:"mt-2 text-text-muted",children:[b.jsx("span",{className:"text-text",children:o.pullRequest.title})," · branche ",b.jsx("code",{className:"font-mono",children:o.branch})]}),o.blockers.length>0&&b.jsx("ul",{className:"mt-3 space-y-1 text-text-muted",children:o.blockers.map(d=>b.jsxs("li",{className:"flex gap-2",children:[b.jsx("span",{"aria-hidden":"true",className:"text-warning",children:"●"}),d]},d))}),o.pullRequest!==null&&!ov(i,o.requiredRole)&&b.jsxs("p",{className:"mt-3 text-text-muted",children:["La fusion exige le rôle ",o.requiredRole,"."]}),r.error!=null&&b.jsx("div",{className:"mt-3",children:b.jsx(Nt,{error:r.error})})]})}const lv={reader:0,author:1,approver:2,operator:3};function ov(t,i){return(lv[t]??-1)>=(lv[i]??99)}const yN={empty:"Vide",loading:"Chargement",nominal:"Nominal",error:"Erreur"};function vN({specId:t}){const i=Ij(t),s=Wj(t),[r,o]=X.useState(null),[c,d]=X.useState(null);if(i.error)return b.jsx(Nt,{error:i.error});if(i.isPending)return b.jsx("div",{"aria-label":"Chargement des aperçus",className:"h-24 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const h=i.data.compositions,m=i.data.composition,p=h.length>0?h.find(S=>S.name===c)??h.find(S=>S.selected)??h[0]??null:null,v=p===null?i.data.previews:p.previews;if(v.length===0&&p===null)return b.jsxs("section",{"aria-label":"Aperçus de l'écran",className:"rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 p-4 text-sm text-text-muted",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Aperçus"}),b.jsx("p",{className:"mt-1",children:"Aucun aperçu sur la branche : la spéculation n'a pas encore rendu d'écran, ou cette spec n'en décrit pas."})]});const g=v.some(S=>S.state===r)?r??"":v[0]?.state??"",x=p===null?`/api/specs/${t}/previews/${g}`:`/api/specs/${t}/previews/${p.name}/${g}`;return b.jsxs(Oi,{"aria-label":"Aperçus de l'écran",className:"text-sm",children:[h.length>1&&b.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2 border-b border-border pb-3",children:[b.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Compositions"}),b.jsx("div",{role:"radiogroup","aria-label":"Compositions proposées",className:"flex flex-wrap gap-1.5",children:h.map(S=>b.jsx("button",{type:"button",role:"radio","aria-checked":p?.name===S.name,onClick:()=>d(S.name),className:`rounded-full border px-3 py-1 font-mono text-xs transition-colors ${p?.name===S.name?"border-accent bg-accent-soft text-accent":"border-border text-text-muted hover:text-text"}`,children:S.name},S.name))}),p!==null&&p.name===m&&b.jsx(ft,{tone:"positive",children:"retenue"}),p!==null&&p.name!==m&&b.jsx(mt,{voice:"primary",size:"sm",disabled:s.isPending,onClick:()=>s.mutate(p.name),children:s.isPending?"Sélection…":"Retenir cette composition"})]}),s.error!=null&&b.jsx("div",{className:"mb-3",children:b.jsx(Nt,{error:s.error})}),b.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[b.jsxs("h2",{className:"font-display text-lg font-semibold text-text",children:["Aperçus ",b.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"l'écran tel qu'il sera"})]}),b.jsx("div",{role:"tablist",className:"inline-flex rounded-md border border-border bg-surface-sunken p-0.5",children:v.map(S=>b.jsx("button",{role:"tab",type:"button","aria-selected":S.state===g,onClick:()=>o(S.state),className:`rounded px-3 py-1 text-xs font-medium transition-colors duration-(--duration-fast) ease-swell ${S.state===g?"bg-accent text-accent-contrast shadow-raised":"text-text-muted hover:text-text"}`,children:yN[S.state]??S.state},S.state))})]}),b.jsx("iframe",{title:`Aperçu ${g}`,sandbox:"",src:x,className:"mt-3 h-[480px] w-full rounded-md border border-border bg-surface-raised"})]})}function g0(t){return t instanceof r0?g0(t.def.innerType):t}function bN(){const t=os.shape;return Object.keys(t).map(i=>{const s=g0(t[i]);if(s instanceof Oo)return{name:i,kind:"enum",options:s.options.map(r=>String(r)),readOnly:!1};if(s instanceof i0)return{name:i,kind:"string-array",readOnly:!1};if(s instanceof e0)return{name:i,kind:"text",readOnly:i==="id"};throw new Error(`deriveFrontmatterFields: unsupported schema for "${String(i)}" — extend the derivation, never hand-describe the form`)})}function uv(t){return{id:t.id,status:t.status,depends_on:t.depends_on.join(`
68
+ ${o}`,r);c!==-1&&(s.push(o),r=c+o.length)}return s}const vN={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"},bN={green:"positive",red:"danger",pending:"warning",none:"neutral"},SN=new Set(["pending","queued","in_progress","expected","waiting","requested"]),xN=new Set(["success","neutral"]);function _N(t){return t===null||SN.has(t)?{label:"en cours",tone:"warning",live:!0}:xN.has(t)?{label:"vert",tone:"positive",live:!1}:t==="skipped"?{label:"sauté",tone:"neutral",live:!1}:{label:"rouge",tone:"danger",live:!1}}function y0({label:t}){return b.jsx("span",{role:"status","aria-label":t,className:"inline-flex items-center",children:b.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"})})}function EN({pullRequestNumber:t,mergeSha:i,environmentsConfigured:s}){const r=Wj(i,s),o=r.data?.environments.find(y=>y.name==="development"),c=o!==void 0&&o.sha===i,d=c&&o.deployment?.state==="success",h=c&&o.deployment!==null&&o.deployment!==void 0&&["failure","error"].includes(o.deployment.state??""),m=s&&!d&&!h&&r.error==null,p=s?r.error!=null?"Le suivi des environnements n'a pas répondu ; la fusion est faite.":d?`Déployée en development (${i.slice(0,7)}).`:h?`Le déploiement development a échoué sur ${i.slice(0,7)} : voir le workflow du produit.`:c?o.deployment===null||o.deployment===void 0?`La branche par défaut est sur ${i.slice(0,7)} ; en attente du déploiement development que le produit rapporte…`:`Déploiement development en cours (${o.deployment.state??"en attente"})…`:"Le développement suit : la branche par défaut reçoit le commit…":"Cet hôte ne suit pas de déploiement : pas de bloc environments.",v=d?"border-positive/40 bg-positive-soft":h?"border-danger/40 bg-danger-soft":"border-accent/30 bg-surface-raised";return b.jsx("section",{role:"status","aria-label":"Fusion et développement",className:`studio-rise rounded-lg border p-4 text-sm text-text ${v}`,children:b.jsxs("p",{className:"flex flex-wrap items-center gap-2",children:[m&&b.jsx(y0,{label:"développement en cours"}),b.jsxs("span",{className:"font-medium",children:["Pull request #",t," fusionnée."]}),b.jsx("span",{className:"text-text-muted",children:p})]})})}function wN({specId:t,role:i}){const s=Pj(t),r=Jj(t),o=Er();if(s.error)return b.jsx(Nt,{error:s.error});if(s.isPending)return b.jsx("div",{"aria-label":"Chargement de la pull request",className:"h-20 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const c=s.data;if(r.isSuccess)return b.jsx(EN,{pullRequestNumber:r.data.pullRequestNumber,mergeSha:r.data.mergeSha,environmentsConfigured:o.data?.host?.environments!==!1});const d=c.canMerge&&ov(i,c.requiredRole),h=c.pullRequest!==null&&(c.checks==="pending"||c.checks==="none"||c.mergeable===null);return b.jsxs(Hn,{"aria-label":"Pull request de la spec",className:"text-sm",children:[b.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[b.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Pull request"}),c.pullRequest!==null&&b.jsxs(b.Fragment,{children:[b.jsxs("a",{className:"font-mono text-accent underline-offset-4 hover:underline",href:c.pullRequest.url,target:"_blank",rel:"noreferrer",children:["#",c.pullRequest.number]}),b.jsx(rt,{tone:bN[c.checks]??"neutral",children:vN[c.checks]??c.checks}),h&&b.jsx(y0,{label:"la CI tourne, relue toutes les dix secondes"}),b.jsx(h0,{status:c.specStatus}),c.needsOperator&&b.jsx(rt,{tone:"orichalcum",children:"en attente de l'opérateur"})]})]}),b.jsx(pt,{voice:"primary",size:"sm",disabled:!d||r.isPending,onClick:()=>r.mutate(),children:r.isPending?"Fusion…":"Fusionner"})]}),c.pullRequest===null?b.jsxs("p",{className:"mt-2 text-text-muted",children:["Aucune pull request ouverte : la prochaine sauvegarde en ouvre une sur ",b.jsx("code",{className:"font-mono text-text",children:c.branch}),"."]}):b.jsxs("p",{className:"mt-2 text-text-muted",children:[b.jsx("span",{className:"text-text",children:c.pullRequest.title})," · branche ",b.jsx("code",{className:"font-mono",children:c.branch})]}),c.pullRequest!==null&&c.checkRuns.length>0&&b.jsx("ul",{"aria-label":"Checks de la branche",className:"mt-3 flex flex-wrap gap-2",children:c.checkRuns.map(m=>{const p=_N(m.conclusion);return b.jsxs("li",{className:"flex items-center gap-1.5 rounded-md border border-border bg-surface-raised px-2 py-1 font-mono text-xs",children:[b.jsx("span",{className:"text-text",children:m.name}),b.jsx(rt,{tone:p.tone,children:p.label})]},m.name)})}),c.blockers.length>0&&b.jsx("ul",{className:"mt-3 space-y-1 text-text-muted",children:c.blockers.map(m=>b.jsxs("li",{className:"flex gap-2",children:[b.jsx("span",{"aria-hidden":"true",className:"text-warning",children:"●"}),m]},m))}),c.pullRequest!==null&&!ov(i,c.requiredRole)&&b.jsxs("p",{className:"mt-3 text-text-muted",children:["La fusion exige le rôle ",c.requiredRole,"."]}),r.error!=null&&b.jsx("div",{className:"mt-3",children:b.jsx(Nt,{error:r.error})})]})}const lv={reader:0,author:1,approver:2,operator:3};function ov(t,i){return(lv[t]??-1)>=(lv[i]??99)}const ON={empty:"Vide",loading:"Chargement",nominal:"Nominal",error:"Erreur"};function zN({specId:t}){const i=nN(t),s=iN(t),[r,o]=X.useState(null),[c,d]=X.useState(null);if(i.error)return b.jsx(Nt,{error:i.error});if(i.isPending)return b.jsx("div",{"aria-label":"Chargement des aperçus",className:"h-24 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const h=i.data.compositions,m=i.data.composition,p=h.length>0?h.find(x=>x.name===c)??h.find(x=>x.selected)??h[0]??null:null,v=p===null?i.data.previews:p.previews;if(v.length===0&&p===null)return b.jsxs("section",{"aria-label":"Aperçus de l'écran",className:"rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 p-4 text-sm text-text-muted",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Aperçus"}),b.jsx("p",{className:"mt-1",children:"Aucun aperçu sur la branche : la spéculation n'a pas encore rendu d'écran, ou cette spec n'en décrit pas."})]});const y=v.some(x=>x.state===r)?r??"":v[0]?.state??"",S=p===null?`/api/specs/${t}/previews/${y}`:`/api/specs/${t}/previews/${p.name}/${y}`;return b.jsxs(Hn,{"aria-label":"Aperçus de l'écran",className:"text-sm",children:[h.length>1&&b.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2 border-b border-border pb-3",children:[b.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Compositions"}),b.jsx("div",{role:"radiogroup","aria-label":"Compositions proposées",className:"flex flex-wrap gap-1.5",children:h.map(x=>b.jsx("button",{type:"button",role:"radio","aria-checked":p?.name===x.name,onClick:()=>d(x.name),className:`rounded-full border px-3 py-1 font-mono text-xs transition-colors ${p?.name===x.name?"border-accent bg-accent-soft text-accent":"border-border text-text-muted hover:text-text"}`,children:x.name},x.name))}),p!==null&&p.name===m&&b.jsx(rt,{tone:"positive",children:"retenue"}),p!==null&&p.name!==m&&b.jsx(pt,{voice:"primary",size:"sm",disabled:s.isPending,onClick:()=>s.mutate(p.name),children:s.isPending?"Sélection…":"Retenir cette composition"})]}),s.error!=null&&b.jsx("div",{className:"mb-3",children:b.jsx(Nt,{error:s.error})}),b.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[b.jsxs("h2",{className:"font-display text-lg font-semibold text-text",children:["Aperçus ",b.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"l'écran tel qu'il sera"})]}),b.jsx("div",{role:"tablist",className:"inline-flex rounded-md border border-border bg-surface-sunken p-0.5",children:v.map(x=>b.jsx("button",{role:"tab",type:"button","aria-selected":x.state===y,onClick:()=>o(x.state),className:`rounded px-3 py-1 text-xs font-medium transition-colors duration-(--duration-fast) ease-swell ${x.state===y?"bg-accent text-accent-contrast shadow-raised":"text-text-muted hover:text-text"}`,children:ON[x.state]??x.state},x.state))})]}),b.jsx("iframe",{title:`Aperçu ${y}`,sandbox:"",src:S,className:"mt-3 h-[480px] w-full rounded-md border border-border bg-surface-raised"})]})}function v0(t){return t instanceof r0?v0(t.def.innerType):t}function TN(){const t=us.shape;return Object.keys(t).map(i=>{const s=v0(t[i]);if(s instanceof Oo)return{name:i,kind:"enum",options:s.options.map(r=>String(r)),readOnly:!1};if(s instanceof i0)return{name:i,kind:"string-array",readOnly:!1};if(s instanceof e0)return{name:i,kind:"text",readOnly:i==="id"};throw new Error(`deriveFrontmatterFields: unsupported schema for "${String(i)}" — extend the derivation, never hand-describe the form`)})}function uv(t){return{id:t.id,status:t.status,depends_on:t.depends_on.join(`
69
69
  `),priority:t.priority,refs:t.refs.join(`
70
70
  `),deferred:t.deferred.join(`
71
71
  `)}}function _f(t){return t.split(`
72
- `).map(i=>i.trim()).filter(i=>i!=="")}function SN(t){return{id:t.id,status:t.status,depends_on:_f(t.depends_on),priority:t.priority,refs:_f(t.refs),deferred:_f(t.deferred)}}function xN(t){const i=[],s=t.split(`
72
+ `).map(i=>i.trim()).filter(i=>i!=="")}function jN(t){return{id:t.id,status:t.status,depends_on:_f(t.depends_on),priority:t.priority,refs:_f(t.refs),deferred:_f(t.deferred)}}function NN(t){const i=[],s=t.split(`
73
73
  `);let r=0;for(;r<s.length;){const c=(s[r]??"").trim();if(c===""){r+=1;continue}const d=/^(#{1,6})\s+(.*)$/.exec(c);if(d!==null){i.push({kind:"heading",level:(d[1]??"#").length,text:d[2]??""}),r+=1;continue}if(c.startsWith("```")){const m=[];for(r+=1;r<s.length&&!(s[r]??"").trim().startsWith("```");)m.push(s[r]??""),r+=1;r+=1,i.push({kind:"code",text:m.join(`
74
- `)});continue}if(c.startsWith("- ")){const m=[];for(;r<s.length;){const p=(s[r]??"").trim();if(p.startsWith("- "))m.push(p.slice(2)),r+=1;else if(p!==""&&!p.startsWith("#"))m[m.length-1]=`${m[m.length-1]??""} ${p}`,r+=1;else break}i.push({kind:"bullet",items:m});continue}const h=[];for(;r<s.length;){const m=(s[r]??"").trim();if(m===""||m.startsWith("#")||m.startsWith("- ")||m.startsWith("```"))break;h.push(m),r+=1}i.push({kind:"paragraph",text:h.join(" ")})}return i}const _N={1:"font-display text-xl font-semibold text-text mt-6 first:mt-0 border-b border-border pb-1",2:"font-display text-lg font-semibold text-text mt-4"};function EN({markdown:t}){const i=xN(t);return i.length===0?b.jsx("p",{className:"text-sm text-text-faint",children:"Rien à prévisualiser encore."}):b.jsx("div",{className:"space-y-2",children:i.map((s,r)=>s.kind==="heading"?b.jsx("p",{className:_N[Math.min(s.level,2)],children:s.text},r):s.kind==="bullet"?b.jsx("ul",{className:"list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-accent",children:s.items.map((o,c)=>b.jsx("li",{children:o},c))},r):s.kind==="code"?b.jsx("pre",{className:"overflow-x-auto rounded-md border border-border bg-surface-sunken p-3 font-mono text-xs text-text",children:s.text},r):b.jsx("p",{className:"text-sm text-text-muted",children:s.text},r))})}const Wl="mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent";function ON({specId:t}){const{data:i,isPending:s,error:r}=Bj(t);return r?b.jsxs("div",{className:"space-y-3",children:[b.jsx(y0,{}),b.jsx(Nt,{error:r})]}):s?b.jsx("div",{"aria-label":"Chargement de la spec",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):b.jsx(wN,{specId:t,initialFrontmatter:i.frontmatter,initialBody:i.body},t)}function y0(){return b.jsx(rs,{to:"/",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-accent",children:"← Retour au board"})}function wN({specId:t,initialFrontmatter:i,initialBody:s}){const r=bN(),[o,c]=X.useState(()=>uv(i)),[d,h]=X.useState(()=>({form:uv(i),body:s})),[m,p]=X.useState(s),[v,g]=X.useState(null),[x,S]=X.useState(!1),E=$j(t),O=ko(),T=m!==d.body||JSON.stringify(o)!==JSON.stringify(d.form),R=new Set(hN(m)),q=(C,N)=>{c(V=>({...V,[C]:N}))},G=()=>{const C=os.safeParse(SN(o));return C.success?(g(null),C.data):(g(C.error.issues.map(N=>`${N.path.join(".")}: ${N.message}`).join(" ; ")),null)},K=()=>{const C=G();C!==null&&E.mutate({frontmatter:C,body:m},{onSuccess:()=>h({form:o,body:m})})},P=()=>{const C=G();if(C===null){S(!1);return}const N={...o,status:"validated"};E.mutate({frontmatter:{...C,status:"validated"},body:m},{onSuccess:()=>{c(N),h({form:N,body:m})},onSettled:()=>S(!1)})};return X.useEffect(()=>{const C=N=>{(N.metaKey||N.ctrlKey)&&N.key.toLowerCase()==="s"&&(N.preventDefault(),K())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)}),b.jsxs("div",{className:"space-y-5",children:[b.jsxs("div",{className:"sticky top-0 z-10 -mx-8 -mt-8 border-b border-border bg-surface/85 px-8 py-4 backdrop-blur",children:[b.jsx(y0,{}),b.jsxs("div",{className:"mt-1 flex flex-wrap items-center justify-between gap-3",children:[b.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[b.jsx("h1",{className:"truncate font-display text-2xl font-semibold leading-tight text-text",children:t}),b.jsx(d0,{status:o.status}),T&&b.jsx(ft,{tone:"orichalcum",children:"Modifications non enregistrées"})]}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx(mt,{onClick:K,disabled:E.isPending,title:"⌘S / Ctrl+S",children:"Enregistrer"}),o.status==="draft"&&b.jsx(mt,{voice:"primary",onClick:()=>S(!0),disabled:E.isPending,children:"Valider"})]})]})]}),O.data!==void 0&&b.jsx(vN,{specId:t}),O.data!==void 0&&b.jsx(gN,{specId:t,role:O.data.role}),v!==null&&b.jsxs("div",{role:"alert",className:"rounded-md border border-warning/40 bg-warning-soft p-3 text-sm text-text",children:["Frontmatter invalide : ",v]}),E.error!=null&&b.jsx(Nt,{error:E.error}),E.isSuccess&&E.error==null&&!T&&b.jsxs("p",{role:"status",className:"studio-rise rounded-md border border-positive/40 bg-positive-soft p-3 text-sm text-text",children:["Spec enregistrée — statut : ",E.data.spec.status,"."]}),b.jsxs("ol",{"aria-label":"Sections canoniques",className:"flex flex-wrap gap-2",children:[Ja.map((C,N)=>{const V=C.replace(/^# /u,"");return b.jsx("li",{children:b.jsx(ft,{tone:R.has(C)?"accent":"neutral",title:R.has(C)?"section présente":"section absente ou hors ordre",children:`${N+1} · ${V}`})},C)}),b.jsxs("li",{className:"self-center font-mono text-xs text-text-faint",children:[R.size,"/",Ja.length," présentes, dans l'ordre du gate"]})]}),b.jsxs(Oi,{"aria-label":"Frontmatter",children:[b.jsxs("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:["Frontmatter ",b.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"formulaire dérivé de SpecFrontmatterSchema"})]}),b.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:r.map(C=>b.jsxs("label",{className:"block text-sm text-text-muted",children:[b.jsx("span",{className:"font-mono text-xs text-text-faint",children:C.name}),C.kind==="enum"?b.jsx("select",{value:o[C.name],onChange:N=>q(C.name,N.target.value),className:Wl,children:(C.options??[]).map(N=>b.jsx("option",{value:N,children:N},N))}):C.kind==="string-array"?b.jsx("textarea",{value:o[C.name],onChange:N=>q(C.name,N.target.value),rows:2,placeholder:"un élément par ligne",className:`${Wl} font-mono text-xs`}):b.jsx("input",{value:o[C.name],readOnly:C.readOnly,onChange:N=>q(C.name,N.target.value),className:`${Wl} font-mono ${C.readOnly?"bg-surface-sunken text-text-faint":""}`})]},C.name))})]}),b.jsxs("section",{"aria-label":"Sections markdown",className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[b.jsxs("label",{className:"block text-sm text-text-muted",children:[b.jsx("span",{className:"font-mono text-xs text-text-faint",children:"sections (markdown)"}),b.jsx("textarea",{value:m,onChange:C=>p(C.target.value),rows:28,spellCheck:!1,className:`${Wl} resize-y p-3 font-mono text-xs leading-relaxed`}),b.jsxs("span",{className:"mt-1 block text-right font-mono text-xs text-text-faint",children:[m.split(`
75
- `).length," lignes · ",m.trim()===""?0:m.trim().split(/\s+/u).length," mots"]})]}),b.jsxs("div",{className:"text-sm",children:[b.jsx("span",{className:"font-mono text-xs text-text-faint",children:"preview"}),b.jsx("div",{className:"mt-1 h-full rounded-md border border-border bg-surface-raised p-5 shadow-raised",children:b.jsx(EN,{markdown:m})})]})]}),b.jsxs(p0,{open:x,title:`Valider ${t} ?`,onClose:()=>S(!1),children:[b.jsxs("p",{children:["Une spec validée est un contrat d'implémentation : status passera à « validated » et le fichier sera réécrit (message « spec: validate ",t," »)."]}),b.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[b.jsx(mt,{voice:"ghost",onClick:()=>S(!1),children:"Annuler"}),b.jsx(mt,{voice:"primary",onClick:P,disabled:E.isPending,children:"Confirmer la validation"})]})]})]})}const zN={skeleton:"neutral","in-progress":"warning",delivered:"positive"},TN={GET:"accent",POST:"positive",PUT:"warning",PATCH:"warning",DELETE:"danger"};function jN(){const{data:t,isPending:i,error:s}=Hj();if(s)return b.jsx(Nt,{error:s});if(i)return b.jsx("div",{"aria-label":"Chargement du manifeste",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const{manifest:r}=t,o=r.features.reduce((d,h)=>d+h.routes.length,0),c=r.features.filter(d=>d.status==="delivered").length;return b.jsxs("div",{className:"space-y-6",children:[b.jsx(_r,{eyebrow:"Manifeste · lecture seule",title:r.product.name,explanation:r.product.description}),b.jsx("dl",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"apps",value:r.apps.length},{label:"features",value:r.features.length},{label:"livrées",value:c},{label:"routes",value:o}].map((d,h)=>b.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":h},children:[b.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:d.label}),b.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:b.jsx(cd,{value:d.value})})]},d.label))}),b.jsxs(Oi,{"aria-label":"Apps",children:[b.jsx("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:"Apps"}),b.jsx("ul",{className:"divide-y divide-border text-sm",children:r.apps.map(d=>b.jsxs("li",{className:"flex flex-wrap items-center gap-3 py-2",children:[b.jsx("span",{className:"font-mono font-medium text-text",children:d.name}),b.jsx(ft,{children:d.type}),b.jsx("span",{className:"font-mono text-xs text-text-faint",children:d.path})]},d.name))})]}),b.jsxs("section",{"aria-label":"Features",className:"space-y-3",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Features"}),r.features.map(d=>b.jsxs(Oi,{children:[b.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b.jsx("h3",{className:"font-mono text-sm font-semibold text-text",children:d.name}),b.jsx(ft,{tone:zN[d.status]??"neutral",children:d.status})]}),b.jsx("p",{className:"mt-1 text-sm text-text-muted",children:d.intent}),d.dependsOn.length>0&&b.jsxs("p",{className:"mt-3 flex flex-wrap items-center gap-1.5 text-xs text-text-faint",children:["Dépend de :"," ",d.dependsOn.map(h=>b.jsx(ft,{mono:!0,children:h},h))]}),d.routes.length>0&&b.jsx("ul",{className:"mt-3 space-y-1 text-xs",children:d.routes.map(h=>b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"w-16 shrink-0",children:b.jsx(ft,{tone:TN[h.method]??"neutral",mono:!0,children:h.method})}),b.jsx("span",{className:"font-mono text-text-muted",children:h.path})]},`${h.method} ${h.path}`))})]},d.name))]})]})}const NN=re({accepted:pi(!0)});function cv({children:t}){return b.jsxs("div",{className:"mx-auto max-w-md pt-12",children:[b.jsxs("p",{className:"mb-6 flex flex-col items-center text-center",children:[b.jsx(ob,{size:"lg",label:"Ogygie",className:"mb-3 text-accent"}),b.jsx("span",{className:"font-display text-4xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),b.jsx("span",{className:"mt-2 block font-mono text-xs uppercase tracking-[0.3em] text-accent",children:"Studio hébergé"})]}),b.jsx("div",{className:"studio-rise rounded-lg border border-border bg-surface-raised p-6 shadow-overlay",children:t})]})}function AN(){const[t,i]=X.useState(""),[s,r]=X.useState({kind:"idle"});async function o(c){c.preventDefault(),r({kind:"sending"});try{await pt("/api/auth/magic-link",NN,{method:"POST",...xr({email:t})}),r({kind:"sent"})}catch(d){r({kind:"error",error:d})}}return s.kind==="sent"?b.jsx(cv,{children:b.jsxs("section",{children:[b.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Vérifiez votre boîte mail"}),b.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"Si ce compte existe, un lien de connexion a été envoyé. Il est valable quinze minutes et ne sert qu'une fois."})]})}):b.jsx(cv,{children:b.jsxs("form",{onSubmit:o,children:[b.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Connexion"}),b.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Un lien de connexion vous sera envoyé par courriel."}),b.jsx("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"login-email",children:"Adresse e-mail"}),b.jsx("input",{id:"login-email",type:"email",required:!0,autoComplete:"email",autoFocus:!0,value:t,onChange:c=>i(c.target.value),className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),s.kind==="error"&&b.jsx("div",{className:"mt-3",children:b.jsx(Nt,{error:s.error})}),b.jsx(mt,{voice:"primary",type:"submit",disabled:s.kind==="sending",className:"mt-5 w-full",children:s.kind==="sending"?"Envoi…":"Recevoir un lien"})]})})}const eo=50,RN=["Je veux une rubrique qui liste les commandes du mois avec leur statut, et un bouton pour marquer une commande livrée.","Les clients doivent pouvoir noter une intervention de 1 à 5 ; une note sous 3 déclenche une alerte au responsable."],CN=[{title:"Décrivez",detail:"le besoin, en français, comme à un collègue"},{title:"Le modèle rédige",detail:"la spec dans le format du repo ; les gates la jugent avant tout affichage"},{title:"Vous relisez",detail:"les comportements d'abord, puis vous validez — rien ne se code avant"}],fv="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",Ef=[".md",".markdown",".txt",".csv",".json",".html",".htm",".xlsx",".pdf"],MN=5,DN=4*1024*1024,dv=t=>t<1024?`${t} o`:t<1024*1024?`${Math.round(t/1024)} Ko`:`${(t/(1024*1024)).toFixed(1)} Mo`;async function kN(t){const i=new Uint8Array(await t.arrayBuffer());let s="";for(let r=0;r<i.length;r+=32768)s+=String.fromCharCode(...i.subarray(r,r+32768));return btoa(s)}function UN(){const[t,i]=X.useState(""),[s,r]=X.useState(""),[o,c]=X.useState([]),[d,h]=X.useState(null),m=jo(),p=Kj(),v=t.trim().length;async function g(S){const E=Array.from(S.target.files??[]);S.target.value="",h(null);const O=[...o];for(const T of E){const R=T.name.toLowerCase();if(!Ef.some(q=>R.endsWith(q))){h(`« ${T.name} » : format non retenu — ${Ef.join(", ")}.`);continue}if(T.size>DN){h(`« ${T.name} » : ${dv(T.size)}, au-delà de 4 Mo par pièce.`);continue}if(O.length>=MN){h(`Cinq pièces au plus : « ${T.name} » n'est pas jointe.`);break}O.some(q=>q.name===T.name)||O.push({name:T.name,size:T.size,contentBase64:await kN(T)})}c(O)}function x(S){S.preventDefault(),p.mutate({brief:t,...s.trim()===""?{}:{specId:s.trim()},...o.length===0?{}:{attachments:o.map(E=>({name:E.name,contentBase64:E.contentBase64}))}},{onSuccess:E=>{m({to:"/specs/$specId",params:{specId:E.specId}})}})}return b.jsxs("form",{onSubmit:x,className:"space-y-6",children:[b.jsx(_r,{eyebrow:"Hébergé",title:"Décrire une rubrique",explanation:"Écrivez le besoin en français. Le modèle rédige la spec, les gates du repo la jugent, puis vous la relisez avant de la valider."}),b.jsx("ol",{className:"grid gap-3 md:grid-cols-3",children:CN.map((S,E)=>b.jsxs("li",{className:"rounded-lg border border-border bg-surface-raised p-4 shadow-raised",children:[b.jsxs("p",{className:"font-mono text-xs text-accent",children:["0",E+1]}),b.jsx("p",{className:"mt-1 font-display text-lg font-semibold text-text",children:S.title}),b.jsx("p",{className:"mt-1 text-sm text-text-muted",children:S.detail})]},S.title))}),b.jsxs(Oi,{children:[b.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[b.jsx("label",{className:"block text-sm font-medium text-text",htmlFor:"brief-text",children:"Brief"}),b.jsxs("span",{className:`font-mono text-xs ${v<eo?"text-text-faint":"text-positive"}`,children:[v," / ",eo," caractères minimum"]})]}),b.jsx("textarea",{id:"brief-text",required:!0,minLength:eo,rows:10,value:t,onChange:S=>i(S.target.value),placeholder:"Je veux une rubrique qui…",className:`${fv} mt-2 font-sans leading-relaxed`}),b.jsx("p",{className:"mt-3 text-xs text-text-faint",children:"Pour voir le ton attendu :"}),b.jsx("ul",{className:"mt-1 flex flex-wrap gap-2",children:RN.map(S=>b.jsx("li",{children:b.jsxs(mt,{voice:"ghost",size:"sm",onClick:()=>i(S),className:"max-w-md text-left whitespace-normal",children:["« ",S," »"]})},S))}),b.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-spec-id",children:["Spec visée ",b.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel, pour amender une spec existante)"})]}),b.jsx("input",{id:"brief-spec-id",value:s,onChange:S=>r(S.target.value),placeholder:"ex. suivi-des-commandes",className:`${fv} mt-1 font-mono`}),b.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-attachments",children:["Pièces jointes ",b.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel : une maquette HTML, un classeur, un document)"})]}),b.jsx("input",{id:"brief-attachments",type:"file",multiple:!0,accept:Ef.join(","),onChange:S=>{g(S)},className:"mt-1 block w-full text-sm text-text-muted file:mr-3 file:rounded-md file:border file:border-border file:bg-surface file:px-3 file:py-1.5 file:text-sm file:text-text"}),b.jsx("p",{className:"mt-1 text-xs text-text-faint",children:"Cinq pièces au plus, 4 Mo chacune : md, txt, csv, json, html, xlsx, pdf. Le modèle les lit comme votre matériau ; rien n'est conservé."}),d!==null&&b.jsx("p",{role:"alert",className:"mt-2 text-xs text-danger",children:d}),o.length>0&&b.jsx("ul",{"aria-label":"Pièces jointes au brief",className:"mt-2 space-y-1",children:o.map(S=>b.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border px-3 py-1.5 text-sm",children:[b.jsx("span",{className:"truncate font-mono text-text",children:S.name}),b.jsxs("span",{className:"flex items-center gap-3",children:[b.jsx("span",{className:"font-mono text-xs text-text-faint",children:dv(S.size)}),b.jsx(mt,{voice:"ghost",size:"sm",onClick:()=>c(o.filter(E=>E.name!==S.name)),"aria-label":`Retirer ${S.name}`,children:"Retirer"})]})]},S.name))})]}),p.isPending&&b.jsxs("p",{role:"status",className:"flex items-center gap-2 text-sm text-text-muted",children:[b.jsx("span",{"aria-hidden":"true",className:"inline-block h-2 w-2 animate-pulse rounded-full bg-accent"}),"Le modèle écrit, puis les gates jugent… (jusqu'à deux tentatives)"]}),p.error!=null&&b.jsx(Nt,{error:p.error}),b.jsx(mt,{voice:"primary",type:"submit",disabled:p.isPending||v<eo,children:"Rédiger la spec"})]})}const Of={development:"Développement",staging:"Préproduction",production:"Production"},LN={success:"positive",failure:"danger",error:"danger",in_progress:"warning",pending:"warning",queued:"warning"},wf="mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent";function ZN(){const t=Pj(),i=ko(),s=Xj(),[r,o]=X.useState({environment:"staging",sha:"",reason:""});if(t.error)return b.jsx(Nt,{error:t.error});if(t.isPending)return b.jsx("div",{"aria-label":"Chargement des environnements",className:"h-40 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const c=t.data,d=g=>c.environments.find(x=>x.name===g)?.sha??null,h=d("development"),m=d("staging"),p=i.data?.role==="operator",v={staging:h,production:m};return b.jsxs("div",{className:"space-y-6",children:[b.jsx(_r,{eyebrow:"Hébergé",title:"Promotions",explanation:"La production ne reçoit que ce que la préproduction a reçu, au commit près."}),s.error!=null&&b.jsx(Nt,{error:s.error}),s.isSuccess&&b.jsxs("p",{role:"status",className:"studio-rise rounded-md border border-positive/40 bg-positive-soft p-3 text-sm text-text",children:[Of[s.data.environment]," est à ",s.data.toSha.slice(0,7),s.data.releaseTag===null?"":` — release ${s.data.releaseTag}`,"."]}),b.jsx("ol",{className:"grid gap-3 md:grid-cols-[1fr_auto_1fr_auto_1fr] md:items-stretch",children:c.environments.map((g,x)=>{const S=v[g.name],E=S!=null&&S===g.sha,O=S!=null&&S!==g.sha;return b.jsxs("li",{className:"contents",children:[x>0&&b.jsx("span",{"aria-hidden":"true",className:"hidden self-center font-display text-2xl text-text-faint md:block",children:"→"}),b.jsxs(Oi,{"aria-label":Of[g.name]??g.name,className:"flex flex-col",children:[b.jsxs("div",{className:"flex items-start justify-between gap-2",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:Of[g.name]??g.name}),E&&b.jsx(ft,{tone:"positive",children:"à jour"}),O&&b.jsx(ft,{tone:"warning",children:"en retard"})]}),b.jsx("p",{className:"font-mono text-xs text-text-faint",children:g.ref}),b.jsx("p",{className:"mt-3 font-mono text-2xl text-text",children:g.sha===null?"(aucun commit)":g.sha.slice(0,7)}),g.deployment!==null&&b.jsxs("p",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[b.jsx(ft,{tone:LN[g.deployment.state??"pending"]??"neutral",children:g.deployment.state??"en attente"}),"déployé le ",g.deployment.createdAt.slice(0,10)]}),b.jsxs("div",{className:"mt-auto pt-4",children:[g.name==="staging"&&b.jsx(mt,{voice:"primary",size:"sm",className:"w-full",disabled:h===null||h===m||s.isPending,onClick:()=>h!==null&&s.mutate({environment:"staging",sha:h}),children:"Promouvoir le développement vers la préproduction"}),g.name==="production"&&b.jsx(mt,{voice:"primary",size:"sm",className:"w-full",disabled:m===null||m===g.sha||s.isPending,onClick:()=>m!==null&&s.mutate({environment:"production",sha:m}),children:"Promouvoir la préproduction vers la production"})]})]})]},g.name)})}),b.jsxs(Oi,{children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Releases"}),c.releases.length===0?b.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Aucune mise en production étiquetée."}):b.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:c.releases.map(g=>b.jsx("li",{children:b.jsx(ft,{tone:"orichalcum",mono:!0,children:g})},g))})]}),p&&b.jsxs("form",{className:"rounded-lg border border-danger/40 bg-danger-soft/40 p-4 text-sm",onSubmit:g=>{g.preventDefault(),s.mutate({environment:r.environment,sha:r.sha.trim(),rollback:!0,reason:r.reason.trim()})},children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Retour arrière (opérateur)"}),b.jsx("p",{className:"mt-1 text-xs text-text-muted",children:"Le seul chemin qui remonte le courant : il se motive, il se journalise."}),b.jsxs("div",{className:"mt-3 grid gap-3 md:grid-cols-3",children:[b.jsxs("label",{className:"text-xs text-text-muted",children:["Environnement",b.jsxs("select",{value:r.environment,onChange:g=>o({...r,environment:g.target.value}),className:wf,children:[b.jsx("option",{value:"staging",children:"Préproduction"}),b.jsx("option",{value:"production",children:"Production"})]})]}),b.jsxs("label",{className:"text-xs text-text-muted",children:["Commit (sha complet)",b.jsx("input",{value:r.sha,onChange:g=>o({...r,sha:g.target.value}),className:`${wf} font-mono`})]}),b.jsxs("label",{className:"text-xs text-text-muted",children:["Motif",b.jsx("input",{value:r.reason,onChange:g=>o({...r,reason:g.target.value}),className:wf})]})]}),b.jsx(mt,{voice:"danger",size:"sm",type:"submit",className:"mt-4",disabled:s.isPending||r.sha.length!==40||r.reason.trim().length<10,children:"Revenir en arrière"})]})]})}function qN(t){const i=[],s=new Date;for(let r=0;r<t;r+=1){const o=new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth()-r,1));i.push(o.toISOString().slice(0,7))}return i}const rr=t=>`${t.toFixed(2)} $`,hv=t=>new Intl.NumberFormat("fr-FR",{notation:"compact",maximumFractionDigits:1}).format(t),hi="px-3 py-2 text-right font-mono tabular-nums";function BN(){const t=qN(6),[i,s]=X.useState(t[0]??""),r=Jj(i);return b.jsxs("div",{className:"space-y-6",children:[b.jsx(_r,{eyebrow:"Hébergé",title:"Consommation",explanation:"Estimation à partir des jetons rapportés ; la facture vient de l'espace de travail du client.",actions:b.jsxs("label",{className:"text-sm text-text-muted",children:["Mois",b.jsx("select",{value:i,onChange:o=>s(o.target.value),className:"ml-2 rounded-md border border-border bg-surface-raised px-3 py-2 font-mono text-sm text-text",children:t.map(o=>b.jsx("option",{value:o,children:o},o))})]})}),r.error?b.jsx(Nt,{error:r.error}):null,r.isPending?b.jsx("div",{"aria-label":"Chargement de la consommation",className:"h-40 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):null,r.data!==void 0&&b.jsxs(b.Fragment,{children:[b.jsx("dl",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"appels",value:r.data.totals.runs,format:String},{label:"jetons entrés",value:r.data.totals.inputTokens,format:hv},{label:"jetons sortis",value:r.data.totals.outputTokens,format:hv},{label:"estimation",value:r.data.totals.estimatedUsd,format:rr}].map((o,c)=>b.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":c},children:[b.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:o.label}),b.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:b.jsx(cd,{value:o.value,format:o.format})})]},o.label))}),r.data.budgetUsd!==null&&b.jsxs("section",{"aria-label":"Plafond du mois",className:`rounded-lg border p-4 text-sm shadow-raised ${r.data.warning?"border-warning/50 bg-warning-soft text-text":"border-border bg-surface-raised text-text-muted"}`,children:[b.jsxs("p",{children:[rr(r.data.totals.estimatedUsd)," sur un plafond de ",rr(r.data.budgetUsd),r.data.budgetRatio!==null?` (${Math.round(r.data.budgetRatio*100)} %)`:""]}),b.jsx("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-surface-sunken",role:"presentation",children:b.jsx("div",{className:`h-full rounded-full transition-[width] duration-(--duration-slow) ease-swell ${r.data.warning?"bg-warning":"bg-accent"}`,style:{width:`${Math.min(100,Math.round((r.data.budgetRatio??0)*100))}%`}})}),r.data.warning&&b.jsx("p",{className:"mt-2 font-medium",children:"Plus de 80 % du plafond : au-delà, le modèle refusera jusqu'au mois prochain."})]}),r.data.specs.length===0?b.jsx(h0,{title:"Aucun appel de modèle ce mois-ci",hint:"Les briefs et les spéculations à venir apparaîtront ici, par spec."}):b.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-surface-raised shadow-raised",children:b.jsxs("table",{className:"w-full text-sm",children:[b.jsx("thead",{className:"bg-surface-sunken/60 text-left font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:b.jsxs("tr",{children:[b.jsx("th",{className:"px-3 py-2 font-normal",children:"Spec"}),b.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Runs"}),b.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Entrée"}),b.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Sortie"}),b.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Estimation"})]})}),b.jsxs("tbody",{children:[r.data.specs.map(o=>b.jsxs("tr",{className:"border-t border-border transition-colors hover:bg-surface-sunken/40",children:[b.jsxs("td",{className:"px-3 py-2 font-mono text-text",children:[o.specId," ",b.jsxs("span",{className:"text-xs text-text-faint",children:["#",o.pullRequestNumber]})]}),b.jsx("td",{className:hi,children:o.runs}),b.jsx("td",{className:hi,children:o.inputTokens}),b.jsx("td",{className:hi,children:o.outputTokens}),b.jsxs("td",{className:hi,children:[rr(o.estimatedUsd),o.uncostedModels.length>0&&b.jsxs("span",{className:"ml-1 font-sans text-xs text-text-faint",children:["(+ ",o.uncostedModels.join(", ")," sans coût connu)"]})]})]},o.specId)),b.jsxs("tr",{className:"border-t-2 border-border-strong font-semibold text-text",children:[b.jsx("td",{className:"px-3 py-2",children:"Total"}),b.jsx("td",{className:hi,children:r.data.totals.runs}),b.jsx("td",{className:hi,children:r.data.totals.inputTokens}),b.jsx("td",{className:hi,children:r.data.totals.outputTokens}),b.jsx("td",{className:hi,children:rr(r.data.totals.estimatedUsd)})]})]})]})})]})]})}const v0="ogygie-studio-theme";function HN(){try{const t=window.localStorage.getItem(v0);return t==="dark"||t==="light"?t:null}catch{return null}}const $N="dark";function QN(){const[t,i]=X.useState(()=>HN()??$N);X.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=X.useCallback(()=>{i(r=>{const o=r==="dark"?"light":"dark";try{window.localStorage.setItem(v0,o)}catch{}return o})},[]);return{theme:t,toggle:s}}const GN="flex items-center gap-3 rounded-md px-3 py-2 text-sm text-text-muted transition-colors hover:bg-surface-sunken hover:text-text [&.active]:bg-accent-soft [&.active]:text-accent [&.active]:font-medium";function lr({to:t,glyph:i,children:s}){return b.jsxs(rs,{to:t,className:GN,activeOptions:{exact:t==="/"},children:[b.jsx("span",{"aria-hidden":"true",className:"w-4 text-center font-mono text-xs text-text-faint",children:i}),s]})}function KN(){const t=ko(),{theme:i,toggle:s}=QN();return b.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-surface-sunken/60 px-3 py-5",children:[b.jsxs(rs,{to:"/",className:"mb-6 flex items-center gap-3 px-3",children:[b.jsx(ob,{size:"md",className:"text-accent"}),b.jsxs("span",{className:"flex flex-col",children:[b.jsx("span",{className:"font-display text-2xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),b.jsx("span",{className:"mt-1 block font-mono text-xs uppercase tracking-[0.22em] text-accent",children:"Studio"})]})]}),b.jsxs("nav",{"aria-label":"Navigation du studio",className:"flex flex-col gap-1",children:[b.jsx(lr,{to:"/",glyph:"▦",children:"Board"}),b.jsx(lr,{to:"/manifest",glyph:"◫",children:"Manifeste"}),t.data!==void 0&&b.jsxs(b.Fragment,{children:[b.jsx("p",{className:"mt-4 mb-1 px-3 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Hébergé"}),b.jsx(lr,{to:"/brief",glyph:"✎",children:"Brief"}),b.jsx(lr,{to:"/promotions",glyph:"⇥",children:"Promotions"}),b.jsx(lr,{to:"/consumption",glyph:"◔",children:"Consommation"})]})]}),b.jsxs("div",{className:"mt-auto space-y-3 px-3 pt-6",children:[t.data!==void 0&&b.jsxs("div",{className:"rounded-md border border-border bg-surface-raised px-3 py-2 text-xs",children:[b.jsx("p",{className:"truncate font-medium text-text",children:t.data.displayName}),b.jsx("p",{className:"font-mono text-text-faint",children:t.data.role})]}),b.jsxs("button",{type:"button",onClick:s,"aria-label":i==="dark"?"Passer au thème clair":"Passer au thème sombre",className:"flex w-full items-center justify-between rounded-md border border-border px-3 py-2 text-xs text-text-muted transition-colors hover:border-border-strong hover:text-text",children:[b.jsx("span",{children:i==="dark"?"Abysse":"Marbre"}),b.jsx("span",{"aria-hidden":"true",className:"font-mono",children:i==="dark"?"☾":"☀"})]})]})]})}function YN(){return b.jsxs("div",{className:"flex min-h-screen bg-surface text-text",children:[b.jsx(KN,{}),b.jsx("main",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"studio-rise mx-auto max-w-6xl px-8 py-8",children:b.jsx(rb,{})})})]})}const ji=vE({component:YN}),VN=sa({getParentRoute:()=>ji,path:"/",component:uN}),b0=sa({getParentRoute:()=>ji,path:"/specs/$specId",component:function(){const{specId:i}=b0.useParams();return b.jsx(ON,{specId:i})}}),FN=sa({getParentRoute:()=>ji,path:"/manifest",component:jN}),PN=sa({getParentRoute:()=>ji,path:"/login",component:AN}),XN=sa({getParentRoute:()=>ji,path:"/brief",component:UN}),JN=sa({getParentRoute:()=>ji,path:"/promotions",component:ZN}),IN=sa({getParentRoute:()=>ji,path:"/consumption",component:BN}),WN=ji.addChildren([VN,b0,FN,PN,XN,JN,IN]);function eA(t){return TE({routeTree:WN})}const tA=new z_,nA=eA(),S0=document.getElementById("root");if(S0===null)throw new Error("Studio UI: #root element missing from index.html");Wx.createRoot(S0).render(b.jsx(X.StrictMode,{children:b.jsx(e_,{client:tA,children:b.jsx(AE,{router:nA})})}));
74
+ `)});continue}if(c.startsWith("- ")){const m=[];for(;r<s.length;){const p=(s[r]??"").trim();if(p.startsWith("- "))m.push(p.slice(2)),r+=1;else if(p!==""&&!p.startsWith("#"))m[m.length-1]=`${m[m.length-1]??""} ${p}`,r+=1;else break}i.push({kind:"bullet",items:m});continue}const h=[];for(;r<s.length;){const m=(s[r]??"").trim();if(m===""||m.startsWith("#")||m.startsWith("- ")||m.startsWith("```"))break;h.push(m),r+=1}i.push({kind:"paragraph",text:h.join(" ")})}return i}const AN={1:"font-display text-xl font-semibold text-text mt-6 first:mt-0 border-b border-border pb-1",2:"font-display text-lg font-semibold text-text mt-4"};function RN({markdown:t}){const i=NN(t);return i.length===0?b.jsx("p",{className:"text-sm text-text-faint",children:"Rien à prévisualiser encore."}):b.jsx("div",{className:"space-y-2",children:i.map((s,r)=>s.kind==="heading"?b.jsx("p",{className:AN[Math.min(s.level,2)],children:s.text},r):s.kind==="bullet"?b.jsx("ul",{className:"list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-accent",children:s.items.map((o,c)=>b.jsx("li",{children:o},c))},r):s.kind==="code"?b.jsx("pre",{className:"overflow-x-auto rounded-md border border-border bg-surface-sunken p-3 font-mono text-xs text-text",children:s.text},r):b.jsx("p",{className:"text-sm text-text-muted",children:s.text},r))})}const eo="mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent";function CN({specId:t}){const{data:i,isPending:s,error:r}=Hj(t);return r?b.jsxs("div",{className:"space-y-3",children:[b.jsx(b0,{}),b.jsx(Nt,{error:r})]}):s?b.jsx("div",{"aria-label":"Chargement de la spec",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):b.jsx(MN,{specId:t,initialFrontmatter:i.frontmatter,initialBody:i.body},t)}function b0(){return b.jsx(ls,{to:"/",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-accent",children:"← Retour au board"})}function MN({specId:t,initialFrontmatter:i,initialBody:s}){const r=TN(),[o,c]=X.useState(()=>uv(i)),[d,h]=X.useState(()=>({form:uv(i),body:s})),[m,p]=X.useState(s),[v,y]=X.useState(null),[S,x]=X.useState(!1),E=Qj(t),w=Er(),z=m!==d.body||JSON.stringify(o)!==JSON.stringify(d.form),R=new Set(yN(m)),q=(C,N)=>{c(F=>({...F,[C]:N}))},G=()=>{const C=us.safeParse(jN(o));return C.success?(y(null),C.data):(y(C.error.issues.map(N=>`${N.path.join(".")}: ${N.message}`).join(" ; ")),null)},K=()=>{const C=G();C!==null&&E.mutate({frontmatter:C,body:m},{onSuccess:()=>h({form:o,body:m})})},P=()=>{const C=G();if(C===null){x(!1);return}const N={...o,status:"validated"};E.mutate({frontmatter:{...C,status:"validated"},body:m},{onSuccess:()=>{c(N),h({form:N,body:m})},onSettled:()=>x(!1)})};return X.useEffect(()=>{const C=N=>{(N.metaKey||N.ctrlKey)&&N.key.toLowerCase()==="s"&&(N.preventDefault(),K())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)}),b.jsxs("div",{className:"space-y-5",children:[b.jsxs("div",{className:"sticky top-0 z-10 -mx-8 -mt-8 border-b border-border bg-surface/85 px-8 py-4 backdrop-blur",children:[b.jsx(b0,{}),b.jsxs("div",{className:"mt-1 flex flex-wrap items-center justify-between gap-3",children:[b.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[b.jsx("h1",{className:"truncate font-display text-2xl font-semibold leading-tight text-text",children:t}),b.jsx(h0,{status:o.status}),z&&b.jsx(rt,{tone:"orichalcum",children:"Modifications non enregistrées"})]}),b.jsxs("div",{className:"flex gap-2",children:[b.jsx(pt,{onClick:K,disabled:E.isPending,title:"⌘S / Ctrl+S",children:"Enregistrer"}),o.status==="draft"&&b.jsx(pt,{voice:"primary",onClick:()=>x(!0),disabled:E.isPending,children:"Valider"})]})]})]}),w.data!==void 0&&b.jsx(zN,{specId:t}),w.data!==void 0&&b.jsx(wN,{specId:t,role:w.data.role}),v!==null&&b.jsxs("div",{role:"alert",className:"rounded-md border border-warning/40 bg-warning-soft p-3 text-sm text-text",children:["Frontmatter invalide : ",v]}),E.error!=null&&b.jsx(Nt,{error:E.error}),E.isSuccess&&E.error==null&&!z&&b.jsxs("p",{role:"status",className:"studio-rise rounded-md border border-positive/40 bg-positive-soft p-3 text-sm text-text",children:["Spec enregistrée — statut : ",E.data.spec.status,"."]}),b.jsxs("ol",{"aria-label":"Sections canoniques",className:"flex flex-wrap gap-2",children:[Ja.map((C,N)=>{const F=C.replace(/^# /u,"");return b.jsx("li",{children:b.jsx(rt,{tone:R.has(C)?"accent":"neutral",title:R.has(C)?"section présente":"section absente ou hors ordre",children:`${N+1} · ${F}`})},C)}),b.jsxs("li",{className:"self-center font-mono text-xs text-text-faint",children:[R.size,"/",Ja.length," présentes, dans l'ordre du gate"]})]}),b.jsxs(Hn,{"aria-label":"Frontmatter",children:[b.jsxs("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:["Frontmatter ",b.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"formulaire dérivé de SpecFrontmatterSchema"})]}),b.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:r.map(C=>b.jsxs("label",{className:"block text-sm text-text-muted",children:[b.jsx("span",{className:"font-mono text-xs text-text-faint",children:C.name}),C.kind==="enum"?b.jsx("select",{value:o[C.name],onChange:N=>q(C.name,N.target.value),className:eo,children:(C.options??[]).map(N=>b.jsx("option",{value:N,children:N},N))}):C.kind==="string-array"?b.jsx("textarea",{value:o[C.name],onChange:N=>q(C.name,N.target.value),rows:2,placeholder:"un élément par ligne",className:`${eo} font-mono text-xs`}):b.jsx("input",{value:o[C.name],readOnly:C.readOnly,onChange:N=>q(C.name,N.target.value),className:`${eo} font-mono ${C.readOnly?"bg-surface-sunken text-text-faint":""}`})]},C.name))})]}),b.jsxs("section",{"aria-label":"Sections markdown",className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[b.jsxs("label",{className:"block text-sm text-text-muted",children:[b.jsx("span",{className:"font-mono text-xs text-text-faint",children:"sections (markdown)"}),b.jsx("textarea",{value:m,onChange:C=>p(C.target.value),rows:28,spellCheck:!1,className:`${eo} resize-y p-3 font-mono text-xs leading-relaxed`}),b.jsxs("span",{className:"mt-1 block text-right font-mono text-xs text-text-faint",children:[m.split(`
75
+ `).length," lignes · ",m.trim()===""?0:m.trim().split(/\s+/u).length," mots"]})]}),b.jsxs("div",{className:"text-sm",children:[b.jsx("span",{className:"font-mono text-xs text-text-faint",children:"preview"}),b.jsx("div",{className:"mt-1 h-full rounded-md border border-border bg-surface-raised p-5 shadow-raised",children:b.jsx(RN,{markdown:m})})]})]}),b.jsxs(g0,{open:S,title:`Valider ${t} ?`,onClose:()=>x(!1),children:[b.jsxs("p",{children:["Une spec validée est un contrat d'implémentation : status passera à « validated » et le fichier sera réécrit (message « spec: validate ",t," »)."]}),b.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[b.jsx(pt,{voice:"ghost",onClick:()=>x(!1),children:"Annuler"}),b.jsx(pt,{voice:"primary",onClick:P,disabled:E.isPending,children:"Confirmer la validation"})]})]})]})}const DN={skeleton:"neutral","in-progress":"warning",delivered:"positive"},kN={GET:"accent",POST:"positive",PUT:"warning",PATCH:"warning",DELETE:"danger"};function UN(){const{data:t,isPending:i,error:s}=$j();if(s)return b.jsx(Nt,{error:s});if(i)return b.jsx("div",{"aria-label":"Chargement du manifeste",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const{manifest:r}=t,o=r.features.reduce((d,h)=>d+h.routes.length,0),c=r.features.filter(d=>d.status==="delivered").length;return b.jsxs("div",{className:"space-y-6",children:[b.jsx(as,{eyebrow:"Manifeste · lecture seule",title:r.product.name,explanation:r.product.description}),b.jsx("dl",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"apps",value:r.apps.length},{label:"features",value:r.features.length},{label:"livrées",value:c},{label:"routes",value:o}].map((d,h)=>b.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":h},children:[b.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:d.label}),b.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:b.jsx(cd,{value:d.value})})]},d.label))}),b.jsxs(Hn,{"aria-label":"Apps",children:[b.jsx("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:"Apps"}),b.jsx("ul",{className:"divide-y divide-border text-sm",children:r.apps.map(d=>b.jsxs("li",{className:"flex flex-wrap items-center gap-3 py-2",children:[b.jsx("span",{className:"font-mono font-medium text-text",children:d.name}),b.jsx(rt,{children:d.type}),b.jsx("span",{className:"font-mono text-xs text-text-faint",children:d.path})]},d.name))})]}),b.jsxs("section",{"aria-label":"Features",className:"space-y-3",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Features"}),r.features.map(d=>b.jsxs(Hn,{children:[b.jsxs("div",{className:"flex items-center justify-between gap-3",children:[b.jsx("h3",{className:"font-mono text-sm font-semibold text-text",children:d.name}),b.jsx(rt,{tone:DN[d.status]??"neutral",children:d.status})]}),b.jsx("p",{className:"mt-1 text-sm text-text-muted",children:d.intent}),d.dependsOn.length>0&&b.jsxs("p",{className:"mt-3 flex flex-wrap items-center gap-1.5 text-xs text-text-faint",children:["Dépend de :"," ",d.dependsOn.map(h=>b.jsx(rt,{mono:!0,children:h},h))]}),d.routes.length>0&&b.jsx("ul",{className:"mt-3 space-y-1 text-xs",children:d.routes.map(h=>b.jsxs("li",{className:"flex items-center gap-2",children:[b.jsx("span",{className:"w-16 shrink-0",children:b.jsx(rt,{tone:kN[h.method]??"neutral",mono:!0,children:h.method})}),b.jsx("span",{className:"font-mono text-text-muted",children:h.path})]},`${h.method} ${h.path}`))})]},d.name))]})]})}const LN=se({accepted:gi(!0)});function cv({children:t}){return b.jsxs("div",{className:"mx-auto max-w-md pt-12",children:[b.jsxs("p",{className:"mb-6 flex flex-col items-center text-center",children:[b.jsx(ob,{size:"lg",label:"Ogygie",className:"mb-3 text-accent"}),b.jsx("span",{className:"font-display text-4xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),b.jsx("span",{className:"mt-2 block font-mono text-xs uppercase tracking-[0.3em] text-accent",children:"Studio hébergé"})]}),b.jsx("div",{className:"studio-rise rounded-lg border border-border bg-surface-raised p-6 shadow-overlay",children:t})]})}function ZN(){const[t,i]=X.useState(""),[s,r]=X.useState({kind:"idle"});async function o(c){c.preventDefault(),r({kind:"sending"});try{await ht("/api/auth/magic-link",LN,{method:"POST",..._r({email:t})}),r({kind:"sent"})}catch(d){r({kind:"error",error:d})}}return s.kind==="sent"?b.jsx(cv,{children:b.jsxs("section",{children:[b.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Vérifiez votre boîte mail"}),b.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"Si ce compte existe, un lien de connexion a été envoyé. Il est valable quinze minutes et ne sert qu'une fois."})]})}):b.jsx(cv,{children:b.jsxs("form",{onSubmit:o,children:[b.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Connexion"}),b.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Un lien de connexion vous sera envoyé par courriel."}),b.jsx("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"login-email",children:"Adresse e-mail"}),b.jsx("input",{id:"login-email",type:"email",required:!0,autoComplete:"email",autoFocus:!0,value:t,onChange:c=>i(c.target.value),className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),s.kind==="error"&&b.jsx("div",{className:"mt-3",children:b.jsx(Nt,{error:s.error})}),b.jsx(pt,{voice:"primary",type:"submit",disabled:s.kind==="sending",className:"mt-5 w-full",children:s.kind==="sending"?"Envoi…":"Recevoir un lien"})]})})}const to=50,qN=["Je veux une rubrique qui liste les commandes du mois avec leur statut, et un bouton pour marquer une commande livrée.","Les clients doivent pouvoir noter une intervention de 1 à 5 ; une note sous 3 déclenche une alerte au responsable."],BN=[{title:"Décrivez",detail:"le besoin, en français, comme à un collègue"},{title:"Le modèle rédige",detail:"la spec dans le format du repo ; les gates la jugent avant tout affichage"},{title:"Vous relisez",detail:"les comportements d'abord, puis vous validez — rien ne se code avant"}],fv="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",Ef=[".md",".markdown",".txt",".csv",".json",".html",".htm",".xlsx",".pdf"],HN=5,$N=4*1024*1024,dv=t=>t<1024?`${t} o`:t<1024*1024?`${Math.round(t/1024)} Ko`:`${(t/(1024*1024)).toFixed(1)} Mo`;async function QN(t){const i=new Uint8Array(await t.arrayBuffer());let s="";for(let r=0;r<i.length;r+=32768)s+=String.fromCharCode(...i.subarray(r,r+32768));return btoa(s)}function GN(){const[t,i]=X.useState(""),[s,r]=X.useState(""),[o,c]=X.useState([]),[d,h]=X.useState(null),m=No(),p=Vj(),v=t.trim().length;async function y(x){const E=Array.from(x.target.files??[]);x.target.value="",h(null);const w=[...o];for(const z of E){const R=z.name.toLowerCase();if(!Ef.some(q=>R.endsWith(q))){h(`« ${z.name} » : format non retenu — ${Ef.join(", ")}.`);continue}if(z.size>$N){h(`« ${z.name} » : ${dv(z.size)}, au-delà de 4 Mo par pièce.`);continue}if(w.length>=HN){h(`Cinq pièces au plus : « ${z.name} » n'est pas jointe.`);break}w.some(q=>q.name===z.name)||w.push({name:z.name,size:z.size,contentBase64:await QN(z)})}c(w)}function S(x){x.preventDefault(),p.mutate({brief:t,...s.trim()===""?{}:{specId:s.trim()},...o.length===0?{}:{attachments:o.map(E=>({name:E.name,contentBase64:E.contentBase64}))}},{onSuccess:E=>{m({to:"/specs/$specId",params:{specId:E.specId}})}})}return b.jsxs("form",{onSubmit:S,className:"space-y-6",children:[b.jsx(as,{eyebrow:"Hébergé",title:"Décrire une rubrique",explanation:"Écrivez le besoin en français. Le modèle rédige la spec, les gates du repo la jugent, puis vous la relisez avant de la valider."}),b.jsx("ol",{className:"grid gap-3 md:grid-cols-3",children:BN.map((x,E)=>b.jsxs("li",{className:"rounded-lg border border-border bg-surface-raised p-4 shadow-raised",children:[b.jsxs("p",{className:"font-mono text-xs text-accent",children:["0",E+1]}),b.jsx("p",{className:"mt-1 font-display text-lg font-semibold text-text",children:x.title}),b.jsx("p",{className:"mt-1 text-sm text-text-muted",children:x.detail})]},x.title))}),b.jsxs(Hn,{children:[b.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[b.jsx("label",{className:"block text-sm font-medium text-text",htmlFor:"brief-text",children:"Brief"}),b.jsxs("span",{className:`font-mono text-xs ${v<to?"text-text-faint":"text-positive"}`,children:[v," / ",to," caractères minimum"]})]}),b.jsx("textarea",{id:"brief-text",required:!0,minLength:to,rows:10,value:t,onChange:x=>i(x.target.value),placeholder:"Je veux une rubrique qui…",className:`${fv} mt-2 font-sans leading-relaxed`}),b.jsx("p",{className:"mt-3 text-xs text-text-faint",children:"Pour voir le ton attendu :"}),b.jsx("ul",{className:"mt-1 flex flex-wrap gap-2",children:qN.map(x=>b.jsx("li",{children:b.jsxs(pt,{voice:"ghost",size:"sm",onClick:()=>i(x),className:"max-w-md text-left whitespace-normal",children:["« ",x," »"]})},x))}),b.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-spec-id",children:["Spec visée ",b.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel, pour amender une spec existante)"})]}),b.jsx("input",{id:"brief-spec-id",value:s,onChange:x=>r(x.target.value),placeholder:"ex. suivi-des-commandes",className:`${fv} mt-1 font-mono`}),b.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-attachments",children:["Pièces jointes ",b.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel : une maquette HTML, un classeur, un document)"})]}),b.jsx("input",{id:"brief-attachments",type:"file",multiple:!0,accept:Ef.join(","),onChange:x=>{y(x)},className:"mt-1 block w-full text-sm text-text-muted file:mr-3 file:rounded-md file:border file:border-border file:bg-surface file:px-3 file:py-1.5 file:text-sm file:text-text"}),b.jsx("p",{className:"mt-1 text-xs text-text-faint",children:"Cinq pièces au plus, 4 Mo chacune : md, txt, csv, json, html, xlsx, pdf. Le modèle les lit comme votre matériau ; rien n'est conservé."}),d!==null&&b.jsx("p",{role:"alert",className:"mt-2 text-xs text-danger",children:d}),o.length>0&&b.jsx("ul",{"aria-label":"Pièces jointes au brief",className:"mt-2 space-y-1",children:o.map(x=>b.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border px-3 py-1.5 text-sm",children:[b.jsx("span",{className:"truncate font-mono text-text",children:x.name}),b.jsxs("span",{className:"flex items-center gap-3",children:[b.jsx("span",{className:"font-mono text-xs text-text-faint",children:dv(x.size)}),b.jsx(pt,{voice:"ghost",size:"sm",onClick:()=>c(o.filter(E=>E.name!==x.name)),"aria-label":`Retirer ${x.name}`,children:"Retirer"})]})]},x.name))})]}),p.isPending&&b.jsxs("p",{role:"status",className:"flex items-center gap-2 text-sm text-text-muted",children:[b.jsx("span",{"aria-hidden":"true",className:"inline-block h-2 w-2 animate-pulse rounded-full bg-accent"}),"Le modèle écrit, puis les gates jugent… (jusqu'à deux tentatives)"]}),p.error!=null&&b.jsx(Nt,{error:p.error}),b.jsx(pt,{voice:"primary",type:"submit",disabled:p.isPending||v<to,children:"Rédiger la spec"})]})}const wf={development:"Développement",staging:"Préproduction",production:"Production"},KN={success:"positive",failure:"danger",error:"danger",in_progress:"warning",pending:"warning",queued:"warning"},Of="mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent";function YN(){const t=Er(),i=t.data?.host?.environments!==!1,s=Ij(i),r=eN(),[o,c]=X.useState({environment:"staging",sha:"",reason:""});if(!i)return b.jsxs("div",{className:"space-y-6",children:[b.jsx(as,{eyebrow:"Hébergé",title:"Promotions",explanation:"La production ne reçoit que ce que la préproduction a reçu, au commit près."}),b.jsxs(Hn,{"aria-label":"Environnements non configurés",className:"text-sm text-text-muted",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Cet hôte ne déclare pas d'environnements"}),b.jsxs("p",{className:"mt-2",children:["Les promotions supposent les refs ",b.jsx("code",{className:"font-mono text-text",children:"env/staging"})," et ",b.jsx("code",{className:"font-mono text-text",children:"env/production"}),", déclarées dans le bloc"," ",b.jsx("code",{className:"font-mono text-text",children:"environments"})," de la configuration de l'hôte (runbook docs/HOSTED-STUDIO.md, § 6 ter). Sans elles, la fusion d'une spec met le développement à jour, et rien d'autre ne bouge."]})]})]});if(s.error)return b.jsx(Nt,{error:s.error});if(s.isPending)return b.jsx("div",{"aria-label":"Chargement des environnements",className:"h-40 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const d=s.data,h=S=>d.environments.find(x=>x.name===S)?.sha??null,m=h("development"),p=h("staging"),v=t.data?.role==="operator",y={staging:m,production:p};return b.jsxs("div",{className:"space-y-6",children:[b.jsx(as,{eyebrow:"Hébergé",title:"Promotions",explanation:"La production ne reçoit que ce que la préproduction a reçu, au commit près."}),r.error!=null&&b.jsx(Nt,{error:r.error}),r.isSuccess&&b.jsxs("p",{role:"status",className:"studio-rise rounded-md border border-positive/40 bg-positive-soft p-3 text-sm text-text",children:[wf[r.data.environment]," est à ",r.data.toSha.slice(0,7),r.data.releaseTag===null?"":` — release ${r.data.releaseTag}`,"."]}),b.jsx("ol",{className:"grid gap-3 md:grid-cols-[1fr_auto_1fr_auto_1fr] md:items-stretch",children:d.environments.map((S,x)=>{const E=y[S.name],w=E!=null&&E===S.sha,z=E!=null&&E!==S.sha;return b.jsxs("li",{className:"contents",children:[x>0&&b.jsx("span",{"aria-hidden":"true",className:"hidden self-center font-display text-2xl text-text-faint md:block",children:"→"}),b.jsxs(Hn,{"aria-label":wf[S.name]??S.name,className:"flex flex-col",children:[b.jsxs("div",{className:"flex items-start justify-between gap-2",children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:wf[S.name]??S.name}),w&&b.jsx(rt,{tone:"positive",children:"à jour"}),z&&b.jsx(rt,{tone:"warning",children:"en retard"})]}),b.jsx("p",{className:"font-mono text-xs text-text-faint",children:S.ref}),b.jsx("p",{className:"mt-3 font-mono text-2xl text-text",children:S.sha===null?"(aucun commit)":S.sha.slice(0,7)}),S.deployment!==null&&b.jsxs("p",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[b.jsx(rt,{tone:KN[S.deployment.state??"pending"]??"neutral",children:S.deployment.state??"en attente"}),"déployé le ",S.deployment.createdAt.slice(0,10)]}),b.jsxs("div",{className:"mt-auto pt-4",children:[S.name==="staging"&&b.jsx(pt,{voice:"primary",size:"sm",className:"w-full",disabled:m===null||m===p||r.isPending,onClick:()=>m!==null&&r.mutate({environment:"staging",sha:m}),children:"Promouvoir le développement vers la préproduction"}),S.name==="production"&&b.jsx(pt,{voice:"primary",size:"sm",className:"w-full",disabled:p===null||p===S.sha||r.isPending,onClick:()=>p!==null&&r.mutate({environment:"production",sha:p}),children:"Promouvoir la préproduction vers la production"})]})]})]},S.name)})}),b.jsxs(Hn,{children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Releases"}),d.releases.length===0?b.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Aucune mise en production étiquetée."}):b.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:d.releases.map(S=>b.jsx("li",{children:b.jsx(rt,{tone:"orichalcum",mono:!0,children:S})},S))})]}),v&&b.jsxs("form",{className:"rounded-lg border border-danger/40 bg-danger-soft/40 p-4 text-sm",onSubmit:S=>{S.preventDefault(),r.mutate({environment:o.environment,sha:o.sha.trim(),rollback:!0,reason:o.reason.trim()})},children:[b.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Retour arrière (opérateur)"}),b.jsx("p",{className:"mt-1 text-xs text-text-muted",children:"Le seul chemin qui remonte le courant : il se motive, il se journalise."}),b.jsxs("div",{className:"mt-3 grid gap-3 md:grid-cols-3",children:[b.jsxs("label",{className:"text-xs text-text-muted",children:["Environnement",b.jsxs("select",{value:o.environment,onChange:S=>c({...o,environment:S.target.value}),className:Of,children:[b.jsx("option",{value:"staging",children:"Préproduction"}),b.jsx("option",{value:"production",children:"Production"})]})]}),b.jsxs("label",{className:"text-xs text-text-muted",children:["Commit (sha complet)",b.jsx("input",{value:o.sha,onChange:S=>c({...o,sha:S.target.value}),className:`${Of} font-mono`})]}),b.jsxs("label",{className:"text-xs text-text-muted",children:["Motif",b.jsx("input",{value:o.reason,onChange:S=>c({...o,reason:S.target.value}),className:Of})]})]}),b.jsx(pt,{voice:"danger",size:"sm",type:"submit",className:"mt-4",disabled:r.isPending||o.sha.length!==40||o.reason.trim().length<10,children:"Revenir en arrière"})]})]})}function FN(t){const i=[],s=new Date;for(let r=0;r<t;r+=1){const o=new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth()-r,1));i.push(o.toISOString().slice(0,7))}return i}const lr=t=>`${t.toFixed(2)} $`,hv=t=>new Intl.NumberFormat("fr-FR",{notation:"compact",maximumFractionDigits:1}).format(t),mi="px-3 py-2 text-right font-mono tabular-nums";function VN(){const t=FN(6),[i,s]=X.useState(t[0]??""),r=tN(i);return b.jsxs("div",{className:"space-y-6",children:[b.jsx(as,{eyebrow:"Hébergé",title:"Consommation",explanation:"Estimation à partir des jetons rapportés ; la facture vient de l'espace de travail du client.",actions:b.jsxs("label",{className:"text-sm text-text-muted",children:["Mois",b.jsx("select",{value:i,onChange:o=>s(o.target.value),className:"ml-2 rounded-md border border-border bg-surface-raised px-3 py-2 font-mono text-sm text-text",children:t.map(o=>b.jsx("option",{value:o,children:o},o))})]})}),r.error?b.jsx(Nt,{error:r.error}):null,r.isPending?b.jsx("div",{"aria-label":"Chargement de la consommation",className:"h-40 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):null,r.data!==void 0&&b.jsxs(b.Fragment,{children:[b.jsx("dl",{className:"grid grid-cols-2 gap-3 md:grid-cols-4",children:[{label:"appels",value:r.data.totals.runs,format:String},{label:"jetons entrés",value:r.data.totals.inputTokens,format:hv},{label:"jetons sortis",value:r.data.totals.outputTokens,format:hv},{label:"estimation",value:r.data.totals.estimatedUsd,format:lr}].map((o,c)=>b.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":c},children:[b.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:o.label}),b.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:b.jsx(cd,{value:o.value,format:o.format})})]},o.label))}),r.data.budgetUsd!==null&&b.jsxs("section",{"aria-label":"Plafond du mois",className:`rounded-lg border p-4 text-sm shadow-raised ${r.data.warning?"border-warning/50 bg-warning-soft text-text":"border-border bg-surface-raised text-text-muted"}`,children:[b.jsxs("p",{children:[lr(r.data.totals.estimatedUsd)," sur un plafond de ",lr(r.data.budgetUsd),r.data.budgetRatio!==null?` (${Math.round(r.data.budgetRatio*100)} %)`:""]}),b.jsx("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-surface-sunken",role:"presentation",children:b.jsx("div",{className:`h-full rounded-full transition-[width] duration-(--duration-slow) ease-swell ${r.data.warning?"bg-warning":"bg-accent"}`,style:{width:`${Math.min(100,Math.round((r.data.budgetRatio??0)*100))}%`}})}),r.data.warning&&b.jsx("p",{className:"mt-2 font-medium",children:"Plus de 80 % du plafond : au-delà, le modèle refusera jusqu'au mois prochain."})]}),r.data.specs.length===0?b.jsx(m0,{title:"Aucun appel de modèle ce mois-ci",hint:"Les briefs et les spéculations à venir apparaîtront ici, par spec."}):b.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-surface-raised shadow-raised",children:b.jsxs("table",{className:"w-full text-sm",children:[b.jsx("thead",{className:"bg-surface-sunken/60 text-left font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:b.jsxs("tr",{children:[b.jsx("th",{className:"px-3 py-2 font-normal",children:"Spec"}),b.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Runs"}),b.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Entrée"}),b.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Sortie"}),b.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Estimation"})]})}),b.jsxs("tbody",{children:[r.data.specs.map(o=>b.jsxs("tr",{className:"border-t border-border transition-colors hover:bg-surface-sunken/40",children:[b.jsxs("td",{className:"px-3 py-2 font-mono text-text",children:[o.specId," ",b.jsxs("span",{className:"text-xs text-text-faint",children:["#",o.pullRequestNumber]})]}),b.jsx("td",{className:mi,children:o.runs}),b.jsx("td",{className:mi,children:o.inputTokens}),b.jsx("td",{className:mi,children:o.outputTokens}),b.jsxs("td",{className:mi,children:[lr(o.estimatedUsd),o.uncostedModels.length>0&&b.jsxs("span",{className:"ml-1 font-sans text-xs text-text-faint",children:["(+ ",o.uncostedModels.join(", ")," sans coût connu)"]})]})]},o.specId)),b.jsxs("tr",{className:"border-t-2 border-border-strong font-semibold text-text",children:[b.jsx("td",{className:"px-3 py-2",children:"Total"}),b.jsx("td",{className:mi,children:r.data.totals.runs}),b.jsx("td",{className:mi,children:r.data.totals.inputTokens}),b.jsx("td",{className:mi,children:r.data.totals.outputTokens}),b.jsx("td",{className:mi,children:lr(r.data.totals.estimatedUsd)})]})]})]})})]})]})}const S0="ogygie-studio-theme";function PN(){try{const t=window.localStorage.getItem(S0);return t==="dark"||t==="light"?t:null}catch{return null}}const XN="dark";function JN(){const[t,i]=X.useState(()=>PN()??XN);X.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=X.useCallback(()=>{i(r=>{const o=r==="dark"?"light":"dark";try{window.localStorage.setItem(S0,o)}catch{}return o})},[]);return{theme:t,toggle:s}}const IN="flex items-center gap-3 rounded-md px-3 py-2 text-sm text-text-muted transition-colors hover:bg-surface-sunken hover:text-text [&.active]:bg-accent-soft [&.active]:text-accent [&.active]:font-medium";function or({to:t,glyph:i,children:s}){return b.jsxs(ls,{to:t,className:IN,activeOptions:{exact:t==="/"},children:[b.jsx("span",{"aria-hidden":"true",className:"w-4 text-center font-mono text-xs text-text-faint",children:i}),s]})}function WN(){const t=Er(),{theme:i,toggle:s}=JN();return b.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-surface-sunken/60 px-3 py-5",children:[b.jsxs(ls,{to:"/",className:"mb-6 flex items-center gap-3 px-3",children:[b.jsx(ob,{size:"md",className:"text-accent"}),b.jsxs("span",{className:"flex flex-col",children:[b.jsx("span",{className:"font-display text-2xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),b.jsx("span",{className:"mt-1 block font-mono text-xs uppercase tracking-[0.22em] text-accent",children:"Studio"})]})]}),b.jsxs("nav",{"aria-label":"Navigation du studio",className:"flex flex-col gap-1",children:[b.jsx(or,{to:"/",glyph:"▦",children:"Board"}),b.jsx(or,{to:"/manifest",glyph:"◫",children:"Manifeste"}),t.data!==void 0&&b.jsxs(b.Fragment,{children:[b.jsx("p",{className:"mt-4 mb-1 px-3 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Hébergé"}),b.jsx(or,{to:"/brief",glyph:"✎",children:"Brief"}),t.data.host?.environments!==!1&&b.jsx(or,{to:"/promotions",glyph:"⇥",children:"Promotions"}),b.jsx(or,{to:"/consumption",glyph:"◔",children:"Consommation"})]})]}),b.jsxs("div",{className:"mt-auto space-y-3 px-3 pt-6",children:[t.data!==void 0&&b.jsxs("div",{className:"rounded-md border border-border bg-surface-raised px-3 py-2 text-xs",children:[b.jsx("p",{className:"truncate font-medium text-text",children:t.data.displayName}),b.jsx("p",{className:"font-mono text-text-faint",children:t.data.role})]}),b.jsxs("button",{type:"button",onClick:s,"aria-label":i==="dark"?"Passer au thème clair":"Passer au thème sombre",className:"flex w-full items-center justify-between rounded-md border border-border px-3 py-2 text-xs text-text-muted transition-colors hover:border-border-strong hover:text-text",children:[b.jsx("span",{children:i==="dark"?"Abysse":"Marbre"}),b.jsx("span",{"aria-hidden":"true",className:"font-mono",children:i==="dark"?"☾":"☀"})]})]})]})}function eA(){return b.jsxs("div",{className:"flex min-h-screen bg-surface text-text",children:[b.jsx(WN,{}),b.jsx("main",{className:"min-w-0 flex-1",children:b.jsx("div",{className:"studio-rise mx-auto max-w-6xl px-8 py-8",children:b.jsx(rb,{})})})]})}const ji=SE({component:eA}),tA=sa({getParentRoute:()=>ji,path:"/",component:hN}),x0=sa({getParentRoute:()=>ji,path:"/specs/$specId",component:function(){const{specId:i}=x0.useParams();return b.jsx(CN,{specId:i})}}),nA=sa({getParentRoute:()=>ji,path:"/manifest",component:UN}),iA=sa({getParentRoute:()=>ji,path:"/login",component:ZN}),aA=sa({getParentRoute:()=>ji,path:"/brief",component:GN}),sA=sa({getParentRoute:()=>ji,path:"/promotions",component:YN}),rA=sa({getParentRoute:()=>ji,path:"/consumption",component:VN}),lA=ji.addChildren([tA,x0,nA,iA,aA,sA,rA]);function oA(t){return NE({routeTree:lA})}const uA=new j_,cA=oA(),_0=document.getElementById("root");if(_0===null)throw new Error("Studio UI: #root element missing from index.html");t_.createRoot(_0).render(b.jsx(X.StrictMode,{children:b.jsx(n_,{client:uA,children:b.jsx(CE,{router:cA})})}));