@ogygie/studio 0.28.0 → 0.29.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&r(d)}).observe(document,{childList:!0,subtree:!0});function s(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function r(o){if(o.ep)return;o.ep=!0;const c=s(o);fetch(o.href,c)}})();function WS(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var sf={exports:{}},ar={};var Dg;function e_(){if(Dg)return ar;Dg=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(r,o,c){var d=null;if(c!==void 0&&(d=""+c),o.key!==void 0&&(d=""+o.key),"key"in o){c={};for(var h in o)h!=="key"&&(c[h]=o[h])}else c=o;return o=c.ref,{$$typeof:t,type:r,key:d,ref:o!==void 0?o:null,props:c}}return ar.Fragment=i,ar.jsx=s,ar.jsxs=s,ar}var kg;function t_(){return kg||(kg=1,sf.exports=e_()),sf.exports}var g=t_(),rf={exports:{}},pe={};var Ug;function n_(){if(Ug)return pe;Ug=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function S(j){return j===null||typeof j!="object"?null:(j=x&&j[x]||j["@@iterator"],typeof j=="function"?j:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,z={};function A(j,q,ee){this.props=j,this.context=q,this.refs=z,this.updater=ee||w}A.prototype.isReactComponent={},A.prototype.setState=function(j,q){if(typeof j!="object"&&typeof j!="function"&&j!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,j,q,"setState")},A.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function U(){}U.prototype=A.prototype;function H(j,q,ee){this.props=j,this.context=q,this.refs=z,this.updater=ee||w}var V=H.prototype=new U;V.constructor=H,E(V,A.prototype),V.isPureReactComponent=!0;var J=Array.isArray;function L(){}var R={H:null,A:null,T:null,S:null},X=Object.prototype.hasOwnProperty;function P(j,q,ee){var ne=ee.ref;return{$$typeof:t,type:j,key:q,ref:ne!==void 0?ne:null,props:ee}}function te(j,q){return P(j.type,q,j.props)}function le(j){return typeof j=="object"&&j!==null&&j.$$typeof===t}function se(j){var q={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(ee){return q[ee]})}var he=/\/+/g;function ge(j,q){return typeof j=="object"&&j!==null&&j.key!=null?se(""+j.key):q.toString(36)}function Y(j){switch(j.status){case"fulfilled":return j.value;case"rejected":throw j.reason;default:switch(typeof j.status=="string"?j.then(L,L):(j.status="pending",j.then(function(q){j.status==="pending"&&(j.status="fulfilled",j.value=q)},function(q){j.status==="pending"&&(j.status="rejected",j.reason=q)})),j.status){case"fulfilled":return j.value;case"rejected":throw j.reason}}throw j}function M(j,q,ee,ne,me){var xe=typeof j;(xe==="undefined"||xe==="boolean")&&(j=null);var je=!1;if(j===null)je=!0;else switch(xe){case"bigint":case"string":case"number":je=!0;break;case"object":switch(j.$$typeof){case t:case i:je=!0;break;case b:return je=j._init,M(je(j._payload),q,ee,ne,me)}}if(je)return me=me(j),je=ne===""?"."+ge(j,0):ne,J(me)?(ee="",je!=null&&(ee=je.replace(he,"$&/")+"/"),M(me,q,ee,"",function(cn){return cn})):me!=null&&(le(me)&&(me=te(me,ee+(me.key==null||j&&j.key===me.key?"":(""+me.key).replace(he,"$&/")+"/")+je)),q.push(me)),1;je=0;var Ze=ne===""?".":ne+":";if(J(j))for(var $e=0;$e<j.length;$e++)ne=j[$e],xe=Ze+ge(ne,$e),je+=M(ne,q,ee,xe,me);else if($e=S(j),typeof $e=="function")for(j=$e.call(j),$e=0;!(ne=j.next()).done;)ne=ne.value,xe=Ze+ge(ne,$e++),je+=M(ne,q,ee,xe,me);else if(xe==="object"){if(typeof j.then=="function")return M(Y(j),q,ee,ne,me);throw q=String(j),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return je}function I(j,q,ee){if(j==null)return j;var ne=[],me=0;return M(j,ne,"","",function(xe){return q.call(ee,xe,me++)}),ne}function B(j){if(j._status===-1){var q=j._result;q=q(),q.then(function(ee){(j._status===0||j._status===-1)&&(j._status=1,j._result=ee)},function(ee){(j._status===0||j._status===-1)&&(j._status=2,j._result=ee)}),j._status===-1&&(j._status=0,j._result=q)}if(j._status===1)return j._result.default;throw j._result}var ie=typeof reportError=="function"?reportError:function(j){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof j=="object"&&j!==null&&typeof j.message=="string"?String(j.message):String(j),error:j});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",j);return}console.error(j)},fe={map:I,forEach:function(j,q,ee){I(j,function(){q.apply(this,arguments)},ee)},count:function(j){var q=0;return I(j,function(){q++}),q},toArray:function(j){return I(j,function(q){return q})||[]},only:function(j){if(!le(j))throw Error("React.Children.only expected to receive a single React element child.");return j}};return pe.Activity=v,pe.Children=fe,pe.Component=A,pe.Fragment=s,pe.Profiler=o,pe.PureComponent=H,pe.StrictMode=r,pe.Suspense=m,pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,pe.__COMPILER_RUNTIME={__proto__:null,c:function(j){return R.H.useMemoCache(j)}},pe.cache=function(j){return function(){return j.apply(null,arguments)}},pe.cacheSignal=function(){return null},pe.cloneElement=function(j,q,ee){if(j==null)throw Error("The argument must be a React element, but you passed "+j+".");var ne=E({},j.props),me=j.key;if(q!=null)for(xe in q.key!==void 0&&(me=""+q.key),q)!X.call(q,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&q.ref===void 0||(ne[xe]=q[xe]);var xe=arguments.length-2;if(xe===1)ne.children=ee;else if(1<xe){for(var je=Array(xe),Ze=0;Ze<xe;Ze++)je[Ze]=arguments[Ze+2];ne.children=je}return P(j.type,me,ne)},pe.createContext=function(j){return j={$$typeof:d,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null},j.Provider=j,j.Consumer={$$typeof:c,_context:j},j},pe.createElement=function(j,q,ee){var ne,me={},xe=null;if(q!=null)for(ne in q.key!==void 0&&(xe=""+q.key),q)X.call(q,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(me[ne]=q[ne]);var je=arguments.length-2;if(je===1)me.children=ee;else if(1<je){for(var Ze=Array(je),$e=0;$e<je;$e++)Ze[$e]=arguments[$e+2];me.children=Ze}if(j&&j.defaultProps)for(ne in je=j.defaultProps,je)me[ne]===void 0&&(me[ne]=je[ne]);return P(j,xe,me)},pe.createRef=function(){return{current:null}},pe.forwardRef=function(j){return{$$typeof:h,render:j}},pe.isValidElement=le,pe.lazy=function(j){return{$$typeof:b,_payload:{_status:-1,_result:j},_init:B}},pe.memo=function(j,q){return{$$typeof:p,type:j,compare:q===void 0?null:q}},pe.startTransition=function(j){var q=R.T,ee={};R.T=ee;try{var ne=j(),me=R.S;me!==null&&me(ee,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(L,ie)}catch(xe){ie(xe)}finally{q!==null&&ee.types!==null&&(q.types=ee.types),R.T=q}},pe.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},pe.use=function(j){return R.H.use(j)},pe.useActionState=function(j,q,ee){return R.H.useActionState(j,q,ee)},pe.useCallback=function(j,q){return R.H.useCallback(j,q)},pe.useContext=function(j){return R.H.useContext(j)},pe.useDebugValue=function(){},pe.useDeferredValue=function(j,q){return R.H.useDeferredValue(j,q)},pe.useEffect=function(j,q){return R.H.useEffect(j,q)},pe.useEffectEvent=function(j){return R.H.useEffectEvent(j)},pe.useId=function(){return R.H.useId()},pe.useImperativeHandle=function(j,q,ee){return R.H.useImperativeHandle(j,q,ee)},pe.useInsertionEffect=function(j,q){return R.H.useInsertionEffect(j,q)},pe.useLayoutEffect=function(j,q){return R.H.useLayoutEffect(j,q)},pe.useMemo=function(j,q){return R.H.useMemo(j,q)},pe.useOptimistic=function(j,q){return R.H.useOptimistic(j,q)},pe.useReducer=function(j,q,ee){return R.H.useReducer(j,q,ee)},pe.useRef=function(j){return R.H.useRef(j)},pe.useState=function(j){return R.H.useState(j)},pe.useSyncExternalStore=function(j,q,ee){return R.H.useSyncExternalStore(j,q,ee)},pe.useTransition=function(){return R.H.useTransition()},pe.version="19.2.8",pe}var Lg;function Er(){return Lg||(Lg=1,rf.exports=n_()),rf.exports}var W=Er();const No=WS(W);var lf={exports:{}},sr={},of={exports:{}},uf={};var Zg;function i_(){return Zg||(Zg=1,(function(t){function i(M,I){var B=M.length;M.push(I);e:for(;0<B;){var ie=B-1>>>1,fe=M[ie];if(0<o(fe,I))M[ie]=I,M[B]=fe,B=ie;else break e}}function s(M){return M.length===0?null:M[0]}function r(M){if(M.length===0)return null;var I=M[0],B=M.pop();if(B!==I){M[0]=B;e:for(var ie=0,fe=M.length,j=fe>>>1;ie<j;){var q=2*(ie+1)-1,ee=M[q],ne=q+1,me=M[ne];if(0>o(ee,B))ne<fe&&0>o(me,ee)?(M[ie]=me,M[ne]=B,ie=ne):(M[ie]=ee,M[q]=B,ie=q);else if(ne<fe&&0>o(me,B))M[ie]=me,M[ne]=B,ie=ne;else break e}}return I}function o(M,I){var B=M.sortIndex-I.sortIndex;return B!==0?B:M.id-I.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();t.unstable_now=function(){return d.now()-h}}var m=[],p=[],b=1,v=null,x=3,S=!1,w=!1,E=!1,z=!1,A=typeof setTimeout=="function"?setTimeout:null,U=typeof clearTimeout=="function"?clearTimeout:null,H=typeof setImmediate<"u"?setImmediate:null;function V(M){for(var I=s(p);I!==null;){if(I.callback===null)r(p);else if(I.startTime<=M)r(p),I.sortIndex=I.expirationTime,i(m,I);else break;I=s(p)}}function J(M){if(E=!1,V(M),!w)if(s(m)!==null)w=!0,L||(L=!0,se());else{var I=s(p);I!==null&&Y(J,I.startTime-M)}}var L=!1,R=-1,X=5,P=-1;function te(){return z?!0:!(t.unstable_now()-P<X)}function le(){if(z=!1,L){var M=t.unstable_now();P=M;var I=!0;try{e:{w=!1,E&&(E=!1,U(R),R=-1),S=!0;var B=x;try{t:{for(V(M),v=s(m);v!==null&&!(v.expirationTime>M&&te());){var ie=v.callback;if(typeof ie=="function"){v.callback=null,x=v.priorityLevel;var fe=ie(v.expirationTime<=M);if(M=t.unstable_now(),typeof fe=="function"){v.callback=fe,V(M),I=!0;break t}v===s(m)&&r(m),V(M)}else r(m);v=s(m)}if(v!==null)I=!0;else{var j=s(p);j!==null&&Y(J,j.startTime-M),I=!1}}break e}finally{v=null,x=B,S=!1}I=void 0}}finally{I?se():L=!1}}}var se;if(typeof H=="function")se=function(){H(le)};else if(typeof MessageChannel<"u"){var he=new MessageChannel,ge=he.port2;he.port1.onmessage=le,se=function(){ge.postMessage(null)}}else se=function(){A(le,0)};function Y(M,I){R=A(function(){M(t.unstable_now())},I)}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(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):X=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(M){switch(x){case 1:case 2:case 3:var I=3;break;default:I=x}var B=x;x=I;try{return M()}finally{x=B}},t.unstable_requestPaint=function(){z=!0},t.unstable_runWithPriority=function(M,I){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var B=x;x=M;try{return I()}finally{x=B}},t.unstable_scheduleCallback=function(M,I,B){var ie=t.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?ie+B:ie):B=ie,M){case 1:var fe=-1;break;case 2:fe=250;break;case 5:fe=1073741823;break;case 4:fe=1e4;break;default:fe=5e3}return fe=B+fe,M={id:b++,callback:I,priorityLevel:M,startTime:B,expirationTime:fe,sortIndex:-1},B>ie?(M.sortIndex=B,i(p,M),s(m)===null&&M===s(p)&&(E?(U(R),R=-1):E=!0,Y(J,B-ie))):(M.sortIndex=fe,i(m,M),w||S||(w=!0,L||(L=!0,se()))),M},t.unstable_shouldYield=te,t.unstable_wrapCallback=function(M){var I=x;return function(){var B=x;x=I;try{return M.apply(this,arguments)}finally{x=B}}}})(uf)),uf}var qg;function a_(){return qg||(qg=1,of.exports=i_()),of.exports}var cf={exports:{}},pt={};var Bg;function s_(){if(Bg)return pt;Bg=1;var t=Er();function i(m){var p="https://react.dev/errors/"+m;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+m+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var r={d:{f:s,r:function(){throw Error(i(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(m,p,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:m,containerInfo:p,implementation:b}}var d=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(m,p){if(m==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return pt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,pt.createPortal=function(m,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(i(299));return c(m,p,null,b)},pt.flushSync=function(m){var p=d.T,b=r.p;try{if(d.T=null,r.p=2,m)return m()}finally{d.T=p,r.p=b,r.d.f()}},pt.preconnect=function(m,p){typeof m=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,r.d.C(m,p))},pt.prefetchDNS=function(m){typeof m=="string"&&r.d.D(m)},pt.preinit=function(m,p){if(typeof m=="string"&&p&&typeof p.as=="string"){var b=p.as,v=h(b,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,S=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?r.d.S(m,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:S}):b==="script"&&r.d.X(m,{crossOrigin:v,integrity:x,fetchPriority:S,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},pt.preinitModule=function(m,p){if(typeof m=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=h(p.as,p.crossOrigin);r.d.M(m,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&r.d.M(m)},pt.preload=function(m,p){if(typeof m=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,v=h(b,p.crossOrigin);r.d.L(m,b,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},pt.preloadModule=function(m,p){if(typeof m=="string")if(p){var b=h(p.as,p.crossOrigin);r.d.m(m,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else r.d.m(m)},pt.requestFormReset=function(m){r.d.r(m)},pt.unstable_batchedUpdates=function(m,p){return m(p)},pt.useFormState=function(m,p,b){return d.H.useFormState(m,p,b)},pt.useFormStatus=function(){return d.H.useHostTransitionStatus()},pt.version="19.2.8",pt}var $g;function wv(){if($g)return cf.exports;$g=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),cf.exports=s_(),cf.exports}var Hg;function r_(){if(Hg)return sr;Hg=1;var t=a_(),i=Er(),s=wv();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)n+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,a=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(a=n.return),e=n.return;while(e)}return n.tag===3?a:null}function d(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function m(e){if(c(e)!==e)throw Error(r(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var a=e,l=n;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(l=u.return,l!==null){a=l;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return m(u),e;if(f===l)return m(u),n;f=f.sibling}throw Error(r(188))}if(a.return!==l.return)a=u,l=f;else{for(var y=!1,_=u.child;_;){if(_===a){y=!0,a=u,l=f;break}if(_===l){y=!0,l=u,a=f;break}_=_.sibling}if(!y){for(_=f.child;_;){if(_===a){y=!0,a=f,l=u;break}if(_===l){y=!0,l=f,a=u;break}_=_.sibling}if(!y)throw Error(r(189))}}if(a.alternate!==l)throw Error(r(190))}if(a.tag!==3)throw Error(r(188));return a.stateNode.current===a?e:n}function 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"),E=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),U=Symbol.for("react.consumer"),H=Symbol.for("react.context"),V=Symbol.for("react.forward_ref"),J=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),te=Symbol.for("react.memo_cache_sentinel"),le=Symbol.iterator;function se(e){return e===null||typeof e!="object"?null:(e=le&&e[le]||e["@@iterator"],typeof e=="function"?e:null)}var he=Symbol.for("react.client.reference");function ge(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===he?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case A:return"Profiler";case z:return"StrictMode";case J:return"Suspense";case L:return"SuspenseList";case P:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case H:return e.displayName||"Context";case U: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 R:return n=e.displayName||null,n!==null?n:ge(e.type)||"Memo";case X:n=e._payload,e=e._init;try{return ge(e(n))}catch{}}return null}var Y=Array.isArray,M=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B={pending:!1,data:null,method:null,action:null},ie=[],fe=-1;function j(e){return{current:e}}function q(e){0>fe||(e.current=ie[fe],ie[fe]=null,fe--)}function ee(e,n){fe++,ie[fe]=e.current,e.current=n}var ne=j(null),me=j(null),xe=j(null),je=j(null);function Ze(e,n){switch(ee(xe,n),ee(me,e),ee(ne,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?ig(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=ig(n),e=ag(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(ne),ee(ne,e)}function $e(){q(ne),q(me),q(xe)}function cn(e){e.memoizedState!==null&&ee(je,e);var n=ne.current,a=ag(n,e.type);n!==a&&(ee(me,e),ee(ne,a))}function Ai(e){me.current===e&&(q(ne),q(me)),je.current===e&&(q(je),er._currentValue=B)}var Bo,Md;function Ri(e){if(Bo===void 0)try{throw Error()}catch(a){var n=a.stack.trim().match(/\n( *(at )?)/);Bo=n&&n[1]||"",Md=-1<a.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Bo+e+Md}var $o=!1;function Ho(e,n){if(!e||$o)return"";$o=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(n){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(Z){var k=Z}Reflect.construct(e,[],K)}else{try{K.call()}catch(Z){k=Z}e.call(K.prototype)}}else{try{throw Error()}catch(Z){k=Z}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(Z){if(Z&&k&&typeof Z.stack=="string")return[Z.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 $=`
|
|
6
|
-
`+O[l].replace(" at new "," at ");return e.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",e.displayName)),$}while(1<=l&&0<=u);break}}}finally{$o=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ri(a):""}function A0(e,n){switch(e.tag){case 26:case 27:case 5:return Ri(e.type);case 16:return Ri("Lazy");case 13:return e.child!==n&&n!==null?Ri("Suspense Fallback"):Ri("Suspense");case 19:return Ri("SuspenseList");case 0:case 15:return Ho(e.type,!1);case 11:return Ho(e.type.render,!1);case 1:return Ho(e.type,!0);case 31:return Ri("Activity");default:return""}}function Dd(e){try{var n="",a=null;do n+=A0(e,a),a=e,e=e.return;while(e);return n}catch(l){return`
|
|
7
|
-
Error generating stack: `+l.message+`
|
|
8
|
-
`+l.stack}}var Qo=Object.prototype.hasOwnProperty,Go=t.unstable_scheduleCallback,Ko=t.unstable_cancelCallback,R0=t.unstable_shouldYield,C0=t.unstable_requestPaint,Ct=t.unstable_now,M0=t.unstable_getCurrentPriorityLevel,kd=t.unstable_ImmediatePriority,Ud=t.unstable_UserBlockingPriority,zr=t.unstable_NormalPriority,D0=t.unstable_LowPriority,Ld=t.unstable_IdlePriority,k0=t.log,U0=t.unstable_setDisableYieldValue,ds=null,Mt=null;function Kn(e){if(typeof k0=="function"&&U0(e),Mt&&typeof Mt.setStrictMode=="function")try{Mt.setStrictMode(ds,e)}catch{}}var Dt=Math.clz32?Math.clz32:q0,L0=Math.log,Z0=Math.LN2;function q0(e){return e>>>=0,e===0?32:31-(L0(e)/Z0|0)|0}var Tr=256,Nr=262144,Ar=4194304;function Ci(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 Rr(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=Ci(l):(y&=_,y!==0?u=Ci(y):a||(a=_&~e,a!==0&&(u=Ci(a))))):(_=l&~f,_!==0?u=Ci(_):y!==0?u=Ci(y):a||(a=l&~e,a!==0&&(u=Ci(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 hs(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function B0(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 Zd(){var e=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),e}function Yo(e){for(var n=[],a=0;31>a;a++)n.push(e);return n}function ms(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function $0(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 $=31-Dt(a),K=1<<$;_[$]=0,O[$]=-1;var k=D[$];if(k!==null)for(D[$]=null,$=0;$<k.length;$++){var Z=k[$];Z!==null&&(Z.lane&=-536870913)}a&=~K}l!==0&&qd(e,l,0),f!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=f&~(y&~n))}function qd(e,n,a){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-Dt(n);e.entangledLanes|=n,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function Bd(e,n){var a=e.entangledLanes|=n;for(e=e.entanglements;a;){var l=31-Dt(a),u=1<<l;u&n|e[l]&n&&(e[l]|=n),a&=~u}}function $d(e,n){var a=n&-n;return a=(a&42)!==0?1:Fo(a),(a&(e.suspendedLanes|n))!==0?0:a}function Fo(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 Vo(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hd(){var e=I.p;return e!==0?e:(e=window.event,e===void 0?32:zg(e.type))}function Qd(e,n){var a=I.p;try{return I.p=e,n()}finally{I.p=a}}var Yn=Math.random().toString(36).slice(2),ct="__reactFiber$"+Yn,_t="__reactProps$"+Yn,oa="__reactContainer$"+Yn,Po="__reactEvents$"+Yn,H0="__reactListeners$"+Yn,Q0="__reactHandles$"+Yn,Gd="__reactResources$"+Yn,ps="__reactMarker$"+Yn;function Xo(e){delete e[ct],delete e[_t],delete e[Po],delete e[H0],delete e[Q0]}function ua(e){var n=e[ct];if(n)return n;for(var a=e.parentNode;a;){if(n=a[oa]||a[ct]){if(a=n.alternate,n.child!==null||a!==null&&a.child!==null)for(e=fg(e);e!==null;){if(a=e[ct])return a;e=fg(e)}return n}e=a,a=e.parentNode}return null}function ca(e){if(e=e[ct]||e[oa]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function gs(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function fa(e){var n=e[Gd];return n||(n=e[Gd]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function lt(e){e[ps]=!0}var Kd=new Set,Yd={};function Mi(e,n){da(e,n),da(e+"Capture",n)}function da(e,n){for(Yd[e]=n,e=0;e<n.length;e++)Kd.add(n[e])}var G0=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]*$"),Fd={},Vd={};function K0(e){return Qo.call(Vd,e)?!0:Qo.call(Fd,e)?!1:G0.test(e)?Vd[e]=!0:(Fd[e]=!0,!1)}function Cr(e,n,a){if(K0(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 xn(e,n,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(n,a,""+l)}}function Gt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Y0(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 Jo(e){if(!e._valueTracker){var n=Pd(e)?"checked":"value";e._valueTracker=Y0(e,n,""+e[n])}}function Xd(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var a=n.getValue(),l="";return e&&(l=Pd(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 F0=/[\n"\\]/g;function Kt(e){return e.replace(F0,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Io(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=""+Gt(n)):e.value!==""+Gt(n)&&(e.value=""+Gt(n)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),n!=null?Wo(e,y,Gt(n)):a!=null?Wo(e,y,Gt(a)):l!=null&&e.removeAttribute("value"),u==null&&f!=null&&(e.defaultChecked=!!f),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+Gt(_):e.removeAttribute("name")}function Jd(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)){Jo(e);return}a=a!=null?""+Gt(a):"",n=n!=null?""+Gt(n):a,_||n===e.value||(e.value=n),e.defaultValue=n}l=l??u,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=_?e.checked:!!l,e.defaultChecked=!!l,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Jo(e)}function Wo(e,n,a){n==="number"&&Dr(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function ha(e,n,a,l){if(e=e.options,n){n={};for(var u=0;u<a.length;u++)n["$"+a[u]]=!0;for(a=0;a<e.length;a++)u=n.hasOwnProperty("$"+e[a].value),e[a].selected!==u&&(e[a].selected=u),u&&l&&(e[a].defaultSelected=!0)}else{for(a=""+Gt(a),n=null,u=0;u<e.length;u++){if(e[u].value===a){e[u].selected=!0,l&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Id(e,n,a){if(n!=null&&(n=""+Gt(n),n!==e.value&&(e.value=n),a==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=a!=null?""+Gt(a):""}function Wd(e,n,a,l){if(n==null){if(l!=null){if(a!=null)throw Error(r(92));if(Y(l)){if(1<l.length)throw Error(r(93));l=l[0]}a=l}a==null&&(a=""),n=a}a=Gt(n),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),Jo(e)}function ma(e,n){if(n){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=n;return}}e.textContent=n}var V0=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 eh(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||V0.has(n)?n==="float"?e.cssFloat=a:e[n]=(""+a).trim():e[n]=a+"px"}function th(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&&eh(e,u,l)}else for(var f in n)n.hasOwnProperty(f)&&eh(e,f,n[f])}function eu(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 P0=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"]]),X0=/^[\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 X0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Sn(){}var tu=null;function nu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pa=null,ga=null;function nh(e){var n=ca(e);if(n&&(e=n.stateNode)){var a=e[_t]||null;e:switch(e=n.stateNode,n.type){case"input":if(Io(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),n=a.name,a.type==="radio"&&n!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Kt(""+n)+'"][type="radio"]'),n=0;n<a.length;n++){var l=a[n];if(l!==e&&l.form===e.form){var u=l[_t]||null;if(!u)throw Error(r(90));Io(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&&Xd(l)}break e;case"textarea":Id(e,a.value,a.defaultValue);break e;case"select":n=a.value,n!=null&&ha(e,!!a.multiple,n,!1)}}}var iu=!1;function ih(e,n,a){if(iu)return e(n,a);iu=!0;try{var l=e(n);return l}finally{if(iu=!1,(pa!==null||ga!==null)&&(_l(),pa&&(n=pa,e=ga,ga=pa=null,nh(n),e)))for(n=0;n<e.length;n++)nh(e[n])}}function ys(e,n){var a=e.stateNode;if(a===null)return null;var l=a[_t]||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 _n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),au=!1;if(_n)try{var vs={};Object.defineProperty(vs,"passive",{get:function(){au=!0}}),window.addEventListener("test",vs,vs),window.removeEventListener("test",vs,vs)}catch{au=!1}var Fn=null,su=null,Ur=null;function ah(){if(Ur)return Ur;var e,n=su,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 Ur=u.slice(e,1<l?1-l:void 0)}function Lr(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 sh(){return!1}function wt(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:sh,this.isPropagationStopped=sh,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 Di={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qr=wt(Di),bs=v({},Di,{view:0,detail:0}),J0=wt(bs),ru,lu,xs,Br=v({},bs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:uu,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!==xs&&(xs&&e.type==="mousemove"?(ru=e.screenX-xs.screenX,lu=e.screenY-xs.screenY):lu=ru=0,xs=e),ru)},movementY:function(e){return"movementY"in e?e.movementY:lu}}),rh=wt(Br),I0=v({},Br,{dataTransfer:0}),W0=wt(I0),ex=v({},bs,{relatedTarget:0}),ou=wt(ex),tx=v({},Di,{animationName:0,elapsedTime:0,pseudoElement:0}),nx=wt(tx),ix=v({},Di,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ax=wt(ix),sx=v({},Di,{data:0}),lh=wt(sx),rx={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},lx={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"},ox={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ux(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=ox[e])?!!n[e]:!1}function uu(){return ux}var cx=v({},bs,{key:function(e){if(e.key){var n=rx[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=Lr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?lx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:uu,charCode:function(e){return e.type==="keypress"?Lr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Lr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fx=wt(cx),dx=v({},Br,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),oh=wt(dx),hx=v({},bs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:uu}),mx=wt(hx),px=v({},Di,{propertyName:0,elapsedTime:0,pseudoElement:0}),gx=wt(px),yx=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}),vx=wt(yx),bx=v({},Di,{newState:0,oldState:0}),xx=wt(bx),Sx=[9,13,27,32],cu=_n&&"CompositionEvent"in window,Ss=null;_n&&"documentMode"in document&&(Ss=document.documentMode);var _x=_n&&"TextEvent"in window&&!Ss,uh=_n&&(!cu||Ss&&8<Ss&&11>=Ss),ch=" ",fh=!1;function dh(e,n){switch(e){case"keyup":return Sx.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ya=!1;function wx(e,n){switch(e){case"compositionend":return hh(n);case"keypress":return n.which!==32?null:(fh=!0,ch);case"textInput":return e=n.data,e===ch&&fh?null:e;default:return null}}function Ex(e,n){if(ya)return e==="compositionend"||!cu&&dh(e,n)?(e=ah(),Ur=su=Fn=null,ya=!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 uh&&n.locale!=="ko"?null:n.data;default:return null}}var Ox={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 mh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Ox[e.type]:n==="textarea"}function ph(e,n,a,l){pa?ga?ga.push(l):ga=[l]:pa=l,n=Nl(n,"onChange"),0<n.length&&(a=new qr("onChange","change",null,a,l),e.push({event:a,listeners:n}))}var _s=null,ws=null;function jx(e){Jp(e,0)}function $r(e){var n=gs(e);if(Xd(n))return e}function gh(e,n){if(e==="change")return n}var yh=!1;if(_n){var fu;if(_n){var du="oninput"in document;if(!du){var vh=document.createElement("div");vh.setAttribute("oninput","return;"),du=typeof vh.oninput=="function"}fu=du}else fu=!1;yh=fu&&(!document.documentMode||9<document.documentMode)}function bh(){_s&&(_s.detachEvent("onpropertychange",xh),ws=_s=null)}function xh(e){if(e.propertyName==="value"&&$r(ws)){var n=[];ph(n,ws,e,nu(e)),ih(jx,n)}}function zx(e,n,a){e==="focusin"?(bh(),_s=n,ws=a,_s.attachEvent("onpropertychange",xh)):e==="focusout"&&bh()}function Tx(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return $r(ws)}function Nx(e,n){if(e==="click")return $r(n)}function Ax(e,n){if(e==="input"||e==="change")return $r(n)}function Rx(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var kt=typeof Object.is=="function"?Object.is:Rx;function Es(e,n){if(kt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var a=Object.keys(e),l=Object.keys(n);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var u=a[l];if(!Qo.call(n,u)||!kt(e[u],n[u]))return!1}return!0}function Sh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _h(e,n){var a=Sh(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=Sh(a)}}function wh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?wh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Eh(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 hu(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 Cx=_n&&"documentMode"in document&&11>=document.documentMode,va=null,mu=null,Os=null,pu=!1;function Oh(e,n,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;pu||va==null||va!==Dr(l)||(l=va,"selectionStart"in l&&hu(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}),Os&&Es(Os,l)||(Os=l,l=Nl(mu,"onSelect"),0<l.length&&(n=new qr("onSelect","select",null,n,a),e.push({event:n,listeners:l}),n.target=va)))}function ki(e,n){var a={};return a[e.toLowerCase()]=n.toLowerCase(),a["Webkit"+e]="webkit"+n,a["Moz"+e]="moz"+n,a}var ba={animationend:ki("Animation","AnimationEnd"),animationiteration:ki("Animation","AnimationIteration"),animationstart:ki("Animation","AnimationStart"),transitionrun:ki("Transition","TransitionRun"),transitionstart:ki("Transition","TransitionStart"),transitioncancel:ki("Transition","TransitionCancel"),transitionend:ki("Transition","TransitionEnd")},gu={},jh={};_n&&(jh=document.createElement("div").style,"AnimationEvent"in window||(delete ba.animationend.animation,delete ba.animationiteration.animation,delete ba.animationstart.animation),"TransitionEvent"in window||delete ba.transitionend.transition);function Ui(e){if(gu[e])return gu[e];if(!ba[e])return e;var n=ba[e],a;for(a in n)if(n.hasOwnProperty(a)&&a in jh)return gu[e]=n[a];return e}var zh=Ui("animationend"),Th=Ui("animationiteration"),Nh=Ui("animationstart"),Mx=Ui("transitionrun"),Dx=Ui("transitionstart"),kx=Ui("transitioncancel"),Ah=Ui("transitionend"),Rh=new Map,yu="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(" ");yu.push("scrollEnd");function nn(e,n){Rh.set(e,n),Mi(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)},Yt=[],xa=0,vu=0;function Qr(){for(var e=xa,n=vu=xa=0;n<e;){var a=Yt[n];Yt[n++]=null;var l=Yt[n];Yt[n++]=null;var u=Yt[n];Yt[n++]=null;var f=Yt[n];if(Yt[n++]=null,l!==null&&u!==null){var y=l.pending;y===null?u.next=u:(u.next=y.next,y.next=u),l.pending=u}f!==0&&Ch(a,u,f)}}function Gr(e,n,a,l){Yt[xa++]=e,Yt[xa++]=n,Yt[xa++]=a,Yt[xa++]=l,vu|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function bu(e,n,a,l){return Gr(e,n,a,l),Kr(e)}function Li(e,n){return Gr(e,null,null,n),Kr(e)}function Ch(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-Dt(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<Fs)throw Fs=0,Tc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Sa={};function Ux(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 Ux(e,n,a,l)}function xu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wn(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 Mh(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")xu(e)&&(y=1);else if(typeof e=="string")y=$S(e,a,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case P:return e=Ut(31,a,n,u),e.elementType=P,e.lanes=f,e;case E:return Zi(a.children,u,f,n);case z:y=8,u|=24;break;case A:return e=Ut(12,a,n,u|2),e.elementType=A,e.lanes=f,e;case J:return e=Ut(13,a,n,u),e.elementType=J,e.lanes=f,e;case L:return e=Ut(19,a,n,u),e.elementType=L,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:y=10;break e;case U:y=9;break e;case V:y=11;break e;case R:y=14;break e;case X: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 Zi(e,n,a,l){return e=Ut(7,e,l,n),e.lanes=a,e}function Su(e,n,a){return e=Ut(6,e,null,n),e.lanes=a,e}function Dh(e){var n=Ut(18,null,null,0);return n.stateNode=e,n}function _u(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 kh=new WeakMap;function Ft(e,n){if(typeof e=="object"&&e!==null){var a=kh.get(e);return a!==void 0?a:(n={value:e,source:n,stack:Dd(n)},kh.set(e,n),n)}return{value:e,source:n,stack:Dd(n)}}var _a=[],wa=0,Fr=null,js=0,Vt=[],Pt=0,Vn=null,fn=1,dn="";function En(e,n){_a[wa++]=js,_a[wa++]=Fr,Fr=e,js=n}function Uh(e,n,a){Vt[Pt++]=fn,Vt[Pt++]=dn,Vt[Pt++]=Vn,Vn=e;var l=fn;e=dn;var u=32-Dt(l)-1;l&=~(1<<u),a+=1;var f=32-Dt(n)+u;if(30<f){var y=u-u%5;f=(l&(1<<y)-1).toString(32),l>>=y,u-=y,fn=1<<32-Dt(n)+u|a<<u|l,dn=f+e}else fn=1<<f|a<<u|l,dn=e}function wu(e){e.return!==null&&(En(e,1),Uh(e,1,0))}function Eu(e){for(;e===Fr;)Fr=_a[--wa],_a[wa]=null,js=_a[--wa],_a[wa]=null;for(;e===Vn;)Vn=Vt[--Pt],Vt[Pt]=null,dn=Vt[--Pt],Vt[Pt]=null,fn=Vt[--Pt],Vt[Pt]=null}function Lh(e,n){Vt[Pt++]=fn,Vt[Pt++]=dn,Vt[Pt++]=Vn,fn=n.id,dn=n.overflow,Vn=e}var ft=null,qe=null,Oe=!1,Pn=null,Xt=!1,Ou=Error(r(519));function Xn(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zs(Ft(n,e)),Ou}function Zh(e){var n=e.stateNode,a=e.type,l=e.memoizedProps;switch(n[ct]=e,n[_t]=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<Ps.length;a++)_e(Ps[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),Jd(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),Wd(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||tg(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=Sn),n=!0):n=!1,n||Xn(e,!0)}function qh(e){for(ft=e.return;ft;)switch(ft.tag){case 5:case 31:case 13:Xt=!1;return;case 27:case 3:Xt=!0;return;default:ft=ft.return}}function Ea(e){if(e!==ft)return!1;if(!Oe)return qh(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")||Qc(e.type,e.memoizedProps)),a=!a),a&&qe&&Xn(e),qh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));qe=cg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));qe=cg(e)}else n===27?(n=qe,ci(e.type)?(e=Vc,Vc=null,qe=e):qe=n):qe=ft?It(e.stateNode.nextSibling):null;return!0}function qi(){qe=ft=null,Oe=!1}function ju(){var e=Pn;return e!==null&&(zt===null?zt=e:zt.push.apply(zt,e),Pn=null),e}function zs(e){Pn===null?Pn=[e]:Pn.push(e)}var zu=j(null),Bi=null,On=null;function Jn(e,n,a){ee(zu,n._currentValue),n._currentValue=a}function jn(e){e._currentValue=zu.current,q(zu)}function Tu(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 Nu(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),Tu(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),Tu(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 Oa(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;kt(u.pendingProps.value,y.value)||(e!==null?e.push(_):e=[_])}}else if(u===je.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&&Nu(n,e,a,l),n.flags|=262144}function Vr(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $i(e){Bi=e,On=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function dt(e){return Bh(Bi,e)}function Pr(e,n){return Bi===null&&$i(e),Bh(e,n)}function Bh(e,n){var a=n._currentValue;if(n={context:n,memoizedValue:a,next:null},On===null){if(e===null)throw Error(r(308));On=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else On=On.next=n;return a}var Lx=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()})}},Zx=t.unstable_scheduleCallback,qx=t.unstable_NormalPriority,Ie={$$typeof:H,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Au(){return{controller:new Lx,data:new Map,refCount:0}}function Ts(e){e.refCount--,e.refCount===0&&Zx(qx,function(){e.controller.abort()})}var Ns=null,Ru=0,ja=0,za=null;function Bx(e,n){if(Ns===null){var a=Ns=[];Ru=0,ja=Dc(),za={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Ru++,n.then($h,$h),n}function $h(){if(--Ru===0&&Ns!==null){za!==null&&(za.status="fulfilled");var e=Ns;Ns=null,ja=0,za=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function $x(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 Hh=M.S;M.S=function(e,n){Op=Ct(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&Bx(e,n),Hh!==null&&Hh(e,n)};var Hi=j(null);function Cu(){var e=Hi.current;return e!==null?e:Le.pooledCache}function Xr(e,n){n===null?ee(Hi,Hi.current):ee(Hi,n.pool)}function Qh(){var e=Cu();return e===null?null:{parent:Ie._currentValue,pool:e}}var Ta=Error(r(460)),Mu=Error(r(474)),Jr=Error(r(542)),Ir={then:function(){}};function Gh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kh(e,n,a){switch(a=e[a],a===void 0?e.push(n):a!==n&&(n.then(Sn,Sn),n=a),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Fh(e),e;default:if(typeof n.status=="string")n.then(Sn,Sn);else{if(e=Le,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,Fh(e),e}throw Gi=n,Ta}}function Qi(e){try{var n=e._init;return n(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Gi=a,Ta):a}}var Gi=null;function Yh(){if(Gi===null)throw Error(r(459));var e=Gi;return Gi=null,e}function Fh(e){if(e===Ta||e===Jr)throw Error(r(483))}var Na=null,As=0;function Wr(e){var n=As;return As+=1,Na===null&&(Na=[]),Kh(Na,e,n)}function Rs(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 Vh(e){function n(N,T){if(e){var C=N.deletions;C===null?(N.deletions=[T],N.flags|=16):C.push(T)}}function a(N,T){if(!e)return null;for(;T!==null;)n(N,T),T=T.sibling;return null}function l(N){for(var T=new Map;N!==null;)N.key!==null?T.set(N.key,N):T.set(N.index,N),N=N.sibling;return T}function u(N,T){return N=wn(N,T),N.index=0,N.sibling=null,N}function f(N,T,C){return N.index=C,e?(C=N.alternate,C!==null?(C=C.index,C<T?(N.flags|=67108866,T):C):(N.flags|=67108866,T)):(N.flags|=1048576,T)}function y(N){return e&&N.alternate===null&&(N.flags|=67108866),N}function _(N,T,C,Q){return T===null||T.tag!==6?(T=Su(C,N.mode,Q),T.return=N,T):(T=u(T,C),T.return=N,T)}function O(N,T,C,Q){var ce=C.type;return ce===E?$(N,T,C.props.children,Q,C.key):T!==null&&(T.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===X&&Qi(ce)===T.type)?(T=u(T,C.props),Rs(T,C),T.return=N,T):(T=Yr(C.type,C.key,C.props,null,N.mode,Q),Rs(T,C),T.return=N,T)}function D(N,T,C,Q){return T===null||T.tag!==4||T.stateNode.containerInfo!==C.containerInfo||T.stateNode.implementation!==C.implementation?(T=_u(C,N.mode,Q),T.return=N,T):(T=u(T,C.children||[]),T.return=N,T)}function $(N,T,C,Q,ce){return T===null||T.tag!==7?(T=Zi(C,N.mode,Q,ce),T.return=N,T):(T=u(T,C),T.return=N,T)}function K(N,T,C){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=Su(""+T,N.mode,C),T.return=N,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case S:return C=Yr(T.type,T.key,T.props,null,N.mode,C),Rs(C,T),C.return=N,C;case w:return T=_u(T,N.mode,C),T.return=N,T;case X:return T=Qi(T),K(N,T,C)}if(Y(T)||se(T))return T=Zi(T,N.mode,C,null),T.return=N,T;if(typeof T.then=="function")return K(N,Wr(T),C);if(T.$$typeof===H)return K(N,Pr(N,T),C);el(N,T)}return null}function k(N,T,C,Q){var ce=T!==null?T.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return ce!==null?null:_(N,T,""+C,Q);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case S:return C.key===ce?O(N,T,C,Q):null;case w:return C.key===ce?D(N,T,C,Q):null;case X:return C=Qi(C),k(N,T,C,Q)}if(Y(C)||se(C))return ce!==null?null:$(N,T,C,Q,null);if(typeof C.then=="function")return k(N,T,Wr(C),Q);if(C.$$typeof===H)return k(N,T,Pr(N,C),Q);el(N,C)}return null}function Z(N,T,C,Q,ce){if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return N=N.get(C)||null,_(T,N,""+Q,ce);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case S:return N=N.get(Q.key===null?C:Q.key)||null,O(T,N,Q,ce);case w:return N=N.get(Q.key===null?C:Q.key)||null,D(T,N,Q,ce);case X:return Q=Qi(Q),Z(N,T,C,Q,ce)}if(Y(Q)||se(Q))return N=N.get(C)||null,$(T,N,Q,ce,null);if(typeof Q.then=="function")return Z(N,T,C,Wr(Q),ce);if(Q.$$typeof===H)return Z(N,T,C,Pr(T,Q),ce);el(T,Q)}return null}function ae(N,T,C,Q){for(var ce=null,ze=null,oe=T,ve=T=0,Ee=null;oe!==null&&ve<C.length;ve++){oe.index>ve?(Ee=oe,oe=null):Ee=oe.sibling;var Te=k(N,oe,C[ve],Q);if(Te===null){oe===null&&(oe=Ee);break}e&&oe&&Te.alternate===null&&n(N,oe),T=f(Te,T,ve),ze===null?ce=Te:ze.sibling=Te,ze=Te,oe=Ee}if(ve===C.length)return a(N,oe),Oe&&En(N,ve),ce;if(oe===null){for(;ve<C.length;ve++)oe=K(N,C[ve],Q),oe!==null&&(T=f(oe,T,ve),ze===null?ce=oe:ze.sibling=oe,ze=oe);return Oe&&En(N,ve),ce}for(oe=l(oe);ve<C.length;ve++)Ee=Z(oe,N,ve,C[ve],Q),Ee!==null&&(e&&Ee.alternate!==null&&oe.delete(Ee.key===null?ve:Ee.key),T=f(Ee,T,ve),ze===null?ce=Ee:ze.sibling=Ee,ze=Ee);return e&&oe.forEach(function(pi){return n(N,pi)}),Oe&&En(N,ve),ce}function de(N,T,C,Q){if(C==null)throw Error(r(151));for(var ce=null,ze=null,oe=T,ve=T=0,Ee=null,Te=C.next();oe!==null&&!Te.done;ve++,Te=C.next()){oe.index>ve?(Ee=oe,oe=null):Ee=oe.sibling;var pi=k(N,oe,Te.value,Q);if(pi===null){oe===null&&(oe=Ee);break}e&&oe&&pi.alternate===null&&n(N,oe),T=f(pi,T,ve),ze===null?ce=pi:ze.sibling=pi,ze=pi,oe=Ee}if(Te.done)return a(N,oe),Oe&&En(N,ve),ce;if(oe===null){for(;!Te.done;ve++,Te=C.next())Te=K(N,Te.value,Q),Te!==null&&(T=f(Te,T,ve),ze===null?ce=Te:ze.sibling=Te,ze=Te);return Oe&&En(N,ve),ce}for(oe=l(oe);!Te.done;ve++,Te=C.next())Te=Z(oe,N,ve,Te.value,Q),Te!==null&&(e&&Te.alternate!==null&&oe.delete(Te.key===null?ve:Te.key),T=f(Te,T,ve),ze===null?ce=Te:ze.sibling=Te,ze=Te);return e&&oe.forEach(function(IS){return n(N,IS)}),Oe&&En(N,ve),ce}function Ue(N,T,C,Q){if(typeof C=="object"&&C!==null&&C.type===E&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case S:e:{for(var ce=C.key;T!==null;){if(T.key===ce){if(ce=C.type,ce===E){if(T.tag===7){a(N,T.sibling),Q=u(T,C.props.children),Q.return=N,N=Q;break e}}else if(T.elementType===ce||typeof ce=="object"&&ce!==null&&ce.$$typeof===X&&Qi(ce)===T.type){a(N,T.sibling),Q=u(T,C.props),Rs(Q,C),Q.return=N,N=Q;break e}a(N,T);break}else n(N,T);T=T.sibling}C.type===E?(Q=Zi(C.props.children,N.mode,Q,C.key),Q.return=N,N=Q):(Q=Yr(C.type,C.key,C.props,null,N.mode,Q),Rs(Q,C),Q.return=N,N=Q)}return y(N);case w:e:{for(ce=C.key;T!==null;){if(T.key===ce)if(T.tag===4&&T.stateNode.containerInfo===C.containerInfo&&T.stateNode.implementation===C.implementation){a(N,T.sibling),Q=u(T,C.children||[]),Q.return=N,N=Q;break e}else{a(N,T);break}else n(N,T);T=T.sibling}Q=_u(C,N.mode,Q),Q.return=N,N=Q}return y(N);case X:return C=Qi(C),Ue(N,T,C,Q)}if(Y(C))return ae(N,T,C,Q);if(se(C)){if(ce=se(C),typeof ce!="function")throw Error(r(150));return C=ce.call(C),de(N,T,C,Q)}if(typeof C.then=="function")return Ue(N,T,Wr(C),Q);if(C.$$typeof===H)return Ue(N,T,Pr(N,C),Q);el(N,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,T!==null&&T.tag===6?(a(N,T.sibling),Q=u(T,C),Q.return=N,N=Q):(a(N,T),Q=Su(C,N.mode,Q),Q.return=N,N=Q),y(N)):a(N,T)}return function(N,T,C,Q){try{As=0;var ce=Ue(N,T,C,Q);return Na=null,ce}catch(oe){if(oe===Ta||oe===Jr)throw oe;var ze=Ut(29,oe,null,N.mode);return ze.lanes=Q,ze.return=N,ze}}}var Ki=Vh(!0),Ph=Vh(!1),In=!1;function Du(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ku(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 ei(e,n,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ne&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),Ch(e,null,a),n}return Gr(e,l,n,a),Kr(e)}function Cs(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,Bd(e,a)}}function Uu(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 Lu=!1;function Ms(){if(Lu){var e=za;if(e!==null)throw e}}function Ds(e,n,a,l){Lu=!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 $=e.alternate;$!==null&&($=$.updateQueue,_=$.lastBaseUpdate,_!==y&&(_===null?$.firstBaseUpdate=D:_.next=D,$.lastBaseUpdate=O))}if(f!==null){var K=u.baseState;y=0,$=D=O=null,_=f;do{var k=_.lane&-536870913,Z=k!==_.lane;if(Z?(we&k)===k:(l&k)===k){k!==0&&k===ja&&(Lu=!0),$!==null&&($=$.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var ae=e,de=_;k=n;var Ue=a;switch(de.tag){case 1:if(ae=de.payload,typeof ae=="function"){K=ae.call(Ue,K,k);break e}K=ae;break e;case 3:ae.flags=ae.flags&-65537|128;case 0:if(ae=de.payload,k=typeof ae=="function"?ae.call(Ue,K,k):ae,k==null)break e;K=v({},K,k);break e;case 2:In=!0}}k=_.callback,k!==null&&(e.flags|=64,Z&&(e.flags|=8192),Z=u.callbacks,Z===null?u.callbacks=[k]:Z.push(k))}else Z={lane:k,tag:_.tag,payload:_.payload,callback:_.callback,next:null},$===null?(D=$=Z,O=K):$=$.next=Z,y|=k;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;Z=_,_=Z.next,Z.next=null,u.lastBaseUpdate=Z,u.shared.pending=null}}while(!0);$===null&&(O=K),u.baseState=O,u.firstBaseUpdate=D,u.lastBaseUpdate=$,f===null&&(u.shared.lanes=0),si|=y,e.lanes=y,e.memoizedState=K}}function Xh(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function Jh(e,n){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Xh(a[e],n)}var Aa=j(null),tl=j(0);function Ih(e,n){e=kn,ee(tl,e),ee(Aa,n),kn=e|n.baseLanes}function Zu(){ee(tl,kn),ee(Aa,Aa.current)}function qu(){kn=tl.current,q(Aa),q(tl)}var Lt=j(null),Jt=null;function ti(e){var n=e.alternate;ee(Xe,Xe.current&1),ee(Lt,e),Jt===null&&(n===null||Aa.current!==null||n.memoizedState!==null)&&(Jt=e)}function Bu(e){ee(Xe,Xe.current),ee(Lt,e),Jt===null&&(Jt=e)}function Wh(e){e.tag===22?(ee(Xe,Xe.current),ee(Lt,e),Jt===null&&(Jt=e)):ni()}function ni(){ee(Xe,Xe.current),ee(Lt,Lt.current)}function Zt(e){q(Lt),Jt===e&&(Jt=null),q(Xe)}var Xe=j(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||Yc(a)||Fc(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,ye=null,De=null,We=null,il=!1,Ra=!1,Yi=!1,al=0,ks=0,Ca=null,Hx=0;function Ve(){throw Error(r(321))}function $u(e,n){if(n===null)return!1;for(var a=0;a<n.length&&a<e.length;a++)if(!kt(e[a],n[a]))return!1;return!0}function Hu(e,n,a,l,u,f){return zn=f,ye=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,M.H=e===null||e.memoizedState===null?Um:ic,Yi=!1,f=a(l,u),Yi=!1,Ra&&(f=tm(n,a,l,u)),em(e),f}function em(e){M.H=Zs;var n=De!==null&&De.next!==null;if(zn=0,We=De=ye=null,il=!1,ks=0,Ca=null,n)throw Error(r(300));e===null||et||(e=e.dependencies,e!==null&&Vr(e)&&(et=!0))}function tm(e,n,a,l){ye=e;var u=0;do{if(Ra&&(Ca=null),ks=0,Ra=!1,25<=u)throw Error(r(301));if(u+=1,We=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)}M.H=Lm,f=n(a,l)}while(Ra);return f}function Qx(){var e=M.H,n=e.useState()[0];return n=typeof n.then=="function"?Us(n):n,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(ye.flags|=1024),n}function Qu(){var e=al!==0;return al=0,e}function Gu(e,n,a){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~a}function Ku(e){if(il){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}il=!1}zn=0,We=De=ye=null,Ra=!1,ks=al=0,Ca=null}function vt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return We===null?ye.memoizedState=We=e:We=We.next=e,We}function Je(){if(De===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var n=We===null?ye.memoizedState:We.next;if(n!==null)We=n,De=e;else{if(e===null)throw ye.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},We===null?ye.memoizedState=We=e:We=We.next=e}return We}function sl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Us(e){var n=ks;return ks+=1,Ca===null&&(Ca=[]),e=Kh(Ca,e,n),n=ye,(We===null?n.memoizedState:We.next)===null&&(n=n.alternate,M.H=n===null||n.memoizedState===null?Um:ic),e}function rl(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Us(e);if(e.$$typeof===H)return dt(e)}throw Error(r(438,String(e)))}function Yu(e){var n=null,a=ye.updateQueue;if(a!==null&&(n=a.memoCache),n==null){var l=ye.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=sl(),ye.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]=te;return n.index++,a}function Tn(e,n){return typeof n=="function"?n(e):n}function ll(e){var n=Je();return Fu(n,De,e)}function Fu(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,$=!1;do{var K=D.lane&-536870913;if(K!==D.lane?(we&K)===K:(zn&K)===K){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}),K===ja&&($=!0);else if((zn&k)===k){D=D.next,k===ja&&($=!0);continue}else K={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},O===null?(_=O=K,y=f):O=O.next=K,ye.lanes|=k,si|=k;K=D.action,Yi&&a(f,K),f=D.hasEagerState?D.eagerState:a(f,K)}else k={lane:K,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,ye.lanes|=K,si|=K;D=D.next}while(D!==null&&D!==n);if(O===null?y=f:O.next=_,!kt(f,e.memoizedState)&&(et=!0,$&&(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 Vu(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);kt(f,n.memoizedState)||(et=!0),n.memoizedState=f,n.baseQueue===null&&(n.baseState=f),a.lastRenderedState=f}return[f,l]}function nm(e,n,a){var l=ye,u=Je(),f=Oe;if(f){if(a===void 0)throw Error(r(407));a=a()}else a=n();var y=!kt((De||u).memoizedState,a);if(y&&(u.memoizedState=a,et=!0),u=u.queue,Ju(sm.bind(null,l,u,e),[e]),u.getSnapshot!==n||y||We!==null&&We.memoizedState.tag&1){if(l.flags|=2048,Ma(9,{destroy:void 0},am.bind(null,l,u,a,n),null),Le===null)throw Error(r(349));f||(zn&127)!==0||im(l,n,a)}return a}function im(e,n,a){e.flags|=16384,e={getSnapshot:n,value:a},n=ye.updateQueue,n===null?(n=sl(),ye.updateQueue=n,n.stores=[e]):(a=n.stores,a===null?n.stores=[e]:a.push(e))}function am(e,n,a,l){n.value=a,n.getSnapshot=l,rm(n)&&lm(e)}function sm(e,n,a){return a(function(){rm(n)&&lm(e)})}function rm(e){var n=e.getSnapshot;e=e.value;try{var a=n();return!kt(e,a)}catch{return!0}}function lm(e){var n=Li(e,2);n!==null&&Tt(n,e,2)}function Pu(e){var n=vt();if(typeof e=="function"){var a=e;if(e=a(),Yi){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 om(e,n,a,l){return e.baseState=a,Fu(e,De,typeof l=="function"?l:Tn)}function Gx(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)}};M.T!==null?a(!0):f.isTransition=!1,l(f),a=n.pending,a===null?(f.next=n.pending=f,um(n,f)):(f.next=a.next,n.pending=a.next=f)}}function um(e,n){var a=n.action,l=n.payload,u=e.state;if(n.isTransition){var f=M.T,y={};M.T=y;try{var _=a(u,l),O=M.S;O!==null&&O(y,_),cm(e,n,_)}catch(D){Xu(e,n,D)}finally{f!==null&&y.types!==null&&(f.types=y.types),M.T=f}}else try{f=a(u,l),cm(e,n,f)}catch(D){Xu(e,n,D)}}function cm(e,n,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){fm(e,n,l)},function(l){return Xu(e,n,l)}):fm(e,n,a)}function fm(e,n,a){n.status="fulfilled",n.value=a,dm(n),e.state=a,n=e.pending,n!==null&&(a=n.next,a===n?e.pending=null:(a=a.next,n.next=a,um(e,a)))}function Xu(e,n,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do n.status="rejected",n.reason=a,dm(n),n=n.next;while(n!==l)}e.action=null}function dm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function hm(e,n){return n}function mm(e,n){if(Oe){var a=Le.formState;if(a!==null){e:{var l=ye;if(Oe){if(qe){t:{for(var u=qe,f=Xt;u.nodeType!==8;){if(!f){u=null;break t}if(u=It(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){qe=It(u.nextSibling),l=u.data==="F!";break e}}Xn(l)}l=!1}l&&(n=a[0])}}return a=vt(),a.memoizedState=a.baseState=n,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:hm,lastRenderedState:n},a.queue=l,a=Mm.bind(null,ye,l),l.dispatch=a,l=Pu(!1),f=nc.bind(null,ye,!1,l.queue),l=vt(),u={state:n,dispatch:null,action:e,pending:null},l.queue=u,a=Gx.bind(null,ye,u,f,a),u.dispatch=a,l.memoizedState=e,[n,a,!1]}function pm(e){var n=Je();return gm(n,De,e)}function gm(e,n,a){if(n=Fu(e,n,hm)[0],e=ll(Tn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var l=Us(n)}catch(y){throw y===Ta?Jr:y}else l=n;n=Je();var u=n.queue,f=u.dispatch;return a!==n.memoizedState&&(ye.flags|=2048,Ma(9,{destroy:void 0},Kx.bind(null,u,a),null)),[l,f,e]}function Kx(e,n){e.action=n}function ym(e){var n=Je(),a=De;if(a!==null)return gm(n,a,e);Je(),n=n.memoizedState,a=Je();var l=a.queue.dispatch;return a.memoizedState=e,[n,l,!1]}function Ma(e,n,a,l){return e={tag:e,create:a,deps:l,inst:n,next:null},n=ye.updateQueue,n===null&&(n=sl(),ye.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 vm(){return Je().memoizedState}function ol(e,n,a,l){var u=vt();ye.flags|=e,u.memoizedState=Ma(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&&$u(l,De.memoizedState.deps)?u.memoizedState=Ma(n,f,a,l):(ye.flags|=e,u.memoizedState=Ma(1|n,f,a,l))}function bm(e,n){ol(8390656,8,e,n)}function Ju(e,n){ul(2048,8,e,n)}function Yx(e){ye.flags|=4;var n=ye.updateQueue;if(n===null)n=sl(),ye.updateQueue=n,n.events=[e];else{var a=n.events;a===null?n.events=[e]:a.push(e)}}function xm(e){var n=Je().memoizedState;return Yx({ref:n,nextImpl:e}),function(){if((Ne&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Sm(e,n){return ul(4,2,e,n)}function _m(e,n){return ul(4,4,e,n)}function wm(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 Em(e,n,a){a=a!=null?a.concat([e]):null,ul(4,4,wm.bind(null,n,e),a)}function Iu(){}function Om(e,n){var a=Je();n=n===void 0?null:n;var l=a.memoizedState;return n!==null&&$u(n,l[1])?l[0]:(a.memoizedState=[e,n],e)}function jm(e,n){var a=Je();n=n===void 0?null:n;var l=a.memoizedState;if(n!==null&&$u(n,l[1]))return l[0];if(l=e(),Yi){Kn(!0);try{e()}finally{Kn(!1)}}return a.memoizedState=[l,n],l}function Wu(e,n,a){return a===void 0||(zn&1073741824)!==0&&(we&261930)===0?e.memoizedState=n:(e.memoizedState=a,e=zp(),ye.lanes|=e,si|=e,a)}function zm(e,n,a,l){return kt(a,n)?a:Aa.current!==null?(e=Wu(e,a,l),kt(e,n)||(et=!0),e):(zn&42)===0||(zn&1073741824)!==0&&(we&261930)===0?(et=!0,e.memoizedState=a):(e=zp(),ye.lanes|=e,si|=e,n)}function Tm(e,n,a,l,u){var f=I.p;I.p=f!==0&&8>f?f:8;var y=M.T,_={};M.T=_,nc(e,!1,n,a);try{var O=u(),D=M.S;if(D!==null&&D(_,O),O!==null&&typeof O=="object"&&typeof O.then=="function"){var $=$x(O,l);Ls(e,n,$,$t(e))}else Ls(e,n,l,$t(e))}catch(K){Ls(e,n,{then:function(){},status:"rejected",reason:K},$t())}finally{I.p=f,y!==null&&_.types!==null&&(y.types=_.types),M.T=y}}function Fx(){}function ec(e,n,a,l){if(e.tag!==5)throw Error(r(476));var u=Nm(e).queue;Tm(e,u,n,B,a===null?Fx:function(){return Am(e),a(l)})}function Nm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:B,baseState:B,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Tn,lastRenderedState:B},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=Nm(e);n.next===null&&(n=e.alternate.memoizedState),Ls(e,n.next.queue,{},$t())}function tc(){return dt(er)}function Rm(){return Je().memoizedState}function Cm(){return Je().memoizedState}function Vx(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var a=$t();e=Wn(a);var l=ei(n,e,a);l!==null&&(Tt(l,n,a),Cs(l,n,a)),n={cache:Au()},e.payload=n;return}n=n.return}}function Px(e,n,a){var l=$t();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},cl(e)?Dm(n,a):(a=bu(e,n,a,l),a!==null&&(Tt(a,e,l),km(a,n,l)))}function Mm(e,n,a){var l=$t();Ls(e,n,a,l)}function Ls(e,n,a,l){var u={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(cl(e))Dm(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=_,kt(_,y))return Gr(e,n,u,0),Le===null&&Qr(),!1}catch{}if(a=bu(e,n,u,l),a!==null)return Tt(a,e,l),km(a,n,l),!0}return!1}function nc(e,n,a,l){if(l={lane:2,revertLane:Dc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},cl(e)){if(n)throw Error(r(479))}else n=bu(e,a,l,2),n!==null&&Tt(n,e,2)}function cl(e){var n=e.alternate;return e===ye||n!==null&&n===ye}function Dm(e,n){Ra=il=!0;var a=e.pending;a===null?n.next=n:(n.next=a.next,a.next=n),e.pending=n}function km(e,n,a){if((a&4194048)!==0){var l=n.lanes;l&=e.pendingLanes,a|=l,n.lanes=a,Bd(e,a)}}var Zs={readContext:dt,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};Zs.useEffectEvent=Ve;var Um={readContext:dt,use:rl,useCallback:function(e,n){return vt().memoizedState=[e,n===void 0?null:n],e},useContext:dt,useEffect:bm,useImperativeHandle:function(e,n,a){a=a!=null?a.concat([e]):null,ol(4194308,4,wm.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=vt();n=n===void 0?null:n;var l=e();if(Yi){Kn(!0);try{e()}finally{Kn(!1)}}return a.memoizedState=[l,n],l},useReducer:function(e,n,a){var l=vt();if(a!==void 0){var u=a(n);if(Yi){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=Px.bind(null,ye,e),[l.memoizedState,e]},useRef:function(e){var n=vt();return e={current:e},n.memoizedState=e},useState:function(e){e=Pu(e);var n=e.queue,a=Mm.bind(null,ye,n);return n.dispatch=a,[e.memoizedState,a]},useDebugValue:Iu,useDeferredValue:function(e,n){var a=vt();return Wu(a,e,n)},useTransition:function(){var e=Pu(!1);return e=Tm.bind(null,ye,e.queue,!0,!1),vt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,a){var l=ye,u=vt();if(Oe){if(a===void 0)throw Error(r(407));a=a()}else{if(a=n(),Le===null)throw Error(r(349));(we&127)!==0||im(l,n,a)}u.memoizedState=a;var f={value:a,getSnapshot:n};return u.queue=f,bm(sm.bind(null,l,f,e),[e]),l.flags|=2048,Ma(9,{destroy:void 0},am.bind(null,l,f,a,n),null),a},useId:function(){var e=vt(),n=Le.identifierPrefix;if(Oe){var a=dn,l=fn;a=(l&~(1<<32-Dt(l)-1)).toString(32)+a,n="_"+n+"R_"+a,a=al++,0<a&&(n+="H"+a.toString(32)),n+="_"}else a=Hx++,n="_"+n+"r_"+a.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:tc,useFormState:mm,useActionState:mm,useOptimistic:function(e){var n=vt();n.memoizedState=n.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=a,n=nc.bind(null,ye,!0,a),a.dispatch=n,[e,n]},useMemoCache:Yu,useCacheRefresh:function(){return vt().memoizedState=Vx.bind(null,ye)},useEffectEvent:function(e){var n=vt(),a={impl:e};return n.memoizedState=a,function(){if((Ne&2)!==0)throw Error(r(440));return a.impl.apply(void 0,arguments)}}},ic={readContext:dt,use:rl,useCallback:Om,useContext:dt,useEffect:Ju,useImperativeHandle:Em,useInsertionEffect:Sm,useLayoutEffect:_m,useMemo:jm,useReducer:ll,useRef:vm,useState:function(){return ll(Tn)},useDebugValue:Iu,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:Us(e),n]},useSyncExternalStore:nm,useId:Rm,useHostTransitionStatus:tc,useFormState:pm,useActionState:pm,useOptimistic:function(e,n){var a=Je();return om(a,De,e,n)},useMemoCache:Yu,useCacheRefresh:Cm};ic.useEffectEvent=xm;var Lm={readContext:dt,use:rl,useCallback:Om,useContext:dt,useEffect:Ju,useImperativeHandle:Em,useInsertionEffect:Sm,useLayoutEffect:_m,useMemo:jm,useReducer:Vu,useRef:vm,useState:function(){return Vu(Tn)},useDebugValue:Iu,useDeferredValue:function(e,n){var a=Je();return De===null?Wu(a,e,n):zm(a,De.memoizedState,e,n)},useTransition:function(){var e=Vu(Tn)[0],n=Je().memoizedState;return[typeof e=="boolean"?e:Us(e),n]},useSyncExternalStore:nm,useId:Rm,useHostTransitionStatus:tc,useFormState:ym,useActionState:ym,useOptimistic:function(e,n){var a=Je();return De!==null?om(a,De,e,n):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Yu,useCacheRefresh:Cm};Lm.useEffectEvent=xm;function ac(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 sc={enqueueSetState:function(e,n,a){e=e._reactInternals;var l=$t(),u=Wn(l);u.payload=n,a!=null&&(u.callback=a),n=ei(e,u,l),n!==null&&(Tt(n,e,l),Cs(n,e,l))},enqueueReplaceState:function(e,n,a){e=e._reactInternals;var l=$t(),u=Wn(l);u.tag=1,u.payload=n,a!=null&&(u.callback=a),n=ei(e,u,l),n!==null&&(Tt(n,e,l),Cs(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var a=$t(),l=Wn(a);l.tag=2,n!=null&&(l.callback=n),n=ei(e,l,a),n!==null&&(Tt(n,e,a),Cs(n,e,a))}};function Zm(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?!Es(a,l)||!Es(u,f):!0}function qm(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&&sc.enqueueReplaceState(n,n.state,null)}function Fi(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 Bm(e){Hr(e)}function $m(e){console.error(e)}function Hm(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 Qm(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 rc(e,n,a){return a=Wn(a),a.tag=3,a.payload={element:null},a.callback=function(){fl(e,n)},a}function Gm(e){return e=Wn(e),e.tag=3,e}function Km(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(){Qm(n,a,l)}}var y=a.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Qm(n,a,l),typeof u!="function"&&(ri===null?ri=new Set([this]):ri.add(this));var _=l.stack;this.componentDidCatch(l.value,{componentStack:_!==null?_:""})})}function Xx(e,n,a,l,u){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(n=a.alternate,n!==null&&Oa(n,a,u,!0),a=Lt.current,a!==null){switch(a.tag){case 31:case 13:return Jt===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),Rc(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)),Rc(e,l,u)),!1}throw Error(r(435,a.tag))}return Rc(e,l,u),wl(),!1}if(Oe)return n=Lt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,l!==Ou&&(e=Error(r(422),{cause:l}),zs(Ft(e,a)))):(l!==Ou&&(n=Error(r(423),{cause:l}),zs(Ft(n,a))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,l=Ft(l,a),u=rc(e.stateNode,l,u),Uu(e,u),Pe!==4&&(Pe=2)),!1;var f=Error(r(520),{cause:l});if(f=Ft(f,a),Ys===null?Ys=[f]:Ys.push(f),Pe!==4&&(Pe=2),n===null)return!0;l=Ft(l,a),a=n;do{switch(a.tag){case 3:return a.flags|=65536,e=u&-u,a.lanes|=e,e=rc(a.stateNode,l,e),Uu(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"&&(ri===null||!ri.has(f))))return a.flags|=65536,u&=-u,a.lanes|=u,u=Gm(u),Km(u,e,a,l),Uu(a,u),!1}a=a.return}while(a!==null);return!1}var lc=Error(r(461)),et=!1;function ht(e,n,a,l){n.child=e===null?Ph(n,null,a,l):Ki(n,e.child,a,l)}function Ym(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 $i(n),l=Hu(e,n,a,y,f,u),_=Qu(),e!==null&&!et?(Gu(e,n,u),Nn(e,n,u)):(Oe&&_&&wu(n),n.flags|=1,ht(e,n,l,u),n.child)}function Fm(e,n,a,l,u){if(e===null){var f=a.type;return typeof f=="function"&&!xu(f)&&f.defaultProps===void 0&&a.compare===null?(n.tag=15,n.type=f,Vm(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,!pc(e,u)){var y=f.memoizedProps;if(a=a.compare,a=a!==null?a:Es,a(y,l)&&e.ref===n.ref)return Nn(e,n,u)}return n.flags|=1,e=wn(f,l),e.ref=n.ref,e.return=n,n.child=e}function Vm(e,n,a,l,u){if(e!==null){var f=e.memoizedProps;if(Es(f,l)&&e.ref===n.ref)if(et=!1,n.pendingProps=l=f,pc(e,u))(e.flags&131072)!==0&&(et=!0);else return n.lanes=e.lanes,Nn(e,n,u)}return oc(e,n,a,l,u)}function Pm(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 Xm(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?Ih(n,f):Zu(),Wh(n);else return l=n.lanes=536870912,Xm(e,n,f!==null?f.baseLanes|a:a,a,l)}else f!==null?(Xr(n,f.cachePool),Ih(n,f),ni(),n.memoizedState=null):(e!==null&&Xr(n,null),Zu(),ni());return ht(e,n,u,a),n.child}function qs(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Xm(e,n,a,l,u){var f=Cu();return f=f===null?null:{parent:Ie._currentValue,pool:f},n.memoizedState={baseLanes:a,cachePool:f},e!==null&&Xr(n,null),Zu(),Wh(n),e!==null&&Oa(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 Jm(e,n,a){return Ki(n,e.child,null,a),e=dl(n,n.pendingProps),e.flags|=2,Zt(n),n.memoizedState=null,e}function Jx(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,qs(null,e);if(Bu(n),(e=qe)?(e=ug(e,Xt),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=Dh(e),a.return=n,n.child=a,ft=n,qe=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(Bu(n),u)if(n.flags&256)n.flags&=-257,n=Jm(e,n,a);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(et||Oa(e,n,a,!1),u=(a&e.childLanes)!==0,et||u){if(l=Le,l!==null&&(y=$d(l,a),y!==0&&y!==f.retryLane))throw f.retryLane=y,Li(e,y),Tt(l,e,y),lc;wl(),n=Jm(e,n,a)}else e=f.treeContext,qe=It(y.nextSibling),ft=n,Oe=!0,Pn=null,Xt=!1,e!==null&&Lh(n,e),n=dl(n,l),n.flags|=4096;return n}return e=wn(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 oc(e,n,a,l,u){return $i(n),a=Hu(e,n,a,l,void 0,u),l=Qu(),e!==null&&!et?(Gu(e,n,u),Nn(e,n,u)):(Oe&&l&&wu(n),n.flags|=1,ht(e,n,a,u),n.child)}function Im(e,n,a,l,u,f){return $i(n),n.updateQueue=null,a=tm(n,l,a,u),em(e),l=Qu(),e!==null&&!et?(Gu(e,n,f),Nn(e,n,f)):(Oe&&l&&wu(n),n.flags|=1,ht(e,n,a,f),n.child)}function Wm(e,n,a,l,u){if($i(n),n.stateNode===null){var f=Sa,y=a.contextType;typeof y=="object"&&y!==null&&(f=dt(y)),f=new a(l,f),n.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=sc,n.stateNode=f,f._reactInternals=n,f=n.stateNode,f.props=l,f.state=n.memoizedState,f.refs={},Du(n),y=a.contextType,f.context=typeof y=="object"&&y!==null?dt(y):Sa,f.state=n.memoizedState,y=a.getDerivedStateFromProps,typeof y=="function"&&(ac(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&&sc.enqueueReplaceState(f,f.state,null),Ds(n,l,f,u),Ms(),f.state=n.memoizedState),typeof f.componentDidMount=="function"&&(n.flags|=4194308),l=!0}else if(e===null){f=n.stateNode;var _=n.memoizedProps,O=Fi(a,_);f.props=O;var D=f.context,$=a.contextType;y=Sa,typeof $=="object"&&$!==null&&(y=dt($));var K=a.getDerivedStateFromProps;$=typeof K=="function"||typeof f.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,$||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(_||D!==y)&&qm(n,f,l,y),In=!1;var k=n.memoizedState;f.state=k,Ds(n,l,f,u),Ms(),D=n.memoizedState,_||k!==D||In?(typeof K=="function"&&(ac(n,a,K,l),D=n.memoizedState),(O=In||Zm(n,a,O,l,k,D,y))?($||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,ku(e,n),y=n.memoizedProps,$=Fi(a,y),f.props=$,K=n.pendingProps,k=f.context,D=a.contextType,O=Sa,typeof D=="object"&&D!==null&&(O=dt(D)),_=a.getDerivedStateFromProps,(D=typeof _=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(y!==K||k!==O)&&qm(n,f,l,O),In=!1,k=n.memoizedState,f.state=k,Ds(n,l,f,u),Ms();var Z=n.memoizedState;y!==K||k!==Z||In||e!==null&&e.dependencies!==null&&Vr(e.dependencies)?(typeof _=="function"&&(ac(n,a,_,l),Z=n.memoizedState),($=In||Zm(n,a,$,l,k,Z,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,Z,O),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(l,Z,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=Z),f.props=l,f.state=Z,f.context=O,l=$):(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=Ki(n,e.child,null,u),n.child=Ki(n,null,a,u)):ht(e,n,a,u),n.memoizedState=f.state,e=n.child):e=Nn(e,n,u),e}function ep(e,n,a,l){return qi(),n.flags|=256,ht(e,n,a,l),n.child}var uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function cc(e){return{baseLanes:e,cachePool:Qh()}}function fc(e,n,a){return e=e!==null?e.childLanes&~a:0,n&&(e|=Bt),e}function tp(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?ti(n):ni(),(e=qe)?(e=ug(e,Xt),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=Dh(e),a.return=n,n.child=a,ft=n,qe=null)):e=null,e===null)throw Xn(n);return Fc(e)?n.lanes=32:n.lanes=536870912,null}var _=l.children;return l=l.fallback,u?(ni(),u=n.mode,_=ml({mode:"hidden",children:_},u),l=Zi(l,u,a,null),_.return=n,l.return=n,_.sibling=l,n.child=_,l=n.child,l.memoizedState=cc(a),l.childLanes=fc(e,y,a),n.memoizedState=uc,qs(null,l)):(ti(n),dc(n,_))}var O=e.memoizedState;if(O!==null&&(_=O.dehydrated,_!==null)){if(f)n.flags&256?(ti(n),n.flags&=-257,n=hc(e,n,a)):n.memoizedState!==null?(ni(),n.child=e.child,n.flags|=128,n=null):(ni(),_=l.fallback,u=n.mode,l=ml({mode:"visible",children:l.children},u),_=Zi(_,u,a,null),_.flags|=2,l.return=n,_.return=n,l.sibling=_,n.child=l,Ki(n,e.child,null,a),l=n.child,l.memoizedState=cc(a),l.childLanes=fc(e,y,a),n.memoizedState=uc,n=qs(null,l));else if(ti(n),Fc(_)){if(y=_.nextSibling&&_.nextSibling.dataset,y)var D=y.dgst;y=D,l=Error(r(419)),l.stack="",l.digest=y,zs({value:l,source:null,stack:null}),n=hc(e,n,a)}else if(et||Oa(e,n,a,!1),y=(a&e.childLanes)!==0,et||y){if(y=Le,y!==null&&(l=$d(y,a),l!==0&&l!==O.retryLane))throw O.retryLane=l,Li(e,l),Tt(y,e,l),lc;Yc(_)||wl(),n=hc(e,n,a)}else Yc(_)?(n.flags|=192,n.child=e.child,n=null):(e=O.treeContext,qe=It(_.nextSibling),ft=n,Oe=!0,Pn=null,Xt=!1,e!==null&&Lh(n,e),n=dc(n,l.children),n.flags|=4096);return n}return u?(ni(),_=l.fallback,u=n.mode,O=e.child,D=O.sibling,l=wn(O,{mode:"hidden",children:l.children}),l.subtreeFlags=O.subtreeFlags&65011712,D!==null?_=wn(D,_):(_=Zi(_,u,a,null),_.flags|=2),_.return=n,l.return=n,l.sibling=_,n.child=l,qs(null,l),l=n.child,_=e.child.memoizedState,_===null?_=cc(a):(u=_.cachePool,u!==null?(O=Ie._currentValue,u=u.parent!==O?{parent:O,pool:O}:u):u=Qh(),_={baseLanes:_.baseLanes|a,cachePool:u}),l.memoizedState=_,l.childLanes=fc(e,y,a),n.memoizedState=uc,qs(e.child,l)):(ti(n),a=e.child,e=a.sibling,a=wn(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 dc(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 hc(e,n,a){return Ki(n,e.child,null,a),e=dc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function np(e,n,a){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n),Tu(e.return,n,a)}function mc(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 ip(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,ee(Xe,y),ht(e,n,l,a),l=Oe?js:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&np(e,a,n);else if(e.tag===19)np(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),mc(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}mc(n,!0,a,null,f,l);break;case"together":mc(n,!1,null,null,void 0,l);break;default:n.memoizedState=null}return n.child}function Nn(e,n,a){if(e!==null&&(n.dependencies=e.dependencies),si|=n.lanes,(a&n.childLanes)===0)if(e!==null){if(Oa(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=wn(e,e.pendingProps),n.child=a,a.return=n;e.sibling!==null;)e=e.sibling,a=a.sibling=wn(e,e.pendingProps),a.return=n;a.sibling=null}return n.child}function pc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Vr(e)))}function Ix(e,n,a){switch(n.tag){case 3:Ze(n,n.stateNode.containerInfo),Jn(n,Ie,e.memoizedState.cache),qi();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,Bu(n),null;break;case 13:var l=n.memoizedState;if(l!==null)return l.dehydrated!==null?(ti(n),n.flags|=128,null):(a&n.child.childLanes)!==0?tp(e,n,a):(ti(n),e=Nn(e,n,a),e!==null?e.sibling:null);ti(n);break;case 19:var u=(e.flags&128)!==0;if(l=(a&n.childLanes)!==0,l||(Oa(e,n,a,!1),l=(a&n.childLanes)!==0),u){if(l)return ip(e,n,a);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),ee(Xe,Xe.current),l)break;return null;case 22:return n.lanes=0,Pm(e,n,a,n.pendingProps);case 24:Jn(n,Ie,e.memoizedState.cache)}return Nn(e,n,a)}function ap(e,n,a){if(e!==null)if(e.memoizedProps!==n.pendingProps)et=!0;else{if(!pc(e,a)&&(n.flags&128)===0)return et=!1,Ix(e,n,a);et=(e.flags&131072)!==0}else et=!1,Oe&&(n.flags&1048576)!==0&&Uh(n,js,n.index);switch(n.lanes=0,n.tag){case 16:e:{var l=n.pendingProps;if(e=Qi(n.elementType),n.type=e,typeof e=="function")xu(e)?(l=Fi(e,l),n.tag=1,n=Wm(null,n,e,l,a)):(n.tag=0,n=oc(null,n,e,l,a));else{if(e!=null){var u=e.$$typeof;if(u===V){n.tag=11,n=Ym(null,n,e,l,a);break e}else if(u===R){n.tag=14,n=Fm(null,n,e,l,a);break e}}throw n=ge(e)||e,Error(r(306,n,""))}}return n;case 0:return oc(e,n,n.type,n.pendingProps,a);case 1:return l=n.type,u=Fi(l,n.pendingProps),Wm(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,ku(e,n),Ds(n,l,null,a);var y=n.memoizedState;if(l=y.cache,Jn(n,Ie,l),l!==f.cache&&Nu(n,[Ie],a,!0),Ms(),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=ep(e,n,l,a);break e}else if(l!==u){u=Ft(Error(r(424)),n),zs(u),n=ep(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,qe=It(e.firstChild),ft=n,Oe=!0,Pn=null,Xt=!0,a=Ph(n,null,l,a),n.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(qi(),l===u){n=Nn(e,n,a);break e}ht(e,n,l,a)}n=n.child}return n;case 26:return hl(e,n),e===null?(a=pg(n.type,null,n.pendingProps,null))?n.memoizedState=a:Oe||(a=n.type,e=n.pendingProps,l=Al(xe.current).createElement(a),l[ct]=n,l[_t]=e,mt(l,a,e),lt(l),n.stateNode=l):n.memoizedState=pg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return cn(n),e===null&&Oe&&(l=n.stateNode=dg(n.type,n.pendingProps,xe.current),ft=n,Xt=!0,u=qe,ci(n.type)?(Vc=u,qe=It(l.firstChild)):qe=u),ht(e,n,n.pendingProps.children,a),hl(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Oe&&((u=l=qe)&&(l=TS(l,n.type,n.pendingProps,Xt),l!==null?(n.stateNode=l,ft=n,qe=It(l.firstChild),Xt=!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,Qc(u,f)?l=null:y!==null&&Qc(u,y)&&(n.flags|=32),n.memoizedState!==null&&(u=Hu(e,n,Qx,null,null,a),er._currentValue=u),hl(e,n),ht(e,n,l,a),n.child;case 6:return e===null&&Oe&&((e=a=qe)&&(a=NS(a,n.pendingProps,Xt),a!==null?(n.stateNode=a,ft=n,qe=null,e=!0):e=!1),e||Xn(n)),null;case 13:return tp(e,n,a);case 4:return Ze(n,n.stateNode.containerInfo),l=n.pendingProps,e===null?n.child=Ki(n,null,l,a):ht(e,n,l,a),n.child;case 11:return Ym(e,n,n.type,n.pendingProps,a);case 7:return ht(e,n,n.pendingProps,a),n.child;case 8:return ht(e,n,n.pendingProps.children,a),n.child;case 12:return ht(e,n,n.pendingProps.children,a),n.child;case 10:return l=n.pendingProps,Jn(n,n.type,l.value),ht(e,n,l.children,a),n.child;case 9:return u=n.type._context,l=n.pendingProps.children,$i(n),u=dt(u),l=l(u),n.flags|=1,ht(e,n,l,a),n.child;case 14:return Fm(e,n,n.type,n.pendingProps,a);case 15:return Vm(e,n,n.type,n.pendingProps,a);case 19:return ip(e,n,a);case 31:return Jx(e,n,a);case 22:return Pm(e,n,a,n.pendingProps);case 24:return $i(n),l=dt(Ie),e===null?(u=Cu(),u===null&&(u=Le,f=Au(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=a),u=f),n.memoizedState={parent:l,cache:u},Du(n),Jn(n,Ie,u)):((e.lanes&a)!==0&&(ku(e,n),Ds(n,null,null,a),Ms()),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,Ie,l)):(l=f.cache,Jn(n,Ie,l),l!==u.cache&&Nu(n,[Ie],a,!0))),ht(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 gc(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(Rp())e.flags|=8192;else throw Gi=Ir,Mu}else e.flags&=-16777217}function sp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!xg(n))if(Rp())e.flags|=8192;else throw Gi=Ir,Mu}function pl(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Zd():536870912,e.lanes|=n,La|=n)}function Bs(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 Be(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 Wx(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 Be(n),null;case 1:return Be(n),null;case 3:return a=n.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),jn(Ie),$e(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Ea(n)?An(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,ju())),Be(n),null;case 26:var u=n.type,f=n.memoizedState;return e===null?(An(n),f!==null?(Be(n),sp(n,f)):(Be(n),gc(n,u,null,l,a))):f?f!==e.memoizedState?(An(n),Be(n),sp(n,f)):(Be(n),n.flags&=-16777217):(e=e.memoizedProps,e!==l&&An(n),Be(n),gc(n,u,e,l,a)),null;case 27:if(Ai(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 Be(n),null}e=ne.current,Ea(n)?Zh(n):(e=dg(u,l,a),n.stateNode=e,An(n))}return Be(n),null;case 5:if(Ai(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 Be(n),null}if(f=ne.current,Ea(n))Zh(n);else{var y=Al(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[ct]=n,f[_t]=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(mt(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 Be(n),gc(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,Ea(n)){if(e=n.stateNode,a=n.memoizedProps,l=null,u=ft,u!==null)switch(u.tag){case 27:case 5:l=u.memoizedProps}e[ct]=n,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||tg(e.nodeValue,a)),e||Xn(n,!0)}else e=Al(e).createTextNode(l),e[ct]=n,n.stateNode=e}return Be(n),null;case 31:if(a=n.memoizedState,e===null||e.memoizedState!==null){if(l=Ea(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[ct]=n}else qi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Be(n),e=!1}else a=ju(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return n.flags&256?(Zt(n),n):(Zt(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Be(n),null;case 13:if(l=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Ea(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[ct]=n}else qi(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Be(n),u=!1}else u=ju(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(Zt(n),n):(Zt(n),null)}return Zt(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),Be(n),null);case 4:return $e(),e===null&&Zc(n.stateNode.containerInfo),Be(n),null;case 10:return jn(n.type),Be(n),null;case 19:if(q(Xe),l=n.memoizedState,l===null)return Be(n),null;if(u=(n.flags&128)!==0,f=l.rendering,f===null)if(u)Bs(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,Bs(l,!1),e=f.updateQueue,n.updateQueue=e,pl(n,e),n.subtreeFlags=0,e=a,a=n.child;a!==null;)Mh(a,e),a=a.sibling;return ee(Xe,Xe.current&1|2),Oe&&En(n,l.treeForkCount),n.child}e=e.sibling}l.tail!==null&&Ct()>xl&&(n.flags|=128,u=!0,Bs(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),Bs(l,!0),l.tail===null&&l.tailMode==="hidden"&&!f.alternate&&!Oe)return Be(n),null}else 2*Ct()-l.renderingStartTime>xl&&a!==536870912&&(n.flags|=128,u=!0,Bs(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=Ct(),e.sibling=null,a=Xe.current,ee(Xe,u?a&1|2:a&1),Oe&&En(n,l.treeForkCount),e):(Be(n),null);case 22:case 23:return Zt(n),qu(),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&&(Be(n),n.subtreeFlags&6&&(n.flags|=8192)):Be(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&&q(Hi),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),jn(Ie),Be(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function eS(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 jn(Ie),$e(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ai(n),null;case 31:if(n.memoizedState!==null){if(Zt(n),n.alternate===null)throw Error(r(340));qi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Zt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));qi()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return q(Xe),null;case 4:return $e(),null;case 10:return jn(n.type),null;case 22:case 23:return Zt(n),qu(),e!==null&&q(Hi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return jn(Ie),null;case 25:return null;default:return null}}function rp(e,n){switch(Eu(n),n.tag){case 3:jn(Ie),$e();break;case 26:case 27:case 5:Ai(n);break;case 4:$e();break;case 31:n.memoizedState!==null&&Zt(n);break;case 13:Zt(n);break;case 19:q(Xe);break;case 10:jn(n.type);break;case 22:case 23:Zt(n),qu(),e!==null&&q(Hi);break;case 24:jn(Ie)}}function $s(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 ii(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($){Me(u,O,$)}}}l=l.next}while(l!==f)}}catch($){Me(n,n.return,$)}}function lp(e){var n=e.updateQueue;if(n!==null){var a=e.stateNode;try{Jh(n,a)}catch(l){Me(e,e.return,l)}}}function op(e,n,a){a.props=Fi(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Me(e,n,l)}}function Hs(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 up(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 yc(e,n,a){try{var l=e.stateNode;_S(l,e.type,a,n),l[_t]=n}catch(u){Me(e,e.return,u)}}function cp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ci(e.type)||e.tag===4}function vc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||cp(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&&ci(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 bc(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=Sn));else if(l!==4&&(l===27&&ci(e.type)&&(a=e.stateNode,n=null),e=e.child,e!==null))for(bc(e,n,a),e=e.sibling;e!==null;)bc(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&&ci(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 fp(e){var n=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);mt(n,l,a),n[ct]=e,n[_t]=a}catch(f){Me(e,e.return,f)}}var Rn=!1,tt=!1,xc=!1,dp=typeof WeakSet=="function"?WeakSet:Set,ot=null;function tS(e,n){if(e=e.containerInfo,$c=Ll,e=Eh(e),hu(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,$=0,K=e,k=null;t:for(;;){for(var Z;K!==a||u!==0&&K.nodeType!==3||(_=y+u),K!==f||l!==0&&K.nodeType!==3||(O=y+l),K.nodeType===3&&(y+=K.nodeValue.length),(Z=K.firstChild)!==null;)k=K,K=Z;for(;;){if(K===e)break t;if(k===a&&++D===u&&(_=y),k===f&&++$===l&&(O=y),(Z=K.nextSibling)!==null)break;K=k,k=K.parentNode}K=Z}a=_===-1||O===-1?null:{start:_,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(Hc={focusedElem:e,selectionRange:a},Ll=!1,ot=n;ot!==null;)if(n=ot,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ot=e;else for(;ot!==null;){switch(n=ot,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=Fi(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)Kc(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Kc(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,ot=e;break}ot=n.return}}function hp(e,n,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Mn(e,a),l&4&&$s(5,a);break;case 1:if(Mn(e,a),l&4)if(e=a.stateNode,n===null)try{e.componentDidMount()}catch(y){Me(a,a.return,y)}else{var u=Fi(a.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Me(a,a.return,y)}}l&64&&lp(a),l&512&&Hs(a,a.return);break;case 3:if(Mn(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{Jh(e,n)}catch(y){Me(a,a.return,y)}}break;case 27:n===null&&l&4&&fp(a);case 26:case 5:Mn(e,a),n===null&&l&4&&up(a),l&512&&Hs(a,a.return);break;case 12:Mn(e,a);break;case 31:Mn(e,a),l&4&&gp(e,a);break;case 13:Mn(e,a),l&4&&yp(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=cS.bind(null,a),AS(e,a))));break;case 22:if(l=a.memoizedState!==null||Rn,!l){n=n!==null&&n.memoizedState!==null||tt,u=Rn;var f=tt;Rn=l,(tt=n)&&!f?Dn(e,a,(a.subtreeFlags&8772)!==0):Mn(e,a),Rn=u,tt=f}break;case 30:break;default:Mn(e,a)}}function mp(e){var n=e.alternate;n!==null&&(e.alternate=null,mp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Xo(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var He=null,Et=!1;function Cn(e,n,a){for(a=a.child;a!==null;)pp(e,n,a),a=a.sibling}function pp(e,n,a){if(Mt&&typeof Mt.onCommitFiberUnmount=="function")try{Mt.onCommitFiberUnmount(ds,a)}catch{}switch(a.tag){case 26:tt||hn(a,n),Cn(e,n,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:tt||hn(a,n);var l=He,u=Et;ci(a.type)&&(He=a.stateNode,Et=!1),Cn(e,n,a),Js(a.stateNode),He=l,Et=u;break;case 5:tt||hn(a,n);case 6:if(l=He,u=Et,He=null,Cn(e,n,a),He=l,Et=u,He!==null)if(Et)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(a.stateNode)}catch(f){Me(a,n,f)}else try{He.removeChild(a.stateNode)}catch(f){Me(a,n,f)}break;case 18:He!==null&&(Et?(e=He,lg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ka(e)):lg(He,a.stateNode));break;case 4:l=He,u=Et,He=a.stateNode.containerInfo,Et=!0,Cn(e,n,a),He=l,Et=u;break;case 0:case 11:case 14:case 15:ii(2,a,n),tt||ii(4,a,n),Cn(e,n,a);break;case 1:tt||(hn(a,n),l=a.stateNode,typeof l.componentWillUnmount=="function"&&op(a,n,l)),Cn(e,n,a);break;case 21:Cn(e,n,a);break;case 22:tt=(l=tt)||a.memoizedState!==null,Cn(e,n,a),tt=l;break;default:Cn(e,n,a)}}function gp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ka(e)}catch(a){Me(n,n.return,a)}}}function yp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ka(e)}catch(a){Me(n,n.return,a)}}function nS(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new dp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new dp),n;default:throw Error(r(435,e.tag))}}function yl(e,n){var a=nS(e);n.forEach(function(l){if(!a.has(l)){a.add(l);var u=fS.bind(null,e,l);l.then(u,u)}})}function Ot(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(ci(_.type)){He=_.stateNode,Et=!1;break e}break;case 5:He=_.stateNode,Et=!1;break e;case 3:case 4:He=_.stateNode.containerInfo,Et=!0;break e}_=_.return}if(He===null)throw Error(r(160));pp(f,y,u),He=null,Et=!1,f=u.alternate,f!==null&&(f.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)vp(n,e),n=n.sibling}var an=null;function vp(e,n){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ot(n,e),jt(e),l&4&&(ii(3,e,e.return),$s(3,e),ii(5,e,e.return));break;case 1:Ot(n,e),jt(e),l&512&&(tt||a===null||hn(a,a.return)),l&64&&Rn&&(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(Ot(n,e),jt(e),l&512&&(tt||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[ps]||f[ct]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=u.createElement(l),u.head.insertBefore(f,u.querySelector("head > title"))),mt(f,l,a),f[ct]=e,lt(f),l=f;break e;case"link":var y=vg("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),mt(f,l,a),u.head.appendChild(f);break;case"meta":if(y=vg("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),mt(f,l,a),u.head.appendChild(f);break;default:throw Error(r(468,l))}f[ct]=e,lt(f),l=f}e.stateNode=l}else bg(u,e.type,e.stateNode);else e.stateNode=yg(u,l,e.memoizedProps);else f!==l?(f===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):f.count--,l===null?bg(u,e.type,e.stateNode):yg(u,l,e.memoizedProps)):l===null&&e.stateNode!==null&&yc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Ot(n,e),jt(e),l&512&&(tt||a===null||hn(a,a.return)),a!==null&&l&4&&yc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Ot(n,e),jt(e),l&512&&(tt||a===null||hn(a,a.return)),e.flags&32){u=e.stateNode;try{ma(u,"")}catch(ae){Me(e,e.return,ae)}}l&4&&e.stateNode!=null&&(u=e.memoizedProps,yc(e,u,a!==null?a.memoizedProps:u)),l&1024&&(xc=!0);break;case 6:if(Ot(n,e),jt(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=Rl(n.containerInfo),Ot(n,e),an=u,jt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Ka(n.containerInfo)}catch(ae){Me(e,e.return,ae)}xc&&(xc=!1,bp(e));break;case 4:l=an,an=Rl(e.stateNode.containerInfo),Ot(n,e),jt(e),an=l;break;case 12:Ot(n,e),jt(e);break;case 31:Ot(n,e),jt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yl(e,l)));break;case 13:Ot(n,e),jt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(bl=Ct()),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=Rn,$=tt;if(Rn=D||u,tt=$||O,Ot(n,e),tt=$,Rn=D,jt(e),l&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(a===null||O||Rn||tt||Vi(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 K=O.memoizedProps.style,k=K!=null&&K.hasOwnProperty("display")?K.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 Z=O.stateNode;u?og(Z,!0):og(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:Ot(n,e),jt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,yl(e,l)));break;case 30:break;case 21:break;default:Ot(n,e),jt(e)}}function jt(e){var n=e.flags;if(n&2){try{for(var a,l=e.return;l!==null;){if(cp(l)){a=l;break}l=l.return}if(a==null)throw Error(r(160));switch(a.tag){case 27:var u=a.stateNode,f=vc(e);gl(e,f,u);break;case 5:var y=a.stateNode;a.flags&32&&(ma(y,""),a.flags&=-33);var _=vc(e);gl(e,_,y);break;case 3:case 4:var O=a.stateNode.containerInfo,D=vc(e);bc(e,D,O);break;default:throw Error(r(161))}}catch($){Me(e,e.return,$)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function bp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;bp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Mn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)hp(e,n.alternate,n),n=n.sibling}function Vi(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ii(4,n,n.return),Vi(n);break;case 1:hn(n,n.return);var a=n.stateNode;typeof a.componentWillUnmount=="function"&&op(n,n.return,a),Vi(n);break;case 27:Js(n.stateNode);case 26:case 5:hn(n,n.return),Vi(n);break;case 22:n.memoizedState===null&&Vi(n);break;case 30:Vi(n);break;default:Vi(n)}e=e.sibling}}function Dn(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:Dn(u,f,a),$s(4,f);break;case 1:if(Dn(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++)Xh(O[u],_)}catch(D){Me(l,l.return,D)}}a&&y&64&&lp(f),Hs(f,f.return);break;case 27:fp(f);case 26:case 5:Dn(u,f,a),a&&l===null&&y&4&&up(f),Hs(f,f.return);break;case 12:Dn(u,f,a);break;case 31:Dn(u,f,a),a&&y&4&&gp(u,f);break;case 13:Dn(u,f,a),a&&y&4&&yp(u,f);break;case 22:f.memoizedState===null&&Dn(u,f,a),Hs(f,f.return);break;case 30:break;default:Dn(u,f,a)}n=n.sibling}}function Sc(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&&Ts(a))}function _c(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ts(e))}function sn(e,n,a,l){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)xp(e,n,a,l),n=n.sibling}function xp(e,n,a,l){var u=n.flags;switch(n.tag){case 0:case 11:case 15:sn(e,n,a,l),u&2048&&$s(9,n);break;case 1:sn(e,n,a,l);break;case 3:sn(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&&Ts(e)));break;case 12:if(u&2048){sn(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 sn(e,n,a,l);break;case 31:sn(e,n,a,l);break;case 13:sn(e,n,a,l);break;case 23:break;case 22:f=n.stateNode,y=n.alternate,n.memoizedState!==null?f._visibility&2?sn(e,n,a,l):Qs(e,n):f._visibility&2?sn(e,n,a,l):(f._visibility|=2,Da(e,n,a,l,(n.subtreeFlags&10256)!==0||!1)),u&2048&&Sc(y,n);break;case 24:sn(e,n,a,l),u&2048&&_c(n.alternate,n);break;default:sn(e,n,a,l)}}function Da(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:Da(f,y,_,O,u),$s(8,y);break;case 23:break;case 22:var $=y.stateNode;y.memoizedState!==null?$._visibility&2?Da(f,y,_,O,u):Qs(f,y):($._visibility|=2,Da(f,y,_,O,u)),u&&D&2048&&Sc(y.alternate,y);break;case 24:Da(f,y,_,O,u),u&&D&2048&&_c(y.alternate,y);break;default:Da(f,y,_,O,u)}n=n.sibling}}function Qs(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:Qs(a,l),u&2048&&Sc(l.alternate,l);break;case 24:Qs(a,l),u&2048&&_c(l.alternate,l);break;default:Qs(a,l)}n=n.sibling}}var Gs=8192;function ka(e,n,a){if(e.subtreeFlags&Gs)for(e=e.child;e!==null;)Sp(e,n,a),e=e.sibling}function Sp(e,n,a){switch(e.tag){case 26:ka(e,n,a),e.flags&Gs&&e.memoizedState!==null&&HS(a,an,e.memoizedState,e.memoizedProps);break;case 5:ka(e,n,a);break;case 3:case 4:var l=an;an=Rl(e.stateNode.containerInfo),ka(e,n,a),an=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=Gs,Gs=16777216,ka(e,n,a),Gs=l):ka(e,n,a));break;default:ka(e,n,a)}}function _p(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 Ks(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];ot=l,Ep(l,e)}_p(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)wp(e),e=e.sibling}function wp(e){switch(e.tag){case 0:case 11:case 15:Ks(e),e.flags&2048&&ii(9,e,e.return);break;case 3:Ks(e);break;case 12:Ks(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)):Ks(e);break;default:Ks(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];ot=l,Ep(l,e)}_p(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ii(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 Ep(e,n){for(;ot!==null;){var a=ot;switch(a.tag){case 0:case 11:case 15:ii(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:Ts(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,ot=l;else e:for(a=e;ot!==null;){l=ot;var u=l.sibling,f=l.return;if(mp(l),l===a){ot=null;break e}if(u!==null){u.return=f,ot=u;break e}ot=f}}}var iS={getCacheForType:function(e){var n=dt(Ie),a=n.data.get(e);return a===void 0&&(a=e(),n.data.set(e,a)),a},cacheSignal:function(){return dt(Ie).controller.signal}},aS=typeof WeakMap=="function"?WeakMap:Map,Ne=0,Le=null,Se=null,we=0,Ce=0,qt=null,ai=!1,Ua=!1,wc=!1,kn=0,Pe=0,si=0,Pi=0,Ec=0,Bt=0,La=0,Ys=null,zt=null,Oc=!1,bl=0,Op=0,xl=1/0,Sl=null,ri=null,at=0,li=null,Za=null,Un=0,jc=0,zc=null,jp=null,Fs=0,Tc=null;function $t(){return(Ne&2)!==0&&we!==0?we&-we:M.T!==null?Dc():Hd()}function zp(){if(Bt===0)if((we&536870912)===0||Oe){var e=Nr;Nr<<=1,(Nr&3932160)===0&&(Nr=262144),Bt=e}else Bt=536870912;return e=Lt.current,e!==null&&(e.flags|=32),Bt}function Tt(e,n,a){(e===Le&&(Ce===2||Ce===9)||e.cancelPendingCommit!==null)&&(qa(e,0),oi(e,we,Bt,!1)),ms(e,a),((Ne&2)===0||e!==Le)&&(e===Le&&((Ne&2)===0&&(Pi|=a),Pe===4&&oi(e,we,Bt,!1)),mn(e))}function Tp(e,n,a){if((Ne&6)!==0)throw Error(r(327));var l=!a&&(n&127)===0&&(n&e.expiredLanes)===0||hs(e,n),u=l?lS(e,n):Ac(e,n,!0),f=l;do{if(u===0){Ua&&!l&&oi(e,n,0,!1);break}else{if(a=e.current.alternate,f&&!sS(a)){u=Ac(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=Ys;var O=_.current.memoizedState.isDehydrated;if(O&&(qa(_,y).flags|=256),y=Ac(_,y,!1),y!==2){if(wc&&!O){_.errorRecoveryDisabledLanes|=f,Pi|=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){qa(e,0),oi(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:oi(l,n,Bt,!ai);break e;case 2:zt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(u=bl+300-Ct(),10<u)){if(oi(l,n,Bt,!ai),Rr(l,0,!0)!==0)break e;Un=n,l.timeoutHandle=sg(Np.bind(null,l,a,zt,Sl,Oc,n,Bt,Pi,La,ai,f,"Throttled",-0,0),u);break e}Np(l,a,zt,Sl,Oc,n,Bt,Pi,La,ai,f,null,-0,0)}}break}while(!0);mn(e)}function Np(e,n,a,l,u,f,y,_,O,D,$,K,k,Z){if(e.timeoutHandle=-1,K=n.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Sn},Sp(n,f,K);var ae=(f&62914560)===f?bl-Ct():(f&4194048)===f?Op-Ct():0;if(ae=QS(K,ae),ae!==null){Un=f,e.cancelPendingCommit=ae(Lp.bind(null,e,n,f,a,l,u,y,_,O,$,K,null,k,Z)),oi(e,f,y,!D);return}}Lp(e,n,f,a,l,u,y,_,O)}function sS(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(!kt(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 oi(e,n,a,l){n&=~Ec,n&=~Pi,e.suspendedLanes|=n,e.pingedLanes&=~n,l&&(e.warmLanes|=n),l=e.expirationTimes;for(var u=n;0<u;){var f=31-Dt(u),y=1<<f;l[f]=-1,u&=~y}a!==0&&qd(e,a,n)}function _l(){return(Ne&6)===0?(Vs(0),!1):!0}function Nc(){if(Se!==null){if(Ce===0)var e=Se.return;else e=Se,On=Bi=null,Ku(e),Na=null,As=0,e=Se;for(;e!==null;)rp(e.alternate,e),e=e.return;Se=null}}function qa(e,n){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,OS(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Un=0,Nc(),Le=e,Se=a=wn(e.current,null),we=n,Ce=0,qt=null,ai=!1,Ua=hs(e,n),wc=!1,La=Bt=Ec=Pi=si=Pe=0,zt=Ys=null,Oc=!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-Dt(l),f=1<<u;n|=e[u],l&=~f}return kn=n,Qr(),a}function Ap(e,n){ye=null,M.H=Zs,n===Ta||n===Jr?(n=Yh(),Ce=3):n===Mu?(n=Yh(),Ce=4):Ce=n===lc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,qt=n,Se===null&&(Pe=1,fl(e,Ft(n,e.current)))}function Rp(){var e=Lt.current;return e===null?!0:(we&4194048)===we?Jt===null:(we&62914560)===we||(we&536870912)!==0?e===Jt:!1}function Cp(){var e=M.H;return M.H=Zs,e===null?Zs:e}function Mp(){var e=M.A;return M.A=iS,e}function wl(){Pe=4,ai||(we&4194048)!==we&&Lt.current!==null||(Ua=!0),(si&134217727)===0&&(Pi&134217727)===0||Le===null||oi(Le,we,Bt,!1)}function Ac(e,n,a){var l=Ne;Ne|=2;var u=Cp(),f=Mp();(Le!==e||we!==n)&&(Sl=null,qa(e,n)),n=!1;var y=Pe;e:do try{if(Ce!==0&&Se!==null){var _=Se,O=qt;switch(Ce){case 8:Nc(),y=6;break e;case 3:case 2:case 9:case 6:Lt.current===null&&(n=!0);var D=Ce;if(Ce=0,qt=null,Ba(e,_,O,D),a&&Ua){y=0;break e}break;default:D=Ce,Ce=0,qt=null,Ba(e,_,O,D)}}rS(),y=Pe;break}catch($){Ap(e,$)}while(!0);return n&&e.shellSuspendCounter++,On=Bi=null,Ne=l,M.H=u,M.A=f,Se===null&&(Le=null,we=0,Qr()),y}function rS(){for(;Se!==null;)Dp(Se)}function lS(e,n){var a=Ne;Ne|=2;var l=Cp(),u=Mp();Le!==e||we!==n?(Sl=null,xl=Ct()+500,qa(e,n)):Ua=hs(e,n);e:do try{if(Ce!==0&&Se!==null){n=Se;var f=qt;t:switch(Ce){case 1:Ce=0,qt=null,Ba(e,n,f,1);break;case 2:case 9:if(Gh(f)){Ce=0,qt=null,kp(n);break}n=function(){Ce!==2&&Ce!==9||Le!==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:Gh(f)?(Ce=0,qt=null,kp(n)):(Ce=0,qt=null,Ba(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?xg(y):_.stateNode.complete){Ce=0,qt=null;var O=_.sibling;if(O!==null)Se=O;else{var D=_.return;D!==null?(Se=D,El(D)):Se=null}break t}}Ce=0,qt=null,Ba(e,n,f,5);break;case 6:Ce=0,qt=null,Ba(e,n,f,6);break;case 8:Nc(),Pe=6;break e;default:throw Error(r(462))}}oS();break}catch($){Ap(e,$)}while(!0);return On=Bi=null,M.H=l,M.A=u,Ne=a,Se!==null?0:(Le=null,we=0,Qr(),Pe)}function oS(){for(;Se!==null&&!R0();)Dp(Se)}function Dp(e){var n=ap(e.alternate,e,kn);e.memoizedProps=e.pendingProps,n===null?El(e):Se=n}function kp(e){var n=e,a=n.alternate;switch(n.tag){case 15:case 0:n=Im(a,n,n.pendingProps,n.type,void 0,we);break;case 11:n=Im(a,n,n.pendingProps,n.type.render,n.ref,we);break;case 5:Ku(n);default:rp(a,n),n=Se=Mh(n,kn),n=ap(a,n,kn)}e.memoizedProps=e.pendingProps,n===null?El(e):Se=n}function Ba(e,n,a,l){On=Bi=null,Ku(n),Na=null,As=0;var u=n.return;try{if(Xx(e,u,n,a,we)){Pe=1,fl(e,Ft(a,e.current)),Se=null;return}}catch(f){if(u!==null)throw Se=u,f;Pe=1,fl(e,Ft(a,e.current)),Se=null;return}n.flags&32768?(Oe||l===1?e=!0:Ua||(we&536870912)!==0?e=!1:(ai=e=!0,(l===2||l===9||l===3||l===6)&&(l=Lt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Up(n,e)):El(n)}function El(e){var n=e;do{if((n.flags&32768)!==0){Up(n,ai);return}e=n.return;var a=Wx(n.alternate,n,kn);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=eS(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 Lp(e,n,a,l,u,f,y,_,O){e.cancelPendingCommit=null;do Ol();while(at!==0);if((Ne&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(f=n.lanes|n.childLanes,f|=vu,$0(e,a,f,y,_,O),e===Le&&(Se=Le=null,we=0),Za=n,li=e,Un=a,jc=f,zc=u,jp=l,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,dS(zr,function(){return Hp(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||l){l=M.T,M.T=null,u=I.p,I.p=2,y=Ne,Ne|=4;try{tS(e,n,a)}finally{Ne=y,I.p=u,M.T=l}}at=1,Zp(),qp(),Bp()}}function Zp(){if(at===1){at=0;var e=li,n=Za,a=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||a){a=M.T,M.T=null;var l=I.p;I.p=2;var u=Ne;Ne|=4;try{vp(n,e);var f=Hc,y=Eh(e.containerInfo),_=f.focusedElem,O=f.selectionRange;if(y!==_&&_&&_.ownerDocument&&wh(_.ownerDocument.documentElement,_)){if(O!==null&&hu(_)){var D=O.start,$=O.end;if($===void 0&&($=D),"selectionStart"in _)_.selectionStart=D,_.selectionEnd=Math.min($,_.value.length);else{var K=_.ownerDocument||document,k=K&&K.defaultView||window;if(k.getSelection){var Z=k.getSelection(),ae=_.textContent.length,de=Math.min(O.start,ae),Ue=O.end===void 0?de:Math.min(O.end,ae);!Z.extend&&de>Ue&&(y=Ue,Ue=de,de=y);var N=_h(_,de),T=_h(_,Ue);if(N&&T&&(Z.rangeCount!==1||Z.anchorNode!==N.node||Z.anchorOffset!==N.offset||Z.focusNode!==T.node||Z.focusOffset!==T.offset)){var C=K.createRange();C.setStart(N.node,N.offset),Z.removeAllRanges(),de>Ue?(Z.addRange(C),Z.extend(T.node,T.offset)):(C.setEnd(T.node,T.offset),Z.addRange(C))}}}}for(K=[],Z=_;Z=Z.parentNode;)Z.nodeType===1&&K.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<K.length;_++){var Q=K[_];Q.element.scrollLeft=Q.left,Q.element.scrollTop=Q.top}}Ll=!!$c,Hc=$c=null}finally{Ne=u,I.p=l,M.T=a}}e.current=n,at=2}}function qp(){if(at===2){at=0;var e=li,n=Za,a=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||a){a=M.T,M.T=null;var l=I.p;I.p=2;var u=Ne;Ne|=4;try{hp(e,n.alternate,n)}finally{Ne=u,I.p=l,M.T=a}}at=3}}function Bp(){if(at===4||at===3){at=0,C0();var e=li,n=Za,a=Un,l=jp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?at=5:(at=0,Za=li=null,$p(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(ri=null),Vo(a),n=n.stateNode,Mt&&typeof Mt.onCommitFiberRoot=="function")try{Mt.onCommitFiberRoot(ds,n,void 0,(n.current.flags&128)===128)}catch{}if(l!==null){n=M.T,u=I.p,I.p=2,M.T=null;try{for(var f=e.onRecoverableError,y=0;y<l.length;y++){var _=l[y];f(_.value,{componentStack:_.stack})}}finally{M.T=n,I.p=u}}(Un&3)!==0&&Ol(),mn(e),u=e.pendingLanes,(a&261930)!==0&&(u&42)!==0?e===Tc?Fs++:(Fs=0,Tc=e):Fs=0,Vs(0)}}function $p(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ts(n)))}function Ol(){return Zp(),qp(),Bp(),Hp()}function Hp(){if(at!==5)return!1;var e=li,n=jc;jc=0;var a=Vo(Un),l=M.T,u=I.p;try{I.p=32>a?32:a,M.T=null,a=zc,zc=null;var f=li,y=Un;if(at=0,Za=li=null,Un=0,(Ne&6)!==0)throw Error(r(331));var _=Ne;if(Ne|=4,wp(f.current),xp(f,f.current,y,a),Ne=_,Vs(0,!1),Mt&&typeof Mt.onPostCommitFiberRoot=="function")try{Mt.onPostCommitFiberRoot(ds,f)}catch{}return!0}finally{I.p=u,M.T=l,$p(e,n)}}function Qp(e,n,a){n=Ft(a,n),n=rc(e.stateNode,n,2),e=ei(e,n,2),e!==null&&(ms(e,2),mn(e))}function Me(e,n,a){if(e.tag===3)Qp(e,e,a);else for(;n!==null;){if(n.tag===3){Qp(n,e,a);break}else if(n.tag===1){var l=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ri===null||!ri.has(l))){e=Ft(a,e),a=Gm(2),l=ei(n,a,2),l!==null&&(Km(a,l,n,e),ms(l,2),mn(l));break}}n=n.return}}function Rc(e,n,a){var l=e.pingCache;if(l===null){l=e.pingCache=new aS;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)||(wc=!0,u.add(a),e=uS.bind(null,e,n,a),n.then(e,e))}function uS(e,n,a){var l=e.pingCache;l!==null&&l.delete(n),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Le===e&&(we&a)===a&&(Pe===4||Pe===3&&(we&62914560)===we&&300>Ct()-bl?(Ne&2)===0&&qa(e,0):Ec|=a,La===we&&(La=0)),mn(e)}function Gp(e,n){n===0&&(n=Zd()),e=Li(e,n),e!==null&&(ms(e,n),mn(e))}function cS(e){var n=e.memoizedState,a=0;n!==null&&(a=n.retryLane),Gp(e,a)}function fS(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),Gp(e,a)}function dS(e,n){return Go(e,n)}var jl=null,$a=null,Cc=!1,zl=!1,Mc=!1,ui=0;function mn(e){e!==$a&&e.next===null&&($a===null?jl=$a=e:$a=$a.next=e),zl=!0,Cc||(Cc=!0,mS())}function Vs(e,n){if(!Mc&&zl){Mc=!0;do for(var a=!1,l=jl;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-Dt(42|e)+1)-1,f&=u&~(y&~_),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,Vp(l,f))}else f=we,f=Rr(l,l===Le?f:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(f&3)===0||hs(l,f)||(a=!0,Vp(l,f));l=l.next}while(a);Mc=!1}}function hS(){Kp()}function Kp(){zl=Cc=!1;var e=0;ui!==0&&ES()&&(e=ui);for(var n=Ct(),a=null,l=jl;l!==null;){var u=l.next,f=Yp(l,n);f===0?(l.next=null,a===null?jl=u:a.next=u,u===null&&($a=a)):(a=l,(e!==0||(f&3)!==0)&&(zl=!0)),l=u}at!==0&&at!==5||Vs(e),ui!==0&&(ui=0)}function Yp(e,n){for(var a=e.suspendedLanes,l=e.pingedLanes,u=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var y=31-Dt(f),_=1<<y,O=u[y];O===-1?((_&a)===0||(_&l)!==0)&&(u[y]=B0(_,n)):O<=n&&(e.expiredLanes|=_),f&=~_}if(n=Le,a=we,a=Rr(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&&Ko(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||hs(e,a)){if(n=a&-a,n===e.callbackPriority)return n;switch(l!==null&&Ko(l),Vo(a)){case 2:case 8:a=Ud;break;case 32:a=zr;break;case 268435456:a=Ld;break;default:a=zr}return l=Fp.bind(null,e),a=Go(a,l),e.callbackPriority=n,e.callbackNode=a,n}return l!==null&&l!==null&&Ko(l),e.callbackPriority=2,e.callbackNode=null,2}function Fp(e,n){if(at!==0&&at!==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=Rr(e,e===Le?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Tp(e,l,n),Yp(e,Ct()),e.callbackNode!=null&&e.callbackNode===a?Fp.bind(null,e):null)}function Vp(e,n){if(Ol())return null;Tp(e,n,!0)}function mS(){jS(function(){(Ne&6)!==0?Go(kd,hS):Kp()})}function Dc(){if(ui===0){var e=ja;e===0&&(e=Tr,Tr<<=1,(Tr&261888)===0&&(Tr=256)),ui=e}return ui}function Pp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:kr(""+e)}function Xp(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 pS(e,n,a,l,u){if(n==="submit"&&a&&a.stateNode===u){var f=Pp((u[_t]||null).action),y=l.submitter;y&&(n=(n=y[_t]||null)?Pp(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(ui!==0){var O=y?Xp(u,y):new FormData(u);ec(a,{pending:!0,data:O,method:u.method,action:f},null,O)}}else typeof f=="function"&&(_.preventDefault(),O=y?Xp(u,y):new FormData(u),ec(a,{pending:!0,data:O,method:u.method,action:f},f,O))},currentTarget:u}]})}}for(var kc=0;kc<yu.length;kc++){var Uc=yu[kc],gS=Uc.toLowerCase(),yS=Uc[0].toUpperCase()+Uc.slice(1);nn(gS,"on"+yS)}nn(zh,"onAnimationEnd"),nn(Th,"onAnimationIteration"),nn(Nh,"onAnimationStart"),nn("dblclick","onDoubleClick"),nn("focusin","onFocus"),nn("focusout","onBlur"),nn(Mx,"onTransitionRun"),nn(Dx,"onTransitionStart"),nn(kx,"onTransitionCancel"),nn(Ah,"onTransitionEnd"),da("onMouseEnter",["mouseout","mouseover"]),da("onMouseLeave",["mouseout","mouseover"]),da("onPointerEnter",["pointerout","pointerover"]),da("onPointerLeave",["pointerout","pointerover"]),Mi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Mi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Mi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Mi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Mi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Mi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="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(" "),vS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function Jp(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($){Hr($)}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($){Hr($)}u.currentTarget=null,f=O}}}}function _e(e,n){var a=n[Po];a===void 0&&(a=n[Po]=new Set);var l=e+"__bubble";a.has(l)||(Ip(n,e,2,!1),a.add(l))}function Lc(e,n,a){var l=0;n&&(l|=4),Ip(a,e,l,n)}var Tl="_reactListening"+Math.random().toString(36).slice(2);function Zc(e){if(!e[Tl]){e[Tl]=!0,Kd.forEach(function(a){a!=="selectionchange"&&(vS.has(a)||Lc(a,!1,e),Lc(a,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[Tl]||(n[Tl]=!0,Lc("selectionchange",!1,n))}}function Ip(e,n,a,l){switch(zg(n)){case 2:var u=YS;break;case 8:u=FS;break;default:u=Wc}a=u.bind(null,n,a,e),u=void 0,!au||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 qc(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=ua(_),y===null)return;if(O=y.tag,O===5||O===6||O===26||O===27){l=f=y;continue e}_=_.parentNode}}l=l.return}ih(function(){var D=f,$=nu(a),K=[];e:{var k=Rh.get(e);if(k!==void 0){var Z=qr,ae=e;switch(e){case"keypress":if(Lr(a)===0)break e;case"keydown":case"keyup":Z=fx;break;case"focusin":ae="focus",Z=ou;break;case"focusout":ae="blur",Z=ou;break;case"beforeblur":case"afterblur":Z=ou;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":Z=rh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=W0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=mx;break;case zh:case Th:case Nh:Z=nx;break;case Ah:Z=gx;break;case"scroll":case"scrollend":Z=J0;break;case"wheel":Z=vx;break;case"copy":case"cut":case"paste":Z=ax;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=oh;break;case"toggle":case"beforetoggle":Z=xx}var de=(n&4)!==0,Ue=!de&&(e==="scroll"||e==="scrollend"),N=de?k!==null?k+"Capture":null:k;de=[];for(var T=D,C;T!==null;){var Q=T;if(C=Q.stateNode,Q=Q.tag,Q!==5&&Q!==26&&Q!==27||C===null||N===null||(Q=ys(T,N),Q!=null&&de.push(Xs(T,Q,C))),Ue)break;T=T.return}0<de.length&&(k=new Z(k,ae,null,a,$),K.push({event:k,listeners:de}))}}if((n&7)===0){e:{if(k=e==="mouseover"||e==="pointerover",Z=e==="mouseout"||e==="pointerout",k&&a!==tu&&(ae=a.relatedTarget||a.fromElement)&&(ua(ae)||ae[oa]))break e;if((Z||k)&&(k=$.window===$?$:(k=$.ownerDocument)?k.defaultView||k.parentWindow:window,Z?(ae=a.relatedTarget||a.toElement,Z=D,ae=ae?ua(ae):null,ae!==null&&(Ue=c(ae),de=ae.tag,ae!==Ue||de!==5&&de!==27&&de!==6)&&(ae=null)):(Z=null,ae=D),Z!==ae)){if(de=rh,Q="onMouseLeave",N="onMouseEnter",T="mouse",(e==="pointerout"||e==="pointerover")&&(de=oh,Q="onPointerLeave",N="onPointerEnter",T="pointer"),Ue=Z==null?k:gs(Z),C=ae==null?k:gs(ae),k=new de(Q,T+"leave",Z,a,$),k.target=Ue,k.relatedTarget=C,Q=null,ua($)===D&&(de=new de(N,T+"enter",ae,a,$),de.target=C,de.relatedTarget=Ue,Q=de),Ue=Q,Z&&ae)t:{for(de=bS,N=Z,T=ae,C=0,Q=N;Q;Q=de(Q))C++;Q=0;for(var ce=T;ce;ce=de(ce))Q++;for(;0<C-Q;)N=de(N),C--;for(;0<Q-C;)T=de(T),Q--;for(;C--;){if(N===T||T!==null&&N===T.alternate){de=N;break t}N=de(N),T=de(T)}de=null}else de=null;Z!==null&&Wp(K,k,Z,de,!1),ae!==null&&Ue!==null&&Wp(K,Ue,ae,de,!0)}}e:{if(k=D?gs(D):window,Z=k.nodeName&&k.nodeName.toLowerCase(),Z==="select"||Z==="input"&&k.type==="file")var ze=gh;else if(mh(k))if(yh)ze=Ax;else{ze=Tx;var oe=zx}else Z=k.nodeName,!Z||Z.toLowerCase()!=="input"||k.type!=="checkbox"&&k.type!=="radio"?D&&eu(D.elementType)&&(ze=gh):ze=Nx;if(ze&&(ze=ze(e,D))){ph(K,ze,a,$);break e}oe&&oe(e,k,D),e==="focusout"&&D&&k.type==="number"&&D.memoizedProps.value!=null&&Wo(k,"number",k.value)}switch(oe=D?gs(D):window,e){case"focusin":(mh(oe)||oe.contentEditable==="true")&&(va=oe,mu=D,Os=null);break;case"focusout":Os=mu=va=null;break;case"mousedown":pu=!0;break;case"contextmenu":case"mouseup":case"dragend":pu=!1,Oh(K,a,$);break;case"selectionchange":if(Cx)break;case"keydown":case"keyup":Oh(K,a,$)}var ve;if(cu)e:{switch(e){case"compositionstart":var Ee="onCompositionStart";break e;case"compositionend":Ee="onCompositionEnd";break e;case"compositionupdate":Ee="onCompositionUpdate";break e}Ee=void 0}else ya?dh(e,a)&&(Ee="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(Ee="onCompositionStart");Ee&&(uh&&a.locale!=="ko"&&(ya||Ee!=="onCompositionStart"?Ee==="onCompositionEnd"&&ya&&(ve=ah()):(Fn=$,su="value"in Fn?Fn.value:Fn.textContent,ya=!0)),oe=Nl(D,Ee),0<oe.length&&(Ee=new lh(Ee,e,null,a,$),K.push({event:Ee,listeners:oe}),ve?Ee.data=ve:(ve=hh(a),ve!==null&&(Ee.data=ve)))),(ve=_x?wx(e,a):Ex(e,a))&&(Ee=Nl(D,"onBeforeInput"),0<Ee.length&&(oe=new lh("onBeforeInput","beforeinput",null,a,$),K.push({event:oe,listeners:Ee}),oe.data=ve)),pS(K,e,D,a,$)}Jp(K,n)})}function Xs(e,n,a){return{instance:e,listener:n,currentTarget:a}}function Nl(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=ys(e,a),u!=null&&l.unshift(Xs(e,u,f)),u=ys(e,n),u!=null&&l.push(Xs(e,u,f))),e.tag===3)return l;e=e.return}return[]}function bS(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wp(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=ys(a,f),D!=null&&y.unshift(Xs(a,D,O))):u||(D=ys(a,f),D!=null&&y.push(Xs(a,D,O)))),a=a.return}y.length!==0&&e.push({event:n,listeners:y})}var xS=/\r\n?/g,SS=/\u0000|\uFFFD/g;function eg(e){return(typeof e=="string"?e:""+e).replace(xS,`
|
|
9
|
-
`).replace(SS,"")}function tg(e,n){return n=eg(n),eg(e)===n}function ke(e,n,a,l,u,f){switch(a){case"children":typeof l=="string"?n==="body"||n==="textarea"&&l===""||ma(e,l):(typeof l=="number"||typeof l=="bigint")&&n!=="body"&&ma(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":th(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=Sn);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":xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":xn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":xn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":xn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":xn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":xn(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=P0.get(a)||a,Cr(e,a,l))}}function Bc(e,n,a,l,u,f){switch(a){case"style":th(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"?ma(e,l):(typeof l=="number"||typeof l=="bigint")&&ma(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=Sn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yd.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[_t]||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 mt(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 $=a[l];if($!=null)switch(l){case"name":u=$;break;case"type":y=$;break;case"checked":O=$;break;case"defaultChecked":D=$;break;case"value":f=$;break;case"defaultValue":_=$;break;case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,n));break;default:ke(e,n,l,$,a,null)}}Jd(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?ha(e,!!l,n,!1):a!=null&&ha(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)}Wd(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<Ps.length;l++)_e(Ps[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(eu(n)){for($ in a)a.hasOwnProperty($)&&(l=a[$],l!==void 0&&Bc(e,n,$,l,a,void 0));return}}for(_ in a)a.hasOwnProperty(_)&&(l=a[_],l!=null&&ke(e,n,_,l,a,null))}function _S(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,$=null;for(Z in a){var K=a[Z];if(a.hasOwnProperty(Z)&&K!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":O=K;default:l.hasOwnProperty(Z)||ke(e,n,Z,null,l,K)}}for(var k in l){var Z=l[k];if(K=a[k],l.hasOwnProperty(k)&&(Z!=null||K!=null))switch(k){case"type":f=Z;break;case"name":u=Z;break;case"checked":D=Z;break;case"defaultChecked":$=Z;break;case"value":y=Z;break;case"defaultValue":_=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(r(137,n));break;default:Z!==K&&ke(e,n,k,Z,l,K)}}Io(e,y,_,O,D,$,f,u);return;case"select":Z=y=_=k=null;for(f in a)if(O=a[f],a.hasOwnProperty(f)&&O!=null)switch(f){case"value":break;case"multiple":Z=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=Z,k!=null?ha(e,!!a,k,!1):!!l!=!!a&&(n!=null?ha(e,!!a,n,!0):ha(e,!!a,a?[]:"",!1));return;case"textarea":Z=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":Z=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)}Id(e,k,Z);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],Z=a[O],l.hasOwnProperty(O)&&k!==Z&&(k!=null||Z!=null)&&(O==="selected"?e.selected=k&&typeof k!="function"&&typeof k!="symbol":ke(e,n,O,k,l,Z));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],Z=a[D],l.hasOwnProperty(D)&&k!==Z&&(k!=null||Z!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(k!=null)throw Error(r(137,n));break;default:ke(e,n,D,k,l,Z)}return;default:if(eu(n)){for(var Ue in a)k=a[Ue],a.hasOwnProperty(Ue)&&k!==void 0&&!l.hasOwnProperty(Ue)&&Bc(e,n,Ue,void 0,l,k);for($ in l)k=l[$],Z=a[$],!l.hasOwnProperty($)||k===Z||k===void 0&&Z===void 0||Bc(e,n,$,k,l,Z);return}}for(var N in a)k=a[N],a.hasOwnProperty(N)&&k!=null&&!l.hasOwnProperty(N)&&ke(e,n,N,null,l,k);for(K in l)k=l[K],Z=a[K],!l.hasOwnProperty(K)||k===Z||k==null&&Z==null||ke(e,n,K,k,l,Z)}function ng(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function wS(){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&&_&&ng(y)){for(y=0,_=u.responseEnd,l+=1;l<a.length;l++){var O=a[l],D=O.startTime;if(D>_)break;var $=O.transferSize,K=O.initiatorType;$&&ng(K)&&(O=O.responseEnd,y+=$*(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 $c=null,Hc=null;function Al(e){return e.nodeType===9?e:e.ownerDocument}function ig(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 ag(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Qc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Gc=null;function ES(){var e=window.event;return e&&e.type==="popstate"?e===Gc?!1:(Gc=e,!0):(Gc=null,!1)}var sg=typeof setTimeout=="function"?setTimeout:void 0,OS=typeof clearTimeout=="function"?clearTimeout:void 0,rg=typeof Promise=="function"?Promise:void 0,jS=typeof queueMicrotask=="function"?queueMicrotask:typeof rg<"u"?function(e){return rg.resolve(null).then(e).catch(zS)}:sg;function zS(e){setTimeout(function(){throw e})}function ci(e){return e==="head"}function lg(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),Ka(n);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")Js(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,Js(a);for(var f=a.firstChild;f;){var y=f.nextSibling,_=f.nodeName;f[ps]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=y}}else a==="body"&&Js(e.ownerDocument.body);a=u}while(a);Ka(n)}function og(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 Kc(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":Kc(a),Xo(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function TS(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[ps])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=It(e.nextSibling),e===null)break}return null}function NS(e,n,a){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=It(e.nextSibling),e===null))return null;return e}function ug(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=It(e.nextSibling),e===null))return null;return e}function Yc(e){return e.data==="$?"||e.data==="$~"}function Fc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function AS(e,n){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||a.readyState!=="loading")n();else{var l=function(){n(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function It(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Vc=null;function cg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(n===0)return It(e.nextSibling);n--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||n++}e=e.nextSibling}return null}function fg(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 dg(e,n,a){switch(n=Al(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 Js(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Xo(e)}var Wt=new Map,hg=new Set;function Rl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ln=I.d;I.d={f:RS,r:CS,D:MS,C:DS,L:kS,m:US,X:ZS,S:LS,M:qS};function RS(){var e=Ln.f(),n=_l();return e||n}function CS(e){var n=ca(e);n!==null&&n.tag===5&&n.type==="form"?Am(n):Ln.r(e)}var Ha=typeof document>"u"?null:document;function mg(e,n,a){var l=Ha;if(l&&typeof n=="string"&&n){var u=Kt(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),hg.has(u)||(hg.add(u),e={rel:e,crossOrigin:a,href:n},l.querySelector(u)===null&&(n=l.createElement("link"),mt(n,"link",e),lt(n),l.head.appendChild(n)))}}function MS(e){Ln.D(e),mg("dns-prefetch",e,null)}function DS(e,n){Ln.C(e,n),mg("preconnect",e,n)}function kS(e,n,a){Ln.L(e,n,a);var l=Ha;if(l&&e&&n){var u='link[rel="preload"][as="'+Kt(n)+'"]';n==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+Kt(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+Kt(a.imageSizes)+'"]')):u+='[href="'+Kt(e)+'"]';var f=u;switch(n){case"style":f=Qa(e);break;case"script":f=Ga(e)}Wt.has(f)||(e=v({rel:"preload",href:n==="image"&&a&&a.imageSrcSet?void 0:e,as:n},a),Wt.set(f,e),l.querySelector(u)!==null||n==="style"&&l.querySelector(Is(f))||n==="script"&&l.querySelector(Ws(f))||(n=l.createElement("link"),mt(n,"link",e),lt(n),l.head.appendChild(n)))}}function US(e,n){Ln.m(e,n);var a=Ha;if(a&&e){var l=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Kt(l)+'"][href="'+Kt(e)+'"]',f=u;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Ga(e)}if(!Wt.has(f)&&(e=v({rel:"modulepreload",href:e},n),Wt.set(f,e),a.querySelector(u)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(Ws(f)))return}l=a.createElement("link"),mt(l,"link",e),lt(l),a.head.appendChild(l)}}}function LS(e,n,a){Ln.S(e,n,a);var l=Ha;if(l&&e){var u=fa(l).hoistableStyles,f=Qa(e);n=n||"default";var y=u.get(f);if(!y){var _={loading:0,preload:null};if(y=l.querySelector(Is(f)))_.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},a),(a=Wt.get(f))&&Pc(e,a);var O=y=l.createElement("link");lt(O),mt(O,"link",e),O._p=new Promise(function(D,$){O.onload=D,O.onerror=$}),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 ZS(e,n){Ln.X(e,n);var a=Ha;if(a&&e){var l=fa(a).hoistableScripts,u=Ga(e),f=l.get(u);f||(f=a.querySelector(Ws(u)),f||(e=v({src:e,async:!0},n),(n=Wt.get(u))&&Xc(e,n),f=a.createElement("script"),lt(f),mt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function qS(e,n){Ln.M(e,n);var a=Ha;if(a&&e){var l=fa(a).hoistableScripts,u=Ga(e),f=l.get(u);f||(f=a.querySelector(Ws(u)),f||(e=v({src:e,async:!0,type:"module"},n),(n=Wt.get(u))&&Xc(e,n),f=a.createElement("script"),lt(f),mt(f,"link",e),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},l.set(u,f))}}function pg(e,n,a,l){var u=(u=xe.current)?Rl(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=Qa(a.href),a=fa(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=Qa(a.href);var f=fa(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(Is(e)))&&!f._p&&(y.instance=f,y.state.loading=5),Wt.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Wt.set(e,a),f||BS(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=Ga(a),a=fa(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 Qa(e){return'href="'+Kt(e)+'"'}function Is(e){return'link[rel="stylesheet"]['+e+"]"}function gg(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function BS(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}),mt(n,"link",a),lt(n),e.head.appendChild(n))}function Ga(e){return'[src="'+Kt(e)+'"]'}function Ws(e){return"script[async]"+e}function yg(e,n,a){if(n.count++,n.instance===null)switch(n.type){case"style":var l=e.querySelector('style[data-href~="'+Kt(a.href)+'"]');if(l)return n.instance=l,lt(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"),lt(l),mt(l,"style",u),Cl(l,a.precedence,e),n.instance=l;case"stylesheet":u=Qa(a.href);var f=e.querySelector(Is(u));if(f)return n.state.loading|=4,n.instance=f,lt(f),f;l=gg(a),(u=Wt.get(u))&&Pc(l,u),f=(e.ownerDocument||e).createElement("link"),lt(f);var y=f;return y._p=new Promise(function(_,O){y.onload=_,y.onerror=O}),mt(f,"link",l),n.state.loading|=4,Cl(f,a.precedence,e),n.instance=f;case"script":return f=Ga(a.src),(u=e.querySelector(Ws(f)))?(n.instance=u,lt(u),u):(l=a,(u=Wt.get(f))&&(l=v({},a),Xc(l,u)),e=e.ownerDocument||e,u=e.createElement("script"),lt(u),mt(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 Pc(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Xc(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 vg(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[ps]||f[ct]||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 bg(e,n,a){e=e.ownerDocument||e,e.head.insertBefore(a,n==="title"?e.querySelector("head > title"):null)}function $S(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 xg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function HS(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=Qa(l.href),f=n.querySelector(Is(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,lt(f);return}f=n.ownerDocument||n,l=gg(l),(u=Wt.get(u))&&Pc(l,u),f=f.createElement("link"),lt(f);var y=f;y._p=new Promise(function(_,O){y.onload=_,y.onerror=O}),mt(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 Jc=0;function QS(e,n){return e.stylesheets&&e.count===0&&Ul(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&Ul(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+n);0<e.imgBytes&&Jc===0&&(Jc=62500*wS());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ul(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Jc?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)Ul(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var kl=null;function Ul(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,kl=new Map,n.forEach(GS,e),kl=null,Dl.call(e))}function GS(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:H,Provider:null,Consumer:null,_currentValue:B,_currentValue2:B,_threadCount:0};function KS(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=Yo(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Yo(0),this.hiddenUpdates=Yo(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 Sg(e,n,a,l,u,f,y,_,O,D,$,K){return e=new KS(e,n,a,y,O,D,$,K,_),n=1,f===!0&&(n|=24),f=Ut(3,null,null,n),e.current=f,f.stateNode=e,n=Au(),n.refCount++,e.pooledCache=n,n.refCount++,f.memoizedState={element:l,isDehydrated:a,cache:n},Du(f),e}function _g(e){return e?(e=Sa,e):Sa}function wg(e,n,a,l,u,f){u=_g(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=ei(e,l,n),a!==null&&(Tt(a,e,n),Cs(a,e,n))}function Eg(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<n?a:n}}function Ic(e,n){Eg(e,n),(e=e.alternate)&&Eg(e,n)}function Og(e){if(e.tag===13||e.tag===31){var n=Li(e,67108864);n!==null&&Tt(n,e,67108864),Ic(e,67108864)}}function jg(e){if(e.tag===13||e.tag===31){var n=$t();n=Fo(n);var a=Li(e,n);a!==null&&Tt(a,e,n),Ic(e,n)}}var Ll=!0;function YS(e,n,a,l){var u=M.T;M.T=null;var f=I.p;try{I.p=2,Wc(e,n,a,l)}finally{I.p=f,M.T=u}}function FS(e,n,a,l){var u=M.T;M.T=null;var f=I.p;try{I.p=8,Wc(e,n,a,l)}finally{I.p=f,M.T=u}}function Wc(e,n,a,l){if(Ll){var u=ef(l);if(u===null)qc(e,n,l,Zl,a),Tg(e,l);else if(PS(u,e,n,a,l))l.stopPropagation();else if(Tg(e,l),n&4&&-1<VS.indexOf(e)){for(;u!==null;){var f=ca(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var y=Ci(f.pendingLanes);if(y!==0){var _=f;for(_.pendingLanes|=2,_.entangledLanes|=2;y;){var O=1<<31-Dt(y);_.entanglements[1]|=O,y&=~O}mn(f),(Ne&6)===0&&(xl=Ct()+500,Vs(0))}}break;case 31:case 13:_=Li(f,2),_!==null&&Tt(_,f,2),_l(),Ic(f,2)}if(f=ef(l),f===null&&qc(e,n,l,Zl,a),f===u)break;u=f}u!==null&&l.stopPropagation()}else qc(e,n,l,null,a)}}function ef(e){return e=nu(e),tf(e)}var Zl=null;function tf(e){if(Zl=null,e=ua(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(M0()){case kd:return 2;case Ud:return 8;case zr:case D0:return 32;case Ld:return 268435456;default:return 32}default:return 32}}var nf=!1,fi=null,di=null,hi=null,tr=new Map,nr=new Map,mi=[],VS="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":fi=null;break;case"dragenter":case"dragleave":di=null;break;case"mouseover":case"mouseout":hi=null;break;case"pointerover":case"pointerout":tr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":nr.delete(n.pointerId)}}function ir(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=ca(n),n!==null&&Og(n)),e):(e.eventSystemFlags|=l,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function PS(e,n,a,l,u){switch(n){case"focusin":return fi=ir(fi,e,n,a,l,u),!0;case"dragenter":return di=ir(di,e,n,a,l,u),!0;case"mouseover":return hi=ir(hi,e,n,a,l,u),!0;case"pointerover":var f=u.pointerId;return tr.set(f,ir(tr.get(f)||null,e,n,a,l,u)),!0;case"gotpointercapture":return f=u.pointerId,nr.set(f,ir(nr.get(f)||null,e,n,a,l,u)),!0}return!1}function Ng(e){var n=ua(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,Qd(e.priority,function(){jg(a)});return}}else if(n===31){if(n=h(a),n!==null){e.blockedOn=n,Qd(e.priority,function(){jg(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=ef(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);tu=l,a.target.dispatchEvent(l),tu=null}else return n=ca(a),n!==null&&Og(n),e.blockedOn=a,!1;n.shift()}return!0}function Ag(e,n,a){ql(e)&&a.delete(n)}function XS(){nf=!1,fi!==null&&ql(fi)&&(fi=null),di!==null&&ql(di)&&(di=null),hi!==null&&ql(hi)&&(hi=null),tr.forEach(Ag),nr.forEach(Ag)}function Bl(e,n){e.blockedOn===n&&(e.blockedOn=null,nf||(nf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,XS)))}var $l=null;function Rg(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(tf(l||a)===null)continue;break}var f=ca(a);f!==null&&(e.splice(n,3),n-=3,ec(f,{pending:!0,data:u,method:a.method,action:l},l,u))}}))}function Ka(e){function n(O){return Bl(O,e)}fi!==null&&Bl(fi,e),di!==null&&Bl(di,e),hi!==null&&Bl(hi,e),tr.forEach(n),nr.forEach(n);for(var a=0;a<mi.length;a++){var l=mi[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<mi.length&&(a=mi[0],a.blockedOn===null);)Ng(a),a.blockedOn===null&&mi.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[_t]||null;if(typeof f=="function")y||Rg(a);else if(y){var _=null;if(f&&f.hasAttribute("formAction")){if(u=f,y=f[_t]||null)_=y.formAction;else if(tf(u)!==null)continue}else _=y.action;typeof _=="function"?a[l+1]=_:(a.splice(l,3),l-=3),Rg(a)}}}function Cg(){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 af(e){this._internalRoot=e}Hl.prototype.render=af.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var a=n.current,l=$t();wg(a,l,e,n,null,null)},Hl.prototype.unmount=af.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;wg(e.current,2,null,e,null,null),_l(),n[oa]=null}};function Hl(e){this._internalRoot=e}Hl.prototype.unstable_scheduleHydration=function(e){if(e){var n=Hd();e={blockedOn:null,target:e,priority:n};for(var a=0;a<mi.length&&n!==0&&n<mi[a].priority;a++);mi.splice(a,0,e),a===0&&Ng(e)}};var Mg=i.version;if(Mg!=="19.2.8")throw Error(r(527,Mg,"19.2.8"));I.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=p(n),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var JS={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ql=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ql.isDisabled&&Ql.supportsFiber)try{ds=Ql.inject(JS),Mt=Ql}catch{}}return sr.createRoot=function(e,n){if(!o(e))throw Error(r(299));var a=!1,l="",u=Bm,f=$m,y=Hm;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=Sg(e,1,!1,null,null,a,l,null,u,f,y,Cg),e[oa]=n.current,Zc(e),new af(n)},sr.hydrateRoot=function(e,n,a){if(!o(e))throw Error(r(299));var l=!1,u="",f=Bm,y=$m,_=Hm,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=Sg(e,1,!0,n,a??null,l,u,O,f,y,_,Cg),n.context=_g(null),a=n.current,l=$t(),l=Fo(l),u=Wn(l),u.callback=null,ei(a,u,l),a=l,n.current.lanes=a,ms(n,a),mn(n),e[oa]=n.current,Zc(e),new Hl(n)},sr.version="19.2.8",sr}var Qg;function l_(){if(Qg)return lf.exports;Qg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),lf.exports=r_(),lf.exports}var o_=l_();const Ev=W.createContext(void 0),ia=t=>{const i=W.useContext(Ev);if(!i)throw new Error("No QueryClient set, use QueryClientProvider to set one");return i},u_=({client:t,children:i})=>(W.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx(Ev.Provider,{value:t,children:i})),c_={setTimeout:(t,i)=>setTimeout(t,i),clearTimeout:t=>clearTimeout(t),setInterval:(t,i)=>setInterval(t,i),clearInterval:t=>clearInterval(t)};var f_=class{#e=c_;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,i){return this.#e.setTimeout(t,i)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,i){return this.#e.setInterval(t,i)}clearInterval(t){this.#e.clearInterval(t)}};const Xi=new f_;function d_(t){setTimeout(t,0)}const h_=typeof window>"u"||"Deno"in globalThis;function xt(){}function m_(t,i){return typeof t=="function"?t(i):t}function Rf(t){return typeof t=="number"&&t>=0&&t!==1/0}function Ov(t,i){return Math.max(t+(i||0)-Date.now(),0)}function Bn(t,i){return typeof t=="function"?t(i):t}function Ht(t,i){return typeof t=="function"?t(i):t}function Gg(t,i){const{type:s="all",exact:r,fetchStatus:o,predicate:c,queryKey:d,stale:h}=t;if(d){if(r){if(i.queryHash!==ed(d,i.options))return!1}else if(!es(i.queryKey,d))return!1}if(s!=="all"){const m=i.isActive();if(s==="active"&&!m||s==="inactive"&&m)return!1}return!(typeof h=="boolean"&&i.isStale()!==h||o&&o!==i.state.fetchStatus||c&&!c(i))}function Kg(t,i){const{exact:s,status:r,predicate:o,mutationKey:c}=t;if(c){if(!i.options.mutationKey)return!1;if(s){if(ea(i.options.mutationKey)!==ea(c))return!1}else if(!es(i.options.mutationKey,c))return!1}return!(r&&i.state.status!==r||o&&!o(i))}function ed(t,i){return(i?.queryKeyHashFn||ea)(t)}function ea(t){return JSON.stringify(t,(i,s)=>Cf(s)?Object.keys(s).sort().reduce((r,o)=>(r[o]=s[o],r),{}):s)}function es(t,i){if(t===i)return!0;if(typeof t!=typeof i)return!1;if(t&&i&&typeof t=="object"&&typeof i=="object"){if(Array.isArray(t)&&Array.isArray(i)){for(let r=0;r<i.length;r++)if(!es(t[r],i[r]))return!1;return!0}const s=Object.keys(i);for(const r of s)if(!es(t[r],i[r]))return!1;return!0}return!1}const p_=Object.prototype.hasOwnProperty;function jv(t,i,s=0){if(t===i)return t;if(s>500)return i;const r=Yg(t)&&Yg(i);if(!r&&!(Cf(t)&&Cf(i)))return i;const o=(r?t:Object.keys(t)).length,c=r?i:Object.keys(i),d=c.length,h=r?new Array(d):{};let m=0;for(let p=0;p<d;p++){const b=r?p:c[p],v=t[b],x=i[b];if(v===x){h[b]=v,(r?p<o:p_.call(t,b))&&m++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[b]=x;continue}const S=jv(v,x,s+1);h[b]=S,S===v&&m++}return o===d&&m===o?t:h}function ho(t,i){if(!i||Object.keys(t).length!==Object.keys(i).length)return!1;for(const s in t)if(t[s]!==i[s])return!1;return!0}function Yg(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Cf(t){if(!Fg(t))return!1;const i=t.constructor;if(i===void 0)return!0;const s=i.prototype;return!(!Fg(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function Fg(t){return Object.prototype.toString.call(t)==="[object Object]"}function g_(t){return new Promise(i=>{Xi.setTimeout(i,t)})}function Mf(t,i,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,i):s.structuralSharing!==!1?jv(t,i):i}function y_(t,i,s=0){const r=[...t,i];return s&&r.length>s?r.slice(1):r}function v_(t,i,s=0){const r=[i,...t];return s&&r.length>s?r.slice(0,-1):r}const td=Symbol();function zv(t,i){return!t.queryFn&&i?.initialPromise?()=>i.initialPromise:!t.queryFn||t.queryFn===td?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function nd(t,i){return typeof t=="function"?t(...i):!!t}function b_(t,i,s){let r=!1,o;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(o??=i(),r||(r=!0,o.aborted?s():o.addEventListener("abort",s,{once:!0})),o)}),t}const mo=(()=>{let t=()=>h_;return{isServer(){return t()},setIsServer(i){t=i}}})();var ls=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(){}},x_=class extends ls{#e;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t();return window.addEventListener("visibilitychange",i,!1),()=>{window.removeEventListener("visibilitychange",i)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(i=>{i(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const id=new x_,S_=d_;function __(){let t=[],i=0,s=h=>{h()},r=h=>{h()},o=S_;const c=h=>{i?t.push(h):o(()=>{s(h)})},d=()=>{const h=t;t=[],h.length&&o(()=>{r(()=>{h.forEach(m=>{s(m)})})})};return{batch:h=>{let m;i++;try{m=h()}finally{i--,i||d()}return m},batchCalls:h=>(...m)=>{c(()=>{h(...m)})},schedule:c,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{r=h},setScheduler:h=>{o=h}}}const st=__();var w_=class extends ls{#e=!0;#t;#n;constructor(){super(),this.#n=t=>{if(typeof window<"u"&&window.addEventListener){const i=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",i,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",i),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#n=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(i=>{i(t)}))}isOnline(){return this.#e}};const po=new w_;function E_(t){return Math.min(1e3*2**t,3e4)}function Tv(t){return(t??"online")==="online"?po.isOnline():!0}var Df=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function Nv(t){let i=!1,s=0,r,o="pending",c,d;const h=new Promise((U,H)=>{c=U,d=H});h.catch(xt);const m=()=>o!=="pending",p=U=>{if(!m()){const H=new Df(U);E(H),t.onCancel?.(H)}},b=()=>{i=!0},v=()=>{i=!1},x=()=>id.isFocused()&&(t.networkMode==="always"||po.isOnline())&&t.canRun(),S=()=>Tv(t.networkMode)&&t.canRun(),w=U=>{m()||(r?.(),o="resolved",c(U))},E=U=>{m()||(r?.(),o="rejected",d(U))},z=()=>new Promise(U=>{r=H=>{(m()||x())&&U(H)},t.onPause?.()}).then(()=>{r=void 0,m()||t.onContinue?.()}),A=()=>{if(m())return;let U;const H=s===0?t.initialPromise:void 0;try{U=H??t.fn()}catch(V){U=Promise.reject(V)}Promise.resolve(U).then(w).catch(V=>{if(m())return;const J=t.retry??(mo.isServer()?0:3),L=t.retryDelay??E_,R=typeof L=="function"?L(s,V):L,X=J===!0||typeof J=="number"&&s<J||typeof J=="function"&&J(s,V);if(i||!X){E(V);return}s++,t.onFail?.(s,V),g_(R).then(()=>x()?void 0:z()).then(()=>{i?E(V):A()})})};return{promise:h,status:()=>o,cancel:p,continue:()=>(r?.(),h),cancelRetry:b,continueRetry:v,canStart:S,start:()=>(S()?A():z().then(A),h)}}var Av=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rf(this.gcTime)&&(this.#e=Xi.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&&(Xi.clearTimeout(this.#e),this.#e=void 0)}};function O_(t){return{onFetch:(i,s)=>{const r=i.options,o=i.fetchOptions?.meta?.fetchMore?.direction,c=i.state.data?.pages||[],d=i.state.data?.pageParams||[];let h={pages:[],pageParams:[]},m=0;const p=async()=>{let b=!1;const v=w=>{b_(w,()=>i.signal,()=>b=!0)},x=zv(i.options,i.fetchOptions),S=async(w,E,z)=>{if(b)return Promise.reject(i.signal.reason);if(E==null&&w.pages.length)return Promise.resolve(w);const U=(()=>{const L={client:i.client,queryKey:i.queryKey,pageParam:E,direction:z?"backward":"forward",meta:i.options.meta};return v(L),L})(),H=await x(U),{maxPages:V}=i.options,J=z?v_:y_;return{pages:J(w.pages,H,V),pageParams:J(w.pageParams,E,V)}};if(o&&c.length){const w=o==="backward",E=w?j_:Vg,z={pages:c,pageParams:d};h=await S(z,E(r,z),w)}else{const w=t??c.length;do{const E=m===0?d[0]??r.initialPageParam:Vg(r,h);if(m>0&&E==null)break;h=await S(h,E),m++}while(m<w)}return h};i.options.persister?i.fetchFn=()=>i.options.persister?.(p,{client:i.client,queryKey:i.queryKey,meta:i.options.meta,signal:i.signal},s):i.fetchFn=p}}}function Vg(t,{pages:i,pageParams:s}){const r=i.length-1;return i.length>0?t.getNextPageParam(i[r],i,s[r],s):void 0}function j_(t,{pages:i,pageParams:s}){return i.length>0?t.getPreviousPageParam?.(i[0],i,s[0],s):void 0}var z_=class extends Av{#e;#t;#n;#i;#s;#a;#r;#o;constructor(t){super(),this.#o=!1,this.#r=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#s=t.client,this.#i=this.#s.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=Xg(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(t){if(this.options={...this.#r,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const i=Xg(this.options);i.data!==void 0&&(this.setState(Pg(i.data,i.dataUpdatedAt)),this.#t=i)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#i.remove(this)}setData(t,i){const s=Mf(this.state.data,t,this.options);return this.#l({data:s,type:"success",dataUpdatedAt:i?.updatedAt,manual:i?.manual}),s}setState(t){this.#l({type:"setState",state:t})}cancel(t){const i=this.#a?.promise;return this.#a?.cancel(t),i?i.then(xt).catch(xt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>Ht(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===td||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Bn(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:!Ov(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const i=this.observers.indexOf(t);i!==-1&&(this.observers.splice(i,1),this.observers.length||(this.#a&&(this.#o||this.#u()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#i.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}#u(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"}invalidate(){this.state.isInvalidated||this.#l({type:"invalidate"})}async fetch(t,i){if(this.state.fetchStatus!=="idle"&&this.#a?.status()!=="rejected"){if(this.state.data!==void 0&&i?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(t&&this.setOptions(t),!this.options.queryFn){const m=this.observers.find(p=>p.options.queryFn);m&&this.setOptions(m.options)}const s=new AbortController,r=m=>{Object.defineProperty(m,"signal",{enumerable:!0,get:()=>(this.#o=!0,s.signal)})},o=()=>{const m=zv(this.options,i),b=(()=>{const v={client:this.#s,queryKey:this.queryKey,meta:this.meta};return r(v),v})();return this.#o=!1,this.options.persister?this.options.persister(m,b,this):m(b)},d=(()=>{const m={fetchOptions:i,options:this.options,queryKey:this.queryKey,client:this.#s,state:this.state,fetchFn:o};return r(m),m})();(this.#e==="infinite"?O_(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=Nv({initialPromise:i?.initialPromise,fn:d.fetchFn,onCancel:m=>{m instanceof Df&&m.revert&&this.setState({...this.#n,fetchStatus:"idle"}),s.abort()},onFail:(m,p)=>{this.#l({type:"failed",failureCount:m,error:p})},onPause:()=>{this.#l({type:"pause"})},onContinue:()=>{this.#l({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0});try{const m=await h.start();if(m===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(m),this.#i.config.onSuccess?.(m,this),this.#i.config.onSettled?.(m,this.state.error,this),m}catch(m){if(m instanceof Df){if(m.silent)return this.#a.promise;if(m.revert){if(this.state.data===void 0)throw m;return this.state.data}}throw this.#l({type:"error",error:m}),this.#i.config.onError?.(m,this),this.#i.config.onSettled?.(this.state.data,m,this),m}finally{this.#a===h&&(this.#a=void 0),this.scheduleGc()}}#l(t){const i=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Rv(s.data,this.options),fetchMeta:t.meta??null};case"success":const r={...s,...Pg(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#n=t.manual?r:void 0,r;case"error":const o=t.error;return{...s,error:o,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=i(this.state),st.batch(()=>{this.observers.slice().forEach(s=>{s.onQueryUpdate()}),this.#i.notify({query:this,type:"updated",action:t})})}};function Rv(t,i){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Tv(i.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Pg(t,i){return{data:t,dataUpdatedAt:i??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Xg(t){const i=typeof t.initialData=="function"?t.initialData():t.initialData,s=i!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:i,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var T_=class extends ls{#e;#t=void 0;#n=void 0;#i=void 0;#s;#a;#r;#o;#u;#l;#f;#d;#c;#m=new Set;constructor(t,i){super(),this.options=i,this.#e=t,this.#r=null,this.bindMethods(),this.setOptions(i)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Jg(this.#t,this.options)?this.#h():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return kf(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return kf(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(t){const i=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Ht(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#S(),this.#t.setOptions(this.options),i._defaulted&&!ho(this.options,i)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const r=this.hasListeners();r&&Ig(this.#t,s,this.options,i)&&this.#h(),this.updateResult(),r&&(this.#t!==s||Ht(this.options.enabled,this.#t)!==Ht(i.enabled,this.#t)||Bn(this.options.staleTime,this.#t)!==Bn(i.staleTime,this.#t))&&this.#p();const o=this.#g();r&&(this.#t!==s||Ht(this.options.enabled,this.#t)!==Ht(i.enabled,this.#t)||o!==this.#c)&&this.#y(o)}getOptimisticResult(t){const i=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(i,t);return A_(this,s)&&(this.#i=s,this.#a=this.options,this.#s=this.#t.state),s}getCurrentResult(){return this.#i}trackResult(t,i){return new Proxy(t,{get:(s,r)=>(this.trackProp(r),i?.(r),Reflect.get(s,r))})}trackProp(t){this.#m.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const i=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,i);let r=()=>{},o;const c=new Promise(d=>{o=d,r=this.#e.getQueryCache().subscribe(h=>{h.type==="updated"&&h.query.queryHash===s.queryHash&&s.state.data!==void 0&&(r(),d(this.createResult(s,i)))})});return Promise.race([s.fetch().then(()=>{const d=this.createResult(s,i);return o?.(d),d}).finally(()=>{r()}),c])}fetch(t){return this.#h({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#h(t){this.#S();let i=this.#t.fetch(this.options,t);return t?.throwOnError||(i=i.catch(xt)),i}#p(){this.#b();const t=Bn(this.options.staleTime,this.#t);if(mo.isServer()||this.#i.isStale||!Rf(t))return;const i=Ov(this.#i.dataUpdatedAt,t)+1;this.#f=Xi.setTimeout(()=>{this.#i.isStale||this.updateResult()},i)}#g(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(t){this.#x(),this.#c=t,!(mo.isServer()||Ht(this.options.enabled,this.#t)===!1||!Rf(this.#c)||this.#c===0)&&(this.#d=Xi.setInterval(()=>{(this.options.refetchIntervalInBackground||id.isFocused())&&this.#h()},this.#c))}#v(){this.#p(),this.#y(this.#g())}#b(){this.#f!==void 0&&(Xi.clearTimeout(this.#f),this.#f=void 0)}#x(){this.#d!==void 0&&(Xi.clearInterval(this.#d),this.#d=void 0)}createResult(t,i){const s=this.#t,r=this.options,o=this.#i,c=this.#s,d=this.#a,h=t!==s?t.state:this.#n,{state:m}=t;let p={...m},b=!1,v;if(i._optimisticResults){const J=this.hasListeners(),L=!J&&Jg(t,i),R=J&&Ig(t,s,i,r);(L||R)&&(p={...p,...Rv(m.data,t.options)}),i._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:w}=p;v=p.data;let E=!1;if(i.placeholderData!==void 0&&v===void 0&&w==="pending"){let J;o?.isPlaceholderData&&i.placeholderData===d?.placeholderData?(J=o.data,E=!0):J=typeof i.placeholderData=="function"?i.placeholderData(this.#l?.state.data,this.#l):i.placeholderData,J!==void 0&&(w="success",v=Mf(o?.data,J,i),b=!0)}if(i.select&&v!==void 0&&!E)if(o&&v===c?.data&&i.select===this.#o)v=this.#u;else try{this.#o=i.select,v=i.select(v),v=Mf(o?.data,v,i),this.#u=v,this.#r=null}catch(J){this.#r=J}else v===void 0&&(this.#r=null);this.#r&&(x=this.#r,v=this.#u,S=Date.now(),w="error",b=!1);const z=p.fetchStatus==="fetching",A=w==="pending",U=w==="error",H=A&&z,V=v!==void 0;return{status:w,fetchStatus:p.fetchStatus,isPending:A,isSuccess:w==="success",isError:U,isInitialLoading:H,isLoading:H,data:v,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:z,isRefetching:z&&!A,isLoadingError:U&&!V,isPaused:p.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:U&&V,isStale:ad(t,i),refetch:this.refetch,isEnabled:Ht(i.enabled,t)!==!1}}updateResult(){const t=this.#i,i=this.createResult(this.#t,this.options);if(this.#s=this.#t.state,this.#a=this.options,this.#s.data!==void 0&&(this.#l=this.#t),ho(i,t))return;this.#i=i;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#m.size)return!0;const c=new Set(o??this.#m);return this.options.throwOnError&&c.add("error"),Object.keys(this.#i).some(d=>{const h=d;return this.#i[h]!==t[h]&&c.has(h)})};this.#_({listeners:s()})}#S(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const i=this.#t;this.#t=t,this.#n=t.state,this.hasListeners()&&(i?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#v()}#_(t){st.batch(()=>{t.listeners&&this.listeners.forEach(i=>{i(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function N_(t,i){return Ht(i.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&Ht(i.retryOnMount,t)===!1)}function Jg(t,i){return N_(t,i)||t.state.data!==void 0&&kf(t,i,i.refetchOnMount)}function kf(t,i,s){if(Ht(i.enabled,t)!==!1&&Bn(i.staleTime,t)!=="static"){const r=typeof s=="function"?s(t):s;return r==="always"||r!==!1&&ad(t,i)}return!1}function Ig(t,i,s,r){return(t!==i||Ht(r.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&ad(t,s)}function ad(t,i){return Ht(i.enabled,t)!==!1&&t.isStaleByTime(Bn(i.staleTime,t))}function A_(t,i){return!ho(t.getCurrentResult(),i)}var R_=class extends Av{#e;#t;#n;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#n=t.mutationCache,this.#t=[],this.state=t.state||Cv(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(i=>i!==t),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#i?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const i=()=>{this.#s({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#i=Nv({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(d,h)=>{this.#s({type:"failed",failureCount:d,error:h})},onPause:()=>{this.#s({type:"pause"})},onContinue:i,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),o=this.state.status==="pending",c=!r.canStart();try{if(o)i();else{this.#s({type:"pending",variables:t,isPaused:c}),this.#n.config.onMutate&&await this.#n.config.onMutate(t,this,s);const h=await this.options.onMutate?.(t,s);h!==this.state.context&&this.#s({type:"pending",context:h,variables:t,isPaused:c})}const d=await r.start();return await this.#n.config.onSuccess?.(d,t,this.state.context,this,s),await this.options.onSuccess?.(d,t,this.state.context,s),await this.#n.config.onSettled?.(d,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(d,null,t,this.state.context,s),this.#s({type:"success",data:d}),d}catch(d){try{await this.#n.config.onError?.(d,t,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onError?.(d,t,this.state.context,s)}catch(h){Promise.reject(h)}try{await this.#n.config.onSettled?.(void 0,d,this.state.variables,this.state.context,this,s)}catch(h){Promise.reject(h)}try{await this.options.onSettled?.(void 0,d,t,this.state.context,s)}catch(h){Promise.reject(h)}throw this.#s({type:"error",error:d}),d}finally{this.#i===r&&(this.#i=void 0),this.#n.runNext(this)}}#s(t){const i=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=i(this.state),st.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#n.notify({mutation:this,type:"updated",action:t})})}};function Cv(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var C_=class extends ls{#e;#t;#n;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#n=0}build(t,i,s){const r=new R_({client:t,mutationCache:this,mutationId:++this.#n,options:t.defaultMutationOptions(i),state:s});return this.add(r),r}add(t){this.#e.add(t);const i=Gl(t);if(typeof i=="string"){const s=this.#t.get(i);s?s.push(t):this.#t.set(i,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const i=Gl(t);if(typeof i=="string"){const s=this.#t.get(i);if(s)if(s.length>1){const r=s.indexOf(t);r!==-1&&s.splice(r,1)}else s[0]===t&&this.#t.delete(i)}}this.notify({type:"removed",mutation:t})}canRun(t){const i=Gl(t);if(typeof i=="string"){const s=this.#t.get(i)?.find(r=>r.state.status==="pending");return!s||s===t}else return!0}runNext(t){const i=Gl(t);return typeof i=="string"?this.#t.get(i)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){st.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const i={exact:!0,...t};return this.getAll().find(s=>Kg(i,s))}findAll(t={}){return this.getAll().filter(i=>Kg(t,i))}notify(t){st.batch(()=>{this.listeners.forEach(i=>{i(t)})})}resumePausedMutations(){const t=this.getAll().filter(i=>i.state.isPaused);return st.batch(()=>Promise.all(t.map(i=>i.continue().catch(xt))))}};function Gl(t){return t.options.scope?.id}var M_=class extends ls{#e;#t=void 0;#n;#i;constructor(i,s){super(),this.#e=i,this.setOptions(s),this.bindMethods(),this.#s()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(i){const s=this.options;this.options=this.#e.defaultMutationOptions(i),ho(this.options,s)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),s?.mutationKey&&this.options.mutationKey&&ea(s.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.#s())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(i){this.#s(),this.#a(i)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#s(),this.#a()}mutate(i,s){return this.#i=s,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(i)}#s(){const i=this.#n?.state??Cv();this.#t={...i,isPending:i.status==="pending",isSuccess:i.status==="success",isError:i.status==="error",isIdle:i.status==="idle",mutate:this.mutate,reset:this.reset}}#a(i){st.batch(()=>{if(this.#i&&this.hasListeners()){const s=this.#t.variables,r=this.#t.context,o={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(i?.type==="success"){try{this.#i.onSuccess?.(i.data,s,r,o)}catch(c){Promise.reject(c)}try{this.#i.onSettled?.(i.data,null,s,r,o)}catch(c){Promise.reject(c)}}else if(i?.type==="error"){try{this.#i.onError?.(i.error,s,r,o)}catch(c){Promise.reject(c)}try{this.#i.onSettled?.(void 0,i.error,s,r,o)}catch(c){Promise.reject(c)}}}this.listeners.forEach(s=>{s(this.#t)})})}},D_=class extends ls{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,i,s){const r=i.queryKey,o=i.queryHash??ed(r,i);let c=this.get(o);return c||(c=new z_({client:t,queryKey:r,queryHash:o,options:t.defaultQueryOptions(i),state:s,defaultOptions:t.getQueryDefaults(r)}),this.add(c)),c}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const i=this.#e.get(t.queryHash);i&&(t.destroy(),i===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){st.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const i={exact:!0,...t};return this.getAll().find(s=>Gg(i,s))}findAll(t={}){const i=this.getAll();return Object.keys(t).length>0?i.filter(s=>Gg(t,s)):i}notify(t){st.batch(()=>{this.listeners.forEach(i=>{i(t)})})}onFocus(){st.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){st.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},k_=class{#e;#t;#n;#i;#s;#a;#r;#o;constructor(t={}){this.#e=t.queryCache||new D_,this.#t=t.mutationCache||new C_,this.#n=t.defaultOptions||{},this.#i=new Map,this.#s=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#r=id.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 i=this.defaultQueryOptions({queryKey:t});return this.#e.get(i.queryHash)?.state.data}ensureQueryData(t){const i=this.defaultQueryOptions(t),s=this.#e.build(this,i),r=s.state.data;return r===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(Bn(i.staleTime,s))&&this.prefetchQuery(i),Promise.resolve(r))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:i,state:s})=>[i,s.data])}setQueryData(t,i,s){const r=this.defaultQueryOptions({queryKey:t}),o=this.#e.get(r.queryHash)?.state.data,c=m_(i,o);if(c!==void 0)return this.#e.build(this,r).setData(c,{...s,manual:!0})}setQueriesData(t,i,s){return st.batch(()=>this.#e.findAll(t).map(({queryKey:r})=>[r,this.setQueryData(r,i,s)]))}getQueryState(t){const i=this.defaultQueryOptions({queryKey:t});return this.#e.get(i.queryHash)?.state}removeQueries(t){const i=this.#e;st.batch(()=>{i.findAll(t).forEach(s=>{i.remove(s)})})}resetQueries(t,i){const s=this.#e;return st.batch(()=>{const r=s.findAll(t),o=new Set(r);return r.forEach(c=>{c.reset()}),this.refetchQueries({type:"active",predicate:c=>o.has(c)},i)})}cancelQueries(t,i={}){const s={revert:!0,...i},r=st.batch(()=>this.#e.findAll(t).map(o=>o.cancel(s)));return Promise.all(r).then(xt).catch(xt)}invalidateQueries(t,i={}){return st.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},i)))}refetchQueries(t,i={}){const s={...i,cancelRefetch:i.cancelRefetch??!0},r=st.batch(()=>this.#e.findAll(t).filter(o=>!o.isDisabled()&&!o.isStatic()).map(o=>{let c=o.fetch(void 0,s);return s.throwOnError||(c=c.catch(xt)),o.state.fetchStatus==="paused"?Promise.resolve():c}));return Promise.all(r).then(xt)}async query(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i),r=s.isStaleByTime(Bn(i.staleTime,s))?await s.fetch(i):s.state.data,o=i.select;return o?o(r):r}fetchQuery(t){const i=this.defaultQueryOptions(t);i.retry===void 0&&(i.retry=!1);const s=this.#e.build(this,i);return s.isStaleByTime(Bn(i.staleTime,s))?s.fetch(i):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(xt).catch(xt)}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(xt).catch(xt)}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,i){this.#i.set(ea(t),{queryKey:t,defaultOptions:i})}getQueryDefaults(t){const i=[...this.#i.values()],s={};return i.forEach(r=>{es(t,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(t,i){this.#s.set(ea(t),{mutationKey:t,defaultOptions:i})}getMutationDefaults(t){const i=[...this.#s.values()],s={};return i.forEach(r=>{es(t,r.mutationKey)&&Object.assign(s,r.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const i={...this.#n.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return i.queryHash||(i.queryHash=ed(i.queryKey,i)),i.refetchOnReconnect===void 0&&(i.refetchOnReconnect=i.networkMode!=="always"),i.throwOnError===void 0&&(i.throwOnError=!!i.suspense),!i.networkMode&&i.persister&&(i.networkMode="offlineFirst"),i.queryFn===td&&(i.enabled=!1),i}defaultMutationOptions(t){return t?._defaulted?t:{...this.#n.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const Mv=W.createContext(!1),U_=()=>W.useContext(Mv);Mv.Provider;function L_(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const Z_=W.createContext(L_()),q_=()=>W.useContext(Z_),B_=(t,i,s)=>{const r=s?.state.error&&typeof t.throwOnError=="function"?nd(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||r)&&(i.isReset()||(t.retryOnMount=!1))},$_=t=>{W.useEffect(()=>{t.clearReset()},[t])},H_=({result:t,errorResetBoundary:i,throwOnError:s,query:r,suspense:o})=>t.isError&&!i.isReset()&&!t.isFetching&&r&&(o&&t.data===void 0||nd(s,[t.error,r])),Q_=t=>{if(t.suspense){const s=o=>o==="static"?o:Math.max(o??1e3,1e3),r=t.staleTime;t.staleTime=typeof r=="function"?(...o)=>s(r(...o)):s(r),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},G_=(t,i)=>t?.suspense&&i.isPending,K_=(t,i,s)=>i.fetchOptimistic(t).catch(()=>{s.clearReset()});function Y_(t,i,s){const r=U_(),o=q_(),c=ia(),d=c.defaultQueryOptions(t),h=c.getQueryCache().get(d.queryHash),m=t.subscribed!==!1;d._optimisticResults=r?"isRestoring":m?"optimistic":void 0,Q_(d),B_(d,o,h),$_(o);const[p]=W.useState(()=>new i(c,d)),b=p.getOptimisticResult(d),v=!r&&m;if(W.useSyncExternalStore(W.useCallback(x=>{const S=v?p.subscribe(st.batchCalls(x)):xt;return p.updateResult(),S},[p,v]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),W.useEffect(()=>{p.setOptions(d)},[d,p]),G_(d,b))throw K_(d,p,o);if(H_({result:b,errorResetBoundary:o,throwOnError:d.throwOnError,query:h,suspense:d.suspense}))throw b.error;return d.notifyOnChangeProps?b:p.trackResult(b)}function en(t,i){return Y_(t,T_)}function os(t,i){const s=ia(),[r]=W.useState(()=>new M_(s,t));W.useEffect(()=>{r.setOptions(t)},[r,t]);const o=W.useSyncExternalStore(W.useCallback(d=>r.subscribe(st.batchCalls(d)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),c=W.useCallback((...d)=>{r.mutate(d[0],d[1]).catch(xt)},[r]);if(o.error&&nd(r.options.throwOnError,[o.error]))throw o.error;return{...o,mutate:c,mutateAsync:o.mutate}}const Wg=!1;var Dv=W.useLayoutEffect;function _i(t){return t[t.length-1]}function kv(t,i){return typeof t=="function"?t(i):t}const sd=Object.prototype.hasOwnProperty;function Uv(t){for(const i in t)if(sd.call(t,i))return!0;return!1}const so=()=>Object.create(null),Ya=(t,i)=>xi(t,i,!0);function xi(t,i,s,r=0){if(t===i)return t;if(r++>500)return i;const o=Array.isArray(t)&&Array.isArray(i);if(!o&&!(go(t)&&go(i)))return i;const c=Object.keys(t),d=c.length,h=Object.keys(i),m=h.length;if(o?d!==t.length||m!==i.length||d&&_i(c)!==`${d-1}`||m&&_i(h)!==`${m-1}`:d!==Object.getOwnPropertyNames(t).length||m!==Object.getOwnPropertyNames(i).length||Object.getOwnPropertySymbols(i).length)return i;let p=0,b,v,x;if(o){for(;p<m&&(x=p,v=t[x],b=i[x],b=v===b?v:typeof v=="object"?xi(v,b,s,r):b,b===v);p++);if(p===m&&d===m)return t}else{let w=d===m,E=!0;for(;p<m;p++){x=h[p],v=t[x];const z=i[x];b=v===z?v:typeof v=="object"?xi(v,z,s,r):z,w&&=b===v&&(c[p]===x||sd.call(t,x)),E&&=Object.is(b,z),c[p]=b}if(w)return Object.getOwnPropertySymbols(t).length?i:t;if(E)return i}const S=o?h.fill(0):s?so():{};for(let w=0;w<m;w++)x=o?w:h[w],o?(v=t[x],w>p&&(b=i[x],b=v===b?v:typeof v=="object"?xi(v,b,s,r):b),S[x]=w<p?v:b):S[x]=c[w];return S}function go(t){return!t||typeof t!="object"?!1:(Object.getPrototypeOf(t)?.constructor??Object)===Object}function $n(t,i,s,r){if(t===i)return!0;if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return!1;for(let o=0,c=t.length;o<c;o++){const d=t[o],h=i[o];if(d!==h&&!$n(d,h,s,r))return!1}return!0}if(go(t)&&go(i)){if(s){for(const c in i)if((r||i[c]!==void 0)&&!$n(t[c],i[c],s,r))return!1;return!0}let o=0;if(r)o=Object.keys(t).length;else for(const c in t)t[c]!==void 0&&o++;for(const c in i)if((r||i[c]!==void 0)&&(o--===0||!$n(t[c],i[c],s,r)))return!1;return o===0}return!1}const F_=/[\x00-\x1f\x7f"<>`{}]/g;function V_(t){return t.replace(F_,i=>"%"+i.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function ey(t){let i;try{i=decodeURI(t)}catch{i=t.replaceAll(/%[0-9A-F]{2}/gi,s=>{try{return decodeURI(s)}catch{return s}})}return V_(i)}const P_=["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 Lv=/^[\x00-\x20]*[\\/][\t\n\r]*[\\/]/;function Zv(t,i){if(!t)return!1;if(Lv.test(t))return!0;const s=yr(t);return s?!i.has(s):!1}function rr(t){if(!t)return t;let i=t;if(/[%\\\x00-\x1f\x7f]/.test(t)){const s=/%25|%5C/gi;let r=0,o;for(i="";(o=s.exec(t))!==null;)i+=ey(t.slice(r,o.index))+o[0],r=s.lastIndex;i+=ey(r?t.slice(r):t)}return i}function X_(t){return/[\s\u0080-\uFFFF]/.test(t)?t.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):t}function J_(t,i){if(t===i)return!0;if(t.length!==i.length)return!1;for(let s=0;s<t.length;s++)if(t[s]!==i[s])return!1;return!0}function rd(){throw new Error("Invariant failed")}function Xa(t){return t.replace(/\/{2,}/g,"/")}function qv(t){return t==="/"?t:t.replace(/^\/+/,"")}function gn(t){const i=t.length;return i>1&&t[i-1]==="/"?t.replace(/\/+$/,""):t}function Bv(t){return gn(qv(t))}function ty(t,i){return t?.endsWith("/")&&t!=="/"&&t!==`${i}/`?t.slice(0,-1):t}function ny(t,i,s="never",r){if(i.includes("//")&&(i=Xa(i)),i.startsWith("/"))return i.length===1||s==="preserve"?i:s==="always"?i.endsWith("/")?i:`${i}/`:i.endsWith("/")?i.slice(0,-1):i;const o=i===".";let c;if(r){c=o?t:t+"\0"+i;const p=r.get(c);if(p)return p}let d;if(o)d=t.split("/");else{for(t.includes("//")&&(t=Xa(t)),d=t.split("/");d.length>1&&_i(d)==="";)d.pop();const p=i.split("/");for(let b=0,v=p.length;b<v;b++){const x=p[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&&(_i(d)===""?s==="never"&&d.pop():s==="always"&&d.push(""));const h=d.join("/"),m=(o?Xa(h):h)||"/";return c&&r&&r.set(c,m),m}function I_(t){const i=new Map(t.map(r=>[encodeURIComponent(r),r])),s=new RegExp([...i.keys()].join("|").replace(/[.*()]/g,"\\$&"),"g");return r=>r.replace(s,o=>i.get(o)??o)}function W_(t){return t==null||t===""}function e1(t,i,s){if(typeof i!="string")return""+(i??void 0);const r=t==="_splat";if(r&&(!i||/^[a-zA-Z0-9\-._~!/]*$/.test(i)))return i;let o=encodeURIComponent(i);return r&&(o=o.replaceAll("%2F","/")),s?s(o):o}function iy(t,i,s,r,o){const c=t.endsWith("/")?"/":"";let d="";for(const h of i){if(typeof h=="string"){d+=h;continue}const[m,p,b,v]=h,x=m===2,S=x&&v!==void 0?v+c:v;let w=s[p];if(!(m===3&&w==null)){if(o&&(o[p]=w,x&&(o["*"]=w)),x&&W_(w)){if(b==="/"&&!S)continue;w=""}d+=b+e1(p,w,r)+(S||"")}}return d+c||"/"}function ts(t){return t?.isNotFound===!0}function t1(){try{return sessionStorage}catch{return}}const n1="tsr-scroll-restoration-v1_3",$v=t1();function i1(){try{return JSON.parse($v?.getItem("tsr-scroll-restoration-v1_3")||"{}")}catch{return{}}}const Fa=i1(),ay="data-scroll-restoration-id",a1=t=>t.state.__TSR_key||t.href;function s1(t){const i=t.getAttribute(ay);if(i)return`[${ay}="${i}"]`;let s="",r=t,o;for(;o=r.parentNode;){let c=1,d=r;for(;d=d.previousElementSibling;)c++;const h=`${r.localName}:nth-child(${c})`;s=s?`${h} > ${s}`:h,r=o}return s}let Kl=!1;const ro="window";function Uf(t){try{return typeof t=="function"?t():document.querySelector(t)}catch{}}function sy(t){const i=new Set;for(const s of t){if(s===ro)continue;const r=Uf(s);r&&i.add(r)}return i}function r1(t,i){const s=t.options.scrollRestoration,r=t._scroll;s&&(r.e=!0);const o=t.options.getScrollRestorationKey||a1,c=new Set,d=h=>{const m=Fa[h]||={};for(const p of c)p===document?m[ro]={scrollX,scrollY}:p.isConnected&&(m[s1(p)]={scrollX:p.scrollLeft,scrollY:p.scrollTop})};s&&!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{$v?.setItem(n1,JSON.stringify(Fa))}catch{}}),addEventListener("pageshow",h=>{h.persisted&&(history.scrollRestoration="manual")})),!r.r&&(r.r=!0,t.subscribe("onRendered",h=>{const m=t.options.scrollRestorationBehavior,p=t.options.scrollToTopSelectors,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 E=Fa[w];if(E){let z=Fa[S];for(const A in E){if(A===ro){if(b)continue}else{const U=Uf(A);if(!U||b&&p&&(x??=sy(p),x.has(U)))continue}z||(z=Fa[S]={}),z[A]??=E[A]}}}Kl=!0;try{const E=h.toLocation.hash,z=h.toLocation.state.__hashScrollIntoViewOptions??!0;let A=!1;if(b){!E&&p&&(x??=sy(p));const U=E&&z&&v,H=r.e?Fa[S]:void 0;if(H)for(const V in H){const{scrollX:J,scrollY:L}=H[V];if(V===ro){if(U)continue;scrollTo({top:L,left:J,behavior:m}),A=!0}else{const R=Uf(V);R&&(R.scrollLeft=J,R.scrollTop=L,x?.delete(R))}}if(!E){const V={top:0,left:0,behavior:m};if(A||scrollTo(V),x)for(const J of x)J.scrollTo(V)}}!A&&E&&z&&document.getElementById(E)?.scrollIntoView(z)}finally{Kl=!1}}))}function l1(t,i=String){let s;for(const r in t){const o=t[r];o!==void 0&&(s||=new URLSearchParams).set(r,i(o))}return s?s.toString():""}function ff(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function o1(t){const i=new URLSearchParams(t),s=Object.create(null);for(const[r,o]of i.entries()){const c=s[r];c==null?s[r]=ff(o):Array.isArray(c)?c.push(ff(o)):s[r]=[c,ff(o)]}return s}const Hv=/^(?:\s|["[{\d-]|fa|nu|tr)/,u1=f1(JSON.parse),c1=d1(JSON.stringify,JSON.parse);function f1(t){const i=t===JSON.parse;return s=>{s[0]==="?"&&(s=s.slice(1));const r=o1(s);for(const o in r){const c=r[o];if(typeof c=="string"){if(i&&!Hv.test(c))continue;try{r[o]=t(c)}catch{}}}return r}}function d1(t,i){const s=i===JSON.parse;function r(o){if(o&&typeof o=="object")try{return t(o)}catch{}else if(i&&typeof o=="string"){if(s&&!Hv.test(o))return o;try{return i(o),t(o)}catch{}}return o}return o=>{const c=l1(o,r);return c?`?${c}`:""}}const Ja="__root__";function h1(t){t.statusCode=t.statusCode||t.code||307;const i=new Headers(t.headers);t.href&&i.get("Location")===null&&i.set("Location",t.href);const s=new Response(null,{status:t.statusCode,headers:i});if(s.options=t,t.throw)throw s;return s}function Qv(t){return t instanceof Response&&!!t.options}function yo(t){const i=new Map;let s,r;return{get(o){const c=i.get(o);if(c)return c.visited=!0,c.value},set(o,c){const d=i.get(o);if(d){d.value=c;return}if(i.size>=t){let m=s?.next().value;for(;!m||m.visited;)m?m.visited=!1:s=i.values(),m=s.next().value;m===r&&(s=void 0),i.delete(m.key)}const h={key:o,value:c,visited:!1};r=h,i.set(o,h)},clear(){i.clear(),s=void 0,r=void 0}}}const bi=4,Gv=5;function m1(t){const i=t.names;if(i)return i;const s=[];for(const r of t)typeof r!="string"&&s.push(r[1]);return t.names=s}function p1(t,i,s){const r=t.slice(i,s);if(r.charCodeAt(0)===36)return r.length===1?[2,"_splat","",void 0]:[1,r.slice(1),"",""];const o=r.indexOf("{");if(o>=0){const c=r.indexOf("}",o),d=r.charCodeAt(o+1)===45,h=o+(d?3:2);if(c>=0&&r.charCodeAt(h-1)===36&&(!d||h<c)){const m=r.slice(h,c);return[d?3:m?1:2,m||"_splat",r.slice(0,o),t.slice(i+c+1,m?s:t.length)]}}return r}function vr(t,i,s,r,o,c){let d=s;const h=i.fullPath??i.from,m=i.options,p=h.length,b=h.endsWith("/")?p-1:p,v=m?.caseSensitive??t,x=m?.params?.parse??m?.parseParams;let S,w=c?s-1:0;if(!r||h.includes("$")){S=c?.slice()??[];const A=_i(S);A&&typeof A!="string"&&A[0]===2&&(S[S.length-1]=[A[0],A[1],A[2],A[3]===void 0?void 0:A[3]+h.substring(s-(h[s-2]==="/"?2:1),b)],w=p)}for(;d<p;){const A=d,U=h.indexOf("/",A);let H=U===-1?p:U;const V=p1(h,A,H);d=H+1;let J;if(typeof V=="string"){if(!r)continue;let L=V,R;v?R=r.static??=new Map:(L=V.toLowerCase(),R=r.staticInsensitive??=new Map);const X=R.get(L);if(X)J=X;else{const P=Ji(r);J=P,R.set(L,P)}}else{const L=V[0];let R=V[2],X=V[3]??"";if(L===2&&(H=p,d=H+1),S&&w<H&&(w<A-1&&S.push(h.slice(w,A-1)),V[2]="/"+R,L===2&&V[3]!==void 0&&b<p&&(V[3]=X.slice(0,-1)),S.push(V),w=H),!r)continue;const P=v&&!!(R||X);v||(R=R.toLowerCase(),X=X.toLowerCase());const te=L===1?r.dynamic??=[]:L===3?r.optional??=[]:r.wildcard??=[],le=L!==2&&!x&&te.find(se=>!se.parse&&se.caseSensitive===P&&se.prefix===R&&se.suffix===X);if(le)J=le;else{const se=Ji(r,L,P,R,X);J=se,te.push(se),te.length===2&&o?.push(te)}}r=J}S&&w<b&&S.push(h.slice(w,b));const E=S?.slice();if(!r)return E;if(x&&i.children&&!i.isRoot&&i.id&&i.id.charCodeAt(i.id.lastIndexOf("/")+1)===95){const A=Ji(r,Gv);(r.pathless??=[]).push(A),r=A}const z=(i.path||!i.children)&&!i.isRoot;if(z&&b<p){const A=Ji(r,bi);r.index=A,r=A}return r.parse=x??null,r.priority=m?.params?.priority??0,r.route||(r.data=E,z&&(r.route=i)),[r,d,E]}function Kv(t,i){if(t.parse&&!i.parse)return-1;if(!t.parse&&i.parse)return 1;if(t.parse&&i.parse&&(t.priority||i.priority))return i.priority-t.priority;if(t.prefix&&i.prefix&&t.prefix!==i.prefix){if(t.prefix.startsWith(i.prefix))return-1;if(i.prefix.startsWith(t.prefix))return 1}if(t.suffix&&i.suffix&&t.suffix!==i.suffix){if(t.suffix.endsWith(i.suffix))return-1;if(i.suffix.endsWith(t.suffix))return 1}return t.prefix&&!i.prefix?-1:!t.prefix&&i.prefix?1:t.suffix&&!i.suffix?-1:!t.suffix&&i.suffix?1:t.caseSensitive&&!i.caseSensitive?-1:!t.caseSensitive&&i.caseSensitive?1:0}function Ji(t,i=0,s,r,o){return{kind:i,depth:t?t.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:t,parse:null,priority:0,caseSensitive:s,prefix:r,suffix:o}}function g1(t,i){const s=Ji(),r=[];function o(c,d,h,m){const[p,b,v]=vr(!1,c,d,h,r,m);if(c.children)for(const x of c.children)o(x,b,p,v)}for(const c of t)o(c,1,s);for(const c of r)c.sort(Kv);i.masksTree=s,i.flatCache=yo(1e3)}function y1(t,i){t||="/";const s=i.flatCache.get(t);if(s!==void 0)return s;const r=ld(t,i.masksTree);return i.flatCache.set(t,r),r}function v1(t,i,s,r,o){t||="/",r||="/";const c=i?`case\0${t}`:t;let d=o.singleCache.get(c);return d||(d=Ji(),vr(i,{from:t},1,d),o.singleCache.set(c,d)),ld(r,d,s)}function b1(t,i,s=!1){const r=s?t:`nofuzz\0${t}`,o=i.matchCache.get(r);if(o!==void 0)return o;t||="/";let c;try{c=ld(t,i.segmentTree,s)}catch(d){if(d instanceof URIError)c=null;else throw d}return c&&(c.branch=Fv(c.route)),i.matchCache.set(r,c),c}function x1(t,i=!1){const s=Ji(),r=[],o={},c={};let d=0;function h(m,p,b,v){if(m.init(d),m.id in o&&rd(),o[m.id]=m,d!==0&&m.path){const E=gn(m.fullPath);(!c[E]||m.fullPath.endsWith("/"))&&(c[E]=m)}d++;const[x,S,w]=vr(i,m,p,b,r,v);if(m._interpolation=w,m.children)for(const E of m.children)h(E,S,x,w)}h(t,1,s);for(const m of r)m.sort(Kv);return{processedTree:{segmentTree:s,singleCache:yo(1e3),matchCache:yo(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:c}}function ld(t,i,s=!1){const r=t.split("/"),o=_1(t,r,i,s);if(!o)return null;const[c]=Yv(t,r,o);return{route:o.node.route,rawParams:c}}function Yv(t,i,s){const r=S1(s.node),o=s.node.data&&m1(s.node.data),c=Object.create(null);let d=s.extract?.part??0,h=s.extract?.node??0,m=s.extract?.path??0,p=s.extract?.param??0;for(;h<r.length;d++,h++,m++){const b=r[h];if(b.kind===bi)break;if(b.kind===Gv){d--,m--;continue}const v=i[d],x=m;if(v&&(m+=v.length),b.kind===1||b.kind===3){const S=o[p++];if(b.kind===3&&s.skipped&1<<h){d--,m=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),E=decodeURIComponent(w);c["*"]=E,c._splat=E;break}}return s.rawParams&&Object.assign(c,s.rawParams),[c,{part:d,node:h,path:m,param:p}]}function Fv(t){const i=[t];for(;t.parentRoute;)t=t.parentRoute,i.push(t);return i.reverse(),i}function S1(t){const i=Array(t.depth+1);do i[t.depth]=t,t=t.parent;while(t);return i}function _1(t,i,s,r){if(t==="/"&&s.index)return{node:s.index,skipped:0};const o=!_i(i),c=o&&t!=="/",d=i.length-(o?1:0),h=[{node:s,index:1,skipped:0,statics:0,dynamics:0,optionals:0}];let m=null,p=null;for(;h.length;){const b=h.pop(),{node:v,index:x,skipped:S,statics:w,dynamics:E,optionals:z}=b;let{extract:A,rawParams:U}=b;if(v.kind===2&&v.route&&!Fl(p,b))continue;if(v.parse){if(!ry(t,i,b))continue;U=b.rawParams,A=b.extract}r&&v.route&&v.kind!==bi&&Fl(m,b)&&(m=b);const H=x===d;if(H&&(v.route&&(!c||v.kind===bi||v.kind===2)&&Fl(p,b)&&(p=b),!v.optional&&!v.wildcard&&!v.index&&!v.pathless))continue;const V=H?void 0:i[x];let J;if(H&&v.index){const L={node:v.index,index:x,skipped:S,statics:w,dynamics:E,optionals:z,extract:A,rawParams:U};let R=!0;if(v.index.parse&&(ry(t,i,L)||(R=!1)),R){if(!E&&!z&&!S&&w1(w,d))return L;Fl(p,L)&&(p=L)}}if(v.wildcard)for(let L=v.wildcard.length-1;L>=0;L--){const R=v.wildcard[L],{prefix:X,suffix:P}=R;if(!(X&&(H||!(R.caseSensitive?V:J??=V.toLowerCase()).startsWith(X)))){if(P){if(H)continue;const te=i.slice(x).join("/"),le=te.slice(-P.length);if((R.caseSensitive?le:le.toLowerCase())!==P||te.length-P.length<X.length)continue}h.push({node:R,index:d,skipped:S,statics:w,dynamics:E,optionals:z,extract:A,rawParams:U})}}if(v.optional){const L=S|1<<v.depth+1;for(let R=v.optional.length-1;R>=0;R--){const X=v.optional[R];h.push({node:X,index:x,skipped:L,statics:w,dynamics:E,optionals:z,extract:A,rawParams:U})}if(!H)for(let R=v.optional.length-1;R>=0;R--){const X=v.optional[R],{prefix:P,suffix:te}=X;if(P||te){const le=X.caseSensitive?V:J??=V.toLowerCase();if(P&&!le.startsWith(P)||te&&le.indexOf(te,le.length-te.length)<P.length)continue}h.push({node:X,index:x+1,skipped:S,statics:w,dynamics:E,optionals:z+Yl(d,x),extract:A,rawParams:U})}}if(!H&&v.dynamic&&V)for(let L=v.dynamic.length-1;L>=0;L--){const R=v.dynamic[L],{prefix:X,suffix:P}=R;if(X||P){const te=R.caseSensitive?V:J??=V.toLowerCase();if(X&&!te.startsWith(X)||P&&te.indexOf(P,te.length-P.length)<X.length)continue}h.push({node:R,index:x+1,skipped:S,statics:w,dynamics:E+Yl(d,x),optionals:z,extract:A,rawParams:U})}if(!H&&v.staticInsensitive){const L=v.staticInsensitive.get(J??=V.toLowerCase());L&&h.push({node:L,index:x+1,skipped:S,statics:w+Yl(d,x),dynamics:E,optionals:z,extract:A,rawParams:U})}if(!H&&v.static){const L=v.static.get(V);L&&h.push({node:L,index:x+1,skipped:S,statics:w+Yl(d,x),dynamics:E,optionals:z,extract:A,rawParams:U})}if(v.pathless)for(let L=v.pathless.length-1;L>=0;L--){const R=v.pathless[L];h.push({node:R,index:x,skipped:S,statics:w,dynamics:E,optionals:z,extract:A,rawParams:U})}}if(p)return p;if(r&&m){let b=m.index;for(let x=0;x<m.index;x++)b+=i[x].length;const v=b===t.length?"/":t.slice(b);return m.rawParams??=Object.create(null),m.rawParams["**"]=decodeURIComponent(v),m}return null}function Yl(t,i){return 2**(t-i-1)}function w1(t,i){return t===2**(i-1)-1}function ry(t,i,s){let r,o;try{[r,o]=Yv(t,i,s)}catch{return null}if(s.rawParams=r,s.extract=o,!s.node.parse)return!0;try{if(s.node.parse(r)===!1)return null}catch{}return!0}function Fl(t,i){return t?i.statics>t.statics||i.statics===t.statics&&(i.dynamics>t.dynamics||i.dynamics===t.dynamics&&(i.optionals>t.optionals||i.optionals===t.optionals&&((i.node.kind===bi)>(t.node.kind===bi)||i.node.kind===bi==(t.node.kind===bi)&&i.node.depth>t.node.depth))):!0}function E1(t,i,s){const r=Bv(t),o=`/${r}`,c=i?o:o.toLowerCase(),d=`${c}/`,h={input:({url:m})=>{const p=i?m.pathname:m.pathname.toLowerCase();return p===c?m.pathname="/":p.startsWith(d)&&(m.pathname=m.pathname.slice(o.length)),m},output:({url:m})=>(m.pathname=Xa(`/${r}${m.pathname}`),m)};return s?{input:({url:m})=>Lf(s,h.input({url:m})),output:({url:m})=>h.output({url:Vv(s,m)})}:h}function Lf(t,i){const s=t?.input?.({url:i});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return i}function Vv(t,i){const s=t?.output?.({url:i});if(s){if(typeof s=="string")return new URL(s);if(s instanceof URL)return s}return i}function O1(t,i){const{createMutableStore:s,createReadonlyStore:r,batch:o}=i,c=new Map,d=s("idle"),h=s(t),m=s(void 0),p=s([]),b=r(()=>p.get().map(E=>c.get(E).get())),v=r(()=>({status:d.get(),isLoading:d.get()==="pending",matches:b.get(),location:h.get(),resolvedLocation:m.get()}));function x(E){let z=c.get(E);return z||(z=s(void 0),c.set(E,z)),z}const S={status:d,location:h,resolvedLocation:m,ids:p,matches:b,byRoute:c,__store:v,getMatchStore:x,setMatches:w};function w(E){const z=p.get(),A=E.map(U=>U.routeId);o(()=>{J_(z,A)||p.set(A);for(const U of z)A.includes(U)||c.get(U).set(()=>{});for(const U of E){const H=x(U.routeId);H.get()!==U&&H.set(U)}})}return S}var Si="__TSR_index",ly="popstate",oy="beforeunload",j1=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function lo(t){const i=j1.exec(t);return i?"/"+t.slice(i[0].length):t}function Pv(t){return/[\x00-\x1f\x7f]/.test(t)&&(t=t.replace(/[\x00-\x1f\x7f]/g,i=>`
|
|
10
|
-
\r`.includes(i)?"":encodeURIComponent(i))),lo(t)}function z1(t){let i=t.getLocation();const s=new Set,r=d=>{i=t.getLocation(),s.forEach(h=>h({location:i,action:d}))},o=d=>{t.notifyOnIndexChange??!0?r(d):i=t.getLocation()},c=async d=>{const h=d.navigateOpts?.ignoreBlocker?void 0:t.getBlockers?.();if(typeof document<"u"&&h?.length&&(d.type==="PUSH"||d.type==="REPLACE"))for(const m of h){const p=vo(d.path,d.state);if(await m.blockerFn({currentLocation:i,nextLocation:p,action:d.type})){t.onBlocked?.();return}}d.task()};return{get location(){return i},get length(){return t.getLength()},subscribers:s,subscribe:d=>(s.add(d),()=>{s.delete(d)}),push:(d,h,m)=>{const p=i.state[Si];h=uy(p+1,h),c({task:()=>{t.pushState(d,h),r({type:"PUSH"})},navigateOpts:m,type:"PUSH",path:d,state:h})},replace:(d,h,m)=>{const p=i.state[Si];h=uy(p,h),c({task:()=>{t.replaceState(d,h),r({type:"REPLACE"})},navigateOpts:m,type:"REPLACE",path:d,state:h})},go:(d,h)=>{c({task:()=>{t.go(d,h?.ignoreBlocker??!1),o({type:"GO",index:d})},navigateOpts:h,type:"GO"})},back:d=>{c({task:()=>{t.back(d?.ignoreBlocker??!1),o({type:"BACK"})},navigateOpts:d,type:"BACK"})},forward:d=>{c({task:()=>{t.forward(d?.ignoreBlocker??!1),o({type:"FORWARD"})},navigateOpts:d,type:"FORWARD"})},canGoBack:()=>i.state[Si]!==0,createHref:d=>t.createHref(d),block:d=>{if(!t.setBlockers)return()=>{};const h=t.getBlockers?.()??[];return t.setBlockers([...h,d]),()=>{const m=t.getBlockers?.()??[];t.setBlockers?.(m.filter(p=>p!==d))}},flush:()=>t.flush?.(),destroy:()=>t.destroy?.(),notify:r,_getBlockers:()=>t.getBlockers?.()??[]}}function uy(t,i){const s=od();return{...i,key:s,__TSR_key:s,[Si]:t}}function T1(t){const i=typeof document<"u"?window:void 0,s=i.history.pushState,r=i.history.replaceState;let o=[];const c=()=>o,d=R=>o=R,h=R=>Pv(R),m=(()=>vo(`${i.location.pathname}${i.location.search}${i.location.hash}`,i.history.state));if(!i.history.state?.__TSR_key&&!i.history.state?.key){const R=od();i.history.replaceState({[Si]:0,key:R,__TSR_key:R},"")}let p=m(),b,v=!1,x=!1,S=!1,w=!1;const E=()=>p;let z;const A=()=>{z&&(L._ignoreSubscribers=!0,(z[2]?i.history.pushState:i.history.replaceState)(z[1],"",z[0]),L._ignoreSubscribers=!1,z=void 0,b=void 0)},U=(R,X,P)=>{const te=!!z;te||(b=p),p=vo(X,P),z=[p.href,P,z?.[2]||R],te||queueMicrotask(()=>A())},H=R=>{p=m(),L.notify({type:R})},V=async()=>{if(w=!1,x){x=!1;return}const R=m(),X=R.state[Si]-p.state[Si],P=X===1,te=X===-1,le=!P&&!te||v;v=!1;const se=le?"GO":te?"BACK":"FORWARD",he=le?{type:"GO",index:X}:{type:te?"BACK":"FORWARD"};if(S)S=!1;else{const ge=c();if(typeof document<"u"&&ge.length){for(const Y of ge)if(await Y.blockerFn({currentLocation:p,nextLocation:R,action:se})){x=!0,i.history.go(-X),L.notify(he);return}}}p=m(),L.notify(he)},J=R=>{if(w){w=!1;return}let X=!1;const P=c();if(typeof document<"u"&&P.length)for(const te of P){const le=te.enableBeforeUnload??!0;if(le===!0){X=!0;break}if(typeof le=="function"&&le()===!0){X=!0;break}}if(X)return R.preventDefault(),R.returnValue=""},L=z1({getLocation:E,getLength:()=>i.history.length,pushState:(R,X)=>U(!0,R,X),replaceState:(R,X)=>U(!1,R,X),back:R=>(R&&(S=!0,w=!0),i.history.back()),forward:R=>{R&&(S=!0,w=!0),i.history.forward()},go:(R,X)=>{v=!0,X&&(S=!0,w=!0),i.history.go(R)},createHref:h,flush:A,destroy:()=>{i.history.pushState=s,i.history.replaceState=r,i.removeEventListener(oy,J,{capture:!0}),i.removeEventListener(ly,V)},onBlocked:()=>{b&&p!==b&&(p=b)},getBlockers:c,setBlockers:d,notifyOnIndexChange:!1});return L._ignoreNextBeforeUnload=R=>{w=!1;try{R=new URL(R,i.document.baseURI).href,w=/^https?:/.test(R)&&(!R.includes("#")||R.split("#")[0]!==i.location.href.split("#")[0])}catch{}},i.addEventListener(oy,J,{capture:!0}),i.addEventListener(ly,V),i.history.pushState=function(...R){const X=s.apply(i.history,R);return L._ignoreSubscribers||H("PUSH"),X},i.history.replaceState=function(...R){const X=r.apply(i.history,R);return L._ignoreSubscribers||H("REPLACE"),X},L}function vo(t,i){const s=Pv(t),r=s.indexOf("#"),o=s.indexOf("?");if(!i){const c=od();i={[Si]:0,key:c,__TSR_key:c}}return{href:s,pathname:s.slice(0,r>-1?o>-1?Math.min(r,o):r:o>-1?o:s.length),hash:r>-1?s.slice(r):"",search:o>-1?s.slice(o,r===-1?void 0:r):"",state:i}}function od(){return(Math.random()+1).toString(36).slice(7)}function df(t,i){return t.protocol!=="http:"&&t.protocol!=="https:"||t.origin!==i||!!t.username||!!t.password}function hf(t){return t.pathname+t.search+t.hash}function cy(t){return t.options.loader||t.options.beforeLoad||t.lazyFn||t.options.component?.preload||t.options.pendingComponent?.preload}function Ao(t,i){return{fromLocation:i,toLocation:t,pathChanged:i?.pathname!==t.pathname,hrefChanged:i?.href!==t.href,hashChanged:i?.hash!==t.hash}}function fy({key:t,__TSR_key:i,__TSR_index:s,__hashScrollIntoViewOptions:r,...o}){return o}function N1(t){return t.findIndex(i=>i.status==="error"||i.status==="notFound"||i._notFound)+1}function A1(t,i,s,r,o,c){r&&(i=i.slice(0,r)),o&&(s=s.slice(0,o));for(const d of i){if(c&&t._tx!==c)return;s.some(h=>h.routeId===d.routeId)||t.routesById[d.routeId].options.onLeave?.(d)}for(const d of s){if(c&&t._tx!==c)return;t.routesById[d.routeId].options[i.some(h=>h.routeId===d.routeId)?"onStay":"onEnter"]?.(d)}}var R1=class{constructor(t,i){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async s=>(s(),!1),this.update=s=>{const r=this.options;this.options={...r,...s},this.isServer=this.options.isServer??Wg??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=T1()),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!=="/"&&Bv(o)?E1(o,this.options.caseSensitive,c):c),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree||Wg){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=O1(this.latestLocation,h),r1(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const s=x1(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&g1(this.options.routeMasks,s.processedTree),{...s,resolvePathCache:yo(1e3)}},this.subscribe=(s,r)=>{const o={eventType:s,fn:r};return this.subscribers.add(o),()=>{this.subscribers.delete(o)}},this.emit=s=>{for(const r of this.subscribers)if(r.eventType===s.type)try{r.fn(s)}catch(o){console.error(o)}},this.parseLocation=(s,r)=>{const o=({pathname:m,search:p,hash:b,href:v},x)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(m)){const z=this.options.parseSearch(p),A=this.options.stringifySearch(z);return{href:m+A+b,publicHref:m+A+b,pathname:rr(m),external:!1,searchStr:A,search:Ya(r?.search,z),hash:rr(b.slice(1)),state:xi(r?.state,x)}}const S=Lf(this.rewrite,new URL(v,this.origin)),w=this.options.parseSearch(S.search),E=this.options.stringifySearch(w);return S.search=E,{href:S.href.replace(S.origin,""),publicHref:v,pathname:rr(lo(S.pathname)),external:!!this.rewrite&&df(S,this.origin),searchStr:E,search:Ya(r?.search,w),hash:rr(S.hash.slice(1)),state:xi(r?.state,x)}},c=o(s,s.state),{__tempLocation:d,__tempKey:h}=c.state;if(d&&(!h||h===this.tempLocationKey)){const m=o(d,{...d.state,__tempLocation:void 0,key:c.state.key,__TSR_key:c.state.__TSR_key});return m.maskedLocation=c,m}return c},this.matchRoutes=(s,r,o)=>typeof s=="string"?this.matchRoutesInternal({pathname:s,search:r},o):this.matchRoutesInternal(s,r),this.getMatchedRoutes=s=>{const r=Object.create(null),o=b1(gn(s),this.processedTree,!0);return o&&Object.assign(r,o.rawParams),[o?.branch||[this.routesById.__root__],r,o?.route]},this.buildLocation=s=>{{const d=this.staticLocations.get(s);if(d)return d}let r=!1;const o=(d={})=>{if(d.href){const ge=vo(d.href,{});d={...d,to:Lf(this.rewrite,new URL(ge.pathname,this.origin)).pathname,search:this.options.parseSearch(ge.search),hash:ge.hash.slice(1)}}const h=s._fromLocation||this._pendingLocation||this.latestLocation;let m;const p=()=>(r=!0,h),b=()=>m??=this.matchRoutesLightweight(p()),v=d.to?`${d.to}`:".",x=ny(v[0]==="/"?"":d.unsafeRelative==="path"?p().pathname:d.from??b()[1],v,this.options.trailingSlash,this.resolvePathCache),S=this.routesByPath[gn(x)],w=x.includes("$");let E;if(S)E=S._branch??=Fv(S);else if(w)E=[];else{const[ge,Y,M]=this.getMatchedRoutes(x);E=ge,this.options.notFoundRoute&&(!M||M.path!=="/"&&Y["**"])&&(E=[...E,this.options.notFoundRoute])}const z=w?S?._interpolation??vr(!1,{fullPath:x},0):void 0;let A;for(const ge of E){const Y=ge.options.params?.stringify??ge.options.stringifyParams;if(Y){const M=b()[3];if(A??=mf(d.params,M),!Uv(A))break;A===M&&(A=Object.assign(so(),A));try{Object.assign(A,Y(A))}catch{}}}A??=mf(d.params,M1(d.params,z)?b()[3]:pf);const U=s.leaveParams?x:lo(rr(z?iy(x,z,A,this.pathParamsDecoder):x)),H=D1(E,s._includeValidateSearch),V=()=>{let ge=b()[2];if(s._includeValidateSearch&&this.options.search?.strict){const Y={};E.forEach(M=>{if(M.options.validateSearch)try{Object.assign(Y,oo(M.options.validateSearch,{...Y,...ge}))}catch{}}),ge=Y}return ge},J=H.length?k1(H,V(),d):d.search===!0?V():typeof d.search=="function"?d.search(V()):d.search||pf,L=this.options.stringifySearch(J),R=d.hash===!0?p().hash:typeof d.hash=="function"?d.hash(p().hash):d.hash||void 0,X=R?`#${R}`:"",P=d.state?d.state===!0?p().state:typeof d.state=="function"?d.state(p().state):d.state:pf,te=`${U}${L}${X}`;let le,se,he=!1;if(this.rewrite){const ge=new URL(te,this.origin),Y=ge.origin,M=Vv(this.rewrite,ge);le=hf(ge),df(M,Y)?(se=M.href,he=!0):se=lo(hf(M))}else le=X_(te),se=le;return{publicHref:se,href:le,pathname:U,search:J,searchStr:L,state:P,hash:R??"",external:he,unmaskOnReload:d.unmaskOnReload}},c=o(s);if(s.mask)c.maskedLocation=o({from:s.from,...s.mask});else if(this.options.routeMasks){const d=y1(c.pathname,this.processedTree);if(d){const h=Object.assign(so(),d.rawParams),{from:m,params:p,...b}=d.route,v=mf(p,h);c.maskedLocation=o({from:s.from,...b,params:v})}}return!r&&s._fromLocation&&this.staticLocations.set(s,c),c},this.commitLocation=async({viewTransition:s,ignoreBlocker:r,...o})=>{const c=o.maskedLocation??o;if(c.external)return dy(this,c.publicHref,{replace:o.replace,ignoreBlocker:r});let d;const h=gn(this.latestLocation.href)===gn(o.href)&&$n(fy(o.state),fy(this.latestLocation.state)),m=this._commitPromise;let p;const b=new Promise(v=>{p=v});if(b.resolve=()=>{p(),m?.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=s,d=o.replace?"REPLACE":"PUSH",this.history[d==="REPLACE"?"replace":"push"](S.publicHref,S.state,{ignoreBlocker:r}),this.history.subscribers.size||this.load({action:{type:d}})}return this._scroll.n=o.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:s,resetScroll:r,hashScrollIntoView:o,viewTransition:c,ignoreBlocker:d,...h}={})=>{const m=this.buildLocation({...h,_includeValidateSearch:!0});this._pendingLocation=m;const p=this.commitLocation({...m,viewTransition:c,replace:s,resetScroll:r,hashScrollIntoView:o,ignoreBlocker:d});return queueMicrotask(()=>{this._pendingLocation===m&&(this._pendingLocation=void 0)}),p},this.navigate=async({to:s,reloadDocument:r,href:o,publicHref:c,...d})=>{const h=o?yr(o):void 0;if(h||r){if(s!==void 0||!o){const p=this.buildLocation({to:s,...d}),b=p.maskedLocation??p;o??=b.publicHref,c??=b.publicHref}return dy(this,!h&&c?c:o,d)}return this.buildAndCommitLocation({...d,href:o,to:s,_isNavigate:!0})},this.load=async s=>{this.updateLatestLocation(),s?.action&&(this._scroll.h=s.action.type==="PUSH"||s.action.type==="REPLACE"),await K1(this,s)},this.startViewTransition=s=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document.startViewTransition=="function"){let o;if(typeof r=="object"&&window.CSS?.supports?.("selector(:active-view-transition-type(a))")){const c=this.latestLocation,d=this.stores.resolvedLocation.get(),h=typeof r.types=="function"?r.types(Ao(c,d)):r.types;if(h===!1)return s();o={update:s,types:h}}else o=s;return document.startViewTransition(o).updateCallbackDone}return s()},this.invalidate=s=>{const r=this._committed,o=s?.filter,c=this._preloads,d=new Set,h=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 m=[];for(const[b,v]of c??[])v.some(x=>d.has(x.id))&&(c.delete(b),m.push(b));const p=b=>{if(d.has(b.id)){const v=this.routesById[b.routeId],x={...b,invalid:!0,...(s?.forcePending||b.status==="error"||b.status==="notFound")&&cy(v)?{status:"pending",error:void 0}:void 0};return b._flight=void 0,x}return b};this._committed=r.map(p);for(const[b,v]of this._cache)d.has(b)&&(v.invalid=!0,s?.forcePending&&(v.status="pending"));for(const b of d){const v=this._flights?.get(b);this._flights?.delete(b),v&&!v[2]&&m.push(v[1])}for(const b of m)b.abort();return this.shouldViewTransition=!1,this.load({sync:s?.sync})},this.resolveRedirect=s=>{const r=s.options;let o=s.headers.get("Location")||r.href;if(!o){const d=this.buildLocation(r);o=(d.maskedLocation??d).publicHref||"/"}let c;if(Lv.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:df(d,this.origin)||(o=hf(d),c=void 0)}return c&&(r.reloadDocument=!0),r.href=o,s.headers.set("Location",o),s},this.clearCache=s=>{const r=this._cache,o=this._preloads,c=s?.filter,d=[],h=[];for(const[p,b]of r)(!c||c(b))&&(h.push(p),d.push(b));const m=[];for(const[p,b]of o??[])(!c||b.some(c))&&(m.push(p),d.push(...b));for(const p of h)r.delete(p);for(const p of m)o.delete(p);for(const p of d){const b=p._flight;p._flight=void 0,b&&!--b[2]&&(this._flights?.get(p.id)===b&&this._flights.delete(p.id),m.push(b[1]))}for(const p of m)p.abort()},this.loadRouteChunk=Ia,this.preloadRoute=s=>Y1(this,s),this.matchRoute=(s,r)=>{const o={...s,to:s.to?ny(s.from||"",s.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:s.params||{},leaveParams:!0},c=this.buildLocation(o),d=this.stores.status.get()==="pending";if(r?.pending&&!d)return!1;const h=r?.pending??!d?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),m=v1(c.pathname,r?.caseSensitive??!1,r?.fuzzy??!1,h.pathname,this.processedTree);return!m||s.params&&!$n(m.rawParams,s.params,!0)?!1:r?.includeSearch??!0?$n(h.search,c.search,!0)?m.rawParams:!1:m.rawParams},this.getStoreConfig=i,t.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=I_(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??c1,parseSearch:t.parseSearch??u1,protocolAllowlist:t.protocolAllowlist??P_}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(t){Object.assign(this,t),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;const i=this.options.notFoundRoute;i&&(i.init(99999999999),this.routesById[i.id]!==i&&(i._interpolation=vr(!1,i,0)),this.routesById[i.id]=i)}matchRoutesInternal(t,i){const[s,r,o]=this.getMatchedRoutes(t.pathname);let c=s,d=!1;(o?o.path!=="/"&&r["**"]:gn(t.pathname))&&(this.options.notFoundRoute?c=[...c,this.options.notFoundRoute]:d=!0);const h=d?U1(this.options.notFoundMode,c):void 0,m=new Array(c.length),p=this._committed,b=(x,S)=>{const w=p[S];return w?.routeId===x.id?w:x===this.options.notFoundRoute?p.find(E=>E.routeId===x.id):void 0};let v;for(let x=0;x<c.length;x++){const S=c[x],w=m[x-1];let E,z,A;{const he=w?.search??t.search,ge=w?._strictSearch??void 0;try{const Y=oo(S.options.validateSearch,{...he})??void 0;E={...he,...Y},z={...ge,...Y}}catch(Y){let M=Y;if(Y instanceof bo||(M=new bo(Y.message,{cause:Y})),i?.throwOnError)throw M;E=he,z={},A=M}}let U="",H="";try{U=S.options.loaderDeps?.({search:E})??"",H=U&&JSON.stringify(U)||""}catch(he){if(i?.throwOnError)throw he;A??=he}const V=so(),J=S._interpolation?iy(S.fullPath,S._interpolation,r,this.pathParamsDecoder,V):S.fullPath,L=S.id+J+H,R=b(S,x),X=this._cache.get(L)??(R?.id===L?R:void 0);v=X?._strictParams??Object.assign(V,v);let P;if(!X)try{hy(S,v)}catch(he){if(ts(he)||Qv(he)?P=he:P=new C1(he.message,{cause:he}),i?.throwOnError)throw P}const te=R?"stay":"enter";let le;if(X)le={...X,cause:te,search:Ya(R?R.search:X.search,E),_strictSearch:z,searchError:A};else{const he=cy(S)?"pending":"success";le={id:L,ssr:S.options.ssr,index:x,routeId:S.id,params:R?.params??v,_strictParams:v,pathname:J,updatedAt:Date.now(),search:R?Ya(R.search,E):E,_strictSearch:z,searchError:A,status:he,isFetching:!1,error:void 0,paramsError:P,context:{},abortController:i?._controller??new AbortController,cause:te,loaderDeps:R?xi(R.loaderDeps,U):U,invalid:!1,preload:!1,staticData:S.options.staticData||{},fullPath:S.fullPath}}const se=h===S.id;le._notFound&&!se&&(le.error=void 0),le._notFound=se,m[x]=le}for(let x=0;x<m.length;x++){const S=m[x];S.params=S.cause==="stay"?Ya(S.params,v):v,i?._controller&&(S.context={})}return m}matchRoutesLightweight(t){const i=_i(this.stores.ids.get()),s=i?this.stores.byRoute.get(i).get():void 0,r=s?.id,o=this.lightweightCache.get(t);if(o&&o[0]===r)return o[1];const[c,d]=this.getMatchedRoutes(t.pathname),h=_i(c),m={...t.search};for(const x of c)try{Object.assign(m,oo(x.options.validateSearch,m))}catch{}const p=s&&s.routeId===h.id&&s.pathname===t.pathname;let b;if(p)b=s.params;else{const x=d;for(const S of c)try{hy(S,x)}catch{}b=x}const v=[c,h.fullPath,m,b];return this.lightweightCache.set(t,[r,v]),v}};async function dy(t,i,{replace:s,ignoreBlocker:r}){if(!Zv(i,t.protocolAllowlist)){if(!r){const o=t.history._getBlockers();for(const c of o)if(c?.blockerFn&&await c.blockerFn({currentLocation:t.history.location,nextLocation:t.history.location,action:s?"REPLACE":"PUSH"}))return}t.history._ignoreNextBeforeUnload?.(i),s?window.location.replace(i):window.location.href=i}}var bo=class extends Error{},C1=class extends Error{};function oo(t,i){if(t==null)return{};if("~standard"in t){const s=t["~standard"].validate(i);if(s instanceof Promise)throw new bo("Async validation not supported");if(s.issues)throw new bo(JSON.stringify(s.issues,void 0,2),{cause:s});return s.value}return"parse"in t?t.parse(i):typeof t=="function"?t(i):{}}function mf(t,i){if(t===void 0||t===!0)return i;const s=Object.create(null);return t===!1||t===null?s:typeof t=="function"?(Object.assign(s,i),Object.assign(s,t(s))):Object.assign(s,i,t)}function M1(t,i){return typeof t=="function"?!0:!i||t===!1||t===null?!1:t===void 0||t===!0||i.some(s=>typeof s!="string"&&!sd.call(t,s[1]))}const pf=Object.freeze({});function D1(t,i){const s=[];for(let r=0;r<t.length;r++){const o=t[r].options;if("search"in o)o.search?.middlewares&&s.push(...o.search.middlewares);else if(o.preSearchFilters||o.postSearchFilters){const d=({search:h,next:m})=>{const p=m(o.preSearchFilters?o.preSearchFilters.reduce((b,v)=>v(b),h):h);return o.postSearchFilters?o.postSearchFilters.reduce((b,v)=>v(b),p):p};s.push(d)}const c=o.validateSearch;if(i&&c){const d=({search:h,next:m,meta:p})=>{const b=m(h);try{const v=oo(c,b);if(p&&v)for(const x in v)x in b||(p.defaulted||=new Map).set(x,v[x]);return{...b,...v}}catch{}return b};s.push(d)}}return s}function k1(t,i,s){const r=(o,c,d)=>{if(o>=t.length){if(!s.search)return{};if(s.search===!0)return c;const m=kv(s.search,c);return d&&(d.explicit=m),m}const h=(m,p)=>{if(p){const b=d||{};return{search:r(o+1,m,b),meta:b}}return r(o+1,m,d)};return t[o]({search:c,next:h,meta:d})};return r(0,i)}function U1(t,i){if(t!=="root"){let s;for(let r=i.length-1;r>=0;r--){const o=i[r];if(o.options.notFoundComponent)return o.id;s||=o.children&&o.id}if(s)return s}return Ja}function hy(t,i){const s=t.options.params?.parse??t.options.parseParams;s&&Object.assign(i,s(i))}function Zf(t,i){return t.options[i]?.preload?.()}function L1(t,i){const s=Zf(t,"component");let r=Zf(t,"pendingComponent");return i&&(r?r=r.then(i):i()),s&&r?Promise.all([s,r]).then(()=>{}):s??r}function Ia(t,i,s){const r=()=>i===!1?void 0:i?Zf(t,i):L1(t,s),o=t._lazy;if(o)return o===!0?r():o.then(r);if(!t.lazyFn)return r();const c=t.lazyFn().then(d=>{{const{id:h,...m}=d.options;Object.assign(t.options,m),t._lazy=!0}},d=>{throw t._lazy=void 0,d});return t._lazy=c,c.then(r)}function ud(t){const i=t.findIndex(s=>s.status!=="success"||s._notFound)+1;return i&&i<t.length?t.slice(0,i):t}function Z1(t,i,s){const r=t._tx;return i&&r?.[2]===s&&!r[3].some(o=>o.routeId===i)}const yn=0,Hn=1,Ro=2,St=3,wi=[4];function br(t){return typeof t[0]=="number"}function aa(t,i){return i.aborted?Promise.race([Promise.reject(i),t]):new Promise((s,r)=>{const o=()=>r(i);i.addEventListener("abort",o,{once:!0}),Promise.resolve(t).then(s,r).then(()=>i.removeEventListener("abort",o))})}function sa(t,i){return t.routesById[i.routeId]}function xr(t,i,s){return Qv(t)?[St,t]:ts(t)?(t.routeId||=s,[Ro,t]):i?(typeof t?.then=="function"&&(t=new Error("A Promise was thrown",{cause:t})),[Hn,t]):[yn,t]}function cd(t,i){let s=xr(i,!0,t.id);if(s[0]!==Hn)return s;try{t.options.onError?.(s[1])}catch(r){s=xr(r,!0,t.id)}return s}function mr(t,i,s,r,o){return o[0].signal.aborted?wi:hd(t,i,s,cd(s,r),o)}async function q1(t,i,s,r,o,c){const[d,h]=i,m=s[0].signal,p=!!s[3];for(let b=s[6]??0;b<r;b++){const v=h[b],x=sa(t,v);v.abortController=s[0];const S=h[b-1]?.context??t.options.context??{},w={params:v.params,location:d,navigate:U=>t.navigate({...U,_fromLocation:d}),buildLocation:t.buildLocation,cause:p?"preload":v.cause,abortController:s[0],preload:p,matches:h,routeId:x.id};try{const U=v._ctx||=x.options.context?x.options.context({...w,deps:v.loaderDeps,context:S})||{}:void 0;v.context={...S,...U}}catch(U){return Zn(t,v),[b,mr(t,i,x,U,s)]}if(m.aborted)return[b,wi];const E=v.paramsError??v.searchError;if(E!==void 0)return Zn(t,v),[b,mr(t,i,x,E,s)];const z=x.options.beforeLoad;if(!z)continue;const A=v.status;b>=c&&(v.status="pending",s[7]?.());try{Sr(t,v,"beforeLoad",s[0]);const U=z({...w,search:v.search,context:v.context,...t.options.additionalContext}),H=await(typeof U?.then=="function"?aa(U,m):U);if(m.aborted)return[b,wi];const V=hd(t,i,x,xr(H,!1,x.id),s);if(V[0]!==yn)return Zn(t,v),[b,V];v.context={...v.context,...H}}catch(U){return Zn(t,v),[b,mr(t,i,x,U,s)]}finally{v.status=A,Sr(t,v,!1,s[0])}}o()}function fd(t,i,s){if(!(!s||--s[2])){if(t._flights?.get(i.id)===s){const r=t._tx;if(r&&!r[0].signal.aborted&&!r[3].includes(i)&&r[3].some(o=>o.id===i.id)&&r[3].some(o=>o.isFetching==="beforeLoad"))return;t._flights.delete(i.id)}return s[1]}}function Zn(t,i){const s=i._flight;i._flight=void 0,fd(t,i,s)?.abort()}function Nt(t,i,s,r){const o=[];for(const c of i)if(!s?.includes(c)){const d=c._flight;if(c._flight=void 0,r&&d?.[2]===1&&t._flights?.get(c.id)===d&&s?.some(h=>h.id===c.id))d[2]=0;else{const h=fd(t,c,d);h&&o.push(h)}}for(const c of o)c.abort()}function dd(t){for(const i of t){const s=i._flight;s&&s[2]++}}function Sr(t,i,s,r){if(i.isFetching=s,r&&t._tx?.[0]!==r)return;const o=t.stores.byRoute.get(i.routeId),c=o?.get();c?.id===i.id&&o.set({...c,isFetching:s})}function Xv(t,i,s,r,o,c,d){const h=i[0];return{params:s.params,location:h,navigate:m=>t.navigate({...m,_fromLocation:h}),cause:d?"preload":s.cause,abortController:o,preload:d,deps:s.loaderDeps,parentMatchPromise:c,context:s.context,route:r,...t.options.additionalContext}}async function my(t,i,s,r,o,c,d){const h=d[0],m=h.signal;if(m.aborted)return wi;if(!o)return[yn,void 0];let p=s._flight;Sr(t,s,"loader",h);try{if(!p){const b=new AbortController;p=[Promise.resolve().then(()=>o(Xv(t,i,s,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(s.id)===p&&(t._flights.delete(s.id),p[2]||b.abort()),v[0]===Hn&&p[2]?cd(r,v[1]):v)),b,1],(t._flights??=new Map).set(s.id,p)}return s._flight=p,s.abortController=p[1],hd(t,i,r,await aa(p[0],m),d)}catch(b){if(b!==m||!m.aborted)throw b;return Zn(t,s),wi}finally{Sr(t,s,!1,h)}}function py(t,i,s){i[0]!==St&&(t.status="success",t.error=void 0,i[0]===yn?(t.loaderData=i[1],t.invalid=!1,t.updatedAt=Date.now(),t.preload=s):t.invalid=!0)}function B1(t,i,s){const r=t._cache.get(i.id);if(r!==s||t._committed.some(c=>c.id===i.id&&c._flight===i._flight))return;const o={...i,_notFound:void 0,context:{}};o._flight&&o._flight[2]++,t._cache.set(i.id,o),r&&Zn(t,r)}function gy(t,i){return i[0]===Hn||i[0]===Ro?{...t,status:i[0]===Hn?"error":"notFound",error:i[1],_flight:void 0}:t}function $1(t,i,s,r,o,c,d){const h=i[1][s],m=sa(t,h),p=!!c[3],b=t._cache.get(h.id);let v,x=!1,S;try{if(h.status==="success"&&(v=m.options.shouldReload,typeof v=="function"&&(v=v(Xv(t,i,h,m,c[0],o,p))),c[0].signal.aborted&&(S=wi)),!S)if(h.status!=="success")x=!0;else{const se=p||h.preload?m.options.preloadStaleTime??t.options.defaultPreloadStaleTime??3e4:m.options.staleTime??t.options.defaultStaleTime??0;x=!!(h.invalid||v||v===void 0&&Date.now()-h.updatedAt>=se&&(c[5]||h.cause==="enter"||c[2].some(he=>he.routeId===h.routeId&&he.id!==h.id)))}}catch(se){h.invalid=!0,Zn(t,h),S=mr(t,i,m,se,c)}const w=m.options.loader,E=typeof w=="function",z=E?w:w?.handler,A=!p||m.options.preload!==!1;let U=A&&w?t._flights?.get(h.id):void 0;U===h._flight||S?U=void 0:U&&!x&&!p&&v===void 0?x=!0:x||(U=void 0);const H=!!(w&&x&&h.status==="success"&&!p&&!c[4]&&((E?void 0:w.staleReloadMode)??t.options.defaultStaleReloadMode)!=="blocking"),V=x&&A,J=V&&!H&&(h.status!=="success"||!!w),L=s>=d?c[7]:void 0,R=m.lazyFn&&m._lazy!==!0?L:void 0;if(V&&!w&&(h.invalid=!1,h.updatedAt=Date.now()),U&&U[2]++,J){const se=h._flight;h._flight=U,fd(t,h,se)?.abort(),s>=d&&(h.status="pending"),L?.()}V||(h.isFetching=!1);const X=!S&&J?my(t,i,h,m,z,o,c).then(se=>(py(h,se,p),se[0]===yn&&(w&&!c[0].signal.aborted&&B1(t,h,b),s>=d&&(h.status="pending")),se)):Promise.resolve(S??[yn,h.loaderData]),P=(async()=>{try{const he=Ia(m,void 0,R);he&&await aa(he,c[0].signal)}catch(he){if(!i[1].some((ge,Y)=>Y<=s&&(ge.status==="error"||ge.status==="notFound"||ge._notFound)))return[s,mr(t,i,m,he,c)]}const se=await X;J&&se[0]===yn&&h.status==="pending"&&!c[0].signal.aborted&&(h.status="success",L?.())})();if(r.push([s,X,P]),!H)return X.then(se=>gy(h,se));const te={...h,status:"pending",preload:!1,_flight:U};h.invalid=!1,h.isFetching="loader";const le=my(t,i,te,m,z,o,c).then(se=>(h.isFetching=!1,py(te,se,!1),se));return(i[2]??=[]).push([s,le,P,te]),le.then(se=>gy(te,se))}async function qf(t,i,s,r,o=0){const c=s?.[1][1];let d=c?.routeId?i.findIndex(h=>h.routeId===c.routeId):s?.[0]??i.length-1;d<0&&(d=0);for(let h=d;h>=0;h--){const m=sa(t,i[h]);try{const p=Ia(m,!1);p&&await aa(p,r)}catch(p){if(p===r&&r.aborted)throw p}if(m.options.notFoundComponent)return h}return c?.routeId?d:o}function Ii(t,i){i[2]&&(Nt(t,i[2].map(s=>s[3])),i[2]=void 0)}async function yy(t,i,s,r){let o;try{await Promise.all(t.map(c=>c[1].then(async d=>{const h=c[0];if(!(r&&h>=await r)){if(d[0]>=St)throw[h,d];!o&&d[0]!==yn&&(o=[h,d],await Promise.all((s??[]).map(m=>{if(!(m[0]<=h))return m[1].then(p=>{if(p[0]===St)throw[m[0],p]})})))}})))}catch(c){return c}return i??o}function hd(t,i,s,r,o,c){for(;r[0]===St;){const d=r[1],h=d.options;try{if((h.href||d.headers.has("Location"))&&(t.resolveRedirect(d),h.reloadDocument)||(h.reloadDocument?o[3]:o[1]>=20))return r;const m=t.buildLocation({...h,_fromLocation:i[0],_includeValidateSearch:!0}),p=m.maskedLocation??m;if(p.external){const b=d.clone();return b.options={...h},b.headers.set("Location",p.publicHref),t.resolveRedirect(b),o[3]?[St,b]:[St,b,p]}return[St,d,m]}catch(m){r=c?[Hn,m]:cd(s,m),c=!0}}return r}async function Jv(t,i,s,r,o,c){const d=i[1];let h=await o,m=!1;const p=d.findIndex(S=>S._notFound),b=S=>S[1][0]===Ro?qf(t,d,S,r.signal):S[0];let v=p<0?d.length:p;if((h?.[1][0]??0)>=St)v=0;else if(h){v=h[2]??=await b(h);for(const S of s){if(S[0]>=v)break;const w=await S[1];if(w[0]!==yn&&w[0]<St&&!("loaderData"in d[S[0]])){h=[S[0],w],v=h[2]=await b(h);break}}}for(const S of s){if(S[0]>=v)break;const w=await S[2];if(w){h=w;break}}if((h?.[1][0]??0)>=St){const S=h[1];if(S[0]!==St||S[1].options.reloadDocument||S[2])return Ii(t,i),S;m=!0,h=[0,[Hn,new Error("Too many redirects")]]}const x=h?h[2]??await b(h):p;if(x>=0){const S=h?.[1],w=S?.[0],E=d[x],z=S?.[1],A=()=>{S&&(E._notFound=void 0,w===Hn?E.status="error":(z.routeId=E.routeId,E.routeId===t.routeTree.id?(E.status="success",E._notFound=!0):E.status="notFound"),E.error=z,E.isFetching=!1)};A(),S||c?.();const U=sa(t,E);try{await aa(S?Promise.resolve().then(()=>Ia(U,w===Hn?"errorComponent":"notFoundComponent")):Promise.all([Ia(U),Ia(U,"notFoundComponent")]),r.signal)}catch(H){if(H===r.signal&&r.signal.aborted)return Ii(t,i),wi}S?m&&(r.abort(),await Promise.all([...s.map(H=>H[1]),...s.map(H=>H[2]),...(i[2]??[]).map(H=>H[1])]),Ii(t,i),Nt(t,d),A()):E.status="success"}return i}async function Iv(t,i,s,r=0,o=i[1].length){const c=i[1];for(let d=r;d<o;d++){const h=c[d],m=sa(t,h).options;if(m.head||m.scripts)try{const p={ssr:t.options.ssr,matches:c,match:h,params:h.params,loaderData:h.loaderData},[b,v]=await aa(Promise.all([m.head?.(p),m.scripts?.(p)]),s);h.meta=b?.meta,h.links=b?.links,h.headScripts=b?.scripts,h.styles=b?.styles,h.scripts=v}catch(p){if(p===s&&s.aborted)break;console.error(p)}if(h.status!=="success"||h._notFound)break}return i}async function Wv(t,i,s,r){const o=[i,s],c=r[0].signal;let d;try{const h=t.stores.matches.get();let m=s.findIndex(A=>A._notFound);if(t.options.notFoundMode!=="root"&&m>=0){const A=await qf(t,s,void 0,c,m);s[m]._notFound=void 0,s[A]._notFound=!0,m=A}let p=m<0?s.length:m+1,b=0;for(;b<p&&b!==m;){const A=s[b],U=r[2][b],H=h[b];if(U?.id!==A.id||U.status!=="success"||A.preload||H?.id!==A.id||H.status!=="success"||(b++,U._notFound||H._notFound))break}const v=[],x=r[6]??0;let S=x?Promise.resolve(s[x-1]):void 0;const w=()=>{for(let A=x;A<p&&!c.aborted;A++)S=$1(t,o,A,v,S,r,b)},E=await q1(t,o,r,p,w,b);if(E){if(r[4]=!0,p=E[0],E[1][0]===Ro){const A=await qf(t,s,E,c);E[2]=A,p=Math.min(p,A+1)}else E[1][0]>=St&&(p=0);w()}if(!c.aborted&&!r[3]){const A=[];for(const[U,H]of t._flights??[])H[2]||(t._flights.delete(U),A.push(H[1]));for(const U of A)U.abort()}const z=Jv(t,o,v,r[0],yy(v,E,o[2]),r[7]);o[2]?.length&&(o[3]=yy(o[2],void 0,void 0,z.then(A=>br(A)?0:ud(s).length,()=>0))),d=await z}catch(h){if(Ii(t,o),h===c&&c.aborted)return wi;throw h}return br(d)?d:Iv(t,d,c,r[6]===s.length?r[6]:0)}function Bf(t,i){if(t._tx!==i)return;const s=i[3],r=t.stores.matches.get();let o=t._pending;for(let c=0;c<s.length;c++){const d=s[c],h=d.status==="success"&&!d._notFound,m=r[c]?.id===d.id&&r[c]?.status==="pending";if(h&&!m)continue;const p=sa(t,d),b=h||d.invalid?0:p.options.pendingMs??t.options.defaultPendingMs,v=p.options.pendingComponent??t.options.defaultPendingComponent;if(!v||typeof b!="number"||b===1/0){o&&(o[0]=i,o[2]=0,o[4]=!0);return}const x=p.options.pendingMinMs??t.options.defaultPendingMinMs??0;let S=!1;if(o?.[1]===d.id?(S=o[0]!==i,o[0]=i):(clearTimeout(o?.[3]),t._pending=o=void 0),o||(t._pending=o=[i,d.id,m?Date.now()+x:i[4]+b,void 0,m||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(()=>Bf(t,i),z);return}o[2]=0}const w=s.map(z=>({...z,_flight:void 0}));w[c].status="pending";const E=o[4]=t.startTransition(()=>t.stores.setMatches(w),w).then(z=>(z&&t._pending===o&&o[4]===E&&!o[2]&&(o[2]=Date.now()+x),z));return}}function lr(t,i){const s=t._pending;(t._tx===i||!t._tx?.[3].some(r=>r.id===s?.[1]))&&(clearTimeout(s?.[3]),t._pending=void 0)}async function vy(t,i){const s=t._pending;if(!s)return;clearTimeout(s[3]);const r=s[2]-Date.now();if(!s[4]||r<=0||!ud(i[3]).some(c=>c.id===s[1]))return;let o;try{await aa(new Promise(c=>{o=setTimeout(c,r)}),i[0].signal)}catch{}clearTimeout(o)}function eb(t,i){t._committed=i,t.stores.setMatches(i)}function H1(t,i,s,r){const o=t._committed,c=t._lifecycleEnd,d=t._cache;for(const b of s)b.preload=!1,r&&(b._assetEnd=void 0);const h=ud(s).length,m=new Map;{const b=Date.now(),v=new Set;for(let x=0;x<s.length;x++){const S=s[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=sa(t,x);!S.options.loader||b-x.updatedAt>=(x.preload?S.options.preloadGcTime??t.options.defaultPreloadGcTime??3e5:S.options.gcTime??t.options.defaultGcTime??3e5)||m.set(x.id,d.get(x.id)===x?x:{...x,_flight:void 0,isFetching:!1,context:{}})}}i[3]=[],t._cache=m;const p=t._lifecycleEnd=N1(s);eb(t,s),Nt(t,[...d.values(),...o].filter(b=>b._flight&&m.get(b.id)!==b),s),A1(t,o,s,c,p,i)}async function Vl(t,i){let s=t._tx;for(;s&&s!==i;)i=s,await s[5],s=t._tx}function tb(t,i,s){const r=s[1].options,o=s[2];if(!o)return t.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return t.navigate({href:(o.maskedLocation??o).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});o._redirects=i[1]+1,t._pendingLocation=o;const c=t.commitLocation({...o,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{t._pendingLocation===o&&(t._pendingLocation=void 0)}),c}async function Q1(t,i,s,r,o){const c=s.map(m=>({...m}));dd(c);for(const m of r)Zn(t,c[m[0]]),c[m[0]]=m[3];const d=[i[2],c];let h;try{h=await Jv(t,d,r,i[0],o)}catch(m){throw Nt(t,c),m}if(br(h)){Nt(t,c),h[0]===St&&t._tx===i&&t._committed===s&&await tb(t,i,h);return}if(await Iv(t,h,i[0].signal),t._tx!==i||t._committed!==s){Nt(t,c);return}for(const m of c){const p=t._cache.get(m.id);p?._flight&&p._flight===m._flight&&(t._cache.delete(m.id),Zn(t,p))}eb(t,c),Nt(t,s,c)}async function G1(t,i,s,r,o,c){const d=await Wv(t,i[2],i[3],[i[0],i[1],t._committed,void 0,o,s,c,r]);if(br(d)){const v=d[0]===St&&t._tx===i;if((!v||d[1].options.reloadDocument)&&lr(t,i),Nt(t,i[3]),i[3]=[],!v)return;if(t._tx!==i){lr(t,i);return}await tb(t,i,d);return}const h=d[1];if(t._tx===i&&await vy(t,i),t._tx!==i){lr(t,i),Nt(t,h),Ii(t,d);return}const m=i[2],p=Ao(m,t.stores.resolvedLocation.get()),b=d[2];await t.startViewTransition(async()=>{if(t._tx===i&&await vy(t,i),t._tx!==i){lr(t,i),Nt(t,h),Ii(t,d);return}const v=()=>{lr(t,i),H1(t,i,h,c),t._tx===i&&(t.emit({type:"onLoad",...p}),t._tx===i&&t.emit({type:"onBeforeRouteMount",...p}))},x=await t.startTransition(v,h);if(t._tx!==i){Ii(t,d);return}b?.length&&Q1(t,i,h,b,d[3]).catch(console.error),t.batch(()=>{t.stores.resolvedLocation.set(m),t.stores.status.set("idle"),t._tx===i&&t.emit({type:"onResolved",...p}),x&&t._tx===i&&t.emit({type:"onRendered",...p})}),t._tx===i&&(t._commitPromise?.resolve(),t._commitPromise=void 0)})}async function K1(t,i){const s=t._tx,r=t.stores.resolvedLocation.get(),o=r??t.stores.location.get(),c=t.latestLocation,d=t._pendingLocation,h=d?.href===c.href?d._redirects??0:0,m=t._handoff,p=m?.[0](),b=new AbortController,v=t._preflight;if(t._preflight=b,p||m?.[1](),v?.abort(),!b.signal.aborted){const V=Ao(c,r);t.emit({type:"onBeforeNavigate",...V}),b.signal.aborted||t.emit({type:"onBeforeLoad",...V})}if(b.signal.aborted){await Vl(t,s);return}const x=o.href===c.href;let S=b;const w=t.matchRoutes(c,{_controller:b});dd(w);const E=p?m[1](w):void 0;if(E?S=p:p?.abort(),b.signal.aborted){Nt(t,w),await Vl(t,s);return}t._preflight=void 0;let z;const A=()=>G1(t,H,x,()=>Bf(t,H),i?.sync,E),U=i?.sync?new Promise(V=>z=V):Promise.resolve().then(A),H=[S,h,c,w,Date.now(),U.then(()=>Vl(t,H))];if(t._tx=H,s){for(const V of t.stores.matches.get()){if(t._tx!==H)break;V.isFetching&&Sr(t,V,!1)}s[0].abort(),Nt(t,s[3],H[3],!0)}if(t._tx!==H){Nt(t,H[3]),H[3]=[],z?.(),await Vl(t,H);return}t.batch(()=>{t.stores.status.set("pending"),t.stores.location.set(c)}),(E||!t._committed.length&&w[0]?.status!=="success"&&!w.some(V=>V._notFound))&&Bf(t,H),z?.(A()),await H[5]}async function Y1(t,i){let s=t.buildLocation(i);for(let r=0;;r++){const o=t._committed,c=new AbortController;let d,h,m;try{try{d=t.matchRoutes(s,{_controller:c}),dd(d),h=(t._preloads??=new Map).set(c,d),m=await Wv(t,s,d,[c,r,o,!0])}finally{h&&(h=h.delete(c),Nt(t,d)),c.abort()}if(!br(m))return m[1];if(!h||m.length<3)return;s=m[2]}catch(p){ts(p)||console.error(p);return}}}const F1="Error preloading route! ☝️";var nb=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(t){if(this.init=i=>{this.originalIndex=i,this._branch=void 0;const s=this.options,r=!s?.path&&!s?.id;this.parentRoute=this.options.getParentRoute?.(),r?this._path=Ja:this.parentRoute||rd();let o=r?Ja:s?.path;o&&o!=="/"&&(o=qv(o));const c=s?.id||o,d=r?Ja:Xa((this.parentRoute.id==="__root__"?"":this.parentRoute.id)+"/"+(c??""));o==="__root__"&&(o="/");const h=d==="__root__"?"/":o===void 0?this.parentRoute.fullPath:Xa(this.parentRoute.fullPath+"/"+o);this._path=o,this._id=d,this._fullPath=h,this._to=gn(h)},this.addChildren=i=>this._addFileChildren(i),this._addFileChildren=i=>(Array.isArray(i)&&(this.children=i),typeof i=="object"&&i!==null&&(this.children=Object.values(i)),this),this._addFileTypes=()=>this,this.updateLoader=i=>(Object.assign(this.options,i),this),this.update=i=>(Object.assign(this.options,i),this),this.lazy=i=>(this.lazyFn=i,this),this.redirect=i=>h1({from:this.fullPath,...i}),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}},V1=class extends nb{constructor(t){super(t)}},md=class extends W.Component{constructor(...t){super(...t),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(t,i){const s=t.getResetKey();return i.error&&i.resetKey!==s?{resetKey:s,error:0}:{resetKey:s}}static getDerivedStateFromError(t){return{error:[t]}}componentDidCatch(t,i){this.props.onCatch?.(t,i)}render(){const t=this.state.error;return t?W.createElement(this.props.errorComponent??P1,{error:t[0],reset:this.reset}):this.props.children}};function P1({error:t}){const[i,s]=W.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:()=>s(r=>!r),children:i?"Hide Error":"Show Error"})]}),g.jsx("div",{style:{height:".25rem"}}),i?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 by=()=>!0,X1=()=>!1;function J1({children:t,fallback:i=null}){return g.jsx(No.Fragment,{children:I1()?t:i})}function I1(t=!0){return No.useSyncExternalStore(W1,by,t?X1:by)}function W1(){return()=>{}}var ib=W.createContext(null);function bn(t){return W.useContext(ib)}function ew(t,i){const s=t.stores.location,r=new Set;let o,c;const d=h=>{Z1(t,i,h)||(o=h,r.forEach(m=>m()))};return[()=>o??s.get(),h=>(r.size||(o=s.get(),c=s.subscribe(d).unsubscribe),r.add(h),()=>{r.delete(h),r.size||(c(),o=void 0)})]}var _r=W.createContext(void 0),tw=W.createContext(void 0);function nw({update:t,notify:i,unwatched:s}){return{link:r,unlink:o,propagate:c,checkDirty:d,shallowPropagate:h};function r(p,b,v){const x=b.depsTail;if(x!==void 0&&x.dep===p)return;const S=x!==void 0?x.nextDep:b.deps;if(S!==void 0&&S.dep===p){S.version=v,b.depsTail=S;return}const w=p.subsTail;if(w!==void 0&&w.version===v&&w.sub===b)return;const E=b.depsTail=p.subsTail={version:v,dep:p,sub:b,prevDep:x,nextDep:S,prevSub:w,nextSub:void 0};S!==void 0&&(S.prevDep=E),x!==void 0?x.nextDep=E:b.deps=E,w!==void 0?w.nextSub=E:p.subs=E}function o(p,b=p.sub){const v=p.dep,x=p.prevDep,S=p.nextDep,w=p.nextSub,E=p.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=E:v.subsTail=E,E!==void 0?E.nextSub=w:(v.subs=w)===void 0&&s(v),S}function c(p){let b=p.nextSub,v;e:do{const x=p.sub;let S=x.flags;if(S&60?S&12?S&4?!(S&48)&&m(p,x)?(x.flags=S|40,S&=1):S=0:x.flags=S&-9|32:S=0:x.flags=S|32,S&2&&i(x),S&1){const w=x.subs;if(w!==void 0){const E=(p=w).nextSub;E!==void 0&&(v={value:b,prev:v},b=E);continue}}if((p=b)!==void 0){b=p.nextSub;continue}for(;v!==void 0;)if(p=v.value,v=v.prev,p!==void 0){b=p.nextSub;continue e}break}while(!0)}function d(p,b){let v,x=0,S=!1;e:do{const w=p.dep,E=w.flags;if(b.flags&16)S=!0;else if((E&17)===17){if(t(w)){const z=w.subs;z.nextSub!==void 0&&h(z),S=!0}}else if((E&33)===33){(p.nextSub!==void 0||p.prevSub!==void 0)&&(v={value:p,prev:v}),p=w.deps,b=w,++x;continue}if(!S){const z=p.nextDep;if(z!==void 0){p=z;continue}}for(;x--;){const z=b.subs,A=z.nextSub!==void 0;if(A?(p=v.value,v=v.prev):p=z,S){if(t(b)){A&&h(z),b=p.sub;continue}S=!1}else b.flags&=-33;b=p.sub;const U=p.nextDep;if(U!==void 0){p=U;continue e}}return S}while(!0)}function h(p){do{const b=p.sub,v=b.flags;(v&48)===32&&(b.flags=v|16,(v&6)===2&&i(b))}while((p=p.nextSub)!==void 0)}function m(p,b){let v=b.depsTail;for(;v!==void 0;){if(v===p)return!0;v=v.prevDep}return!1}}function iw(t,i,s){const r=typeof t=="object",o=r?t:void 0;return{next:(r?t.next:t)?.bind(o),error:(r?t.error:i)?.bind(o),complete:(r?t.complete:s)?.bind(o)}}const $f=[];let uo=0;const{link:xy,unlink:aw,propagate:sw,checkDirty:ab,shallowPropagate:Sy}=nw({update(t){return t._update()},notify(t){$f[Hf++]=t,t.flags&=-3},unwatched(t){t.depsTail!==void 0&&(t.depsTail=void 0,t.flags=17,xo(t))}});let Pl=0,Hf=0,rn,Qf=0;function rw(t){try{++Qf,t()}finally{--Qf||sb()}}function xo(t){const i=t.depsTail;let s=i!==void 0?i.nextDep:t.deps;for(;s!==void 0;)s=aw(s,t)}function sb(){if(!(Qf>0)){for(;Pl<Hf;){const t=$f[Pl];$f[Pl++]=void 0,t.notify()}Pl=0,Hf=0}}function _y(t,i){const s=typeof t=="function",r=t,o={_snapshot:s?void 0:t,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:s?0:1,get(){return rn!==void 0&&xy(o,rn,uo),o._snapshot},subscribe(c){const d=iw(c),h={current:!1},m=lw(()=>{o.get(),h.current?(rn=void 0,d.next?.(o._snapshot)):h.current=!0});return{unsubscribe:()=>{m.stop()}}},_update(c){const d=rn,h=i?.compare??Object.is;if(s)rn=o,++uo,o.depsTail=void 0;else if(c===void 0)return!1;s&&(o.flags=5);try{const m=o._snapshot,p=typeof c=="function"?c(m):c===void 0&&s?r(m):c;return m===void 0||!h(m,p)?(o._snapshot=p,!0):!1}finally{rn=d,s&&(o.flags&=-5),xo(o)}}};return s?(o.flags=17,o.get=function(){const c=o.flags;if(c&16||c&32&&ab(o.deps,o)){if(o._update()){const d=o.subs;d!==void 0&&Sy(d)}}else c&32&&(o.flags=c&-33);return rn!==void 0&&xy(o,rn,uo),o._snapshot}):o.set=function(c){if(o._update(c)){const d=o.subs;d!==void 0&&(sw(d),Sy(d),sb())}},o}function lw(t){const i=()=>{const r=rn;rn=s,++uo,s.depsTail=void 0,s.flags=6;try{return t()}finally{rn=r,s.flags&=-5,xo(s)}},s={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:6,notify(){const r=this.flags;r&16||r&32&&ab(this.deps,this)?i():this.flags=2},stop(){this.flags=0,this.depsTail=void 0,xo(this)}};return i(),s}var gf={exports:{}},yf={},vf={exports:{}},bf={};var wy;function ow(){if(wy)return bf;wy=1;var t=Er();function i(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var s=typeof Object.is=="function"?Object.is:i,r=t.useState,o=t.useEffect,c=t.useLayoutEffect,d=t.useDebugValue;function h(v,x){var S=x(),w=r({inst:{value:S,getSnapshot:x}}),E=w[0].inst,z=w[1];return c(function(){E.value=S,E.getSnapshot=x,m(E)&&z({inst:E})},[v,S,x]),o(function(){return m(E)&&z({inst:E}),v(function(){m(E)&&z({inst:E})})},[v]),d(S),S}function m(v){var x=v.getSnapshot;v=v.value;try{var S=x();return!s(v,S)}catch{return!0}}function p(v,x){return x()}var b=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return bf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:b,bf}var Ey;function uw(){return Ey||(Ey=1,vf.exports=ow()),vf.exports}var Oy;function cw(){if(Oy)return yf;Oy=1;var t=Er(),i=uw();function s(p,b){return p===b&&(p!==0||1/p===1/b)||p!==p&&b!==b}var r=typeof Object.is=="function"?Object.is:s,o=i.useSyncExternalStore,c=t.useRef,d=t.useEffect,h=t.useMemo,m=t.useDebugValue;return yf.useSyncExternalStoreWithSelector=function(p,b,v,x,S){var w=c(null);if(w.current===null){var E={hasValue:!1,value:null};w.current=E}else E=w.current;w=h(function(){function A(L){if(!U){if(U=!0,H=L,L=x(L),S!==void 0&&E.hasValue){var R=E.value;if(S(R,L))return V=R}return V=L}if(R=V,r(H,L))return R;var X=x(L);return S!==void 0&&S(R,X)?(H=L,R):(H=L,V=X)}var U=!1,H,V,J=v===void 0?null:v;return[function(){return A(b())},J===null?void 0:function(){return A(J())}]},[b,v,x,S]);var z=o(p,w[0],w[1]);return d(function(){E.hasValue=!0,E.value=z},[z]),m(z),z},yf}var jy;function fw(){return jy||(jy=1,gf.exports=cw()),gf.exports}var dw=fw();function hw(t,i){return t===i}function ta(t,i=r=>r,s){const r=s?.compare??hw,o=W.useCallback(d=>{const{unsubscribe:h}=t.subscribe(d);return h},[t]),c=W.useCallback(()=>t.get(),[t]);return dw.useSyncExternalStoreWithSelector(o,c,c,i,r)}var zy={};function mw(t,i){const s=W.useRef();return r=>{const o=t?.select?t.select(r):r;return t?.structuralSharing??i.options.defaultStructuralSharing?s.current=xi(s.current,o):o}}function ra(t){const i=bn(),s=W.useContext(t.from?tw:_r),r=t.from??s,o=i.stores.getMatchStore(r),c=mw(t,i),d=ta(o,h=>h?c(h):zy);if(d!==zy)return d;(t.shouldThrow??!0)&&rd()}function rb(t){return ra({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:i=>t.select?t.select(i.loaderData):i.loaderData})}function lb(t){const{select:i,...s}=t;return ra({...s,select:r=>i?i(r.loaderDeps):r.loaderDeps})}function ob(t){return ra({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:i=>{const s=t.strict===!1?i.params:i._strictParams;return t.select?t.select(s):s}})}function ub(t){return ra({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:i=>t.select?t.select(i.search):i.search})}function Co(t){const i=bn();return W.useCallback(s=>i.navigate({...s,from:s.from??t?.from}),[t?.from,i])}function cb(t){return ra({...t,select:i=>t.select?t.select(i.context):i.context})}function pw(...t){const i=W.useRef(t),s=i.current;return t.forEach((r,o)=>{$n(s[o],r,!1,!0)||(s[o]=r)}),i.current}function Xl(t,i){t.preloadRoute(i).catch(s=>{console.warn(s),console.warn(F1)})}function gw(t,i){const s=typeof t=="string"&&yr(t);if(s)return i.has(s)?t:null}function yw(t,i,s,r){const o=ty(t.pathname,r),c=ty(i.pathname,r);return(s?.exact?o!==c:!(o.startsWith(c)&&(o.length===c.length||o[c.length]==="/")))||(s?.includeSearch??!0)&&!$n(t.search,i.search,!s?.exact,s?.explicitUndefined)?!1:!s?.includeHash||t.hash===i.hash}function vw(t,i,s){const r=bn(),o=W.useRef(null),c=W.useCallback(q=>{if(o.current=q,typeof i=="function")return i(q);i&&(i.current=q)},[i]),{activeOptions:d,to:h,preload:m,preloadDelay:p,disabled:b,target:v,onClick:x,onBlur:S,onFocus:w,onMouseEnter:E,onMouseLeave:z,onTouchStart:A}=t,[U,H,V]=pw(t.search,t.params,d),J=W.useContext(_r),L=(r.stores._linkScopes??={})[J]??=ew(r,J),[R,X,P]=W.useMemo(()=>{const q=gw(h,r.protocolAllowlist);if(q!==void 0){const Ze=[q??void 0];return[t,()=>Ze]}const ee={...t};let ne,me,xe;const je=()=>{const Ze=L[0]();if(Ze!==ne){ee._fromLocation=Ze;const $e=r.buildLocation(ee),cn=ww($e,r,b),Ai=b||cn&&!yr(cn)?yw(Ze,$e,V,r.basepath):void 0;(!me||me[0]!==cn||me[1]!==Ai)&&(me=[cn,Ai]),ne=Ze}return me};return[ee,je,V?.includeHash&&(()=>{const Ze=je();return Ze[1]?xe??=[Ze[0],!1]:Ze})]},[r,L,t.from,t.hash,t.href,h,U,H,t.state,t.mask,t.unsafeRelative,V,b]),[te,le]=W.useSyncExternalStore(L[1],X,P||X),se=le===void 0&&te,he=b||te===void 0,ge=W.useRef(!1),Y=t.reloadDocument||se||he?!1:m??r.options.defaultPreload,M=p??r.options.defaultPreloadDelay??0,I=W.useCallback(q=>{const ee=q?.isIntersecting;if(!(ee??Y==="intent")){ee===!1&&Jl(o);return}if(!M){Xl(r,R);return}o.t??=setTimeout(()=>{o.t=void 0,Xl(r,R)},M)},[r,R,o,Y,M]);W.useEffect(()=>{if(!Y)return;Y==="render"&&!ge.current&&(ge.current=!0,Xl(r,R));let q=!0,ee;return Y==="viewport"&&o.current&&typeof IntersectionObserver=="function"&&(ee=new IntersectionObserver(ne=>{q&&I(ne.pop())},{rootMargin:"100px"}),ee.observe(o.current)),()=>{q=!1,ee?.disconnect(),Jl(o)}},[r,R,Y,I,o]);const B=Sw(t,s);if(B.ref=i?c:o,se)return B.href=se,B;const ie=q=>{const ee=v??q.currentTarget.getAttribute("target");!he&&!(q.metaKey||q.altKey||q.ctrlKey||q.shiftKey)&&!q.defaultPrevented&&(!ee||ee==="_self")&&q.button===0&&(q.preventDefault(),Jl(o),r.navigate({...t,_fromLocation:R._fromLocation}))},fe=()=>{Y==="intent"&&Xl(r,R)},j=()=>{Y==="intent"&&Jl(o)};return B.onClick=Va(x,ie),B.onBlur=Va(S,j),B.onFocus=Va(w,I),B.onMouseEnter=Va(E,I),B.onMouseLeave=Va(z,j),B.onTouchStart=Va(A,fe),_w(B,t,le,te,he,s)}var bw={},xw={className:"active"},fb=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 Sw(t,i){const s={};for(const r in t)fb.has(r)||r==="type"&&i!==void 0||r==="disabled"&&i==="a"||(s[r]=t[r]);return s}function _w(t,i,s,r,o,c){const{activeProps:d,inactiveProps:h,className:m,style:p,target:b}=i,v=kv(s?d:h,{})??(s?xw:bw);Object.assign(t,v),t.href=r,c!=="a"&&(t.disabled=o),t.target=b;const x=v.style;(p||x)&&(t.style=p&&x?{...p,...x}:p||x);const S=v.className;return(m||S)&&(t.className=m?S?`${m} ${S}`:m:S),o&&(t.role="link",t["aria-disabled"]=!0),s&&(t["data-status"]="active",t["aria-current"]="page"),t}var Jl=t=>{clearTimeout(t.t),t.t=void 0},Va=(t,i)=>t?s=>s.defaultPrevented||(t(s),s.defaultPrevented||i(s)):i;function ww(t,i,s){if(s)return;const r=t.maskedLocation??t,o=r.external?r.publicHref:i.history.createHref(r.publicHref)||"/";if(!((r.external||o!==r.publicHref)&&Zv(o,i.protocolAllowlist)))return o}var us=W.memo(W.forwardRef((t,i)=>{const s=t._asChild||"a",r=vw(t,i,s),o=typeof t.children=="function"?t.children({isActive:r["data-status"]==="active"}):t.children;return W.createElement(s,r,o)}),Ew);function Ew(t,i){let s=0;for(const r in i)if(s++,t[r]!==i[r]&&(!fb.has(r)||!$n(t[r],i[r],!1,!0)))return!1;for(const r in t)s--;return s===0}var Ow=class extends nb{constructor(t){super(t),this.useMatch=i=>ra({...i,from:this.id}),this.useRouteContext=i=>cb({...i,from:this.id}),this.useSearch=i=>ub({...i,from:this.id}),this.useParams=i=>ob({...i,from:this.id}),this.useLoaderDeps=i=>lb({...i,from:this.id}),this.useLoaderData=i=>rb({...i,from:this.id}),this.useNavigate=()=>Co({from:this.fullPath}),this.Link=No.forwardRef((i,s)=>g.jsx(us,{ref:s,from:this.fullPath,...i}))}};function la(t){return new Ow(t)}var jw=class extends V1{constructor(t){super(t),this.useMatch=i=>ra({...i,from:this.id}),this.useRouteContext=i=>cb({...i,from:this.id}),this.useSearch=i=>ub({...i,from:this.id}),this.useParams=i=>ob({...i,from:this.id}),this.useLoaderDeps=i=>lb({...i,from:this.id}),this.useLoaderData=i=>rb({...i,from:this.id}),this.useNavigate=()=>Co({from:this.fullPath}),this.Link=No.forwardRef((i,s)=>g.jsx(us,{ref:s,from:this.fullPath,...i}))}};function zw(t){return new jw(t)}function Tw(t){const i=bn(),s=`not-found-${ta(i.stores.location,r=>r.pathname)}-${ta(i.stores.status)}`;return g.jsx(md,{getResetKey:()=>s,onCatch:(r,o)=>{if(ts(r))t.onCatch?.(r,o);else throw r},errorComponent:({error:r})=>{if(ts(r))return t.fallback?.(r);throw r},children:t.children})}function Nw(){return g.jsx("p",{children:"Not Found"})}function db(t,i,s){return i.options.notFoundComponent?g.jsx(i.options.notFoundComponent,{...s}):t.options.defaultNotFoundComponent?g.jsx(t.options.defaultNotFoundComponent,{...s}):g.jsx(Nw,{})}function Mo(t,i){const s=i?.options.pendingComponent??t.options.defaultPendingComponent;return s?g.jsx(s,{}):null}var Aw=(t,i)=>t[0]===i[0]&&t[1]===i[1],hb=(t,i,s)=>!i.isRoot||i.options.shellComponent||i.options.wrapInSuspense||s===!1||s==="data-only"||!t.ssr,mb=W.memo(function({routeId:i}){const s=bn(),r=s.stores.getMatchStore(i);return Rw(s,ta(r))});function Rw(t,i){const s=t.routesById[i.routeId],r=Mo(t,s),o=s.options.errorComponent??t.options.defaultErrorComponent,c=s.options.onCatch??t.options.defaultOnCatch,d=s.isRoot?s.options.notFoundComponent??t.options.notFoundRoute?.options.component:s.options.notFoundComponent,h=i.ssr===!1||i.ssr==="data-only",m=hb(t,s,i.ssr)&&(s.options.wrapInSuspense??r??(s.options.errorComponent?.preload||h));let p=g.jsx(Cw,{match:i});h&&(p=g.jsx(J1,{fallback:r,children:p})),d&&(p=g.jsx(Tw,{fallback:x=>{if(x.routeId??=i.routeId,x.routeId!==i.routeId)throw x;return W.createElement(d,x)},children:p})),o&&(p=g.jsx(md,{getResetKey:()=>i,errorComponent:o,onCatch:(x,S)=>{if(ts(x))throw x.routeId??=i.routeId,x;c?.(x,S)},children:p})),m&&(p=g.jsx(W.Suspense,{fallback:r,children:p}));const b=null,v=s.isRoot&&s.options.shellComponent;return v?g.jsx(_r.Provider,{value:i.routeId,children:g.jsxs(v,{children:[p,b]})}):g.jsxs(_r.Provider,{value:i.routeId,children:[p,b]})}var Cw=W.memo(function({match:i}){const s=bn(),r=i.routeId,o=s.routesById[r],c=W.useMemo(()=>{const h=(o.options.remountDeps??s.options.defaultRemountDeps)?.({routeId:r,loaderDeps:i.loaderDeps,params:i._strictParams,search:i._strictSearch});return h?JSON.stringify(h):void 0},[r,i.loaderDeps,i._strictParams,i._strictSearch,o.options.remountDeps,s.options.defaultRemountDeps]),d=W.useMemo(()=>{const h=o.options.component??s.options.defaultComponent;return h?g.jsx(h,{},c):g.jsx(pb,{})},[c,o.options.component,s.options.defaultComponent]);if(i.status==="pending"){if(s.ssr&&!hb(s,o,i.ssr))return d;if(s._tx)throw s._tx[5];return Mo(s,o)}if(i.status==="notFound")return db(s,o,i.error);if(i.status==="error")throw i.error;return d}),pb=W.memo(function(){const i=bn(),s=W.useContext(_r);let r,o,c;{const h=i.stores.getMatchStore(s);[r,o]=ta(h,m=>[!!m._notFound,m.error],{compare:Aw}),c=ta(i.stores.ids,m=>m[m.indexOf(s)+1])}if(r)return db(i,i.routesById[s],o);if(!c)return null;const d=g.jsx(mb,{routeId:c});return s===Ja?g.jsx(W.Suspense,{fallback:Mo(i),children:d}):d});function gb(t,i){const s=t[1];t.length=0,s?.(i)}function Mw({t}){const i=bn(),s=i._rendered??=[];return i.startTransition=(r,o)=>new Promise(c=>{gb(s,!1),s.push(o,c),t(i),W.startTransition(r)}),Dv(()=>{const r=i.history.subscribe(i.load);i.updateLatestLocation();const o=i.latestLocation,c=i.buildLocation({to:o.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(gn(o.publicHref)!==gn(c.publicHref))return i.commitLocation({...c,replace:!0,ignoreBlocker:!0}),r;const d=i.stores.resolvedLocation.get();return d?.href===o.href&&d.state.__TSR_key===o.state.__TSR_key?s.push(i.stores.matches.get(),h=>{h&&i.emit({type:"onRendered",...Ao(d,d)})}):i._tx||i.load({sync:!0}).catch(console.error),r},[i,i.history]),null}function Dw(){const t=bn(),i=t.routesById[Ja],s=Mo(t,i),r=g.jsxs(g.Fragment,{children:[g.jsx(Mw,{t:W.useState()[1]}),t.ssr?g.jsx(Ty,{}):g.jsx(W.Suspense,{fallback:s,children:g.jsx(Ty,{})})]});return t.options.InnerWrap?g.jsx(t.options.InnerWrap,{children:r}):r}function Ty(){const t=bn(),i=t._rendered,s=ta(t.stores.matches,d=>i[0]??d),r=s[0],o=r?.routeId;Dv(()=>{i[0]===s&&gb(i,!0)},[i,s]);const c=o?g.jsx(mb,{routeId:o}):null;return t.options.disableGlobalCatchBoundary?c:g.jsx(md,{getResetKey:()=>r,onCatch:void 0,children:c})}var kw=t=>({createMutableStore:_y,createReadonlyStore:_y,batch:rw}),Uw=t=>new Lw(t),Lw=class extends R1{constructor(t){super(t,kw)}};function Zw({router:t,children:i,...s}){Uv(s)&&t.update({...t.options,...s,context:{...t.options.context,...s.context}});const r=g.jsx(ib.Provider,{value:t,children:i});return t.options.Wrap?g.jsx(t.options.Wrap,{children:r}):r}function qw({router:t,...i}){return g.jsx(Zw,{router:t,...i,children:g.jsx(Dw,{})})}const Bw={sm:20,md:32,lg:48},$w=[{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 yb({size:t="md",label:i,className:s=""}){const r=Bw[t];return g.jsx("svg",{"data-pattern":"OgygieMark",viewBox:"0 0 96 96",width:r,height:r,fill:"currentColor",className:`shrink-0 ${s}`,...i===void 0?{"aria-hidden":!0}:{role:"img","aria-label":i},children:$w.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 Hw=t=>1-(1-t)**3;function Qw(t,i){return t.toLocaleString("fr-FR",{minimumFractionDigits:i,maximumFractionDigits:i})}function Gw(){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 Ny(){return typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Kw(t){const[i,s]=W.useState(()=>typeof window>"u"||typeof window.requestAnimationFrame!="function"||Ny()?t:0),r=W.useRef(!1);return W.useEffect(()=>{if(r.current||typeof window.requestAnimationFrame!="function"||Ny()){r.current=!0,s(t);return}r.current=!0;const o=Gw();let c=null,d=0;const h=m=>{c===null&&(c=m);const p=Math.min(1,(m-c)/o);s(t*Hw(p)),p<1&&(d=window.requestAnimationFrame(h))};return d=window.requestAnimationFrame(h),()=>window.cancelAnimationFrame(d)},[t]),i}function Qn({value:t,format:i,decimals:s=0,className:r=""}){const o=Kw(t),c=i===void 0?Qw(o,s):i(o);return g.jsx("span",{"data-pattern":"Counter","data-value":t,className:`tabular-nums ${r}`,children:c})}function Gf(t){const i=Object.values(t).filter(r=>typeof r=="number");return Object.entries(t).filter(([r,o])=>i.indexOf(+r)===-1).map(([r,o])=>o)}function Ay(t,i="|"){return t.map(s=>wb(s)).join(i)}function Kf(t,i){return typeof i=="bigint"?i.toString():i}class Yw{constructor(i){this._getter=i,this._value=void 0}get value(){const i=this._getter;return i!==void 0&&(this._value=i(),this._getter=void 0),this._value}}function pd(t){return new Yw(t)}function Fw(t){return t==null}function gd(t){const i=t.startsWith("^")?1:0,s=t.endsWith("$")?t.length-1:t.length;return t.slice(i,s)}function Vw(t,i){const s=t/i,r=Math.round(s),o=4*Number.EPSILON*Math.max(Math.abs(s),1);return Math.abs(s-r)<o?0:s-r}function zi(t,i,s){Object.defineProperty(t,i,{value:s,writable:!0,enumerable:!0,configurable:!0})}function vb(t){const i=Object.getOwnPropertyDescriptor(t,"shape");return i?.get?i.get.raw:i?.value}function Gn(t){return vb(t._zod.def)??t._zod.def.shape}function bb(t,i,s){Object.defineProperty(t,i,{get(){const r=s();return zi(this,i,r),r},enumerable:!0,configurable:!0})}function xb(t,i,s){i in t?zi(t,i,s):t[i]=s}function na(t,i,s,r){const o=Gn(i);for(const c of s){const d=Object.getOwnPropertyDescriptor(o,c);d.enumerable&&(d.get?bb(t,c,()=>{const h=i._zod.def.shape[c];return r?r(h,c):h}):xb(t,c,r?r(d.value,c):d.value))}}function Pw(t,i){for(const s of Reflect.ownKeys(i)){const r=Object.getOwnPropertyDescriptor(i,s);r.enumerable&&(r.get?bb(t,s,()=>i[s]):xb(t,s,r.value))}}function Qt(...t){const i={};for(const s of t){const r=Object.getOwnPropertyDescriptors(s);Object.assign(i,r)}return Object.defineProperties({},i)}function Xw(t){return JSON.stringify(t)}function Jw(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Sb="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function So(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Iw=pd(()=>{if(un.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function ns(t){if(So(t)===!1)return!1;const i=t.constructor;if(i===void 0||typeof i!="function")return!0;const s=i.prototype;return!(So(s)===!1||Object.prototype.hasOwnProperty.call(s,"isPrototypeOf")===!1)}function _b(t){return ns(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}const Ww=new Set(["string","number","symbol"]);function is(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ti(t,i,s){const r=new t._zod.constr(i??t._zod.def);return(!i||s?.parent)&&(r._zod.parent=t),r}function ue(t){const i=t;if(!i)return{};if(typeof i=="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");i.error=i.message}return delete i.message,typeof i.error=="string"?{...i,error:()=>i.error}:i}function wb(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function e2(t){return Object.keys(t).filter(i=>t[i]._zod.optin!==void 0&&t[i]._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]},t2={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function n2(t,i){const s=t._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c={};return na(c,t,Do(t,i)),Ti(t,Qt(s,{shape:c,checks:[]}))}function Do(t,i){const s=Gn(t),r=[];for(const o of Reflect.ownKeys(i)){if(!Object.getOwnPropertyDescriptor(s,o)?.enumerable)throw new Error(`Unrecognized key: "${String(o)}"`);i[o]&&r.push(o)}return r}function i2(t,i){const s=t._zod.def,r=s.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=new Set(Do(t,i)),d={};return na(d,t,Reflect.ownKeys(Gn(t)).filter(h=>!c.has(h))),Ti(t,Qt(s,{shape:d,checks:[]}))}function a2(t,i){if(!ns(i))throw new Error("Invalid input to extend: expected a plain object");const s=t._zod.def.checks;if(s&&s.length>0){const o=Gn(t);for(const c of Reflect.ownKeys(i))if(Object.getOwnPropertyDescriptor(o,c)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ti(t,Qt(t._zod.def,{shape:Ob(t,i)}))}function Ob(t,i){const s={};return na(s,t,Reflect.ownKeys(Gn(t))),Pw(s,i),s}function s2(t,i){if(!ns(i))throw new Error("Invalid input to safeExtend: expected a plain object");return Ti(t,Qt(t._zod.def,{shape:Ob(t,i)}))}function r2(t,i){if(!i?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");const s={};na(s,t,Reflect.ownKeys(Gn(t))),na(s,i,Reflect.ownKeys(Gn(i)));const r=Qt(t._zod.def,{shape:s,get catchall(){return i._zod.def.catchall},checks:i._zod.def.checks??[]});return Ti(t,r)}function Ry(t,i,s,r="partial"){const c=i._zod.def.checks;if(c&&c.length>0)throw new Error(`.${r}() cannot be used on object schemas containing refinements`);const h=s?new Set(Do(i,s)):void 0,m={};return na(m,i,Reflect.ownKeys(Gn(i)),t&&((p,b)=>h&&!h.has(b)?p:new t({type:"optional",innerType:p}))),Ti(i,Qt(i._zod.def,{shape:m,checks:[]}))}function l2(t,i,s){const r=s?new Set(Do(i,s)):void 0,o={};return na(o,i,Reflect.ownKeys(Gn(i)),(c,d)=>r&&!r.has(d)?c:new t({type:"nonoptional",innerType:c})),Ti(i,Qt(i._zod.def,{shape:o}))}function qn(t,i=0){if(t.aborted===!0)return!0;for(let s=i;s<t.issues.length;s++)if(t.issues[s]?.continue!==!0)return!0;return!1}function o2(t,i=0){if(t.aborted===!0)return!0;for(let s=i;s<t.issues.length;s++)if(t.issues[s]?.continue===!1)return!0;return!1}function Pa(t,i){return i.map(s=>{var r;return(r=s).path??(r.path=[]),s.path.unshift(t),s})}function or(t){return typeof t=="string"?t:t?.message}function Cy(t){const i=[];for(const s of t??[]){const r=s._zod.def;if(!/_(length|size)$|_equals$/.test(r.check))break;const o=r.maximum??r.length??r.size;o>=0&&i.push([o,s])}return i}function Yf(t,i,s){var r;for(let o=i;o<t.length;o++)(r=t[o]).schema??(r.schema=s)}function Ei(t,i,s){var r;const o=t.inst?._zod?.traits;o?.has("$ZodType")&&(o.has("$ZodCheck")?(r=t).schema??(r.schema=t.inst):t.schema=t.inst);const c=t.schema!==t.inst?t.schema?._zod.def?.error:void 0,d=t.message?t.message:or(t.inst?._zod.def?.error?.(t))??or(c?.(t))??or(i?.error?.(t))??or(s.customError?.(t))??or(s.localeError?.(t))??"Invalid input",h={};for(const m of Object.keys(t))m==="inst"||m==="schema"||m==="continue"||m==="input"||m==="__proto__"||(h[m]=t[m]);return h.path??(h.path=[]),h.message=d,i?.reportInput&&(h.input=t.input),h}const u2=/[\uD800-\uDBFF]/;function yd(t){const i=t.length;if(!u2.test(t))return i;let s=i;for(let r=0;r<i-1;r++)(t.charCodeAt(r)&64512)===55296&&(t.charCodeAt(r+1)&64512)===56320&&(s--,r++);return s}function vd(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function c2(t){const i=typeof t;switch(i){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";const s=t;if(s&&Object.getPrototypeOf(s)!==Object.prototype&&"constructor"in s&&s.constructor)return s.constructor.name}}return i}function wr(...t){const[i,s,r]=t;return typeof i=="string"?{message:i,code:"custom",input:s,inst:r}:{...i}}function f2(t,i){for(const s in i){const r=Object.getOwnPropertyDescriptor(i,s);r.get?Object.defineProperty(t,s,{...r,enumerable:!1}):d2(t,s,r.value)}}function Oi(t,i,s,r=!0){return Object.defineProperty(t,i,{configurable:!0,writable:!0,enumerable:r,value:s}),s}function jb(t,i,s){return Oi(t,i,s,!1)}function zb(t,i){for(const s in t){const r=t[s];Object.defineProperty(i,s,{configurable:!0,enumerable:!0,get(){return Oi(this,s,r(this))},set(o){Oi(this,s,o)}})}return i}function d2(t,i,s){Object.defineProperty(t,i,{configurable:!0,get(){return this==null?s:Oi(this,i,s.bind(this))},set(r){Oi(this,i,r)}})}function h2(t,i){const s=Object.getPrototypeOf(t);return i in s?void 0:s}let xf,yi=!1;const m2={configurable:!0,get(){yi=!0}};function Re(t,i,s){const r=Object.getPrototypeOf(t._zod);if(i in r&&xf!==t._zod){xf=void 0;return}xf=t._zod,Object.defineProperty(r,i,{configurable:!0,get(){Object.defineProperty(this,i,m2);const o=yi;yi=!1;try{const c=s(this);return yi?delete this[i]:Object.defineProperty(this,i,{configurable:!0,writable:!0,value:c}),yi=yi||o,c}catch(c){throw delete this[i],yi=yi||o,c}},set(o){Object.defineProperty(this,i,{configurable:!0,writable:!0,value:o})}})}function p2(t,i,s,r){const o=h2(t,i);o&&Object.defineProperty(o,i,{configurable:!0,get(){const c={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,i,c),c.value=s(this),Object.defineProperty(this,i,c),c.value},set(c){Object.defineProperty(this,i,{configurable:!0,writable:!0,enumerable:r,value:c})}})}const g2="~constantCatch";function y2(t){const i=()=>t;return i[g2]=!0,i}var My;const Sf={value:void 0,enumerable:!1};let Dy="captureStackTrace"in Error?Error:null;function v2(t){const i=Dy;if(i){const s=i.stackTraceLimit;if(typeof s=="number"){try{i.stackTraceLimit=0}catch{return Dy=null,new t}try{return new t}finally{i.stackTraceLimit=s}}}return new t}function G(t,i,s,r){const o={};function c(x){this.def=x,this.constr=v,this.traits=new Set}c.prototype=o;const d=s,h=d&&new WeakSet;function m(x,S){if(x._zod){if(x._zod.traits.has(t))return}else{Sf.value=new c(S);try{Object.defineProperty(x,"_zod",Sf)}finally{Sf.value=void 0}}if(x._zod.traits.add(t),i(x,S),h){const E=Object.getPrototypeOf(x),z=x._zod.constr.prototype;let A=E;for(;A&&A!==z;)A=Object.getPrototypeOf(A);const U=A??E;h.has(U)||(h.add(U),f2(U,d))}const w=v.prototype;for(const E in w)Object.prototype.hasOwnProperty.call(w,E)&&(E in x||(x[E]=w[E].bind(x)))}const p=r?.Parent??Object;class b extends p{}Object.defineProperty(b,"name",{value:t});function v(x){const S=r?.Parent?v2(b):this;m(S,x);const w=S._zod.deferred;if(w){for(const z of w)z();S._zod.deferred=void 0}const E=globalThis.__zod_globalConfig?.postProcessor;return E&&E(S),S}return Object.defineProperty(v,"init",{value:m}),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 Wi extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Tb extends Error{constructor(i){super(`Encountered unidirectional transform during encode: ${i}`),this.name="ZodEncodeError"}}(My=globalThis).__zod_globalConfig??(My.__zod_globalConfig={});const un=globalThis.__zod_globalConfig;function vn(t){return t&&Object.assign(un,t),un}function b2(){const t=this._zod;return t.message??(t.message=JSON.stringify(t.def,Kf,2)),t.message}function x2(t){this._zod.message=t}const S2={get:b2,set:x2,enumerable:!0,configurable:!0},_f={value:void 0,enumerable:!1},ky=new WeakSet([Object.prototype,Error.prototype]),_2=(t,i)=>{t.name="$ZodError",_f.value=i,Object.defineProperty(t,"issues",_f),_f.value=void 0,Object.defineProperty(t,"message",S2);const s=Object.getPrototypeOf(t);ky.has(s)||(ky.add(s),Object.defineProperty(s,"toString",{configurable:!0,enumerable:!1,get(){const r=()=>this.message;return Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,"toString",{value:r,configurable:!0,writable:!0})}}))},w2=G("$ZodError",_2);function E2(t,i,s){return Object.prototype.hasOwnProperty.call(t,i)||(i==="__proto__"?Object.defineProperty(t,i,{value:s(),writable:!0,enumerable:!0,configurable:!0}):t[i]=s()),t[i]}function O2(t,i=s=>s.message){const s={},r=[];for(const o of t.issues)o.path.length>0?E2(s,o.path[0],()=>[]).push(i(o)):r.push(i(o));return{formErrors:r,fieldErrors:s}}function j2(t,i=s=>s.message){const s={_errors:[]},r=(o,c=[])=>{for(const d of o.issues)if(d.code==="invalid_union"&&d.errors.length)d.errors.map(h=>r({issues:h},[...c,...d.path]));else if(d.code==="invalid_key")r({issues:d.issues},[...c,...d.path]);else if(d.code==="invalid_element")r({issues:d.issues},[...c,...d.path]);else{const h=[...c,...d.path];if(h.length===0)s._errors.push(i(d));else{let m=s,p=0;for(;p<h.length;){const b=h[p],v=p===h.length-1;if(b==="_errors"){v&&m._errors.push(i(d)),p++;continue}Object.prototype.hasOwnProperty.call(m,b)||Object.defineProperty(m,b,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});const x=m[b];v&&x._errors.push(i(d)),m=x,p++}}}};return r(t),s}function ko(t,i){return{callee:i?.callee??t,Err:i?.Err}}const bd=t=>{const i=(s,r,o,c)=>{const d=o?{...o,async:!1}:{async:!1},h=s._zod.run({value:r,issues:[]},d);if(h instanceof Promise)throw new Wi;if(h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>Ei(p,d,vn())));throw Sb(m,c?.callee??i),m}return h.value};return i},xd=t=>{const i=async(s,r,o,c)=>{const d=o?{...o,async:!0}:{async:!0};let h=s._zod.run({value:r,issues:[]},d);if(h instanceof Promise&&(h=await h),h.issues.length){const m=new(c?.Err??t)(h.issues.map(p=>Ei(p,d,vn())));throw Sb(m,c?.callee??i),m}return h.value};return i},Sd=t=>(i,s,r)=>{const o=r?{...r,async:!1}:{async:!1},c=i._zod.run({value:s,issues:[]},o);if(c instanceof Promise)throw new Wi;return c.issues.length?Nb(t,c.issues,o):{success:!0,data:c.value}};function Nb(t,i,s){let r;return{success:!1,get error(){return r||(r=new t(i.map(o=>Ei(o,s,vn()))),i=void 0,s=void 0),r},set error(o){r=o,i=void 0,s=void 0}}}const _d=t=>async(i,s,r)=>{const o=r?{...r,async:!0}:{async:!0};let c=i._zod.run({value:s,issues:[]},o);return c instanceof Promise&&(c=await c),c.issues.length?Nb(t,c.issues,o):{success:!0,data:c.value}},z2=Symbol.for("zod.compile.invalid"),T2=Symbol.for("zod.compile.fallback"),N2=((t,i,s)=>{const r=t._zod.bag.validator;if(r!==void 0){if(r(i)!==z2)return!0;if(r.definite===!0&&s===void 0)return!1}return A2(t,i,s)});function A2(t,i,s){const r=s?{...s,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},o=t._zod.bag.fallbackRun;let c;if(o?(r[T2]=!0,c=o({value:i,issues:[]},r)):c=t._zod.run({value:i,issues:[]},r),c instanceof Promise)throw new Wi;return c.issues.length===0}const R2=async(t,i,s)=>{const r=s?{...s,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0};let o=t._zod.run({value:i,issues:[]},r);return o instanceof Promise&&(o=await o),o.issues.length===0},C2=t=>{const i=bd(t),s=(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return i(r,o,h,ko(s,d))};return s},M2=t=>{const i=bd(t),s=(r,o,c,d)=>i(r,o,c,ko(s,d));return s},D2=t=>{const i=xd(t),s=async(r,o,c,d)=>{const h=c?{...c,direction:"backward"}:{direction:"backward"};return await i(r,o,h,ko(s,d))};return s},k2=t=>{const i=xd(t),s=async(r,o,c,d)=>await i(r,o,c,ko(s,d));return s},U2=t=>(i,s,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return Sd(t)(i,s,o)},L2=t=>(i,s,r)=>Sd(t)(i,s,r),Z2=t=>async(i,s,r)=>{const o=r?{...r,direction:"backward"}:{direction:"backward"};return _d(t)(i,s,o)},q2=t=>async(i,s,r)=>_d(t)(i,s,r),B2=/^[cC][0-9a-z]{6,}$/,$2=/^[0-9a-z]+$/,H2=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Q2=/^[0-9a-vA-V]{20}$/,G2=/^[A-Za-z0-9]{27}$/,K2=/^[a-zA-Z0-9_-]{21}$/;function Y2(t){return new RegExp(`^[a-zA-Z0-9_-]{${t}}$`)}const F2=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,V2=/^([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)$/,P2=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,X2="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function J2(){return new RegExp(X2,"u")}const I2=/^(?:(?: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])$/,W2=/^(([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}|:))$/,eE=/^((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])$/,tE=/^(([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])$/,nE=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,iE=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,aE=/^https?$/,sE=/^\+[1-9]\d{6,14}$/,Ab="(?:(?:\\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 rE(t){return new RegExp(`^${t}$`)}const lE=rE(Ab);function Ff(t){const i="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${i}`:t.precision===0?`${i}:[0-5]\\d`:`${i}:[0-5]\\d\\.\\d{${t.precision}}`:t.seconds?`${i}:[0-5]\\d(?:\\.\\d+)?`:`${i}(?::[0-5]\\d(?:\\.\\d+)?)?`}function oE(t){return new RegExp(`^${Ff(t)}$`)}function uE(t){const i=["Z"];t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const s=`${Ff({precision:t.precision,seconds:!0})}(?:${i.join("|")})`,r=t.local?`${s}|${Ff({precision:t.precision})}`:s;return new RegExp(`^${Ab}T(?:${r})$`)}const cE=/^[\s\S]{0,}$/,fE=/^-?\d+$/,wd=/^-?\d+(?:\.\d+)?$/,dE=/^(?:true|false)$/i,hE=/^[^A-Z]*$/,mE=/^[^a-z]*$/,Rt=G("$ZodCheck",(t,i)=>{var s;t._zod??(t._zod={}),t._zod.def=i,(s=t._zod).onattach??(s.onattach=[])}),Ed=t=>{const i=t.value;return!Fw(i)&&i.length!==void 0},_o={number:"number",bigint:"bigint",object:"date"},Rb=G("$ZodCheckLessThan",(t,i)=>{Rt.init(t,i);const s=_o[typeof i.value];t._zod.check=r=>{(i.inclusive?r.value<=i.value:r.value<i.value)||r.issues.push({origin:_o[typeof r.value]??s,code:"too_big",maximum:typeof i.value=="object"?i.value.getTime():i.value,input:r.value,inclusive:i.inclusive,inst:t,continue:!i.abort})}}),Cb=G("$ZodCheckGreaterThan",(t,i)=>{Rt.init(t,i);const s=_o[typeof i.value];t._zod.check=r=>{(i.inclusive?r.value>=i.value:r.value>i.value)||r.issues.push({origin:_o[typeof r.value]??s,code:"too_small",minimum:typeof i.value=="object"?i.value.getTime():i.value,input:r.value,inclusive:i.inclusive,inst:t,continue:!i.abort})}}),pE=G("$ZodCheckMultipleOf",(t,i)=>{Rt.init(t,i),t._zod.check=s=>{if(typeof s.value!=typeof i.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof s.value=="bigint"?i.value!==BigInt(0)&&s.value%i.value===BigInt(0):Vw(s.value,i.value)===0)||s.issues.push({origin:typeof s.value,code:"not_multiple_of",divisor:i.value,input:s.value,inst:t,continue:!i.abort})}}),gE=G("$ZodCheckNumberFormat",(t,i)=>{Rt.init(t,i),i.format=i.format||"float64";const s=i.format?.includes("int"),r=s?"int":"number",[o,c]=Eb[i.format];t._zod.check=d=>{const h=d.value;if(s){if(!Number.isInteger(h)){d.issues.push({expected:r,format:i.format,code:"invalid_type",continue:!1,input:h,inst:t});return}if(!Number.isSafeInteger(h)){h>0?d.issues.push({input:h,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!i.abort}):d.issues.push({input:h,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:r,inclusive:!0,continue:!i.abort});return}}h<o&&d.issues.push({origin:"number",input:h,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!i.abort}),h>c&&d.issues.push({origin:"number",input:h,code:"too_big",maximum:c,inclusive:!0,inst:t,continue:!i.abort})}}),yE=G("$ZodCheckMaxLength",(t,i)=>{var s;Rt.init(t,i),(s=t._zod.def).when??(s.when=Ed),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>i.maximum?yd(o):c)<=i.maximum)return;const h=vd(o);r.issues.push({origin:h,code:"too_big",maximum:i.maximum,inclusive:!0,input:o,inst:t,continue:!i.abort})}}),vE=G("$ZodCheckMinLength",(t,i)=>{var s;Rt.init(t,i),(s=t._zod.def).when??(s.when=Ed),t._zod.check=r=>{const o=r.value,c=o.length;if((typeof o=="string"&&c>=i.minimum&&c<i.minimum*2?yd(o):c)>=i.minimum)return;const h=vd(o);r.issues.push({origin:h,code:"too_small",minimum:i.minimum,inclusive:!0,input:o,inst:t,continue:!i.abort})}}),bE=G("$ZodCheckLengthEquals",(t,i)=>{var s;Rt.init(t,i),(s=t._zod.def).when??(s.when=Ed),t._zod.check=r=>{const o=r.value,c=o.length,d=typeof o=="string"&&c>=i.length&&c<=i.length*2?yd(o):c;if(d===i.length)return;const h=vd(o),m=d>i.length;r.issues.push({origin:h,...m?{code:"too_big",maximum:i.length}:{code:"too_small",minimum:i.length},inclusive:!0,exact:!0,input:r.value,inst:t,continue:!i.abort})}}),Uo=G("$ZodCheckStringFormat",(t,i)=>{var s,r;Rt.init(t,i),i.pattern?(s=t._zod).check??(s.check=o=>{i.pattern.lastIndex=0,!i.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:i.format,input:o.value,...i.pattern?{pattern:i.pattern.toString()}:{},inst:t,continue:!i.abort})}):(r=t._zod).check??(r.check=()=>{})}),xE=G("$ZodCheckRegex",(t,i)=>{Uo.init(t,i),t._zod.check=s=>{i.pattern.lastIndex=0,!i.pattern.test(s.value)&&s.issues.push({origin:"string",code:"invalid_format",format:"regex",input:s.value,pattern:i.pattern.toString(),inst:t,continue:!i.abort})}}),SE=G("$ZodCheckLowerCase",(t,i)=>{i.pattern??(i.pattern=hE),Uo.init(t,i)}),_E=G("$ZodCheckUpperCase",(t,i)=>{i.pattern??(i.pattern=mE),Uo.init(t,i)}),wE=G("$ZodCheckIncludes",(t,i)=>{Rt.init(t,i);const s=is(i.includes),r=new RegExp(typeof i.position=="number"?`^.{${i.position},}${s}`:s);i.pattern=r,t._zod.check=o=>{o.value.includes(i.includes,i.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:i.includes,input:o.value,inst:t,continue:!i.abort})}}),EE=G("$ZodCheckStartsWith",(t,i)=>{Rt.init(t,i);const s=new RegExp(`^${is(i.prefix)}.*`);i.pattern??(i.pattern=s),t._zod.check=r=>{r.value.startsWith(i.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:i.prefix,input:r.value,inst:t,continue:!i.abort})}}),OE=G("$ZodCheckEndsWith",(t,i)=>{Rt.init(t,i);const s=new RegExp(`.*${is(i.suffix)}$`);i.pattern??(i.pattern=s),t._zod.check=r=>{r.value.endsWith(i.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:i.suffix,input:r.value,inst:t,continue:!i.abort})}}),jE=G("$ZodCheckOverwrite",(t,i)=>{Rt.init(t,i),t._zod.check=s=>{s.value=i.tx(s.value)}});class zE{constructor(i=[],s={}){this.content=[],this.indent=0,this.args=i,this.closed=s}indented(i){this.indent+=1;try{i(this)}finally{this.indent-=1}}write(i){if(typeof i=="function"){i(this,{execution:"sync"}),i(this,{execution:"async"});return}const r=i.split(`
|
|
11
|
-
`).filter(d=>d),o=Math.min(...r.map(d=>d.length-d.trimStart().length)),c=r.map(d=>d.slice(o)).map(d=>" ".repeat(this.indent*2)+d);for(const d of c)this.content.push(d)}compile(){const i=Function,s=this?.content??[""];return new i(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
12
|
-
${s.join(`
|
|
13
|
-
`)}
|
|
14
|
-
};`)(...Object.values(this.closed))}}const TE={major:4,minor:6,patch:7},Ke=G("$ZodType",(t,i)=>{var s;t??(t={}),t._zod.def=i,t._zod.bag=t._zod.bag||{},t._zod.version=TE;const r=t._zod.def.checks,o=t._zod.traits.has("$ZodCheck")?[t,...r??[]]:r?.length?[...r]:[];for(const c of o)for(const d of c._zod.onattach)d(t);if(o.length===0)(s=t._zod).deferred??(s.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const c=(h,m,p)=>{if(h.memo)return h;let b=qn(h),v;for(const x of m){if(x._zod.def.when){if(o2(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&&p?.async===!1)throw new Wi;if(v||w instanceof Promise)v=(v??Promise.resolve()).then(async()=>{await w,h.issues.length!==S&&(Yf(h.issues,S,t),b||(b=qn(h,S)))});else{if(h.issues.length===S)continue;Yf(h.issues,S,t),b||(b=qn(h,S))}}return v?v.then(()=>h):h},d=(h,m,p)=>{if(qn(h))return h.aborted=!0,h;const b=c(m,o,p);if(b instanceof Promise){if(p.async===!1)throw new Wi;return b.then(v=>t._zod.parse(v,p))}return t._zod.parse(b,p)};t._zod.run=(h,m)=>{if(m.skipChecks)return t._zod.parse(h,m);if(m.direction==="backward"){const b=t._zod.parse({value:h.value,issues:[]},{...m,skipChecks:!0});return b instanceof Promise?b.then(v=>d(v,h,m)):d(b,h,m)}const p=t._zod.parse(h,m);if(p instanceof Promise){if(m.async===!1)throw new Wi;return p.then(b=>c(b,o,m))}return c(p,o,m)}}},{get"~standard"(){return jb(this,"~standard",Db(this))},set"~standard"(t){Oi(this,"~standard",t)}}),Mb=(t,i)=>t.issues.length?{issues:t.issues.map(s=>Ei(s,i,vn()))}:{value:t.value};async function NE(t,i){const s={async:!0};return Mb(await t._zod.run({value:i,issues:[]},s),s)}function Db(t){return{validate:i=>{const s={async:!1};try{const r=t._zod.run({value:i,issues:[]},s);if(!(r instanceof Promise))return Mb(r,s)}catch{}return NE(t,i)},vendor:"zod",version:1}}const Od=G("$ZodString",(t,i)=>{Ke.init(t,i),t._zod.pattern=i.pattern??cE,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=String(s.value)}catch{}return typeof s.value=="string"||s.issues.push({expected:"string",code:"invalid_type",input:s.value,inst:t}),s}}),Qe=G("$ZodStringFormat",(t,i)=>{Uo.init(t,i),Od.init(t,i)}),AE=G("$ZodGUID",(t,i)=>{i.pattern??(i.pattern=V2),Qe.init(t,i)}),RE=G("$ZodUUID",(t,i)=>{if(i.version){const r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if(r===void 0)throw new Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=Uy(r))}else i.pattern??(i.pattern=Uy());Qe.init(t,i)}),CE=G("$ZodEmail",(t,i)=>{i.pattern??(i.pattern=P2),Qe.init(t,i)}),kb=1,wo=2;function Ub(t){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(t):(new URL(t),!0)}catch{return!1}}function ME(t,i){return!("normalize"in i)&&!("hostname"in i)&&!("protocol"in i)?Ub(t)||wo:DE(t,i)}function DE(t,i){if(!i.normalize&&i.protocol?.source===aE.source&&!/^https?:\/\//i.test(t))return kb;try{if(typeof URL<"u"){const s=URL;if(typeof s.parse=="function")return s.parse(t)??wo}return new URL(t)}catch{return wo}}const kE=/[\t\n\r]/g;function Ly(t){return t.replace(kE,"")}function UE(t,i){return i.lastIndex=0,i.test(t.hostname)}function LE(t,i){return i.lastIndex=0,i.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)}const ZE=G("$ZodURL",(t,i)=>{Qe.init(t,i),t._zod.check=s=>{try{const r=s.value.trim(),o=ME(r,i);if(o===kb){s.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:s.value,inst:t,continue:!i.abort});return}if(o===wo){s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:t,continue:!i.abort});return}if(o===!0){s.value=Ly(r);return}i.hostname&&!UE(o,i.hostname)&&s.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:s.value,inst:t,continue:!i.abort}),i.protocol&&!LE(o,i.protocol)&&s.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:s.value,inst:t,continue:!i.abort}),s.value=i.normalize?o.href:Ly(r);return}catch{s.issues.push({code:"invalid_format",format:"url",input:s.value,inst:t,continue:!i.abort})}}}),qE=G("$ZodEmoji",(t,i)=>{i.pattern??(i.pattern=J2()),Qe.init(t,i)}),BE=G("$ZodNanoID",(t,i)=>{if(i.length!==void 0&&(!Number.isInteger(i.length)||i.length<1))throw new Error(`Invalid nanoid length: ${i.length}`);i.pattern??(i.pattern=i.length===void 0?K2:Y2(i.length)),Qe.init(t,i)}),$E=G("$ZodCUID",(t,i)=>{i.pattern??(i.pattern=B2),Qe.init(t,i)}),HE=G("$ZodCUID2",(t,i)=>{i.pattern??(i.pattern=$2),Qe.init(t,i)}),QE=G("$ZodULID",(t,i)=>{i.pattern??(i.pattern=H2),Qe.init(t,i)}),GE=G("$ZodXID",(t,i)=>{i.pattern??(i.pattern=Q2),Qe.init(t,i)}),KE=G("$ZodKSUID",(t,i)=>{i.pattern??(i.pattern=G2),Qe.init(t,i)}),YE=G("$ZodISODateTime",(t,i)=>{i.pattern??(i.pattern=uE(i)),Qe.init(t,i)}),FE=G("$ZodISODate",(t,i)=>{i.pattern??(i.pattern=lE),Qe.init(t,i)}),VE=G("$ZodISOTime",(t,i)=>{i.pattern??(i.pattern=oE(i)),Qe.init(t,i)}),PE=G("$ZodISODuration",(t,i)=>{i.pattern??(i.pattern=F2),Qe.init(t,i)}),XE=G("$ZodIPv4",(t,i)=>{i.pattern??(i.pattern=I2),Qe.init(t,i)}),JE=/^[0-9a-fA-F:.]+$/;function Lb(t){return JE.test(t)?Ub(`http://[${t}]`):!1}const IE=G("$ZodIPv6",(t,i)=>{i.pattern??(i.pattern=W2),Qe.init(t,i),t._zod.check=s=>{Lb(s.value)||s.issues.push({code:"invalid_format",format:"ipv6",input:s.value,inst:t,continue:!i.abort})}}),WE=G("$ZodCIDRv4",(t,i)=>{i.pattern??(i.pattern=eE),Qe.init(t,i)});function eO(t){const i=t.split("/");if(i.length!==2)return!1;const[s,r]=i;if(!r)return!1;const o=Number(r);return`${o}`!==r||o<0||o>128?!1:Lb(s)}const tO=G("$ZodCIDRv6",(t,i)=>{i.pattern??(i.pattern=tE),Qe.init(t,i),t._zod.check=s=>{eO(s.value)||s.issues.push({code:"invalid_format",format:"cidrv6",input:s.value,inst:t,continue:!i.abort})}});function Zb(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const qb=/^[0-9a-zA-Z+/]*={0,2}$/,nO=G("$ZodBase64",(t,i)=>{i.pattern??(i.pattern=qb),Qe.init(t,i),t._zod.check=s=>{Zb(s.value)||s.issues.push({code:"invalid_format",format:"base64",input:s.value,inst:t,continue:!i.abort})}}),jd=/^[A-Za-z0-9_-]*$/;function iO(t){if(!jd.test(t))return!1;const i=t.replace(/[-_]/g,r=>r==="-"?"+":"/"),s=i.padEnd(Math.ceil(i.length/4)*4,"=");return Zb(s)}const aO=G("$ZodBase64URL",(t,i)=>{i.pattern??(i.pattern=jd),Qe.init(t,i),t._zod.check=s=>{iO(s.value)||s.issues.push({code:"invalid_format",format:"base64url",input:s.value,inst:t,continue:!i.abort})}}),sO=G("$ZodE164",(t,i)=>{i.pattern??(i.pattern=sE),Qe.init(t,i)});function rO(t,i=null){try{const s=t.split(".");if(s.length!==3)return!1;const[r]=s;if(!r)return!1;const o=JSON.parse(atob(r));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||i&&(!("alg"in o)||o.alg!==i))}catch{return!1}}const lO=G("$ZodJWT",(t,i)=>{Qe.init(t,i),t._zod.check=s=>{rO(s.value,i.alg)||s.issues.push({code:"invalid_format",format:"jwt",input:s.value,inst:t,continue:!i.abort})}}),Bb=G("$ZodNumber",(t,i)=>{Ke.init(t,i),t._zod.pattern=wd,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=Number(s.value)}catch{}const o=s.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return s;const c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:String(o):void 0;return s.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...c?{received:c}:{}}),s}}),oO=G("$ZodNumberFormat",(t,i)=>{gE.init(t,i),Bb.init(t,i)}),uO=G("$ZodBoolean",(t,i)=>{Ke.init(t,i),t._zod.pattern=dE,t._zod.parse=(s,r)=>{if(i.coerce)try{s.value=!!s.value}catch{}const o=s.value;return typeof o=="boolean"||s.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),s}}),cO=G("$ZodUnknown",(t,i)=>{Ke.init(t,i),t._zod.parse=s=>s}),fO=G("$ZodNever",(t,i)=>{Ke.init(t,i),t._zod.parse=(s,r)=>(s.issues.push({expected:"never",code:"invalid_type",input:s.value,inst:t}),s)});function dO(t,i){const s=Cy(t._zod.def.checks);if(!s.length)return;const r=Math.min(...s.map(c=>c[0])),o=t._zod.parse;t._zod.parse=(c,d)=>{const h=i(c.value);if(h>r&&!d?.skipChecks&&d?.direction!=="backward"){for(const[m,p]of Cy(t._zod.def.checks))if(h>m&&p._zod.def.when(c)){const b=c.issues.length;return p._zod.check(c),c.issues[b].continue=!1,Yf(c.issues,b,t),c}}return o(c,d)}}const hO=t=>Array.isArray(t)?t.length:-1;function Zy(t,i,s){t.issues.length&&i.issues.push(...Pa(s,t.issues)),i.value[s]=t.value}const mO=G("$ZodArray",(t,i)=>{Ke.init(t,i);const s=un.memoizer;s?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!Array.isArray(c))return r.issues.push({expected:"array",code:"invalid_type",input:c,inst:t}),r;r.value=s?s.alloc(t,r,Array(c.length),o):Array(c.length);const d=[],h=o?.abortEarly;for(let m=0;m<c.length;m++){const p=c[m],b=i.element._zod.run({value:p,issues:[]},o);if(b instanceof Promise)d.push(b.then(v=>Zy(v,r,m)));else if(Zy(b,r,m),h&&b.issues.length!==0&&qn(b))break}return d.length?Promise.all(d).then(()=>r):r},dO(t,hO)});function Eo(t,i,s,r,o,c){const d=s in r,h=c==="optional";if(!(!d&&h&&o==="optional")){if(t.issues.length){if(o!==void 0&&h&&!d)return;i.issues.push(...Pa(s,t.issues))}if(!d&&o===void 0){t.issues.length||i.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[s]});return}t.value===void 0?(d||o==="defaulted"&&!h)&&(i.value[s]=void 0):i.value[s]=t.value}}const pO=[];function $b(t){const i=Object.keys(t.shape),s=Object.getOwnPropertySymbols(t.shape),r=s.length?s:pO,o=r.length?[...i,...r]:i;for(const d of o)if(!t.shape?.[d]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(d)}": expected a Zod schema`);const c=e2(t.shape);return{...t,allKeys:o,symbolKeys:r,keySet:new Set(i),numKeys:i.length,optionalKeys:new Set(c)}}function Hb(t,i,s,r,o,c,d){const h=[],m=o.keySet,p=o.catchall._zod,b=p.def.type,v=p.optin,x=p.optout;let S=0;for(const w in i){if(d&&s.issues.length!==S){if(qn(s,S))break;S=s.issues.length}if(m.has(w))continue;if(w==="__proto__"){b==="never"&&h.push(w);continue}if(b==="never"){h.push(w);continue}const E=p.run({value:i[w],issues:[]},r);E instanceof Promise?t.push(E.then(z=>Eo(z,s,w,i,v,x))):Eo(E,s,w,i,v,x)}return h.length&&s.issues.push({code:"unrecognized_keys",keys:h,input:i,inst:c,continue:!0}),t.length?Promise.all(t).then(()=>s):s}const gO=G("$ZodObject",(t,i)=>{Ke.init(t,i);const s=Object.getOwnPropertyDescriptor(i,"shape"),r=s?.get?s.get.raw:i.shape??{};if(r){const p=()=>{const b={...r};return Object.defineProperty(i,"shape",{value:b}),p.raw=b,b};p.raw=r,Object.defineProperty(i,"shape",{get:p})}const o=pd(()=>$b(i));Re(t,"propValues",p=>{const b=p.def.shape,v={};for(const x in b){const S=b[x]._zod;if(S.values){Object.prototype.hasOwnProperty.call(v,x)||zi(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=i.catchall;let h;const m=un.memoizer;m?.attach(t),t._zod.parse=(p,b)=>{h??(h=o.value);const v=p.value;if(!c(v))return p.issues.push({expected:"object",code:"invalid_type",input:v,inst:t}),p;p.value=m?m.alloc(t,p,{},b):{};const x=[],S=h.shape,w=b?.abortEarly;let E=p.issues.length;for(const z of h.allKeys){if(w&&p.issues.length!==E){if(qn(p,E))break;E=p.issues.length}if(z==="__proto__")continue;const A=S[z],U=A._zod.optin,H=A._zod.optout,V=A._zod.run({value:v[z],issues:[]},b);V instanceof Promise?x.push(V.then(J=>Eo(J,p,z,v,U,H))):Eo(V,p,z,v,U,H)}return d?Hb(x,v,p,b,o.value,t,w===!0):x.length?Promise.all(x).then(()=>p):p}}),yO=G("$ZodObjectJIT",(t,i)=>{gO.init(t,i);const s=t._zod.parse,r=pd(()=>$b(i)),o=un.memoizer,c=S=>{const w=r.value,E=w.symbolKeys,z=new zE(["payload","ctx"],{shape:S,inst:t,memo:o,syms:E}),A=J=>`shape[${J}]._zod.run({ value: input[${J}], issues: [] }, ctx)`,U=(J,L)=>`
|
|
15
|
-
let ${J}_ab = false;
|
|
16
|
-
for (let i = 0; i < ${J}.issues.length; i++) {
|
|
17
|
-
const iss = ${J}.issues[i];
|
|
18
|
-
iss.path = iss.path ? [${L}, ...iss.path] : [${L}];
|
|
19
|
-
payload.issues.push(iss);
|
|
20
|
-
if (iss.continue !== true) ${J}_ab = true;
|
|
21
|
-
}
|
|
22
|
-
if (${J}_ab && ctx && ctx.abortEarly) {
|
|
23
|
-
payload.value = newResult;
|
|
24
|
-
return payload;
|
|
25
|
-
}`;z.write("const input = payload.value;");const H=Object.create(null);let V=0;for(const J of w.allKeys)H[J]=`key_${V++}`;z.write(o?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(const J of w.allKeys){if(J==="__proto__")continue;const L=H[J],R=typeof J=="symbol"?`syms[${E.indexOf(J)}]`:Xw(J),X=`${R} in input`,P=S[J],te=P?._zod?.optin,le=te!==void 0,se=P?._zod?.optout==="optional";if(z.write(`const ${L} = ${A(R)};`),le&&se){const he=te==="optional"?`${L}_present`:`${L}.value !== undefined || ${L}_present`;z.write(`
|
|
26
|
-
const ${L}_present = ${X};
|
|
27
|
-
if (!${L}.issues.length || ${L}_present) {
|
|
28
|
-
if (${L}.issues.length) {${U(L,R)}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
if (${he}) {
|
|
32
|
-
newResult[${R}] = ${L}.value;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
`)}else le?(z.write(`
|
|
37
|
-
if (${L}.issues.length) {${U(L,R)}
|
|
38
|
-
}
|
|
39
|
-
`),te==="defaulted"?z.write(`newResult[${R}] = ${L}.value;`):z.write(`
|
|
40
|
-
if (${L}.value !== undefined || ${X}) {
|
|
41
|
-
newResult[${R}] = ${L}.value;
|
|
42
|
-
}
|
|
43
|
-
`)):z.write(`
|
|
44
|
-
const ${L}_present = ${X};
|
|
45
|
-
if (${L}.issues.length) {${U(L,R)}
|
|
46
|
-
}
|
|
47
|
-
if (!${L}_present && !${L}.issues.length) {
|
|
48
|
-
payload.issues.push({
|
|
49
|
-
code: "invalid_type",
|
|
50
|
-
expected: "nonoptional",
|
|
51
|
-
input: undefined,
|
|
52
|
-
path: [${R}]
|
|
53
|
-
});
|
|
54
|
-
if (ctx && ctx.abortEarly) {
|
|
55
|
-
payload.value = newResult;
|
|
56
|
-
return payload;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (${L}_present) {
|
|
61
|
-
newResult[${R}] = ${L}.value;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
`)}return z.write("payload.value = newResult;"),z.write("return payload;"),z.compile()};let d;const h=So,m=!un.jitless,b=m&&Iw.value,v=i.catchall;let x;t._zod.parse=(S,w)=>{x??(x=r.value);const E=S.value;return h(E)?m&&b&&w?.async===!1&&w.jitless!==!0?(d||(d=c(i.shape)),S=d(S,w),v?Hb([],E,S,w,x,t,w?.abortEarly===!0):S):s(S,w):(S.issues.push({expected:"object",code:"invalid_type",input:E,inst:t}),S)}});function qy(t,i,s,r){for(const c of t)if(c.issues.length===0)return i.value=c.value,i;const o=t.filter(c=>!qn(c));return o.length===1?(i.value=o[0].value,o[0]):(i.issues.push({code:"invalid_union",input:i.value,inst:s,errors:t.map(c=>c.issues.map(d=>Ei(d,r,vn())))}),i)}const vO=G("$ZodUnion",(t,i)=>{Ke.init(t,i),Re(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),Re(t,"optout",r=>r.def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Re(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)))}),Re(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=>gd(c.source)).join("|")})$`)}});const s=i.options.length===1?i.options[0]._zod.run:null;t._zod.parse=(r,o)=>{if(s)return s(r,o);let c=!1;const d=[];for(const h of i.options){const m=h._zod.run({value:r.value,issues:[]},o);if(m instanceof Promise)d.push(m),c=!0;else{if(m.issues.length===0)return m;d.push(m)}}return c?Promise.all(d).then(h=>qy(h,r,t,o)):qy(d,r,t,o)}}),bO=G("$ZodIntersection",(t,i)=>{Ke.init(t,i),t._zod.parse=(s,r)=>{const o=s.value,c=i.left._zod.run({value:o,issues:[]},r),d=i.right._zod.run({value:o,issues:[]},r);return c instanceof Promise||d instanceof Promise?Promise.all([c,d]).then(([m,p])=>By(s,m,p)):By(s,c,d)}});function Vf(t,i){if(t===i)return{valid:!0,data:t};if(t instanceof Date&&i instanceof Date&&+t==+i)return{valid:!0,data:t};if(ns(t)&&ns(i)){const s=Object.keys(i),r=Object.keys(t).filter(c=>s.indexOf(c)!==-1),o={...t,...i};Object.prototype.hasOwnProperty.call(o,"__proto__")&&delete o.__proto__;for(const c of r){if(c==="__proto__")continue;const d=Vf(t[c],i[c]);if(!d.valid)return{valid:!1,mergeErrorPath:[c,...d.mergeErrorPath]};o[c]=d.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(i)){if(t.length!==i.length)return{valid:!1,mergeErrorPath:[]};const s=[];for(let r=0;r<t.length;r++){const o=t[r],c=i[r],d=Vf(o,c);if(!d.valid)return{valid:!1,mergeErrorPath:[r,...d.mergeErrorPath]};s.push(d.data)}return{valid:!0,data:s}}return{valid:!1,mergeErrorPath:[]}}function By(t,i,s){const r=new Map;let o;const c=new Map,d=(p,b)=>{let v;if(p.code==="unrecognized_keys"&&!p.path?.length)o??(o=p),v=p.keys;else if(p.code==="invalid_key"&&p.origin==="record"&&p.path?.length===1){const x=String(p.path[0]);c.has(x)||c.set(x,p),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 p of i.issues)d(p,"l")||t.issues.push(p);for(const p of s.issues)d(p,"r")||t.issues.push(p);const h=[...r].filter(([,p])=>p.l&&p.r).map(([p])=>p);if(h.length){const p=o?h.filter(b=>o.keys.includes(b)):[];p.length&&t.issues.push({...o,keys:p});for(const b of h)!p.includes(b)&&c.has(b)&&t.issues.push(c.get(b))}const m=Vf(i.value,s.value);if(!m.valid){if(qn(t))return t;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(m.mergeErrorPath)}`)}return t.value=m.data,t}const xO=G("$ZodRecord",(t,i)=>{Ke.init(t,i);const s=un.memoizer;s?.attach(t),t._zod.parse=(r,o)=>{const c=r.value;if(!ns(c))return r.issues.push({expected:"record",code:"invalid_type",input:c,inst:t}),r;const d=[],h=i.keyType._zod.values;if(h&&!i.partial){r.value=s?s.alloc(t,r,{},o):{};const m=new Set;for(const b of h)if(typeof b=="string"||typeof b=="number"||typeof b=="symbol"){if(m.add(typeof b=="number"?b.toString():b),b==="__proto__")continue;const v=i.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=>Ei(w,o,vn())),input:b,path:[b],inst:t});continue}const x=v.value;if(x==="__proto__")continue;const S=i.valueType._zod.run({value:c[b],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Pa(b,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Pa(b,S.issues)),r.value[x]=S.value)}let p;for(const b in c)if(!m.has(b))if(i.mode==="loose"){if(b==="__proto__")continue;r.value[b]=c[b]}else p=p??[],p.push(b);p&&p.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:p,continue:!0})}else{r.value=s?s.alloc(t,r,{},o):{};let m;for(const p of Reflect.ownKeys(c)){if(p==="__proto__"||!Object.prototype.propertyIsEnumerable.call(c,p))continue;let b=i.keyType._zod.run({value:p,issues:[]},o);if(b instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof p=="string"&&wd.test(p)&&b.issues.length){const w=i.keyType._zod.run({value:Number(p),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){i.mode==="loose"?r.value[p]=c[p]:h?(m=m??[],m.push(p)):r.issues.push({code:"invalid_key",origin:"record",issues:b.issues.map(w=>Ei(w,o,vn())),input:p,path:[p],inst:t});continue}const x=b.value;if(x==="__proto__")continue;const S=i.valueType._zod.run({value:c[p],issues:[]},o);S instanceof Promise?d.push(S.then(w=>{w.issues.length&&r.issues.push(...Pa(p,w.issues)),r.value[x]=w.value})):(S.issues.length&&r.issues.push(...Pa(p,S.issues)),r.value[x]=S.value)}m&&m.length>0&&r.issues.push({code:"unrecognized_keys",input:c,inst:t,keys:m,continue:!0})}return d.length?Promise.all(d).then(()=>r):r}}),SO=G("$ZodEnum",(t,i)=>{Ke.init(t,i);const s=Gf(i.entries),r=new Set(s);t._zod.values=r,Re(t,"pattern",o=>{const c=Gf(o.def.entries).filter(d=>Ww.has(typeof d));return new RegExp(c.length?`^(${c.map(d=>is(d.toString())).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(o,c)=>{const d=o.value;return r.has(d)||o.issues.push({code:"invalid_value",values:s,input:d,inst:t}),o}}),_O=G("$ZodLiteral",(t,i)=>{Ke.init(t,i);const s=new Set(i.values);t._zod.values=s,Re(t,"pattern",r=>{const o=r.def.values;return new RegExp(o.length?`^(${o.map(c=>typeof c=="string"?is(c):c?is(c.toString()):String(c)).join("|")})$`:"^[^\\s\\S]$")}),t._zod.parse=(r,o)=>{const c=r.value;return s.has(c)||r.issues.push({code:"invalid_value",values:i.values,input:c,inst:t}),r}}),wO=G("$ZodTransform",(t,i)=>{Ke.init(t,i),t._zod.optin="optional",un.memoizer?.guard(t),t._zod.parse=(s,r)=>{if(r.direction==="backward")throw new Tb(t.constructor.name);const o=i.transform(s.value,s);if(r.async)return(o instanceof Promise?o:Promise.resolve(o)).then(d=>(s.value=d,s));if(o instanceof Promise)throw new Wi;return s.value=o,s}});function $y(t,i){return t.value=i.issues.length?void 0:i.value,t}const Qb=G("$ZodOptional",(t,i)=>{Ke.init(t,i),Re(t,"optin",s=>s.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),t._zod.optout="optional",Re(t,"values",s=>{const r=s.def.innerType._zod.values;return r?new Set([...r,void 0]):void 0}),Re(t,"pattern",s=>{const r=s.def.innerType._zod.pattern;return r?new RegExp(`^(${gd(r.source)})?$`):void 0}),t._zod.parse=(s,r)=>{if(s.value===void 0){if(i.innerType._zod.optin!=="defaulted")return s;const o=i.innerType._zod.run({value:s.value,issues:[]},r);return o instanceof Promise?o.then(c=>$y(s,c)):$y(s,o)}return i.innerType._zod.run(s,r)}}),EO=G("$ZodExactOptional",(t,i)=>{Qb.init(t,i),Re(t,"values",s=>s.def.innerType._zod.values),Re(t,"pattern",s=>s.def.innerType._zod.pattern),t._zod.parse=(s,r)=>i.innerType._zod.run(s,r)}),OO=G("$ZodNullable",(t,i)=>{Ke.init(t,i),Re(t,"optin",s=>s.def.innerType._zod.optin),Re(t,"optout",s=>s.def.innerType._zod.optout),Re(t,"pattern",s=>{const r=s.def.innerType._zod.pattern;return r?new RegExp(`^(${gd(r.source)}|null)$`):void 0}),Re(t,"values",s=>s.def.innerType._zod.values?new Set([...s.def.innerType._zod.values,null]):void 0),t._zod.parse=(s,r)=>s.value===null?s:i.innerType._zod.run(s,r)}),jO=G("$ZodDefault",(t,i)=>{Ke.init(t,i),t._zod.optin="defaulted",Re(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);if(s.value===void 0)return s.value=i.defaultValue,s;const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(c=>Hy(c,i)):Hy(o,i)}});function Hy(t,i){return t.value===void 0&&(t.value=i.defaultValue),t}const zO=G("$ZodPrefault",(t,i)=>{Ke.init(t,i),t._zod.optin="defaulted",Re(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>(r.direction==="backward"||s.value===void 0&&(s.value=i.defaultValue),i.innerType._zod.run(s,r))}),TO=G("$ZodNonOptional",(t,i)=>{Ke.init(t,i),Re(t,"values",s=>{const r=s.def.innerType._zod.values;return r?new Set([...r].filter(o=>o!==void 0)):void 0}),t._zod.parse=(s,r)=>{const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(c=>Qy(c,t)):Qy(o,t)}});function Qy(t,i){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:i}),t}function Gy(t,i,s,r){return i.issues.length?(t.value=s.catchValue({...i,value:t.value,error:{issues:i.issues.map(o=>Ei(o,r,vn()))},input:t.value}),t):(t.value=i.value,i.memo&&(t.memo=!0),t)}const NO=G("$ZodCatch",(t,i)=>{Ke.init(t,i),Re(t,"optin",s=>s.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),Re(t,"optout",s=>s.def.innerType._zod.optout),Re(t,"values",s=>s.def.innerType._zod.values),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);const o=i.innerType._zod.run({value:s.value,issues:[]},r);return o instanceof Promise?o.then(c=>Gy(s,c,i,r)):Gy(s,o,i,r)}}),AO=G("$ZodPipe",(t,i)=>{Ke.init(t,i),Re(t,"values",s=>s.def.in._zod.values),Re(t,"optin",s=>s.def.in._zod.optin),Re(t,"optout",s=>s.def.out._zod.optout),Re(t,"propValues",s=>s.def.in._zod.propValues),t._zod.parse=(s,r)=>{if(r.direction==="backward"){const c=i.out._zod.run(s,r);return c instanceof Promise?c.then(d=>Il(d,i.in,r)):Il(c,i.in,r)}const o=i.in._zod.run(s,r);return o instanceof Promise?o.then(c=>Il(c,i.out,r)):Il(o,i.out,r)}});function Il(t,i,s){return t.issues.some(r=>r.code!=="unrecognized_keys")?(t.aborted=!0,t):i._zod.run({value:t.value,issues:t.issues},s)}const RO=G("$ZodReadonly",(t,i)=>{Ke.init(t,i),Re(t,"propValues",s=>s.def.innerType._zod.propValues),Re(t,"values",s=>s.def.innerType._zod.values),Re(t,"optin",s=>s.def.innerType?._zod?.optin),Re(t,"optout",s=>s.def.innerType?._zod?.optout),t._zod.parse=(s,r)=>{if(r.direction==="backward")return i.innerType._zod.run(s,r);const o=i.innerType._zod.run(s,r);return o instanceof Promise?o.then(Ky):Ky(o)}});function Ky(t){return t.memo||(t.value=Object.freeze(t.value)),t}const CO=G("$ZodCustom",(t,i)=>{Rt.init(t,i),Ke.init(t,i),t._zod.parse=(s,r)=>s,t._zod.check=s=>{const r=s.value,o=i.fn(r);if(o instanceof Promise)return o.then(c=>Yy(c,s,r,t));Yy(o,s,r,t)}});function Yy(t,i,s,r){if(!t){const o={code:"custom",input:s,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(o.params=r._zod.def.params),i.issues.push(wr(o))}}class MO extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}}const Pf="~memo",Fy=[];function Gb(t){return t!==null&&typeof t=="object"}function wf(t){return t.map(i=>i.path?{...i,path:i.path.slice()}:{...i})}const Kb=new WeakMap,dr=0,co=1,pr=2;function fo(t,i,s){const r=Kb.get(t);if(r!==void 0)return r?pr:dr;if(i.has(t))return pr;i.add(t);let o=dr;const c=b=>{if(o!==pr&&b?._zod){const v=fo(b,i);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 E=w.get?co:w.value?._zod?fo(w.value,i):dr;E>x&&(x=E)}return x},h=b=>{b>o&&(o=b)},m=t._zod.def;switch(m.type){case"object":{const b=vb(m);h(b?d(b):co),c(m.catchall);break}case"array":c(m.element);break;case"tuple":for(const b of m.items)c(b);c(m.rest);break;case"record":case"map":c(m.keyType),c(m.valueType);break;case"set":c(m.valueType);break;case"union":for(const b of m.options)c(b);break;case"intersection":c(m.left),c(m.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":c(m.innerType);break;case"pipe":c(m.in),c(m.out);break;case"function":c(m.input),c(m.output);break;case"lazy":{const b=m._cachedInner??void 0;h(b?fo(b,i):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 m){const v=Object.getOwnPropertyDescriptor(m,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 i.delete(t),DO(t,o)}function DO(t,i){return i!==co&&Kb.set(t,i===pr),i}function kO(t,i){let s=t.buckets.get(i);return s||(s=new WeakMap,t.buckets.set(i,s)),s}let Wl;const eo=[],UO={alloc(t,i,s){const r=Wl;if(!r)return s;Wl=void 0;const o={value:s,issues:null};return r.set(i.value,o),eo.push(o),s},guard(t){var i;(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred.push(()=>{const s=t._zod.parse,r=(o,c)=>{if(c.direction!=="backward"&&ZO(c,o.value))throw new MO;return s(o,c)};t._zod.parse=r,t._zod.run===s&&(t._zod.run=r)})},attach(t){var i;let s,r=!1,o,c;(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred.push(()=>{const d=t._zod.parse,h=(m,p)=>{if(s===void 0){const A=fo(t,new Set);if(A===dr)return t._zod.parse=d,t._zod.run===h&&(t._zod.run=d),d(m,p);A===pr||r?s=!0:r=!0}const b=m.value;if(!Gb(b))return d(m,p);let v=p[Pf];v||(v={buckets:new WeakMap,backEdges:void 0},p[Pf]=v);let x;o===p?x=c:(x=kO(v,t),o=p,c=x);const S=x.get(b);if(S)return m.value=S.value,S.issues?S.issues.length&&m.issues.push(...wf(S.issues)):(m.memo=!0,v.backEdges??(v.backEdges=new WeakSet),v.backEdges.add(S.value)),m;Wl=x;const w=eo.length,E=d(m,p);Wl=void 0;const z=eo.length>w?eo.pop():void 0;return E instanceof Promise?E.then(A=>(z&&(z.issues=A.issues.length?wf(A.issues):Fy),A)):(z&&(z.issues=E.issues.length?wf(E.issues):Fy),E)};t._zod.parse=h,t._zod.run===d&&(t._zod.run=h)})}};function LO(){return UO}function ZO(t,i){const s=t[Pf]?.backEdges;return s!==void 0&&Gb(i)&&s.has(i)}const qO=()=>{const t={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function i(c){return t[c]??null}const s={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};function o(c,d){return c==="number"&&typeof d=="number"&&!Number.isFinite(d)?String(d):r[c]??c}return c=>{switch(c.code){case"invalid_type":{const d=o(c.expected),h=c2(c.input),m=o(h,c.input);return`Invalid input: expected ${d}, received ${m}`}case"invalid_value":return c.values.length===1?`Invalid input: expected ${wb(c.values[0])}`:`Invalid option: expected one of ${Ay(c.values,"|")}`;case"too_big":{const d=c.exact?"exactly ":c.inclusive?"<=":"<",h=i(c.origin);return h?`Too big: expected ${c.origin??"value"} to have ${d}${c.maximum.toString()} ${h.unit??"elements"}`:`Too big: expected ${c.origin??"value"} to be ${d}${c.maximum.toString()}`}case"too_small":{const d=c.exact?"exactly ":c.inclusive?">=":">",h=i(c.origin);return h?`Too small: expected ${c.origin} to have ${d}${c.minimum.toString()} ${h.unit}`:`Too small: expected ${c.origin} to be ${d}${c.minimum.toString()}`}case"invalid_format":{const d=c;return d.format==="starts_with"?`Invalid string: must start with "${d.prefix}"`:d.format==="ends_with"?`Invalid string: must end with "${d.suffix}"`:d.format==="includes"?`Invalid string: must include "${d.includes}"`:d.format==="regex"?`Invalid string: must match pattern ${d.pattern}`:`Invalid ${s[d.format]??c.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${c.divisor}`;case"unrecognized_keys":return`Unrecognized key${c.keys.length>1?"s":""}: ${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 BO(){return{localeError:qO()}}var Vy;class $O{constructor(){this._map=new WeakMap,this._idmap=new Map}add(i,...s){const r=s[0];return this._map.set(i,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,i),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(i){const s=this._map.get(i);return s&&typeof s=="object"&&"id"in s&&this._idmap.delete(s.id),this._map.delete(i),this}get(i){const s=i._zod.parent;if(s){const r={...this.get(s)??{}};delete r.id;const o={...r,...this._map.get(i)};return Object.keys(o).length?o:void 0}return this._map.get(i)}has(i){return this._map.has(i)}}function HO(){return new $O}(Vy=globalThis).__zod_globalRegistry??(Vy.__zod_globalRegistry=HO());const hr=globalThis.__zod_globalRegistry;function Yb(t){return t.checks&&(t.checks=[...t.checks]),t}function QO(t,i){return new t(Yb({type:"string",...ue(i)}))}function GO(t,i){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ue(i)})}function KO(t,i){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ue(i)})}function YO(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ue(i)})}function FO(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ue(i)})}function VO(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ue(i)})}function PO(t,i){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ue(i)})}function XO(t,i){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ue(i)})}function JO(t,i){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ue(i)})}function IO(t,i){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ue(i)})}function WO(t,i){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ue(i)})}function ej(t,i){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ue(i)})}function tj(t,i){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ue(i)})}function nj(t,i){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ue(i)})}function ij(t,i){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ue(i)})}function aj(t,i){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ue(i)})}function sj(t,i){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ue(i)})}function rj(t,i){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ue(i)})}function lj(t,i){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ue(i)})}function oj(t,i){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ue(i)})}function uj(t,i){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ue(i)})}function cj(t,i){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ue(i)})}function fj(t,i){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ue(i)})}function Fb(t,i){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ue(i)})}function dj(t,i){return new t({type:"string",format:"date",check:"string_format",...ue(i)})}function hj(t,i){return new t({type:"string",format:"time",check:"string_format",precision:null,...ue(i)})}function mj(t,i){return new t({type:"string",format:"duration",check:"string_format",...ue(i)})}function pj(t,i){return new t(Yb({type:"number",checks:[],...ue(i)}))}function gj(t,i){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ue(i)})}function yj(t,i){return new t({type:"boolean",...ue(i)})}function vj(t){return new t({type:"unknown"})}function bj(t,i){return new t({type:"never",...ue(i)})}function Py(t,i){return new Rb({check:"less_than",...ue(i),value:t,inclusive:!1})}function Ef(t,i){return new Rb({check:"less_than",...ue(i),value:t,inclusive:!0})}function Xy(t,i){return new Cb({check:"greater_than",...ue(i),value:t,inclusive:!1})}function Of(t,i){return new Cb({check:"greater_than",...ue(i),value:t,inclusive:!0})}function Jy(t,i){return new pE({check:"multiple_of",...ue(i),value:t})}function Vb(t,i){return new yE({check:"max_length",...ue(i),maximum:t})}function Oo(t,i){return new vE({check:"min_length",...ue(i),minimum:t})}function Pb(t,i){return new bE({check:"length_equals",...ue(i),length:t})}function xj(t,i){return new xE({check:"string_format",format:"regex",...ue(i),pattern:t})}function Sj(t){return new SE({check:"string_format",format:"lowercase",...ue(t)})}function _j(t){return new _E({check:"string_format",format:"uppercase",...ue(t)})}function wj(t,i){return new wE({check:"string_format",format:"includes",...ue(i),includes:t})}function Ej(t,i){return new EE({check:"string_format",format:"starts_with",...ue(i),prefix:t})}function Oj(t,i){return new OE({check:"string_format",format:"ends_with",...ue(i),suffix:t})}function cs(t){return new jE({check:"overwrite",tx:t})}function jj(t){return cs(i=>i.normalize(t))}function zj(){return cs(t=>t.trim())}function Tj(){return cs(t=>t.toLowerCase())}function Nj(){return cs(t=>t.toUpperCase())}function Aj(){return cs(t=>Jw(t))}function Rj(t,i,s){return new t({type:"array",element:i,...ue(s)})}function Cj(t,i,s){return new t({type:"custom",check:"custom",fn:i,...ue(s)})}function Mj(t,i){const s=Dj(r=>(r.addIssue=o=>{if(typeof o=="string")r.issues.push(wr(o,r.value,s._zod.def));else{const c=o;c.fatal&&(c.continue=!1),c.code??(c.code="custom"),"input"in c||(c.input=r.value),c.inst??(c.inst=s),c.continue??(c.continue=!s._zod.def.abort),r.issues.push(wr(c))}},t(r.value,r)),i);return s}function Dj(t,i){const s=new Rt({check:"custom",...ue(i)});return s._zod.check=t,s}function gr(t,...i){for(const s of i)for(const r of Reflect.ownKeys(s))Object.prototype.propertyIsEnumerable.call(s,r)&&zi(t,r,s[r]);return t}function Xb(t){let i=t?.target??"draft-2020-12";return i==="draft-4"&&(i="draft-04"),i==="draft-7"&&(i="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??hr,target:i,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:t?.cycles??"ref",reused:t?.reused??"inline",intersections:[],deferred:[],external:t?.external??void 0}}function ji(t,i,s,r,o){const c=typeof i.unrepresentable=="function"?i.unrepresentable({zodSchema:t,path:r.path,message:o}):i.unrepresentable;if(c==="any")return!1;if(c===void 0||c==="throw")throw new Error(o);return Object.assign(s,c),!0}function nt(t,i,s={path:[],schemaPath:[]}){var r;const o=t._zod.def,c=i.seen.get(t);if(c)return c.count++,s.schemaPath.includes(t)&&(c.cycle=s.path),c.schema;const d={schema:{},count:1,cycle:void 0,path:s.path};i.seen.set(t,d),i.sharedDefsExtractedFor=void 0,i.sharedEmitDoneFor=void 0;const h=t._zod.toJSONSchema?.();if(h)d.schema=h;else{const b={...s,schemaPath:[...s.schemaPath,t],path:s.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(i,d.schema,b);else{const x=d.schema,S=i.processors[o.type];if(!S)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);S(t,i,x,b)}const v=t._zod.parent;v&&(d.ref||(d.ref=v),nt(v,i,b),i.seen.get(v).isParent=!0)}const m=i.metadataRegistry.get(t);return m&&gr(d.schema,m),i.io==="input"&&bt(t)&&(delete d.schema.examples,delete d.schema.default),i.io==="input"&&"_prefault"in d.schema&&((r=d.schema).default??(r.default=d.schema._prefault)),delete d.schema._prefault,i.seen.get(t).schema}function Iy(t){return t.replace(/~/g,"~0").replace(/\//g,"~1")}function Jb(t,i){const s=t.seen.get(i);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");if(t.external&&t.sharedDefsExtractedFor===t.external)return;const r=new Map;for(const d of t.seen.entries()){const h=t.metadataRegistry.get(d[0])?.id;if(h){const m=r.get(h);if(m&&m!==d[0])throw new Error(`Duplicate schema id "${h}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(h,d[0])}}const o=d=>{const h=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const 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}/${Iy(S)}`}}const m="#",p=`${m}/${h}/`;if(d[1]===s&&!d[1].schema.id)return{ref:m};const b=d[1].schema.id??`__schema${t.counter++}`;return{defId:b,ref:p+Iy(b)}},c=d=>{if(d[1].schema.$ref)return;const h=d[1],{ref:m,defId:p}=o(d);h.def={...h.schema},p&&(h.defId=p);const b=h.schema;for(const v in b)delete b[v];b.$ref=m};if(t.cycles==="throw")for(const d of t.seen.entries()){const h=d[1];if(h.cycle)throw new Error(`Cycle detected: #/${h.cycle?.join("/")}/<root>
|
|
65
|
-
|
|
66
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const d of t.seen.entries()){const h=d[1];if(i===d[0]){c(d);continue}if(t.external){const p=t.external.registry.get(d[0])?.id;if(i!==d[0]&&p){c(d);continue}}if(t.metadataRegistry.get(d[0])?.id){c(d);continue}if(h.cycle){c(d);continue}h.count>1&&t.reused==="ref"&&c(d)}t.external&&(t.sharedDefsExtractedFor=t.external)}function Ib(t){const i=t.anyOf;if(!Array.isArray(i)||i.length===0||t.type!==void 0)return;const s=[];for(const r of i){if(!r||typeof r!="object")return;Ib(r);const o=Object.keys(r);if(o.length!==1||o[0]!=="type")return;const c=r.type;for(const d of Array.isArray(c)?c:[c]){if(typeof d!="string")return;s.includes(d)||s.push(d)}}delete t.anyOf,t.type=s.length===1?s[0]:s}const Wb=new Set(["type","properties","required","additionalProperties"]),Wy=["oneOf","anyOf"];function ev(t){const i=t.additionalProperties;return i===void 0||i===!1||typeof i!="object"||i===null?null:Object.keys(i).length?i:null}function Xf(t){const i=[];for(const c of t){if(typeof c!="object"||c.type!=="object")return null;for(const d in c)if(!Wb.has(d))return null;i.push(c)}const s={},r=new Set;for(const c of i){for(const d in c.properties){if(Object.prototype.hasOwnProperty.call(s,d))continue;const h=[];for(const p of i){const b=p.properties?.[d]??ev(p);b!=null&&(h.some(v=>JSON.stringify(v)===JSON.stringify(b))||h.push(b))}const m=h.length===1?h[0]:Xf(h)??{allOf:h};zi(s,d,m)}for(const d of c.required??[])r.add(d)}const o={type:"object",properties:s};if(r.size&&(o.required=[...r]),i.every(c=>c.additionalProperties===!1))o.additionalProperties=!1;else{const c=[];for(const d of i){const h=ev(d);h&&!c.some(m=>JSON.stringify(m)===JSON.stringify(h))&&c.push(h)}c.length===1?o.additionalProperties=c[0]:c.length>1&&(o.additionalProperties={allOf:c})}return o}function kj(t){const i=t.allOf;if(!Array.isArray(i)||i.length<2)return;for(const o of Wb)if(o in t)return;const s=i.filter(o=>Wy.some(c=>Array.isArray(o[c])));let r=null;if(!s.length)r=Xf(i);else{const o=s[0],c=Wy.find(m=>Array.isArray(o[m]));if(Object.keys(o).length!==1)return;const d=i.filter(m=>m!==o),h=o[c].map(m=>Xf([...d,m]));if(h.some(m=>!m))return;r={[c]:h}}r&&(delete t.allOf,gr(t,r))}function e0(t,i){const s=t.seen.get(i);if(!s)throw new Error("Unprocessed schema. This is a bug in Zod.");const r=h=>{const m=t.seen.get(h);if(m.ref===null)return;const p=m.def??m.schema,b={...p},v=m.ref;if(m.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")?(p.allOf=p.allOf??[],p.allOf.push(w)):gr(p,w),gr(p,b),h._zod.parent===v)for(const z in p)z==="$ref"||z==="allOf"||z in b||delete p[z];if(w.$ref&&S.def)for(const z in p)z==="$ref"||z==="allOf"||z in S.def&&JSON.stringify(p[z])===JSON.stringify(S.def[z])&&delete p[z]}const x=h._zod.parent;if(x&&x!==v){r(x);const S=t.seen.get(x);if(S?.schema.$ref&&(p.$ref=S.schema.$ref,S.def))for(const w in p)w==="$ref"||w==="allOf"||w in S.def&&JSON.stringify(p[w])===JSON.stringify(S.def[w])&&delete p[w]}t.override({zodSchema:h,jsonSchema:p,path:m.path??[]})};if(!t.external||t.sharedEmitDoneFor!==t.external){for(const h of[...t.seen.entries()].reverse())r(h[0]);if(t.target!=="openapi-3.0")for(const h of t.seen.entries())Ib(h[1].def??h[1].schema);for(const h of t.deferred)h();if(t.intersections.length){const h=new Map;for(const m of t.seen.values())for(const p of[m.schema,m.def]){const b=p?.allOf;if(!Array.isArray(b))continue;const v=h.get(b);v?v.push(p):h.set(b,[p])}for(const m of t.intersections)for(const p of h.get(m)??[])kj(p)}}const o={};if(t.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const h=t.external.registry.get(i)?.id;if(!h)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(h)}gr(o,s.defId?s.schema:s.def??s.schema);const c=t.metadataRegistry.get(i)?.id;c!==void 0&&o.id===c&&delete o.id;const d=t.external?.defs??{};if(!t.external||t.sharedEmitDoneFor!==t.external)for(const h of t.seen.entries()){const m=h[1];m.def&&m.defId&&(m.def.id===m.defId&&delete m.def.id,zi(d,m.defId,m.def))}t.external&&(t.sharedEmitDoneFor=t.external),t.external||Object.keys(d).length>0&&(t.target==="draft-2020-12"?o.$defs=d:o.definitions=d);try{const h=JSON.parse(JSON.stringify(o));return Object.defineProperty(h,"~standard",{value:{...i["~standard"],jsonSchema:{input:jo(i,"input",t.processors),output:jo(i,"output",t.processors)}},enumerable:!1,writable:!1}),h}catch{throw new Error("Error converting schema to JSON.")}}function bt(t,i){const s=i??{seen:new Set};if(s.seen.has(t))return!1;s.seen.add(t);const r=t._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return bt(r.element,s);if(r.type==="set")return bt(r.valueType,s);if(r.type==="lazy")return bt(r.getter(),s);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault"||r.type==="catch")return bt(r.innerType,s);if(r.type==="intersection")return bt(r.left,s)||bt(r.right,s);if(r.type==="record"||r.type==="map")return bt(r.keyType,s)||bt(r.valueType,s);if(r.type==="pipe")return t._zod.traits.has("$ZodCodec")?!0:bt(r.in,s)||bt(r.out,s);if(r.type==="object"){for(const o in r.shape)if(bt(r.shape[o],s))return!0;return!1}if(r.type==="union"){for(const o of r.options)if(bt(o,s))return!0;return!1}if(r.type==="tuple"){for(const o of r.items)if(bt(o,s))return!0;return!!(r.rest&&bt(r.rest,s))}return!1}const Uj=(t,i={})=>s=>{const r=Xb({...s,processors:i});return nt(t,r),Jb(r,t),e0(r,t)},jo=(t,i,s={})=>r=>{const{libraryOptions:o,target:c}=r??{},d=Xb({...o??{},target:c,io:i,processors:s});return nt(t,d),Jb(d,t),e0(d,t)},as=(t,i,s)=>{(t[i]===void 0||s>t[i])&&(t[i]=s)},ss=(t,i,s)=>{(t[i]===void 0||s<t[i])&&(t[i]=s)},tv=(t,i)=>{as(t,"minimum",i),ss(t,"maximum",i)},t0=(t,i)=>{t.multipleOf??(t.multipleOf=[]),t.multipleOf.includes(i)||t.multipleOf.push(i)},n0=(t,i)=>{t.patterns??(t.patterns=new Set),t.patterns.add(i)},i0=(t,i)=>{t.mime=t.mime?t.mime.filter(s=>i.includes(s)):[...i]},a0=(t,i)=>{t.format=i,i.includes("int")&&(t.isInt=!0)},nv=(t,i)=>as(t,"minimum",i.minimum),iv=(t,i)=>ss(t,"maximum",i.maximum),av=t=>(i,s)=>{a0(i,s.format);const[r,o]=t[s.format];as(i,"minimum",r),ss(i,"maximum",o)},Lj={greater_than:(t,i)=>as(t,i.inclusive?"minimum":"exclusiveMinimum",i.value),less_than:(t,i)=>ss(t,i.inclusive?"maximum":"exclusiveMaximum",i.value),multiple_of:(t,i)=>t0(t,i.value),number_format:av(Eb),bigint_format:av(t2),min_length:nv,max_length:iv,length_equals:(t,i)=>tv(t,i.length),min_size:nv,max_size:iv,size_equals:(t,i)=>tv(t,i.size),string_format:(t,i)=>{a0(t,i.format),i.pattern&&n0(t,i.pattern),(i.format==="base64"||i.format==="base64url")&&(t.contentEncoding=i.format),(i.local||i.precision===-1)&&(t.laxFormat=!0)},mime_type:(t,i)=>i0(t,i.mime)};function ln(t){const i={},s=t._zod.def,r=t._zod.traits.has("$ZodCheck")?[t,...s.checks??[]]:s.checks??[];for(const c of r)Lj[c._zod.def.check]?.(i,c._zod.def);const o=t._zod.bag;o.minimum!==void 0&&as(i,"minimum",o.minimum),o.exclusiveMinimum!==void 0&&as(i,"exclusiveMinimum",o.exclusiveMinimum),o.maximum!==void 0&&ss(i,"maximum",o.maximum),o.exclusiveMaximum!==void 0&&ss(i,"exclusiveMaximum",o.exclusiveMaximum),o.multipleOf!==void 0&&t0(i,o.multipleOf),o.format!==void 0&&(i.format??(i.format=o.format),o.format.includes("int")&&(i.isInt=!0)),o.mime&&i0(i,o.mime);for(const c of o.patterns??[])n0(i,c);return i}const Zj={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},qj=new Map([[qb,nE],[jd,iE]]),s0=t=>qj.get(t)??t,Bj=(t,i,s,r)=>{const o=s;o.type="string";const{minimum:c,maximum:d,format:h,patterns:m,contentEncoding:p,laxFormat:b}=ln(t);if(typeof c=="number"&&(o.minLength=c),typeof d=="number"&&(o.maxLength=d),h&&(o.format=Zj[h]??h,o.format===""&&delete o.format,(h==="time"||b)&&delete o.format),p&&(o.contentEncoding=p),m&&m.size>0){const v=[...m].map(s0);v.length===1?o.pattern=v[0].source:v.length>1&&(o.allOf=[...v.map(x=>({...i.target==="draft-07"||i.target==="draft-04"||i.target==="openapi-3.0"?{type:"string"}:{},pattern:x.source}))])}},$j=(t,i,s,r)=>{const o=s,{minimum:c,maximum:d,multipleOf:h,exclusiveMaximum:m,exclusiveMinimum:p,isInt:b}=ln(t);o.type=b?"integer":"number";const v=typeof p=="number"&&p>=(c??Number.NEGATIVE_INFINITY),x=typeof m=="number"&&m<=(d??Number.POSITIVE_INFINITY),S=i.target==="draft-04"||i.target==="openapi-3.0";if(v?S?(o.minimum=p,o.exclusiveMinimum=!0):o.exclusiveMinimum=p:typeof c=="number"&&(o.minimum=c),x?S?(o.maximum=m,o.exclusiveMaximum=!0):o.exclusiveMaximum=m:typeof d=="number"&&(o.maximum=d),h){const w=new Set;for(const A of h)Number.isFinite(A)&&A!==0?w.add(Math.abs(A)):ji(t,i,o,r,`A multipleOf divisor of ${A} cannot be represented in JSON Schema`);const[E,...z]=w;E!==void 0&&(o.multipleOf=E),z.length&&(o.allOf=[...o.allOf??[],...z.map(A=>({multipleOf:A}))])}},Hj=(t,i,s,r)=>{s.type="boolean"},Qj=(t,i,s,r)=>{s.not={}},Gj=(t,i,s,r)=>{},Kj=(t,i,s,r)=>{const o=t._zod.def,c=Gf(o.entries);if(c.length===0){s.not={};return}c.every(d=>typeof d=="number")&&(s.type="number"),c.every(d=>typeof d=="string")&&(s.type="string"),s.enum=c},Yj=(t,i,s,r)=>{const o=t._zod.def;if(o.values.length===0){s.not={};return}const c=[];for(const d of o.values)if(d===void 0){if(ji(t,i,s,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof d=="bigint"){if(ji(t,i,s,r,"BigInt literals cannot be represented in JSON Schema"))return;c.push(Number(d))}else c.push(d);if(c.length!==0)if(c.length===1){const d=c[0];s.type=d===null?"null":typeof d,i.target==="draft-04"||i.target==="openapi-3.0"?s.enum=[d]:s.const=d}else c.every(d=>typeof d=="number")&&(s.type="number"),c.every(d=>typeof d=="string")&&(s.type="string"),c.every(d=>typeof d=="boolean")&&(s.type="boolean"),c.every(d=>d===null)&&(s.type="null"),s.enum=c},Fj=(t,i,s,r)=>{ji(t,i,s,r,"Custom types cannot be represented in JSON Schema")},Vj=(t,i,s,r)=>{ji(t,i,s,r,"Transforms cannot be represented in JSON Schema")},Pj=(t,i,s,r)=>{const o=s,c=t._zod.def,{minimum:d,maximum:h}=ln(t);typeof d=="number"&&(o.minItems=d),typeof h=="number"&&(o.maxItems=h),o.type="array",o.items=nt(c.element,i,{...r,path:[...r.path,"items"]})};function zo(t){const i=t._zod.def;return i.type==="pipe"&&i.in._zod.traits.has("$ZodTransform")?zo(i.out):i.type==="catch"?zo(i.innerType):t._zod.optin}const Xj=(t,i,s,r)=>{const o=s,c=t._zod.def,d=c.shape;if(Object.getOwnPropertySymbols(d).length&&ji(t,i,o,r,"Symbol keys cannot be represented in JSON Schema"))return;o.type="object",o.properties={};for(const p in d)zi(o.properties,p,nt(d[p],i,{...r,path:[...r.path,"properties",p]}));const m=[];for(const p of Object.keys(d)){const b=c.shape[p];(i.io==="input"?zo(b)===void 0:b._zod.optout===void 0)&&m.push(p)}m.length>0&&(o.required=m),c.catchall?._zod.def.type==="never"?o.additionalProperties=!1:c.catchall?c.catchall&&(o.additionalProperties=nt(c.catchall,i,{...r,path:[...r.path,"additionalProperties"]})):i.io==="output"&&(o.additionalProperties=!1)},Jj=(t,i,s,r)=>{const o=t._zod.def,c=o.inclusive===!1,d=o.options.map((h,m)=>nt(h,i,{...r,path:[...r.path,c?"oneOf":"anyOf",m]}));c?s.oneOf=d:s.anyOf=d},Ij=(t,i,s,r)=>{const o=t._zod.def,c=nt(o.left,i,{...r,path:[...r.path,"allOf",0]}),d=nt(o.right,i,{...r,path:[...r.path,"allOf",1]}),h=p=>"allOf"in p&&Object.keys(p).length===1,m=[...h(c)?c.allOf:[c],...h(d)?d.allOf:[d]];s.allOf=m,i.intersections.push(m)};function Jf(t,i,s){if(i.$ref){if(s.has(i))return i;s.add(i);const w=t.get(i)?.def;if(!w)return i;const E=Jf(t,w,s);return E===w?i:E}for(const w of["anyOf","oneOf"]){const E=i[w];if(!Array.isArray(E))continue;const z=E.map(A=>Jf(t,A,s));z.some((A,U)=>A!==E[U])&&(i={...i,[w]:z})}const r=Array.isArray(i.type)?i.type:[i.type],o=!r.includes("string")&&r.some(w=>w==="number"||w==="integer"),c=i.enum??(i.const!==void 0?[i.const]:void 0);if(!o&&!c?.some(w=>typeof w=="number"))return i;const{minimum:d,maximum:h,exclusiveMinimum:m,exclusiveMaximum:p,multipleOf:b,format:v,id:x,...S}=i;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")?wd:fE).source)),S}const If=new WeakMap;function Wj(t){const i=new Map;for(const r of t.seen.values())r.def&&!i.has(r.schema)&&i.set(r.schema,r);const s=new Map;for(const r of If.get(t)??[]){const o=t.seen.get(r),c=(o?.def??o?.schema)?.propertyNames;if(!c||c===!0||s.has(c))continue;const d=Jf(i,c,new Set);d!==c&&s.set(c,d)}if(s.size)for(const r of t.seen.values())for(const o of[r.schema,r.def]){const c=o&&s.get(o.propertyNames);c&&(o.propertyNames=c)}}const ez=(t,i,s,r)=>{const o=s,c=t._zod.def;o.type="object";const d=c.keyType,h=ln(d).patterns;if(c.mode==="loose"&&h&&h.size>0){const b=nt(c.valueType,i,{...r,path:[...r.path,"patternProperties","*"]});o.patternProperties={};for(const v of h)zi(o.patternProperties,s0(v).source,b)}else{if(i.target==="draft-07"||i.target==="draft-2020-12"){o.propertyNames=nt(c.keyType,i,{...r,path:[...r.path,"propertyNames"]});let b=If.get(i);b||(b=[],If.set(i,b),i.deferred.push(()=>Wj(i))),b.push(t)}o.additionalProperties=nt(c.valueType,i,{...r,path:[...r.path,"additionalProperties"]})}const m=d._zod.values,p=i.io==="input"&&zo(c.valueType)!==void 0;if(m&&!c.partial&&!p){const b=[...m].filter(v=>typeof v=="string"||typeof v=="number");b.length>0&&(o.required=b.map(String))}},tz=(t,i,s,r)=>{const o=t._zod.def,c=nt(o.innerType,i,r),d=i.seen.get(t);i.target==="openapi-3.0"?(d.ref=o.innerType,s.nullable=!0):s.anyOf=[c,{type:"null"}]},nz=(t,i,s,r)=>{const o=t._zod.def;nt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType},zd=Symbol();function r0(t,i,s,r,o){let c=!1;const d=JSON.stringify(t,(h,m)=>typeof m!="bigint"?m:(c=!0,null));return c?(ji(i,s,r,o,"BigInt defaults cannot be represented in JSON Schema"),zd):JSON.parse(d)}const iz=(t,i,s,r)=>{const o=t._zod.def;nt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType;const d=r0(o.defaultValue,t,i,s,r);d!==zd&&(s.default=d)},az=(t,i,s,r)=>{const o=t._zod.def;nt(o.innerType,i,r);const c=i.seen.get(t);if(c.ref=o.innerType,i.io!=="input")return;const d=r0(o.defaultValue,t,i,s,r);d!==zd&&(s._prefault=d)},sz=(t,i,s,r)=>{const o=t._zod.def;nt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType;let d;try{d=o.catchValue(void 0)}catch{ji(t,i,s,r,"Dynamic catch values are not supported in JSON Schema");return}s.default=d},rz=(t,i,s,r)=>{const o=t._zod.def,c=o.in._zod.traits.has("$ZodTransform"),d=i.io==="input"?c?o.out:o.in:o.out;nt(d,i,r);const h=i.seen.get(t);h.ref=d},lz=(t,i,s,r)=>{const o=t._zod.def;nt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType,s.readOnly=!0},l0=(t,i,s,r)=>{const o=t._zod.def;nt(o.innerType,i,r);const c=i.seen.get(t);c.ref=o.innerType},sv=new WeakSet([Object.prototype,Error.prototype]);function to(t,i,s){Object.defineProperty(t,i,{configurable:!0,enumerable:!1,get(){const r=s(this);return Object.defineProperty(this,i,{value:r,configurable:!0,writable:!0}),r},set(r){Object.defineProperty(this,i,{value:r,configurable:!0,writable:!0})}})}const oz=(t,i)=>{w2.init(t,i),t.name="ZodError";const s=Object.getPrototypeOf(t);sv.has(s)||(sv.add(s),to(s,"format",r=>o=>j2(r,o)),to(s,"flatten",r=>o=>O2(r,o)),to(s,"addIssue",r=>o=>{r.issues.push(o),r.message=JSON.stringify(r.issues,Kf,2)}),to(s,"addIssues",r=>o=>{r.issues.push(...o),r.message=JSON.stringify(r.issues,Kf,2)}),Object.defineProperty(s,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},tn=G("ZodError",oz,void 0,{Parent:Error}),uz=bd(tn),cz=xd(tn),fz=Sd(tn),dz=_d(tn),hz=C2(tn),mz=M2(tn),pz=D2(tn),gz=k2(tn),yz=U2(tn),vz=L2(tn),bz=Z2(tn),xz=q2(tn);function Sz(){un.localeError||vn(BO())}function Lo(){un.memoizer||vn({memoizer:LO()})}const Ye=G("ZodType",(t,i)=>(Sz(),Ke.init(t,i),t.def=i,t.type=i.type,t),{check(...t){const i=this.def;return this.clone(Qt(i,{checks:[...i.checks??[],...t.map(s=>typeof s=="function"?{_zod:{check:s,def:{check:"custom"},onattach:[]}}:s)]}),{parent:!0})},with(...t){return this.check(...t)},clone(t,i){return Ti(this,t,i)},brand(){return this},register(t,i){return t.add(this,i),this},refine(t,i){return this.check(mT(t,i))},superRefine(t,i){return this.check(pT(t,i))},overwrite(t){return this.check(cs(t))},optional(){return ov(this)},exactOptional(){return nT(this)},nullable(){return uv(this)},nullish(){return ov(uv(this))},nonoptional(t){return lT(this,t)},array(){return be(this)},or(t){return Zo([this,t])},and(t){return Jz(this,t)},transform(t){return cv(this,tT(t))},default(t){return aT(this,t)},prefault(t){return rT(this,t)},catch(t){return uT(this,t)},pipe(t){return cv(this,t)},readonly(){return dT(this)},describe(t){const i=this.clone();return hr.add(i,{description:t}),i},meta(...t){if(t.length===0)return hr.get(this);const i=this.clone();return hr.add(i,t[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(t,...i){return i.length===0?t(this):t(this,...i)},get"~standard"(){return jb(this,"~standard",{...Db(this),jsonSchema:{input:jo(this,"input"),output:jo(this,"output")}})},set"~standard"(t){Oi(this,"~standard",t)},parse:function t(i,s){return uz(this,i,s,{callee:t})},parseAsync:async function t(i,s){return await cz(this,i,s,{callee:t})},safeParse(t,i){return fz(this,t,i)},async safeParseAsync(t,i){return dz(this,t,i)},get spa(){return this?.safeParseAsync},set spa(t){Oi(this,"spa",t)},validate(t,i){return N2(this,t,i)},validateAsync(t,i){return R2(this,t,i)},encode:function t(i,s){return hz(this,i,s,{callee:t})},decode:function t(i,s){return mz(this,i,s,{callee:t})},encodeAsync:async function t(i,s){return await pz(this,i,s,{callee:t})},decodeAsync:async function t(i,s){return await gz(this,i,s,{callee:t})},safeEncode(t,i){return yz(this,t,i)},safeDecode(t,i){return vz(this,t,i)},async safeEncodeAsync(t,i){return bz(this,t,i)},async safeDecodeAsync(t,i){return xz(this,t,i)},toJSONSchema(t){return Uj(this,{})(t)},get description(){return hr.get(this)?.description},get _def(){return this._zod.def}}),o0=G("_ZodString",(t,i)=>{Od.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Bj(t,s,r)},zb({format:t=>ln(t).format??null,minLength:t=>ln(t).minimum??null,maxLength:t=>ln(t).maximum??null},{regex(...t){return this.check(xj(...t))},includes(...t){return this.check(wj(...t))},startsWith(...t){return this.check(Ej(...t))},endsWith(...t){return this.check(Oj(...t))},min(...t){return this.check(Oo(...t))},max(...t){return this.check(Vb(...t))},length(...t){return this.check(Pb(...t))},nonempty(...t){return this.check(Oo(1,...t))},lowercase(t){return this.check(Sj(t))},uppercase(t){return this.check(_j(t))},trim(){return this.check(zj())},normalize(...t){return this.check(jj(...t))},toLowerCase(){return this.check(Tj())},toUpperCase(){return this.check(Nj())},slugify(){return this.check(Aj())}})),u0=G("ZodString",(t,i)=>{Od.init(t,i),o0.init(t,i)},{email(t){return this.check(GO(Oz,t))},url(t){return this.check(XO(zz,t))},jwt(t){return this.check(fj(Hz,t))},emoji(t){return this.check(JO(Tz,t))},guid(t){return this.check(KO(jz,t))},uuid(t){return this.check(YO(no,t))},uuidv4(t){return this.check(FO(no,t))},uuidv6(t){return this.check(VO(no,t))},uuidv7(t){return this.check(PO(no,t))},nanoid(t){return this.check(IO(Nz,t))},cuid(t){return this.check(WO(Az,t))},cuid2(t){return this.check(ej(Rz,t))},ulid(t){return this.check(tj(Cz,t))},base64(t){return this.check(oj(qz,t))},base64url(t){return this.check(uj(Bz,t))},xid(t){return this.check(nj(Mz,t))},ksuid(t){return this.check(ij(Dz,t))},ipv4(t){return this.check(aj(kz,t))},ipv6(t){return this.check(sj(Uz,t))},cidrv4(t){return this.check(rj(Lz,t))},cidrv6(t){return this.check(lj(Zz,t))},e164(t){return this.check(cj($z,t))},datetime(t){return this.check(Fb(c0,t))},date(t){return this.check(dj(_z,t))},time(t){return this.check(hj(wz,t))},duration(t){return this.check(mj(Ez,t))}});function F(t){return QO(u0,t)}const Fe=G("ZodStringFormat",(t,i)=>{Qe.init(t,i),o0.init(t,i)}),c0=G("ZodISODateTime",(t,i)=>{YE.init(t,i),Fe.init(t,i)}),_z=G("ZodISODate",(t,i)=>{FE.init(t,i),Fe.init(t,i)}),wz=G("ZodISOTime",(t,i)=>{VE.init(t,i),Fe.init(t,i)}),Ez=G("ZodISODuration",(t,i)=>{PE.init(t,i),Fe.init(t,i)}),Oz=G("ZodEmail",(t,i)=>{CE.init(t,i),Fe.init(t,i)}),jz=G("ZodGUID",(t,i)=>{AE.init(t,i),Fe.init(t,i)}),no=G("ZodUUID",(t,i)=>{RE.init(t,i),Fe.init(t,i)}),zz=G("ZodURL",(t,i)=>{ZE.init(t,i),Fe.init(t,i)}),Tz=G("ZodEmoji",(t,i)=>{qE.init(t,i),Fe.init(t,i)}),Nz=G("ZodNanoID",(t,i)=>{BE.init(t,i),Fe.init(t,i)}),Az=G("ZodCUID",(t,i)=>{$E.init(t,i),Fe.init(t,i)}),Rz=G("ZodCUID2",(t,i)=>{HE.init(t,i),Fe.init(t,i)}),Cz=G("ZodULID",(t,i)=>{QE.init(t,i),Fe.init(t,i)}),Mz=G("ZodXID",(t,i)=>{GE.init(t,i),Fe.init(t,i)}),Dz=G("ZodKSUID",(t,i)=>{KE.init(t,i),Fe.init(t,i)}),kz=G("ZodIPv4",(t,i)=>{XE.init(t,i),Fe.init(t,i)}),Uz=G("ZodIPv6",(t,i)=>{IE.init(t,i),Fe.init(t,i)}),Lz=G("ZodCIDRv4",(t,i)=>{WE.init(t,i),Fe.init(t,i)}),Zz=G("ZodCIDRv6",(t,i)=>{tO.init(t,i),Fe.init(t,i)}),qz=G("ZodBase64",(t,i)=>{nO.init(t,i),Fe.init(t,i)}),Bz=G("ZodBase64URL",(t,i)=>{aO.init(t,i),Fe.init(t,i)}),$z=G("ZodE164",(t,i)=>{sO.init(t,i),Fe.init(t,i)}),Hz=G("ZodJWT",(t,i)=>{lO.init(t,i),Fe.init(t,i)}),f0=G("ZodNumber",(t,i)=>{Bb.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>$j(t,s,r,o),t.isFinite=!0},zb({minValue:t=>{const{minimum:i,exclusiveMinimum:s}=ln(t);return Math.max(i??Number.NEGATIVE_INFINITY,s??Number.NEGATIVE_INFINITY)},maxValue:t=>{const{maximum:i,exclusiveMaximum:s}=ln(t);return Math.min(i??Number.POSITIVE_INFINITY,s??Number.POSITIVE_INFINITY)},isInt:t=>{const{isInt:i,multipleOf:s}=ln(t);return!!i||!!s?.some(Number.isSafeInteger)},format:t=>ln(t).format??null},{gt(t,i){return this.check(Xy(t,i))},gte(t,i){return this.check(Of(t,i))},min(t,i){return this.check(Of(t,i))},lt(t,i){return this.check(Py(t,i))},lte(t,i){return this.check(Ef(t,i))},max(t,i){return this.check(Ef(t,i))},int(t){return this.check(rv(t))},safe(t){return this.check(rv(t))},positive(t){return this.check(Xy(0,t))},nonnegative(t){return this.check(Of(0,t))},negative(t){return this.check(Py(0,t))},nonpositive(t){return this.check(Ef(0,t))},multipleOf(t,i){return this.check(Jy(t,i))},step(t,i){return this.check(Jy(t,i))},finite(){return this}}));function Ae(t){return pj(f0,t)}const Qz=G("ZodNumberFormat",(t,i)=>{oO.init(t,i),f0.init(t,i)});function rv(t){return gj(Qz,t)}const Gz=G("ZodBoolean",(t,i)=>{uO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Hj(t,s,r)});function At(t){return yj(Gz,t)}const Kz=G("ZodUnknown",(t,i)=>{cO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Gj()});function Wf(){return vj(Kz)}const Yz=G("ZodNever",(t,i)=>{fO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Qj(t,s,r)});function Fz(t){return bj(Yz,t)}const d0=G("ZodArray",(t,i)=>{Lo(),mO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Pj(t,s,r,o),t.element=i.element},{min(t,i){return this.check(Oo(t,i))},nonempty(t){return this.check(Oo(1,t))},max(t,i){return this.check(Vb(t,i))},length(t,i){return this.check(Pb(t,i))},unwrap(){return this.element}});function be(t,i){return Rj(d0,t,i)}const Vz=G("ZodObject",(t,i)=>{Lo(),yO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Xj(t,s,r,o),p2(t,"shape",s=>s._zod.def.shape,!1)},{keyof(){return yt(Object.keys(this._zod.def.shape))},catchall(t){return this.clone(Qt(this._zod.def,{catchall:t}))},passthrough(){return this.clone(Qt(this._zod.def,{catchall:Wf()}))},loose(){return this.clone(Qt(this._zod.def,{catchall:Wf()}))},strict(){return this.clone(Qt(this._zod.def,{catchall:Fz()}))},strip(){return this.clone(Qt(this._zod.def,{catchall:void 0}))},extend(t){return a2(this,t)},safeExtend(t){return s2(this,t)},merge(t){return r2(this,t)},pick(t){return n2(this,t)},omit(t){return i2(this,t)},partial(...t){return Ry(h0,this,t[0])},exactPartial(...t){return Ry(m0,this,t[0],"exactPartial")},required(...t){return l2(g0,this,t[0])}});function re(t,i){const s={type:"object",shape:t??{},...ue(i)};return new Vz(s)}const Pz=G("ZodUnion",(t,i)=>{vO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Jj(t,s,r,o),t.options=i.options});function Zo(t,i){return new Pz({type:"union",options:t,...ue(i)})}const Xz=G("ZodIntersection",(t,i)=>{bO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Ij(t,s,r,o)});function Jz(t,i){return new Xz({type:"intersection",left:t,right:i})}const lv=G("ZodRecord",(t,i)=>{Lo(),xO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>ez(t,s,r,o),t.keyType=i.keyType,t.valueType=i.valueType});function Iz(t,i,s){return!i||!i._zod?new lv({type:"record",keyType:F(),valueType:t,...ue(i)}):new lv({type:"record",keyType:t,valueType:i,...ue(s)})}const To=G("ZodEnum",(t,i)=>{SO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(r,o,c)=>Kj(t,r,o),t.enum=i.entries,t.options=[...t._zod.values];const s=new Set(Object.keys(i.entries));t.extract=(r,o)=>{const c={};for(const d of r)if(s.has(d))c[d]=i.entries[d];else throw new Error(`Key ${d} not found in enum`);return new To({...i,checks:[],...ue(o),entries:c})},t.exclude=(r,o)=>{const c={...i.entries};for(const d of r)if(s.has(d))delete c[d];else throw new Error(`Key ${d} not found in enum`);return new To({...i,checks:[],...ue(o),entries:c})}});function yt(t,i){const s=Array.isArray(t)?Object.fromEntries(t.map(r=>[r,r])):t;return new To({type:"enum",entries:s,...ue(i)})}const Wz=G("ZodLiteral",(t,i)=>{_O.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Yj(t,s,r,o),t.values=new Set(i.values),Object.defineProperty(t,"value",{get(){if(i.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return i.values[0]}})});function vi(t,i){return new Wz({type:"literal",values:Array.isArray(t)?t:[t],...ue(i)})}const eT=G("ZodTransform",(t,i)=>{Lo(),wO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Vj(t,s,r,o),t._zod.parse=(s,r)=>{if(r.direction==="backward")throw new Tb(t.constructor.name);s.addIssue=c=>{if(typeof c=="string")s.issues.push(wr(c,s.value,i));else{const d=c;d.fatal&&(d.continue=!1),d.code??(d.code="custom"),"input"in d||(d.input=s.value),d.inst??(d.inst=t),s.issues.push(wr(d))}};const o=i.transform(s.value,s);return o instanceof Promise?o.then(c=>(s.value=c,s)):(s.value=o,s)}});function tT(t){return new eT({type:"transform",transform:t})}const h0=G("ZodOptional",(t,i)=>{Qb.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>l0(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function ov(t){return new h0({type:"optional",innerType:t})}const m0=G("ZodExactOptional",(t,i)=>{EO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>l0(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function nT(t){return new m0({type:"optional",innerType:t})}const iT=G("ZodNullable",(t,i)=>{OO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>tz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function uv(t){return new iT({type:"nullable",innerType:t})}const p0=G("ZodDefault",(t,i)=>{jO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>iz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function aT(t,i){return new p0({type:"default",innerType:t,get defaultValue(){return typeof i=="function"?i():_b(i)}})}const sT=G("ZodPrefault",(t,i)=>{zO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>az(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function rT(t,i){return new sT({type:"prefault",innerType:t,get defaultValue(){return typeof i=="function"?i():_b(i)}})}const g0=G("ZodNonOptional",(t,i)=>{TO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>nz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function lT(t,i){return new g0({type:"nonoptional",innerType:t,...ue(i)})}const oT=G("ZodCatch",(t,i)=>{NO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>sz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function uT(t,i){return new oT({type:"catch",innerType:t,catchValue:typeof i=="function"?i:y2(i)})}const cT=G("ZodPipe",(t,i)=>{AO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>rz(t,s,r,o),t.in=i.in,t.out=i.out});function cv(t,i){return new cT({type:"pipe",in:t,out:i})}const fT=G("ZodReadonly",(t,i)=>{RO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>lz(t,s,r,o),t.unwrap=()=>t._zod.def.innerType});function dT(t){return new fT({type:"readonly",innerType:t})}const hT=G("ZodCustom",(t,i)=>{CO.init(t,i),Ye.init(t,i),t._zod.processJSONSchema=(s,r,o)=>Fj(t,s,r,o)});function mT(t,i={}){return Cj(hT,t,i)}function pT(t,i){return Mj(t,i)}function gT(t){return Fb(c0,t)}const it=F().regex(/^[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"kebab-case required"),y0=F().regex(/^package:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,"expected package:<kebab-case-name>"),yT=re({method:yt(["GET","POST","PUT","PATCH","DELETE"]),path:F().startsWith("/api/"),description:F().min(10),schemaInput:F().describe("Exported name of the input Zod schema, e.g. CreateOrderInputSchema"),schemaOutput:F().describe("Exported name of the output Zod schema"),invalidates:be(F()).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")}),vT=yt(["reference","ownerless"]),bT=Zo([F(),re({name:F(),shared:vi(!0),sharedKind:vT.optional()})]),xT=re({name:it,intent:F().min(20).max(300).describe("The feature's 'why' in 1-3 sentences"),app:F().optional().describe("Name of the owning app (apps[].name); defaults to the api app"),folder:F().describe("Path relative to the app root, e.g. src/features/orders"),spec:F().nullable().describe("Path to the spec, e.g. specs/orders.spec.md, null for technical features"),routes:be(yT),dbTables:be(bT).describe("Drizzle tables owned by this feature (one table = one owner). String = tenant-scoped; { name, shared: true } = shared referential"),dependsOn:be(Zo([it,y0])).describe("Features imported through their index.ts, and product packages as package:<name> — nothing else"),status:yt(["skeleton","in-progress","delivered"])}),ST=F().regex(/^\d+\.\d+\.\d+$/,"expected a plain x.y.z version"),_T=re({packages:be(re({name:F().describe("Published npm name, e.g. @ogygie/core"),path:F().describe("Folder relative to the repo root"),intent:F().min(20),spec:F().nullable(),status:yt(["skeleton","in-progress","delivered"])})),templates:re({project:F().describe("Folder copied by `ogygie init`"),feature:F().describe("Reserved for `ogygie generate feature` (not wired yet)")}),governedFiles:F().describe("Module declaring the exhaustive list of files `upgrade` may overwrite (D3)")}),wT=re({canonical:F().regex(/^[a-z][a-zA-Z0-9]*$/,"camelCase English term required").describe("The one machine term for this concept, e.g. gadget"),forbiddenAliases:be(F().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:F().optional().describe("Anchor into AGENTS.product.md where the concept is explained")}),ET=re({entries:be(wT)}),OT=re({name:it,path:F().describe("Folder relative to the repo root, e.g. packages/solver"),intent:F().min(20).max(300).describe("The package's 'why' in 1-3 sentences"),spec:F().nullable(),dependsOn:be(y0).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"])}),jT=re({column:F().min(1).describe("SQL name of the tenant column, e.g. workspace_id — the one AGENTS.product.md announces"),rawDbAllowed:be(it).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")}),zT=re({version:vi(1),product:re({name:F(),description:F().min(20)}),ogygieVersion:ST.optional(),framework:_T.optional(),apps:be(re({name:F(),path:F(),type:yt(["api","front","gateway"]),entryPoint:F(),vendored:vi(!0).optional()})),features:be(xT),tenancy:jT.optional().describe("Product values the framework gates need — absent, the tenancy checks do not run"),packages:be(OT).optional().describe("Product code living outside every app — libraries, engines. Absent = the project has none"),vocabulary:ET.optional().describe("The product's closed vocabulary — declared here, enforced by `ogygie verify-vocabulary`. Absent = gate silent"),conventions:re({agentsMd:vi("AGENTS.md"),failuresMd:vi("FAILURES.md"),specsFolder:vi("specs/")})}).superRefine((t,i)=>{const s=new Set(t.features.map(v=>v.name)),r=new Set;(t.packages??[]).forEach((v,x)=>{s.has(v.name)&&i.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)&&i.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)&&i.addIssue({code:"custom",path:["framework","packages",x,"spec"],message:`spec "${S}" is already owned by a feature or a product package — one spec, one owner`})});const d=(v,x)=>{v.forEach((S,w)=>{if(!S.startsWith("package:"))return;const E=S.slice(8);r.has(E)||i.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)=>{s.has(v)||i.addIssue({code:"custom",path:["tenancy","rawDbAllowed",x],message:`"${v}" matches no declared feature`})});const h=new Map,m=new Map;(t.vocabulary?.entries??[]).forEach((v,x)=>{const S=v.canonical.toLowerCase(),w=h.get(S);w!==void 0?i.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 E=["vocabulary","entries",x,"forbiddenAliases",w],z=h.get(S);if(z!==void 0){i.addIssue({code:"custom",path:E,message:`alias "${S}" is the canonical term of entry ${z} — a term cannot be both`});return}const A=m.get(S);if(A!==void 0){i.addIssue({code:"custom",path:E,message:`alias "${S}" is already forbidden by entry ${A} — one alias belongs to one concept`});return}m.set(S,x)})});const p=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 E of S.invalidates??[])b.has(E)||i.addIssue({code:"custom",path:["features",x,"routes",w,"invalidates"],message:`invalidates target "${E}" matches no feature name and no route root`})})}),t.features.forEach((v,x)=>{if(v.app===void 0)return;const S=p.get(v.app);if(S===void 0){i.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)&&i.addIssue({code:"custom",path:["features",x],message:"a non-api feature owns no HTTP routes and no DB tables — declare them on the api feature"})})}),TT=F().regex(/^.+ blockedBy:[a-z][a-z0-9]*(-[a-z0-9]+)*$/,'Expected "<behavior> blockedBy:<feature-name>" (feature name in kebab-case)'),fs=re({id:it.describe("Identical to the feature name in the manifest"),status:yt(["draft","validated","implemented"]),depends_on:be(it),priority:yt(["P0","P1","P2"]),refs:be(F()).default([]).describe("References to the domain model, e.g. 'modele-gally §4.2'"),deferred:be(TT).default([]).describe("Behaviors deferred to a later feature, blocked by name")}),Wa=["# @intent","# Comportements","# Contrats de données","# États UI","# Non-objectifs","# Budget"],NT="Hypothèses";function AT(t){const i=new RegExp(`^# ${NT}\\s*$`,"mu").exec(t);if(i===null)return[];const s=t.slice(i.index+i[0].length),r=/^# /mu.exec(s);return(r===null?s:s.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 Td=re({ogygie:vi(!0).describe("Marker: lets an agent tell our errors from noise"),code:F().regex(/^[A-Z][A-Z0-9_]+$/,"SCREAMING_SNAKE_CASE, stable over time"),message:F().min(10).describe("Human-readable sentence (technical English)"),file:F().nullable().describe("Relative path of the file involved, null when not localizable"),cause:F().describe("The precise datum or condition that triggered the error"),suggestedFix:F().describe("Concrete action to fix — never empty"),details:Iz(F(),Wf()).default({}),timestamp:gT()});class qo extends Error{payload;constructor(i){super(i.message),this.name="StudioApiError",this.payload=i}}async function rt(t,i,s){const r=await fetch(t,s),o=await r.json();if(!r.ok){const c=Td.safeParse(o);throw c.success?new qo(c.data):new Error(`HTTP ${r.status} on ${t} (non-OgygieError payload)`)}return i.parse(o)}function Or(t){return{headers:{"content-type":"application/json"},body:JSON.stringify(t)}}const RT=fs.shape.status,Nd=re({id:it,status:RT,priority:fs.shape.priority,depends_on:be(it),filePath:F(),presentSections:be(F()),intent:F().default("")}),CT=re({id:F(),filePath:F(),error:Td}),MT=Zo([Nd,CT]),DT=re({specs:be(MT)});re({specId:it});const kT=re({frontmatter:fs,body:F(),presentSections:be(F())});re({frontmatter:fs,body:F().max(2e5).optional()});const UT=re({spec:Nd});re({id:it.max(80)});const LT=re({spec:Nd}),ZT=re({manifest:zT}),qT=re({name:F().min(1).max(200),contentBase64:F().min(1).max(57e5)}),BT=re({questionId:it,answer:F().min(1).max(2e3)});re({brief:F().min(50).max(2e4),specId:it.optional(),attachments:be(qT).max(5).default([]),answers:be(BT).max(15).default([]),round:Ae().int().min(1).max(4).default(1),skipQuestions:At().default(!1)});const $T=re({id:it,text:F().min(1),options:be(F().min(1)).min(2).max(4)}),HT=re({specId:it,attempts:Ae().int().min(1).max(4),problemsFixed:be(F()),isNewFeature:At(),isAmendment:At(),compositions:be(F()).default([]),generation:re({derivable:Ae().int().nonnegative(),hole:Ae().int().nonnegative()}).nullable().default(null),assumptions:be(F()).default([]),usage:be(re({model:F(),inputTokens:Ae().int().nonnegative(),outputTokens:Ae().int().nonnegative()}))}),QT=re({jobId:F()}),GT=yt(["questions","drafting","judging","compositions","writing","done","failed"]),KT=re({jobId:F(),stage:GT,round:Ae().int().min(1).max(3).optional(),attempt:Ae().int().min(1).max(4).optional(),composition:re({done:Ae().int().nonnegative(),total:Ae().int().nonnegative()}).optional(),elapsedMs:Ae().int().nonnegative(),budgetMs:Ae().int().positive(),questions:be($T).min(3).max(5).optional(),result:HT.optional(),error:Td.optional()}),v0=yt(["green","red","pending","none"]),YT=re({specId:it,branch:F(),pullRequest:re({number:Ae().int().positive(),url:F(),headSha:F(),title:F()}).nullable(),specStatus:yt(["draft","validated","implemented","unreadable","absent"]),checks:v0,checkRuns:be(re({name:F(),conclusion:F().nullable()})),mergeable:At().nullable(),requiredRole:yt(["approver","operator"]),canMerge:At(),blockers:be(F()),labels:be(F()).default([]),needsOperator:At().default(!1)}),FT=re({pullRequests:be(re({specId:it,number:Ae().int().positive(),url:F(),checks:v0,needsOperator:At().default(!1)}))}),VT=re({specId:it,pullRequestNumber:Ae().int().positive(),mergeSha:F(),mergedBy:F(),mergedAt:F()}),Ad=yt(["development","staging","production"]),b0=yt(["staging","production"]);re({environment:b0});const x0=re({environments:be(re({name:Ad,ref:F(),sha:F().nullable(),deployment:re({id:Ae().int(),state:F().nullable(),createdAt:F()}).nullable()})),releases:be(F())});re({environment:Ad});const PT=yt(["deployed","forward","backward","unreachable"]),XT=re({sha:F(),title:F(),specId:it.nullable(),author:F(),authoredAt:F(),releaseTag:F().nullable(),reach:PT,why:F()}),JT=re({environment:Ad,ref:F(),deployedSha:F().nullable(),commits:be(XT).max(30)});re({sha:F().regex(/^[0-9a-f]{40}$/),rollback:At().optional(),reason:F().min(10).max(2e3).optional()});const IT=re({environment:b0,fromSha:F().nullable(),toSha:F(),actor:F(),at:F(),deploymentId:Ae().int(),releaseTag:F().nullable(),includedPullRequests:be(re({number:Ae().int(),specId:F().nullable(),message:F(),authoredAt:F()})),destructiveMigration:At(),rollback:At()});re({month:F().regex(/^\d{4}-\d{2}$/).optional()});const WT=re({month:F(),specs:be(re({specId:F(),pullRequestNumber:Ae().int(),runs:Ae().int(),inputTokens:Ae().int(),outputTokens:Ae().int(),estimatedUsd:Ae(),uncostedModels:be(F())})),totals:re({runs:Ae().int(),inputTokens:Ae().int(),outputTokens:Ae().int(),estimatedUsd:Ae()}),budgetUsd:Ae().nullable(),budgetRatio:Ae().nullable(),warning:At()}),fv=re({state:F(),path:F(),sizeBytes:Ae().int().nonnegative()}),eN=re({specId:it,previews:be(fv),composition:F().nullable().default(null),compositions:be(re({name:F(),selected:At(),previews:be(fv)})).default([])}),tN=re({specId:it,composition:F(),alreadySelected:At()});function Rd(){return en({queryKey:["specs"],queryFn:()=>rt("/api/specs",DT)})}function nN(t){return en({queryKey:["specs",t],queryFn:()=>rt(`/api/specs/${t}`,kT)})}function iN(){return en({queryKey:["manifest"],queryFn:()=>rt("/api/manifest",ZT)})}function aN(t){const i=ia();return os({mutationFn:s=>rt(`/api/specs/${t}`,UT,{method:"PUT",...Or(s)}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}function sN(){const t=ia();return os({mutationFn:i=>rt("/api/specs",LT,{method:"POST",...Or(i)}),onSuccess:async()=>{await t.invalidateQueries({queryKey:["specs"]})}})}const rN=re({email:F(),displayName:F(),role:F(),host:re({environments:At(),mergePolicy:F()}).optional()});function lN(t){return t===void 0||t.pullRequest===null?!1:t.checks==="pending"||t.checks==="none"||t.mergeable===null?1e4:!1}function oN(t,i){const s=t?.environments.find(r=>r.name==="development");return s!==void 0&&s.sha===i&&s.deployment?.state==="success"?!1:1e4}function jr(){return en({queryKey:["me"],queryFn:()=>rt("/api/auth/me",rN),retry:!1})}function uN(){return os({mutationFn:t=>rt("/api/briefs",QT,{method:"POST",...Or(t)})})}function cN(t){return t===void 0?1e3:t.stage==="done"||t.stage==="failed"||t.stage==="questions"?!1:1e3}function fN(t){return en({queryKey:["briefs",t],queryFn:()=>rt(`/api/briefs/${t??""}`,KT),enabled:t!==null,retry:!1,refetchInterval:i=>cN(i.state.data)})}function dN(t){return en({queryKey:["specs",t,"pull-request"],queryFn:()=>rt(`/api/specs/${t}/pull-request`,YT),retry:!1,refetchInterval:i=>lN(i.state.data)})}function hN(t){return en({queryKey:["pull-requests"],queryFn:()=>rt("/api/pull-requests",FT),enabled:t,retry:!1})}function mN(t){const i=ia();return os({mutationFn:()=>rt(`/api/specs/${t}/merge`,VT,{method:"POST"}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}function pN(t,i){if(i===null)return!1;const s=t?.environments.find(r=>r.name===i.environment);return s!==void 0&&s.sha===i.sha&&s.deployment?.state==="success"?!1:1e4}function gN(t=!0,i=null){return en({queryKey:["environments"],queryFn:()=>rt("/api/environments",x0),retry:!1,enabled:t,refetchInterval:s=>pN(s.state.data,i)})}function dv(t,i=!0){return en({queryKey:["environments",t,"commits"],queryFn:()=>rt(`/api/environments/${t??""}/commits`,JT),retry:!1,enabled:i&&t!==null})}function yN(t,i){return en({queryKey:["environments"],queryFn:()=>rt("/api/environments",x0),retry:!1,enabled:i,refetchInterval:s=>oN(s.state.data,t)})}function vN(){const t=ia();return os({mutationFn:i=>{const{environment:s,...r}=i;return rt(`/api/environments/${s}/promotions`,IT,{method:"POST",...Or(r)})},onSuccess:async()=>{await t.invalidateQueries({queryKey:["environments"]})}})}function bN(t){return en({queryKey:["consumption",t],queryFn:()=>rt(`/api/consumption?month=${t}`,WT),retry:!1})}function xN(t){return en({queryKey:["specs",t,"previews"],queryFn:()=>rt(`/api/specs/${t}/previews`,eN),retry:!1})}function SN(t){const i=ia();return os({mutationFn:s=>rt(`/api/specs/${t}/compositions/${s}/select`,tN,{method:"POST"}),onSuccess:async()=>{await i.invalidateQueries({queryKey:["specs"]})}})}const _N={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 ut({voice:t="secondary",size:i="md",className:s="",type:r="button",children:o,...c}){const d=i==="sm"?"px-2.5 py-1 text-xs":"px-3.5 py-2 text-sm";return 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} ${_N[t]} ${s}`,...c,children:o})}const wN={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 Ge({tone:t="neutral",mono:i=!1,children:s,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 ${i?"font-mono":""} ${wN[t]}`,children:s})}function S0({status:t}){const i=t==="validated"?"accent":t==="implemented"?"positive":"neutral";return g.jsx(Ge,{tone:i,children:t})}function _0({title:t,hint:i,action:s}){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}),i!==void 0&&g.jsx("p",{className:"max-w-md text-sm text-text-muted",children:i}),s]})}function EN(t){return t instanceof qo?t.payload:null}function gt({error:t}){const i=EN(t);if(i===null){const s=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:s})}return g.jsx(Cd,{error:i})}function Cd({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 ON=wv();function w0({open:t,title:i,children:s,onClose:r}){return W.useEffect(()=>{if(!t)return;const o=c=>{c.key==="Escape"&&r()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[t,r]),t?ON.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":i,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:i}),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:s})]})}),document.body):null}function rs({eyebrow:t,title:i,explanation:s,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:i}),s!==void 0&&g.jsx("p",{className:"mt-1 max-w-2xl text-sm text-text-muted",children:s})]}),r!==void 0&&g.jsx("div",{className:"flex shrink-0 flex-wrap items-center gap-2",children:r})]})}function on({children:t,className:i="",...s}){return g.jsx("section",{className:`rounded-lg border border-border bg-surface-raised p-4 shadow-raised ${i}`,...s,children:t})}const jN=[{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"}],zN={P0:"danger",P1:"accent",P2:"neutral"},TN={green:"positive",red:"danger",pending:"warning",none:"neutral"},NN={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"};function hv(t){return!("error"in t)}function AN(t){return t instanceof HTMLElement&&(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.tagName==="SELECT"||t.isContentEditable)}function RN(){const{data:t,isPending:i,error:s}=Rd(),r=jr(),o=hN(r.data!==void 0),[c,d]=W.useState(""),[h,m]=W.useState(!1),p=W.useRef(null);if(W.useEffect(()=>{const E=z=>{z.metaKey||z.ctrlKey||z.altKey||AN(z.target)||(z.key==="/"?(z.preventDefault(),p.current?.focus()):z.key==="n"&&(z.preventDefault(),m(!0)))};return window.addEventListener("keydown",E),()=>window.removeEventListener("keydown",E)},[]),s)return g.jsx(gt,{error:s});if(i)return g.jsx(DN,{});const b=t.specs.filter(hv),v=t.specs.filter(E=>!hv(E));if(t.specs.length===0)return g.jsx(_0,{title:"Aucune spec dans ce repo",hint:"Créez la première depuis le template canonique — elle naîtra en draft.",action:g.jsx(mv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})});const x=c.trim().toLowerCase(),S=E=>x===""||E.id.includes(x)||E.depends_on.some(z=>z.includes(x)),w=new Map((o.data?.pullRequests??[]).map(E=>[E.specId,E]));return g.jsxs("div",{className:"space-y-6",children:[g.jsx(rs,{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:p,type:"search",value:c,onChange:E=>d(E.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(mv,{open:h,onOpen:()=>m(!0),onClose:()=>m(!1)})]})}),v.length>0&&g.jsx("section",{"aria-label":"Specs illisibles",className:"space-y-2",children:v.map(E=>g.jsx(Cd,{error:E.error},E.filePath))}),g.jsx("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-3",children:jN.map(E=>g.jsx(CN,{column:E,specs:b.filter(z=>z.status===E.status&&S(z)),pullsBySpec:w},E.status))})]})}function CN({column:t,specs:i,pullsBySpec:s}){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(Qn,{value:i.length,className:"font-mono text-xs text-text-faint"})]}),i.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:i.map((r,o)=>g.jsx("li",{className:"studio-reveal",style:{"--i":o},children:g.jsx(MN,{summary:r,pull:s.get(r.id)})},r.id))})]})}function MN({summary:t,pull:i}){const s=new Set(t.presentSections);return g.jsxs(us,{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(Ge,{tone:zN[t.priority]??"neutral",children:t.priority})]}),g.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[g.jsx("ul",{"aria-label":`${s.size} sections sur ${Wa.length}`,className:"flex flex-1 gap-0.5",children:Wa.map(r=>g.jsx("li",{title:r,className:`h-1 flex-1 rounded-full ${s.has(r)?"bg-accent":"bg-border"}`},r))}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[s.size,"/",Wa.length]})]}),(t.depends_on.length>0||i!==void 0)&&g.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[i!==void 0&&g.jsxs(Ge,{tone:i.needsOperator?"orichalcum":TN[i.checks]??"neutral",mono:!0,title:i.needsOperator?"en attente de l'opérateur (needs-operator)":NN[i.checks]??i.checks,children:["#",i.number,i.needsOperator&&g.jsx("span",{"aria-hidden":"true",children:" ⚑"})]}),t.depends_on.map(r=>g.jsxs(Ge,{mono:!0,title:`dépend de ${r}`,children:["← ",r]},r))]})]})}function DN(){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 mv({open:t,onOpen:i,onClose:s}){const[r,o]=W.useState(""),c=Co(),d=sN(),h=()=>{d.mutate({id:r},{onSuccess:async m=>{s(),await c({to:"/specs/$specId",params:{specId:m.spec.id}})}})};return g.jsxs(g.Fragment,{children:[g.jsx(ut,{voice:"primary",onClick:()=>{d.reset(),o(""),i()},children:"Nouvelle spec"}),g.jsx(w0,{open:t,title:"Nouvelle spec depuis le template",onClose:s,children:g.jsxs("form",{onSubmit:m=>{m.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:m=>o(m.target.value),placeholder:"ma-nouvelle-feature",autoFocus:!0,className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 font-mono text-sm text-text focus:border-accent"})]}),d.error instanceof qo&&g.jsx(gt,{error:d.error}),g.jsxs("div",{className:"flex justify-end gap-2",children:[g.jsx(ut,{voice:"ghost",onClick:s,children:"Annuler"}),g.jsx(ut,{voice:"primary",type:"submit",disabled:d.isPending||r==="",children:"Créer en draft"})]})]})})]})}function kN(t){const i=`
|
|
68
|
-
${t}`,s=[];let r=0;for(const o of Wa){const c=i.indexOf(`
|
|
69
|
-
${o}`,r);c!==-1&&(s.push(o),r=c+o.length)}return s}const UN={green:"CI verte",red:"CI rouge",pending:"CI en cours",none:"aucun check"},LN={green:"positive",red:"danger",pending:"warning",none:"neutral"},ZN=new Set(["pending","queued","in_progress","expected","waiting","requested"]),qN=new Set(["success","neutral"]);function BN(t){return t===null||ZN.has(t)?{label:"en cours",tone:"warning",live:!0}:qN.has(t)?{label:"vert",tone:"positive",live:!1}:t==="skipped"?{label:"sauté",tone:"neutral",live:!1}:{label:"rouge",tone:"danger",live:!1}}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 $N({pullRequestNumber:t,mergeSha:i,environmentsConfigured:s}){const r=yN(i,s),o=r.data?.environments.find(v=>v.name==="development"),c=o!==void 0&&o.sha===i,d=c&&o.deployment?.state==="success",h=c&&o.deployment!==null&&o.deployment!==void 0&&["failure","error"].includes(o.deployment.state??""),m=s&&!d&&!h&&r.error==null,p=s?r.error!=null?"Le suivi des environnements n'a pas répondu ; la fusion est faite.":d?`Déployée en development (${i.slice(0,7)}).`:h?`Le déploiement development a échoué sur ${i.slice(0,7)} : voir le workflow du produit.`:c?o.deployment===null||o.deployment===void 0?`La branche par défaut est sur ${i.slice(0,7)} ; en attente du déploiement development que le produit rapporte…`:`Déploiement development en cours (${o.deployment.state??"en attente"})…`:"Le développement suit : la branche par défaut reçoit le commit…":"Cet hôte ne suit pas de déploiement : pas de bloc environments.",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:[m&&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:p})]})})}function HN({specId:t,role:i}){const s=dN(t),r=mN(t),o=jr();if(s.error)return g.jsx(gt,{error:s.error});if(s.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=s.data;if(r.isSuccess)return g.jsx($N,{pullRequestNumber:r.data.pullRequestNumber,mergeSha:r.data.mergeSha,environmentsConfigured:o.data?.host?.environments!==!1});const d=c.canMerge&&gv(i,c.requiredRole),h=c.pullRequest!==null&&(c.checks==="pending"||c.checks==="none"||c.mergeable===null);return g.jsxs(on,{"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(Ge,{tone:LN[c.checks]??"neutral",children:UN[c.checks]??c.checks}),h&&g.jsx(E0,{label:"la CI tourne, relue toutes les dix secondes"}),g.jsx(S0,{status:c.specStatus}),c.needsOperator&&g.jsx(Ge,{tone:"orichalcum",children:"en attente de l'opérateur"})]})]}),g.jsx(ut,{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:c.checkRuns.map(m=>{const p=BN(m.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:m.name}),g.jsx(Ge,{tone:p.tone,children:p.label})]},m.name)})}),c.blockers.length>0&&g.jsx("ul",{className:"mt-3 space-y-1 text-text-muted",children:c.blockers.map(m=>g.jsxs("li",{className:"flex gap-2",children:[g.jsx("span",{"aria-hidden":"true",className:"text-warning",children:"●"}),m]},m))}),c.pullRequest!==null&&!gv(i,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(gt,{error:r.error})})]})}const pv={reader:0,author:1,approver:2,operator:3};function gv(t,i){return(pv[t]??-1)>=(pv[i]??99)}const QN={empty:"Vide",loading:"Chargement",nominal:"Nominal",error:"Erreur"};function GN({specId:t}){const i=xN(t),s=SN(t),[r,o]=W.useState(null),[c,d]=W.useState(null);if(i.error)return g.jsx(gt,{error:i.error});if(i.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=i.data.compositions,m=i.data.composition,p=h.length>0?h.find(S=>S.name===c)??h.find(S=>S.selected)??h[0]??null:null,b=p===null?i.data.previews:p.previews;if(b.length===0&&p===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=p===null?`/api/specs/${t}/previews/${v}`:`/api/specs/${t}/previews/${p.name}/${v}`;return g.jsxs(on,{"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":p?.name===S.name,onClick:()=>d(S.name),className:`rounded-full border px-3 py-1 font-mono text-xs transition-colors ${p?.name===S.name?"border-accent bg-accent-soft text-accent":"border-border text-text-muted hover:text-text"}`,children:S.name},S.name))}),p!==null&&p.name===m&&g.jsx(Ge,{tone:"positive",children:"retenue"}),p!==null&&p.name!==m&&g.jsx(ut,{voice:"primary",size:"sm",disabled:s.isPending,onClick:()=>s.mutate(p.name),children:s.isPending?"Sélection…":"Retenir cette composition"})]}),s.error!=null&&g.jsx("div",{className:"mb-3",children:g.jsx(gt,{error:s.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:QN[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 O0(t){return t instanceof p0?O0(t.def.innerType):t}function KN(){const t=fs.shape;return Object.keys(t).map(i=>{const s=O0(t[i]);if(s instanceof To)return{name:i,kind:"enum",options:s.options.map(r=>String(r)),readOnly:!1};if(s instanceof d0)return{name:i,kind:"string-array",readOnly:!1};if(s instanceof u0)return{name:i,kind:"text",readOnly:i==="id"};throw new Error(`deriveFrontmatterFields: unsupported schema for "${String(i)}" — extend the derivation, never hand-describe the form`)})}function yv(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 jf(t){return t.split(`
|
|
73
|
-
`).map(i=>i.trim()).filter(i=>i!=="")}function YN(t){return{id:t.id,status:t.status,depends_on:jf(t.depends_on),priority:t.priority,refs:jf(t.refs),deferred:jf(t.deferred)}}function FN(t){const i=[],s=t.split(`
|
|
74
|
-
`);let r=0;for(;r<s.length;){const c=(s[r]??"").trim();if(c===""){r+=1;continue}const d=/^(#{1,6})\s+(.*)$/.exec(c);if(d!==null){i.push({kind:"heading",level:(d[1]??"#").length,text:d[2]??""}),r+=1;continue}if(c.startsWith("```")){const m=[];for(r+=1;r<s.length&&!(s[r]??"").trim().startsWith("```");)m.push(s[r]??""),r+=1;r+=1,i.push({kind:"code",text:m.join(`
|
|
75
|
-
`)});continue}if(c.startsWith("- ")){const m=[];for(;r<s.length;){const p=(s[r]??"").trim();if(p.startsWith("- "))m.push(p.slice(2)),r+=1;else if(p!==""&&!p.startsWith("#"))m[m.length-1]=`${m[m.length-1]??""} ${p}`,r+=1;else break}i.push({kind:"bullet",items:m});continue}const h=[];for(;r<s.length;){const m=(s[r]??"").trim();if(m===""||m.startsWith("#")||m.startsWith("- ")||m.startsWith("```"))break;h.push(m),r+=1}i.push({kind:"paragraph",text:h.join(" ")})}return i}const VN=6,PN={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 XN({markdown:t}){const i=FN(t);return i.length===0?g.jsx("p",{className:"text-sm text-text-faint",children:"Rien à prévisualiser encore."}):g.jsx("div",{className:"space-y-2",children:i.map((s,r)=>{if(s.kind==="heading")return g.jsx("p",{className:PN[Math.min(s.level,2)],children:s.text},r);if(s.kind==="bullet")return g.jsx("ul",{className:"list-disc space-y-1 pl-5 text-sm text-text-muted marker:text-accent",children:s.items.map((o,c)=>g.jsx("li",{children:o},c))},r);if(s.kind==="code"){const o=s.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:s.text});return o.length<VN?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:s.text},r)})})}const io="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 JN({specId:t}){const{data:i,isPending:s,error:r}=nN(t);return r?g.jsxs("div",{className:"space-y-3",children:[g.jsx(j0,{}),g.jsx(gt,{error:r})]}):s?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(IN,{specId:t,initialFrontmatter:i.frontmatter,initialBody:i.body},t)}function j0(){return g.jsx(us,{to:"/",className:"inline-flex items-center gap-1 text-sm text-text-muted transition-colors hover:text-accent",children:"← Retour au board"})}function IN({specId:t,initialFrontmatter:i,initialBody:s}){const r=KN(),[o,c]=W.useState(()=>yv(i)),[d,h]=W.useState(()=>({form:yv(i),body:s})),[m,p]=W.useState(s),[b,v]=W.useState(null),[x,S]=W.useState(!1),[w,E]=W.useState(!1),z=aN(t),A=jr(),U=m!==d.body||JSON.stringify(o)!==JSON.stringify(d.form),H=new Set(kN(m)),V=(P,te)=>{c(le=>({...le,[P]:te}))},J=()=>{const P=fs.safeParse(YN(o));return P.success?(v(null),P.data):(v(P.error.issues.map(te=>`${te.path.join(".")}: ${te.message}`).join(" ; ")),null)},L=()=>{const P=J();P!==null&&z.mutate({frontmatter:P,body:m},{onSuccess:()=>h({form:o,body:m})})},R=()=>{const P=J();if(P===null){S(!1);return}const te={...o,status:"validated"};z.mutate({frontmatter:{...P,status:"validated"},body:m},{onSuccess:()=>{c(te),h({form:te,body:m})},onSettled:()=>S(!1)})};W.useEffect(()=>{const P=te=>{(te.metaKey||te.ctrlKey)&&te.key.toLowerCase()==="s"&&(te.preventDefault(),L())};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)});const X=AT(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(j0,{}),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(S0,{status:o.status}),U&&g.jsx(Ge,{tone:"orichalcum",children:"Modifications non enregistrées"})]}),g.jsxs("div",{className:"flex gap-2",children:[g.jsx(ut,{onClick:L,disabled:z.isPending,title:"⌘S / Ctrl+S",children:"Enregistrer"}),o.status==="draft"&&g.jsx(ut,{voice:"primary",onClick:()=>S(!0),disabled:z.isPending,children:"Valider"})]})]})]}),X.length>0&&g.jsxs(on,{"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:X.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."})]}),A.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":0},children:g.jsx(GN,{specId:t})}),A.data!==void 0&&g.jsx("div",{className:"studio-reveal",style:{"--i":1},children:g.jsx(HN,{specId:t,role:A.data.role})}),b!==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 : ",b]}),z.error!=null&&g.jsx(gt,{error:z.error}),z.isSuccess&&z.error==null&&!U&&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 : ",z.data.spec.status,"."]}),g.jsxs("ol",{"aria-label":"Sections canoniques",className:"studio-reveal flex flex-wrap gap-2",style:{"--i":2},children:[Wa.map((P,te)=>{const le=P.replace(/^# /u,"");return g.jsx("li",{children:g.jsx(Ge,{tone:H.has(P)?"accent":"neutral",title:H.has(P)?"section présente":"section absente ou hors ordre",children:`${te+1} · ${le}`})},P)}),g.jsxs("li",{className:"self-center font-mono text-xs text-text-faint",children:[g.jsx(Qn,{value:H.size}),"/",Wa.length," présentes, dans l'ordre du gate"]})]}),g.jsxs(on,{"aria-label":"Frontmatter",className:"studio-reveal",style:{"--i":3},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:r.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:o[P.name],onChange:te=>V(P.name,te.target.value),className:io,children:(P.options??[]).map(te=>g.jsx("option",{value:te,children:te},te))}):P.kind==="string-array"?g.jsx("textarea",{value:o[P.name],onChange:te=>V(P.name,te.target.value),rows:2,placeholder:"un élément par ligne",className:`${io} font-mono text-xs`}):g.jsx("input",{value:o[P.name],readOnly:P.readOnly,onChange:te=>V(P.name,te.target.value),className:`${io} 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 ${w?"lg:grid-cols-2":""}`,style:{"--i":4},children:[w?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(ut,{voice:"ghost",size:"sm",onClick:()=>E(!1),children:"Replier l'éditeur"})]}),g.jsx("textarea",{"aria-label":"sections (markdown)",value:m,onChange:P=>p(P.target.value),rows:28,spellCheck:!1,className:`${io} 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(Qn,{value:m.split(`
|
|
77
|
-
`).length})," lignes · ",g.jsx(Qn,{value:m.trim()===""?0:m.trim().split(/\s+/u).length})," mots"]})]}):g.jsxs("button",{type:"button",onClick:()=>E(!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(XN,{markdown:m})})]})]}),g.jsxs(w0,{open:x,title:`Valider ${t} ?`,onClose:()=>S(!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(ut,{voice:"ghost",onClick:()=>S(!1),children:"Annuler"}),g.jsx(ut,{voice:"primary",onClick:R,disabled:z.isPending,children:"Confirmer la validation"})]})]})]})}const WN={skeleton:"neutral","in-progress":"warning",delivered:"positive"},eA={GET:"accent",POST:"positive",PUT:"warning",PATCH:"warning",DELETE:"danger"};function tA(){const{data:t,isPending:i,error:s}=iN();if(s)return g.jsx(gt,{error:s});if(i)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(rs,{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(Qn,{value:d.value})})]},d.label))}),g.jsxs(on,{"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(Ge,{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(on,{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(Ge,{tone:WN[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(Ge,{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(Ge,{tone:eA[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 nA=re({accepted:vi(!0)});function vv({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(yb,{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})]})}function iA(){const[t,i]=W.useState(""),[s,r]=W.useState({kind:"idle"});async function o(c){c.preventDefault(),r({kind:"sending"});try{await rt("/api/auth/magic-link",nA,{method:"POST",...Or({email:t})}),r({kind:"sent"})}catch(d){r({kind:"error",error:d})}}return s.kind==="sent"?g.jsx(vv,{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."})]})}):g.jsx(vv,{children:g.jsxs("form",{onSubmit:o,className:"studio-reveal",children:[g.jsx("h1",{className:"font-display text-2xl font-semibold text-text",children:"Connexion"}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:"Un lien de connexion vous sera envoyé par courriel."}),g.jsx("label",{className:"mt-5 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:!0,value:t,onChange:c=>i(c.target.value),className:"mt-1 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent"}),s.kind==="error"&&g.jsx("div",{className:"mt-3",children:g.jsx(gt,{error:s.error})}),g.jsx(ut,{voice:"primary",type:"submit",disabled:s.kind==="sending",className:"mt-5 w-full",children:s.kind==="sending"?"Envoi…":"Recevoir un lien"})]})})}const ao=50,aA=["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."],sA=[{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"}],zf="w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",Tf=3,rA=6,bv=t=>`${Math.floor(t/1e3)} s`;function lA(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 xv({job:t}){const i=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"}),lA(t)]}),g.jsxs("span",{className:"font-mono text-xs tabular-nums text-text-muted",children:[bv(t.elapsedMs)," / ",bv(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 ${i>=1?"bg-warning":"bg-accent"} transition-[width] duration-(--duration-base)`,style:{width:`${Math.round(i*100)}%`}})}),i>=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 Nf=[".md",".markdown",".txt",".csv",".json",".html",".htm",".xlsx",".pdf"],oA=5,uA=4*1024*1024,Sv=t=>t<1024?`${t} o`:t<1024*1024?`${Math.round(t/1024)} Ko`:`${(t/(1024*1024)).toFixed(1)} Mo`;async function cA(t){const i=new Uint8Array(await t.arrayBuffer());let s="";for(let r=0;r<i.length;r+=32768)s+=String.fromCharCode(...i.subarray(r,r+32768));return btoa(s)}function fA(){const[t,i]=W.useState(""),[s,r]=W.useState(""),[o,c]=W.useState(!1),[d,h]=W.useState([]),[m,p]=W.useState(null),[b,v]=W.useState(null),[x,S]=W.useState([]),[w,E]=W.useState({}),z=Co(),A=uN(),U=fN(b),H=Rd(),V=t.trim().length,J=U.data?.stage==="done"?U.data.result?.specId:void 0;W.useEffect(()=>{J!==void 0&&z({to:"/specs/$specId",params:{specId:J}})},[J,z]);const L=U.data?.stage==="questions"?U.data:null,R=U.data!==void 0&&U.data.stage!=="done"&&U.data.stage!=="failed"&&U.data.stage!=="questions",X=A.isPending||R||b!==null&&U.isPending,P=U.error instanceof qo&&U.error.payload.code==="BRIEF_JOB_LOST",te=x.flatMap(B=>Object.entries(B.answers).map(([ie,fe])=>({questionId:ie,answer:fe}))),le=s.trim().toLowerCase(),se=le===""||!o?[]:(H.data?.specs??[]).filter(B=>"status"in B).filter(B=>B.id!==le&&(B.id.includes(le)||B.intent.toLowerCase().includes(le))).slice(0,rA);function he(B){A.mutate({brief:t,...s.trim()===""?{}:{specId:s.trim()},...d.length===0?{}:{attachments:d.map(ie=>({name:ie.name,contentBase64:ie.contentBase64}))},...B.answers.length===0?{}:{answers:B.answers},...B.round===1?{}:{round:B.round},...B.skipQuestions?{skipQuestions:!0}:{}},{onSuccess:ie=>v(ie.jobId)})}function ge(){if(L===null)return;const B=L.round??x.length+1,ie=[...x,{round:B,questions:L.questions??[],answers:w}];S(ie),E({}),v(null),he({answers:ie.flatMap(fe=>Object.entries(fe.answers).map(([j,q])=>({questionId:j,answer:q}))),round:Math.min(B+1,Tf+1),skipQuestions:!1})}function Y(){const B=L?.round??x.length+1;v(null),he({answers:te,round:B,skipQuestions:!0})}async function M(B){const ie=Array.from(B.target.files??[]);B.target.value="",p(null);const fe=[...d];for(const j of ie){const q=j.name.toLowerCase();if(!Nf.some(ee=>q.endsWith(ee))){p(`« ${j.name} » : format non retenu — ${Nf.join(", ")}.`);continue}if(j.size>uA){p(`« ${j.name} » : ${Sv(j.size)}, au-delà de 4 Mo par pièce.`);continue}if(fe.length>=oA){p(`Cinq pièces au plus : « ${j.name} » n'est pas jointe.`);break}fe.some(ee=>ee.name===j.name)||fe.push({name:j.name,size:j.size,contentBase64:await cA(j)})}h(fe)}function I(B){B.preventDefault(),S([]),E({}),v(null),he({answers:[],round:1,skipQuestions:!1})}return g.jsxs("form",{onSubmit:I,className:"space-y-6",children:[g.jsx(rs,{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:sA.map((B,ie)=>g.jsxs("li",{className:"studio-reveal rounded-lg border border-border bg-surface-raised p-4 shadow-raised",style:{"--i":ie},children:[g.jsxs("p",{className:"font-mono text-xs text-accent",children:["0",ie+1]}),g.jsx("p",{className:"mt-1 font-display text-lg font-semibold text-text",children:B.title}),g.jsx("p",{className:"mt-1 text-sm text-text-muted",children:B.detail})]},B.title))}),g.jsxs(on,{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:B=>i(B.target.value),placeholder:"Je veux une rubrique qui…",className:`${zf} 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:aA.map(B=>g.jsx("li",{children:g.jsxs(ut,{voice:"ghost",size:"sm",onClick:()=>i(B),className:"max-w-md text-left whitespace-normal",children:["« ",B," »"]})},B))}),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:s,onChange:B=>r(B.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":se.length>0,className:`${zf} mt-1 font-mono`}),se.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:se.map(B=>g.jsx("li",{children:g.jsxs("button",{type:"button",role:"option","aria-selected":!1,onMouseDown:ie=>ie.preventDefault(),onClick:()=>{r(B.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:B.id}),g.jsx("span",{className:"truncate text-xs text-text-muted",children:B.intent})]})},B.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:Nf.join(","),onChange:B=>{M(B)},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é."}),m!==null&&g.jsx("p",{role:"alert",className:"mt-2 text-xs text-danger",children:m}),d.length>0&&g.jsx("ul",{"aria-label":"Pièces jointes au brief",className:"mt-2 space-y-1",children:d.map(B=>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:B.name}),g.jsxs("span",{className:"flex items-center gap-3",children:[g.jsx("span",{className:"font-mono text-xs text-text-faint",children:Sv(B.size)}),g.jsx(ut,{voice:"ghost",size:"sm",onClick:()=>h(d.filter(ie=>ie.name!==B.name)),"aria-label":`Retirer ${B.name}`,children:"Retirer"})]})]},B.name))})]}),x.map(B=>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 ",B.round," sur ",Tf," — répondue"]}),g.jsx("dl",{className:"mt-2 space-y-1 text-text-muted",children:B.questions.map(ie=>g.jsxs("div",{className:"flex flex-wrap gap-2",children:[g.jsx("dt",{children:ie.text}),g.jsx("dd",{className:"text-text",children:B.answers[ie.id]??"(sans réponse)"})]},ie.id))})]},B.round)),L!==null&&g.jsxs(on,{"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 ",L.round??x.length+1," sur ",Tf]})]}),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:(L.questions??[]).map((B,ie)=>g.jsx("li",{children:g.jsxs("fieldset",{children:[g.jsxs("legend",{className:"font-medium text-text",children:[ie+1,". ",B.text]}),g.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:B.options.map(fe=>g.jsxs("label",{className:`cursor-pointer rounded-md border px-3 py-1.5 transition-colors ${w[B.id]===fe?"border-accent bg-accent-soft text-text":"border-border text-text-muted hover:border-border-strong"}`,children:[g.jsx("input",{type:"radio",name:`question-${B.id}`,value:fe,checked:w[B.id]===fe,onChange:()=>E({...w,[B.id]:fe}),className:"sr-only"}),fe]},fe))}),g.jsx("input",{"aria-label":`Autre réponse — ${B.text}`,placeholder:"ou une réponse libre",value:B.options.includes(w[B.id]??"")?"":w[B.id]??"",onChange:fe=>E({...w,[B.id]:fe.target.value}),className:`${zf} mt-2`})]})},B.id))}),g.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[g.jsx(ut,{voice:"primary",onClick:ge,disabled:A.isPending||Object.values(w).every(B=>B.trim()===""),children:"Répondre"}),g.jsx(ut,{voice:"ghost",onClick:Y,disabled:A.isPending,children:"Passer les questions"})]})]}),R&&U.data!==void 0&&g.jsx(xv,{job:U.data}),A.isPending&&b===null&&g.jsx(xv,{job:{jobId:"",stage:"drafting",attempt:1,elapsedMs:0,budgetMs:9e4}}),P&&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."}),!P&&U.error!=null&&g.jsx(gt,{error:U.error}),U.data?.stage==="failed"&&U.data.error!==void 0&&g.jsx(Cd,{error:U.data.error}),A.error!=null&&g.jsx(gt,{error:A.error}),g.jsx(ut,{voice:"primary",type:"submit",disabled:X||L!==null||V<ao,children:x.length>0||L!==null?"Recommencer le brief":"Rédiger la spec"})]})}const dA=["development","staging","production"],pn={development:"Développement",staging:"Préproduction",production:"Production"},hA={staging:"development",production:"staging"},mA={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"},pA="mt-2 w-full rounded-md border border-border bg-surface px-3 py-2 text-sm text-text transition-colors focus:border-accent",gA=10,Af=t=>t.slice(0,10);function yA({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 vA(){const t=jr(),i=t.data?.host?.environments!==!1,[s,r]=W.useState("staging"),[o,c]=W.useState(null),[d,h]=W.useState(""),[m,p]=W.useState(null),b=gN(i,m),v=dv("development",i),x=dv(s,i),S=Rd(),w=vN(),E=t.data?.role==="operator";if(!i)return g.jsxs("div",{className:"space-y-6",children:[g.jsx(rs,{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(on,{"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(gt,{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,A=new Map;for(const Y of S.data?.specs??[])"intent"in Y&&Y.intent!==""&&A.set(Y.id,Y.intent);const U=Y=>Y.specId!==null&&A.get(Y.specId)||Y.title,H=v.data?.commits??[],V=Y=>Y===null?-1:H.findIndex(M=>M.sha===Y),J=Y=>z.environments.find(M=>M.name===Y)?.sha??null,L=x.data?.commits??[],R=L.findIndex(Y=>Y.reach==="deployed"),X=o===null?-1:L.findIndex(Y=>Y.sha===o),P=X===-1?null:L[X]??null,te=P?.reach==="forward",le=P===null||R===-1?L.slice(0,Math.max(X,0)):te?L.slice(X,R):L.slice(R,X),se=P!==null&&s!=="development"&&(te||E&&d.trim().length>=gA)&&!w.isPending;function he(Y){r(Y),c(null),h("")}function ge(){if(P===null||s==="development")return;const Y=s,M=P.sha;w.mutate(te?{environment:Y,sha:M}:{environment:Y,sha:M,rollback:!0,reason:d.trim()},{onSuccess:()=>{c(null),h(""),p({environment:Y,sha:M}),x.refetch(),v.refetch()}})}return g.jsxs("div",{className:"space-y-6",children:[g.jsx(rs,{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(gt,{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((Y,M)=>{const I=Y.name,B=hA[I],ie=V(Y.sha),fe=B===void 0||ie===-1?null:Math.max(0,ie-Math.max(V(J(B)),0)),j=ie===-1?null:H[ie]??null,q=m!==null&&m.environment===I&&!(Y.sha===m.sha&&Y.deployment?.state==="success");return g.jsxs("li",{className:"contents",children:[M>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[I],"aria-pressed":s===I,onClick:()=>he(I),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 ${s===I?"border-accent shadow-glow":"border-border"}`,style:{"--i":M},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[I]}),g.jsx("p",{className:"font-mono text-xs text-text-faint",children:Y.ref})]}),q?g.jsxs(Ge,{tone:"accent",children:[g.jsx(yA,{label:`déploiement de ${pn[I].toLowerCase()} en cours`})," déploiement"]}):B===void 0?g.jsxs(Ge,{tone:"accent",children:["tête de ",Y.ref]}):fe===0?g.jsx(Ge,{tone:"positive",children:"à jour"}):fe!==null?g.jsx(Ge,{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:Y.sha===null?"Aucun commit":j===null?"Commit hors de la ligne lue":U(j)}),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:Y.sha===null?"—":Y.sha.slice(0,7)}),j!==null&&g.jsxs(g.Fragment,{children:[g.jsx("span",{children:"·"}),g.jsx("span",{children:j.author}),g.jsx("span",{children:"·"}),g.jsx("span",{children:Af(j.authoredAt)})]}),j?.releaseTag!=null&&g.jsx(Ge,{tone:"orichalcum",children:j.releaseTag})]}),Y.deployment!==null&&g.jsxs("p",{className:"mt-2 flex items-center gap-2 text-xs text-text-muted",children:[g.jsx(Ge,{tone:mA[Y.deployment.state??"pending"]??"neutral",children:Y.deployment.state??"en attente"}),"déployé le ",Af(Y.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:B===void 0?g.jsx(Qn,{value:H.length}):fe===null?"—":g.jsx(Qn,{value:fe})}),g.jsx("span",{className:"font-mono text-xs uppercase tracking-[0.12em] text-text-faint",children:B===void 0?"commits lus":`commit${fe!==null&&fe>1?"s":""} d'avance en ${pn[B].toLowerCase()}`})]})]})]},I)})}),g.jsxs(on,{"aria-label":`Ligne de ${pn[s].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[s]}),g.jsxs("span",{className:"font-mono text-xs text-text-muted",children:[x.data?.ref??""," · ",L.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(gt,{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"}),L.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:L.map((Y,M)=>{const I=Y.reach==="unreachable"||Y.reach==="deployed"||Y.reach==="backward"&&!E||s==="development",B=dA.filter(ie=>J(ie)===Y.sha);return g.jsx("li",{className:"studio-reveal",style:{"--i":M},children:g.jsxs("button",{type:"button",disabled:I,title:Y.why,"aria-current":Y.reach==="deployed",onClick:()=>c(o===Y.sha?null:Y.sha),className:`grid w-full grid-cols-[1.6rem_minmax(0,1fr)_auto] items-center gap-3 rounded-md border px-2 py-2 text-left transition-[background,border-color,transform] duration-(--duration-fast) ${Y.reach==="deployed"?"border-accent/35 bg-accent-soft":o===Y.sha?"border-accent bg-surface-sunken":"border-transparent"} ${I?"cursor-not-allowed opacity-55":"hover:translate-x-0.5 hover:border-border 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[Y.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:U(Y)}),g.jsxs("span",{className:"font-mono text-xs text-text-faint",children:[Y.specId!==null?`${Y.specId} · `:"",Y.sha.slice(0,7)]}),g.jsxs("span",{className:"text-xs text-text-faint",children:[Y.author," · ",Af(Y.authoredAt)]})]}),g.jsxs("span",{className:"flex items-center gap-1.5 justify-self-end",children:[B.map(ie=>g.jsx(Ge,{tone:ie===s?"accent":"neutral",children:pn[ie].toLowerCase()},ie)),Y.releaseTag!==null&&g.jsx(Ge,{tone:"orichalcum",children:Y.releaseTag})]})]})},Y.sha)})}),P!==null&&s!=="development"&&g.jsxs("section",{"aria-label":te?"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:[te?"Promouvoir":"Revenir"," ",pn[s].toLowerCase()," ",te?"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[s]," ",te?"recevrait":"perdrait"," ",g.jsx(Qn,{value:le.length,className:"font-medium text-text"})," commit",le.length>1?"s":"",te?" :":" — 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:le.map(Y=>g.jsxs("li",{children:[g.jsx("span",{className:"text-text",children:U(Y)})," ",g.jsx("span",{className:"font-mono text-xs text-text-faint",children:Y.sha.slice(0,7)})," — ",Y.author]},Y.sha))}),!te&&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:Y=>h(Y.target.value),className:pA})]}),g.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[g.jsx(ut,{voice:te?"primary":"danger",size:"sm",disabled:!se,onClick:ge,children:w.isPending?"Promotion…":te?"Promouvoir":"Revenir, avec ce motif"}),g.jsx(ut,{voice:"ghost",size:"sm",onClick:()=>c(null),children:"Annuler"}),g.jsx("span",{className:"text-xs text-text-faint",children:P.why})]})]}),w.isSuccess&&m!==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}`,"."," ",bA(z,m)?"Le produit n'a pas encore rapporté le déploiement.":"Déployé."]})]}),g.jsxs(on,{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(Y=>g.jsx("li",{children:g.jsx(Ge,{tone:"orichalcum",mono:!0,children:Y})},Y))})]})]})}function bA(t,i){const s=t.environments.find(r=>r.name===i.environment);return!(s!==void 0&&s.sha===i.sha&&s.deployment?.state==="success")}function xA(t){const i=[],s=new Date;for(let r=0;r<t;r+=1){const o=new Date(Date.UTC(s.getUTCFullYear(),s.getUTCMonth()-r,1));i.push(o.toISOString().slice(0,7))}return i}const cr=t=>`${t.toFixed(2)} $`,_v=t=>new Intl.NumberFormat("fr-FR",{notation:"compact",maximumFractionDigits:1}).format(t),gi="px-3 py-2 text-right font-mono tabular-nums";function SA(){const t=xA(6),[i,s]=W.useState(t[0]??""),r=bN(i);return g.jsxs("div",{className:"space-y-6",children:[g.jsx(rs,{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:i,onChange:o=>s(o.target.value),className:"ml-2 rounded-md border border-border bg-surface-raised px-3 py-2 font-mono text-sm text-text",children:t.map(o=>g.jsx("option",{value:o,children:o},o))})]})}),r.error?g.jsx(gt,{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:_v},{label:"jetons sortis",value:r.data.totals.outputTokens,format:_v},{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(Qn,{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(_0,{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:gi,children:o.runs}),g.jsx("td",{className:gi,children:o.inputTokens}),g.jsx("td",{className:gi,children:o.outputTokens}),g.jsxs("td",{className:gi,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:gi,children:r.data.totals.runs}),g.jsx("td",{className:gi,children:r.data.totals.inputTokens}),g.jsx("td",{className:gi,children:r.data.totals.outputTokens}),g.jsx("td",{className:gi,children:cr(r.data.totals.estimatedUsd)})]})]})]})})]})]})}const z0="ogygie-studio-theme";function _A(){try{const t=window.localStorage.getItem(z0);return t==="dark"||t==="light"?t:null}catch{return null}}const wA="dark";function EA(){const[t,i]=W.useState(()=>_A()??wA);W.useEffect(()=>{document.documentElement.setAttribute("data-theme",t)},[t]);const s=W.useCallback(()=>{i(r=>{const o=r==="dark"?"light":"dark";try{window.localStorage.setItem(z0,o)}catch{}return o})},[]);return{theme:t,toggle:s}}const OA="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:i,children:s}){return g.jsxs(us,{to:t,className:OA,activeOptions:{exact:t==="/"},children:[g.jsx("span",{"aria-hidden":"true",className:"w-4 text-center font-mono text-xs text-text-faint",children:i}),s]})}function jA(){const t=jr(),{theme:i,toggle:s}=EA();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(us,{to:"/",className:"mb-6 flex items-center gap-3 px-3",children:[g.jsx(yb,{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:s,"aria-label":i==="dark"?"Passer au thème clair":"Passer au thème sombre",className:"flex w-full items-center justify-between rounded-md border border-border px-3 py-2 text-xs text-text-muted transition-colors hover:border-border-strong hover:text-text",children:[g.jsx("span",{children:i==="dark"?"Abysse":"Marbre"}),g.jsx("span",{"aria-hidden":"true",className:"font-mono",children:i==="dark"?"☾":"☀"})]})]})]})}function zA(){return g.jsxs("div",{className:"flex min-h-screen bg-surface text-text",children:[g.jsx(jA,{}),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(pb,{})})})]})}const Ni=zw({component:zA}),TA=la({getParentRoute:()=>Ni,path:"/",component:RN}),T0=la({getParentRoute:()=>Ni,path:"/specs/$specId",component:function(){const{specId:i}=T0.useParams();return g.jsx(JN,{specId:i})}}),NA=la({getParentRoute:()=>Ni,path:"/manifest",component:tA}),AA=la({getParentRoute:()=>Ni,path:"/login",component:iA}),RA=la({getParentRoute:()=>Ni,path:"/brief",component:fA}),CA=la({getParentRoute:()=>Ni,path:"/promotions",component:vA}),MA=la({getParentRoute:()=>Ni,path:"/consumption",component:SA}),DA=Ni.addChildren([TA,T0,NA,AA,RA,CA,MA]);function kA(t){return Uw({routeTree:DA})}const UA=new k_,LA=kA(),N0=document.getElementById("root");if(N0===null)throw new Error("Studio UI: #root element missing from index.html");o_.createRoot(N0).render(g.jsx(W.StrictMode,{children:g.jsx(u_,{client:UA,children:g.jsx(qw,{router:LA})})}));
|