@ogygie/studio 0.31.0 → 0.32.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.
- package/dist/server.js +37 -8
- package/dist-ui/assets/index-Drld2Zf5.js +78 -0
- package/dist-ui/index.html +1 -1
- package/package.json +3 -3
- package/dist-ui/assets/index-DESqTDfB.js +0 -78
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.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 i(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=i(o);fetch(o.href,c)}})();function t_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lf={exports:{}},ar={};var kg;function n_(){if(kg)return ar;kg=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(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 ar.Fragment=s,ar.jsx=i,ar.jsxs=i,ar}var Lg;function s_(){return Lg||(Lg=1,lf.exports=n_()),lf.exports}var g=s_(),of={exports:{}},ge={};var Ug;function a_(){if(Ug)return ge;Ug=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),i=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"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function S(E){return E===null||typeof E!="object"?null:(E=x&&E[x]||E["@@iterator"],typeof E=="function"?E:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,z={};function T(E,Z,X){this.props=E,this.context=Z,this.refs=z,this.updater=X||w}T.prototype.isReactComponent={},T.prototype.setState=function(E,Z){if(typeof E!="object"&&typeof E!="function"&&E!=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,E,Z,"setState")},T.prototype.forceUpdate=function(E){this.updater.enqueueForceUpdate(this,E,"forceUpdate")};function L(){}L.prototype=T.prototype;function G(E,Z,X){this.props=E,this.context=Z,this.refs=z,this.updater=X||w}var V=G.prototype=new L;V.constructor=G,j(V,T.prototype),V.isPureReactComponent=!0;var W=Array.isArray;function $(){}var A={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function ie(E,Z,X){var ne=X.ref;return{$$typeof:t,type:E,key:Z,ref:ne!==void 0?ne:null,props:X}}function re(E,Z){return ie(E.type,Z,E.props)}function P(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function I(E){var Z={"=":"=0",":":"=2"};return"$"+E.replace(/[=:]/g,function(X){return Z[X]})}var fe=/\/+/g;function ye(E,Z){return typeof E=="object"&&E!==null&&E.key!=null?I(""+E.key):Z.toString(36)}function pe(E){switch(E.status){case"fulfilled":return E.value;case"rejected":throw E.reason;default:switch(typeof E.status=="string"?E.then($,$):(E.status="pending",E.then(function(Z){E.status==="pending"&&(E.status="fulfilled",E.value=Z)},function(Z){E.status==="pending"&&(E.status="rejected",E.reason=Z)})),E.status){case"fulfilled":return E.value;case"rejected":throw E.reason}}throw E}function U(E,Z,X,ne,me){var xe=typeof E;(xe==="undefined"||xe==="boolean")&&(E=null);var Ee=!1;if(E===null)Ee=!0;else switch(xe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(E.$$typeof){case t:case s:Ee=!0;break;case b:return Ee=E._init,U(Ee(E._payload),Z,X,ne,me)}}if(Ee)return me=me(E),Ee=ne===""?"."+ye(E,0):ne,W(me)?(X="",Ee!=null&&(X=Ee.replace(fe,"$&/")+"/"),U(me,Z,X,"",function(cn){return cn})):me!=null&&(P(me)&&(me=re(me,X+(me.key==null||E&&E.key===me.key?"":(""+me.key).replace(fe,"$&/")+"/")+Ee)),Z.push(me)),1;Ee=0;var Ze=ne===""?".":ne+":";if(W(E))for(var He=0;He<E.length;He++)ne=E[He],xe=Ze+ye(ne,He),Ee+=U(ne,Z,X,xe,me);else if(He=S(E),typeof He=="function")for(E=He.call(E),He=0;!(ne=E.next()).done;)ne=ne.value,xe=Ze+ye(ne,He++),Ee+=U(ne,Z,X,xe,me);else if(xe==="object"){if(typeof E.then=="function")return U(pe(E),Z,X,ne,me);throw Z=String(E),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(E).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function C(E,Z,X){if(E==null)return E;var ne=[],me=0;return U(E,ne,"","",function(xe){return Z.call(X,xe,me++)}),ne}function q(E){if(E._status===-1){var Z=E._result;Z=Z(),Z.then(function(X){(E._status===0||E._status===-1)&&(E._status=1,E._result=X)},function(X){(E._status===0||E._status===-1)&&(E._status=2,E._result=X)}),E._status===-1&&(E._status=0,E._result=Z)}if(E._status===1)return E._result.default;throw E._result}var se=typeof reportError=="function"?reportError:function(E){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=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(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",E);return}console.error(E)},ue={map:C,forEach:function(E,Z,X){C(E,function(){Z.apply(this,arguments)},X)},count:function(E){var Z=0;return C(E,function(){Z++}),Z},toArray:function(E){return C(E,function(Z){return Z})||[]},only:function(E){if(!P(E))throw Error("React.Children.only expected to receive a single React element child.");return E}};return ge.Activity=v,ge.Children=ue,ge.Component=T,ge.Fragment=i,ge.Profiler=o,ge.PureComponent=G,ge.StrictMode=r,ge.Suspense=p,ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,ge.__COMPILER_RUNTIME={__proto__:null,c:function(E){return A.H.useMemoCache(E)}},ge.cache=function(E){return function(){return E.apply(null,arguments)}},ge.cacheSignal=function(){return null},ge.cloneElement=function(E,Z,X){if(E==null)throw Error("The argument must be a React element, but you passed "+E+".");var ne=j({},E.props),me=E.key;if(Z!=null)for(xe in Z.key!==void 0&&(me=""+Z.key),Z)!J.call(Z,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&Z.ref===void 0||(ne[xe]=Z[xe]);var xe=arguments.length-2;if(xe===1)ne.children=X;else if(1<xe){for(var Ee=Array(xe),Ze=0;Ze<xe;Ze++)Ee[Ze]=arguments[Ze+2];ne.children=Ee}return ie(E.type,me,ne)},ge.createContext=function(E){return E={$$typeof:d,_currentValue:E,_currentValue2:E,_threadCount:0,Provider:null,Consumer:null},E.Provider=E,E.Consumer={$$typeof:c,_context:E},E},ge.createElement=function(E,Z,X){var ne,me={},xe=null;if(Z!=null)for(ne in Z.key!==void 0&&(xe=""+Z.key),Z)J.call(Z,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(me[ne]=Z[ne]);var Ee=arguments.length-2;if(Ee===1)me.children=X;else if(1<Ee){for(var Ze=Array(Ee),He=0;He<Ee;He++)Ze[He]=arguments[He+2];me.children=Ze}if(E&&E.defaultProps)for(ne in Ee=E.defaultProps,Ee)me[ne]===void 0&&(me[ne]=Ee[ne]);return ie(E,xe,me)},ge.createRef=function(){return{current:null}},ge.forwardRef=function(E){return{$$typeof:h,render:E}},ge.isValidElement=P,ge.lazy=function(E){return{$$typeof:b,_payload:{_status:-1,_result:E},_init:q}},ge.memo=function(E,Z){return{$$typeof:m,type:E,compare:Z===void 0?null:Z}},ge.startTransition=function(E){var Z=A.T,X={};A.T=X;try{var ne=E(),me=A.S;me!==null&&me(X,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then($,se)}catch(xe){se(xe)}finally{Z!==null&&X.types!==null&&(Z.types=X.types),A.T=Z}},ge.unstable_useCacheRefresh=function(){return A.H.useCacheRefresh()},ge.use=function(E){return A.H.use(E)},ge.useActionState=function(E,Z,X){return A.H.useActionState(E,Z,X)},ge.useCallback=function(E,Z){return A.H.useCallback(E,Z)},ge.useContext=function(E){return A.H.useContext(E)},ge.useDebugValue=function(){},ge.useDeferredValue=function(E,Z){return A.H.useDeferredValue(E,Z)},ge.useEffect=function(E,Z){return A.H.useEffect(E,Z)},ge.useEffectEvent=function(E){return A.H.useEffectEvent(E)},ge.useId=function(){return A.H.useId()},ge.useImperativeHandle=function(E,Z,X){return A.H.useImperativeHandle(E,Z,X)},ge.useInsertionEffect=function(E,Z){return A.H.useInsertionEffect(E,Z)},ge.useLayoutEffect=function(E,Z){return A.H.useLayoutEffect(E,Z)},ge.useMemo=function(E,Z){return A.H.useMemo(E,Z)},ge.useOptimistic=function(E,Z){return A.H.useOptimistic(E,Z)},ge.useReducer=function(E,Z,X){return A.H.useReducer(E,Z,X)},ge.useRef=function(E){return A.H.useRef(E)},ge.useState=function(E){return A.H.useState(E)},ge.useSyncExternalStore=function(E,Z,X){return A.H.useSyncExternalStore(E,Z,X)},ge.useTransition=function(){return A.H.useTransition()},ge.version="19.2.8",ge}var Zg;function jr(){return Zg||(Zg=1,of.exports=a_()),of.exports}var ee=jr();const To=t_(ee);var uf={exports:{}},ir={},cf={exports:{}},ff={};var qg;function i_(){return qg||(qg=1,(function(t){function s(U,C){var q=U.length;U.push(C);e:for(;0<q;){var se=q-1>>>1,ue=U[se];if(0<o(ue,C))U[se]=C,U[q]=ue,q=se;else break e}}function i(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var C=U[0],q=U.pop();if(q!==C){U[0]=q;e:for(var se=0,ue=U.length,E=ue>>>1;se<E;){var Z=2*(se+1)-1,X=U[Z],ne=Z+1,me=U[ne];if(0>o(X,q))ne<ue&&0>o(me,X)?(U[se]=me,U[ne]=q,se=ne):(U[se]=X,U[Z]=q,se=Z);else if(ne<ue&&0>o(me,q))U[se]=me,U[ne]=q,se=ne;else break e}}return C}function o(U,C){var q=U.sortIndex-C.sortIndex;return q!==0?q:U.id-C.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 p=[],m=[],b=1,v=null,x=3,S=!1,w=!1,j=!1,z=!1,T=typeof setTimeout=="function"?setTimeout:null,L=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function V(U){for(var C=i(m);C!==null;){if(C.callback===null)r(m);else if(C.startTime<=U)r(m),C.sortIndex=C.expirationTime,s(p,C);else break;C=i(m)}}function W(U){if(j=!1,V(U),!w)if(i(p)!==null)w=!0,$||($=!0,I());else{var C=i(m);C!==null&&pe(W,C.startTime-U)}}var $=!1,A=-1,J=5,ie=-1;function re(){return z?!0:!(t.unstable_now()-ie<J)}function P(){if(z=!1,$){var U=t.unstable_now();ie=U;var C=!0;try{e:{w=!1,j&&(j=!1,L(A),A=-1),S=!0;var q=x;try{t:{for(V(U),v=i(p);v!==null&&!(v.expirationTime>U&&re());){var se=v.callback;if(typeof se=="function"){v.callback=null,x=v.priorityLevel;var ue=se(v.expirationTime<=U);if(U=t.unstable_now(),typeof ue=="function"){v.callback=ue,V(U),C=!0;break t}v===i(p)&&r(p),V(U)}else r(p);v=i(p)}if(v!==null)C=!0;else{var E=i(m);E!==null&&pe(W,E.startTime-U),C=!1}}break e}finally{v=null,x=q,S=!1}C=void 0}}finally{C?I():$=!1}}}var I;if(typeof G=="function")I=function(){G(P)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,ye=fe.port2;fe.port1.onmessage=P,I=function(){ye.postMessage(null)}}else I=function(){T(P,0)};function pe(U,C){A=T(function(){U(t.unstable_now())},C)}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"):J=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 C=3;break;default:C=x}var q=x;x=C;try{return U()}finally{x=q}},t.unstable_requestPaint=function(){z=!0},t.unstable_runWithPriority=function(U,C){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var q=x;x=U;try{return C()}finally{x=q}},t.unstable_scheduleCallback=function(U,C,q){var se=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?se+q:se):q=se,U){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=q+ue,U={id:b++,callback:C,priorityLevel:U,startTime:q,expirationTime:ue,sortIndex:-1},q>se?(U.sortIndex=q,s(m,U),i(p)===null&&U===i(m)&&(j?(L(A),A=-1):j=!0,pe(W,q-se))):(U.sortIndex=ue,s(p,U),w||S||(w=!0,$||($=!0,I()))),U},t.unstable_shouldYield=re,t.unstable_wrapCallback=function(U){var C=x;return function(){var q=x;x=C;try{return U.apply(this,arguments)}finally{x=q}}}})(ff)),ff}var Bg;function r_(){return Bg||(Bg=1,cf.exports=i_()),cf.exports}var df={exports:{}},vt={};var $g;function l_(){if($g)return vt;$g=1;var t=jr();function s(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var r={d:{f:i,r:function(){throw Error(s(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(p,m,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:p,containerInfo:m,implementation:b}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,vt.createPortal=function(p,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(s(299));return c(p,m,null,b)},vt.flushSync=function(p){var m=d.T,b=r.p;try{if(d.T=null,r.p=2,p)return p()}finally{d.T=m,r.p=b,r.d.f()}},vt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},vt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},vt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var b=m.as,v=h(b,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:S}):b==="script"&&r.d.X(p,{crossOrigin:v,integrity:x,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},vt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=h(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},vt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,v=h(b,m.crossOrigin);r.d.L(p,b,{crossOrigin:v,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},vt.preloadModule=function(p,m){if(typeof p=="string")if(m){var b=h(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},vt.requestFormReset=function(p){r.d.r(p)},vt.unstable_batchedUpdates=function(p,m){return p(m)},vt.useFormState=function(p,m,b){return d.H.useFormState(p,m,b)},vt.useFormStatus=function(){return d.H.useHostTransitionStatus()},vt.version="19.2.8",vt}var Hg;function Ov(){if(Hg)return df.exports;Hg=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(s){console.error(s)}}return t(),df.exports=l_(),df.exports}var Qg;function o_(){if(Qg)return ir;Qg=1;var t=r_(),s=jr(),i=Ov();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 p(e){if(c(e)!==e)throw Error(r(188))}function m(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 p(u),e;if(f===l)return p(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 b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),G=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),ie=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function I(e){return e===null||typeof e!="object"?null:(e=P&&e[P]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Symbol.for("react.client.reference");function ye(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case T:return"Profiler";case z:return"StrictMode";case W:return"Suspense";case $:return"SuspenseList";case ie:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case G:return e.displayName||"Context";case L:return(e._context.displayName||"Context")+".Consumer";case V:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A:return n=e.displayName||null,n!==null?n:ye(e.type)||"Memo";case J:n=e._payload,e=e._init;try{return ye(e(n))}catch{}}return null}var pe=Array.isArray,U=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,C=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},se=[],ue=-1;function E(e){return{current:e}}function Z(e){0>ue||(e.current=se[ue],se[ue]=null,ue--)}function X(e,n){ue++,se[ue]=e.current,e.current=n}var ne=E(null),me=E(null),xe=E(null),Ee=E(null);function Ze(e,n){switch(X(xe,n),X(me,e),X(ne,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?ag(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=ag(n),e=ig(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(ne),X(ne,e)}function He(){Z(ne),Z(me),Z(xe)}function cn(e){e.memoizedState!==null&&X(Ee,e);var n=ne.current,a=ig(n,e.type);n!==a&&(X(me,e),X(ne,a))}function Rs(e){me.current===e&&(Z(ne),Z(me)),Ee.current===e&&(Z(Ee),er._currentValue=q)}var Ho,Dd;function As(e){if(Ho===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Ho=n&&n[1]||"",Dd=-1<a.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Ho+e+Dd}var Qo=!1;function Go(e,n){if(!e||Qo)return"";Qo=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var F=function(){throw Error()};if(Object.defineProperty(F.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(F,[])}catch(B){var k=B}Reflect.construct(e,[],F)}else{try{F.call()}catch(B){k=B}e.call(F.prototype)}}else{try{throw Error()}catch(B){k=B}(F=e())&&typeof F.catch=="function"&&F.catch(function(){})}}catch(B){if(B&&k&&typeof B.stack=="string")return[B.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 O=y.split(`
|
|
4
|
-
`),D=_.split(`
|
|
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 H=`
|
|
6
|
-
`+O[l].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=l&&0<=u);break}}}finally{Qo=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?As(a):""}function C0(e,n){switch(e.tag){case 26:case 27:case 5:return As(e.type);case 16:return As("Lazy");case 13:return e.child!==n&&n!==null?As("Suspense Fallback"):As("Suspense");case 19:return As("SuspenseList");case 0:case 15:return Go(e.type,!1);case 11:return Go(e.type.render,!1);case 1:return Go(e.type,!0);case 31:return As("Activity");default:return""}}function kd(e){try{var n="",a=null;do n+=C0(e,a),a=e,e=e.return;while(e);return n}catch(l){return`
|
|
7
|
-
Error generating stack: `+l.message+`
|
|
8
|
-
`+l.stack}}var Ko=Object.prototype.hasOwnProperty,Yo=t.unstable_scheduleCallback,Fo=t.unstable_cancelCallback,M0=t.unstable_shouldYield,D0=t.unstable_requestPaint,Mt=t.unstable_now,k0=t.unstable_getCurrentPriorityLevel,Ld=t.unstable_ImmediatePriority,Ud=t.unstable_UserBlockingPriority,Nr=t.unstable_NormalPriority,L0=t.unstable_LowPriority,Zd=t.unstable_IdlePriority,U0=t.log,Z0=t.unstable_setDisableYieldValue,di=null,Dt=null;function Kn(e){if(typeof U0=="function"&&Z0(e),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(di,e)}catch{}}var kt=Math.clz32?Math.clz32:$0,q0=Math.log,B0=Math.LN2;function $0(e){return e>>>=0,e===0?32:31-(q0(e)/B0|0)|0}var zr=256,Tr=262144,Rr=4194304;function Cs(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 Ar(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=Cs(l):(y&=_,y!==0?u=Cs(y):a||(a=_&~e,a!==0&&(u=Cs(a))))):(_=l&~f,_!==0?u=Cs(_):y!==0?u=Cs(y):a||(a=l&~e,a!==0&&(u=Cs(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 hi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function H0(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 qd(){var e=Rr;return Rr<<=1,(Rr&62914560)===0&&(Rr=4194304),e}function Vo(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function mi(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Q0(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,O=e.expirationTimes,D=e.hiddenUpdates;for(a=y&~a;0<a;){var H=31-kt(a),F=1<<H;_[H]=0,O[H]=-1;var k=D[H];if(k!==null)for(D[H]=null,H=0;H<k.length;H++){var B=k[H];B!==null&&(B.lane&=-536870913)}a&=~F}l!==0&&Bd(e,l,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~n))}function Bd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-kt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function $d(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var l=31-kt(a),u=1<<l;u&n|e[l]&n&&(e[l]|=n),a&=~u}}function Hd(e,n){var a=n&-n;return a=(a&42)!==0?1:Po(a),(a&(e.suspendedLanes|n))!==0?0:a}function Po(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 Xo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Qd(){var e=C.p;return e!==0?e:(e=window.event,e===void 0?32:zg(e.type))}function Gd(e,n){var a=C.p;try{return C.p=e,n()}finally{C.p=a}}var Yn=Math.random().toString(36).slice(2),dt="__reactFiber$"+Yn,wt="__reactProps$"+Yn,ua="__reactContainer$"+Yn,Jo="__reactEvents$"+Yn,G0="__reactListeners$"+Yn,K0="__reactHandles$"+Yn,Kd="__reactResources$"+Yn,pi="__reactMarker$"+Yn;function Io(e){delete e[dt],delete e[wt],delete e[Jo],delete e[G0],delete e[K0]}function ca(e){var n=e[dt];if(n)return n;for(var a=e.parentNode;a;){if(n=a[ua]||a[dt]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=dg(e);e!==null;){if(a=e[dt])return a;e=dg(e)}return n}e=a,a=e.parentNode}return null}function fa(e){if(e=e[dt]||e[ua]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function gi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function da(e){var n=e[Kd];return n||(n=e[Kd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ot(e){e[pi]=!0}var Yd=new Set,Fd={};function Ms(e,n){ha(e,n),ha(e+"Capture",n)}function ha(e,n){for(Fd[e]=n,e=0;e<n.length;e++)Yd.add(n[e])}var Y0=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]*$"),Vd={},Pd={};function F0(e){return Ko.call(Pd,e)?!0:Ko.call(Vd,e)?!1:Y0.test(e)?Pd[e]=!0:(Vd[e]=!0,!1)}function Cr(e,n,a){if(F0(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 Mr(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 Sn(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 Kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function V0(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 Wo(e){if(!e._valueTracker){var n=Xd(e)?"checked":"value";e._valueTracker=V0(e,n,""+e[n])}}function Jd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return e&&(l=Xd(e)?e.checked?"true":"false":e.value),e=l,e!==a?(n.setValue(e),!0):!1}function Dr(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 P0=/[\n"\\]/g;function Yt(e){return e.replace(P0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function eu(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=""+Kt(n)):e.value!==""+Kt(n)&&(e.value=""+Kt(n)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),n!=null?tu(e,y,Kt(n)):a!=null?tu(e,y,Kt(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=""+Kt(_):e.removeAttribute("name")}function Id(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)){Wo(e);return}a=a!=null?""+Kt(a):"",n=n!=null?""+Kt(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),Wo(e)}function tu(e,n,a){n==="number"&&Dr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ma(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=""+Kt(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 Wd(e,n,a){if(n!=null&&(n=""+Kt(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+Kt(a):""}function eh(e,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error(r(92));if(pe(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),n=a}a=Kt(n),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Wo(e)}function pa(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var X0=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 th(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||X0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function nh(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&&th(e,u,l)}else for(var f in n)n.hasOwnProperty(f)&&th(e,f,n[f])}function nu(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 J0=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"]]),I0=/^[\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 kr(e){return I0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function _n(){}var su=null;function au(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ga=null,ya=null;function sh(e){var n=fa(e);if(n&&(e=n.stateNode)){var a=e[wt]||null;e:switch(e=n.stateNode,n.type){case"input":if(eu(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="'+Yt(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==e&&l.form===e.form){var u=l[wt]||null;if(!u)throw Error(r(90));eu(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&&Jd(l)}break e;case"textarea":Wd(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&ma(e,!!a.multiple,n,!1)}}}var iu=!1;function ah(e,n,a){if(iu)return e(n,a);iu=!0;try{var l=e(n);return l}finally{if(iu=!1,(ga!==null||ya!==null)&&(_l(),ga&&(n=ga,e=ya,ya=ga=null,sh(n),e)))for(n=0;n<e.length;n++)sh(e[n])}}function yi(e,n){var a=e.stateNode;if(a===null)return null;var l=a[wt]||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 wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ru=!1;if(wn)try{var vi={};Object.defineProperty(vi,"passive",{get:function(){ru=!0}}),window.addEventListener("test",vi,vi),window.removeEventListener("test",vi,vi)}catch{ru=!1}var Fn=null,lu=null,Lr=null;function ih(){if(Lr)return Lr;var e,n=lu,a=n.length,l,u="value"in Fn?Fn.value:Fn.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 Lr=u.slice(e,1<l?1-l:void 0)}function Ur(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 Zr(){return!0}function rh(){return!1}function jt(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)?Zr:rh,this.isPropagationStopped=rh,this}return v(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=Zr)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Zr)},persist:function(){},isPersistent:Zr}),n}var Ds={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qr=jt(Ds),bi=v({},Ds,{view:0,detail:0}),W0=jt(bi),ou,uu,xi,Br=v({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fu,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!==xi&&(xi&&e.type==="mousemove"?(ou=e.screenX-xi.screenX,uu=e.screenY-xi.screenY):uu=ou=0,xi=e),ou)},movementY:function(e){return"movementY"in e?e.movementY:uu}}),lh=jt(Br),ex=v({},Br,{dataTransfer:0}),tx=jt(ex),nx=v({},bi,{relatedTarget:0}),cu=jt(nx),sx=v({},Ds,{animationName:0,elapsedTime:0,pseudoElement:0}),ax=jt(sx),ix=v({},Ds,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),rx=jt(ix),lx=v({},Ds,{data:0}),oh=jt(lx),ox={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ux={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"},cx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fx(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=cx[e])?!!n[e]:!1}function fu(){return fx}var dx=v({},bi,{key:function(e){if(e.key){var n=ox[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Ur(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ux[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fu,charCode:function(e){return e.type==="keypress"?Ur(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ur(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),hx=jt(dx),mx=v({},Br,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),uh=jt(mx),px=v({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fu}),gx=jt(px),yx=v({},Ds,{propertyName:0,elapsedTime:0,pseudoElement:0}),vx=jt(yx),bx=v({},Br,{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}),xx=jt(bx),Sx=v({},Ds,{newState:0,oldState:0}),_x=jt(Sx),wx=[9,13,27,32],du=wn&&"CompositionEvent"in window,Si=null;wn&&"documentMode"in document&&(Si=document.documentMode);var jx=wn&&"TextEvent"in window&&!Si,ch=wn&&(!du||Si&&8<Si&&11>=Si),fh=" ",dh=!1;function hh(e,n){switch(e){case"keyup":return wx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function mh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var va=!1;function Ox(e,n){switch(e){case"compositionend":return mh(n);case"keypress":return n.which!==32?null:(dh=!0,fh);case"textInput":return e=n.data,e===fh&&dh?null:e;default:return null}}function Ex(e,n){if(va)return e==="compositionend"||!du&&hh(e,n)?(e=ih(),Lr=lu=Fn=null,va=!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 ch&&n.locale!=="ko"?null:n.data;default:return null}}var Nx={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 ph(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Nx[e.type]:n==="textarea"}function gh(e,n,a,l){ga?ya?ya.push(l):ya=[l]:ga=l,n=Tl(n,"onChange"),0<n.length&&(a=new qr("onChange","change",null,a,l),e.push({event:a,listeners:n}))}var _i=null,wi=null;function zx(e){Ip(e,0)}function $r(e){var n=gi(e);if(Jd(n))return e}function yh(e,n){if(e==="change")return n}var vh=!1;if(wn){var hu;if(wn){var mu="oninput"in document;if(!mu){var bh=document.createElement("div");bh.setAttribute("oninput","return;"),mu=typeof bh.oninput=="function"}hu=mu}else hu=!1;vh=hu&&(!document.documentMode||9<document.documentMode)}function xh(){_i&&(_i.detachEvent("onpropertychange",Sh),wi=_i=null)}function Sh(e){if(e.propertyName==="value"&&$r(wi)){var n=[];gh(n,wi,e,au(e)),ah(zx,n)}}function Tx(e,n,a){e==="focusin"?(xh(),_i=n,wi=a,_i.attachEvent("onpropertychange",Sh)):e==="focusout"&&xh()}function Rx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $r(wi)}function Ax(e,n){if(e==="click")return $r(n)}function Cx(e,n){if(e==="input"||e==="change")return $r(n)}function Mx(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Lt=typeof Object.is=="function"?Object.is:Mx;function ji(e,n){if(Lt(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(!Ko.call(n,u)||!Lt(e[u],n[u]))return!1}return!0}function _h(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wh(e,n){var a=_h(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=_h(a)}}function jh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?jh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Oh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=Dr(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=Dr(e.document)}return n}function pu(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 Dx=wn&&"documentMode"in document&&11>=document.documentMode,ba=null,gu=null,Oi=null,yu=!1;function Eh(e,n,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;yu||ba==null||ba!==Dr(l)||(l=ba,"selectionStart"in l&&pu(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}),Oi&&ji(Oi,l)||(Oi=l,l=Tl(gu,"onSelect"),0<l.length&&(n=new qr("onSelect","select",null,n,a),e.push({event:n,listeners:l}),n.target=ba)))}function ks(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var xa={animationend:ks("Animation","AnimationEnd"),animationiteration:ks("Animation","AnimationIteration"),animationstart:ks("Animation","AnimationStart"),transitionrun:ks("Transition","TransitionRun"),transitionstart:ks("Transition","TransitionStart"),transitioncancel:ks("Transition","TransitionCancel"),transitionend:ks("Transition","TransitionEnd")},vu={},Nh={};wn&&(Nh=document.createElement("div").style,"AnimationEvent"in window||(delete xa.animationend.animation,delete xa.animationiteration.animation,delete xa.animationstart.animation),"TransitionEvent"in window||delete xa.transitionend.transition);function Ls(e){if(vu[e])return vu[e];if(!xa[e])return e;var n=xa[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in Nh)return vu[e]=n[a];return e}var zh=Ls("animationend"),Th=Ls("animationiteration"),Rh=Ls("animationstart"),kx=Ls("transitionrun"),Lx=Ls("transitionstart"),Ux=Ls("transitioncancel"),Ah=Ls("transitionend"),Ch=new Map,bu="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(" ");bu.push("scrollEnd");function sn(e,n){Ch.set(e,n),Ms(n,[e])}var Hr=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)},Ft=[],Sa=0,xu=0;function Qr(){for(var e=Sa,n=xu=Sa=0;n<e;){var a=Ft[n];Ft[n++]=null;var l=Ft[n];Ft[n++]=null;var u=Ft[n];Ft[n++]=null;var f=Ft[n];if(Ft[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&&Mh(a,u,f)}}function Gr(e,n,a,l){Ft[Sa++]=e,Ft[Sa++]=n,Ft[Sa++]=a,Ft[Sa++]=l,xu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Su(e,n,a,l){return Gr(e,n,a,l),Kr(e)}function Us(e,n){return Gr(e,null,null,n),Kr(e)}function Mh(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-kt(a),e=f.hiddenUpdates,l=e[u],l===null?e[u]=[n]:l.push(n),n.lane=a|536870912),f):null}function Kr(e){if(50<Fi)throw Fi=0,Rc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var _a={};function Zx(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 Ut(e,n,a,l){return new Zx(e,n,a,l)}function _u(e){return e=e.prototype,!(!e||!e.isReactComponent)}function jn(e,n){var a=e.alternate;return a===null?(a=Ut(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 Dh(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 Yr(e,n,a,l,u,f){var y=0;if(l=e,typeof e=="function")_u(e)&&(y=1);else if(typeof e=="string")y=QS(e,a,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ie:return e=Ut(31,a,n,u),e.elementType=ie,e.lanes=f,e;case j:return Zs(a.children,u,f,n);case z:y=8,u|=24;break;case T:return e=Ut(12,a,n,u|2),e.elementType=T,e.lanes=f,e;case W:return e=Ut(13,a,n,u),e.elementType=W,e.lanes=f,e;case $:return e=Ut(19,a,n,u),e.elementType=$,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:y=10;break e;case L:y=9;break e;case V:y=11;break e;case A:y=14;break e;case J:y=16,l=null;break e}y=29,a=Error(r(130,e===null?"null":typeof e,"")),l=null}return n=Ut(y,a,n,u),n.elementType=e,n.type=l,n.lanes=f,n}function Zs(e,n,a,l){return e=Ut(7,e,l,n),e.lanes=a,e}function wu(e,n,a){return e=Ut(6,e,null,n),e.lanes=a,e}function kh(e){var n=Ut(18,null,null,0);return n.stateNode=e,n}function ju(e,n,a){return n=Ut(4,e.children!==null?e.children:[],e.key,n),n.lanes=a,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Lh=new WeakMap;function Vt(e,n){if(typeof e=="object"&&e!==null){var a=Lh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:kd(n)},Lh.set(e,n),n)}return{value:e,source:n,stack:kd(n)}}var wa=[],ja=0,Fr=null,Ei=0,Pt=[],Xt=0,Vn=null,fn=1,dn="";function On(e,n){wa[ja++]=Ei,wa[ja++]=Fr,Fr=e,Ei=n}function Uh(e,n,a){Pt[Xt++]=fn,Pt[Xt++]=dn,Pt[Xt++]=Vn,Vn=e;var l=fn;e=dn;var u=32-kt(l)-1;l&=~(1<<u),a+=1;var f=32-kt(n)+u;if(30<f){var y=u-u%5;f=(l&(1<<y)-1).toString(32),l>>=y,u-=y,fn=1<<32-kt(n)+u|a<<u|l,dn=f+e}else fn=1<<f|a<<u|l,dn=e}function Ou(e){e.return!==null&&(On(e,1),Uh(e,1,0))}function Eu(e){for(;e===Fr;)Fr=wa[--ja],wa[ja]=null,Ei=wa[--ja],wa[ja]=null;for(;e===Vn;)Vn=Pt[--Xt],Pt[Xt]=null,dn=Pt[--Xt],Pt[Xt]=null,fn=Pt[--Xt],Pt[Xt]=null}function Zh(e,n){Pt[Xt++]=fn,Pt[Xt++]=dn,Pt[Xt++]=Vn,fn=n.id,dn=n.overflow,Vn=e}var ht=null,Be=null,Oe=!1,Pn=null,Jt=!1,Nu=Error(r(519));function Xn(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ni(Vt(n,e)),Nu}function qh(e){var n=e.stateNode,a=e.type,l=e.memoizedProps;switch(n[dt]=e,n[wt]=l,a){case"dialog":_e("cancel",n),_e("close",n);break;case"iframe":case"object":case"embed":_e("load",n);break;case"video":case"audio":for(a=0;a<Pi.length;a++)_e(Pi[a],n);break;case"source":_e("error",n);break;case"img":case"image":case"link":_e("error",n),_e("load",n);break;case"details":_e("toggle",n);break;case"input":_e("invalid",n),Id(n,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":_e("invalid",n);break;case"textarea":_e("invalid",n),eh(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||ng(n.textContent,a)?(l.popover!=null&&(_e("beforetoggle",n),_e("toggle",n)),l.onScroll!=null&&_e("scroll",n),l.onScrollEnd!=null&&_e("scrollend",n),l.onClick!=null&&(n.onclick=_n),n=!0):n=!1,n||Xn(e,!0)}function Bh(e){for(ht=e.return;ht;)switch(ht.tag){case 5:case 31:case 13:Jt=!1;return;case 27:case 3:Jt=!0;return;default:ht=ht.return}}function Oa(e){if(e!==ht)return!1;if(!Oe)return Bh(e),Oe=!0,!1;var n=e.tag,a;if((a=n!==3&&n!==27)&&((a=n===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Kc(e.type,e.memoizedProps)),a=!a),a&&Be&&Xn(e),Bh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Be=fg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Be=fg(e)}else n===27?(n=Be,cs(e.type)?(e=Xc,Xc=null,Be=e):Be=n):Be=ht?Wt(e.stateNode.nextSibling):null;return!0}function qs(){Be=ht=null,Oe=!1}function zu(){var e=Pn;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),Pn=null),e}function Ni(e){Pn===null?Pn=[e]:Pn.push(e)}var Tu=E(null),Bs=null,En=null;function Jn(e,n,a){X(Tu,n._currentValue),n._currentValue=a}function Nn(e){e._currentValue=Tu.current,Z(Tu)}function Ru(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 Au(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 O=0;O<n.length;O++)if(_.context===n[O]){f.lanes|=a,_=f.alternate,_!==null&&(_.lanes|=a),Ru(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),Ru(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;Lt(u.pendingProps.value,y.value)||(e!==null?e.push(_):e=[_])}}else if(u===Ee.current){if(y=u.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(er):e=[er])}u=u.return}e!==null&&Au(n,e,a,l),n.flags|=262144}function Vr(e){for(e=e.firstContext;e!==null;){if(!Lt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $s(e){Bs=e,En=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function mt(e){return $h(Bs,e)}function Pr(e,n){return Bs===null&&$s(e),$h(e,n)}function $h(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 qx=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()})}},Bx=t.unstable_scheduleCallback,$x=t.unstable_NormalPriority,et={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cu(){return{controller:new qx,data:new Map,refCount:0}}function zi(e){e.refCount--,e.refCount===0&&Bx($x,function(){e.controller.abort()})}var Ti=null,Mu=0,Na=0,za=null;function Hx(e,n){if(Ti===null){var a=Ti=[];Mu=0,Na=Lc(),za={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Mu++,n.then(Hh,Hh),n}function Hh(){if(--Mu===0&&Ti!==null){za!==null&&(za.status="fulfilled");var e=Ti;Ti=null,Na=0,za=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Qx(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 Qh=U.S;U.S=function(e,n){Ep=Mt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Hx(e,n),Qh!==null&&Qh(e,n)};var Hs=E(null);function Du(){var e=Hs.current;return e!==null?e:Ue.pooledCache}function Xr(e,n){n===null?X(Hs,Hs.current):X(Hs,n.pool)}function Gh(){var e=Du();return e===null?null:{parent:et._currentValue,pool:e}}var Ta=Error(r(460)),ku=Error(r(474)),Jr=Error(r(542)),Ir={then:function(){}};function Kh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Yh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(_n,_n),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Vh(e),e;default:if(typeof n.status=="string")n.then(_n,_n);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,Vh(e),e}throw Gs=n,Ta}}function Qs(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Gs=a,Ta):a}}var Gs=null;function Fh(){if(Gs===null)throw Error(r(459));var e=Gs;return Gs=null,e}function Vh(e){if(e===Ta||e===Jr)throw Error(r(483))}var Ra=null,Ri=0;function Wr(e){var n=Ri;return Ri+=1,Ra===null&&(Ra=[]),Yh(Ra,e,n)}function Ai(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function el(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 Ph(e){function n(R,N){if(e){var M=R.deletions;M===null?(R.deletions=[N],R.flags|=16):M.push(N)}}function a(R,N){if(!e)return null;for(;N!==null;)n(R,N),N=N.sibling;return null}function l(R){for(var N=new Map;R!==null;)R.key!==null?N.set(R.key,R):N.set(R.index,R),R=R.sibling;return N}function u(R,N){return R=jn(R,N),R.index=0,R.sibling=null,R}function f(R,N,M){return R.index=M,e?(M=R.alternate,M!==null?(M=M.index,M<N?(R.flags|=67108866,N):M):(R.flags|=67108866,N)):(R.flags|=1048576,N)}function y(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function _(R,N,M,K){return N===null||N.tag!==6?(N=wu(M,R.mode,K),N.return=R,N):(N=u(N,M),N.return=R,N)}function O(R,N,M,K){var ce=M.type;return ce===j?H(R,N,M.props.children,K,M.key):N!==null&&(N.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===J&&Qs(ce)===N.type)?(N=u(N,M.props),Ai(N,M),N.return=R,N):(N=Yr(M.type,M.key,M.props,null,R.mode,K),Ai(N,M),N.return=R,N)}function D(R,N,M,K){return N===null||N.tag!==4||N.stateNode.containerInfo!==M.containerInfo||N.stateNode.implementation!==M.implementation?(N=ju(M,R.mode,K),N.return=R,N):(N=u(N,M.children||[]),N.return=R,N)}function H(R,N,M,K,ce){return N===null||N.tag!==7?(N=Zs(M,R.mode,K,ce),N.return=R,N):(N=u(N,M),N.return=R,N)}function F(R,N,M){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=wu(""+N,R.mode,M),N.return=R,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case S:return M=Yr(N.type,N.key,N.props,null,R.mode,M),Ai(M,N),M.return=R,M;case w:return N=ju(N,R.mode,M),N.return=R,N;case J:return N=Qs(N),F(R,N,M)}if(pe(N)||I(N))return N=Zs(N,R.mode,M,null),N.return=R,N;if(typeof N.then=="function")return F(R,Wr(N),M);if(N.$$typeof===G)return F(R,Pr(R,N),M);el(R,N)}return null}function k(R,N,M,K){var ce=N!==null?N.key:null;if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return ce!==null?null:_(R,N,""+M,K);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case S:return M.key===ce?O(R,N,M,K):null;case w:return M.key===ce?D(R,N,M,K):null;case J:return M=Qs(M),k(R,N,M,K)}if(pe(M)||I(M))return ce!==null?null:H(R,N,M,K,null);if(typeof M.then=="function")return k(R,N,Wr(M),K);if(M.$$typeof===G)return k(R,N,Pr(R,M),K);el(R,M)}return null}function B(R,N,M,K,ce){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return R=R.get(M)||null,_(N,R,""+K,ce);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case S:return R=R.get(K.key===null?M:K.key)||null,O(N,R,K,ce);case w:return R=R.get(K.key===null?M:K.key)||null,D(N,R,K,ce);case J:return K=Qs(K),B(R,N,M,K,ce)}if(pe(K)||I(K))return R=R.get(M)||null,H(N,R,K,ce,null);if(typeof K.then=="function")return B(R,N,M,Wr(K),ce);if(K.$$typeof===G)return B(R,N,M,Pr(N,K),ce);el(N,K)}return null}function ae(R,N,M,K){for(var ce=null,Ne=null,le=N,be=N=0,je=null;le!==null&&be<M.length;be++){le.index>be?(je=le,le=null):je=le.sibling;var ze=k(R,le,M[be],K);if(ze===null){le===null&&(le=je);break}e&&le&&ze.alternate===null&&n(R,le),N=f(ze,N,be),Ne===null?ce=ze:Ne.sibling=ze,Ne=ze,le=je}if(be===M.length)return a(R,le),Oe&&On(R,be),ce;if(le===null){for(;be<M.length;be++)le=F(R,M[be],K),le!==null&&(N=f(le,N,be),Ne===null?ce=le:Ne.sibling=le,Ne=le);return Oe&&On(R,be),ce}for(le=l(le);be<M.length;be++)je=B(le,R,be,M[be],K),je!==null&&(e&&je.alternate!==null&&le.delete(je.key===null?be:je.key),N=f(je,N,be),Ne===null?ce=je:Ne.sibling=je,Ne=je);return e&&le.forEach(function(ps){return n(R,ps)}),Oe&&On(R,be),ce}function de(R,N,M,K){if(M==null)throw Error(r(151));for(var ce=null,Ne=null,le=N,be=N=0,je=null,ze=M.next();le!==null&&!ze.done;be++,ze=M.next()){le.index>be?(je=le,le=null):je=le.sibling;var ps=k(R,le,ze.value,K);if(ps===null){le===null&&(le=je);break}e&&le&&ps.alternate===null&&n(R,le),N=f(ps,N,be),Ne===null?ce=ps:Ne.sibling=ps,Ne=ps,le=je}if(ze.done)return a(R,le),Oe&&On(R,be),ce;if(le===null){for(;!ze.done;be++,ze=M.next())ze=F(R,ze.value,K),ze!==null&&(N=f(ze,N,be),Ne===null?ce=ze:Ne.sibling=ze,Ne=ze);return Oe&&On(R,be),ce}for(le=l(le);!ze.done;be++,ze=M.next())ze=B(le,R,be,ze.value,K),ze!==null&&(e&&ze.alternate!==null&&le.delete(ze.key===null?be:ze.key),N=f(ze,N,be),Ne===null?ce=ze:Ne.sibling=ze,Ne=ze);return e&&le.forEach(function(e_){return n(R,e_)}),Oe&&On(R,be),ce}function Le(R,N,M,K){if(typeof M=="object"&&M!==null&&M.type===j&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case S:e:{for(var ce=M.key;N!==null;){if(N.key===ce){if(ce=M.type,ce===j){if(N.tag===7){a(R,N.sibling),K=u(N,M.props.children),K.return=R,R=K;break e}}else if(N.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===J&&Qs(ce)===N.type){a(R,N.sibling),K=u(N,M.props),Ai(K,M),K.return=R,R=K;break e}a(R,N);break}else n(R,N);N=N.sibling}M.type===j?(K=Zs(M.props.children,R.mode,K,M.key),K.return=R,R=K):(K=Yr(M.type,M.key,M.props,null,R.mode,K),Ai(K,M),K.return=R,R=K)}return y(R);case w:e:{for(ce=M.key;N!==null;){if(N.key===ce)if(N.tag===4&&N.stateNode.containerInfo===M.containerInfo&&N.stateNode.implementation===M.implementation){a(R,N.sibling),K=u(N,M.children||[]),K.return=R,R=K;break e}else{a(R,N);break}else n(R,N);N=N.sibling}K=ju(M,R.mode,K),K.return=R,R=K}return y(R);case J:return M=Qs(M),Le(R,N,M,K)}if(pe(M))return ae(R,N,M,K);if(I(M)){if(ce=I(M),typeof ce!="function")throw Error(r(150));return M=ce.call(M),de(R,N,M,K)}if(typeof M.then=="function")return Le(R,N,Wr(M),K);if(M.$$typeof===G)return Le(R,N,Pr(R,M),K);el(R,M)}return typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint"?(M=""+M,N!==null&&N.tag===6?(a(R,N.sibling),K=u(N,M),K.return=R,R=K):(a(R,N),K=wu(M,R.mode,K),K.return=R,R=K),y(R)):a(R,N)}return function(R,N,M,K){try{Ri=0;var ce=Le(R,N,M,K);return Ra=null,ce}catch(le){if(le===Ta||le===Jr)throw le;var Ne=Ut(29,le,null,R.mode);return Ne.lanes=K,Ne.return=R,Ne}}}var Ks=Ph(!0),Xh=Ph(!1),In=!1;function Lu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Uu(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 Wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function es(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=Kr(e),Mh(e,null,a),n}return Gr(e,l,n,a),Kr(e)}function Ci(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,$d(e,a)}}function Zu(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 qu=!1;function Mi(){if(qu){var e=za;if(e!==null)throw e}}function Di(e,n,a,l){qu=!1;var u=e.updateQueue;In=!1;var f=u.firstBaseUpdate,y=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var O=_,D=O.next;O.next=null,y===null?f=D:y.next=D,y=O;var H=e.alternate;H!==null&&(H=H.updateQueue,_=H.lastBaseUpdate,_!==y&&(_===null?H.firstBaseUpdate=D:_.next=D,H.lastBaseUpdate=O))}if(f!==null){var F=u.baseState;y=0,H=D=O=null,_=f;do{var k=_.lane&-536870913,B=k!==_.lane;if(B?(we&k)===k:(l&k)===k){k!==0&&k===Na&&(qu=!0),H!==null&&(H=H.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ae=e,de=_;k=n;var Le=a;switch(de.tag){case 1:if(ae=de.payload,typeof ae=="function"){F=ae.call(Le,F,k);break e}F=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,k=typeof ae=="function"?ae.call(Le,F,k):ae,k==null)break e;F=v({},F,k);break e;case 2:In=!0}}k=_.callback,k!==null&&(e.flags|=64,B&&(e.flags|=8192),B=u.callbacks,B===null?u.callbacks=[k]:B.push(k))}else B={lane:k,tag:_.tag,payload:_.payload,callback:_.callback,next:null},H===null?(D=H=B,O=F):H=H.next=B,y|=k;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;B=_,_=B.next,B.next=null,u.lastBaseUpdate=B,u.shared.pending=null}}while(!0);H===null&&(O=F),u.baseState=O,u.firstBaseUpdate=D,u.lastBaseUpdate=H,f===null&&(u.shared.lanes=0),is|=y,e.lanes=y,e.memoizedState=F}}function Jh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Ih(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Jh(a[e],n)}var Aa=E(null),tl=E(0);function Wh(e,n){e=Ln,X(tl,e),X(Aa,n),Ln=e|n.baseLanes}function Bu(){X(tl,Ln),X(Aa,Aa.current)}function $u(){Ln=tl.current,Z(Aa),Z(tl)}var Zt=E(null),It=null;function ts(e){var n=e.alternate;X(Xe,Xe.current&1),X(Zt,e),It===null&&(n===null||Aa.current!==null||n.memoizedState!==null)&&(It=e)}function Hu(e){X(Xe,Xe.current),X(Zt,e),It===null&&(It=e)}function em(e){e.tag===22?(X(Xe,Xe.current),X(Zt,e),It===null&&(It=e)):ns()}function ns(){X(Xe,Xe.current),X(Zt,Zt.current)}function qt(e){Z(Zt),It===e&&(It=null),Z(Xe)}var Xe=E(0);function nl(e){for(var n=e;n!==null;){if(n.tag===13){var a=n.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Vc(a)||Pc(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 zn=0,ve=null,De=null,tt=null,sl=!1,Ca=!1,Ys=!1,al=0,ki=0,Ma=null,Gx=0;function Ve(){throw Error(r(321))}function Qu(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!Lt(e[a],n[a]))return!1;return!0}function Gu(e,n,a,l,u,f){return zn=f,ve=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Um:ic,Ys=!1,f=a(l,u),Ys=!1,Ca&&(f=nm(n,a,l,u)),tm(e),f}function tm(e){U.H=Zi;var n=De!==null&&De.next!==null;if(zn=0,tt=De=ve=null,sl=!1,ki=0,Ma=null,n)throw Error(r(300));e===null||nt||(e=e.dependencies,e!==null&&Vr(e)&&(nt=!0))}function nm(e,n,a,l){ve=e;var u=0;do{if(Ca&&(Ma=null),ki=0,Ca=!1,25<=u)throw Error(r(301));if(u+=1,tt=De=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=Zm,f=n(a,l)}while(Ca);return f}function Kx(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?Li(n):n,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(ve.flags|=1024),n}function Ku(){var e=al!==0;return al=0,e}function Yu(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Fu(e){if(sl){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}sl=!1}zn=0,tt=De=ve=null,Ca=!1,ki=al=0,Ma=null}function bt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return tt===null?ve.memoizedState=tt=e:tt=tt.next=e,tt}function Je(){if(De===null){var e=ve.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var n=tt===null?ve.memoizedState:tt.next;if(n!==null)tt=n,De=e;else{if(e===null)throw ve.alternate===null?Error(r(467)):Error(r(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},tt===null?ve.memoizedState=tt=e:tt=tt.next=e}return tt}function il(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Li(e){var n=ki;return ki+=1,Ma===null&&(Ma=[]),e=Yh(Ma,e,n),n=ve,(tt===null?n.memoizedState:tt.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Um:ic),e}function rl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Li(e);if(e.$$typeof===G)return mt(e)}throw Error(r(438,String(e)))}function Vu(e){var n=null,a=ve.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=ve.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=il(),ve.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]=re;return n.index++,a}function Tn(e,n){return typeof n=="function"?n(e):n}function ll(e){var n=Je();return Pu(n,De,e)}function Pu(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,O=null,D=n,H=!1;do{var F=D.lane&-536870913;if(F!==D.lane?(we&F)===F:(zn&F)===F){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}),F===Na&&(H=!0);else if((zn&k)===k){D=D.next,k===Na&&(H=!0);continue}else F={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},O===null?(_=O=F,y=f):O=O.next=F,ve.lanes|=k,is|=k;F=D.action,Ys&&a(f,F),f=D.hasEagerState?D.eagerState:a(f,F)}else k={lane:F,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},O===null?(_=O=k,y=f):O=O.next=k,ve.lanes|=F,is|=F;D=D.next}while(D!==null&&D!==n);if(O===null?y=f:O.next=_,!Lt(f,e.memoizedState)&&(nt=!0,H&&(a=za,a!==null)))throw a;e.memoizedState=f,e.baseState=y,e.baseQueue=O,l.lastRenderedState=f}return u===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Xu(e){var n=Je(),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);Lt(f,n.memoizedState)||(nt=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,l]}function sm(e,n,a){var l=ve,u=Je(),f=Oe;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=n();var y=!Lt((De||u).memoizedState,a);if(y&&(u.memoizedState=a,nt=!0),u=u.queue,Wu(rm.bind(null,l,u,e),[e]),u.getSnapshot!==n||y||tt!==null&&tt.memoizedState.tag&1){if(l.flags|=2048,Da(9,{destroy:void 0},im.bind(null,l,u,a,n),null),Ue===null)throw Error(r(349));f||(zn&127)!==0||am(l,n,a)}return a}function am(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=ve.updateQueue,n===null?(n=il(),ve.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function im(e,n,a,l){n.value=a,n.getSnapshot=l,lm(n)&&om(e)}function rm(e,n,a){return a(function(){lm(n)&&om(e)})}function lm(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!Lt(e,a)}catch{return!0}}function om(e){var n=Us(e,2);n!==null&&Tt(n,e,2)}function Ju(e){var n=bt();if(typeof e=="function"){var a=e;if(e=a(),Ys){Kn(!0);try{a()}finally{Kn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:e},n}function um(e,n,a,l){return e.baseState=a,Pu(e,De,typeof l=="function"?l:Tn)}function Yx(e,n,a,l,u){if(cl(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,cm(n,f)):(f.next=a.next,n.pending=a.next=f)}}function cm(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),O=U.S;O!==null&&O(y,_),fm(e,n,_)}catch(D){Iu(e,n,D)}finally{f!==null&&y.types!==null&&(f.types=y.types),U.T=f}}else try{f=a(u,l),fm(e,n,f)}catch(D){Iu(e,n,D)}}function fm(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){dm(e,n,l)},function(l){return Iu(e,n,l)}):dm(e,n,a)}function dm(e,n,a){n.status="fulfilled",n.value=a,hm(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,cm(e,a)))}function Iu(e,n,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,hm(n),n=n.next;while(n!==l)}e.action=null}function hm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function mm(e,n){return n}function pm(e,n){if(Oe){var a=Ue.formState;if(a!==null){e:{var l=ve;if(Oe){if(Be){t:{for(var u=Be,f=Jt;u.nodeType!==8;){if(!f){u=null;break t}if(u=Wt(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Be=Wt(u.nextSibling),l=u.data==="F!";break e}}Xn(l)}l=!1}l&&(n=a[0])}}return a=bt(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:mm,lastRenderedState:n},a.queue=l,a=Dm.bind(null,ve,l),l.dispatch=a,l=Ju(!1),f=ac.bind(null,ve,!1,l.queue),l=bt(),u={state:n,dispatch:null,action:e,pending:null},l.queue=u,a=Yx.bind(null,ve,u,f,a),u.dispatch=a,l.memoizedState=e,[n,a,!1]}function gm(e){var n=Je();return ym(n,De,e)}function ym(e,n,a){if(n=Pu(e,n,mm)[0],e=ll(Tn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Li(n)}catch(y){throw y===Ta?Jr:y}else l=n;n=Je();var u=n.queue,f=u.dispatch;return a!==n.memoizedState&&(ve.flags|=2048,Da(9,{destroy:void 0},Fx.bind(null,u,a),null)),[l,f,e]}function Fx(e,n){e.action=n}function vm(e){var n=Je(),a=De;if(a!==null)return ym(n,a,e);Je(),n=n.memoizedState,a=Je();var l=a.queue.dispatch;return a.memoizedState=e,[n,l,!1]}function Da(e,n,a,l){return e={tag:e,create:a,deps:l,inst:n,next:null},n=ve.updateQueue,n===null&&(n=il(),ve.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 bm(){return Je().memoizedState}function ol(e,n,a,l){var u=bt();ve.flags|=e,u.memoizedState=Da(1|n,{destroy:void 0},a,l===void 0?null:l)}function ul(e,n,a,l){var u=Je();l=l===void 0?null:l;var f=u.memoizedState.inst;De!==null&&l!==null&&Qu(l,De.memoizedState.deps)?u.memoizedState=Da(n,f,a,l):(ve.flags|=e,u.memoizedState=Da(1|n,f,a,l))}function xm(e,n){ol(8390656,8,e,n)}function Wu(e,n){ul(2048,8,e,n)}function Vx(e){ve.flags|=4;var n=ve.updateQueue;if(n===null)n=il(),ve.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function Sm(e){var n=Je().memoizedState;return Vx({ref:n,nextImpl:e}),function(){if((Te&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function _m(e,n){return ul(4,2,e,n)}function wm(e,n){return ul(4,4,e,n)}function jm(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 Om(e,n,a){a=a!=null?a.concat([e]):null,ul(4,4,jm.bind(null,n,e),a)}function ec(){}function Em(e,n){var a=Je();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&Qu(n,l[1])?l[0]:(a.memoizedState=[e,n],e)}function Nm(e,n){var a=Je();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&Qu(n,l[1]))return l[0];if(l=e(),Ys){Kn(!0);try{e()}finally{Kn(!1)}}return a.memoizedState=[l,n],l}function tc(e,n,a){return a===void 0||(zn&1073741824)!==0&&(we&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=zp(),ve.lanes|=e,is|=e,a)}function zm(e,n,a,l){return Lt(a,n)?a:Aa.current!==null?(e=tc(e,a,l),Lt(e,n)||(nt=!0),e):(zn&42)===0||(zn&1073741824)!==0&&(we&261930)===0?(nt=!0,e.memoizedState=a):(e=zp(),ve.lanes|=e,is|=e,n)}function Tm(e,n,a,l,u){var f=C.p;C.p=f!==0&&8>f?f:8;var y=U.T,_={};U.T=_,ac(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 H=Qx(O,l);Ui(e,n,H,Ht(e))}else Ui(e,n,l,Ht(e))}catch(F){Ui(e,n,{then:function(){},status:"rejected",reason:F},Ht())}finally{C.p=f,y!==null&&_.types!==null&&(y.types=_.types),U.T=y}}function Px(){}function nc(e,n,a,l){if(e.tag!==5)throw Error(r(476));var u=Rm(e).queue;Tm(e,u,n,q,a===null?Px:function(){return Am(e),a(l)})}function Rm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:q},next:null};var a={};return n.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:a},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Am(e){var n=Rm(e);n.next===null&&(n=e.alternate.memoizedState),Ui(e,n.next.queue,{},Ht())}function sc(){return mt(er)}function Cm(){return Je().memoizedState}function Mm(){return Je().memoizedState}function Xx(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=Ht();e=Wn(a);var l=es(n,e,a);l!==null&&(Tt(l,n,a),Ci(l,n,a)),n={cache:Cu()},e.payload=n;return}n=n.return}}function Jx(e,n,a){var l=Ht();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},cl(e)?km(n,a):(a=Su(e,n,a,l),a!==null&&(Tt(a,e,l),Lm(a,n,l)))}function Dm(e,n,a){var l=Ht();Ui(e,n,a,l)}function Ui(e,n,a,l){var u={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(cl(e))km(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=_,Lt(_,y))return Gr(e,n,u,0),Ue===null&&Qr(),!1}catch{}if(a=Su(e,n,u,l),a!==null)return Tt(a,e,l),Lm(a,n,l),!0}return!1}function ac(e,n,a,l){if(l={lane:2,revertLane:Lc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},cl(e)){if(n)throw Error(r(479))}else n=Su(e,a,l,2),n!==null&&Tt(n,e,2)}function cl(e){var n=e.alternate;return e===ve||n!==null&&n===ve}function km(e,n){Ca=sl=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function Lm(e,n,a){if((a&4194048)!==0){var l=n.lanes;l&=e.pendingLanes,a|=l,n.lanes=a,$d(e,a)}}var Zi={readContext:mt,use:rl,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};Zi.useEffectEvent=Ve;var Um={readContext:mt,use:rl,useCallback:function(e,n){return bt().memoizedState=[e,n===void 0?null:n],e},useContext:mt,useEffect:xm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ol(4194308,4,jm.bind(null,n,e),a)},useLayoutEffect:function(e,n){return ol(4194308,4,e,n)},useInsertionEffect:function(e,n){ol(4,2,e,n)},useMemo:function(e,n){var a=bt();n=n===void 0?null:n;var l=e();if(Ys){Kn(!0);try{e()}finally{Kn(!1)}}return a.memoizedState=[l,n],l},useReducer:function(e,n,a){var l=bt();if(a!==void 0){var u=a(n);if(Ys){Kn(!0);try{a(n)}finally{Kn(!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=Jx.bind(null,ve,e),[l.memoizedState,e]},useRef:function(e){var n=bt();return e={current:e},n.memoizedState=e},useState:function(e){e=Ju(e);var n=e.queue,a=Dm.bind(null,ve,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:ec,useDeferredValue:function(e,n){var a=bt();return tc(a,e,n)},useTransition:function(){var e=Ju(!1);return e=Tm.bind(null,ve,e.queue,!0,!1),bt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var l=ve,u=bt();if(Oe){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),Ue===null)throw Error(r(349));(we&127)!==0||am(l,n,a)}u.memoizedState=a;var f={value:a,getSnapshot:n};return u.queue=f,xm(rm.bind(null,l,f,e),[e]),l.flags|=2048,Da(9,{destroy:void 0},im.bind(null,l,f,a,n),null),a},useId:function(){var e=bt(),n=Ue.identifierPrefix;if(Oe){var a=dn,l=fn;a=(l&~(1<<32-kt(l)-1)).toString(32)+a,n="_"+n+"R_"+a,a=al++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=Gx++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:sc,useFormState:pm,useActionState:pm,useOptimistic:function(e){var n=bt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=ac.bind(null,ve,!0,a),a.dispatch=n,[e,n]},useMemoCache:Vu,useCacheRefresh:function(){return bt().memoizedState=Xx.bind(null,ve)},useEffectEvent:function(e){var n=bt(),a={impl:e};return n.memoizedState=a,function(){if((Te&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},ic={readContext:mt,use:rl,useCallback:Em,useContext:mt,useEffect:Wu,useImperativeHandle:Om,useInsertionEffect:_m,useLayoutEffect:wm,useMemo:Nm,useReducer:ll,useRef:bm,useState:function(){return ll(Tn)},useDebugValue:ec,useDeferredValue:function(e,n){var a=Je();return zm(a,De.memoizedState,e,n)},useTransition:function(){var e=ll(Tn)[0],n=Je().memoizedState;return[typeof e=="boolean"?e:Li(e),n]},useSyncExternalStore:sm,useId:Cm,useHostTransitionStatus:sc,useFormState:gm,useActionState:gm,useOptimistic:function(e,n){var a=Je();return um(a,De,e,n)},useMemoCache:Vu,useCacheRefresh:Mm};ic.useEffectEvent=Sm;var Zm={readContext:mt,use:rl,useCallback:Em,useContext:mt,useEffect:Wu,useImperativeHandle:Om,useInsertionEffect:_m,useLayoutEffect:wm,useMemo:Nm,useReducer:Xu,useRef:bm,useState:function(){return Xu(Tn)},useDebugValue:ec,useDeferredValue:function(e,n){var a=Je();return De===null?tc(a,e,n):zm(a,De.memoizedState,e,n)},useTransition:function(){var e=Xu(Tn)[0],n=Je().memoizedState;return[typeof e=="boolean"?e:Li(e),n]},useSyncExternalStore:sm,useId:Cm,useHostTransitionStatus:sc,useFormState:vm,useActionState:vm,useOptimistic:function(e,n){var a=Je();return De!==null?um(a,De,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Vu,useCacheRefresh:Mm};Zm.useEffectEvent=Sm;function rc(e,n,a,l){n=e.memoizedState,a=a(l,n),a=a==null?n:v({},n,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var lc={enqueueSetState:function(e,n,a){e=e._reactInternals;var l=Ht(),u=Wn(l);u.payload=n,a!=null&&(u.callback=a),n=es(e,u,l),n!==null&&(Tt(n,e,l),Ci(n,e,l))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var l=Ht(),u=Wn(l);u.tag=1,u.payload=n,a!=null&&(u.callback=a),n=es(e,u,l),n!==null&&(Tt(n,e,l),Ci(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=Ht(),l=Wn(a);l.tag=2,n!=null&&(l.callback=n),n=es(e,l,a),n!==null&&(Tt(n,e,a),Ci(n,e,a))}};function qm(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?!ji(a,l)||!ji(u,f):!0}function Bm(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&&lc.enqueueReplaceState(n,n.state,null)}function Fs(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=v({},a));for(var u in e)a[u]===void 0&&(a[u]=e[u])}return a}function $m(e){Hr(e)}function Hm(e){console.error(e)}function Qm(e){Hr(e)}function fl(e,n){try{var a=e.onUncaughtError;a(n.value,{componentStack:n.stack})}catch(l){setTimeout(function(){throw l})}}function Gm(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 oc(e,n,a){return a=Wn(a),a.tag=3,a.payload={element:null},a.callback=function(){fl(e,n)},a}function Km(e){return e=Wn(e),e.tag=3,e}function Ym(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(){Gm(n,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Gm(n,a,l),typeof u!="function"&&(rs===null?rs=new Set([this]):rs.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function Ix(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=Zt.current,a!==null){switch(a.tag){case 31:case 13:return It===null?wl():a.alternate===null&&Pe===0&&(Pe=3),a.flags&=-257,a.flags|=65536,a.lanes=u,l===Ir?a.flags|=16384:(n=a.updateQueue,n===null?a.updateQueue=new Set([l]):n.add(l),Mc(e,l,u)),!1;case 22:return a.flags|=65536,l===Ir?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)),Mc(e,l,u)),!1}throw Error(r(435,a.tag))}return Mc(e,l,u),wl(),!1}if(Oe)return n=Zt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==Nu&&(e=Error(r(422),{cause:l}),Ni(Vt(e,a)))):(l!==Nu&&(n=Error(r(423),{cause:l}),Ni(Vt(n,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Vt(l,a),u=oc(e.stateNode,l,u),Zu(e,u),Pe!==4&&(Pe=2)),!1;var f=Error(r(520),{cause:l});if(f=Vt(f,a),Yi===null?Yi=[f]:Yi.push(f),Pe!==4&&(Pe=2),n===null)return!0;l=Vt(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=oc(a.stateNode,l,e),Zu(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"&&(rs===null||!rs.has(f))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Km(u),Ym(u,e,a,l),Zu(a,u),!1}a=a.return}while(a!==null);return!1}var uc=Error(r(461)),nt=!1;function pt(e,n,a,l){n.child=e===null?Xh(n,null,a,l):Ks(n,e.child,a,l)}function Fm(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 $s(n),l=Gu(e,n,a,y,f,u),_=Ku(),e!==null&&!nt?(Yu(e,n,u),Rn(e,n,u)):(Oe&&_&&Ou(n),n.flags|=1,pt(e,n,l,u),n.child)}function Vm(e,n,a,l,u){if(e===null){var f=a.type;return typeof f=="function"&&!_u(f)&&f.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=f,Pm(e,n,f,l,u)):(e=Yr(a.type,null,l,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(f=e.child,!yc(e,u)){var y=f.memoizedProps;if(a=a.compare,a=a!==null?a:ji,a(y,l)&&e.ref===n.ref)return Rn(e,n,u)}return n.flags|=1,e=jn(f,l),e.ref=n.ref,e.return=n,n.child=e}function Pm(e,n,a,l,u){if(e!==null){var f=e.memoizedProps;if(ji(f,l)&&e.ref===n.ref)if(nt=!1,n.pendingProps=l=f,yc(e,u))(e.flags&131072)!==0&&(nt=!0);else return n.lanes=e.lanes,Rn(e,n,u)}return cc(e,n,a,l,u)}function Xm(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 Jm(e,n,f,a,l)}if((a&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xr(n,f!==null?f.cachePool:null),f!==null?Wh(n,f):Bu(),em(n);else return l=n.lanes=536870912,Jm(e,n,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(Xr(n,f.cachePool),Wh(n,f),ns(),n.memoizedState=null):(e!==null&&Xr(n,null),Bu(),ns());return pt(e,n,u,a),n.child}function qi(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Jm(e,n,a,l,u){var f=Du();return f=f===null?null:{parent:et._currentValue,pool:f},n.memoizedState={baseLanes:a,cachePool:f},e!==null&&Xr(n,null),Bu(),em(n),e!==null&&Ea(e,n,l,!0),n.childLanes=u,null}function dl(e,n){return n=ml({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Im(e,n,a){return Ks(n,e.child,null,a),e=dl(n,n.pendingProps),e.flags|=2,qt(n),n.memoizedState=null,e}function Wx(e,n,a){var l=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Oe){if(l.mode==="hidden")return e=dl(n,l),n.lanes=536870912,qi(null,e);if(Hu(n),(e=Be)?(e=cg(e,Jt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Vn!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},a=kh(e),a.return=n,n.child=a,ht=n,Be=null)):e=null,e===null)throw Xn(n);return n.lanes=536870912,null}return dl(n,l)}var f=e.memoizedState;if(f!==null){var y=f.dehydrated;if(Hu(n),u)if(n.flags&256)n.flags&=-257,n=Im(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(nt||Ea(e,n,a,!1),u=(a&e.childLanes)!==0,nt||u){if(l=Ue,l!==null&&(y=Hd(l,a),y!==0&&y!==f.retryLane))throw f.retryLane=y,Us(e,y),Tt(l,e,y),uc;wl(),n=Im(e,n,a)}else e=f.treeContext,Be=Wt(y.nextSibling),ht=n,Oe=!0,Pn=null,Jt=!1,e!==null&&Zh(n,e),n=dl(n,l),n.flags|=4096;return n}return e=jn(e.child,{mode:l.mode,children:l.children}),e.ref=n.ref,n.child=e,e.return=n,e}function hl(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 cc(e,n,a,l,u){return $s(n),a=Gu(e,n,a,l,void 0,u),l=Ku(),e!==null&&!nt?(Yu(e,n,u),Rn(e,n,u)):(Oe&&l&&Ou(n),n.flags|=1,pt(e,n,a,u),n.child)}function Wm(e,n,a,l,u,f){return $s(n),n.updateQueue=null,a=nm(n,l,a,u),tm(e),l=Ku(),e!==null&&!nt?(Yu(e,n,f),Rn(e,n,f)):(Oe&&l&&Ou(n),n.flags|=1,pt(e,n,a,f),n.child)}function ep(e,n,a,l,u){if($s(n),n.stateNode===null){var f=_a,y=a.contextType;typeof y=="object"&&y!==null&&(f=mt(y)),f=new a(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=lc,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},Lu(n),y=a.contextType,f.context=typeof y=="object"&&y!==null?mt(y):_a,f.state=n.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(rc(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&&lc.enqueueReplaceState(f,f.state,null),Di(n,l,f,u),Mi(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){f=n.stateNode;var _=n.memoizedProps,O=Fs(a,_);f.props=O;var D=f.context,H=a.contextType;y=_a,typeof H=="object"&&H!==null&&(y=mt(H));var F=a.getDerivedStateFromProps;H=typeof F=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,H||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||D!==y)&&Bm(n,f,l,y),In=!1;var k=n.memoizedState;f.state=k,Di(n,l,f,u),Mi(),D=n.memoizedState,_||k!==D||In?(typeof F=="function"&&(rc(n,a,F,l),D=n.memoizedState),(O=In||qm(n,a,O,l,k,D,y))?(H||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=O):(typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!1)}else{f=n.stateNode,Uu(e,n),y=n.memoizedProps,H=Fs(a,y),f.props=H,F=n.pendingProps,k=f.context,D=a.contextType,O=_a,typeof D=="object"&&D!==null&&(O=mt(D)),_=a.getDerivedStateFromProps,(D=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==F||k!==O)&&Bm(n,f,l,O),In=!1,k=n.memoizedState,f.state=k,Di(n,l,f,u),Mi();var B=n.memoizedState;y!==F||k!==B||In||e!==null&&e.dependencies!==null&&Vr(e.dependencies)?(typeof _=="function"&&(rc(n,a,_,l),B=n.memoizedState),(H=In||qm(n,a,H,l,k,B,O)||e!==null&&e.dependencies!==null&&Vr(e.dependencies))?(D||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(l,B,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,B,O)),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=B),f.props=l,f.state=B,f.context=O,l=H):(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,hl(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=Ks(n,e.child,null,u),n.child=Ks(n,null,a,u)):pt(e,n,a,u),n.memoizedState=f.state,e=n.child):e=Rn(e,n,u),e}function tp(e,n,a,l){return qs(),n.flags|=256,pt(e,n,a,l),n.child}var fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dc(e){return{baseLanes:e,cachePool:Gh()}}function hc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=$t),e}function np(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:(Xe.current&2)!==0),y&&(u=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,e===null){if(Oe){if(u?ts(n):ns(),(e=Be)?(e=cg(e,Jt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Vn!==null?{id:fn,overflow:dn}:null,retryLane:536870912,hydrationErrors:null},a=kh(e),a.return=n,n.child=a,ht=n,Be=null)):e=null,e===null)throw Xn(n);return Pc(e)?n.lanes=32:n.lanes=536870912,null}var _=l.children;return l=l.fallback,u?(ns(),u=n.mode,_=ml({mode:"hidden",children:_},u),l=Zs(l,u,a,null),_.return=n,l.return=n,_.sibling=l,n.child=_,l=n.child,l.memoizedState=dc(a),l.childLanes=hc(e,y,a),n.memoizedState=fc,qi(null,l)):(ts(n),mc(n,_))}var O=e.memoizedState;if(O!==null&&(_=O.dehydrated,_!==null)){if(f)n.flags&256?(ts(n),n.flags&=-257,n=pc(e,n,a)):n.memoizedState!==null?(ns(),n.child=e.child,n.flags|=128,n=null):(ns(),_=l.fallback,u=n.mode,l=ml({mode:"visible",children:l.children},u),_=Zs(_,u,a,null),_.flags|=2,l.return=n,_.return=n,l.sibling=_,n.child=l,Ks(n,e.child,null,a),l=n.child,l.memoizedState=dc(a),l.childLanes=hc(e,y,a),n.memoizedState=fc,n=qi(null,l));else if(ts(n),Pc(_)){if(y=_.nextSibling&&_.nextSibling.dataset,y)var D=y.dgst;y=D,l=Error(r(419)),l.stack="",l.digest=y,Ni({value:l,source:null,stack:null}),n=pc(e,n,a)}else if(nt||Ea(e,n,a,!1),y=(a&e.childLanes)!==0,nt||y){if(y=Ue,y!==null&&(l=Hd(y,a),l!==0&&l!==O.retryLane))throw O.retryLane=l,Us(e,l),Tt(y,e,l),uc;Vc(_)||wl(),n=pc(e,n,a)}else Vc(_)?(n.flags|=192,n.child=e.child,n=null):(e=O.treeContext,Be=Wt(_.nextSibling),ht=n,Oe=!0,Pn=null,Jt=!1,e!==null&&Zh(n,e),n=mc(n,l.children),n.flags|=4096);return n}return u?(ns(),_=l.fallback,u=n.mode,O=e.child,D=O.sibling,l=jn(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,D!==null?_=jn(D,_):(_=Zs(_,u,a,null),_.flags|=2),_.return=n,l.return=n,l.sibling=_,n.child=l,qi(null,l),l=n.child,_=e.child.memoizedState,_===null?_=dc(a):(u=_.cachePool,u!==null?(O=et._currentValue,u=u.parent!==O?{parent:O,pool:O}:u):u=Gh(),_={baseLanes:_.baseLanes|a,cachePool:u}),l.memoizedState=_,l.childLanes=hc(e,y,a),n.memoizedState=fc,qi(e.child,l)):(ts(n),a=e.child,e=a.sibling,a=jn(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 mc(e,n){return n=ml({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function ml(e,n){return e=Ut(22,e,null,n),e.lanes=0,e}function pc(e,n,a){return Ks(n,e.child,null,a),e=mc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function sp(e,n,a){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),Ru(e.return,n,a)}function gc(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 ap(e,n,a){var l=n.pendingProps,u=l.revealOrder,f=l.tail;l=l.children;var y=Xe.current,_=(y&2)!==0;if(_?(y=y&1|2,n.flags|=128):y&=1,X(Xe,y),pt(e,n,l,a),l=Oe?Ei:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sp(e,a,n);else if(e.tag===19)sp(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&&nl(e)===null&&(u=a),a=a.sibling;a=u,a===null?(u=n.child,n.child=null):(u=a.sibling,a.sibling=null),gc(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&&nl(e)===null){n.child=u;break}e=u.sibling,u.sibling=a,a=u,u=e}gc(n,!0,a,null,f,l);break;case"together":gc(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function Rn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),is|=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=jn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=jn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function yc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Vr(e)))}function eS(e,n,a){switch(n.tag){case 3:Ze(n,n.stateNode.containerInfo),Jn(n,et,e.memoizedState.cache),qs();break;case 27:case 5:cn(n);break;case 4:Ze(n,n.stateNode.containerInfo);break;case 10:Jn(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Hu(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(ts(n),n.flags|=128,null):(a&n.child.childLanes)!==0?np(e,n,a):(ts(n),e=Rn(e,n,a),e!==null?e.sibling:null);ts(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 ap(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),X(Xe,Xe.current),l)break;return null;case 22:return n.lanes=0,Xm(e,n,a,n.pendingProps);case 24:Jn(n,et,e.memoizedState.cache)}return Rn(e,n,a)}function ip(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)nt=!0;else{if(!yc(e,a)&&(n.flags&128)===0)return nt=!1,eS(e,n,a);nt=(e.flags&131072)!==0}else nt=!1,Oe&&(n.flags&1048576)!==0&&Uh(n,Ei,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(e=Qs(n.elementType),n.type=e,typeof e=="function")_u(e)?(l=Fs(e,l),n.tag=1,n=ep(null,n,e,l,a)):(n.tag=0,n=cc(null,n,e,l,a));else{if(e!=null){var u=e.$$typeof;if(u===V){n.tag=11,n=Fm(null,n,e,l,a);break e}else if(u===A){n.tag=14,n=Vm(null,n,e,l,a);break e}}throw n=ye(e)||e,Error(r(306,n,""))}}return n;case 0:return cc(e,n,n.type,n.pendingProps,a);case 1:return l=n.type,u=Fs(l,n.pendingProps),ep(e,n,l,u,a);case 3:e:{if(Ze(n,n.stateNode.containerInfo),e===null)throw Error(r(387));l=n.pendingProps;var f=n.memoizedState;u=f.element,Uu(e,n),Di(n,l,null,a);var y=n.memoizedState;if(l=y.cache,Jn(n,et,l),l!==f.cache&&Au(n,[et],a,!0),Mi(),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=tp(e,n,l,a);break e}else if(l!==u){u=Vt(Error(r(424)),n),Ni(u),n=tp(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,Be=Wt(e.firstChild),ht=n,Oe=!0,Pn=null,Jt=!0,a=Xh(n,null,l,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(qs(),l===u){n=Rn(e,n,a);break e}pt(e,n,l,a)}n=n.child}return n;case 26:return hl(e,n),e===null?(a=gg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Oe||(a=n.type,e=n.pendingProps,l=Rl(xe.current).createElement(a),l[dt]=n,l[wt]=e,gt(l,a,e),ot(l),n.stateNode=l):n.memoizedState=gg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return cn(n),e===null&&Oe&&(l=n.stateNode=hg(n.type,n.pendingProps,xe.current),ht=n,Jt=!0,u=Be,cs(n.type)?(Xc=u,Be=Wt(l.firstChild)):Be=u),pt(e,n,n.pendingProps.children,a),hl(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Oe&&((u=l=Be)&&(l=RS(l,n.type,n.pendingProps,Jt),l!==null?(n.stateNode=l,ht=n,Be=Wt(l.firstChild),Jt=!1,u=!0):u=!1),u||Xn(n)),cn(n),u=n.type,f=n.pendingProps,y=e!==null?e.memoizedProps:null,l=f.children,Kc(u,f)?l=null:y!==null&&Kc(u,y)&&(n.flags|=32),n.memoizedState!==null&&(u=Gu(e,n,Kx,null,null,a),er._currentValue=u),hl(e,n),pt(e,n,l,a),n.child;case 6:return e===null&&Oe&&((e=a=Be)&&(a=AS(a,n.pendingProps,Jt),a!==null?(n.stateNode=a,ht=n,Be=null,e=!0):e=!1),e||Xn(n)),null;case 13:return np(e,n,a);case 4:return Ze(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Ks(n,null,l,a):pt(e,n,l,a),n.child;case 11:return Fm(e,n,n.type,n.pendingProps,a);case 7:return pt(e,n,n.pendingProps,a),n.child;case 8:return pt(e,n,n.pendingProps.children,a),n.child;case 12:return pt(e,n,n.pendingProps.children,a),n.child;case 10:return l=n.pendingProps,Jn(n,n.type,l.value),pt(e,n,l.children,a),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,$s(n),u=mt(u),l=l(u),n.flags|=1,pt(e,n,l,a),n.child;case 14:return Vm(e,n,n.type,n.pendingProps,a);case 15:return Pm(e,n,n.type,n.pendingProps,a);case 19:return ap(e,n,a);case 31:return Wx(e,n,a);case 22:return Xm(e,n,a,n.pendingProps);case 24:return $s(n),l=mt(et),e===null?(u=Du(),u===null&&(u=Ue,f=Cu(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=a),u=f),n.memoizedState={parent:l,cache:u},Lu(n),Jn(n,et,u)):((e.lanes&a)!==0&&(Uu(e,n),Di(n,null,null,a),Mi()),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),Jn(n,et,l)):(l=f.cache,Jn(n,et,l),l!==u.cache&&Au(n,[et],a,!0))),pt(e,n,n.pendingProps.children,a),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function An(e){e.flags|=4}function vc(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(Cp())e.flags|=8192;else throw Gs=Ir,ku}else e.flags&=-16777217}function rp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sg(n))if(Cp())e.flags|=8192;else throw Gs=Ir,ku}function pl(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?qd():536870912,e.lanes|=n,Za|=n)}function Bi(e,n){if(!Oe)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 $e(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 tS(e,n,a){var l=n.pendingProps;switch(Eu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(n),null;case 1:return $e(n),null;case 3:return a=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Nn(et),He(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Oa(n)?An(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,zu())),$e(n),null;case 26:var u=n.type,f=n.memoizedState;return e===null?(An(n),f!==null?($e(n),rp(n,f)):($e(n),vc(n,u,null,l,a))):f?f!==e.memoizedState?(An(n),$e(n),rp(n,f)):($e(n),n.flags&=-16777217):(e=e.memoizedProps,e!==l&&An(n),$e(n),vc(n,u,e,l,a)),null;case 27:if(Rs(n),a=xe.current,u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&An(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return $e(n),null}e=ne.current,Oa(n)?qh(n):(e=hg(u,l,a),n.stateNode=e,An(n))}return $e(n),null;case 5:if(Rs(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==l&&An(n);else{if(!l){if(n.stateNode===null)throw Error(r(166));return $e(n),null}if(f=ne.current,Oa(n))qh(n);else{var y=Rl(xe.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[dt]=n,f[wt]=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(gt(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&&An(n)}}return $e(n),vc(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,a),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==l&&An(n);else{if(typeof l!="string"&&n.stateNode===null)throw Error(r(166));if(e=xe.current,Oa(n)){if(e=n.stateNode,a=n.memoizedProps,l=null,u=ht,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[dt]=n,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||ng(e.nodeValue,a)),e||Xn(n,!0)}else e=Rl(e).createTextNode(l),e[dt]=n,n.stateNode=e}return $e(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(l=Oa(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[dt]=n}else qs(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$e(n),e=!1}else a=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(qt(n),n):(qt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return $e(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Oa(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[dt]=n}else qs(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;$e(n),u=!1}else u=zu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(qt(n),n):(qt(n),null)}return qt(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),pl(n,n.updateQueue),$e(n),null);case 4:return He(),e===null&&Bc(n.stateNode.containerInfo),$e(n),null;case 10:return Nn(n.type),$e(n),null;case 19:if(Z(Xe),l=n.memoizedState,l===null)return $e(n),null;if(u=(n.flags&128)!==0,f=l.rendering,f===null)if(u)Bi(l,!1);else{if(Pe!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(f=nl(e),f!==null){for(n.flags|=128,Bi(l,!1),e=f.updateQueue,n.updateQueue=e,pl(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Dh(a,e),a=a.sibling;return X(Xe,Xe.current&1|2),Oe&&On(n,l.treeForkCount),n.child}e=e.sibling}l.tail!==null&&Mt()>xl&&(n.flags|=128,u=!0,Bi(l,!1),n.lanes=4194304)}else{if(!u)if(e=nl(f),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,pl(n,e),Bi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Oe)return $e(n),null}else 2*Mt()-l.renderingStartTime>xl&&a!==536870912&&(n.flags|=128,u=!0,Bi(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=Mt(),e.sibling=null,a=Xe.current,X(Xe,u?a&1|2:a&1),Oe&&On(n,l.treeForkCount),e):($e(n),null);case 22:case 23:return qt(n),$u(),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&&($e(n),n.subtreeFlags&6&&(n.flags|=8192)):$e(n),a=n.updateQueue,a!==null&&pl(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(Hs),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Nn(et),$e(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function nS(e,n){switch(Eu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Nn(et),He(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Rs(n),null;case 31:if(n.memoizedState!==null){if(qt(n),n.alternate===null)throw Error(r(340));qs()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(qt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));qs()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Z(Xe),null;case 4:return He(),null;case 10:return Nn(n.type),null;case 22:case 23:return qt(n),$u(),e!==null&&Z(Hs),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Nn(et),null;case 25:return null;default:return null}}function lp(e,n){switch(Eu(n),n.tag){case 3:Nn(et),He();break;case 26:case 27:case 5:Rs(n);break;case 4:He();break;case 31:n.memoizedState!==null&&qt(n);break;case 13:qt(n);break;case 19:Z(Xe);break;case 10:Nn(n.type);break;case 22:case 23:qt(n),$u(),e!==null&&Z(Hs);break;case 24:Nn(et)}}function $i(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(_){Me(n,n.return,_)}}function ss(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 O=a,D=_;try{D()}catch(H){Me(u,O,H)}}}l=l.next}while(l!==f)}}catch(H){Me(n,n.return,H)}}function op(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Ih(n,a)}catch(l){Me(e,e.return,l)}}}function up(e,n,a){a.props=Fs(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Me(e,n,l)}}function Hi(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){Me(e,n,u)}}function hn(e,n){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(u){Me(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){Me(e,n,u)}else a.current=null}function cp(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){Me(e,e.return,u)}}function bc(e,n,a){try{var l=e.stateNode;jS(l,e.type,a,n),l[wt]=n}catch(u){Me(e,e.return,u)}}function fp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cs(e.type)||e.tag===4}function xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fp(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&&cs(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 Sc(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=_n));else if(l!==4&&(l===27&&cs(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(Sc(e,n,a),e=e.sibling;e!==null;)Sc(e,n,a),e=e.sibling}function gl(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&&cs(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(gl(e,n,a),e=e.sibling;e!==null;)gl(e,n,a),e=e.sibling}function dp(e){var n=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);gt(n,l,a),n[dt]=e,n[wt]=a}catch(f){Me(e,e.return,f)}}var Cn=!1,st=!1,_c=!1,hp=typeof WeakSet=="function"?WeakSet:Set,ut=null;function sS(e,n){if(e=e.containerInfo,Qc=Ul,e=Oh(e),pu(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,O=-1,D=0,H=0,F=e,k=null;t:for(;;){for(var B;F!==a||u!==0&&F.nodeType!==3||(_=y+u),F!==f||l!==0&&F.nodeType!==3||(O=y+l),F.nodeType===3&&(y+=F.nodeValue.length),(B=F.firstChild)!==null;)k=F,F=B;for(;;){if(F===e)break t;if(k===a&&++D===u&&(_=y),k===f&&++H===l&&(O=y),(B=F.nextSibling)!==null)break;F=k,k=F.parentNode}F=B}a=_===-1||O===-1?null:{start:_,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(Gc={focusedElem:e,selectionRange:a},Ul=!1,ut=n;ut!==null;)if(n=ut,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ut=e;else for(;ut!==null;){switch(n=ut,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 ae=Fs(a.type,u);e=l.getSnapshotBeforeUpdate(ae,f),l.__reactInternalSnapshotBeforeUpdate=e}catch(de){Me(a,a.return,de)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,a=e.nodeType,a===9)Fc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fc(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,ut=e;break}ut=n.return}}function mp(e,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Dn(e,a),l&4&&$i(5,a);break;case 1:if(Dn(e,a),l&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(y){Me(a,a.return,y)}else{var u=Fs(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Me(a,a.return,y)}}l&64&&op(a),l&512&&Hi(a,a.return);break;case 3:if(Dn(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{Ih(e,n)}catch(y){Me(a,a.return,y)}}break;case 27:n===null&&l&4&&dp(a);case 26:case 5:Dn(e,a),n===null&&l&4&&cp(a),l&512&&Hi(a,a.return);break;case 12:Dn(e,a);break;case 31:Dn(e,a),l&4&&yp(e,a);break;case 13:Dn(e,a),l&4&&vp(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=dS.bind(null,a),CS(e,a))));break;case 22:if(l=a.memoizedState!==null||Cn,!l){n=n!==null&&n.memoizedState!==null||st,u=Cn;var f=st;Cn=l,(st=n)&&!f?kn(e,a,(a.subtreeFlags&8772)!==0):Dn(e,a),Cn=u,st=f}break;case 30:break;default:Dn(e,a)}}function pp(e){var n=e.alternate;n!==null&&(e.alternate=null,pp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Io(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 Qe=null,Ot=!1;function Mn(e,n,a){for(a=a.child;a!==null;)gp(e,n,a),a=a.sibling}function gp(e,n,a){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(di,a)}catch{}switch(a.tag){case 26:st||hn(a,n),Mn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:st||hn(a,n);var l=Qe,u=Ot;cs(a.type)&&(Qe=a.stateNode,Ot=!1),Mn(e,n,a),Ji(a.stateNode),Qe=l,Ot=u;break;case 5:st||hn(a,n);case 6:if(l=Qe,u=Ot,Qe=null,Mn(e,n,a),Qe=l,Ot=u,Qe!==null)if(Ot)try{(Qe.nodeType===9?Qe.body:Qe.nodeName==="HTML"?Qe.ownerDocument.body:Qe).removeChild(a.stateNode)}catch(f){Me(a,n,f)}else try{Qe.removeChild(a.stateNode)}catch(f){Me(a,n,f)}break;case 18:Qe!==null&&(Ot?(e=Qe,og(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ya(e)):og(Qe,a.stateNode));break;case 4:l=Qe,u=Ot,Qe=a.stateNode.containerInfo,Ot=!0,Mn(e,n,a),Qe=l,Ot=u;break;case 0:case 11:case 14:case 15:ss(2,a,n),st||ss(4,a,n),Mn(e,n,a);break;case 1:st||(hn(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&up(a,n,l)),Mn(e,n,a);break;case 21:Mn(e,n,a);break;case 22:st=(l=st)||a.memoizedState!==null,Mn(e,n,a),st=l;break;default:Mn(e,n,a)}}function yp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ya(e)}catch(a){Me(n,n.return,a)}}}function vp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ya(e)}catch(a){Me(n,n.return,a)}}function aS(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new hp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new hp),n;default:throw Error(r(435,e.tag))}}function yl(e,n){var a=aS(e);n.forEach(function(l){if(!a.has(l)){a.add(l);var u=hS.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(cs(_.type)){Qe=_.stateNode,Ot=!1;break e}break;case 5:Qe=_.stateNode,Ot=!1;break e;case 3:case 4:Qe=_.stateNode.containerInfo,Ot=!0;break e}_=_.return}if(Qe===null)throw Error(r(160));gp(f,y,u),Qe=null,Ot=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)bp(n,e),n=n.sibling}var an=null;function bp(e,n){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Et(n,e),Nt(e),l&4&&(ss(3,e,e.return),$i(3,e),ss(5,e,e.return));break;case 1:Et(n,e),Nt(e),l&512&&(st||a===null||hn(a,a.return)),l&64&&Cn&&(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=an;if(Et(n,e),Nt(e),l&512&&(st||a===null||hn(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[pi]||f[dt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(l),u.head.insertBefore(f,u.querySelector("head > title"))),gt(f,l,a),f[dt]=e,ot(f),l=f;break e;case"link":var y=bg("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),gt(f,l,a),u.head.appendChild(f);break;case"meta":if(y=bg("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),gt(f,l,a),u.head.appendChild(f);break;default:throw Error(r(468,l))}f[dt]=e,ot(f),l=f}e.stateNode=l}else xg(u,e.type,e.stateNode);else e.stateNode=vg(u,l,e.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?xg(u,e.type,e.stateNode):vg(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&bc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Et(n,e),Nt(e),l&512&&(st||a===null||hn(a,a.return)),a!==null&&l&4&&bc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Et(n,e),Nt(e),l&512&&(st||a===null||hn(a,a.return)),e.flags&32){u=e.stateNode;try{pa(u,"")}catch(ae){Me(e,e.return,ae)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,bc(e,u,a!==null?a.memoizedProps:u)),l&1024&&(_c=!0);break;case 6:if(Et(n,e),Nt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(ae){Me(e,e.return,ae)}}break;case 3:if(Ml=null,u=an,an=Al(n.containerInfo),Et(n,e),an=u,Nt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Ya(n.containerInfo)}catch(ae){Me(e,e.return,ae)}_c&&(_c=!1,xp(e));break;case 4:l=an,an=Al(e.stateNode.containerInfo),Et(n,e),Nt(e),an=l;break;case 12:Et(n,e),Nt(e);break;case 31:Et(n,e),Nt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yl(e,l)));break;case 13:Et(n,e),Nt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(bl=Mt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yl(e,l)));break;case 22:u=e.memoizedState!==null;var O=a!==null&&a.memoizedState!==null,D=Cn,H=st;if(Cn=D||u,st=H||O,Et(n,e),st=H,Cn=D,Nt(e),l&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(a===null||O||Cn||st||Vs(e)),a=null,n=e;;){if(n.tag===5||n.tag===26){if(a===null){O=a=n;try{if(f=O.stateNode,u)y=f.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{_=O.stateNode;var F=O.memoizedProps.style,k=F!=null&&F.hasOwnProperty("display")?F.display:null;_.style.display=k==null||typeof k=="boolean"?"":(""+k).trim()}}catch(ae){Me(O,O.return,ae)}}}else if(n.tag===6){if(a===null){O=n;try{O.stateNode.nodeValue=u?"":O.memoizedProps}catch(ae){Me(O,O.return,ae)}}}else if(n.tag===18){if(a===null){O=n;try{var B=O.stateNode;u?ug(B,!0):ug(O.stateNode,!1)}catch(ae){Me(O,O.return,ae)}}}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,yl(e,a))));break;case 19:Et(n,e),Nt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yl(e,l)));break;case 30:break;case 21:break;default:Et(n,e),Nt(e)}}function Nt(e){var n=e.flags;if(n&2){try{for(var a,l=e.return;l!==null;){if(fp(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,f=xc(e);gl(e,f,u);break;case 5:var y=a.stateNode;a.flags&32&&(pa(y,""),a.flags&=-33);var _=xc(e);gl(e,_,y);break;case 3:case 4:var O=a.stateNode.containerInfo,D=xc(e);Sc(e,D,O);break;default:throw Error(r(161))}}catch(H){Me(e,e.return,H)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function xp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;xp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Dn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)mp(e,n.alternate,n),n=n.sibling}function Vs(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ss(4,n,n.return),Vs(n);break;case 1:hn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&up(n,n.return,a),Vs(n);break;case 27:Ji(n.stateNode);case 26:case 5:hn(n,n.return),Vs(n);break;case 22:n.memoizedState===null&&Vs(n);break;case 30:Vs(n);break;default:Vs(n)}e=e.sibling}}function kn(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:kn(u,f,a),$i(4,f);break;case 1:if(kn(u,f,a),l=f,u=l.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(D){Me(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++)Jh(O[u],_)}catch(D){Me(l,l.return,D)}}a&&y&64&&op(f),Hi(f,f.return);break;case 27:dp(f);case 26:case 5:kn(u,f,a),a&&l===null&&y&4&&cp(f),Hi(f,f.return);break;case 12:kn(u,f,a);break;case 31:kn(u,f,a),a&&y&4&&yp(u,f);break;case 13:kn(u,f,a),a&&y&4&&vp(u,f);break;case 22:f.memoizedState===null&&kn(u,f,a),Hi(f,f.return);break;case 30:break;default:kn(u,f,a)}n=n.sibling}}function wc(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&&zi(a))}function jc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&zi(e))}function rn(e,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Sp(e,n,a,l),n=n.sibling}function Sp(e,n,a,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:rn(e,n,a,l),u&2048&&$i(9,n);break;case 1:rn(e,n,a,l);break;case 3:rn(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&&zi(e)));break;case 12:if(u&2048){rn(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(O){Me(n,n.return,O)}}else rn(e,n,a,l);break;case 31:rn(e,n,a,l);break;case 13:rn(e,n,a,l);break;case 23:break;case 22:f=n.stateNode,y=n.alternate,n.memoizedState!==null?f._visibility&2?rn(e,n,a,l):Qi(e,n):f._visibility&2?rn(e,n,a,l):(f._visibility|=2,ka(e,n,a,l,(n.subtreeFlags&10256)!==0||!1)),u&2048&&wc(y,n);break;case 24:rn(e,n,a,l),u&2048&&jc(n.alternate,n);break;default:rn(e,n,a,l)}}function ka(e,n,a,l,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var f=e,y=n,_=a,O=l,D=y.flags;switch(y.tag){case 0:case 11:case 15:ka(f,y,_,O,u),$i(8,y);break;case 23:break;case 22:var H=y.stateNode;y.memoizedState!==null?H._visibility&2?ka(f,y,_,O,u):Qi(f,y):(H._visibility|=2,ka(f,y,_,O,u)),u&&D&2048&&wc(y.alternate,y);break;case 24:ka(f,y,_,O,u),u&&D&2048&&jc(y.alternate,y);break;default:ka(f,y,_,O,u)}n=n.sibling}}function Qi(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:Qi(a,l),u&2048&&wc(l.alternate,l);break;case 24:Qi(a,l),u&2048&&jc(l.alternate,l);break;default:Qi(a,l)}n=n.sibling}}var Gi=8192;function La(e,n,a){if(e.subtreeFlags&Gi)for(e=e.child;e!==null;)_p(e,n,a),e=e.sibling}function _p(e,n,a){switch(e.tag){case 26:La(e,n,a),e.flags&Gi&&e.memoizedState!==null&&GS(a,an,e.memoizedState,e.memoizedProps);break;case 5:La(e,n,a);break;case 3:case 4:var l=an;an=Al(e.stateNode.containerInfo),La(e,n,a),an=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Gi,Gi=16777216,La(e,n,a),Gi=l):La(e,n,a));break;default:La(e,n,a)}}function wp(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 Ki(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];ut=l,Op(l,e)}wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jp(e),e=e.sibling}function jp(e){switch(e.tag){case 0:case 11:case 15:Ki(e),e.flags&2048&&ss(9,e,e.return);break;case 3:Ki(e);break;case 12:Ki(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,vl(e)):Ki(e);break;default:Ki(e)}}function vl(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];ut=l,Op(l,e)}wp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ss(8,n,n.return),vl(n);break;case 22:a=n.stateNode,a._visibility&2&&(a._visibility&=-3,vl(n));break;default:vl(n)}e=e.sibling}}function Op(e,n){for(;ut!==null;){var a=ut;switch(a.tag){case 0:case 11:case 15:ss(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:zi(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ut=l;else e:for(a=e;ut!==null;){l=ut;var u=l.sibling,f=l.return;if(pp(l),l===a){ut=null;break e}if(u!==null){u.return=f,ut=u;break e}ut=f}}}var iS={getCacheForType:function(e){var n=mt(et),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return mt(et).controller.signal}},rS=typeof WeakMap=="function"?WeakMap:Map,Te=0,Ue=null,Se=null,we=0,Ce=0,Bt=null,as=!1,Ua=!1,Oc=!1,Ln=0,Pe=0,is=0,Ps=0,Ec=0,$t=0,Za=0,Yi=null,zt=null,Nc=!1,bl=0,Ep=0,xl=1/0,Sl=null,rs=null,it=0,ls=null,qa=null,Un=0,zc=0,Tc=null,Np=null,Fi=0,Rc=null;function Ht(){return(Te&2)!==0&&we!==0?we&-we:U.T!==null?Lc():Qd()}function zp(){if($t===0)if((we&536870912)===0||Oe){var e=Tr;Tr<<=1,(Tr&3932160)===0&&(Tr=262144),$t=e}else $t=536870912;return e=Zt.current,e!==null&&(e.flags|=32),$t}function Tt(e,n,a){(e===Ue&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(Ba(e,0),os(e,we,$t,!1)),mi(e,a),((Te&2)===0||e!==Ue)&&(e===Ue&&((Te&2)===0&&(Ps|=a),Pe===4&&os(e,we,$t,!1)),mn(e))}function Tp(e,n,a){if((Te&6)!==0)throw Error(r(327));var l=!a&&(n&127)===0&&(n&e.expiredLanes)===0||hi(e,n),u=l?uS(e,n):Cc(e,n,!0),f=l;do{if(u===0){Ua&&!l&&os(e,n,0,!1);break}else{if(a=e.current.alternate,f&&!lS(a)){u=Cc(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=Yi;var O=_.current.memoizedState.isDehydrated;if(O&&(Ba(_,y).flags|=256),y=Cc(_,y,!1),y!==2){if(Oc&&!O){_.errorRecoveryDisabledLanes|=f,Ps|=f,u=4;break e}f=zt,zt=u,f!==null&&(zt===null?zt=f:zt.push.apply(zt,f))}u=y}if(f=!1,u!==2)continue}}if(u===1){Ba(e,0),os(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:os(l,n,$t,!as);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(u=bl+300-Mt(),10<u)){if(os(l,n,$t,!as),Ar(l,0,!0)!==0)break e;Un=n,l.timeoutHandle=rg(Rp.bind(null,l,a,zt,Sl,Nc,n,$t,Ps,Za,as,f,"Throttled",-0,0),u);break e}Rp(l,a,zt,Sl,Nc,n,$t,Ps,Za,as,f,null,-0,0)}}break}while(!0);mn(e)}function Rp(e,n,a,l,u,f,y,_,O,D,H,F,k,B){if(e.timeoutHandle=-1,F=n.subtreeFlags,F&8192||(F&16785408)===16785408){F={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},_p(n,f,F);var ae=(f&62914560)===f?bl-Mt():(f&4194048)===f?Ep-Mt():0;if(ae=KS(F,ae),ae!==null){Un=f,e.cancelPendingCommit=ae(Zp.bind(null,e,n,f,a,l,u,y,_,O,H,F,null,k,B)),os(e,f,y,!D);return}}Zp(e,n,f,a,l,u,y,_,O)}function lS(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(!Lt(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 os(e,n,a,l){n&=~Ec,n&=~Ps,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var u=n;0<u;){var f=31-kt(u),y=1<<f;l[f]=-1,u&=~y}a!==0&&Bd(e,a,n)}function _l(){return(Te&6)===0?(Vi(0),!1):!0}function Ac(){if(Se!==null){if(Ce===0)var e=Se.return;else e=Se,En=Bs=null,Fu(e),Ra=null,Ri=0,e=Se;for(;e!==null;)lp(e.alternate,e),e=e.return;Se=null}}function Ba(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,NS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Un=0,Ac(),Ue=e,Se=a=jn(e.current,null),we=n,Ce=0,Bt=null,as=!1,Ua=hi(e,n),Oc=!1,Za=$t=Ec=Ps=is=Pe=0,zt=Yi=null,Nc=!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-kt(l),f=1<<u;n|=e[u],l&=~f}return Ln=n,Qr(),a}function Ap(e,n){ve=null,U.H=Zi,n===Ta||n===Jr?(n=Fh(),Ce=3):n===ku?(n=Fh(),Ce=4):Ce=n===uc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Bt=n,Se===null&&(Pe=1,fl(e,Vt(n,e.current)))}function Cp(){var e=Zt.current;return e===null?!0:(we&4194048)===we?It===null:(we&62914560)===we||(we&536870912)!==0?e===It:!1}function Mp(){var e=U.H;return U.H=Zi,e===null?Zi:e}function Dp(){var e=U.A;return U.A=iS,e}function wl(){Pe=4,as||(we&4194048)!==we&&Zt.current!==null||(Ua=!0),(is&134217727)===0&&(Ps&134217727)===0||Ue===null||os(Ue,we,$t,!1)}function Cc(e,n,a){var l=Te;Te|=2;var u=Mp(),f=Dp();(Ue!==e||we!==n)&&(Sl=null,Ba(e,n)),n=!1;var y=Pe;e:do try{if(Ce!==0&&Se!==null){var _=Se,O=Bt;switch(Ce){case 8:Ac(),y=6;break e;case 3:case 2:case 9:case 6:Zt.current===null&&(n=!0);var D=Ce;if(Ce=0,Bt=null,$a(e,_,O,D),a&&Ua){y=0;break e}break;default:D=Ce,Ce=0,Bt=null,$a(e,_,O,D)}}oS(),y=Pe;break}catch(H){Ap(e,H)}while(!0);return n&&e.shellSuspendCounter++,En=Bs=null,Te=l,U.H=u,U.A=f,Se===null&&(Ue=null,we=0,Qr()),y}function oS(){for(;Se!==null;)kp(Se)}function uS(e,n){var a=Te;Te|=2;var l=Mp(),u=Dp();Ue!==e||we!==n?(Sl=null,xl=Mt()+500,Ba(e,n)):Ua=hi(e,n);e:do try{if(Ce!==0&&Se!==null){n=Se;var f=Bt;t:switch(Ce){case 1:Ce=0,Bt=null,$a(e,n,f,1);break;case 2:case 9:if(Kh(f)){Ce=0,Bt=null,Lp(n);break}n=function(){Ce!==2&&Ce!==9||Ue!==e||(Ce=7),mn(e)},f.then(n,n);break e;case 3:Ce=7;break e;case 4:Ce=5;break e;case 7:Kh(f)?(Ce=0,Bt=null,Lp(n)):(Ce=0,Bt=null,$a(e,n,f,7));break;case 5:var y=null;switch(Se.tag){case 26:y=Se.memoizedState;case 5:case 27:var _=Se;if(y?Sg(y):_.stateNode.complete){Ce=0,Bt=null;var O=_.sibling;if(O!==null)Se=O;else{var D=_.return;D!==null?(Se=D,jl(D)):Se=null}break t}}Ce=0,Bt=null,$a(e,n,f,5);break;case 6:Ce=0,Bt=null,$a(e,n,f,6);break;case 8:Ac(),Pe=6;break e;default:throw Error(r(462))}}cS();break}catch(H){Ap(e,H)}while(!0);return En=Bs=null,U.H=l,U.A=u,Te=a,Se!==null?0:(Ue=null,we=0,Qr(),Pe)}function cS(){for(;Se!==null&&!M0();)kp(Se)}function kp(e){var n=ip(e.alternate,e,Ln);e.memoizedProps=e.pendingProps,n===null?jl(e):Se=n}function Lp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Wm(a,n,n.pendingProps,n.type,void 0,we);break;case 11:n=Wm(a,n,n.pendingProps,n.type.render,n.ref,we);break;case 5:Fu(n);default:lp(a,n),n=Se=Dh(n,Ln),n=ip(a,n,Ln)}e.memoizedProps=e.pendingProps,n===null?jl(e):Se=n}function $a(e,n,a,l){En=Bs=null,Fu(n),Ra=null,Ri=0;var u=n.return;try{if(Ix(e,u,n,a,we)){Pe=1,fl(e,Vt(a,e.current)),Se=null;return}}catch(f){if(u!==null)throw Se=u,f;Pe=1,fl(e,Vt(a,e.current)),Se=null;return}n.flags&32768?(Oe||l===1?e=!0:Ua||(we&536870912)!==0?e=!1:(as=e=!0,(l===2||l===9||l===3||l===6)&&(l=Zt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Up(n,e)):jl(n)}function jl(e){var n=e;do{if((n.flags&32768)!==0){Up(n,as);return}e=n.return;var a=tS(n.alternate,n,Ln);if(a!==null){Se=a;return}if(n=n.sibling,n!==null){Se=n;return}Se=n=e}while(n!==null);Pe===0&&(Pe=5)}function Up(e,n){do{var a=nS(e.alternate,e);if(a!==null){a.flags&=32767,Se=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!n&&(e=e.sibling,e!==null)){Se=e;return}Se=e=a}while(e!==null);Pe=6,Se=null}function Zp(e,n,a,l,u,f,y,_,O){e.cancelPendingCommit=null;do Ol();while(it!==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|=xu,Q0(e,a,f,y,_,O),e===Ue&&(Se=Ue=null,we=0),qa=n,ls=e,Un=a,zc=f,Tc=u,Np=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,mS(Nr,function(){return Qp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=U.T,U.T=null,u=C.p,C.p=2,y=Te,Te|=4;try{sS(e,n,a)}finally{Te=y,C.p=u,U.T=l}}it=1,qp(),Bp(),$p()}}function qp(){if(it===1){it=0;var e=ls,n=qa,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=U.T,U.T=null;var l=C.p;C.p=2;var u=Te;Te|=4;try{bp(n,e);var f=Gc,y=Oh(e.containerInfo),_=f.focusedElem,O=f.selectionRange;if(y!==_&&_&&_.ownerDocument&&jh(_.ownerDocument.documentElement,_)){if(O!==null&&pu(_)){var D=O.start,H=O.end;if(H===void 0&&(H=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min(H,_.value.length);else{var F=_.ownerDocument||document,k=F&&F.defaultView||window;if(k.getSelection){var B=k.getSelection(),ae=_.textContent.length,de=Math.min(O.start,ae),Le=O.end===void 0?de:Math.min(O.end,ae);!B.extend&&de>Le&&(y=Le,Le=de,de=y);var R=wh(_,de),N=wh(_,Le);if(R&&N&&(B.rangeCount!==1||B.anchorNode!==R.node||B.anchorOffset!==R.offset||B.focusNode!==N.node||B.focusOffset!==N.offset)){var M=F.createRange();M.setStart(R.node,R.offset),B.removeAllRanges(),de>Le?(B.addRange(M),B.extend(N.node,N.offset)):(M.setEnd(N.node,N.offset),B.addRange(M))}}}}for(F=[],B=_;B=B.parentNode;)B.nodeType===1&&F.push({element:B,left:B.scrollLeft,top:B.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<F.length;_++){var K=F[_];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Ul=!!Qc,Gc=Qc=null}finally{Te=u,C.p=l,U.T=a}}e.current=n,it=2}}function Bp(){if(it===2){it=0;var e=ls,n=qa,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=U.T,U.T=null;var l=C.p;C.p=2;var u=Te;Te|=4;try{mp(e,n.alternate,n)}finally{Te=u,C.p=l,U.T=a}}it=3}}function $p(){if(it===4||it===3){it=0,D0();var e=ls,n=qa,a=Un,l=Np;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?it=5:(it=0,qa=ls=null,Hp(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(rs=null),Xo(a),n=n.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(di,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=U.T,u=C.p,C.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,C.p=u}}(Un&3)!==0&&Ol(),mn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Rc?Fi++:(Fi=0,Rc=e):Fi=0,Vi(0)}}function Hp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,zi(n)))}function Ol(){return qp(),Bp(),$p(),Qp()}function Qp(){if(it!==5)return!1;var e=ls,n=zc;zc=0;var a=Xo(Un),l=U.T,u=C.p;try{C.p=32>a?32:a,U.T=null,a=Tc,Tc=null;var f=ls,y=Un;if(it=0,qa=ls=null,Un=0,(Te&6)!==0)throw Error(r(331));var _=Te;if(Te|=4,jp(f.current),Sp(f,f.current,y,a),Te=_,Vi(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(di,f)}catch{}return!0}finally{C.p=u,U.T=l,Hp(e,n)}}function Gp(e,n,a){n=Vt(a,n),n=oc(e.stateNode,n,2),e=es(e,n,2),e!==null&&(mi(e,2),mn(e))}function Me(e,n,a){if(e.tag===3)Gp(e,e,a);else for(;n!==null;){if(n.tag===3){Gp(n,e,a);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(rs===null||!rs.has(l))){e=Vt(a,e),a=Km(2),l=es(n,a,2),l!==null&&(Ym(a,l,n,e),mi(l,2),mn(l));break}}n=n.return}}function Mc(e,n,a){var l=e.pingCache;if(l===null){l=e.pingCache=new rS;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)||(Oc=!0,u.add(a),e=fS.bind(null,e,n,a),n.then(e,e))}function fS(e,n,a){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Ue===e&&(we&a)===a&&(Pe===4||Pe===3&&(we&62914560)===we&&300>Mt()-bl?(Te&2)===0&&Ba(e,0):Ec|=a,Za===we&&(Za=0)),mn(e)}function Kp(e,n){n===0&&(n=qd()),e=Us(e,n),e!==null&&(mi(e,n),mn(e))}function dS(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Kp(e,a)}function hS(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),Kp(e,a)}function mS(e,n){return Yo(e,n)}var El=null,Ha=null,Dc=!1,Nl=!1,kc=!1,us=0;function mn(e){e!==Ha&&e.next===null&&(Ha===null?El=Ha=e:Ha=Ha.next=e),Nl=!0,Dc||(Dc=!0,gS())}function Vi(e,n){if(!kc&&Nl){kc=!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 y=l.suspendedLanes,_=l.pingedLanes;f=(1<<31-kt(42|e)+1)-1,f&=u&~(y&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Pp(l,f))}else f=we,f=Ar(l,l===Ue?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||hi(l,f)||(a=!0,Pp(l,f));l=l.next}while(a);kc=!1}}function pS(){Yp()}function Yp(){Nl=Dc=!1;var e=0;us!==0&&ES()&&(e=us);for(var n=Mt(),a=null,l=El;l!==null;){var u=l.next,f=Fp(l,n);f===0?(l.next=null,a===null?El=u:a.next=u,u===null&&(Ha=a)):(a=l,(e!==0||(f&3)!==0)&&(Nl=!0)),l=u}it!==0&&it!==5||Vi(e),us!==0&&(us=0)}function Fp(e,n){for(var a=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-kt(f),_=1<<y,O=u[y];O===-1?((_&a)===0||(_&l)!==0)&&(u[y]=H0(_,n)):O<=n&&(e.expiredLanes|=_),f&=~_}if(n=Ue,a=we,a=Ar(e,e===n?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===n&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Fo(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||hi(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(l!==null&&Fo(l),Xo(a)){case 2:case 8:a=Ud;break;case 32:a=Nr;break;case 268435456:a=Zd;break;default:a=Nr}return l=Vp.bind(null,e),a=Yo(a,l),e.callbackPriority=n,e.callbackNode=a,n}return l!==null&&l!==null&&Fo(l),e.callbackPriority=2,e.callbackNode=null,2}function Vp(e,n){if(it!==0&&it!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ol()&&e.callbackNode!==a)return null;var l=we;return l=Ar(e,e===Ue?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Tp(e,l,n),Fp(e,Mt()),e.callbackNode!=null&&e.callbackNode===a?Vp.bind(null,e):null)}function Pp(e,n){if(Ol())return null;Tp(e,n,!0)}function gS(){zS(function(){(Te&6)!==0?Yo(Ld,pS):Yp()})}function Lc(){if(us===0){var e=Na;e===0&&(e=zr,zr<<=1,(zr&261888)===0&&(zr=256)),us=e}return us}function Xp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:kr(""+e)}function Jp(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 yS(e,n,a,l,u){if(n==="submit"&&a&&a.stateNode===u){var f=Xp((u[wt]||null).action),y=l.submitter;y&&(n=(n=y[wt]||null)?Xp(n.formAction):y.getAttribute("formAction"),n!==null&&(f=n,y=null));var _=new qr("action","action",null,l,u);e.push({event:_,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(us!==0){var O=y?Jp(u,y):new FormData(u);nc(a,{pending:!0,data:O,method:u.method,action:f},null,O)}}else typeof f=="function"&&(_.preventDefault(),O=y?Jp(u,y):new FormData(u),nc(a,{pending:!0,data:O,method:u.method,action:f},f,O))},currentTarget:u}]})}}for(var Uc=0;Uc<bu.length;Uc++){var Zc=bu[Uc],vS=Zc.toLowerCase(),bS=Zc[0].toUpperCase()+Zc.slice(1);sn(vS,"on"+bS)}sn(zh,"onAnimationEnd"),sn(Th,"onAnimationIteration"),sn(Rh,"onAnimationStart"),sn("dblclick","onDoubleClick"),sn("focusin","onFocus"),sn("focusout","onBlur"),sn(kx,"onTransitionRun"),sn(Lx,"onTransitionStart"),sn(Ux,"onTransitionCancel"),sn(Ah,"onTransitionEnd"),ha("onMouseEnter",["mouseout","mouseover"]),ha("onMouseLeave",["mouseout","mouseover"]),ha("onPointerEnter",["pointerout","pointerover"]),ha("onPointerLeave",["pointerout","pointerover"]),Ms("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ms("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ms("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ms("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ms("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ms("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pi="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(" "),xS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Pi));function Ip(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],O=_.instance,D=_.currentTarget;if(_=_.listener,O!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch(H){Hr(H)}u.currentTarget=null,f=O}else for(y=0;y<l.length;y++){if(_=l[y],O=_.instance,D=_.currentTarget,_=_.listener,O!==f&&u.isPropagationStopped())break e;f=_,u.currentTarget=D;try{f(u)}catch(H){Hr(H)}u.currentTarget=null,f=O}}}}function _e(e,n){var a=n[Jo];a===void 0&&(a=n[Jo]=new Set);var l=e+"__bubble";a.has(l)||(Wp(n,e,2,!1),a.add(l))}function qc(e,n,a){var l=0;n&&(l|=4),Wp(a,e,l,n)}var zl="_reactListening"+Math.random().toString(36).slice(2);function Bc(e){if(!e[zl]){e[zl]=!0,Yd.forEach(function(a){a!=="selectionchange"&&(xS.has(a)||qc(a,!1,e),qc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[zl]||(n[zl]=!0,qc("selectionchange",!1,n))}}function Wp(e,n,a,l){switch(zg(n)){case 2:var u=VS;break;case 8:u=PS;break;default:u=tf}a=u.bind(null,n,a,e),u=void 0,!ru||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 $c(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 O=y.tag;if((O===3||O===4)&&y.stateNode.containerInfo===u)return;y=y.return}for(;_!==null;){if(y=ca(_),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){l=f=y;continue e}_=_.parentNode}}l=l.return}ah(function(){var D=f,H=au(a),F=[];e:{var k=Ch.get(e);if(k!==void 0){var B=qr,ae=e;switch(e){case"keypress":if(Ur(a)===0)break e;case"keydown":case"keyup":B=hx;break;case"focusin":ae="focus",B=cu;break;case"focusout":ae="blur",B=cu;break;case"beforeblur":case"afterblur":B=cu;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":B=lh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":B=tx;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":B=gx;break;case zh:case Th:case Rh:B=ax;break;case Ah:B=vx;break;case"scroll":case"scrollend":B=W0;break;case"wheel":B=xx;break;case"copy":case"cut":case"paste":B=rx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":B=uh;break;case"toggle":case"beforetoggle":B=_x}var de=(n&4)!==0,Le=!de&&(e==="scroll"||e==="scrollend"),R=de?k!==null?k+"Capture":null:k;de=[];for(var N=D,M;N!==null;){var K=N;if(M=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||M===null||R===null||(K=yi(N,R),K!=null&&de.push(Xi(N,K,M))),Le)break;N=N.return}0<de.length&&(k=new B(k,ae,null,a,H),F.push({event:k,listeners:de}))}}if((n&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",B=e==="mouseout"||e==="pointerout",k&&a!==su&&(ae=a.relatedTarget||a.fromElement)&&(ca(ae)||ae[ua]))break e;if((B||k)&&(k=H.window===H?H:(k=H.ownerDocument)?k.defaultView||k.parentWindow:window,B?(ae=a.relatedTarget||a.toElement,B=D,ae=ae?ca(ae):null,ae!==null&&(Le=c(ae),de=ae.tag,ae!==Le||de!==5&&de!==27&&de!==6)&&(ae=null)):(B=null,ae=D),B!==ae)){if(de=lh,K="onMouseLeave",R="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(de=uh,K="onPointerLeave",R="onPointerEnter",N="pointer"),Le=B==null?k:gi(B),M=ae==null?k:gi(ae),k=new de(K,N+"leave",B,a,H),k.target=Le,k.relatedTarget=M,K=null,ca(H)===D&&(de=new de(R,N+"enter",ae,a,H),de.target=M,de.relatedTarget=Le,K=de),Le=K,B&&ae)t:{for(de=SS,R=B,N=ae,M=0,K=R;K;K=de(K))M++;K=0;for(var ce=N;ce;ce=de(ce))K++;for(;0<M-K;)R=de(R),M--;for(;0<K-M;)N=de(N),K--;for(;M--;){if(R===N||N!==null&&R===N.alternate){de=R;break t}R=de(R),N=de(N)}de=null}else de=null;B!==null&&eg(F,k,B,de,!1),ae!==null&&Le!==null&&eg(F,Le,ae,de,!0)}}e:{if(k=D?gi(D):window,B=k.nodeName&&k.nodeName.toLowerCase(),B==="select"||B==="input"&&k.type==="file")var Ne=yh;else if(ph(k))if(vh)Ne=Cx;else{Ne=Rx;var le=Tx}else B=k.nodeName,!B||B.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&nu(D.elementType)&&(Ne=yh):Ne=Ax;if(Ne&&(Ne=Ne(e,D))){gh(F,Ne,a,H);break e}le&&le(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&tu(k,"number",k.value)}switch(le=D?gi(D):window,e){case"focusin":(ph(le)||le.contentEditable==="true")&&(ba=le,gu=D,Oi=null);break;case"focusout":Oi=gu=ba=null;break;case"mousedown":yu=!0;break;case"contextmenu":case"mouseup":case"dragend":yu=!1,Eh(F,a,H);break;case"selectionchange":if(Dx)break;case"keydown":case"keyup":Eh(F,a,H)}var be;if(du)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else va?hh(e,a)&&(je="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(je="onCompositionStart");je&&(ch&&a.locale!=="ko"&&(va||je!=="onCompositionStart"?je==="onCompositionEnd"&&va&&(be=ih()):(Fn=H,lu="value"in Fn?Fn.value:Fn.textContent,va=!0)),le=Tl(D,je),0<le.length&&(je=new oh(je,e,null,a,H),F.push({event:je,listeners:le}),be?je.data=be:(be=mh(a),be!==null&&(je.data=be)))),(be=jx?Ox(e,a):Ex(e,a))&&(je=Tl(D,"onBeforeInput"),0<je.length&&(le=new oh("onBeforeInput","beforeinput",null,a,H),F.push({event:le,listeners:je}),le.data=be)),yS(F,e,D,a,H)}Ip(F,n)})}function Xi(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Tl(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=yi(e,a),u!=null&&l.unshift(Xi(e,u,f)),u=yi(e,n),u!=null&&l.push(Xi(e,u,f))),e.tag===3)return l;e=e.return}return[]}function SS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function eg(e,n,a,l,u){for(var f=n._reactName,y=[];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=yi(a,f),D!=null&&y.unshift(Xi(a,D,O))):u||(D=yi(a,f),D!=null&&y.push(Xi(a,D,O)))),a=a.return}y.length!==0&&e.push({event:n,listeners:y})}var _S=/\r\n?/g,wS=/\u0000|\uFFFD/g;function tg(e){return(typeof e=="string"?e:""+e).replace(_S,`
|
|
9
|
-
`).replace(wS,"")}function ng(e,n){return n=tg(n),tg(e)===n}function ke(e,n,a,l,u,f){switch(a){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||pa(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&pa(e,""+l);break;case"className":Mr(e,"class",l);break;case"tabIndex":Mr(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Mr(e,a,l);break;case"style":nh(e,l,f);break;case"data":if(n!=="object"){Mr(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=kr(""+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"&&ke(e,n,"name",u.name,u,null),ke(e,n,"formEncType",u.formEncType,u,null),ke(e,n,"formMethod",u.formMethod,u,null),ke(e,n,"formTarget",u.formTarget,u,null)):(ke(e,n,"encType",u.encType,u,null),ke(e,n,"method",u.method,u,null),ke(e,n,"target",u.target,u,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=kr(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=_n);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("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=kr(""+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":_e("beforetoggle",e),_e("toggle",e),Cr(e,"popover",l);break;case"xlinkActuate":Sn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Sn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Sn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Sn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Sn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Sn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Sn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Cr(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=J0.get(a)||a,Cr(e,a,l))}}function Hc(e,n,a,l,u,f){switch(a){case"style":nh(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"?pa(e,l):(typeof l=="number"||typeof l=="bigint")&&pa(e,""+l);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"onClick":l!=null&&(e.onclick=_n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Fd.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[wt]||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,""):Cr(e,a,l)}}}function gt(e,n,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("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:ke(e,n,f,y,a,null)}}u&&ke(e,n,"srcSet",a.srcSet,a,null),l&&ke(e,n,"src",a.src,a,null);return;case"input":_e("invalid",e);var _=f=y=u=null,O=null,D=null;for(l in a)if(a.hasOwnProperty(l)){var H=a[l];if(H!=null)switch(l){case"name":u=H;break;case"type":y=H;break;case"checked":O=H;break;case"defaultChecked":D=H;break;case"value":f=H;break;case"defaultValue":_=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,n));break;default:ke(e,n,l,H,a,null)}}Id(e,f,_,O,D,y,u,!1);return;case"select":_e("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:ke(e,n,u,_,a,null)}n=f,a=y,e.multiple=!!l,n!=null?ma(e,!!l,n,!1):a!=null&&ma(e,!!l,a,!0);return;case"textarea":_e("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:ke(e,n,y,_,a,null)}eh(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":ke(e,n,O,l,a,null));return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(l=0;l<Pi.length;l++)_e(Pi[l],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("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:ke(e,n,D,l,a,null)}return;default:if(nu(n)){for(H in a)a.hasOwnProperty(H)&&(l=a[H],l!==void 0&&Hc(e,n,H,l,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(l=a[_],l!=null&&ke(e,n,_,l,a,null))}function jS(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,O=null,D=null,H=null;for(B in a){var F=a[B];if(a.hasOwnProperty(B)&&F!=null)switch(B){case"checked":break;case"value":break;case"defaultValue":O=F;default:l.hasOwnProperty(B)||ke(e,n,B,null,l,F)}}for(var k in l){var B=l[k];if(F=a[k],l.hasOwnProperty(k)&&(B!=null||F!=null))switch(k){case"type":f=B;break;case"name":u=B;break;case"checked":D=B;break;case"defaultChecked":H=B;break;case"value":y=B;break;case"defaultValue":_=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(r(137,n));break;default:B!==F&&ke(e,n,k,B,l,F)}}eu(e,y,_,O,D,H,f,u);return;case"select":B=y=_=k=null;for(f in a)if(O=a[f],a.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":B=O;default:l.hasOwnProperty(f)||ke(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":y=f;default:f!==O&&ke(e,n,u,f,l,O)}n=_,a=y,l=B,k!=null?ma(e,!!a,k,!1):!!l!=!!a&&(n!=null?ma(e,!!a,n,!0):ma(e,!!a,a?[]:"",!1));return;case"textarea":B=k=null;for(_ in a)if(u=a[_],a.hasOwnProperty(_)&&u!=null&&!l.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:ke(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":B=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(r(91));break;default:u!==f&&ke(e,n,y,u,l,f)}Wd(e,k,B);return;case"option":for(var ae in a)k=a[ae],a.hasOwnProperty(ae)&&k!=null&&!l.hasOwnProperty(ae)&&(ae==="selected"?e.selected=!1:ke(e,n,ae,null,l,k));for(O in l)k=l[O],B=a[O],l.hasOwnProperty(O)&&k!==B&&(k!=null||B!=null)&&(O==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":ke(e,n,O,k,l,B));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 de in a)k=a[de],a.hasOwnProperty(de)&&k!=null&&!l.hasOwnProperty(de)&&ke(e,n,de,null,l,k);for(D in l)if(k=l[D],B=a[D],l.hasOwnProperty(D)&&k!==B&&(k!=null||B!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,n));break;default:ke(e,n,D,k,l,B)}return;default:if(nu(n)){for(var Le in a)k=a[Le],a.hasOwnProperty(Le)&&k!==void 0&&!l.hasOwnProperty(Le)&&Hc(e,n,Le,void 0,l,k);for(H in l)k=l[H],B=a[H],!l.hasOwnProperty(H)||k===B||k===void 0&&B===void 0||Hc(e,n,H,k,l,B);return}}for(var R in a)k=a[R],a.hasOwnProperty(R)&&k!=null&&!l.hasOwnProperty(R)&&ke(e,n,R,null,l,k);for(F in l)k=l[F],B=a[F],!l.hasOwnProperty(F)||k===B||k==null&&B==null||ke(e,n,F,k,l,B)}function sg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OS(){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&&_&&sg(y)){for(y=0,_=u.responseEnd,l+=1;l<a.length;l++){var O=a[l],D=O.startTime;if(D>_)break;var H=O.transferSize,F=O.initiatorType;H&&sg(F)&&(O=O.responseEnd,y+=H*(O<_?1:(_-D)/(O-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 Qc=null,Gc=null;function Rl(e){return e.nodeType===9?e:e.ownerDocument}function ag(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 ig(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 Kc(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 Yc=null;function ES(){var e=window.event;return e&&e.type==="popstate"?e===Yc?!1:(Yc=e,!0):(Yc=null,!1)}var rg=typeof setTimeout=="function"?setTimeout:void 0,NS=typeof clearTimeout=="function"?clearTimeout:void 0,lg=typeof Promise=="function"?Promise:void 0,zS=typeof queueMicrotask=="function"?queueMicrotask:typeof lg<"u"?function(e){return lg.resolve(null).then(e).catch(TS)}:rg;function TS(e){setTimeout(function(){throw e})}function cs(e){return e==="head"}function og(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),Ya(n);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Ji(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Ji(a);for(var f=a.firstChild;f;){var y=f.nextSibling,_=f.nodeName;f[pi]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=y}}else a==="body"&&Ji(e.ownerDocument.body);a=u}while(a);Ya(n)}function ug(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 Fc(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":Fc(a),Io(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function RS(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[pi])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=Wt(e.nextSibling),e===null)break}return null}function AS(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Wt(e.nextSibling),e===null))return null;return e}function cg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Wt(e.nextSibling),e===null))return null;return e}function Vc(e){return e.data==="$?"||e.data==="$~"}function Pc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function CS(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 Wt(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 Xc=null;function fg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return Wt(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function dg(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 hg(e,n,a){switch(n=Rl(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 Ji(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Io(e)}var en=new Map,mg=new Set;function Al(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zn=C.d;C.d={f:MS,r:DS,D:kS,C:LS,L:US,m:ZS,X:BS,S:qS,M:$S};function MS(){var e=Zn.f(),n=_l();return e||n}function DS(e){var n=fa(e);n!==null&&n.tag===5&&n.type==="form"?Am(n):Zn.r(e)}var Qa=typeof document>"u"?null:document;function pg(e,n,a){var l=Qa;if(l&&typeof n=="string"&&n){var u=Yt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),mg.has(u)||(mg.add(u),e={rel:e,crossOrigin:a,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),gt(n,"link",e),ot(n),l.head.appendChild(n)))}}function kS(e){Zn.D(e),pg("dns-prefetch",e,null)}function LS(e,n){Zn.C(e,n),pg("preconnect",e,n)}function US(e,n,a){Zn.L(e,n,a);var l=Qa;if(l&&e&&n){var u='link[rel="preload"][as="'+Yt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Yt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Yt(a.imageSizes)+'"]')):u+='[href="'+Yt(e)+'"]';var f=u;switch(n){case"style":f=Ga(e);break;case"script":f=Ka(e)}en.has(f)||(e=v({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),en.set(f,e),l.querySelector(u)!==null||n==="style"&&l.querySelector(Ii(f))||n==="script"&&l.querySelector(Wi(f))||(n=l.createElement("link"),gt(n,"link",e),ot(n),l.head.appendChild(n)))}}function ZS(e,n){Zn.m(e,n);var a=Qa;if(a&&e){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Yt(l)+'"][href="'+Yt(e)+'"]',f=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ka(e)}if(!en.has(f)&&(e=v({rel:"modulepreload",href:e},n),en.set(f,e),a.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Wi(f)))return}l=a.createElement("link"),gt(l,"link",e),ot(l),a.head.appendChild(l)}}}function qS(e,n,a){Zn.S(e,n,a);var l=Qa;if(l&&e){var u=da(l).hoistableStyles,f=Ga(e);n=n||"default";var y=u.get(f);if(!y){var _={loading:0,preload:null};if(y=l.querySelector(Ii(f)))_.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},a),(a=en.get(f))&&Jc(e,a);var O=y=l.createElement("link");ot(O),gt(O,"link",e),O._p=new Promise(function(D,H){O.onload=D,O.onerror=H}),O.addEventListener("load",function(){_.loading|=1}),O.addEventListener("error",function(){_.loading|=2}),_.loading|=4,Cl(y,n,l)}y={type:"stylesheet",instance:y,count:1,state:_},u.set(f,y)}}}function BS(e,n){Zn.X(e,n);var a=Qa;if(a&&e){var l=da(a).hoistableScripts,u=Ka(e),f=l.get(u);f||(f=a.querySelector(Wi(u)),f||(e=v({src:e,async:!0},n),(n=en.get(u))&&Ic(e,n),f=a.createElement("script"),ot(f),gt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function $S(e,n){Zn.M(e,n);var a=Qa;if(a&&e){var l=da(a).hoistableScripts,u=Ka(e),f=l.get(u);f||(f=a.querySelector(Wi(u)),f||(e=v({src:e,async:!0,type:"module"},n),(n=en.get(u))&&Ic(e,n),f=a.createElement("script"),ot(f),gt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function gg(e,n,a,l){var u=(u=xe.current)?Al(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=Ga(a.href),a=da(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=Ga(a.href);var f=da(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(Ii(e)))&&!f._p&&(y.instance=f,y.state.loading=5),en.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},en.set(e,a),f||HS(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=Ka(a),a=da(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 Ga(e){return'href="'+Yt(e)+'"'}function Ii(e){return'link[rel="stylesheet"]['+e+"]"}function yg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function HS(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}),gt(n,"link",a),ot(n),e.head.appendChild(n))}function Ka(e){return'[src="'+Yt(e)+'"]'}function Wi(e){return"script[async]"+e}function vg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Yt(a.href)+'"]');if(l)return n.instance=l,ot(l),l;var u=v({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),ot(l),gt(l,"style",u),Cl(l,a.precedence,e),n.instance=l;case"stylesheet":u=Ga(a.href);var f=e.querySelector(Ii(u));if(f)return n.state.loading|=4,n.instance=f,ot(f),f;l=yg(a),(u=en.get(u))&&Jc(l,u),f=(e.ownerDocument||e).createElement("link"),ot(f);var y=f;return y._p=new Promise(function(_,O){y.onload=_,y.onerror=O}),gt(f,"link",l),n.state.loading|=4,Cl(f,a.precedence,e),n.instance=f;case"script":return f=Ka(a.src),(u=e.querySelector(Wi(f)))?(n.instance=u,ot(u),u):(l=a,(u=en.get(f))&&(l=v({},a),Ic(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),ot(u),gt(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,Cl(l,a.precedence,e));return n.instance}function Cl(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 Jc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Ic(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var Ml=null;function bg(e,n,a){if(Ml===null){var l=new Map,u=Ml=new Map;u.set(a,l)}else u=Ml,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[pi]||f[dt]||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 xg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function QS(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 Sg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function GS(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=Ga(l.href),f=n.querySelector(Ii(u));if(f){n=f._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=Dl.bind(e),n.then(e,e)),a.state.loading|=4,a.instance=f,ot(f);return}f=n.ownerDocument||n,l=yg(l),(u=en.get(u))&&Jc(l,u),f=f.createElement("link"),ot(f);var y=f;y._p=new Promise(function(_,O){y.onload=_,y.onerror=O}),gt(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=Dl.bind(e),n.addEventListener("load",a),n.addEventListener("error",a))}}var Wc=0;function KS(e,n){return e.stylesheets&&e.count===0&&Ll(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ll(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+n);0<e.imgBytes&&Wc===0&&(Wc=62500*OS());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ll(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Wc?50:800)+n);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(u)}}:null}function Dl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ll(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var kl=null;function Ll(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kl=new Map,n.forEach(YS,e),kl=null,Dl.call(e))}function YS(e,n){if(!(n.state.loading&4)){var a=kl.get(e);if(a)var l=a.get(null);else{a=new Map,kl.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=Dl.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 er={$$typeof:G,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function FS(e,n,a,l,u,f,y,_,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=Vo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Vo(0),this.hiddenUpdates=Vo(null),this.identifierPrefix=l,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=O,this.incompleteTransitions=new Map}function _g(e,n,a,l,u,f,y,_,O,D,H,F){return e=new FS(e,n,a,y,O,D,H,F,_),n=1,f===!0&&(n|=24),f=Ut(3,null,null,n),e.current=f,f.stateNode=e,n=Cu(),n.refCount++,e.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:n},Lu(f),e}function wg(e){return e?(e=_a,e):_a}function jg(e,n,a,l,u,f){u=wg(u),l.context===null?l.context=u:l.pendingContext=u,l=Wn(n),l.payload={element:a},f=f===void 0?null:f,f!==null&&(l.callback=f),a=es(e,l,n),a!==null&&(Tt(a,e,n),Ci(a,e,n))}function Og(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function ef(e,n){Og(e,n),(e=e.alternate)&&Og(e,n)}function Eg(e){if(e.tag===13||e.tag===31){var n=Us(e,67108864);n!==null&&Tt(n,e,67108864),ef(e,67108864)}}function Ng(e){if(e.tag===13||e.tag===31){var n=Ht();n=Po(n);var a=Us(e,n);a!==null&&Tt(a,e,n),ef(e,n)}}var Ul=!0;function VS(e,n,a,l){var u=U.T;U.T=null;var f=C.p;try{C.p=2,tf(e,n,a,l)}finally{C.p=f,U.T=u}}function PS(e,n,a,l){var u=U.T;U.T=null;var f=C.p;try{C.p=8,tf(e,n,a,l)}finally{C.p=f,U.T=u}}function tf(e,n,a,l){if(Ul){var u=nf(l);if(u===null)$c(e,n,l,Zl,a),Tg(e,l);else if(JS(u,e,n,a,l))l.stopPropagation();else if(Tg(e,l),n&4&&-1<XS.indexOf(e)){for(;u!==null;){var f=fa(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=Cs(f.pendingLanes);if(y!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;y;){var O=1<<31-kt(y);_.entanglements[1]|=O,y&=~O}mn(f),(Te&6)===0&&(xl=Mt()+500,Vi(0))}}break;case 31:case 13:_=Us(f,2),_!==null&&Tt(_,f,2),_l(),ef(f,2)}if(f=nf(l),f===null&&$c(e,n,l,Zl,a),f===u)break;u=f}u!==null&&l.stopPropagation()}else $c(e,n,l,null,a)}}function nf(e){return e=au(e),sf(e)}var Zl=null;function sf(e){if(Zl=null,e=ca(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 Zl=e,null}function zg(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(k0()){case Ld:return 2;case Ud:return 8;case Nr:case L0:return 32;case Zd:return 268435456;default:return 32}default:return 32}}var af=!1,fs=null,ds=null,hs=null,tr=new Map,nr=new Map,ms=[],XS="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 Tg(e,n){switch(e){case"focusin":case"focusout":fs=null;break;case"dragenter":case"dragleave":ds=null;break;case"mouseover":case"mouseout":hs=null;break;case"pointerover":case"pointerout":tr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":nr.delete(n.pointerId)}}function sr(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=fa(n),n!==null&&Eg(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function JS(e,n,a,l,u){switch(n){case"focusin":return fs=sr(fs,e,n,a,l,u),!0;case"dragenter":return ds=sr(ds,e,n,a,l,u),!0;case"mouseover":return hs=sr(hs,e,n,a,l,u),!0;case"pointerover":var f=u.pointerId;return tr.set(f,sr(tr.get(f)||null,e,n,a,l,u)),!0;case"gotpointercapture":return f=u.pointerId,nr.set(f,sr(nr.get(f)||null,e,n,a,l,u)),!0}return!1}function Rg(e){var n=ca(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,Gd(e.priority,function(){Ng(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,Gd(e.priority,function(){Ng(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 ql(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var a=nf(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);su=l,a.target.dispatchEvent(l),su=null}else return n=fa(a),n!==null&&Eg(n),e.blockedOn=a,!1;n.shift()}return!0}function Ag(e,n,a){ql(e)&&a.delete(n)}function IS(){af=!1,fs!==null&&ql(fs)&&(fs=null),ds!==null&&ql(ds)&&(ds=null),hs!==null&&ql(hs)&&(hs=null),tr.forEach(Ag),nr.forEach(Ag)}function Bl(e,n){e.blockedOn===n&&(e.blockedOn=null,af||(af=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,IS)))}var $l=null;function Cg(e){$l!==e&&($l=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){$l===e&&($l=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(sf(l||a)===null)continue;break}var f=fa(a);f!==null&&(e.splice(n,3),n-=3,nc(f,{pending:!0,data:u,method:a.method,action:l},l,u))}}))}function Ya(e){function n(O){return Bl(O,e)}fs!==null&&Bl(fs,e),ds!==null&&Bl(ds,e),hs!==null&&Bl(hs,e),tr.forEach(n),nr.forEach(n);for(var a=0;a<ms.length;a++){var l=ms[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<ms.length&&(a=ms[0],a.blockedOn===null);)Rg(a),a.blockedOn===null&&ms.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[wt]||null;if(typeof f=="function")y||Cg(a);else if(y){var _=null;if(f&&f.hasAttribute("formAction")){if(u=f,y=f[wt]||null)_=y.formAction;else if(sf(u)!==null)continue}else _=y.action;typeof _=="function"?a[l+1]=_:(a.splice(l,3),l-=3),Cg(a)}}}function Mg(){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 rf(e){this._internalRoot=e}Hl.prototype.render=rf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,l=Ht();jg(a,l,e,n,null,null)},Hl.prototype.unmount=rf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;jg(e.current,2,null,e,null,null),_l(),n[ua]=null}};function Hl(e){this._internalRoot=e}Hl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Qd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<ms.length&&n!==0&&n<ms[a].priority;a++);ms.splice(a,0,e),a===0&&Rg(e)}};var Dg=s.version;if(Dg!=="19.2.8")throw Error(r(527,Dg,"19.2.8"));C.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=m(n),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var WS={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{di=Ql.inject(WS),Dt=Ql}catch{}}return ir.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,l="",u=$m,f=Hm,y=Qm;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=_g(e,1,!1,null,null,a,l,null,u,f,y,Mg),e[ua]=n.current,Bc(e),new rf(n)},ir.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var l=!1,u="",f=$m,y=Hm,_=Qm,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&&(y=a.onCaughtError),a.onRecoverableError!==void 0&&(_=a.onRecoverableError),a.formState!==void 0&&(O=a.formState)),n=_g(e,1,!0,n,a??null,l,u,O,f,y,_,Mg),n.context=wg(null),a=n.current,l=Ht(),l=Po(l),u=Wn(l),u.callback=null,es(a,u,l),a=l,n.current.lanes=a,mi(n,a),mn(n),e[ua]=n.current,Bc(e),new Hl(n)},ir.version="19.2.8",ir}var Gg;function u_(){if(Gg)return uf.exports;Gg=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(s){console.error(s)}}return t(),uf.exports=o_(),uf.exports}var c_=u_();const Ev=ee.createContext(void 0),sa=t=>{const s=ee.useContext(Ev);if(!s)throw new Error("No QueryClient set, use QueryClientProvider to set one");return s},f_=({client:t,children:s})=>(ee.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx(Ev.Provider,{value:t,children:s})),d_={setTimeout:(t,s)=>setTimeout(t,s),clearTimeout:t=>clearTimeout(t),setInterval:(t,s)=>setInterval(t,s),clearInterval:t=>clearInterval(t)};var h_=class{#e=d_;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,s){return this.#e.setTimeout(t,s)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,s){return this.#e.setInterval(t,s)}clearInterval(t){this.#e.clearInterval(t)}};const Xs=new h_;function m_(t){setTimeout(t,0)}const p_=typeof window>"u"||"Deno"in globalThis;function St(){}function g_(t,s){return typeof t=="function"?t(s):t}function Mf(t){return typeof t=="number"&&t>=0&&t!==1/0}function Nv(t,s){return Math.max(t+(s||0)-Date.now(),0)}function $n(t,s){return typeof t=="function"?t(s):t}function Qt(t,s){return typeof t=="function"?t(s):t}function Kg(t,s){const{type:i="all",exact:r,fetchStatus:o,predicate:c,queryKey:d,stale:h}=t;if(d){if(r){if(s.queryHash!==sd(d,s.options))return!1}else if(!ti(s.queryKey,d))return!1}if(i!=="all"){const p=s.isActive();if(i==="active"&&!p||i==="inactive"&&p)return!1}return!(typeof h=="boolean"&&s.isStale()!==h||o&&o!==s.state.fetchStatus||c&&!c(s))}function Yg(t,s){const{exact:i,status:r,predicate:o,mutationKey:c}=t;if(c){if(!s.options.mutationKey)return!1;if(i){if(ea(s.options.mutationKey)!==ea(c))return!1}else if(!ti(s.options.mutationKey,c))return!1}return!(r&&s.state.status!==r||o&&!o(s))}function sd(t,s){return(s?.queryKeyHashFn||ea)(t)}function ea(t){return JSON.stringify(t,(s,i)=>Df(i)?Object.keys(i).sort().reduce((r,o)=>(r[o]=i[o],r),{}):i)}function ti(t,s){if(t===s)return!0;if(typeof t!=typeof s)return!1;if(t&&s&&typeof t=="object"&&typeof s=="object"){if(Array.isArray(t)&&Array.isArray(s)){for(let r=0;r<s.length;r++)if(!ti(t[r],s[r]))return!1;return!0}const i=Object.keys(s);for(const r of i)if(!ti(t[r],s[r]))return!1;return!0}return!1}const y_=Object.prototype.hasOwnProperty;function zv(t,s,i=0){if(t===s)return t;if(i>500)return s;const r=Fg(t)&&Fg(s);if(!r&&!(Df(t)&&Df(s)))return s;const o=(r?t:Object.keys(t)).length,c=r?s:Object.keys(s),d=c.length,h=r?new Array(d):{};let p=0;for(let m=0;m<d;m++){const b=r?m:c[m],v=t[b],x=s[b];if(v===x){h[b]=v,(r?m<o:y_.call(t,b))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[b]=x;continue}const S=zv(v,x,i+1);h[b]=S,S===v&&p++}return o===d&&p===o?t:h}function ho(t,s){if(!s||Object.keys(t).length!==Object.keys(s).length)return!1;for(const i in t)if(t[i]!==s[i])return!1;return!0}function Fg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Df(t){if(!Vg(t))return!1;const s=t.constructor;if(s===void 0)return!0;const i=s.prototype;return!(!Vg(i)||!i.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Vg(t){return Object.prototype.toString.call(t)==="[object Object]"}function v_(t){return new Promise(s=>{Xs.setTimeout(s,t)})}function kf(t,s,i){return typeof i.structuralSharing=="function"?i.structuralSharing(t,s):i.structuralSharing!==!1?zv(t,s):s}function b_(t,s,i=0){const r=[...t,s];return i&&r.length>i?r.slice(1):r}function x_(t,s,i=0){const r=[s,...t];return i&&r.length>i?r.slice(0,-1):r}const ad=Symbol();function Tv(t,s){return!t.queryFn&&s?.initialPromise?()=>s.initialPromise:!t.queryFn||t.queryFn===ad?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function id(t,s){return typeof t=="function"?t(...s):!!t}function S_(t,s,i){let r=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=s(),r||(r=!0,o.aborted?i():o.addEventListener("abort",i,{once:!0})),o)}),t}const mo=(()=>{let t=()=>p_;return{isServer(){return t()},setIsServer(s){t=s}}})();var oi=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(){}},__=class extends oi{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",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(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const rd=new __,w_=m_;function j_(){let t=[],s=0,i=h=>{h()},r=h=>{h()},o=w_;const c=h=>{s?t.push(h):o(()=>{i(h)})},d=()=>{const h=t;t=[],h.length&&o(()=>{r(()=>{h.forEach(p=>{i(p)})})})};return{batch:h=>{let p;s++;try{p=h()}finally{s--,s||d()}return p},batchCalls:h=>(...p)=>{c(()=>{h(...p)})},schedule:c,setNotifyFunction:h=>{i=h},setBatchNotifyFunction:h=>{r=h},setScheduler:h=>{o=h}}}const rt=j_();var O_=class extends oi{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const s=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",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(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(s=>{s(t)}))}isOnline(){return this.#e}};const po=new O_;function E_(t){return Math.min(1e3*2**t,3e4)}function Rv(t){return(t??"online")==="online"?po.isOnline():!0}var Lf=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Av(t){let s=!1,i=0,r,o="pending",c,d;const h=new Promise((L,G)=>{c=L,d=G});h.catch(St);const p=()=>o!=="pending",m=L=>{if(!p()){const G=new Lf(L);j(G),t.onCancel?.(G)}},b=()=>{s=!0},v=()=>{s=!1},x=()=>rd.isFocused()&&(t.networkMode==="always"||po.isOnline())&&t.canRun(),S=()=>Rv(t.networkMode)&&t.canRun(),w=L=>{p()||(r?.(),o="resolved",c(L))},j=L=>{p()||(r?.(),o="rejected",d(L))},z=()=>new Promise(L=>{r=G=>{(p()||x())&&L(G)},t.onPause?.()}).then(()=>{r=void 0,p()||t.onContinue?.()}),T=()=>{if(p())return;let L;const G=i===0?t.initialPromise:void 0;try{L=G??t.fn()}catch(V){L=Promise.reject(V)}Promise.resolve(L).then(w).catch(V=>{if(p())return;const W=t.retry??(mo.isServer()?0:3),$=t.retryDelay??E_,A=typeof $=="function"?$(i,V):$,J=W===!0||typeof W=="number"&&i<W||typeof W=="function"&&W(i,V);if(s||!J){j(V);return}i++,t.onFail?.(i,V),v_(A).then(()=>x()?void 0:z()).then(()=>{s?j(V):T()})})};return{promise:h,status:()=>o,cancel:m,continue:()=>(r?.(),h),cancelRetry:b,continueRetry:v,canStart:S,start:()=>(S()?T():z().then(T),h)}}var Cv=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Mf(this.gcTime)&&(this.#e=Xs.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(mo.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Xs.clearTimeout(this.#e),this.#e=void 0)}};function N_(t){return{onFetch:(s,i)=>{const r=s.options,o=s.fetchOptions?.meta?.fetchMore?.direction,c=s.state.data?.pages||[],d=s.state.data?.pageParams||[];let h={pages:[],pageParams:[]},p=0;const m=async()=>{let b=!1;const v=w=>{S_(w,()=>s.signal,()=>b=!0)},x=Tv(s.options,s.fetchOptions),S=async(w,j,z)=>{if(b)return Promise.reject(s.signal.reason);if(j==null&&w.pages.length)return Promise.resolve(w);const L=(()=>{const $={client:s.client,queryKey:s.queryKey,pageParam:j,direction:z?"backward":"forward",meta:s.options.meta};return v($),$})(),G=await x(L),{maxPages:V}=s.options,W=z?x_:b_;return{pages:W(w.pages,G,V),pageParams:W(w.pageParams,j,V)}};if(o&&c.length){const w=o==="backward",j=w?z_:Pg,z={pages:c,pageParams:d};h=await S(z,j(r,z),w)}else{const w=t??c.length;do{const j=p===0?d[0]??r.initialPageParam:Pg(r,h);if(p>0&&j==null)break;h=await S(h,j),p++}while(p<w)}return h};s.options.persister?s.fetchFn=()=>s.options.persister?.(m,{client:s.client,queryKey:s.queryKey,meta:s.options.meta,signal:s.signal},i):s.fetchFn=m}}}function Pg(t,{pages:s,pageParams:i}){const r=s.length-1;return s.length>0?t.getNextPageParam(s[r],s,i[r],i):void 0}function z_(t,{pages:s,pageParams:i}){return s.length>0?t.getPreviousPageParam?.(s[0],s,i[0],i):void 0}var T_=class extends Cv{#e;#t;#n;#s;#i;#a;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#i=t.client,this.#s=this.#i.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Jg(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 s=Jg(this.options);s.data!==void 0&&(this.setState(Xg(s.data,s.dataUpdatedAt)),this.#t=s)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#s.remove(this)}setData(t,s){const i=kf(this.state.data,t,this.options);return this.#l({data:i,type:"success",dataUpdatedAt:s?.updatedAt,manual:s?.manual}),i}setState(t){this.#l({type:"setState",state:t})}cancel(t){const s=this.#a?.promise;return this.#a?.cancel(t),s?s.then(St).catch(St):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=>Qt(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ad||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>$n(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:!Nv(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.#s.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const s=this.observers.indexOf(t);s!==-1&&(this.observers.splice(s,1),this.observers.length||(this.#a&&(this.#o||this.#u()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#s.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,s){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&s?.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 p=this.observers.find(m=>m.options.queryFn);p&&this.setOptions(p.options)}const i=new AbortController,r=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(this.#o=!0,i.signal)})},o=()=>{const p=Tv(this.options,s),b=(()=>{const v={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(v),v})();return this.#o=!1,this.options.persister?this.options.persister(p,b,this):p(b)},d=(()=>{const p={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:o};return r(p),p})();(this.#e==="infinite"?N_(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=Av({initialPromise:s?.initialPromise,fn:d.fetchFn,onCancel:p=>{p instanceof Lf&&p.revert&&this.setState({...this.#n,fetchStatus:"idle"}),i.abort()},onFail:(p,m)=>{this.#l({type:"failed",failureCount:p,error:m})},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 p=await h.start();if(p===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(p),this.#s.config.onSuccess?.(p,this),this.#s.config.onSettled?.(p,this.state.error,this),p}catch(p){if(p instanceof Lf){if(p.silent)return this.#a.promise;if(p.revert){if(this.state.data===void 0)throw p;return this.state.data}}throw this.#l({type:"error",error:p}),this.#s.config.onError?.(p,this),this.#s.config.onSettled?.(this.state.data,p,this),p}finally{this.#a===h&&(this.#a=void 0),this.scheduleGc()}}#l(t){const s=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...Mv(i.data,this.options),fetchMeta:t.meta??null};case"success":const r={...i,...Xg(t.data,t.dataUpdatedAt),dataUpdateCount:i.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{...i,error:o,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=s(this.state),rt.batch(()=>{this.observers.slice().forEach(i=>{i.onQueryUpdate()}),this.#s.notify({query:this,type:"updated",action:t})})}};function Mv(t,s){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Rv(s.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Xg(t,s){return{data:t,dataUpdatedAt:s??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Jg(t){const s=typeof t.initialData=="function"?t.initialData():t.initialData,i=s!==void 0,r=i?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:s,dataUpdateCount:0,dataUpdatedAt:i?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:i?"success":"pending",fetchStatus:"idle"}}var R_=class extends oi{#e;#t=void 0;#n=void 0;#s=void 0;#i;#a;#r;#o;#u;#l;#f;#d;#c;#m=new Set;constructor(t,s){super(),this.options=s,this.#e=t,this.#r=null,this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Ig(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Uf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Uf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(t){const s=this.options,i=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 Qt(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),s._defaulted&&!ho(this.options,s)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Wg(this.#t,i,this.options,s)&&this.#h(),this.updateResult(),r&&(this.#t!==i||Qt(this.options.enabled,this.#t)!==Qt(s.enabled,this.#t)||$n(this.options.staleTime,this.#t)!==$n(s.staleTime,this.#t))&&this.#p();const o=this.#g();r&&(this.#t!==i||Qt(this.options.enabled,this.#t)!==Qt(s.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(t){const s=this.#e.getQueryCache().build(this.#e,t),i=this.createResult(s,t);return C_(this,i)&&(this.#s=i,this.#a=this.options,this.#i=this.#t.state),i}getCurrentResult(){return this.#s}trackResult(t,s){return new Proxy(t,{get:(i,r)=>(this.trackProp(r),s?.(r),Reflect.get(i,r))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=this.#e.defaultQueryOptions(t),i=this.#e.getQueryCache().build(this.#e,s);let r=()=>{},o;const c=new Promise(d=>{o=d,r=this.#e.getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===i.queryHash&&i.state.data!==void 0&&(r(),d(this.createResult(i,s)))})});return Promise.race([i.fetch().then(()=>{const d=this.createResult(i,s);return o?.(d),d}).finally(()=>{r()}),c])}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#s))}#h(t){this.#S();let s=this.#t.fetch(this.options,t);return t?.throwOnError||(s=s.catch(St)),s}#p(){this.#b();const t=$n(this.options.staleTime,this.#t);if(mo.isServer()||this.#s.isStale||!Mf(t))return;const s=Nv(this.#s.dataUpdatedAt,t)+1;this.#f=Xs.setTimeout(()=>{this.#s.isStale||this.updateResult()},s)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#x(),this.#c=t,!(mo.isServer()||Qt(this.options.enabled,this.#t)===!1||!Mf(this.#c)||this.#c===0)&&(this.#d=Xs.setInterval(()=>{(this.options.refetchIntervalInBackground||rd.isFocused())&&this.#h()},this.#c))}#v(){this.#p(),this.#y(this.#g())}#b(){this.#f!==void 0&&(Xs.clearTimeout(this.#f),this.#f=void 0)}#x(){this.#d!==void 0&&(Xs.clearInterval(this.#d),this.#d=void 0)}createResult(t,s){const i=this.#t,r=this.options,o=this.#s,c=this.#i,d=this.#a,h=t!==i?t.state:this.#n,{state:p}=t;let m={...p},b=!1,v;if(s._optimisticResults){const W=this.hasListeners(),$=!W&&Ig(t,s),A=W&&Wg(t,i,s,r);($||A)&&(m={...m,...Mv(p.data,t.options)}),s._optimisticResults==="isRestoring"&&(m.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:w}=m;v=m.data;let j=!1;if(s.placeholderData!==void 0&&v===void 0&&w==="pending"){let W;o?.isPlaceholderData&&s.placeholderData===d?.placeholderData?(W=o.data,j=!0):W=typeof s.placeholderData=="function"?s.placeholderData(this.#l?.state.data,this.#l):s.placeholderData,W!==void 0&&(w="success",v=kf(o?.data,W,s),b=!0)}if(s.select&&v!==void 0&&!j)if(o&&v===c?.data&&s.select===this.#o)v=this.#u;else try{this.#o=s.select,v=s.select(v),v=kf(o?.data,v,s),this.#u=v,this.#r=null}catch(W){this.#r=W}else v===void 0&&(this.#r=null);this.#r&&(x=this.#r,v=this.#u,S=Date.now(),w="error",b=!1);const z=m.fetchStatus==="fetching",T=w==="pending",L=w==="error",G=T&&z,V=v!==void 0;return{status:w,fetchStatus:m.fetchStatus,isPending:T,isSuccess:w==="success",isError:L,isInitialLoading:G,isLoading:G,data:v,dataUpdatedAt:m.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:m.fetchFailureCount,failureReason:m.fetchFailureReason,errorUpdateCount:m.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:m.dataUpdateCount>h.dataUpdateCount||m.errorUpdateCount>h.errorUpdateCount,isFetching:z,isRefetching:z&&!T,isLoadingError:L&&!V,isPaused:m.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:L&&V,isStale:ld(t,s),refetch:this.refetch,isEnabled:Qt(s.enabled,t)!==!1}}updateResult(){const t=this.#s,s=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),ho(s,t))return;this.#s=s;const i=()=>{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.#s).some(d=>{const h=d;return this.#s[h]!==t[h]&&c.has(h)})};this.#_({listeners:i()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const s=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(s?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#_(t){rt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(this.#s)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function A_(t,s){return Qt(s.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Qt(s.retryOnMount,t)===!1)}function Ig(t,s){return A_(t,s)||t.state.data!==void 0&&Uf(t,s,s.refetchOnMount)}function Uf(t,s,i){if(Qt(s.enabled,t)!==!1&&$n(s.staleTime,t)!=="static"){const r=typeof i=="function"?i(t):i;return r==="always"||r!==!1&&ld(t,s)}return!1}function Wg(t,s,i,r){return(t!==s||Qt(r.enabled,t)===!1)&&(!i.suspense||t.state.status!=="error")&&ld(t,i)}function ld(t,s){return Qt(s.enabled,t)!==!1&&t.isStaleByTime($n(s.staleTime,t))}function C_(t,s){return!ho(t.getCurrentResult(),s)}var M_=class extends Cv{#e;#t;#n;#s;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Dv(),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(s=>s!==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.#s?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const s=()=>{this.#i({type:"continue"})},i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#s=Av({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(d,h)=>{this.#i({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#i({type:"pause"})},onContinue:s,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)s();else{this.#i({type:"pending",variables:t,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,i);const h=await this.options.onMutate?.(t,i);h!==this.state.context&&this.#i({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,i),await this.options.onSuccess?.(d,t,this.state.context,i),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,i),await this.options.onSettled?.(d,null,t,this.state.context,i),this.#i({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,i)}catch(h){Promise.reject(h)}try{await this.options.onError?.(d,t,this.state.context,i)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,i)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,i)}catch(h){Promise.reject(h)}throw this.#i({type:"error",error:d}),d}finally{this.#s===r&&(this.#s=void 0),this.#n.runNext(this)}}#i(t){const s=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,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{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),rt.batch(()=>{this.#t.forEach(i=>{i.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Dv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var D_=class extends oi{#e;#t;#n;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}build(t,s,i){const r=new M_({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(s),state:i});return this.add(r),r}add(t){this.#e.add(t);const s=Gl(t);if(typeof s=="string"){const i=this.#t.get(s);i?i.push(t):this.#t.set(s,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const s=Gl(t);if(typeof s=="string"){const i=this.#t.get(s);if(i)if(i.length>1){const r=i.indexOf(t);r!==-1&&i.splice(r,1)}else i[0]===t&&this.#t.delete(s)}}this.notify({type:"removed",mutation:t})}canRun(t){const s=Gl(t);if(typeof s=="string"){const i=this.#t.get(s)?.find(r=>r.state.status==="pending");return!i||i===t}else return!0}runNext(t){const s=Gl(t);return typeof s=="string"?this.#t.get(s)?.find(i=>i!==t&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){rt.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 s={exact:!0,...t};return this.getAll().find(i=>Yg(s,i))}findAll(t={}){return this.getAll().filter(s=>Yg(t,s))}notify(t){rt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return rt.batch(()=>Promise.all(t.map(s=>s.continue().catch(St))))}};function Gl(t){return t.options.scope?.id}var k_=class extends oi{#e;#t=void 0;#n;#s;constructor(s,i){super(),this.#e=s,this.setOptions(i),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(s){const i=this.options;this.options=this.#e.defaultMutationOptions(s),ho(this.options,i)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),i?.mutationKey&&this.options.mutationKey&&ea(i.mutationKey)!==ea(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.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(s){this.#i(),this.#a(s)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(s,i){return this.#s=i,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(s)}#i(){const s=this.#n?.state??Dv();this.#t={...s,isPending:s.status==="pending",isSuccess:s.status==="success",isError:s.status==="error",isIdle:s.status==="idle",mutate:this.mutate,reset:this.reset}}#a(s){rt.batch(()=>{if(this.#s&&this.hasListeners()){const i=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(s?.type==="success"){try{this.#s.onSuccess?.(s.data,i,r,o)}catch(c){Promise.reject(c)}try{this.#s.onSettled?.(s.data,null,i,r,o)}catch(c){Promise.reject(c)}}else if(s?.type==="error"){try{this.#s.onError?.(s.error,i,r,o)}catch(c){Promise.reject(c)}try{this.#s.onSettled?.(void 0,s.error,i,r,o)}catch(c){Promise.reject(c)}}}this.listeners.forEach(i=>{i(this.#t)})})}},L_=class extends oi{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,s,i){const r=s.queryKey,o=s.queryHash??sd(r,s);let c=this.get(o);return c||(c=new T_({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(s),state:i,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 s=this.#e.get(t.queryHash);s&&(t.destroy(),s===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){rt.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const s={exact:!0,...t};return this.getAll().find(i=>Kg(s,i))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(i=>Kg(t,i)):s}notify(t){rt.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){rt.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){rt.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},U_=class{#e;#t;#n;#s;#i;#a;#r;#o;constructor(t={}){this.#e=t.queryCache||new L_,this.#t=t.mutationCache||new D_,this.#n=t.defaultOptions||{},this.#s=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#r=rd.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#o=po.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 s=this.defaultQueryOptions({queryKey:t});return this.#e.get(s.queryHash)?.state.data}ensureQueryData(t){const s=this.defaultQueryOptions(t),i=this.#e.build(this,s),r=i.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&i.isStaleByTime($n(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:s,state:i})=>[s,i.data])}setQueryData(t,s,i){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,c=g_(s,o);if(c!==void 0)return this.#e.build(this,r).setData(c,{...i,manual:!0})}setQueriesData(t,s,i){return rt.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,s,i)]))}getQueryState(t){const s=this.defaultQueryOptions({queryKey:t});return this.#e.get(s.queryHash)?.state}removeQueries(t){const s=this.#e;rt.batch(()=>{s.findAll(t).forEach(i=>{s.remove(i)})})}resetQueries(t,s){const i=this.#e;return rt.batch(()=>{const r=i.findAll(t),o=new Set(r);return r.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>o.has(c)},s)})}cancelQueries(t,s={}){const i={revert:!0,...s},r=rt.batch(()=>this.#e.findAll(t).map(o=>o.cancel(i)));return Promise.all(r).then(St).catch(St)}invalidateQueries(t,s={}){return rt.batch(()=>(this.#e.findAll(t).forEach(i=>{i.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},s)))}refetchQueries(t,s={}){const i={...s,cancelRefetch:s.cancelRefetch??!0},r=rt.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,i);return i.throwOnError||(c=c.catch(St)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(St)}async query(t){const s=this.defaultQueryOptions(t);s.retry===void 0&&(s.retry=!1);const i=this.#e.build(this,s),r=i.isStaleByTime($n(s.staleTime,i))?await i.fetch(s):i.state.data,o=s.select;return o?o(r):r}fetchQuery(t){const s=this.defaultQueryOptions(t);s.retry===void 0&&(s.retry=!1);const i=this.#e.build(this,s);return i.isStaleByTime($n(s.staleTime,i))?i.fetch(s):Promise.resolve(i.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(St).catch(St)}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(St).catch(St)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return po.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,s){this.#s.set(ea(t),{queryKey:t,defaultOptions:s})}getQueryDefaults(t){const s=[...this.#s.values()],i={};return s.forEach(r=>{ti(t,r.queryKey)&&Object.assign(i,r.defaultOptions)}),i}setMutationDefaults(t,s){this.#i.set(ea(t),{mutationKey:t,defaultOptions:s})}getMutationDefaults(t){const s=[...this.#i.values()],i={};return s.forEach(r=>{ti(t,r.mutationKey)&&Object.assign(i,r.defaultOptions)}),i}defaultQueryOptions(t){if(t._defaulted)return t;const s={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return s.queryHash||(s.queryHash=sd(s.queryKey,s)),s.refetchOnReconnect===void 0&&(s.refetchOnReconnect=s.networkMode!=="always"),s.throwOnError===void 0&&(s.throwOnError=!!s.suspense),!s.networkMode&&s.persister&&(s.networkMode="offlineFirst"),s.queryFn===ad&&(s.enabled=!1),s}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 kv=ee.createContext(!1),Z_=()=>ee.useContext(kv);kv.Provider;function q_(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const B_=ee.createContext(q_()),$_=()=>ee.useContext(B_),H_=(t,s,i)=>{const r=i?.state.error&&typeof t.throwOnError=="function"?id(t.throwOnError,[i.state.error,i]):t.throwOnError;(t.suspense||r)&&(s.isReset()||(t.retryOnMount=!1))},Q_=t=>{ee.useEffect(()=>{t.clearReset()},[t])},G_=({result:t,errorResetBoundary:s,throwOnError:i,query:r,suspense:o})=>t.isError&&!s.isReset()&&!t.isFetching&&r&&(o&&t.data===void 0||id(i,[t.error,r])),K_=t=>{if(t.suspense){const i=o=>o==="static"?o:Math.max(o??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...o)=>i(r(...o)):i(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},Y_=(t,s)=>t?.suspense&&s.isPending,F_=(t,s,i)=>s.fetchOptimistic(t).catch(()=>{i.clearReset()});function V_(t,s,i){const r=Z_(),o=$_(),c=sa(),d=c.defaultQueryOptions(t),h=c.getQueryCache().get(d.queryHash),p=t.subscribed!==!1;d._optimisticResults=r?"isRestoring":p?"optimistic":void 0,K_(d),H_(d,o,h),Q_(o);const[m]=ee.useState(()=>new s(c,d)),b=m.getOptimisticResult(d),v=!r&&p;if(ee.useSyncExternalStore(ee.useCallback(x=>{const S=v?m.subscribe(rt.batchCalls(x)):St;return m.updateResult(),S},[m,v]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),ee.useEffect(()=>{m.setOptions(d)},[d,m]),Y_(d,b))throw F_(d,m,o);if(G_({result:b,errorResetBoundary:o,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw b.error;return d.notifyOnChangeProps?b:m.trackResult(b)}function At(t,s){return V_(t,R_)}function ui(t,s){const i=sa(),[r]=ee.useState(()=>new k_(i,t));ee.useEffect(()=>{r.setOptions(t)},[r,t]);const o=ee.useSyncExternalStore(ee.useCallback(d=>r.subscribe(rt.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=ee.useCallback((...d)=>{r.mutate(d[0],d[1]).catch(St)},[r]);if(o.error&&id(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}const ey=!1;var Lv=ee.useLayoutEffect;function _s(t){return t[t.length-1]}function Uv(t,s){return typeof t=="function"?t(s):t}const od=Object.prototype.hasOwnProperty;function Zv(t){for(const s in t)if(od.call(t,s))return!0;return!1}const io=()=>Object.create(null),Fa=(t,s)=>xs(t,s,!0);function xs(t,s,i,r=0){if(t===s)return t;if(r++>500)return s;const o=Array.isArray(t)&&Array.isArray(s);if(!o&&!(go(t)&&go(s)))return s;const c=Object.keys(t),d=c.length,h=Object.keys(s),p=h.length;if(o?d!==t.length||p!==s.length||d&&_s(c)!==`${d-1}`||p&&_s(h)!==`${p-1}`:d!==Object.getOwnPropertyNames(t).length||p!==Object.getOwnPropertyNames(s).length||Object.getOwnPropertySymbols(s).length)return s;let m=0,b,v,x;if(o){for(;m<p&&(x=m,v=t[x],b=s[x],b=v===b?v:typeof v=="object"?xs(v,b,i,r):b,b===v);m++);if(m===p&&d===p)return t}else{let w=d===p,j=!0;for(;m<p;m++){x=h[m],v=t[x];const z=s[x];b=v===z?v:typeof v=="object"?xs(v,z,i,r):z,w&&=b===v&&(c[m]===x||od.call(t,x)),j&&=Object.is(b,z),c[m]=b}if(w)return Object.getOwnPropertySymbols(t).length?s:t;if(j)return s}const S=o?h.fill(0):i?io():{};for(let w=0;w<p;w++)x=o?w:h[w],o?(v=t[x],w>m&&(b=s[x],b=v===b?v:typeof v=="object"?xs(v,b,i,r):b),S[x]=w<m?v:b):S[x]=c[w];return S}function go(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function Hn(t,s,i,r){if(t===s)return!0;if(Array.isArray(t)&&Array.isArray(s)){if(t.length!==s.length)return!1;for(let o=0,c=t.length;o<c;o++){const d=t[o],h=s[o];if(d!==h&&!Hn(d,h,i,r))return!1}return!0}if(go(t)&&go(s)){if(i){for(const c in s)if((r||s[c]!==void 0)&&!Hn(t[c],s[c],i,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 s)if((r||s[c]!==void 0)&&(o--===0||!Hn(t[c],s[c],i,r)))return!1;return o===0}return!1}const P_=/[\x00-\x1f\x7f"<>`{}]/g;function X_(t){return t.replace(P_,s=>"%"+s.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function ty(t){let s;try{s=decodeURI(t)}catch{s=t.replaceAll(/%[0-9A-F]{2}/gi,i=>{try{return decodeURI(i)}catch{return i}})}return X_(s)}const J_=["http:","https:","mailto:","tel:"];function yr(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 qv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Bv(t,s){if(!t)return!1;if(qv.test(t))return!0;const i=yr(t);return i?!s.has(i):!1}function rr(t){if(!t)return t;let s=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const i=/%25|%5C/gi;let r=0,o;for(s="";(o=i.exec(t))!==null;)s+=ty(t.slice(r,o.index))+o[0],r=i.lastIndex;s+=ty(r?t.slice(r):t)}return s}function I_(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function W_(t,s){if(t===s)return!0;if(t.length!==s.length)return!1;for(let i=0;i<t.length;i++)if(t[i]!==s[i])return!1;return!0}function ud(){throw new Error("Invariant failed")}function Ja(t){return t.replace(/\/{2,}/g,"/")}function $v(t){return t==="/"?t:t.replace(/^\/+/,"")}function gn(t){const s=t.length;return s>1&&t[s-1]==="/"?t.replace(/\/+$/,""):t}function Hv(t){return gn($v(t))}function ny(t,s){return t?.endsWith("/")&&t!=="/"&&t!==`${s}/`?t.slice(0,-1):t}function sy(t,s,i="never",r){if(s.includes("//")&&(s=Ja(s)),s.startsWith("/"))return s.length===1||i==="preserve"?s:i==="always"?s.endsWith("/")?s:`${s}/`:s.endsWith("/")?s.slice(0,-1):s;const o=s===".";let c;if(r){c=o?t:t+"\0"+s;const m=r.get(c);if(m)return m}let d;if(o)d=t.split("/");else{for(t.includes("//")&&(t=Ja(t)),d=t.split("/");d.length>1&&_s(d)==="";)d.pop();const m=s.split("/");for(let b=0,v=m.length;b<v;b++){const x=m[b];x===""?b?b===v-1&&d.push(x):d=[x]:x===".."?d.length>1?d.pop():d=[""]:x==="."||d.push(x)}}d.length>1&&(_s(d)===""?i==="never"&&d.pop():i==="always"&&d.push(""));const h=d.join("/"),p=(o?Ja(h):h)||"/";return c&&r&&r.set(c,p),p}function e1(t){const s=new Map(t.map(r=>[encodeURIComponent(r),r])),i=new RegExp([...s.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return r=>r.replace(i,o=>s.get(o)??o)}function t1(t){return t==null||t===""}function n1(t,s,i){if(typeof s!="string")return""+(s??void 0);const r=t==="_splat";if(r&&(!s||/^[a-zA-Z0-9\-._~!/]*$/.test(s)))return s;let o=encodeURIComponent(s);return r&&(o=o.replaceAll("%2F","/")),i?i(o):o}function ay(t,s,i,r,o){const c=t.endsWith("/")?"/":"";let d="";for(const h of s){if(typeof h=="string"){d+=h;continue}const[p,m,b,v]=h,x=p===2,S=x&&v!==void 0?v+c:v;let w=i[m];if(!(p===3&&w==null)){if(o&&(o[m]=w,x&&(o["*"]=w)),x&&t1(w)){if(b==="/"&&!S)continue;w=""}d+=b+n1(m,w,r)+(S||"")}}return d+c||"/"}function ni(t){return t?.isNotFound===!0}function s1(){try{return sessionStorage}catch{return}}const a1="tsr-scroll-restoration-v1_3",Qv=s1();function i1(){try{return JSON.parse(Qv?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Va=i1(),iy="data-scroll-restoration-id",r1=t=>t.state.__TSR_key||t.href;function l1(t){const s=t.getAttribute(iy);if(s)return`[${iy}="${s}"]`;let i="",r=t,o;for(;o=r.parentNode;){let c=1,d=r;for(;d=d.previousElementSibling;)c++;const h=`${r.localName}:nth-child(${c})`;i=i?`${h} > ${i}`:h,r=o}return i}let Kl=!1;const ro="window";function Zf(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function ry(t){const s=new Set;for(const i of t){if(i===ro)continue;const r=Zf(i);r&&s.add(r)}return s}function o1(t,s){const i=t.options.scrollRestoration,r=t._scroll;i&&(r.e=!0);const o=t.options.getScrollRestorationKey||r1,c=new Set,d=h=>{const p=Va[h]||={};for(const m of c)m===document?p[ro]={scrollX,scrollY}:m.isConnected&&(p[l1(m)]={scrollX:m.scrollLeft,scrollY:m.scrollTop})};i&&!r.s&&(r.s=!0,Kl=!1,history.scrollRestoration="manual",document.addEventListener("scroll",h=>{Kl||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{Qv?.setItem(a1,JSON.stringify(Va))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!r.r&&(r.r=!0,t.subscribe("onRendered",h=>{const p=t.options.scrollRestorationBehavior,m=t.options.scrollToTopSelectors,b=r.n,v=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),w=h.fromLocation&&o(h.fromLocation);if(r.e&&w&&w!==S){const j=Va[w];if(j){let z=Va[S];for(const T in j){if(T===ro){if(b)continue}else{const L=Zf(T);if(!L||b&&m&&(x??=ry(m),x.has(L)))continue}z||(z=Va[S]={}),z[T]??=j[T]}}}Kl=!0;try{const j=h.toLocation.hash,z=h.toLocation.state.__hashScrollIntoViewOptions??!0;let T=!1;if(b){!j&&m&&(x??=ry(m));const L=j&&z&&v,G=r.e?Va[S]:void 0;if(G)for(const V in G){const{scrollX:W,scrollY:$}=G[V];if(V===ro){if(L)continue;scrollTo({top:$,left:W,behavior:p}),T=!0}else{const A=Zf(V);A&&(A.scrollLeft=W,A.scrollTop=$,x?.delete(A))}}if(!j){const V={top:0,left:0,behavior:p};if(T||scrollTo(V),x)for(const W of x)W.scrollTo(V)}}!T&&j&&z&&document.getElementById(j)?.scrollIntoView(z)}finally{Kl=!1}}))}function u1(t,s=String){let i;for(const r in t){const o=t[r];o!==void 0&&(i||=new URLSearchParams).set(r,s(o))}return i?i.toString():""}function hf(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function c1(t){const s=new URLSearchParams(t),i=Object.create(null);for(const[r,o]of s.entries()){const c=i[r];c==null?i[r]=hf(o):Array.isArray(c)?c.push(hf(o)):i[r]=[c,hf(o)]}return i}const Gv=/^(?:\s|["[{\d-]|fa|nu|tr)/,f1=h1(JSON.parse),d1=m1(JSON.stringify,JSON.parse);function h1(t){const s=t===JSON.parse;return i=>{i[0]==="?"&&(i=i.slice(1));const r=c1(i);for(const o in r){const c=r[o];if(typeof c=="string"){if(s&&!Gv.test(c))continue;try{r[o]=t(c)}catch{}}}return r}}function m1(t,s){const i=s===JSON.parse;function r(o){if(o&&typeof o=="object")try{return t(o)}catch{}else if(s&&typeof o=="string"){if(i&&!Gv.test(o))return o;try{return s(o),t(o)}catch{}}return o}return o=>{const c=u1(o,r);return c?`?${c}`:""}}const Ia="__root__";function p1(t){t.statusCode=t.statusCode||t.code||307;const s=new Headers(t.headers);t.href&&s.get("Location")===null&&s.set("Location",t.href);const i=new Response(null,{status:t.statusCode,headers:s});if(i.options=t,t.throw)throw i;return i}function Kv(t){return t instanceof Response&&!!t.options}function yo(t){const s=new Map;let i,r;return{get(o){const c=s.get(o);if(c)return c.visited=!0,c.value},set(o,c){const d=s.get(o);if(d){d.value=c;return}if(s.size>=t){let p=i?.next().value;for(;!p||p.visited;)p?p.visited=!1:i=s.values(),p=i.next().value;p===r&&(i=void 0),s.delete(p.key)}const h={key:o,value:c,visited:!1};r=h,s.set(o,h)},clear(){s.clear(),i=void 0,r=void 0}}}const bs=4,Yv=5;function g1(t){const s=t.names;if(s)return s;const i=[];for(const r of t)typeof r!="string"&&i.push(r[1]);return t.names=i}function y1(t,s,i){const r=t.slice(s,i);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 p=r.slice(h,c);return[d?3:p?1:2,p||"_splat",r.slice(0,o),t.slice(s+c+1,p?i:t.length)]}}return r}function vr(t,s,i,r,o,c){let d=i;const h=s.fullPath??s.from,p=s.options,m=h.length,b=h.endsWith("/")?m-1:m,v=p?.caseSensitive??t,x=p?.params?.parse??p?.parseParams;let S,w=c?i-1:0;if(!r||h.includes("$")){S=c?.slice()??[];const T=_s(S);T&&typeof T!="string"&&T[0]===2&&(S[S.length-1]=[T[0],T[1],T[2],T[3]===void 0?void 0:T[3]+h.substring(i-(h[i-2]==="/"?2:1),b)],w=m)}for(;d<m;){const T=d,L=h.indexOf("/",T);let G=L===-1?m:L;const V=y1(h,T,G);d=G+1;let W;if(typeof V=="string"){if(!r)continue;let $=V,A;v?A=r.static??=new Map:($=V.toLowerCase(),A=r.staticInsensitive??=new Map);const J=A.get($);if(J)W=J;else{const ie=Js(r);W=ie,A.set($,ie)}}else{const $=V[0];let A=V[2],J=V[3]??"";if($===2&&(G=m,d=G+1),S&&w<G&&(w<T-1&&S.push(h.slice(w,T-1)),V[2]="/"+A,$===2&&V[3]!==void 0&&b<m&&(V[3]=J.slice(0,-1)),S.push(V),w=G),!r)continue;const ie=v&&!!(A||J);v||(A=A.toLowerCase(),J=J.toLowerCase());const re=$===1?r.dynamic??=[]:$===3?r.optional??=[]:r.wildcard??=[],P=$!==2&&!x&&re.find(I=>!I.parse&&I.caseSensitive===ie&&I.prefix===A&&I.suffix===J);if(P)W=P;else{const I=Js(r,$,ie,A,J);W=I,re.push(I),re.length===2&&o?.push(re)}}r=W}S&&w<b&&S.push(h.slice(w,b));const j=S?.slice();if(!r)return j;if(x&&s.children&&!s.isRoot&&s.id&&s.id.charCodeAt(s.id.lastIndexOf("/")+1)===95){const T=Js(r,Yv);(r.pathless??=[]).push(T),r=T}const z=(s.path||!s.children)&&!s.isRoot;if(z&&b<m){const T=Js(r,bs);r.index=T,r=T}return r.parse=x??null,r.priority=p?.params?.priority??0,r.route||(r.data=j,z&&(r.route=s)),[r,d,j]}function Fv(t,s){if(t.parse&&!s.parse)return-1;if(!t.parse&&s.parse)return 1;if(t.parse&&s.parse&&(t.priority||s.priority))return s.priority-t.priority;if(t.prefix&&s.prefix&&t.prefix!==s.prefix){if(t.prefix.startsWith(s.prefix))return-1;if(s.prefix.startsWith(t.prefix))return 1}if(t.suffix&&s.suffix&&t.suffix!==s.suffix){if(t.suffix.endsWith(s.suffix))return-1;if(s.suffix.endsWith(t.suffix))return 1}return t.prefix&&!s.prefix?-1:!t.prefix&&s.prefix?1:t.suffix&&!s.suffix?-1:!t.suffix&&s.suffix?1:t.caseSensitive&&!s.caseSensitive?-1:!t.caseSensitive&&s.caseSensitive?1:0}function Js(t,s=0,i,r,o){return{kind:s,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:i,prefix:r,suffix:o}}function v1(t,s){const i=Js(),r=[];function o(c,d,h,p){const[m,b,v]=vr(!1,c,d,h,r,p);if(c.children)for(const x of c.children)o(x,b,m,v)}for(const c of t)o(c,1,i);for(const c of r)c.sort(Fv);s.masksTree=i,s.flatCache=yo(1e3)}function b1(t,s){t||="/";const i=s.flatCache.get(t);if(i!==void 0)return i;const r=cd(t,s.masksTree);return s.flatCache.set(t,r),r}function x1(t,s,i,r,o){t||="/",r||="/";const c=s?`case\0${t}`:t;let d=o.singleCache.get(c);return d||(d=Js(),vr(s,{from:t},1,d),o.singleCache.set(c,d)),cd(r,d,i)}function S1(t,s,i=!1){const r=i?t:`nofuzz\0${t}`,o=s.matchCache.get(r);if(o!==void 0)return o;t||="/";let c;try{c=cd(t,s.segmentTree,i)}catch(d){if(d instanceof URIError)c=null;else throw d}return c&&(c.branch=Pv(c.route)),s.matchCache.set(r,c),c}function _1(t,s=!1){const i=Js(),r=[],o={},c={};let d=0;function h(p,m,b,v){if(p.init(d),p.id in o&&ud(),o[p.id]=p,d!==0&&p.path){const j=gn(p.fullPath);(!c[j]||p.fullPath.endsWith("/"))&&(c[j]=p)}d++;const[x,S,w]=vr(s,p,m,b,r,v);if(p._interpolation=w,p.children)for(const j of p.children)h(j,S,x,w)}h(t,1,i);for(const p of r)p.sort(Fv);return{processedTree:{segmentTree:i,singleCache:yo(1e3),matchCache:yo(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function cd(t,s,i=!1){const r=t.split("/"),o=j1(t,r,s,i);if(!o)return null;const[c]=Vv(t,r,o);return{route:o.node.route,rawParams:c}}function Vv(t,s,i){const r=w1(i.node),o=i.node.data&&g1(i.node.data),c=Object.create(null);let d=i.extract?.part??0,h=i.extract?.node??0,p=i.extract?.path??0,m=i.extract?.param??0;for(;h<r.length;d++,h++,p++){const b=r[h];if(b.kind===bs)break;if(b.kind===Yv){d--,p--;continue}const v=s[d],x=p;if(v&&(p+=v.length),b.kind===1||b.kind===3){const S=o[m++];if(b.kind===3&&i.skipped&1<<h){d--,p=x-1;continue}const w=b.suffix||b.prefix?v.substring(b.prefix.length,v.length-b.suffix.length):v;(w||b.kind===1)&&(c[S]=decodeURIComponent(w))}else if(b.kind===2){const S=b,w=t.substring(x+S.prefix.length,t.length-S.suffix.length),j=decodeURIComponent(w);c["*"]=j,c._splat=j;break}}return i.rawParams&&Object.assign(c,i.rawParams),[c,{part:d,node:h,path:p,param:m}]}function Pv(t){const s=[t];for(;t.parentRoute;)t=t.parentRoute,s.push(t);return s.reverse(),s}function w1(t){const s=Array(t.depth+1);do s[t.depth]=t,t=t.parent;while(t);return s}function j1(t,s,i,r){if(t==="/"&&i.index)return{node:i.index,skipped:0};const o=!_s(s),c=o&&t!=="/",d=s.length-(o?1:0),h=[{node:i,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let p=null,m=null;for(;h.length;){const b=h.pop(),{node:v,index:x,skipped:S,statics:w,dynamics:j,optionals:z}=b;let{extract:T,rawParams:L}=b;if(v.kind===2&&v.route&&!Fl(m,b))continue;if(v.parse){if(!ly(t,s,b))continue;L=b.rawParams,T=b.extract}r&&v.route&&v.kind!==bs&&Fl(p,b)&&(p=b);const G=x===d;if(G&&(v.route&&(!c||v.kind===bs||v.kind===2)&&Fl(m,b)&&(m=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const V=G?void 0:s[x];let W;if(G&&v.index){const $={node:v.index,index:x,skipped:S,statics:w,dynamics:j,optionals:z,extract:T,rawParams:L};let A=!0;if(v.index.parse&&(ly(t,s,$)||(A=!1)),A){if(!j&&!z&&!S&&O1(w,d))return $;Fl(m,$)&&(m=$)}}if(v.wildcard)for(let $=v.wildcard.length-1;$>=0;$--){const A=v.wildcard[$],{prefix:J,suffix:ie}=A;if(!(J&&(G||!(A.caseSensitive?V:W??=V.toLowerCase()).startsWith(J)))){if(ie){if(G)continue;const re=s.slice(x).join("/"),P=re.slice(-ie.length);if((A.caseSensitive?P:P.toLowerCase())!==ie||re.length-ie.length<J.length)continue}h.push({node:A,index:d,skipped:S,statics:w,dynamics:j,optionals:z,extract:T,rawParams:L})}}if(v.optional){const $=S|1<<v.depth+1;for(let A=v.optional.length-1;A>=0;A--){const J=v.optional[A];h.push({node:J,index:x,skipped:$,statics:w,dynamics:j,optionals:z,extract:T,rawParams:L})}if(!G)for(let A=v.optional.length-1;A>=0;A--){const J=v.optional[A],{prefix:ie,suffix:re}=J;if(ie||re){const P=J.caseSensitive?V:W??=V.toLowerCase();if(ie&&!P.startsWith(ie)||re&&P.indexOf(re,P.length-re.length)<ie.length)continue}h.push({node:J,index:x+1,skipped:S,statics:w,dynamics:j,optionals:z+Yl(d,x),extract:T,rawParams:L})}}if(!G&&v.dynamic&&V)for(let $=v.dynamic.length-1;$>=0;$--){const A=v.dynamic[$],{prefix:J,suffix:ie}=A;if(J||ie){const re=A.caseSensitive?V:W??=V.toLowerCase();if(J&&!re.startsWith(J)||ie&&re.indexOf(ie,re.length-ie.length)<J.length)continue}h.push({node:A,index:x+1,skipped:S,statics:w,dynamics:j+Yl(d,x),optionals:z,extract:T,rawParams:L})}if(!G&&v.staticInsensitive){const $=v.staticInsensitive.get(W??=V.toLowerCase());$&&h.push({node:$,index:x+1,skipped:S,statics:w+Yl(d,x),dynamics:j,optionals:z,extract:T,rawParams:L})}if(!G&&v.static){const $=v.static.get(V);$&&h.push({node:$,index:x+1,skipped:S,statics:w+Yl(d,x),dynamics:j,optionals:z,extract:T,rawParams:L})}if(v.pathless)for(let $=v.pathless.length-1;$>=0;$--){const A=v.pathless[$];h.push({node:A,index:x,skipped:S,statics:w,dynamics:j,optionals:z,extract:T,rawParams:L})}}if(m)return m;if(r&&p){let b=p.index;for(let x=0;x<p.index;x++)b+=s[x].length;const v=b===t.length?"/":t.slice(b);return p.rawParams??=Object.create(null),p.rawParams["**"]=decodeURIComponent(v),p}return null}function Yl(t,s){return 2**(t-s-1)}function O1(t,s){return t===2**(s-1)-1}function ly(t,s,i){let r,o;try{[r,o]=Vv(t,s,i)}catch{return null}if(i.rawParams=r,i.extract=o,!i.node.parse)return!0;try{if(i.node.parse(r)===!1)return null}catch{}return!0}function Fl(t,s){return t?s.statics>t.statics||s.statics===t.statics&&(s.dynamics>t.dynamics||s.dynamics===t.dynamics&&(s.optionals>t.optionals||s.optionals===t.optionals&&((s.node.kind===bs)>(t.node.kind===bs)||s.node.kind===bs==(t.node.kind===bs)&&s.node.depth>t.node.depth))):!0}function E1(t,s,i){const r=Hv(t),o=`/${r}`,c=s?o:o.toLowerCase(),d=`${c}/`,h={input:({url:p})=>{const m=s?p.pathname:p.pathname.toLowerCase();return m===c?p.pathname="/":m.startsWith(d)&&(p.pathname=p.pathname.slice(o.length)),p},output:({url:p})=>(p.pathname=Ja(`/${r}${p.pathname}`),p)};return i?{input:({url:p})=>qf(i,h.input({url:p})),output:({url:p})=>h.output({url:Xv(i,p)})}:h}function qf(t,s){const i=t?.input?.({url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function Xv(t,s){const i=t?.output?.({url:s});if(i){if(typeof i=="string")return new URL(i);if(i instanceof URL)return i}return s}function N1(t,s){const{createMutableStore:i,createReadonlyStore:r,batch:o}=s,c=new Map,d=i("idle"),h=i(t),p=i(void 0),m=i([]),b=r(()=>m.get().map(j=>c.get(j).get())),v=r(()=>({status:d.get(),isLoading:d.get()==="pending",matches:b.get(),location:h.get(),resolvedLocation:p.get()}));function x(j){let z=c.get(j);return z||(z=i(void 0),c.set(j,z)),z}const S={status:d,location:h,resolvedLocation:p,ids:m,matches:b,byRoute:c,__store:v,getMatchStore:x,setMatches:w};function w(j){const z=m.get(),T=j.map(L=>L.routeId);o(()=>{W_(z,T)||m.set(T);for(const L of z)T.includes(L)||c.get(L).set(()=>{});for(const L of j){const G=x(L.routeId);G.get()!==L&&G.set(L)}})}return S}var Ss="__TSR_index",oy="popstate",uy="beforeunload",z1=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function lo(t){const s=z1.exec(t);return s?"/"+t.slice(s[0].length):t}function Jv(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,s=>`
|
|
10
|
-
\r`.includes(s)?"":encodeURIComponent(s))),lo(t)}function T1(t){let s=t.getLocation();const i=new Set,r=d=>{s=t.getLocation(),i.forEach(h=>h({location:s,action:d}))},o=d=>{t.notifyOnIndexChange??!0?r(d):s=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 p of h){const m=vo(d.path,d.state);if(await p.blockerFn({currentLocation:s,nextLocation:m,action:d.type})){t.onBlocked?.();return}}d.task()};return{get location(){return s},get length(){return t.getLength()},subscribers:i,subscribe:d=>(i.add(d),()=>{i.delete(d)}),push:(d,h,p)=>{const m=s.state[Ss];h=cy(m+1,h),c({task:()=>{t.pushState(d,h),r({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:d,state:h})},replace:(d,h,p)=>{const m=s.state[Ss];h=cy(m,h),c({task:()=>{t.replaceState(d,h),r({type:"REPLACE"})},navigateOpts:p,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:()=>s.state[Ss]!==0,createHref:d=>t.createHref(d),block:d=>{if(!t.setBlockers)return()=>{};const h=t.getBlockers?.()??[];return t.setBlockers([...h,d]),()=>{const p=t.getBlockers?.()??[];t.setBlockers?.(p.filter(m=>m!==d))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r,_getBlockers:()=>t.getBlockers?.()??[]}}function cy(t,s){const i=fd();return{...s,key:i,__TSR_key:i,[Ss]:t}}function R1(t){const s=typeof document<"u"?window:void 0,i=s.history.pushState,r=s.history.replaceState;let o=[];const c=()=>o,d=A=>o=A,h=A=>Jv(A),p=(()=>vo(`${s.location.pathname}${s.location.search}${s.location.hash}`,s.history.state));if(!s.history.state?.__TSR_key&&!s.history.state?.key){const A=fd();s.history.replaceState({[Ss]:0,key:A,__TSR_key:A},"")}let m=p(),b,v=!1,x=!1,S=!1,w=!1;const j=()=>m;let z;const T=()=>{z&&($._ignoreSubscribers=!0,(z[2]?s.history.pushState:s.history.replaceState)(z[1],"",z[0]),$._ignoreSubscribers=!1,z=void 0,b=void 0)},L=(A,J,ie)=>{const re=!!z;re||(b=m),m=vo(J,ie),z=[m.href,ie,z?.[2]||A],re||queueMicrotask(()=>T())},G=A=>{m=p(),$.notify({type:A})},V=async()=>{if(w=!1,x){x=!1;return}const A=p(),J=A.state[Ss]-m.state[Ss],ie=J===1,re=J===-1,P=!ie&&!re||v;v=!1;const I=P?"GO":re?"BACK":"FORWARD",fe=P?{type:"GO",index:J}:{type:re?"BACK":"FORWARD"};if(S)S=!1;else{const ye=c();if(typeof document<"u"&&ye.length){for(const pe of ye)if(await pe.blockerFn({currentLocation:m,nextLocation:A,action:I})){x=!0,s.history.go(-J),$.notify(fe);return}}}m=p(),$.notify(fe)},W=A=>{if(w){w=!1;return}let J=!1;const ie=c();if(typeof document<"u"&&ie.length)for(const re of ie){const P=re.enableBeforeUnload??!0;if(P===!0){J=!0;break}if(typeof P=="function"&&P()===!0){J=!0;break}}if(J)return A.preventDefault(),A.returnValue=""},$=T1({getLocation:j,getLength:()=>s.history.length,pushState:(A,J)=>L(!0,A,J),replaceState:(A,J)=>L(!1,A,J),back:A=>(A&&(S=!0,w=!0),s.history.back()),forward:A=>{A&&(S=!0,w=!0),s.history.forward()},go:(A,J)=>{v=!0,J&&(S=!0,w=!0),s.history.go(A)},createHref:h,flush:T,destroy:()=>{s.history.pushState=i,s.history.replaceState=r,s.removeEventListener(uy,W,{capture:!0}),s.removeEventListener(oy,V)},onBlocked:()=>{b&&m!==b&&(m=b)},getBlockers:c,setBlockers:d,notifyOnIndexChange:!1});return $._ignoreNextBeforeUnload=A=>{w=!1;try{A=new URL(A,s.document.baseURI).href,w=/^https?:/.test(A)&&(!A.includes("#")||A.split("#")[0]!==s.location.href.split("#")[0])}catch{}},s.addEventListener(uy,W,{capture:!0}),s.addEventListener(oy,V),s.history.pushState=function(...A){const J=i.apply(s.history,A);return $._ignoreSubscribers||G("PUSH"),J},s.history.replaceState=function(...A){const J=r.apply(s.history,A);return $._ignoreSubscribers||G("REPLACE"),J},$}function vo(t,s){const i=Jv(t),r=i.indexOf("#"),o=i.indexOf("?");if(!s){const c=fd();s={[Ss]:0,key:c,__TSR_key:c}}return{href:i,pathname:i.slice(0,r>-1?o>-1?Math.min(r,o):r:o>-1?o:i.length),hash:r>-1?i.slice(r):"",search:o>-1?i.slice(o,r===-1?void 0:r):"",state:s}}function fd(){return(Math.random()+1).toString(36).slice(7)}function mf(t,s){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==s||!!t.username||!!t.password}function pf(t){return t.pathname+t.search+t.hash}function fy(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function Ro(t,s){return{fromLocation:s,toLocation:t,pathChanged:s?.pathname!==t.pathname,hrefChanged:s?.href!==t.href,hashChanged:s?.hash!==t.hash}}function dy({key:t,__TSR_key:s,__TSR_index:i,__hashScrollIntoViewOptions:r,...o}){return o}function A1(t){return t.findIndex(s=>s.status==="error"||s.status==="notFound"||s._notFound)+1}function C1(t,s,i,r,o,c){r&&(s=s.slice(0,r)),o&&(i=i.slice(0,o));for(const d of s){if(c&&t._tx!==c)return;i.some(h=>h.routeId===d.routeId)||t.routesById[d.routeId].options.onLeave?.(d)}for(const d of i){if(c&&t._tx!==c)return;t.routesById[d.routeId].options[s.some(h=>h.routeId===d.routeId)?"onStay":"onEnter"]?.(d)}}var M1=class{constructor(t,s){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async i=>(i(),!1),this.update=i=>{const r=this.options;this.options={...r,...i},this.isServer=this.options.isServer??ey??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=R1()),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!=="/"&&Hv(o)?E1(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||ey){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=N1(this.latestLocation,h),o1(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const i=_1(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&v1(this.options.routeMasks,i.processedTree),{...i,resolvePathCache:yo(1e3)}},this.subscribe=(i,r)=>{const o={eventType:i,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=i=>{for(const r of this.subscribers)if(r.eventType===i.type)try{r.fn(i)}catch(o){console.error(o)}},this.parseLocation=(i,r)=>{const o=({pathname:p,search:m,hash:b,href:v},x)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(p)){const z=this.options.parseSearch(m),T=this.options.stringifySearch(z);return{href:p+T+b,publicHref:p+T+b,pathname:rr(p),external:!1,searchStr:T,search:Fa(r?.search,z),hash:rr(b.slice(1)),state:xs(r?.state,x)}}const S=qf(this.rewrite,new URL(v,this.origin)),w=this.options.parseSearch(S.search),j=this.options.stringifySearch(w);return S.search=j,{href:S.href.replace(S.origin,""),publicHref:v,pathname:rr(lo(S.pathname)),external:!!this.rewrite&&mf(S,this.origin),searchStr:j,search:Fa(r?.search,w),hash:rr(S.hash.slice(1)),state:xs(r?.state,x)}},c=o(i,i.state),{__tempLocation:d,__tempKey:h}=c.state;if(d&&(!h||h===this.tempLocationKey)){const p=o(d,{...d.state,__tempLocation:void 0,key:c.state.key,__TSR_key:c.state.__TSR_key});return p.maskedLocation=c,p}return c},this.matchRoutes=(i,r,o)=>typeof i=="string"?this.matchRoutesInternal({pathname:i,search:r},o):this.matchRoutesInternal(i,r),this.getMatchedRoutes=i=>{const r=Object.create(null),o=S1(gn(i),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[o?.branch||[this.routesById.__root__],r,o?.route]},this.buildLocation=i=>{{const d=this.staticLocations.get(i);if(d)return d}let r=!1;const o=(d={})=>{if(d.href){const ye=vo(d.href,{});d={...d,to:qf(this.rewrite,new URL(ye.pathname,this.origin)).pathname,search:this.options.parseSearch(ye.search),hash:ye.hash.slice(1)}}const h=i._fromLocation||this._pendingLocation||this.latestLocation;let p;const m=()=>(r=!0,h),b=()=>p??=this.matchRoutesLightweight(m()),v=d.to?`${d.to}`:".",x=sy(v[0]==="/"?"":d.unsafeRelative==="path"?m().pathname:d.from??b()[1],v,this.options.trailingSlash,this.resolvePathCache),S=this.routesByPath[gn(x)],w=x.includes("$");let j;if(S)j=S._branch??=Pv(S);else if(w)j=[];else{const[ye,pe,U]=this.getMatchedRoutes(x);j=ye,this.options.notFoundRoute&&(!U||U.path!=="/"&&pe["**"])&&(j=[...j,this.options.notFoundRoute])}const z=w?S?._interpolation??vr(!1,{fullPath:x},0):void 0;let T;for(const ye of j){const pe=ye.options.params?.stringify??ye.options.stringifyParams;if(pe){const U=b()[3];if(T??=gf(d.params,U),!Zv(T))break;T===U&&(T=Object.assign(io(),T));try{Object.assign(T,pe(T))}catch{}}}T??=gf(d.params,k1(d.params,z)?b()[3]:yf);const L=i.leaveParams?x:lo(rr(z?ay(x,z,T,this.pathParamsDecoder):x)),G=L1(j,i._includeValidateSearch),V=()=>{let ye=b()[2];if(i._includeValidateSearch&&this.options.search?.strict){const pe={};j.forEach(U=>{if(U.options.validateSearch)try{Object.assign(pe,oo(U.options.validateSearch,{...pe,...ye}))}catch{}}),ye=pe}return ye},W=G.length?U1(G,V(),d):d.search===!0?V():typeof d.search=="function"?d.search(V()):d.search||yf,$=this.options.stringifySearch(W),A=d.hash===!0?m().hash:typeof d.hash=="function"?d.hash(m().hash):d.hash||void 0,J=A?`#${A}`:"",ie=d.state?d.state===!0?m().state:typeof d.state=="function"?d.state(m().state):d.state:yf,re=`${L}${$}${J}`;let P,I,fe=!1;if(this.rewrite){const ye=new URL(re,this.origin),pe=ye.origin,U=Xv(this.rewrite,ye);P=pf(ye),mf(U,pe)?(I=U.href,fe=!0):I=lo(pf(U))}else P=I_(re),I=P;return{publicHref:I,href:P,pathname:L,search:W,searchStr:$,state:ie,hash:A??"",external:fe,unmaskOnReload:d.unmaskOnReload}},c=o(i);if(i.mask)c.maskedLocation=o({from:i.from,...i.mask});else if(this.options.routeMasks){const d=b1(c.pathname,this.processedTree);if(d){const h=Object.assign(io(),d.rawParams),{from:p,params:m,...b}=d.route,v=gf(m,h);c.maskedLocation=o({from:i.from,...b,params:v})}}return!r&&i._fromLocation&&this.staticLocations.set(i,c),c},this.commitLocation=async({viewTransition:i,ignoreBlocker:r,...o})=>{const c=o.maskedLocation??o;if(c.external)return hy(this,c.publicHref,{replace:o.replace,ignoreBlocker:r});let d;const h=gn(this.latestLocation.href)===gn(o.href)&&Hn(dy(o.state),dy(this.latestLocation.state)),p=this._commitPromise;let m;const b=new Promise(v=>{m=v});if(b.resolve=()=>{m(),p?.resolve()},this._commitPromise=b,h)this.load();else{let{maskedLocation:v,hashScrollIntoView:x,...S}=o;v&&(S={...v,state:{...v.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=i,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:i,resetScroll:r,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:d,...h}={})=>{const p=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=p;const m=this.commitLocation({...p,viewTransition:c,replace:i,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:d});return queueMicrotask(()=>{this._pendingLocation===p&&(this._pendingLocation=void 0)}),m},this.navigate=async({to:i,reloadDocument:r,href:o,publicHref:c,...d})=>{const h=o?yr(o):void 0;if(h||r){if(i!==void 0||!o){const m=this.buildLocation({to:i,...d}),b=m.maskedLocation??m;o??=b.publicHref,c??=b.publicHref}return hy(this,!h&&c?c:o,d)}return this.buildAndCommitLocation({...d,href:o,to:i,_isNavigate:!0})},this.load=async i=>{this.updateLatestLocation(),i?.action&&(this._scroll.h=i.action.type==="PUSH"||i.action.type==="REPLACE"),await F1(this,i)},this.startViewTransition=i=>{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(Ro(c,d)):r.types;if(h===!1)return i();o={update:i,types:h}}else o=i;return document.startViewTransition(o).updateCallbackDone}return i()},this.invalidate=i=>{const r=this._committed,o=i?.filter,c=this._preloads,d=new Set,h=b=>{(!o||o(b))&&d.add(b.id)};r.forEach(h),this._cache.forEach(h),c?.forEach(b=>b.forEach(h)),this._tx?.[3].forEach(h);const p=[];for(const[b,v]of c??[])v.some(x=>d.has(x.id))&&(c.delete(b),p.push(b));const m=b=>{if(d.has(b.id)){const v=this.routesById[b.routeId],x={...b,invalid:!0,...(i?.forcePending||b.status==="error"||b.status==="notFound")&&fy(v)?{status:"pending",error:void 0}:void 0};return b._flight=void 0,x}return b};this._committed=r.map(m);for(const[b,v]of this._cache)d.has(b)&&(v.invalid=!0,i?.forcePending&&(v.status="pending"));for(const b of d){const v=this._flights?.get(b);this._flights?.delete(b),v&&!v[2]&&p.push(v[1])}for(const b of p)b.abort();return this.shouldViewTransition=!1,this.load({sync:i?.sync})},this.resolveRedirect=i=>{const r=i.options;let o=i.headers.get("Location")||r.href;if(!o){const d=this.buildLocation(r);o=(d.maskedLocation??d).publicHref||"/"}let c;if(qv.test(o)||(c=yr(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:mf(d,this.origin)||(o=pf(d),c=void 0)}return c&&(r.reloadDocument=!0),r.href=o,i.headers.set("Location",o),i},this.clearCache=i=>{const r=this._cache,o=this._preloads,c=i?.filter,d=[],h=[];for(const[m,b]of r)(!c||c(b))&&(h.push(m),d.push(b));const p=[];for(const[m,b]of o??[])(!c||b.some(c))&&(p.push(m),d.push(...b));for(const m of h)r.delete(m);for(const m of p)o.delete(m);for(const m of d){const b=m._flight;m._flight=void 0,b&&!--b[2]&&(this._flights?.get(m.id)===b&&this._flights.delete(m.id),p.push(b[1]))}for(const m of p)m.abort()},this.loadRouteChunk=Wa,this.preloadRoute=i=>V1(this,i),this.matchRoute=(i,r)=>{const o={...i,to:i.to?sy(i.from||"",i.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:i.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(),p=x1(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,h.pathname,this.processedTree);return!p||i.params&&!Hn(p.rawParams,i.params,!0)?!1:r?.includeSearch??!0?Hn(h.search,c.search,!0)?p.rawParams:!1:p.rawParams},this.getStoreConfig=s,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=e1(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??d1,parseSearch:t.parseSearch??f1,protocolAllowlist:t.protocolAllowlist??J_}),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 s=this.options.notFoundRoute;s&&(s.init(99999999999),this.routesById[s.id]!==s&&(s._interpolation=vr(!1,s,0)),this.routesById[s.id]=s)}matchRoutesInternal(t,s){const[i,r,o]=this.getMatchedRoutes(t.pathname);let c=i,d=!1;(o?o.path!=="/"&&r["**"]:gn(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const h=d?Z1(this.options.notFoundMode,c):void 0,p=new Array(c.length),m=this._committed,b=(x,S)=>{const w=m[S];return w?.routeId===x.id?w:x===this.options.notFoundRoute?m.find(j=>j.routeId===x.id):void 0};let v;for(let x=0;x<c.length;x++){const S=c[x],w=p[x-1];let j,z,T;{const fe=w?.search??t.search,ye=w?._strictSearch??void 0;try{const pe=oo(S.options.validateSearch,{...fe})??void 0;j={...fe,...pe},z={...ye,...pe}}catch(pe){let U=pe;if(pe instanceof bo||(U=new bo(pe.message,{cause:pe})),s?.throwOnError)throw U;j=fe,z={},T=U}}let L="",G="";try{L=S.options.loaderDeps?.({search:j})??"",G=L&&JSON.stringify(L)||""}catch(fe){if(s?.throwOnError)throw fe;T??=fe}const V=io(),W=S._interpolation?ay(S.fullPath,S._interpolation,r,this.pathParamsDecoder,V):S.fullPath,$=S.id+W+G,A=b(S,x),J=this._cache.get($)??(A?.id===$?A:void 0);v=J?._strictParams??Object.assign(V,v);let ie;if(!J)try{my(S,v)}catch(fe){if(ni(fe)||Kv(fe)?ie=fe:ie=new D1(fe.message,{cause:fe}),s?.throwOnError)throw ie}const re=A?"stay":"enter";let P;if(J)P={...J,cause:re,search:Fa(A?A.search:J.search,j),_strictSearch:z,searchError:T};else{const fe=fy(S)?"pending":"success";P={id:$,ssr:S.options.ssr,index:x,routeId:S.id,params:A?.params??v,_strictParams:v,pathname:W,updatedAt:Date.now(),search:A?Fa(A.search,j):j,_strictSearch:z,searchError:T,status:fe,isFetching:!1,error:void 0,paramsError:ie,context:{},abortController:s?._controller??new AbortController,cause:re,loaderDeps:A?xs(A.loaderDeps,L):L,invalid:!1,preload:!1,staticData:S.options.staticData||{},fullPath:S.fullPath}}const I=h===S.id;P._notFound&&!I&&(P.error=void 0),P._notFound=I,p[x]=P}for(let x=0;x<p.length;x++){const S=p[x];S.params=S.cause==="stay"?Fa(S.params,v):v,s?._controller&&(S.context={})}return p}matchRoutesLightweight(t){const s=_s(this.stores.ids.get()),i=s?this.stores.byRoute.get(s).get():void 0,r=i?.id,o=this.lightweightCache.get(t);if(o&&o[0]===r)return o[1];const[c,d]=this.getMatchedRoutes(t.pathname),h=_s(c),p={...t.search};for(const x of c)try{Object.assign(p,oo(x.options.validateSearch,p))}catch{}const m=i&&i.routeId===h.id&&i.pathname===t.pathname;let b;if(m)b=i.params;else{const x=d;for(const S of c)try{my(S,x)}catch{}b=x}const v=[c,h.fullPath,p,b];return this.lightweightCache.set(t,[r,v]),v}};async function hy(t,s,{replace:i,ignoreBlocker:r}){if(!Bv(s,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:i?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(s),i?window.location.replace(s):window.location.href=s}}var bo=class extends Error{},D1=class extends Error{};function oo(t,s){if(t==null)return{};if("~standard"in t){const i=t["~standard"].validate(s);if(i instanceof Promise)throw new bo("Async validation not supported");if(i.issues)throw new bo(JSON.stringify(i.issues,void 0,2),{cause:i});return i.value}return"parse"in t?t.parse(s):typeof t=="function"?t(s):{}}function gf(t,s){if(t===void 0||t===!0)return s;const i=Object.create(null);return t===!1||t===null?i:typeof t=="function"?(Object.assign(i,s),Object.assign(i,t(i))):Object.assign(i,s,t)}function k1(t,s){return typeof t=="function"?!0:!s||t===!1||t===null?!1:t===void 0||t===!0||s.some(i=>typeof i!="string"&&!od.call(t,i[1]))}const yf=Object.freeze({});function L1(t,s){const i=[];for(let r=0;r<t.length;r++){const o=t[r].options;if("search"in o)o.search?.middlewares&&i.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const d=({search:h,next:p})=>{const m=p(o.preSearchFilters?o.preSearchFilters.reduce((b,v)=>v(b),h):h);return o.postSearchFilters?o.postSearchFilters.reduce((b,v)=>v(b),m):m};i.push(d)}const c=o.validateSearch;if(s&&c){const d=({search:h,next:p,meta:m})=>{const b=p(h);try{const v=oo(c,b);if(m&&v)for(const x in v)x in b||(m.defaulted||=new Map).set(x,v[x]);return{...b,...v}}catch{}return b};i.push(d)}}return i}function U1(t,s,i){const r=(o,c,d)=>{if(o>=t.length){if(!i.search)return{};if(i.search===!0)return c;const p=Uv(i.search,c);return d&&(d.explicit=p),p}const h=(p,m)=>{if(m){const b=d||{};return{search:r(o+1,p,b),meta:b}}return r(o+1,p,d)};return t[o]({search:c,next:h,meta:d})};return r(0,s)}function Z1(t,s){if(t!=="root"){let i;for(let r=s.length-1;r>=0;r--){const o=s[r];if(o.options.notFoundComponent)return o.id;i||=o.children&&o.id}if(i)return i}return Ia}function my(t,s){const i=t.options.params?.parse??t.options.parseParams;i&&Object.assign(s,i(s))}function Bf(t,s){return t.options[s]?.preload?.()}function q1(t,s){const i=Bf(t,"component");let r=Bf(t,"pendingComponent");return s&&(r?r=r.then(s):s()),i&&r?Promise.all([i,r]).then(()=>{}):i??r}function Wa(t,s,i){const r=()=>s===!1?void 0:s?Bf(t,s):q1(t,i),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,...p}=d.options;Object.assign(t.options,p),t._lazy=!0}},d=>{throw t._lazy=void 0,d});return t._lazy=c,c.then(r)}function dd(t){const s=t.findIndex(i=>i.status!=="success"||i._notFound)+1;return s&&s<t.length?t.slice(0,s):t}function B1(t,s,i){const r=t._tx;return s&&r?.[2]===i&&!r[3].some(o=>o.routeId===s)}const yn=0,Qn=1,Ao=2,_t=3,ws=[4];function br(t){return typeof t[0]=="number"}function aa(t,s){return s.aborted?Promise.race([Promise.reject(s),t]):new Promise((i,r)=>{const o=()=>r(s);s.addEventListener("abort",o,{once:!0}),Promise.resolve(t).then(i,r).then(()=>s.removeEventListener("abort",o))})}function ia(t,s){return t.routesById[s.routeId]}function xr(t,s,i){return Kv(t)?[_t,t]:ni(t)?(t.routeId||=i,[Ao,t]):s?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[Qn,t]):[yn,t]}function hd(t,s){let i=xr(s,!0,t.id);if(i[0]!==Qn)return i;try{t.options.onError?.(i[1])}catch(r){i=xr(r,!0,t.id)}return i}function mr(t,s,i,r,o){return o[0].signal.aborted?ws:gd(t,s,i,hd(i,r),o)}async function $1(t,s,i,r,o,c){const[d,h]=s,p=i[0].signal,m=!!i[3];for(let b=i[6]??0;b<r;b++){const v=h[b],x=ia(t,v);v.abortController=i[0];const S=h[b-1]?.context??t.options.context??{},w={params:v.params,location:d,navigate:L=>t.navigate({...L,_fromLocation:d}),buildLocation:t.buildLocation,cause:m?"preload":v.cause,abortController:i[0],preload:m,matches:h,routeId:x.id};try{const L=v._ctx||=x.options.context?x.options.context({...w,deps:v.loaderDeps,context:S})||{}:void 0;v.context={...S,...L}}catch(L){return qn(t,v),[b,mr(t,s,x,L,i)]}if(p.aborted)return[b,ws];const j=v.paramsError??v.searchError;if(j!==void 0)return qn(t,v),[b,mr(t,s,x,j,i)];const z=x.options.beforeLoad;if(!z)continue;const T=v.status;b>=c&&(v.status="pending",i[7]?.());try{Sr(t,v,"beforeLoad",i[0]);const L=z({...w,search:v.search,context:v.context,...t.options.additionalContext}),G=await(typeof L?.then=="function"?aa(L,p):L);if(p.aborted)return[b,ws];const V=gd(t,s,x,xr(G,!1,x.id),i);if(V[0]!==yn)return qn(t,v),[b,V];v.context={...v.context,...G}}catch(L){return qn(t,v),[b,mr(t,s,x,L,i)]}finally{v.status=T,Sr(t,v,!1,i[0])}}o()}function md(t,s,i){if(!(!i||--i[2])){if(t._flights?.get(s.id)===i){const r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(s)&&r[3].some(o=>o.id===s.id)&&r[3].some(o=>o.isFetching==="beforeLoad"))return;t._flights.delete(s.id)}return i[1]}}function qn(t,s){const i=s._flight;s._flight=void 0,md(t,s,i)?.abort()}function Rt(t,s,i,r){const o=[];for(const c of s)if(!i?.includes(c)){const d=c._flight;if(c._flight=void 0,r&&d?.[2]===1&&t._flights?.get(c.id)===d&&i?.some(h=>h.id===c.id))d[2]=0;else{const h=md(t,c,d);h&&o.push(h)}}for(const c of o)c.abort()}function pd(t){for(const s of t){const i=s._flight;i&&i[2]++}}function Sr(t,s,i,r){if(s.isFetching=i,r&&t._tx?.[0]!==r)return;const o=t.stores.byRoute.get(s.routeId),c=o?.get();c?.id===s.id&&o.set({...c,isFetching:i})}function Iv(t,s,i,r,o,c,d){const h=s[0];return{params:i.params,location:h,navigate:p=>t.navigate({...p,_fromLocation:h}),cause:d?"preload":i.cause,abortController:o,preload:d,deps:i.loaderDeps,parentMatchPromise:c,context:i.context,route:r,...t.options.additionalContext}}async function py(t,s,i,r,o,c,d){const h=d[0],p=h.signal;if(p.aborted)return ws;if(!o)return[yn,void 0];let m=i._flight;Sr(t,i,"loader",h);try{if(!m){const b=new AbortController;m=[Promise.resolve().then(()=>o(Iv(t,s,i,r,b,c,!!d[3]))).then(v=>xr(v,!1,r.id),v=>xr(v,!0,r.id)).then(v=>(v[0]!==yn&&t._flights?.get(i.id)===m&&(t._flights.delete(i.id),m[2]||b.abort()),v[0]===Qn&&m[2]?hd(r,v[1]):v)),b,1],(t._flights??=new Map).set(i.id,m)}return i._flight=m,i.abortController=m[1],gd(t,s,r,await aa(m[0],p),d)}catch(b){if(b!==p||!p.aborted)throw b;return qn(t,i),ws}finally{Sr(t,i,!1,h)}}function gy(t,s,i){s[0]!==_t&&(t.status="success",t.error=void 0,s[0]===yn?(t.loaderData=s[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=i):t.invalid=!0)}function H1(t,s,i){const r=t._cache.get(s.id);if(r!==i||t._committed.some(c=>c.id===s.id&&c._flight===s._flight))return;const o={...s,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,t._cache.set(s.id,o),r&&qn(t,r)}function yy(t,s){return s[0]===Qn||s[0]===Ao?{...t,status:s[0]===Qn?"error":"notFound",error:s[1],_flight:void 0}:t}function Q1(t,s,i,r,o,c,d){const h=s[1][i],p=ia(t,h),m=!!c[3],b=t._cache.get(h.id);let v,x=!1,S;try{if(h.status==="success"&&(v=p.options.shouldReload,typeof v=="function"&&(v=v(Iv(t,s,h,p,c[0],o,m))),c[0].signal.aborted&&(S=ws)),!S)if(h.status!=="success")x=!0;else{const I=m||h.preload?p.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:p.options.staleTime??t.options.defaultStaleTime??0;x=!!(h.invalid||v||v===void 0&&Date.now()-h.updatedAt>=I&&(c[5]||h.cause==="enter"||c[2].some(fe=>fe.routeId===h.routeId&&fe.id!==h.id)))}}catch(I){h.invalid=!0,qn(t,h),S=mr(t,s,p,I,c)}const w=p.options.loader,j=typeof w=="function",z=j?w:w?.handler,T=!m||p.options.preload!==!1;let L=T&&w?t._flights?.get(h.id):void 0;L===h._flight||S?L=void 0:L&&!x&&!m&&v===void 0?x=!0:x||(L=void 0);const G=!!(w&&x&&h.status==="success"&&!m&&!c[4]&&((j?void 0:w.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),V=x&&T,W=V&&!G&&(h.status!=="success"||!!w),$=i>=d?c[7]:void 0,A=p.lazyFn&&p._lazy!==!0?$:void 0;if(V&&!w&&(h.invalid=!1,h.updatedAt=Date.now()),L&&L[2]++,W){const I=h._flight;h._flight=L,md(t,h,I)?.abort(),i>=d&&(h.status="pending"),$?.()}V||(h.isFetching=!1);const J=!S&&W?py(t,s,h,p,z,o,c).then(I=>(gy(h,I,m),I[0]===yn&&(w&&!c[0].signal.aborted&&H1(t,h,b),i>=d&&(h.status="pending")),I)):Promise.resolve(S??[yn,h.loaderData]),ie=(async()=>{try{const fe=Wa(p,void 0,A);fe&&await aa(fe,c[0].signal)}catch(fe){if(!s[1].some((ye,pe)=>pe<=i&&(ye.status==="error"||ye.status==="notFound"||ye._notFound)))return[i,mr(t,s,p,fe,c)]}const I=await J;W&&I[0]===yn&&h.status==="pending"&&!c[0].signal.aborted&&(h.status="success",$?.())})();if(r.push([i,J,ie]),!G)return J.then(I=>yy(h,I));const re={...h,status:"pending",preload:!1,_flight:L};h.invalid=!1,h.isFetching="loader";const P=py(t,s,re,p,z,o,c).then(I=>(h.isFetching=!1,gy(re,I,!1),I));return(s[2]??=[]).push([i,P,ie,re]),P.then(I=>yy(re,I))}async function $f(t,s,i,r,o=0){const c=i?.[1][1];let d=c?.routeId?s.findIndex(h=>h.routeId===c.routeId):i?.[0]??s.length-1;d<0&&(d=0);for(let h=d;h>=0;h--){const p=ia(t,s[h]);try{const m=Wa(p,!1);m&&await aa(m,r)}catch(m){if(m===r&&r.aborted)throw m}if(p.options.notFoundComponent)return h}return c?.routeId?d:o}function Is(t,s){s[2]&&(Rt(t,s[2].map(i=>i[3])),s[2]=void 0)}async function vy(t,s,i,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]>=_t)throw[h,d];!o&&d[0]!==yn&&(o=[h,d],await Promise.all((i??[]).map(p=>{if(!(p[0]<=h))return p[1].then(m=>{if(m[0]===_t)throw[p[0],m]})})))}})))}catch(c){return c}return s??o}function gd(t,s,i,r,o,c){for(;r[0]===_t;){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 p=t.buildLocation({...h,_fromLocation:s[0],_includeValidateSearch:!0}),m=p.maskedLocation??p;if(m.external){const b=d.clone();return b.options={...h},b.headers.set("Location",m.publicHref),t.resolveRedirect(b),o[3]?[_t,b]:[_t,b,m]}return[_t,d,p]}catch(p){r=c?[Qn,p]:hd(i,p),c=!0}}return r}async function Wv(t,s,i,r,o,c){const d=s[1];let h=await o,p=!1;const m=d.findIndex(S=>S._notFound),b=S=>S[1][0]===Ao?$f(t,d,S,r.signal):S[0];let v=m<0?d.length:m;if((h?.[1][0]??0)>=_t)v=0;else if(h){v=h[2]??=await b(h);for(const S of i){if(S[0]>=v)break;const w=await S[1];if(w[0]!==yn&&w[0]<_t&&!("loaderData"in d[S[0]])){h=[S[0],w],v=h[2]=await b(h);break}}}for(const S of i){if(S[0]>=v)break;const w=await S[2];if(w){h=w;break}}if((h?.[1][0]??0)>=_t){const S=h[1];if(S[0]!==_t||S[1].options.reloadDocument||S[2])return Is(t,s),S;p=!0,h=[0,[Qn,new Error("Too many redirects")]]}const x=h?h[2]??await b(h):m;if(x>=0){const S=h?.[1],w=S?.[0],j=d[x],z=S?.[1],T=()=>{S&&(j._notFound=void 0,w===Qn?j.status="error":(z.routeId=j.routeId,j.routeId===t.routeTree.id?(j.status="success",j._notFound=!0):j.status="notFound"),j.error=z,j.isFetching=!1)};T(),S||c?.();const L=ia(t,j);try{await aa(S?Promise.resolve().then(()=>Wa(L,w===Qn?"errorComponent":"notFoundComponent")):Promise.all([Wa(L),Wa(L,"notFoundComponent")]),r.signal)}catch(G){if(G===r.signal&&r.signal.aborted)return Is(t,s),ws}S?p&&(r.abort(),await Promise.all([...i.map(G=>G[1]),...i.map(G=>G[2]),...(s[2]??[]).map(G=>G[1])]),Is(t,s),Rt(t,d),T()):j.status="success"}return s}async function eb(t,s,i,r=0,o=s[1].length){const c=s[1];for(let d=r;d<o;d++){const h=c[d],p=ia(t,h).options;if(p.head||p.scripts)try{const m={ssr:t.options.ssr,matches:c,match:h,params:h.params,loaderData:h.loaderData},[b,v]=await aa(Promise.all([p.head?.(m),p.scripts?.(m)]),i);h.meta=b?.meta,h.links=b?.links,h.headScripts=b?.scripts,h.styles=b?.styles,h.scripts=v}catch(m){if(m===i&&i.aborted)break;console.error(m)}if(h.status!=="success"||h._notFound)break}return s}async function tb(t,s,i,r){const o=[s,i],c=r[0].signal;let d;try{const h=t.stores.matches.get();let p=i.findIndex(T=>T._notFound);if(t.options.notFoundMode!=="root"&&p>=0){const T=await $f(t,i,void 0,c,p);i[p]._notFound=void 0,i[T]._notFound=!0,p=T}let m=p<0?i.length:p+1,b=0;for(;b<m&&b!==p;){const T=i[b],L=r[2][b],G=h[b];if(L?.id!==T.id||L.status!=="success"||T.preload||G?.id!==T.id||G.status!=="success"||(b++,L._notFound||G._notFound))break}const v=[],x=r[6]??0;let S=x?Promise.resolve(i[x-1]):void 0;const w=()=>{for(let T=x;T<m&&!c.aborted;T++)S=Q1(t,o,T,v,S,r,b)},j=await $1(t,o,r,m,w,b);if(j){if(r[4]=!0,m=j[0],j[1][0]===Ao){const T=await $f(t,i,j,c);j[2]=T,m=Math.min(m,T+1)}else j[1][0]>=_t&&(m=0);w()}if(!c.aborted&&!r[3]){const T=[];for(const[L,G]of t._flights??[])G[2]||(t._flights.delete(L),T.push(G[1]));for(const L of T)L.abort()}const z=Wv(t,o,v,r[0],vy(v,j,o[2]),r[7]);o[2]?.length&&(o[3]=vy(o[2],void 0,void 0,z.then(T=>br(T)?0:dd(i).length,()=>0))),d=await z}catch(h){if(Is(t,o),h===c&&c.aborted)return ws;throw h}return br(d)?d:eb(t,d,c,r[6]===i.length?r[6]:0)}function Hf(t,s){if(t._tx!==s)return;const i=s[3],r=t.stores.matches.get();let o=t._pending;for(let c=0;c<i.length;c++){const d=i[c],h=d.status==="success"&&!d._notFound,p=r[c]?.id===d.id&&r[c]?.status==="pending";if(h&&!p)continue;const m=ia(t,d),b=h||d.invalid?0:m.options.pendingMs??t.options.defaultPendingMs,v=m.options.pendingComponent??t.options.defaultPendingComponent;if(!v||typeof b!="number"||b===1/0){o&&(o[0]=s,o[2]=0,o[4]=!0);return}const x=m.options.pendingMinMs??t.options.defaultPendingMinMs??0;let S=!1;if(o?.[1]===d.id?(S=o[0]!==s,o[0]=s):(clearTimeout(o?.[3]),t._pending=o=void 0),o||(t._pending=o=[s,d.id,p?Date.now()+x:s[4]+b,void 0,p||void 0,v]),o[4]&&!S&&o[5]===v)return;if(o[5]=v,!o[4]){clearTimeout(o[3]);const z=o[2]-Date.now();if(z>0){o[3]=setTimeout(()=>Hf(t,s),z);return}o[2]=0}const w=i.map(z=>({...z,_flight:void 0}));w[c].status="pending";const j=o[4]=t.startTransition(()=>t.stores.setMatches(w),w).then(z=>(z&&t._pending===o&&o[4]===j&&!o[2]&&(o[2]=Date.now()+x),z));return}}function lr(t,s){const i=t._pending;(t._tx===s||!t._tx?.[3].some(r=>r.id===i?.[1]))&&(clearTimeout(i?.[3]),t._pending=void 0)}async function by(t,s){const i=t._pending;if(!i)return;clearTimeout(i[3]);const r=i[2]-Date.now();if(!i[4]||r<=0||!dd(s[3]).some(c=>c.id===i[1]))return;let o;try{await aa(new Promise(c=>{o=setTimeout(c,r)}),s[0].signal)}catch{}clearTimeout(o)}function nb(t,s){t._committed=s,t.stores.setMatches(s)}function G1(t,s,i,r){const o=t._committed,c=t._lifecycleEnd,d=t._cache;for(const b of i)b.preload=!1,r&&(b._assetEnd=void 0);const h=dd(i).length,p=new Map;{const b=Date.now(),v=new Set;for(let x=0;x<i.length;x++){const S=i[x];(x<h||S.status==="success")&&v.add(S.id)}for(const x of[...o,...d.values()]){if(x.status!=="success"||v.has(x.id))continue;const S=ia(t,x);!S.options.loader||b-x.updatedAt>=(x.preload?S.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:S.options.gcTime??t.options.defaultGcTime??3e5)||p.set(x.id,d.get(x.id)===x?x:{...x,_flight:void 0,isFetching:!1,context:{}})}}s[3]=[],t._cache=p;const m=t._lifecycleEnd=A1(i);nb(t,i),Rt(t,[...d.values(),...o].filter(b=>b._flight&&p.get(b.id)!==b),i),C1(t,o,i,c,m,s)}async function Vl(t,s){let i=t._tx;for(;i&&i!==s;)s=i,await i[5],i=t._tx}function sb(t,s,i){const r=i[1].options,o=i[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=s[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 K1(t,s,i,r,o){const c=i.map(p=>({...p}));pd(c);for(const p of r)qn(t,c[p[0]]),c[p[0]]=p[3];const d=[s[2],c];let h;try{h=await Wv(t,d,r,s[0],o)}catch(p){throw Rt(t,c),p}if(br(h)){Rt(t,c),h[0]===_t&&t._tx===s&&t._committed===i&&await sb(t,s,h);return}if(await eb(t,h,s[0].signal),t._tx!==s||t._committed!==i){Rt(t,c);return}for(const p of c){const m=t._cache.get(p.id);m?._flight&&m._flight===p._flight&&(t._cache.delete(p.id),qn(t,m))}nb(t,c),Rt(t,i,c)}async function Y1(t,s,i,r,o,c){const d=await tb(t,s[2],s[3],[s[0],s[1],t._committed,void 0,o,i,c,r]);if(br(d)){const v=d[0]===_t&&t._tx===s;if((!v||d[1].options.reloadDocument)&&lr(t,s),Rt(t,s[3]),s[3]=[],!v)return;if(t._tx!==s){lr(t,s);return}await sb(t,s,d);return}const h=d[1];if(t._tx===s&&await by(t,s),t._tx!==s){lr(t,s),Rt(t,h),Is(t,d);return}const p=s[2],m=Ro(p,t.stores.resolvedLocation.get()),b=d[2];await t.startViewTransition(async()=>{if(t._tx===s&&await by(t,s),t._tx!==s){lr(t,s),Rt(t,h),Is(t,d);return}const v=()=>{lr(t,s),G1(t,s,h,c),t._tx===s&&(t.emit({type:"onLoad",...m}),t._tx===s&&t.emit({type:"onBeforeRouteMount",...m}))},x=await t.startTransition(v,h);if(t._tx!==s){Is(t,d);return}b?.length&&K1(t,s,h,b,d[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(p),t.stores.status.set("idle"),t._tx===s&&t.emit({type:"onResolved",...m}),x&&t._tx===s&&t.emit({type:"onRendered",...m})}),t._tx===s&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function F1(t,s){const i=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,p=t._handoff,m=p?.[0](),b=new AbortController,v=t._preflight;if(t._preflight=b,m||p?.[1](),v?.abort(),!b.signal.aborted){const V=Ro(c,r);t.emit({type:"onBeforeNavigate",...V}),b.signal.aborted||t.emit({type:"onBeforeLoad",...V})}if(b.signal.aborted){await Vl(t,i);return}const x=o.href===c.href;let S=b;const w=t.matchRoutes(c,{_controller:b});pd(w);const j=m?p[1](w):void 0;if(j?S=m:m?.abort(),b.signal.aborted){Rt(t,w),await Vl(t,i);return}t._preflight=void 0;let z;const T=()=>Y1(t,G,x,()=>Hf(t,G),s?.sync,j),L=s?.sync?new Promise(V=>z=V):Promise.resolve().then(T),G=[S,h,c,w,Date.now(),L.then(()=>Vl(t,G))];if(t._tx=G,i){for(const V of t.stores.matches.get()){if(t._tx!==G)break;V.isFetching&&Sr(t,V,!1)}i[0].abort(),Rt(t,i[3],G[3],!0)}if(t._tx!==G){Rt(t,G[3]),G[3]=[],z?.(),await Vl(t,G);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(c)}),(j||!t._committed.length&&w[0]?.status!=="success"&&!w.some(V=>V._notFound))&&Hf(t,G),z?.(T()),await G[5]}async function V1(t,s){let i=t.buildLocation(s);for(let r=0;;r++){const o=t._committed,c=new AbortController;let d,h,p;try{try{d=t.matchRoutes(i,{_controller:c}),pd(d),h=(t._preloads??=new Map).set(c,d),p=await tb(t,i,d,[c,r,o,!0])}finally{h&&(h=h.delete(c),Rt(t,d)),c.abort()}if(!br(p))return p[1];if(!h||p.length<3)return;i=p[2]}catch(m){ni(m)||console.error(m);return}}}const P1="Error preloading route! ☝️";var ab=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=s=>{this.originalIndex=s,this._branch=void 0;const i=this.options,r=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Ia:this.parentRoute||ud();let o=r?Ia:i?.path;o&&o!=="/"&&(o=$v(o));const c=i?.id||o,d=r?Ia:Ja((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const h=d==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Ja(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=d,this._fullPath=h,this._to=gn(h)},this.addChildren=s=>this._addFileChildren(s),this._addFileChildren=s=>(Array.isArray(s)&&(this.children=s),typeof s=="object"&&s!==null&&(this.children=Object.values(s)),this),this._addFileTypes=()=>this,this.updateLoader=s=>(Object.assign(this.options,s),this),this.update=s=>(Object.assign(this.options,s),this),this.lazy=s=>(this.lazyFn=s,this),this.redirect=s=>p1({from:this.fullPath,...s}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},X1=class extends ab{constructor(t){super(t)}},yd=class extends ee.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,s){const i=t.getResetKey();return s.error&&s.resetKey!==i?{resetKey:i,error:0}:{resetKey:i}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,s){this.props.onCatch?.(t,s)}render(){const t=this.state.error;return t?ee.createElement(this.props.errorComponent??J1,{error:t[0],reset:this.reset}):this.props.children}};function J1({error:t}){const[s,i]=ee.useState(!1);return g.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[g.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[g.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),g.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>i(r=>!r),children:s?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),s?g.jsx("div",{children:g.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t?.message?g.jsx("code",{children:t.message}):null})}):null]})}var xy=()=>!0,I1=()=>!1;function W1({children:t,fallback:s=null}){return g.jsx(To.Fragment,{children:ew()?t:s})}function ew(t=!0){return To.useSyncExternalStore(tw,xy,t?I1:xy)}function tw(){return()=>{}}var ib=ee.createContext(null);function xn(t){return ee.useContext(ib)}function nw(t,s){const i=t.stores.location,r=new Set;let o,c;const d=h=>{B1(t,s,h)||(o=h,r.forEach(p=>p()))};return[()=>o??i.get(),h=>(r.size||(o=i.get(),c=i.subscribe(d).unsubscribe),r.add(h),()=>{r.delete(h),r.size||(c(),o=void 0)})]}var _r=ee.createContext(void 0),sw=ee.createContext(void 0);function aw({update:t,notify:s,unwatched:i}){return{link:r,unlink:o,propagate:c,checkDirty:d,shallowPropagate:h};function r(m,b,v){const x=b.depsTail;if(x!==void 0&&x.dep===m)return;const S=x!==void 0?x.nextDep:b.deps;if(S!==void 0&&S.dep===m){S.version=v,b.depsTail=S;return}const w=m.subsTail;if(w!==void 0&&w.version===v&&w.sub===b)return;const j=b.depsTail=m.subsTail={version:v,dep:m,sub:b,prevDep:x,nextDep:S,prevSub:w,nextSub:void 0};S!==void 0&&(S.prevDep=j),x!==void 0?x.nextDep=j:b.deps=j,w!==void 0?w.nextSub=j:m.subs=j}function o(m,b=m.sub){const v=m.dep,x=m.prevDep,S=m.nextDep,w=m.nextSub,j=m.prevSub;return S!==void 0?S.prevDep=x:b.depsTail=x,x!==void 0?x.nextDep=S:b.deps=S,w!==void 0?w.prevSub=j:v.subsTail=j,j!==void 0?j.nextSub=w:(v.subs=w)===void 0&&i(v),S}function c(m){let b=m.nextSub,v;e:do{const x=m.sub;let S=x.flags;if(S&60?S&12?S&4?!(S&48)&&p(m,x)?(x.flags=S|40,S&=1):S=0:x.flags=S&-9|32:S=0:x.flags=S|32,S&2&&s(x),S&1){const w=x.subs;if(w!==void 0){const j=(m=w).nextSub;j!==void 0&&(v={value:b,prev:v},b=j);continue}}if((m=b)!==void 0){b=m.nextSub;continue}for(;v!==void 0;)if(m=v.value,v=v.prev,m!==void 0){b=m.nextSub;continue e}break}while(!0)}function d(m,b){let v,x=0,S=!1;e:do{const w=m.dep,j=w.flags;if(b.flags&16)S=!0;else if((j&17)===17){if(t(w)){const z=w.subs;z.nextSub!==void 0&&h(z),S=!0}}else if((j&33)===33){(m.nextSub!==void 0||m.prevSub!==void 0)&&(v={value:m,prev:v}),m=w.deps,b=w,++x;continue}if(!S){const z=m.nextDep;if(z!==void 0){m=z;continue}}for(;x--;){const z=b.subs,T=z.nextSub!==void 0;if(T?(m=v.value,v=v.prev):m=z,S){if(t(b)){T&&h(z),b=m.sub;continue}S=!1}else b.flags&=-33;b=m.sub;const L=m.nextDep;if(L!==void 0){m=L;continue e}}return S}while(!0)}function h(m){do{const b=m.sub,v=b.flags;(v&48)===32&&(b.flags=v|16,(v&6)===2&&s(b))}while((m=m.nextSub)!==void 0)}function p(m,b){let v=b.depsTail;for(;v!==void 0;){if(v===m)return!0;v=v.prevDep}return!1}}function iw(t,s,i){const r=typeof t=="object",o=r?t:void 0;return{next:(r?t.next:t)?.bind(o),error:(r?t.error:s)?.bind(o),complete:(r?t.complete:i)?.bind(o)}}const Qf=[];let uo=0;const{link:Sy,unlink:rw,propagate:lw,checkDirty:rb,shallowPropagate:_y}=aw({update(t){return t._update()},notify(t){Qf[Gf++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,xo(t))}});let Pl=0,Gf=0,ln,Kf=0;function ow(t){try{++Kf,t()}finally{--Kf||lb()}}function xo(t){const s=t.depsTail;let i=s!==void 0?s.nextDep:t.deps;for(;i!==void 0;)i=rw(i,t)}function lb(){if(!(Kf>0)){for(;Pl<Gf;){const t=Qf[Pl];Qf[Pl++]=void 0,t.notify()}Pl=0,Gf=0}}function wy(t,s){const i=typeof t=="function",r=t,o={_snapshot:i?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:i?0:1,get(){return ln!==void 0&&Sy(o,ln,uo),o._snapshot},subscribe(c){const d=iw(c),h={current:!1},p=uw(()=>{o.get(),h.current?(ln=void 0,d.next?.(o._snapshot)):h.current=!0});return{unsubscribe:()=>{p.stop()}}},_update(c){const d=ln,h=s?.compare??Object.is;if(i)ln=o,++uo,o.depsTail=void 0;else if(c===void 0)return!1;i&&(o.flags=5);try{const p=o._snapshot,m=typeof c=="function"?c(p):c===void 0&&i?r(p):c;return p===void 0||!h(p,m)?(o._snapshot=m,!0):!1}finally{ln=d,i&&(o.flags&=-5),xo(o)}}};return i?(o.flags=17,o.get=function(){const c=o.flags;if(c&16||c&32&&rb(o.deps,o)){if(o._update()){const d=o.subs;d!==void 0&&_y(d)}}else c&32&&(o.flags=c&-33);return ln!==void 0&&Sy(o,ln,uo),o._snapshot}):o.set=function(c){if(o._update(c)){const d=o.subs;d!==void 0&&(lw(d),_y(d),lb())}},o}function uw(t){const s=()=>{const r=ln;ln=i,++uo,i.depsTail=void 0,i.flags=6;try{return t()}finally{ln=r,i.flags&=-5,xo(i)}},i={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&rb(this.deps,this)?s():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,xo(this)}};return s(),i}var vf={exports:{}},bf={},xf={exports:{}},Sf={};var jy;function cw(){if(jy)return Sf;jy=1;var t=jr();function s(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var i=typeof Object.is=="function"?Object.is:s,r=t.useState,o=t.useEffect,c=t.useLayoutEffect,d=t.useDebugValue;function h(v,x){var S=x(),w=r({inst:{value:S,getSnapshot:x}}),j=w[0].inst,z=w[1];return c(function(){j.value=S,j.getSnapshot=x,p(j)&&z({inst:j})},[v,S,x]),o(function(){return p(j)&&z({inst:j}),v(function(){p(j)&&z({inst:j})})},[v]),d(S),S}function p(v){var x=v.getSnapshot;v=v.value;try{var S=x();return!i(v,S)}catch{return!0}}function m(v,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Sf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:b,Sf}var Oy;function fw(){return Oy||(Oy=1,xf.exports=cw()),xf.exports}var Ey;function dw(){if(Ey)return bf;Ey=1;var t=jr(),s=fw();function i(m,b){return m===b&&(m!==0||1/m===1/b)||m!==m&&b!==b}var r=typeof Object.is=="function"?Object.is:i,o=s.useSyncExternalStore,c=t.useRef,d=t.useEffect,h=t.useMemo,p=t.useDebugValue;return bf.useSyncExternalStoreWithSelector=function(m,b,v,x,S){var w=c(null);if(w.current===null){var j={hasValue:!1,value:null};w.current=j}else j=w.current;w=h(function(){function T($){if(!L){if(L=!0,G=$,$=x($),S!==void 0&&j.hasValue){var A=j.value;if(S(A,$))return V=A}return V=$}if(A=V,r(G,$))return A;var J=x($);return S!==void 0&&S(A,J)?(G=$,A):(G=$,V=J)}var L=!1,G,V,W=v===void 0?null:v;return[function(){return T(b())},W===null?void 0:function(){return T(W())}]},[b,v,x,S]);var z=o(m,w[0],w[1]);return d(function(){j.hasValue=!0,j.value=z},[z]),p(z),z},bf}var Ny;function hw(){return Ny||(Ny=1,vf.exports=dw()),vf.exports}var mw=hw();function pw(t,s){return t===s}function ta(t,s=r=>r,i){const r=i?.compare??pw,o=ee.useCallback(d=>{const{unsubscribe:h}=t.subscribe(d);return h},[t]),c=ee.useCallback(()=>t.get(),[t]);return mw.useSyncExternalStoreWithSelector(o,c,c,s,r)}var zy={};function gw(t,s){const i=ee.useRef();return r=>{const o=t?.select?t.select(r):r;return t?.structuralSharing??s.options.defaultStructuralSharing?i.current=xs(i.current,o):o}}function ra(t){const s=xn(),i=ee.useContext(t.from?sw:_r),r=t.from??i,o=s.stores.getMatchStore(r),c=gw(t,s),d=ta(o,h=>h?c(h):zy);if(d!==zy)return d;(t.shouldThrow??!0)&&ud()}function ob(t){return ra({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:s=>t.select?t.select(s.loaderData):s.loaderData})}function ub(t){const{select:s,...i}=t;return ra({...i,select:r=>s?s(r.loaderDeps):r.loaderDeps})}function cb(t){return ra({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:s=>{const i=t.strict===!1?s.params:s._strictParams;return t.select?t.select(i):i}})}function fb(t){return ra({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:s=>t.select?t.select(s.search):s.search})}function Co(t){const s=xn();return ee.useCallback(i=>s.navigate({...i,from:i.from??t?.from}),[t?.from,s])}function db(t){return ra({...t,select:s=>t.select?t.select(s.context):s.context})}function yw(...t){const s=ee.useRef(t),i=s.current;return t.forEach((r,o)=>{Hn(i[o],r,!1,!0)||(i[o]=r)}),s.current}function Xl(t,s){t.preloadRoute(s).catch(i=>{console.warn(i),console.warn(P1)})}function vw(t,s){const i=typeof t=="string"&&yr(t);if(i)return s.has(i)?t:null}function bw(t,s,i,r){const o=ny(t.pathname,r),c=ny(s.pathname,r);return(i?.exact?o!==c:!(o.startsWith(c)&&(o.length===c.length||o[c.length]==="/")))||(i?.includeSearch??!0)&&!Hn(t.search,s.search,!i?.exact,i?.explicitUndefined)?!1:!i?.includeHash||t.hash===s.hash}function xw(t,s,i){const r=xn(),o=ee.useRef(null),c=ee.useCallback(Z=>{if(o.current=Z,typeof s=="function")return s(Z);s&&(s.current=Z)},[s]),{activeOptions:d,to:h,preload:p,preloadDelay:m,disabled:b,target:v,onClick:x,onBlur:S,onFocus:w,onMouseEnter:j,onMouseLeave:z,onTouchStart:T}=t,[L,G,V]=yw(t.search,t.params,d),W=ee.useContext(_r),$=(r.stores._linkScopes??={})[W]??=nw(r,W),[A,J,ie]=ee.useMemo(()=>{const Z=vw(h,r.protocolAllowlist);if(Z!==void 0){const Ze=[Z??void 0];return[t,()=>Ze]}const X={...t};let ne,me,xe;const Ee=()=>{const Ze=$[0]();if(Ze!==ne){X._fromLocation=Ze;const He=r.buildLocation(X),cn=Ow(He,r,b),Rs=b||cn&&!yr(cn)?bw(Ze,He,V,r.basepath):void 0;(!me||me[0]!==cn||me[1]!==Rs)&&(me=[cn,Rs]),ne=Ze}return me};return[X,Ee,V?.includeHash&&(()=>{const Ze=Ee();return Ze[1]?xe??=[Ze[0],!1]:Ze})]},[r,$,t.from,t.hash,t.href,h,L,G,t.state,t.mask,t.unsafeRelative,V,b]),[re,P]=ee.useSyncExternalStore($[1],J,ie||J),I=P===void 0&&re,fe=b||re===void 0,ye=ee.useRef(!1),pe=t.reloadDocument||I||fe?!1:p??r.options.defaultPreload,U=m??r.options.defaultPreloadDelay??0,C=ee.useCallback(Z=>{const X=Z?.isIntersecting;if(!(X??pe==="intent")){X===!1&&Jl(o);return}if(!U){Xl(r,A);return}o.t??=setTimeout(()=>{o.t=void 0,Xl(r,A)},U)},[r,A,o,pe,U]);ee.useEffect(()=>{if(!pe)return;pe==="render"&&!ye.current&&(ye.current=!0,Xl(r,A));let Z=!0,X;return pe==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(X=new IntersectionObserver(ne=>{Z&&C(ne.pop())},{rootMargin:"100px"}),X.observe(o.current)),()=>{Z=!1,X?.disconnect(),Jl(o)}},[r,A,pe,C,o]);const q=ww(t,i);if(q.ref=s?c:o,I)return q.href=I,q;const se=Z=>{const X=v??Z.currentTarget.getAttribute("target");!fe&&!(Z.metaKey||Z.altKey||Z.ctrlKey||Z.shiftKey)&&!Z.defaultPrevented&&(!X||X==="_self")&&Z.button===0&&(Z.preventDefault(),Jl(o),r.navigate({...t,_fromLocation:A._fromLocation}))},ue=()=>{pe==="intent"&&Xl(r,A)},E=()=>{pe==="intent"&&Jl(o)};return q.onClick=Pa(x,se),q.onBlur=Pa(S,E),q.onFocus=Pa(w,C),q.onMouseEnter=Pa(j,C),q.onMouseLeave=Pa(z,E),q.onTouchStart=Pa(T,ue),jw(q,t,P,re,fe,i)}var Sw={},_w={className:"active"},hb=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 ww(t,s){const i={};for(const r in t)hb.has(r)||r==="type"&&s!==void 0||r==="disabled"&&s==="a"||(i[r]=t[r]);return i}function jw(t,s,i,r,o,c){const{activeProps:d,inactiveProps:h,className:p,style:m,target:b}=s,v=Uv(i?d:h,{})??(i?_w:Sw);Object.assign(t,v),t.href=r,c!=="a"&&(t.disabled=o),t.target=b;const x=v.style;(m||x)&&(t.style=m&&x?{...m,...x}:m||x);const S=v.className;return(p||S)&&(t.className=p?S?`${p} ${S}`:p:S),o&&(t.role="link",t["aria-disabled"]=!0),i&&(t["data-status"]="active",t["aria-current"]="page"),t}var Jl=t=>{clearTimeout(t.t),t.t=void 0},Pa=(t,s)=>t?i=>i.defaultPrevented||(t(i),i.defaultPrevented||s(i)):s;function Ow(t,s,i){if(i)return;const r=t.maskedLocation??t,o=r.external?r.publicHref:s.history.createHref(r.publicHref)||"/";if(!((r.external||o!==r.publicHref)&&Bv(o,s.protocolAllowlist)))return o}var la=ee.memo(ee.forwardRef((t,s)=>{const i=t._asChild||"a",r=xw(t,s,i),o=typeof t.children=="function"?t.children({isActive:r["data-status"]==="active"}):t.children;return ee.createElement(i,r,o)}),Ew);function Ew(t,s){let i=0;for(const r in s)if(i++,t[r]!==s[r]&&(!hb.has(r)||!Hn(t[r],s[r],!1,!0)))return!1;for(const r in t)i--;return i===0}var Nw=class extends ab{constructor(t){super(t),this.useMatch=s=>ra({...s,from:this.id}),this.useRouteContext=s=>db({...s,from:this.id}),this.useSearch=s=>fb({...s,from:this.id}),this.useParams=s=>cb({...s,from:this.id}),this.useLoaderDeps=s=>ub({...s,from:this.id}),this.useLoaderData=s=>ob({...s,from:this.id}),this.useNavigate=()=>Co({from:this.fullPath}),this.Link=To.forwardRef((s,i)=>g.jsx(la,{ref:i,from:this.fullPath,...s}))}};function oa(t){return new Nw(t)}var zw=class extends X1{constructor(t){super(t),this.useMatch=s=>ra({...s,from:this.id}),this.useRouteContext=s=>db({...s,from:this.id}),this.useSearch=s=>fb({...s,from:this.id}),this.useParams=s=>cb({...s,from:this.id}),this.useLoaderDeps=s=>ub({...s,from:this.id}),this.useLoaderData=s=>ob({...s,from:this.id}),this.useNavigate=()=>Co({from:this.fullPath}),this.Link=To.forwardRef((s,i)=>g.jsx(la,{ref:i,from:this.fullPath,...s}))}};function Tw(t){return new zw(t)}function Rw(t){const s=xn(),i=`not-found-${ta(s.stores.location,r=>r.pathname)}-${ta(s.stores.status)}`;return g.jsx(yd,{getResetKey:()=>i,onCatch:(r,o)=>{if(ni(r))t.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(ni(r))return t.fallback?.(r);throw r},children:t.children})}function Aw(){return g.jsx("p",{children:"Not Found"})}function mb(t,s,i){return s.options.notFoundComponent?g.jsx(s.options.notFoundComponent,{...i}):t.options.defaultNotFoundComponent?g.jsx(t.options.defaultNotFoundComponent,{...i}):g.jsx(Aw,{})}function Mo(t,s){const i=s?.options.pendingComponent??t.options.defaultPendingComponent;return i?g.jsx(i,{}):null}var Cw=(t,s)=>t[0]===s[0]&&t[1]===s[1],pb=(t,s,i)=>!s.isRoot||s.options.shellComponent||s.options.wrapInSuspense||i===!1||i==="data-only"||!t.ssr,gb=ee.memo(function({routeId:s}){const i=xn(),r=i.stores.getMatchStore(s);return Mw(i,ta(r))});function Mw(t,s){const i=t.routesById[s.routeId],r=Mo(t,i),o=i.options.errorComponent??t.options.defaultErrorComponent,c=i.options.onCatch??t.options.defaultOnCatch,d=i.isRoot?i.options.notFoundComponent??t.options.notFoundRoute?.options.component:i.options.notFoundComponent,h=s.ssr===!1||s.ssr==="data-only",p=pb(t,i,s.ssr)&&(i.options.wrapInSuspense??r??(i.options.errorComponent?.preload||h));let m=g.jsx(Dw,{match:s});h&&(m=g.jsx(W1,{fallback:r,children:m})),d&&(m=g.jsx(Rw,{fallback:x=>{if(x.routeId??=s.routeId,x.routeId!==s.routeId)throw x;return ee.createElement(d,x)},children:m})),o&&(m=g.jsx(yd,{getResetKey:()=>s,errorComponent:o,onCatch:(x,S)=>{if(ni(x))throw x.routeId??=s.routeId,x;c?.(x,S)},children:m})),p&&(m=g.jsx(ee.Suspense,{fallback:r,children:m}));const b=null,v=i.isRoot&&i.options.shellComponent;return v?g.jsx(_r.Provider,{value:s.routeId,children:g.jsxs(v,{children:[m,b]})}):g.jsxs(_r.Provider,{value:s.routeId,children:[m,b]})}var Dw=ee.memo(function({match:s}){const i=xn(),r=s.routeId,o=i.routesById[r],c=ee.useMemo(()=>{const h=(o.options.remountDeps??i.options.defaultRemountDeps)?.({routeId:r,loaderDeps:s.loaderDeps,params:s._strictParams,search:s._strictSearch});return h?JSON.stringify(h):void 0},[r,s.loaderDeps,s._strictParams,s._strictSearch,o.options.remountDeps,i.options.defaultRemountDeps]),d=ee.useMemo(()=>{const h=o.options.component??i.options.defaultComponent;return h?g.jsx(h,{},c):g.jsx(yb,{})},[c,o.options.component,i.options.defaultComponent]);if(s.status==="pending"){if(i.ssr&&!pb(i,o,s.ssr))return d;if(i._tx)throw i._tx[5];return Mo(i,o)}if(s.status==="notFound")return mb(i,o,s.error);if(s.status==="error")throw s.error;return d}),yb=ee.memo(function(){const s=xn(),i=ee.useContext(_r);let r,o,c;{const h=s.stores.getMatchStore(i);[r,o]=ta(h,p=>[!!p._notFound,p.error],{compare:Cw}),c=ta(s.stores.ids,p=>p[p.indexOf(i)+1])}if(r)return mb(s,s.routesById[i],o);if(!c)return null;const d=g.jsx(gb,{routeId:c});return i===Ia?g.jsx(ee.Suspense,{fallback:Mo(s),children:d}):d});function vb(t,s){const i=t[1];t.length=0,i?.(s)}function kw({t}){const s=xn(),i=s._rendered??=[];return s.startTransition=(r,o)=>new Promise(c=>{vb(i,!1),i.push(o,c),t(s),ee.startTransition(r)}),Lv(()=>{const r=s.history.subscribe(s.load);s.updateLatestLocation();const o=s.latestLocation,c=s.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(gn(o.publicHref)!==gn(c.publicHref))return s.commitLocation({...c,replace:!0,ignoreBlocker:!0}),r;const d=s.stores.resolvedLocation.get();return d?.href===o.href&&d.state.__TSR_key===o.state.__TSR_key?i.push(s.stores.matches.get(),h=>{h&&s.emit({type:"onRendered",...Ro(d,d)})}):s._tx||s.load({sync:!0}).catch(console.error),r},[s,s.history]),null}function Lw(){const t=xn(),s=t.routesById[Ia],i=Mo(t,s),r=g.jsxs(g.Fragment,{children:[g.jsx(kw,{t:ee.useState()[1]}),t.ssr?g.jsx(Ty,{}):g.jsx(ee.Suspense,{fallback:i,children:g.jsx(Ty,{})})]});return t.options.InnerWrap?g.jsx(t.options.InnerWrap,{children:r}):r}function Ty(){const t=xn(),s=t._rendered,i=ta(t.stores.matches,d=>s[0]??d),r=i[0],o=r?.routeId;Lv(()=>{s[0]===i&&vb(s,!0)},[s,i]);const c=o?g.jsx(gb,{routeId:o}):null;return t.options.disableGlobalCatchBoundary?c:g.jsx(yd,{getResetKey:()=>r,onCatch:void 0,children:c})}var Uw=t=>({createMutableStore:wy,createReadonlyStore:wy,batch:ow}),Zw=t=>new qw(t),qw=class extends M1{constructor(t){super(t,Uw)}};function Bw({router:t,children:s,...i}){Zv(i)&&t.update({...t.options,...i,context:{...t.options.context,...i.context}});const r=g.jsx(ib.Provider,{value:t,children:s});return t.options.Wrap?g.jsx(t.options.Wrap,{children:r}):r}function $w({router:t,...s}){return g.jsx(Bw,{router:t,...s,children:g.jsx(Lw,{})})}const Hw={sm:20,md:32,lg:48},Qw=[{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 bb({size:t="md",label:s,className:i=""}){const r=Hw[t];return g.jsx("svg",{"data-pattern":"OgygieMark",viewBox:"0 0 96 96",width:r,height:r,fill:"currentColor",className:`shrink-0 ${i}`,...s===void 0?{"aria-hidden":!0}:{role:"img","aria-label":s},children:Qw.map(o=>o.kind==="circle"?g.jsx("circle",{cx:o.cx,cy:o.cy,r:o.r},"citadel"):g.jsx("path",{d:o.d},o.d))})}const Gw=t=>1-(1-t)**3;function Kw(t,s){return t.toLocaleString("fr-FR",{minimumFractionDigits:s,maximumFractionDigits:s})}function Yw(){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 Ry(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Fw(t){const[s,i]=ee.useState(()=>typeof window>"u"||typeof window.requestAnimationFrame!="function"||Ry()?t:0),r=ee.useRef(!1);return ee.useEffect(()=>{if(r.current||typeof window.requestAnimationFrame!="function"||Ry()){r.current=!0,i(t);return}r.current=!0;const o=Yw();let c=null,d=0;const h=p=>{c===null&&(c=p);const m=Math.min(1,(p-c)/o);i(t*Gw(m)),m<1&&(d=window.requestAnimationFrame(h))};return d=window.requestAnimationFrame(h),()=>window.cancelAnimationFrame(d)},[t]),s}function vn({value:t,format:s,decimals:i=0,className:r=""}){const o=Fw(t),c=s===void 0?Kw(o,i):s(o);return g.jsx("span",{"data-pattern":"Counter","data-value":t,className:`tabular-nums ${r}`,children:c})}function Yf(t){const s=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>s.indexOf(+r)===-1).map(([r,o])=>o)}function Ay(t,s="|"){return t.map(i=>Ob(i)).join(s)}function Ff(t,s){return typeof s=="bigint"?s.toString():s}class Vw{constructor(s){this._getter=s,this._value=void 0}get value(){const s=this._getter;return s!==void 0&&(this._value=s(),this._getter=void 0),this._value}}function vd(t){return new Vw(t)}function Pw(t){return t==null}function bd(t){const s=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;return t.slice(s,i)}function Xw(t,s){const i=t/s,r=Math.round(i),o=4*Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-r)<o?0:i-r}function Ns(t,s,i){Object.defineProperty(t,s,{value:i,writable:!0,enumerable:!0,configurable:!0})}function xb(t){const s=Object.getOwnPropertyDescriptor(t,"shape");return s?.get?s.get.raw:s?.value}function Gn(t){return xb(t._zod.def)??t._zod.def.shape}function Sb(t,s,i){Object.defineProperty(t,s,{get(){const r=i();return Ns(this,s,r),r},enumerable:!0,configurable:!0})}function _b(t,s,i){s in t?Ns(t,s,i):t[s]=i}function na(t,s,i,r){const o=Gn(s);for(const c of i){const d=Object.getOwnPropertyDescriptor(o,c);d.enumerable&&(d.get?Sb(t,c,()=>{const h=s._zod.def.shape[c];return r?r(h,c):h}):_b(t,c,r?r(d.value,c):d.value))}}function Jw(t,s){for(const i of Reflect.ownKeys(s)){const r=Object.getOwnPropertyDescriptor(s,i);r.enumerable&&(r.get?Sb(t,i,()=>s[i]):_b(t,i,r.value))}}function Gt(...t){const s={};for(const i of t){const r=Object.getOwnPropertyDescriptors(i);Object.assign(s,r)}return Object.defineProperties({},s)}function Iw(t){return JSON.stringify(t)}function Ww(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const wb="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function So(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const e2=vd(()=>{if(un.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function si(t){if(So(t)===!1)return!1;const s=t.constructor;if(s===void 0||typeof s!="function")return!0;const i=s.prototype;return!(So(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function jb(t){return si(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}const t2=new Set(["string","number","symbol"]);function ai(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function zs(t,s,i){const r=new t._zod.constr(s??t._zod.def);return(!s||i?.parent)&&(r._zod.parent=t),r}function oe(t){const s=t;if(!s)return{};if(typeof s=="string")return{error:()=>s};if(s?.message!==void 0){if(s?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");s.error=s.message}return delete s.message,typeof s.error=="string"?{...s,error:()=>s.error}:s}function Ob(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function n2(t){return Object.keys(t).filter(s=>t[s]._zod.optin!==void 0&&t[s]._zod.optout==="optional")}const Eb={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]},s2={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function a2(t,s){const i=t._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return na(c,t,Do(t,s)),zs(t,Gt(i,{shape:c,checks:[]}))}function Do(t,s){const i=Gn(t),r=[];for(const o of Reflect.ownKeys(s)){if(!Object.getOwnPropertyDescriptor(i,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);s[o]&&r.push(o)}return r}function i2(t,s){const i=t._zod.def,r=i.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(Do(t,s)),d={};return na(d,t,Reflect.ownKeys(Gn(t)).filter(h=>!c.has(h))),zs(t,Gt(i,{shape:d,checks:[]}))}function r2(t,s){if(!si(s))throw new Error("Invalid input to extend: expected a plain object");const i=t._zod.def.checks;if(i&&i.length>0){const o=Gn(t);for(const c of Reflect.ownKeys(s))if(Object.getOwnPropertyDescriptor(o,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return zs(t,Gt(t._zod.def,{shape:Nb(t,s)}))}function Nb(t,s){const i={};return na(i,t,Reflect.ownKeys(Gn(t))),Jw(i,s),i}function l2(t,s){if(!si(s))throw new Error("Invalid input to safeExtend: expected a plain object");return zs(t,Gt(t._zod.def,{shape:Nb(t,s)}))}function o2(t,s){if(!s?._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 i={};na(i,t,Reflect.ownKeys(Gn(t))),na(i,s,Reflect.ownKeys(Gn(s)));const r=Gt(t._zod.def,{shape:i,get catchall(){return s._zod.def.catchall},checks:s._zod.def.checks??[]});return zs(t,r)}function Cy(t,s,i,r="partial"){const c=s._zod.def.checks;if(c&&c.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const h=i?new Set(Do(s,i)):void 0,p={};return na(p,s,Reflect.ownKeys(Gn(s)),t&&((m,b)=>h&&!h.has(b)?m:new t({type:"optional",innerType:m}))),zs(s,Gt(s._zod.def,{shape:p,checks:[]}))}function u2(t,s,i){const r=i?new Set(Do(s,i)):void 0,o={};return na(o,s,Reflect.ownKeys(Gn(s)),(c,d)=>r&&!r.has(d)?c:new t({type:"nonoptional",innerType:c})),zs(s,Gt(s._zod.def,{shape:o}))}function Bn(t,s=0){if(t.aborted===!0)return!0;for(let i=s;i<t.issues.length;i++)if(t.issues[i]?.continue!==!0)return!0;return!1}function c2(t,s=0){if(t.aborted===!0)return!0;for(let i=s;i<t.issues.length;i++)if(t.issues[i]?.continue===!1)return!0;return!1}function Xa(t,s){return s.map(i=>{var r;return(r=i).path??(r.path=[]),i.path.unshift(t),i})}function or(t){return typeof t=="string"?t:t?.message}function My(t){const s=[];for(const i of t??[]){const r=i._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&s.push([o,i])}return s}function Vf(t,s,i){var r;for(let o=s;o<t.length;o++)(r=t[o]).schema??(r.schema=i)}function js(t,s,i){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:or(t.inst?._zod.def?.error?.(t))??or(c?.(t))??or(s?.error?.(t))??or(i.customError?.(t))??or(i.localeError?.(t))??"Invalid input",h={};for(const p of Object.keys(t))p==="inst"||p==="schema"||p==="continue"||p==="input"||p==="__proto__"||(h[p]=t[p]);return h.path??(h.path=[]),h.message=d,s?.reportInput&&(h.input=t.input),h}const f2=/[\uD800-\uDBFF]/;function xd(t){const s=t.length;if(!f2.test(t))return s;let i=s;for(let r=0;r<s-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(i--,r++);return i}function Sd(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function d2(t){const s=typeof t;switch(s){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";const i=t;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return s}function wr(...t){const[s,i,r]=t;return typeof s=="string"?{message:s,code:"custom",input:i,inst:r}:{...s}}function h2(t,s){for(const i in s){const r=Object.getOwnPropertyDescriptor(s,i);r.get?Object.defineProperty(t,i,{...r,enumerable:!1}):m2(t,i,r.value)}}function Os(t,s,i,r=!0){return Object.defineProperty(t,s,{configurable:!0,writable:!0,enumerable:r,value:i}),i}function zb(t,s,i){return Os(t,s,i,!1)}function Tb(t,s){for(const i in t){const r=t[i];Object.defineProperty(s,i,{configurable:!0,enumerable:!0,get(){return Os(this,i,r(this))},set(o){Os(this,i,o)}})}return s}function m2(t,s,i){Object.defineProperty(t,s,{configurable:!0,get(){return this==null?i:Os(this,s,i.bind(this))},set(r){Os(this,s,r)}})}function p2(t,s){const i=Object.getPrototypeOf(t);return s in i?void 0:i}let _f,ys=!1;const g2={configurable:!0,get(){ys=!0}};function Ae(t,s,i){const r=Object.getPrototypeOf(t._zod);if(s in r&&_f!==t._zod){_f=void 0;return}_f=t._zod,Object.defineProperty(r,s,{configurable:!0,get(){Object.defineProperty(this,s,g2);const o=ys;ys=!1;try{const c=i(this);return ys?delete this[s]:Object.defineProperty(this,s,{configurable:!0,writable:!0,value:c}),ys=ys||o,c}catch(c){throw delete this[s],ys=ys||o,c}},set(o){Object.defineProperty(this,s,{configurable:!0,writable:!0,value:o})}})}function y2(t,s,i,r){const o=p2(t,s);o&&Object.defineProperty(o,s,{configurable:!0,get(){const c={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,s,c),c.value=i(this),Object.defineProperty(this,s,c),c.value},set(c){Object.defineProperty(this,s,{configurable:!0,writable:!0,enumerable:r,value:c})}})}const v2="~constantCatch";function b2(t){const s=()=>t;return s[v2]=!0,s}var Dy;const wf={value:void 0,enumerable:!1};let ky="captureStackTrace"in Error?Error:null;function x2(t){const s=ky;if(s){const i=s.stackTraceLimit;if(typeof i=="number"){try{s.stackTraceLimit=0}catch{return ky=null,new t}try{return new t}finally{s.stackTraceLimit=i}}}return new t}function Y(t,s,i,r){const o={};function c(x){this.def=x,this.constr=v,this.traits=new Set}c.prototype=o;const d=i,h=d&&new WeakSet;function p(x,S){if(x._zod){if(x._zod.traits.has(t))return}else{wf.value=new c(S);try{Object.defineProperty(x,"_zod",wf)}finally{wf.value=void 0}}if(x._zod.traits.add(t),s(x,S),h){const j=Object.getPrototypeOf(x),z=x._zod.constr.prototype;let T=j;for(;T&&T!==z;)T=Object.getPrototypeOf(T);const L=T??j;h.has(L)||(h.add(L),h2(L,d))}const w=v.prototype;for(const j in w)Object.prototype.hasOwnProperty.call(w,j)&&(j in x||(x[j]=w[j].bind(x)))}const m=r?.Parent??Object;class b extends m{}Object.defineProperty(b,"name",{value:t});function v(x){const S=r?.Parent?x2(b):this;p(S,x);const w=S._zod.deferred;if(w){for(const z of w)z();S._zod.deferred=void 0}const j=globalThis.__zod_globalConfig?.postProcessor;return j&&j(S),S}return Object.defineProperty(v,"init",{value:p}),Object.defineProperty(v,Symbol.hasInstance,{value:x=>r?.Parent&&x instanceof r.Parent?!0:x?._zod?.traits?.has(t)}),Object.defineProperty(v,"name",{value:t}),v}class Ws extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Rb extends Error{constructor(s){super(`Encountered unidirectional transform during encode: ${s}`),this.name="ZodEncodeError"}}(Dy=globalThis).__zod_globalConfig??(Dy.__zod_globalConfig={});const un=globalThis.__zod_globalConfig;function bn(t){return t&&Object.assign(un,t),un}function S2(){const t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Ff,2)),t.message}function _2(t){this._zod.message=t}const w2={get:S2,set:_2,enumerable:!0,configurable:!0},jf={value:void 0,enumerable:!1},Ly=new WeakSet([Object.prototype,Error.prototype]),j2=(t,s)=>{t.name="$ZodError",jf.value=s,Object.defineProperty(t,"issues",jf),jf.value=void 0,Object.defineProperty(t,"message",w2);const i=Object.getPrototypeOf(t);Ly.has(i)||(Ly.add(i),Object.defineProperty(i,"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})}}))},O2=Y("$ZodError",j2);function E2(t,s,i){return Object.prototype.hasOwnProperty.call(t,s)||(s==="__proto__"?Object.defineProperty(t,s,{value:i(),writable:!0,enumerable:!0,configurable:!0}):t[s]=i()),t[s]}function N2(t,s=i=>i.message){const i={},r=[];for(const o of t.issues)o.path.length>0?E2(i,o.path[0],()=>[]).push(s(o)):r.push(s(o));return{formErrors:r,fieldErrors:i}}function z2(t,s=i=>i.message){const i={_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)i._errors.push(s(d));else{let p=i,m=0;for(;m<h.length;){const b=h[m],v=m===h.length-1;if(b==="_errors"){v&&p._errors.push(s(d)),m++;continue}Object.prototype.hasOwnProperty.call(p,b)||Object.defineProperty(p,b,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const x=p[b];v&&x._errors.push(s(d)),p=x,m++}}}};return r(t),i}function ko(t,s){return{callee:s?.callee??t,Err:s?.Err}}const _d=t=>{const s=(i,r,o,c)=>{const d=o?{...o,async:!1}:{async:!1},h=i._zod.run({value:r,issues:[]},d);if(h instanceof Promise)throw new Ws;if(h.issues.length){const p=new(c?.Err??t)(h.issues.map(m=>js(m,d,bn())));throw wb(p,c?.callee??s),p}return h.value};return s},wd=t=>{const s=async(i,r,o,c)=>{const d=o?{...o,async:!0}:{async:!0};let h=i._zod.run({value:r,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const p=new(c?.Err??t)(h.issues.map(m=>js(m,d,bn())));throw wb(p,c?.callee??s),p}return h.value};return s},jd=t=>(s,i,r)=>{const o=r?{...r,async:!1}:{async:!1},c=s._zod.run({value:i,issues:[]},o);if(c instanceof Promise)throw new Ws;return c.issues.length?Ab(t,c.issues,o):{success:!0,data:c.value}};function Ab(t,s,i){let r;return{success:!1,get error(){return r||(r=new t(s.map(o=>js(o,i,bn()))),s=void 0,i=void 0),r},set error(o){r=o,s=void 0,i=void 0}}}const Od=t=>async(s,i,r)=>{const o=r?{...r,async:!0}:{async:!0};let c=s._zod.run({value:i,issues:[]},o);return c instanceof Promise&&(c=await c),c.issues.length?Ab(t,c.issues,o):{success:!0,data:c.value}},T2=Symbol.for("zod.compile.invalid"),R2=Symbol.for("zod.compile.fallback"),A2=((t,s,i)=>{const r=t._zod.bag.validator;if(r!==void 0){if(r(s)!==T2)return!0;if(r.definite===!0&&i===void 0)return!1}return C2(t,s,i)});function C2(t,s,i){const r=i?{...i,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=t._zod.bag.fallbackRun;let c;if(o?(r[R2]=!0,c=o({value:s,issues:[]},r)):c=t._zod.run({value:s,issues:[]},r),c instanceof Promise)throw new Ws;return c.issues.length===0}const M2=async(t,s,i)=>{const r=i?{...i,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=t._zod.run({value:s,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},D2=t=>{const s=_d(t),i=(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return s(r,o,h,ko(i,d))};return i},k2=t=>{const s=_d(t),i=(r,o,c,d)=>s(r,o,c,ko(i,d));return i},L2=t=>{const s=wd(t),i=async(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return await s(r,o,h,ko(i,d))};return i},U2=t=>{const s=wd(t),i=async(r,o,c,d)=>await s(r,o,c,ko(i,d));return i},Z2=t=>(s,i,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return jd(t)(s,i,o)},q2=t=>(s,i,r)=>jd(t)(s,i,r),B2=t=>async(s,i,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Od(t)(s,i,o)},$2=t=>async(s,i,r)=>Od(t)(s,i,r),H2=/^[cC][0-9a-z]{6,}$/,Q2=/^[0-9a-z]+$/,G2=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,K2=/^[0-9a-vA-V]{20}$/,Y2=/^[A-Za-z0-9]{27}$/,F2=/^[a-zA-Z0-9_-]{21}$/;function V2(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}const P2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,X2=/^([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})$/,Uy=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)$/,J2=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,I2="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function W2(){return new RegExp(I2,"u")}const ej=/^(?:(?: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])$/,tj=/^(([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}|:))$/,nj=/^((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])$/,sj=/^(([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])$/,aj=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,ij=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,rj=/^https?$/,lj=/^\+[1-9]\d{6,14}$/,Cb="(?:(?:\\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 oj(t){return new RegExp(`^${t}$`)}const uj=oj(Cb);function Pf(t){const s="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${s}`:t.precision===0?`${s}:[0-5]\\d`:`${s}:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?`${s}:[0-5]\\d(?:\\.\\d+)?`:`${s}(?::[0-5]\\d(?:\\.\\d+)?)?`}function cj(t){return new RegExp(`^${Pf(t)}$`)}function fj(t){const s=["Z"];t.offset&&s.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const i=`${Pf({precision:t.precision,seconds:!0})}(?:${s.join("|")})`,r=t.local?`${i}|${Pf({precision:t.precision})}`:i;return new RegExp(`^${Cb}T(?:${r})$`)}const dj=/^[\s\S]{0,}$/,hj=/^-?\d+$/,Ed=/^-?\d+(?:\.\d+)?$/,mj=/^(?:true|false)$/i,pj=/^[^A-Z]*$/,gj=/^[^a-z]*$/,Ct=Y("$ZodCheck",(t,s)=>{var i;t._zod??(t._zod={}),t._zod.def=s,(i=t._zod).onattach??(i.onattach=[])}),Nd=t=>{const s=t.value;return!Pw(s)&&s.length!==void 0},_o={number:"number",bigint:"bigint",object:"date"},Mb=Y("$ZodCheckLessThan",(t,s)=>{Ct.init(t,s);const i=_o[typeof s.value];t._zod.check=r=>{(s.inclusive?r.value<=s.value:r.value<s.value)||r.issues.push({origin:_o[typeof r.value]??i,code:"too_big",maximum:typeof s.value=="object"?s.value.getTime():s.value,input:r.value,inclusive:s.inclusive,inst:t,continue:!s.abort})}}),Db=Y("$ZodCheckGreaterThan",(t,s)=>{Ct.init(t,s);const i=_o[typeof s.value];t._zod.check=r=>{(s.inclusive?r.value>=s.value:r.value>s.value)||r.issues.push({origin:_o[typeof r.value]??i,code:"too_small",minimum:typeof s.value=="object"?s.value.getTime():s.value,input:r.value,inclusive:s.inclusive,inst:t,continue:!s.abort})}}),yj=Y("$ZodCheckMultipleOf",(t,s)=>{Ct.init(t,s),t._zod.check=i=>{if(typeof i.value!=typeof s.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?s.value!==BigInt(0)&&i.value%s.value===BigInt(0):Xw(i.value,s.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:s.value,input:i.value,inst:t,continue:!s.abort})}}),vj=Y("$ZodCheckNumberFormat",(t,s)=>{Ct.init(t,s),s.format=s.format||"float64";const i=s.format?.includes("int"),r=i?"int":"number",[o,c]=Eb[s.format];t._zod.check=d=>{const h=d.value;if(i){if(!Number.isInteger(h)){d.issues.push({expected:r,format:s.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:!s.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:!s.abort});return}}h<o&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!s.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:t,continue:!s.abort})}}),bj=Y("$ZodCheckMaxLength",(t,s)=>{var i;Ct.init(t,s),(i=t._zod.def).when??(i.when=Nd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>s.maximum?xd(o):c)<=s.maximum)return;const h=Sd(o);r.issues.push({origin:h,code:"too_big",maximum:s.maximum,inclusive:!0,input:o,inst:t,continue:!s.abort})}}),xj=Y("$ZodCheckMinLength",(t,s)=>{var i;Ct.init(t,s),(i=t._zod.def).when??(i.when=Nd),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>=s.minimum&&c<s.minimum*2?xd(o):c)>=s.minimum)return;const h=Sd(o);r.issues.push({origin:h,code:"too_small",minimum:s.minimum,inclusive:!0,input:o,inst:t,continue:!s.abort})}}),Sj=Y("$ZodCheckLengthEquals",(t,s)=>{var i;Ct.init(t,s),(i=t._zod.def).when??(i.when=Nd),t._zod.check=r=>{const o=r.value,c=o.length,d=typeof o=="string"&&c>=s.length&&c<=s.length*2?xd(o):c;if(d===s.length)return;const h=Sd(o),p=d>s.length;r.issues.push({origin:h,...p?{code:"too_big",maximum:s.length}:{code:"too_small",minimum:s.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!s.abort})}}),Lo=Y("$ZodCheckStringFormat",(t,s)=>{var i,r;Ct.init(t,s),s.pattern?(i=t._zod).check??(i.check=o=>{s.pattern.lastIndex=0,!s.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:s.format,input:o.value,...s.pattern?{pattern:s.pattern.toString()}:{},inst:t,continue:!s.abort})}):(r=t._zod).check??(r.check=()=>{})}),_j=Y("$ZodCheckRegex",(t,s)=>{Lo.init(t,s),t._zod.check=i=>{s.pattern.lastIndex=0,!s.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:s.pattern.toString(),inst:t,continue:!s.abort})}}),wj=Y("$ZodCheckLowerCase",(t,s)=>{s.pattern??(s.pattern=pj),Lo.init(t,s)}),jj=Y("$ZodCheckUpperCase",(t,s)=>{s.pattern??(s.pattern=gj),Lo.init(t,s)}),Oj=Y("$ZodCheckIncludes",(t,s)=>{Ct.init(t,s);const i=ai(s.includes),r=new RegExp(typeof s.position=="number"?`^.{${s.position},}${i}`:i);s.pattern=r,t._zod.check=o=>{o.value.includes(s.includes,s.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:s.includes,input:o.value,inst:t,continue:!s.abort})}}),Ej=Y("$ZodCheckStartsWith",(t,s)=>{Ct.init(t,s);const i=new RegExp(`^${ai(s.prefix)}.*`);s.pattern??(s.pattern=i),t._zod.check=r=>{r.value.startsWith(s.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:s.prefix,input:r.value,inst:t,continue:!s.abort})}}),Nj=Y("$ZodCheckEndsWith",(t,s)=>{Ct.init(t,s);const i=new RegExp(`.*${ai(s.suffix)}$`);s.pattern??(s.pattern=i),t._zod.check=r=>{r.value.endsWith(s.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:s.suffix,input:r.value,inst:t,continue:!s.abort})}}),zj=Y("$ZodCheckOverwrite",(t,s)=>{Ct.init(t,s),t._zod.check=i=>{i.value=s.tx(i.value)}});class Tj{constructor(s=[],i={}){this.content=[],this.indent=0,this.args=s,this.closed=i}indented(s){this.indent+=1;try{s(this)}finally{this.indent-=1}}write(s){if(typeof s=="function"){s(this,{execution:"sync"}),s(this,{execution:"async"});return}const r=s.split(`
|
|
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 s=Function,i=this?.content??[""];return new s(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
12
|
-
${i.join(`
|
|
13
|
-
`)}
|
|
14
|
-
};`)(...Object.values(this.closed))}}const Rj={major:4,minor:6,patch:7},Ke=Y("$ZodType",(t,s)=>{var i;t??(t={}),t._zod.def=s,t._zod.bag=t._zod.bag||{},t._zod.version=Rj;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)(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const c=(h,p,m)=>{if(h.memo)return h;let b=Bn(h),v;for(const x of p){if(x._zod.def.when){if(c2(h)||!x._zod.def.when(h))continue}else if(b)continue;const S=h.issues.length,w=x._zod.check(h);if(w instanceof Promise&&m?.async===!1)throw new Ws;if(v||w instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await w,h.issues.length!==S&&(Vf(h.issues,S,t),b||(b=Bn(h,S)))});else{if(h.issues.length===S)continue;Vf(h.issues,S,t),b||(b=Bn(h,S))}}return v?v.then(()=>h):h},d=(h,p,m)=>{if(Bn(h))return h.aborted=!0,h;const b=c(p,o,m);if(b instanceof Promise){if(m.async===!1)throw new Ws;return b.then(v=>t._zod.parse(v,m))}return t._zod.parse(b,m)};t._zod.run=(h,p)=>{if(p.skipChecks)return t._zod.parse(h,p);if(p.direction==="backward"){const b=t._zod.parse({value:h.value,issues:[]},{...p,skipChecks:!0});return b instanceof Promise?b.then(v=>d(v,h,p)):d(b,h,p)}const m=t._zod.parse(h,p);if(m instanceof Promise){if(p.async===!1)throw new Ws;return m.then(b=>c(b,o,p))}return c(m,o,p)}}},{get"~standard"(){return zb(this,"~standard",Lb(this))},set"~standard"(t){Os(this,"~standard",t)}}),kb=(t,s)=>t.issues.length?{issues:t.issues.map(i=>js(i,s,bn()))}:{value:t.value};async function Aj(t,s){const i={async:!0};return kb(await t._zod.run({value:s,issues:[]},i),i)}function Lb(t){return{validate:s=>{const i={async:!1};try{const r=t._zod.run({value:s,issues:[]},i);if(!(r instanceof Promise))return kb(r,i)}catch{}return Aj(t,s)},vendor:"zod",version:1}}const zd=Y("$ZodString",(t,s)=>{Ke.init(t,s),t._zod.pattern=s.pattern??dj,t._zod.parse=(i,r)=>{if(s.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:t}),i}}),Ge=Y("$ZodStringFormat",(t,s)=>{Lo.init(t,s),zd.init(t,s)}),Cj=Y("$ZodGUID",(t,s)=>{s.pattern??(s.pattern=X2),Ge.init(t,s)}),Mj=Y("$ZodUUID",(t,s)=>{if(s.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[s.version];if(r===void 0)throw new Error(`Invalid UUID version: "${s.version}"`);s.pattern??(s.pattern=Uy(r))}else s.pattern??(s.pattern=Uy());Ge.init(t,s)}),Dj=Y("$ZodEmail",(t,s)=>{s.pattern??(s.pattern=J2),Ge.init(t,s)}),Ub=1,wo=2;function Zb(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function kj(t,s){return!("normalize"in s)&&!("hostname"in s)&&!("protocol"in s)?Zb(t)||wo:Lj(t,s)}function Lj(t,s){if(!s.normalize&&s.protocol?.source===rj.source&&!/^https?:\/\//i.test(t))return Ub;try{if(typeof URL<"u"){const i=URL;if(typeof i.parse=="function")return i.parse(t)??wo}return new URL(t)}catch{return wo}}const Uj=/[\t\n\r]/g;function Zy(t){return t.replace(Uj,"")}function Zj(t,s){return s.lastIndex=0,s.test(t.hostname)}function qj(t,s){return s.lastIndex=0,s.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}const Bj=Y("$ZodURL",(t,s)=>{Ge.init(t,s),t._zod.check=i=>{try{const r=i.value.trim(),o=kj(r,s);if(o===Ub){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:t,continue:!s.abort});return}if(o===wo){i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:t,continue:!s.abort});return}if(o===!0){i.value=Zy(r);return}s.hostname&&!Zj(o,s.hostname)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:s.hostname.source,input:i.value,inst:t,continue:!s.abort}),s.protocol&&!qj(o,s.protocol)&&i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:s.protocol.source,input:i.value,inst:t,continue:!s.abort}),i.value=s.normalize?o.href:Zy(r);return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:t,continue:!s.abort})}}}),$j=Y("$ZodEmoji",(t,s)=>{s.pattern??(s.pattern=W2()),Ge.init(t,s)}),Hj=Y("$ZodNanoID",(t,s)=>{if(s.length!==void 0&&(!Number.isInteger(s.length)||s.length<1))throw new Error(`Invalid nanoid length: ${s.length}`);s.pattern??(s.pattern=s.length===void 0?F2:V2(s.length)),Ge.init(t,s)}),Qj=Y("$ZodCUID",(t,s)=>{s.pattern??(s.pattern=H2),Ge.init(t,s)}),Gj=Y("$ZodCUID2",(t,s)=>{s.pattern??(s.pattern=Q2),Ge.init(t,s)}),Kj=Y("$ZodULID",(t,s)=>{s.pattern??(s.pattern=G2),Ge.init(t,s)}),Yj=Y("$ZodXID",(t,s)=>{s.pattern??(s.pattern=K2),Ge.init(t,s)}),Fj=Y("$ZodKSUID",(t,s)=>{s.pattern??(s.pattern=Y2),Ge.init(t,s)}),Vj=Y("$ZodISODateTime",(t,s)=>{s.pattern??(s.pattern=fj(s)),Ge.init(t,s)}),Pj=Y("$ZodISODate",(t,s)=>{s.pattern??(s.pattern=uj),Ge.init(t,s)}),Xj=Y("$ZodISOTime",(t,s)=>{s.pattern??(s.pattern=cj(s)),Ge.init(t,s)}),Jj=Y("$ZodISODuration",(t,s)=>{s.pattern??(s.pattern=P2),Ge.init(t,s)}),Ij=Y("$ZodIPv4",(t,s)=>{s.pattern??(s.pattern=ej),Ge.init(t,s)}),Wj=/^[0-9a-fA-F:.]+$/;function qb(t){return Wj.test(t)?Zb(`http://[${t}]`):!1}const eO=Y("$ZodIPv6",(t,s)=>{s.pattern??(s.pattern=tj),Ge.init(t,s),t._zod.check=i=>{qb(i.value)||i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:t,continue:!s.abort})}}),tO=Y("$ZodCIDRv4",(t,s)=>{s.pattern??(s.pattern=nj),Ge.init(t,s)});function nO(t){const s=t.split("/");if(s.length!==2)return!1;const[i,r]=s;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:qb(i)}const sO=Y("$ZodCIDRv6",(t,s)=>{s.pattern??(s.pattern=sj),Ge.init(t,s),t._zod.check=i=>{nO(i.value)||i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:t,continue:!s.abort})}});function Bb(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const $b=/^[0-9a-zA-Z+/]*={0,2}$/,aO=Y("$ZodBase64",(t,s)=>{s.pattern??(s.pattern=$b),Ge.init(t,s),t._zod.check=i=>{Bb(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:t,continue:!s.abort})}}),Td=/^[A-Za-z0-9_-]*$/;function iO(t){if(!Td.test(t))return!1;const s=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),i=s.padEnd(Math.ceil(s.length/4)*4,"=");return Bb(i)}const rO=Y("$ZodBase64URL",(t,s)=>{s.pattern??(s.pattern=Td),Ge.init(t,s),t._zod.check=i=>{iO(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:t,continue:!s.abort})}}),lO=Y("$ZodE164",(t,s)=>{s.pattern??(s.pattern=lj),Ge.init(t,s)});function oO(t,s=null){try{const i=t.split(".");if(i.length!==3)return!1;const[r]=i;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||s&&(!("alg"in o)||o.alg!==s))}catch{return!1}}const uO=Y("$ZodJWT",(t,s)=>{Ge.init(t,s),t._zod.check=i=>{oO(i.value,s.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:t,continue:!s.abort})}}),Hb=Y("$ZodNumber",(t,s)=>{Ke.init(t,s),t._zod.pattern=Ed,t._zod.parse=(i,r)=>{if(s.coerce)try{i.value=Number(i.value)}catch{}const o=i.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return i;const c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return i.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...c?{received:c}:{}}),i}}),cO=Y("$ZodNumberFormat",(t,s)=>{vj.init(t,s),Hb.init(t,s)}),fO=Y("$ZodBoolean",(t,s)=>{Ke.init(t,s),t._zod.pattern=mj,t._zod.parse=(i,r)=>{if(s.coerce)try{i.value=!!i.value}catch{}const o=i.value;return typeof o=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),i}}),dO=Y("$ZodUnknown",(t,s)=>{Ke.init(t,s),t._zod.parse=i=>i}),hO=Y("$ZodNever",(t,s)=>{Ke.init(t,s),t._zod.parse=(i,r)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:t}),i)});function mO(t,s){const i=My(t._zod.def.checks);if(!i.length)return;const r=Math.min(...i.map(c=>c[0])),o=t._zod.parse;t._zod.parse=(c,d)=>{const h=s(c.value);if(h>r&&!d?.skipChecks&&d?.direction!=="backward"){for(const[p,m]of My(t._zod.def.checks))if(h>p&&m._zod.def.when(c)){const b=c.issues.length;return m._zod.check(c),c.issues[b].continue=!1,Vf(c.issues,b,t),c}}return o(c,d)}}const pO=t=>Array.isArray(t)?t.length:-1;function qy(t,s,i){t.issues.length&&s.issues.push(...Xa(i,t.issues)),s.value[i]=t.value}const gO=Y("$ZodArray",(t,s)=>{Ke.init(t,s);const i=un.memoizer;i?.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=i?i.alloc(t,r,Array(c.length),o):Array(c.length);const d=[],h=o?.abortEarly;for(let p=0;p<c.length;p++){const m=c[p],b=s.element._zod.run({value:m,issues:[]},o);if(b instanceof Promise)d.push(b.then(v=>qy(v,r,p)));else if(qy(b,r,p),h&&b.issues.length!==0&&Bn(b))break}return d.length?Promise.all(d).then(()=>r):r},mO(t,pO)});function jo(t,s,i,r,o,c){const d=i in r,h=c==="optional";if(!(!d&&h&&o==="optional")){if(t.issues.length){if(o!==void 0&&h&&!d)return;s.issues.push(...Xa(i,t.issues))}if(!d&&o===void 0){t.issues.length||s.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}t.value===void 0?(d||o==="defaulted"&&!h)&&(s.value[i]=void 0):s.value[i]=t.value}}const yO=[];function Qb(t){const s=Object.keys(t.shape),i=Object.getOwnPropertySymbols(t.shape),r=i.length?i:yO,o=r.length?[...s,...r]:s;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=n2(t.shape);return{...t,allKeys:o,symbolKeys:r,keySet:new Set(s),numKeys:s.length,optionalKeys:new Set(c)}}function Gb(t,s,i,r,o,c,d){const h=[],p=o.keySet,m=o.catchall._zod,b=m.def.type,v=m.optin,x=m.optout;let S=0;for(const w in s){if(d&&i.issues.length!==S){if(Bn(i,S))break;S=i.issues.length}if(p.has(w))continue;if(w==="__proto__"){b==="never"&&h.push(w);continue}if(b==="never"){h.push(w);continue}const j=m.run({value:s[w],issues:[]},r);j instanceof Promise?t.push(j.then(z=>jo(z,i,w,s,v,x))):jo(j,i,w,s,v,x)}return h.length&&i.issues.push({code:"unrecognized_keys",keys:h,input:s,inst:c,continue:!0}),t.length?Promise.all(t).then(()=>i):i}const vO=Y("$ZodObject",(t,s)=>{Ke.init(t,s);const i=Object.getOwnPropertyDescriptor(s,"shape"),r=i?.get?i.get.raw:s.shape??{};if(r){const m=()=>{const b={...r};return Object.defineProperty(s,"shape",{value:b}),m.raw=b,b};m.raw=r,Object.defineProperty(s,"shape",{get:m})}const o=vd(()=>Qb(s));Ae(t,"propValues",m=>{const b=m.def.shape,v={};for(const x in b){const S=b[x]._zod;if(S.values){Object.prototype.hasOwnProperty.call(v,x)||Ns(v,x,new Set);for(const w of S.values)v[x].add(w);S.optin!==void 0&&v[x].add(void 0)}}return v});const c=So,d=s.catchall;let h;const p=un.memoizer;p?.attach(t),t._zod.parse=(m,b)=>{h??(h=o.value);const v=m.value;if(!c(v))return m.issues.push({expected:"object",code:"invalid_type",input:v,inst:t}),m;m.value=p?p.alloc(t,m,{},b):{};const x=[],S=h.shape,w=b?.abortEarly;let j=m.issues.length;for(const z of h.allKeys){if(w&&m.issues.length!==j){if(Bn(m,j))break;j=m.issues.length}if(z==="__proto__")continue;const T=S[z],L=T._zod.optin,G=T._zod.optout,V=T._zod.run({value:v[z],issues:[]},b);V instanceof Promise?x.push(V.then(W=>jo(W,m,z,v,L,G))):jo(V,m,z,v,L,G)}return d?Gb(x,v,m,b,o.value,t,w===!0):x.length?Promise.all(x).then(()=>m):m}}),bO=Y("$ZodObjectJIT",(t,s)=>{vO.init(t,s);const i=t._zod.parse,r=vd(()=>Qb(s)),o=un.memoizer,c=S=>{const w=r.value,j=w.symbolKeys,z=new Tj(["payload","ctx"],{shape:S,inst:t,memo:o,syms:j}),T=W=>`shape[${W}]._zod.run({ value: input[${W}], issues: [] }, ctx)`,L=(W,$)=>`
|
|
15
|
-
let ${W}_ab = false;
|
|
16
|
-
for (let i = 0; i < ${W}.issues.length; i++) {
|
|
17
|
-
const iss = ${W}.issues[i];
|
|
18
|
-
iss.path = iss.path ? [${$}, ...iss.path] : [${$}];
|
|
19
|
-
payload.issues.push(iss);
|
|
20
|
-
if (iss.continue !== true) ${W}_ab = true;
|
|
21
|
-
}
|
|
22
|
-
if (${W}_ab && ctx && ctx.abortEarly) {
|
|
23
|
-
payload.value = newResult;
|
|
24
|
-
return payload;
|
|
25
|
-
}`;z.write("const input = payload.value;");const G=Object.create(null);let V=0;for(const W of w.allKeys)G[W]=`key_${V++}`;z.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const W of w.allKeys){if(W==="__proto__")continue;const $=G[W],A=typeof W=="symbol"?`syms[${j.indexOf(W)}]`:Iw(W),J=`${A} in input`,ie=S[W],re=ie?._zod?.optin,P=re!==void 0,I=ie?._zod?.optout==="optional";if(z.write(`const ${$} = ${T(A)};`),P&&I){const fe=re==="optional"?`${$}_present`:`${$}.value !== undefined || ${$}_present`;z.write(`
|
|
26
|
-
const ${$}_present = ${J};
|
|
27
|
-
if (!${$}.issues.length || ${$}_present) {
|
|
28
|
-
if (${$}.issues.length) {${L($,A)}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (${fe}) {
|
|
32
|
-
newResult[${A}] = ${$}.value;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
`)}else P?(z.write(`
|
|
37
|
-
if (${$}.issues.length) {${L($,A)}
|
|
38
|
-
}
|
|
39
|
-
`),re==="defaulted"?z.write(`newResult[${A}] = ${$}.value;`):z.write(`
|
|
40
|
-
if (${$}.value !== undefined || ${J}) {
|
|
41
|
-
newResult[${A}] = ${$}.value;
|
|
42
|
-
}
|
|
43
|
-
`)):z.write(`
|
|
44
|
-
const ${$}_present = ${J};
|
|
45
|
-
if (${$}.issues.length) {${L($,A)}
|
|
46
|
-
}
|
|
47
|
-
if (!${$}_present && !${$}.issues.length) {
|
|
48
|
-
payload.issues.push({
|
|
49
|
-
code: "invalid_type",
|
|
50
|
-
expected: "nonoptional",
|
|
51
|
-
input: undefined,
|
|
52
|
-
path: [${A}]
|
|
53
|
-
});
|
|
54
|
-
if (ctx && ctx.abortEarly) {
|
|
55
|
-
payload.value = newResult;
|
|
56
|
-
return payload;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (${$}_present) {
|
|
61
|
-
newResult[${A}] = ${$}.value;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
`)}return z.write("payload.value = newResult;"),z.write("return payload;"),z.compile()};let d;const h=So,p=!un.jitless,b=p&&e2.value,v=s.catchall;let x;t._zod.parse=(S,w)=>{x??(x=r.value);const j=S.value;return h(j)?p&&b&&w?.async===!1&&w.jitless!==!0?(d||(d=c(s.shape)),S=d(S,w),v?Gb([],j,S,w,x,t,w?.abortEarly===!0):S):i(S,w):(S.issues.push({expected:"object",code:"invalid_type",input:j,inst:t}),S)}});function By(t,s,i,r){for(const c of t)if(c.issues.length===0)return s.value=c.value,s;const o=t.filter(c=>!Bn(c));return o.length===1?(s.value=o[0].value,o[0]):(s.issues.push({code:"invalid_union",input:s.value,inst:i,errors:t.map(c=>c.issues.map(d=>js(d,r,bn())))}),s)}const xO=Y("$ZodUnion",(t,s)=>{Ke.init(t,s),Ae(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),Ae(t,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ae(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)))}),Ae(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=>bd(c.source)).join("|")})$`)}});const i=s.options.length===1?s.options[0]._zod.run:null;t._zod.parse=(r,o)=>{if(i)return i(r,o);let c=!1;const d=[];for(const h of s.options){const p=h._zod.run({value:r.value,issues:[]},o);if(p instanceof Promise)d.push(p),c=!0;else{if(p.issues.length===0)return p;d.push(p)}}return c?Promise.all(d).then(h=>By(h,r,t,o)):By(d,r,t,o)}}),SO=Y("$ZodIntersection",(t,s)=>{Ke.init(t,s),t._zod.parse=(i,r)=>{const o=i.value,c=s.left._zod.run({value:o,issues:[]},r),d=s.right._zod.run({value:o,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([p,m])=>$y(i,p,m)):$y(i,c,d)}});function Xf(t,s){if(t===s)return{valid:!0,data:t};if(t instanceof Date&&s instanceof Date&&+t==+s)return{valid:!0,data:t};if(si(t)&&si(s)){const i=Object.keys(s),r=Object.keys(t).filter(c=>i.indexOf(c)!==-1),o={...t,...s};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const c of r){if(c==="__proto__")continue;const d=Xf(t[c],s[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(s)){if(t.length!==s.length)return{valid:!1,mergeErrorPath:[]};const i=[];for(let r=0;r<t.length;r++){const o=t[r],c=s[r],d=Xf(o,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};i.push(d.data)}return{valid:!0,data:i}}return{valid:!1,mergeErrorPath:[]}}function $y(t,s,i){const r=new Map;let o;const c=new Map,d=(m,b)=>{let v;if(m.code==="unrecognized_keys"&&!m.path?.length)o??(o=m),v=m.keys;else if(m.code==="invalid_key"&&m.origin==="record"&&m.path?.length===1){const x=String(m.path[0]);c.has(x)||c.set(x,m),v=[x]}else return!1;for(const x of v)r.has(x)||r.set(x,{}),r.get(x)[b]=!0;return!0};for(const m of s.issues)d(m,"l")||t.issues.push(m);for(const m of i.issues)d(m,"r")||t.issues.push(m);const h=[...r].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(h.length){const m=o?h.filter(b=>o.keys.includes(b)):[];m.length&&t.issues.push({...o,keys:m});for(const b of h)!m.includes(b)&&c.has(b)&&t.issues.push(c.get(b))}const p=Xf(s.value,i.value);if(!p.valid){if(Bn(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(p.mergeErrorPath)}`)}return t.value=p.data,t}const _O=Y("$ZodRecord",(t,s)=>{Ke.init(t,s);const i=un.memoizer;i?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!si(c))return r.issues.push({expected:"record",code:"invalid_type",input:c,inst:t}),r;const d=[],h=s.keyType._zod.values;if(h&&!s.partial){r.value=i?i.alloc(t,r,{},o):{};const p=new Set;for(const b of h)if(typeof b=="string"||typeof b=="number"||typeof b=="symbol"){if(p.add(typeof b=="number"?b.toString():b),b==="__proto__")continue;const v=s.keyType._zod.run({value:b,issues:[]},o);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(v.issues.length){r.issues.push({code:"invalid_key",origin:"record",issues:v.issues.map(w=>js(w,o,bn())),input:b,path:[b],inst:t});continue}const x=v.value;if(x==="__proto__")continue;const S=s.valueType._zod.run({value:c[b],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Xa(b,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Xa(b,S.issues)),r.value[x]=S.value)}let m;for(const b in c)if(!p.has(b))if(s.mode==="loose"){if(b==="__proto__")continue;r.value[b]=c[b]}else m=m??[],m.push(b);m&&m.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:m,continue:!0})}else{r.value=i?i.alloc(t,r,{},o):{};let p;for(const m of Reflect.ownKeys(c)){if(m==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,m))continue;let b=s.keyType._zod.run({value:m,issues:[]},o);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&Ed.test(m)&&b.issues.length){const w=s.keyType._zod.run({value:Number(m),issues:[]},o);if(w instanceof Promise)throw new Error("Async schemas not supported in object keys currently");w.issues.length===0&&(b=w)}if(b.issues.length){s.mode==="loose"?r.value[m]=c[m]:h?(p=p??[],p.push(m)):r.issues.push({code:"invalid_key",origin:"record",issues:b.issues.map(w=>js(w,o,bn())),input:m,path:[m],inst:t});continue}const x=b.value;if(x==="__proto__")continue;const S=s.valueType._zod.run({value:c[m],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Xa(m,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Xa(m,S.issues)),r.value[x]=S.value)}p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:p,continue:!0})}return d.length?Promise.all(d).then(()=>r):r}}),wO=Y("$ZodEnum",(t,s)=>{Ke.init(t,s);const i=Yf(s.entries),r=new Set(i);t._zod.values=r,Ae(t,"pattern",o=>{const c=Yf(o.def.entries).filter(d=>t2.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>ai(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:i,input:d,inst:t}),o}}),jO=Y("$ZodLiteral",(t,s)=>{Ke.init(t,s);const i=new Set(s.values);t._zod.values=i,Ae(t,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(c=>typeof c=="string"?ai(c):c?ai(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{const c=r.value;return i.has(c)||r.issues.push({code:"invalid_value",values:s.values,input:c,inst:t}),r}}),OO=Y("$ZodTransform",(t,s)=>{Ke.init(t,s),t._zod.optin="optional",un.memoizer?.guard(t),t._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Rb(t.constructor.name);const o=s.transform(i.value,i);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(i.value=d,i));if(o instanceof Promise)throw new Ws;return i.value=o,i}});function Hy(t,s){return t.value=s.issues.length?void 0:s.value,t}const Kb=Y("$ZodOptional",(t,s)=>{Ke.init(t,s),Ae(t,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",Ae(t,"values",i=>{const r=i.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),Ae(t,"pattern",i=>{const r=i.def.innerType._zod.pattern;return r?new RegExp(`^(${bd(r.source)})?$`):void 0}),t._zod.parse=(i,r)=>{if(i.value===void 0){if(s.innerType._zod.optin!=="defaulted")return i;const o=s.innerType._zod.run({value:i.value,issues:[]},r);return o instanceof Promise?o.then(c=>Hy(i,c)):Hy(i,o)}return s.innerType._zod.run(i,r)}}),EO=Y("$ZodExactOptional",(t,s)=>{Kb.init(t,s),Ae(t,"values",i=>i.def.innerType._zod.values),Ae(t,"pattern",i=>i.def.innerType._zod.pattern),t._zod.parse=(i,r)=>s.innerType._zod.run(i,r)}),NO=Y("$ZodNullable",(t,s)=>{Ke.init(t,s),Ae(t,"optin",i=>i.def.innerType._zod.optin),Ae(t,"optout",i=>i.def.innerType._zod.optout),Ae(t,"pattern",i=>{const r=i.def.innerType._zod.pattern;return r?new RegExp(`^(${bd(r.source)}|null)$`):void 0}),Ae(t,"values",i=>i.def.innerType._zod.values?new Set([...i.def.innerType._zod.values,null]):void 0),t._zod.parse=(i,r)=>i.value===null?i:s.innerType._zod.run(i,r)}),zO=Y("$ZodDefault",(t,s)=>{Ke.init(t,s),t._zod.optin="defaulted",Ae(t,"values",i=>i.def.innerType._zod.values),t._zod.parse=(i,r)=>{if(r.direction==="backward")return s.innerType._zod.run(i,r);if(i.value===void 0)return i.value=s.defaultValue,i;const o=s.innerType._zod.run(i,r);return o instanceof Promise?o.then(c=>Qy(c,s)):Qy(o,s)}});function Qy(t,s){return t.value===void 0&&(t.value=s.defaultValue),t}const TO=Y("$ZodPrefault",(t,s)=>{Ke.init(t,s),t._zod.optin="defaulted",Ae(t,"values",i=>i.def.innerType._zod.values),t._zod.parse=(i,r)=>(r.direction==="backward"||i.value===void 0&&(i.value=s.defaultValue),s.innerType._zod.run(i,r))}),RO=Y("$ZodNonOptional",(t,s)=>{Ke.init(t,s),Ae(t,"values",i=>{const r=i.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(i,r)=>{const o=s.innerType._zod.run(i,r);return o instanceof Promise?o.then(c=>Gy(c,t)):Gy(o,t)}});function Gy(t,s){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:s}),t}function Ky(t,s,i,r){return s.issues.length?(t.value=i.catchValue({...s,value:t.value,error:{issues:s.issues.map(o=>js(o,r,bn()))},input:t.value}),t):(t.value=s.value,s.memo&&(t.memo=!0),t)}const AO=Y("$ZodCatch",(t,s)=>{Ke.init(t,s),Ae(t,"optin",i=>i.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Ae(t,"optout",i=>i.def.innerType._zod.optout),Ae(t,"values",i=>i.def.innerType._zod.values),t._zod.parse=(i,r)=>{if(r.direction==="backward")return s.innerType._zod.run(i,r);const o=s.innerType._zod.run({value:i.value,issues:[]},r);return o instanceof Promise?o.then(c=>Ky(i,c,s,r)):Ky(i,o,s,r)}}),CO=Y("$ZodPipe",(t,s)=>{Ke.init(t,s),Ae(t,"values",i=>i.def.in._zod.values),Ae(t,"optin",i=>i.def.in._zod.optin),Ae(t,"optout",i=>i.def.out._zod.optout),Ae(t,"propValues",i=>i.def.in._zod.propValues),t._zod.parse=(i,r)=>{if(r.direction==="backward"){const c=s.out._zod.run(i,r);return c instanceof Promise?c.then(d=>Il(d,s.in,r)):Il(c,s.in,r)}const o=s.in._zod.run(i,r);return o instanceof Promise?o.then(c=>Il(c,s.out,r)):Il(o,s.out,r)}});function Il(t,s,i){return t.issues.some(r=>r.code!=="unrecognized_keys")?(t.aborted=!0,t):s._zod.run({value:t.value,issues:t.issues},i)}const MO=Y("$ZodReadonly",(t,s)=>{Ke.init(t,s),Ae(t,"propValues",i=>i.def.innerType._zod.propValues),Ae(t,"values",i=>i.def.innerType._zod.values),Ae(t,"optin",i=>i.def.innerType?._zod?.optin),Ae(t,"optout",i=>i.def.innerType?._zod?.optout),t._zod.parse=(i,r)=>{if(r.direction==="backward")return s.innerType._zod.run(i,r);const o=s.innerType._zod.run(i,r);return o instanceof Promise?o.then(Yy):Yy(o)}});function Yy(t){return t.memo||(t.value=Object.freeze(t.value)),t}const DO=Y("$ZodCustom",(t,s)=>{Ct.init(t,s),Ke.init(t,s),t._zod.parse=(i,r)=>i,t._zod.check=i=>{const r=i.value,o=s.fn(r);if(o instanceof Promise)return o.then(c=>Fy(c,i,r,t));Fy(o,i,r,t)}});function Fy(t,s,i,r){if(!t){const o={code:"custom",input:i,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),s.issues.push(wr(o))}}class kO extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Jf="~memo",Vy=[];function Yb(t){return t!==null&&typeof t=="object"}function Of(t){return t.map(s=>s.path?{...s,path:s.path.slice()}:{...s})}const Fb=new WeakMap,dr=0,co=1,pr=2;function fo(t,s,i){const r=Fb.get(t);if(r!==void 0)return r?pr:dr;if(s.has(t))return pr;s.add(t);let o=dr;const c=b=>{if(o!==pr&&b?._zod){const v=fo(b,s);v>o&&(o=v)}},d=(b,v)=>{let x=dr;for(const S of Reflect.ownKeys(b)){const w=Object.getOwnPropertyDescriptor(b,S);if(!w.enumerable)continue;const j=w.get?co:w.value?._zod?fo(w.value,s):dr;j>x&&(x=j)}return x},h=b=>{b>o&&(o=b)},p=t._zod.def;switch(p.type){case"object":{const b=xb(p);h(b?d(b):co),c(p.catchall);break}case"array":c(p.element);break;case"tuple":for(const b of p.items)c(b);c(p.rest);break;case"record":case"map":c(p.keyType),c(p.valueType);break;case"set":c(p.valueType);break;case"union":for(const b of p.options)c(b);break;case"intersection":c(p.left),c(p.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":c(p.innerType);break;case"pipe":c(p.in),c(p.out);break;case"function":c(p.input),c(p.output);break;case"lazy":{const b=p._cachedInner??void 0;h(b?fo(b,s):co);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 b in p){const v=Object.getOwnPropertyDescriptor(p,b);if(!v||v.get)continue;const x=v.value;if(!(!x||typeof x!="object")){if(x._zod)c(x);else if(Array.isArray(x))for(const S of x)c(S)}}}return s.delete(t),LO(t,o)}function LO(t,s){return s!==co&&Fb.set(t,s===pr),s}function UO(t,s){let i=t.buckets.get(s);return i||(i=new WeakMap,t.buckets.set(s,i)),i}let Wl;const eo=[],ZO={alloc(t,s,i){const r=Wl;if(!r)return i;Wl=void 0;const o={value:i,issues:null};return r.set(s.value,o),eo.push(o),i},guard(t){var s;(s=t._zod).deferred??(s.deferred=[]),t._zod.deferred.push(()=>{const i=t._zod.parse,r=(o,c)=>{if(c.direction!=="backward"&&BO(c,o.value))throw new kO;return i(o,c)};t._zod.parse=r,t._zod.run===i&&(t._zod.run=r)})},attach(t){var s;let i,r=!1,o,c;(s=t._zod).deferred??(s.deferred=[]),t._zod.deferred.push(()=>{const d=t._zod.parse,h=(p,m)=>{if(i===void 0){const T=fo(t,new Set);if(T===dr)return t._zod.parse=d,t._zod.run===h&&(t._zod.run=d),d(p,m);T===pr||r?i=!0:r=!0}const b=p.value;if(!Yb(b))return d(p,m);let v=m[Jf];v||(v={buckets:new WeakMap,backEdges:void 0},m[Jf]=v);let x;o===m?x=c:(x=UO(v,t),o=m,c=x);const S=x.get(b);if(S)return p.value=S.value,S.issues?S.issues.length&&p.issues.push(...Of(S.issues)):(p.memo=!0,v.backEdges??(v.backEdges=new WeakSet),v.backEdges.add(S.value)),p;Wl=x;const w=eo.length,j=d(p,m);Wl=void 0;const z=eo.length>w?eo.pop():void 0;return j instanceof Promise?j.then(T=>(z&&(z.issues=T.issues.length?Of(T.issues):Vy),T)):(z&&(z.issues=j.issues.length?Of(j.issues):Vy),j)};t._zod.parse=h,t._zod.run===d&&(t._zod.run=h)})}};function qO(){return ZO}function BO(t,s){const i=t[Jf]?.backEdges;return i!==void 0&&Yb(s)&&i.has(s)}const $O=()=>{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 s(c){return t[c]??null}const i={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=d2(c.input),p=o(h,c.input);return`Invalid input: expected ${d}, received ${p}`}case"invalid_value":return c.values.length===1?`Invalid input: expected ${Ob(c.values[0])}`:`Invalid option: expected one of ${Ay(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",h=s(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=s(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 ${i[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":""}: ${Ay(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 HO(){return{localeError:$O()}}var Py;class QO{constructor(){this._map=new WeakMap,this._idmap=new Map}add(s,...i){const r=i[0];return this._map.set(s,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,s),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(s){const i=this._map.get(s);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(s),this}get(s){const i=s._zod.parent;if(i){const r={...this.get(i)??{}};delete r.id;const o={...r,...this._map.get(s)};return Object.keys(o).length?o:void 0}return this._map.get(s)}has(s){return this._map.has(s)}}function GO(){return new QO}(Py=globalThis).__zod_globalRegistry??(Py.__zod_globalRegistry=GO());const hr=globalThis.__zod_globalRegistry;function Vb(t){return t.checks&&(t.checks=[...t.checks]),t}function KO(t,s){return new t(Vb({type:"string",...oe(s)}))}function YO(t,s){return new t({type:"string",format:"email",check:"string_format",abort:!1,...oe(s)})}function FO(t,s){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...oe(s)})}function VO(t,s){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...oe(s)})}function PO(t,s){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...oe(s)})}function XO(t,s){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...oe(s)})}function JO(t,s){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...oe(s)})}function IO(t,s){return new t({type:"string",format:"url",check:"string_format",abort:!1,...oe(s)})}function WO(t,s){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...oe(s)})}function eE(t,s){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...oe(s)})}function tE(t,s){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...oe(s)})}function nE(t,s){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...oe(s)})}function sE(t,s){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...oe(s)})}function aE(t,s){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...oe(s)})}function iE(t,s){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...oe(s)})}function rE(t,s){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...oe(s)})}function lE(t,s){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...oe(s)})}function oE(t,s){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...oe(s)})}function uE(t,s){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...oe(s)})}function cE(t,s){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...oe(s)})}function fE(t,s){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...oe(s)})}function dE(t,s){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...oe(s)})}function hE(t,s){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...oe(s)})}function Pb(t,s){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...oe(s)})}function mE(t,s){return new t({type:"string",format:"date",check:"string_format",...oe(s)})}function pE(t,s){return new t({type:"string",format:"time",check:"string_format",precision:null,...oe(s)})}function gE(t,s){return new t({type:"string",format:"duration",check:"string_format",...oe(s)})}function yE(t,s){return new t(Vb({type:"number",checks:[],...oe(s)}))}function vE(t,s){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...oe(s)})}function bE(t,s){return new t({type:"boolean",...oe(s)})}function xE(t){return new t({type:"unknown"})}function SE(t,s){return new t({type:"never",...oe(s)})}function Xy(t,s){return new Mb({check:"less_than",...oe(s),value:t,inclusive:!1})}function Ef(t,s){return new Mb({check:"less_than",...oe(s),value:t,inclusive:!0})}function Jy(t,s){return new Db({check:"greater_than",...oe(s),value:t,inclusive:!1})}function Nf(t,s){return new Db({check:"greater_than",...oe(s),value:t,inclusive:!0})}function Iy(t,s){return new yj({check:"multiple_of",...oe(s),value:t})}function Xb(t,s){return new bj({check:"max_length",...oe(s),maximum:t})}function Oo(t,s){return new xj({check:"min_length",...oe(s),minimum:t})}function Jb(t,s){return new Sj({check:"length_equals",...oe(s),length:t})}function _E(t,s){return new _j({check:"string_format",format:"regex",...oe(s),pattern:t})}function wE(t){return new wj({check:"string_format",format:"lowercase",...oe(t)})}function jE(t){return new jj({check:"string_format",format:"uppercase",...oe(t)})}function OE(t,s){return new Oj({check:"string_format",format:"includes",...oe(s),includes:t})}function EE(t,s){return new Ej({check:"string_format",format:"starts_with",...oe(s),prefix:t})}function NE(t,s){return new Nj({check:"string_format",format:"ends_with",...oe(s),suffix:t})}function ci(t){return new zj({check:"overwrite",tx:t})}function zE(t){return ci(s=>s.normalize(t))}function TE(){return ci(t=>t.trim())}function RE(){return ci(t=>t.toLowerCase())}function AE(){return ci(t=>t.toUpperCase())}function CE(){return ci(t=>Ww(t))}function ME(t,s,i){return new t({type:"array",element:s,...oe(i)})}function DE(t,s,i){return new t({type:"custom",check:"custom",fn:s,...oe(i)})}function kE(t,s){const i=LE(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(wr(o,r.value,i._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=i),c.continue??(c.continue=!i._zod.def.abort),r.issues.push(wr(c))}},t(r.value,r)),s);return i}function LE(t,s){const i=new Ct({check:"custom",...oe(s)});return i._zod.check=t,i}function gr(t,...s){for(const i of s)for(const r of Reflect.ownKeys(i))Object.prototype.propertyIsEnumerable.call(i,r)&&Ns(t,r,i[r]);return t}function Ib(t){let s=t?.target??"draft-2020-12";return s==="draft-4"&&(s="draft-04"),s==="draft-7"&&(s="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??hr,target:s,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 Es(t,s,i,r,o){const c=typeof s.unrepresentable=="function"?s.unrepresentable({zodSchema:t,path:r.path,message:o}):s.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(o);return Object.assign(i,c),!0}function at(t,s,i={path:[],schemaPath:[]}){var r;const o=t._zod.def,c=s.seen.get(t);if(c)return c.count++,i.schemaPath.includes(t)&&(c.cycle=i.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:i.path};s.seen.set(t,d),s.sharedDefsExtractedFor=void 0,s.sharedEmitDoneFor=void 0;const h=t._zod.toJSONSchema?.();if(h)d.schema=h;else{const b={...i,schemaPath:[...i.schemaPath,t],path:i.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(s,d.schema,b);else{const x=d.schema,S=s.processors[o.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);S(t,s,x,b)}const v=t._zod.parent;v&&(d.ref||(d.ref=v),at(v,s,b),s.seen.get(v).isParent=!0)}const p=s.metadataRegistry.get(t);return p&&gr(d.schema,p),s.io==="input"&&xt(t)&&(delete d.schema.examples,delete d.schema.default),s.io==="input"&&"_prefault"in d.schema&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,s.seen.get(t).schema}function Wy(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Wb(t,s){const i=t.seen.get(s);if(!i)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 p=r.get(h);if(p&&p!==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 v=t.external.registry.get(d[0])?.id,x=t.external.uri??(w=>w);if(v)return{ref:x(v)};const S=d[1].defId??d[1].schema.id??`schema${t.counter++}`;return d[1].defId=S,{defId:S,ref:`${x("__shared")}#/${h}/${Wy(S)}`}}const p="#",m=`${p}/${h}/`;if(d[1]===i&&!d[1].schema.id)return{ref:p};const b=d[1].schema.id??`__schema${t.counter++}`;return{defId:b,ref:m+Wy(b)}},c=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:p,defId:m}=o(d);h.def={...h.schema},m&&(h.defId=m);const b=h.schema;for(const v in b)delete b[v];b.$ref=p};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
|
-
|
|
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(s===d[0]){c(d);continue}if(t.external){const m=t.external.registry.get(d[0])?.id;if(s!==d[0]&&m){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 e0(t){const s=t.anyOf;if(!Array.isArray(s)||s.length===0||t.type!==void 0)return;const i=[];for(const r of s){if(!r||typeof r!="object")return;e0(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;i.includes(d)||i.push(d)}}delete t.anyOf,t.type=i.length===1?i[0]:i}const t0=new Set(["type","properties","required","additionalProperties"]),ev=["oneOf","anyOf"];function tv(t){const s=t.additionalProperties;return s===void 0||s===!1||typeof s!="object"||s===null?null:Object.keys(s).length?s:null}function If(t){const s=[];for(const c of t){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!t0.has(d))return null;s.push(c)}const i={},r=new Set;for(const c of s){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(i,d))continue;const h=[];for(const m of s){const b=m.properties?.[d]??tv(m);b!=null&&(h.some(v=>JSON.stringify(v)===JSON.stringify(b))||h.push(b))}const p=h.length===1?h[0]:If(h)??{allOf:h};Ns(i,d,p)}for(const d of c.required??[])r.add(d)}const o={type:"object",properties:i};if(r.size&&(o.required=[...r]),s.every(c=>c.additionalProperties===!1))o.additionalProperties=!1;else{const c=[];for(const d of s){const h=tv(d);h&&!c.some(p=>JSON.stringify(p)===JSON.stringify(h))&&c.push(h)}c.length===1?o.additionalProperties=c[0]:c.length>1&&(o.additionalProperties={allOf:c})}return o}function UE(t){const s=t.allOf;if(!Array.isArray(s)||s.length<2)return;for(const o of t0)if(o in t)return;const i=s.filter(o=>ev.some(c=>Array.isArray(o[c])));let r=null;if(!i.length)r=If(s);else{const o=i[0],c=ev.find(p=>Array.isArray(o[p]));if(Object.keys(o).length!==1)return;const d=s.filter(p=>p!==o),h=o[c].map(p=>If([...d,p]));if(h.some(p=>!p))return;r={[c]:h}}r&&(delete t.allOf,gr(t,r))}function n0(t,s){const i=t.seen.get(s);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const p=t.seen.get(h);if(p.ref===null)return;const m=p.def??p.schema,b={...m},v=p.ref;if(p.ref=null,v){r(v);const S=t.seen.get(v),w=S.schema;if(w.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(m.allOf=m.allOf??[],m.allOf.push(w)):gr(m,w),gr(m,b),h._zod.parent===v)for(const z in m)z==="$ref"||z==="allOf"||z in b||delete m[z];if(w.$ref&&S.def)for(const z in m)z==="$ref"||z==="allOf"||z in S.def&&JSON.stringify(m[z])===JSON.stringify(S.def[z])&&delete m[z]}const x=h._zod.parent;if(x&&x!==v){r(x);const S=t.seen.get(x);if(S?.schema.$ref&&(m.$ref=S.schema.$ref,S.def))for(const w in m)w==="$ref"||w==="allOf"||w in S.def&&JSON.stringify(m[w])===JSON.stringify(S.def[w])&&delete m[w]}t.override({zodSchema:h,jsonSchema:m,path:p.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())e0(h[1].def??h[1].schema);for(const h of t.deferred)h();if(t.intersections.length){const h=new Map;for(const p of t.seen.values())for(const m of[p.schema,p.def]){const b=m?.allOf;if(!Array.isArray(b))continue;const v=h.get(b);v?v.push(m):h.set(b,[m])}for(const p of t.intersections)for(const m of h.get(p)??[])UE(m)}}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(s)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(h)}gr(o,i.defId?i.schema:i.def??i.schema);const c=t.metadataRegistry.get(s)?.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 p=h[1];p.def&&p.defId&&(p.def.id===p.defId&&delete p.def.id,Ns(d,p.defId,p.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:{...s["~standard"],jsonSchema:{input:Eo(s,"input",t.processors),output:Eo(s,"output",t.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function xt(t,s){const i=s??{seen:new Set};if(i.seen.has(t))return!1;i.seen.add(t);const r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return xt(r.element,i);if(r.type==="set")return xt(r.valueType,i);if(r.type==="lazy")return xt(r.getter(),i);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 xt(r.innerType,i);if(r.type==="intersection")return xt(r.left,i)||xt(r.right,i);if(r.type==="record"||r.type==="map")return xt(r.keyType,i)||xt(r.valueType,i);if(r.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:xt(r.in,i)||xt(r.out,i);if(r.type==="object"){for(const o in r.shape)if(xt(r.shape[o],i))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(xt(o,i))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(xt(o,i))return!0;return!!(r.rest&&xt(r.rest,i))}return!1}const ZE=(t,s={})=>i=>{const r=Ib({...i,processors:s});return at(t,r),Wb(r,t),n0(r,t)},Eo=(t,s,i={})=>r=>{const{libraryOptions:o,target:c}=r??{},d=Ib({...o??{},target:c,io:s,processors:i});return at(t,d),Wb(d,t),n0(d,t)},ii=(t,s,i)=>{(t[s]===void 0||i>t[s])&&(t[s]=i)},ri=(t,s,i)=>{(t[s]===void 0||i<t[s])&&(t[s]=i)},nv=(t,s)=>{ii(t,"minimum",s),ri(t,"maximum",s)},s0=(t,s)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(s)||t.multipleOf.push(s)},a0=(t,s)=>{t.patterns??(t.patterns=new Set),t.patterns.add(s)},i0=(t,s)=>{t.mime=t.mime?t.mime.filter(i=>s.includes(i)):[...s]},r0=(t,s)=>{t.format=s,s.includes("int")&&(t.isInt=!0)},sv=(t,s)=>ii(t,"minimum",s.minimum),av=(t,s)=>ri(t,"maximum",s.maximum),iv=t=>(s,i)=>{r0(s,i.format);const[r,o]=t[i.format];ii(s,"minimum",r),ri(s,"maximum",o)},qE={greater_than:(t,s)=>ii(t,s.inclusive?"minimum":"exclusiveMinimum",s.value),less_than:(t,s)=>ri(t,s.inclusive?"maximum":"exclusiveMaximum",s.value),multiple_of:(t,s)=>s0(t,s.value),number_format:iv(Eb),bigint_format:iv(s2),min_length:sv,max_length:av,length_equals:(t,s)=>nv(t,s.length),min_size:sv,max_size:av,size_equals:(t,s)=>nv(t,s.size),string_format:(t,s)=>{r0(t,s.format),s.pattern&&a0(t,s.pattern),(s.format==="base64"||s.format==="base64url")&&(t.contentEncoding=s.format),(s.local||s.precision===-1)&&(t.laxFormat=!0)},mime_type:(t,s)=>i0(t,s.mime)};function on(t){const s={},i=t._zod.def,r=t._zod.traits.has("$ZodCheck")?[t,...i.checks??[]]:i.checks??[];for(const c of r)qE[c._zod.def.check]?.(s,c._zod.def);const o=t._zod.bag;o.minimum!==void 0&&ii(s,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&ii(s,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&ri(s,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&ri(s,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&s0(s,o.multipleOf),o.format!==void 0&&(s.format??(s.format=o.format),o.format.includes("int")&&(s.isInt=!0)),o.mime&&i0(s,o.mime);for(const c of o.patterns??[])a0(s,c);return s}const BE={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},$E=new Map([[$b,aj],[Td,ij]]),l0=t=>$E.get(t)??t,HE=(t,s,i,r)=>{const o=i;o.type="string";const{minimum:c,maximum:d,format:h,patterns:p,contentEncoding:m,laxFormat:b}=on(t);if(typeof c=="number"&&(o.minLength=c),typeof d=="number"&&(o.maxLength=d),h&&(o.format=BE[h]??h,o.format===""&&delete o.format,(h==="time"||b)&&delete o.format),m&&(o.contentEncoding=m),p&&p.size>0){const v=[...p].map(l0);v.length===1?o.pattern=v[0].source:v.length>1&&(o.allOf=[...v.map(x=>({...s.target==="draft-07"||s.target==="draft-04"||s.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},QE=(t,s,i,r)=>{const o=i,{minimum:c,maximum:d,multipleOf:h,exclusiveMaximum:p,exclusiveMinimum:m,isInt:b}=on(t);o.type=b?"integer":"number";const v=typeof m=="number"&&m>=(c??Number.NEGATIVE_INFINITY),x=typeof p=="number"&&p<=(d??Number.POSITIVE_INFINITY),S=s.target==="draft-04"||s.target==="openapi-3.0";if(v?S?(o.minimum=m,o.exclusiveMinimum=!0):o.exclusiveMinimum=m:typeof c=="number"&&(o.minimum=c),x?S?(o.maximum=p,o.exclusiveMaximum=!0):o.exclusiveMaximum=p:typeof d=="number"&&(o.maximum=d),h){const w=new Set;for(const T of h)Number.isFinite(T)&&T!==0?w.add(Math.abs(T)):Es(t,s,o,r,`A multipleOf divisor of ${T} cannot be represented in JSON Schema`);const[j,...z]=w;j!==void 0&&(o.multipleOf=j),z.length&&(o.allOf=[...o.allOf??[],...z.map(T=>({multipleOf:T}))])}},GE=(t,s,i,r)=>{i.type="boolean"},KE=(t,s,i,r)=>{i.not={}},YE=(t,s,i,r)=>{},FE=(t,s,i,r)=>{const o=t._zod.def,c=Yf(o.entries);if(c.length===0){i.not={};return}c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),i.enum=c},VE=(t,s,i,r)=>{const o=t._zod.def;if(o.values.length===0){i.not={};return}const c=[];for(const d of o.values)if(d===void 0){if(Es(t,s,i,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(Es(t,s,i,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];i.type=d===null?"null":typeof d,s.target==="draft-04"||s.target==="openapi-3.0"?i.enum=[d]:i.const=d}else c.every(d=>typeof d=="number")&&(i.type="number"),c.every(d=>typeof d=="string")&&(i.type="string"),c.every(d=>typeof d=="boolean")&&(i.type="boolean"),c.every(d=>d===null)&&(i.type="null"),i.enum=c},PE=(t,s,i,r)=>{Es(t,s,i,r,"Custom types cannot be represented in JSON Schema")},XE=(t,s,i,r)=>{Es(t,s,i,r,"Transforms cannot be represented in JSON Schema")},JE=(t,s,i,r)=>{const o=i,c=t._zod.def,{minimum:d,maximum:h}=on(t);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=at(c.element,s,{...r,path:[...r.path,"items"]})};function No(t){const s=t._zod.def;return s.type==="pipe"&&s.in._zod.traits.has("$ZodTransform")?No(s.out):s.type==="catch"?No(s.innerType):t._zod.optin}const IE=(t,s,i,r)=>{const o=i,c=t._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&Es(t,s,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const m in d)Ns(o.properties,m,at(d[m],s,{...r,path:[...r.path,"properties",m]}));const p=[];for(const m of Object.keys(d)){const b=c.shape[m];(s.io==="input"?No(b)===void 0:b._zod.optout===void 0)&&p.push(m)}p.length>0&&(o.required=p),c.catchall?._zod.def.type==="never"?o.additionalProperties=!1:c.catchall?c.catchall&&(o.additionalProperties=at(c.catchall,s,{...r,path:[...r.path,"additionalProperties"]})):s.io==="output"&&(o.additionalProperties=!1)},WE=(t,s,i,r)=>{const o=t._zod.def,c=o.inclusive===!1,d=o.options.map((h,p)=>at(h,s,{...r,path:[...r.path,c?"oneOf":"anyOf",p]}));c?i.oneOf=d:i.anyOf=d},eN=(t,s,i,r)=>{const o=t._zod.def,c=at(o.left,s,{...r,path:[...r.path,"allOf",0]}),d=at(o.right,s,{...r,path:[...r.path,"allOf",1]}),h=m=>"allOf"in m&&Object.keys(m).length===1,p=[...h(c)?c.allOf:[c],...h(d)?d.allOf:[d]];i.allOf=p,s.intersections.push(p)};function Wf(t,s,i){if(s.$ref){if(i.has(s))return s;i.add(s);const w=t.get(s)?.def;if(!w)return s;const j=Wf(t,w,i);return j===w?s:j}for(const w of["anyOf","oneOf"]){const j=s[w];if(!Array.isArray(j))continue;const z=j.map(T=>Wf(t,T,i));z.some((T,L)=>T!==j[L])&&(s={...s,[w]:z})}const r=Array.isArray(s.type)?s.type:[s.type],o=!r.includes("string")&&r.some(w=>w==="number"||w==="integer"),c=s.enum??(s.const!==void 0?[s.const]:void 0);if(!o&&!c?.some(w=>typeof w=="number"))return s;const{minimum:d,maximum:h,exclusiveMinimum:p,exclusiveMaximum:m,multipleOf:b,format:v,id:x,...S}=s;return S.enum?S.enum=S.enum.map(w=>typeof w=="number"?String(w):w):typeof S.const=="number"&&(S.const=String(S.const)),o&&(S.type="string",c||(S.pattern=(r.includes("number")?Ed:hj).source)),S}const ed=new WeakMap;function tN(t){const s=new Map;for(const r of t.seen.values())r.def&&!s.has(r.schema)&&s.set(r.schema,r);const i=new Map;for(const r of ed.get(t)??[]){const o=t.seen.get(r),c=(o?.def??o?.schema)?.propertyNames;if(!c||c===!0||i.has(c))continue;const d=Wf(s,c,new Set);d!==c&&i.set(c,d)}if(i.size)for(const r of t.seen.values())for(const o of[r.schema,r.def]){const c=o&&i.get(o.propertyNames);c&&(o.propertyNames=c)}}const nN=(t,s,i,r)=>{const o=i,c=t._zod.def;o.type="object";const d=c.keyType,h=on(d).patterns;if(c.mode==="loose"&&h&&h.size>0){const b=at(c.valueType,s,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const v of h)Ns(o.patternProperties,l0(v).source,b)}else{if(s.target==="draft-07"||s.target==="draft-2020-12"){o.propertyNames=at(c.keyType,s,{...r,path:[...r.path,"propertyNames"]});let b=ed.get(s);b||(b=[],ed.set(s,b),s.deferred.push(()=>tN(s))),b.push(t)}o.additionalProperties=at(c.valueType,s,{...r,path:[...r.path,"additionalProperties"]})}const p=d._zod.values,m=s.io==="input"&&No(c.valueType)!==void 0;if(p&&!c.partial&&!m){const b=[...p].filter(v=>typeof v=="string"||typeof v=="number");b.length>0&&(o.required=b.map(String))}},sN=(t,s,i,r)=>{const o=t._zod.def,c=at(o.innerType,s,r),d=s.seen.get(t);s.target==="openapi-3.0"?(d.ref=o.innerType,i.nullable=!0):i.anyOf=[c,{type:"null"}]},aN=(t,s,i,r)=>{const o=t._zod.def;at(o.innerType,s,r);const c=s.seen.get(t);c.ref=o.innerType},Rd=Symbol();function o0(t,s,i,r,o){let c=!1;const d=JSON.stringify(t,(h,p)=>typeof p!="bigint"?p:(c=!0,null));return c?(Es(s,i,r,o,"BigInt defaults cannot be represented in JSON Schema"),Rd):JSON.parse(d)}const iN=(t,s,i,r)=>{const o=t._zod.def;at(o.innerType,s,r);const c=s.seen.get(t);c.ref=o.innerType;const d=o0(o.defaultValue,t,s,i,r);d!==Rd&&(i.default=d)},rN=(t,s,i,r)=>{const o=t._zod.def;at(o.innerType,s,r);const c=s.seen.get(t);if(c.ref=o.innerType,s.io!=="input")return;const d=o0(o.defaultValue,t,s,i,r);d!==Rd&&(i._prefault=d)},lN=(t,s,i,r)=>{const o=t._zod.def;at(o.innerType,s,r);const c=s.seen.get(t);c.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{Es(t,s,i,r,"Dynamic catch values are not supported in JSON Schema");return}i.default=d},oN=(t,s,i,r)=>{const o=t._zod.def,c=o.in._zod.traits.has("$ZodTransform"),d=s.io==="input"?c?o.out:o.in:o.out;at(d,s,r);const h=s.seen.get(t);h.ref=d},uN=(t,s,i,r)=>{const o=t._zod.def;at(o.innerType,s,r);const c=s.seen.get(t);c.ref=o.innerType,i.readOnly=!0},u0=(t,s,i,r)=>{const o=t._zod.def;at(o.innerType,s,r);const c=s.seen.get(t);c.ref=o.innerType},rv=new WeakSet([Object.prototype,Error.prototype]);function to(t,s,i){Object.defineProperty(t,s,{configurable:!0,enumerable:!1,get(){const r=i(this);return Object.defineProperty(this,s,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,s,{value:r,configurable:!0,writable:!0})}})}const cN=(t,s)=>{O2.init(t,s),t.name="ZodError";const i=Object.getPrototypeOf(t);rv.has(i)||(rv.add(i),to(i,"format",r=>o=>z2(r,o)),to(i,"flatten",r=>o=>N2(r,o)),to(i,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Ff,2)}),to(i,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Ff,2)}),Object.defineProperty(i,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},nn=Y("ZodError",cN,void 0,{Parent:Error}),fN=_d(nn),dN=wd(nn),hN=jd(nn),mN=Od(nn),pN=D2(nn),gN=k2(nn),yN=L2(nn),vN=U2(nn),bN=Z2(nn),xN=q2(nn),SN=B2(nn),_N=$2(nn);function wN(){un.localeError||bn(HO())}function Uo(){un.memoizer||bn({memoizer:qO()})}const Ye=Y("ZodType",(t,s)=>(wN(),Ke.init(t,s),t.def=s,t.type=s.type,t),{check(...t){const s=this.def;return this.clone(Gt(s,{checks:[...s.checks??[],...t.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,s){return zs(this,t,s)},brand(){return this},register(t,s){return t.add(this,s),this},refine(t,s){return this.check(gz(t,s))},superRefine(t,s){return this.check(yz(t,s))},overwrite(t){return this.check(ci(t))},optional(){return uv(this)},exactOptional(){return az(this)},nullable(){return cv(this)},nullish(){return uv(cv(this))},nonoptional(t){return uz(this,t)},array(){return he(this)},or(t){return Zo([this,t])},and(t){return WN(this,t)},transform(t){return fv(this,sz(t))},default(t){return rz(this,t)},prefault(t){return oz(this,t)},catch(t){return fz(this,t)},pipe(t){return fv(this,t)},readonly(){return mz(this)},describe(t){const s=this.clone();return hr.add(s,{description:t}),s},meta(...t){if(t.length===0)return hr.get(this);const s=this.clone();return hr.add(s,t[0]),s},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...s){return s.length===0?t(this):t(this,...s)},get"~standard"(){return zb(this,"~standard",{...Lb(this),jsonSchema:{input:Eo(this,"input"),output:Eo(this,"output")}})},set"~standard"(t){Os(this,"~standard",t)},parse:function t(s,i){return fN(this,s,i,{callee:t})},parseAsync:async function t(s,i){return await dN(this,s,i,{callee:t})},safeParse(t,s){return hN(this,t,s)},async safeParseAsync(t,s){return mN(this,t,s)},get spa(){return this?.safeParseAsync},set spa(t){Os(this,"spa",t)},validate(t,s){return A2(this,t,s)},validateAsync(t,s){return M2(this,t,s)},encode:function t(s,i){return pN(this,s,i,{callee:t})},decode:function t(s,i){return gN(this,s,i,{callee:t})},encodeAsync:async function t(s,i){return await yN(this,s,i,{callee:t})},decodeAsync:async function t(s,i){return await vN(this,s,i,{callee:t})},safeEncode(t,s){return bN(this,t,s)},safeDecode(t,s){return xN(this,t,s)},async safeEncodeAsync(t,s){return SN(this,t,s)},async safeDecodeAsync(t,s){return _N(this,t,s)},toJSONSchema(t){return ZE(this,{})(t)},get description(){return hr.get(this)?.description},get _def(){return this._zod.def}}),c0=Y("_ZodString",(t,s)=>{zd.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>HE(t,i,r)},Tb({format:t=>on(t).format??null,minLength:t=>on(t).minimum??null,maxLength:t=>on(t).maximum??null},{regex(...t){return this.check(_E(...t))},includes(...t){return this.check(OE(...t))},startsWith(...t){return this.check(EE(...t))},endsWith(...t){return this.check(NE(...t))},min(...t){return this.check(Oo(...t))},max(...t){return this.check(Xb(...t))},length(...t){return this.check(Jb(...t))},nonempty(...t){return this.check(Oo(1,...t))},lowercase(t){return this.check(wE(t))},uppercase(t){return this.check(jE(t))},trim(){return this.check(TE())},normalize(...t){return this.check(zE(...t))},toLowerCase(){return this.check(RE())},toUpperCase(){return this.check(AE())},slugify(){return this.check(CE())}})),f0=Y("ZodString",(t,s)=>{zd.init(t,s),c0.init(t,s)},{email(t){return this.check(YO(NN,t))},url(t){return this.check(IO(TN,t))},jwt(t){return this.check(hE(GN,t))},emoji(t){return this.check(WO(RN,t))},guid(t){return this.check(FO(zN,t))},uuid(t){return this.check(VO(no,t))},uuidv4(t){return this.check(PO(no,t))},uuidv6(t){return this.check(XO(no,t))},uuidv7(t){return this.check(JO(no,t))},nanoid(t){return this.check(eE(AN,t))},cuid(t){return this.check(tE(CN,t))},cuid2(t){return this.check(nE(MN,t))},ulid(t){return this.check(sE(DN,t))},base64(t){return this.check(cE($N,t))},base64url(t){return this.check(fE(HN,t))},xid(t){return this.check(aE(kN,t))},ksuid(t){return this.check(iE(LN,t))},ipv4(t){return this.check(rE(UN,t))},ipv6(t){return this.check(lE(ZN,t))},cidrv4(t){return this.check(oE(qN,t))},cidrv6(t){return this.check(uE(BN,t))},e164(t){return this.check(dE(QN,t))},datetime(t){return this.check(Pb(d0,t))},date(t){return this.check(mE(jN,t))},time(t){return this.check(pE(ON,t))},duration(t){return this.check(gE(EN,t))}});function Q(t){return KO(f0,t)}const Fe=Y("ZodStringFormat",(t,s)=>{Ge.init(t,s),c0.init(t,s)}),d0=Y("ZodISODateTime",(t,s)=>{Vj.init(t,s),Fe.init(t,s)}),jN=Y("ZodISODate",(t,s)=>{Pj.init(t,s),Fe.init(t,s)}),ON=Y("ZodISOTime",(t,s)=>{Xj.init(t,s),Fe.init(t,s)}),EN=Y("ZodISODuration",(t,s)=>{Jj.init(t,s),Fe.init(t,s)}),NN=Y("ZodEmail",(t,s)=>{Dj.init(t,s),Fe.init(t,s)}),zN=Y("ZodGUID",(t,s)=>{Cj.init(t,s),Fe.init(t,s)}),no=Y("ZodUUID",(t,s)=>{Mj.init(t,s),Fe.init(t,s)}),TN=Y("ZodURL",(t,s)=>{Bj.init(t,s),Fe.init(t,s)}),RN=Y("ZodEmoji",(t,s)=>{$j.init(t,s),Fe.init(t,s)}),AN=Y("ZodNanoID",(t,s)=>{Hj.init(t,s),Fe.init(t,s)}),CN=Y("ZodCUID",(t,s)=>{Qj.init(t,s),Fe.init(t,s)}),MN=Y("ZodCUID2",(t,s)=>{Gj.init(t,s),Fe.init(t,s)}),DN=Y("ZodULID",(t,s)=>{Kj.init(t,s),Fe.init(t,s)}),kN=Y("ZodXID",(t,s)=>{Yj.init(t,s),Fe.init(t,s)}),LN=Y("ZodKSUID",(t,s)=>{Fj.init(t,s),Fe.init(t,s)}),UN=Y("ZodIPv4",(t,s)=>{Ij.init(t,s),Fe.init(t,s)}),ZN=Y("ZodIPv6",(t,s)=>{eO.init(t,s),Fe.init(t,s)}),qN=Y("ZodCIDRv4",(t,s)=>{tO.init(t,s),Fe.init(t,s)}),BN=Y("ZodCIDRv6",(t,s)=>{sO.init(t,s),Fe.init(t,s)}),$N=Y("ZodBase64",(t,s)=>{aO.init(t,s),Fe.init(t,s)}),HN=Y("ZodBase64URL",(t,s)=>{rO.init(t,s),Fe.init(t,s)}),QN=Y("ZodE164",(t,s)=>{lO.init(t,s),Fe.init(t,s)}),GN=Y("ZodJWT",(t,s)=>{uO.init(t,s),Fe.init(t,s)}),h0=Y("ZodNumber",(t,s)=>{Hb.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>QE(t,i,r,o),t.isFinite=!0},Tb({minValue:t=>{const{minimum:s,exclusiveMinimum:i}=on(t);return Math.max(s??Number.NEGATIVE_INFINITY,i??Number.NEGATIVE_INFINITY)},maxValue:t=>{const{maximum:s,exclusiveMaximum:i}=on(t);return Math.min(s??Number.POSITIVE_INFINITY,i??Number.POSITIVE_INFINITY)},isInt:t=>{const{isInt:s,multipleOf:i}=on(t);return!!s||!!i?.some(Number.isSafeInteger)},format:t=>on(t).format??null},{gt(t,s){return this.check(Jy(t,s))},gte(t,s){return this.check(Nf(t,s))},min(t,s){return this.check(Nf(t,s))},lt(t,s){return this.check(Xy(t,s))},lte(t,s){return this.check(Ef(t,s))},max(t,s){return this.check(Ef(t,s))},int(t){return this.check(lv(t))},safe(t){return this.check(lv(t))},positive(t){return this.check(Jy(0,t))},nonnegative(t){return this.check(Nf(0,t))},negative(t){return this.check(Xy(0,t))},nonpositive(t){return this.check(Ef(0,t))},multipleOf(t,s){return this.check(Iy(t,s))},step(t,s){return this.check(Iy(t,s))},finite(){return this}}));function Re(t){return yE(h0,t)}const KN=Y("ZodNumberFormat",(t,s)=>{cO.init(t,s),h0.init(t,s)});function lv(t){return vE(KN,t)}const YN=Y("ZodBoolean",(t,s)=>{fO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>GE(t,i,r)});function lt(t){return bE(YN,t)}const FN=Y("ZodUnknown",(t,s)=>{dO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>YE()});function td(){return xE(FN)}const VN=Y("ZodNever",(t,s)=>{hO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>KE(t,i,r)});function PN(t){return SE(VN,t)}const m0=Y("ZodArray",(t,s)=>{Uo(),gO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>JE(t,i,r,o),t.element=s.element},{min(t,s){return this.check(Oo(t,s))},nonempty(t){return this.check(Oo(1,t))},max(t,s){return this.check(Xb(t,s))},length(t,s){return this.check(Jb(t,s))},unwrap(){return this.element}});function he(t,s){return ME(m0,t,s)}const XN=Y("ZodObject",(t,s)=>{Uo(),bO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>IE(t,i,r,o),y2(t,"shape",i=>i._zod.def.shape,!1)},{keyof(){return yt(Object.keys(this._zod.def.shape))},catchall(t){return this.clone(Gt(this._zod.def,{catchall:t}))},passthrough(){return this.clone(Gt(this._zod.def,{catchall:td()}))},loose(){return this.clone(Gt(this._zod.def,{catchall:td()}))},strict(){return this.clone(Gt(this._zod.def,{catchall:PN()}))},strip(){return this.clone(Gt(this._zod.def,{catchall:void 0}))},extend(t){return r2(this,t)},safeExtend(t){return l2(this,t)},merge(t){return o2(this,t)},pick(t){return a2(this,t)},omit(t){return i2(this,t)},partial(...t){return Cy(p0,this,t[0])},exactPartial(...t){return Cy(g0,this,t[0],"exactPartial")},required(...t){return u2(v0,this,t[0])}});function te(t,s){const i={type:"object",shape:t??{},...oe(s)};return new XN(i)}const JN=Y("ZodUnion",(t,s)=>{xO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>WE(t,i,r,o),t.options=s.options});function Zo(t,s){return new JN({type:"union",options:t,...oe(s)})}const IN=Y("ZodIntersection",(t,s)=>{SO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>eN(t,i,r,o)});function WN(t,s){return new IN({type:"intersection",left:t,right:s})}const ov=Y("ZodRecord",(t,s)=>{Uo(),_O.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>nN(t,i,r,o),t.keyType=s.keyType,t.valueType=s.valueType});function ez(t,s,i){return!s||!s._zod?new ov({type:"record",keyType:Q(),valueType:t,...oe(s)}):new ov({type:"record",keyType:t,valueType:s,...oe(i)})}const zo=Y("ZodEnum",(t,s)=>{wO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(r,o,c)=>FE(t,r,o),t.enum=s.entries,t.options=[...t._zod.values];const i=new Set(Object.keys(s.entries));t.extract=(r,o)=>{const c={};for(const d of r)if(i.has(d))c[d]=s.entries[d];else throw new Error(`Key ${d} not found in enum`);return new zo({...s,checks:[],...oe(o),entries:c})},t.exclude=(r,o)=>{const c={...s.entries};for(const d of r)if(i.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new zo({...s,checks:[],...oe(o),entries:c})}});function yt(t,s){const i=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new zo({type:"enum",entries:i,...oe(s)})}const tz=Y("ZodLiteral",(t,s)=>{jO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>VE(t,i,r,o),t.values=new Set(s.values),Object.defineProperty(t,"value",{get(){if(s.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return s.values[0]}})});function vs(t,s){return new tz({type:"literal",values:Array.isArray(t)?t:[t],...oe(s)})}const nz=Y("ZodTransform",(t,s)=>{Uo(),OO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>XE(t,i,r,o),t._zod.parse=(i,r)=>{if(r.direction==="backward")throw new Rb(t.constructor.name);i.addIssue=c=>{if(typeof c=="string")i.issues.push(wr(c,i.value,s));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=i.value),d.inst??(d.inst=t),i.issues.push(wr(d))}};const o=s.transform(i.value,i);return o instanceof Promise?o.then(c=>(i.value=c,i)):(i.value=o,i)}});function sz(t){return new nz({type:"transform",transform:t})}const p0=Y("ZodOptional",(t,s)=>{Kb.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>u0(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function uv(t){return new p0({type:"optional",innerType:t})}const g0=Y("ZodExactOptional",(t,s)=>{EO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>u0(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function az(t){return new g0({type:"optional",innerType:t})}const iz=Y("ZodNullable",(t,s)=>{NO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>sN(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function cv(t){return new iz({type:"nullable",innerType:t})}const y0=Y("ZodDefault",(t,s)=>{zO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>iN(t,i,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function rz(t,s){return new y0({type:"default",innerType:t,get defaultValue(){return typeof s=="function"?s():jb(s)}})}const lz=Y("ZodPrefault",(t,s)=>{TO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>rN(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function oz(t,s){return new lz({type:"prefault",innerType:t,get defaultValue(){return typeof s=="function"?s():jb(s)}})}const v0=Y("ZodNonOptional",(t,s)=>{RO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>aN(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function uz(t,s){return new v0({type:"nonoptional",innerType:t,...oe(s)})}const cz=Y("ZodCatch",(t,s)=>{AO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>lN(t,i,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function fz(t,s){return new cz({type:"catch",innerType:t,catchValue:typeof s=="function"?s:b2(s)})}const dz=Y("ZodPipe",(t,s)=>{CO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>oN(t,i,r,o),t.in=s.in,t.out=s.out});function fv(t,s){return new dz({type:"pipe",in:t,out:s})}const hz=Y("ZodReadonly",(t,s)=>{MO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>uN(t,i,r,o),t.unwrap=()=>t._zod.def.innerType});function mz(t){return new hz({type:"readonly",innerType:t})}const pz=Y("ZodCustom",(t,s)=>{DO.init(t,s),Ye.init(t,s),t._zod.processJSONSchema=(i,r,o)=>PE(t,i,r,o)});function gz(t,s={}){return DE(pz,t,s)}function yz(t,s){return kE(t,s)}function vz(t){return Pb(d0,t)}const Ie=Q().regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"kebab-case required"),b0=Q().regex(/^package:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"expected package:<kebab-case-name>"),bz=te({method:yt(["GET","POST","PUT","PATCH","DELETE"]),path:Q().startsWith("/api/"),description:Q().min(10),schemaInput:Q().describe("Exported name of the input Zod schema, e.g. CreateOrderInputSchema"),schemaOutput:Q().describe("Exported name of the output Zod schema"),invalidates:he(Q()).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")}),xz=yt(["reference","ownerless"]),Sz=Zo([Q(),te({name:Q(),shared:vs(!0),sharedKind:xz.optional()})]),_z=te({name:Ie,intent:Q().min(20).max(300).describe("The feature's 'why' in 1-3 sentences"),app:Q().optional().describe("Name of the owning app (apps[].name); defaults to the api app"),folder:Q().describe("Path relative to the app root, e.g. src/features/orders"),spec:Q().nullable().describe("Path to the spec, e.g. specs/orders.spec.md, null for technical features"),routes:he(bz),dbTables:he(Sz).describe("Drizzle tables owned by this feature (one table = one owner). String = tenant-scoped; { name, shared: true } = shared referential"),dependsOn:he(Zo([Ie,b0])).describe("Features imported through their index.ts, and product packages as package:<name> — nothing else"),status:yt(["skeleton","in-progress","delivered"])}),wz=Q().regex(/^\d+\.\d+\.\d+$/,"expected a plain x.y.z version"),jz=te({packages:he(te({name:Q().describe("Published npm name, e.g. @ogygie/core"),path:Q().describe("Folder relative to the repo root"),intent:Q().min(20),spec:Q().nullable(),status:yt(["skeleton","in-progress","delivered"])})),templates:te({project:Q().describe("Folder copied by `ogygie init`"),feature:Q().describe("Reserved for `ogygie generate feature` (not wired yet)")}),governedFiles:Q().describe("Module declaring the exhaustive list of files `upgrade` may overwrite (D3)")}),Oz=te({canonical:Q().regex(/^[a-z][a-zA-Z0-9]*$/,"camelCase English term required").describe("The one machine term for this concept, e.g. gadget"),forbiddenAliases:he(Q().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:Q().optional().describe("Anchor into AGENTS.product.md where the concept is explained")}),Ez=te({entries:he(Oz)}),Nz=te({name:Ie,path:Q().describe("Folder relative to the repo root, e.g. packages/solver"),intent:Q().min(20).max(300).describe("The package's 'why' in 1-3 sentences"),spec:Q().nullable(),dependsOn:he(b0).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:yt(["skeleton","in-progress","delivered"])}),zz=te({column:Q().min(1).describe("SQL name of the tenant column, e.g. workspace_id — the one AGENTS.product.md announces"),rawDbAllowed:he(Ie).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")}),Tz=te({version:vs(1),product:te({name:Q(),description:Q().min(20)}),ogygieVersion:wz.optional(),framework:jz.optional(),apps:he(te({name:Q(),path:Q(),type:yt(["api","front","gateway"]),entryPoint:Q(),vendored:vs(!0).optional()})),features:he(_z),tenancy:zz.optional().describe("Product values the framework gates need — absent, the tenancy checks do not run"),packages:he(Nz).optional().describe("Product code living outside every app — libraries, engines. Absent = the project has none"),vocabulary:Ez.optional().describe("The product's closed vocabulary — declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"),conventions:te({agentsMd:vs("AGENTS.md"),failuresMd:vs("FAILURES.md"),specsFolder:vs("specs/")})}).superRefine((t,s)=>{const i=new Set(t.features.map(v=>v.name)),r=new Set;(t.packages??[]).forEach((v,x)=>{i.has(v.name)&&s.addIssue({code:"custom",path:["packages",x,"name"],message:`"${v.name}" is already the name of a feature — one name designates one thing`}),r.has(v.name)&&s.addIssue({code:"custom",path:["packages",x,"name"],message:`package "${v.name}" is declared twice`}),r.add(v.name)});const o=v=>(v.split("/").pop()??v).replace(/\.spec\.md$/,""),c=new Set([...t.features.map(v=>v.name),...r]);(t.framework?.packages??[]).forEach((v,x)=>{if(v.spec===null)return;const S=o(v.spec);c.has(S)&&s.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=(v,x)=>{v.forEach((S,w)=>{if(!S.startsWith("package:"))return;const j=S.slice(8);r.has(j)||s.addIssue({code:"custom",path:[...x,w],message:`dependency "${S}" matches no declared package`})})};t.features.forEach((v,x)=>{d(v.dependsOn,["features",x,"dependsOn"])}),(t.packages??[]).forEach((v,x)=>{d(v.dependsOn,["packages",x,"dependsOn"])}),(t.tenancy?.rawDbAllowed??[]).forEach((v,x)=>{i.has(v)||s.addIssue({code:"custom",path:["tenancy","rawDbAllowed",x],message:`"${v}" matches no declared feature`})});const h=new Map,p=new Map;(t.vocabulary?.entries??[]).forEach((v,x)=>{const S=v.canonical.toLowerCase(),w=h.get(S);w!==void 0?s.addIssue({code:"custom",path:["vocabulary","entries",x,"canonical"],message:`canonical "${v.canonical}" is already declared by entry ${w}`}):h.set(S,x)}),(t.vocabulary?.entries??[]).forEach((v,x)=>{v.forbiddenAliases.forEach((S,w)=>{const j=["vocabulary","entries",x,"forbiddenAliases",w],z=h.get(S);if(z!==void 0){s.addIssue({code:"custom",path:j,message:`alias "${S}" is the canonical term of entry ${z} — a term cannot be both`});return}const T=p.get(S);if(T!==void 0){s.addIssue({code:"custom",path:j,message:`alias "${S}" is already forbidden by entry ${T} — one alias belongs to one concept`});return}p.set(S,x)})});const m=new Map(t.apps.map(v=>[v.name,v])),b=new Set(t.features.map(v=>v.name));for(const v of t.features)for(const x of v.routes){const S=x.path.split("/")[2];S!==void 0&&b.add(S)}t.features.forEach((v,x)=>{v.routes.forEach((S,w)=>{for(const j of S.invalidates??[])b.has(j)||s.addIssue({code:"custom",path:["features",x,"routes",w,"invalidates"],message:`invalidates target "${j}" matches no feature name and no route root`})})}),t.features.forEach((v,x)=>{if(v.app===void 0)return;const S=m.get(v.app);if(S===void 0){s.addIssue({code:"custom",path:["features",x,"app"],message:`app "${v.app}" is not declared in apps[]`});return}S.type!=="api"&&(v.routes.length>0||v.dbTables.length>0)&&s.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"})})}),Rz=Q().regex(/^.+ blockedBy:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,'Expected "<behavior> blockedBy:<feature-name>" (feature name in kebab-case)'),fi=te({id:Ie.describe("Identical to the feature name in the manifest"),status:yt(["draft","validated","implemented"]),depends_on:he(Ie),priority:yt(["P0","P1","P2"]),refs:he(Q()).default([]).describe("References to the domain model, e.g. 'modele-gally §4.2'"),deferred:he(Rz).default([]).describe("Behaviors deferred to a later feature, blocked by name")}),ei=["# @intent","# Comportements","# Contrats de données","# États UI","# Non-objectifs","# Budget"],Az="Hypothèses";function Cz(t){const s=new RegExp(`^# ${Az}\\s*$`,"mu").exec(t);if(s===null)return[];const i=t.slice(s.index+s[0].length),r=/^# /mu.exec(i);return(r===null?i:i.slice(0,r.index)).split(`
|
|
67
|
-
`).map(c=>c.trim()).filter(c=>/^[-*]\s+\S/u.test(c)).map(c=>c.replace(/^[-*]\s+/u,"").trim())}const qo=te({ogygie:vs(!0).describe("Marker: lets an agent tell our errors from noise"),code:Q().regex(/^[A-Z][A-Z0-9_]+$/,"SCREAMING_SNAKE_CASE, stable over time"),message:Q().min(10).describe("Human-readable sentence (technical English)"),file:Q().nullable().describe("Relative path of the file involved, null when not localizable"),cause:Q().describe("The precise datum or condition that triggered the error"),suggestedFix:Q().describe("Concrete action to fix — never empty"),details:ez(Q(),td()).default({}),timestamp:vz()});class Bo extends Error{payload;constructor(s){super(s.message),this.name="StudioApiError",this.payload=s}}async function We(t,s,i){const r=await fetch(t,i),o=await r.json();if(!r.ok){const c=qo.safeParse(o);throw c.success?new Bo(c.data):new Error(`HTTP ${r.status} on ${t} (non-OgygieError payload)`)}return s.parse(o)}function Or(t){return{headers:{"content-type":"application/json"},body:JSON.stringify(t)}}const nd=yt(["feature","package","framework-package"]),Mz=te({scannedFolders:he(Q()),coveredKinds:he(nd),outOfReach:he(Q())}),Dz=te({target:te({name:Q(),kind:nd,folder:Q()}),dependents:he(te({name:Q(),kind:nd,importedSymbols:he(Q()),viaIndexOnly:lt()})),routes:he(te({method:Q(),path:Q(),description:Q()})),ownedTables:he(Q()),tableReadersOutsideOwner:he(te({table:Q(),feature:Q(),file:Q()})),findings:he(qo),testCommand:Q(),scope:Mz}),kz=fi.shape.status,Ad=te({id:Ie,status:kz,priority:fi.shape.priority,depends_on:he(Ie),filePath:Q(),presentSections:he(Q()),intent:Q().default("")}),Lz=te({id:Q(),filePath:Q(),error:qo}),Uz=Zo([Ad,Lz]),Zz=te({specs:he(Uz)});te({specId:Ie});const qz=te({frontmatter:fi,body:Q(),presentSections:he(Q()),generatedProduct:lt().default(!1)});te({frontmatter:fi,body:Q().max(2e5).optional()});const Bz=te({spec:Ad});te({id:Ie.max(80)});const $z=te({spec:Ad}),Hz=te({manifest:Tz}),Qz=te({name:Q().min(1).max(200),contentBase64:Q().min(1).max(57e5)}),Gz=te({questionId:Ie,answer:Q().min(1).max(2e3)});te({brief:Q().min(50).max(2e4),specId:Ie.optional(),attachments:he(Qz).max(5).default([]),answers:he(Gz).max(15).default([]),round:Re().int().min(1).max(4).default(1),skipQuestions:lt().default(!1)});const Kz=te({id:Ie,text:Q().min(1),options:he(Q().min(1)).min(2).max(4)}),Yz=te({specId:Ie,attempts:Re().int().min(1).max(4),problemsFixed:he(Q()),isNewFeature:lt(),isAmendment:lt(),compositions:he(Q()).default([]),generation:te({derivable:Re().int().nonnegative(),hole:Re().int().nonnegative()}).nullable().default(null),assumptions:he(Q()).default([]),usage:he(te({model:Q(),inputTokens:Re().int().nonnegative(),outputTokens:Re().int().nonnegative()}))}),Fz=te({jobId:Q()}),Vz=yt(["questions","drafting","judging","compositions","writing","done","failed"]),Pz=te({jobId:Q(),stage:Vz,round:Re().int().min(1).max(3).optional(),attempt:Re().int().min(1).max(4).optional(),composition:te({done:Re().int().nonnegative(),total:Re().int().nonnegative()}).optional(),elapsedMs:Re().int().nonnegative(),budgetMs:Re().int().positive(),questions:he(Kz).min(3).max(5).optional(),result:Yz.optional(),error:qo.optional()}),Xz=te({specId:Ie,ref:Q(),onMap:lt(),report:Dz.nullable()}),x0=yt(["green","red","pending","none"]),Jz=te({specId:Ie,branch:Q(),pullRequest:te({number:Re().int().positive(),url:Q(),headSha:Q(),title:Q()}).nullable(),specStatus:yt(["draft","validated","implemented","unreadable","absent"]),checks:x0,checkRuns:he(te({name:Q(),conclusion:Q().nullable()})),mergeable:lt().nullable(),requiredRole:yt(["approver","operator"]),canMerge:lt(),blockers:he(Q()),labels:he(Q()).default([]),needsOperator:lt().default(!1)}),Iz=te({pullRequests:he(te({specId:Ie,number:Re().int().positive(),url:Q(),checks:x0,needsOperator:lt().default(!1)}))}),Wz=te({specId:Ie,pullRequestNumber:Re().int().positive(),mergeSha:Q(),mergedBy:Q(),mergedAt:Q()}),Cd=yt(["development","staging","production"]),S0=yt(["staging","production"]);te({environment:S0});const _0=te({environments:he(te({name:Cd,ref:Q(),sha:Q().nullable(),deployment:te({id:Re().int(),state:Q().nullable(),createdAt:Q()}).nullable()})),releases:he(Q())});te({environment:Cd});const eT=yt(["deployed","forward","backward","unreachable"]),tT=te({sha:Q(),title:Q(),specId:Ie.nullable(),author:Q(),authoredAt:Q(),releaseTag:Q().nullable(),reach:eT,why:Q()}),nT=te({environment:Cd,ref:Q(),deployedSha:Q().nullable(),commits:he(tT).max(30)});te({sha:Q().regex(/^[0-9a-f]{40}$/),rollback:lt().optional(),reason:Q().min(10).max(2e3).optional()});const sT=te({environment:S0,fromSha:Q().nullable(),toSha:Q(),actor:Q(),at:Q(),deploymentId:Re().int(),releaseTag:Q().nullable(),includedPullRequests:he(te({number:Re().int(),specId:Q().nullable(),message:Q(),authoredAt:Q()})),destructiveMigration:lt(),rollback:lt()});te({month:Q().regex(/^\d{4}-\d{2}$/).optional()});const aT=te({month:Q(),specs:he(te({specId:Q(),pullRequestNumber:Re().int(),runs:Re().int(),inputTokens:Re().int(),outputTokens:Re().int(),estimatedUsd:Re(),uncostedModels:he(Q())})),totals:te({runs:Re().int(),inputTokens:Re().int(),outputTokens:Re().int(),estimatedUsd:Re()}),budgetUsd:Re().nullable(),budgetRatio:Re().nullable(),warning:lt()}),dv=te({state:Q(),path:Q(),sizeBytes:Re().int().nonnegative()}),iT=te({specId:Ie,previews:he(dv),composition:Q().nullable().default(null),compositions:he(te({name:Q(),selected:lt(),previews:he(dv)})).default([])}),rT=te({specId:Ie,composition:Q(),alreadySelected:lt()});function Md(){return At({queryKey:["specs"],queryFn:()=>We("/api/specs",Zz)})}function lT(t){return At({queryKey:["specs",t],queryFn:()=>We(`/api/specs/${t}`,qz)})}function oT(){return At({queryKey:["manifest"],queryFn:()=>We("/api/manifest",Hz)})}function uT(t){const s=sa();return ui({mutationFn:i=>We(`/api/specs/${t}`,Bz,{method:"PUT",...Or(i)}),onSuccess:async()=>{await s.invalidateQueries({queryKey:["specs"]})}})}function cT(){const t=sa();return ui({mutationFn:s=>We("/api/specs",$z,{method:"POST",...Or(s)}),onSuccess:async()=>{await t.invalidateQueries({queryKey:["specs"]})}})}const fT=te({email:Q(),displayName:Q(),role:Q(),host:te({environments:lt(),mergePolicy:Q()}).optional()});function dT(t){return t===void 0||t.pullRequest===null?!1:t.checks==="pending"||t.checks==="none"||t.mergeable===null?1e4:!1}function hT(t,s){const i=t?.environments.find(r=>r.name==="development");return i!==void 0&&i.sha===s&&i.deployment?.state==="success"?!1:1e4}function Er(){return At({queryKey:["me"],queryFn:()=>We("/api/auth/me",fT),retry:!1})}function mT(){return ui({mutationFn:t=>We("/api/briefs",Fz,{method:"POST",...Or(t)})})}function pT(t){return t===void 0?1e3:t.stage==="done"||t.stage==="failed"||t.stage==="questions"?!1:1e3}function gT(t){return At({queryKey:["briefs",t],queryFn:()=>We(`/api/briefs/${t??""}`,Pz),enabled:t!==null,retry:!1,refetchInterval:s=>pT(s.state.data)})}function yT(t){return At({queryKey:["specs",t,"impact"],queryFn:()=>We(`/api/specs/${t}/impact`,Xz),retry:!1})}function vT(t){return At({queryKey:["specs",t,"pull-request"],queryFn:()=>We(`/api/specs/${t}/pull-request`,Jz),retry:!1,refetchInterval:s=>dT(s.state.data)})}function bT(t){return At({queryKey:["pull-requests"],queryFn:()=>We("/api/pull-requests",Iz),enabled:t,retry:!1})}function xT(t){const s=sa();return ui({mutationFn:()=>We(`/api/specs/${t}/merge`,Wz,{method:"POST"}),onSuccess:async()=>{await s.invalidateQueries({queryKey:["specs"]})}})}function ST(t,s){if(s===null)return!1;const i=t?.environments.find(r=>r.name===s.environment);return i!==void 0&&i.sha===s.sha&&i.deployment?.state==="success"?!1:1e4}function _T(t=!0,s=null){return At({queryKey:["environments"],queryFn:()=>We("/api/environments",_0),retry:!1,enabled:t,refetchInterval:i=>ST(i.state.data,s)})}function hv(t,s=!0){return At({queryKey:["environments",t,"commits"],queryFn:()=>We(`/api/environments/${t??""}/commits`,nT),retry:!1,enabled:s&&t!==null})}function wT(t,s){return At({queryKey:["environments"],queryFn:()=>We("/api/environments",_0),retry:!1,enabled:s,refetchInterval:i=>hT(i.state.data,t)})}function jT(){const t=sa();return ui({mutationFn:s=>{const{environment:i,...r}=s;return We(`/api/environments/${i}/promotions`,sT,{method:"POST",...Or(r)})},onSuccess:async()=>{await t.invalidateQueries({queryKey:["environments"]})}})}function OT(t){return At({queryKey:["consumption",t],queryFn:()=>We(`/api/consumption?month=${t}`,aT),retry:!1})}function ET(t){return At({queryKey:["specs",t,"previews"],queryFn:()=>We(`/api/specs/${t}/previews`,iT),retry:!1})}function NT(t){const s=sa();return ui({mutationFn:i=>We(`/api/specs/${t}/compositions/${i}/select`,rT,{method:"POST"}),onSuccess:async()=>{await s.invalidateQueries({queryKey:["specs"]})}})}const zT={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 ct({voice:t="secondary",size:s="md",className:i="",type:r="button",children:o,...c}){const d=s==="sm"?"px-2.5 py-1 text-xs":"px-3.5 py-2 text-sm";return g.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} ${zT[t]} ${i}`,...c,children:o})}const TT={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 qe({tone:t="neutral",mono:s=!1,children:i,title:r}){return g.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 ${s?"font-mono":""} ${TT[t]}`,children:i})}function w0({status:t}){const s=t==="validated"?"accent":t==="implemented"?"positive":"neutral";return g.jsx(qe,{tone:s,children:t})}function j0({title:t,hint:s,action:i}){return g.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:[g.jsx("p",{className:"font-display text-xl font-semibold text-text",children:t}),s!==void 0&&g.jsx("p",{className:"max-w-md text-sm text-text-muted",children:s}),i]})}function RT(t){return t instanceof Bo?t.payload:null}function ft({error:t}){const s=RT(t);if(s===null){const i=t instanceof Error?t.message:String(t);return g.jsx("div",{role:"alert",className:"rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:i})}return g.jsx($o,{error:s})}function $o({error:t}){return g.jsxs("div",{role:"alert",className:"studio-rise rounded-md border border-danger/40 bg-danger-soft p-4 text-sm text-text",children:[g.jsx("p",{className:"font-mono text-xs font-bold uppercase tracking-wide text-danger",children:t.code}),g.jsx("p",{className:"mt-1 font-medium",children:t.message}),g.jsxs("dl",{className:"mt-2 space-y-1 text-xs text-text-muted",children:[t.file!=null&&g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Fichier"}),g.jsx("dd",{className:"font-mono",children:t.file})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Cause"}),g.jsx("dd",{className:"font-mono break-all",children:t.cause})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx("dt",{className:"shrink-0 font-semibold text-text",children:"Correction suggérée"}),g.jsx("dd",{children:t.suggestedFix})]})]})]})}var AT=Ov();function O0({open:t,title:s,children:i,onClose:r}){return ee.useEffect(()=>{if(!t)return;const o=c=>{c.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t,r]),t?AT.createPortal(g.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-surface-sunken/70 p-4 backdrop-blur-sm",children:g.jsxs("div",{role:"dialog","aria-modal":"true","aria-label":s,className:"studio-rise w-full max-w-md rounded-lg border border-border bg-surface-raised p-5 shadow-overlay",children:[g.jsxs("div",{className:"flex items-start justify-between gap-4",children:[g.jsx("h2",{className:"font-display text-xl font-semibold text-text",children:s}),g.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:"✕"})]}),g.jsx("div",{className:"mt-3 text-sm text-text-muted",children:i})]})}),document.body):null}function li({eyebrow:t,title:s,explanation:i,actions:r}){return g.jsxs("header",{className:"flex flex-wrap items-end justify-between gap-4 border-b border-border pb-4",children:[g.jsxs("div",{className:"min-w-0",children:[t!==void 0&&g.jsx("p",{className:"mb-1 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:t}),g.jsx("h1",{className:"font-display text-2xl font-semibold leading-tight text-text",children:s}),i!==void 0&&g.jsx("p",{className:"mt-1 max-w-2xl text-sm text-text-muted",children:i})]}),r!==void 0&&g.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:r})]})}function tn({children:t,className:s="",...i}){return g.jsx("section",{className:`rounded-lg border border-border bg-surface-raised p-4 shadow-raised ${s}`,...i,children:t})}const CT=[{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"}],MT={P0:"danger",P1:"accent",P2:"neutral"},DT={green:"positive",red:"danger",pending:"warning",none:"neutral"},kT={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"};function mv(t){return!("error"in t)}function LT(t){return t instanceof HTMLElement&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable)}function UT(){const{data:t,isPending:s,error:i}=Md(),r=Er(),o=bT(r.data!==void 0),[c,d]=ee.useState(""),[h,p]=ee.useState(!1),m=ee.useRef(null);if(ee.useEffect(()=>{const j=z=>{z.metaKey||z.ctrlKey||z.altKey||LT(z.target)||(z.key==="/"?(z.preventDefault(),m.current?.focus()):z.key==="n"&&(z.preventDefault(),p(!0)))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[]),i)return g.jsx(ft,{error:i});if(s)return g.jsx(BT,{});const b=t.specs.filter(mv),v=t.specs.filter(j=>!mv(j));if(t.specs.length===0)return g.jsx(j0,{title:"Aucune spec dans ce repo",hint:"Créez la première depuis le template canonique — elle naîtra en draft.",action:g.jsx(pv,{open:h,onOpen:()=>p(!0),onClose:()=>p(!1)})});const x=c.trim().toLowerCase(),S=j=>x===""||j.id.includes(x)||j.depends_on.some(z=>z.includes(x)),w=new Map((o.data?.pullRequests??[]).map(j=>[j.specId,j]));return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Specs",title:"Board",explanation:`${b.length} spec${b.length>1?"s":""} lisible${b.length>1?"s":""} · le repo est l'état, le board n'est qu'une vue.`,actions:g.jsxs(g.Fragment,{children:[g.jsx("input",{ref:m,type:"search",value:c,onChange:j=>d(j.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"}),g.jsx(pv,{open:h,onOpen:()=>p(!0),onClose:()=>p(!1)})]})}),v.length>0&&g.jsx("section",{"aria-label":"Specs illisibles",className:"space-y-2",children:v.map(j=>g.jsx($o,{error:j.error},j.filePath))}),g.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:CT.map(j=>g.jsx(ZT,{column:j,specs:b.filter(z=>z.status===j.status&&S(z)),pullsBySpec:w},j.status))})]})}function ZT({column:t,specs:s,pullsBySpec:i}){return g.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:[g.jsxs("h2",{className:"mb-3 flex items-baseline justify-between px-1",children:[g.jsxs("span",{className:"font-display text-lg font-semibold text-text",children:[t.title," ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:t.explanation})]}),g.jsx(vn,{value:s.length,className:"font-mono text-xs text-text-faint"})]}),s.length===0?g.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"}):g.jsx("ul",{className:"space-y-2",children:s.map((r,o)=>g.jsx("li",{className:"studio-reveal",style:{"--i":o},children:g.jsx(qT,{summary:r,pull:i.get(r.id)})},r.id))})]})}function qT({summary:t,pull:s}){const i=new Set(t.presentSections);return g.jsxs(la,{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:[g.jsxs("div",{className:"flex items-start justify-between gap-2",children:[g.jsx("p",{className:"min-w-0 truncate font-mono text-sm font-medium text-text group-hover:text-accent",children:t.id}),g.jsx(qe,{tone:MT[t.priority]??"neutral",children:t.priority})]}),g.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[g.jsx("ul",{"aria-label":`${i.size} sections sur ${ei.length}`,className:"flex flex-1 gap-0.5",children:ei.map(r=>g.jsx("li",{title:r,className:`h-1 flex-1 rounded-full ${i.has(r)?"bg-accent":"bg-border"}`},r))}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[i.size,"/",ei.length]})]}),(t.depends_on.length>0||s!==void 0)&&g.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[s!==void 0&&g.jsxs(qe,{tone:s.needsOperator?"orichalcum":DT[s.checks]??"neutral",mono:!0,title:s.needsOperator?"en attente de l'opérateur (needs-operator)":kT[s.checks]??s.checks,children:["#",s.number,s.needsOperator&&g.jsx("span",{"aria-hidden":"true",children:" ⚑"})]}),t.depends_on.map(r=>g.jsxs(qe,{mono:!0,title:`dépend de ${r}`,children:["← ",r]},r))]})]})}function BT(){return g.jsx("div",{"aria-label":"Chargement du board",className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:[0,1,2].map(t=>g.jsx("div",{className:"studio-breathe h-64 rounded-lg border border-border"},t))})}function pv({open:t,onOpen:s,onClose:i}){const[r,o]=ee.useState(""),c=Co(),d=cT(),h=()=>{d.mutate({id:r},{onSuccess:async p=>{i(),await c({to:"/specs/$specId",params:{specId:p.spec.id}})}})};return g.jsxs(g.Fragment,{children:[g.jsx(ct,{voice:"primary",onClick:()=>{d.reset(),o(""),s()},children:"Nouvelle spec"}),g.jsx(O0,{open:t,title:"Nouvelle spec depuis le template",onClose:i,children:g.jsxs("form",{onSubmit:p=>{p.preventDefault(),h()},className:"space-y-3",children:[g.jsxs("label",{className:"block text-sm text-text-muted",children:["Identifiant (kebab-case, il nomme le fichier specs/<id>.spec.md)",g.jsx("input",{value:r,onChange:p=>o(p.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 Bo&&g.jsx(ft,{error:d.error}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(ct,{voice:"ghost",onClick:i,children:"Annuler"}),g.jsx(ct,{voice:"primary",type:"submit",disabled:d.isPending||r==="",children:"Créer en draft"})]})]})})]})}function $T(t){const s=`
|
|
68
|
-
${t}`,i=[];let r=0;for(const o of ei){const c=s.indexOf(`
|
|
69
|
-
${o}`,r);c!==-1&&(i.push(o),r=c+o.length)}return i}const gv={feature:"feature",package:"paquet","framework-package":"paquet du framework"};function HT({specId:t}){const s=yT(t);if(s.error)return g.jsx(ft,{error:s.error});if(s.isPending)return g.jsx("div",{"aria-label":"Chargement de l'impact",className:"h-24 studio-breathe rounded-lg border border-border bg-surface-sunken/60"});const i=s.data;if(!i.onMap||i.report===null)return g.jsxs("section",{"aria-label":"Impact de la spec",className:"rounded-lg border border-dashed border-border-strong/60 bg-surface-raised/60 p-4 text-sm text-text-muted",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Impact"}),g.jsxs("p",{className:"mt-1",children:["Cette rubrique n'est pas encore sur la carte de ",g.jsx("code",{className:"font-mono text-text",children:i.ref})," : son entrée vient avec la spéculation, l'impact se lira ensuite."]})]});const r=i.report,o=[{label:"dépendants",value:r.dependents.length},{label:"routes exposées",value:r.routes.length},{label:"tables possédées",value:r.ownedTables.length},{label:"lecteurs hors propriétaire",value:r.tableReadersOutsideOwner.length}];return g.jsxs(tn,{"aria-label":"Impact de la spec",className:"text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Impact"}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[r.target.name," · ",gv[r.target.kind]??r.target.kind," · lu sur ",i.ref]})]}),g.jsx("dl",{className:"mt-3 grid grid-cols-2 gap-3 md:grid-cols-4",children:o.map(c=>g.jsxs("div",{className:"rounded-md border border-border bg-surface-sunken/60 px-3 py-2",children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:c.label}),g.jsx("dd",{className:"font-mono text-2xl text-text",children:g.jsx(vn,{value:c.value})})]},c.label))}),r.dependents.length>0&&g.jsx("ul",{"aria-label":"Dépendants",className:"mt-3 space-y-1",children:r.dependents.map(c=>g.jsxs("li",{className:"flex flex-wrap items-center gap-2 text-text-muted",children:[g.jsx("span",{className:"font-mono text-text",children:c.name}),g.jsx(qe,{tone:"neutral",children:gv[c.kind]??c.kind}),g.jsx("span",{children:c.importedSymbols.length>0?`importe ${c.importedSymbols.join(", ")}`:"n'importe aucun symbole"}),g.jsx(qe,{tone:c.viaIndexOnly?"positive":"warning",children:c.viaIndexOnly?"via index.ts":"contourne index.ts"})]},c.name))}),r.routes.length>0&&g.jsx("ul",{"aria-label":"Routes exposées",className:"mt-3 flex flex-wrap gap-2",children:r.routes.map(c=>g.jsx("li",{children:g.jsxs(qe,{tone:"accent",mono:!0,children:[c.method," ",c.path]})},`${c.method} ${c.path}`))}),r.tableReadersOutsideOwner.length>0&&g.jsx("ul",{"aria-label":"Lecteurs hors propriétaire",className:"mt-3 space-y-1 text-text-muted",children:r.tableReadersOutsideOwner.map(c=>g.jsxs("li",{children:[g.jsx("span",{className:"text-warning",children:"⚠"})," ",g.jsx("code",{className:"font-mono text-text",children:c.table})," lue par ",c.feature," (",c.file,")"]},`${c.table}:${c.file}`))}),g.jsxs("p",{className:"mt-3 font-mono text-xs text-text-faint",children:["tests à rejouer : ",r.testCommand]}),g.jsxs("p",{className:"mt-1 text-xs text-text-faint",children:["Regardé : ",r.scope.scannedFolders.join(", ")||"rien"," · natures : ",r.scope.coveredKinds.join(", "),r.scope.outOfReach.length>0?` · hors de portée : ${r.scope.outOfReach.join(" ; ")}`:""]}),r.findings.length>0&&g.jsx("div",{className:"mt-3 space-y-2",children:r.findings.map((c,d)=>g.jsx($o,{error:c},`${c.code}-${d}`))})]})}const QT={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"},GT={green:"positive",red:"danger",pending:"warning",none:"neutral"},KT=new Set(["pending","queued","in_progress","expected","waiting","requested"]),YT=new Set(["success","neutral"]);function FT(t){return t===null||KT.has(t)?{label:"en cours",tone:"warning",live:!0}:YT.has(t)?{label:"vert",tone:"positive",live:!1}:t==="skipped"?{label:"sauté",tone:"neutral",live:!1}:{label:"rouge",tone:"danger",live:!1}}function VT(t){const s=new Set;return t.filter(i=>s.has(i.name)?!1:(s.add(i.name),!0))}function E0({label:t}){return g.jsx("span",{role:"status","aria-label":t,className:"inline-flex items-center",children:g.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"})})}function PT({pullRequestNumber:t,mergeSha:s,environmentsConfigured:i}){const r=wT(s,i),o=r.data?.environments.find(v=>v.name==="development"),c=o!==void 0&&o.sha===s,d=c&&o.deployment?.state==="success",h=c&&o.deployment!==null&&o.deployment!==void 0&&["failure","error"].includes(o.deployment.state??""),p=i&&!d&&!h&&r.error==null,m=i?r.error!=null?"Le suivi des environnements n'a pas répondu ; la fusion est faite.":d?`Déployée en development (${s.slice(0,7)}).`:h?`Le déploiement development a échoué sur ${s.slice(0,7)} : voir le workflow du produit.`:c?o.deployment===null||o.deployment===void 0?`La branche par défaut est sur ${s.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.",b=d?"border-positive/40 bg-positive-soft":h?"border-danger/40 bg-danger-soft":"border-accent/30 bg-surface-raised";return g.jsx("section",{role:"status","aria-label":"Fusion et développement",className:`studio-rise rounded-lg border p-4 text-sm text-text ${b}`,children:g.jsxs("p",{className:"flex flex-wrap items-center gap-2",children:[p&&g.jsx(E0,{label:"développement en cours"}),g.jsxs("span",{className:"font-medium",children:["Pull request #",t," fusionnée."]}),g.jsx("span",{className:"text-text-muted",children:m})]})})}function XT({specId:t,role:s}){const i=vT(t),r=xT(t),o=Er();if(i.error)return g.jsx(ft,{error:i.error});if(i.isPending)return g.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=i.data;if(r.isSuccess)return g.jsx(PT,{pullRequestNumber:r.data.pullRequestNumber,mergeSha:r.data.mergeSha,environmentsConfigured:o.data?.host?.environments!==!1});const d=c.canMerge&&vv(s,c.requiredRole),h=c.pullRequest!==null&&(c.checks==="pending"||c.checks==="none"||c.mergeable===null);return g.jsxs(tn,{"aria-label":"Pull request de la spec",className:"text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Pull request"}),c.pullRequest!==null&&g.jsxs(g.Fragment,{children:[g.jsxs("a",{className:"font-mono text-accent underline-offset-4 hover:underline",href:c.pullRequest.url,target:"_blank",rel:"noreferrer",children:["#",c.pullRequest.number]}),g.jsx(qe,{tone:GT[c.checks]??"neutral",children:QT[c.checks]??c.checks}),h&&g.jsx(E0,{label:"la CI tourne, relue toutes les dix secondes"}),g.jsx(w0,{status:c.specStatus}),c.needsOperator&&g.jsx(qe,{tone:"orichalcum",children:"en attente de l'opérateur"})]})]}),g.jsx(ct,{voice:"primary",size:"sm",disabled:!d||r.isPending,onClick:()=>r.mutate(),children:r.isPending?"Fusion…":"Fusionner"})]}),c.pullRequest===null?g.jsxs("p",{className:"mt-2 text-text-muted",children:["Aucune pull request ouverte : la prochaine sauvegarde en ouvre une sur ",g.jsx("code",{className:"font-mono text-text",children:c.branch}),"."]}):g.jsxs("p",{className:"mt-2 text-text-muted",children:[g.jsx("span",{className:"text-text",children:c.pullRequest.title})," · branche ",g.jsx("code",{className:"font-mono",children:c.branch})]}),c.pullRequest!==null&&c.checkRuns.length>0&&g.jsx("ul",{"aria-label":"Checks de la branche",className:"mt-3 flex flex-wrap gap-2",children:VT(c.checkRuns).map(p=>{const m=FT(p.conclusion);return g.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:[g.jsx("span",{className:"text-text",children:p.name}),g.jsx(qe,{tone:m.tone,children:m.label})]},p.name)})}),c.blockers.length>0&&g.jsx("ul",{className:"mt-3 space-y-1 text-text-muted",children:c.blockers.map(p=>g.jsxs("li",{className:"flex gap-2",children:[g.jsx("span",{"aria-hidden":"true",className:"text-warning",children:"●"}),p]},p))}),c.pullRequest!==null&&!vv(s,c.requiredRole)&&g.jsxs("p",{className:"mt-3 text-text-muted",children:["La fusion exige le rôle ",c.requiredRole,"."]}),r.error!=null&&g.jsx("div",{className:"mt-3",children:g.jsx(ft,{error:r.error})})]})}const yv={reader:0,author:1,approver:2,operator:3};function vv(t,s){return(yv[t]??-1)>=(yv[s]??99)}const JT={empty:"Vide",loading:"Chargement",nominal:"Nominal",error:"Erreur"};function IT({specId:t}){const s=ET(t),i=NT(t),[r,o]=ee.useState(null),[c,d]=ee.useState(null);if(s.error)return g.jsx(ft,{error:s.error});if(s.isPending)return g.jsx("div",{"aria-label":"Chargement des aperçus",className:"h-24 animate-pulse rounded-lg border border-border bg-surface-sunken/60"});const h=s.data.compositions,p=s.data.composition,m=h.length>0?h.find(S=>S.name===c)??h.find(S=>S.selected)??h[0]??null:null,b=m===null?s.data.previews:m.previews;if(b.length===0&&m===null)return g.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:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Aperçus"}),g.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 v=b.some(S=>S.state===r)?r??"":b[0]?.state??"",x=m===null?`/api/specs/${t}/previews/${v}`:`/api/specs/${t}/previews/${m.name}/${v}`;return g.jsxs(tn,{"aria-label":"Aperçus de l'écran",className:"text-sm",children:[h.length>1&&g.jsxs("div",{className:"mb-3 flex flex-wrap items-center gap-2 border-b border-border pb-3",children:[g.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Compositions"}),g.jsx("div",{role:"radiogroup","aria-label":"Compositions proposées",className:"flex flex-wrap gap-1.5",children:h.map(S=>g.jsx("button",{type:"button",role:"radio","aria-checked":m?.name===S.name,onClick:()=>d(S.name),className:`rounded-full border px-3 py-1 font-mono text-xs transition-colors ${m?.name===S.name?"border-accent bg-accent-soft text-accent":"border-border text-text-muted hover:text-text"}`,children:S.name},S.name))}),m!==null&&m.name===p&&g.jsx(qe,{tone:"positive",children:"retenue"}),m!==null&&m.name!==p&&g.jsx(ct,{voice:"primary",size:"sm",disabled:i.isPending,onClick:()=>i.mutate(m.name),children:i.isPending?"Sélection…":"Retenir cette composition"})]}),i.error!=null&&g.jsx("div",{className:"mb-3",children:g.jsx(ft,{error:i.error})}),g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("h2",{className:"font-display text-lg font-semibold text-text",children:["Aperçus ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"l'écran tel qu'il sera"})]}),g.jsx("div",{role:"tablist",className:"inline-flex rounded-md border border-border bg-surface-sunken p-0.5",children:b.map(S=>g.jsx("button",{role:"tab",type:"button","aria-selected":S.state===v,onClick:()=>o(S.state),className:`rounded px-3 py-1 text-xs font-medium transition-colors duration-(--duration-fast) ease-swell ${S.state===v?"bg-accent text-accent-contrast shadow-raised":"text-text-muted hover:text-text"}`,children:JT[S.state]??S.state},S.state))})]}),g.jsx("iframe",{title:`Aperçu ${v}`,sandbox:"",src:x,className:"mt-3 h-[480px] w-full rounded-md border border-border bg-surface-raised"})]})}function N0(t){return t instanceof y0?N0(t.def.innerType):t}function WT(){const t=fi.shape;return Object.keys(t).map(s=>{const i=N0(t[s]);if(i instanceof zo)return{name:s,kind:"enum",options:i.options.map(r=>String(r)),readOnly:!1};if(i instanceof m0)return{name:s,kind:"string-array",readOnly:!1};if(i instanceof f0)return{name:s,kind:"text",readOnly:s==="id"};throw new Error(`deriveFrontmatterFields: unsupported schema for "${String(s)}" — extend the derivation, never hand-describe the form`)})}function bv(t){return{id:t.id,status:t.status,depends_on:t.depends_on.join(`
|
|
70
|
-
`),priority:t.priority,refs:t.refs.join(`
|
|
71
|
-
`),deferred:t.deferred.join(`
|
|
72
|
-
`)}}function zf(t){return t.split(`
|
|
73
|
-
`).map(s=>s.trim()).filter(s=>s!=="")}function eR(t){return{id:t.id,status:t.status,depends_on:zf(t.depends_on),priority:t.priority,refs:zf(t.refs),deferred:zf(t.deferred)}}function tR(t){const s=[],i=t.split(`
|
|
74
|
-
`);let r=0;for(;r<i.length;){const c=(i[r]??"").trim();if(c===""){r+=1;continue}const d=/^(#{1,6})\s+(.*)$/.exec(c);if(d!==null){s.push({kind:"heading",level:(d[1]??"#").length,text:d[2]??""}),r+=1;continue}if(c.startsWith("```")){const p=[];for(r+=1;r<i.length&&!(i[r]??"").trim().startsWith("```");)p.push(i[r]??""),r+=1;r+=1,s.push({kind:"code",text:p.join(`
|
|
75
|
-
`)});continue}if(c.startsWith("- ")){const p=[];for(;r<i.length;){const m=(i[r]??"").trim();if(m.startsWith("- "))p.push(m.slice(2)),r+=1;else if(m!==""&&!m.startsWith("#"))p[p.length-1]=`${p[p.length-1]??""} ${m}`,r+=1;else break}s.push({kind:"bullet",items:p});continue}const h=[];for(;r<i.length;){const p=(i[r]??"").trim();if(p===""||p.startsWith("#")||p.startsWith("- ")||p.startsWith("```"))break;h.push(p),r+=1}s.push({kind:"paragraph",text:h.join(" ")})}return s}const nR=6,sR={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 aR({markdown:t}){const s=tR(t);return s.length===0?g.jsx("p",{className:"text-sm text-text-faint",children:"Rien à prévisualiser encore."}):g.jsx("div",{className:"space-y-2",children:s.map((i,r)=>{if(i.kind==="heading")return g.jsx("p",{className:sR[Math.min(i.level,2)],children:i.text},r);if(i.kind==="bullet")return g.jsx("ul",{className:"list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-accent",children:i.items.map((o,c)=>g.jsx("li",{children:o},c))},r);if(i.kind==="code"){const o=i.text.split(`
|
|
76
|
-
`),c=g.jsx("pre",{className:"overflow-x-auto rounded-md border border-border bg-surface-sunken p-3 font-mono text-xs text-text",children:i.text});return o.length<nR?g.jsx("div",{children:c},r):g.jsxs("details",{className:"group rounded-md border border-border bg-surface-sunken/60",children:[g.jsxs("summary",{className:"cursor-pointer select-none px-3 py-2 font-mono text-xs text-text-muted transition-colors hover:text-text",children:[g.jsx("span",{className:"text-text",children:o[0]}),g.jsxs("span",{className:"ml-2 text-text-faint",children:["… ",o.length," lignes — déplier"]})]}),g.jsx("div",{className:"px-2 pb-2",children:c})]},r)}return g.jsx("p",{className:"text-sm text-text-muted",children:i.text},r)})})}const so="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 iR({specId:t}){const{data:s,isPending:i,error:r}=lT(t);return r?g.jsxs("div",{className:"space-y-3",children:[g.jsx(z0,{}),g.jsx(ft,{error:r})]}):i?g.jsx("div",{"aria-label":"Chargement de la spec",className:"h-96 animate-pulse rounded-lg border border-border bg-surface-sunken/60"}):g.jsx(rR,{specId:t,initialFrontmatter:s.frontmatter,initialBody:s.body,generatedProduct:s.generatedProduct},t)}function z0(){return g.jsx(la,{to:"/",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-accent",children:"← Retour au board"})}function rR({specId:t,initialFrontmatter:s,initialBody:i,generatedProduct:r}){const o=WT(),[c,d]=ee.useState(()=>bv(s)),[h,p]=ee.useState(()=>({form:bv(s),body:i})),[m,b]=ee.useState(i),[v,x]=ee.useState(null),[S,w]=ee.useState(!1),[j,z]=ee.useState(!1),T=uT(t),L=Er(),G=m!==h.body||JSON.stringify(c)!==JSON.stringify(h.form),V=new Set($T(m)),W=(P,I)=>{d(fe=>({...fe,[P]:I}))},$=()=>{const P=fi.safeParse(eR(c));return P.success?(x(null),P.data):(x(P.error.issues.map(I=>`${I.path.join(".")}: ${I.message}`).join(" ; ")),null)},A=()=>{const P=$();P!==null&&T.mutate({frontmatter:P,body:m},{onSuccess:()=>p({form:c,body:m})})},J=()=>{const P=$();if(P===null){w(!1);return}const I={...c,status:"validated"};T.mutate({frontmatter:{...P,status:"validated"},body:m},{onSuccess:()=>{d(I),p({form:I,body:m})},onSettled:()=>w(!1)})};ee.useEffect(()=>{const P=I=>{(I.metaKey||I.ctrlKey)&&I.key.toLowerCase()==="s"&&(I.preventDefault(),A())};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)});const ie=Cz(m),re=r&&!/^# Génération\s*$/mu.test(m);return g.jsxs("div",{className:"space-y-5",children:[g.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:[g.jsx(z0,{}),g.jsxs("div",{className:"mt-1 flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[g.jsx("h1",{className:"truncate font-display text-2xl font-semibold leading-tight text-text",children:t}),g.jsx(w0,{status:c.status}),G&&g.jsx(qe,{tone:"orichalcum",children:"Modifications non enregistrées"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ct,{onClick:A,disabled:T.isPending,title:"⌘S / Ctrl+S",children:"Enregistrer"}),c.status==="draft"&&g.jsx(ct,{voice:"primary",onClick:()=>w(!0),disabled:T.isPending,children:"Valider"})]})]})]}),re&&g.jsxs("section",{"aria-label":"Spec sans génération",className:"studio-reveal rounded-lg border border-dashed border-warning/50 bg-warning-soft/40 p-4 text-sm text-text",style:{"--i":0},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Sans génération"}),g.jsxs("p",{className:"mt-1 text-text-muted",children:["Ce produit est généré, mais cette spec n'a pas de section ",g.jsx("code",{className:"font-mono text-text",children:"# Génération"})," : rien ne se dérive d'elle, elle s'implémente à la main (D58). Pour un écran ou des routes dérivés, redemandez-la par un brief sans « sans génération »."]})]}),ie.length>0&&g.jsxs(tn,{"aria-label":"Hypothèses du modèle",className:"studio-reveal border-orichalcum/40",style:{"--i":0},children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Hypothèses"}),g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"ce que le modèle a tranché sans que le brief le dise (D57)"})]}),g.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-orichalcum",children:ie.map(P=>g.jsx("li",{children:P},P))}),g.jsx("p",{className:"mt-2 text-xs text-text-faint",children:"Validée, la section fait partie du contrat : amendez la spec si une hypothèse ne vous va pas."})]}),L.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":0},children:g.jsx(IT,{specId:t})}),L.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":1},children:g.jsx(XT,{specId:t,role:L.data.role})}),L.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":2},children:g.jsx(HT,{specId:t})}),v!==null&&g.jsxs("div",{role:"alert",className:"rounded-md border border-warning/40 bg-warning-soft p-3 text-sm text-text",children:["Frontmatter invalide : ",v]}),T.error!=null&&g.jsx(ft,{error:T.error}),T.isSuccess&&T.error==null&&!G&&g.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 : ",T.data.spec.status,"."]}),g.jsxs("ol",{"aria-label":"Sections canoniques",className:"studio-reveal flex flex-wrap gap-2",style:{"--i":3},children:[ei.map((P,I)=>{const fe=P.replace(/^# /u,"");return g.jsx("li",{children:g.jsx(qe,{tone:V.has(P)?"accent":"neutral",title:V.has(P)?"section présente":"section absente ou hors ordre",children:`${I+1} · ${fe}`})},P)}),g.jsxs("li",{className:"self-center font-mono text-xs text-text-faint",children:[g.jsx(vn,{value:V.size}),"/",ei.length," présentes, dans l'ordre du gate"]})]}),g.jsxs(tn,{"aria-label":"Frontmatter",className:"studio-reveal",style:{"--i":4},children:[g.jsxs("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:["Frontmatter ",g.jsx("span",{className:"ml-1 text-sm font-normal text-text-faint",children:"formulaire dérivé de SpecFrontmatterSchema"})]}),g.jsx("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:o.map(P=>g.jsxs("label",{className:"block text-sm text-text-muted",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:P.name}),P.kind==="enum"?g.jsx("select",{value:c[P.name],onChange:I=>W(P.name,I.target.value),className:so,children:(P.options??[]).map(I=>g.jsx("option",{value:I,children:I},I))}):P.kind==="string-array"?g.jsx("textarea",{value:c[P.name],onChange:I=>W(P.name,I.target.value),rows:2,placeholder:"un élément par ligne",className:`${so} font-mono text-xs`}):g.jsx("input",{value:c[P.name],readOnly:P.readOnly,onChange:I=>W(P.name,I.target.value),className:`${so} font-mono ${P.readOnly?"bg-surface-sunken text-text-faint":""}`})]},P.name))})]}),g.jsxs("section",{"aria-label":"Sections markdown",className:`studio-reveal grid grid-cols-1 gap-4 ${j?"lg:grid-cols-2":""}`,style:{"--i":5},children:[j?g.jsxs("label",{className:"block text-sm text-text-muted",children:[g.jsxs("span",{className:"flex items-center justify-between font-mono text-xs text-text-faint",children:["sections (markdown)",g.jsx(ct,{voice:"ghost",size:"sm",onClick:()=>z(!1),children:"Replier l'éditeur"})]}),g.jsx("textarea",{"aria-label":"sections (markdown)",value:m,onChange:P=>b(P.target.value),rows:28,spellCheck:!1,className:`${so} resize-y p-3 font-mono text-xs leading-relaxed`}),g.jsxs("span",{className:"mt-1 block text-right font-mono text-xs text-text-faint",children:[g.jsx(vn,{value:m.split(`
|
|
77
|
-
`).length})," lignes · ",g.jsx(vn,{value:m.trim()===""?0:m.trim().split(/\s+/u).length})," mots"]})]}):g.jsxs("button",{type:"button",onClick:()=>z(!0),className:"flex w-full items-center justify-between rounded-md border border-dashed border-border-strong/60 bg-surface-raised/60 px-4 py-3 text-left text-sm text-text-muted transition-colors hover:border-accent hover:text-text",children:[g.jsxs("span",{children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"sections (markdown)"}),g.jsx("span",{className:"ml-3",children:"Éditer les sections"})]}),g.jsxs("span",{className:"font-mono text-xs tabular-nums text-text-faint",children:[m.split(`
|
|
78
|
-
`).length," lignes · ",m.trim()===""?0:m.trim().split(/\s+/u).length," mots"]})]}),g.jsxs("div",{className:"text-sm",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:"preview"}),g.jsx("div",{className:"mt-1 h-full rounded-md border border-border bg-surface-raised p-5 shadow-raised",children:g.jsx(aR,{markdown:m})})]})]}),g.jsxs(O0,{open:S,title:`Valider ${t} ?`,onClose:()=>w(!1),children:[g.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," »)."]}),g.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[g.jsx(ct,{voice:"ghost",onClick:()=>w(!1),children:"Annuler"}),g.jsx(ct,{voice:"primary",onClick:J,disabled:T.isPending,children:"Confirmer la validation"})]})]})]})}const lR={skeleton:"neutral","in-progress":"warning",delivered:"positive"},oR={GET:"accent",POST:"positive",PUT:"warning",PATCH:"warning",DELETE:"danger"};function uR(){const{data:t,isPending:s,error:i}=oT();if(i)return g.jsx(ft,{error:i});if(s)return g.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 g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Manifeste · lecture seule",title:r.product.name,explanation:r.product.description}),g.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)=>g.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":h},children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:d.label}),g.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:g.jsx(vn,{value:d.value})})]},d.label))}),g.jsxs(tn,{"aria-label":"Apps",children:[g.jsx("h2",{className:"mb-3 font-display text-lg font-semibold text-text",children:"Apps"}),g.jsx("ul",{className:"divide-y divide-border text-sm",children:r.apps.map(d=>g.jsxs("li",{className:"flex flex-wrap items-center gap-3 py-2",children:[g.jsx("span",{className:"font-mono font-medium text-text",children:d.name}),g.jsx(qe,{children:d.type}),g.jsx("span",{className:"font-mono text-xs text-text-faint",children:d.path})]},d.name))})]}),g.jsxs("section",{"aria-label":"Features",className:"space-y-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Features"}),r.features.map(d=>g.jsxs(tn,{children:[g.jsxs("div",{className:"flex items-center justify-between gap-3",children:[g.jsx("h3",{className:"font-mono text-sm font-semibold text-text",children:d.name}),g.jsx(qe,{tone:lR[d.status]??"neutral",children:d.status})]}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:d.intent}),d.dependsOn.length>0&&g.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=>g.jsx(qe,{mono:!0,children:h},h))]}),d.routes.length>0&&g.jsx("ul",{className:"mt-3 space-y-1 text-xs",children:d.routes.map(h=>g.jsxs("li",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"w-16 shrink-0",children:g.jsx(qe,{tone:oR[h.method]??"neutral",mono:!0,children:h.method})}),g.jsx("span",{className:"font-mono text-text-muted",children:h.path})]},`${h.method} ${h.path}`))})]},d.name))]})]})}const cR=te({accepted:vs(!0)});function xv({children:t}){return g.jsxs("div",{className:"mx-auto max-w-md pt-12",children:[g.jsxs("p",{className:"mb-6 flex flex-col items-center text-center",children:[g.jsx(bb,{size:"lg",label:"Ogygie",className:"mb-3 text-accent"}),g.jsx("span",{className:"font-display text-4xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),g.jsx("span",{className:"mt-2 block font-mono text-xs uppercase tracking-[0.3em] text-accent",children:"Studio hébergé"})]}),g.jsx("div",{className:"studio-rise rounded-lg border border-border bg-surface-raised p-6 shadow-overlay",children:t})]})}const fR=te({magicLink:lt(),entra:lt()});function dR(){return At({queryKey:["auth-options"],queryFn:()=>We("/api/auth/options",fR),retry:!1})}function hR(){return typeof window>"u"?null:new URLSearchParams(window.location.search).get("error")}function mR(){const[t,s]=ee.useState(""),[i,r]=ee.useState({kind:"idle"}),o=dR(),c=hR();async function d(m){m.preventDefault(),r({kind:"sending"});try{await We("/api/auth/magic-link",cR,{method:"POST",...Or({email:t})}),r({kind:"sent"})}catch(b){r({kind:"error",error:b})}}if(i.kind==="sent")return g.jsx(xv,{children:g.jsxs("section",{className:"studio-reveal",children:[g.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Vérifiez votre boîte mail"}),g.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."})]})});const h=o.data?.entra??!1,p=o.data?.magicLink??!1;return g.jsx(xv,{children:g.jsxs("div",{className:"studio-reveal",children:[g.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Connexion"}),c==="HOST_ACCESS_DENIED"&&g.jsxs("section",{role:"alert",className:"studio-rise mt-3 rounded-md border border-warning/40 bg-warning-soft p-3 text-sm text-text",children:[g.jsx("p",{className:"font-medium",children:"Votre compte est authentifié, mais cet hôte ne vous a pas invité."}),g.jsx("p",{className:"mt-1 text-text-muted",children:"Demandez à l'opérateur de vous ajouter au groupe de l'annuaire qui ouvre ce studio."})]}),c!==null&&c!=="HOST_ACCESS_DENIED"&&g.jsxs("section",{role:"alert",className:"studio-rise mt-3 rounded-md border border-danger/40 bg-danger-soft p-3 text-sm text-text",children:["La connexion Microsoft n'a pas abouti (",c,"). Réessayez ; si cela persiste, prévenez l'opérateur."]}),o.error!=null&&g.jsx("div",{className:"mt-3",children:g.jsx(ft,{error:o.error})}),h&&g.jsxs("a",{href:"/api/auth/entra/start",className:"mt-5 flex w-full items-center justify-center gap-2 rounded-md bg-accent px-4 py-2 text-sm font-medium text-accent-contrast transition-[transform,filter] duration-(--duration-fast) hover:-translate-y-px hover:brightness-110 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent",children:[g.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 21 21",className:"h-4 w-4",fill:"currentColor",children:[g.jsx("rect",{x:"1",y:"1",width:"9",height:"9"}),g.jsx("rect",{x:"11",y:"1",width:"9",height:"9",opacity:"0.8"}),g.jsx("rect",{x:"1",y:"11",width:"9",height:"9",opacity:"0.8"}),g.jsx("rect",{x:"11",y:"11",width:"9",height:"9",opacity:"0.6"})]}),"Se connecter avec Microsoft"]}),h&&p&&g.jsx("p",{className:"mt-5 text-center font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"ou"}),p&&g.jsxs("form",{onSubmit:d,className:h?"mt-3":"mt-1",children:[g.jsx("p",{className:"text-sm text-text-muted",children:"Un lien de connexion vous sera envoyé par courriel."}),g.jsx("label",{className:"mt-4 block text-sm font-medium text-text",htmlFor:"login-email",children:"Adresse e-mail"}),g.jsx("input",{id:"login-email",type:"email",required:!0,autoComplete:"email",autoFocus:!h,value:t,onChange:m=>s(m.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"}),i.kind==="error"&&g.jsx("div",{className:"mt-3",children:g.jsx(ft,{error:i.error})}),g.jsx(ct,{voice:h?"secondary":"primary",type:"submit",disabled:i.kind==="sending",className:"mt-5 w-full",children:i.kind==="sending"?"Envoi…":"Recevoir un lien"})]}),o.isPending&&g.jsx("div",{"aria-label":"Chargement des options de connexion",className:"mt-5 h-10 studio-breathe rounded-md border border-border bg-surface-sunken/60"}),o.isSuccess&&!h&&!p&&g.jsx("p",{className:"mt-5 text-sm text-text-muted",children:"Cet hôte n'offre aucune connexion : sa configuration ne déclare ni utilisateur ni identité."})]})})}const ao=50,pR=["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."],gR=[{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"}],Tf="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",Rf=3,yR=6,Sv=t=>`${Math.floor(t/1e3)} s`;function vR(t){switch(t.stage){case"drafting":return`Le modèle écrit${t.attempt!==void 0&&t.attempt>1?` (tentative ${t.attempt})`:""}…`;case"judging":return`Les gates jugent${t.attempt!==void 0&&t.attempt>1?` (tentative ${t.attempt})`:""}…`;case"compositions":return`Les compositions, ${t.composition?.done??0} sur ${t.composition?.total??0}…`;case"writing":return"La pull request s'ouvre…";default:return""}}function _v({job:t}){const s=Math.min(1,t.elapsedMs/t.budgetMs);return g.jsxs("section",{role:"status","aria-label":"Brief en cours",className:"studio-rise rounded-lg border border-accent/30 bg-surface-raised p-4 text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[g.jsxs("span",{className:"flex items-center gap-2 text-text",children:[g.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"}),vR(t)]}),g.jsxs("span",{className:"font-mono text-xs tabular-nums text-text-muted",children:[Sv(t.elapsedMs)," / ",Sv(t.budgetMs)]})]}),g.jsx("div",{"aria-hidden":"true",className:"mt-3 h-1 overflow-hidden rounded-full bg-surface-sunken",children:g.jsx("div",{className:`h-full rounded-full ${s>=1?"bg-warning":"bg-accent"} transition-[width] duration-(--duration-base)`,style:{width:`${Math.round(s*100)}%`}})}),s>=1&&g.jsx("p",{className:"mt-2 text-xs text-text-muted",children:"Au-delà du budget de 90 s : l'instance continue, le travail finira ou dira pourquoi."})]})}const Af=[".md",".markdown",".txt",".csv",".json",".html",".htm",".xlsx",".pdf"],bR=5,xR=4*1024*1024,wv=t=>t<1024?`${t} o`:t<1024*1024?`${Math.round(t/1024)} Ko`:`${(t/(1024*1024)).toFixed(1)} Mo`;async function SR(t){const s=new Uint8Array(await t.arrayBuffer());let i="";for(let r=0;r<s.length;r+=32768)i+=String.fromCharCode(...s.subarray(r,r+32768));return btoa(i)}function _R(){const[t,s]=ee.useState(""),[i,r]=ee.useState(""),[o,c]=ee.useState(!1),[d,h]=ee.useState([]),[p,m]=ee.useState(null),[b,v]=ee.useState(null),[x,S]=ee.useState([]),[w,j]=ee.useState({}),z=Co(),T=mT(),L=gT(b),G=Md(),V=t.trim().length,W=L.data?.stage==="done"?L.data.result?.specId:void 0;ee.useEffect(()=>{W!==void 0&&z({to:"/specs/$specId",params:{specId:W}})},[W,z]);const $=L.data?.stage==="questions"?L.data:null,A=L.data!==void 0&&L.data.stage!=="done"&&L.data.stage!=="failed"&&L.data.stage!=="questions",J=T.isPending||A||b!==null&&L.isPending,ie=L.error instanceof Bo&&L.error.payload.code==="BRIEF_JOB_LOST",re=x.flatMap(q=>Object.entries(q.answers).map(([se,ue])=>({questionId:se,answer:ue}))),P=i.trim().toLowerCase(),I=P===""||!o?[]:(G.data?.specs??[]).filter(q=>"status"in q).filter(q=>q.id!==P&&(q.id.includes(P)||q.intent.toLowerCase().includes(P))).slice(0,yR);function fe(q){T.mutate({brief:t,...i.trim()===""?{}:{specId:i.trim()},...d.length===0?{}:{attachments:d.map(se=>({name:se.name,contentBase64:se.contentBase64}))},...q.answers.length===0?{}:{answers:q.answers},...q.round===1?{}:{round:q.round},...q.skipQuestions?{skipQuestions:!0}:{}},{onSuccess:se=>v(se.jobId)})}function ye(){if($===null)return;const q=$.round??x.length+1,se=[...x,{round:q,questions:$.questions??[],answers:w}];S(se),j({}),v(null),fe({answers:se.flatMap(ue=>Object.entries(ue.answers).map(([E,Z])=>({questionId:E,answer:Z}))),round:Math.min(q+1,Rf+1),skipQuestions:!1})}function pe(){const q=$?.round??x.length+1;v(null),fe({answers:re,round:q,skipQuestions:!0})}async function U(q){const se=Array.from(q.target.files??[]);q.target.value="",m(null);const ue=[...d];for(const E of se){const Z=E.name.toLowerCase();if(!Af.some(X=>Z.endsWith(X))){m(`« ${E.name} » : format non retenu — ${Af.join(", ")}.`);continue}if(E.size>xR){m(`« ${E.name} » : ${wv(E.size)}, au-delà de 4 Mo par pièce.`);continue}if(ue.length>=bR){m(`Cinq pièces au plus : « ${E.name} » n'est pas jointe.`);break}ue.some(X=>X.name===E.name)||ue.push({name:E.name,size:E.size,contentBase64:await SR(E)})}h(ue)}function C(q){q.preventDefault(),S([]),j({}),v(null),fe({answers:[],round:1,skipQuestions:!1})}return g.jsxs("form",{onSubmit:C,className:"space-y-6",children:[g.jsx(li,{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."}),g.jsx("ol",{className:"grid gap-3 md:grid-cols-3",children:gR.map((q,se)=>g.jsxs("li",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":se},children:[g.jsxs("p",{className:"font-mono text-xs text-accent",children:["0",se+1]}),g.jsx("p",{className:"mt-1 font-display text-lg font-semibold text-text",children:q.title}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:q.detail})]},q.title))}),g.jsxs(tn,{className:"studio-reveal",style:{"--i":3},children:[g.jsxs("div",{className:"flex items-baseline justify-between gap-3",children:[g.jsx("label",{className:"block text-sm font-medium text-text",htmlFor:"brief-text",children:"Brief"}),g.jsxs("span",{className:`font-mono text-xs ${V<ao?"text-text-faint":"text-positive"}`,children:[V," / ",ao," caractères minimum"]})]}),g.jsx("textarea",{id:"brief-text",required:!0,minLength:ao,rows:10,value:t,onChange:q=>s(q.target.value),placeholder:"Je veux une rubrique qui…",className:`${Tf} mt-2 font-sans leading-relaxed`}),g.jsx("p",{className:"mt-3 text-xs text-text-faint",children:"Pour voir le ton attendu :"}),g.jsx("ul",{className:"mt-1 flex flex-wrap gap-2",children:pR.map(q=>g.jsx("li",{children:g.jsxs(ct,{voice:"ghost",size:"sm",onClick:()=>s(q),className:"max-w-md text-left whitespace-normal",children:["« ",q," »"]})},q))}),g.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-spec-id",children:["Spec visée ",g.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel, pour amender une spec existante)"})]}),g.jsxs("div",{className:"relative",children:[g.jsx("input",{id:"brief-spec-id",value:i,onChange:q=>r(q.target.value),onFocus:()=>c(!0),onBlur:()=>window.setTimeout(()=>c(!1),150),placeholder:"ex. suivi-des-commandes — tapez quelques lettres",autoComplete:"off","aria-autocomplete":"list","aria-controls":"brief-spec-suggestions","aria-expanded":I.length>0,className:`${Tf} mt-1 font-mono`}),I.length>0&&g.jsx("ul",{id:"brief-spec-suggestions",role:"listbox","aria-label":"Specs du repo",className:"absolute z-10 mt-1 w-full overflow-hidden rounded-md border border-border bg-surface-raised shadow-overlay",children:I.map(q=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":!1,onMouseDown:se=>se.preventDefault(),onClick:()=>{r(q.id),c(!1)},className:"flex w-full items-baseline gap-3 px-3 py-2 text-left text-sm transition-colors hover:bg-surface-sunken",children:[g.jsx("span",{className:"font-mono text-text",children:q.id}),g.jsx("span",{className:"truncate text-xs text-text-muted",children:q.intent})]})},q.id))})]}),g.jsxs("label",{className:"mt-5 block text-sm font-medium text-text",htmlFor:"brief-attachments",children:["Pièces jointes ",g.jsx("span",{className:"font-normal text-text-faint",children:"(optionnel : une maquette HTML, un classeur, un document)"})]}),g.jsx("input",{id:"brief-attachments",type:"file",multiple:!0,accept:Af.join(","),onChange:q=>{U(q)},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"}),g.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é."}),p!==null&&g.jsx("p",{role:"alert",className:"mt-2 text-xs text-danger",children:p}),d.length>0&&g.jsx("ul",{"aria-label":"Pièces jointes au brief",className:"mt-2 space-y-1",children:d.map(q=>g.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-md border border-border px-3 py-1.5 text-sm",children:[g.jsx("span",{className:"truncate font-mono text-text",children:q.name}),g.jsxs("span",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:wv(q.size)}),g.jsx(ct,{voice:"ghost",size:"sm",onClick:()=>h(d.filter(se=>se.name!==q.name)),"aria-label":`Retirer ${q.name}`,children:"Retirer"})]})]},q.name))})]}),x.map(q=>g.jsxs("details",{className:"rounded-lg border border-border bg-surface-raised/60 px-4 py-3 text-sm",children:[g.jsxs("summary",{className:"cursor-pointer font-medium text-text",children:["Tournée ",q.round," sur ",Rf," — répondue"]}),g.jsx("dl",{className:"mt-2 space-y-1 text-text-muted",children:q.questions.map(se=>g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("dt",{children:se.text}),g.jsx("dd",{className:"text-text",children:q.answers[se.id]??"(sans réponse)"})]},se.id))})]},q.round)),$!==null&&g.jsxs(tn,{"aria-label":"Questions du modèle",className:"studio-rise text-sm",children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Le modèle a des questions"}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:["tournée ",$.round??x.length+1," sur ",Rf]})]}),g.jsx("p",{className:"mt-1 text-text-muted",children:"Une réponse change la spec ; sans réponse, le modèle tranche et l'écrit dans les hypothèses."}),g.jsx("ol",{className:"mt-4 space-y-4",children:($.questions??[]).map((q,se)=>g.jsx("li",{children:g.jsxs("fieldset",{children:[g.jsxs("legend",{className:"font-medium text-text",children:[se+1,". ",q.text]}),g.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:q.options.map(ue=>g.jsxs("label",{className:`cursor-pointer rounded-md border px-3 py-1.5 transition-colors ${w[q.id]===ue?"border-accent bg-accent-soft text-text":"border-border text-text-muted hover:border-border-strong"}`,children:[g.jsx("input",{type:"radio",name:`question-${q.id}`,value:ue,checked:w[q.id]===ue,onChange:()=>j({...w,[q.id]:ue}),className:"sr-only"}),ue]},ue))}),g.jsx("input",{"aria-label":`Autre réponse — ${q.text}`,placeholder:"ou une réponse libre",value:q.options.includes(w[q.id]??"")?"":w[q.id]??"",onChange:ue=>j({...w,[q.id]:ue.target.value}),className:`${Tf} mt-2`})]})},q.id))}),g.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[g.jsx(ct,{voice:"primary",onClick:ye,disabled:T.isPending||Object.values(w).every(q=>q.trim()===""),children:"Répondre"}),g.jsx(ct,{voice:"ghost",onClick:pe,disabled:T.isPending,children:"Passer les questions"})]})]}),A&&L.data!==void 0&&g.jsx(_v,{job:L.data}),T.isPending&&b===null&&g.jsx(_v,{job:{jobId:"",stage:"drafting",attempt:1,elapsedMs:0,budgetMs:9e4}}),ie&&g.jsx("section",{role:"alert",className:"studio-rise rounded-lg border border-warning/40 bg-warning-soft p-4 text-sm text-text",children:"Le travail s'est perdu : l'instance a redémarré pendant le brief. Votre texte est conservé, renvoyez-le."}),!ie&&L.error!=null&&g.jsx(ft,{error:L.error}),L.data?.stage==="failed"&&L.data.error!==void 0&&g.jsx($o,{error:L.data.error}),T.error!=null&&g.jsx(ft,{error:T.error}),g.jsx(ct,{voice:"primary",type:"submit",disabled:J||$!==null||V<ao,children:x.length>0||$!==null?"Recommencer le brief":"Rédiger la spec"})]})}const wR=["development","staging","production"],pn={development:"Développement",staging:"Préproduction",production:"Production"},jR={staging:"development",production:"staging"},OR={success:"positive",failure:"danger",error:"danger",in_progress:"warning",pending:"warning",queued:"warning"},ur={deployed:"border-accent bg-accent shadow-[0_0_0_4px_var(--theme-accent-glow)]",forward:"border-accent bg-surface-sunken",backward:"border-orichalcum bg-surface-sunken",unreachable:"border-border bg-transparent"},ER="mt-2 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",NR=10,Cf=t=>t.slice(0,10);function zR({label:t}){return g.jsx("span",{role:"status","aria-label":t,className:"inline-flex items-center",children:g.jsx("span",{"aria-hidden":"true",className:"studio-live inline-block h-2 w-2 rounded-full bg-accent"})})}function TR(){const t=Er(),s=t.data?.host?.environments!==!1,[i,r]=ee.useState("staging"),[o,c]=ee.useState(null),[d,h]=ee.useState(""),[p,m]=ee.useState(null),b=_T(s,p),v=hv("development",s),x=hv(i,s),S=Md(),w=jT(),j=t.data?.role==="operator";if(!s)return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Hébergé",title:"Promotions",explanation:"La production ne reçoit que ce que la préproduction a reçu, au commit près."}),g.jsxs(tn,{"aria-label":"Environnements non configurés",className:"studio-reveal text-sm text-text-muted",style:{"--i":0},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Cet hôte ne déclare pas d'environnements"}),g.jsxs("p",{className:"mt-2",children:["Les promotions supposent les refs ",g.jsx("code",{className:"font-mono text-text",children:"env/staging"})," et ",g.jsx("code",{className:"font-mono text-text",children:"env/production"}),", déclarées dans le bloc"," ",g.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(b.error)return g.jsx(ft,{error:b.error});if(b.isPending)return g.jsx("div",{"aria-label":"Chargement des environnements",className:"h-40 studio-breathe rounded-lg border border-border bg-surface-sunken/60"});const z=b.data,T=new Map,L=new Set;for(const C of S.data?.specs??[])L.add(C.id),"intent"in C&&C.intent!==""&&T.set(C.id,C.intent);const G=C=>C.specId!==null&&T.get(C.specId)||C.title,V=C=>C.specId!==null&&L.has(C.specId)?g.jsx(la,{to:"/specs/$specId",params:{specId:C.specId},className:"font-mono text-xs text-accent underline-offset-4 hover:underline","aria-label":`Ouvrir la spec ${C.specId}`,children:C.specId}):null,W=v.data?.commits??[],$=C=>C===null?-1:W.findIndex(q=>q.sha===C),A=C=>z.environments.find(q=>q.name===C)?.sha??null,J=x.data?.commits??[],ie=J.findIndex(C=>C.reach==="deployed"),re=o===null?-1:J.findIndex(C=>C.sha===o),P=re===-1?null:J[re]??null,I=P?.reach==="forward",fe=P===null||ie===-1?J.slice(0,Math.max(re,0)):I?J.slice(re,ie):J.slice(ie,re),ye=P!==null&&i!=="development"&&(I||j&&d.trim().length>=NR)&&!w.isPending;function pe(C){r(C),c(null),h("")}function U(){if(P===null||i==="development")return;const C=i,q=P.sha;w.mutate(I?{environment:C,sha:q}:{environment:C,sha:q,rollback:!0,reason:d.trim()},{onSuccess:()=>{c(null),h(""),m({environment:C,sha:q}),x.refetch(),v.refetch()}})}return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Hébergé",title:"Promotions",explanation:"Trois environnements, une ligne de commits par environnement. Le commit déployé porte l'anneau ; cliquer un autre commit de la ligne le déploie. La production ne reçoit que ce que la préproduction a reçu, au commit près."}),w.error!=null&&g.jsx(ft,{error:w.error}),g.jsx("ol",{"aria-label":"Environnements",className:"grid gap-3 md:grid-cols-[1fr_auto_1fr_auto_1fr] md:items-stretch",children:z.environments.map((C,q)=>{const se=C.name,ue=jR[se],E=$(C.sha),Z=ue===void 0||E===-1?null:Math.max(0,E-Math.max($(A(ue)),0)),X=E===-1?null:W[E]??null,ne=p!==null&&p.environment===se&&!(C.sha===p.sha&&C.deployment?.state==="success");return g.jsxs("li",{className:"contents",children:[q>0&&g.jsx("span",{"aria-hidden":"true",className:"hidden self-center font-display text-2xl text-text-faint md:block",children:"→"}),g.jsxs("button",{type:"button","aria-label":pn[se],"aria-pressed":i===se,onClick:()=>pe(se),className:`studio-reveal flex flex-col rounded-lg border bg-surface-raised p-4 text-left shadow-raised transition-[transform,box-shadow,border-color] duration-(--duration-fast) hover:-translate-y-0.5 hover:shadow-overlay focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent ${i===se?"border-accent shadow-glow":"border-border"}`,style:{"--i":q},children:[g.jsxs("div",{className:"flex w-full items-start justify-between gap-2",children:[g.jsxs("div",{children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:pn[se]}),g.jsx("p",{className:"font-mono text-xs text-text-faint",children:C.ref})]}),ne?g.jsxs(qe,{tone:"accent",children:[g.jsx(zR,{label:`déploiement de ${pn[se].toLowerCase()} en cours`})," déploiement"]}):ue===void 0?g.jsxs(qe,{tone:"accent",children:["tête de ",C.ref]}):Z===0?g.jsx(qe,{tone:"positive",children:"à jour"}):Z!==null?g.jsx(qe,{tone:"warning",children:"en retard"}):null]}),g.jsx("p",{className:"mt-3 font-display text-xl font-semibold leading-tight text-text text-balance",children:C.sha===null?"Aucun commit":X===null?"Commit hors de la ligne lue":G(X)}),g.jsxs("p",{className:"mt-1 flex flex-wrap items-center gap-x-2 font-mono text-xs text-text-faint",children:[g.jsx("span",{children:C.sha===null?"—":C.sha.slice(0,7)}),X!==null&&g.jsxs(g.Fragment,{children:[g.jsx("span",{children:"·"}),g.jsx("span",{children:X.author}),g.jsx("span",{children:"·"}),g.jsx("span",{children:Cf(X.authoredAt)})]}),X?.releaseTag!=null&&g.jsx(qe,{tone:"orichalcum",children:X.releaseTag})]}),C.deployment!==null&&g.jsxs("p",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[g.jsx(qe,{tone:OR[C.deployment.state??"pending"]??"neutral",children:C.deployment.state??"en attente"}),"déployé le ",Cf(C.deployment.createdAt)]}),g.jsxs("p",{className:"mt-auto flex items-baseline gap-2 pt-4",children:[g.jsx("span",{className:"font-mono text-2xl text-accent",children:ue===void 0?g.jsx(vn,{value:W.length}):Z===null?"—":g.jsx(vn,{value:Z})}),g.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:ue===void 0?"commits lus":`commit${Z!==null&&Z>1?"s":""} d'avance en ${pn[ue].toLowerCase()}`})]})]})]},se)})}),g.jsxs(tn,{"aria-label":`Ligne de ${pn[i].toLowerCase()}`,className:"studio-reveal text-sm",style:{"--i":3},children:[g.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[g.jsx("h2",{className:"font-display text-xl font-semibold text-text",children:pn[i]}),g.jsxs("span",{className:"font-mono text-xs text-text-muted",children:[x.data?.ref??""," · ",J.length," commits lus sur ",v.data?.ref??"la branche par défaut"]})]}),g.jsxs("p",{className:"mt-1 flex flex-wrap gap-4 text-xs text-text-faint",children:[g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${ur.deployed}`})," déployé"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${ur.forward}`})," promouvable"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${ur.backward}`})," retour arrière (opérateur)"]}),g.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[g.jsx("i",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${ur.unreachable}`})," hors d'atteinte"]})]}),x.error!=null&&g.jsx("div",{className:"mt-3",children:g.jsx(ft,{error:x.error})}),x.isPending&&g.jsx("div",{"aria-label":"Chargement de la ligne",className:"mt-4 h-24 studio-breathe rounded-md border border-border bg-surface-sunken/60"}),J.length>0&&g.jsx("ol",{"aria-label":"Commits de la ligne",className:"relative mt-4 space-y-1 before:absolute before:bottom-2 before:left-[0.8rem] before:top-2 before:w-0.5 before:bg-border",children:J.map((C,q)=>{const se=C.reach==="unreachable"||C.reach==="deployed"||C.reach==="backward"&&!j||i==="development",ue=wR.filter(E=>A(E)===C.sha);return g.jsxs("li",{className:`studio-reveal grid grid-cols-[minmax(0,1fr)_auto] items-center gap-2 rounded-md border px-1 ${C.reach==="deployed"?"border-accent/35 bg-accent-soft":o===C.sha?"border-accent bg-surface-sunken":"border-transparent"}`,style:{"--i":q},children:[g.jsxs("button",{type:"button",disabled:se,title:C.why,"aria-current":C.reach==="deployed",onClick:()=>c(o===C.sha?null:C.sha),className:`grid min-w-0 grid-cols-[1.6rem_minmax(0,1fr)] items-center gap-3 rounded-md px-1 py-2 text-left transition-[background,transform] duration-(--duration-fast) ${se?"cursor-not-allowed opacity-55":"hover:translate-x-0.5 hover:bg-surface-sunken"}`,children:[g.jsx("i",{"aria-hidden":"true",className:`relative z-10 inline-block h-2.5 w-2.5 justify-self-center rounded-full border-2 ${ur[C.reach]}`}),g.jsxs("span",{className:"flex min-w-0 flex-wrap items-baseline gap-x-3 gap-y-0.5",children:[g.jsx("span",{className:"font-medium text-text",children:G(C)}),g.jsx("span",{className:"font-mono text-xs text-text-faint",children:C.sha.slice(0,7)}),g.jsxs("span",{className:"text-xs text-text-faint",children:[C.author," · ",Cf(C.authoredAt)]})]})]}),g.jsxs("span",{className:"flex items-center gap-1.5 pr-1",children:[V(C)??(C.specId!==null?g.jsx("span",{className:"font-mono text-xs text-text-faint",children:C.specId}):null),ue.map(E=>g.jsx(qe,{tone:E===i?"accent":"neutral",children:pn[E].toLowerCase()},E)),C.releaseTag!==null&&g.jsx(qe,{tone:"orichalcum",children:C.releaseTag})]})]},C.sha)})}),P!==null&&i!=="development"&&g.jsxs("section",{"aria-label":I?"Promouvoir":"Retour arrière",className:"studio-rise mt-4 rounded-lg border border-accent/35 bg-surface p-4 shadow-overlay",children:[g.jsxs("h3",{className:"font-display text-lg font-semibold text-text",children:[I?"Promouvoir":"Revenir"," ",pn[i].toLowerCase()," ",I?"vers":"sur"," ",g.jsx("code",{className:"font-mono text-base",children:P.sha.slice(0,7)})]}),g.jsxs("p",{className:"mt-1 text-text-muted",children:[pn[i]," ",I?"recevrait":"perdrait"," ",g.jsx(vn,{value:fe.length,className:"font-medium text-text"})," commit",fe.length>1?"s":"",I?" :":" — un retour arrière s'enregistre avec son motif :"]}),g.jsx("ul",{className:"mt-2 list-disc space-y-1 pl-5 text-text-muted marker:text-accent",children:fe.map(C=>g.jsxs("li",{children:[g.jsx("span",{className:"text-text",children:G(C)})," ",V(C)," ",g.jsx("span",{className:"font-mono text-xs text-text-faint",children:C.sha.slice(0,7)})," — ",C.author]},C.sha))}),!I&&g.jsxs("label",{className:"block text-xs text-text-faint",children:["Motif du retour (dix caractères au moins, journalisé)",g.jsx("textarea",{"aria-label":"Motif du retour arrière",rows:2,value:d,onChange:C=>h(C.target.value),className:ER})]}),g.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[g.jsx(ct,{voice:I?"primary":"danger",size:"sm",disabled:!ye,onClick:U,children:w.isPending?"Promotion…":I?"Promouvoir":"Revenir, avec ce motif"}),g.jsx(ct,{voice:"ghost",size:"sm",onClick:()=>c(null),children:"Annuler"}),g.jsx("span",{className:"text-xs text-text-faint",children:P.why})]})]}),w.isSuccess&&p!==null&&g.jsxs("p",{role:"status",className:"studio-rise mt-4 rounded-md border border-positive/40 bg-positive-soft p-3 text-text",children:[pn[w.data.environment]," est à ",w.data.toSha.slice(0,7),w.data.releaseTag===null?"":` — release ${w.data.releaseTag}`,"."," ",RR(z,p)?"Le produit n'a pas encore rapporté le déploiement.":"Déployé."]})]}),g.jsxs(tn,{className:"studio-reveal",style:{"--i":4},children:[g.jsx("h2",{className:"font-display text-lg font-semibold text-text",children:"Releases"}),z.releases.length===0?g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Aucune mise en production étiquetée."}):g.jsx("ul",{className:"mt-3 flex flex-wrap gap-2",children:z.releases.map(C=>g.jsx("li",{children:g.jsx(qe,{tone:"orichalcum",mono:!0,children:C})},C))})]})]})}function RR(t,s){const i=t.environments.find(r=>r.name===s.environment);return!(i!==void 0&&i.sha===s.sha&&i.deployment?.state==="success")}function AR(t){const s=[],i=new Date;for(let r=0;r<t;r+=1){const o=new Date(Date.UTC(i.getUTCFullYear(),i.getUTCMonth()-r,1));s.push(o.toISOString().slice(0,7))}return s}const cr=t=>`${t.toFixed(2)} $`,jv=t=>new Intl.NumberFormat("fr-FR",{notation:"compact",maximumFractionDigits:1}).format(t),gs="px-3 py-2 text-right font-mono tabular-nums";function CR(){const t=AR(6),[s,i]=ee.useState(t[0]??""),r=OT(s);return g.jsxs("div",{className:"space-y-6",children:[g.jsx(li,{eyebrow:"Hébergé",title:"Consommation",explanation:"Estimation à partir des jetons rapportés ; la facture vient de l'espace de travail du client.",actions:g.jsxs("label",{className:"text-sm text-text-muted",children:["Mois",g.jsx("select",{value:s,onChange:o=>i(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=>g.jsx("option",{value:o,children:o},o))})]})}),r.error?g.jsx(ft,{error:r.error}):null,r.isPending?g.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&&g.jsxs(g.Fragment,{children:[g.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:jv},{label:"jetons sortis",value:r.data.totals.outputTokens,format:jv},{label:"estimation",value:r.data.totals.estimatedUsd,format:cr}].map((o,c)=>g.jsxs("div",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":c},children:[g.jsx("dt",{className:"font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:o.label}),g.jsx("dd",{className:"mt-1 font-display text-3xl font-semibold leading-none text-text",children:g.jsx(vn,{value:o.value,format:o.format})})]},o.label))}),r.data.budgetUsd!==null&&g.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:[g.jsxs("p",{children:[cr(r.data.totals.estimatedUsd)," sur un plafond de ",cr(r.data.budgetUsd),r.data.budgetRatio!==null?` (${Math.round(r.data.budgetRatio*100)} %)`:""]}),g.jsx("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-surface-sunken",role:"presentation",children:g.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&&g.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?g.jsx(j0,{title:"Aucun appel de modèle ce mois-ci",hint:"Les briefs et les spéculations à venir apparaîtront ici, par spec."}):g.jsx("div",{className:"overflow-hidden rounded-lg border border-border bg-surface-raised shadow-raised",children:g.jsxs("table",{className:"w-full text-sm",children:[g.jsx("thead",{className:"bg-surface-sunken/60 text-left font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:g.jsxs("tr",{children:[g.jsx("th",{className:"px-3 py-2 font-normal",children:"Spec"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Runs"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Entrée"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Sortie"}),g.jsx("th",{className:"px-3 py-2 text-right font-normal",children:"Estimation"})]})}),g.jsxs("tbody",{children:[r.data.specs.map(o=>g.jsxs("tr",{className:"border-t border-border transition-colors hover:bg-surface-sunken/40",children:[g.jsxs("td",{className:"px-3 py-2 font-mono text-text",children:[o.specId," ",g.jsxs("span",{className:"text-xs text-text-faint",children:["#",o.pullRequestNumber]})]}),g.jsx("td",{className:gs,children:o.runs}),g.jsx("td",{className:gs,children:o.inputTokens}),g.jsx("td",{className:gs,children:o.outputTokens}),g.jsxs("td",{className:gs,children:[cr(o.estimatedUsd),o.uncostedModels.length>0&&g.jsxs("span",{className:"ml-1 font-sans text-xs text-text-faint",children:["(+ ",o.uncostedModels.join(", ")," sans coût connu)"]})]})]},o.specId)),g.jsxs("tr",{className:"border-t-2 border-border-strong font-semibold text-text",children:[g.jsx("td",{className:"px-3 py-2",children:"Total"}),g.jsx("td",{className:gs,children:r.data.totals.runs}),g.jsx("td",{className:gs,children:r.data.totals.inputTokens}),g.jsx("td",{className:gs,children:r.data.totals.outputTokens}),g.jsx("td",{className:gs,children:cr(r.data.totals.estimatedUsd)})]})]})]})})]})]})}const T0="ogygie-studio-theme";function MR(){try{const t=window.localStorage.getItem(T0);return t==="dark"||t==="light"?t:null}catch{return null}}const DR="dark";function kR(){const[t,s]=ee.useState(()=>MR()??DR);ee.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const i=ee.useCallback(()=>{s(r=>{const o=r==="dark"?"light":"dark";try{window.localStorage.setItem(T0,o)}catch{}return o})},[]);return{theme:t,toggle:i}}const LR="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 fr({to:t,glyph:s,children:i}){return g.jsxs(la,{to:t,className:LR,activeOptions:{exact:t==="/"},children:[g.jsx("span",{"aria-hidden":"true",className:"w-4 text-center font-mono text-xs text-text-faint",children:s}),i]})}function UR(){const t=Er(),{theme:s,toggle:i}=kR();return g.jsxs("aside",{className:"flex w-60 shrink-0 flex-col border-r border-border bg-surface-sunken/60 px-3 py-5",children:[g.jsxs(la,{to:"/",className:"mb-6 flex items-center gap-3 px-3",children:[g.jsx(bb,{size:"md",className:"text-accent"}),g.jsxs("span",{className:"flex flex-col",children:[g.jsx("span",{className:"font-display text-2xl font-semibold leading-none tracking-wide text-text",children:"Ogygie"}),g.jsx("span",{className:"mt-1 block font-mono text-xs uppercase tracking-[0.22em] text-accent",children:"Studio"})]})]}),g.jsxs("nav",{"aria-label":"Navigation du studio",className:"flex flex-col gap-1",children:[g.jsx(fr,{to:"/",glyph:"▦",children:"Board"}),g.jsx(fr,{to:"/manifest",glyph:"◫",children:"Manifeste"}),t.data!==void 0&&g.jsxs(g.Fragment,{children:[g.jsx("p",{className:"mt-4 mb-1 px-3 font-mono text-xs uppercase tracking-[0.18em] text-text-faint",children:"Hébergé"}),g.jsx(fr,{to:"/brief",glyph:"✎",children:"Brief"}),t.data.host?.environments!==!1&&g.jsx(fr,{to:"/promotions",glyph:"⇥",children:"Promotions"}),g.jsx(fr,{to:"/consumption",glyph:"◔",children:"Consommation"})]})]}),g.jsxs("div",{className:"mt-auto space-y-3 px-3 pt-6",children:[t.data!==void 0&&g.jsxs("div",{className:"rounded-md border border-border bg-surface-raised px-3 py-2 text-xs",children:[g.jsx("p",{className:"truncate font-medium text-text",children:t.data.displayName}),g.jsx("p",{className:"font-mono text-text-faint",children:t.data.role})]}),g.jsxs("button",{type:"button",onClick:i,"aria-label":s==="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:[g.jsx("span",{children:s==="dark"?"Abysse":"Marbre"}),g.jsx("span",{"aria-hidden":"true",className:"font-mono",children:s==="dark"?"☾":"☀"})]})]})]})}function ZR(){return g.jsxs("div",{className:"flex min-h-screen bg-surface text-text",children:[g.jsx(UR,{}),g.jsx("main",{className:"min-w-0 flex-1",children:g.jsx("div",{className:"studio-rise mx-auto max-w-6xl px-8 py-8",children:g.jsx(yb,{})})})]})}const Ts=Tw({component:ZR}),qR=oa({getParentRoute:()=>Ts,path:"/",component:UT}),R0=oa({getParentRoute:()=>Ts,path:"/specs/$specId",component:function(){const{specId:s}=R0.useParams();return g.jsx(iR,{specId:s})}}),BR=oa({getParentRoute:()=>Ts,path:"/manifest",component:uR}),$R=oa({getParentRoute:()=>Ts,path:"/login",component:mR}),HR=oa({getParentRoute:()=>Ts,path:"/brief",component:_R}),QR=oa({getParentRoute:()=>Ts,path:"/promotions",component:TR}),GR=oa({getParentRoute:()=>Ts,path:"/consumption",component:CR}),KR=Ts.addChildren([qR,R0,BR,$R,HR,QR,GR]);function YR(t){return Zw({routeTree:KR})}const FR=new U_,VR=YR(),A0=document.getElementById("root");if(A0===null)throw new Error("Studio UI: #root element missing from index.html");c_.createRoot(A0).render(g.jsx(ee.StrictMode,{children:g.jsx(f_,{client:FR,children:g.jsx($w,{router:VR})})}));
|