@electric-agent/studio 1.5.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bridge/claude-md-generator.d.ts +13 -5
- package/dist/bridge/claude-md-generator.d.ts.map +1 -1
- package/dist/bridge/claude-md-generator.js +37 -118
- package/dist/bridge/claude-md-generator.js.map +1 -1
- package/dist/bridge/stream-json-parser.js +12 -5
- package/dist/bridge/stream-json-parser.js.map +1 -1
- package/dist/client/assets/{index-DDzmxYub.js → index-D5-jqAV-.js} +60 -60
- package/dist/client/assets/index-YyyiO26y.css +1 -0
- package/dist/client/index.html +2 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +110 -10
- package/dist/server.js.map +1 -1
- package/dist/sessions.d.ts +6 -0
- package/dist/sessions.d.ts.map +1 -1
- package/dist/sessions.js.map +1 -1
- package/package.json +2 -2
- package/dist/client/assets/index-DcP7prsZ.css +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
function Fx(t,l){for(var a=0;a<l.length;a++){const r=l[a];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function a(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=a(o);fetch(o.href,s)}})();function md(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ff={exports:{}},Tr={};var Hg;function Ix(){if(Hg)return Tr;Hg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function a(r,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var d in o)d!=="key"&&(s[d]=o[d])}else s=o;return o=s.ref,{$$typeof:t,type:r,key:c,ref:o!==void 0?o:null,props:s}}return Tr.Fragment=l,Tr.jsx=a,Tr.jsxs=a,Tr}var qg;function Qx(){return qg||(qg=1,ff.exports=Ix()),ff.exports}var S=Qx(),df={exports:{}},Oe={};var Yg;function Xx(){if(Yg)return Oe;Yg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=b&&L[b]||L["@@iterator"],typeof L=="function"?L:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},A=Object.assign,z={};function C(L,Z,T){this.props=L,this.context=Z,this.refs=z,this.updater=T||E}C.prototype.isReactComponent={},C.prototype.setState=function(L,Z){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,Z,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function j(){}j.prototype=C.prototype;function D(L,Z,T){this.props=L,this.context=Z,this.refs=z,this.updater=T||E}var te=D.prototype=new j;te.constructor=D,A(te,C.prototype),te.isPureReactComponent=!0;var P=Array.isArray;function H(){}var _={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function J(L,Z,T){var ce=T.ref;return{$$typeof:t,type:L,key:Z,ref:ce!==void 0?ce:null,props:T}}function R(L,Z){return J(L.type,Z,L.props)}function V(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function G(L){var Z={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(T){return Z[T]})}var F=/\/+/g;function le(L,Z){return typeof L=="object"&&L!==null&&L.key!=null?G(""+L.key):Z.toString(36)}function I(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(H,H):(L.status="pending",L.then(function(Z){L.status==="pending"&&(L.status="fulfilled",L.value=Z)},function(Z){L.status==="pending"&&(L.status="rejected",L.reason=Z)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function B(L,Z,T,ce,ve){var be=typeof L;(be==="undefined"||be==="boolean")&&(L=null);var De=!1;if(L===null)De=!0;else switch(be){case"bigint":case"string":case"number":De=!0;break;case"object":switch(L.$$typeof){case t:case l:De=!0;break;case y:return De=L._init,B(De(L._payload),Z,T,ce,ve)}}if(De)return ve=ve(L),De=ce===""?"."+le(L,0):ce,P(ve)?(T="",De!=null&&(T=De.replace(F,"$&/")+"/"),B(ve,Z,T,"",function(zt){return zt})):ve!=null&&(V(ve)&&(ve=R(ve,T+(ve.key==null||L&&L.key===ve.key?"":(""+ve.key).replace(F,"$&/")+"/")+De)),Z.push(ve)),1;De=0;var pe=ce===""?".":ce+":";if(P(L))for(var Re=0;Re<L.length;Re++)ce=L[Re],be=pe+le(ce,Re),De+=B(ce,Z,T,be,ve);else if(Re=x(L),typeof Re=="function")for(L=Re.call(L),Re=0;!(ce=L.next()).done;)ce=ce.value,be=pe+le(ce,Re++),De+=B(ce,Z,T,be,ve);else if(be==="object"){if(typeof L.then=="function")return B(I(L),Z,T,ce,ve);throw Z=String(L),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return De}function ee(L,Z,T){if(L==null)return L;var ce=[],ve=0;return B(L,ce,"","",function(be){return Z.call(T,be,ve++)}),ce}function se(L){if(L._status===-1){var Z=L._result;Z=Z(),Z.then(function(T){(L._status===0||L._status===-1)&&(L._status=1,L._result=T)},function(T){(L._status===0||L._status===-1)&&(L._status=2,L._result=T)}),L._status===-1&&(L._status=0,L._result=Z)}if(L._status===1)return L._result.default;throw L._result}var xe=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},N={map:ee,forEach:function(L,Z,T){ee(L,function(){Z.apply(this,arguments)},T)},count:function(L){var Z=0;return ee(L,function(){Z++}),Z},toArray:function(L){return ee(L,function(Z){return Z})||[]},only:function(L){if(!V(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Oe.Activity=g,Oe.Children=N,Oe.Component=C,Oe.Fragment=a,Oe.Profiler=o,Oe.PureComponent=D,Oe.StrictMode=r,Oe.Suspense=p,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(L){return _.H.useMemoCache(L)}},Oe.cache=function(L){return function(){return L.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(L,Z,T){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var ce=A({},L.props),ve=L.key;if(Z!=null)for(be in Z.key!==void 0&&(ve=""+Z.key),Z)!ne.call(Z,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&Z.ref===void 0||(ce[be]=Z[be]);var be=arguments.length-2;if(be===1)ce.children=T;else if(1<be){for(var De=Array(be),pe=0;pe<be;pe++)De[pe]=arguments[pe+2];ce.children=De}return J(L.type,ve,ce)},Oe.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:s,_context:L},L},Oe.createElement=function(L,Z,T){var ce,ve={},be=null;if(Z!=null)for(ce in Z.key!==void 0&&(be=""+Z.key),Z)ne.call(Z,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(ve[ce]=Z[ce]);var De=arguments.length-2;if(De===1)ve.children=T;else if(1<De){for(var pe=Array(De),Re=0;Re<De;Re++)pe[Re]=arguments[Re+2];ve.children=pe}if(L&&L.defaultProps)for(ce in De=L.defaultProps,De)ve[ce]===void 0&&(ve[ce]=De[ce]);return J(L,be,ve)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(L){return{$$typeof:d,render:L}},Oe.isValidElement=V,Oe.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:se}},Oe.memo=function(L,Z){return{$$typeof:m,type:L,compare:Z===void 0?null:Z}},Oe.startTransition=function(L){var Z=_.T,T={};_.T=T;try{var ce=L(),ve=_.S;ve!==null&&ve(T,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(H,xe)}catch(be){xe(be)}finally{Z!==null&&T.types!==null&&(Z.types=T.types),_.T=Z}},Oe.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Oe.use=function(L){return _.H.use(L)},Oe.useActionState=function(L,Z,T){return _.H.useActionState(L,Z,T)},Oe.useCallback=function(L,Z){return _.H.useCallback(L,Z)},Oe.useContext=function(L){return _.H.useContext(L)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(L,Z){return _.H.useDeferredValue(L,Z)},Oe.useEffect=function(L,Z){return _.H.useEffect(L,Z)},Oe.useEffectEvent=function(L){return _.H.useEffectEvent(L)},Oe.useId=function(){return _.H.useId()},Oe.useImperativeHandle=function(L,Z,T){return _.H.useImperativeHandle(L,Z,T)},Oe.useInsertionEffect=function(L,Z){return _.H.useInsertionEffect(L,Z)},Oe.useLayoutEffect=function(L,Z){return _.H.useLayoutEffect(L,Z)},Oe.useMemo=function(L,Z){return _.H.useMemo(L,Z)},Oe.useOptimistic=function(L,Z){return _.H.useOptimistic(L,Z)},Oe.useReducer=function(L,Z,T){return _.H.useReducer(L,Z,T)},Oe.useRef=function(L){return _.H.useRef(L)},Oe.useState=function(L){return _.H.useState(L)},Oe.useSyncExternalStore=function(L,Z,T){return _.H.useSyncExternalStore(L,Z,T)},Oe.useTransition=function(){return _.H.useTransition()},Oe.version="19.2.4",Oe}var Gg;function pd(){return Gg||(Gg=1,df.exports=Xx()),df.exports}var k=pd();const $x=md(k),Kx=Fx({__proto__:null,default:$x},[k]);var hf={exports:{}},jr={},mf={exports:{}},pf={};var Vg;function Zx(){return Vg||(Vg=1,(function(t){function l(B,ee){var se=B.length;B.push(ee);e:for(;0<se;){var xe=se-1>>>1,N=B[xe];if(0<o(N,ee))B[xe]=ee,B[se]=N,se=xe;else break e}}function a(B){return B.length===0?null:B[0]}function r(B){if(B.length===0)return null;var ee=B[0],se=B.pop();if(se!==ee){B[0]=se;e:for(var xe=0,N=B.length,L=N>>>1;xe<L;){var Z=2*(xe+1)-1,T=B[Z],ce=Z+1,ve=B[ce];if(0>o(T,se))ce<N&&0>o(ve,T)?(B[xe]=ve,B[ce]=se,xe=ce):(B[xe]=T,B[Z]=se,xe=Z);else if(ce<N&&0>o(ve,se))B[xe]=ve,B[ce]=se,xe=ce;else break e}}return ee}function o(B,ee){var se=B.sortIndex-ee.sortIndex;return se!==0?se:B.id-ee.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],m=[],y=1,g=null,b=3,x=!1,E=!1,A=!1,z=!1,C=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function te(B){for(var ee=a(m);ee!==null;){if(ee.callback===null)r(m);else if(ee.startTime<=B)r(m),ee.sortIndex=ee.expirationTime,l(p,ee);else break;ee=a(m)}}function P(B){if(A=!1,te(B),!E)if(a(p)!==null)E=!0,H||(H=!0,G());else{var ee=a(m);ee!==null&&I(P,ee.startTime-B)}}var H=!1,_=-1,ne=5,J=-1;function R(){return z?!0:!(t.unstable_now()-J<ne)}function V(){if(z=!1,H){var B=t.unstable_now();J=B;var ee=!0;try{e:{E=!1,A&&(A=!1,j(_),_=-1),x=!0;var se=b;try{t:{for(te(B),g=a(p);g!==null&&!(g.expirationTime>B&&R());){var xe=g.callback;if(typeof xe=="function"){g.callback=null,b=g.priorityLevel;var N=xe(g.expirationTime<=B);if(B=t.unstable_now(),typeof N=="function"){g.callback=N,te(B),ee=!0;break t}g===a(p)&&r(p),te(B)}else r(p);g=a(p)}if(g!==null)ee=!0;else{var L=a(m);L!==null&&I(P,L.startTime-B),ee=!1}}break e}finally{g=null,b=se,x=!1}ee=void 0}}finally{ee?G():H=!1}}}var G;if(typeof D=="function")G=function(){D(V)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,le=F.port2;F.port1.onmessage=V,G=function(){le.postMessage(null)}}else G=function(){C(V,0)};function I(B,ee){_=C(function(){B(t.unstable_now())},ee)}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(B){B.callback=null},t.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<B?Math.floor(1e3/B):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(B){switch(b){case 1:case 2:case 3:var ee=3;break;default:ee=b}var se=b;b=ee;try{return B()}finally{b=se}},t.unstable_requestPaint=function(){z=!0},t.unstable_runWithPriority=function(B,ee){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var se=b;b=B;try{return ee()}finally{b=se}},t.unstable_scheduleCallback=function(B,ee,se){var xe=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?xe+se:xe):se=xe,B){case 1:var N=-1;break;case 2:N=250;break;case 5:N=1073741823;break;case 4:N=1e4;break;default:N=5e3}return N=se+N,B={id:y++,callback:ee,priorityLevel:B,startTime:se,expirationTime:N,sortIndex:-1},se>xe?(B.sortIndex=se,l(m,B),a(p)===null&&B===a(m)&&(A?(j(_),_=-1):A=!0,I(P,se-xe))):(B.sortIndex=N,l(p,B),E||x||(E=!0,H||(H=!0,G()))),B},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(B){var ee=b;return function(){var se=b;b=ee;try{return B.apply(this,arguments)}finally{b=se}}}})(pf)),pf}var Fg;function Px(){return Fg||(Fg=1,mf.exports=Zx()),mf.exports}var gf={exports:{}},Vt={};var Ig;function Jx(){if(Ig)return Vt;Ig=1;var t=pd();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(l(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Vt.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return s(p,m,null,y)},Vt.flushSync=function(p){var m=c.T,y=r.p;try{if(c.T=null,r.p=2,p)return p()}finally{c.T=m,r.p=y,r.d.f()}},Vt.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Vt.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Vt.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:x}):y==="script"&&r.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Vt.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Vt.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin);r.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Vt.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=d(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Vt.requestFormReset=function(p){r.d.r(p)},Vt.unstable_batchedUpdates=function(p,m){return p(m)},Vt.useFormState=function(p,m,y){return c.H.useFormState(p,m,y)},Vt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Vt.version="19.2.4",Vt}var Qg;function Ev(){if(Qg)return gf.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(l){console.error(l)}}return t(),gf.exports=Jx(),gf.exports}var Xg;function Wx(){if(Xg)return jr;Xg=1;var t=Px(),l=pd(),a=Ev();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}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 s(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function c(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 d(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(s(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=s(e),n===null)throw Error(r(188));return n!==e?null:e}for(var i=e,u=n;;){var f=i.return;if(f===null)break;var h=f.alternate;if(h===null){if(u=f.return,u!==null){i=u;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===i)return p(f),e;if(h===u)return p(f),n;h=h.sibling}throw Error(r(188))}if(i.return!==u.return)i=f,u=h;else{for(var v=!1,w=f.child;w;){if(w===i){v=!0,i=f,u=h;break}if(w===u){v=!0,u=f,i=h;break}w=w.sibling}if(!v){for(w=h.child;w;){if(w===i){v=!0,i=h,u=f;break}if(w===u){v=!0,u=h,i=f;break}w=w.sibling}if(!v)throw Error(r(189))}}if(i.alternate!==u)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),A=Symbol.for("react.fragment"),z=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),D=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var F=Symbol.for("react.client.reference");function le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===F?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case A:return"Fragment";case C:return"Profiler";case z:return"StrictMode";case P:return"Suspense";case H:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case D:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _:return n=e.displayName||null,n!==null?n:le(e.type)||"Memo";case ne:n=e._payload,e=e._init;try{return le(e(n))}catch{}}return null}var I=Array.isArray,B=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},xe=[],N=-1;function L(e){return{current:e}}function Z(e){0>N||(e.current=xe[N],xe[N]=null,N--)}function T(e,n){N++,xe[N]=e.current,e.current=n}var ce=L(null),ve=L(null),be=L(null),De=L(null);function pe(e,n){switch(T(be,n),T(ve,e),T(ce,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?og(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=og(n),e=sg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(ce),T(ce,e)}function Re(){Z(ce),Z(ve),Z(be)}function zt(e){e.memoizedState!==null&&T(De,e);var n=ce.current,i=sg(n,e.type);n!==i&&(T(ve,e),T(ce,i))}function Ln(e){ve.current===e&&(Z(ce),Z(ve)),De.current===e&&(Z(De),Er._currentValue=se)}var yt,Un;function Sn(e){if(yt===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);yt=n&&n[1]||"",Un=-1<i.stack.indexOf(`
|
|
1
|
+
function Vx(t,l){for(var a=0;a<l.length;a++){const r=l[a];if(typeof r!="string"&&!Array.isArray(r)){for(const o in r)if(o!=="default"&&!(o in t)){const s=Object.getOwnPropertyDescriptor(r,o);s&&Object.defineProperty(t,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const l=document.createElement("link").relList;if(l&&l.supports&&l.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))r(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&r(c)}).observe(document,{childList:!0,subtree:!0});function a(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function r(o){if(o.ep)return;o.ep=!0;const s=a(o);fetch(o.href,s)}})();function md(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ff={exports:{}},Ar={};var Yg;function Fx(){if(Yg)return Ar;Yg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.fragment");function a(r,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var d in o)d!=="key"&&(s[d]=o[d])}else s=o;return o=s.ref,{$$typeof:t,type:r,key:c,ref:o!==void 0?o:null,props:s}}return Ar.Fragment=l,Ar.jsx=a,Ar.jsxs=a,Ar}var Gg;function Ix(){return Gg||(Gg=1,ff.exports=Fx()),ff.exports}var x=Ix(),df={exports:{}},Oe={};var Vg;function Qx(){if(Vg)return Oe;Vg=1;var t=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),b=Symbol.iterator;function S(L){return L===null||typeof L!="object"?null:(L=b&&L[b]||L["@@iterator"],typeof L=="function"?L:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,N={};function C(L,Z,T){this.props=L,this.context=Z,this.refs=N,this.updater=T||E}C.prototype.isReactComponent={},C.prototype.setState=function(L,Z){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,Z,"setState")},C.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=C.prototype;function D(L,Z,T){this.props=L,this.context=Z,this.refs=N,this.updater=T||E}var te=D.prototype=new A;te.constructor=D,j(te,C.prototype),te.isPureReactComponent=!0;var P=Array.isArray;function H(){}var _={H:null,A:null,T:null,S:null},ne=Object.prototype.hasOwnProperty;function W(L,Z,T){var ce=T.ref;return{$$typeof:t,type:L,key:Z,ref:ce!==void 0?ce:null,props:T}}function R(L,Z){return W(L.type,Z,L.props)}function V(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function G(L){var Z={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(T){return Z[T]})}var F=/\/+/g;function le(L,Z){return typeof L=="object"&&L!==null&&L.key!=null?G(""+L.key):Z.toString(36)}function $(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(H,H):(L.status="pending",L.then(function(Z){L.status==="pending"&&(L.status="fulfilled",L.value=Z)},function(Z){L.status==="pending"&&(L.status="rejected",L.reason=Z)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function U(L,Z,T,ce,ve){var be=typeof L;(be==="undefined"||be==="boolean")&&(L=null);var De=!1;if(L===null)De=!0;else switch(be){case"bigint":case"string":case"number":De=!0;break;case"object":switch(L.$$typeof){case t:case l:De=!0;break;case y:return De=L._init,U(De(L._payload),Z,T,ce,ve)}}if(De)return ve=ve(L),De=ce===""?"."+le(L,0):ce,P(ve)?(T="",De!=null&&(T=De.replace(F,"$&/")+"/"),U(ve,Z,T,"",function(Nt){return Nt})):ve!=null&&(V(ve)&&(ve=R(ve,T+(ve.key==null||L&&L.key===ve.key?"":(""+ve.key).replace(F,"$&/")+"/")+De)),Z.push(ve)),1;De=0;var pe=ce===""?".":ce+":";if(P(L))for(var Re=0;Re<L.length;Re++)ce=L[Re],be=pe+le(ce,Re),De+=U(ce,Z,T,be,ve);else if(Re=S(L),typeof Re=="function")for(L=Re.call(L),Re=0;!(ce=L.next()).done;)ce=ce.value,be=pe+le(ce,Re++),De+=U(ce,Z,T,be,ve);else if(be==="object"){if(typeof L.then=="function")return U($(L),Z,T,ce,ve);throw Z=String(L),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return De}function ee(L,Z,T){if(L==null)return L;var ce=[],ve=0;return U(L,ce,"","",function(be){return Z.call(T,be,ve++)}),ce}function se(L){if(L._status===-1){var Z=L._result;Z=Z(),Z.then(function(T){(L._status===0||L._status===-1)&&(L._status=1,L._result=T)},function(T){(L._status===0||L._status===-1)&&(L._status=2,L._result=T)}),L._status===-1&&(L._status=0,L._result=Z)}if(L._status===1)return L._result.default;throw L._result}var xe=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},z={map:ee,forEach:function(L,Z,T){ee(L,function(){Z.apply(this,arguments)},T)},count:function(L){var Z=0;return ee(L,function(){Z++}),Z},toArray:function(L){return ee(L,function(Z){return Z})||[]},only:function(L){if(!V(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Oe.Activity=g,Oe.Children=z,Oe.Component=C,Oe.Fragment=a,Oe.Profiler=o,Oe.PureComponent=D,Oe.StrictMode=r,Oe.Suspense=p,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(L){return _.H.useMemoCache(L)}},Oe.cache=function(L){return function(){return L.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(L,Z,T){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var ce=j({},L.props),ve=L.key;if(Z!=null)for(be in Z.key!==void 0&&(ve=""+Z.key),Z)!ne.call(Z,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&Z.ref===void 0||(ce[be]=Z[be]);var be=arguments.length-2;if(be===1)ce.children=T;else if(1<be){for(var De=Array(be),pe=0;pe<be;pe++)De[pe]=arguments[pe+2];ce.children=De}return W(L.type,ve,ce)},Oe.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:s,_context:L},L},Oe.createElement=function(L,Z,T){var ce,ve={},be=null;if(Z!=null)for(ce in Z.key!==void 0&&(be=""+Z.key),Z)ne.call(Z,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(ve[ce]=Z[ce]);var De=arguments.length-2;if(De===1)ve.children=T;else if(1<De){for(var pe=Array(De),Re=0;Re<De;Re++)pe[Re]=arguments[Re+2];ve.children=pe}if(L&&L.defaultProps)for(ce in De=L.defaultProps,De)ve[ce]===void 0&&(ve[ce]=De[ce]);return W(L,be,ve)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(L){return{$$typeof:d,render:L}},Oe.isValidElement=V,Oe.lazy=function(L){return{$$typeof:y,_payload:{_status:-1,_result:L},_init:se}},Oe.memo=function(L,Z){return{$$typeof:m,type:L,compare:Z===void 0?null:Z}},Oe.startTransition=function(L){var Z=_.T,T={};_.T=T;try{var ce=L(),ve=_.S;ve!==null&&ve(T,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(H,xe)}catch(be){xe(be)}finally{Z!==null&&T.types!==null&&(Z.types=T.types),_.T=Z}},Oe.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Oe.use=function(L){return _.H.use(L)},Oe.useActionState=function(L,Z,T){return _.H.useActionState(L,Z,T)},Oe.useCallback=function(L,Z){return _.H.useCallback(L,Z)},Oe.useContext=function(L){return _.H.useContext(L)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(L,Z){return _.H.useDeferredValue(L,Z)},Oe.useEffect=function(L,Z){return _.H.useEffect(L,Z)},Oe.useEffectEvent=function(L){return _.H.useEffectEvent(L)},Oe.useId=function(){return _.H.useId()},Oe.useImperativeHandle=function(L,Z,T){return _.H.useImperativeHandle(L,Z,T)},Oe.useInsertionEffect=function(L,Z){return _.H.useInsertionEffect(L,Z)},Oe.useLayoutEffect=function(L,Z){return _.H.useLayoutEffect(L,Z)},Oe.useMemo=function(L,Z){return _.H.useMemo(L,Z)},Oe.useOptimistic=function(L,Z){return _.H.useOptimistic(L,Z)},Oe.useReducer=function(L,Z,T){return _.H.useReducer(L,Z,T)},Oe.useRef=function(L){return _.H.useRef(L)},Oe.useState=function(L){return _.H.useState(L)},Oe.useSyncExternalStore=function(L,Z,T){return _.H.useSyncExternalStore(L,Z,T)},Oe.useTransition=function(){return _.H.useTransition()},Oe.version="19.2.4",Oe}var Fg;function pd(){return Fg||(Fg=1,df.exports=Qx()),df.exports}var k=pd();const Xx=md(k),$x=Vx({__proto__:null,default:Xx},[k]);var hf={exports:{}},_r={},mf={exports:{}},pf={};var Ig;function Kx(){return Ig||(Ig=1,(function(t){function l(U,ee){var se=U.length;U.push(ee);e:for(;0<se;){var xe=se-1>>>1,z=U[xe];if(0<o(z,ee))U[xe]=ee,U[se]=z,se=xe;else break e}}function a(U){return U.length===0?null:U[0]}function r(U){if(U.length===0)return null;var ee=U[0],se=U.pop();if(se!==ee){U[0]=se;e:for(var xe=0,z=U.length,L=z>>>1;xe<L;){var Z=2*(xe+1)-1,T=U[Z],ce=Z+1,ve=U[ce];if(0>o(T,se))ce<z&&0>o(ve,T)?(U[xe]=ve,U[ce]=se,xe=ce):(U[xe]=T,U[Z]=se,xe=Z);else if(ce<z&&0>o(ve,se))U[xe]=ve,U[ce]=se,xe=ce;else break e}}return ee}function o(U,ee){var se=U.sortIndex-ee.sortIndex;return se!==0?se:U.id-ee.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var c=Date,d=c.now();t.unstable_now=function(){return c.now()-d}}var p=[],m=[],y=1,g=null,b=3,S=!1,E=!1,j=!1,N=!1,C=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,D=typeof setImmediate<"u"?setImmediate:null;function te(U){for(var ee=a(m);ee!==null;){if(ee.callback===null)r(m);else if(ee.startTime<=U)r(m),ee.sortIndex=ee.expirationTime,l(p,ee);else break;ee=a(m)}}function P(U){if(j=!1,te(U),!E)if(a(p)!==null)E=!0,H||(H=!0,G());else{var ee=a(m);ee!==null&&$(P,ee.startTime-U)}}var H=!1,_=-1,ne=5,W=-1;function R(){return N?!0:!(t.unstable_now()-W<ne)}function V(){if(N=!1,H){var U=t.unstable_now();W=U;var ee=!0;try{e:{E=!1,j&&(j=!1,A(_),_=-1),S=!0;var se=b;try{t:{for(te(U),g=a(p);g!==null&&!(g.expirationTime>U&&R());){var xe=g.callback;if(typeof xe=="function"){g.callback=null,b=g.priorityLevel;var z=xe(g.expirationTime<=U);if(U=t.unstable_now(),typeof z=="function"){g.callback=z,te(U),ee=!0;break t}g===a(p)&&r(p),te(U)}else r(p);g=a(p)}if(g!==null)ee=!0;else{var L=a(m);L!==null&&$(P,L.startTime-U),ee=!1}}break e}finally{g=null,b=se,S=!1}ee=void 0}}finally{ee?G():H=!1}}}var G;if(typeof D=="function")G=function(){D(V)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,le=F.port2;F.port1.onmessage=V,G=function(){le.postMessage(null)}}else G=function(){C(V,0)};function $(U,ee){_=C(function(){U(t.unstable_now())},ee)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ne=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(U){switch(b){case 1:case 2:case 3:var ee=3;break;default:ee=b}var se=b;b=ee;try{return U()}finally{b=se}},t.unstable_requestPaint=function(){N=!0},t.unstable_runWithPriority=function(U,ee){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var se=b;b=U;try{return ee()}finally{b=se}},t.unstable_scheduleCallback=function(U,ee,se){var xe=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?xe+se:xe):se=xe,U){case 1:var z=-1;break;case 2:z=250;break;case 5:z=1073741823;break;case 4:z=1e4;break;default:z=5e3}return z=se+z,U={id:y++,callback:ee,priorityLevel:U,startTime:se,expirationTime:z,sortIndex:-1},se>xe?(U.sortIndex=se,l(m,U),a(p)===null&&U===a(m)&&(j?(A(_),_=-1):j=!0,$(P,se-xe))):(U.sortIndex=z,l(p,U),E||S||(E=!0,H||(H=!0,G()))),U},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(U){var ee=b;return function(){var se=b;b=ee;try{return U.apply(this,arguments)}finally{b=se}}}})(pf)),pf}var Qg;function Zx(){return Qg||(Qg=1,mf.exports=Kx()),mf.exports}var gf={exports:{}},Ft={};var Xg;function Px(){if(Xg)return Ft;Xg=1;var t=pd();function l(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(l(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(p,m,y){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:g==null?null:""+g,children:p,containerInfo:m,implementation:y}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ft.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ft.createPortal=function(p,m){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(l(299));return s(p,m,null,y)},Ft.flushSync=function(p){var m=c.T,y=r.p;try{if(c.T=null,r.p=2,p)return p()}finally{c.T=m,r.p=y,r.d.f()}},Ft.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Ft.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Ft.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin),b=typeof m.integrity=="string"?m.integrity:void 0,S=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:b,fetchPriority:S}):y==="script"&&r.d.X(p,{crossOrigin:g,integrity:b,fetchPriority:S,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ft.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=d(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Ft.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,g=d(y,m.crossOrigin);r.d.L(p,y,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Ft.preloadModule=function(p,m){if(typeof p=="string")if(m){var y=d(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Ft.requestFormReset=function(p){r.d.r(p)},Ft.unstable_batchedUpdates=function(p,m){return p(m)},Ft.useFormState=function(p,m,y){return c.H.useFormState(p,m,y)},Ft.useFormStatus=function(){return c.H.useHostTransitionStatus()},Ft.version="19.2.4",Ft}var $g;function wv(){if($g)return gf.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(l){console.error(l)}}return t(),gf.exports=Px(),gf.exports}var Kg;function Jx(){if(Kg)return _r;Kg=1;var t=Zx(),l=pd(),a=wv();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}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 s(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function c(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 d(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(s(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=s(e),n===null)throw Error(r(188));return n!==e?null:e}for(var i=e,u=n;;){var f=i.return;if(f===null)break;var h=f.alternate;if(h===null){if(u=f.return,u!==null){i=u;continue}break}if(f.child===h.child){for(h=f.child;h;){if(h===i)return p(f),e;if(h===u)return p(f),n;h=h.sibling}throw Error(r(188))}if(i.return!==u.return)i=f,u=h;else{for(var v=!1,w=f.child;w;){if(w===i){v=!0,i=f,u=h;break}if(w===u){v=!0,u=f,i=h;break}w=w.sibling}if(!v){for(w=h.child;w;){if(w===i){v=!0,i=h,u=f;break}if(w===u){v=!0,u=h,i=f;break}w=w.sibling}if(!v)throw Error(r(189))}}if(i.alternate!==u)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:n}function y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(e),n!==null)return n;e=e.sibling}return null}var g=Object.assign,b=Symbol.for("react.element"),S=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),N=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),D=Symbol.for("react.context"),te=Symbol.for("react.forward_ref"),P=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),ne=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),R=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function G(e){return e===null||typeof e!="object"?null:(e=V&&e[V]||e["@@iterator"],typeof e=="function"?e:null)}var F=Symbol.for("react.client.reference");function le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===F?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case C:return"Profiler";case N:return"StrictMode";case P:return"Suspense";case H:return"SuspenseList";case W:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case D:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case te:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case _:return n=e.displayName||null,n!==null?n:le(e.type)||"Memo";case ne:n=e._payload,e=e._init;try{return le(e(n))}catch{}}return null}var $=Array.isArray,U=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},xe=[],z=-1;function L(e){return{current:e}}function Z(e){0>z||(e.current=xe[z],xe[z]=null,z--)}function T(e,n){z++,xe[z]=e.current,e.current=n}var ce=L(null),ve=L(null),be=L(null),De=L(null);function pe(e,n){switch(T(be,n),T(ve,e),T(ce,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?cg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=cg(n),e=fg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Z(ce),T(ce,e)}function Re(){Z(ce),Z(ve),Z(be)}function Nt(e){e.memoizedState!==null&&T(De,e);var n=ce.current,i=fg(n,e.type);n!==i&&(T(ve,e),T(ce,i))}function Ln(e){ve.current===e&&(Z(ce),Z(ve)),De.current===e&&(Z(De),kr._currentValue=se)}var yt,Un;function Sn(e){if(yt===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);yt=n&&n[1]||"",Un=-1<i.stack.indexOf(`
|
|
2
2
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+yt+e+Un}var Rl=!1;function Pt(e,n){if(!e||Rl)return"";Rl=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(
|
|
4
|
-
`),
|
|
5
|
-
`);for(f=u=0;u<M.length&&!M[u].includes("DetermineComponentFrameRoot");)u++;for(;f<
|
|
3
|
+
`+yt+e+Un}var Rl=!1;function Pt(e,n){if(!e||Rl)return"";Rl=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(n){var ue=function(){throw Error()};if(Object.defineProperty(ue.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ue,[])}catch(J){var X=J}Reflect.construct(e,[],ue)}else{try{ue.call()}catch(J){X=J}e.call(ue.prototype)}}else{try{throw Error()}catch(J){X=J}(ue=e())&&typeof ue.catch=="function"&&ue.catch(function(){})}}catch(J){if(J&&X&&typeof J.stack=="string")return[J.stack,X.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=u.DetermineComponentFrameRoot(),v=h[0],w=h[1];if(v&&w){var M=v.split(`
|
|
4
|
+
`),Q=w.split(`
|
|
5
|
+
`);for(f=u=0;u<M.length&&!M[u].includes("DetermineComponentFrameRoot");)u++;for(;f<Q.length&&!Q[f].includes("DetermineComponentFrameRoot");)f++;if(u===M.length||f===Q.length)for(u=M.length-1,f=Q.length-1;1<=u&&0<=f&&M[u]!==Q[f];)f--;for(;1<=u&&0<=f;u--,f--)if(M[u]!==Q[f]){if(u!==1||f!==1)do if(u--,f--,0>f||M[u]!==Q[f]){var ie=`
|
|
6
6
|
`+M[u].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=u&&0<=f);break}}}finally{Rl=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Sn(i):""}function Vi(e,n){switch(e.tag){case 26:case 27:case 5:return Sn(e.type);case 16:return Sn("Lazy");case 13:return e.child!==n&&n!==null?Sn("Suspense Fallback"):Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 15:return Pt(e.type,!1);case 11:return Pt(e.type.render,!1);case 1:return Pt(e.type,!0);case 31:return Sn("Activity");default:return""}}function Fi(e){try{var n="",i=null;do n+=Vi(e,i),i=e,e=e.return;while(e);return n}catch(u){return`
|
|
7
7
|
Error generating stack: `+u.message+`
|
|
8
|
-
`+u.stack}}var ll=Object.prototype.hasOwnProperty,zl=t.unstable_scheduleCallback,mi=t.unstable_cancelCallback,La=t.unstable_shouldYield,Ua=t.unstable_requestPaint,pt=t.unstable_now,il=t.unstable_getCurrentPriorityLevel,ae=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,Ne=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,$t=t.log,on=t.unstable_setDisableYieldValue,Lt=null,nt=null;function Ut(e){if(typeof $t=="function"&&on(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(Lt,e)}catch{}}var tt=Math.clz32?Math.clz32:lu,Bn=Math.log,sn=Math.LN2;function lu(e){return e>>>=0,e===0?32:31-(Bn(e)/sn|0)|0}var al=256,pi=262144,Nl=4194304;function rl(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 gi(e,n,i){var u=e.pendingLanes;if(u===0)return 0;var f=0,h=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var w=u&134217727;return w!==0?(u=w&~h,u!==0?f=rl(u):(v&=w,v!==0?f=rl(v):i||(i=w&~e,i!==0&&(f=rl(i))))):(w=u&~h,w!==0?f=rl(w):v!==0?f=rl(v):i||(i=u&~e,i!==0&&(f=rl(i)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,i=n&-n,h>=i||h===32&&(i&4194048)!==0)?n:f}function yi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function iu(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 vi(){var e=Nl;return Nl<<=1,(Nl&62914560)===0&&(Nl=4194304),e}function Dl(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function Ol(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ls(e,n,i,u,f,h){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var w=e.entanglements,M=e.expirationTimes,X=e.hiddenUpdates;for(i=v&~i;0<i;){var ie=31-tt(i),ue=1<<ie;w[ie]=0,M[ie]=-1;var $=X[ie];if($!==null)for(X[ie]=null,ie=0;ie<$.length;ie++){var W=$[ie];W!==null&&(W.lane&=-536870913)}i&=~ue}u!==0&&au(e,u,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(v&~n))}function au(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-tt(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|i&261930}function O(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var u=31-tt(i),f=1<<u;f&n|e[u]&n&&(e[u]|=n),i&=~f}}function Y(e,n){var i=n&-n;return i=(i&42)!==0?1:K(i),(i&(e.suspendedLanes|n))!==0?0:i}function K(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 oe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function he(){var e=ee.p;return e!==0?e:(e=window.event,e===void 0?32:Ng(e.type))}function ke(e,n){var i=ee.p;try{return ee.p=e,n()}finally{ee.p=i}}var ge=Math.random().toString(36).slice(2),me="__reactFiber$"+ge,ye="__reactProps$"+ge,we="__reactContainer$"+ge,Ae="__reactEvents$"+ge,Te="__reactListeners$"+ge,Ke="__reactHandles$"+ge,Fe="__reactResources$"+ge,gt="__reactMarker$"+ge;function vt(e){delete e[me],delete e[ye],delete e[Ae],delete e[Te],delete e[Ke]}function bt(e){var n=e[me];if(n)return n;for(var i=e.parentNode;i;){if(n=i[we]||i[me]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=gg(e);e!==null;){if(i=e[me])return i;e=gg(e)}return n}e=i,i=e.parentNode}return null}function Ie(e){if(e=e[me]||e[we]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ot(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Jt(e){var n=e[Fe];return n||(n=e[Fe]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ht(e){e[gt]=!0}var Hn=new Set,cn={};function qn(e,n){En(e,n),En(e+"Capture",n)}function En(e,n){for(cn[e]=n,e=0;e<n.length;e++)Hn.add(n[e])}var ul=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]*$"),bi={},xi={};function Qe(e){return ll.call(xi,e)?!0:ll.call(bi,e)?!1:ul.test(e)?xi[e]=!0:(bi[e]=!0,!1)}function Et(e,n,i){if(Qe(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function Yn(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function Bt(e,n,i,u){if(u===null)e.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+u)}}function Xe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Si(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ru(e,n,i){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var f=u.get,h=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ba(e){if(!e._valueTracker){var n=Si(e)?"checked":"value";e._valueTracker=ru(e,n,""+e[n])}}function th(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),u="";return e&&(u=Si(e)?e.checked?"true":"false":e.value),e=u,e!==i?(n.setValue(e),!0):!1}function uu(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 Bb=/[\n"\\]/g;function wn(e){return e.replace(Bb,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function is(e,n,i,u,f,h,v,w){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Xe(n)):e.value!==""+Xe(n)&&(e.value=""+Xe(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?as(e,v,Xe(n)):i!=null?as(e,v,Xe(i)):u!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+Xe(w):e.removeAttribute("name")}function nh(e,n,i,u,f,h,v,w){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Ba(e);return}i=i!=null?""+Xe(i):"",n=n!=null?""+Xe(n):i,w||n===e.value||(e.value=n),e.defaultValue=n}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=w?e.checked:!!u,e.defaultChecked=!!u,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Ba(e)}function as(e,n,i){n==="number"&&uu(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ii(e,n,i,u){if(e=e.options,n){n={};for(var f=0;f<i.length;f++)n["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=n.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&u&&(e[i].defaultSelected=!0)}else{for(i=""+Xe(i),n=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,u&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function lh(e,n,i){if(n!=null&&(n=""+Xe(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+Xe(i):""}function ih(e,n,i,u){if(n==null){if(u!=null){if(i!=null)throw Error(r(92));if(I(u)){if(1<u.length)throw Error(r(93));u=u[0]}i=u}i==null&&(i=""),n=i}i=Xe(n),e.defaultValue=i,u=e.textContent,u===i&&u!==""&&u!==null&&(e.value=u),Ba(e)}function Qi(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Hb=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 ah(e,n,i){var u=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,i):typeof i!="number"||i===0||Hb.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function rh(e,n,i){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,i!=null){for(var u in i)!i.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var f in n)u=n[f],n.hasOwnProperty(f)&&i[f]!==u&&ah(e,f,u)}else for(var h in n)n.hasOwnProperty(h)&&ah(e,h,n[h])}function rs(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 qb=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"]]),Yb=/^[\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 ou(e){return Yb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ol(){}var us=null;function os(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xi=null,$i=null;function uh(e){var n=Ie(e);if(n&&(e=n.stateNode)){var i=e[ye]||null;e:switch(e=n.stateNode,n.type){case"input":if(is(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+wn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var u=i[n];if(u!==e&&u.form===e.form){var f=u[ye]||null;if(!f)throw Error(r(90));is(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<i.length;n++)u=i[n],u.form===e.form&&th(u)}break e;case"textarea":lh(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Ii(e,!!i.multiple,n,!1)}}}var ss=!1;function oh(e,n,i){if(ss)return e(n,i);ss=!0;try{var u=e(n);return u}finally{if(ss=!1,(Xi!==null||$i!==null)&&(Ku(),Xi&&(n=Xi,e=$i,$i=Xi=null,uh(n),e)))for(n=0;n<e.length;n++)uh(e[n])}}function Ha(e,n){var i=e.stateNode;if(i===null)return null;var u=i[ye]||null;if(u===null)return null;i=u[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":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,n,typeof i));return i}var sl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cs=!1;if(sl)try{var qa={};Object.defineProperty(qa,"passive",{get:function(){cs=!0}}),window.addEventListener("test",qa,qa),window.removeEventListener("test",qa,qa)}catch{cs=!1}var Ml=null,fs=null,su=null;function sh(){if(su)return su;var e,n=fs,i=n.length,u,f="value"in Ml?Ml.value:Ml.textContent,h=f.length;for(e=0;e<i&&n[e]===f[e];e++);var v=i-e;for(u=1;u<=v&&n[i-u]===f[h-u];u++);return su=f.slice(e,1<u?1-u:void 0)}function cu(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 fu(){return!0}function ch(){return!1}function Wt(e){function n(i,u,f,h,v){this._reactName=i,this._targetInst=f,this.type=u,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(i=e[w],this[w]=i?i(h):h[w]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?fu:ch,this.isPropagationStopped=ch,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=fu)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=fu)},persist:function(){},isPersistent:fu}),n}var Ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},du=Wt(Ei),Ya=g({},Ei,{view:0,detail:0}),Gb=Wt(Ya),ds,hs,Ga,hu=g({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ps,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!==Ga&&(Ga&&e.type==="mousemove"?(ds=e.screenX-Ga.screenX,hs=e.screenY-Ga.screenY):hs=ds=0,Ga=e),ds)},movementY:function(e){return"movementY"in e?e.movementY:hs}}),fh=Wt(hu),Vb=g({},hu,{dataTransfer:0}),Fb=Wt(Vb),Ib=g({},Ya,{relatedTarget:0}),ms=Wt(Ib),Qb=g({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),Xb=Wt(Qb),$b=g({},Ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kb=Wt($b),Zb=g({},Ei,{data:0}),dh=Wt(Zb),Pb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Jb={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"},Wb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function e1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Wb[e])?!!n[e]:!1}function ps(){return e1}var t1=g({},Ya,{key:function(e){if(e.key){var n=Pb[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=cu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Jb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ps,charCode:function(e){return e.type==="keypress"?cu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),n1=Wt(t1),l1=g({},hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hh=Wt(l1),i1=g({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ps}),a1=Wt(i1),r1=g({},Ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),u1=Wt(r1),o1=g({},hu,{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}),s1=Wt(o1),c1=g({},Ei,{newState:0,oldState:0}),f1=Wt(c1),d1=[9,13,27,32],gs=sl&&"CompositionEvent"in window,Va=null;sl&&"documentMode"in document&&(Va=document.documentMode);var h1=sl&&"TextEvent"in window&&!Va,mh=sl&&(!gs||Va&&8<Va&&11>=Va),ph=" ",gh=!1;function yh(e,n){switch(e){case"keyup":return d1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ki=!1;function m1(e,n){switch(e){case"compositionend":return vh(n);case"keypress":return n.which!==32?null:(gh=!0,ph);case"textInput":return e=n.data,e===ph&&gh?null:e;default:return null}}function p1(e,n){if(Ki)return e==="compositionend"||!gs&&yh(e,n)?(e=sh(),su=fs=Ml=null,Ki=!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 mh&&n.locale!=="ko"?null:n.data;default:return null}}var g1={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 bh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!g1[e.type]:n==="textarea"}function xh(e,n,i,u){Xi?$i?$i.push(u):$i=[u]:Xi=u,n=no(n,"onChange"),0<n.length&&(i=new du("onChange","change",null,i,u),e.push({event:i,listeners:n}))}var Fa=null,Ia=null;function y1(e){ng(e,0)}function mu(e){var n=Ot(e);if(th(n))return e}function Sh(e,n){if(e==="change")return n}var Eh=!1;if(sl){var ys;if(sl){var vs="oninput"in document;if(!vs){var wh=document.createElement("div");wh.setAttribute("oninput","return;"),vs=typeof wh.oninput=="function"}ys=vs}else ys=!1;Eh=ys&&(!document.documentMode||9<document.documentMode)}function kh(){Fa&&(Fa.detachEvent("onpropertychange",Ch),Ia=Fa=null)}function Ch(e){if(e.propertyName==="value"&&mu(Ia)){var n=[];xh(n,Ia,e,os(e)),oh(y1,n)}}function v1(e,n,i){e==="focusin"?(kh(),Fa=n,Ia=i,Fa.attachEvent("onpropertychange",Ch)):e==="focusout"&&kh()}function b1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mu(Ia)}function x1(e,n){if(e==="click")return mu(n)}function S1(e,n){if(e==="input"||e==="change")return mu(n)}function E1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var fn=typeof Object.is=="function"?Object.is:E1;function Qa(e,n){if(fn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),u=Object.keys(n);if(i.length!==u.length)return!1;for(u=0;u<i.length;u++){var f=i[u];if(!ll.call(n,f)||!fn(e[f],n[f]))return!1}return!0}function Th(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function jh(e,n){var i=Th(e);e=0;for(var u;i;){if(i.nodeType===3){if(u=e+i.textContent.length,e<=n&&u>=n)return{node:i,offset:n-e};e=u}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Th(i)}}function Ah(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Ah(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function _h(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=uu(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=uu(e.document)}return n}function bs(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 w1=sl&&"documentMode"in document&&11>=document.documentMode,Zi=null,xs=null,Xa=null,Ss=!1;function Rh(e,n,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ss||Zi==null||Zi!==uu(u)||(u=Zi,"selectionStart"in u&&bs(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Xa&&Qa(Xa,u)||(Xa=u,u=no(xs,"onSelect"),0<u.length&&(n=new du("onSelect","select",null,n,i),e.push({event:n,listeners:u}),n.target=Zi)))}function wi(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var Pi={animationend:wi("Animation","AnimationEnd"),animationiteration:wi("Animation","AnimationIteration"),animationstart:wi("Animation","AnimationStart"),transitionrun:wi("Transition","TransitionRun"),transitionstart:wi("Transition","TransitionStart"),transitioncancel:wi("Transition","TransitionCancel"),transitionend:wi("Transition","TransitionEnd")},Es={},zh={};sl&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function ki(e){if(Es[e])return Es[e];if(!Pi[e])return e;var n=Pi[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in zh)return Es[e]=n[i];return e}var Nh=ki("animationend"),Dh=ki("animationiteration"),Oh=ki("animationstart"),k1=ki("transitionrun"),C1=ki("transitionstart"),T1=ki("transitioncancel"),Mh=ki("transitionend"),Lh=new Map,ws="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(" ");ws.push("scrollEnd");function Gn(e,n){Lh.set(e,n),qn(n,[e])}var pu=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)},kn=[],Ji=0,ks=0;function gu(){for(var e=Ji,n=ks=Ji=0;n<e;){var i=kn[n];kn[n++]=null;var u=kn[n];kn[n++]=null;var f=kn[n];kn[n++]=null;var h=kn[n];if(kn[n++]=null,u!==null&&f!==null){var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}h!==0&&Uh(i,f,h)}}function yu(e,n,i,u){kn[Ji++]=e,kn[Ji++]=n,kn[Ji++]=i,kn[Ji++]=u,ks|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function Cs(e,n,i,u){return yu(e,n,i,u),vu(e)}function Ci(e,n){return yu(e,null,null,n),vu(e)}function Uh(e,n,i){e.lanes|=i;var u=e.alternate;u!==null&&(u.lanes|=i);for(var f=!1,h=e.return;h!==null;)h.childLanes|=i,u=h.alternate,u!==null&&(u.childLanes|=i),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&n!==null&&(f=31-tt(i),e=h.hiddenUpdates,u=e[f],u===null?e[f]=[n]:u.push(n),n.lane=i|536870912),h):null}function vu(e){if(50<pr)throw pr=0,Oc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Wi={};function j1(e,n,i,u){this.tag=e,this.key=i,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=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(e,n,i,u){return new j1(e,n,i,u)}function Ts(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cl(e,n){var i=e.alternate;return i===null?(i=dn(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Bh(e,n){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function bu(e,n,i,u,f,h){var v=0;if(u=e,typeof e=="function")Ts(e)&&(v=1);else if(typeof e=="string")v=Nx(e,i,ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=dn(31,i,n,f),e.elementType=J,e.lanes=h,e;case A:return Ti(i.children,f,h,n);case z:v=8,f|=24;break;case C:return e=dn(12,i,n,f|2),e.elementType=C,e.lanes=h,e;case P:return e=dn(13,i,n,f),e.elementType=P,e.lanes=h,e;case H:return e=dn(19,i,n,f),e.elementType=H,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:v=10;break e;case j:v=9;break e;case te:v=11;break e;case _:v=14;break e;case ne:v=16,u=null;break e}v=29,i=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=dn(v,i,n,f),n.elementType=e,n.type=u,n.lanes=h,n}function Ti(e,n,i,u){return e=dn(7,e,u,n),e.lanes=i,e}function js(e,n,i){return e=dn(6,e,null,n),e.lanes=i,e}function Hh(e){var n=dn(18,null,null,0);return n.stateNode=e,n}function As(e,n,i){return n=dn(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var qh=new WeakMap;function Cn(e,n){if(typeof e=="object"&&e!==null){var i=qh.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Fi(n)},qh.set(e,n),n)}return{value:e,source:n,stack:Fi(n)}}var ea=[],ta=0,xu=null,$a=0,Tn=[],jn=0,Ll=null,Xn=1,$n="";function fl(e,n){ea[ta++]=$a,ea[ta++]=xu,xu=e,$a=n}function Yh(e,n,i){Tn[jn++]=Xn,Tn[jn++]=$n,Tn[jn++]=Ll,Ll=e;var u=Xn;e=$n;var f=32-tt(u)-1;u&=~(1<<f),i+=1;var h=32-tt(n)+f;if(30<h){var v=f-f%5;h=(u&(1<<v)-1).toString(32),u>>=v,f-=v,Xn=1<<32-tt(n)+f|i<<f|u,$n=h+e}else Xn=1<<h|i<<f|u,$n=e}function _s(e){e.return!==null&&(fl(e,1),Yh(e,1,0))}function Rs(e){for(;e===xu;)xu=ea[--ta],ea[ta]=null,$a=ea[--ta],ea[ta]=null;for(;e===Ll;)Ll=Tn[--jn],Tn[jn]=null,$n=Tn[--jn],Tn[jn]=null,Xn=Tn[--jn],Tn[jn]=null}function Gh(e,n){Tn[jn++]=Xn,Tn[jn++]=$n,Tn[jn++]=Ll,Xn=n.id,$n=n.overflow,Ll=e}var Ht=null,ft=null,$e=!1,Ul=null,An=!1,zs=Error(r(519));function Bl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ka(Cn(n,e)),zs}function Vh(e){var n=e.stateNode,i=e.type,u=e.memoizedProps;switch(n[me]=e,n[ye]=u,i){case"dialog":qe("cancel",n),qe("close",n);break;case"iframe":case"object":case"embed":qe("load",n);break;case"video":case"audio":for(i=0;i<yr.length;i++)qe(yr[i],n);break;case"source":qe("error",n);break;case"img":case"image":case"link":qe("error",n),qe("load",n);break;case"details":qe("toggle",n);break;case"input":qe("invalid",n),nh(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":qe("invalid",n);break;case"textarea":qe("invalid",n),ih(n,u.value,u.defaultValue,u.children)}i=u.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||u.suppressHydrationWarning===!0||rg(n.textContent,i)?(u.popover!=null&&(qe("beforetoggle",n),qe("toggle",n)),u.onScroll!=null&&qe("scroll",n),u.onScrollEnd!=null&&qe("scrollend",n),u.onClick!=null&&(n.onclick=ol),n=!0):n=!1,n||Bl(e,!0)}function Fh(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:Ht=Ht.return}}function na(e){if(e!==Ht)return!1;if(!$e)return Fh(e),$e=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Kc(e.type,e.memoizedProps)),i=!i),i&&ft&&Bl(e),Fh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=pg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=pg(e)}else n===27?(n=ft,Jl(e.type)?(e=ef,ef=null,ft=e):ft=n):ft=Ht?Rn(e.stateNode.nextSibling):null;return!0}function ji(){ft=Ht=null,$e=!1}function Ns(){var e=Ul;return e!==null&&(ln===null?ln=e:ln.push.apply(ln,e),Ul=null),e}function Ka(e){Ul===null?Ul=[e]:Ul.push(e)}var Ds=L(null),Ai=null,dl=null;function Hl(e,n,i){T(Ds,n._currentValue),n._currentValue=i}function hl(e){e._currentValue=Ds.current,Z(Ds)}function Os(e,n,i){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===i)break;e=e.return}}function Ms(e,n,i,u){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var v=f.child;h=h.firstContext;e:for(;h!==null;){var w=h;h=f;for(var M=0;M<n.length;M++)if(w.context===n[M]){h.lanes|=i,w=h.alternate,w!==null&&(w.lanes|=i),Os(h.return,i,e),u||(v=null);break e}h=w.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(r(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),Os(v,i,e),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function la(e,n,i,u){e=null;for(var f=n,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var w=f.type;fn(f.pendingProps.value,v.value)||(e!==null?e.push(w):e=[w])}}else if(f===De.current){if(v=f.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(Er):e=[Er])}f=f.return}e!==null&&Ms(n,e,i,u),n.flags|=262144}function Su(e){for(e=e.firstContext;e!==null;){if(!fn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _i(e){Ai=e,dl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Ih(Ai,e)}function Eu(e,n){return Ai===null&&_i(e),Ih(e,n)}function Ih(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},dl===null){if(e===null)throw Error(r(308));dl=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else dl=dl.next=n;return i}var A1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},_1=t.unstable_scheduleCallback,R1=t.unstable_NormalPriority,Ct={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ls(){return{controller:new A1,data:new Map,refCount:0}}function Za(e){e.refCount--,e.refCount===0&&_1(R1,function(){e.controller.abort()})}var Pa=null,Us=0,ia=0,aa=null;function z1(e,n){if(Pa===null){var i=Pa=[];Us=0,ia=qc(),aa={status:"pending",value:void 0,then:function(u){i.push(u)}}}return Us++,n.then(Qh,Qh),n}function Qh(){if(--Us===0&&Pa!==null){aa!==null&&(aa.status="fulfilled");var e=Pa;Pa=null,ia=0,aa=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function N1(e,n){var i=[],u={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var f=0;f<i.length;f++)(0,i[f])(n)},function(f){for(u.status="rejected",u.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),u}var Xh=B.S;B.S=function(e,n){Rp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&z1(e,n),Xh!==null&&Xh(e,n)};var Ri=L(null);function Bs(){var e=Ri.current;return e!==null?e:ot.pooledCache}function wu(e,n){n===null?T(Ri,Ri.current):T(Ri,n.pool)}function $h(){var e=Bs();return e===null?null:{parent:Ct._currentValue,pool:e}}var ra=Error(r(460)),Hs=Error(r(474)),ku=Error(r(542)),Cu={then:function(){}};function Kh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zh(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(ol,ol),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Jh(e),e;default:if(typeof n.status=="string")n.then(ol,ol);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=u}},function(u){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Jh(e),e}throw Ni=n,ra}}function zi(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ni=i,ra):i}}var Ni=null;function Ph(){if(Ni===null)throw Error(r(459));var e=Ni;return Ni=null,e}function Jh(e){if(e===ra||e===ku)throw Error(r(483))}var ua=null,Ja=0;function Tu(e){var n=Ja;return Ja+=1,ua===null&&(ua=[]),Zh(ua,e,n)}function Wa(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function ju(e,n){throw n.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Wh(e){function n(q,U){if(e){var Q=q.deletions;Q===null?(q.deletions=[U],q.flags|=16):Q.push(U)}}function i(q,U){if(!e)return null;for(;U!==null;)n(q,U),U=U.sibling;return null}function u(q){for(var U=new Map;q!==null;)q.key!==null?U.set(q.key,q):U.set(q.index,q),q=q.sibling;return U}function f(q,U){return q=cl(q,U),q.index=0,q.sibling=null,q}function h(q,U,Q){return q.index=Q,e?(Q=q.alternate,Q!==null?(Q=Q.index,Q<U?(q.flags|=67108866,U):Q):(q.flags|=67108866,U)):(q.flags|=1048576,U)}function v(q){return e&&q.alternate===null&&(q.flags|=67108866),q}function w(q,U,Q,re){return U===null||U.tag!==6?(U=js(Q,q.mode,re),U.return=q,U):(U=f(U,Q),U.return=q,U)}function M(q,U,Q,re){var je=Q.type;return je===A?ie(q,U,Q.props.children,re,Q.key):U!==null&&(U.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===ne&&zi(je)===U.type)?(U=f(U,Q.props),Wa(U,Q),U.return=q,U):(U=bu(Q.type,Q.key,Q.props,null,q.mode,re),Wa(U,Q),U.return=q,U)}function X(q,U,Q,re){return U===null||U.tag!==4||U.stateNode.containerInfo!==Q.containerInfo||U.stateNode.implementation!==Q.implementation?(U=As(Q,q.mode,re),U.return=q,U):(U=f(U,Q.children||[]),U.return=q,U)}function ie(q,U,Q,re,je){return U===null||U.tag!==7?(U=Ti(Q,q.mode,re,je),U.return=q,U):(U=f(U,Q),U.return=q,U)}function ue(q,U,Q){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=js(""+U,q.mode,Q),U.return=q,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return Q=bu(U.type,U.key,U.props,null,q.mode,Q),Wa(Q,U),Q.return=q,Q;case E:return U=As(U,q.mode,Q),U.return=q,U;case ne:return U=zi(U),ue(q,U,Q)}if(I(U)||G(U))return U=Ti(U,q.mode,Q,null),U.return=q,U;if(typeof U.then=="function")return ue(q,Tu(U),Q);if(U.$$typeof===D)return ue(q,Eu(q,U),Q);ju(q,U)}return null}function $(q,U,Q,re){var je=U!==null?U.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return je!==null?null:w(q,U,""+Q,re);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:return Q.key===je?M(q,U,Q,re):null;case E:return Q.key===je?X(q,U,Q,re):null;case ne:return Q=zi(Q),$(q,U,Q,re)}if(I(Q)||G(Q))return je!==null?null:ie(q,U,Q,re,null);if(typeof Q.then=="function")return $(q,U,Tu(Q),re);if(Q.$$typeof===D)return $(q,U,Eu(q,Q),re);ju(q,Q)}return null}function W(q,U,Q,re,je){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return q=q.get(Q)||null,w(U,q,""+re,je);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case x:return q=q.get(re.key===null?Q:re.key)||null,M(U,q,re,je);case E:return q=q.get(re.key===null?Q:re.key)||null,X(U,q,re,je);case ne:return re=zi(re),W(q,U,Q,re,je)}if(I(re)||G(re))return q=q.get(Q)||null,ie(U,q,re,je,null);if(typeof re.then=="function")return W(q,U,Q,Tu(re),je);if(re.$$typeof===D)return W(q,U,Q,Eu(U,re),je);ju(U,re)}return null}function Se(q,U,Q,re){for(var je=null,Je=null,Ee=U,Le=U=0,Ve=null;Ee!==null&&Le<Q.length;Le++){Ee.index>Le?(Ve=Ee,Ee=null):Ve=Ee.sibling;var We=$(q,Ee,Q[Le],re);if(We===null){Ee===null&&(Ee=Ve);break}e&&Ee&&We.alternate===null&&n(q,Ee),U=h(We,U,Le),Je===null?je=We:Je.sibling=We,Je=We,Ee=Ve}if(Le===Q.length)return i(q,Ee),$e&&fl(q,Le),je;if(Ee===null){for(;Le<Q.length;Le++)Ee=ue(q,Q[Le],re),Ee!==null&&(U=h(Ee,U,Le),Je===null?je=Ee:Je.sibling=Ee,Je=Ee);return $e&&fl(q,Le),je}for(Ee=u(Ee);Le<Q.length;Le++)Ve=W(Ee,q,Le,Q[Le],re),Ve!==null&&(e&&Ve.alternate!==null&&Ee.delete(Ve.key===null?Le:Ve.key),U=h(Ve,U,Le),Je===null?je=Ve:Je.sibling=Ve,Je=Ve);return e&&Ee.forEach(function(li){return n(q,li)}),$e&&fl(q,Le),je}function ze(q,U,Q,re){if(Q==null)throw Error(r(151));for(var je=null,Je=null,Ee=U,Le=U=0,Ve=null,We=Q.next();Ee!==null&&!We.done;Le++,We=Q.next()){Ee.index>Le?(Ve=Ee,Ee=null):Ve=Ee.sibling;var li=$(q,Ee,We.value,re);if(li===null){Ee===null&&(Ee=Ve);break}e&&Ee&&li.alternate===null&&n(q,Ee),U=h(li,U,Le),Je===null?je=li:Je.sibling=li,Je=li,Ee=Ve}if(We.done)return i(q,Ee),$e&&fl(q,Le),je;if(Ee===null){for(;!We.done;Le++,We=Q.next())We=ue(q,We.value,re),We!==null&&(U=h(We,U,Le),Je===null?je=We:Je.sibling=We,Je=We);return $e&&fl(q,Le),je}for(Ee=u(Ee);!We.done;Le++,We=Q.next())We=W(Ee,q,Le,We.value,re),We!==null&&(e&&We.alternate!==null&&Ee.delete(We.key===null?Le:We.key),U=h(We,U,Le),Je===null?je=We:Je.sibling=We,Je=We);return e&&Ee.forEach(function(Vx){return n(q,Vx)}),$e&&fl(q,Le),je}function ut(q,U,Q,re){if(typeof Q=="object"&&Q!==null&&Q.type===A&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case x:e:{for(var je=Q.key;U!==null;){if(U.key===je){if(je=Q.type,je===A){if(U.tag===7){i(q,U.sibling),re=f(U,Q.props.children),re.return=q,q=re;break e}}else if(U.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===ne&&zi(je)===U.type){i(q,U.sibling),re=f(U,Q.props),Wa(re,Q),re.return=q,q=re;break e}i(q,U);break}else n(q,U);U=U.sibling}Q.type===A?(re=Ti(Q.props.children,q.mode,re,Q.key),re.return=q,q=re):(re=bu(Q.type,Q.key,Q.props,null,q.mode,re),Wa(re,Q),re.return=q,q=re)}return v(q);case E:e:{for(je=Q.key;U!==null;){if(U.key===je)if(U.tag===4&&U.stateNode.containerInfo===Q.containerInfo&&U.stateNode.implementation===Q.implementation){i(q,U.sibling),re=f(U,Q.children||[]),re.return=q,q=re;break e}else{i(q,U);break}else n(q,U);U=U.sibling}re=As(Q,q.mode,re),re.return=q,q=re}return v(q);case ne:return Q=zi(Q),ut(q,U,Q,re)}if(I(Q))return Se(q,U,Q,re);if(G(Q)){if(je=G(Q),typeof je!="function")throw Error(r(150));return Q=je.call(Q),ze(q,U,Q,re)}if(typeof Q.then=="function")return ut(q,U,Tu(Q),re);if(Q.$$typeof===D)return ut(q,U,Eu(q,Q),re);ju(q,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,U!==null&&U.tag===6?(i(q,U.sibling),re=f(U,Q),re.return=q,q=re):(i(q,U),re=js(Q,q.mode,re),re.return=q,q=re),v(q)):i(q,U)}return function(q,U,Q,re){try{Ja=0;var je=ut(q,U,Q,re);return ua=null,je}catch(Ee){if(Ee===ra||Ee===ku)throw Ee;var Je=dn(29,Ee,null,q.mode);return Je.lanes=re,Je.return=q,Je}}}var Di=Wh(!0),em=Wh(!1),ql=!1;function qs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ys(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 Yl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Gl(e,n,i){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(et&2)!==0){var f=u.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),u.pending=n,n=vu(e),Uh(e,null,i),n}return yu(e,u,n,i),vu(e)}function er(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,i|=u,n.lanes=i,O(e,i)}}function Gs(e,n){var i=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,i===u)){var f=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?f=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?f=h=n:h=h.next=n}else f=h=n;i={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:u.shared,callbacks:u.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Vs=!1;function tr(){if(Vs){var e=aa;if(e!==null)throw e}}function nr(e,n,i,u){Vs=!1;var f=e.updateQueue;ql=!1;var h=f.firstBaseUpdate,v=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var M=w,X=M.next;M.next=null,v===null?h=X:v.next=X,v=M;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,w=ie.lastBaseUpdate,w!==v&&(w===null?ie.firstBaseUpdate=X:w.next=X,ie.lastBaseUpdate=M))}if(h!==null){var ue=f.baseState;v=0,ie=X=M=null,w=h;do{var $=w.lane&-536870913,W=$!==w.lane;if(W?(Ge&$)===$:(u&$)===$){$!==0&&$===ia&&(Vs=!0),ie!==null&&(ie=ie.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Se=e,ze=w;$=n;var ut=i;switch(ze.tag){case 1:if(Se=ze.payload,typeof Se=="function"){ue=Se.call(ut,ue,$);break e}ue=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=ze.payload,$=typeof Se=="function"?Se.call(ut,ue,$):Se,$==null)break e;ue=g({},ue,$);break e;case 2:ql=!0}}$=w.callback,$!==null&&(e.flags|=64,W&&(e.flags|=8192),W=f.callbacks,W===null?f.callbacks=[$]:W.push($))}else W={lane:$,tag:w.tag,payload:w.payload,callback:w.callback,next:null},ie===null?(X=ie=W,M=ue):ie=ie.next=W,v|=$;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;W=w,w=W.next,W.next=null,f.lastBaseUpdate=W,f.shared.pending=null}}while(!0);ie===null&&(M=ue),f.baseState=M,f.firstBaseUpdate=X,f.lastBaseUpdate=ie,h===null&&(f.shared.lanes=0),Xl|=v,e.lanes=v,e.memoizedState=ue}}function tm(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function nm(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)tm(i[e],n)}var oa=L(null),Au=L(0);function lm(e,n){e=El,T(Au,e),T(oa,n),El=e|n.baseLanes}function Fs(){T(Au,El),T(oa,oa.current)}function Is(){El=Au.current,Z(oa),Z(Au)}var hn=L(null),_n=null;function Vl(e){var n=e.alternate;T(wt,wt.current&1),T(hn,e),_n===null&&(n===null||oa.current!==null||n.memoizedState!==null)&&(_n=e)}function Qs(e){T(wt,wt.current),T(hn,e),_n===null&&(_n=e)}function im(e){e.tag===22?(T(wt,wt.current),T(hn,e),_n===null&&(_n=e)):Fl()}function Fl(){T(wt,wt.current),T(hn,hn.current)}function mn(e){Z(hn),_n===e&&(_n=null),Z(wt)}var wt=L(0);function _u(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Jc(i)||Wc(i)))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 ml=0,Me=null,at=null,Tt=null,Ru=!1,sa=!1,Oi=!1,zu=0,lr=0,ca=null,D1=0;function xt(){throw Error(r(321))}function Xs(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!fn(e[i],n[i]))return!1;return!0}function $s(e,n,i,u,f,h){return ml=h,Me=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,B.H=e===null||e.memoizedState===null?Ym:sc,Oi=!1,h=i(u,f),Oi=!1,sa&&(h=rm(n,i,u,f)),am(e),h}function am(e){B.H=rr;var n=at!==null&&at.next!==null;if(ml=0,Tt=at=Me=null,Ru=!1,lr=0,ca=null,n)throw Error(r(300));e===null||jt||(e=e.dependencies,e!==null&&Su(e)&&(jt=!0))}function rm(e,n,i,u){Me=e;var f=0;do{if(sa&&(ca=null),lr=0,sa=!1,25<=f)throw Error(r(301));if(f+=1,Tt=at=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}B.H=Gm,h=n(i,u)}while(sa);return h}function O1(){var e=B.H,n=e.useState()[0];return n=typeof n.then=="function"?ir(n):n,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Me.flags|=1024),n}function Ks(){var e=zu!==0;return zu=0,e}function Zs(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function Ps(e){if(Ru){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ru=!1}ml=0,Tt=at=Me=null,sa=!1,lr=zu=0,ca=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Me.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function kt(){if(at===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var n=Tt===null?Me.memoizedState:Tt.next;if(n!==null)Tt=n,at=e;else{if(e===null)throw Me.alternate===null?Error(r(467)):Error(r(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Tt===null?Me.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Nu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ir(e){var n=lr;return lr+=1,ca===null&&(ca=[]),e=Zh(ca,e,n),n=Me,(Tt===null?n.memoizedState:Tt.next)===null&&(n=n.alternate,B.H=n===null||n.memoizedState===null?Ym:sc),e}function Du(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ir(e);if(e.$$typeof===D)return qt(e)}throw Error(r(438,String(e)))}function Js(e){var n=null,i=Me.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var u=Me.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=Nu(),Me.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),u=0;u<e;u++)i[u]=R;return n.index++,i}function pl(e,n){return typeof n=="function"?n(e):n}function Ou(e){var n=kt();return Ws(n,at,e)}function Ws(e,n,i){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var f=e.baseQueue,h=u.pending;if(h!==null){if(f!==null){var v=f.next;f.next=h.next,h.next=v}n.baseQueue=f=h,u.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{n=f.next;var w=v=null,M=null,X=n,ie=!1;do{var ue=X.lane&-536870913;if(ue!==X.lane?(Ge&ue)===ue:(ml&ue)===ue){var $=X.revertLane;if($===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),ue===ia&&(ie=!0);else if((ml&$)===$){X=X.next,$===ia&&(ie=!0);continue}else ue={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},M===null?(w=M=ue,v=h):M=M.next=ue,Me.lanes|=$,Xl|=$;ue=X.action,Oi&&i(h,ue),h=X.hasEagerState?X.eagerState:i(h,ue)}else $={lane:ue,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},M===null?(w=M=$,v=h):M=M.next=$,Me.lanes|=ue,Xl|=ue;X=X.next}while(X!==null&&X!==n);if(M===null?v=h:M.next=w,!fn(h,e.memoizedState)&&(jt=!0,ie&&(i=aa,i!==null)))throw i;e.memoizedState=h,e.baseState=v,e.baseQueue=M,u.lastRenderedState=h}return f===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function ec(e){var n=kt(),i=n.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var u=i.dispatch,f=i.pending,h=n.memoizedState;if(f!==null){i.pending=null;var v=f=f.next;do h=e(h,v.action),v=v.next;while(v!==f);fn(h,n.memoizedState)||(jt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,u]}function um(e,n,i){var u=Me,f=kt(),h=$e;if(h){if(i===void 0)throw Error(r(407));i=i()}else i=n();var v=!fn((at||f).memoizedState,i);if(v&&(f.memoizedState=i,jt=!0),f=f.queue,lc(cm.bind(null,u,f,e),[e]),f.getSnapshot!==n||v||Tt!==null&&Tt.memoizedState.tag&1){if(u.flags|=2048,fa(9,{destroy:void 0},sm.bind(null,u,f,i,n),null),ot===null)throw Error(r(349));h||(ml&127)!==0||om(u,n,i)}return i}function om(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Me.updateQueue,n===null?(n=Nu(),Me.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function sm(e,n,i,u){n.value=i,n.getSnapshot=u,fm(n)&&dm(e)}function cm(e,n,i){return i(function(){fm(n)&&dm(e)})}function fm(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!fn(e,i)}catch{return!0}}function dm(e){var n=Ci(e,2);n!==null&&an(n,e,2)}function tc(e){var n=Kt();if(typeof e=="function"){var i=e;if(e=i(),Oi){Ut(!0);try{i()}finally{Ut(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:e},n}function hm(e,n,i,u){return e.baseState=i,Ws(e,at,typeof u=="function"?u:pl)}function M1(e,n,i,u,f){if(Uu(e))throw Error(r(485));if(e=n.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};B.T!==null?i(!0):h.isTransition=!1,u(h),i=n.pending,i===null?(h.next=n.pending=h,mm(n,h)):(h.next=i.next,n.pending=i.next=h)}}function mm(e,n){var i=n.action,u=n.payload,f=e.state;if(n.isTransition){var h=B.T,v={};B.T=v;try{var w=i(f,u),M=B.S;M!==null&&M(v,w),pm(e,n,w)}catch(X){nc(e,n,X)}finally{h!==null&&v.types!==null&&(h.types=v.types),B.T=h}}else try{h=i(f,u),pm(e,n,h)}catch(X){nc(e,n,X)}}function pm(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(u){gm(e,n,u)},function(u){return nc(e,n,u)}):gm(e,n,i)}function gm(e,n,i){n.status="fulfilled",n.value=i,ym(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,mm(e,i)))}function nc(e,n,i){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=i,ym(n),n=n.next;while(n!==u)}e.action=null}function ym(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function vm(e,n){return n}function bm(e,n){if($e){var i=ot.formState;if(i!==null){e:{var u=Me;if($e){if(ft){t:{for(var f=ft,h=An;f.nodeType!==8;){if(!h){f=null;break t}if(f=Rn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){ft=Rn(f.nextSibling),u=f.data==="F!";break e}}Bl(u)}u=!1}u&&(n=i[0])}}return i=Kt(),i.memoizedState=i.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:vm,lastRenderedState:n},i.queue=u,i=Bm.bind(null,Me,u),u.dispatch=i,u=tc(!1),h=oc.bind(null,Me,!1,u.queue),u=Kt(),f={state:n,dispatch:null,action:e,pending:null},u.queue=f,i=M1.bind(null,Me,f,h,i),f.dispatch=i,u.memoizedState=e,[n,i,!1]}function xm(e){var n=kt();return Sm(n,at,e)}function Sm(e,n,i){if(n=Ws(e,n,vm)[0],e=Ou(pl)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=ir(n)}catch(v){throw v===ra?ku:v}else u=n;n=kt();var f=n.queue,h=f.dispatch;return i!==n.memoizedState&&(Me.flags|=2048,fa(9,{destroy:void 0},L1.bind(null,f,i),null)),[u,h,e]}function L1(e,n){e.action=n}function Em(e){var n=kt(),i=at;if(i!==null)return Sm(n,i,e);kt(),n=n.memoizedState,i=kt();var u=i.queue.dispatch;return i.memoizedState=e,[n,u,!1]}function fa(e,n,i,u){return e={tag:e,create:i,deps:u,inst:n,next:null},n=Me.updateQueue,n===null&&(n=Nu(),Me.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(u=i.next,i.next=e,e.next=u,n.lastEffect=e),e}function wm(){return kt().memoizedState}function Mu(e,n,i,u){var f=Kt();Me.flags|=e,f.memoizedState=fa(1|n,{destroy:void 0},i,u===void 0?null:u)}function Lu(e,n,i,u){var f=kt();u=u===void 0?null:u;var h=f.memoizedState.inst;at!==null&&u!==null&&Xs(u,at.memoizedState.deps)?f.memoizedState=fa(n,h,i,u):(Me.flags|=e,f.memoizedState=fa(1|n,h,i,u))}function km(e,n){Mu(8390656,8,e,n)}function lc(e,n){Lu(2048,8,e,n)}function U1(e){Me.flags|=4;var n=Me.updateQueue;if(n===null)n=Nu(),Me.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function Cm(e){var n=kt().memoizedState;return U1({ref:n,nextImpl:e}),function(){if((et&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Tm(e,n){return Lu(4,2,e,n)}function jm(e,n){return Lu(4,4,e,n)}function Am(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function _m(e,n,i){i=i!=null?i.concat([e]):null,Lu(4,4,Am.bind(null,n,e),i)}function ic(){}function Rm(e,n){var i=kt();n=n===void 0?null:n;var u=i.memoizedState;return n!==null&&Xs(n,u[1])?u[0]:(i.memoizedState=[e,n],e)}function zm(e,n){var i=kt();n=n===void 0?null:n;var u=i.memoizedState;if(n!==null&&Xs(n,u[1]))return u[0];if(u=e(),Oi){Ut(!0);try{e()}finally{Ut(!1)}}return i.memoizedState=[u,n],u}function ac(e,n,i){return i===void 0||(ml&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=Np(),Me.lanes|=e,Xl|=e,i)}function Nm(e,n,i,u){return fn(i,n)?i:oa.current!==null?(e=ac(e,i,u),fn(e,n)||(jt=!0),e):(ml&42)===0||(ml&1073741824)!==0&&(Ge&261930)===0?(jt=!0,e.memoizedState=i):(e=Np(),Me.lanes|=e,Xl|=e,n)}function Dm(e,n,i,u,f){var h=ee.p;ee.p=h!==0&&8>h?h:8;var v=B.T,w={};B.T=w,oc(e,!1,n,i);try{var M=f(),X=B.S;if(X!==null&&X(w,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var ie=N1(M,u);ar(e,n,ie,yn(e))}else ar(e,n,u,yn(e))}catch(ue){ar(e,n,{then:function(){},status:"rejected",reason:ue},yn())}finally{ee.p=h,v!==null&&w.types!==null&&(v.types=w.types),B.T=v}}function B1(){}function rc(e,n,i,u){if(e.tag!==5)throw Error(r(476));var f=Om(e).queue;Dm(e,f,n,se,i===null?B1:function(){return Mm(e),i(u)})}function Om(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:se},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Mm(e){var n=Om(e);n.next===null&&(n=e.alternate.memoizedState),ar(e,n.next.queue,{},yn())}function uc(){return qt(Er)}function Lm(){return kt().memoizedState}function Um(){return kt().memoizedState}function H1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=yn();e=Yl(i);var u=Gl(n,e,i);u!==null&&(an(u,n,i),er(u,n,i)),n={cache:Ls()},e.payload=n;return}n=n.return}}function q1(e,n,i){var u=yn();i={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Uu(e)?Hm(n,i):(i=Cs(e,n,i,u),i!==null&&(an(i,e,u),qm(i,n,u)))}function Bm(e,n,i){var u=yn();ar(e,n,i,u)}function ar(e,n,i,u){var f={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Uu(e))Hm(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var v=n.lastRenderedState,w=h(v,i);if(f.hasEagerState=!0,f.eagerState=w,fn(w,v))return yu(e,n,f,0),ot===null&&gu(),!1}catch{}if(i=Cs(e,n,f,u),i!==null)return an(i,e,u),qm(i,n,u),!0}return!1}function oc(e,n,i,u){if(u={lane:2,revertLane:qc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Uu(e)){if(n)throw Error(r(479))}else n=Cs(e,i,u,2),n!==null&&an(n,e,2)}function Uu(e){var n=e.alternate;return e===Me||n!==null&&n===Me}function Hm(e,n){sa=Ru=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function qm(e,n,i){if((i&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,i|=u,n.lanes=i,O(e,i)}}var rr={readContext:qt,use:Du,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};rr.useEffectEvent=xt;var Ym={readContext:qt,use:Du,useCallback:function(e,n){return Kt().memoizedState=[e,n===void 0?null:n],e},useContext:qt,useEffect:km,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Mu(4194308,4,Am.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Mu(4194308,4,e,n)},useInsertionEffect:function(e,n){Mu(4,2,e,n)},useMemo:function(e,n){var i=Kt();n=n===void 0?null:n;var u=e();if(Oi){Ut(!0);try{e()}finally{Ut(!1)}}return i.memoizedState=[u,n],u},useReducer:function(e,n,i){var u=Kt();if(i!==void 0){var f=i(n);if(Oi){Ut(!0);try{i(n)}finally{Ut(!1)}}}else f=n;return u.memoizedState=u.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},u.queue=e,e=e.dispatch=q1.bind(null,Me,e),[u.memoizedState,e]},useRef:function(e){var n=Kt();return e={current:e},n.memoizedState=e},useState:function(e){e=tc(e);var n=e.queue,i=Bm.bind(null,Me,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:ic,useDeferredValue:function(e,n){var i=Kt();return ac(i,e,n)},useTransition:function(){var e=tc(!1);return e=Dm.bind(null,Me,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var u=Me,f=Kt();if($e){if(i===void 0)throw Error(r(407));i=i()}else{if(i=n(),ot===null)throw Error(r(349));(Ge&127)!==0||om(u,n,i)}f.memoizedState=i;var h={value:i,getSnapshot:n};return f.queue=h,km(cm.bind(null,u,h,e),[e]),u.flags|=2048,fa(9,{destroy:void 0},sm.bind(null,u,h,i,n),null),i},useId:function(){var e=Kt(),n=ot.identifierPrefix;if($e){var i=$n,u=Xn;i=(u&~(1<<32-tt(u)-1)).toString(32)+i,n="_"+n+"R_"+i,i=zu++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=D1++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:uc,useFormState:bm,useActionState:bm,useOptimistic:function(e){var n=Kt();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=oc.bind(null,Me,!0,i),i.dispatch=n,[e,n]},useMemoCache:Js,useCacheRefresh:function(){return Kt().memoizedState=H1.bind(null,Me)},useEffectEvent:function(e){var n=Kt(),i={impl:e};return n.memoizedState=i,function(){if((et&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},sc={readContext:qt,use:Du,useCallback:Rm,useContext:qt,useEffect:lc,useImperativeHandle:_m,useInsertionEffect:Tm,useLayoutEffect:jm,useMemo:zm,useReducer:Ou,useRef:wm,useState:function(){return Ou(pl)},useDebugValue:ic,useDeferredValue:function(e,n){var i=kt();return Nm(i,at.memoizedState,e,n)},useTransition:function(){var e=Ou(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:ir(e),n]},useSyncExternalStore:um,useId:Lm,useHostTransitionStatus:uc,useFormState:xm,useActionState:xm,useOptimistic:function(e,n){var i=kt();return hm(i,at,e,n)},useMemoCache:Js,useCacheRefresh:Um};sc.useEffectEvent=Cm;var Gm={readContext:qt,use:Du,useCallback:Rm,useContext:qt,useEffect:lc,useImperativeHandle:_m,useInsertionEffect:Tm,useLayoutEffect:jm,useMemo:zm,useReducer:ec,useRef:wm,useState:function(){return ec(pl)},useDebugValue:ic,useDeferredValue:function(e,n){var i=kt();return at===null?ac(i,e,n):Nm(i,at.memoizedState,e,n)},useTransition:function(){var e=ec(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:ir(e),n]},useSyncExternalStore:um,useId:Lm,useHostTransitionStatus:uc,useFormState:Em,useActionState:Em,useOptimistic:function(e,n){var i=kt();return at!==null?hm(i,at,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Js,useCacheRefresh:Um};Gm.useEffectEvent=Cm;function cc(e,n,i,u){n=e.memoizedState,i=i(u,n),i=i==null?n:g({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var fc={enqueueSetState:function(e,n,i){e=e._reactInternals;var u=yn(),f=Yl(u);f.payload=n,i!=null&&(f.callback=i),n=Gl(e,f,u),n!==null&&(an(n,e,u),er(n,e,u))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var u=yn(),f=Yl(u);f.tag=1,f.payload=n,i!=null&&(f.callback=i),n=Gl(e,f,u),n!==null&&(an(n,e,u),er(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=yn(),u=Yl(i);u.tag=2,n!=null&&(u.callback=n),n=Gl(e,u,i),n!==null&&(an(n,e,i),er(n,e,i))}};function Vm(e,n,i,u,f,h,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,h,v):n.prototype&&n.prototype.isPureReactComponent?!Qa(i,u)||!Qa(f,h):!0}function Fm(e,n,i,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,u),n.state!==e&&fc.enqueueReplaceState(n,n.state,null)}function Mi(e,n){var i=n;if("ref"in n){i={};for(var u in n)u!=="ref"&&(i[u]=n[u])}if(e=e.defaultProps){i===n&&(i=g({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function Im(e){pu(e)}function Qm(e){console.error(e)}function Xm(e){pu(e)}function Bu(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function $m(e,n,i){try{var u=e.onCaughtError;u(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function dc(e,n,i){return i=Yl(i),i.tag=3,i.payload={element:null},i.callback=function(){Bu(e,n)},i}function Km(e){return e=Yl(e),e.tag=3,e}function Zm(e,n,i,u){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var h=u.value;e.payload=function(){return f(h)},e.callback=function(){$m(n,i,u)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){$m(n,i,u),typeof f!="function"&&($l===null?$l=new Set([this]):$l.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function Y1(e,n,i,u,f){if(i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=i.alternate,n!==null&&la(n,i,f,!0),i=hn.current,i!==null){switch(i.tag){case 31:case 13:return _n===null?Zu():i.alternate===null&&St===0&&(St=3),i.flags&=-257,i.flags|=65536,i.lanes=f,u===Cu?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([u]):n.add(u),Uc(e,u,f)),!1;case 22:return i.flags|=65536,u===Cu?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([u]):i.add(u)),Uc(e,u,f)),!1}throw Error(r(435,i.tag))}return Uc(e,u,f),Zu(),!1}if($e)return n=hn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,u!==zs&&(e=Error(r(422),{cause:u}),Ka(Cn(e,i)))):(u!==zs&&(n=Error(r(423),{cause:u}),Ka(Cn(n,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,u=Cn(u,i),f=dc(e.stateNode,u,f),Gs(e,f),St!==4&&(St=2)),!1;var h=Error(r(520),{cause:u});if(h=Cn(h,i),mr===null?mr=[h]:mr.push(h),St!==4&&(St=2),n===null)return!0;u=Cn(u,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=dc(i.stateNode,u,e),Gs(i,e),!1;case 1:if(n=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&($l===null||!$l.has(h))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Km(f),Zm(f,e,i,u),Gs(i,f),!1}i=i.return}while(i!==null);return!1}var hc=Error(r(461)),jt=!1;function Yt(e,n,i,u){n.child=e===null?em(n,null,i,u):Di(n,e.child,i,u)}function Pm(e,n,i,u,f){i=i.render;var h=n.ref;if("ref"in u){var v={};for(var w in u)w!=="ref"&&(v[w]=u[w])}else v=u;return _i(n),u=$s(e,n,i,v,h,f),w=Ks(),e!==null&&!jt?(Zs(e,n,f),gl(e,n,f)):($e&&w&&_s(n),n.flags|=1,Yt(e,n,u,f),n.child)}function Jm(e,n,i,u,f){if(e===null){var h=i.type;return typeof h=="function"&&!Ts(h)&&h.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=h,Wm(e,n,h,u,f)):(e=bu(i.type,null,u,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!Sc(e,f)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:Qa,i(v,u)&&e.ref===n.ref)return gl(e,n,f)}return n.flags|=1,e=cl(h,u),e.ref=n.ref,e.return=n,n.child=e}function Wm(e,n,i,u,f){if(e!==null){var h=e.memoizedProps;if(Qa(h,u)&&e.ref===n.ref)if(jt=!1,n.pendingProps=u=h,Sc(e,f))(e.flags&131072)!==0&&(jt=!0);else return n.lanes=e.lanes,gl(e,n,f)}return mc(e,n,i,u,f)}function ep(e,n,i,u){var f=u.children,h=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,e!==null){for(u=n.child=e.child,f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;u=f&~h}else u=0,n.child=null;return tp(e,n,h,i,u)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&wu(n,h!==null?h.cachePool:null),h!==null?lm(n,h):Fs(),im(n);else return u=n.lanes=536870912,tp(e,n,h!==null?h.baseLanes|i:i,i,u)}else h!==null?(wu(n,h.cachePool),lm(n,h),Fl(),n.memoizedState=null):(e!==null&&wu(n,null),Fs(),Fl());return Yt(e,n,f,i),n.child}function ur(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function tp(e,n,i,u,f){var h=Bs();return h=h===null?null:{parent:Ct._currentValue,pool:h},n.memoizedState={baseLanes:i,cachePool:h},e!==null&&wu(n,null),Fs(),im(n),e!==null&&la(e,n,u,!0),n.childLanes=f,null}function Hu(e,n){return n=Yu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function np(e,n,i){return Di(n,e.child,null,i),e=Hu(n,n.pendingProps),e.flags|=2,mn(n),n.memoizedState=null,e}function G1(e,n,i){var u=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if($e){if(u.mode==="hidden")return e=Hu(n,u),n.lanes=536870912,ur(null,e);if(Qs(n),(e=ft)?(e=mg(e,An),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Xn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},i=Hh(e),i.return=n,n.child=i,Ht=n,ft=null)):e=null,e===null)throw Bl(n);return n.lanes=536870912,null}return Hu(n,u)}var h=e.memoizedState;if(h!==null){var v=h.dehydrated;if(Qs(n),f)if(n.flags&256)n.flags&=-257,n=np(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(jt||la(e,n,i,!1),f=(i&e.childLanes)!==0,jt||f){if(u=ot,u!==null&&(v=Y(u,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,Ci(e,v),an(u,e,v),hc;Zu(),n=np(e,n,i)}else e=h.treeContext,ft=Rn(v.nextSibling),Ht=n,$e=!0,Ul=null,An=!1,e!==null&&Gh(n,e),n=Hu(n,u),n.flags|=4096;return n}return e=cl(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function qu(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function mc(e,n,i,u,f){return _i(n),i=$s(e,n,i,u,void 0,f),u=Ks(),e!==null&&!jt?(Zs(e,n,f),gl(e,n,f)):($e&&u&&_s(n),n.flags|=1,Yt(e,n,i,f),n.child)}function lp(e,n,i,u,f,h){return _i(n),n.updateQueue=null,i=rm(n,u,i,f),am(e),u=Ks(),e!==null&&!jt?(Zs(e,n,h),gl(e,n,h)):($e&&u&&_s(n),n.flags|=1,Yt(e,n,i,h),n.child)}function ip(e,n,i,u,f){if(_i(n),n.stateNode===null){var h=Wi,v=i.contextType;typeof v=="object"&&v!==null&&(h=qt(v)),h=new i(u,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=fc,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=u,h.state=n.memoizedState,h.refs={},qs(n),v=i.contextType,h.context=typeof v=="object"&&v!==null?qt(v):Wi,h.state=n.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(cc(n,i,v,u),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&fc.enqueueReplaceState(h,h.state,null),nr(n,u,h,f),tr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){h=n.stateNode;var w=n.memoizedProps,M=Mi(i,w);h.props=M;var X=h.context,ie=i.contextType;v=Wi,typeof ie=="object"&&ie!==null&&(v=qt(ie));var ue=i.getDerivedStateFromProps;ie=typeof ue=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,ie||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||X!==v)&&Fm(n,h,u,v),ql=!1;var $=n.memoizedState;h.state=$,nr(n,u,h,f),tr(),X=n.memoizedState,w||$!==X||ql?(typeof ue=="function"&&(cc(n,i,ue,u),X=n.memoizedState),(M=ql||Vm(n,i,M,u,$,X,v))?(ie||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=X),h.props=u,h.state=X,h.context=v,u=M):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{h=n.stateNode,Ys(e,n),v=n.memoizedProps,ie=Mi(i,v),h.props=ie,ue=n.pendingProps,$=h.context,X=i.contextType,M=Wi,typeof X=="object"&&X!==null&&(M=qt(X)),w=i.getDerivedStateFromProps,(X=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==ue||$!==M)&&Fm(n,h,u,M),ql=!1,$=n.memoizedState,h.state=$,nr(n,u,h,f),tr();var W=n.memoizedState;v!==ue||$!==W||ql||e!==null&&e.dependencies!==null&&Su(e.dependencies)?(typeof w=="function"&&(cc(n,i,w,u),W=n.memoizedState),(ie=ql||Vm(n,i,ie,u,$,W,M)||e!==null&&e.dependencies!==null&&Su(e.dependencies))?(X||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(u,W,M),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(u,W,M)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=W),h.props=u,h.state=W,h.context=M,u=ie):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=1024),u=!1)}return h=u,qu(e,n),u=(n.flags&128)!==0,h||u?(h=n.stateNode,i=u&&typeof i.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&u?(n.child=Di(n,e.child,null,f),n.child=Di(n,null,i,f)):Yt(e,n,i,f),n.memoizedState=h.state,e=n.child):e=gl(e,n,f),e}function ap(e,n,i,u){return ji(),n.flags|=256,Yt(e,n,i,u),n.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:$h()}}function yc(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=gn),e}function rp(e,n,i){var u=n.pendingProps,f=!1,h=(n.flags&128)!==0,v;if((v=h)||(v=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if($e){if(f?Vl(n):Fl(),(e=ft)?(e=mg(e,An),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Xn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},i=Hh(e),i.return=n,n.child=i,Ht=n,ft=null)):e=null,e===null)throw Bl(n);return Wc(e)?n.lanes=32:n.lanes=536870912,null}var w=u.children;return u=u.fallback,f?(Fl(),f=n.mode,w=Yu({mode:"hidden",children:w},f),u=Ti(u,f,i,null),w.return=n,u.return=n,w.sibling=u,n.child=w,u=n.child,u.memoizedState=gc(i),u.childLanes=yc(e,v,i),n.memoizedState=pc,ur(null,u)):(Vl(n),vc(n,w))}var M=e.memoizedState;if(M!==null&&(w=M.dehydrated,w!==null)){if(h)n.flags&256?(Vl(n),n.flags&=-257,n=bc(e,n,i)):n.memoizedState!==null?(Fl(),n.child=e.child,n.flags|=128,n=null):(Fl(),w=u.fallback,f=n.mode,u=Yu({mode:"visible",children:u.children},f),w=Ti(w,f,i,null),w.flags|=2,u.return=n,w.return=n,u.sibling=w,n.child=u,Di(n,e.child,null,i),u=n.child,u.memoizedState=gc(i),u.childLanes=yc(e,v,i),n.memoizedState=pc,n=ur(null,u));else if(Vl(n),Wc(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var X=v.dgst;v=X,u=Error(r(419)),u.stack="",u.digest=v,Ka({value:u,source:null,stack:null}),n=bc(e,n,i)}else if(jt||la(e,n,i,!1),v=(i&e.childLanes)!==0,jt||v){if(v=ot,v!==null&&(u=Y(v,i),u!==0&&u!==M.retryLane))throw M.retryLane=u,Ci(e,u),an(v,e,u),hc;Jc(w)||Zu(),n=bc(e,n,i)}else Jc(w)?(n.flags|=192,n.child=e.child,n=null):(e=M.treeContext,ft=Rn(w.nextSibling),Ht=n,$e=!0,Ul=null,An=!1,e!==null&&Gh(n,e),n=vc(n,u.children),n.flags|=4096);return n}return f?(Fl(),w=u.fallback,f=n.mode,M=e.child,X=M.sibling,u=cl(M,{mode:"hidden",children:u.children}),u.subtreeFlags=M.subtreeFlags&65011712,X!==null?w=cl(X,w):(w=Ti(w,f,i,null),w.flags|=2),w.return=n,u.return=n,u.sibling=w,n.child=u,ur(null,u),u=n.child,w=e.child.memoizedState,w===null?w=gc(i):(f=w.cachePool,f!==null?(M=Ct._currentValue,f=f.parent!==M?{parent:M,pool:M}:f):f=$h(),w={baseLanes:w.baseLanes|i,cachePool:f}),u.memoizedState=w,u.childLanes=yc(e,v,i),n.memoizedState=pc,ur(e.child,u)):(Vl(n),i=e.child,e=i.sibling,i=cl(i,{mode:"visible",children:u.children}),i.return=n,i.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=i,n.memoizedState=null,i)}function vc(e,n){return n=Yu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Yu(e,n){return e=dn(22,e,null,n),e.lanes=0,e}function bc(e,n,i){return Di(n,e.child,null,i),e=vc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function up(e,n,i){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),Os(e.return,n,i)}function xc(e,n,i,u,f,h){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:i,tailMode:f,treeForkCount:h}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=u,v.tail=i,v.tailMode=f,v.treeForkCount=h)}function op(e,n,i){var u=n.pendingProps,f=u.revealOrder,h=u.tail;u=u.children;var v=wt.current,w=(v&2)!==0;if(w?(v=v&1|2,n.flags|=128):v&=1,T(wt,v),Yt(e,n,u,i),u=$e?$a:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&up(e,i,n);else if(e.tag===19)up(e,i,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(f){case"forwards":for(i=n.child,f=null;i!==null;)e=i.alternate,e!==null&&_u(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=n.child,n.child=null):(f=i.sibling,i.sibling=null),xc(n,!1,f,i,h,u);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&_u(e)===null){n.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}xc(n,!0,i,null,h,u);break;case"together":xc(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function gl(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Xl|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(la(e,n,i,!1),(i&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,i=cl(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=cl(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Sc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Su(e)))}function V1(e,n,i){switch(n.tag){case 3:pe(n,n.stateNode.containerInfo),Hl(n,Ct,e.memoizedState.cache),ji();break;case 27:case 5:zt(n);break;case 4:pe(n,n.stateNode.containerInfo);break;case 10:Hl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Qs(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Vl(n),n.flags|=128,null):(i&n.child.childLanes)!==0?rp(e,n,i):(Vl(n),e=gl(e,n,i),e!==null?e.sibling:null);Vl(n);break;case 19:var f=(e.flags&128)!==0;if(u=(i&n.childLanes)!==0,u||(la(e,n,i,!1),u=(i&n.childLanes)!==0),f){if(u)return op(e,n,i);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),T(wt,wt.current),u)break;return null;case 22:return n.lanes=0,ep(e,n,i,n.pendingProps);case 24:Hl(n,Ct,e.memoizedState.cache)}return gl(e,n,i)}function sp(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)jt=!0;else{if(!Sc(e,i)&&(n.flags&128)===0)return jt=!1,V1(e,n,i);jt=(e.flags&131072)!==0}else jt=!1,$e&&(n.flags&1048576)!==0&&Yh(n,$a,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=zi(n.elementType),n.type=e,typeof e=="function")Ts(e)?(u=Mi(e,u),n.tag=1,n=ip(null,n,e,u,i)):(n.tag=0,n=mc(null,n,e,u,i));else{if(e!=null){var f=e.$$typeof;if(f===te){n.tag=11,n=Pm(null,n,e,u,i);break e}else if(f===_){n.tag=14,n=Jm(null,n,e,u,i);break e}}throw n=le(e)||e,Error(r(306,n,""))}}return n;case 0:return mc(e,n,n.type,n.pendingProps,i);case 1:return u=n.type,f=Mi(u,n.pendingProps),ip(e,n,u,f,i);case 3:e:{if(pe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var h=n.memoizedState;f=h.element,Ys(e,n),nr(n,u,null,i);var v=n.memoizedState;if(u=v.cache,Hl(n,Ct,u),u!==h.cache&&Ms(n,[Ct],i,!0),tr(),u=v.element,h.isDehydrated)if(h={element:u,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=ap(e,n,u,i);break e}else if(u!==f){f=Cn(Error(r(424)),n),Ka(f),n=ap(e,n,u,i);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ft=Rn(e.firstChild),Ht=n,$e=!0,Ul=null,An=!0,i=em(n,null,u,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ji(),u===f){n=gl(e,n,i);break e}Yt(e,n,u,i)}n=n.child}return n;case 26:return qu(e,n),e===null?(i=xg(n.type,null,n.pendingProps,null))?n.memoizedState=i:$e||(i=n.type,e=n.pendingProps,u=lo(be.current).createElement(i),u[me]=n,u[ye]=e,Gt(u,i,e),ht(u),n.stateNode=u):n.memoizedState=xg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return zt(n),e===null&&$e&&(u=n.stateNode=yg(n.type,n.pendingProps,be.current),Ht=n,An=!0,f=ft,Jl(n.type)?(ef=f,ft=Rn(u.firstChild)):ft=f),Yt(e,n,n.pendingProps.children,i),qu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&$e&&((f=u=ft)&&(u=bx(u,n.type,n.pendingProps,An),u!==null?(n.stateNode=u,Ht=n,ft=Rn(u.firstChild),An=!1,f=!0):f=!1),f||Bl(n)),zt(n),f=n.type,h=n.pendingProps,v=e!==null?e.memoizedProps:null,u=h.children,Kc(f,h)?u=null:v!==null&&Kc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=$s(e,n,O1,null,null,i),Er._currentValue=f),qu(e,n),Yt(e,n,u,i),n.child;case 6:return e===null&&$e&&((e=i=ft)&&(i=xx(i,n.pendingProps,An),i!==null?(n.stateNode=i,Ht=n,ft=null,e=!0):e=!1),e||Bl(n)),null;case 13:return rp(e,n,i);case 4:return pe(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=Di(n,null,u,i):Yt(e,n,u,i),n.child;case 11:return Pm(e,n,n.type,n.pendingProps,i);case 7:return Yt(e,n,n.pendingProps,i),n.child;case 8:return Yt(e,n,n.pendingProps.children,i),n.child;case 12:return Yt(e,n,n.pendingProps.children,i),n.child;case 10:return u=n.pendingProps,Hl(n,n.type,u.value),Yt(e,n,u.children,i),n.child;case 9:return f=n.type._context,u=n.pendingProps.children,_i(n),f=qt(f),u=u(f),n.flags|=1,Yt(e,n,u,i),n.child;case 14:return Jm(e,n,n.type,n.pendingProps,i);case 15:return Wm(e,n,n.type,n.pendingProps,i);case 19:return op(e,n,i);case 31:return G1(e,n,i);case 22:return ep(e,n,i,n.pendingProps);case 24:return _i(n),u=qt(Ct),e===null?(f=Bs(),f===null&&(f=ot,h=Ls(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=i),f=h),n.memoizedState={parent:u,cache:f},qs(n),Hl(n,Ct,f)):((e.lanes&i)!==0&&(Ys(e,n),nr(n,null,null,i),tr()),f=e.memoizedState,h=n.memoizedState,f.parent!==u?(f={parent:u,cache:u},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Hl(n,Ct,u)):(u=h.cache,Hl(n,Ct,u),u!==f.cache&&Ms(n,[Ct],i,!0))),Yt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function yl(e){e.flags|=4}function Ec(e,n,i,u,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Lp())e.flags|=8192;else throw Ni=Cu,Hs}else e.flags&=-16777217}function cp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cg(n))if(Lp())e.flags|=8192;else throw Ni=Cu,Hs}function Gu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?vi():536870912,e.lanes|=n,pa|=n)}function or(e,n){if(!$e)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function dt(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,u=0;if(n)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=u,e.childLanes=i,n}function F1(e,n,i){var u=n.pendingProps;switch(Rs(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return dt(n),null;case 3:return i=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),hl(Ct),Re(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(na(n)?yl(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Ns())),dt(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(yl(n),h!==null?(dt(n),cp(n,h)):(dt(n),Ec(n,f,null,u,i))):h?h!==e.memoizedState?(yl(n),dt(n),cp(n,h)):(dt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&yl(n),dt(n),Ec(n,f,e,u,i)),null;case 27:if(Ln(n),i=be.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return dt(n),null}e=ce.current,na(n)?Vh(n):(e=yg(f,u,i),n.stateNode=e,yl(n))}return dt(n),null;case 5:if(Ln(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return dt(n),null}if(h=ce.current,na(n))Vh(n);else{var v=lo(be.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof u.is=="string"?v.createElement("select",{is:u.is}):v.createElement("select"),u.multiple?h.multiple=!0:u.size&&(h.size=u.size);break;default:h=typeof u.is=="string"?v.createElement(f,{is:u.is}):v.createElement(f)}}h[me]=n,h[ye]=u;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=h;e:switch(Gt(h,f,u),f){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&yl(n)}}return dt(n),Ec(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=be.current,na(n)){if(e=n.stateNode,i=n.memoizedProps,u=null,f=Ht,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}e[me]=n,e=!!(e.nodeValue===i||u!==null&&u.suppressHydrationWarning===!0||rg(e.nodeValue,i)),e||Bl(n,!0)}else e=lo(e).createTextNode(u),e[me]=n,n.stateNode=e}return dt(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(u=na(n),i!==null){if(e===null){if(!u)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[me]=n}else ji(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),e=!1}else i=Ns(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(mn(n),n):(mn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return dt(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=na(n),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[me]=n}else ji(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),f=!1}else f=Ns(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(mn(n),n):(mn(n),null)}return mn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=u!==null,e=e!==null&&e.memoizedState!==null,i&&(u=n.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),h=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(h=u.memoizedState.cachePool.pool),h!==f&&(u.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),Gu(n,n.updateQueue),dt(n),null);case 4:return Re(),e===null&&Fc(n.stateNode.containerInfo),dt(n),null;case 10:return hl(n.type),dt(n),null;case 19:if(Z(wt),u=n.memoizedState,u===null)return dt(n),null;if(f=(n.flags&128)!==0,h=u.rendering,h===null)if(f)or(u,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=_u(e),h!==null){for(n.flags|=128,or(u,!1),e=h.updateQueue,n.updateQueue=e,Gu(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)Bh(i,e),i=i.sibling;return T(wt,wt.current&1|2),$e&&fl(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&pt()>Xu&&(n.flags|=128,f=!0,or(u,!1),n.lanes=4194304)}else{if(!f)if(e=_u(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Gu(n,e),or(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!$e)return dt(n),null}else 2*pt()-u.renderingStartTime>Xu&&i!==536870912&&(n.flags|=128,f=!0,or(u,!1),n.lanes=4194304);u.isBackwards?(h.sibling=n.child,n.child=h):(e=u.last,e!==null?e.sibling=h:n.child=h,u.last=h)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=pt(),e.sibling=null,i=wt.current,T(wt,f?i&1|2:i&1),$e&&fl(n,u.treeForkCount),e):(dt(n),null);case 22:case 23:return mn(n),Is(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(i&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),i=n.updateQueue,i!==null&&Gu(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==i&&(n.flags|=2048),e!==null&&Z(Ri),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),hl(Ct),dt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function I1(e,n){switch(Rs(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return hl(Ct),Re(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ln(n),null;case 31:if(n.memoizedState!==null){if(mn(n),n.alternate===null)throw Error(r(340));ji()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(mn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ji()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Z(wt),null;case 4:return Re(),null;case 10:return hl(n.type),null;case 22:case 23:return mn(n),Is(),e!==null&&Z(Ri),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return hl(Ct),null;case 25:return null;default:return null}}function fp(e,n){switch(Rs(n),n.tag){case 3:hl(Ct),Re();break;case 26:case 27:case 5:Ln(n);break;case 4:Re();break;case 31:n.memoizedState!==null&&mn(n);break;case 13:mn(n);break;case 19:Z(wt);break;case 10:hl(n.type);break;case 22:case 23:mn(n),Is(),e!==null&&Z(Ri);break;case 24:hl(Ct)}}function sr(e,n){try{var i=n.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var f=u.next;i=f;do{if((i.tag&e)===e){u=void 0;var h=i.create,v=i.inst;u=h(),v.destroy=u}i=i.next}while(i!==f)}}catch(w){it(n,n.return,w)}}function Il(e,n,i){try{var u=n.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var h=f.next;u=h;do{if((u.tag&e)===e){var v=u.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,f=n;var M=i,X=w;try{X()}catch(ie){it(f,M,ie)}}}u=u.next}while(u!==h)}}catch(ie){it(n,n.return,ie)}}function dp(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{nm(n,i)}catch(u){it(e,e.return,u)}}}function hp(e,n,i){i.props=Mi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(u){it(e,n,u)}}function cr(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof i=="function"?e.refCleanup=i(u):i.current=u}}catch(f){it(e,n,f)}}function Kn(e,n){var i=e.ref,u=e.refCleanup;if(i!==null)if(typeof u=="function")try{u()}catch(f){it(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){it(e,n,f)}else i.current=null}function mp(e){var n=e.type,i=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&u.focus();break e;case"img":i.src?u.src=i.src:i.srcSet&&(u.srcset=i.srcSet)}}catch(f){it(e,e.return,f)}}function wc(e,n,i){try{var u=e.stateNode;hx(u,e.type,i,n),u[ye]=n}catch(f){it(e,e.return,f)}}function pp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Jl(e.type)||e.tag===4}function kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pp(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&&Jl(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 Cc(e,n,i){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=ol));else if(u!==4&&(u===27&&Jl(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(Cc(e,n,i),e=e.sibling;e!==null;)Cc(e,n,i),e=e.sibling}function Vu(e,n,i){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(u!==4&&(u===27&&Jl(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Vu(e,n,i),e=e.sibling;e!==null;)Vu(e,n,i),e=e.sibling}function gp(e){var n=e.stateNode,i=e.memoizedProps;try{for(var u=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Gt(n,u,i),n[me]=e,n[ye]=i}catch(h){it(e,e.return,h)}}var vl=!1,At=!1,Tc=!1,yp=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function Q1(e,n){if(e=e.containerInfo,Xc=co,e=_h(e),bs(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var u=i.getSelection&&i.getSelection();if(u&&u.rangeCount!==0){i=u.anchorNode;var f=u.anchorOffset,h=u.focusNode;u=u.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var v=0,w=-1,M=-1,X=0,ie=0,ue=e,$=null;t:for(;;){for(var W;ue!==i||f!==0&&ue.nodeType!==3||(w=v+f),ue!==h||u!==0&&ue.nodeType!==3||(M=v+u),ue.nodeType===3&&(v+=ue.nodeValue.length),(W=ue.firstChild)!==null;)$=ue,ue=W;for(;;){if(ue===e)break t;if($===i&&++X===f&&(w=v),$===h&&++ie===u&&(M=v),(W=ue.nextSibling)!==null)break;ue=$,$=ue.parentNode}ue=W}i=w===-1||M===-1?null:{start:w,end:M}}else i=null}i=i||{start:0,end:0}}else i=null;for($c={focusedElem:e,selectionRange:i},co=!1,Mt=n;Mt!==null;)if(n=Mt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Mt=e;else for(;Mt!==null;){switch(n=Mt,h=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(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,i=n,f=h.memoizedProps,h=h.memoizedState,u=i.stateNode;try{var Se=Mi(i.type,f);e=u.getSnapshotBeforeUpdate(Se,h),u.__reactInternalSnapshotBeforeUpdate=e}catch(ze){it(i,i.return,ze)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)Pc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pc(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,Mt=e;break}Mt=n.return}}function vp(e,n,i){var u=i.flags;switch(i.tag){case 0:case 11:case 15:xl(e,i),u&4&&sr(5,i);break;case 1:if(xl(e,i),u&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(v){it(i,i.return,v)}else{var f=Mi(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){it(i,i.return,v)}}u&64&&dp(i),u&512&&cr(i,i.return);break;case 3:if(xl(e,i),u&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{nm(e,n)}catch(v){it(i,i.return,v)}}break;case 27:n===null&&u&4&&gp(i);case 26:case 5:xl(e,i),n===null&&u&4&&mp(i),u&512&&cr(i,i.return);break;case 12:xl(e,i);break;case 31:xl(e,i),u&4&&Sp(e,i);break;case 13:xl(e,i),u&4&&Ep(e,i),u&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=tx.bind(null,i),Sx(e,i))));break;case 22:if(u=i.memoizedState!==null||vl,!u){n=n!==null&&n.memoizedState!==null||At,f=vl;var h=At;vl=u,(At=n)&&!h?Sl(e,i,(i.subtreeFlags&8772)!==0):xl(e,i),vl=f,At=h}break;case 30:break;default:xl(e,i)}}function bp(e){var n=e.alternate;n!==null&&(e.alternate=null,bp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&vt(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 mt=null,en=!1;function bl(e,n,i){for(i=i.child;i!==null;)xp(e,n,i),i=i.sibling}function xp(e,n,i){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Lt,i)}catch{}switch(i.tag){case 26:At||Kn(i,n),bl(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:At||Kn(i,n);var u=mt,f=en;Jl(i.type)&&(mt=i.stateNode,en=!1),bl(e,n,i),br(i.stateNode),mt=u,en=f;break;case 5:At||Kn(i,n);case 6:if(u=mt,f=en,mt=null,bl(e,n,i),mt=u,en=f,mt!==null)if(en)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(i.stateNode)}catch(h){it(i,n,h)}else try{mt.removeChild(i.stateNode)}catch(h){it(i,n,h)}break;case 18:mt!==null&&(en?(e=mt,dg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),wa(e)):dg(mt,i.stateNode));break;case 4:u=mt,f=en,mt=i.stateNode.containerInfo,en=!0,bl(e,n,i),mt=u,en=f;break;case 0:case 11:case 14:case 15:Il(2,i,n),At||Il(4,i,n),bl(e,n,i);break;case 1:At||(Kn(i,n),u=i.stateNode,typeof u.componentWillUnmount=="function"&&hp(i,n,u)),bl(e,n,i);break;case 21:bl(e,n,i);break;case 22:At=(u=At)||i.memoizedState!==null,bl(e,n,i),At=u;break;default:bl(e,n,i)}}function Sp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wa(e)}catch(i){it(n,n.return,i)}}}function Ep(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wa(e)}catch(i){it(n,n.return,i)}}function X1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new yp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new yp),n;default:throw Error(r(435,e.tag))}}function Fu(e,n){var i=X1(e);n.forEach(function(u){if(!i.has(u)){i.add(u);var f=nx.bind(null,e,u);u.then(f,f)}})}function tn(e,n){var i=n.deletions;if(i!==null)for(var u=0;u<i.length;u++){var f=i[u],h=e,v=n,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(Jl(w.type)){mt=w.stateNode,en=!1;break e}break;case 5:mt=w.stateNode,en=!1;break e;case 3:case 4:mt=w.stateNode.containerInfo,en=!0;break e}w=w.return}if(mt===null)throw Error(r(160));xp(h,v,f),mt=null,en=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)wp(n,e),n=n.sibling}var Vn=null;function wp(e,n){var i=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(n,e),nn(e),u&4&&(Il(3,e,e.return),sr(3,e),Il(5,e,e.return));break;case 1:tn(n,e),nn(e),u&512&&(At||i===null||Kn(i,i.return)),u&64&&vl&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?u:i.concat(u))));break;case 26:var f=Vn;if(tn(n,e),nn(e),u&512&&(At||i===null||Kn(i,i.return)),u&4){var h=i!==null?i.memoizedState:null;if(u=e.memoizedState,i===null)if(u===null)if(e.stateNode===null){e:{u=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":h=f.getElementsByTagName("title")[0],(!h||h[gt]||h[me]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(u),f.head.insertBefore(h,f.querySelector("head > title"))),Gt(h,u,i),h[me]=e,ht(h),u=h;break e;case"link":var v=wg("link","href",f).get(u+(i.href||""));if(v){for(var w=0;w<v.length;w++)if(h=v[w],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(w,1);break t}}h=f.createElement(u),Gt(h,u,i),f.head.appendChild(h);break;case"meta":if(v=wg("meta","content",f).get(u+(i.content||""))){for(w=0;w<v.length;w++)if(h=v[w],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(w,1);break t}}h=f.createElement(u),Gt(h,u,i),f.head.appendChild(h);break;default:throw Error(r(468,u))}h[me]=e,ht(h),u=h}e.stateNode=u}else kg(f,e.type,e.stateNode);else e.stateNode=Eg(f,u,e.memoizedProps);else h!==u?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,u===null?kg(f,e.type,e.stateNode):Eg(f,u,e.memoizedProps)):u===null&&e.stateNode!==null&&wc(e,e.memoizedProps,i.memoizedProps)}break;case 27:tn(n,e),nn(e),u&512&&(At||i===null||Kn(i,i.return)),i!==null&&u&4&&wc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(tn(n,e),nn(e),u&512&&(At||i===null||Kn(i,i.return)),e.flags&32){f=e.stateNode;try{Qi(f,"")}catch(Se){it(e,e.return,Se)}}u&4&&e.stateNode!=null&&(f=e.memoizedProps,wc(e,f,i!==null?i.memoizedProps:f)),u&1024&&(Tc=!0);break;case 6:if(tn(n,e),nn(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,i=e.stateNode;try{i.nodeValue=u}catch(Se){it(e,e.return,Se)}}break;case 3:if(ro=null,f=Vn,Vn=io(n.containerInfo),tn(n,e),Vn=f,nn(e),u&4&&i!==null&&i.memoizedState.isDehydrated)try{wa(n.containerInfo)}catch(Se){it(e,e.return,Se)}Tc&&(Tc=!1,kp(e));break;case 4:u=Vn,Vn=io(e.stateNode.containerInfo),tn(n,e),nn(e),Vn=u;break;case 12:tn(n,e),nn(e);break;case 31:tn(n,e),nn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 13:tn(n,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Qu=pt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 22:f=e.memoizedState!==null;var M=i!==null&&i.memoizedState!==null,X=vl,ie=At;if(vl=X||f,At=ie||M,tn(n,e),At=ie,vl=X,nn(e),u&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(i===null||M||vl||At||Li(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){M=i=n;try{if(h=M.stateNode,f)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=M.stateNode;var ue=M.memoizedProps.style,$=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;w.style.display=$==null||typeof $=="boolean"?"":(""+$).trim()}}catch(Se){it(M,M.return,Se)}}}else if(n.tag===6){if(i===null){M=n;try{M.stateNode.nodeValue=f?"":M.memoizedProps}catch(Se){it(M,M.return,Se)}}}else if(n.tag===18){if(i===null){M=n;try{var W=M.stateNode;f?hg(W,!0):hg(M.stateNode,!1)}catch(Se){it(M,M.return,Se)}}}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;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(i=u.retryQueue,i!==null&&(u.retryQueue=null,Fu(e,i))));break;case 19:tn(n,e),nn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 30:break;case 21:break;default:tn(n,e),nn(e)}}function nn(e){var n=e.flags;if(n&2){try{for(var i,u=e.return;u!==null;){if(pp(u)){i=u;break}u=u.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var f=i.stateNode,h=kc(e);Vu(e,h,f);break;case 5:var v=i.stateNode;i.flags&32&&(Qi(v,""),i.flags&=-33);var w=kc(e);Vu(e,w,v);break;case 3:case 4:var M=i.stateNode.containerInfo,X=kc(e);Cc(e,X,M);break;default:throw Error(r(161))}}catch(ie){it(e,e.return,ie)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function kp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;kp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function xl(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)vp(e,n.alternate,n),n=n.sibling}function Li(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Il(4,n,n.return),Li(n);break;case 1:Kn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&hp(n,n.return,i),Li(n);break;case 27:br(n.stateNode);case 26:case 5:Kn(n,n.return),Li(n);break;case 22:n.memoizedState===null&&Li(n);break;case 30:Li(n);break;default:Li(n)}e=e.sibling}}function Sl(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,f=e,h=n,v=h.flags;switch(h.tag){case 0:case 11:case 15:Sl(f,h,i),sr(4,h);break;case 1:if(Sl(f,h,i),u=h,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(X){it(u,u.return,X)}if(u=h,f=u.updateQueue,f!==null){var w=u.stateNode;try{var M=f.shared.hiddenCallbacks;if(M!==null)for(f.shared.hiddenCallbacks=null,f=0;f<M.length;f++)tm(M[f],w)}catch(X){it(u,u.return,X)}}i&&v&64&&dp(h),cr(h,h.return);break;case 27:gp(h);case 26:case 5:Sl(f,h,i),i&&u===null&&v&4&&mp(h),cr(h,h.return);break;case 12:Sl(f,h,i);break;case 31:Sl(f,h,i),i&&v&4&&Sp(f,h);break;case 13:Sl(f,h,i),i&&v&4&&Ep(f,h);break;case 22:h.memoizedState===null&&Sl(f,h,i),cr(h,h.return);break;case 30:break;default:Sl(f,h,i)}n=n.sibling}}function jc(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Za(i))}function Ac(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Za(e))}function Fn(e,n,i,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Cp(e,n,i,u),n=n.sibling}function Cp(e,n,i,u){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Fn(e,n,i,u),f&2048&&sr(9,n);break;case 1:Fn(e,n,i,u);break;case 3:Fn(e,n,i,u),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Za(e)));break;case 12:if(f&2048){Fn(e,n,i,u),e=n.stateNode;try{var h=n.memoizedProps,v=h.id,w=h.onPostCommit;typeof w=="function"&&w(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){it(n,n.return,M)}}else Fn(e,n,i,u);break;case 31:Fn(e,n,i,u);break;case 13:Fn(e,n,i,u);break;case 23:break;case 22:h=n.stateNode,v=n.alternate,n.memoizedState!==null?h._visibility&2?Fn(e,n,i,u):fr(e,n):h._visibility&2?Fn(e,n,i,u):(h._visibility|=2,da(e,n,i,u,(n.subtreeFlags&10256)!==0||!1)),f&2048&&jc(v,n);break;case 24:Fn(e,n,i,u),f&2048&&Ac(n.alternate,n);break;default:Fn(e,n,i,u)}}function da(e,n,i,u,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,v=n,w=i,M=u,X=v.flags;switch(v.tag){case 0:case 11:case 15:da(h,v,w,M,f),sr(8,v);break;case 23:break;case 22:var ie=v.stateNode;v.memoizedState!==null?ie._visibility&2?da(h,v,w,M,f):fr(h,v):(ie._visibility|=2,da(h,v,w,M,f)),f&&X&2048&&jc(v.alternate,v);break;case 24:da(h,v,w,M,f),f&&X&2048&&Ac(v.alternate,v);break;default:da(h,v,w,M,f)}n=n.sibling}}function fr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,u=n,f=u.flags;switch(u.tag){case 22:fr(i,u),f&2048&&jc(u.alternate,u);break;case 24:fr(i,u),f&2048&&Ac(u.alternate,u);break;default:fr(i,u)}n=n.sibling}}var dr=8192;function ha(e,n,i){if(e.subtreeFlags&dr)for(e=e.child;e!==null;)Tp(e,n,i),e=e.sibling}function Tp(e,n,i){switch(e.tag){case 26:ha(e,n,i),e.flags&dr&&e.memoizedState!==null&&Dx(i,Vn,e.memoizedState,e.memoizedProps);break;case 5:ha(e,n,i);break;case 3:case 4:var u=Vn;Vn=io(e.stateNode.containerInfo),ha(e,n,i),Vn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=dr,dr=16777216,ha(e,n,i),dr=u):ha(e,n,i));break;default:ha(e,n,i)}}function jp(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 hr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var u=n[i];Mt=u,_p(u,e)}jp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ap(e),e=e.sibling}function Ap(e){switch(e.tag){case 0:case 11:case 15:hr(e),e.flags&2048&&Il(9,e,e.return);break;case 3:hr(e);break;case 12:hr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Iu(e)):hr(e);break;default:hr(e)}}function Iu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var u=n[i];Mt=u,_p(u,e)}jp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Il(8,n,n.return),Iu(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,Iu(n));break;default:Iu(n)}e=e.sibling}}function _p(e,n){for(;Mt!==null;){var i=Mt;switch(i.tag){case 0:case 11:case 15:Il(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var u=i.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Za(i.memoizedState.cache)}if(u=i.child,u!==null)u.return=i,Mt=u;else e:for(i=e;Mt!==null;){u=Mt;var f=u.sibling,h=u.return;if(bp(u),u===i){Mt=null;break e}if(f!==null){f.return=h,Mt=f;break e}Mt=h}}}var $1={getCacheForType:function(e){var n=qt(Ct),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return qt(Ct).controller.signal}},K1=typeof WeakMap=="function"?WeakMap:Map,et=0,ot=null,He=null,Ge=0,lt=0,pn=null,Ql=!1,ma=!1,_c=!1,El=0,St=0,Xl=0,Ui=0,Rc=0,gn=0,pa=0,mr=null,ln=null,zc=!1,Qu=0,Rp=0,Xu=1/0,$u=null,$l=null,Nt=0,Kl=null,ga=null,wl=0,Nc=0,Dc=null,zp=null,pr=0,Oc=null;function yn(){return(et&2)!==0&&Ge!==0?Ge&-Ge:B.T!==null?qc():he()}function Np(){if(gn===0)if((Ge&536870912)===0||$e){var e=pi;pi<<=1,(pi&3932160)===0&&(pi=262144),gn=e}else gn=536870912;return e=hn.current,e!==null&&(e.flags|=32),gn}function an(e,n,i){(e===ot&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(ya(e,0),Zl(e,Ge,gn,!1)),Ol(e,i),((et&2)===0||e!==ot)&&(e===ot&&((et&2)===0&&(Ui|=i),St===4&&Zl(e,Ge,gn,!1)),Zn(e))}function Dp(e,n,i){if((et&6)!==0)throw Error(r(327));var u=!i&&(n&127)===0&&(n&e.expiredLanes)===0||yi(e,n),f=u?J1(e,n):Lc(e,n,!0),h=u;do{if(f===0){ma&&!u&&Zl(e,n,0,!1);break}else{if(i=e.current.alternate,h&&!Z1(i)){f=Lc(e,n,!1),h=!1;continue}if(f===2){if(h=n,e.errorRecoveryDisabledLanes&h)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var w=e;f=mr;var M=w.current.memoizedState.isDehydrated;if(M&&(ya(w,v).flags|=256),v=Lc(w,v,!1),v!==2){if(_c&&!M){w.errorRecoveryDisabledLanes|=h,Ui|=h,f=4;break e}h=ln,ln=f,h!==null&&(ln===null?ln=h:ln.push.apply(ln,h))}f=v}if(h=!1,f!==2)continue}}if(f===1){ya(e,0),Zl(e,n,0,!0);break}e:{switch(u=e,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Zl(u,n,gn,!Ql);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=Qu+300-pt(),10<f)){if(Zl(u,n,gn,!Ql),gi(u,0,!0)!==0)break e;wl=n,u.timeoutHandle=cg(Op.bind(null,u,i,ln,$u,zc,n,gn,Ui,pa,Ql,h,"Throttled",-0,0),f);break e}Op(u,i,ln,$u,zc,n,gn,Ui,pa,Ql,h,null,-0,0)}}break}while(!0);Zn(e)}function Op(e,n,i,u,f,h,v,w,M,X,ie,ue,$,W){if(e.timeoutHandle=-1,ue=n.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},Tp(n,h,ue);var Se=(h&62914560)===h?Qu-pt():(h&4194048)===h?Rp-pt():0;if(Se=Ox(ue,Se),Se!==null){wl=h,e.cancelPendingCommit=Se(Gp.bind(null,e,n,h,i,u,f,v,w,M,ie,ue,null,$,W)),Zl(e,h,v,!X);return}}Gp(e,n,h,i,u,f,v,w,M)}function Z1(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var u=0;u<i.length;u++){var f=i[u],h=f.getSnapshot;f=f.value;try{if(!fn(h(),f))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;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 Zl(e,n,i,u){n&=~Rc,n&=~Ui,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var f=n;0<f;){var h=31-tt(f),v=1<<h;u[h]=-1,f&=~v}i!==0&&au(e,i,n)}function Ku(){return(et&6)===0?(gr(0),!1):!0}function Mc(){if(He!==null){if(lt===0)var e=He.return;else e=He,dl=Ai=null,Ps(e),ua=null,Ja=0,e=He;for(;e!==null;)fp(e.alternate,e),e=e.return;He=null}}function ya(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,gx(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),wl=0,Mc(),ot=e,He=i=cl(e.current,null),Ge=n,lt=0,pn=null,Ql=!1,ma=yi(e,n),_c=!1,pa=gn=Rc=Ui=Xl=St=0,ln=mr=null,zc=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var f=31-tt(u),h=1<<f;n|=e[f],u&=~h}return El=n,gu(),i}function Mp(e,n){Me=null,B.H=rr,n===ra||n===ku?(n=Ph(),lt=3):n===Hs?(n=Ph(),lt=4):lt=n===hc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,pn=n,He===null&&(St=1,Bu(e,Cn(n,e.current)))}function Lp(){var e=hn.current;return e===null?!0:(Ge&4194048)===Ge?_n===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===_n:!1}function Up(){var e=B.H;return B.H=rr,e===null?rr:e}function Bp(){var e=B.A;return B.A=$1,e}function Zu(){St=4,Ql||(Ge&4194048)!==Ge&&hn.current!==null||(ma=!0),(Xl&134217727)===0&&(Ui&134217727)===0||ot===null||Zl(ot,Ge,gn,!1)}function Lc(e,n,i){var u=et;et|=2;var f=Up(),h=Bp();(ot!==e||Ge!==n)&&($u=null,ya(e,n)),n=!1;var v=St;e:do try{if(lt!==0&&He!==null){var w=He,M=pn;switch(lt){case 8:Mc(),v=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(n=!0);var X=lt;if(lt=0,pn=null,va(e,w,M,X),i&&ma){v=0;break e}break;default:X=lt,lt=0,pn=null,va(e,w,M,X)}}P1(),v=St;break}catch(ie){Mp(e,ie)}while(!0);return n&&e.shellSuspendCounter++,dl=Ai=null,et=u,B.H=f,B.A=h,He===null&&(ot=null,Ge=0,gu()),v}function P1(){for(;He!==null;)Hp(He)}function J1(e,n){var i=et;et|=2;var u=Up(),f=Bp();ot!==e||Ge!==n?($u=null,Xu=pt()+500,ya(e,n)):ma=yi(e,n);e:do try{if(lt!==0&&He!==null){n=He;var h=pn;t:switch(lt){case 1:lt=0,pn=null,va(e,n,h,1);break;case 2:case 9:if(Kh(h)){lt=0,pn=null,qp(n);break}n=function(){lt!==2&<!==9||ot!==e||(lt=7),Zn(e)},h.then(n,n);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Kh(h)?(lt=0,pn=null,qp(n)):(lt=0,pn=null,va(e,n,h,7));break;case 5:var v=null;switch(He.tag){case 26:v=He.memoizedState;case 5:case 27:var w=He;if(v?Cg(v):w.stateNode.complete){lt=0,pn=null;var M=w.sibling;if(M!==null)He=M;else{var X=w.return;X!==null?(He=X,Pu(X)):He=null}break t}}lt=0,pn=null,va(e,n,h,5);break;case 6:lt=0,pn=null,va(e,n,h,6);break;case 8:Mc(),St=6;break e;default:throw Error(r(462))}}W1();break}catch(ie){Mp(e,ie)}while(!0);return dl=Ai=null,B.H=u,B.A=f,et=i,He!==null?0:(ot=null,Ge=0,gu(),St)}function W1(){for(;He!==null&&!La();)Hp(He)}function Hp(e){var n=sp(e.alternate,e,El);e.memoizedProps=e.pendingProps,n===null?Pu(e):He=n}function qp(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=lp(i,n,n.pendingProps,n.type,void 0,Ge);break;case 11:n=lp(i,n,n.pendingProps,n.type.render,n.ref,Ge);break;case 5:Ps(n);default:fp(i,n),n=He=Bh(n,El),n=sp(i,n,El)}e.memoizedProps=e.pendingProps,n===null?Pu(e):He=n}function va(e,n,i,u){dl=Ai=null,Ps(n),ua=null,Ja=0;var f=n.return;try{if(Y1(e,f,n,i,Ge)){St=1,Bu(e,Cn(i,e.current)),He=null;return}}catch(h){if(f!==null)throw He=f,h;St=1,Bu(e,Cn(i,e.current)),He=null;return}n.flags&32768?($e||u===1?e=!0:ma||(Ge&536870912)!==0?e=!1:(Ql=e=!0,(u===2||u===9||u===3||u===6)&&(u=hn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Yp(n,e)):Pu(n)}function Pu(e){var n=e;do{if((n.flags&32768)!==0){Yp(n,Ql);return}e=n.return;var i=F1(n.alternate,n,El);if(i!==null){He=i;return}if(n=n.sibling,n!==null){He=n;return}He=n=e}while(n!==null);St===0&&(St=5)}function Yp(e,n){do{var i=I1(e.alternate,e);if(i!==null){i.flags&=32767,He=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){He=e;return}He=e=i}while(e!==null);St=6,He=null}function Gp(e,n,i,u,f,h,v,w,M){e.cancelPendingCommit=null;do Ju();while(Nt!==0);if((et&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(h=n.lanes|n.childLanes,h|=ks,ls(e,i,h,v,w,M),e===ot&&(He=ot=null,Ge=0),ga=n,Kl=e,wl=i,Nc=h,Dc=f,zp=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,lx(Ce,function(){return Xp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=B.T,B.T=null,f=ee.p,ee.p=2,v=et,et|=4;try{Q1(e,n,i)}finally{et=v,ee.p=f,B.T=u}}Nt=1,Vp(),Fp(),Ip()}}function Vp(){if(Nt===1){Nt=0;var e=Kl,n=ga,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=B.T,B.T=null;var u=ee.p;ee.p=2;var f=et;et|=4;try{wp(n,e);var h=$c,v=_h(e.containerInfo),w=h.focusedElem,M=h.selectionRange;if(v!==w&&w&&w.ownerDocument&&Ah(w.ownerDocument.documentElement,w)){if(M!==null&&bs(w)){var X=M.start,ie=M.end;if(ie===void 0&&(ie=X),"selectionStart"in w)w.selectionStart=X,w.selectionEnd=Math.min(ie,w.value.length);else{var ue=w.ownerDocument||document,$=ue&&ue.defaultView||window;if($.getSelection){var W=$.getSelection(),Se=w.textContent.length,ze=Math.min(M.start,Se),ut=M.end===void 0?ze:Math.min(M.end,Se);!W.extend&&ze>ut&&(v=ut,ut=ze,ze=v);var q=jh(w,ze),U=jh(w,ut);if(q&&U&&(W.rangeCount!==1||W.anchorNode!==q.node||W.anchorOffset!==q.offset||W.focusNode!==U.node||W.focusOffset!==U.offset)){var Q=ue.createRange();Q.setStart(q.node,q.offset),W.removeAllRanges(),ze>ut?(W.addRange(Q),W.extend(U.node,U.offset)):(Q.setEnd(U.node,U.offset),W.addRange(Q))}}}}for(ue=[],W=w;W=W.parentNode;)W.nodeType===1&&ue.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ue.length;w++){var re=ue[w];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}co=!!Xc,$c=Xc=null}finally{et=f,ee.p=u,B.T=i}}e.current=n,Nt=2}}function Fp(){if(Nt===2){Nt=0;var e=Kl,n=ga,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=B.T,B.T=null;var u=ee.p;ee.p=2;var f=et;et|=4;try{vp(e,n.alternate,n)}finally{et=f,ee.p=u,B.T=i}}Nt=3}}function Ip(){if(Nt===4||Nt===3){Nt=0,Ua();var e=Kl,n=ga,i=wl,u=zp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Nt=5:(Nt=0,ga=Kl=null,Qp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&($l=null),oe(i),n=n.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Lt,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=B.T,f=ee.p,ee.p=2,B.T=null;try{for(var h=e.onRecoverableError,v=0;v<u.length;v++){var w=u[v];h(w.value,{componentStack:w.stack})}}finally{B.T=n,ee.p=f}}(wl&3)!==0&&Ju(),Zn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Oc?pr++:(pr=0,Oc=e):pr=0,gr(0)}}function Qp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Za(n)))}function Ju(){return Vp(),Fp(),Ip(),Xp()}function Xp(){if(Nt!==5)return!1;var e=Kl,n=Nc;Nc=0;var i=oe(wl),u=B.T,f=ee.p;try{ee.p=32>i?32:i,B.T=null,i=Dc,Dc=null;var h=Kl,v=wl;if(Nt=0,ga=Kl=null,wl=0,(et&6)!==0)throw Error(r(331));var w=et;if(et|=4,Ap(h.current),Cp(h,h.current,v,i),et=w,gr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Lt,h)}catch{}return!0}finally{ee.p=f,B.T=u,Qp(e,n)}}function $p(e,n,i){n=Cn(i,n),n=dc(e.stateNode,n,2),e=Gl(e,n,2),e!==null&&(Ol(e,2),Zn(e))}function it(e,n,i){if(e.tag===3)$p(e,e,i);else for(;n!==null;){if(n.tag===3){$p(n,e,i);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&($l===null||!$l.has(u))){e=Cn(i,e),i=Km(2),u=Gl(n,i,2),u!==null&&(Zm(i,u,n,e),Ol(u,2),Zn(u));break}}n=n.return}}function Uc(e,n,i){var u=e.pingCache;if(u===null){u=e.pingCache=new K1;var f=new Set;u.set(n,f)}else f=u.get(n),f===void 0&&(f=new Set,u.set(n,f));f.has(i)||(_c=!0,f.add(i),e=ex.bind(null,e,n,i),n.then(e,e))}function ex(e,n,i){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ot===e&&(Ge&i)===i&&(St===4||St===3&&(Ge&62914560)===Ge&&300>pt()-Qu?(et&2)===0&&ya(e,0):Rc|=i,pa===Ge&&(pa=0)),Zn(e)}function Kp(e,n){n===0&&(n=vi()),e=Ci(e,n),e!==null&&(Ol(e,n),Zn(e))}function tx(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Kp(e,i)}function nx(e,n){var i=0;switch(e.tag){case 31:case 13:var u=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(n),Kp(e,i)}function lx(e,n){return zl(e,n)}var Wu=null,ba=null,Bc=!1,eo=!1,Hc=!1,Pl=0;function Zn(e){e!==ba&&e.next===null&&(ba===null?Wu=ba=e:ba=ba.next=e),eo=!0,Bc||(Bc=!0,ax())}function gr(e,n){if(!Hc&&eo){Hc=!0;do for(var i=!1,u=Wu;u!==null;){if(e!==0){var f=u.pendingLanes;if(f===0)var h=0;else{var v=u.suspendedLanes,w=u.pingedLanes;h=(1<<31-tt(42|e)+1)-1,h&=f&~(v&~w),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,Wp(u,h))}else h=Ge,h=gi(u,u===ot?h:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(h&3)===0||yi(u,h)||(i=!0,Wp(u,h));u=u.next}while(i);Hc=!1}}function ix(){Zp()}function Zp(){eo=Bc=!1;var e=0;Pl!==0&&px()&&(e=Pl);for(var n=pt(),i=null,u=Wu;u!==null;){var f=u.next,h=Pp(u,n);h===0?(u.next=null,i===null?Wu=f:i.next=f,f===null&&(ba=i)):(i=u,(e!==0||(h&3)!==0)&&(eo=!0)),u=f}Nt!==0&&Nt!==5||gr(e),Pl!==0&&(Pl=0)}function Pp(e,n){for(var i=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var v=31-tt(h),w=1<<v,M=f[v];M===-1?((w&i)===0||(w&u)!==0)&&(f[v]=iu(w,n)):M<=n&&(e.expiredLanes|=w),h&=~w}if(n=ot,i=Ge,i=gi(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,i===0||e===n&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&mi(u),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||yi(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(u!==null&&mi(u),oe(i)){case 2:case 8:i=de;break;case 32:i=Ce;break;case 268435456:i=Pe;break;default:i=Ce}return u=Jp.bind(null,e),i=zl(i,u),e.callbackPriority=n,e.callbackNode=i,n}return u!==null&&u!==null&&mi(u),e.callbackPriority=2,e.callbackNode=null,2}function Jp(e,n){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Ju()&&e.callbackNode!==i)return null;var u=Ge;return u=gi(e,e===ot?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(Dp(e,u,n),Pp(e,pt()),e.callbackNode!=null&&e.callbackNode===i?Jp.bind(null,e):null)}function Wp(e,n){if(Ju())return null;Dp(e,n,!0)}function ax(){yx(function(){(et&6)!==0?zl(ae,ix):Zp()})}function qc(){if(Pl===0){var e=ia;e===0&&(e=al,al<<=1,(al&261888)===0&&(al=256)),Pl=e}return Pl}function eg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ou(""+e)}function tg(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function rx(e,n,i,u,f){if(n==="submit"&&i&&i.stateNode===f){var h=eg((f[ye]||null).action),v=u.submitter;v&&(n=(n=v[ye]||null)?eg(n.formAction):v.getAttribute("formAction"),n!==null&&(h=n,v=null));var w=new du("action","action",null,u,f);e.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Pl!==0){var M=v?tg(f,v):new FormData(f);rc(i,{pending:!0,data:M,method:f.method,action:h},null,M)}}else typeof h=="function"&&(w.preventDefault(),M=v?tg(f,v):new FormData(f),rc(i,{pending:!0,data:M,method:f.method,action:h},h,M))},currentTarget:f}]})}}for(var Yc=0;Yc<ws.length;Yc++){var Gc=ws[Yc],ux=Gc.toLowerCase(),ox=Gc[0].toUpperCase()+Gc.slice(1);Gn(ux,"on"+ox)}Gn(Nh,"onAnimationEnd"),Gn(Dh,"onAnimationIteration"),Gn(Oh,"onAnimationStart"),Gn("dblclick","onDoubleClick"),Gn("focusin","onFocus"),Gn("focusout","onBlur"),Gn(k1,"onTransitionRun"),Gn(C1,"onTransitionStart"),Gn(T1,"onTransitionCancel"),Gn(Mh,"onTransitionEnd"),En("onMouseEnter",["mouseout","mouseover"]),En("onMouseLeave",["mouseout","mouseover"]),En("onPointerEnter",["pointerout","pointerover"]),En("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var yr="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(" "),sx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yr));function ng(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var u=e[i],f=u.event;u=u.listeners;e:{var h=void 0;if(n)for(var v=u.length-1;0<=v;v--){var w=u[v],M=w.instance,X=w.currentTarget;if(w=w.listener,M!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=X;try{h(f)}catch(ie){pu(ie)}f.currentTarget=null,h=M}else for(v=0;v<u.length;v++){if(w=u[v],M=w.instance,X=w.currentTarget,w=w.listener,M!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=X;try{h(f)}catch(ie){pu(ie)}f.currentTarget=null,h=M}}}}function qe(e,n){var i=n[Ae];i===void 0&&(i=n[Ae]=new Set);var u=e+"__bubble";i.has(u)||(lg(n,e,2,!1),i.add(u))}function Vc(e,n,i){var u=0;n&&(u|=4),lg(i,e,u,n)}var to="_reactListening"+Math.random().toString(36).slice(2);function Fc(e){if(!e[to]){e[to]=!0,Hn.forEach(function(i){i!=="selectionchange"&&(sx.has(i)||Vc(i,!1,e),Vc(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[to]||(n[to]=!0,Vc("selectionchange",!1,n))}}function lg(e,n,i,u){switch(Ng(n)){case 2:var f=Ux;break;case 8:f=Bx;break;default:f=rf}i=f.bind(null,n,i,e),f=void 0,!cs||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),u?f!==void 0?e.addEventListener(n,i,{capture:!0,passive:f}):e.addEventListener(n,i,!0):f!==void 0?e.addEventListener(n,i,{passive:f}):e.addEventListener(n,i,!1)}function Ic(e,n,i,u,f){var h=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var w=u.stateNode.containerInfo;if(w===f)break;if(v===4)for(v=u.return;v!==null;){var M=v.tag;if((M===3||M===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;w!==null;){if(v=bt(w),v===null)return;if(M=v.tag,M===5||M===6||M===26||M===27){u=h=v;continue e}w=w.parentNode}}u=u.return}oh(function(){var X=h,ie=os(i),ue=[];e:{var $=Lh.get(e);if($!==void 0){var W=du,Se=e;switch(e){case"keypress":if(cu(i)===0)break e;case"keydown":case"keyup":W=n1;break;case"focusin":Se="focus",W=ms;break;case"focusout":Se="blur",W=ms;break;case"beforeblur":case"afterblur":W=ms;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=fh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=Fb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=a1;break;case Nh:case Dh:case Oh:W=Xb;break;case Mh:W=u1;break;case"scroll":case"scrollend":W=Gb;break;case"wheel":W=s1;break;case"copy":case"cut":case"paste":W=Kb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=hh;break;case"toggle":case"beforetoggle":W=f1}var ze=(n&4)!==0,ut=!ze&&(e==="scroll"||e==="scrollend"),q=ze?$!==null?$+"Capture":null:$;ze=[];for(var U=X,Q;U!==null;){var re=U;if(Q=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||Q===null||q===null||(re=Ha(U,q),re!=null&&ze.push(vr(U,re,Q))),ut)break;U=U.return}0<ze.length&&($=new W($,Se,null,i,ie),ue.push({event:$,listeners:ze}))}}if((n&7)===0){e:{if($=e==="mouseover"||e==="pointerover",W=e==="mouseout"||e==="pointerout",$&&i!==us&&(Se=i.relatedTarget||i.fromElement)&&(bt(Se)||Se[we]))break e;if((W||$)&&($=ie.window===ie?ie:($=ie.ownerDocument)?$.defaultView||$.parentWindow:window,W?(Se=i.relatedTarget||i.toElement,W=X,Se=Se?bt(Se):null,Se!==null&&(ut=s(Se),ze=Se.tag,Se!==ut||ze!==5&&ze!==27&&ze!==6)&&(Se=null)):(W=null,Se=X),W!==Se)){if(ze=fh,re="onMouseLeave",q="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(ze=hh,re="onPointerLeave",q="onPointerEnter",U="pointer"),ut=W==null?$:Ot(W),Q=Se==null?$:Ot(Se),$=new ze(re,U+"leave",W,i,ie),$.target=ut,$.relatedTarget=Q,re=null,bt(ie)===X&&(ze=new ze(q,U+"enter",Se,i,ie),ze.target=Q,ze.relatedTarget=ut,re=ze),ut=re,W&&Se)t:{for(ze=cx,q=W,U=Se,Q=0,re=q;re;re=ze(re))Q++;re=0;for(var je=U;je;je=ze(je))re++;for(;0<Q-re;)q=ze(q),Q--;for(;0<re-Q;)U=ze(U),re--;for(;Q--;){if(q===U||U!==null&&q===U.alternate){ze=q;break t}q=ze(q),U=ze(U)}ze=null}else ze=null;W!==null&&ig(ue,$,W,ze,!1),Se!==null&&ut!==null&&ig(ue,ut,Se,ze,!0)}}e:{if($=X?Ot(X):window,W=$.nodeName&&$.nodeName.toLowerCase(),W==="select"||W==="input"&&$.type==="file")var Je=Sh;else if(bh($))if(Eh)Je=S1;else{Je=b1;var Ee=v1}else W=$.nodeName,!W||W.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?X&&rs(X.elementType)&&(Je=Sh):Je=x1;if(Je&&(Je=Je(e,X))){xh(ue,Je,i,ie);break e}Ee&&Ee(e,$,X),e==="focusout"&&X&&$.type==="number"&&X.memoizedProps.value!=null&&as($,"number",$.value)}switch(Ee=X?Ot(X):window,e){case"focusin":(bh(Ee)||Ee.contentEditable==="true")&&(Zi=Ee,xs=X,Xa=null);break;case"focusout":Xa=xs=Zi=null;break;case"mousedown":Ss=!0;break;case"contextmenu":case"mouseup":case"dragend":Ss=!1,Rh(ue,i,ie);break;case"selectionchange":if(w1)break;case"keydown":case"keyup":Rh(ue,i,ie)}var Le;if(gs)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Ki?yh(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(mh&&i.locale!=="ko"&&(Ki||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Ki&&(Le=sh()):(Ml=ie,fs="value"in Ml?Ml.value:Ml.textContent,Ki=!0)),Ee=no(X,Ve),0<Ee.length&&(Ve=new dh(Ve,e,null,i,ie),ue.push({event:Ve,listeners:Ee}),Le?Ve.data=Le:(Le=vh(i),Le!==null&&(Ve.data=Le)))),(Le=h1?m1(e,i):p1(e,i))&&(Ve=no(X,"onBeforeInput"),0<Ve.length&&(Ee=new dh("onBeforeInput","beforeinput",null,i,ie),ue.push({event:Ee,listeners:Ve}),Ee.data=Le)),rx(ue,e,X,i,ie)}ng(ue,n)})}function vr(e,n,i){return{instance:e,listener:n,currentTarget:i}}function no(e,n){for(var i=n+"Capture",u=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Ha(e,i),f!=null&&u.unshift(vr(e,f,h)),f=Ha(e,n),f!=null&&u.push(vr(e,f,h))),e.tag===3)return u;e=e.return}return[]}function cx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ig(e,n,i,u,f){for(var h=n._reactName,v=[];i!==null&&i!==u;){var w=i,M=w.alternate,X=w.stateNode;if(w=w.tag,M!==null&&M===u)break;w!==5&&w!==26&&w!==27||X===null||(M=X,f?(X=Ha(i,h),X!=null&&v.unshift(vr(i,X,M))):f||(X=Ha(i,h),X!=null&&v.push(vr(i,X,M)))),i=i.return}v.length!==0&&e.push({event:n,listeners:v})}var fx=/\r\n?/g,dx=/\u0000|\uFFFD/g;function ag(e){return(typeof e=="string"?e:""+e).replace(fx,`
|
|
9
|
-
`).replace(dx,"")}function rg(e,n){return n=ag(n),ag(e)===n}function rt(e,n,i,u,f,h){switch(i){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Qi(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Qi(e,""+u);break;case"className":Yn(e,"class",u);break;case"tabIndex":Yn(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Yn(e,i,u);break;case"style":rh(e,u,h);break;case"data":if(n!=="object"){Yn(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(i);break}u=ou(""+u),e.setAttribute(i,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(i,"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 h=="function"&&(i==="formAction"?(n!=="input"&&rt(e,n,"name",f.name,f,null),rt(e,n,"formEncType",f.formEncType,f,null),rt(e,n,"formMethod",f.formMethod,f,null),rt(e,n,"formTarget",f.formTarget,f,null)):(rt(e,n,"encType",f.encType,f,null),rt(e,n,"method",f.method,f,null),rt(e,n,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(i);break}u=ou(""+u),e.setAttribute(i,u);break;case"onClick":u!=null&&(e.onclick=ol);break;case"onScroll":u!=null&&qe("scroll",e);break;case"onScrollEnd":u!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(i=u.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}i=ou(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(i,""+u):e.removeAttribute(i);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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":u===!0?e.setAttribute(i,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(i,u):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(i,u):e.removeAttribute(i);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(i):e.setAttribute(i,u);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Et(e,"popover",u);break;case"xlinkActuate":Bt(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Bt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Bt(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Bt(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Bt(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Bt(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Bt(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Et(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=qb.get(i)||i,Et(e,i,u))}}function Qc(e,n,i,u,f,h){switch(i){case"style":rh(e,u,h);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(i=u.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof u=="string"?Qi(e,u):(typeof u=="number"||typeof u=="bigint")&&Qi(e,""+u);break;case"onScroll":u!=null&&qe("scroll",e);break;case"onScrollEnd":u!=null&&qe("scrollend",e);break;case"onClick":u!=null&&(e.onclick=ol);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!cn.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),n=i.slice(2,f?i.length-7:void 0),h=e[ye]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(n,h,f),typeof u=="function")){typeof h!="function"&&h!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,u,f);break e}i in e?e[i]=u:u===!0?e.setAttribute(i,""):Et(e,i,u)}}}function Gt(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var u=!1,f=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,h,v,i,null)}}f&&rt(e,n,"srcSet",i.srcSet,i,null),u&&rt(e,n,"src",i.src,i,null);return;case"input":qe("invalid",e);var w=h=v=f=null,M=null,X=null;for(u in i)if(i.hasOwnProperty(u)){var ie=i[u];if(ie!=null)switch(u){case"name":f=ie;break;case"type":v=ie;break;case"checked":M=ie;break;case"defaultChecked":X=ie;break;case"value":h=ie;break;case"defaultValue":w=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,n));break;default:rt(e,n,u,ie,i,null)}}nh(e,h,w,M,X,v,f,!1);return;case"select":qe("invalid",e),u=v=h=null;for(f in i)if(i.hasOwnProperty(f)&&(w=i[f],w!=null))switch(f){case"value":h=w;break;case"defaultValue":v=w;break;case"multiple":u=w;default:rt(e,n,f,w,i,null)}n=h,i=v,e.multiple=!!u,n!=null?Ii(e,!!u,n,!1):i!=null&&Ii(e,!!u,i,!0);return;case"textarea":qe("invalid",e),h=f=u=null;for(v in i)if(i.hasOwnProperty(v)&&(w=i[v],w!=null))switch(v){case"value":u=w;break;case"defaultValue":f=w;break;case"children":h=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:rt(e,n,v,w,i,null)}ih(e,u,f,h);return;case"option":for(M in i)i.hasOwnProperty(M)&&(u=i[M],u!=null)&&(M==="selected"?e.selected=u&&typeof u!="function"&&typeof u!="symbol":rt(e,n,M,u,i,null));return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(u=0;u<yr.length;u++)qe(yr[u],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("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(X in i)if(i.hasOwnProperty(X)&&(u=i[X],u!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,X,u,i,null)}return;default:if(rs(n)){for(ie in i)i.hasOwnProperty(ie)&&(u=i[ie],u!==void 0&&Qc(e,n,ie,u,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(u=i[w],u!=null&&rt(e,n,w,u,i,null))}function hx(e,n,i,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,v=null,w=null,M=null,X=null,ie=null;for(W in i){var ue=i[W];if(i.hasOwnProperty(W)&&ue!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":M=ue;default:u.hasOwnProperty(W)||rt(e,n,W,null,u,ue)}}for(var $ in u){var W=u[$];if(ue=i[$],u.hasOwnProperty($)&&(W!=null||ue!=null))switch($){case"type":h=W;break;case"name":f=W;break;case"checked":X=W;break;case"defaultChecked":ie=W;break;case"value":v=W;break;case"defaultValue":w=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(r(137,n));break;default:W!==ue&&rt(e,n,$,W,u,ue)}}is(e,v,w,M,X,ie,h,f);return;case"select":W=v=w=$=null;for(h in i)if(M=i[h],i.hasOwnProperty(h)&&M!=null)switch(h){case"value":break;case"multiple":W=M;default:u.hasOwnProperty(h)||rt(e,n,h,null,u,M)}for(f in u)if(h=u[f],M=i[f],u.hasOwnProperty(f)&&(h!=null||M!=null))switch(f){case"value":$=h;break;case"defaultValue":w=h;break;case"multiple":v=h;default:h!==M&&rt(e,n,f,h,u,M)}n=w,i=v,u=W,$!=null?Ii(e,!!i,$,!1):!!u!=!!i&&(n!=null?Ii(e,!!i,n,!0):Ii(e,!!i,i?[]:"",!1));return;case"textarea":W=$=null;for(w in i)if(f=i[w],i.hasOwnProperty(w)&&f!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:rt(e,n,w,null,u,f)}for(v in u)if(f=u[v],h=i[v],u.hasOwnProperty(v)&&(f!=null||h!=null))switch(v){case"value":$=f;break;case"defaultValue":W=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&rt(e,n,v,f,u,h)}lh(e,$,W);return;case"option":for(var Se in i)$=i[Se],i.hasOwnProperty(Se)&&$!=null&&!u.hasOwnProperty(Se)&&(Se==="selected"?e.selected=!1:rt(e,n,Se,null,u,$));for(M in u)$=u[M],W=i[M],u.hasOwnProperty(M)&&$!==W&&($!=null||W!=null)&&(M==="selected"?e.selected=$&&typeof $!="function"&&typeof $!="symbol":rt(e,n,M,$,u,W));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 ze in i)$=i[ze],i.hasOwnProperty(ze)&&$!=null&&!u.hasOwnProperty(ze)&&rt(e,n,ze,null,u,$);for(X in u)if($=u[X],W=i[X],u.hasOwnProperty(X)&&$!==W&&($!=null||W!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,n));break;default:rt(e,n,X,$,u,W)}return;default:if(rs(n)){for(var ut in i)$=i[ut],i.hasOwnProperty(ut)&&$!==void 0&&!u.hasOwnProperty(ut)&&Qc(e,n,ut,void 0,u,$);for(ie in u)$=u[ie],W=i[ie],!u.hasOwnProperty(ie)||$===W||$===void 0&&W===void 0||Qc(e,n,ie,$,u,W);return}}for(var q in i)$=i[q],i.hasOwnProperty(q)&&$!=null&&!u.hasOwnProperty(q)&&rt(e,n,q,null,u,$);for(ue in u)$=u[ue],W=i[ue],!u.hasOwnProperty(ue)||$===W||$==null&&W==null||rt(e,n,ue,$,u,W)}function ug(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function mx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),u=0;u<i.length;u++){var f=i[u],h=f.transferSize,v=f.initiatorType,w=f.duration;if(h&&w&&ug(v)){for(v=0,w=f.responseEnd,u+=1;u<i.length;u++){var M=i[u],X=M.startTime;if(X>w)break;var ie=M.transferSize,ue=M.initiatorType;ie&&ug(ue)&&(M=M.responseEnd,v+=ie*(M<w?1:(w-X)/(M-X)))}if(--u,n+=8*(h+v)/(f.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 Xc=null,$c=null;function lo(e){return e.nodeType===9?e:e.ownerDocument}function og(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 sg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Kc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Zc=null;function px(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var cg=typeof setTimeout=="function"?setTimeout:void 0,gx=typeof clearTimeout=="function"?clearTimeout:void 0,fg=typeof Promise=="function"?Promise:void 0,yx=typeof queueMicrotask=="function"?queueMicrotask:typeof fg<"u"?function(e){return fg.resolve(null).then(e).catch(vx)}:cg;function vx(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function dg(e,n){var i=n,u=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(u===0){e.removeChild(f),wa(n);return}u--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")u++;else if(i==="html")br(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,br(i);for(var h=i.firstChild;h;){var v=h.nextSibling,w=h.nodeName;h[gt]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&br(e.ownerDocument.body);i=f}while(i);wa(n)}function hg(e,n){var i=e;e=0;do{var u=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=u}while(i)}function Pc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Pc(i),vt(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function bx(e,n,i,u){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[gt])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Rn(e.nextSibling),e===null)break}return null}function xx(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Rn(e.nextSibling),e===null))return null;return e}function mg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Rn(e.nextSibling),e===null))return null;return e}function Jc(e){return e.data==="$?"||e.data==="$~"}function Wc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Sx(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var u=function(){n(),i.removeEventListener("DOMContentLoaded",u)};i.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function Rn(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 ef=null;function pg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return Rn(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function gg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function yg(e,n,i){switch(n=lo(i),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 br(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);vt(e)}var zn=new Map,vg=new Set;function io(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kl=ee.d;ee.d={f:Ex,r:wx,D:kx,C:Cx,L:Tx,m:jx,X:_x,S:Ax,M:Rx};function Ex(){var e=kl.f(),n=Ku();return e||n}function wx(e){var n=Ie(e);n!==null&&n.tag===5&&n.type==="form"?Mm(n):kl.r(e)}var xa=typeof document>"u"?null:document;function bg(e,n,i){var u=xa;if(u&&typeof n=="string"&&n){var f=wn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),vg.has(f)||(vg.add(f),e={rel:e,crossOrigin:i,href:n},u.querySelector(f)===null&&(n=u.createElement("link"),Gt(n,"link",e),ht(n),u.head.appendChild(n)))}}function kx(e){kl.D(e),bg("dns-prefetch",e,null)}function Cx(e,n){kl.C(e,n),bg("preconnect",e,n)}function Tx(e,n,i){kl.L(e,n,i);var u=xa;if(u&&e&&n){var f='link[rel="preload"][as="'+wn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+wn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+wn(i.imageSizes)+'"]')):f+='[href="'+wn(e)+'"]';var h=f;switch(n){case"style":h=Sa(e);break;case"script":h=Ea(e)}zn.has(h)||(e=g({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),zn.set(h,e),u.querySelector(f)!==null||n==="style"&&u.querySelector(xr(h))||n==="script"&&u.querySelector(Sr(h))||(n=u.createElement("link"),Gt(n,"link",e),ht(n),u.head.appendChild(n)))}}function jx(e,n){kl.m(e,n);var i=xa;if(i&&e){var u=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+wn(u)+'"][href="'+wn(e)+'"]',h=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ea(e)}if(!zn.has(h)&&(e=g({rel:"modulepreload",href:e},n),zn.set(h,e),i.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Sr(h)))return}u=i.createElement("link"),Gt(u,"link",e),ht(u),i.head.appendChild(u)}}}function Ax(e,n,i){kl.S(e,n,i);var u=xa;if(u&&e){var f=Jt(u).hoistableStyles,h=Sa(e);n=n||"default";var v=f.get(h);if(!v){var w={loading:0,preload:null};if(v=u.querySelector(xr(h)))w.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},i),(i=zn.get(h))&&tf(e,i);var M=v=u.createElement("link");ht(M),Gt(M,"link",e),M._p=new Promise(function(X,ie){M.onload=X,M.onerror=ie}),M.addEventListener("load",function(){w.loading|=1}),M.addEventListener("error",function(){w.loading|=2}),w.loading|=4,ao(v,n,u)}v={type:"stylesheet",instance:v,count:1,state:w},f.set(h,v)}}}function _x(e,n){kl.X(e,n);var i=xa;if(i&&e){var u=Jt(i).hoistableScripts,f=Ea(e),h=u.get(f);h||(h=i.querySelector(Sr(f)),h||(e=g({src:e,async:!0},n),(n=zn.get(f))&&nf(e,n),h=i.createElement("script"),ht(h),Gt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function Rx(e,n){kl.M(e,n);var i=xa;if(i&&e){var u=Jt(i).hoistableScripts,f=Ea(e),h=u.get(f);h||(h=i.querySelector(Sr(f)),h||(e=g({src:e,async:!0,type:"module"},n),(n=zn.get(f))&&nf(e,n),h=i.createElement("script"),ht(h),Gt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function xg(e,n,i,u){var f=(f=be.current)?io(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=Sa(i.href),i=Jt(f).hoistableStyles,u=i.get(n),u||(u={type:"style",instance:null,count:0,state:null},i.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Sa(i.href);var h=Jt(f).hoistableStyles,v=h.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,v),(h=f.querySelector(xr(e)))&&!h._p&&(v.instance=h,v.state.loading=5),zn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},zn.set(e,i),h||zx(f,e,i,v.state))),n&&u===null)throw Error(r(528,""));return v}if(n&&u!==null)throw Error(r(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ea(i),i=Jt(f).hoistableScripts,u=i.get(n),u||(u={type:"script",instance:null,count:0,state:null},i.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Sa(e){return'href="'+wn(e)+'"'}function xr(e){return'link[rel="stylesheet"]['+e+"]"}function Sg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function zx(e,n,i,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Gt(n,"link",i),ht(n),e.head.appendChild(n))}function Ea(e){return'[src="'+wn(e)+'"]'}function Sr(e){return"script[async]"+e}function Eg(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+wn(i.href)+'"]');if(u)return n.instance=u,ht(u),u;var f=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),ht(u),Gt(u,"style",f),ao(u,i.precedence,e),n.instance=u;case"stylesheet":f=Sa(i.href);var h=e.querySelector(xr(f));if(h)return n.state.loading|=4,n.instance=h,ht(h),h;u=Sg(i),(f=zn.get(f))&&tf(u,f),h=(e.ownerDocument||e).createElement("link"),ht(h);var v=h;return v._p=new Promise(function(w,M){v.onload=w,v.onerror=M}),Gt(h,"link",u),n.state.loading|=4,ao(h,i.precedence,e),n.instance=h;case"script":return h=Ea(i.src),(f=e.querySelector(Sr(h)))?(n.instance=f,ht(f),f):(u=i,(f=zn.get(h))&&(u=g({},i),nf(u,f)),e=e.ownerDocument||e,f=e.createElement("script"),ht(f),Gt(f,"link",u),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,ao(u,i.precedence,e));return n.instance}function ao(e,n,i){for(var u=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,h=f,v=0;v<u.length;v++){var w=u[v];if(w.dataset.precedence===n)h=w;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function tf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function nf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var ro=null;function wg(e,n,i){if(ro===null){var u=new Map,f=ro=new Map;f.set(i,u)}else f=ro,u=f.get(i),u||(u=new Map,f.set(i,u));if(u.has(e))return u;for(u.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var h=i[f];if(!(h[gt]||h[me]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(n)||"";v=e+v;var w=u.get(v);w?w.push(h):u.set(v,[h])}}return u}function kg(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function Nx(e,n,i){if(i===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 Cg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Dx(e,n,i,u){if(i.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Sa(u.href),h=n.querySelector(xr(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=uo.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=h,ht(h);return}h=n.ownerDocument||n,u=Sg(u),(f=zn.get(f))&&tf(u,f),h=h.createElement("link"),ht(h);var v=h;v._p=new Promise(function(w,M){v.onload=w,v.onerror=M}),Gt(h,"link",u),i.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=uo.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var lf=0;function Ox(e,n){return e.stylesheets&&e.count===0&&so(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var u=setTimeout(function(){if(e.stylesheets&&so(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&lf===0&&(lf=62500*mx());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&so(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>lf?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)so(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oo=null;function so(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oo=new Map,n.forEach(Mx,e),oo=null,uo.call(e))}function Mx(e,n){if(!(n.state.loading&4)){var i=oo.get(e);if(i)var u=i.get(null);else{i=new Map,oo.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var v=f[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),u=v)}u&&i.set(null,u)}f=n.instance,v=f.getAttribute("data-precedence"),h=i.get(v)||u,h===u&&i.set(null,f),i.set(v,f),this.count++,u=uo.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var Er={$$typeof:D,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Lx(e,n,i,u,f,h,v,w,M){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=Dl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dl(0),this.hiddenUpdates=Dl(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Tg(e,n,i,u,f,h,v,w,M,X,ie,ue){return e=new Lx(e,n,i,v,M,X,ie,ue,w),n=1,h===!0&&(n|=24),h=dn(3,null,null,n),e.current=h,h.stateNode=e,n=Ls(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:u,isDehydrated:i,cache:n},qs(h),e}function jg(e){return e?(e=Wi,e):Wi}function Ag(e,n,i,u,f,h){f=jg(f),u.context===null?u.context=f:u.pendingContext=f,u=Yl(n),u.payload={element:i},h=h===void 0?null:h,h!==null&&(u.callback=h),i=Gl(e,u,n),i!==null&&(an(i,e,n),er(i,e,n))}function _g(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function af(e,n){_g(e,n),(e=e.alternate)&&_g(e,n)}function Rg(e){if(e.tag===13||e.tag===31){var n=Ci(e,67108864);n!==null&&an(n,e,67108864),af(e,67108864)}}function zg(e){if(e.tag===13||e.tag===31){var n=yn();n=K(n);var i=Ci(e,n);i!==null&&an(i,e,n),af(e,n)}}var co=!0;function Ux(e,n,i,u){var f=B.T;B.T=null;var h=ee.p;try{ee.p=2,rf(e,n,i,u)}finally{ee.p=h,B.T=f}}function Bx(e,n,i,u){var f=B.T;B.T=null;var h=ee.p;try{ee.p=8,rf(e,n,i,u)}finally{ee.p=h,B.T=f}}function rf(e,n,i,u){if(co){var f=uf(u);if(f===null)Ic(e,n,u,fo,i),Dg(e,u);else if(qx(f,e,n,i,u))u.stopPropagation();else if(Dg(e,u),n&4&&-1<Hx.indexOf(e)){for(;f!==null;){var h=Ie(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=rl(h.pendingLanes);if(v!==0){var w=h;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var M=1<<31-tt(v);w.entanglements[1]|=M,v&=~M}Zn(h),(et&6)===0&&(Xu=pt()+500,gr(0))}}break;case 31:case 13:w=Ci(h,2),w!==null&&an(w,h,2),Ku(),af(h,2)}if(h=uf(u),h===null&&Ic(e,n,u,fo,i),h===f)break;f=h}f!==null&&u.stopPropagation()}else Ic(e,n,u,null,i)}}function uf(e){return e=os(e),of(e)}var fo=null;function of(e){if(fo=null,e=bt(e),e!==null){var n=s(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=c(n),e!==null)return e;e=null}else if(i===31){if(e=d(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return fo=e,null}function Ng(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(il()){case ae:return 2;case de:return 8;case Ce:case Ne:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var sf=!1,Wl=null,ei=null,ti=null,wr=new Map,kr=new Map,ni=[],Hx="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Dg(e,n){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":ei=null;break;case"mouseover":case"mouseout":ti=null;break;case"pointerover":case"pointerout":wr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":kr.delete(n.pointerId)}}function Cr(e,n,i,u,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:i,eventSystemFlags:u,nativeEvent:h,targetContainers:[f]},n!==null&&(n=Ie(n),n!==null&&Rg(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function qx(e,n,i,u,f){switch(n){case"focusin":return Wl=Cr(Wl,e,n,i,u,f),!0;case"dragenter":return ei=Cr(ei,e,n,i,u,f),!0;case"mouseover":return ti=Cr(ti,e,n,i,u,f),!0;case"pointerover":var h=f.pointerId;return wr.set(h,Cr(wr.get(h)||null,e,n,i,u,f)),!0;case"gotpointercapture":return h=f.pointerId,kr.set(h,Cr(kr.get(h)||null,e,n,i,u,f)),!0}return!1}function Og(e){var n=bt(e.target);if(n!==null){var i=s(n);if(i!==null){if(n=i.tag,n===13){if(n=c(i),n!==null){e.blockedOn=n,ke(e.priority,function(){zg(i)});return}}else if(n===31){if(n=d(i),n!==null){e.blockedOn=n,ke(e.priority,function(){zg(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ho(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=uf(e.nativeEvent);if(i===null){i=e.nativeEvent;var u=new i.constructor(i.type,i);us=u,i.target.dispatchEvent(u),us=null}else return n=Ie(i),n!==null&&Rg(n),e.blockedOn=i,!1;n.shift()}return!0}function Mg(e,n,i){ho(e)&&i.delete(n)}function Yx(){sf=!1,Wl!==null&&ho(Wl)&&(Wl=null),ei!==null&&ho(ei)&&(ei=null),ti!==null&&ho(ti)&&(ti=null),wr.forEach(Mg),kr.forEach(Mg)}function mo(e,n){e.blockedOn===n&&(e.blockedOn=null,sf||(sf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Yx)))}var po=null;function Lg(e){po!==e&&(po=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){po===e&&(po=null);for(var n=0;n<e.length;n+=3){var i=e[n],u=e[n+1],f=e[n+2];if(typeof u!="function"){if(of(u||i)===null)continue;break}var h=Ie(i);h!==null&&(e.splice(n,3),n-=3,rc(h,{pending:!0,data:f,method:i.method,action:u},u,f))}}))}function wa(e){function n(M){return mo(M,e)}Wl!==null&&mo(Wl,e),ei!==null&&mo(ei,e),ti!==null&&mo(ti,e),wr.forEach(n),kr.forEach(n);for(var i=0;i<ni.length;i++){var u=ni[i];u.blockedOn===e&&(u.blockedOn=null)}for(;0<ni.length&&(i=ni[0],i.blockedOn===null);)Og(i),i.blockedOn===null&&ni.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(u=0;u<i.length;u+=3){var f=i[u],h=i[u+1],v=f[ye]||null;if(typeof h=="function")v||Lg(i);else if(v){var w=null;if(h&&h.hasAttribute("formAction")){if(f=h,v=h[ye]||null)w=v.formAction;else if(of(f)!==null)continue}else w=v.action;typeof w=="function"?i[u+1]=w:(i.splice(u,3),u-=3),Lg(i)}}}function Ug(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),u||setTimeout(i,20)}function i(){if(!u&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function cf(e){this._internalRoot=e}go.prototype.render=cf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var i=n.current,u=yn();Ag(i,u,e,n,null,null)},go.prototype.unmount=cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Ag(e.current,2,null,e,null,null),Ku(),n[we]=null}};function go(e){this._internalRoot=e}go.prototype.unstable_scheduleHydration=function(e){if(e){var n=he();e={blockedOn:null,target:e,priority:n};for(var i=0;i<ni.length&&n!==0&&n<ni[i].priority;i++);ni.splice(i,0,e),i===0&&Og(e)}};var Bg=l.version;if(Bg!=="19.2.4")throw Error(r(527,Bg,"19.2.4"));ee.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Gx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yo.isDisabled&&yo.supportsFiber)try{Lt=yo.inject(Gx),nt=yo}catch{}}return jr.createRoot=function(e,n){if(!o(e))throw Error(r(299));var i=!1,u="",f=Im,h=Qm,v=Xm;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=Tg(e,1,!1,null,null,i,u,null,f,h,v,Ug),e[we]=n.current,Fc(e),new cf(n)},jr.hydrateRoot=function(e,n,i){if(!o(e))throw Error(r(299));var u=!1,f="",h=Im,v=Qm,w=Xm,M=null;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(M=i.formState)),n=Tg(e,1,!0,n,i??null,u,f,M,h,v,w,Ug),n.context=jg(null),i=n.current,u=yn(),u=K(u),f=Yl(u),f.callback=null,Gl(i,f,u),i=u,n.current.lanes=i,Ol(n,i),Zn(n),e[we]=n.current,Fc(e),new go(n)},jr.version="19.2.4",jr}var $g;function eS(){if($g)return hf.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(l){console.error(l)}}return t(),hf.exports=Wx(),hf.exports}var tS=eS();var wv=t=>{throw TypeError(t)},nS=(t,l,a)=>l.has(t)||wv("Cannot "+a),yf=(t,l,a)=>(nS(t,l,"read from private field"),a?a.call(t):l.get(t)),lS=(t,l,a)=>l.has(t)?wv("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,a),Kg="popstate";function iS(t={}){function l(r,o){let{pathname:s,search:c,hash:d}=r.location;return Gr("",{pathname:s,search:c,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function a(r,o){return typeof o=="string"?o:el(o)}return rS(l,a,null,t)}function Be(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function Rt(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function aS(){return Math.random().toString(36).substring(2,10)}function Zg(t,l){return{usr:t.state,key:t.key,idx:l}}function Gr(t,l,a=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?fi(l):l,state:a,key:l&&l.key||r||aS()}}function el({pathname:t="/",search:l="",hash:a=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function fi(t){let l={};if(t){let a=t.indexOf("#");a>=0&&(l.hash=t.substring(a),t=t.substring(0,a));let r=t.indexOf("?");r>=0&&(l.search=t.substring(r),t=t.substring(0,r)),t&&(l.pathname=t)}return l}function rS(t,l,a,r={}){let{window:o=document.defaultView,v5Compat:s=!1}=r,c=o.history,d="POP",p=null,m=y();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function y(){return(c.state||{idx:null}).idx}function g(){d="POP";let z=y(),C=z==null?null:z-m;m=z,p&&p({action:d,location:A.location,delta:C})}function b(z,C){d="PUSH";let j=Gr(A.location,z,C);m=y()+1;let D=Zg(j,m),te=A.createHref(j);try{c.pushState(D,"",te)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(te)}s&&p&&p({action:d,location:A.location,delta:1})}function x(z,C){d="REPLACE";let j=Gr(A.location,z,C);m=y();let D=Zg(j,m),te=A.createHref(j);c.replaceState(D,"",te),s&&p&&p({action:d,location:A.location,delta:0})}function E(z){return kv(z)}let A={get action(){return d},get location(){return t(o,c)},listen(z){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Kg,g),p=z,()=>{o.removeEventListener(Kg,g),p=null}},createHref(z){return l(o,z)},createURL:E,encodeLocation(z){let C=E(z);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:b,replace:x,go(z){return c.go(z)}};return A}function kv(t,l=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Be(a,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:el(t);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=a+r),new URL(r,a)}var Mr,Pg=class{constructor(t){if(lS(this,Mr,new Map),t)for(let[l,a]of t)this.set(l,a)}get(t){if(yf(this,Mr).has(t))return yf(this,Mr).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,l){yf(this,Mr).set(t,l)}};Mr=new WeakMap;var uS=new Set(["lazy","caseSensitive","path","id","index","children"]);function oS(t){return uS.has(t)}var sS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function cS(t){return sS.has(t)}function fS(t){return t.index===!0}function Vr(t,l,a=[],r={},o=!1){return t.map((s,c)=>{let d=[...a,String(c)],p=typeof s.id=="string"?s.id:d.join("-");if(Be(s.index!==!0||!s.children,"Cannot specify children on an index route"),Be(o||!r[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),fS(s)){let m={...s,id:p};return r[p]=Jg(m,l(m)),m}else{let m={...s,id:p,children:void 0};return r[p]=Jg(m,l(m)),s.children&&(m.children=Vr(s.children,l,d,r,o)),m}})}function Jg(t,l){return Object.assign(t,{...l,...typeof l.lazy=="object"&&l.lazy!=null?{lazy:{...t.lazy,...l.lazy}}:{}})}function ri(t,l,a="/"){return Lr(t,l,a,!1)}function Lr(t,l,a,r){let o=typeof l=="string"?fi(l):l,s=On(o.pathname||"/",a);if(s==null)return null;let c=Cv(t);hS(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=kS(s);d=ES(c[p],m,r)}return d}function dS(t,l){let{route:a,pathname:r,params:o}=t;return{id:a.id,pathname:r,params:o,data:l[a.id],loaderData:l[a.id],handle:a.handle}}function Cv(t,l=[],a=[],r="",o=!1){let s=(c,d,p=o,m)=>{let y={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&p)return;Be(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let g=Wn([r,y.relativePath]),b=a.concat(y);c.children&&c.children.length>0&&(Be(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Cv(c.children,l,b,g,p)),!(c.path==null&&!c.index)&&l.push({path:g,score:xS(g,c.index),routesMeta:b})};return t.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))s(c,d);else for(let p of Tv(c.path))s(c,d,!0,p)}),l}function Tv(t){let l=t.split("/");if(l.length===0)return[];let[a,...r]=l,o=a.endsWith("?"),s=a.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let c=Tv(r.join("/")),d=[];return d.push(...c.map(p=>p===""?s:[s,p].join("/"))),o&&d.push(...c),d.map(p=>t.startsWith("/")&&p===""?"/":p)}function hS(t){t.sort((l,a)=>l.score!==a.score?a.score-l.score:SS(l.routesMeta.map(r=>r.childrenIndex),a.routesMeta.map(r=>r.childrenIndex)))}var mS=/^:[\w-]+$/,pS=3,gS=2,yS=1,vS=10,bS=-2,Wg=t=>t==="*";function xS(t,l){let a=t.split("/"),r=a.length;return a.some(Wg)&&(r+=bS),l&&(r+=gS),a.filter(o=>!Wg(o)).reduce((o,s)=>o+(mS.test(s)?pS:s===""?yS:vS),r)}function SS(t,l){return t.length===l.length&&t.slice(0,-1).every((r,o)=>r===l[o])?t[t.length-1]-l[l.length-1]:0}function ES(t,l,a=!1){let{routesMeta:r}=t,o={},s="/",c=[];for(let d=0;d<r.length;++d){let p=r[d],m=d===r.length-1,y=s==="/"?l:l.slice(s.length)||"/",g=Mo({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},y),b=p.route;if(!g&&m&&a&&!r[r.length-1].route.index&&(g=Mo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!g)return null;Object.assign(o,g.params),c.push({params:o,pathname:Wn([s,g.pathname]),pathnameBase:jS(Wn([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=Wn([s,g.pathnameBase]))}return c}function Mo(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,r]=wS(t.path,t.caseSensitive,t.end),o=l.match(a);if(!o)return null;let s=o[0],c=s.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:r.reduce((m,{paramName:y,isOptional:g},b)=>{if(y==="*"){let E=d[b]||"";c=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const x=d[b];return g&&!x?m[y]=void 0:m[y]=(x||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:c,pattern:t}}function wS(t,l=!1,a=!0){Rt(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p)=>(r.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,l?void 0:"i"),r]}function kS(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Rt(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function On(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let a=l.endsWith("/")?l.length-1:l.length,r=t.charAt(a);return r&&r!=="/"?null:t.slice(a)||"/"}function CS({basename:t,pathname:l}){return l==="/"?t:Wn([t,l])}var jv=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gd=t=>jv.test(t);function TS(t,l="/"){let{pathname:a,search:r="",hash:o=""}=typeof t=="string"?fi(t):t,s;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?s=ey(a.substring(1),"/"):s=ey(a,l)):s=l,{pathname:s,search:AS(r),hash:_S(o)}}function ey(t,l){let a=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function vf(t,l,a,r){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Av(t){return t.filter((l,a)=>a===0||l.route.path&&l.route.path.length>0)}function yd(t){let l=Av(t);return l.map((a,r)=>r===l.length-1?a.pathname:a.pathnameBase)}function vd(t,l,a,r=!1){let o;typeof t=="string"?o=fi(t):(o={...t},Be(!o.pathname||!o.pathname.includes("?"),vf("?","pathname","search",o)),Be(!o.pathname||!o.pathname.includes("#"),vf("#","pathname","hash",o)),Be(!o.search||!o.search.includes("#"),vf("#","search","hash",o)));let s=t===""||o.pathname==="",c=s?"/":o.pathname,d;if(c==null)d=a;else{let g=l.length-1;if(!r&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),g-=1;o.pathname=b.join("/")}d=g>=0?l[g]:"/"}let p=TS(o,d),m=c&&c!=="/"&&c.endsWith("/"),y=(s||c===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}var Wn=t=>t.join("/").replace(/\/\/+/g,"/"),jS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),AS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,_S=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Xr=class{constructor(t,l,a,r=!1){this.status=t,this.statusText=l||"",this.internal=r,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Fr(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function $r(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var _v=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Rv(t,l){let a=t;if(typeof a!="string"||!jv.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let r=a,o=!1;if(_v)try{let s=new URL(window.location.href),c=a.startsWith("//")?new URL(s.protocol+a):new URL(a),d=On(c.pathname,l);c.origin===s.origin&&d!=null?a=d+c.search+c.hash:o=!0}catch{Rt(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:a}}var si=Symbol("Uninstrumented");function RS(t,l){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(o=>o({id:l.id,index:l.index,path:l.path,instrument(s){let c=Object.keys(a);for(let d of c)s[d]&&a[d].push(s[d])}}));let r={};if(typeof l.lazy=="function"&&a.lazy.length>0){let o=Aa(a.lazy,l.lazy,()=>{});o&&(r.lazy=o)}if(typeof l.lazy=="object"){let o=l.lazy;["middleware","loader","action"].forEach(s=>{let c=o[s],d=a[`lazy.${s}`];if(typeof c=="function"&&d.length>0){let p=Aa(d,c,()=>{});p&&(r.lazy=Object.assign(r.lazy||{},{[s]:p}))}})}return["loader","action"].forEach(o=>{let s=l[o];if(typeof s=="function"&&a[o].length>0){let c=s[si]??s,d=Aa(a[o],c,(...p)=>ty(p[0]));d&&(o==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[si]=c,r[o]=d)}}),l.middleware&&l.middleware.length>0&&a.middleware.length>0&&(r.middleware=l.middleware.map(o=>{let s=o[si]??o,c=Aa(a.middleware,s,(...d)=>ty(d[0]));return c?(c[si]=s,c):o})),r}function zS(t,l){let a={navigate:[],fetch:[]};if(l.forEach(r=>r({instrument(o){let s=Object.keys(o);for(let c of s)o[c]&&a[c].push(o[c])}})),a.navigate.length>0){let r=t.navigate[si]??t.navigate,o=Aa(a.navigate,r,(...s)=>{let[c,d]=s;return{to:typeof c=="number"||typeof c=="string"?c:c?el(c):".",...ny(t,d??{})}});o&&(o[si]=r,t.navigate=o)}if(a.fetch.length>0){let r=t.fetch[si]??t.fetch,o=Aa(a.fetch,r,(...s)=>{let[c,,d,p]=s;return{href:d??".",fetcherKey:c,...ny(t,p??{})}});o&&(o[si]=r,t.fetch=o)}return t}function Aa(t,l,a){return t.length===0?null:async(...r)=>{let o=await zv(t,a(...r),()=>l(...r),t.length-1);if(o.type==="error")throw o.value;return o.value}}async function zv(t,l,a,r){let o=t[r],s;if(o){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=zv(t,l,a,r-1),s=await c,Be(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await o(d,l)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{s={type:"success",value:await a()}}catch(c){s={type:"error",value:c}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ty(t){let{request:l,context:a,params:r,unstable_pattern:o}=t;return{request:NS(l),params:{...r},unstable_pattern:o,context:DS(a)}}function ny(t,l){return{currentUrl:el(t.state.location),..."formMethod"in l?{formMethod:l.formMethod}:{},..."formEncType"in l?{formEncType:l.formEncType}:{},..."formData"in l?{formData:l.formData}:{},..."body"in l?{body:l.body}:{}}}function NS(t){return{method:t.method,url:t.url,headers:{get:(...l)=>t.headers.get(...l)}}}function DS(t){if(MS(t)){let l={...t};return Object.freeze(l),l}else return{get:l=>t.get(l)}}var OS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function MS(t){if(t===null||typeof t!="object")return!1;const l=Object.getPrototypeOf(t);return l===Object.prototype||l===null||Object.getOwnPropertyNames(l).sort().join("\0")===OS}var Nv=["POST","PUT","PATCH","DELETE"],LS=new Set(Nv),US=["GET",...Nv],BS=new Set(US),Dv=new Set([301,302,303,307,308]),HS=new Set([307,308]),bf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},qS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ar={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},YS=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Ov="remix-router-transitions",Mv=Symbol("ResetLoaderData");function GS(t){const l=t.window?t.window:typeof window<"u"?window:void 0,a=typeof l<"u"&&typeof l.document<"u"&&typeof l.document.createElement<"u";Be(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],o=t.mapRouteProperties||YS,s=o;if(t.unstable_instrumentations){let O=t.unstable_instrumentations;s=Y=>({...o(Y),...RS(O.map(K=>K.route).filter(Boolean),Y)})}let c={},d=Vr(t.routes,s,void 0,c),p,m=t.basename||"/";m.startsWith("/")||(m=`/${m}`);let y=t.dataStrategy||XS,g={...t.future},b=null,x=new Set,E=null,A=null,z=null,C=t.hydrationData!=null,j=ri(d,t.history.location,m),D=!1,te=null,P;if(j==null&&!t.patchRoutesOnNavigation){let O=Nn(404,{pathname:t.history.location.pathname}),{matches:Y,route:K}=vo(d);P=!0,j=Y,te={[K.id]:O}}else if(j&&!t.hydrationData&&vi(j,d,t.history.location.pathname).active&&(j=null),j)if(j.some(O=>O.route.lazy))P=!1;else if(!j.some(O=>bd(O.route)))P=!0;else{let O=t.hydrationData?t.hydrationData.loaderData:null,Y=t.hydrationData?t.hydrationData.errors:null;if(Y){let K=j.findIndex(oe=>Y[oe.route.id]!==void 0);P=j.slice(0,K+1).every(oe=>!Ff(oe.route,O,Y))}else P=j.every(K=>!Ff(K.route,O,Y))}else{P=!1,j=[];let O=vi(null,d,t.history.location.pathname);O.active&&O.matches&&(D=!0,j=O.matches)}let H,_={historyAction:t.history.action,location:t.history.location,matches:j,initialized:P,navigation:bf,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||te,fetchers:new Map,blockers:new Map},ne="POP",J=null,R=!1,V,G=!1,F=new Map,le=null,I=!1,B=!1,ee=new Set,se=new Map,xe=0,N=-1,L=new Map,Z=new Set,T=new Map,ce=new Map,ve=new Set,be=new Map,De,pe=null;function Re(){if(b=t.history.listen(({action:O,location:Y,delta:K})=>{if(De){De(),De=void 0;return}Rt(be.size===0||K!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let oe=pi({currentLocation:_.location,nextLocation:Y,historyAction:O});if(oe&&K!=null){let he=new Promise(ke=>{De=ke});t.history.go(K*-1),al(oe,{state:"blocked",location:Y,proceed(){al(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),he.then(()=>t.history.go(K))},reset(){let ke=new Map(_.blockers);ke.set(oe,Ar),yt({blockers:ke})}}),J?.resolve(),J=null;return}return Pt(O,Y)}),a){fE(l,F);let O=()=>dE(l,F);l.addEventListener("pagehide",O),le=()=>l.removeEventListener("pagehide",O)}return _.initialized||Pt("POP",_.location,{initialHydration:!0}),H}function zt(){b&&b(),le&&le(),x.clear(),V&&V.abort(),_.fetchers.forEach((O,Y)=>on(Y)),_.blockers.forEach((O,Y)=>lu(Y))}function Ln(O){return x.add(O),()=>x.delete(O)}function yt(O,Y={}){O.matches&&(O.matches=O.matches.map(he=>{let ke=c[he.route.id],ge=he.route;return ge.element!==ke.element||ge.errorElement!==ke.errorElement||ge.hydrateFallbackElement!==ke.hydrateFallbackElement?{...he,route:ke}:he})),_={..._,...O};let K=[],oe=[];_.fetchers.forEach((he,ke)=>{he.state==="idle"&&(ve.has(ke)?K.push(ke):oe.push(ke))}),ve.forEach(he=>{!_.fetchers.has(he)&&!se.has(he)&&K.push(he)}),[...x].forEach(he=>he(_,{deletedFetchers:K,newErrors:O.errors??null,viewTransitionOpts:Y.viewTransitionOpts,flushSync:Y.flushSync===!0})),K.forEach(he=>on(he)),oe.forEach(he=>_.fetchers.delete(he))}function Un(O,Y,{flushSync:K}={}){let oe=_.actionData!=null&&_.navigation.formMethod!=null&&Ft(_.navigation.formMethod)&&_.navigation.state==="loading"&&O.state?._isRedirect!==!0,he;Y.actionData?Object.keys(Y.actionData).length>0?he=Y.actionData:he=null:oe?he=_.actionData:he=null;let ke=Y.loaderData?dy(_.loaderData,Y.loaderData,Y.matches||[],Y.errors):_.loaderData,ge=_.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((Ae,Te)=>ge.set(Te,Ar)));let me=I?!1:iu(O,Y.matches||_.matches),ye=R===!0||_.navigation.formMethod!=null&&Ft(_.navigation.formMethod)&&O.state?._isRedirect!==!0;p&&(d=p,p=void 0),I||ne==="POP"||(ne==="PUSH"?t.history.push(O,O.state):ne==="REPLACE"&&t.history.replace(O,O.state));let we;if(ne==="POP"){let Ae=F.get(_.location.pathname);Ae&&Ae.has(O.pathname)?we={currentLocation:_.location,nextLocation:O}:F.has(O.pathname)&&(we={currentLocation:O,nextLocation:_.location})}else if(G){let Ae=F.get(_.location.pathname);Ae?Ae.add(O.pathname):(Ae=new Set([O.pathname]),F.set(_.location.pathname,Ae)),we={currentLocation:_.location,nextLocation:O}}yt({...Y,actionData:he,loaderData:ke,historyAction:ne,location:O,initialized:!0,navigation:bf,revalidation:"idle",restoreScrollPosition:me,preventScrollReset:ye,blockers:ge},{viewTransitionOpts:we,flushSync:K===!0}),ne="POP",R=!1,G=!1,I=!1,B=!1,J?.resolve(),J=null,pe?.resolve(),pe=null}async function Sn(O,Y){if(J?.resolve(),J=null,typeof O=="number"){J||(J=gy());let Fe=J.promise;return t.history.go(O),Fe}let K=Vf(_.location,_.matches,m,O,Y?.fromRouteId,Y?.relative),{path:oe,submission:he,error:ke}=ly(!1,K,Y),ge=_.location,me=Gr(_.location,oe,Y&&Y.state);me={...me,...t.history.encodeLocation(me)};let ye=Y&&Y.replace!=null?Y.replace:void 0,we="PUSH";ye===!0?we="REPLACE":ye===!1||he!=null&&Ft(he.formMethod)&&he.formAction===_.location.pathname+_.location.search&&(we="REPLACE");let Ae=Y&&"preventScrollReset"in Y?Y.preventScrollReset===!0:void 0,Te=(Y&&Y.flushSync)===!0,Ke=pi({currentLocation:ge,nextLocation:me,historyAction:we});if(Ke){al(Ke,{state:"blocked",location:me,proceed(){al(Ke,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),Sn(O,Y)},reset(){let Fe=new Map(_.blockers);Fe.set(Ke,Ar),yt({blockers:Fe})}});return}await Pt(we,me,{submission:he,pendingError:ke,preventScrollReset:Ae,replace:Y&&Y.replace,enableViewTransition:Y&&Y.viewTransition,flushSync:Te,callSiteDefaultShouldRevalidate:Y&&Y.unstable_defaultShouldRevalidate})}function Rl(){pe||(pe=gy()),de(),yt({revalidation:"loading"});let O=pe.promise;return _.navigation.state==="submitting"?O:_.navigation.state==="idle"?(Pt(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),O):(Pt(ne||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:G===!0}),O)}async function Pt(O,Y,K){V&&V.abort(),V=null,ne=O,I=(K&&K.startUninterruptedRevalidation)===!0,yi(_.location,_.matches),R=(K&&K.preventScrollReset)===!0,G=(K&&K.enableViewTransition)===!0;let oe=p||d,he=K&&K.overrideNavigation,ke=K?.initialHydration&&_.matches&&_.matches.length>0&&!D?_.matches:ri(oe,Y,m),ge=(K&&K.flushSync)===!0;if(ke&&_.initialized&&!B&&tE(_.location,Y)&&!(K&&K.submission&&Ft(K.submission.formMethod))){Un(Y,{matches:ke},{flushSync:ge});return}let me=vi(ke,oe,Y.pathname);if(me.active&&me.matches&&(ke=me.matches),!ke){let{error:vt,notFoundMatches:bt,route:Ie}=Nl(Y.pathname);Un(Y,{matches:bt,loaderData:{},errors:{[Ie.id]:vt}},{flushSync:ge});return}V=new AbortController;let ye=Ta(t.history,Y,V.signal,K&&K.submission),we=t.getContext?await t.getContext():new Pg,Ae;if(K&&K.pendingError)Ae=[ui(ke).route.id,{type:"error",error:K.pendingError}];else if(K&&K.submission&&Ft(K.submission.formMethod)){let vt=await Vi(ye,Y,K.submission,ke,we,me.active,K&&K.initialHydration===!0,{replace:K.replace,flushSync:ge});if(vt.shortCircuited)return;if(vt.pendingActionResult){let[bt,Ie]=vt.pendingActionResult;if(bn(Ie)&&Fr(Ie.error)&&Ie.error.status===404){V=null,Un(Y,{matches:vt.matches,loaderData:{},errors:{[bt]:Ie.error}});return}}ke=vt.matches||ke,Ae=vt.pendingActionResult,he=xf(Y,K.submission),ge=!1,me.active=!1,ye=Ta(t.history,ye.url,ye.signal)}let{shortCircuited:Te,matches:Ke,loaderData:Fe,errors:gt}=await Fi(ye,Y,ke,we,me.active,he,K&&K.submission,K&&K.fetcherSubmission,K&&K.replace,K&&K.initialHydration===!0,ge,Ae,K&&K.callSiteDefaultShouldRevalidate);Te||(V=null,Un(Y,{matches:Ke||ke,...hy(Ae),loaderData:Fe,errors:gt}))}async function Vi(O,Y,K,oe,he,ke,ge,me={}){de();let ye=sE(Y,K);if(yt({navigation:ye},{flushSync:me.flushSync===!0}),ke){let Te=await Dl(oe,Y.pathname,O.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){if(Te.partialMatches.length===0){let{matches:Fe,route:gt}=vo(d);return{matches:Fe,pendingActionResult:[gt.id,{type:"error",error:Te.error}]}}let Ke=ui(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ke,{type:"error",error:Te.error}]}}else if(Te.matches)oe=Te.matches;else{let{notFoundMatches:Ke,error:Fe,route:gt}=Nl(Y.pathname);return{matches:Ke,pendingActionResult:[gt.id,{type:"error",error:Fe}]}}}let we,Ae=_o(oe,Y);if(!Ae.route.action&&!Ae.route.lazy)we={type:"error",error:Nn(405,{method:O.method,pathname:Y.pathname,routeId:Ae.route.id})};else{let Te=_a(s,c,O,oe,Ae,ge?[]:r,he),Ke=await il(O,Te,he,null);if(we=Ke[Ae.route.id],!we){for(let Fe of oe)if(Ke[Fe.route.id]){we=Ke[Fe.route.id];break}}if(O.signal.aborted)return{shortCircuited:!0}}if(Hi(we)){let Te;return me&&me.replace!=null?Te=me.replace:Te=sy(we.response.headers.get("Location"),new URL(O.url),m,t.history)===_.location.pathname+_.location.search,await pt(O,we,!0,{submission:K,replace:Te}),{shortCircuited:!0}}if(bn(we)){let Te=ui(oe,Ae.route.id);return(me&&me.replace)!==!0&&(ne="PUSH"),{matches:oe,pendingActionResult:[Te.route.id,we,Ae.route.id]}}return{matches:oe,pendingActionResult:[Ae.route.id,we]}}async function Fi(O,Y,K,oe,he,ke,ge,me,ye,we,Ae,Te,Ke){let Fe=ke||xf(Y,ge),gt=ge||me||py(Fe),vt=!I&&!we;if(he){if(vt){let Et=ll(Te);yt({navigation:Fe,...Et!==void 0?{actionData:Et}:{}},{flushSync:Ae})}let Qe=await Dl(K,Y.pathname,O.signal);if(Qe.type==="aborted")return{shortCircuited:!0};if(Qe.type==="error"){if(Qe.partialMatches.length===0){let{matches:Yn,route:Bt}=vo(d);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Qe.error}}}let Et=ui(Qe.partialMatches).route.id;return{matches:Qe.partialMatches,loaderData:{},errors:{[Et]:Qe.error}}}else if(Qe.matches)K=Qe.matches;else{let{error:Et,notFoundMatches:Yn,route:Bt}=Nl(Y.pathname);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Et}}}}let bt=p||d,{dsMatches:Ie,revalidatingFetchers:Ot}=iy(O,oe,s,c,t.history,_,K,gt,Y,we?[]:r,we===!0,B,ee,ve,T,Z,bt,m,t.patchRoutesOnNavigation!=null,Te,Ke);if(N=++xe,!t.dataStrategy&&!Ie.some(Qe=>Qe.shouldLoad)&&!Ie.some(Qe=>Qe.route.middleware&&Qe.route.middleware.length>0)&&Ot.length===0){let Qe=tt();return Un(Y,{matches:K,loaderData:{},errors:Te&&bn(Te[1])?{[Te[0]]:Te[1].error}:null,...hy(Te),...Qe?{fetchers:new Map(_.fetchers)}:{}},{flushSync:Ae}),{shortCircuited:!0}}if(vt){let Qe={};if(!he){Qe.navigation=Fe;let Et=ll(Te);Et!==void 0&&(Qe.actionData=Et)}Ot.length>0&&(Qe.fetchers=zl(Ot)),yt(Qe,{flushSync:Ae})}Ot.forEach(Qe=>{nt(Qe.key),Qe.controller&&se.set(Qe.key,Qe.controller)});let Jt=()=>Ot.forEach(Qe=>nt(Qe.key));V&&V.signal.addEventListener("abort",Jt);let{loaderResults:ht,fetcherResults:Hn}=await ae(Ie,Ot,O,oe);if(O.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",Jt),Ot.forEach(Qe=>se.delete(Qe.key));let cn=bo(ht);if(cn)return await pt(O,cn.result,!0,{replace:ye}),{shortCircuited:!0};if(cn=bo(Hn),cn)return Z.add(cn.key),await pt(O,cn.result,!0,{replace:ye}),{shortCircuited:!0};let{loaderData:qn,errors:En}=fy(_,K,ht,Te,Ot,Hn);we&&_.errors&&(En={..._.errors,...En});let ul=tt(),bi=Bn(N),xi=ul||bi||Ot.length>0;return{matches:K,loaderData:qn,errors:En,...xi?{fetchers:new Map(_.fetchers)}:{}}}function ll(O){if(O&&!bn(O[1]))return{[O[0]]:O[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function zl(O){return O.forEach(Y=>{let K=_.fetchers.get(Y.key),oe=_r(void 0,K?K.data:void 0);_.fetchers.set(Y.key,oe)}),new Map(_.fetchers)}async function mi(O,Y,K,oe){nt(O);let he=(oe&&oe.flushSync)===!0,ke=p||d,ge=Vf(_.location,_.matches,m,K,Y,oe?.relative),me=ri(ke,ge,m),ye=vi(me,ke,ge);if(ye.active&&ye.matches&&(me=ye.matches),!me){Ne(O,Y,Nn(404,{pathname:ge}),{flushSync:he});return}let{path:we,submission:Ae,error:Te}=ly(!0,ge,oe);if(Te){Ne(O,Y,Te,{flushSync:he});return}let Ke=t.getContext?await t.getContext():new Pg,Fe=(oe&&oe.preventScrollReset)===!0;if(Ae&&Ft(Ae.formMethod)){await La(O,Y,we,me,Ke,ye.active,he,Fe,Ae,oe&&oe.unstable_defaultShouldRevalidate);return}T.set(O,{routeId:Y,path:we}),await Ua(O,Y,we,me,Ke,ye.active,he,Fe,Ae)}async function La(O,Y,K,oe,he,ke,ge,me,ye,we){de(),T.delete(O);let Ae=_.fetchers.get(O);Ce(O,cE(ye,Ae),{flushSync:ge});let Te=new AbortController,Ke=Ta(t.history,K,Te.signal,ye);if(ke){let Xe=await Dl(oe,new URL(Ke.url).pathname,Ke.signal,O);if(Xe.type==="aborted")return;if(Xe.type==="error"){Ne(O,Y,Xe.error,{flushSync:ge});return}else if(Xe.matches)oe=Xe.matches;else{Ne(O,Y,Nn(404,{pathname:K}),{flushSync:ge});return}}let Fe=_o(oe,K);if(!Fe.route.action&&!Fe.route.lazy){let Xe=Nn(405,{method:ye.formMethod,pathname:K,routeId:Y});Ne(O,Y,Xe,{flushSync:ge});return}se.set(O,Te);let gt=xe,vt=_a(s,c,Ke,oe,Fe,r,he),bt=await il(Ke,vt,he,O),Ie=bt[Fe.route.id];if(!Ie){for(let Xe of vt)if(bt[Xe.route.id]){Ie=bt[Xe.route.id];break}}if(Ke.signal.aborted){se.get(O)===Te&&se.delete(O);return}if(ve.has(O)){if(Hi(Ie)||bn(Ie)){Ce(O,jl(void 0));return}}else{if(Hi(Ie))if(se.delete(O),N>gt){Ce(O,jl(void 0));return}else return Z.add(O),Ce(O,_r(ye)),pt(Ke,Ie,!1,{fetcherSubmission:ye,preventScrollReset:me});if(bn(Ie)){Ne(O,Y,Ie.error);return}}let Ot=_.navigation.location||_.location,Jt=Ta(t.history,Ot,Te.signal),ht=p||d,Hn=_.navigation.state!=="idle"?ri(ht,_.navigation.location,m):_.matches;Be(Hn,"Didn't find any matches after fetcher action");let cn=++xe;L.set(O,cn);let qn=_r(ye,Ie.data);_.fetchers.set(O,qn);let{dsMatches:En,revalidatingFetchers:ul}=iy(Jt,he,s,c,t.history,_,Hn,ye,Ot,r,!1,B,ee,ve,T,Z,ht,m,t.patchRoutesOnNavigation!=null,[Fe.route.id,Ie],we);ul.filter(Xe=>Xe.key!==O).forEach(Xe=>{let Si=Xe.key,ru=_.fetchers.get(Si),Ba=_r(void 0,ru?ru.data:void 0);_.fetchers.set(Si,Ba),nt(Si),Xe.controller&&se.set(Si,Xe.controller)}),yt({fetchers:new Map(_.fetchers)});let bi=()=>ul.forEach(Xe=>nt(Xe.key));Te.signal.addEventListener("abort",bi);let{loaderResults:xi,fetcherResults:Qe}=await ae(En,ul,Jt,he);if(Te.signal.aborted)return;if(Te.signal.removeEventListener("abort",bi),L.delete(O),se.delete(O),ul.forEach(Xe=>se.delete(Xe.key)),_.fetchers.has(O)){let Xe=jl(Ie.data);_.fetchers.set(O,Xe)}let Et=bo(xi);if(Et)return pt(Jt,Et.result,!1,{preventScrollReset:me});if(Et=bo(Qe),Et)return Z.add(Et.key),pt(Jt,Et.result,!1,{preventScrollReset:me});let{loaderData:Yn,errors:Bt}=fy(_,Hn,xi,void 0,ul,Qe);Bn(cn),_.navigation.state==="loading"&&cn>N?(Be(ne,"Expected pending action"),V&&V.abort(),Un(_.navigation.location,{matches:Hn,loaderData:Yn,errors:Bt,fetchers:new Map(_.fetchers)})):(yt({errors:Bt,loaderData:dy(_.loaderData,Yn,Hn,Bt),fetchers:new Map(_.fetchers)}),B=!1)}async function Ua(O,Y,K,oe,he,ke,ge,me,ye){let we=_.fetchers.get(O);Ce(O,_r(ye,we?we.data:void 0),{flushSync:ge});let Ae=new AbortController,Te=Ta(t.history,K,Ae.signal);if(ke){let Ie=await Dl(oe,new URL(Te.url).pathname,Te.signal,O);if(Ie.type==="aborted")return;if(Ie.type==="error"){Ne(O,Y,Ie.error,{flushSync:ge});return}else if(Ie.matches)oe=Ie.matches;else{Ne(O,Y,Nn(404,{pathname:K}),{flushSync:ge});return}}let Ke=_o(oe,K);se.set(O,Ae);let Fe=xe,gt=_a(s,c,Te,oe,Ke,r,he),bt=(await il(Te,gt,he,O))[Ke.route.id];if(se.get(O)===Ae&&se.delete(O),!Te.signal.aborted){if(ve.has(O)){Ce(O,jl(void 0));return}if(Hi(bt))if(N>Fe){Ce(O,jl(void 0));return}else{Z.add(O),await pt(Te,bt,!1,{preventScrollReset:me});return}if(bn(bt)){Ne(O,Y,bt.error);return}Ce(O,jl(bt.data))}}async function pt(O,Y,K,{submission:oe,fetcherSubmission:he,preventScrollReset:ke,replace:ge}={}){K||(J?.resolve(),J=null),Y.response.headers.has("X-Remix-Revalidate")&&(B=!0);let me=Y.response.headers.get("Location");Be(me,"Expected a Location header on the redirect Response"),me=sy(me,new URL(O.url),m,t.history);let ye=Gr(_.location,me,{_isRedirect:!0});if(a){let gt=!1;if(Y.response.headers.has("X-Remix-Reload-Document"))gt=!0;else if(gd(me)){const vt=kv(me,!0);gt=vt.origin!==l.location.origin||On(vt.pathname,m)==null}if(gt){ge?l.location.replace(me):l.location.assign(me);return}}V=null;let we=ge===!0||Y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ae,formAction:Te,formEncType:Ke}=_.navigation;!oe&&!he&&Ae&&Te&&Ke&&(oe=py(_.navigation));let Fe=oe||he;if(HS.has(Y.response.status)&&Fe&&Ft(Fe.formMethod))await Pt(we,ye,{submission:{...Fe,formAction:me},preventScrollReset:ke||R,enableViewTransition:K?G:void 0});else{let gt=xf(ye,oe);await Pt(we,ye,{overrideNavigation:gt,fetcherSubmission:he,preventScrollReset:ke||R,enableViewTransition:K?G:void 0})}}async function il(O,Y,K,oe){let he,ke={};try{he=await KS(y,O,Y,oe,K,!1)}catch(ge){return Y.filter(me=>me.shouldLoad).forEach(me=>{ke[me.route.id]={type:"error",error:ge}}),ke}if(O.signal.aborted)return ke;if(!Ft(O.method))for(let ge of Y){if(he[ge.route.id]?.type==="error")break;!he.hasOwnProperty(ge.route.id)&&!_.loaderData.hasOwnProperty(ge.route.id)&&(!_.errors||!_.errors.hasOwnProperty(ge.route.id))&&ge.shouldCallHandler()&&(he[ge.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ge.route.id}`)})}for(let[ge,me]of Object.entries(he))if(aE(me)){let ye=me.result;ke[ge]={type:"redirect",response:WS(ye,O,ge,Y,m)}}else ke[ge]=await JS(me);return ke}async function ae(O,Y,K,oe){let he=il(K,O,oe,null),ke=Promise.all(Y.map(async ye=>{if(ye.matches&&ye.match&&ye.request&&ye.controller){let Ae=(await il(ye.request,ye.matches,oe,ye.key))[ye.match.route.id];return{[ye.key]:Ae}}else return Promise.resolve({[ye.key]:{type:"error",error:Nn(404,{pathname:ye.path})}})})),ge=await he,me=(await ke).reduce((ye,we)=>Object.assign(ye,we),{});return{loaderResults:ge,fetcherResults:me}}function de(){B=!0,T.forEach((O,Y)=>{se.has(Y)&&ee.add(Y),nt(Y)})}function Ce(O,Y,K={}){_.fetchers.set(O,Y),yt({fetchers:new Map(_.fetchers)},{flushSync:(K&&K.flushSync)===!0})}function Ne(O,Y,K,oe={}){let he=ui(_.matches,Y);on(O),yt({errors:{[he.route.id]:K},fetchers:new Map(_.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function Pe(O){return ce.set(O,(ce.get(O)||0)+1),ve.has(O)&&ve.delete(O),_.fetchers.get(O)||qS}function $t(O,Y){nt(O,Y?.reason),Ce(O,jl(null))}function on(O){let Y=_.fetchers.get(O);se.has(O)&&!(Y&&Y.state==="loading"&&L.has(O))&&nt(O),T.delete(O),L.delete(O),Z.delete(O),ve.delete(O),ee.delete(O),_.fetchers.delete(O)}function Lt(O){let Y=(ce.get(O)||0)-1;Y<=0?(ce.delete(O),ve.add(O)):ce.set(O,Y),yt({fetchers:new Map(_.fetchers)})}function nt(O,Y){let K=se.get(O);K&&(K.abort(Y),se.delete(O))}function Ut(O){for(let Y of O){let K=Pe(Y),oe=jl(K.data);_.fetchers.set(Y,oe)}}function tt(){let O=[],Y=!1;for(let K of Z){let oe=_.fetchers.get(K);Be(oe,`Expected fetcher: ${K}`),oe.state==="loading"&&(Z.delete(K),O.push(K),Y=!0)}return Ut(O),Y}function Bn(O){let Y=[];for(let[K,oe]of L)if(oe<O){let he=_.fetchers.get(K);Be(he,`Expected fetcher: ${K}`),he.state==="loading"&&(nt(K),L.delete(K),Y.push(K))}return Ut(Y),Y.length>0}function sn(O,Y){let K=_.blockers.get(O)||Ar;return be.get(O)!==Y&&be.set(O,Y),K}function lu(O){_.blockers.delete(O),be.delete(O)}function al(O,Y){let K=_.blockers.get(O)||Ar;Be(K.state==="unblocked"&&Y.state==="blocked"||K.state==="blocked"&&Y.state==="blocked"||K.state==="blocked"&&Y.state==="proceeding"||K.state==="blocked"&&Y.state==="unblocked"||K.state==="proceeding"&&Y.state==="unblocked",`Invalid blocker state transition: ${K.state} -> ${Y.state}`);let oe=new Map(_.blockers);oe.set(O,Y),yt({blockers:oe})}function pi({currentLocation:O,nextLocation:Y,historyAction:K}){if(be.size===0)return;be.size>1&&Rt(!1,"A router only supports one blocker at a time");let oe=Array.from(be.entries()),[he,ke]=oe[oe.length-1],ge=_.blockers.get(he);if(!(ge&&ge.state==="proceeding")&&ke({currentLocation:O,nextLocation:Y,historyAction:K}))return he}function Nl(O){let Y=Nn(404,{pathname:O}),K=p||d,{matches:oe,route:he}=vo(K);return{notFoundMatches:oe,route:he,error:Y}}function rl(O,Y,K){if(E=O,z=Y,A=K||null,!C&&_.navigation===bf){C=!0;let oe=iu(_.location,_.matches);oe!=null&&yt({restoreScrollPosition:oe})}return()=>{E=null,z=null,A=null}}function gi(O,Y){return A&&A(O,Y.map(oe=>dS(oe,_.loaderData)))||O.key}function yi(O,Y){if(E&&z){let K=gi(O,Y);E[K]=z()}}function iu(O,Y){if(E){let K=gi(O,Y),oe=E[K];if(typeof oe=="number")return oe}return null}function vi(O,Y,K){if(t.patchRoutesOnNavigation)if(O){if(Object.keys(O[0].params).length>0)return{active:!0,matches:Lr(Y,K,m,!0)}}else return{active:!0,matches:Lr(Y,K,m,!0)||[]};return{active:!1,matches:null}}async function Dl(O,Y,K,oe){if(!t.patchRoutesOnNavigation)return{type:"success",matches:O};let he=O;for(;;){let ke=p==null,ge=p||d,me=c;try{await t.patchRoutesOnNavigation({signal:K,path:Y,matches:he,fetcherKey:oe,patch:(Ae,Te)=>{K.aborted||ay(Ae,Te,ge,me,s,!1)}})}catch(Ae){return{type:"error",error:Ae,partialMatches:he}}finally{ke&&!K.aborted&&(d=[...d])}if(K.aborted)return{type:"aborted"};let ye=ri(ge,Y,m),we=null;if(ye){if(Object.keys(ye[0].params).length===0)return{type:"success",matches:ye};if(we=Lr(ge,Y,m,!0),!(we&&he.length<we.length&&Ol(he,we.slice(0,he.length))))return{type:"success",matches:ye}}if(we||(we=Lr(ge,Y,m,!0)),!we||Ol(he,we))return{type:"success",matches:null};he=we}}function Ol(O,Y){return O.length===Y.length&&O.every((K,oe)=>K.route.id===Y[oe].route.id)}function ls(O){c={},p=Vr(O,s,void 0,c)}function au(O,Y,K=!1){let oe=p==null;ay(O,Y,p||d,c,s,K),oe&&(d=[...d],yt({}))}return H={get basename(){return m},get future(){return g},get state(){return _},get routes(){return d},get window(){return l},initialize:Re,subscribe:Ln,enableScrollRestoration:rl,navigate:Sn,fetch:mi,revalidate:Rl,createHref:O=>t.history.createHref(O),encodeLocation:O=>t.history.encodeLocation(O),getFetcher:Pe,resetFetcher:$t,deleteFetcher:Lt,dispose:zt,getBlocker:sn,deleteBlocker:lu,patchRoutes:au,_internalFetchControllers:se,_internalSetRoutes:ls,_internalSetStateDoNotUseOrYouWillBreakYourApp(O){yt(O)}},t.unstable_instrumentations&&(H=zS(H,t.unstable_instrumentations.map(O=>O.router).filter(Boolean))),H}function VS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Vf(t,l,a,r,o,s){let c,d;if(o){c=[];for(let m of l)if(c.push(m),m.route.id===o){d=m;break}}else c=l,d=l[l.length-1];let p=vd(r||".",yd(c),On(t.pathname,a)||t.pathname,s==="path");if(r==null&&(p.search=t.search,p.hash=t.hash),(r==null||r===""||r===".")&&d){let m=Sd(p.search);if(d.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&m){let y=new URLSearchParams(p.search),g=y.getAll("index");y.delete("index"),g.filter(x=>x).forEach(x=>y.append("index",x));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=CS({basename:a,pathname:p.pathname})),el(p)}function ly(t,l,a){if(!a||!VS(a))return{path:l};if(a.formMethod&&!oE(a.formMethod))return{path:l,error:Nn(405,{method:a.formMethod})};let r=()=>({path:l,error:Nn(400,{type:"invalid-body"})}),s=(a.formMethod||"get").toUpperCase(),c=Yv(l);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!Ft(s))return r();let g=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[x,E])=>`${b}${x}=${E}
|
|
10
|
-
`,""):String(a.body);return{path:l,submission:{formMethod:s,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:g}}}else if(a.formEncType==="application/json"){if(!Ft(s))return r();try{let g=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:l,submission:{formMethod:s,formAction:c,formEncType:a.formEncType,formData:void 0,json:g,text:void 0}}}catch{return r()}}}Be(typeof FormData=="function","FormData is not available in this environment");let d,p;if(a.formData)d=Qf(a.formData),p=a.formData;else if(a.body instanceof FormData)d=Qf(a.body),p=a.body;else if(a.body instanceof URLSearchParams)d=a.body,p=cy(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=cy(d)}catch{return r()}let m={formMethod:s,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(Ft(m.formMethod))return{path:l,submission:m};let y=fi(l);return t&&y.search&&Sd(y.search)&&d.append("index",""),y.search=`?${d}`,{path:el(y),submission:m}}function iy(t,l,a,r,o,s,c,d,p,m,y,g,b,x,E,A,z,C,j,D,te){let P=D?bn(D[1])?D[1].error:D[1].data:void 0,H=o.createURL(s.location),_=o.createURL(p),ne;if(y&&s.errors){let I=Object.keys(s.errors)[0];ne=c.findIndex(B=>B.route.id===I)}else if(D&&bn(D[1])){let I=D[0];ne=c.findIndex(B=>B.route.id===I)-1}let J=D?D[1].statusCode:void 0,R=J&&J>=400,V={currentUrl:H,currentParams:s.matches[0]?.params||{},nextUrl:_,nextParams:c[0].params,...d,actionResult:P,actionStatus:J},G=$r(c),F=c.map((I,B)=>{let{route:ee}=I,se=null;if(ne!=null&&B>ne?se=!1:ee.lazy?se=!0:bd(ee)?y?se=Ff(ee,s.loaderData,s.errors):FS(s.loaderData,s.matches[B],I)&&(se=!0):se=!1,se!==null)return If(a,r,t,G,I,m,l,se);let xe=!1;typeof te=="boolean"?xe=te:R?xe=!1:(g||H.pathname+H.search===_.pathname+_.search||H.search!==_.search||IS(s.matches[B],I))&&(xe=!0);let N={...V,defaultShouldRevalidate:xe},L=Ur(I,N);return If(a,r,t,G,I,m,l,L,N,te)}),le=[];return E.forEach((I,B)=>{if(y||!c.some(ce=>ce.route.id===I.routeId)||x.has(B))return;let ee=s.fetchers.get(B),se=ee&&ee.state!=="idle"&&ee.data===void 0,xe=ri(z,I.path,C);if(!xe){if(j&&se)return;le.push({key:B,routeId:I.routeId,path:I.path,matches:null,match:null,request:null,controller:null});return}if(A.has(B))return;let N=_o(xe,I.path),L=new AbortController,Z=Ta(o,I.path,L.signal),T=null;if(b.has(B))b.delete(B),T=_a(a,r,Z,xe,N,m,l);else if(se)g&&(T=_a(a,r,Z,xe,N,m,l));else{let ce;typeof te=="boolean"?ce=te:R?ce=!1:ce=g;let ve={...V,defaultShouldRevalidate:ce};Ur(N,ve)&&(T=_a(a,r,Z,xe,N,m,l,ve))}T&&le.push({key:B,routeId:I.routeId,path:I.path,matches:T,match:N,request:Z,controller:L})}),{dsMatches:F,revalidatingFetchers:le}}function bd(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function Ff(t,l,a){if(t.lazy)return!0;if(!bd(t))return!1;let r=l!=null&&t.id in l,o=a!=null&&a[t.id]!==void 0;return!r&&o?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!o}function FS(t,l,a){let r=!l||a.route.id!==l.route.id,o=!t.hasOwnProperty(a.route.id);return r||o}function IS(t,l){let a=t.route.path;return t.pathname!==l.pathname||a!=null&&a.endsWith("*")&&t.params["*"]!==l.params["*"]}function Ur(t,l){if(t.route.shouldRevalidate){let a=t.route.shouldRevalidate(l);if(typeof a=="boolean")return a}return l.defaultShouldRevalidate}function ay(t,l,a,r,o,s){let c;if(t){let m=r[t];Be(m,`No route found to patch children into: routeId = ${t}`),m.children||(m.children=[]),c=m.children}else c=a;let d=[],p=[];if(l.forEach(m=>{let y=c.find(g=>Lv(m,g));y?p.push({existingRoute:y,newRoute:m}):d.push(m)}),d.length>0){let m=Vr(d,o,[t||"_","patch",String(c?.length||"0")],r);c.push(...m)}if(s&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:y,newRoute:g}=p[m],b=y,[x]=Vr([g],o,[],{},!0);Object.assign(b,{element:x.element?x.element:b.element,errorElement:x.errorElement?x.errorElement:b.errorElement,hydrateFallbackElement:x.hydrateFallbackElement?x.hydrateFallbackElement:b.hydrateFallbackElement})}}function Lv(t,l){return"id"in t&&"id"in l&&t.id===l.id?!0:t.index===l.index&&t.path===l.path&&t.caseSensitive===l.caseSensitive?(!t.children||t.children.length===0)&&(!l.children||l.children.length===0)?!0:t.children.every((a,r)=>l.children?.some(o=>Lv(a,o))):!1}var ry=new WeakMap,Uv=({key:t,route:l,manifest:a,mapRouteProperties:r})=>{let o=a[l.id];if(Be(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let s=o.lazy[t];if(!s)return;let c=ry.get(o);c||(c={},ry.set(o,c));let d=c[t];if(d)return d;let p=(async()=>{let m=oS(t),g=o[t]!==void 0&&t!=="hasErrorBoundary";if(m)Rt(!m,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(g)Rt(!1,`Route "${o.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let b=await s();b!=null&&(Object.assign(o,{[t]:b}),Object.assign(o,r(o)))}typeof o.lazy=="object"&&(o.lazy[t]=void 0,Object.values(o.lazy).every(b=>b===void 0)&&(o.lazy=void 0))})();return c[t]=p,p},uy=new WeakMap;function QS(t,l,a,r,o){let s=a[t.id];if(Be(s,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let y=uy.get(s);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let g=(async()=>{Be(typeof t.lazy=="function","No lazy route function found");let b=await t.lazy(),x={};for(let E in b){let A=b[E];if(A===void 0)continue;let z=cS(E),j=s[E]!==void 0&&E!=="hasErrorBoundary";z?Rt(!z,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):j?Rt(!j,`Route "${s.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):x[E]=A}Object.assign(s,x),Object.assign(s,{...r(s),lazy:void 0})})();return uy.set(s,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let c=Object.keys(t.lazy),d=[],p;for(let y of c){if(o&&o.includes(y))continue;let g=Uv({key:y,route:t,manifest:a,mapRouteProperties:r});g&&(d.push(g),y===l&&(p=g))}let m=d.length>0?Promise.all(d).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function oy(t){let l=t.matches.filter(o=>o.shouldLoad),a={};return(await Promise.all(l.map(o=>o.resolve()))).forEach((o,s)=>{a[l[s].route.id]=o}),a}async function XS(t){return t.matches.some(l=>l.route.middleware)?Bv(t,()=>oy(t)):oy(t)}function Bv(t,l){return $S(t,l,r=>{if(uE(r))throw r;return r},lE,a);function a(r,o,s){if(s)return Promise.resolve(Object.assign(s.value,{[o]:{type:"error",result:r}}));{let{matches:c}=t,d=Math.min(Math.max(c.findIndex(m=>m.route.id===o),0),Math.max(c.findIndex(m=>m.shouldCallHandler()),0)),p=ui(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:r}})}}}async function $S(t,l,a,r,o){let{matches:s,request:c,params:d,context:p,unstable_pattern:m}=t,y=s.flatMap(b=>b.route.middleware?b.route.middleware.map(x=>[b.route.id,x]):[]);return await Hv({request:c,params:d,context:p,unstable_pattern:m},y,l,a,r,o)}async function Hv(t,l,a,r,o,s,c=0){let{request:d}=t;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=l[c];if(!p)return await a();let[m,y]=p,g,b=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await Hv(t,l,a,r,o,s,c+1)},g.value}catch(x){return g={value:await s(x,m,g)},g.value}};try{let x=await y(t,b),E=x!=null?r(x):void 0;return o(E)?E:g?E??g.value:(g={value:await b()},g.value)}catch(x){return await s(x,m,g)}}function qv(t,l,a,r,o){let s=Uv({key:"middleware",route:r.route,manifest:l,mapRouteProperties:t}),c=QS(r.route,Ft(a.method)?"action":"loader",l,t,o);return{middleware:s,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function If(t,l,a,r,o,s,c,d,p=null,m){let y=!1,g=qv(t,l,a,o,s);return{...o,_lazyPromises:g,shouldLoad:d,shouldRevalidateArgs:p,shouldCallHandler(b){return y=!0,p?typeof m=="boolean"?Ur(o,{...p,defaultShouldRevalidate:m}):typeof b=="boolean"?Ur(o,{...p,defaultShouldRevalidate:b}):Ur(o,p):d},resolve(b){let{lazy:x,loader:E,middleware:A}=o.route,z=y||d||b&&!Ft(a.method)&&(x||E),C=A&&A.length>0&&!E&&!x;return z&&(Ft(a.method)||!C)?ZS({request:a,unstable_pattern:r,match:o,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:b,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function _a(t,l,a,r,o,s,c,d=null){return r.map(p=>p.route.id!==o.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:qv(t,l,a,p,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:If(t,l,a,$r(r),p,s,c,!0,d))}async function KS(t,l,a,r,o,s){a.some(m=>m._lazyPromises?.middleware)&&await Promise.all(a.map(m=>m._lazyPromises?.middleware));let c={request:l,unstable_pattern:$r(a),params:a[0].params,context:o,matches:a},p=await t({...c,fetcherKey:r,runClientMiddleware:m=>{let y=c;return Bv(y,()=>m({...y,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function ZS({request:t,unstable_pattern:l,match:a,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:s,scopedContext:c}){let d,p,m=Ft(t.method),y=m?"action":"loader",g=b=>{let x,E=new Promise((C,j)=>x=j);p=()=>x(),t.signal.addEventListener("abort",p);let A=C=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${a.route.id}]`)):b({request:t,unstable_pattern:l,params:a.params,context:c},...C!==void 0?[C]:[]),z=(async()=>{try{return{type:"data",result:await(s?s(j=>A(j)):A())}}catch(C){return{type:"error",result:C}}})();return Promise.race([z,E])};try{let b=m?a.route.action:a.route.loader;if(r||o)if(b){let x,[E]=await Promise.all([g(b).catch(A=>{x=A}),r,o]);if(x!==void 0)throw x;d=E}else{await r;let x=m?a.route.action:a.route.loader;if(x)[d]=await Promise.all([g(x),o]);else if(y==="action"){let E=new URL(t.url),A=E.pathname+E.search;throw Nn(405,{method:t.method,pathname:A,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(b)d=await g(b);else{let x=new URL(t.url),E=x.pathname+x.search;throw Nn(404,{pathname:E})}}catch(b){return{type:"error",result:b}}finally{p&&t.signal.removeEventListener("abort",p)}return d}async function PS(t){let l=t.headers.get("Content-Type");return l&&/\bapplication\/json\b/.test(l)?t.body==null?null:t.json():t.text()}async function JS(t){let{result:l,type:a}=t;if(xd(l)){let r;try{r=await PS(l)}catch(o){return{type:"error",error:o}}return a==="error"?{type:"error",error:new Xr(l.status,l.statusText,r),statusCode:l.status,headers:l.headers}:{type:"data",data:r,statusCode:l.status,headers:l.headers}}return a==="error"?my(l)?l.data instanceof Error?{type:"error",error:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:nE(l),statusCode:Fr(l)?l.status:void 0,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:l,statusCode:Fr(l)?l.status:void 0}:my(l)?{type:"data",data:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"data",data:l}}function WS(t,l,a,r,o){let s=t.headers.get("Location");if(Be(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!gd(s)){let c=r.slice(0,r.findIndex(d=>d.route.id===a)+1);s=Vf(new URL(l.url),c,o,s),t.headers.set("Location",s)}return t}function sy(t,l,a,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(gd(t)){let s=t,c=s.startsWith("//")?new URL(l.protocol+s):new URL(s);if(o.includes(c.protocol))throw new Error("Invalid redirect location");let d=On(c.pathname,a)!=null;if(c.origin===l.origin&&d)return c.pathname+c.search+c.hash}try{let s=r.createURL(t);if(o.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Ta(t,l,a,r){let o=t.createURL(Yv(l)).toString(),s={signal:a};if(r&&Ft(r.formMethod)){let{formMethod:c,formEncType:d}=r;s.method=c.toUpperCase(),d==="application/json"?(s.headers=new Headers({"Content-Type":d}),s.body=JSON.stringify(r.json)):d==="text/plain"?s.body=r.text:d==="application/x-www-form-urlencoded"&&r.formData?s.body=Qf(r.formData):s.body=r.formData}return new Request(o,s)}function Qf(t){let l=new URLSearchParams;for(let[a,r]of t.entries())l.append(a,typeof r=="string"?r:r.name);return l}function cy(t){let l=new FormData;for(let[a,r]of t.entries())l.append(a,r);return l}function eE(t,l,a,r=!1,o=!1){let s={},c=null,d,p=!1,m={},y=a&&bn(a[1])?a[1].error:void 0;return t.forEach(g=>{if(!(g.route.id in l))return;let b=g.route.id,x=l[b];if(Be(!Hi(x),"Cannot handle redirect results in processLoaderData"),bn(x)){let E=x.error;if(y!==void 0&&(E=y,y=void 0),c=c||{},o)c[b]=E;else{let A=ui(t,b);c[A.route.id]==null&&(c[A.route.id]=E)}r||(s[b]=Mv),p||(p=!0,d=Fr(x.error)?x.error.status:500),x.headers&&(m[b]=x.headers)}else s[b]=x.data,x.statusCode&&x.statusCode!==200&&!p&&(d=x.statusCode),x.headers&&(m[b]=x.headers)}),y!==void 0&&a&&(c={[a[0]]:y},a[2]&&(s[a[2]]=void 0)),{loaderData:s,errors:c,statusCode:d||200,loaderHeaders:m}}function fy(t,l,a,r,o,s){let{loaderData:c,errors:d}=eE(l,a,r);return o.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:y,controller:g}=p;if(g&&g.signal.aborted)return;let b=s[m];if(Be(b,"Did not find corresponding fetcher result"),bn(b)){let x=ui(t.matches,y?.route.id);d&&d[x.route.id]||(d={...d,[x.route.id]:b.error}),t.fetchers.delete(m)}else if(Hi(b))Be(!1,"Unhandled fetcher revalidation redirect");else{let x=jl(b.data);t.fetchers.set(m,x)}}),{loaderData:c,errors:d}}function dy(t,l,a,r){let o=Object.entries(l).filter(([,s])=>s!==Mv).reduce((s,[c,d])=>(s[c]=d,s),{});for(let s of a){let c=s.route.id;if(!l.hasOwnProperty(c)&&t.hasOwnProperty(c)&&s.route.loader&&(o[c]=t[c]),r&&r.hasOwnProperty(c))break}return o}function hy(t){return t?bn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ui(t,l){return(l?t.slice(0,t.findIndex(r=>r.route.id===l)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function vo(t){let l=t.length===1?t[0]:t.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:l}],route:l}}function Nn(t,{pathname:l,routeId:a,method:r,type:o,message:s}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return t===400?(c="Bad Request",r&&l&&a?d=`You made a ${r} request to "${l}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:o==="invalid-body"&&(d="Unable to encode submission body")):t===403?(c="Forbidden",d=`Route "${a}" does not match URL "${l}"`):t===404?(c="Not Found",d=`No route matches URL "${l}"`):t===405&&(c="Method Not Allowed",r&&l&&a?d=`You made a ${r.toUpperCase()} request to "${l}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:r&&(d=`Invalid request method "${r.toUpperCase()}"`)),new Xr(t||500,c,new Error(d),!0)}function bo(t){let l=Object.entries(t);for(let a=l.length-1;a>=0;a--){let[r,o]=l[a];if(Hi(o))return{key:r,result:o}}}function Yv(t){let l=typeof t=="string"?fi(t):t;return el({...l,hash:""})}function tE(t,l){return t.pathname!==l.pathname||t.search!==l.search?!1:t.hash===""?l.hash!=="":t.hash===l.hash?!0:l.hash!==""}function nE(t){return new Xr(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function lE(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([l,a])=>typeof l=="string"&&iE(a))}function iE(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function aE(t){return xd(t.result)&&Dv.has(t.result.status)}function bn(t){return t.type==="error"}function Hi(t){return(t&&t.type)==="redirect"}function my(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function xd(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function rE(t){return Dv.has(t)}function uE(t){return xd(t)&&rE(t.status)&&t.headers.has("Location")}function oE(t){return BS.has(t.toUpperCase())}function Ft(t){return LS.has(t.toUpperCase())}function Sd(t){return new URLSearchParams(t).getAll("index").some(l=>l==="")}function _o(t,l){let a=typeof l=="string"?fi(l).search:l.search;if(t[t.length-1].route.index&&Sd(a||""))return t[t.length-1];let r=Av(t);return r[r.length-1]}function py(t){let{formMethod:l,formAction:a,formEncType:r,text:o,formData:s,json:c}=t;if(!(!l||!a||!r)){if(o!=null)return{formMethod:l,formAction:a,formEncType:r,formData:void 0,json:void 0,text:o};if(s!=null)return{formMethod:l,formAction:a,formEncType:r,formData:s,json:void 0,text:void 0};if(c!==void 0)return{formMethod:l,formAction:a,formEncType:r,formData:void 0,json:c,text:void 0}}}function xf(t,l){return l?{state:"loading",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function sE(t,l){return{state:"submitting",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}}function _r(t,l){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:l}}function cE(t,l){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l?l.data:void 0}}function jl(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function fE(t,l){try{let a=t.sessionStorage.getItem(Ov);if(a){let r=JSON.parse(a);for(let[o,s]of Object.entries(r||{}))s&&Array.isArray(s)&&l.set(o,new Set(s||[]))}}catch{}}function dE(t,l){if(l.size>0){let a={};for(let[r,o]of l)a[r]=[...o];try{t.sessionStorage.setItem(Ov,JSON.stringify(a))}catch(r){Rt(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function gy(){let t,l,a=new Promise((r,o)=>{t=async s=>{r(s);try{await a}catch{}},l=async s=>{o(s);try{await a}catch{}}});return{promise:a,resolve:t,reject:l}}var Yi=k.createContext(null);Yi.displayName="DataRouter";var Kr=k.createContext(null);Kr.displayName="DataRouterState";var Gv=k.createContext(!1);function hE(){return k.useContext(Gv)}var Ed=k.createContext({isTransitioning:!1});Ed.displayName="ViewTransition";var Vv=k.createContext(new Map);Vv.displayName="Fetchers";var mE=k.createContext(null);mE.displayName="Await";var Mn=k.createContext(null);Mn.displayName="Navigation";var Vo=k.createContext(null);Vo.displayName="Location";var Qn=k.createContext({outlet:null,matches:[],isDataRoute:!1});Qn.displayName="Route";var wd=k.createContext(null);wd.displayName="RouteError";var Fv="REACT_ROUTER_ERROR",pE="REDIRECT",gE="ROUTE_ERROR_RESPONSE";function yE(t){if(t.startsWith(`${Fv}:${pE}:{`))try{let l=JSON.parse(t.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function vE(t){if(t.startsWith(`${Fv}:${gE}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Xr(l.status,l.statusText,l.data)}catch{}}function bE(t,{relative:l}={}){Be(Zr(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:r}=k.useContext(Mn),{hash:o,pathname:s,search:c}=Pr(t,{relative:l}),d=s;return a!=="/"&&(d=s==="/"?a:Wn([a,s])),r.createHref({pathname:d,search:c,hash:o})}function Zr(){return k.useContext(Vo)!=null}function tl(){return Be(Zr(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Vo).location}var Iv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Qv(t){k.useContext(Mn).static||k.useLayoutEffect(t)}function Da(){let{isDataRoute:t}=k.useContext(Qn);return t?DE():xE()}function xE(){Be(Zr(),"useNavigate() may be used only in the context of a <Router> component.");let t=k.useContext(Yi),{basename:l,navigator:a}=k.useContext(Mn),{matches:r}=k.useContext(Qn),{pathname:o}=tl(),s=JSON.stringify(yd(r)),c=k.useRef(!1);return Qv(()=>{c.current=!0}),k.useCallback((p,m={})=>{if(Rt(c.current,Iv),!c.current)return;if(typeof p=="number"){a.go(p);return}let y=vd(p,JSON.parse(s),o,m.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:Wn([l,y.pathname])),(m.replace?a.replace:a.push)(y,m.state,m)},[l,a,s,o,t])}var Xv=k.createContext(null);function $v(){return k.useContext(Xv)}function SE(t){let l=k.useContext(Qn).outlet;return k.useMemo(()=>l&&k.createElement(Xv.Provider,{value:t},l),[l,t])}function Kv(){let{matches:t}=k.useContext(Qn),l=t[t.length-1];return l?l.params:{}}function Pr(t,{relative:l}={}){let{matches:a}=k.useContext(Qn),{pathname:r}=tl(),o=JSON.stringify(yd(a));return k.useMemo(()=>vd(t,JSON.parse(o),r,l==="path"),[t,o,r,l])}function EE(t,l,a,r,o){Be(Zr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=k.useContext(Mn),{matches:c}=k.useContext(Qn),d=c[c.length-1],p=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let j=g&&g.path||"";Pv(m,!g||j.endsWith("*")||j.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${j}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
8
|
+
`+u.stack}}var ll=Object.prototype.hasOwnProperty,Nl=t.unstable_scheduleCallback,mi=t.unstable_cancelCallback,Ba=t.unstable_shouldYield,Ha=t.unstable_requestPaint,pt=t.unstable_now,il=t.unstable_getCurrentPriorityLevel,ae=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,ze=t.unstable_LowPriority,Pe=t.unstable_IdlePriority,$t=t.log,on=t.unstable_setDisableYieldValue,Ut=null,nt=null;function Bt(e){if(typeof $t=="function"&&on(e),nt&&typeof nt.setStrictMode=="function")try{nt.setStrictMode(Ut,e)}catch{}}var tt=Math.clz32?Math.clz32:lu,Bn=Math.log,sn=Math.LN2;function lu(e){return e>>>=0,e===0?32:31-(Bn(e)/sn|0)|0}var al=256,pi=262144,zl=4194304;function rl(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 gi(e,n,i){var u=e.pendingLanes;if(u===0)return 0;var f=0,h=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var w=u&134217727;return w!==0?(u=w&~h,u!==0?f=rl(u):(v&=w,v!==0?f=rl(v):i||(i=w&~e,i!==0&&(f=rl(i))))):(w=u&~h,w!==0?f=rl(w):v!==0?f=rl(v):i||(i=u&~e,i!==0&&(f=rl(i)))),f===0?0:n!==0&&n!==f&&(n&h)===0&&(h=f&-f,i=n&-n,h>=i||h===32&&(i&4194048)!==0)?n:f}function yi(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function iu(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 vi(){var e=zl;return zl<<=1,(zl&62914560)===0&&(zl=4194304),e}function Dl(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function Ol(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ls(e,n,i,u,f,h){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var w=e.entanglements,M=e.expirationTimes,Q=e.hiddenUpdates;for(i=v&~i;0<i;){var ie=31-tt(i),ue=1<<ie;w[ie]=0,M[ie]=-1;var X=Q[ie];if(X!==null)for(Q[ie]=null,ie=0;ie<X.length;ie++){var J=X[ie];J!==null&&(J.lane&=-536870913)}i&=~ue}u!==0&&au(e,u,0),h!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=h&~(v&~n))}function au(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var u=31-tt(n);e.entangledLanes|=n,e.entanglements[u]=e.entanglements[u]|1073741824|i&261930}function O(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var u=31-tt(i),f=1<<u;f&n|e[u]&n&&(e[u]|=n),i&=~f}}function Y(e,n){var i=n&-n;return i=(i&42)!==0?1:K(i),(i&(e.suspendedLanes|n))!==0?0:i}function K(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 oe(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function he(){var e=ee.p;return e!==0?e:(e=window.event,e===void 0?32:Og(e.type))}function ke(e,n){var i=ee.p;try{return ee.p=e,n()}finally{ee.p=i}}var ge=Math.random().toString(36).slice(2),me="__reactFiber$"+ge,ye="__reactProps$"+ge,we="__reactContainer$"+ge,Ae="__reactEvents$"+ge,Te="__reactListeners$"+ge,Ke="__reactHandles$"+ge,Fe="__reactResources$"+ge,gt="__reactMarker$"+ge;function vt(e){delete e[me],delete e[ye],delete e[Ae],delete e[Te],delete e[Ke]}function bt(e){var n=e[me];if(n)return n;for(var i=e.parentNode;i;){if(n=i[we]||i[me]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=vg(e);e!==null;){if(i=e[me])return i;e=vg(e)}return n}e=i,i=e.parentNode}return null}function Ie(e){if(e=e[me]||e[we]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ot(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function Jt(e){var n=e[Fe];return n||(n=e[Fe]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function ht(e){e[gt]=!0}var Hn=new Set,cn={};function qn(e,n){En(e,n),En(e+"Capture",n)}function En(e,n){for(cn[e]=n,e=0;e<n.length;e++)Hn.add(n[e])}var ul=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]*$"),bi={},xi={};function Qe(e){return ll.call(xi,e)?!0:ll.call(bi,e)?!1:ul.test(e)?xi[e]=!0:(bi[e]=!0,!1)}function Et(e,n,i){if(Qe(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var u=n.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function Yn(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function Ht(e,n,i,u){if(u===null)e.removeAttribute(i);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+u)}}function Xe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Si(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function ru(e,n,i){var u=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var f=u.get,h=u.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(v){i=""+v,h.call(this,v)}}),Object.defineProperty(e,n,{enumerable:u.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function qa(e){if(!e._valueTracker){var n=Si(e)?"checked":"value";e._valueTracker=ru(e,n,""+e[n])}}function lh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),u="";return e&&(u=Si(e)?e.checked?"true":"false":e.value),e=u,e!==i?(n.setValue(e),!0):!1}function uu(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 Ub=/[\n"\\]/g;function wn(e){return e.replace(Ub,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function is(e,n,i,u,f,h,v,w){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+Xe(n)):e.value!==""+Xe(n)&&(e.value=""+Xe(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?as(e,v,Xe(n)):i!=null?as(e,v,Xe(i)):u!=null&&e.removeAttribute("value"),f==null&&h!=null&&(e.defaultChecked=!!h),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?e.name=""+Xe(w):e.removeAttribute("name")}function ih(e,n,i,u,f,h,v,w){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||i!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){qa(e);return}i=i!=null?""+Xe(i):"",n=n!=null?""+Xe(n):i,w||n===e.value||(e.value=n),e.defaultValue=n}u=u??f,u=typeof u!="function"&&typeof u!="symbol"&&!!u,e.checked=w?e.checked:!!u,e.defaultChecked=!!u,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),qa(e)}function as(e,n,i){n==="number"&&uu(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ii(e,n,i,u){if(e=e.options,n){n={};for(var f=0;f<i.length;f++)n["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=n.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&u&&(e[i].defaultSelected=!0)}else{for(i=""+Xe(i),n=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,u&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function ah(e,n,i){if(n!=null&&(n=""+Xe(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+Xe(i):""}function rh(e,n,i,u){if(n==null){if(u!=null){if(i!=null)throw Error(r(92));if($(u)){if(1<u.length)throw Error(r(93));u=u[0]}i=u}i==null&&(i=""),n=i}i=Xe(n),e.defaultValue=i,u=e.textContent,u===i&&u!==""&&u!==null&&(e.value=u),qa(e)}function Qi(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var Bb=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 uh(e,n,i){var u=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?u?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":u?e.setProperty(n,i):typeof i!="number"||i===0||Bb.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function oh(e,n,i){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,i!=null){for(var u in i)!i.hasOwnProperty(u)||n!=null&&n.hasOwnProperty(u)||(u.indexOf("--")===0?e.setProperty(u,""):u==="float"?e.cssFloat="":e[u]="");for(var f in n)u=n[f],n.hasOwnProperty(f)&&i[f]!==u&&uh(e,f,u)}else for(var h in n)n.hasOwnProperty(h)&&uh(e,h,n[h])}function rs(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 Hb=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"]]),qb=/^[\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 ou(e){return qb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ol(){}var us=null;function os(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Xi=null,$i=null;function sh(e){var n=Ie(e);if(n&&(e=n.stateNode)){var i=e[ye]||null;e:switch(e=n.stateNode,n.type){case"input":if(is(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+wn(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var u=i[n];if(u!==e&&u.form===e.form){var f=u[ye]||null;if(!f)throw Error(r(90));is(u,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<i.length;n++)u=i[n],u.form===e.form&&lh(u)}break e;case"textarea":ah(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Ii(e,!!i.multiple,n,!1)}}}var ss=!1;function ch(e,n,i){if(ss)return e(n,i);ss=!0;try{var u=e(n);return u}finally{if(ss=!1,(Xi!==null||$i!==null)&&(Ku(),Xi&&(n=Xi,e=$i,$i=Xi=null,sh(n),e)))for(n=0;n<e.length;n++)sh(e[n])}}function Ya(e,n){var i=e.stateNode;if(i===null)return null;var u=i[ye]||null;if(u===null)return null;i=u[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":(u=!u.disabled)||(e=e.type,u=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!u;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,n,typeof i));return i}var sl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cs=!1;if(sl)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){cs=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{cs=!1}var Ml=null,fs=null,su=null;function fh(){if(su)return su;var e,n=fs,i=n.length,u,f="value"in Ml?Ml.value:Ml.textContent,h=f.length;for(e=0;e<i&&n[e]===f[e];e++);var v=i-e;for(u=1;u<=v&&n[i-u]===f[h-u];u++);return su=f.slice(e,1<u?1-u:void 0)}function cu(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 fu(){return!0}function dh(){return!1}function Wt(e){function n(i,u,f,h,v){this._reactName=i,this._targetInst=f,this.type=u,this.nativeEvent=h,this.target=v,this.currentTarget=null;for(var w in e)e.hasOwnProperty(w)&&(i=e[w],this[w]=i?i(h):h[w]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?fu:dh,this.isPropagationStopped=dh,this}return g(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=fu)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=fu)},persist:function(){},isPersistent:fu}),n}var Ei={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},du=Wt(Ei),Va=g({},Ei,{view:0,detail:0}),Yb=Wt(Va),ds,hs,Fa,hu=g({},Va,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ps,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!==Fa&&(Fa&&e.type==="mousemove"?(ds=e.screenX-Fa.screenX,hs=e.screenY-Fa.screenY):hs=ds=0,Fa=e),ds)},movementY:function(e){return"movementY"in e?e.movementY:hs}}),hh=Wt(hu),Gb=g({},hu,{dataTransfer:0}),Vb=Wt(Gb),Fb=g({},Va,{relatedTarget:0}),ms=Wt(Fb),Ib=g({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),Qb=Wt(Ib),Xb=g({},Ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$b=Wt(Xb),Kb=g({},Ei,{data:0}),mh=Wt(Kb),Zb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Pb={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"},Jb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Wb(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=Jb[e])?!!n[e]:!1}function ps(){return Wb}var e1=g({},Va,{key:function(e){if(e.key){var n=Zb[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=cu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Pb[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ps,charCode:function(e){return e.type==="keypress"?cu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),t1=Wt(e1),n1=g({},hu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ph=Wt(n1),l1=g({},Va,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ps}),i1=Wt(l1),a1=g({},Ei,{propertyName:0,elapsedTime:0,pseudoElement:0}),r1=Wt(a1),u1=g({},hu,{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}),o1=Wt(u1),s1=g({},Ei,{newState:0,oldState:0}),c1=Wt(s1),f1=[9,13,27,32],gs=sl&&"CompositionEvent"in window,Ia=null;sl&&"documentMode"in document&&(Ia=document.documentMode);var d1=sl&&"TextEvent"in window&&!Ia,gh=sl&&(!gs||Ia&&8<Ia&&11>=Ia),yh=" ",vh=!1;function bh(e,n){switch(e){case"keyup":return f1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ki=!1;function h1(e,n){switch(e){case"compositionend":return xh(n);case"keypress":return n.which!==32?null:(vh=!0,yh);case"textInput":return e=n.data,e===yh&&vh?null:e;default:return null}}function m1(e,n){if(Ki)return e==="compositionend"||!gs&&bh(e,n)?(e=fh(),su=fs=Ml=null,Ki=!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 gh&&n.locale!=="ko"?null:n.data;default:return null}}var p1={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 Sh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!p1[e.type]:n==="textarea"}function Eh(e,n,i,u){Xi?$i?$i.push(u):$i=[u]:Xi=u,n=no(n,"onChange"),0<n.length&&(i=new du("onChange","change",null,i,u),e.push({event:i,listeners:n}))}var Qa=null,Xa=null;function g1(e){ig(e,0)}function mu(e){var n=Ot(e);if(lh(n))return e}function wh(e,n){if(e==="change")return n}var kh=!1;if(sl){var ys;if(sl){var vs="oninput"in document;if(!vs){var Ch=document.createElement("div");Ch.setAttribute("oninput","return;"),vs=typeof Ch.oninput=="function"}ys=vs}else ys=!1;kh=ys&&(!document.documentMode||9<document.documentMode)}function Th(){Qa&&(Qa.detachEvent("onpropertychange",jh),Xa=Qa=null)}function jh(e){if(e.propertyName==="value"&&mu(Xa)){var n=[];Eh(n,Xa,e,os(e)),ch(g1,n)}}function y1(e,n,i){e==="focusin"?(Th(),Qa=n,Xa=i,Qa.attachEvent("onpropertychange",jh)):e==="focusout"&&Th()}function v1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mu(Xa)}function b1(e,n){if(e==="click")return mu(n)}function x1(e,n){if(e==="input"||e==="change")return mu(n)}function S1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var fn=typeof Object.is=="function"?Object.is:S1;function $a(e,n){if(fn(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),u=Object.keys(n);if(i.length!==u.length)return!1;for(u=0;u<i.length;u++){var f=i[u];if(!ll.call(n,f)||!fn(e[f],n[f]))return!1}return!0}function Ah(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _h(e,n){var i=Ah(e);e=0;for(var u;i;){if(i.nodeType===3){if(u=e+i.textContent.length,e<=n&&u>=n)return{node:i,offset:n-e};e=u}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Ah(i)}}function Rh(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Rh(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Nh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=uu(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=uu(e.document)}return n}function bs(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 E1=sl&&"documentMode"in document&&11>=document.documentMode,Zi=null,xs=null,Ka=null,Ss=!1;function zh(e,n,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ss||Zi==null||Zi!==uu(u)||(u=Zi,"selectionStart"in u&&bs(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ka&&$a(Ka,u)||(Ka=u,u=no(xs,"onSelect"),0<u.length&&(n=new du("onSelect","select",null,n,i),e.push({event:n,listeners:u}),n.target=Zi)))}function wi(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var Pi={animationend:wi("Animation","AnimationEnd"),animationiteration:wi("Animation","AnimationIteration"),animationstart:wi("Animation","AnimationStart"),transitionrun:wi("Transition","TransitionRun"),transitionstart:wi("Transition","TransitionStart"),transitioncancel:wi("Transition","TransitionCancel"),transitionend:wi("Transition","TransitionEnd")},Es={},Dh={};sl&&(Dh=document.createElement("div").style,"AnimationEvent"in window||(delete Pi.animationend.animation,delete Pi.animationiteration.animation,delete Pi.animationstart.animation),"TransitionEvent"in window||delete Pi.transitionend.transition);function ki(e){if(Es[e])return Es[e];if(!Pi[e])return e;var n=Pi[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in Dh)return Es[e]=n[i];return e}var Oh=ki("animationend"),Mh=ki("animationiteration"),Lh=ki("animationstart"),w1=ki("transitionrun"),k1=ki("transitionstart"),C1=ki("transitioncancel"),Uh=ki("transitionend"),Bh=new Map,ws="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(" ");ws.push("scrollEnd");function Gn(e,n){Bh.set(e,n),qn(n,[e])}var pu=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)},kn=[],Ji=0,ks=0;function gu(){for(var e=Ji,n=ks=Ji=0;n<e;){var i=kn[n];kn[n++]=null;var u=kn[n];kn[n++]=null;var f=kn[n];kn[n++]=null;var h=kn[n];if(kn[n++]=null,u!==null&&f!==null){var v=u.pending;v===null?f.next=f:(f.next=v.next,v.next=f),u.pending=f}h!==0&&Hh(i,f,h)}}function yu(e,n,i,u){kn[Ji++]=e,kn[Ji++]=n,kn[Ji++]=i,kn[Ji++]=u,ks|=u,e.lanes|=u,e=e.alternate,e!==null&&(e.lanes|=u)}function Cs(e,n,i,u){return yu(e,n,i,u),vu(e)}function Ci(e,n){return yu(e,null,null,n),vu(e)}function Hh(e,n,i){e.lanes|=i;var u=e.alternate;u!==null&&(u.lanes|=i);for(var f=!1,h=e.return;h!==null;)h.childLanes|=i,u=h.alternate,u!==null&&(u.childLanes|=i),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(f=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,f&&n!==null&&(f=31-tt(i),e=h.hiddenUpdates,u=e[f],u===null?e[f]=[n]:u.push(n),n.lane=i|536870912),h):null}function vu(e){if(50<yr)throw yr=0,Oc=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Wi={};function T1(e,n,i,u){this.tag=e,this.key=i,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=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dn(e,n,i,u){return new T1(e,n,i,u)}function Ts(e){return e=e.prototype,!(!e||!e.isReactComponent)}function cl(e,n){var i=e.alternate;return i===null?(i=dn(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function qh(e,n){e.flags&=65011714;var i=e.alternate;return i===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=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function bu(e,n,i,u,f,h){var v=0;if(u=e,typeof e=="function")Ts(e)&&(v=1);else if(typeof e=="string")v=Nx(e,i,ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case W:return e=dn(31,i,n,f),e.elementType=W,e.lanes=h,e;case j:return Ti(i.children,f,h,n);case N:v=8,f|=24;break;case C:return e=dn(12,i,n,f|2),e.elementType=C,e.lanes=h,e;case P:return e=dn(13,i,n,f),e.elementType=P,e.lanes=h,e;case H:return e=dn(19,i,n,f),e.elementType=H,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case D:v=10;break e;case A:v=9;break e;case te:v=11;break e;case _:v=14;break e;case ne:v=16,u=null;break e}v=29,i=Error(r(130,e===null?"null":typeof e,"")),u=null}return n=dn(v,i,n,f),n.elementType=e,n.type=u,n.lanes=h,n}function Ti(e,n,i,u){return e=dn(7,e,u,n),e.lanes=i,e}function js(e,n,i){return e=dn(6,e,null,n),e.lanes=i,e}function Yh(e){var n=dn(18,null,null,0);return n.stateNode=e,n}function As(e,n,i){return n=dn(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Gh=new WeakMap;function Cn(e,n){if(typeof e=="object"&&e!==null){var i=Gh.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Fi(n)},Gh.set(e,n),n)}return{value:e,source:n,stack:Fi(n)}}var ea=[],ta=0,xu=null,Za=0,Tn=[],jn=0,Ll=null,Xn=1,$n="";function fl(e,n){ea[ta++]=Za,ea[ta++]=xu,xu=e,Za=n}function Vh(e,n,i){Tn[jn++]=Xn,Tn[jn++]=$n,Tn[jn++]=Ll,Ll=e;var u=Xn;e=$n;var f=32-tt(u)-1;u&=~(1<<f),i+=1;var h=32-tt(n)+f;if(30<h){var v=f-f%5;h=(u&(1<<v)-1).toString(32),u>>=v,f-=v,Xn=1<<32-tt(n)+f|i<<f|u,$n=h+e}else Xn=1<<h|i<<f|u,$n=e}function _s(e){e.return!==null&&(fl(e,1),Vh(e,1,0))}function Rs(e){for(;e===xu;)xu=ea[--ta],ea[ta]=null,Za=ea[--ta],ea[ta]=null;for(;e===Ll;)Ll=Tn[--jn],Tn[jn]=null,$n=Tn[--jn],Tn[jn]=null,Xn=Tn[--jn],Tn[jn]=null}function Fh(e,n){Tn[jn++]=Xn,Tn[jn++]=$n,Tn[jn++]=Ll,Xn=n.id,$n=n.overflow,Ll=e}var qt=null,ft=null,$e=!1,Ul=null,An=!1,Ns=Error(r(519));function Bl(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Pa(Cn(n,e)),Ns}function Ih(e){var n=e.stateNode,i=e.type,u=e.memoizedProps;switch(n[me]=e,n[ye]=u,i){case"dialog":qe("cancel",n),qe("close",n);break;case"iframe":case"object":case"embed":qe("load",n);break;case"video":case"audio":for(i=0;i<br.length;i++)qe(br[i],n);break;case"source":qe("error",n);break;case"img":case"image":case"link":qe("error",n),qe("load",n);break;case"details":qe("toggle",n);break;case"input":qe("invalid",n),ih(n,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":qe("invalid",n);break;case"textarea":qe("invalid",n),rh(n,u.value,u.defaultValue,u.children)}i=u.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||u.suppressHydrationWarning===!0||og(n.textContent,i)?(u.popover!=null&&(qe("beforetoggle",n),qe("toggle",n)),u.onScroll!=null&&qe("scroll",n),u.onScrollEnd!=null&&qe("scrollend",n),u.onClick!=null&&(n.onclick=ol),n=!0):n=!1,n||Bl(e,!0)}function Qh(e){for(qt=e.return;qt;)switch(qt.tag){case 5:case 31:case 13:An=!1;return;case 27:case 3:An=!0;return;default:qt=qt.return}}function na(e){if(e!==qt)return!1;if(!$e)return Qh(e),$e=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Kc(e.type,e.memoizedProps)),i=!i),i&&ft&&Bl(e),Qh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=yg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=yg(e)}else n===27?(n=ft,Jl(e.type)?(e=ef,ef=null,ft=e):ft=n):ft=qt?Rn(e.stateNode.nextSibling):null;return!0}function ji(){ft=qt=null,$e=!1}function zs(){var e=Ul;return e!==null&&(ln===null?ln=e:ln.push.apply(ln,e),Ul=null),e}function Pa(e){Ul===null?Ul=[e]:Ul.push(e)}var Ds=L(null),Ai=null,dl=null;function Hl(e,n,i){T(Ds,n._currentValue),n._currentValue=i}function hl(e){e._currentValue=Ds.current,Z(Ds)}function Os(e,n,i){for(;e!==null;){var u=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,u!==null&&(u.childLanes|=n)):u!==null&&(u.childLanes&n)!==n&&(u.childLanes|=n),e===i)break;e=e.return}}function Ms(e,n,i,u){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var h=f.dependencies;if(h!==null){var v=f.child;h=h.firstContext;e:for(;h!==null;){var w=h;h=f;for(var M=0;M<n.length;M++)if(w.context===n[M]){h.lanes|=i,w=h.alternate,w!==null&&(w.lanes|=i),Os(h.return,i,e),u||(v=null);break e}h=w.next}}else if(f.tag===18){if(v=f.return,v===null)throw Error(r(341));v.lanes|=i,h=v.alternate,h!==null&&(h.lanes|=i),Os(v,i,e),v=null}else v=f.child;if(v!==null)v.return=f;else for(v=f;v!==null;){if(v===e){v=null;break}if(f=v.sibling,f!==null){f.return=v.return,v=f;break}v=v.return}f=v}}function la(e,n,i,u){e=null;for(var f=n,h=!1;f!==null;){if(!h){if((f.flags&524288)!==0)h=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var v=f.alternate;if(v===null)throw Error(r(387));if(v=v.memoizedProps,v!==null){var w=f.type;fn(f.pendingProps.value,v.value)||(e!==null?e.push(w):e=[w])}}else if(f===De.current){if(v=f.alternate,v===null)throw Error(r(387));v.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(kr):e=[kr])}f=f.return}e!==null&&Ms(n,e,i,u),n.flags|=262144}function Su(e){for(e=e.firstContext;e!==null;){if(!fn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function _i(e){Ai=e,dl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Yt(e){return Xh(Ai,e)}function Eu(e,n){return Ai===null&&_i(e),Xh(e,n)}function Xh(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},dl===null){if(e===null)throw Error(r(308));dl=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else dl=dl.next=n;return i}var j1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,u){e.push(u)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},A1=t.unstable_scheduleCallback,_1=t.unstable_NormalPriority,Ct={$$typeof:D,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ls(){return{controller:new j1,data:new Map,refCount:0}}function Ja(e){e.refCount--,e.refCount===0&&A1(_1,function(){e.controller.abort()})}var Wa=null,Us=0,ia=0,aa=null;function R1(e,n){if(Wa===null){var i=Wa=[];Us=0,ia=qc(),aa={status:"pending",value:void 0,then:function(u){i.push(u)}}}return Us++,n.then($h,$h),n}function $h(){if(--Us===0&&Wa!==null){aa!==null&&(aa.status="fulfilled");var e=Wa;Wa=null,ia=0,aa=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function N1(e,n){var i=[],u={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){u.status="fulfilled",u.value=n;for(var f=0;f<i.length;f++)(0,i[f])(n)},function(f){for(u.status="rejected",u.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),u}var Kh=U.S;U.S=function(e,n){zp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&R1(e,n),Kh!==null&&Kh(e,n)};var Ri=L(null);function Bs(){var e=Ri.current;return e!==null?e:ot.pooledCache}function wu(e,n){n===null?T(Ri,Ri.current):T(Ri,n.pool)}function Zh(){var e=Bs();return e===null?null:{parent:Ct._currentValue,pool:e}}var ra=Error(r(460)),Hs=Error(r(474)),ku=Error(r(542)),Cu={then:function(){}};function Ph(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Jh(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(ol,ol),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,em(e),e;default:if(typeof n.status=="string")n.then(ol,ol);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(u){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=u}},function(u){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=u}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,em(e),e}throw zi=n,ra}}function Ni(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(zi=i,ra):i}}var zi=null;function Wh(){if(zi===null)throw Error(r(459));var e=zi;return zi=null,e}function em(e){if(e===ra||e===ku)throw Error(r(483))}var ua=null,er=0;function Tu(e){var n=er;return er+=1,ua===null&&(ua=[]),Jh(ua,e,n)}function tr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function ju(e,n){throw n.$$typeof===b?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function tm(e){function n(q,B){if(e){var I=q.deletions;I===null?(q.deletions=[B],q.flags|=16):I.push(B)}}function i(q,B){if(!e)return null;for(;B!==null;)n(q,B),B=B.sibling;return null}function u(q){for(var B=new Map;q!==null;)q.key!==null?B.set(q.key,q):B.set(q.index,q),q=q.sibling;return B}function f(q,B){return q=cl(q,B),q.index=0,q.sibling=null,q}function h(q,B,I){return q.index=I,e?(I=q.alternate,I!==null?(I=I.index,I<B?(q.flags|=67108866,B):I):(q.flags|=67108866,B)):(q.flags|=1048576,B)}function v(q){return e&&q.alternate===null&&(q.flags|=67108866),q}function w(q,B,I,re){return B===null||B.tag!==6?(B=js(I,q.mode,re),B.return=q,B):(B=f(B,I),B.return=q,B)}function M(q,B,I,re){var je=I.type;return je===j?ie(q,B,I.props.children,re,I.key):B!==null&&(B.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===ne&&Ni(je)===B.type)?(B=f(B,I.props),tr(B,I),B.return=q,B):(B=bu(I.type,I.key,I.props,null,q.mode,re),tr(B,I),B.return=q,B)}function Q(q,B,I,re){return B===null||B.tag!==4||B.stateNode.containerInfo!==I.containerInfo||B.stateNode.implementation!==I.implementation?(B=As(I,q.mode,re),B.return=q,B):(B=f(B,I.children||[]),B.return=q,B)}function ie(q,B,I,re,je){return B===null||B.tag!==7?(B=Ti(I,q.mode,re,je),B.return=q,B):(B=f(B,I),B.return=q,B)}function ue(q,B,I){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return B=js(""+B,q.mode,I),B.return=q,B;if(typeof B=="object"&&B!==null){switch(B.$$typeof){case S:return I=bu(B.type,B.key,B.props,null,q.mode,I),tr(I,B),I.return=q,I;case E:return B=As(B,q.mode,I),B.return=q,B;case ne:return B=Ni(B),ue(q,B,I)}if($(B)||G(B))return B=Ti(B,q.mode,I,null),B.return=q,B;if(typeof B.then=="function")return ue(q,Tu(B),I);if(B.$$typeof===D)return ue(q,Eu(q,B),I);ju(q,B)}return null}function X(q,B,I,re){var je=B!==null?B.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return je!==null?null:w(q,B,""+I,re);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case S:return I.key===je?M(q,B,I,re):null;case E:return I.key===je?Q(q,B,I,re):null;case ne:return I=Ni(I),X(q,B,I,re)}if($(I)||G(I))return je!==null?null:ie(q,B,I,re,null);if(typeof I.then=="function")return X(q,B,Tu(I),re);if(I.$$typeof===D)return X(q,B,Eu(q,I),re);ju(q,I)}return null}function J(q,B,I,re,je){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return q=q.get(I)||null,w(B,q,""+re,je);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case S:return q=q.get(re.key===null?I:re.key)||null,M(B,q,re,je);case E:return q=q.get(re.key===null?I:re.key)||null,Q(B,q,re,je);case ne:return re=Ni(re),J(q,B,I,re,je)}if($(re)||G(re))return q=q.get(I)||null,ie(B,q,re,je,null);if(typeof re.then=="function")return J(q,B,I,Tu(re),je);if(re.$$typeof===D)return J(q,B,I,Eu(B,re),je);ju(B,re)}return null}function Se(q,B,I,re){for(var je=null,Je=null,Ee=B,Le=B=0,Ve=null;Ee!==null&&Le<I.length;Le++){Ee.index>Le?(Ve=Ee,Ee=null):Ve=Ee.sibling;var We=X(q,Ee,I[Le],re);if(We===null){Ee===null&&(Ee=Ve);break}e&&Ee&&We.alternate===null&&n(q,Ee),B=h(We,B,Le),Je===null?je=We:Je.sibling=We,Je=We,Ee=Ve}if(Le===I.length)return i(q,Ee),$e&&fl(q,Le),je;if(Ee===null){for(;Le<I.length;Le++)Ee=ue(q,I[Le],re),Ee!==null&&(B=h(Ee,B,Le),Je===null?je=Ee:Je.sibling=Ee,Je=Ee);return $e&&fl(q,Le),je}for(Ee=u(Ee);Le<I.length;Le++)Ve=J(Ee,q,Le,I[Le],re),Ve!==null&&(e&&Ve.alternate!==null&&Ee.delete(Ve.key===null?Le:Ve.key),B=h(Ve,B,Le),Je===null?je=Ve:Je.sibling=Ve,Je=Ve);return e&&Ee.forEach(function(li){return n(q,li)}),$e&&fl(q,Le),je}function Ne(q,B,I,re){if(I==null)throw Error(r(151));for(var je=null,Je=null,Ee=B,Le=B=0,Ve=null,We=I.next();Ee!==null&&!We.done;Le++,We=I.next()){Ee.index>Le?(Ve=Ee,Ee=null):Ve=Ee.sibling;var li=X(q,Ee,We.value,re);if(li===null){Ee===null&&(Ee=Ve);break}e&&Ee&&li.alternate===null&&n(q,Ee),B=h(li,B,Le),Je===null?je=li:Je.sibling=li,Je=li,Ee=Ve}if(We.done)return i(q,Ee),$e&&fl(q,Le),je;if(Ee===null){for(;!We.done;Le++,We=I.next())We=ue(q,We.value,re),We!==null&&(B=h(We,B,Le),Je===null?je=We:Je.sibling=We,Je=We);return $e&&fl(q,Le),je}for(Ee=u(Ee);!We.done;Le++,We=I.next())We=J(Ee,q,Le,We.value,re),We!==null&&(e&&We.alternate!==null&&Ee.delete(We.key===null?Le:We.key),B=h(We,B,Le),Je===null?je=We:Je.sibling=We,Je=We);return e&&Ee.forEach(function(Gx){return n(q,Gx)}),$e&&fl(q,Le),je}function ut(q,B,I,re){if(typeof I=="object"&&I!==null&&I.type===j&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case S:e:{for(var je=I.key;B!==null;){if(B.key===je){if(je=I.type,je===j){if(B.tag===7){i(q,B.sibling),re=f(B,I.props.children),re.return=q,q=re;break e}}else if(B.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===ne&&Ni(je)===B.type){i(q,B.sibling),re=f(B,I.props),tr(re,I),re.return=q,q=re;break e}i(q,B);break}else n(q,B);B=B.sibling}I.type===j?(re=Ti(I.props.children,q.mode,re,I.key),re.return=q,q=re):(re=bu(I.type,I.key,I.props,null,q.mode,re),tr(re,I),re.return=q,q=re)}return v(q);case E:e:{for(je=I.key;B!==null;){if(B.key===je)if(B.tag===4&&B.stateNode.containerInfo===I.containerInfo&&B.stateNode.implementation===I.implementation){i(q,B.sibling),re=f(B,I.children||[]),re.return=q,q=re;break e}else{i(q,B);break}else n(q,B);B=B.sibling}re=As(I,q.mode,re),re.return=q,q=re}return v(q);case ne:return I=Ni(I),ut(q,B,I,re)}if($(I))return Se(q,B,I,re);if(G(I)){if(je=G(I),typeof je!="function")throw Error(r(150));return I=je.call(I),Ne(q,B,I,re)}if(typeof I.then=="function")return ut(q,B,Tu(I),re);if(I.$$typeof===D)return ut(q,B,Eu(q,I),re);ju(q,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,B!==null&&B.tag===6?(i(q,B.sibling),re=f(B,I),re.return=q,q=re):(i(q,B),re=js(I,q.mode,re),re.return=q,q=re),v(q)):i(q,B)}return function(q,B,I,re){try{er=0;var je=ut(q,B,I,re);return ua=null,je}catch(Ee){if(Ee===ra||Ee===ku)throw Ee;var Je=dn(29,Ee,null,q.mode);return Je.lanes=re,Je.return=q,Je}}}var Di=tm(!0),nm=tm(!1),ql=!1;function qs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ys(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 Yl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Gl(e,n,i){var u=e.updateQueue;if(u===null)return null;if(u=u.shared,(et&2)!==0){var f=u.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),u.pending=n,n=vu(e),Hh(e,null,i),n}return yu(e,u,n,i),vu(e)}function nr(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var u=n.lanes;u&=e.pendingLanes,i|=u,n.lanes=i,O(e,i)}}function Gs(e,n){var i=e.updateQueue,u=e.alternate;if(u!==null&&(u=u.updateQueue,i===u)){var f=null,h=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};h===null?f=h=v:h=h.next=v,i=i.next}while(i!==null);h===null?f=h=n:h=h.next=n}else f=h=n;i={baseState:u.baseState,firstBaseUpdate:f,lastBaseUpdate:h,shared:u.shared,callbacks:u.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Vs=!1;function lr(){if(Vs){var e=aa;if(e!==null)throw e}}function ir(e,n,i,u){Vs=!1;var f=e.updateQueue;ql=!1;var h=f.firstBaseUpdate,v=f.lastBaseUpdate,w=f.shared.pending;if(w!==null){f.shared.pending=null;var M=w,Q=M.next;M.next=null,v===null?h=Q:v.next=Q,v=M;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,w=ie.lastBaseUpdate,w!==v&&(w===null?ie.firstBaseUpdate=Q:w.next=Q,ie.lastBaseUpdate=M))}if(h!==null){var ue=f.baseState;v=0,ie=Q=M=null,w=h;do{var X=w.lane&-536870913,J=X!==w.lane;if(J?(Ge&X)===X:(u&X)===X){X!==0&&X===ia&&(Vs=!0),ie!==null&&(ie=ie.next={lane:0,tag:w.tag,payload:w.payload,callback:null,next:null});e:{var Se=e,Ne=w;X=n;var ut=i;switch(Ne.tag){case 1:if(Se=Ne.payload,typeof Se=="function"){ue=Se.call(ut,ue,X);break e}ue=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ne.payload,X=typeof Se=="function"?Se.call(ut,ue,X):Se,X==null)break e;ue=g({},ue,X);break e;case 2:ql=!0}}X=w.callback,X!==null&&(e.flags|=64,J&&(e.flags|=8192),J=f.callbacks,J===null?f.callbacks=[X]:J.push(X))}else J={lane:X,tag:w.tag,payload:w.payload,callback:w.callback,next:null},ie===null?(Q=ie=J,M=ue):ie=ie.next=J,v|=X;if(w=w.next,w===null){if(w=f.shared.pending,w===null)break;J=w,w=J.next,J.next=null,f.lastBaseUpdate=J,f.shared.pending=null}}while(!0);ie===null&&(M=ue),f.baseState=M,f.firstBaseUpdate=Q,f.lastBaseUpdate=ie,h===null&&(f.shared.lanes=0),Xl|=v,e.lanes=v,e.memoizedState=ue}}function lm(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function im(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)lm(i[e],n)}var oa=L(null),Au=L(0);function am(e,n){e=El,T(Au,e),T(oa,n),El=e|n.baseLanes}function Fs(){T(Au,El),T(oa,oa.current)}function Is(){El=Au.current,Z(oa),Z(Au)}var hn=L(null),_n=null;function Vl(e){var n=e.alternate;T(wt,wt.current&1),T(hn,e),_n===null&&(n===null||oa.current!==null||n.memoizedState!==null)&&(_n=e)}function Qs(e){T(wt,wt.current),T(hn,e),_n===null&&(_n=e)}function rm(e){e.tag===22?(T(wt,wt.current),T(hn,e),_n===null&&(_n=e)):Fl()}function Fl(){T(wt,wt.current),T(hn,hn.current)}function mn(e){Z(hn),_n===e&&(_n=null),Z(wt)}var wt=L(0);function _u(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Jc(i)||Wc(i)))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 ml=0,Me=null,at=null,Tt=null,Ru=!1,sa=!1,Oi=!1,Nu=0,ar=0,ca=null,z1=0;function xt(){throw Error(r(321))}function Xs(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!fn(e[i],n[i]))return!1;return!0}function $s(e,n,i,u,f,h){return ml=h,Me=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,U.H=e===null||e.memoizedState===null?Vm:sc,Oi=!1,h=i(u,f),Oi=!1,sa&&(h=om(n,i,u,f)),um(e),h}function um(e){U.H=or;var n=at!==null&&at.next!==null;if(ml=0,Tt=at=Me=null,Ru=!1,ar=0,ca=null,n)throw Error(r(300));e===null||jt||(e=e.dependencies,e!==null&&Su(e)&&(jt=!0))}function om(e,n,i,u){Me=e;var f=0;do{if(sa&&(ca=null),ar=0,sa=!1,25<=f)throw Error(r(301));if(f+=1,Tt=at=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=Fm,h=n(i,u)}while(sa);return h}function D1(){var e=U.H,n=e.useState()[0];return n=typeof n.then=="function"?rr(n):n,e=e.useState()[0],(at!==null?at.memoizedState:null)!==e&&(Me.flags|=1024),n}function Ks(){var e=Nu!==0;return Nu=0,e}function Zs(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function Ps(e){if(Ru){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ru=!1}ml=0,Tt=at=Me=null,sa=!1,ar=Nu=0,ca=null}function Kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Me.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function kt(){if(at===null){var e=Me.alternate;e=e!==null?e.memoizedState:null}else e=at.next;var n=Tt===null?Me.memoizedState:Tt.next;if(n!==null)Tt=n,at=e;else{if(e===null)throw Me.alternate===null?Error(r(467)):Error(r(310));at=e,e={memoizedState:at.memoizedState,baseState:at.baseState,baseQueue:at.baseQueue,queue:at.queue,next:null},Tt===null?Me.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function zu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function rr(e){var n=ar;return ar+=1,ca===null&&(ca=[]),e=Jh(ca,e,n),n=Me,(Tt===null?n.memoizedState:Tt.next)===null&&(n=n.alternate,U.H=n===null||n.memoizedState===null?Vm:sc),e}function Du(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return rr(e);if(e.$$typeof===D)return Yt(e)}throw Error(r(438,String(e)))}function Js(e){var n=null,i=Me.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var u=Me.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(n={data:u.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=zu(),Me.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),u=0;u<e;u++)i[u]=R;return n.index++,i}function pl(e,n){return typeof n=="function"?n(e):n}function Ou(e){var n=kt();return Ws(n,at,e)}function Ws(e,n,i){var u=e.queue;if(u===null)throw Error(r(311));u.lastRenderedReducer=i;var f=e.baseQueue,h=u.pending;if(h!==null){if(f!==null){var v=f.next;f.next=h.next,h.next=v}n.baseQueue=f=h,u.pending=null}if(h=e.baseState,f===null)e.memoizedState=h;else{n=f.next;var w=v=null,M=null,Q=n,ie=!1;do{var ue=Q.lane&-536870913;if(ue!==Q.lane?(Ge&ue)===ue:(ml&ue)===ue){var X=Q.revertLane;if(X===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null}),ue===ia&&(ie=!0);else if((ml&X)===X){Q=Q.next,X===ia&&(ie=!0);continue}else ue={lane:0,revertLane:Q.revertLane,gesture:null,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},M===null?(w=M=ue,v=h):M=M.next=ue,Me.lanes|=X,Xl|=X;ue=Q.action,Oi&&i(h,ue),h=Q.hasEagerState?Q.eagerState:i(h,ue)}else X={lane:ue,revertLane:Q.revertLane,gesture:Q.gesture,action:Q.action,hasEagerState:Q.hasEagerState,eagerState:Q.eagerState,next:null},M===null?(w=M=X,v=h):M=M.next=X,Me.lanes|=ue,Xl|=ue;Q=Q.next}while(Q!==null&&Q!==n);if(M===null?v=h:M.next=w,!fn(h,e.memoizedState)&&(jt=!0,ie&&(i=aa,i!==null)))throw i;e.memoizedState=h,e.baseState=v,e.baseQueue=M,u.lastRenderedState=h}return f===null&&(u.lanes=0),[e.memoizedState,u.dispatch]}function ec(e){var n=kt(),i=n.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var u=i.dispatch,f=i.pending,h=n.memoizedState;if(f!==null){i.pending=null;var v=f=f.next;do h=e(h,v.action),v=v.next;while(v!==f);fn(h,n.memoizedState)||(jt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,u]}function sm(e,n,i){var u=Me,f=kt(),h=$e;if(h){if(i===void 0)throw Error(r(407));i=i()}else i=n();var v=!fn((at||f).memoizedState,i);if(v&&(f.memoizedState=i,jt=!0),f=f.queue,lc(dm.bind(null,u,f,e),[e]),f.getSnapshot!==n||v||Tt!==null&&Tt.memoizedState.tag&1){if(u.flags|=2048,fa(9,{destroy:void 0},fm.bind(null,u,f,i,n),null),ot===null)throw Error(r(349));h||(ml&127)!==0||cm(u,n,i)}return i}function cm(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Me.updateQueue,n===null?(n=zu(),Me.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function fm(e,n,i,u){n.value=i,n.getSnapshot=u,hm(n)&&mm(e)}function dm(e,n,i){return i(function(){hm(n)&&mm(e)})}function hm(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!fn(e,i)}catch{return!0}}function mm(e){var n=Ci(e,2);n!==null&&an(n,e,2)}function tc(e){var n=Kt();if(typeof e=="function"){var i=e;if(e=i(),Oi){Bt(!0);try{i()}finally{Bt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:e},n}function pm(e,n,i,u){return e.baseState=i,Ws(e,at,typeof u=="function"?u:pl)}function O1(e,n,i,u,f){if(Uu(e))throw Error(r(485));if(e=n.action,e!==null){var h={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){h.listeners.push(v)}};U.T!==null?i(!0):h.isTransition=!1,u(h),i=n.pending,i===null?(h.next=n.pending=h,gm(n,h)):(h.next=i.next,n.pending=i.next=h)}}function gm(e,n){var i=n.action,u=n.payload,f=e.state;if(n.isTransition){var h=U.T,v={};U.T=v;try{var w=i(f,u),M=U.S;M!==null&&M(v,w),ym(e,n,w)}catch(Q){nc(e,n,Q)}finally{h!==null&&v.types!==null&&(h.types=v.types),U.T=h}}else try{h=i(f,u),ym(e,n,h)}catch(Q){nc(e,n,Q)}}function ym(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(u){vm(e,n,u)},function(u){return nc(e,n,u)}):vm(e,n,i)}function vm(e,n,i){n.status="fulfilled",n.value=i,bm(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,gm(e,i)))}function nc(e,n,i){var u=e.pending;if(e.pending=null,u!==null){u=u.next;do n.status="rejected",n.reason=i,bm(n),n=n.next;while(n!==u)}e.action=null}function bm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function xm(e,n){return n}function Sm(e,n){if($e){var i=ot.formState;if(i!==null){e:{var u=Me;if($e){if(ft){t:{for(var f=ft,h=An;f.nodeType!==8;){if(!h){f=null;break t}if(f=Rn(f.nextSibling),f===null){f=null;break t}}h=f.data,f=h==="F!"||h==="F"?f:null}if(f){ft=Rn(f.nextSibling),u=f.data==="F!";break e}}Bl(u)}u=!1}u&&(n=i[0])}}return i=Kt(),i.memoizedState=i.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xm,lastRenderedState:n},i.queue=u,i=qm.bind(null,Me,u),u.dispatch=i,u=tc(!1),h=oc.bind(null,Me,!1,u.queue),u=Kt(),f={state:n,dispatch:null,action:e,pending:null},u.queue=f,i=O1.bind(null,Me,f,h,i),f.dispatch=i,u.memoizedState=e,[n,i,!1]}function Em(e){var n=kt();return wm(n,at,e)}function wm(e,n,i){if(n=Ws(e,n,xm)[0],e=Ou(pl)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var u=rr(n)}catch(v){throw v===ra?ku:v}else u=n;n=kt();var f=n.queue,h=f.dispatch;return i!==n.memoizedState&&(Me.flags|=2048,fa(9,{destroy:void 0},M1.bind(null,f,i),null)),[u,h,e]}function M1(e,n){e.action=n}function km(e){var n=kt(),i=at;if(i!==null)return wm(n,i,e);kt(),n=n.memoizedState,i=kt();var u=i.queue.dispatch;return i.memoizedState=e,[n,u,!1]}function fa(e,n,i,u){return e={tag:e,create:i,deps:u,inst:n,next:null},n=Me.updateQueue,n===null&&(n=zu(),Me.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(u=i.next,i.next=e,e.next=u,n.lastEffect=e),e}function Cm(){return kt().memoizedState}function Mu(e,n,i,u){var f=Kt();Me.flags|=e,f.memoizedState=fa(1|n,{destroy:void 0},i,u===void 0?null:u)}function Lu(e,n,i,u){var f=kt();u=u===void 0?null:u;var h=f.memoizedState.inst;at!==null&&u!==null&&Xs(u,at.memoizedState.deps)?f.memoizedState=fa(n,h,i,u):(Me.flags|=e,f.memoizedState=fa(1|n,h,i,u))}function Tm(e,n){Mu(8390656,8,e,n)}function lc(e,n){Lu(2048,8,e,n)}function L1(e){Me.flags|=4;var n=Me.updateQueue;if(n===null)n=zu(),Me.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function jm(e){var n=kt().memoizedState;return L1({ref:n,nextImpl:e}),function(){if((et&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Am(e,n){return Lu(4,2,e,n)}function _m(e,n){return Lu(4,4,e,n)}function Rm(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Nm(e,n,i){i=i!=null?i.concat([e]):null,Lu(4,4,Rm.bind(null,n,e),i)}function ic(){}function zm(e,n){var i=kt();n=n===void 0?null:n;var u=i.memoizedState;return n!==null&&Xs(n,u[1])?u[0]:(i.memoizedState=[e,n],e)}function Dm(e,n){var i=kt();n=n===void 0?null:n;var u=i.memoizedState;if(n!==null&&Xs(n,u[1]))return u[0];if(u=e(),Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[u,n],u}function ac(e,n,i){return i===void 0||(ml&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=Op(),Me.lanes|=e,Xl|=e,i)}function Om(e,n,i,u){return fn(i,n)?i:oa.current!==null?(e=ac(e,i,u),fn(e,n)||(jt=!0),e):(ml&42)===0||(ml&1073741824)!==0&&(Ge&261930)===0?(jt=!0,e.memoizedState=i):(e=Op(),Me.lanes|=e,Xl|=e,n)}function Mm(e,n,i,u,f){var h=ee.p;ee.p=h!==0&&8>h?h:8;var v=U.T,w={};U.T=w,oc(e,!1,n,i);try{var M=f(),Q=U.S;if(Q!==null&&Q(w,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var ie=N1(M,u);ur(e,n,ie,yn(e))}else ur(e,n,u,yn(e))}catch(ue){ur(e,n,{then:function(){},status:"rejected",reason:ue},yn())}finally{ee.p=h,v!==null&&w.types!==null&&(v.types=w.types),U.T=v}}function U1(){}function rc(e,n,i,u){if(e.tag!==5)throw Error(r(476));var f=Lm(e).queue;Mm(e,f,n,se,i===null?U1:function(){return Um(e),i(u)})}function Lm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:se},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Um(e){var n=Lm(e);n.next===null&&(n=e.alternate.memoizedState),ur(e,n.next.queue,{},yn())}function uc(){return Yt(kr)}function Bm(){return kt().memoizedState}function Hm(){return kt().memoizedState}function B1(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=yn();e=Yl(i);var u=Gl(n,e,i);u!==null&&(an(u,n,i),nr(u,n,i)),n={cache:Ls()},e.payload=n;return}n=n.return}}function H1(e,n,i){var u=yn();i={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Uu(e)?Ym(n,i):(i=Cs(e,n,i,u),i!==null&&(an(i,e,u),Gm(i,n,u)))}function qm(e,n,i){var u=yn();ur(e,n,i,u)}function ur(e,n,i,u){var f={lane:u,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Uu(e))Ym(n,f);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var v=n.lastRenderedState,w=h(v,i);if(f.hasEagerState=!0,f.eagerState=w,fn(w,v))return yu(e,n,f,0),ot===null&&gu(),!1}catch{}if(i=Cs(e,n,f,u),i!==null)return an(i,e,u),Gm(i,n,u),!0}return!1}function oc(e,n,i,u){if(u={lane:2,revertLane:qc(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Uu(e)){if(n)throw Error(r(479))}else n=Cs(e,i,u,2),n!==null&&an(n,e,2)}function Uu(e){var n=e.alternate;return e===Me||n!==null&&n===Me}function Ym(e,n){sa=Ru=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function Gm(e,n,i){if((i&4194048)!==0){var u=n.lanes;u&=e.pendingLanes,i|=u,n.lanes=i,O(e,i)}}var or={readContext:Yt,use:Du,useCallback:xt,useContext:xt,useEffect:xt,useImperativeHandle:xt,useLayoutEffect:xt,useInsertionEffect:xt,useMemo:xt,useReducer:xt,useRef:xt,useState:xt,useDebugValue:xt,useDeferredValue:xt,useTransition:xt,useSyncExternalStore:xt,useId:xt,useHostTransitionStatus:xt,useFormState:xt,useActionState:xt,useOptimistic:xt,useMemoCache:xt,useCacheRefresh:xt};or.useEffectEvent=xt;var Vm={readContext:Yt,use:Du,useCallback:function(e,n){return Kt().memoizedState=[e,n===void 0?null:n],e},useContext:Yt,useEffect:Tm,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Mu(4194308,4,Rm.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Mu(4194308,4,e,n)},useInsertionEffect:function(e,n){Mu(4,2,e,n)},useMemo:function(e,n){var i=Kt();n=n===void 0?null:n;var u=e();if(Oi){Bt(!0);try{e()}finally{Bt(!1)}}return i.memoizedState=[u,n],u},useReducer:function(e,n,i){var u=Kt();if(i!==void 0){var f=i(n);if(Oi){Bt(!0);try{i(n)}finally{Bt(!1)}}}else f=n;return u.memoizedState=u.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},u.queue=e,e=e.dispatch=H1.bind(null,Me,e),[u.memoizedState,e]},useRef:function(e){var n=Kt();return e={current:e},n.memoizedState=e},useState:function(e){e=tc(e);var n=e.queue,i=qm.bind(null,Me,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:ic,useDeferredValue:function(e,n){var i=Kt();return ac(i,e,n)},useTransition:function(){var e=tc(!1);return e=Mm.bind(null,Me,e.queue,!0,!1),Kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var u=Me,f=Kt();if($e){if(i===void 0)throw Error(r(407));i=i()}else{if(i=n(),ot===null)throw Error(r(349));(Ge&127)!==0||cm(u,n,i)}f.memoizedState=i;var h={value:i,getSnapshot:n};return f.queue=h,Tm(dm.bind(null,u,h,e),[e]),u.flags|=2048,fa(9,{destroy:void 0},fm.bind(null,u,h,i,n),null),i},useId:function(){var e=Kt(),n=ot.identifierPrefix;if($e){var i=$n,u=Xn;i=(u&~(1<<32-tt(u)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Nu++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=z1++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:uc,useFormState:Sm,useActionState:Sm,useOptimistic:function(e){var n=Kt();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=oc.bind(null,Me,!0,i),i.dispatch=n,[e,n]},useMemoCache:Js,useCacheRefresh:function(){return Kt().memoizedState=B1.bind(null,Me)},useEffectEvent:function(e){var n=Kt(),i={impl:e};return n.memoizedState=i,function(){if((et&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},sc={readContext:Yt,use:Du,useCallback:zm,useContext:Yt,useEffect:lc,useImperativeHandle:Nm,useInsertionEffect:Am,useLayoutEffect:_m,useMemo:Dm,useReducer:Ou,useRef:Cm,useState:function(){return Ou(pl)},useDebugValue:ic,useDeferredValue:function(e,n){var i=kt();return Om(i,at.memoizedState,e,n)},useTransition:function(){var e=Ou(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:rr(e),n]},useSyncExternalStore:sm,useId:Bm,useHostTransitionStatus:uc,useFormState:Em,useActionState:Em,useOptimistic:function(e,n){var i=kt();return pm(i,at,e,n)},useMemoCache:Js,useCacheRefresh:Hm};sc.useEffectEvent=jm;var Fm={readContext:Yt,use:Du,useCallback:zm,useContext:Yt,useEffect:lc,useImperativeHandle:Nm,useInsertionEffect:Am,useLayoutEffect:_m,useMemo:Dm,useReducer:ec,useRef:Cm,useState:function(){return ec(pl)},useDebugValue:ic,useDeferredValue:function(e,n){var i=kt();return at===null?ac(i,e,n):Om(i,at.memoizedState,e,n)},useTransition:function(){var e=ec(pl)[0],n=kt().memoizedState;return[typeof e=="boolean"?e:rr(e),n]},useSyncExternalStore:sm,useId:Bm,useHostTransitionStatus:uc,useFormState:km,useActionState:km,useOptimistic:function(e,n){var i=kt();return at!==null?pm(i,at,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Js,useCacheRefresh:Hm};Fm.useEffectEvent=jm;function cc(e,n,i,u){n=e.memoizedState,i=i(u,n),i=i==null?n:g({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var fc={enqueueSetState:function(e,n,i){e=e._reactInternals;var u=yn(),f=Yl(u);f.payload=n,i!=null&&(f.callback=i),n=Gl(e,f,u),n!==null&&(an(n,e,u),nr(n,e,u))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var u=yn(),f=Yl(u);f.tag=1,f.payload=n,i!=null&&(f.callback=i),n=Gl(e,f,u),n!==null&&(an(n,e,u),nr(n,e,u))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=yn(),u=Yl(i);u.tag=2,n!=null&&(u.callback=n),n=Gl(e,u,i),n!==null&&(an(n,e,i),nr(n,e,i))}};function Im(e,n,i,u,f,h,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(u,h,v):n.prototype&&n.prototype.isPureReactComponent?!$a(i,u)||!$a(f,h):!0}function Qm(e,n,i,u){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,u),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,u),n.state!==e&&fc.enqueueReplaceState(n,n.state,null)}function Mi(e,n){var i=n;if("ref"in n){i={};for(var u in n)u!=="ref"&&(i[u]=n[u])}if(e=e.defaultProps){i===n&&(i=g({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function Xm(e){pu(e)}function $m(e){console.error(e)}function Km(e){pu(e)}function Bu(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(u){setTimeout(function(){throw u})}}function Zm(e,n,i){try{var u=e.onCaughtError;u(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function dc(e,n,i){return i=Yl(i),i.tag=3,i.payload={element:null},i.callback=function(){Bu(e,n)},i}function Pm(e){return e=Yl(e),e.tag=3,e}function Jm(e,n,i,u){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var h=u.value;e.payload=function(){return f(h)},e.callback=function(){Zm(n,i,u)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){Zm(n,i,u),typeof f!="function"&&($l===null?$l=new Set([this]):$l.add(this));var w=u.stack;this.componentDidCatch(u.value,{componentStack:w!==null?w:""})})}function q1(e,n,i,u,f){if(i.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(n=i.alternate,n!==null&&la(n,i,f,!0),i=hn.current,i!==null){switch(i.tag){case 31:case 13:return _n===null?Zu():i.alternate===null&&St===0&&(St=3),i.flags&=-257,i.flags|=65536,i.lanes=f,u===Cu?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([u]):n.add(u),Uc(e,u,f)),!1;case 22:return i.flags|=65536,u===Cu?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([u])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([u]):i.add(u)),Uc(e,u,f)),!1}throw Error(r(435,i.tag))}return Uc(e,u,f),Zu(),!1}if($e)return n=hn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,u!==Ns&&(e=Error(r(422),{cause:u}),Pa(Cn(e,i)))):(u!==Ns&&(n=Error(r(423),{cause:u}),Pa(Cn(n,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,u=Cn(u,i),f=dc(e.stateNode,u,f),Gs(e,f),St!==4&&(St=2)),!1;var h=Error(r(520),{cause:u});if(h=Cn(h,i),gr===null?gr=[h]:gr.push(h),St!==4&&(St=2),n===null)return!0;u=Cn(u,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=dc(i.stateNode,u,e),Gs(i,e),!1;case 1:if(n=i.type,h=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&($l===null||!$l.has(h))))return i.flags|=65536,f&=-f,i.lanes|=f,f=Pm(f),Jm(f,e,i,u),Gs(i,f),!1}i=i.return}while(i!==null);return!1}var hc=Error(r(461)),jt=!1;function Gt(e,n,i,u){n.child=e===null?nm(n,null,i,u):Di(n,e.child,i,u)}function Wm(e,n,i,u,f){i=i.render;var h=n.ref;if("ref"in u){var v={};for(var w in u)w!=="ref"&&(v[w]=u[w])}else v=u;return _i(n),u=$s(e,n,i,v,h,f),w=Ks(),e!==null&&!jt?(Zs(e,n,f),gl(e,n,f)):($e&&w&&_s(n),n.flags|=1,Gt(e,n,u,f),n.child)}function ep(e,n,i,u,f){if(e===null){var h=i.type;return typeof h=="function"&&!Ts(h)&&h.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=h,tp(e,n,h,u,f)):(e=bu(i.type,null,u,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!Sc(e,f)){var v=h.memoizedProps;if(i=i.compare,i=i!==null?i:$a,i(v,u)&&e.ref===n.ref)return gl(e,n,f)}return n.flags|=1,e=cl(h,u),e.ref=n.ref,e.return=n,n.child=e}function tp(e,n,i,u,f){if(e!==null){var h=e.memoizedProps;if($a(h,u)&&e.ref===n.ref)if(jt=!1,n.pendingProps=u=h,Sc(e,f))(e.flags&131072)!==0&&(jt=!0);else return n.lanes=e.lanes,gl(e,n,f)}return mc(e,n,i,u,f)}function np(e,n,i,u){var f=u.children,h=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((n.flags&128)!==0){if(h=h!==null?h.baseLanes|i:i,e!==null){for(u=n.child=e.child,f=0;u!==null;)f=f|u.lanes|u.childLanes,u=u.sibling;u=f&~h}else u=0,n.child=null;return lp(e,n,h,i,u)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&wu(n,h!==null?h.cachePool:null),h!==null?am(n,h):Fs(),rm(n);else return u=n.lanes=536870912,lp(e,n,h!==null?h.baseLanes|i:i,i,u)}else h!==null?(wu(n,h.cachePool),am(n,h),Fl(),n.memoizedState=null):(e!==null&&wu(n,null),Fs(),Fl());return Gt(e,n,f,i),n.child}function sr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function lp(e,n,i,u,f){var h=Bs();return h=h===null?null:{parent:Ct._currentValue,pool:h},n.memoizedState={baseLanes:i,cachePool:h},e!==null&&wu(n,null),Fs(),rm(n),e!==null&&la(e,n,u,!0),n.childLanes=f,null}function Hu(e,n){return n=Yu({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function ip(e,n,i){return Di(n,e.child,null,i),e=Hu(n,n.pendingProps),e.flags|=2,mn(n),n.memoizedState=null,e}function Y1(e,n,i){var u=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if($e){if(u.mode==="hidden")return e=Hu(n,u),n.lanes=536870912,sr(null,e);if(Qs(n),(e=ft)?(e=gg(e,An),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Xn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},i=Yh(e),i.return=n,n.child=i,qt=n,ft=null)):e=null,e===null)throw Bl(n);return n.lanes=536870912,null}return Hu(n,u)}var h=e.memoizedState;if(h!==null){var v=h.dehydrated;if(Qs(n),f)if(n.flags&256)n.flags&=-257,n=ip(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(jt||la(e,n,i,!1),f=(i&e.childLanes)!==0,jt||f){if(u=ot,u!==null&&(v=Y(u,i),v!==0&&v!==h.retryLane))throw h.retryLane=v,Ci(e,v),an(u,e,v),hc;Zu(),n=ip(e,n,i)}else e=h.treeContext,ft=Rn(v.nextSibling),qt=n,$e=!0,Ul=null,An=!1,e!==null&&Fh(n,e),n=Hu(n,u),n.flags|=4096;return n}return e=cl(e.child,{mode:u.mode,children:u.children}),e.ref=n.ref,n.child=e,e.return=n,e}function qu(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(r(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function mc(e,n,i,u,f){return _i(n),i=$s(e,n,i,u,void 0,f),u=Ks(),e!==null&&!jt?(Zs(e,n,f),gl(e,n,f)):($e&&u&&_s(n),n.flags|=1,Gt(e,n,i,f),n.child)}function ap(e,n,i,u,f,h){return _i(n),n.updateQueue=null,i=om(n,u,i,f),um(e),u=Ks(),e!==null&&!jt?(Zs(e,n,h),gl(e,n,h)):($e&&u&&_s(n),n.flags|=1,Gt(e,n,i,h),n.child)}function rp(e,n,i,u,f){if(_i(n),n.stateNode===null){var h=Wi,v=i.contextType;typeof v=="object"&&v!==null&&(h=Yt(v)),h=new i(u,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=fc,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=u,h.state=n.memoizedState,h.refs={},qs(n),v=i.contextType,h.context=typeof v=="object"&&v!==null?Yt(v):Wi,h.state=n.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(cc(n,i,v,u),h.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(v=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),v!==h.state&&fc.enqueueReplaceState(h,h.state,null),ir(n,u,h,f),lr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!0}else if(e===null){h=n.stateNode;var w=n.memoizedProps,M=Mi(i,w);h.props=M;var Q=h.context,ie=i.contextType;v=Wi,typeof ie=="object"&&ie!==null&&(v=Yt(ie));var ue=i.getDerivedStateFromProps;ie=typeof ue=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,ie||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||Q!==v)&&Qm(n,h,u,v),ql=!1;var X=n.memoizedState;h.state=X,ir(n,u,h,f),lr(),Q=n.memoizedState,w||X!==Q||ql?(typeof ue=="function"&&(cc(n,i,ue,u),Q=n.memoizedState),(M=ql||Im(n,i,M,u,X,Q,v))?(ie||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=u,n.memoizedState=Q),h.props=u,h.state=Q,h.context=v,u=M):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{h=n.stateNode,Ys(e,n),v=n.memoizedProps,ie=Mi(i,v),h.props=ie,ue=n.pendingProps,X=h.context,Q=i.contextType,M=Wi,typeof Q=="object"&&Q!==null&&(M=Yt(Q)),w=i.getDerivedStateFromProps,(Q=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==ue||X!==M)&&Qm(n,h,u,M),ql=!1,X=n.memoizedState,h.state=X,ir(n,u,h,f),lr();var J=n.memoizedState;v!==ue||X!==J||ql||e!==null&&e.dependencies!==null&&Su(e.dependencies)?(typeof w=="function"&&(cc(n,i,w,u),J=n.memoizedState),(ie=ql||Im(n,i,ie,u,X,J,M)||e!==null&&e.dependencies!==null&&Su(e.dependencies))?(Q||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(u,J,M),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(u,J,M)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&X===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&X===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=J),h.props=u,h.state=J,h.context=M,u=ie):(typeof h.componentDidUpdate!="function"||v===e.memoizedProps&&X===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&X===e.memoizedState||(n.flags|=1024),u=!1)}return h=u,qu(e,n),u=(n.flags&128)!==0,h||u?(h=n.stateNode,i=u&&typeof i.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&u?(n.child=Di(n,e.child,null,f),n.child=Di(n,null,i,f)):Gt(e,n,i,f),n.memoizedState=h.state,e=n.child):e=gl(e,n,f),e}function up(e,n,i,u){return ji(),n.flags|=256,Gt(e,n,i,u),n.child}var pc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:Zh()}}function yc(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=gn),e}function op(e,n,i){var u=n.pendingProps,f=!1,h=(n.flags&128)!==0,v;if((v=h)||(v=e!==null&&e.memoizedState===null?!1:(wt.current&2)!==0),v&&(f=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if($e){if(f?Vl(n):Fl(),(e=ft)?(e=gg(e,An),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Xn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},i=Yh(e),i.return=n,n.child=i,qt=n,ft=null)):e=null,e===null)throw Bl(n);return Wc(e)?n.lanes=32:n.lanes=536870912,null}var w=u.children;return u=u.fallback,f?(Fl(),f=n.mode,w=Yu({mode:"hidden",children:w},f),u=Ti(u,f,i,null),w.return=n,u.return=n,w.sibling=u,n.child=w,u=n.child,u.memoizedState=gc(i),u.childLanes=yc(e,v,i),n.memoizedState=pc,sr(null,u)):(Vl(n),vc(n,w))}var M=e.memoizedState;if(M!==null&&(w=M.dehydrated,w!==null)){if(h)n.flags&256?(Vl(n),n.flags&=-257,n=bc(e,n,i)):n.memoizedState!==null?(Fl(),n.child=e.child,n.flags|=128,n=null):(Fl(),w=u.fallback,f=n.mode,u=Yu({mode:"visible",children:u.children},f),w=Ti(w,f,i,null),w.flags|=2,u.return=n,w.return=n,u.sibling=w,n.child=u,Di(n,e.child,null,i),u=n.child,u.memoizedState=gc(i),u.childLanes=yc(e,v,i),n.memoizedState=pc,n=sr(null,u));else if(Vl(n),Wc(w)){if(v=w.nextSibling&&w.nextSibling.dataset,v)var Q=v.dgst;v=Q,u=Error(r(419)),u.stack="",u.digest=v,Pa({value:u,source:null,stack:null}),n=bc(e,n,i)}else if(jt||la(e,n,i,!1),v=(i&e.childLanes)!==0,jt||v){if(v=ot,v!==null&&(u=Y(v,i),u!==0&&u!==M.retryLane))throw M.retryLane=u,Ci(e,u),an(v,e,u),hc;Jc(w)||Zu(),n=bc(e,n,i)}else Jc(w)?(n.flags|=192,n.child=e.child,n=null):(e=M.treeContext,ft=Rn(w.nextSibling),qt=n,$e=!0,Ul=null,An=!1,e!==null&&Fh(n,e),n=vc(n,u.children),n.flags|=4096);return n}return f?(Fl(),w=u.fallback,f=n.mode,M=e.child,Q=M.sibling,u=cl(M,{mode:"hidden",children:u.children}),u.subtreeFlags=M.subtreeFlags&65011712,Q!==null?w=cl(Q,w):(w=Ti(w,f,i,null),w.flags|=2),w.return=n,u.return=n,u.sibling=w,n.child=u,sr(null,u),u=n.child,w=e.child.memoizedState,w===null?w=gc(i):(f=w.cachePool,f!==null?(M=Ct._currentValue,f=f.parent!==M?{parent:M,pool:M}:f):f=Zh(),w={baseLanes:w.baseLanes|i,cachePool:f}),u.memoizedState=w,u.childLanes=yc(e,v,i),n.memoizedState=pc,sr(e.child,u)):(Vl(n),i=e.child,e=i.sibling,i=cl(i,{mode:"visible",children:u.children}),i.return=n,i.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=i,n.memoizedState=null,i)}function vc(e,n){return n=Yu({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Yu(e,n){return e=dn(22,e,null,n),e.lanes=0,e}function bc(e,n,i){return Di(n,e.child,null,i),e=vc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function sp(e,n,i){e.lanes|=n;var u=e.alternate;u!==null&&(u.lanes|=n),Os(e.return,n,i)}function xc(e,n,i,u,f,h){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:u,tail:i,tailMode:f,treeForkCount:h}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=u,v.tail=i,v.tailMode=f,v.treeForkCount=h)}function cp(e,n,i){var u=n.pendingProps,f=u.revealOrder,h=u.tail;u=u.children;var v=wt.current,w=(v&2)!==0;if(w?(v=v&1|2,n.flags|=128):v&=1,T(wt,v),Gt(e,n,u,i),u=$e?Za:0,!w&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sp(e,i,n);else if(e.tag===19)sp(e,i,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(f){case"forwards":for(i=n.child,f=null;i!==null;)e=i.alternate,e!==null&&_u(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=n.child,n.child=null):(f=i.sibling,i.sibling=null),xc(n,!1,f,i,h,u);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&_u(e)===null){n.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}xc(n,!0,i,null,h,u);break;case"together":xc(n,!1,null,null,void 0,u);break;default:n.memoizedState=null}return n.child}function gl(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Xl|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(la(e,n,i,!1),(i&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,i=cl(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=cl(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function Sc(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Su(e)))}function G1(e,n,i){switch(n.tag){case 3:pe(n,n.stateNode.containerInfo),Hl(n,Ct,e.memoizedState.cache),ji();break;case 27:case 5:Nt(n);break;case 4:pe(n,n.stateNode.containerInfo);break;case 10:Hl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Qs(n),null;break;case 13:var u=n.memoizedState;if(u!==null)return u.dehydrated!==null?(Vl(n),n.flags|=128,null):(i&n.child.childLanes)!==0?op(e,n,i):(Vl(n),e=gl(e,n,i),e!==null?e.sibling:null);Vl(n);break;case 19:var f=(e.flags&128)!==0;if(u=(i&n.childLanes)!==0,u||(la(e,n,i,!1),u=(i&n.childLanes)!==0),f){if(u)return cp(e,n,i);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),T(wt,wt.current),u)break;return null;case 22:return n.lanes=0,np(e,n,i,n.pendingProps);case 24:Hl(n,Ct,e.memoizedState.cache)}return gl(e,n,i)}function fp(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)jt=!0;else{if(!Sc(e,i)&&(n.flags&128)===0)return jt=!1,G1(e,n,i);jt=(e.flags&131072)!==0}else jt=!1,$e&&(n.flags&1048576)!==0&&Vh(n,Za,n.index);switch(n.lanes=0,n.tag){case 16:e:{var u=n.pendingProps;if(e=Ni(n.elementType),n.type=e,typeof e=="function")Ts(e)?(u=Mi(e,u),n.tag=1,n=rp(null,n,e,u,i)):(n.tag=0,n=mc(null,n,e,u,i));else{if(e!=null){var f=e.$$typeof;if(f===te){n.tag=11,n=Wm(null,n,e,u,i);break e}else if(f===_){n.tag=14,n=ep(null,n,e,u,i);break e}}throw n=le(e)||e,Error(r(306,n,""))}}return n;case 0:return mc(e,n,n.type,n.pendingProps,i);case 1:return u=n.type,f=Mi(u,n.pendingProps),rp(e,n,u,f,i);case 3:e:{if(pe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));u=n.pendingProps;var h=n.memoizedState;f=h.element,Ys(e,n),ir(n,u,null,i);var v=n.memoizedState;if(u=v.cache,Hl(n,Ct,u),u!==h.cache&&Ms(n,[Ct],i,!0),lr(),u=v.element,h.isDehydrated)if(h={element:u,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=up(e,n,u,i);break e}else if(u!==f){f=Cn(Error(r(424)),n),Pa(f),n=up(e,n,u,i);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ft=Rn(e.firstChild),qt=n,$e=!0,Ul=null,An=!0,i=nm(n,null,u,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ji(),u===f){n=gl(e,n,i);break e}Gt(e,n,u,i)}n=n.child}return n;case 26:return qu(e,n),e===null?(i=Eg(n.type,null,n.pendingProps,null))?n.memoizedState=i:$e||(i=n.type,e=n.pendingProps,u=lo(be.current).createElement(i),u[me]=n,u[ye]=e,Vt(u,i,e),ht(u),n.stateNode=u):n.memoizedState=Eg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Nt(n),e===null&&$e&&(u=n.stateNode=bg(n.type,n.pendingProps,be.current),qt=n,An=!0,f=ft,Jl(n.type)?(ef=f,ft=Rn(u.firstChild)):ft=f),Gt(e,n,n.pendingProps.children,i),qu(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&$e&&((f=u=ft)&&(u=vx(u,n.type,n.pendingProps,An),u!==null?(n.stateNode=u,qt=n,ft=Rn(u.firstChild),An=!1,f=!0):f=!1),f||Bl(n)),Nt(n),f=n.type,h=n.pendingProps,v=e!==null?e.memoizedProps:null,u=h.children,Kc(f,h)?u=null:v!==null&&Kc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=$s(e,n,D1,null,null,i),kr._currentValue=f),qu(e,n),Gt(e,n,u,i),n.child;case 6:return e===null&&$e&&((e=i=ft)&&(i=bx(i,n.pendingProps,An),i!==null?(n.stateNode=i,qt=n,ft=null,e=!0):e=!1),e||Bl(n)),null;case 13:return op(e,n,i);case 4:return pe(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=Di(n,null,u,i):Gt(e,n,u,i),n.child;case 11:return Wm(e,n,n.type,n.pendingProps,i);case 7:return Gt(e,n,n.pendingProps,i),n.child;case 8:return Gt(e,n,n.pendingProps.children,i),n.child;case 12:return Gt(e,n,n.pendingProps.children,i),n.child;case 10:return u=n.pendingProps,Hl(n,n.type,u.value),Gt(e,n,u.children,i),n.child;case 9:return f=n.type._context,u=n.pendingProps.children,_i(n),f=Yt(f),u=u(f),n.flags|=1,Gt(e,n,u,i),n.child;case 14:return ep(e,n,n.type,n.pendingProps,i);case 15:return tp(e,n,n.type,n.pendingProps,i);case 19:return cp(e,n,i);case 31:return Y1(e,n,i);case 22:return np(e,n,i,n.pendingProps);case 24:return _i(n),u=Yt(Ct),e===null?(f=Bs(),f===null&&(f=ot,h=Ls(),f.pooledCache=h,h.refCount++,h!==null&&(f.pooledCacheLanes|=i),f=h),n.memoizedState={parent:u,cache:f},qs(n),Hl(n,Ct,f)):((e.lanes&i)!==0&&(Ys(e,n),ir(n,null,null,i),lr()),f=e.memoizedState,h=n.memoizedState,f.parent!==u?(f={parent:u,cache:u},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Hl(n,Ct,u)):(u=h.cache,Hl(n,Ct,u),u!==f.cache&&Ms(n,[Ct],i,!0))),Gt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function yl(e){e.flags|=4}function Ec(e,n,i,u,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Bp())e.flags|=8192;else throw zi=Cu,Hs}else e.flags&=-16777217}function dp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jg(n))if(Bp())e.flags|=8192;else throw zi=Cu,Hs}function Gu(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?vi():536870912,e.lanes|=n,pa|=n)}function cr(e,n){if(!$e)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var u=null;i!==null;)i.alternate!==null&&(u=i),i=i.sibling;u===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:u.sibling=null}}function dt(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,u=0;if(n)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,u|=f.subtreeFlags&65011712,u|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,u|=f.subtreeFlags,u|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=u,e.childLanes=i,n}function V1(e,n,i){var u=n.pendingProps;switch(Rs(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(n),null;case 1:return dt(n),null;case 3:return i=n.stateNode,u=null,e!==null&&(u=e.memoizedState.cache),n.memoizedState.cache!==u&&(n.flags|=2048),hl(Ct),Re(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(na(n)?yl(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,zs())),dt(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(yl(n),h!==null?(dt(n),dp(n,h)):(dt(n),Ec(n,f,null,u,i))):h?h!==e.memoizedState?(yl(n),dt(n),dp(n,h)):(dt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==u&&yl(n),dt(n),Ec(n,f,e,u,i)),null;case 27:if(Ln(n),i=be.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return dt(n),null}e=ce.current,na(n)?Ih(n):(e=bg(f,u,i),n.stateNode=e,yl(n))}return dt(n),null;case 5:if(Ln(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(!u){if(n.stateNode===null)throw Error(r(166));return dt(n),null}if(h=ce.current,na(n))Ih(n);else{var v=lo(be.current);switch(h){case 1:h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":h=v.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":h=v.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":h=v.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof u.is=="string"?v.createElement("select",{is:u.is}):v.createElement("select"),u.multiple?h.multiple=!0:u.size&&(h.size=u.size);break;default:h=typeof u.is=="string"?v.createElement(f,{is:u.is}):v.createElement(f)}}h[me]=n,h[ye]=u;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)h.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=h;e:switch(Vt(h,f,u),f){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&yl(n)}}return dt(n),Ec(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==u&&yl(n);else{if(typeof u!="string"&&n.stateNode===null)throw Error(r(166));if(e=be.current,na(n)){if(e=n.stateNode,i=n.memoizedProps,u=null,f=qt,f!==null)switch(f.tag){case 27:case 5:u=f.memoizedProps}e[me]=n,e=!!(e.nodeValue===i||u!==null&&u.suppressHydrationWarning===!0||og(e.nodeValue,i)),e||Bl(n,!0)}else e=lo(e).createTextNode(u),e[me]=n,n.stateNode=e}return dt(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(u=na(n),i!==null){if(e===null){if(!u)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[me]=n}else ji(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),e=!1}else i=zs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(mn(n),n):(mn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return dt(n),null;case 13:if(u=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=na(n),u!==null&&u.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[me]=n}else ji(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),f=!1}else f=zs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(mn(n),n):(mn(n),null)}return mn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=u!==null,e=e!==null&&e.memoizedState!==null,i&&(u=n.child,f=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(f=u.alternate.memoizedState.cachePool.pool),h=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(h=u.memoizedState.cachePool.pool),h!==f&&(u.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),Gu(n,n.updateQueue),dt(n),null);case 4:return Re(),e===null&&Fc(n.stateNode.containerInfo),dt(n),null;case 10:return hl(n.type),dt(n),null;case 19:if(Z(wt),u=n.memoizedState,u===null)return dt(n),null;if(f=(n.flags&128)!==0,h=u.rendering,h===null)if(f)cr(u,!1);else{if(St!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=_u(e),h!==null){for(n.flags|=128,cr(u,!1),e=h.updateQueue,n.updateQueue=e,Gu(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)qh(i,e),i=i.sibling;return T(wt,wt.current&1|2),$e&&fl(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&pt()>Xu&&(n.flags|=128,f=!0,cr(u,!1),n.lanes=4194304)}else{if(!f)if(e=_u(h),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Gu(n,e),cr(u,!0),u.tail===null&&u.tailMode==="hidden"&&!h.alternate&&!$e)return dt(n),null}else 2*pt()-u.renderingStartTime>Xu&&i!==536870912&&(n.flags|=128,f=!0,cr(u,!1),n.lanes=4194304);u.isBackwards?(h.sibling=n.child,n.child=h):(e=u.last,e!==null?e.sibling=h:n.child=h,u.last=h)}return u.tail!==null?(e=u.tail,u.rendering=e,u.tail=e.sibling,u.renderingStartTime=pt(),e.sibling=null,i=wt.current,T(wt,f?i&1|2:i&1),$e&&fl(n,u.treeForkCount),e):(dt(n),null);case 22:case 23:return mn(n),Is(),u=n.memoizedState!==null,e!==null?e.memoizedState!==null!==u&&(n.flags|=8192):u&&(n.flags|=8192),u?(i&536870912)!==0&&(n.flags&128)===0&&(dt(n),n.subtreeFlags&6&&(n.flags|=8192)):dt(n),i=n.updateQueue,i!==null&&Gu(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),u=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(u=n.memoizedState.cachePool.pool),u!==i&&(n.flags|=2048),e!==null&&Z(Ri),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),hl(Ct),dt(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function F1(e,n){switch(Rs(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return hl(Ct),Re(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ln(n),null;case 31:if(n.memoizedState!==null){if(mn(n),n.alternate===null)throw Error(r(340));ji()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(mn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));ji()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Z(wt),null;case 4:return Re(),null;case 10:return hl(n.type),null;case 22:case 23:return mn(n),Is(),e!==null&&Z(Ri),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return hl(Ct),null;case 25:return null;default:return null}}function hp(e,n){switch(Rs(n),n.tag){case 3:hl(Ct),Re();break;case 26:case 27:case 5:Ln(n);break;case 4:Re();break;case 31:n.memoizedState!==null&&mn(n);break;case 13:mn(n);break;case 19:Z(wt);break;case 10:hl(n.type);break;case 22:case 23:mn(n),Is(),e!==null&&Z(Ri);break;case 24:hl(Ct)}}function fr(e,n){try{var i=n.updateQueue,u=i!==null?i.lastEffect:null;if(u!==null){var f=u.next;i=f;do{if((i.tag&e)===e){u=void 0;var h=i.create,v=i.inst;u=h(),v.destroy=u}i=i.next}while(i!==f)}}catch(w){it(n,n.return,w)}}function Il(e,n,i){try{var u=n.updateQueue,f=u!==null?u.lastEffect:null;if(f!==null){var h=f.next;u=h;do{if((u.tag&e)===e){var v=u.inst,w=v.destroy;if(w!==void 0){v.destroy=void 0,f=n;var M=i,Q=w;try{Q()}catch(ie){it(f,M,ie)}}}u=u.next}while(u!==h)}}catch(ie){it(n,n.return,ie)}}function mp(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{im(n,i)}catch(u){it(e,e.return,u)}}}function pp(e,n,i){i.props=Mi(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(u){it(e,n,u)}}function dr(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var u=e.stateNode;break;case 30:u=e.stateNode;break;default:u=e.stateNode}typeof i=="function"?e.refCleanup=i(u):i.current=u}}catch(f){it(e,n,f)}}function Kn(e,n){var i=e.ref,u=e.refCleanup;if(i!==null)if(typeof u=="function")try{u()}catch(f){it(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){it(e,n,f)}else i.current=null}function gp(e){var n=e.type,i=e.memoizedProps,u=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&u.focus();break e;case"img":i.src?u.src=i.src:i.srcSet&&(u.srcset=i.srcSet)}}catch(f){it(e,e.return,f)}}function wc(e,n,i){try{var u=e.stateNode;dx(u,e.type,i,n),u[ye]=n}catch(f){it(e,e.return,f)}}function yp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Jl(e.type)||e.tag===4}function kc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||yp(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&&Jl(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 Cc(e,n,i){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=ol));else if(u!==4&&(u===27&&Jl(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(Cc(e,n,i),e=e.sibling;e!==null;)Cc(e,n,i),e=e.sibling}function Vu(e,n,i){var u=e.tag;if(u===5||u===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(u!==4&&(u===27&&Jl(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Vu(e,n,i),e=e.sibling;e!==null;)Vu(e,n,i),e=e.sibling}function vp(e){var n=e.stateNode,i=e.memoizedProps;try{for(var u=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Vt(n,u,i),n[me]=e,n[ye]=i}catch(h){it(e,e.return,h)}}var vl=!1,At=!1,Tc=!1,bp=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function I1(e,n){if(e=e.containerInfo,Xc=co,e=Nh(e),bs(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var u=i.getSelection&&i.getSelection();if(u&&u.rangeCount!==0){i=u.anchorNode;var f=u.anchorOffset,h=u.focusNode;u=u.focusOffset;try{i.nodeType,h.nodeType}catch{i=null;break e}var v=0,w=-1,M=-1,Q=0,ie=0,ue=e,X=null;t:for(;;){for(var J;ue!==i||f!==0&&ue.nodeType!==3||(w=v+f),ue!==h||u!==0&&ue.nodeType!==3||(M=v+u),ue.nodeType===3&&(v+=ue.nodeValue.length),(J=ue.firstChild)!==null;)X=ue,ue=J;for(;;){if(ue===e)break t;if(X===i&&++Q===f&&(w=v),X===h&&++ie===u&&(M=v),(J=ue.nextSibling)!==null)break;ue=X,X=ue.parentNode}ue=J}i=w===-1||M===-1?null:{start:w,end:M}}else i=null}i=i||{start:0,end:0}}else i=null;for($c={focusedElem:e,selectionRange:i},co=!1,Mt=n;Mt!==null;)if(n=Mt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Mt=e;else for(;Mt!==null;){switch(n=Mt,h=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(i=0;i<e.length;i++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,i=n,f=h.memoizedProps,h=h.memoizedState,u=i.stateNode;try{var Se=Mi(i.type,f);e=u.getSnapshotBeforeUpdate(Se,h),u.__reactInternalSnapshotBeforeUpdate=e}catch(Ne){it(i,i.return,Ne)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)Pc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Pc(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,Mt=e;break}Mt=n.return}}function xp(e,n,i){var u=i.flags;switch(i.tag){case 0:case 11:case 15:xl(e,i),u&4&&fr(5,i);break;case 1:if(xl(e,i),u&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(v){it(i,i.return,v)}else{var f=Mi(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){it(i,i.return,v)}}u&64&&mp(i),u&512&&dr(i,i.return);break;case 3:if(xl(e,i),u&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{im(e,n)}catch(v){it(i,i.return,v)}}break;case 27:n===null&&u&4&&vp(i);case 26:case 5:xl(e,i),n===null&&u&4&&gp(i),u&512&&dr(i,i.return);break;case 12:xl(e,i);break;case 31:xl(e,i),u&4&&wp(e,i);break;case 13:xl(e,i),u&4&&kp(e,i),u&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=ex.bind(null,i),xx(e,i))));break;case 22:if(u=i.memoizedState!==null||vl,!u){n=n!==null&&n.memoizedState!==null||At,f=vl;var h=At;vl=u,(At=n)&&!h?Sl(e,i,(i.subtreeFlags&8772)!==0):xl(e,i),vl=f,At=h}break;case 30:break;default:xl(e,i)}}function Sp(e){var n=e.alternate;n!==null&&(e.alternate=null,Sp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&vt(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 mt=null,en=!1;function bl(e,n,i){for(i=i.child;i!==null;)Ep(e,n,i),i=i.sibling}function Ep(e,n,i){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Ut,i)}catch{}switch(i.tag){case 26:At||Kn(i,n),bl(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:At||Kn(i,n);var u=mt,f=en;Jl(i.type)&&(mt=i.stateNode,en=!1),bl(e,n,i),Sr(i.stateNode),mt=u,en=f;break;case 5:At||Kn(i,n);case 6:if(u=mt,f=en,mt=null,bl(e,n,i),mt=u,en=f,mt!==null)if(en)try{(mt.nodeType===9?mt.body:mt.nodeName==="HTML"?mt.ownerDocument.body:mt).removeChild(i.stateNode)}catch(h){it(i,n,h)}else try{mt.removeChild(i.stateNode)}catch(h){it(i,n,h)}break;case 18:mt!==null&&(en?(e=mt,mg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),wa(e)):mg(mt,i.stateNode));break;case 4:u=mt,f=en,mt=i.stateNode.containerInfo,en=!0,bl(e,n,i),mt=u,en=f;break;case 0:case 11:case 14:case 15:Il(2,i,n),At||Il(4,i,n),bl(e,n,i);break;case 1:At||(Kn(i,n),u=i.stateNode,typeof u.componentWillUnmount=="function"&&pp(i,n,u)),bl(e,n,i);break;case 21:bl(e,n,i);break;case 22:At=(u=At)||i.memoizedState!==null,bl(e,n,i),At=u;break;default:bl(e,n,i)}}function wp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{wa(e)}catch(i){it(n,n.return,i)}}}function kp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{wa(e)}catch(i){it(n,n.return,i)}}function Q1(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new bp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new bp),n;default:throw Error(r(435,e.tag))}}function Fu(e,n){var i=Q1(e);n.forEach(function(u){if(!i.has(u)){i.add(u);var f=tx.bind(null,e,u);u.then(f,f)}})}function tn(e,n){var i=n.deletions;if(i!==null)for(var u=0;u<i.length;u++){var f=i[u],h=e,v=n,w=v;e:for(;w!==null;){switch(w.tag){case 27:if(Jl(w.type)){mt=w.stateNode,en=!1;break e}break;case 5:mt=w.stateNode,en=!1;break e;case 3:case 4:mt=w.stateNode.containerInfo,en=!0;break e}w=w.return}if(mt===null)throw Error(r(160));Ep(h,v,f),mt=null,en=!1,h=f.alternate,h!==null&&(h.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Cp(n,e),n=n.sibling}var Vn=null;function Cp(e,n){var i=e.alternate,u=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:tn(n,e),nn(e),u&4&&(Il(3,e,e.return),fr(3,e),Il(5,e,e.return));break;case 1:tn(n,e),nn(e),u&512&&(At||i===null||Kn(i,i.return)),u&64&&vl&&(e=e.updateQueue,e!==null&&(u=e.callbacks,u!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?u:i.concat(u))));break;case 26:var f=Vn;if(tn(n,e),nn(e),u&512&&(At||i===null||Kn(i,i.return)),u&4){var h=i!==null?i.memoizedState:null;if(u=e.memoizedState,i===null)if(u===null)if(e.stateNode===null){e:{u=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(u){case"title":h=f.getElementsByTagName("title")[0],(!h||h[gt]||h[me]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=f.createElement(u),f.head.insertBefore(h,f.querySelector("head > title"))),Vt(h,u,i),h[me]=e,ht(h),u=h;break e;case"link":var v=Cg("link","href",f).get(u+(i.href||""));if(v){for(var w=0;w<v.length;w++)if(h=v[w],h.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&h.getAttribute("rel")===(i.rel==null?null:i.rel)&&h.getAttribute("title")===(i.title==null?null:i.title)&&h.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(w,1);break t}}h=f.createElement(u),Vt(h,u,i),f.head.appendChild(h);break;case"meta":if(v=Cg("meta","content",f).get(u+(i.content||""))){for(w=0;w<v.length;w++)if(h=v[w],h.getAttribute("content")===(i.content==null?null:""+i.content)&&h.getAttribute("name")===(i.name==null?null:i.name)&&h.getAttribute("property")===(i.property==null?null:i.property)&&h.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&h.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(w,1);break t}}h=f.createElement(u),Vt(h,u,i),f.head.appendChild(h);break;default:throw Error(r(468,u))}h[me]=e,ht(h),u=h}e.stateNode=u}else Tg(f,e.type,e.stateNode);else e.stateNode=kg(f,u,e.memoizedProps);else h!==u?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,u===null?Tg(f,e.type,e.stateNode):kg(f,u,e.memoizedProps)):u===null&&e.stateNode!==null&&wc(e,e.memoizedProps,i.memoizedProps)}break;case 27:tn(n,e),nn(e),u&512&&(At||i===null||Kn(i,i.return)),i!==null&&u&4&&wc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(tn(n,e),nn(e),u&512&&(At||i===null||Kn(i,i.return)),e.flags&32){f=e.stateNode;try{Qi(f,"")}catch(Se){it(e,e.return,Se)}}u&4&&e.stateNode!=null&&(f=e.memoizedProps,wc(e,f,i!==null?i.memoizedProps:f)),u&1024&&(Tc=!0);break;case 6:if(tn(n,e),nn(e),u&4){if(e.stateNode===null)throw Error(r(162));u=e.memoizedProps,i=e.stateNode;try{i.nodeValue=u}catch(Se){it(e,e.return,Se)}}break;case 3:if(ro=null,f=Vn,Vn=io(n.containerInfo),tn(n,e),Vn=f,nn(e),u&4&&i!==null&&i.memoizedState.isDehydrated)try{wa(n.containerInfo)}catch(Se){it(e,e.return,Se)}Tc&&(Tc=!1,Tp(e));break;case 4:u=Vn,Vn=io(e.stateNode.containerInfo),tn(n,e),nn(e),Vn=u;break;case 12:tn(n,e),nn(e);break;case 31:tn(n,e),nn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 13:tn(n,e),nn(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Qu=pt()),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 22:f=e.memoizedState!==null;var M=i!==null&&i.memoizedState!==null,Q=vl,ie=At;if(vl=Q||f,At=ie||M,tn(n,e),At=ie,vl=Q,nn(e),u&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(i===null||M||vl||At||Li(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){M=i=n;try{if(h=M.stateNode,f)v=h.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{w=M.stateNode;var ue=M.memoizedProps.style,X=ue!=null&&ue.hasOwnProperty("display")?ue.display:null;w.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(Se){it(M,M.return,Se)}}}else if(n.tag===6){if(i===null){M=n;try{M.stateNode.nodeValue=f?"":M.memoizedProps}catch(Se){it(M,M.return,Se)}}}else if(n.tag===18){if(i===null){M=n;try{var J=M.stateNode;f?pg(J,!0):pg(M.stateNode,!1)}catch(Se){it(M,M.return,Se)}}}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;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}u&4&&(u=e.updateQueue,u!==null&&(i=u.retryQueue,i!==null&&(u.retryQueue=null,Fu(e,i))));break;case 19:tn(n,e),nn(e),u&4&&(u=e.updateQueue,u!==null&&(e.updateQueue=null,Fu(e,u)));break;case 30:break;case 21:break;default:tn(n,e),nn(e)}}function nn(e){var n=e.flags;if(n&2){try{for(var i,u=e.return;u!==null;){if(yp(u)){i=u;break}u=u.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var f=i.stateNode,h=kc(e);Vu(e,h,f);break;case 5:var v=i.stateNode;i.flags&32&&(Qi(v,""),i.flags&=-33);var w=kc(e);Vu(e,w,v);break;case 3:case 4:var M=i.stateNode.containerInfo,Q=kc(e);Cc(e,Q,M);break;default:throw Error(r(161))}}catch(ie){it(e,e.return,ie)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Tp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Tp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function xl(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)xp(e,n.alternate,n),n=n.sibling}function Li(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Il(4,n,n.return),Li(n);break;case 1:Kn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&pp(n,n.return,i),Li(n);break;case 27:Sr(n.stateNode);case 26:case 5:Kn(n,n.return),Li(n);break;case 22:n.memoizedState===null&&Li(n);break;case 30:Li(n);break;default:Li(n)}e=e.sibling}}function Sl(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var u=n.alternate,f=e,h=n,v=h.flags;switch(h.tag){case 0:case 11:case 15:Sl(f,h,i),fr(4,h);break;case 1:if(Sl(f,h,i),u=h,f=u.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(Q){it(u,u.return,Q)}if(u=h,f=u.updateQueue,f!==null){var w=u.stateNode;try{var M=f.shared.hiddenCallbacks;if(M!==null)for(f.shared.hiddenCallbacks=null,f=0;f<M.length;f++)lm(M[f],w)}catch(Q){it(u,u.return,Q)}}i&&v&64&&mp(h),dr(h,h.return);break;case 27:vp(h);case 26:case 5:Sl(f,h,i),i&&u===null&&v&4&&gp(h),dr(h,h.return);break;case 12:Sl(f,h,i);break;case 31:Sl(f,h,i),i&&v&4&&wp(f,h);break;case 13:Sl(f,h,i),i&&v&4&&kp(f,h);break;case 22:h.memoizedState===null&&Sl(f,h,i),dr(h,h.return);break;case 30:break;default:Sl(f,h,i)}n=n.sibling}}function jc(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Ja(i))}function Ac(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ja(e))}function Fn(e,n,i,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)jp(e,n,i,u),n=n.sibling}function jp(e,n,i,u){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Fn(e,n,i,u),f&2048&&fr(9,n);break;case 1:Fn(e,n,i,u);break;case 3:Fn(e,n,i,u),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ja(e)));break;case 12:if(f&2048){Fn(e,n,i,u),e=n.stateNode;try{var h=n.memoizedProps,v=h.id,w=h.onPostCommit;typeof w=="function"&&w(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(M){it(n,n.return,M)}}else Fn(e,n,i,u);break;case 31:Fn(e,n,i,u);break;case 13:Fn(e,n,i,u);break;case 23:break;case 22:h=n.stateNode,v=n.alternate,n.memoizedState!==null?h._visibility&2?Fn(e,n,i,u):hr(e,n):h._visibility&2?Fn(e,n,i,u):(h._visibility|=2,da(e,n,i,u,(n.subtreeFlags&10256)!==0||!1)),f&2048&&jc(v,n);break;case 24:Fn(e,n,i,u),f&2048&&Ac(n.alternate,n);break;default:Fn(e,n,i,u)}}function da(e,n,i,u,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,v=n,w=i,M=u,Q=v.flags;switch(v.tag){case 0:case 11:case 15:da(h,v,w,M,f),fr(8,v);break;case 23:break;case 22:var ie=v.stateNode;v.memoizedState!==null?ie._visibility&2?da(h,v,w,M,f):hr(h,v):(ie._visibility|=2,da(h,v,w,M,f)),f&&Q&2048&&jc(v.alternate,v);break;case 24:da(h,v,w,M,f),f&&Q&2048&&Ac(v.alternate,v);break;default:da(h,v,w,M,f)}n=n.sibling}}function hr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,u=n,f=u.flags;switch(u.tag){case 22:hr(i,u),f&2048&&jc(u.alternate,u);break;case 24:hr(i,u),f&2048&&Ac(u.alternate,u);break;default:hr(i,u)}n=n.sibling}}var mr=8192;function ha(e,n,i){if(e.subtreeFlags&mr)for(e=e.child;e!==null;)Ap(e,n,i),e=e.sibling}function Ap(e,n,i){switch(e.tag){case 26:ha(e,n,i),e.flags&mr&&e.memoizedState!==null&&zx(i,Vn,e.memoizedState,e.memoizedProps);break;case 5:ha(e,n,i);break;case 3:case 4:var u=Vn;Vn=io(e.stateNode.containerInfo),ha(e,n,i),Vn=u;break;case 22:e.memoizedState===null&&(u=e.alternate,u!==null&&u.memoizedState!==null?(u=mr,mr=16777216,ha(e,n,i),mr=u):ha(e,n,i));break;default:ha(e,n,i)}}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 pr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var u=n[i];Mt=u,Np(u,e)}_p(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Rp(e),e=e.sibling}function Rp(e){switch(e.tag){case 0:case 11:case 15:pr(e),e.flags&2048&&Il(9,e,e.return);break;case 3:pr(e);break;case 12:pr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Iu(e)):pr(e);break;default:pr(e)}}function Iu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var u=n[i];Mt=u,Np(u,e)}_p(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Il(8,n,n.return),Iu(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,Iu(n));break;default:Iu(n)}e=e.sibling}}function Np(e,n){for(;Mt!==null;){var i=Mt;switch(i.tag){case 0:case 11:case 15:Il(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var u=i.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ja(i.memoizedState.cache)}if(u=i.child,u!==null)u.return=i,Mt=u;else e:for(i=e;Mt!==null;){u=Mt;var f=u.sibling,h=u.return;if(Sp(u),u===i){Mt=null;break e}if(f!==null){f.return=h,Mt=f;break e}Mt=h}}}var X1={getCacheForType:function(e){var n=Yt(Ct),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return Yt(Ct).controller.signal}},$1=typeof WeakMap=="function"?WeakMap:Map,et=0,ot=null,He=null,Ge=0,lt=0,pn=null,Ql=!1,ma=!1,_c=!1,El=0,St=0,Xl=0,Ui=0,Rc=0,gn=0,pa=0,gr=null,ln=null,Nc=!1,Qu=0,zp=0,Xu=1/0,$u=null,$l=null,zt=0,Kl=null,ga=null,wl=0,zc=0,Dc=null,Dp=null,yr=0,Oc=null;function yn(){return(et&2)!==0&&Ge!==0?Ge&-Ge:U.T!==null?qc():he()}function Op(){if(gn===0)if((Ge&536870912)===0||$e){var e=pi;pi<<=1,(pi&3932160)===0&&(pi=262144),gn=e}else gn=536870912;return e=hn.current,e!==null&&(e.flags|=32),gn}function an(e,n,i){(e===ot&&(lt===2||lt===9)||e.cancelPendingCommit!==null)&&(ya(e,0),Zl(e,Ge,gn,!1)),Ol(e,i),((et&2)===0||e!==ot)&&(e===ot&&((et&2)===0&&(Ui|=i),St===4&&Zl(e,Ge,gn,!1)),Zn(e))}function Mp(e,n,i){if((et&6)!==0)throw Error(r(327));var u=!i&&(n&127)===0&&(n&e.expiredLanes)===0||yi(e,n),f=u?P1(e,n):Lc(e,n,!0),h=u;do{if(f===0){ma&&!u&&Zl(e,n,0,!1);break}else{if(i=e.current.alternate,h&&!K1(i)){f=Lc(e,n,!1),h=!1;continue}if(f===2){if(h=n,e.errorRecoveryDisabledLanes&h)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var w=e;f=gr;var M=w.current.memoizedState.isDehydrated;if(M&&(ya(w,v).flags|=256),v=Lc(w,v,!1),v!==2){if(_c&&!M){w.errorRecoveryDisabledLanes|=h,Ui|=h,f=4;break e}h=ln,ln=f,h!==null&&(ln===null?ln=h:ln.push.apply(ln,h))}f=v}if(h=!1,f!==2)continue}}if(f===1){ya(e,0),Zl(e,n,0,!0);break}e:{switch(u=e,h=f,h){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Zl(u,n,gn,!Ql);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=Qu+300-pt(),10<f)){if(Zl(u,n,gn,!Ql),gi(u,0,!0)!==0)break e;wl=n,u.timeoutHandle=dg(Lp.bind(null,u,i,ln,$u,Nc,n,gn,Ui,pa,Ql,h,"Throttled",-0,0),f);break e}Lp(u,i,ln,$u,Nc,n,gn,Ui,pa,Ql,h,null,-0,0)}}break}while(!0);Zn(e)}function Lp(e,n,i,u,f,h,v,w,M,Q,ie,ue,X,J){if(e.timeoutHandle=-1,ue=n.subtreeFlags,ue&8192||(ue&16785408)===16785408){ue={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},Ap(n,h,ue);var Se=(h&62914560)===h?Qu-pt():(h&4194048)===h?zp-pt():0;if(Se=Dx(ue,Se),Se!==null){wl=h,e.cancelPendingCommit=Se(Fp.bind(null,e,n,h,i,u,f,v,w,M,ie,ue,null,X,J)),Zl(e,h,v,!Q);return}}Fp(e,n,h,i,u,f,v,w,M)}function K1(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var u=0;u<i.length;u++){var f=i[u],h=f.getSnapshot;f=f.value;try{if(!fn(h(),f))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;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 Zl(e,n,i,u){n&=~Rc,n&=~Ui,e.suspendedLanes|=n,e.pingedLanes&=~n,u&&(e.warmLanes|=n),u=e.expirationTimes;for(var f=n;0<f;){var h=31-tt(f),v=1<<h;u[h]=-1,f&=~v}i!==0&&au(e,i,n)}function Ku(){return(et&6)===0?(vr(0),!1):!0}function Mc(){if(He!==null){if(lt===0)var e=He.return;else e=He,dl=Ai=null,Ps(e),ua=null,er=0,e=He;for(;e!==null;)hp(e.alternate,e),e=e.return;He=null}}function ya(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,px(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),wl=0,Mc(),ot=e,He=i=cl(e.current,null),Ge=n,lt=0,pn=null,Ql=!1,ma=yi(e,n),_c=!1,pa=gn=Rc=Ui=Xl=St=0,ln=gr=null,Nc=!1,(n&8)!==0&&(n|=n&32);var u=e.entangledLanes;if(u!==0)for(e=e.entanglements,u&=n;0<u;){var f=31-tt(u),h=1<<f;n|=e[f],u&=~h}return El=n,gu(),i}function Up(e,n){Me=null,U.H=or,n===ra||n===ku?(n=Wh(),lt=3):n===Hs?(n=Wh(),lt=4):lt=n===hc?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,pn=n,He===null&&(St=1,Bu(e,Cn(n,e.current)))}function Bp(){var e=hn.current;return e===null?!0:(Ge&4194048)===Ge?_n===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===_n:!1}function Hp(){var e=U.H;return U.H=or,e===null?or:e}function qp(){var e=U.A;return U.A=X1,e}function Zu(){St=4,Ql||(Ge&4194048)!==Ge&&hn.current!==null||(ma=!0),(Xl&134217727)===0&&(Ui&134217727)===0||ot===null||Zl(ot,Ge,gn,!1)}function Lc(e,n,i){var u=et;et|=2;var f=Hp(),h=qp();(ot!==e||Ge!==n)&&($u=null,ya(e,n)),n=!1;var v=St;e:do try{if(lt!==0&&He!==null){var w=He,M=pn;switch(lt){case 8:Mc(),v=6;break e;case 3:case 2:case 9:case 6:hn.current===null&&(n=!0);var Q=lt;if(lt=0,pn=null,va(e,w,M,Q),i&&ma){v=0;break e}break;default:Q=lt,lt=0,pn=null,va(e,w,M,Q)}}Z1(),v=St;break}catch(ie){Up(e,ie)}while(!0);return n&&e.shellSuspendCounter++,dl=Ai=null,et=u,U.H=f,U.A=h,He===null&&(ot=null,Ge=0,gu()),v}function Z1(){for(;He!==null;)Yp(He)}function P1(e,n){var i=et;et|=2;var u=Hp(),f=qp();ot!==e||Ge!==n?($u=null,Xu=pt()+500,ya(e,n)):ma=yi(e,n);e:do try{if(lt!==0&&He!==null){n=He;var h=pn;t:switch(lt){case 1:lt=0,pn=null,va(e,n,h,1);break;case 2:case 9:if(Ph(h)){lt=0,pn=null,Gp(n);break}n=function(){lt!==2&<!==9||ot!==e||(lt=7),Zn(e)},h.then(n,n);break e;case 3:lt=7;break e;case 4:lt=5;break e;case 7:Ph(h)?(lt=0,pn=null,Gp(n)):(lt=0,pn=null,va(e,n,h,7));break;case 5:var v=null;switch(He.tag){case 26:v=He.memoizedState;case 5:case 27:var w=He;if(v?jg(v):w.stateNode.complete){lt=0,pn=null;var M=w.sibling;if(M!==null)He=M;else{var Q=w.return;Q!==null?(He=Q,Pu(Q)):He=null}break t}}lt=0,pn=null,va(e,n,h,5);break;case 6:lt=0,pn=null,va(e,n,h,6);break;case 8:Mc(),St=6;break e;default:throw Error(r(462))}}J1();break}catch(ie){Up(e,ie)}while(!0);return dl=Ai=null,U.H=u,U.A=f,et=i,He!==null?0:(ot=null,Ge=0,gu(),St)}function J1(){for(;He!==null&&!Ba();)Yp(He)}function Yp(e){var n=fp(e.alternate,e,El);e.memoizedProps=e.pendingProps,n===null?Pu(e):He=n}function Gp(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=ap(i,n,n.pendingProps,n.type,void 0,Ge);break;case 11:n=ap(i,n,n.pendingProps,n.type.render,n.ref,Ge);break;case 5:Ps(n);default:hp(i,n),n=He=qh(n,El),n=fp(i,n,El)}e.memoizedProps=e.pendingProps,n===null?Pu(e):He=n}function va(e,n,i,u){dl=Ai=null,Ps(n),ua=null,er=0;var f=n.return;try{if(q1(e,f,n,i,Ge)){St=1,Bu(e,Cn(i,e.current)),He=null;return}}catch(h){if(f!==null)throw He=f,h;St=1,Bu(e,Cn(i,e.current)),He=null;return}n.flags&32768?($e||u===1?e=!0:ma||(Ge&536870912)!==0?e=!1:(Ql=e=!0,(u===2||u===9||u===3||u===6)&&(u=hn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Vp(n,e)):Pu(n)}function Pu(e){var n=e;do{if((n.flags&32768)!==0){Vp(n,Ql);return}e=n.return;var i=V1(n.alternate,n,El);if(i!==null){He=i;return}if(n=n.sibling,n!==null){He=n;return}He=n=e}while(n!==null);St===0&&(St=5)}function Vp(e,n){do{var i=F1(e.alternate,e);if(i!==null){i.flags&=32767,He=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){He=e;return}He=e=i}while(e!==null);St=6,He=null}function Fp(e,n,i,u,f,h,v,w,M){e.cancelPendingCommit=null;do Ju();while(zt!==0);if((et&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(h=n.lanes|n.childLanes,h|=ks,ls(e,i,h,v,w,M),e===ot&&(He=ot=null,Ge=0),ga=n,Kl=e,wl=i,zc=h,Dc=f,Dp=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nx(Ce,function(){return Kp(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=U.T,U.T=null,f=ee.p,ee.p=2,v=et,et|=4;try{I1(e,n,i)}finally{et=v,ee.p=f,U.T=u}}zt=1,Ip(),Qp(),Xp()}}function Ip(){if(zt===1){zt=0;var e=Kl,n=ga,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var u=ee.p;ee.p=2;var f=et;et|=4;try{Cp(n,e);var h=$c,v=Nh(e.containerInfo),w=h.focusedElem,M=h.selectionRange;if(v!==w&&w&&w.ownerDocument&&Rh(w.ownerDocument.documentElement,w)){if(M!==null&&bs(w)){var Q=M.start,ie=M.end;if(ie===void 0&&(ie=Q),"selectionStart"in w)w.selectionStart=Q,w.selectionEnd=Math.min(ie,w.value.length);else{var ue=w.ownerDocument||document,X=ue&&ue.defaultView||window;if(X.getSelection){var J=X.getSelection(),Se=w.textContent.length,Ne=Math.min(M.start,Se),ut=M.end===void 0?Ne:Math.min(M.end,Se);!J.extend&&Ne>ut&&(v=ut,ut=Ne,Ne=v);var q=_h(w,Ne),B=_h(w,ut);if(q&&B&&(J.rangeCount!==1||J.anchorNode!==q.node||J.anchorOffset!==q.offset||J.focusNode!==B.node||J.focusOffset!==B.offset)){var I=ue.createRange();I.setStart(q.node,q.offset),J.removeAllRanges(),Ne>ut?(J.addRange(I),J.extend(B.node,B.offset)):(I.setEnd(B.node,B.offset),J.addRange(I))}}}}for(ue=[],J=w;J=J.parentNode;)J.nodeType===1&&ue.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<ue.length;w++){var re=ue[w];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}co=!!Xc,$c=Xc=null}finally{et=f,ee.p=u,U.T=i}}e.current=n,zt=2}}function Qp(){if(zt===2){zt=0;var e=Kl,n=ga,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var u=ee.p;ee.p=2;var f=et;et|=4;try{xp(e,n.alternate,n)}finally{et=f,ee.p=u,U.T=i}}zt=3}}function Xp(){if(zt===4||zt===3){zt=0,Ha();var e=Kl,n=ga,i=wl,u=Dp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?zt=5:(zt=0,ga=Kl=null,$p(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&($l=null),oe(i),n=n.stateNode,nt&&typeof nt.onCommitFiberRoot=="function")try{nt.onCommitFiberRoot(Ut,n,void 0,(n.current.flags&128)===128)}catch{}if(u!==null){n=U.T,f=ee.p,ee.p=2,U.T=null;try{for(var h=e.onRecoverableError,v=0;v<u.length;v++){var w=u[v];h(w.value,{componentStack:w.stack})}}finally{U.T=n,ee.p=f}}(wl&3)!==0&&Ju(),Zn(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===Oc?yr++:(yr=0,Oc=e):yr=0,vr(0)}}function $p(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ja(n)))}function Ju(){return Ip(),Qp(),Xp(),Kp()}function Kp(){if(zt!==5)return!1;var e=Kl,n=zc;zc=0;var i=oe(wl),u=U.T,f=ee.p;try{ee.p=32>i?32:i,U.T=null,i=Dc,Dc=null;var h=Kl,v=wl;if(zt=0,ga=Kl=null,wl=0,(et&6)!==0)throw Error(r(331));var w=et;if(et|=4,Rp(h.current),jp(h,h.current,v,i),et=w,vr(0,!1),nt&&typeof nt.onPostCommitFiberRoot=="function")try{nt.onPostCommitFiberRoot(Ut,h)}catch{}return!0}finally{ee.p=f,U.T=u,$p(e,n)}}function Zp(e,n,i){n=Cn(i,n),n=dc(e.stateNode,n,2),e=Gl(e,n,2),e!==null&&(Ol(e,2),Zn(e))}function it(e,n,i){if(e.tag===3)Zp(e,e,i);else for(;n!==null;){if(n.tag===3){Zp(n,e,i);break}else if(n.tag===1){var u=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&($l===null||!$l.has(u))){e=Cn(i,e),i=Pm(2),u=Gl(n,i,2),u!==null&&(Jm(i,u,n,e),Ol(u,2),Zn(u));break}}n=n.return}}function Uc(e,n,i){var u=e.pingCache;if(u===null){u=e.pingCache=new $1;var f=new Set;u.set(n,f)}else f=u.get(n),f===void 0&&(f=new Set,u.set(n,f));f.has(i)||(_c=!0,f.add(i),e=W1.bind(null,e,n,i),n.then(e,e))}function W1(e,n,i){var u=e.pingCache;u!==null&&u.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,ot===e&&(Ge&i)===i&&(St===4||St===3&&(Ge&62914560)===Ge&&300>pt()-Qu?(et&2)===0&&ya(e,0):Rc|=i,pa===Ge&&(pa=0)),Zn(e)}function Pp(e,n){n===0&&(n=vi()),e=Ci(e,n),e!==null&&(Ol(e,n),Zn(e))}function ex(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Pp(e,i)}function tx(e,n){var i=0;switch(e.tag){case 31:case 13:var u=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:u=e.stateNode;break;case 22:u=e.stateNode._retryCache;break;default:throw Error(r(314))}u!==null&&u.delete(n),Pp(e,i)}function nx(e,n){return Nl(e,n)}var Wu=null,ba=null,Bc=!1,eo=!1,Hc=!1,Pl=0;function Zn(e){e!==ba&&e.next===null&&(ba===null?Wu=ba=e:ba=ba.next=e),eo=!0,Bc||(Bc=!0,ix())}function vr(e,n){if(!Hc&&eo){Hc=!0;do for(var i=!1,u=Wu;u!==null;){if(e!==0){var f=u.pendingLanes;if(f===0)var h=0;else{var v=u.suspendedLanes,w=u.pingedLanes;h=(1<<31-tt(42|e)+1)-1,h&=f&~(v&~w),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(i=!0,tg(u,h))}else h=Ge,h=gi(u,u===ot?h:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(h&3)===0||yi(u,h)||(i=!0,tg(u,h));u=u.next}while(i);Hc=!1}}function lx(){Jp()}function Jp(){eo=Bc=!1;var e=0;Pl!==0&&mx()&&(e=Pl);for(var n=pt(),i=null,u=Wu;u!==null;){var f=u.next,h=Wp(u,n);h===0?(u.next=null,i===null?Wu=f:i.next=f,f===null&&(ba=i)):(i=u,(e!==0||(h&3)!==0)&&(eo=!0)),u=f}zt!==0&&zt!==5||vr(e),Pl!==0&&(Pl=0)}function Wp(e,n){for(var i=e.suspendedLanes,u=e.pingedLanes,f=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var v=31-tt(h),w=1<<v,M=f[v];M===-1?((w&i)===0||(w&u)!==0)&&(f[v]=iu(w,n)):M<=n&&(e.expiredLanes|=w),h&=~w}if(n=ot,i=Ge,i=gi(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u=e.callbackNode,i===0||e===n&&(lt===2||lt===9)||e.cancelPendingCommit!==null)return u!==null&&u!==null&&mi(u),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||yi(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(u!==null&&mi(u),oe(i)){case 2:case 8:i=de;break;case 32:i=Ce;break;case 268435456:i=Pe;break;default:i=Ce}return u=eg.bind(null,e),i=Nl(i,u),e.callbackPriority=n,e.callbackNode=i,n}return u!==null&&u!==null&&mi(u),e.callbackPriority=2,e.callbackNode=null,2}function eg(e,n){if(zt!==0&&zt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Ju()&&e.callbackNode!==i)return null;var u=Ge;return u=gi(e,e===ot?u:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),u===0?null:(Mp(e,u,n),Wp(e,pt()),e.callbackNode!=null&&e.callbackNode===i?eg.bind(null,e):null)}function tg(e,n){if(Ju())return null;Mp(e,n,!0)}function ix(){gx(function(){(et&6)!==0?Nl(ae,lx):Jp()})}function qc(){if(Pl===0){var e=ia;e===0&&(e=al,al<<=1,(al&261888)===0&&(al=256)),Pl=e}return Pl}function ng(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ou(""+e)}function lg(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function ax(e,n,i,u,f){if(n==="submit"&&i&&i.stateNode===f){var h=ng((f[ye]||null).action),v=u.submitter;v&&(n=(n=v[ye]||null)?ng(n.formAction):v.getAttribute("formAction"),n!==null&&(h=n,v=null));var w=new du("action","action",null,u,f);e.push({event:w,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Pl!==0){var M=v?lg(f,v):new FormData(f);rc(i,{pending:!0,data:M,method:f.method,action:h},null,M)}}else typeof h=="function"&&(w.preventDefault(),M=v?lg(f,v):new FormData(f),rc(i,{pending:!0,data:M,method:f.method,action:h},h,M))},currentTarget:f}]})}}for(var Yc=0;Yc<ws.length;Yc++){var Gc=ws[Yc],rx=Gc.toLowerCase(),ux=Gc[0].toUpperCase()+Gc.slice(1);Gn(rx,"on"+ux)}Gn(Oh,"onAnimationEnd"),Gn(Mh,"onAnimationIteration"),Gn(Lh,"onAnimationStart"),Gn("dblclick","onDoubleClick"),Gn("focusin","onFocus"),Gn("focusout","onBlur"),Gn(w1,"onTransitionRun"),Gn(k1,"onTransitionStart"),Gn(C1,"onTransitionCancel"),Gn(Uh,"onTransitionEnd"),En("onMouseEnter",["mouseout","mouseover"]),En("onMouseLeave",["mouseout","mouseover"]),En("onPointerEnter",["pointerout","pointerover"]),En("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var br="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(" "),ox=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(br));function ig(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var u=e[i],f=u.event;u=u.listeners;e:{var h=void 0;if(n)for(var v=u.length-1;0<=v;v--){var w=u[v],M=w.instance,Q=w.currentTarget;if(w=w.listener,M!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=Q;try{h(f)}catch(ie){pu(ie)}f.currentTarget=null,h=M}else for(v=0;v<u.length;v++){if(w=u[v],M=w.instance,Q=w.currentTarget,w=w.listener,M!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=Q;try{h(f)}catch(ie){pu(ie)}f.currentTarget=null,h=M}}}}function qe(e,n){var i=n[Ae];i===void 0&&(i=n[Ae]=new Set);var u=e+"__bubble";i.has(u)||(ag(n,e,2,!1),i.add(u))}function Vc(e,n,i){var u=0;n&&(u|=4),ag(i,e,u,n)}var to="_reactListening"+Math.random().toString(36).slice(2);function Fc(e){if(!e[to]){e[to]=!0,Hn.forEach(function(i){i!=="selectionchange"&&(ox.has(i)||Vc(i,!1,e),Vc(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[to]||(n[to]=!0,Vc("selectionchange",!1,n))}}function ag(e,n,i,u){switch(Og(n)){case 2:var f=Lx;break;case 8:f=Ux;break;default:f=rf}i=f.bind(null,n,i,e),f=void 0,!cs||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),u?f!==void 0?e.addEventListener(n,i,{capture:!0,passive:f}):e.addEventListener(n,i,!0):f!==void 0?e.addEventListener(n,i,{passive:f}):e.addEventListener(n,i,!1)}function Ic(e,n,i,u,f){var h=u;if((n&1)===0&&(n&2)===0&&u!==null)e:for(;;){if(u===null)return;var v=u.tag;if(v===3||v===4){var w=u.stateNode.containerInfo;if(w===f)break;if(v===4)for(v=u.return;v!==null;){var M=v.tag;if((M===3||M===4)&&v.stateNode.containerInfo===f)return;v=v.return}for(;w!==null;){if(v=bt(w),v===null)return;if(M=v.tag,M===5||M===6||M===26||M===27){u=h=v;continue e}w=w.parentNode}}u=u.return}ch(function(){var Q=h,ie=os(i),ue=[];e:{var X=Bh.get(e);if(X!==void 0){var J=du,Se=e;switch(e){case"keypress":if(cu(i)===0)break e;case"keydown":case"keyup":J=t1;break;case"focusin":Se="focus",J=ms;break;case"focusout":Se="blur",J=ms;break;case"beforeblur":case"afterblur":J=ms;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=hh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=Vb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=i1;break;case Oh:case Mh:case Lh:J=Qb;break;case Uh:J=r1;break;case"scroll":case"scrollend":J=Yb;break;case"wheel":J=o1;break;case"copy":case"cut":case"paste":J=$b;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=ph;break;case"toggle":case"beforetoggle":J=c1}var Ne=(n&4)!==0,ut=!Ne&&(e==="scroll"||e==="scrollend"),q=Ne?X!==null?X+"Capture":null:X;Ne=[];for(var B=Q,I;B!==null;){var re=B;if(I=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||I===null||q===null||(re=Ya(B,q),re!=null&&Ne.push(xr(B,re,I))),ut)break;B=B.return}0<Ne.length&&(X=new J(X,Se,null,i,ie),ue.push({event:X,listeners:Ne}))}}if((n&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",X&&i!==us&&(Se=i.relatedTarget||i.fromElement)&&(bt(Se)||Se[we]))break e;if((J||X)&&(X=ie.window===ie?ie:(X=ie.ownerDocument)?X.defaultView||X.parentWindow:window,J?(Se=i.relatedTarget||i.toElement,J=Q,Se=Se?bt(Se):null,Se!==null&&(ut=s(Se),Ne=Se.tag,Se!==ut||Ne!==5&&Ne!==27&&Ne!==6)&&(Se=null)):(J=null,Se=Q),J!==Se)){if(Ne=hh,re="onMouseLeave",q="onMouseEnter",B="mouse",(e==="pointerout"||e==="pointerover")&&(Ne=ph,re="onPointerLeave",q="onPointerEnter",B="pointer"),ut=J==null?X:Ot(J),I=Se==null?X:Ot(Se),X=new Ne(re,B+"leave",J,i,ie),X.target=ut,X.relatedTarget=I,re=null,bt(ie)===Q&&(Ne=new Ne(q,B+"enter",Se,i,ie),Ne.target=I,Ne.relatedTarget=ut,re=Ne),ut=re,J&&Se)t:{for(Ne=sx,q=J,B=Se,I=0,re=q;re;re=Ne(re))I++;re=0;for(var je=B;je;je=Ne(je))re++;for(;0<I-re;)q=Ne(q),I--;for(;0<re-I;)B=Ne(B),re--;for(;I--;){if(q===B||B!==null&&q===B.alternate){Ne=q;break t}q=Ne(q),B=Ne(B)}Ne=null}else Ne=null;J!==null&&rg(ue,X,J,Ne,!1),Se!==null&&ut!==null&&rg(ue,ut,Se,Ne,!0)}}e:{if(X=Q?Ot(Q):window,J=X.nodeName&&X.nodeName.toLowerCase(),J==="select"||J==="input"&&X.type==="file")var Je=wh;else if(Sh(X))if(kh)Je=x1;else{Je=v1;var Ee=y1}else J=X.nodeName,!J||J.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?Q&&rs(Q.elementType)&&(Je=wh):Je=b1;if(Je&&(Je=Je(e,Q))){Eh(ue,Je,i,ie);break e}Ee&&Ee(e,X,Q),e==="focusout"&&Q&&X.type==="number"&&Q.memoizedProps.value!=null&&as(X,"number",X.value)}switch(Ee=Q?Ot(Q):window,e){case"focusin":(Sh(Ee)||Ee.contentEditable==="true")&&(Zi=Ee,xs=Q,Ka=null);break;case"focusout":Ka=xs=Zi=null;break;case"mousedown":Ss=!0;break;case"contextmenu":case"mouseup":case"dragend":Ss=!1,zh(ue,i,ie);break;case"selectionchange":if(E1)break;case"keydown":case"keyup":zh(ue,i,ie)}var Le;if(gs)e:{switch(e){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else Ki?bh(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(gh&&i.locale!=="ko"&&(Ki||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Ki&&(Le=fh()):(Ml=ie,fs="value"in Ml?Ml.value:Ml.textContent,Ki=!0)),Ee=no(Q,Ve),0<Ee.length&&(Ve=new mh(Ve,e,null,i,ie),ue.push({event:Ve,listeners:Ee}),Le?Ve.data=Le:(Le=xh(i),Le!==null&&(Ve.data=Le)))),(Le=d1?h1(e,i):m1(e,i))&&(Ve=no(Q,"onBeforeInput"),0<Ve.length&&(Ee=new mh("onBeforeInput","beforeinput",null,i,ie),ue.push({event:Ee,listeners:Ve}),Ee.data=Le)),ax(ue,e,Q,i,ie)}ig(ue,n)})}function xr(e,n,i){return{instance:e,listener:n,currentTarget:i}}function no(e,n){for(var i=n+"Capture",u=[];e!==null;){var f=e,h=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||h===null||(f=Ya(e,i),f!=null&&u.unshift(xr(e,f,h)),f=Ya(e,n),f!=null&&u.push(xr(e,f,h))),e.tag===3)return u;e=e.return}return[]}function sx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function rg(e,n,i,u,f){for(var h=n._reactName,v=[];i!==null&&i!==u;){var w=i,M=w.alternate,Q=w.stateNode;if(w=w.tag,M!==null&&M===u)break;w!==5&&w!==26&&w!==27||Q===null||(M=Q,f?(Q=Ya(i,h),Q!=null&&v.unshift(xr(i,Q,M))):f||(Q=Ya(i,h),Q!=null&&v.push(xr(i,Q,M)))),i=i.return}v.length!==0&&e.push({event:n,listeners:v})}var cx=/\r\n?/g,fx=/\u0000|\uFFFD/g;function ug(e){return(typeof e=="string"?e:""+e).replace(cx,`
|
|
9
|
+
`).replace(fx,"")}function og(e,n){return n=ug(n),ug(e)===n}function rt(e,n,i,u,f,h){switch(i){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Qi(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Qi(e,""+u);break;case"className":Yn(e,"class",u);break;case"tabIndex":Yn(e,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Yn(e,i,u);break;case"style":oh(e,u,h);break;case"data":if(n!=="object"){Yn(e,"data",u);break}case"src":case"href":if(u===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(i);break}u=ou(""+u),e.setAttribute(i,u);break;case"action":case"formAction":if(typeof u=="function"){e.setAttribute(i,"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 h=="function"&&(i==="formAction"?(n!=="input"&&rt(e,n,"name",f.name,f,null),rt(e,n,"formEncType",f.formEncType,f,null),rt(e,n,"formMethod",f.formMethod,f,null),rt(e,n,"formTarget",f.formTarget,f,null)):(rt(e,n,"encType",f.encType,f,null),rt(e,n,"method",f.method,f,null),rt(e,n,"target",f.target,f,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){e.removeAttribute(i);break}u=ou(""+u),e.setAttribute(i,u);break;case"onClick":u!=null&&(e.onclick=ol);break;case"onScroll":u!=null&&qe("scroll",e);break;case"onScrollEnd":u!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(i=u.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":e.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){e.removeAttribute("xlink:href");break}i=ou(""+u),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(i,""+u):e.removeAttribute(i);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":u&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":u===!0?e.setAttribute(i,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?e.setAttribute(i,u):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?e.setAttribute(i,u):e.removeAttribute(i);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?e.removeAttribute(i):e.setAttribute(i,u);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Et(e,"popover",u);break;case"xlinkActuate":Ht(e,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Ht(e,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Ht(e,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Ht(e,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Ht(e,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Ht(e,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Ht(e,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Ht(e,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Ht(e,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":Et(e,"is",u);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Hb.get(i)||i,Et(e,i,u))}}function Qc(e,n,i,u,f,h){switch(i){case"style":oh(e,u,h);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(r(61));if(i=u.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof u=="string"?Qi(e,u):(typeof u=="number"||typeof u=="bigint")&&Qi(e,""+u);break;case"onScroll":u!=null&&qe("scroll",e);break;case"onScrollEnd":u!=null&&qe("scrollend",e);break;case"onClick":u!=null&&(e.onclick=ol);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!cn.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),n=i.slice(2,f?i.length-7:void 0),h=e[ye]||null,h=h!=null?h[i]:null,typeof h=="function"&&e.removeEventListener(n,h,f),typeof u=="function")){typeof h!="function"&&h!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,u,f);break e}i in e?e[i]=u:u===!0?e.setAttribute(i,""):Et(e,i,u)}}}function Vt(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var u=!1,f=!1,h;for(h in i)if(i.hasOwnProperty(h)){var v=i[h];if(v!=null)switch(h){case"src":u=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,h,v,i,null)}}f&&rt(e,n,"srcSet",i.srcSet,i,null),u&&rt(e,n,"src",i.src,i,null);return;case"input":qe("invalid",e);var w=h=v=f=null,M=null,Q=null;for(u in i)if(i.hasOwnProperty(u)){var ie=i[u];if(ie!=null)switch(u){case"name":f=ie;break;case"type":v=ie;break;case"checked":M=ie;break;case"defaultChecked":Q=ie;break;case"value":h=ie;break;case"defaultValue":w=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,n));break;default:rt(e,n,u,ie,i,null)}}ih(e,h,w,M,Q,v,f,!1);return;case"select":qe("invalid",e),u=v=h=null;for(f in i)if(i.hasOwnProperty(f)&&(w=i[f],w!=null))switch(f){case"value":h=w;break;case"defaultValue":v=w;break;case"multiple":u=w;default:rt(e,n,f,w,i,null)}n=h,i=v,e.multiple=!!u,n!=null?Ii(e,!!u,n,!1):i!=null&&Ii(e,!!u,i,!0);return;case"textarea":qe("invalid",e),h=f=u=null;for(v in i)if(i.hasOwnProperty(v)&&(w=i[v],w!=null))switch(v){case"value":u=w;break;case"defaultValue":f=w;break;case"children":h=w;break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:rt(e,n,v,w,i,null)}rh(e,u,f,h);return;case"option":for(M in i)i.hasOwnProperty(M)&&(u=i[M],u!=null)&&(M==="selected"?e.selected=u&&typeof u!="function"&&typeof u!="symbol":rt(e,n,M,u,i,null));return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(u=0;u<br.length;u++)qe(br[u],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("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(Q in i)if(i.hasOwnProperty(Q)&&(u=i[Q],u!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,Q,u,i,null)}return;default:if(rs(n)){for(ie in i)i.hasOwnProperty(ie)&&(u=i[ie],u!==void 0&&Qc(e,n,ie,u,i,void 0));return}}for(w in i)i.hasOwnProperty(w)&&(u=i[w],u!=null&&rt(e,n,w,u,i,null))}function dx(e,n,i,u){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,h=null,v=null,w=null,M=null,Q=null,ie=null;for(J in i){var ue=i[J];if(i.hasOwnProperty(J)&&ue!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":M=ue;default:u.hasOwnProperty(J)||rt(e,n,J,null,u,ue)}}for(var X in u){var J=u[X];if(ue=i[X],u.hasOwnProperty(X)&&(J!=null||ue!=null))switch(X){case"type":h=J;break;case"name":f=J;break;case"checked":Q=J;break;case"defaultChecked":ie=J;break;case"value":v=J;break;case"defaultValue":w=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:J!==ue&&rt(e,n,X,J,u,ue)}}is(e,v,w,M,Q,ie,h,f);return;case"select":J=v=w=X=null;for(h in i)if(M=i[h],i.hasOwnProperty(h)&&M!=null)switch(h){case"value":break;case"multiple":J=M;default:u.hasOwnProperty(h)||rt(e,n,h,null,u,M)}for(f in u)if(h=u[f],M=i[f],u.hasOwnProperty(f)&&(h!=null||M!=null))switch(f){case"value":X=h;break;case"defaultValue":w=h;break;case"multiple":v=h;default:h!==M&&rt(e,n,f,h,u,M)}n=w,i=v,u=J,X!=null?Ii(e,!!i,X,!1):!!u!=!!i&&(n!=null?Ii(e,!!i,n,!0):Ii(e,!!i,i?[]:"",!1));return;case"textarea":J=X=null;for(w in i)if(f=i[w],i.hasOwnProperty(w)&&f!=null&&!u.hasOwnProperty(w))switch(w){case"value":break;case"children":break;default:rt(e,n,w,null,u,f)}for(v in u)if(f=u[v],h=i[v],u.hasOwnProperty(v)&&(f!=null||h!=null))switch(v){case"value":X=f;break;case"defaultValue":J=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==h&&rt(e,n,v,f,u,h)}ah(e,X,J);return;case"option":for(var Se in i)X=i[Se],i.hasOwnProperty(Se)&&X!=null&&!u.hasOwnProperty(Se)&&(Se==="selected"?e.selected=!1:rt(e,n,Se,null,u,X));for(M in u)X=u[M],J=i[M],u.hasOwnProperty(M)&&X!==J&&(X!=null||J!=null)&&(M==="selected"?e.selected=X&&typeof X!="function"&&typeof X!="symbol":rt(e,n,M,X,u,J));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 Ne in i)X=i[Ne],i.hasOwnProperty(Ne)&&X!=null&&!u.hasOwnProperty(Ne)&&rt(e,n,Ne,null,u,X);for(Q in u)if(X=u[Q],J=i[Q],u.hasOwnProperty(Q)&&X!==J&&(X!=null||J!=null))switch(Q){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(r(137,n));break;default:rt(e,n,Q,X,u,J)}return;default:if(rs(n)){for(var ut in i)X=i[ut],i.hasOwnProperty(ut)&&X!==void 0&&!u.hasOwnProperty(ut)&&Qc(e,n,ut,void 0,u,X);for(ie in u)X=u[ie],J=i[ie],!u.hasOwnProperty(ie)||X===J||X===void 0&&J===void 0||Qc(e,n,ie,X,u,J);return}}for(var q in i)X=i[q],i.hasOwnProperty(q)&&X!=null&&!u.hasOwnProperty(q)&&rt(e,n,q,null,u,X);for(ue in u)X=u[ue],J=i[ue],!u.hasOwnProperty(ue)||X===J||X==null&&J==null||rt(e,n,ue,X,u,J)}function sg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function hx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),u=0;u<i.length;u++){var f=i[u],h=f.transferSize,v=f.initiatorType,w=f.duration;if(h&&w&&sg(v)){for(v=0,w=f.responseEnd,u+=1;u<i.length;u++){var M=i[u],Q=M.startTime;if(Q>w)break;var ie=M.transferSize,ue=M.initiatorType;ie&&sg(ue)&&(M=M.responseEnd,v+=ie*(M<w?1:(w-Q)/(M-Q)))}if(--u,n+=8*(h+v)/(f.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 Xc=null,$c=null;function lo(e){return e.nodeType===9?e:e.ownerDocument}function cg(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 fg(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Kc(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Zc=null;function mx(){var e=window.event;return e&&e.type==="popstate"?e===Zc?!1:(Zc=e,!0):(Zc=null,!1)}var dg=typeof setTimeout=="function"?setTimeout:void 0,px=typeof clearTimeout=="function"?clearTimeout:void 0,hg=typeof Promise=="function"?Promise:void 0,gx=typeof queueMicrotask=="function"?queueMicrotask:typeof hg<"u"?function(e){return hg.resolve(null).then(e).catch(yx)}:dg;function yx(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function mg(e,n){var i=n,u=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(u===0){e.removeChild(f),wa(n);return}u--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")u++;else if(i==="html")Sr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Sr(i);for(var h=i.firstChild;h;){var v=h.nextSibling,w=h.nodeName;h[gt]||w==="SCRIPT"||w==="STYLE"||w==="LINK"&&h.rel.toLowerCase()==="stylesheet"||i.removeChild(h),h=v}}else i==="body"&&Sr(e.ownerDocument.body);i=f}while(i);wa(n)}function pg(e,n){var i=e;e=0;do{var u=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),u&&u.nodeType===8)if(i=u.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=u}while(i)}function Pc(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Pc(i),vt(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function vx(e,n,i,u){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!u&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(u){if(!e[gt])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=Rn(e.nextSibling),e===null)break}return null}function bx(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Rn(e.nextSibling),e===null))return null;return e}function gg(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Rn(e.nextSibling),e===null))return null;return e}function Jc(e){return e.data==="$?"||e.data==="$~"}function Wc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function xx(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var u=function(){n(),i.removeEventListener("DOMContentLoaded",u)};i.addEventListener("DOMContentLoaded",u),e._reactRetry=u}}function Rn(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 ef=null;function yg(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return Rn(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function vg(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function bg(e,n,i){switch(n=lo(i),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 Sr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);vt(e)}var Nn=new Map,xg=new Set;function io(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var kl=ee.d;ee.d={f:Sx,r:Ex,D:wx,C:kx,L:Cx,m:Tx,X:Ax,S:jx,M:_x};function Sx(){var e=kl.f(),n=Ku();return e||n}function Ex(e){var n=Ie(e);n!==null&&n.tag===5&&n.type==="form"?Um(n):kl.r(e)}var xa=typeof document>"u"?null:document;function Sg(e,n,i){var u=xa;if(u&&typeof n=="string"&&n){var f=wn(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),xg.has(f)||(xg.add(f),e={rel:e,crossOrigin:i,href:n},u.querySelector(f)===null&&(n=u.createElement("link"),Vt(n,"link",e),ht(n),u.head.appendChild(n)))}}function wx(e){kl.D(e),Sg("dns-prefetch",e,null)}function kx(e,n){kl.C(e,n),Sg("preconnect",e,n)}function Cx(e,n,i){kl.L(e,n,i);var u=xa;if(u&&e&&n){var f='link[rel="preload"][as="'+wn(n)+'"]';n==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+wn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+wn(i.imageSizes)+'"]')):f+='[href="'+wn(e)+'"]';var h=f;switch(n){case"style":h=Sa(e);break;case"script":h=Ea(e)}Nn.has(h)||(e=g({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),Nn.set(h,e),u.querySelector(f)!==null||n==="style"&&u.querySelector(Er(h))||n==="script"&&u.querySelector(wr(h))||(n=u.createElement("link"),Vt(n,"link",e),ht(n),u.head.appendChild(n)))}}function Tx(e,n){kl.m(e,n);var i=xa;if(i&&e){var u=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+wn(u)+'"][href="'+wn(e)+'"]',h=f;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Ea(e)}if(!Nn.has(h)&&(e=g({rel:"modulepreload",href:e},n),Nn.set(h,e),i.querySelector(f)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(wr(h)))return}u=i.createElement("link"),Vt(u,"link",e),ht(u),i.head.appendChild(u)}}}function jx(e,n,i){kl.S(e,n,i);var u=xa;if(u&&e){var f=Jt(u).hoistableStyles,h=Sa(e);n=n||"default";var v=f.get(h);if(!v){var w={loading:0,preload:null};if(v=u.querySelector(Er(h)))w.loading=5;else{e=g({rel:"stylesheet",href:e,"data-precedence":n},i),(i=Nn.get(h))&&tf(e,i);var M=v=u.createElement("link");ht(M),Vt(M,"link",e),M._p=new Promise(function(Q,ie){M.onload=Q,M.onerror=ie}),M.addEventListener("load",function(){w.loading|=1}),M.addEventListener("error",function(){w.loading|=2}),w.loading|=4,ao(v,n,u)}v={type:"stylesheet",instance:v,count:1,state:w},f.set(h,v)}}}function Ax(e,n){kl.X(e,n);var i=xa;if(i&&e){var u=Jt(i).hoistableScripts,f=Ea(e),h=u.get(f);h||(h=i.querySelector(wr(f)),h||(e=g({src:e,async:!0},n),(n=Nn.get(f))&&nf(e,n),h=i.createElement("script"),ht(h),Vt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function _x(e,n){kl.M(e,n);var i=xa;if(i&&e){var u=Jt(i).hoistableScripts,f=Ea(e),h=u.get(f);h||(h=i.querySelector(wr(f)),h||(e=g({src:e,async:!0,type:"module"},n),(n=Nn.get(f))&&nf(e,n),h=i.createElement("script"),ht(h),Vt(h,"link",e),i.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},u.set(f,h))}}function Eg(e,n,i,u){var f=(f=be.current)?io(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=Sa(i.href),i=Jt(f).hoistableStyles,u=i.get(n),u||(u={type:"style",instance:null,count:0,state:null},i.set(n,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Sa(i.href);var h=Jt(f).hoistableStyles,v=h.get(e);if(v||(f=f.ownerDocument||f,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,v),(h=f.querySelector(Er(e)))&&!h._p&&(v.instance=h,v.state.loading=5),Nn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Nn.set(e,i),h||Rx(f,e,i,v.state))),n&&u===null)throw Error(r(528,""));return v}if(n&&u!==null)throw Error(r(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Ea(i),i=Jt(f).hoistableScripts,u=i.get(n),u||(u={type:"script",instance:null,count:0,state:null},i.set(n,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Sa(e){return'href="'+wn(e)+'"'}function Er(e){return'link[rel="stylesheet"]['+e+"]"}function wg(e){return g({},e,{"data-precedence":e.precedence,precedence:null})}function Rx(e,n,i,u){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?u.loading=1:(n=e.createElement("link"),u.preload=n,n.addEventListener("load",function(){return u.loading|=1}),n.addEventListener("error",function(){return u.loading|=2}),Vt(n,"link",i),ht(n),e.head.appendChild(n))}function Ea(e){return'[src="'+wn(e)+'"]'}function wr(e){return"script[async]"+e}function kg(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var u=e.querySelector('style[data-href~="'+wn(i.href)+'"]');if(u)return n.instance=u,ht(u),u;var f=g({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return u=(e.ownerDocument||e).createElement("style"),ht(u),Vt(u,"style",f),ao(u,i.precedence,e),n.instance=u;case"stylesheet":f=Sa(i.href);var h=e.querySelector(Er(f));if(h)return n.state.loading|=4,n.instance=h,ht(h),h;u=wg(i),(f=Nn.get(f))&&tf(u,f),h=(e.ownerDocument||e).createElement("link"),ht(h);var v=h;return v._p=new Promise(function(w,M){v.onload=w,v.onerror=M}),Vt(h,"link",u),n.state.loading|=4,ao(h,i.precedence,e),n.instance=h;case"script":return h=Ea(i.src),(f=e.querySelector(wr(h)))?(n.instance=f,ht(f),f):(u=i,(f=Nn.get(h))&&(u=g({},i),nf(u,f)),e=e.ownerDocument||e,f=e.createElement("script"),ht(f),Vt(f,"link",u),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(u=n.instance,n.state.loading|=4,ao(u,i.precedence,e));return n.instance}function ao(e,n,i){for(var u=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=u.length?u[u.length-1]:null,h=f,v=0;v<u.length;v++){var w=u[v];if(w.dataset.precedence===n)h=w;else if(h!==f)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function tf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function nf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var ro=null;function Cg(e,n,i){if(ro===null){var u=new Map,f=ro=new Map;f.set(i,u)}else f=ro,u=f.get(i),u||(u=new Map,f.set(i,u));if(u.has(e))return u;for(u.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var h=i[f];if(!(h[gt]||h[me]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var v=h.getAttribute(n)||"";v=e+v;var w=u.get(v);w?w.push(h):u.set(v,[h])}}return u}function Tg(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function Nx(e,n,i){if(i===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 jg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function zx(e,n,i,u){if(i.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Sa(u.href),h=n.querySelector(Er(f));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=uo.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=h,ht(h);return}h=n.ownerDocument||n,u=wg(u),(f=Nn.get(f))&&tf(u,f),h=h.createElement("link"),ht(h);var v=h;v._p=new Promise(function(w,M){v.onload=w,v.onerror=M}),Vt(h,"link",u),i.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=uo.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var lf=0;function Dx(e,n){return e.stylesheets&&e.count===0&&so(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var u=setTimeout(function(){if(e.stylesheets&&so(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&lf===0&&(lf=62500*hx());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&so(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>lf?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(u),clearTimeout(f)}}:null}function uo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)so(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oo=null;function so(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oo=new Map,n.forEach(Ox,e),oo=null,uo.call(e))}function Ox(e,n){if(!(n.state.loading&4)){var i=oo.get(e);if(i)var u=i.get(null);else{i=new Map,oo.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<f.length;h++){var v=f[h];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),u=v)}u&&i.set(null,u)}f=n.instance,v=f.getAttribute("data-precedence"),h=i.get(v)||u,h===u&&i.set(null,f),i.set(v,f),this.count++,u=uo.bind(this),f.addEventListener("load",u),f.addEventListener("error",u),h?h.parentNode.insertBefore(f,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var kr={$$typeof:D,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function Mx(e,n,i,u,f,h,v,w,M){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=Dl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Dl(0),this.hiddenUpdates=Dl(null),this.identifierPrefix=u,this.onUncaughtError=f,this.onCaughtError=h,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=M,this.incompleteTransitions=new Map}function Ag(e,n,i,u,f,h,v,w,M,Q,ie,ue){return e=new Mx(e,n,i,v,M,Q,ie,ue,w),n=1,h===!0&&(n|=24),h=dn(3,null,null,n),e.current=h,h.stateNode=e,n=Ls(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:u,isDehydrated:i,cache:n},qs(h),e}function _g(e){return e?(e=Wi,e):Wi}function Rg(e,n,i,u,f,h){f=_g(f),u.context===null?u.context=f:u.pendingContext=f,u=Yl(n),u.payload={element:i},h=h===void 0?null:h,h!==null&&(u.callback=h),i=Gl(e,u,n),i!==null&&(an(i,e,n),nr(i,e,n))}function Ng(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function af(e,n){Ng(e,n),(e=e.alternate)&&Ng(e,n)}function zg(e){if(e.tag===13||e.tag===31){var n=Ci(e,67108864);n!==null&&an(n,e,67108864),af(e,67108864)}}function Dg(e){if(e.tag===13||e.tag===31){var n=yn();n=K(n);var i=Ci(e,n);i!==null&&an(i,e,n),af(e,n)}}var co=!0;function Lx(e,n,i,u){var f=U.T;U.T=null;var h=ee.p;try{ee.p=2,rf(e,n,i,u)}finally{ee.p=h,U.T=f}}function Ux(e,n,i,u){var f=U.T;U.T=null;var h=ee.p;try{ee.p=8,rf(e,n,i,u)}finally{ee.p=h,U.T=f}}function rf(e,n,i,u){if(co){var f=uf(u);if(f===null)Ic(e,n,u,fo,i),Mg(e,u);else if(Hx(f,e,n,i,u))u.stopPropagation();else if(Mg(e,u),n&4&&-1<Bx.indexOf(e)){for(;f!==null;){var h=Ie(f);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var v=rl(h.pendingLanes);if(v!==0){var w=h;for(w.pendingLanes|=2,w.entangledLanes|=2;v;){var M=1<<31-tt(v);w.entanglements[1]|=M,v&=~M}Zn(h),(et&6)===0&&(Xu=pt()+500,vr(0))}}break;case 31:case 13:w=Ci(h,2),w!==null&&an(w,h,2),Ku(),af(h,2)}if(h=uf(u),h===null&&Ic(e,n,u,fo,i),h===f)break;f=h}f!==null&&u.stopPropagation()}else Ic(e,n,u,null,i)}}function uf(e){return e=os(e),of(e)}var fo=null;function of(e){if(fo=null,e=bt(e),e!==null){var n=s(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=c(n),e!==null)return e;e=null}else if(i===31){if(e=d(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return fo=e,null}function Og(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(il()){case ae:return 2;case de:return 8;case Ce:case ze:return 32;case Pe:return 268435456;default:return 32}default:return 32}}var sf=!1,Wl=null,ei=null,ti=null,Cr=new Map,Tr=new Map,ni=[],Bx="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 Mg(e,n){switch(e){case"focusin":case"focusout":Wl=null;break;case"dragenter":case"dragleave":ei=null;break;case"mouseover":case"mouseout":ti=null;break;case"pointerover":case"pointerout":Cr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Tr.delete(n.pointerId)}}function jr(e,n,i,u,f,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:i,eventSystemFlags:u,nativeEvent:h,targetContainers:[f]},n!==null&&(n=Ie(n),n!==null&&zg(n)),e):(e.eventSystemFlags|=u,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function Hx(e,n,i,u,f){switch(n){case"focusin":return Wl=jr(Wl,e,n,i,u,f),!0;case"dragenter":return ei=jr(ei,e,n,i,u,f),!0;case"mouseover":return ti=jr(ti,e,n,i,u,f),!0;case"pointerover":var h=f.pointerId;return Cr.set(h,jr(Cr.get(h)||null,e,n,i,u,f)),!0;case"gotpointercapture":return h=f.pointerId,Tr.set(h,jr(Tr.get(h)||null,e,n,i,u,f)),!0}return!1}function Lg(e){var n=bt(e.target);if(n!==null){var i=s(n);if(i!==null){if(n=i.tag,n===13){if(n=c(i),n!==null){e.blockedOn=n,ke(e.priority,function(){Dg(i)});return}}else if(n===31){if(n=d(i),n!==null){e.blockedOn=n,ke(e.priority,function(){Dg(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ho(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=uf(e.nativeEvent);if(i===null){i=e.nativeEvent;var u=new i.constructor(i.type,i);us=u,i.target.dispatchEvent(u),us=null}else return n=Ie(i),n!==null&&zg(n),e.blockedOn=i,!1;n.shift()}return!0}function Ug(e,n,i){ho(e)&&i.delete(n)}function qx(){sf=!1,Wl!==null&&ho(Wl)&&(Wl=null),ei!==null&&ho(ei)&&(ei=null),ti!==null&&ho(ti)&&(ti=null),Cr.forEach(Ug),Tr.forEach(Ug)}function mo(e,n){e.blockedOn===n&&(e.blockedOn=null,sf||(sf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qx)))}var po=null;function Bg(e){po!==e&&(po=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){po===e&&(po=null);for(var n=0;n<e.length;n+=3){var i=e[n],u=e[n+1],f=e[n+2];if(typeof u!="function"){if(of(u||i)===null)continue;break}var h=Ie(i);h!==null&&(e.splice(n,3),n-=3,rc(h,{pending:!0,data:f,method:i.method,action:u},u,f))}}))}function wa(e){function n(M){return mo(M,e)}Wl!==null&&mo(Wl,e),ei!==null&&mo(ei,e),ti!==null&&mo(ti,e),Cr.forEach(n),Tr.forEach(n);for(var i=0;i<ni.length;i++){var u=ni[i];u.blockedOn===e&&(u.blockedOn=null)}for(;0<ni.length&&(i=ni[0],i.blockedOn===null);)Lg(i),i.blockedOn===null&&ni.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(u=0;u<i.length;u+=3){var f=i[u],h=i[u+1],v=f[ye]||null;if(typeof h=="function")v||Bg(i);else if(v){var w=null;if(h&&h.hasAttribute("formAction")){if(f=h,v=h[ye]||null)w=v.formAction;else if(of(f)!==null)continue}else w=v.action;typeof w=="function"?i[u+1]=w:(i.splice(u,3),u-=3),Bg(i)}}}function Hg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(v){return f=v})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),u||setTimeout(i,20)}function i(){if(!u&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){u=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function cf(e){this._internalRoot=e}go.prototype.render=cf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var i=n.current,u=yn();Rg(i,u,e,n,null,null)},go.prototype.unmount=cf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Rg(e.current,2,null,e,null,null),Ku(),n[we]=null}};function go(e){this._internalRoot=e}go.prototype.unstable_scheduleHydration=function(e){if(e){var n=he();e={blockedOn:null,target:e,priority:n};for(var i=0;i<ni.length&&n!==0&&n<ni[i].priority;i++);ni.splice(i,0,e),i===0&&Lg(e)}};var qg=l.version;if(qg!=="19.2.4")throw Error(r(527,qg,"19.2.4"));ee.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var Yx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yo.isDisabled&&yo.supportsFiber)try{Ut=yo.inject(Yx),nt=yo}catch{}}return _r.createRoot=function(e,n){if(!o(e))throw Error(r(299));var i=!1,u="",f=Xm,h=$m,v=Km;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(u=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=Ag(e,1,!1,null,null,i,u,null,f,h,v,Hg),e[we]=n.current,Fc(e),new cf(n)},_r.hydrateRoot=function(e,n,i){if(!o(e))throw Error(r(299));var u=!1,f="",h=Xm,v=$m,w=Km,M=null;return i!=null&&(i.unstable_strictMode===!0&&(u=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(h=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(w=i.onRecoverableError),i.formState!==void 0&&(M=i.formState)),n=Ag(e,1,!0,n,i??null,u,f,M,h,v,w,Hg),n.context=_g(null),i=n.current,u=yn(),u=K(u),f=Yl(u),f.callback=null,Gl(i,f,u),i=u,n.current.lanes=i,Ol(n,i),Zn(n),e[we]=n.current,Fc(e),new go(n)},_r.version="19.2.4",_r}var Zg;function Wx(){if(Zg)return hf.exports;Zg=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(l){console.error(l)}}return t(),hf.exports=Jx(),hf.exports}var eS=Wx();var kv=t=>{throw TypeError(t)},tS=(t,l,a)=>l.has(t)||kv("Cannot "+a),yf=(t,l,a)=>(tS(t,l,"read from private field"),a?a.call(t):l.get(t)),nS=(t,l,a)=>l.has(t)?kv("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,a),Pg="popstate";function lS(t={}){function l(r,o){let{pathname:s,search:c,hash:d}=r.location;return Vr("",{pathname:s,search:c,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default")}function a(r,o){return typeof o=="string"?o:el(o)}return aS(l,a,null,t)}function Be(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function Rt(t,l){if(!t){typeof console<"u"&&console.warn(l);try{throw new Error(l)}catch{}}}function iS(){return Math.random().toString(36).substring(2,10)}function Jg(t,l){return{usr:t.state,key:t.key,idx:l}}function Vr(t,l,a=null,r){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof l=="string"?fi(l):l,state:a,key:l&&l.key||r||iS()}}function el({pathname:t="/",search:l="",hash:a=""}){return l&&l!=="?"&&(t+=l.charAt(0)==="?"?l:"?"+l),a&&a!=="#"&&(t+=a.charAt(0)==="#"?a:"#"+a),t}function fi(t){let l={};if(t){let a=t.indexOf("#");a>=0&&(l.hash=t.substring(a),t=t.substring(0,a));let r=t.indexOf("?");r>=0&&(l.search=t.substring(r),t=t.substring(0,r)),t&&(l.pathname=t)}return l}function aS(t,l,a,r={}){let{window:o=document.defaultView,v5Compat:s=!1}=r,c=o.history,d="POP",p=null,m=y();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function y(){return(c.state||{idx:null}).idx}function g(){d="POP";let N=y(),C=N==null?null:N-m;m=N,p&&p({action:d,location:j.location,delta:C})}function b(N,C){d="PUSH";let A=Vr(j.location,N,C);m=y()+1;let D=Jg(A,m),te=j.createHref(A);try{c.pushState(D,"",te)}catch(P){if(P instanceof DOMException&&P.name==="DataCloneError")throw P;o.location.assign(te)}s&&p&&p({action:d,location:j.location,delta:1})}function S(N,C){d="REPLACE";let A=Vr(j.location,N,C);m=y();let D=Jg(A,m),te=j.createHref(A);c.replaceState(D,"",te),s&&p&&p({action:d,location:j.location,delta:0})}function E(N){return Cv(N)}let j={get action(){return d},get location(){return t(o,c)},listen(N){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Pg,g),p=N,()=>{o.removeEventListener(Pg,g),p=null}},createHref(N){return l(o,N)},createURL:E,encodeLocation(N){let C=E(N);return{pathname:C.pathname,search:C.search,hash:C.hash}},push:b,replace:S,go(N){return c.go(N)}};return j}function Cv(t,l=!1){let a="http://localhost";typeof window<"u"&&(a=window.location.origin!=="null"?window.location.origin:window.location.href),Be(a,"No window.location.(origin|href) available to create URL");let r=typeof t=="string"?t:el(t);return r=r.replace(/ $/,"%20"),!l&&r.startsWith("//")&&(r=a+r),new URL(r,a)}var Ur,Wg=class{constructor(t){if(nS(this,Ur,new Map),t)for(let[l,a]of t)this.set(l,a)}get(t){if(yf(this,Ur).has(t))return yf(this,Ur).get(t);if(t.defaultValue!==void 0)return t.defaultValue;throw new Error("No value found for context")}set(t,l){yf(this,Ur).set(t,l)}};Ur=new WeakMap;var rS=new Set(["lazy","caseSensitive","path","id","index","children"]);function uS(t){return rS.has(t)}var oS=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function sS(t){return oS.has(t)}function cS(t){return t.index===!0}function Fr(t,l,a=[],r={},o=!1){return t.map((s,c)=>{let d=[...a,String(c)],p=typeof s.id=="string"?s.id:d.join("-");if(Be(s.index!==!0||!s.children,"Cannot specify children on an index route"),Be(o||!r[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),cS(s)){let m={...s,id:p};return r[p]=ey(m,l(m)),m}else{let m={...s,id:p,children:void 0};return r[p]=ey(m,l(m)),s.children&&(m.children=Fr(s.children,l,d,r,o)),m}})}function ey(t,l){return Object.assign(t,{...l,...typeof l.lazy=="object"&&l.lazy!=null?{lazy:{...t.lazy,...l.lazy}}:{}})}function ri(t,l,a="/"){return Br(t,l,a,!1)}function Br(t,l,a,r){let o=typeof l=="string"?fi(l):l,s=On(o.pathname||"/",a);if(s==null)return null;let c=Tv(t);dS(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let m=wS(s);d=SS(c[p],m,r)}return d}function fS(t,l){let{route:a,pathname:r,params:o}=t;return{id:a.id,pathname:r,params:o,data:l[a.id],loaderData:l[a.id],handle:a.handle}}function Tv(t,l=[],a=[],r="",o=!1){let s=(c,d,p=o,m)=>{let y={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(r)&&p)return;Be(y.relativePath.startsWith(r),`Absolute route path "${y.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(r.length)}let g=Wn([r,y.relativePath]),b=a.concat(y);c.children&&c.children.length>0&&(Be(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Tv(c.children,l,b,g,p)),!(c.path==null&&!c.index)&&l.push({path:g,score:bS(g,c.index),routesMeta:b})};return t.forEach((c,d)=>{if(c.path===""||!c.path?.includes("?"))s(c,d);else for(let p of jv(c.path))s(c,d,!0,p)}),l}function jv(t){let l=t.split("/");if(l.length===0)return[];let[a,...r]=l,o=a.endsWith("?"),s=a.replace(/\?$/,"");if(r.length===0)return o?[s,""]:[s];let c=jv(r.join("/")),d=[];return d.push(...c.map(p=>p===""?s:[s,p].join("/"))),o&&d.push(...c),d.map(p=>t.startsWith("/")&&p===""?"/":p)}function dS(t){t.sort((l,a)=>l.score!==a.score?a.score-l.score:xS(l.routesMeta.map(r=>r.childrenIndex),a.routesMeta.map(r=>r.childrenIndex)))}var hS=/^:[\w-]+$/,mS=3,pS=2,gS=1,yS=10,vS=-2,ty=t=>t==="*";function bS(t,l){let a=t.split("/"),r=a.length;return a.some(ty)&&(r+=vS),l&&(r+=pS),a.filter(o=>!ty(o)).reduce((o,s)=>o+(hS.test(s)?mS:s===""?gS:yS),r)}function xS(t,l){return t.length===l.length&&t.slice(0,-1).every((r,o)=>r===l[o])?t[t.length-1]-l[l.length-1]:0}function SS(t,l,a=!1){let{routesMeta:r}=t,o={},s="/",c=[];for(let d=0;d<r.length;++d){let p=r[d],m=d===r.length-1,y=s==="/"?l:l.slice(s.length)||"/",g=Mo({path:p.relativePath,caseSensitive:p.caseSensitive,end:m},y),b=p.route;if(!g&&m&&a&&!r[r.length-1].route.index&&(g=Mo({path:p.relativePath,caseSensitive:p.caseSensitive,end:!1},y)),!g)return null;Object.assign(o,g.params),c.push({params:o,pathname:Wn([s,g.pathname]),pathnameBase:TS(Wn([s,g.pathnameBase])),route:b}),g.pathnameBase!=="/"&&(s=Wn([s,g.pathnameBase]))}return c}function Mo(t,l){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[a,r]=ES(t.path,t.caseSensitive,t.end),o=l.match(a);if(!o)return null;let s=o[0],c=s.replace(/(.)\/+$/,"$1"),d=o.slice(1);return{params:r.reduce((m,{paramName:y,isOptional:g},b)=>{if(y==="*"){let E=d[b]||"";c=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const S=d[b];return g&&!S?m[y]=void 0:m[y]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:s,pathnameBase:c,pattern:t}}function ES(t,l=!1,a=!0){Rt(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let r=[],o="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,d,p)=>(r.push({paramName:d,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(r.push({paramName:"*"}),o+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):a?o+="\\/*$":t!==""&&t!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,l?void 0:"i"),r]}function wS(t){try{return t.split("/").map(l=>decodeURIComponent(l).replace(/\//g,"%2F")).join("/")}catch(l){return Rt(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${l}).`),t}}function On(t,l){if(l==="/")return t;if(!t.toLowerCase().startsWith(l.toLowerCase()))return null;let a=l.endsWith("/")?l.length-1:l.length,r=t.charAt(a);return r&&r!=="/"?null:t.slice(a)||"/"}function kS({basename:t,pathname:l}){return l==="/"?t:Wn([t,l])}var Av=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,gd=t=>Av.test(t);function CS(t,l="/"){let{pathname:a,search:r="",hash:o=""}=typeof t=="string"?fi(t):t,s;return a?(a=a.replace(/\/\/+/g,"/"),a.startsWith("/")?s=ny(a.substring(1),"/"):s=ny(a,l)):s=l,{pathname:s,search:jS(r),hash:AS(o)}}function ny(t,l){let a=l.replace(/\/+$/,"").split("/");return t.split("/").forEach(o=>{o===".."?a.length>1&&a.pop():o!=="."&&a.push(o)}),a.length>1?a.join("/"):"/"}function vf(t,l,a,r){return`Cannot include a '${t}' character in a manually specified \`to.${l}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${a}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _v(t){return t.filter((l,a)=>a===0||l.route.path&&l.route.path.length>0)}function yd(t){let l=_v(t);return l.map((a,r)=>r===l.length-1?a.pathname:a.pathnameBase)}function vd(t,l,a,r=!1){let o;typeof t=="string"?o=fi(t):(o={...t},Be(!o.pathname||!o.pathname.includes("?"),vf("?","pathname","search",o)),Be(!o.pathname||!o.pathname.includes("#"),vf("#","pathname","hash",o)),Be(!o.search||!o.search.includes("#"),vf("#","search","hash",o)));let s=t===""||o.pathname==="",c=s?"/":o.pathname,d;if(c==null)d=a;else{let g=l.length-1;if(!r&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),g-=1;o.pathname=b.join("/")}d=g>=0?l[g]:"/"}let p=CS(o,d),m=c&&c!=="/"&&c.endsWith("/"),y=(s||c===".")&&a.endsWith("/");return!p.pathname.endsWith("/")&&(m||y)&&(p.pathname+="/"),p}var Wn=t=>t.join("/").replace(/\/\/+/g,"/"),TS=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),jS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,AS=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,$r=class{constructor(t,l,a,r=!1){this.status=t,this.statusText=l||"",this.internal=r,a instanceof Error?(this.data=a.toString(),this.error=a):this.data=a}};function Ir(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function Kr(t){return t.map(l=>l.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Rv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Nv(t,l){let a=t;if(typeof a!="string"||!Av.test(a))return{absoluteURL:void 0,isExternal:!1,to:a};let r=a,o=!1;if(Rv)try{let s=new URL(window.location.href),c=a.startsWith("//")?new URL(s.protocol+a):new URL(a),d=On(c.pathname,l);c.origin===s.origin&&d!=null?a=d+c.search+c.hash:o=!0}catch{Rt(!1,`<Link to="${a}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:o,to:a}}var si=Symbol("Uninstrumented");function _S(t,l){let a={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};t.forEach(o=>o({id:l.id,index:l.index,path:l.path,instrument(s){let c=Object.keys(a);for(let d of c)s[d]&&a[d].push(s[d])}}));let r={};if(typeof l.lazy=="function"&&a.lazy.length>0){let o=Aa(a.lazy,l.lazy,()=>{});o&&(r.lazy=o)}if(typeof l.lazy=="object"){let o=l.lazy;["middleware","loader","action"].forEach(s=>{let c=o[s],d=a[`lazy.${s}`];if(typeof c=="function"&&d.length>0){let p=Aa(d,c,()=>{});p&&(r.lazy=Object.assign(r.lazy||{},{[s]:p}))}})}return["loader","action"].forEach(o=>{let s=l[o];if(typeof s=="function"&&a[o].length>0){let c=s[si]??s,d=Aa(a[o],c,(...p)=>ly(p[0]));d&&(o==="loader"&&c.hydrate===!0&&(d.hydrate=!0),d[si]=c,r[o]=d)}}),l.middleware&&l.middleware.length>0&&a.middleware.length>0&&(r.middleware=l.middleware.map(o=>{let s=o[si]??o,c=Aa(a.middleware,s,(...d)=>ly(d[0]));return c?(c[si]=s,c):o})),r}function RS(t,l){let a={navigate:[],fetch:[]};if(l.forEach(r=>r({instrument(o){let s=Object.keys(o);for(let c of s)o[c]&&a[c].push(o[c])}})),a.navigate.length>0){let r=t.navigate[si]??t.navigate,o=Aa(a.navigate,r,(...s)=>{let[c,d]=s;return{to:typeof c=="number"||typeof c=="string"?c:c?el(c):".",...iy(t,d??{})}});o&&(o[si]=r,t.navigate=o)}if(a.fetch.length>0){let r=t.fetch[si]??t.fetch,o=Aa(a.fetch,r,(...s)=>{let[c,,d,p]=s;return{href:d??".",fetcherKey:c,...iy(t,p??{})}});o&&(o[si]=r,t.fetch=o)}return t}function Aa(t,l,a){return t.length===0?null:async(...r)=>{let o=await zv(t,a(...r),()=>l(...r),t.length-1);if(o.type==="error")throw o.value;return o.value}}async function zv(t,l,a,r){let o=t[r],s;if(o){let c,d=async()=>(c?console.error("You cannot call instrumented handlers more than once"):c=zv(t,l,a,r-1),s=await c,Be(s,"Expected a result"),s.type==="error"&&s.value instanceof Error?{status:"error",error:s.value}:{status:"success",error:void 0});try{await o(d,l)}catch(p){console.error("An instrumentation function threw an error:",p)}c||await d(),await c}else try{s={type:"success",value:await a()}}catch(c){s={type:"error",value:c}}return s||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function ly(t){let{request:l,context:a,params:r,unstable_pattern:o}=t;return{request:NS(l),params:{...r},unstable_pattern:o,context:zS(a)}}function iy(t,l){return{currentUrl:el(t.state.location),..."formMethod"in l?{formMethod:l.formMethod}:{},..."formEncType"in l?{formEncType:l.formEncType}:{},..."formData"in l?{formData:l.formData}:{},..."body"in l?{body:l.body}:{}}}function NS(t){return{method:t.method,url:t.url,headers:{get:(...l)=>t.headers.get(...l)}}}function zS(t){if(OS(t)){let l={...t};return Object.freeze(l),l}else return{get:l=>t.get(l)}}var DS=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function OS(t){if(t===null||typeof t!="object")return!1;const l=Object.getPrototypeOf(t);return l===Object.prototype||l===null||Object.getOwnPropertyNames(l).sort().join("\0")===DS}var Dv=["POST","PUT","PATCH","DELETE"],MS=new Set(Dv),LS=["GET",...Dv],US=new Set(LS),Ov=new Set([301,302,303,307,308]),BS=new Set([307,308]),bf={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},HS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Rr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},qS=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Mv="remix-router-transitions",Lv=Symbol("ResetLoaderData");function YS(t){const l=t.window?t.window:typeof window<"u"?window:void 0,a=typeof l<"u"&&typeof l.document<"u"&&typeof l.document.createElement<"u";Be(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let r=t.hydrationRouteProperties||[],o=t.mapRouteProperties||qS,s=o;if(t.unstable_instrumentations){let O=t.unstable_instrumentations;s=Y=>({...o(Y),..._S(O.map(K=>K.route).filter(Boolean),Y)})}let c={},d=Fr(t.routes,s,void 0,c),p,m=t.basename||"/";m.startsWith("/")||(m=`/${m}`);let y=t.dataStrategy||QS,g={...t.future},b=null,S=new Set,E=null,j=null,N=null,C=t.hydrationData!=null,A=ri(d,t.history.location,m),D=!1,te=null,P;if(A==null&&!t.patchRoutesOnNavigation){let O=zn(404,{pathname:t.history.location.pathname}),{matches:Y,route:K}=vo(d);P=!0,A=Y,te={[K.id]:O}}else if(A&&!t.hydrationData&&vi(A,d,t.history.location.pathname).active&&(A=null),A)if(A.some(O=>O.route.lazy))P=!1;else if(!A.some(O=>bd(O.route)))P=!0;else{let O=t.hydrationData?t.hydrationData.loaderData:null,Y=t.hydrationData?t.hydrationData.errors:null;if(Y){let K=A.findIndex(oe=>Y[oe.route.id]!==void 0);P=A.slice(0,K+1).every(oe=>!Ff(oe.route,O,Y))}else P=A.every(K=>!Ff(K.route,O,Y))}else{P=!1,A=[];let O=vi(null,d,t.history.location.pathname);O.active&&O.matches&&(D=!0,A=O.matches)}let H,_={historyAction:t.history.action,location:t.history.location,matches:A,initialized:P,navigation:bf,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||te,fetchers:new Map,blockers:new Map},ne="POP",W=null,R=!1,V,G=!1,F=new Map,le=null,$=!1,U=!1,ee=new Set,se=new Map,xe=0,z=-1,L=new Map,Z=new Set,T=new Map,ce=new Map,ve=new Set,be=new Map,De,pe=null;function Re(){if(b=t.history.listen(({action:O,location:Y,delta:K})=>{if(De){De(),De=void 0;return}Rt(be.size===0||K!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let oe=pi({currentLocation:_.location,nextLocation:Y,historyAction:O});if(oe&&K!=null){let he=new Promise(ke=>{De=ke});t.history.go(K*-1),al(oe,{state:"blocked",location:Y,proceed(){al(oe,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),he.then(()=>t.history.go(K))},reset(){let ke=new Map(_.blockers);ke.set(oe,Rr),yt({blockers:ke})}}),W?.resolve(),W=null;return}return Pt(O,Y)}),a){cE(l,F);let O=()=>fE(l,F);l.addEventListener("pagehide",O),le=()=>l.removeEventListener("pagehide",O)}return _.initialized||Pt("POP",_.location,{initialHydration:!0}),H}function Nt(){b&&b(),le&&le(),S.clear(),V&&V.abort(),_.fetchers.forEach((O,Y)=>on(Y)),_.blockers.forEach((O,Y)=>lu(Y))}function Ln(O){return S.add(O),()=>S.delete(O)}function yt(O,Y={}){O.matches&&(O.matches=O.matches.map(he=>{let ke=c[he.route.id],ge=he.route;return ge.element!==ke.element||ge.errorElement!==ke.errorElement||ge.hydrateFallbackElement!==ke.hydrateFallbackElement?{...he,route:ke}:he})),_={..._,...O};let K=[],oe=[];_.fetchers.forEach((he,ke)=>{he.state==="idle"&&(ve.has(ke)?K.push(ke):oe.push(ke))}),ve.forEach(he=>{!_.fetchers.has(he)&&!se.has(he)&&K.push(he)}),[...S].forEach(he=>he(_,{deletedFetchers:K,newErrors:O.errors??null,viewTransitionOpts:Y.viewTransitionOpts,flushSync:Y.flushSync===!0})),K.forEach(he=>on(he)),oe.forEach(he=>_.fetchers.delete(he))}function Un(O,Y,{flushSync:K}={}){let oe=_.actionData!=null&&_.navigation.formMethod!=null&&It(_.navigation.formMethod)&&_.navigation.state==="loading"&&O.state?._isRedirect!==!0,he;Y.actionData?Object.keys(Y.actionData).length>0?he=Y.actionData:he=null:oe?he=_.actionData:he=null;let ke=Y.loaderData?my(_.loaderData,Y.loaderData,Y.matches||[],Y.errors):_.loaderData,ge=_.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((Ae,Te)=>ge.set(Te,Rr)));let me=$?!1:iu(O,Y.matches||_.matches),ye=R===!0||_.navigation.formMethod!=null&&It(_.navigation.formMethod)&&O.state?._isRedirect!==!0;p&&(d=p,p=void 0),$||ne==="POP"||(ne==="PUSH"?t.history.push(O,O.state):ne==="REPLACE"&&t.history.replace(O,O.state));let we;if(ne==="POP"){let Ae=F.get(_.location.pathname);Ae&&Ae.has(O.pathname)?we={currentLocation:_.location,nextLocation:O}:F.has(O.pathname)&&(we={currentLocation:O,nextLocation:_.location})}else if(G){let Ae=F.get(_.location.pathname);Ae?Ae.add(O.pathname):(Ae=new Set([O.pathname]),F.set(_.location.pathname,Ae)),we={currentLocation:_.location,nextLocation:O}}yt({...Y,actionData:he,loaderData:ke,historyAction:ne,location:O,initialized:!0,navigation:bf,revalidation:"idle",restoreScrollPosition:me,preventScrollReset:ye,blockers:ge},{viewTransitionOpts:we,flushSync:K===!0}),ne="POP",R=!1,G=!1,$=!1,U=!1,W?.resolve(),W=null,pe?.resolve(),pe=null}async function Sn(O,Y){if(W?.resolve(),W=null,typeof O=="number"){W||(W=vy());let Fe=W.promise;return t.history.go(O),Fe}let K=Vf(_.location,_.matches,m,O,Y?.fromRouteId,Y?.relative),{path:oe,submission:he,error:ke}=ay(!1,K,Y),ge=_.location,me=Vr(_.location,oe,Y&&Y.state);me={...me,...t.history.encodeLocation(me)};let ye=Y&&Y.replace!=null?Y.replace:void 0,we="PUSH";ye===!0?we="REPLACE":ye===!1||he!=null&&It(he.formMethod)&&he.formAction===_.location.pathname+_.location.search&&(we="REPLACE");let Ae=Y&&"preventScrollReset"in Y?Y.preventScrollReset===!0:void 0,Te=(Y&&Y.flushSync)===!0,Ke=pi({currentLocation:ge,nextLocation:me,historyAction:we});if(Ke){al(Ke,{state:"blocked",location:me,proceed(){al(Ke,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),Sn(O,Y)},reset(){let Fe=new Map(_.blockers);Fe.set(Ke,Rr),yt({blockers:Fe})}});return}await Pt(we,me,{submission:he,pendingError:ke,preventScrollReset:Ae,replace:Y&&Y.replace,enableViewTransition:Y&&Y.viewTransition,flushSync:Te,callSiteDefaultShouldRevalidate:Y&&Y.unstable_defaultShouldRevalidate})}function Rl(){pe||(pe=vy()),de(),yt({revalidation:"loading"});let O=pe.promise;return _.navigation.state==="submitting"?O:_.navigation.state==="idle"?(Pt(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),O):(Pt(ne||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:G===!0}),O)}async function Pt(O,Y,K){V&&V.abort(),V=null,ne=O,$=(K&&K.startUninterruptedRevalidation)===!0,yi(_.location,_.matches),R=(K&&K.preventScrollReset)===!0,G=(K&&K.enableViewTransition)===!0;let oe=p||d,he=K&&K.overrideNavigation,ke=K?.initialHydration&&_.matches&&_.matches.length>0&&!D?_.matches:ri(oe,Y,m),ge=(K&&K.flushSync)===!0;if(ke&&_.initialized&&!U&&eE(_.location,Y)&&!(K&&K.submission&&It(K.submission.formMethod))){Un(Y,{matches:ke},{flushSync:ge});return}let me=vi(ke,oe,Y.pathname);if(me.active&&me.matches&&(ke=me.matches),!ke){let{error:vt,notFoundMatches:bt,route:Ie}=zl(Y.pathname);Un(Y,{matches:bt,loaderData:{},errors:{[Ie.id]:vt}},{flushSync:ge});return}V=new AbortController;let ye=Ta(t.history,Y,V.signal,K&&K.submission),we=t.getContext?await t.getContext():new Wg,Ae;if(K&&K.pendingError)Ae=[ui(ke).route.id,{type:"error",error:K.pendingError}];else if(K&&K.submission&&It(K.submission.formMethod)){let vt=await Vi(ye,Y,K.submission,ke,we,me.active,K&&K.initialHydration===!0,{replace:K.replace,flushSync:ge});if(vt.shortCircuited)return;if(vt.pendingActionResult){let[bt,Ie]=vt.pendingActionResult;if(bn(Ie)&&Ir(Ie.error)&&Ie.error.status===404){V=null,Un(Y,{matches:vt.matches,loaderData:{},errors:{[bt]:Ie.error}});return}}ke=vt.matches||ke,Ae=vt.pendingActionResult,he=xf(Y,K.submission),ge=!1,me.active=!1,ye=Ta(t.history,ye.url,ye.signal)}let{shortCircuited:Te,matches:Ke,loaderData:Fe,errors:gt}=await Fi(ye,Y,ke,we,me.active,he,K&&K.submission,K&&K.fetcherSubmission,K&&K.replace,K&&K.initialHydration===!0,ge,Ae,K&&K.callSiteDefaultShouldRevalidate);Te||(V=null,Un(Y,{matches:Ke||ke,...py(Ae),loaderData:Fe,errors:gt}))}async function Vi(O,Y,K,oe,he,ke,ge,me={}){de();let ye=oE(Y,K);if(yt({navigation:ye},{flushSync:me.flushSync===!0}),ke){let Te=await Dl(oe,Y.pathname,O.signal);if(Te.type==="aborted")return{shortCircuited:!0};if(Te.type==="error"){if(Te.partialMatches.length===0){let{matches:Fe,route:gt}=vo(d);return{matches:Fe,pendingActionResult:[gt.id,{type:"error",error:Te.error}]}}let Ke=ui(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ke,{type:"error",error:Te.error}]}}else if(Te.matches)oe=Te.matches;else{let{notFoundMatches:Ke,error:Fe,route:gt}=zl(Y.pathname);return{matches:Ke,pendingActionResult:[gt.id,{type:"error",error:Fe}]}}}let we,Ae=_o(oe,Y);if(!Ae.route.action&&!Ae.route.lazy)we={type:"error",error:zn(405,{method:O.method,pathname:Y.pathname,routeId:Ae.route.id})};else{let Te=_a(s,c,O,oe,Ae,ge?[]:r,he),Ke=await il(O,Te,he,null);if(we=Ke[Ae.route.id],!we){for(let Fe of oe)if(Ke[Fe.route.id]){we=Ke[Fe.route.id];break}}if(O.signal.aborted)return{shortCircuited:!0}}if(Hi(we)){let Te;return me&&me.replace!=null?Te=me.replace:Te=fy(we.response.headers.get("Location"),new URL(O.url),m,t.history)===_.location.pathname+_.location.search,await pt(O,we,!0,{submission:K,replace:Te}),{shortCircuited:!0}}if(bn(we)){let Te=ui(oe,Ae.route.id);return(me&&me.replace)!==!0&&(ne="PUSH"),{matches:oe,pendingActionResult:[Te.route.id,we,Ae.route.id]}}return{matches:oe,pendingActionResult:[Ae.route.id,we]}}async function Fi(O,Y,K,oe,he,ke,ge,me,ye,we,Ae,Te,Ke){let Fe=ke||xf(Y,ge),gt=ge||me||yy(Fe),vt=!$&&!we;if(he){if(vt){let Et=ll(Te);yt({navigation:Fe,...Et!==void 0?{actionData:Et}:{}},{flushSync:Ae})}let Qe=await Dl(K,Y.pathname,O.signal);if(Qe.type==="aborted")return{shortCircuited:!0};if(Qe.type==="error"){if(Qe.partialMatches.length===0){let{matches:Yn,route:Ht}=vo(d);return{matches:Yn,loaderData:{},errors:{[Ht.id]:Qe.error}}}let Et=ui(Qe.partialMatches).route.id;return{matches:Qe.partialMatches,loaderData:{},errors:{[Et]:Qe.error}}}else if(Qe.matches)K=Qe.matches;else{let{error:Et,notFoundMatches:Yn,route:Ht}=zl(Y.pathname);return{matches:Yn,loaderData:{},errors:{[Ht.id]:Et}}}}let bt=p||d,{dsMatches:Ie,revalidatingFetchers:Ot}=ry(O,oe,s,c,t.history,_,K,gt,Y,we?[]:r,we===!0,U,ee,ve,T,Z,bt,m,t.patchRoutesOnNavigation!=null,Te,Ke);if(z=++xe,!t.dataStrategy&&!Ie.some(Qe=>Qe.shouldLoad)&&!Ie.some(Qe=>Qe.route.middleware&&Qe.route.middleware.length>0)&&Ot.length===0){let Qe=tt();return Un(Y,{matches:K,loaderData:{},errors:Te&&bn(Te[1])?{[Te[0]]:Te[1].error}:null,...py(Te),...Qe?{fetchers:new Map(_.fetchers)}:{}},{flushSync:Ae}),{shortCircuited:!0}}if(vt){let Qe={};if(!he){Qe.navigation=Fe;let Et=ll(Te);Et!==void 0&&(Qe.actionData=Et)}Ot.length>0&&(Qe.fetchers=Nl(Ot)),yt(Qe,{flushSync:Ae})}Ot.forEach(Qe=>{nt(Qe.key),Qe.controller&&se.set(Qe.key,Qe.controller)});let Jt=()=>Ot.forEach(Qe=>nt(Qe.key));V&&V.signal.addEventListener("abort",Jt);let{loaderResults:ht,fetcherResults:Hn}=await ae(Ie,Ot,O,oe);if(O.signal.aborted)return{shortCircuited:!0};V&&V.signal.removeEventListener("abort",Jt),Ot.forEach(Qe=>se.delete(Qe.key));let cn=bo(ht);if(cn)return await pt(O,cn.result,!0,{replace:ye}),{shortCircuited:!0};if(cn=bo(Hn),cn)return Z.add(cn.key),await pt(O,cn.result,!0,{replace:ye}),{shortCircuited:!0};let{loaderData:qn,errors:En}=hy(_,K,ht,Te,Ot,Hn);we&&_.errors&&(En={..._.errors,...En});let ul=tt(),bi=Bn(z),xi=ul||bi||Ot.length>0;return{matches:K,loaderData:qn,errors:En,...xi?{fetchers:new Map(_.fetchers)}:{}}}function ll(O){if(O&&!bn(O[1]))return{[O[0]]:O[1].data};if(_.actionData)return Object.keys(_.actionData).length===0?null:_.actionData}function Nl(O){return O.forEach(Y=>{let K=_.fetchers.get(Y.key),oe=Nr(void 0,K?K.data:void 0);_.fetchers.set(Y.key,oe)}),new Map(_.fetchers)}async function mi(O,Y,K,oe){nt(O);let he=(oe&&oe.flushSync)===!0,ke=p||d,ge=Vf(_.location,_.matches,m,K,Y,oe?.relative),me=ri(ke,ge,m),ye=vi(me,ke,ge);if(ye.active&&ye.matches&&(me=ye.matches),!me){ze(O,Y,zn(404,{pathname:ge}),{flushSync:he});return}let{path:we,submission:Ae,error:Te}=ay(!0,ge,oe);if(Te){ze(O,Y,Te,{flushSync:he});return}let Ke=t.getContext?await t.getContext():new Wg,Fe=(oe&&oe.preventScrollReset)===!0;if(Ae&&It(Ae.formMethod)){await Ba(O,Y,we,me,Ke,ye.active,he,Fe,Ae,oe&&oe.unstable_defaultShouldRevalidate);return}T.set(O,{routeId:Y,path:we}),await Ha(O,Y,we,me,Ke,ye.active,he,Fe,Ae)}async function Ba(O,Y,K,oe,he,ke,ge,me,ye,we){de(),T.delete(O);let Ae=_.fetchers.get(O);Ce(O,sE(ye,Ae),{flushSync:ge});let Te=new AbortController,Ke=Ta(t.history,K,Te.signal,ye);if(ke){let Xe=await Dl(oe,new URL(Ke.url).pathname,Ke.signal,O);if(Xe.type==="aborted")return;if(Xe.type==="error"){ze(O,Y,Xe.error,{flushSync:ge});return}else if(Xe.matches)oe=Xe.matches;else{ze(O,Y,zn(404,{pathname:K}),{flushSync:ge});return}}let Fe=_o(oe,K);if(!Fe.route.action&&!Fe.route.lazy){let Xe=zn(405,{method:ye.formMethod,pathname:K,routeId:Y});ze(O,Y,Xe,{flushSync:ge});return}se.set(O,Te);let gt=xe,vt=_a(s,c,Ke,oe,Fe,r,he),bt=await il(Ke,vt,he,O),Ie=bt[Fe.route.id];if(!Ie){for(let Xe of vt)if(bt[Xe.route.id]){Ie=bt[Xe.route.id];break}}if(Ke.signal.aborted){se.get(O)===Te&&se.delete(O);return}if(ve.has(O)){if(Hi(Ie)||bn(Ie)){Ce(O,jl(void 0));return}}else{if(Hi(Ie))if(se.delete(O),z>gt){Ce(O,jl(void 0));return}else return Z.add(O),Ce(O,Nr(ye)),pt(Ke,Ie,!1,{fetcherSubmission:ye,preventScrollReset:me});if(bn(Ie)){ze(O,Y,Ie.error);return}}let Ot=_.navigation.location||_.location,Jt=Ta(t.history,Ot,Te.signal),ht=p||d,Hn=_.navigation.state!=="idle"?ri(ht,_.navigation.location,m):_.matches;Be(Hn,"Didn't find any matches after fetcher action");let cn=++xe;L.set(O,cn);let qn=Nr(ye,Ie.data);_.fetchers.set(O,qn);let{dsMatches:En,revalidatingFetchers:ul}=ry(Jt,he,s,c,t.history,_,Hn,ye,Ot,r,!1,U,ee,ve,T,Z,ht,m,t.patchRoutesOnNavigation!=null,[Fe.route.id,Ie],we);ul.filter(Xe=>Xe.key!==O).forEach(Xe=>{let Si=Xe.key,ru=_.fetchers.get(Si),qa=Nr(void 0,ru?ru.data:void 0);_.fetchers.set(Si,qa),nt(Si),Xe.controller&&se.set(Si,Xe.controller)}),yt({fetchers:new Map(_.fetchers)});let bi=()=>ul.forEach(Xe=>nt(Xe.key));Te.signal.addEventListener("abort",bi);let{loaderResults:xi,fetcherResults:Qe}=await ae(En,ul,Jt,he);if(Te.signal.aborted)return;if(Te.signal.removeEventListener("abort",bi),L.delete(O),se.delete(O),ul.forEach(Xe=>se.delete(Xe.key)),_.fetchers.has(O)){let Xe=jl(Ie.data);_.fetchers.set(O,Xe)}let Et=bo(xi);if(Et)return pt(Jt,Et.result,!1,{preventScrollReset:me});if(Et=bo(Qe),Et)return Z.add(Et.key),pt(Jt,Et.result,!1,{preventScrollReset:me});let{loaderData:Yn,errors:Ht}=hy(_,Hn,xi,void 0,ul,Qe);Bn(cn),_.navigation.state==="loading"&&cn>z?(Be(ne,"Expected pending action"),V&&V.abort(),Un(_.navigation.location,{matches:Hn,loaderData:Yn,errors:Ht,fetchers:new Map(_.fetchers)})):(yt({errors:Ht,loaderData:my(_.loaderData,Yn,Hn,Ht),fetchers:new Map(_.fetchers)}),U=!1)}async function Ha(O,Y,K,oe,he,ke,ge,me,ye){let we=_.fetchers.get(O);Ce(O,Nr(ye,we?we.data:void 0),{flushSync:ge});let Ae=new AbortController,Te=Ta(t.history,K,Ae.signal);if(ke){let Ie=await Dl(oe,new URL(Te.url).pathname,Te.signal,O);if(Ie.type==="aborted")return;if(Ie.type==="error"){ze(O,Y,Ie.error,{flushSync:ge});return}else if(Ie.matches)oe=Ie.matches;else{ze(O,Y,zn(404,{pathname:K}),{flushSync:ge});return}}let Ke=_o(oe,K);se.set(O,Ae);let Fe=xe,gt=_a(s,c,Te,oe,Ke,r,he),bt=(await il(Te,gt,he,O))[Ke.route.id];if(se.get(O)===Ae&&se.delete(O),!Te.signal.aborted){if(ve.has(O)){Ce(O,jl(void 0));return}if(Hi(bt))if(z>Fe){Ce(O,jl(void 0));return}else{Z.add(O),await pt(Te,bt,!1,{preventScrollReset:me});return}if(bn(bt)){ze(O,Y,bt.error);return}Ce(O,jl(bt.data))}}async function pt(O,Y,K,{submission:oe,fetcherSubmission:he,preventScrollReset:ke,replace:ge}={}){K||(W?.resolve(),W=null),Y.response.headers.has("X-Remix-Revalidate")&&(U=!0);let me=Y.response.headers.get("Location");Be(me,"Expected a Location header on the redirect Response"),me=fy(me,new URL(O.url),m,t.history);let ye=Vr(_.location,me,{_isRedirect:!0});if(a){let gt=!1;if(Y.response.headers.has("X-Remix-Reload-Document"))gt=!0;else if(gd(me)){const vt=Cv(me,!0);gt=vt.origin!==l.location.origin||On(vt.pathname,m)==null}if(gt){ge?l.location.replace(me):l.location.assign(me);return}}V=null;let we=ge===!0||Y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ae,formAction:Te,formEncType:Ke}=_.navigation;!oe&&!he&&Ae&&Te&&Ke&&(oe=yy(_.navigation));let Fe=oe||he;if(BS.has(Y.response.status)&&Fe&&It(Fe.formMethod))await Pt(we,ye,{submission:{...Fe,formAction:me},preventScrollReset:ke||R,enableViewTransition:K?G:void 0});else{let gt=xf(ye,oe);await Pt(we,ye,{overrideNavigation:gt,fetcherSubmission:he,preventScrollReset:ke||R,enableViewTransition:K?G:void 0})}}async function il(O,Y,K,oe){let he,ke={};try{he=await $S(y,O,Y,oe,K,!1)}catch(ge){return Y.filter(me=>me.shouldLoad).forEach(me=>{ke[me.route.id]={type:"error",error:ge}}),ke}if(O.signal.aborted)return ke;if(!It(O.method))for(let ge of Y){if(he[ge.route.id]?.type==="error")break;!he.hasOwnProperty(ge.route.id)&&!_.loaderData.hasOwnProperty(ge.route.id)&&(!_.errors||!_.errors.hasOwnProperty(ge.route.id))&&ge.shouldCallHandler()&&(he[ge.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ge.route.id}`)})}for(let[ge,me]of Object.entries(he))if(iE(me)){let ye=me.result;ke[ge]={type:"redirect",response:JS(ye,O,ge,Y,m)}}else ke[ge]=await PS(me);return ke}async function ae(O,Y,K,oe){let he=il(K,O,oe,null),ke=Promise.all(Y.map(async ye=>{if(ye.matches&&ye.match&&ye.request&&ye.controller){let Ae=(await il(ye.request,ye.matches,oe,ye.key))[ye.match.route.id];return{[ye.key]:Ae}}else return Promise.resolve({[ye.key]:{type:"error",error:zn(404,{pathname:ye.path})}})})),ge=await he,me=(await ke).reduce((ye,we)=>Object.assign(ye,we),{});return{loaderResults:ge,fetcherResults:me}}function de(){U=!0,T.forEach((O,Y)=>{se.has(Y)&&ee.add(Y),nt(Y)})}function Ce(O,Y,K={}){_.fetchers.set(O,Y),yt({fetchers:new Map(_.fetchers)},{flushSync:(K&&K.flushSync)===!0})}function ze(O,Y,K,oe={}){let he=ui(_.matches,Y);on(O),yt({errors:{[he.route.id]:K},fetchers:new Map(_.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function Pe(O){return ce.set(O,(ce.get(O)||0)+1),ve.has(O)&&ve.delete(O),_.fetchers.get(O)||HS}function $t(O,Y){nt(O,Y?.reason),Ce(O,jl(null))}function on(O){let Y=_.fetchers.get(O);se.has(O)&&!(Y&&Y.state==="loading"&&L.has(O))&&nt(O),T.delete(O),L.delete(O),Z.delete(O),ve.delete(O),ee.delete(O),_.fetchers.delete(O)}function Ut(O){let Y=(ce.get(O)||0)-1;Y<=0?(ce.delete(O),ve.add(O)):ce.set(O,Y),yt({fetchers:new Map(_.fetchers)})}function nt(O,Y){let K=se.get(O);K&&(K.abort(Y),se.delete(O))}function Bt(O){for(let Y of O){let K=Pe(Y),oe=jl(K.data);_.fetchers.set(Y,oe)}}function tt(){let O=[],Y=!1;for(let K of Z){let oe=_.fetchers.get(K);Be(oe,`Expected fetcher: ${K}`),oe.state==="loading"&&(Z.delete(K),O.push(K),Y=!0)}return Bt(O),Y}function Bn(O){let Y=[];for(let[K,oe]of L)if(oe<O){let he=_.fetchers.get(K);Be(he,`Expected fetcher: ${K}`),he.state==="loading"&&(nt(K),L.delete(K),Y.push(K))}return Bt(Y),Y.length>0}function sn(O,Y){let K=_.blockers.get(O)||Rr;return be.get(O)!==Y&&be.set(O,Y),K}function lu(O){_.blockers.delete(O),be.delete(O)}function al(O,Y){let K=_.blockers.get(O)||Rr;Be(K.state==="unblocked"&&Y.state==="blocked"||K.state==="blocked"&&Y.state==="blocked"||K.state==="blocked"&&Y.state==="proceeding"||K.state==="blocked"&&Y.state==="unblocked"||K.state==="proceeding"&&Y.state==="unblocked",`Invalid blocker state transition: ${K.state} -> ${Y.state}`);let oe=new Map(_.blockers);oe.set(O,Y),yt({blockers:oe})}function pi({currentLocation:O,nextLocation:Y,historyAction:K}){if(be.size===0)return;be.size>1&&Rt(!1,"A router only supports one blocker at a time");let oe=Array.from(be.entries()),[he,ke]=oe[oe.length-1],ge=_.blockers.get(he);if(!(ge&&ge.state==="proceeding")&&ke({currentLocation:O,nextLocation:Y,historyAction:K}))return he}function zl(O){let Y=zn(404,{pathname:O}),K=p||d,{matches:oe,route:he}=vo(K);return{notFoundMatches:oe,route:he,error:Y}}function rl(O,Y,K){if(E=O,N=Y,j=K||null,!C&&_.navigation===bf){C=!0;let oe=iu(_.location,_.matches);oe!=null&&yt({restoreScrollPosition:oe})}return()=>{E=null,N=null,j=null}}function gi(O,Y){return j&&j(O,Y.map(oe=>fS(oe,_.loaderData)))||O.key}function yi(O,Y){if(E&&N){let K=gi(O,Y);E[K]=N()}}function iu(O,Y){if(E){let K=gi(O,Y),oe=E[K];if(typeof oe=="number")return oe}return null}function vi(O,Y,K){if(t.patchRoutesOnNavigation)if(O){if(Object.keys(O[0].params).length>0)return{active:!0,matches:Br(Y,K,m,!0)}}else return{active:!0,matches:Br(Y,K,m,!0)||[]};return{active:!1,matches:null}}async function Dl(O,Y,K,oe){if(!t.patchRoutesOnNavigation)return{type:"success",matches:O};let he=O;for(;;){let ke=p==null,ge=p||d,me=c;try{await t.patchRoutesOnNavigation({signal:K,path:Y,matches:he,fetcherKey:oe,patch:(Ae,Te)=>{K.aborted||uy(Ae,Te,ge,me,s,!1)}})}catch(Ae){return{type:"error",error:Ae,partialMatches:he}}finally{ke&&!K.aborted&&(d=[...d])}if(K.aborted)return{type:"aborted"};let ye=ri(ge,Y,m),we=null;if(ye){if(Object.keys(ye[0].params).length===0)return{type:"success",matches:ye};if(we=Br(ge,Y,m,!0),!(we&&he.length<we.length&&Ol(he,we.slice(0,he.length))))return{type:"success",matches:ye}}if(we||(we=Br(ge,Y,m,!0)),!we||Ol(he,we))return{type:"success",matches:null};he=we}}function Ol(O,Y){return O.length===Y.length&&O.every((K,oe)=>K.route.id===Y[oe].route.id)}function ls(O){c={},p=Fr(O,s,void 0,c)}function au(O,Y,K=!1){let oe=p==null;uy(O,Y,p||d,c,s,K),oe&&(d=[...d],yt({}))}return H={get basename(){return m},get future(){return g},get state(){return _},get routes(){return d},get window(){return l},initialize:Re,subscribe:Ln,enableScrollRestoration:rl,navigate:Sn,fetch:mi,revalidate:Rl,createHref:O=>t.history.createHref(O),encodeLocation:O=>t.history.encodeLocation(O),getFetcher:Pe,resetFetcher:$t,deleteFetcher:Ut,dispose:Nt,getBlocker:sn,deleteBlocker:lu,patchRoutes:au,_internalFetchControllers:se,_internalSetRoutes:ls,_internalSetStateDoNotUseOrYouWillBreakYourApp(O){yt(O)}},t.unstable_instrumentations&&(H=RS(H,t.unstable_instrumentations.map(O=>O.router).filter(Boolean))),H}function GS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Vf(t,l,a,r,o,s){let c,d;if(o){c=[];for(let m of l)if(c.push(m),m.route.id===o){d=m;break}}else c=l,d=l[l.length-1];let p=vd(r||".",yd(c),On(t.pathname,a)||t.pathname,s==="path");if(r==null&&(p.search=t.search,p.hash=t.hash),(r==null||r===""||r===".")&&d){let m=Sd(p.search);if(d.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!d.route.index&&m){let y=new URLSearchParams(p.search),g=y.getAll("index");y.delete("index"),g.filter(S=>S).forEach(S=>y.append("index",S));let b=y.toString();p.search=b?`?${b}`:""}}return a!=="/"&&(p.pathname=kS({basename:a,pathname:p.pathname})),el(p)}function ay(t,l,a){if(!a||!GS(a))return{path:l};if(a.formMethod&&!uE(a.formMethod))return{path:l,error:zn(405,{method:a.formMethod})};let r=()=>({path:l,error:zn(400,{type:"invalid-body"})}),s=(a.formMethod||"get").toUpperCase(),c=Gv(l);if(a.body!==void 0){if(a.formEncType==="text/plain"){if(!It(s))return r();let g=typeof a.body=="string"?a.body:a.body instanceof FormData||a.body instanceof URLSearchParams?Array.from(a.body.entries()).reduce((b,[S,E])=>`${b}${S}=${E}
|
|
10
|
+
`,""):String(a.body);return{path:l,submission:{formMethod:s,formAction:c,formEncType:a.formEncType,formData:void 0,json:void 0,text:g}}}else if(a.formEncType==="application/json"){if(!It(s))return r();try{let g=typeof a.body=="string"?JSON.parse(a.body):a.body;return{path:l,submission:{formMethod:s,formAction:c,formEncType:a.formEncType,formData:void 0,json:g,text:void 0}}}catch{return r()}}}Be(typeof FormData=="function","FormData is not available in this environment");let d,p;if(a.formData)d=Qf(a.formData),p=a.formData;else if(a.body instanceof FormData)d=Qf(a.body),p=a.body;else if(a.body instanceof URLSearchParams)d=a.body,p=dy(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=dy(d)}catch{return r()}let m={formMethod:s,formAction:c,formEncType:a&&a.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(It(m.formMethod))return{path:l,submission:m};let y=fi(l);return t&&y.search&&Sd(y.search)&&d.append("index",""),y.search=`?${d}`,{path:el(y),submission:m}}function ry(t,l,a,r,o,s,c,d,p,m,y,g,b,S,E,j,N,C,A,D,te){let P=D?bn(D[1])?D[1].error:D[1].data:void 0,H=o.createURL(s.location),_=o.createURL(p),ne;if(y&&s.errors){let $=Object.keys(s.errors)[0];ne=c.findIndex(U=>U.route.id===$)}else if(D&&bn(D[1])){let $=D[0];ne=c.findIndex(U=>U.route.id===$)-1}let W=D?D[1].statusCode:void 0,R=W&&W>=400,V={currentUrl:H,currentParams:s.matches[0]?.params||{},nextUrl:_,nextParams:c[0].params,...d,actionResult:P,actionStatus:W},G=Kr(c),F=c.map(($,U)=>{let{route:ee}=$,se=null;if(ne!=null&&U>ne?se=!1:ee.lazy?se=!0:bd(ee)?y?se=Ff(ee,s.loaderData,s.errors):VS(s.loaderData,s.matches[U],$)&&(se=!0):se=!1,se!==null)return If(a,r,t,G,$,m,l,se);let xe=!1;typeof te=="boolean"?xe=te:R?xe=!1:(g||H.pathname+H.search===_.pathname+_.search||H.search!==_.search||FS(s.matches[U],$))&&(xe=!0);let z={...V,defaultShouldRevalidate:xe},L=Hr($,z);return If(a,r,t,G,$,m,l,L,z,te)}),le=[];return E.forEach(($,U)=>{if(y||!c.some(ce=>ce.route.id===$.routeId)||S.has(U))return;let ee=s.fetchers.get(U),se=ee&&ee.state!=="idle"&&ee.data===void 0,xe=ri(N,$.path,C);if(!xe){if(A&&se)return;le.push({key:U,routeId:$.routeId,path:$.path,matches:null,match:null,request:null,controller:null});return}if(j.has(U))return;let z=_o(xe,$.path),L=new AbortController,Z=Ta(o,$.path,L.signal),T=null;if(b.has(U))b.delete(U),T=_a(a,r,Z,xe,z,m,l);else if(se)g&&(T=_a(a,r,Z,xe,z,m,l));else{let ce;typeof te=="boolean"?ce=te:R?ce=!1:ce=g;let ve={...V,defaultShouldRevalidate:ce};Hr(z,ve)&&(T=_a(a,r,Z,xe,z,m,l,ve))}T&&le.push({key:U,routeId:$.routeId,path:$.path,matches:T,match:z,request:Z,controller:L})}),{dsMatches:F,revalidatingFetchers:le}}function bd(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function Ff(t,l,a){if(t.lazy)return!0;if(!bd(t))return!1;let r=l!=null&&t.id in l,o=a!=null&&a[t.id]!==void 0;return!r&&o?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!o}function VS(t,l,a){let r=!l||a.route.id!==l.route.id,o=!t.hasOwnProperty(a.route.id);return r||o}function FS(t,l){let a=t.route.path;return t.pathname!==l.pathname||a!=null&&a.endsWith("*")&&t.params["*"]!==l.params["*"]}function Hr(t,l){if(t.route.shouldRevalidate){let a=t.route.shouldRevalidate(l);if(typeof a=="boolean")return a}return l.defaultShouldRevalidate}function uy(t,l,a,r,o,s){let c;if(t){let m=r[t];Be(m,`No route found to patch children into: routeId = ${t}`),m.children||(m.children=[]),c=m.children}else c=a;let d=[],p=[];if(l.forEach(m=>{let y=c.find(g=>Uv(m,g));y?p.push({existingRoute:y,newRoute:m}):d.push(m)}),d.length>0){let m=Fr(d,o,[t||"_","patch",String(c?.length||"0")],r);c.push(...m)}if(s&&p.length>0)for(let m=0;m<p.length;m++){let{existingRoute:y,newRoute:g}=p[m],b=y,[S]=Fr([g],o,[],{},!0);Object.assign(b,{element:S.element?S.element:b.element,errorElement:S.errorElement?S.errorElement:b.errorElement,hydrateFallbackElement:S.hydrateFallbackElement?S.hydrateFallbackElement:b.hydrateFallbackElement})}}function Uv(t,l){return"id"in t&&"id"in l&&t.id===l.id?!0:t.index===l.index&&t.path===l.path&&t.caseSensitive===l.caseSensitive?(!t.children||t.children.length===0)&&(!l.children||l.children.length===0)?!0:t.children.every((a,r)=>l.children?.some(o=>Uv(a,o))):!1}var oy=new WeakMap,Bv=({key:t,route:l,manifest:a,mapRouteProperties:r})=>{let o=a[l.id];if(Be(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let s=o.lazy[t];if(!s)return;let c=oy.get(o);c||(c={},oy.set(o,c));let d=c[t];if(d)return d;let p=(async()=>{let m=uS(t),g=o[t]!==void 0&&t!=="hasErrorBoundary";if(m)Rt(!m,"Route property "+t+" is not a supported lazy route property. This property will be ignored."),c[t]=Promise.resolve();else if(g)Rt(!1,`Route "${o.id}" has a static property "${t}" defined. The lazy property will be ignored.`);else{let b=await s();b!=null&&(Object.assign(o,{[t]:b}),Object.assign(o,r(o)))}typeof o.lazy=="object"&&(o.lazy[t]=void 0,Object.values(o.lazy).every(b=>b===void 0)&&(o.lazy=void 0))})();return c[t]=p,p},sy=new WeakMap;function IS(t,l,a,r,o){let s=a[t.id];if(Be(s,"No route found in manifest"),!t.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof t.lazy=="function"){let y=sy.get(s);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let g=(async()=>{Be(typeof t.lazy=="function","No lazy route function found");let b=await t.lazy(),S={};for(let E in b){let j=b[E];if(j===void 0)continue;let N=sS(E),A=s[E]!==void 0&&E!=="hasErrorBoundary";N?Rt(!N,"Route property "+E+" is not a supported property to be returned from a lazy route function. This property will be ignored."):A?Rt(!A,`Route "${s.id}" has a static property "${E}" defined but its lazy function is also returning a value for this property. The lazy route property "${E}" will be ignored.`):S[E]=j}Object.assign(s,S),Object.assign(s,{...r(s),lazy:void 0})})();return sy.set(s,g),g.catch(()=>{}),{lazyRoutePromise:g,lazyHandlerPromise:g}}let c=Object.keys(t.lazy),d=[],p;for(let y of c){if(o&&o.includes(y))continue;let g=Bv({key:y,route:t,manifest:a,mapRouteProperties:r});g&&(d.push(g),y===l&&(p=g))}let m=d.length>0?Promise.all(d).then(()=>{}):void 0;return m?.catch(()=>{}),p?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function cy(t){let l=t.matches.filter(o=>o.shouldLoad),a={};return(await Promise.all(l.map(o=>o.resolve()))).forEach((o,s)=>{a[l[s].route.id]=o}),a}async function QS(t){return t.matches.some(l=>l.route.middleware)?Hv(t,()=>cy(t)):cy(t)}function Hv(t,l){return XS(t,l,r=>{if(rE(r))throw r;return r},nE,a);function a(r,o,s){if(s)return Promise.resolve(Object.assign(s.value,{[o]:{type:"error",result:r}}));{let{matches:c}=t,d=Math.min(Math.max(c.findIndex(m=>m.route.id===o),0),Math.max(c.findIndex(m=>m.shouldCallHandler()),0)),p=ui(c,c[d].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:r}})}}}async function XS(t,l,a,r,o){let{matches:s,request:c,params:d,context:p,unstable_pattern:m}=t,y=s.flatMap(b=>b.route.middleware?b.route.middleware.map(S=>[b.route.id,S]):[]);return await qv({request:c,params:d,context:p,unstable_pattern:m},y,l,a,r,o)}async function qv(t,l,a,r,o,s,c=0){let{request:d}=t;if(d.signal.aborted)throw d.signal.reason??new Error(`Request aborted: ${d.method} ${d.url}`);let p=l[c];if(!p)return await a();let[m,y]=p,g,b=async()=>{if(g)throw new Error("You may only call `next()` once per middleware");try{return g={value:await qv(t,l,a,r,o,s,c+1)},g.value}catch(S){return g={value:await s(S,m,g)},g.value}};try{let S=await y(t,b),E=S!=null?r(S):void 0;return o(E)?E:g?E??g.value:(g={value:await b()},g.value)}catch(S){return await s(S,m,g)}}function Yv(t,l,a,r,o){let s=Bv({key:"middleware",route:r.route,manifest:l,mapRouteProperties:t}),c=IS(r.route,It(a.method)?"action":"loader",l,t,o);return{middleware:s,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function If(t,l,a,r,o,s,c,d,p=null,m){let y=!1,g=Yv(t,l,a,o,s);return{...o,_lazyPromises:g,shouldLoad:d,shouldRevalidateArgs:p,shouldCallHandler(b){return y=!0,p?typeof m=="boolean"?Hr(o,{...p,defaultShouldRevalidate:m}):typeof b=="boolean"?Hr(o,{...p,defaultShouldRevalidate:b}):Hr(o,p):d},resolve(b){let{lazy:S,loader:E,middleware:j}=o.route,N=y||d||b&&!It(a.method)&&(S||E),C=j&&j.length>0&&!E&&!S;return N&&(It(a.method)||!C)?KS({request:a,unstable_pattern:r,match:o,lazyHandlerPromise:g?.handler,lazyRoutePromise:g?.route,handlerOverride:b,scopedContext:c}):Promise.resolve({type:"data",result:void 0})}}}function _a(t,l,a,r,o,s,c,d=null){return r.map(p=>p.route.id!==o.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:Yv(t,l,a,p,s),resolve:()=>Promise.resolve({type:"data",result:void 0})}:If(t,l,a,Kr(r),p,s,c,!0,d))}async function $S(t,l,a,r,o,s){a.some(m=>m._lazyPromises?.middleware)&&await Promise.all(a.map(m=>m._lazyPromises?.middleware));let c={request:l,unstable_pattern:Kr(a),params:a[0].params,context:o,matches:a},p=await t({...c,fetcherKey:r,runClientMiddleware:m=>{let y=c;return Hv(y,()=>m({...y,fetcherKey:r,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(m=>[m._lazyPromises?.handler,m._lazyPromises?.route]))}catch{}return p}async function KS({request:t,unstable_pattern:l,match:a,lazyHandlerPromise:r,lazyRoutePromise:o,handlerOverride:s,scopedContext:c}){let d,p,m=It(t.method),y=m?"action":"loader",g=b=>{let S,E=new Promise((C,A)=>S=A);p=()=>S(),t.signal.addEventListener("abort",p);let j=C=>typeof b!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${y}" [routeId: ${a.route.id}]`)):b({request:t,unstable_pattern:l,params:a.params,context:c},...C!==void 0?[C]:[]),N=(async()=>{try{return{type:"data",result:await(s?s(A=>j(A)):j())}}catch(C){return{type:"error",result:C}}})();return Promise.race([N,E])};try{let b=m?a.route.action:a.route.loader;if(r||o)if(b){let S,[E]=await Promise.all([g(b).catch(j=>{S=j}),r,o]);if(S!==void 0)throw S;d=E}else{await r;let S=m?a.route.action:a.route.loader;if(S)[d]=await Promise.all([g(S),o]);else if(y==="action"){let E=new URL(t.url),j=E.pathname+E.search;throw zn(405,{method:t.method,pathname:j,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(b)d=await g(b);else{let S=new URL(t.url),E=S.pathname+S.search;throw zn(404,{pathname:E})}}catch(b){return{type:"error",result:b}}finally{p&&t.signal.removeEventListener("abort",p)}return d}async function ZS(t){let l=t.headers.get("Content-Type");return l&&/\bapplication\/json\b/.test(l)?t.body==null?null:t.json():t.text()}async function PS(t){let{result:l,type:a}=t;if(xd(l)){let r;try{r=await ZS(l)}catch(o){return{type:"error",error:o}}return a==="error"?{type:"error",error:new $r(l.status,l.statusText,r),statusCode:l.status,headers:l.headers}:{type:"data",data:r,statusCode:l.status,headers:l.headers}}return a==="error"?gy(l)?l.data instanceof Error?{type:"error",error:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:tE(l),statusCode:Ir(l)?l.status:void 0,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"error",error:l,statusCode:Ir(l)?l.status:void 0}:gy(l)?{type:"data",data:l.data,statusCode:l.init?.status,headers:l.init?.headers?new Headers(l.init.headers):void 0}:{type:"data",data:l}}function JS(t,l,a,r,o){let s=t.headers.get("Location");if(Be(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!gd(s)){let c=r.slice(0,r.findIndex(d=>d.route.id===a)+1);s=Vf(new URL(l.url),c,o,s),t.headers.set("Location",s)}return t}function fy(t,l,a,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(gd(t)){let s=t,c=s.startsWith("//")?new URL(l.protocol+s):new URL(s);if(o.includes(c.protocol))throw new Error("Invalid redirect location");let d=On(c.pathname,a)!=null;if(c.origin===l.origin&&d)return c.pathname+c.search+c.hash}try{let s=r.createURL(t);if(o.includes(s.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Ta(t,l,a,r){let o=t.createURL(Gv(l)).toString(),s={signal:a};if(r&&It(r.formMethod)){let{formMethod:c,formEncType:d}=r;s.method=c.toUpperCase(),d==="application/json"?(s.headers=new Headers({"Content-Type":d}),s.body=JSON.stringify(r.json)):d==="text/plain"?s.body=r.text:d==="application/x-www-form-urlencoded"&&r.formData?s.body=Qf(r.formData):s.body=r.formData}return new Request(o,s)}function Qf(t){let l=new URLSearchParams;for(let[a,r]of t.entries())l.append(a,typeof r=="string"?r:r.name);return l}function dy(t){let l=new FormData;for(let[a,r]of t.entries())l.append(a,r);return l}function WS(t,l,a,r=!1,o=!1){let s={},c=null,d,p=!1,m={},y=a&&bn(a[1])?a[1].error:void 0;return t.forEach(g=>{if(!(g.route.id in l))return;let b=g.route.id,S=l[b];if(Be(!Hi(S),"Cannot handle redirect results in processLoaderData"),bn(S)){let E=S.error;if(y!==void 0&&(E=y,y=void 0),c=c||{},o)c[b]=E;else{let j=ui(t,b);c[j.route.id]==null&&(c[j.route.id]=E)}r||(s[b]=Lv),p||(p=!0,d=Ir(S.error)?S.error.status:500),S.headers&&(m[b]=S.headers)}else s[b]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(d=S.statusCode),S.headers&&(m[b]=S.headers)}),y!==void 0&&a&&(c={[a[0]]:y},a[2]&&(s[a[2]]=void 0)),{loaderData:s,errors:c,statusCode:d||200,loaderHeaders:m}}function hy(t,l,a,r,o,s){let{loaderData:c,errors:d}=WS(l,a,r);return o.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:y,controller:g}=p;if(g&&g.signal.aborted)return;let b=s[m];if(Be(b,"Did not find corresponding fetcher result"),bn(b)){let S=ui(t.matches,y?.route.id);d&&d[S.route.id]||(d={...d,[S.route.id]:b.error}),t.fetchers.delete(m)}else if(Hi(b))Be(!1,"Unhandled fetcher revalidation redirect");else{let S=jl(b.data);t.fetchers.set(m,S)}}),{loaderData:c,errors:d}}function my(t,l,a,r){let o=Object.entries(l).filter(([,s])=>s!==Lv).reduce((s,[c,d])=>(s[c]=d,s),{});for(let s of a){let c=s.route.id;if(!l.hasOwnProperty(c)&&t.hasOwnProperty(c)&&s.route.loader&&(o[c]=t[c]),r&&r.hasOwnProperty(c))break}return o}function py(t){return t?bn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ui(t,l){return(l?t.slice(0,t.findIndex(r=>r.route.id===l)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function vo(t){let l=t.length===1?t[0]:t.find(a=>a.index||!a.path||a.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:l}],route:l}}function zn(t,{pathname:l,routeId:a,method:r,type:o,message:s}={}){let c="Unknown Server Error",d="Unknown @remix-run/router error";return t===400?(c="Bad Request",r&&l&&a?d=`You made a ${r} request to "${l}" but did not provide a \`loader\` for route "${a}", so there is no way to handle the request.`:o==="invalid-body"&&(d="Unable to encode submission body")):t===403?(c="Forbidden",d=`Route "${a}" does not match URL "${l}"`):t===404?(c="Not Found",d=`No route matches URL "${l}"`):t===405&&(c="Method Not Allowed",r&&l&&a?d=`You made a ${r.toUpperCase()} request to "${l}" but did not provide an \`action\` for route "${a}", so there is no way to handle the request.`:r&&(d=`Invalid request method "${r.toUpperCase()}"`)),new $r(t||500,c,new Error(d),!0)}function bo(t){let l=Object.entries(t);for(let a=l.length-1;a>=0;a--){let[r,o]=l[a];if(Hi(o))return{key:r,result:o}}}function Gv(t){let l=typeof t=="string"?fi(t):t;return el({...l,hash:""})}function eE(t,l){return t.pathname!==l.pathname||t.search!==l.search?!1:t.hash===""?l.hash!=="":t.hash===l.hash?!0:l.hash!==""}function tE(t){return new $r(t.init?.status??500,t.init?.statusText??"Internal Server Error",t.data)}function nE(t){return t!=null&&typeof t=="object"&&Object.entries(t).every(([l,a])=>typeof l=="string"&&lE(a))}function lE(t){return t!=null&&typeof t=="object"&&"type"in t&&"result"in t&&(t.type==="data"||t.type==="error")}function iE(t){return xd(t.result)&&Ov.has(t.result.status)}function bn(t){return t.type==="error"}function Hi(t){return(t&&t.type)==="redirect"}function gy(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function xd(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function aE(t){return Ov.has(t)}function rE(t){return xd(t)&&aE(t.status)&&t.headers.has("Location")}function uE(t){return US.has(t.toUpperCase())}function It(t){return MS.has(t.toUpperCase())}function Sd(t){return new URLSearchParams(t).getAll("index").some(l=>l==="")}function _o(t,l){let a=typeof l=="string"?fi(l).search:l.search;if(t[t.length-1].route.index&&Sd(a||""))return t[t.length-1];let r=_v(t);return r[r.length-1]}function yy(t){let{formMethod:l,formAction:a,formEncType:r,text:o,formData:s,json:c}=t;if(!(!l||!a||!r)){if(o!=null)return{formMethod:l,formAction:a,formEncType:r,formData:void 0,json:void 0,text:o};if(s!=null)return{formMethod:l,formAction:a,formEncType:r,formData:s,json:void 0,text:void 0};if(c!==void 0)return{formMethod:l,formAction:a,formEncType:r,formData:void 0,json:c,text:void 0}}}function xf(t,l){return l?{state:"loading",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function oE(t,l){return{state:"submitting",location:t,formMethod:l.formMethod,formAction:l.formAction,formEncType:l.formEncType,formData:l.formData,json:l.json,text:l.text}}function Nr(t,l){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:l}}function sE(t,l){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:l?l.data:void 0}}function jl(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function cE(t,l){try{let a=t.sessionStorage.getItem(Mv);if(a){let r=JSON.parse(a);for(let[o,s]of Object.entries(r||{}))s&&Array.isArray(s)&&l.set(o,new Set(s||[]))}}catch{}}function fE(t,l){if(l.size>0){let a={};for(let[r,o]of l)a[r]=[...o];try{t.sessionStorage.setItem(Mv,JSON.stringify(a))}catch(r){Rt(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}function vy(){let t,l,a=new Promise((r,o)=>{t=async s=>{r(s);try{await a}catch{}},l=async s=>{o(s);try{await a}catch{}}});return{promise:a,resolve:t,reject:l}}var Yi=k.createContext(null);Yi.displayName="DataRouter";var Zr=k.createContext(null);Zr.displayName="DataRouterState";var Vv=k.createContext(!1);function dE(){return k.useContext(Vv)}var Ed=k.createContext({isTransitioning:!1});Ed.displayName="ViewTransition";var Fv=k.createContext(new Map);Fv.displayName="Fetchers";var hE=k.createContext(null);hE.displayName="Await";var Mn=k.createContext(null);Mn.displayName="Navigation";var Vo=k.createContext(null);Vo.displayName="Location";var Qn=k.createContext({outlet:null,matches:[],isDataRoute:!1});Qn.displayName="Route";var wd=k.createContext(null);wd.displayName="RouteError";var Iv="REACT_ROUTER_ERROR",mE="REDIRECT",pE="ROUTE_ERROR_RESPONSE";function gE(t){if(t.startsWith(`${Iv}:${mE}:{`))try{let l=JSON.parse(t.slice(28));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.location=="string"&&typeof l.reloadDocument=="boolean"&&typeof l.replace=="boolean")return l}catch{}}function yE(t){if(t.startsWith(`${Iv}:${pE}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new $r(l.status,l.statusText,l.data)}catch{}}function vE(t,{relative:l}={}){Be(Pr(),"useHref() may be used only in the context of a <Router> component.");let{basename:a,navigator:r}=k.useContext(Mn),{hash:o,pathname:s,search:c}=Jr(t,{relative:l}),d=s;return a!=="/"&&(d=s==="/"?a:Wn([a,s])),r.createHref({pathname:d,search:c,hash:o})}function Pr(){return k.useContext(Vo)!=null}function tl(){return Be(Pr(),"useLocation() may be used only in the context of a <Router> component."),k.useContext(Vo).location}var Qv="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Xv(t){k.useContext(Mn).static||k.useLayoutEffect(t)}function Oa(){let{isDataRoute:t}=k.useContext(Qn);return t?zE():bE()}function bE(){Be(Pr(),"useNavigate() may be used only in the context of a <Router> component.");let t=k.useContext(Yi),{basename:l,navigator:a}=k.useContext(Mn),{matches:r}=k.useContext(Qn),{pathname:o}=tl(),s=JSON.stringify(yd(r)),c=k.useRef(!1);return Xv(()=>{c.current=!0}),k.useCallback((p,m={})=>{if(Rt(c.current,Qv),!c.current)return;if(typeof p=="number"){a.go(p);return}let y=vd(p,JSON.parse(s),o,m.relative==="path");t==null&&l!=="/"&&(y.pathname=y.pathname==="/"?l:Wn([l,y.pathname])),(m.replace?a.replace:a.push)(y,m.state,m)},[l,a,s,o,t])}var $v=k.createContext(null);function Kv(){return k.useContext($v)}function xE(t){let l=k.useContext(Qn).outlet;return k.useMemo(()=>l&&k.createElement($v.Provider,{value:t},l),[l,t])}function Zv(){let{matches:t}=k.useContext(Qn),l=t[t.length-1];return l?l.params:{}}function Jr(t,{relative:l}={}){let{matches:a}=k.useContext(Qn),{pathname:r}=tl(),o=JSON.stringify(yd(a));return k.useMemo(()=>vd(t,JSON.parse(o),r,l==="path"),[t,o,r,l])}function SE(t,l,a,r,o){Be(Pr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=k.useContext(Mn),{matches:c}=k.useContext(Qn),d=c[c.length-1],p=d?d.params:{},m=d?d.pathname:"/",y=d?d.pathnameBase:"/",g=d&&d.route;{let A=g&&g.path||"";Jv(m,!g||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${m}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
11
11
|
|
|
12
|
-
Please change the parent <Route path="${j}"> to <Route path="${j==="/"?"*":`${j}/*`}">.`)}let b=tl(),x;x=b;let E=x.pathname||"/",A=E;if(y!=="/"){let j=y.replace(/^\//,"").split("/");A="/"+E.replace(/^\//,"").split("/").slice(j.length).join("/")}let z=ri(t,{pathname:A});return Rt(g||z!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Rt(z==null||z[z.length-1].route.element!==void 0||z[z.length-1].route.Component!==void 0||z[z.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),jE(z&&z.map(j=>Object.assign({},j,{params:Object.assign({},p,j.params),pathname:Wn([y,s.encodeLocation?s.encodeLocation(j.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathname]),pathnameBase:j.pathnameBase==="/"?y:Wn([y,s.encodeLocation?s.encodeLocation(j.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:j.pathnameBase])})),c,a,r,o)}function wE(){let t=NE(),l=Fr(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:s},"ErrorBoundary")," or"," ",k.createElement("code",{style:s},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},l),a?k.createElement("pre",{style:o},a):null,c)}var kE=k.createElement(wE,null),Zv=class extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const a=vE(t.digest);a&&(t=a)}let l=t!==void 0?k.createElement(Qn.Provider,{value:this.props.routeContext},k.createElement(wd.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?k.createElement(CE,{error:t},l):l}};Zv.contextType=Gv;var Sf=new WeakMap;function CE({children:t,error:l}){let{basename:a}=k.useContext(Mn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let r=yE(l.digest);if(r){let o=Sf.get(l);if(o)throw o;let s=Rv(r.location,a);if(_v&&!Sf.get(l))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Sf.set(l,c),c}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function TE({routeContext:t,match:l,children:a}){let r=k.useContext(Yi);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),k.createElement(Qn.Provider,{value:t},a)}function jE(t,l=[],a=null,r=null,o=null){if(t==null){if(!a)return null;if(a.errors)t=a.matches;else if(l.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let s=t,c=a?.errors;if(c!=null){let y=s.findIndex(g=>g.route.id&&c?.[g.route.id]!==void 0);Be(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let d=!1,p=-1;if(a)for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(p=y),g.route.id){let{loaderData:b,errors:x}=a,E=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!x||x[g.route.id]===void 0);if(g.route.lazy||E){d=!0,p>=0?s=s.slice(0,p+1):s=[s[0]];break}}}let m=a&&r?(y,g)=>{r(y,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:$r(a.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,b)=>{let x,E=!1,A=null,z=null;a&&(x=c&&g.route.id?c[g.route.id]:void 0,A=g.route.errorElement||kE,d&&(p<0&&b===0?(Pv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,z=null):p===b&&(E=!0,z=g.route.hydrateFallbackElement||null)));let C=l.concat(s.slice(0,b+1)),j=()=>{let D;return x?D=A:E?D=z:g.route.Component?D=k.createElement(g.route.Component,null):g.route.element?D=g.route.element:D=y,k.createElement(TE,{match:g,routeContext:{outlet:y,matches:C,isDataRoute:a!=null},children:D})};return a&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?k.createElement(Zv,{location:a.location,revalidation:a.revalidation,component:A,error:x,children:j(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:m}):j()},null)}function kd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function AE(t){let l=k.useContext(Yi);return Be(l,kd(t)),l}function _E(t){let l=k.useContext(Kr);return Be(l,kd(t)),l}function RE(t){let l=k.useContext(Qn);return Be(l,kd(t)),l}function Cd(t){let l=RE(t),a=l.matches[l.matches.length-1];return Be(a.route.id,`${t} can only be used on routes that contain a unique "id"`),a.route.id}function zE(){return Cd("useRouteId")}function NE(){let t=k.useContext(wd),l=_E("useRouteError"),a=Cd("useRouteError");return t!==void 0?t:l.errors?.[a]}function DE(){let{router:t}=AE("useNavigate"),l=Cd("useNavigate"),a=k.useRef(!1);return Qv(()=>{a.current=!0}),k.useCallback(async(o,s={})=>{Rt(a.current,Iv),a.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:l,...s}))},[t,l])}var yy={};function Pv(t,l,a){!l&&!yy[t]&&(yy[t]=!0,Rt(!1,a))}var vy={};function by(t,l){!t&&!vy[l]&&(vy[l]=!0,console.warn(l))}var OE="useOptimistic",xy=Kx[OE],ME=()=>{};function LE(t){return xy?xy(t):[t,ME]}function UE(t){let l={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Rt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(l,{element:k.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Rt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(l,{hydrateFallbackElement:k.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Rt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(l,{errorElement:k.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),l}var BE=["HydrateFallback","hydrateFallbackElement"],HE=class{constructor(){this.status="pending",this.promise=new Promise((t,l)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",t(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",l(a))}})}};function qE({router:t,flushSync:l,onError:a,unstable_useTransitions:r}){r=hE()||r;let[s,c]=k.useState(t.state),[d,p]=LE(s),[m,y]=k.useState(),[g,b]=k.useState({isTransitioning:!1}),[x,E]=k.useState(),[A,z]=k.useState(),[C,j]=k.useState(),D=k.useRef(new Map),te=k.useCallback((ne,{deletedFetchers:J,newErrors:R,flushSync:V,viewTransitionOpts:G})=>{R&&a&&Object.values(R).forEach(le=>a(le,{location:ne.location,params:ne.matches[0]?.params??{},unstable_pattern:$r(ne.matches)})),ne.fetchers.forEach((le,I)=>{le.data!==void 0&&D.current.set(I,le.data)}),J.forEach(le=>D.current.delete(le)),by(V===!1||l!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let F=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(by(G==null||F,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!G||!F){l&&V?l(()=>c(ne)):r===!1?c(ne):k.startTransition(()=>{r===!0&&p(le=>Sy(le,ne)),c(ne)});return}if(l&&V){l(()=>{A&&(x?.resolve(),A.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:G.currentLocation,nextLocation:G.nextLocation})});let le=t.window.document.startViewTransition(()=>{l(()=>c(ne))});le.finished.finally(()=>{l(()=>{E(void 0),z(void 0),y(void 0),b({isTransitioning:!1})})}),l(()=>z(le));return}A?(x?.resolve(),A.skipTransition(),j({state:ne,currentLocation:G.currentLocation,nextLocation:G.nextLocation})):(y(ne),b({isTransitioning:!0,flushSync:!1,currentLocation:G.currentLocation,nextLocation:G.nextLocation}))},[t.window,l,A,x,r,p,a]);k.useLayoutEffect(()=>t.subscribe(te),[t,te]),k.useEffect(()=>{g.isTransitioning&&!g.flushSync&&E(new HE)},[g]),k.useEffect(()=>{if(x&&m&&t.window){let ne=m,J=x.promise,R=t.window.document.startViewTransition(async()=>{r===!1?c(ne):k.startTransition(()=>{r===!0&&p(V=>Sy(V,ne)),c(ne)}),await J});R.finished.finally(()=>{E(void 0),z(void 0),y(void 0),b({isTransitioning:!1})}),z(R)}},[m,x,t.window,r,p]),k.useEffect(()=>{x&&m&&d.location.key===m.location.key&&x.resolve()},[x,A,d.location,m]),k.useEffect(()=>{!g.isTransitioning&&C&&(y(C.state),b({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),j(void 0))},[g.isTransitioning,C]);let P=k.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:ne=>t.navigate(ne),push:(ne,J,R)=>t.navigate(ne,{state:J,preventScrollReset:R?.preventScrollReset}),replace:(ne,J,R)=>t.navigate(ne,{replace:!0,state:J,preventScrollReset:R?.preventScrollReset})}),[t]),H=t.basename||"/",_=k.useMemo(()=>({router:t,navigator:P,static:!1,basename:H,onError:a}),[t,P,H,a]);return k.createElement(k.Fragment,null,k.createElement(Yi.Provider,{value:_},k.createElement(Kr.Provider,{value:d},k.createElement(Vv.Provider,{value:D.current},k.createElement(Ed.Provider,{value:g},k.createElement(FE,{basename:H,location:d.location,navigationType:d.historyAction,navigator:P,unstable_useTransitions:r},k.createElement(YE,{routes:t.routes,future:t.future,state:d,onError:a})))))),null)}function Sy(t,l){return{...t,navigation:l.navigation.state!=="idle"?l.navigation:t.navigation,revalidation:l.revalidation!=="idle"?l.revalidation:t.revalidation,actionData:l.navigation.state!=="submitting"?l.actionData:t.actionData,fetchers:l.fetchers}}var YE=k.memo(GE);function GE({routes:t,future:l,state:a,onError:r}){return EE(t,void 0,a,r,l)}function VE(t){return SE(t.context)}function FE({basename:t="/",children:l=null,location:a,navigationType:r="POP",navigator:o,static:s=!1,unstable_useTransitions:c}){Be(!Zr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),p=k.useMemo(()=>({basename:d,navigator:o,static:s,unstable_useTransitions:c,future:{}}),[d,o,s,c]);typeof a=="string"&&(a=fi(a));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:x="default"}=a,E=k.useMemo(()=>{let A=On(m,d);return A==null?null:{location:{pathname:A,search:y,hash:g,state:b,key:x},navigationType:r}},[d,m,y,g,b,x,r]);return Rt(E!=null,`<Router basename="${d}"> is not able to match the URL "${m}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:k.createElement(Mn.Provider,{value:p},k.createElement(Vo.Provider,{children:l,value:E}))}var Ro="get",zo="application/x-www-form-urlencoded";function Fo(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function IE(t){return Fo(t)&&t.tagName.toLowerCase()==="button"}function QE(t){return Fo(t)&&t.tagName.toLowerCase()==="form"}function XE(t){return Fo(t)&&t.tagName.toLowerCase()==="input"}function $E(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function KE(t,l){return t.button===0&&(!l||l==="_self")&&!$E(t)}var xo=null;function ZE(){if(xo===null)try{new FormData(document.createElement("form"),0),xo=!1}catch{xo=!0}return xo}var PE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ef(t){return t!=null&&!PE.has(t)?(Rt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zo}"`),null):t}function JE(t,l){let a,r,o,s,c;if(QE(t)){let d=t.getAttribute("action");r=d?On(d,l):null,a=t.getAttribute("method")||Ro,o=Ef(t.getAttribute("enctype"))||zo,s=new FormData(t)}else if(IE(t)||XE(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=t.getAttribute("formaction")||d.getAttribute("action");if(r=p?On(p,l):null,a=t.getAttribute("formmethod")||d.getAttribute("method")||Ro,o=Ef(t.getAttribute("formenctype"))||Ef(d.getAttribute("enctype"))||zo,s=new FormData(d,t),!ZE()){let{name:m,type:y,value:g}=t;if(y==="image"){let b=m?`${m}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else m&&s.append(m,g)}}else{if(Fo(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Ro,r=null,o=zo,c=t}return s&&o==="text/plain"&&(c=s,s=void 0),{action:r,method:a.toLowerCase(),encType:o,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Td(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function WE(t,l,a,r){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return a?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:l&&On(o.pathname,l)==="/"?o.pathname=`${l.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function ew(t,l){if(t.id in l)return l[t.id];try{let a=await import(t.module);return l[t.id]=a,a}catch(a){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function tw(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function nw(t,l,a){let r=await Promise.all(t.map(async o=>{let s=l.routes[o.route.id];if(s){let c=await ew(s,a);return c.links?c.links():[]}return[]}));return rw(r.flat(1).filter(tw).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function Ey(t,l,a,r,o,s){let c=(p,m)=>a[m]?p.route.id!==a[m].route.id:!0,d=(p,m)=>a[m].pathname!==p.pathname||a[m].route.path?.endsWith("*")&&a[m].params["*"]!==p.params["*"];return s==="assets"?l.filter((p,m)=>c(p,m)||d(p,m)):s==="data"?l.filter((p,m)=>{let y=r.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let g=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function lw(t,l,{includeHydrateFallback:a}={}){return iw(t.map(r=>{let o=l.routes[r.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function iw(t){return[...new Set(t)]}function aw(t){let l={},a=Object.keys(t).sort();for(let r of a)l[r]=t[r];return l}function rw(t,l){let a=new Set;return new Set(l),t.reduce((r,o)=>{let s=JSON.stringify(aw(o));return a.has(s)||(a.add(s),r.push({key:s,link:o})),r},[])}function Jv(){let t=k.useContext(Yi);return Td(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function uw(){let t=k.useContext(Kr);return Td(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var jd=k.createContext(void 0);jd.displayName="FrameworkContext";function Wv(){let t=k.useContext(jd);return Td(t,"You must render this element inside a <HydratedRouter> element"),t}function ow(t,l){let a=k.useContext(jd),[r,o]=k.useState(!1),[s,c]=k.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:y,onTouchStart:g}=l,b=k.useRef(null);k.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let A=C=>{C.forEach(j=>{c(j.isIntersecting)})},z=new IntersectionObserver(A,{threshold:.5});return b.current&&z.observe(b.current),()=>{z.disconnect()}}},[t]),k.useEffect(()=>{if(r){let A=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(A)}}},[r]);let x=()=>{o(!0)},E=()=>{o(!1),c(!1)};return a?t!=="intent"?[s,b,{}]:[s,b,{onFocus:Rr(d,x),onBlur:Rr(p,E),onMouseEnter:Rr(m,x),onMouseLeave:Rr(y,E),onTouchStart:Rr(g,x)}]:[!1,b,{}]}function Rr(t,l){return a=>{t&&t(a),a.defaultPrevented||l(a)}}function sw({page:t,...l}){let{router:a}=Jv(),r=k.useMemo(()=>ri(a.routes,t,a.basename),[a.routes,t,a.basename]);return r?k.createElement(fw,{page:t,matches:r,...l}):null}function cw(t){let{manifest:l,routeModules:a}=Wv(),[r,o]=k.useState([]);return k.useEffect(()=>{let s=!1;return nw(t,l,a).then(c=>{s||o(c)}),()=>{s=!0}},[t,l,a]),r}function fw({page:t,matches:l,...a}){let r=tl(),{future:o,manifest:s,routeModules:c}=Wv(),{basename:d}=Jv(),{loaderData:p,matches:m}=uw(),y=k.useMemo(()=>Ey(t,l,m,s,r,"data"),[t,l,m,s,r]),g=k.useMemo(()=>Ey(t,l,m,s,r,"assets"),[t,l,m,s,r]),b=k.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let A=new Set,z=!1;if(l.forEach(j=>{let D=s.routes[j.route.id];!D||!D.hasLoader||(!y.some(te=>te.route.id===j.route.id)&&j.route.id in p&&c[j.route.id]?.shouldRevalidate||D.hasClientLoader?z=!0:A.add(j.route.id))}),A.size===0)return[];let C=WE(t,d,o.unstable_trailingSlashAwareDataRequests,"data");return z&&A.size>0&&C.searchParams.set("_routes",l.filter(j=>A.has(j.route.id)).map(j=>j.route.id).join(",")),[C.pathname+C.search]},[d,o.unstable_trailingSlashAwareDataRequests,p,r,s,y,l,t,c]),x=k.useMemo(()=>lw(g,s),[g,s]),E=cw(g);return k.createElement(k.Fragment,null,b.map(A=>k.createElement("link",{key:A,rel:"prefetch",as:"fetch",href:A,...a})),x.map(A=>k.createElement("link",{key:A,rel:"modulepreload",href:A,...a})),E.map(({key:A,link:z})=>k.createElement("link",{key:A,nonce:a.nonce,...z,crossOrigin:z.crossOrigin??a.crossOrigin})))}function dw(...t){return l=>{t.forEach(a=>{typeof a=="function"?a(l):a!=null&&(a.current=l)})}}var hw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{hw&&(window.__reactRouterVersion="7.13.0")}catch{}function mw(t,l){return GS({basename:l?.basename,getContext:l?.getContext,future:l?.future,history:iS({window:l?.window}),hydrationData:pw(),routes:t,mapRouteProperties:UE,hydrationRouteProperties:BE,dataStrategy:l?.dataStrategy,patchRoutesOnNavigation:l?.patchRoutesOnNavigation,window:l?.window,unstable_instrumentations:l?.unstable_instrumentations}).initialize()}function pw(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:gw(t.errors)}),t}function gw(t){if(!t)return null;let l=Object.entries(t),a={};for(let[r,o]of l)if(o&&o.__type==="RouteErrorResponse")a[r]=new Xr(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let s=window[o.__subType];if(typeof s=="function")try{let c=new s(o.message);c.stack="",a[r]=c}catch{}}if(a[r]==null){let s=new Error(o.message);s.stack="",a[r]=s}}else a[r]=o;return a}var e0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,t0=k.forwardRef(function({onClick:l,discover:a="render",prefetch:r="none",relative:o,reloadDocument:s,replace:c,state:d,target:p,to:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...x},E){let{basename:A,unstable_useTransitions:z}=k.useContext(Mn),C=typeof m=="string"&&e0.test(m),j=Rv(m,A);m=j.to;let D=bE(m,{relative:o}),[te,P,H]=ow(r,x),_=xw(m,{replace:c,state:d,target:p,preventScrollReset:y,relative:o,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:z});function ne(R){l&&l(R),R.defaultPrevented||_(R)}let J=k.createElement("a",{...x,...H,href:j.absoluteURL||D,onClick:j.isExternal||s?l:ne,ref:dw(E,P),target:p,"data-discover":!C&&a==="render"?"true":void 0});return te&&!C?k.createElement(k.Fragment,null,J,k.createElement(sw,{page:D})):J});t0.displayName="Link";var yw=k.forwardRef(function({"aria-current":l="page",caseSensitive:a=!1,className:r="",end:o=!1,style:s,to:c,viewTransition:d,children:p,...m},y){let g=Pr(c,{relative:m.relative}),b=tl(),x=k.useContext(Kr),{navigator:E,basename:A}=k.useContext(Mn),z=x!=null&&Cw(g)&&d===!0,C=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,j=b.pathname,D=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;a||(j=j.toLowerCase(),D=D?D.toLowerCase():null,C=C.toLowerCase()),D&&A&&(D=On(D,A)||D);const te=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let P=j===C||!o&&j.startsWith(C)&&j.charAt(te)==="/",H=D!=null&&(D===C||!o&&D.startsWith(C)&&D.charAt(C.length)==="/"),_={isActive:P,isPending:H,isTransitioning:z},ne=P?l:void 0,J;typeof r=="function"?J=r(_):J=[r,P?"active":null,H?"pending":null,z?"transitioning":null].filter(Boolean).join(" ");let R=typeof s=="function"?s(_):s;return k.createElement(t0,{...m,"aria-current":ne,className:J,ref:y,style:R,to:c,viewTransition:d},typeof p=="function"?p(_):p)});yw.displayName="NavLink";var vw=k.forwardRef(({discover:t="render",fetcherKey:l,navigate:a,reloadDocument:r,replace:o,state:s,method:c=Ro,action:d,onSubmit:p,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...x},E)=>{let{unstable_useTransitions:A}=k.useContext(Mn),z=ww(),C=kw(d,{relative:m}),j=c.toLowerCase()==="get"?"get":"post",D=typeof d=="string"&&e0.test(d),te=P=>{if(p&&p(P),P.defaultPrevented)return;P.preventDefault();let H=P.nativeEvent.submitter,_=H?.getAttribute("formmethod")||c,ne=()=>z(H||P.currentTarget,{fetcherKey:l,method:_,navigate:a,replace:o,state:s,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});A&&a!==!1?k.startTransition(()=>ne()):ne()};return k.createElement("form",{ref:E,method:j,action:C,onSubmit:r?p:te,...x,"data-discover":!D&&t==="render"?"true":void 0})});vw.displayName="Form";function bw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function n0(t){let l=k.useContext(Yi);return Be(l,bw(t)),l}function xw(t,{target:l,replace:a,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:p}={}){let m=Da(),y=tl(),g=Pr(t,{relative:s});return k.useCallback(b=>{if(KE(b,l)){b.preventDefault();let x=a!==void 0?a:el(y)===el(g),E=()=>m(t,{replace:x,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d});p?k.startTransition(()=>E()):E()}},[y,m,g,a,r,l,t,o,s,c,d,p])}var Sw=0,Ew=()=>`__${String(++Sw)}__`;function ww(){let{router:t}=n0("useSubmit"),{basename:l}=k.useContext(Mn),a=zE(),r=t.fetch,o=t.navigate;return k.useCallback(async(s,c={})=>{let{action:d,method:p,encType:m,formData:y,body:g}=JE(s,l);if(c.navigate===!1){let b=c.fetcherKey||Ew();await r(b,a,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||m,flushSync:c.flushSync})}else await o(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,o,l,a])}function kw(t,{relative:l}={}){let{basename:a}=k.useContext(Mn),r=k.useContext(Qn);Be(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s={...Pr(t||".",{relative:l})},c=tl();if(t==null){s.search=c.search;let d=new URLSearchParams(s.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();s.search=y?`?${y}`:""}}return(!t||t===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(s.pathname=s.pathname==="/"?a:Wn([a,s.pathname])),el(s)}function Cw(t,{relative:l}={}){let a=k.useContext(Ed);Be(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=n0("useViewTransitionState"),o=Pr(t,{relative:l});if(!a.isTransitioning)return!1;let s=On(a.currentLocation.pathname,r)||a.currentLocation.pathname,c=On(a.nextLocation.pathname,r)||a.nextLocation.pathname;return Mo(o.pathname,c)!=null||Mo(o.pathname,s)!=null}var Io=Ev();function Tw(t){return k.createElement(qE,{flushSync:Io.flushSync,...t})}const Ad="electric-agent:anthropic-api-key",Qo="electric-agent:oauth-token",_d="electric-agent:oauth-manual",Rd="electric-agent:gh-token";function l0(){return localStorage.getItem(Ad)}function jw(t){localStorage.setItem(Ad,t)}function Aw(){localStorage.removeItem(Ad)}function _w(){return!!l0()}function Xf(){return localStorage.getItem(Qo)}function Rw(t){localStorage.setItem(Qo,t)}function zw(){localStorage.removeItem(Qo),localStorage.removeItem(_d)}function Nw(t){localStorage.setItem(Qo,t),localStorage.setItem(_d,"1")}function No(){return localStorage.getItem(_d)==="1"}function zd(){return localStorage.getItem(Rd)}function Dw(t){localStorage.setItem(Rd,t)}function Ow(){localStorage.removeItem(Rd)}function Mw(){return!!zd()}function Jr(){let t=localStorage.getItem("participant-id"),l=localStorage.getItem("participant-name");return t||(t=crypto.randomUUID(),localStorage.setItem("participant-id",t)),l||(l=`User-${t.slice(0,4)}`,localStorage.setItem("participant-name",l)),{id:t,displayName:l}}const Xo="electric-agent:sessions",Nd="electric-agent:session-tokens";function za(){try{const t=localStorage.getItem(Xo);return t?JSON.parse(t):[]}catch{return[]}}function i0(t){const a=za().filter(r=>r.id!==t.id);a.push(t),localStorage.setItem(Xo,JSON.stringify(a))}function wy(t,l){const a=za(),r=a.find(o=>o.id===t);r&&(Object.assign(r,l,{lastActiveAt:new Date().toISOString()}),localStorage.setItem(Xo,JSON.stringify(a)))}function Lw(t){const a=za().filter(r=>r.id!==t);localStorage.setItem(Xo,JSON.stringify(a)),Uw(t)}function ky(t){return za().find(l=>l.id===t)}function Dd(){try{const t=localStorage.getItem(Nd);return t?JSON.parse(t):{}}catch{return{}}}function a0(t,l){const a=Dd();a[t]=l,localStorage.setItem(Nd,JSON.stringify(a))}function r0(t){return Dd()[t]}function Uw(t){const l=Dd();delete l[t],localStorage.setItem(Nd,JSON.stringify(l))}const u0="electric-agent:room-tokens";function o0(){try{const t=localStorage.getItem(u0);return t?JSON.parse(t):{}}catch{return{}}}function s0(t,l){const a=o0();a[t]=l,localStorage.setItem(u0,JSON.stringify(a))}function c0(t){return o0()[t]}const Bw="/api";function f0(){const t={},l=l0(),a=Xf(),r=zd();return a?t.oauthToken=a:l&&(t.apiKey=l),r&&(t.ghToken=r),t}function d0(){const t=zd();return t?{"X-GH-Token":t}:{}}function Hw(){const t=Jr();return{"X-Participant-Id":t.id,"X-Participant-Name":t.displayName}}function qw(t){return t.match(/^\/sessions\/([^/]+)/)?.[1]}function Yw(t){const l=t.match(/^\/shared-sessions\/([^/]+)/);if(l&&l[1]!=="join")return l[1]}async function Qt(t,l){const a={...Hw(),...l?.headers};l?.body&&(a["Content-Type"]="application/json");const r=qw(t);if(r){const c=r0(r);c&&(a.Authorization=`Bearer ${c}`)}const o=Yw(t);if(o){const c=c0(o);c&&(a.Authorization=`Bearer ${c}`)}const s=await fetch(`${Bw}${t}`,{method:l?.method??"GET",headers:Object.keys(a).length>0?a:void 0,body:l?.body?JSON.stringify(l.body):void 0});if(!s.ok){const c=await s.json().catch(()=>({error:s.statusText}));throw new Error(c.error||s.statusText)}return s.json()}async function Gw(t,l){const a=await Qt("/sessions",{method:"POST",body:{description:t,name:l,...f0()}});return a.sessionToken&&a0(a.sessionId,a.sessionToken),a}function Vw(t,l){return Qt(`/sessions/${t}/iterate`,{method:"POST",body:{request:l}})}function $f(t,l,a){return Qt(`/sessions/${t}/respond`,{method:"POST",body:{gate:l,...a}})}function Fw(t){return Qt(`/sessions/${t}/interrupt`,{method:"POST"})}function Iw(t){return Qt(`/sessions/${t}`,{method:"DELETE"})}function Qw(){return Qt("/provision-electric",{method:"POST"})}function Xw(){return Qt("/github/repos",{headers:d0()})}function $w(t){return Qt(`/github/repos/${t}/branches`,{headers:d0()})}function Kw(){return Qt("/credentials/keychain")}async function Zw(t,l){const a=await Qt("/sessions/resume",{method:"POST",body:{repoUrl:t,branch:l,...f0()}});return a.sessionToken&&a0(a.sessionId,a.sessionToken),a}async function Pw(t){const l=Jr(),a=await Qt("/shared-sessions",{method:"POST",body:{name:t,participant:l}});return a.roomToken&&s0(a.id,a.roomToken),a}async function Jw(t){const l=await Qt(`/shared-sessions/join/${t}`);return l.roomToken&&s0(l.id,l.roomToken),l}function Ww(t){const l=Jr();return Qt(`/shared-sessions/${t}/join`,{method:"POST",body:{participant:l}})}function ek(t){const l=Jr();return Qt(`/shared-sessions/${t}/leave`,{method:"POST",body:{participantId:l.id}})}function tk(t,l,a,r){const o=Jr();return Qt(`/shared-sessions/${t}/sessions`,{method:"POST",body:{sessionId:l,sessionName:a,sessionDescription:r,linkedBy:o.displayName}})}function nk(t,l){return Qt(`/shared-sessions/${t}/sessions/${l}`,{method:"DELETE"})}const Od="electric-agent:joined-shared-sessions";function Lo(){try{const t=localStorage.getItem(Od);return t?JSON.parse(t):[]}catch{return[]}}function lk(t){const a=Lo().filter(r=>r.code!==t.code);a.push(t),localStorage.setItem(Od,JSON.stringify(a))}function h0(t){const a=Lo().filter(r=>r.code!==t);localStorage.setItem(Od,JSON.stringify(a))}function ik(t,l,a){k.useEffect(()=>{function r(o){{const s=o.target?.tagName;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT")return}o.key===t&&(o.preventDefault(),l())}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t,l,a?.disabled,a?.allowInInputs])}function $o(t,l){k.useEffect(()=>{if(l)return;function a(r){r.key==="Escape"&&(r.preventDefault(),t())}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t,l])}const Cy=[{bg:"#4a3f6b",fg:"#d0bcff"},{bg:"#2d4a4a",fg:"#75fbfd"},{bg:"#3b4a2d",fg:"#a8e6a1"},{bg:"#4a3a2d",fg:"#ffb87a"},{bg:"#4a2d3b",fg:"#f8a4c8"},{bg:"#2d3b4a",fg:"#9ecbff"},{bg:"#4a4a2d",fg:"#e6e6a1"},{bg:"#3b2d4a",fg:"#c4a4f8"},{bg:"#2d4a3b",fg:"#75e6b8"},{bg:"#4a2d2d",fg:"#f8a4a4"},{bg:"#2d3a4a",fg:"#a4d4f8"},{bg:"#4a3b2d",fg:"#e6c4a1"}];function ak(t){let l=0;for(let a=0;a<t.length;a++)l=(l<<5)-l+t.charCodeAt(a)|0;return Math.abs(l)}function m0(t){return Cy[ak(t)%Cy.length]}function rk(t){const l=Date.now()-new Date(t).getTime(),a=Math.floor(l/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const r=Math.floor(a/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function uk({projectName:t,onConfirm:l,onCancel:a}){return $o(a),ik("Enter",l),Io.createPortal(S.jsx("div",{className:"modal-overlay",onClick:a,children:S.jsxs("div",{className:"modal-card",onClick:r=>r.stopPropagation(),children:[S.jsxs("div",{className:"modal-title",children:["Delete ",t,"?"]}),S.jsx("div",{className:"modal-body",children:"All containers, database state, and generated code will be permanently lost."}),S.jsxs("div",{className:"modal-actions",children:[S.jsx("button",{type:"button",className:"modal-btn",onClick:a,children:"Cancel"}),S.jsx("button",{type:"button",className:"modal-btn modal-btn-danger",onClick:l,children:"Delete"})]})]})}),document.body)}function ok({session:t,active:l,onClick:a,onDelete:r}){const[o,s]=k.useState(!1),d=`session-avatar ${`session-avatar-${t.status}`}`,p=m0(t.id),m={background:p.bg,color:p.fg},y=t.projectName.split(/[-_ ]+/).slice(0,2).map(g=>g.charAt(0).toUpperCase()).join("");return S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:`session-item ${l?"active":""}`,onClick:a,title:t.projectName,children:[S.jsx("span",{className:d,style:m,children:y}),S.jsxs("div",{className:"session-item-details",children:[S.jsx("div",{className:"session-item-name",children:t.projectName}),S.jsx("div",{className:"session-item-meta",children:S.jsx("span",{children:rk(t.lastActiveAt)})})]}),S.jsx("button",{type:"button",className:"session-item-delete",onClick:g=>{g.stopPropagation(),s(!0)},title:"Delete session",children:"×"})]}),o&&S.jsx(uk,{projectName:t.projectName,onConfirm:()=>{s(!1),r()},onCancel:()=>s(!1)})]})}function sk({collapsed:t}){return S.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-label":t?"Expand menu":"Collapse menu",children:[S.jsx("title",{children:t?"Expand menu":"Collapse menu"}),S.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),S.jsx("line",{x1:"6",y1:"2",x2:"6",y2:"14"}),t?S.jsx("polyline",{points:"9 6.5 11.5 8 9 9.5"}):S.jsx("polyline",{points:"11.5 6.5 9 8 11.5 9.5"})]})}function ck(){return S.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[S.jsx("title",{children:"Join room"}),S.jsx("path",{d:"M6.5 9.5a3.5 3.5 0 0 0 5 0l2-2a3.5 3.5 0 0 0-5-5l-1 1"}),S.jsx("path",{d:"M9.5 6.5a3.5 3.5 0 0 0-5 0l-2 2a3.5 3.5 0 0 0 5 5l1-1"})]})}function fk({collapsed:t,onToggle:l,mobileOpen:a,onMobileClose:r}){const{sessions:o,pendingProject:s,handleDeleteSession:c,joinedSharedSessions:d,refreshJoinedSharedSessions:p}=Po(),m=Da(),y=tl(),[g,b]=k.useState(!1),[x,E]=k.useState(""),[A,z]=k.useState(!1),[C,j]=k.useState("");k.useEffect(()=>{t&&(b(!1),E(""),z(!1),j(""))},[t]);const D=y.pathname.startsWith("/session/")?y.pathname.split("/session/")[1]:null,te=y.pathname.startsWith("/shared/")?y.pathname.split("/shared/")[1]:null,P=[...o].sort((R,V)=>new Date(V.lastActiveAt).getTime()-new Date(R.lastActiveAt).getTime()),H=R=>{m(R),r?.()},_=k.useCallback(()=>{const R=x.trim();R&&(m(`/shared/${R}`),E(""),b(!1),r?.())},[x,m,r]),ne=k.useCallback(R=>{h0(R),p()},[p]),J=k.useCallback(async()=>{const R=C.trim();if(R)try{const{code:V}=await Pw(R);j(""),z(!1),m(`/shared/${V}`),r?.()}catch(V){console.error("Failed to create shared session:",V)}},[C,m,r]);return S.jsxs("aside",{className:`sidebar ${a?"mobile-open":""}`,children:[S.jsxs("div",{className:"sidebar-header",children:[S.jsxs("svg",{className:"sidebar-icon",viewBox:"0 0 192 192","aria-label":"Electric",children:[S.jsx("title",{children:"Electric"}),S.jsx("path",{d:"M106.992 16.1244C107.711 15.4029 108.683 15 109.692 15H170L84.0082 101.089C83.2888 101.811 82.3171 102.213 81.3081 102.213H21L106.992 16.1244Z",fill:"var(--brand-1)"}),S.jsx("path",{d:"M96.4157 104.125C96.4157 103.066 97.2752 102.204 98.331 102.204H170L96.4157 176V104.125Z",fill:"var(--brand-1)"})]}),S.jsx("span",{className:"sidebar-brand",children:"Electric Agent"})]}),S.jsxs("div",{className:"sidebar-sessions",children:[S.jsx("div",{className:"sidebar-section-label",children:"Sessions"}),S.jsxs("div",{className:"session-item",onClick:()=>H("/"),title:"New App",children:[S.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),S.jsx("div",{className:"session-item-details",children:S.jsx("div",{className:"session-item-name",children:"New App"})})]}),s&&S.jsxs("div",{className:"session-item session-item-pending",title:s.name,children:[S.jsx("span",{className:"session-avatar session-avatar-pending"}),S.jsxs("div",{className:"session-item-details",children:[S.jsx("div",{className:"session-item-name",children:s.name}),S.jsx("div",{className:"session-item-meta",children:S.jsx("span",{children:"Setting up..."})})]})]}),P.map(R=>S.jsx(ok,{session:R,active:R.id===D,onClick:()=>H(`/session/${R.id}`),onDelete:()=>c(R.id)},R.id)),S.jsx("div",{className:"sidebar-section-label",children:"Rooms"}),d.map(R=>{const V=m0(R.id),G=R.name.split(/[-_ ]+/).slice(0,2).map(F=>F.charAt(0).toUpperCase()).join("");return S.jsxs("div",{className:`session-item ${te===R.code?"active":""}`,onClick:()=>H(`/shared/${R.code}`),title:R.name,children:[S.jsx("span",{className:"session-avatar session-avatar-shared",style:{background:V.bg,color:V.fg},children:G}),S.jsxs("div",{className:"session-item-details",children:[S.jsx("div",{className:"session-item-name",children:R.name}),S.jsx("div",{className:"session-item-meta",children:S.jsx("span",{children:R.code})})]}),S.jsx("button",{type:"button",className:"session-item-delete",onClick:F=>{F.stopPropagation(),ne(R.code)},title:"Remove",children:"×"})]},R.code)}),A&&!t?S.jsxs("div",{className:"sidebar-join-input",children:[S.jsx("input",{type:"text",placeholder:"Room name...",value:C,onChange:R=>j(R.target.value),onKeyDown:R=>{R.key==="Enter"&&J(),R.key==="Escape"&&(z(!1),j(""))}}),S.jsx("button",{type:"button",className:"sidebar-join-go",onClick:J,disabled:!C.trim(),children:"Go"})]}):S.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),z(!0)},title:"Create room",children:[S.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),S.jsx("div",{className:"session-item-details",children:S.jsx("div",{className:"session-item-name",children:"Create"})})]}),g&&!t?S.jsxs("div",{className:"sidebar-join-input",children:[S.jsx("input",{type:"text",placeholder:"Invite code...",value:x,onChange:R=>E(R.target.value),onKeyDown:R=>{R.key==="Enter"&&_(),R.key==="Escape"&&(b(!1),E(""))}}),S.jsx("button",{type:"button",className:"sidebar-join-go",onClick:_,disabled:!x.trim(),children:"Go"})]}):S.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),b(!0)},title:"Join room",children:[S.jsx("span",{className:"session-avatar new-project-avatar",children:S.jsx(ck,{})}),S.jsx("div",{className:"session-item-details",children:S.jsx("div",{className:"session-item-name",children:"Join"})})]})]}),S.jsx("div",{className:"sidebar-collapse",children:S.jsxs("button",{type:"button",className:"sidebar-collapse-btn",onClick:l,children:[S.jsx(sk,{collapsed:t}),S.jsx("span",{className:"sidebar-collapse-label",children:t?"Expand menu":"Collapse menu"})]})})]})}let dk={data:""},hk=t=>{if(typeof window=="object"){let l=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return l.nonce=window.__nonce__,l.parentNode||(t||document.head).appendChild(l),l.firstChild}return t||dk},mk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,pk=/\/\*[^]*?\*\/| +/g,Ty=/\n+/g,oi=(t,l)=>{let a="",r="",o="";for(let s in t){let c=t[s];s[0]=="@"?s[1]=="i"?a=s+" "+c+";":r+=s[1]=="f"?oi(c,s):s+"{"+oi(c,s[1]=="k"?"":l)+"}":typeof c=="object"?r+=oi(c,l?l.replace(/([^,])+/g,d=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,p=>/&/.test(p)?p.replace(/&/g,d):d?d+" "+p:p)):s):c!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=oi.p?oi.p(s,c):s+":"+c+";")}return a+(l&&o?l+"{"+o+"}":o)+r},Cl={},p0=t=>{if(typeof t=="object"){let l="";for(let a in t)l+=a+p0(t[a]);return l}return t},gk=(t,l,a,r,o)=>{let s=p0(t),c=Cl[s]||(Cl[s]=(p=>{let m=0,y=11;for(;m<p.length;)y=101*y+p.charCodeAt(m++)>>>0;return"go"+y})(s));if(!Cl[c]){let p=s!==t?t:(m=>{let y,g,b=[{}];for(;y=mk.exec(m.replace(pk,""));)y[4]?b.shift():y[3]?(g=y[3].replace(Ty," ").trim(),b.unshift(b[0][g]=b[0][g]||{})):b[0][y[1]]=y[2].replace(Ty," ").trim();return b[0]})(t);Cl[c]=oi(o?{["@keyframes "+c]:p}:p,a?"":"."+c)}let d=a&&Cl.g?Cl.g:null;return a&&(Cl.g=Cl[c]),((p,m,y,g)=>{g?m.data=m.data.replace(g,p):m.data.indexOf(p)===-1&&(m.data=y?p+m.data:m.data+p)})(Cl[c],l,r,d),c},yk=(t,l,a)=>t.reduce((r,o,s)=>{let c=l[s];if(c&&c.call){let d=c(a),p=d&&d.props&&d.props.className||/^go/.test(d)&&d;c=p?"."+p:d&&typeof d=="object"?d.props?"":oi(d,""):d===!1?"":d}return r+o+(c??"")},"");function Ko(t){let l=this||{},a=t.call?t(l.p):t;return gk(a.unshift?a.raw?yk(a,[].slice.call(arguments,1),l.p):a.reduce((r,o)=>Object.assign(r,o&&o.call?o(l.p):o),{}):a,hk(l.target),l.g,l.o,l.k)}let g0,Kf,Zf;Ko.bind({g:1});let Al=Ko.bind({k:1});function vk(t,l,a,r){oi.p=l,g0=t,Kf=a,Zf=r}function di(t,l){let a=this||{};return function(){let r=arguments;function o(s,c){let d=Object.assign({},s),p=d.className||o.className;a.p=Object.assign({theme:Kf&&Kf()},d),a.o=/ *go\d+/.test(p),d.className=Ko.apply(a,r)+(p?" "+p:"");let m=t;return t[0]&&(m=d.as||t,delete d.as),Zf&&m[0]&&Zf(d),g0(m,d)}return o}}var bk=t=>typeof t=="function",Uo=(t,l)=>bk(t)?t(l):t,xk=(()=>{let t=0;return()=>(++t).toString()})(),y0=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");t=!l||l.matches}return t}})(),Sk=20,Md="default",v0=(t,l)=>{let{toastLimit:a}=t.settings;switch(l.type){case 0:return{...t,toasts:[l.toast,...t.toasts].slice(0,a)};case 1:return{...t,toasts:t.toasts.map(c=>c.id===l.toast.id?{...c,...l.toast}:c)};case 2:let{toast:r}=l;return v0(t,{type:t.toasts.find(c=>c.id===r.id)?1:0,toast:r});case 3:let{toastId:o}=l;return{...t,toasts:t.toasts.map(c=>c.id===o||o===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return l.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(c=>c.id!==l.toastId)};case 5:return{...t,pausedAt:l.time};case 6:let s=l.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+s}))}}},Do=[],b0={toasts:[],pausedAt:void 0,settings:{toastLimit:Sk}},Jn={},x0=(t,l=Md)=>{Jn[l]=v0(Jn[l]||b0,t),Do.forEach(([a,r])=>{a===l&&r(Jn[l])})},S0=t=>Object.keys(Jn).forEach(l=>x0(t,l)),Ek=t=>Object.keys(Jn).find(l=>Jn[l].toasts.some(a=>a.id===t)),Zo=(t=Md)=>l=>{x0(l,t)},wk={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},kk=(t={},l=Md)=>{let[a,r]=k.useState(Jn[l]||b0),o=k.useRef(Jn[l]);k.useEffect(()=>(o.current!==Jn[l]&&r(Jn[l]),Do.push([l,r]),()=>{let c=Do.findIndex(([d])=>d===l);c>-1&&Do.splice(c,1)}),[l]);let s=a.toasts.map(c=>{var d,p,m;return{...t,...t[c.type],...c,removeDelay:c.removeDelay||((d=t[c.type])==null?void 0:d.removeDelay)||t?.removeDelay,duration:c.duration||((p=t[c.type])==null?void 0:p.duration)||t?.duration||wk[c.type],style:{...t.style,...(m=t[c.type])==null?void 0:m.style,...c.style}}});return{...a,toasts:s}},Ck=(t,l="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...a,id:a?.id||xk()}),Wr=t=>(l,a)=>{let r=Ck(l,t,a);return Zo(r.toasterId||Ek(r.id))({type:2,toast:r}),r.id},Dt=(t,l)=>Wr("blank")(t,l);Dt.error=Wr("error");Dt.success=Wr("success");Dt.loading=Wr("loading");Dt.custom=Wr("custom");Dt.dismiss=(t,l)=>{let a={type:3,toastId:t};l?Zo(l)(a):S0(a)};Dt.dismissAll=t=>Dt.dismiss(void 0,t);Dt.remove=(t,l)=>{let a={type:4,toastId:t};l?Zo(l)(a):S0(a)};Dt.removeAll=t=>Dt.remove(void 0,t);Dt.promise=(t,l,a)=>{let r=Dt.loading(l.loading,{...a,...a?.loading});return typeof t=="function"&&(t=t()),t.then(o=>{let s=l.success?Uo(l.success,o):void 0;return s?Dt.success(s,{id:r,...a,...a?.success}):Dt.dismiss(r),o}).catch(o=>{let s=l.error?Uo(l.error,o):void 0;s?Dt.error(s,{id:r,...a,...a?.error}):Dt.dismiss(r)}),t};var Tk=1e3,jk=(t,l="default")=>{let{toasts:a,pausedAt:r}=kk(t,l),o=k.useRef(new Map).current,s=k.useCallback((g,b=Tk)=>{if(o.has(g))return;let x=setTimeout(()=>{o.delete(g),c({type:4,toastId:g})},b);o.set(g,x)},[]);k.useEffect(()=>{if(r)return;let g=Date.now(),b=a.map(x=>{if(x.duration===1/0)return;let E=(x.duration||0)+x.pauseDuration-(g-x.createdAt);if(E<0){x.visible&&Dt.dismiss(x.id);return}return setTimeout(()=>Dt.dismiss(x.id,l),E)});return()=>{b.forEach(x=>x&&clearTimeout(x))}},[a,r,l]);let c=k.useCallback(Zo(l),[l]),d=k.useCallback(()=>{c({type:5,time:Date.now()})},[c]),p=k.useCallback((g,b)=>{c({type:1,toast:{id:g,height:b}})},[c]),m=k.useCallback(()=>{r&&c({type:6,time:Date.now()})},[r,c]),y=k.useCallback((g,b)=>{let{reverseOrder:x=!1,gutter:E=8,defaultPosition:A}=b||{},z=a.filter(D=>(D.position||A)===(g.position||A)&&D.height),C=z.findIndex(D=>D.id===g.id),j=z.filter((D,te)=>te<C&&D.visible).length;return z.filter(D=>D.visible).slice(...x?[j+1]:[0,j]).reduce((D,te)=>D+(te.height||0)+E,0)},[a]);return k.useEffect(()=>{a.forEach(g=>{if(g.dismissed)s(g.id,g.removeDelay);else{let b=o.get(g.id);b&&(clearTimeout(b),o.delete(g.id))}})},[a,s]),{toasts:a,handlers:{updateHeight:p,startPause:d,endPause:m,calculateOffset:y}}},Ak=Al`
|
|
12
|
+
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=tl(),S;S=b;let E=S.pathname||"/",j=E;if(y!=="/"){let A=y.replace(/^\//,"").split("/");j="/"+E.replace(/^\//,"").split("/").slice(A.length).join("/")}let N=ri(t,{pathname:j});return Rt(g||N!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),Rt(N==null||N[N.length-1].route.element!==void 0||N[N.length-1].route.Component!==void 0||N[N.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),TE(N&&N.map(A=>Object.assign({},A,{params:Object.assign({},p,A.params),pathname:Wn([y,s.encodeLocation?s.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?y:Wn([y,s.encodeLocation?s.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),c,a,r,o)}function EE(){let t=NE(),l=Ir(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),a=t instanceof Error?t.stack:null,r="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:r},s={padding:"2px 4px",backgroundColor:r},c=null;return console.error("Error handled by React Router default ErrorBoundary:",t),c=k.createElement(k.Fragment,null,k.createElement("p",null,"💿 Hey developer 👋"),k.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",k.createElement("code",{style:s},"ErrorBoundary")," or"," ",k.createElement("code",{style:s},"errorElement")," prop on your route.")),k.createElement(k.Fragment,null,k.createElement("h2",null,"Unexpected Application Error!"),k.createElement("h3",{style:{fontStyle:"italic"}},l),a?k.createElement("pre",{style:o},a):null,c)}var wE=k.createElement(EE,null),Pv=class extends k.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,l){return l.location!==t.location||l.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:l.error,location:l.location,revalidation:t.revalidation||l.revalidation}}componentDidCatch(t,l){this.props.onError?this.props.onError(t,l):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const a=yE(t.digest);a&&(t=a)}let l=t!==void 0?k.createElement(Qn.Provider,{value:this.props.routeContext},k.createElement(wd.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?k.createElement(kE,{error:t},l):l}};Pv.contextType=Vv;var Sf=new WeakMap;function kE({children:t,error:l}){let{basename:a}=k.useContext(Mn);if(typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){let r=gE(l.digest);if(r){let o=Sf.get(l);if(o)throw o;let s=Nv(r.location,a);if(Rv&&!Sf.get(l))if(s.isExternal||r.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:r.replace}));throw Sf.set(l,c),c}return k.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return t}function CE({routeContext:t,match:l,children:a}){let r=k.useContext(Yi);return r&&r.static&&r.staticContext&&(l.route.errorElement||l.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=l.route.id),k.createElement(Qn.Provider,{value:t},a)}function TE(t,l=[],a=null,r=null,o=null){if(t==null){if(!a)return null;if(a.errors)t=a.matches;else if(l.length===0&&!a.initialized&&a.matches.length>0)t=a.matches;else return null}let s=t,c=a?.errors;if(c!=null){let y=s.findIndex(g=>g.route.id&&c?.[g.route.id]!==void 0);Be(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),s=s.slice(0,Math.min(s.length,y+1))}let d=!1,p=-1;if(a)for(let y=0;y<s.length;y++){let g=s[y];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(p=y),g.route.id){let{loaderData:b,errors:S}=a,E=g.route.loader&&!b.hasOwnProperty(g.route.id)&&(!S||S[g.route.id]===void 0);if(g.route.lazy||E){d=!0,p>=0?s=s.slice(0,p+1):s=[s[0]];break}}}let m=a&&r?(y,g)=>{r(y,{location:a.location,params:a.matches?.[0]?.params??{},unstable_pattern:Kr(a.matches),errorInfo:g})}:void 0;return s.reduceRight((y,g,b)=>{let S,E=!1,j=null,N=null;a&&(S=c&&g.route.id?c[g.route.id]:void 0,j=g.route.errorElement||wE,d&&(p<0&&b===0?(Jv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,N=null):p===b&&(E=!0,N=g.route.hydrateFallbackElement||null)));let C=l.concat(s.slice(0,b+1)),A=()=>{let D;return S?D=j:E?D=N:g.route.Component?D=k.createElement(g.route.Component,null):g.route.element?D=g.route.element:D=y,k.createElement(CE,{match:g,routeContext:{outlet:y,matches:C,isDataRoute:a!=null},children:D})};return a&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?k.createElement(Pv,{location:a.location,revalidation:a.revalidation,component:j,error:S,children:A(),routeContext:{outlet:null,matches:C,isDataRoute:!0},onError:m}):A()},null)}function kd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function jE(t){let l=k.useContext(Yi);return Be(l,kd(t)),l}function AE(t){let l=k.useContext(Zr);return Be(l,kd(t)),l}function _E(t){let l=k.useContext(Qn);return Be(l,kd(t)),l}function Cd(t){let l=_E(t),a=l.matches[l.matches.length-1];return Be(a.route.id,`${t} can only be used on routes that contain a unique "id"`),a.route.id}function RE(){return Cd("useRouteId")}function NE(){let t=k.useContext(wd),l=AE("useRouteError"),a=Cd("useRouteError");return t!==void 0?t:l.errors?.[a]}function zE(){let{router:t}=jE("useNavigate"),l=Cd("useNavigate"),a=k.useRef(!1);return Xv(()=>{a.current=!0}),k.useCallback(async(o,s={})=>{Rt(a.current,Qv),a.current&&(typeof o=="number"?await t.navigate(o):await t.navigate(o,{fromRouteId:l,...s}))},[t,l])}var by={};function Jv(t,l,a){!l&&!by[t]&&(by[t]=!0,Rt(!1,a))}var xy={};function Sy(t,l){!t&&!xy[l]&&(xy[l]=!0,console.warn(l))}var DE="useOptimistic",Ey=$x[DE],OE=()=>{};function ME(t){return Ey?Ey(t):[t,OE]}function LE(t){let l={hasErrorBoundary:t.hasErrorBoundary||t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&(t.element&&Rt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(l,{element:k.createElement(t.Component),Component:void 0})),t.HydrateFallback&&(t.hydrateFallbackElement&&Rt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(l,{hydrateFallbackElement:k.createElement(t.HydrateFallback),HydrateFallback:void 0})),t.ErrorBoundary&&(t.errorElement&&Rt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(l,{errorElement:k.createElement(t.ErrorBoundary),ErrorBoundary:void 0})),l}var UE=["HydrateFallback","hydrateFallbackElement"],BE=class{constructor(){this.status="pending",this.promise=new Promise((t,l)=>{this.resolve=a=>{this.status==="pending"&&(this.status="resolved",t(a))},this.reject=a=>{this.status==="pending"&&(this.status="rejected",l(a))}})}};function HE({router:t,flushSync:l,onError:a,unstable_useTransitions:r}){r=dE()||r;let[s,c]=k.useState(t.state),[d,p]=ME(s),[m,y]=k.useState(),[g,b]=k.useState({isTransitioning:!1}),[S,E]=k.useState(),[j,N]=k.useState(),[C,A]=k.useState(),D=k.useRef(new Map),te=k.useCallback((ne,{deletedFetchers:W,newErrors:R,flushSync:V,viewTransitionOpts:G})=>{R&&a&&Object.values(R).forEach(le=>a(le,{location:ne.location,params:ne.matches[0]?.params??{},unstable_pattern:Kr(ne.matches)})),ne.fetchers.forEach((le,$)=>{le.data!==void 0&&D.current.set($,le.data)}),W.forEach(le=>D.current.delete(le)),Sy(V===!1||l!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let F=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(Sy(G==null||F,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!G||!F){l&&V?l(()=>c(ne)):r===!1?c(ne):k.startTransition(()=>{r===!0&&p(le=>wy(le,ne)),c(ne)});return}if(l&&V){l(()=>{j&&(S?.resolve(),j.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:G.currentLocation,nextLocation:G.nextLocation})});let le=t.window.document.startViewTransition(()=>{l(()=>c(ne))});le.finished.finally(()=>{l(()=>{E(void 0),N(void 0),y(void 0),b({isTransitioning:!1})})}),l(()=>N(le));return}j?(S?.resolve(),j.skipTransition(),A({state:ne,currentLocation:G.currentLocation,nextLocation:G.nextLocation})):(y(ne),b({isTransitioning:!0,flushSync:!1,currentLocation:G.currentLocation,nextLocation:G.nextLocation}))},[t.window,l,j,S,r,p,a]);k.useLayoutEffect(()=>t.subscribe(te),[t,te]),k.useEffect(()=>{g.isTransitioning&&!g.flushSync&&E(new BE)},[g]),k.useEffect(()=>{if(S&&m&&t.window){let ne=m,W=S.promise,R=t.window.document.startViewTransition(async()=>{r===!1?c(ne):k.startTransition(()=>{r===!0&&p(V=>wy(V,ne)),c(ne)}),await W});R.finished.finally(()=>{E(void 0),N(void 0),y(void 0),b({isTransitioning:!1})}),N(R)}},[m,S,t.window,r,p]),k.useEffect(()=>{S&&m&&d.location.key===m.location.key&&S.resolve()},[S,j,d.location,m]),k.useEffect(()=>{!g.isTransitioning&&C&&(y(C.state),b({isTransitioning:!0,flushSync:!1,currentLocation:C.currentLocation,nextLocation:C.nextLocation}),A(void 0))},[g.isTransitioning,C]);let P=k.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:ne=>t.navigate(ne),push:(ne,W,R)=>t.navigate(ne,{state:W,preventScrollReset:R?.preventScrollReset}),replace:(ne,W,R)=>t.navigate(ne,{replace:!0,state:W,preventScrollReset:R?.preventScrollReset})}),[t]),H=t.basename||"/",_=k.useMemo(()=>({router:t,navigator:P,static:!1,basename:H,onError:a}),[t,P,H,a]);return k.createElement(k.Fragment,null,k.createElement(Yi.Provider,{value:_},k.createElement(Zr.Provider,{value:d},k.createElement(Fv.Provider,{value:D.current},k.createElement(Ed.Provider,{value:g},k.createElement(VE,{basename:H,location:d.location,navigationType:d.historyAction,navigator:P,unstable_useTransitions:r},k.createElement(qE,{routes:t.routes,future:t.future,state:d,onError:a})))))),null)}function wy(t,l){return{...t,navigation:l.navigation.state!=="idle"?l.navigation:t.navigation,revalidation:l.revalidation!=="idle"?l.revalidation:t.revalidation,actionData:l.navigation.state!=="submitting"?l.actionData:t.actionData,fetchers:l.fetchers}}var qE=k.memo(YE);function YE({routes:t,future:l,state:a,onError:r}){return SE(t,void 0,a,r,l)}function GE(t){return xE(t.context)}function VE({basename:t="/",children:l=null,location:a,navigationType:r="POP",navigator:o,static:s=!1,unstable_useTransitions:c}){Be(!Pr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=t.replace(/^\/*/,"/"),p=k.useMemo(()=>({basename:d,navigator:o,static:s,unstable_useTransitions:c,future:{}}),[d,o,s,c]);typeof a=="string"&&(a=fi(a));let{pathname:m="/",search:y="",hash:g="",state:b=null,key:S="default"}=a,E=k.useMemo(()=>{let j=On(m,d);return j==null?null:{location:{pathname:j,search:y,hash:g,state:b,key:S},navigationType:r}},[d,m,y,g,b,S,r]);return Rt(E!=null,`<Router basename="${d}"> is not able to match the URL "${m}${y}${g}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:k.createElement(Mn.Provider,{value:p},k.createElement(Vo.Provider,{children:l,value:E}))}var Ro="get",No="application/x-www-form-urlencoded";function Fo(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function FE(t){return Fo(t)&&t.tagName.toLowerCase()==="button"}function IE(t){return Fo(t)&&t.tagName.toLowerCase()==="form"}function QE(t){return Fo(t)&&t.tagName.toLowerCase()==="input"}function XE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function $E(t,l){return t.button===0&&(!l||l==="_self")&&!XE(t)}var xo=null;function KE(){if(xo===null)try{new FormData(document.createElement("form"),0),xo=!1}catch{xo=!0}return xo}var ZE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ef(t){return t!=null&&!ZE.has(t)?(Rt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${No}"`),null):t}function PE(t,l){let a,r,o,s,c;if(IE(t)){let d=t.getAttribute("action");r=d?On(d,l):null,a=t.getAttribute("method")||Ro,o=Ef(t.getAttribute("enctype"))||No,s=new FormData(t)}else if(FE(t)||QE(t)&&(t.type==="submit"||t.type==="image")){let d=t.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let p=t.getAttribute("formaction")||d.getAttribute("action");if(r=p?On(p,l):null,a=t.getAttribute("formmethod")||d.getAttribute("method")||Ro,o=Ef(t.getAttribute("formenctype"))||Ef(d.getAttribute("enctype"))||No,s=new FormData(d,t),!KE()){let{name:m,type:y,value:g}=t;if(y==="image"){let b=m?`${m}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else m&&s.append(m,g)}}else{if(Fo(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');a=Ro,r=null,o=No,c=t}return s&&o==="text/plain"&&(c=s,s=void 0),{action:r,method:a.toLowerCase(),encType:o,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Td(t,l){if(t===!1||t===null||typeof t>"u")throw new Error(l)}function JE(t,l,a,r){let o=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return a?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${r}`:o.pathname=`${o.pathname}.${r}`:o.pathname==="/"?o.pathname=`_root.${r}`:l&&On(o.pathname,l)==="/"?o.pathname=`${l.replace(/\/$/,"")}/_root.${r}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${r}`,o}async function WE(t,l){if(t.id in l)return l[t.id];try{let a=await import(t.module);return l[t.id]=a,a}catch(a){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(a),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function ew(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function tw(t,l,a){let r=await Promise.all(t.map(async o=>{let s=l.routes[o.route.id];if(s){let c=await WE(s,a);return c.links?c.links():[]}return[]}));return aw(r.flat(1).filter(ew).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function ky(t,l,a,r,o,s){let c=(p,m)=>a[m]?p.route.id!==a[m].route.id:!0,d=(p,m)=>a[m].pathname!==p.pathname||a[m].route.path?.endsWith("*")&&a[m].params["*"]!==p.params["*"];return s==="assets"?l.filter((p,m)=>c(p,m)||d(p,m)):s==="data"?l.filter((p,m)=>{let y=r.routes[p.route.id];if(!y||!y.hasLoader)return!1;if(c(p,m)||d(p,m))return!0;if(p.route.shouldRevalidate){let g=p.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:a[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:p.params,defaultShouldRevalidate:!0});if(typeof g=="boolean")return g}return!0}):[]}function nw(t,l,{includeHydrateFallback:a}={}){return lw(t.map(r=>{let o=l.routes[r.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),a&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function lw(t){return[...new Set(t)]}function iw(t){let l={},a=Object.keys(t).sort();for(let r of a)l[r]=t[r];return l}function aw(t,l){let a=new Set;return new Set(l),t.reduce((r,o)=>{let s=JSON.stringify(iw(o));return a.has(s)||(a.add(s),r.push({key:s,link:o})),r},[])}function Wv(){let t=k.useContext(Yi);return Td(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function rw(){let t=k.useContext(Zr);return Td(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var jd=k.createContext(void 0);jd.displayName="FrameworkContext";function e0(){let t=k.useContext(jd);return Td(t,"You must render this element inside a <HydratedRouter> element"),t}function uw(t,l){let a=k.useContext(jd),[r,o]=k.useState(!1),[s,c]=k.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:m,onMouseLeave:y,onTouchStart:g}=l,b=k.useRef(null);k.useEffect(()=>{if(t==="render"&&c(!0),t==="viewport"){let j=C=>{C.forEach(A=>{c(A.isIntersecting)})},N=new IntersectionObserver(j,{threshold:.5});return b.current&&N.observe(b.current),()=>{N.disconnect()}}},[t]),k.useEffect(()=>{if(r){let j=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(j)}}},[r]);let S=()=>{o(!0)},E=()=>{o(!1),c(!1)};return a?t!=="intent"?[s,b,{}]:[s,b,{onFocus:zr(d,S),onBlur:zr(p,E),onMouseEnter:zr(m,S),onMouseLeave:zr(y,E),onTouchStart:zr(g,S)}]:[!1,b,{}]}function zr(t,l){return a=>{t&&t(a),a.defaultPrevented||l(a)}}function ow({page:t,...l}){let{router:a}=Wv(),r=k.useMemo(()=>ri(a.routes,t,a.basename),[a.routes,t,a.basename]);return r?k.createElement(cw,{page:t,matches:r,...l}):null}function sw(t){let{manifest:l,routeModules:a}=e0(),[r,o]=k.useState([]);return k.useEffect(()=>{let s=!1;return tw(t,l,a).then(c=>{s||o(c)}),()=>{s=!0}},[t,l,a]),r}function cw({page:t,matches:l,...a}){let r=tl(),{future:o,manifest:s,routeModules:c}=e0(),{basename:d}=Wv(),{loaderData:p,matches:m}=rw(),y=k.useMemo(()=>ky(t,l,m,s,r,"data"),[t,l,m,s,r]),g=k.useMemo(()=>ky(t,l,m,s,r,"assets"),[t,l,m,s,r]),b=k.useMemo(()=>{if(t===r.pathname+r.search+r.hash)return[];let j=new Set,N=!1;if(l.forEach(A=>{let D=s.routes[A.route.id];!D||!D.hasLoader||(!y.some(te=>te.route.id===A.route.id)&&A.route.id in p&&c[A.route.id]?.shouldRevalidate||D.hasClientLoader?N=!0:j.add(A.route.id))}),j.size===0)return[];let C=JE(t,d,o.unstable_trailingSlashAwareDataRequests,"data");return N&&j.size>0&&C.searchParams.set("_routes",l.filter(A=>j.has(A.route.id)).map(A=>A.route.id).join(",")),[C.pathname+C.search]},[d,o.unstable_trailingSlashAwareDataRequests,p,r,s,y,l,t,c]),S=k.useMemo(()=>nw(g,s),[g,s]),E=sw(g);return k.createElement(k.Fragment,null,b.map(j=>k.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...a})),S.map(j=>k.createElement("link",{key:j,rel:"modulepreload",href:j,...a})),E.map(({key:j,link:N})=>k.createElement("link",{key:j,nonce:a.nonce,...N,crossOrigin:N.crossOrigin??a.crossOrigin})))}function fw(...t){return l=>{t.forEach(a=>{typeof a=="function"?a(l):a!=null&&(a.current=l)})}}var dw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{dw&&(window.__reactRouterVersion="7.13.0")}catch{}function hw(t,l){return YS({basename:l?.basename,getContext:l?.getContext,future:l?.future,history:lS({window:l?.window}),hydrationData:mw(),routes:t,mapRouteProperties:LE,hydrationRouteProperties:UE,dataStrategy:l?.dataStrategy,patchRoutesOnNavigation:l?.patchRoutesOnNavigation,window:l?.window,unstable_instrumentations:l?.unstable_instrumentations}).initialize()}function mw(){let t=window?.__staticRouterHydrationData;return t&&t.errors&&(t={...t,errors:pw(t.errors)}),t}function pw(t){if(!t)return null;let l=Object.entries(t),a={};for(let[r,o]of l)if(o&&o.__type==="RouteErrorResponse")a[r]=new $r(o.status,o.statusText,o.data,o.internal===!0);else if(o&&o.__type==="Error"){if(o.__subType){let s=window[o.__subType];if(typeof s=="function")try{let c=new s(o.message);c.stack="",a[r]=c}catch{}}if(a[r]==null){let s=new Error(o.message);s.stack="",a[r]=s}}else a[r]=o;return a}var t0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,n0=k.forwardRef(function({onClick:l,discover:a="render",prefetch:r="none",relative:o,reloadDocument:s,replace:c,state:d,target:p,to:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},E){let{basename:j,unstable_useTransitions:N}=k.useContext(Mn),C=typeof m=="string"&&t0.test(m),A=Nv(m,j);m=A.to;let D=vE(m,{relative:o}),[te,P,H]=uw(r,S),_=bw(m,{replace:c,state:d,target:p,preventScrollReset:y,relative:o,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:N});function ne(R){l&&l(R),R.defaultPrevented||_(R)}let W=k.createElement("a",{...S,...H,href:A.absoluteURL||D,onClick:A.isExternal||s?l:ne,ref:fw(E,P),target:p,"data-discover":!C&&a==="render"?"true":void 0});return te&&!C?k.createElement(k.Fragment,null,W,k.createElement(ow,{page:D})):W});n0.displayName="Link";var gw=k.forwardRef(function({"aria-current":l="page",caseSensitive:a=!1,className:r="",end:o=!1,style:s,to:c,viewTransition:d,children:p,...m},y){let g=Jr(c,{relative:m.relative}),b=tl(),S=k.useContext(Zr),{navigator:E,basename:j}=k.useContext(Mn),N=S!=null&&kw(g)&&d===!0,C=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,A=b.pathname,D=S&&S.navigation&&S.navigation.location?S.navigation.location.pathname:null;a||(A=A.toLowerCase(),D=D?D.toLowerCase():null,C=C.toLowerCase()),D&&j&&(D=On(D,j)||D);const te=C!=="/"&&C.endsWith("/")?C.length-1:C.length;let P=A===C||!o&&A.startsWith(C)&&A.charAt(te)==="/",H=D!=null&&(D===C||!o&&D.startsWith(C)&&D.charAt(C.length)==="/"),_={isActive:P,isPending:H,isTransitioning:N},ne=P?l:void 0,W;typeof r=="function"?W=r(_):W=[r,P?"active":null,H?"pending":null,N?"transitioning":null].filter(Boolean).join(" ");let R=typeof s=="function"?s(_):s;return k.createElement(n0,{...m,"aria-current":ne,className:W,ref:y,style:R,to:c,viewTransition:d},typeof p=="function"?p(_):p)});gw.displayName="NavLink";var yw=k.forwardRef(({discover:t="render",fetcherKey:l,navigate:a,reloadDocument:r,replace:o,state:s,method:c=Ro,action:d,onSubmit:p,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b,...S},E)=>{let{unstable_useTransitions:j}=k.useContext(Mn),N=Ew(),C=ww(d,{relative:m}),A=c.toLowerCase()==="get"?"get":"post",D=typeof d=="string"&&t0.test(d),te=P=>{if(p&&p(P),P.defaultPrevented)return;P.preventDefault();let H=P.nativeEvent.submitter,_=H?.getAttribute("formmethod")||c,ne=()=>N(H||P.currentTarget,{fetcherKey:l,method:_,navigate:a,replace:o,state:s,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});j&&a!==!1?k.startTransition(()=>ne()):ne()};return k.createElement("form",{ref:E,method:A,action:C,onSubmit:r?p:te,...S,"data-discover":!D&&t==="render"?"true":void 0})});yw.displayName="Form";function vw(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function l0(t){let l=k.useContext(Yi);return Be(l,vw(t)),l}function bw(t,{target:l,replace:a,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d,unstable_useTransitions:p}={}){let m=Oa(),y=tl(),g=Jr(t,{relative:s});return k.useCallback(b=>{if($E(b,l)){b.preventDefault();let S=a!==void 0?a:el(y)===el(g),E=()=>m(t,{replace:S,state:r,preventScrollReset:o,relative:s,viewTransition:c,unstable_defaultShouldRevalidate:d});p?k.startTransition(()=>E()):E()}},[y,m,g,a,r,l,t,o,s,c,d,p])}var xw=0,Sw=()=>`__${String(++xw)}__`;function Ew(){let{router:t}=l0("useSubmit"),{basename:l}=k.useContext(Mn),a=RE(),r=t.fetch,o=t.navigate;return k.useCallback(async(s,c={})=>{let{action:d,method:p,encType:m,formData:y,body:g}=PE(s,l);if(c.navigate===!1){let b=c.fetcherKey||Sw();await r(b,a,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||m,flushSync:c.flushSync})}else await o(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:y,body:g,formMethod:c.method||p,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:a,flushSync:c.flushSync,viewTransition:c.viewTransition})},[r,o,l,a])}function ww(t,{relative:l}={}){let{basename:a}=k.useContext(Mn),r=k.useContext(Qn);Be(r,"useFormAction must be used inside a RouteContext");let[o]=r.matches.slice(-1),s={...Jr(t||".",{relative:l})},c=tl();if(t==null){s.search=c.search;let d=new URLSearchParams(s.search),p=d.getAll("index");if(p.some(y=>y==="")){d.delete("index"),p.filter(g=>g).forEach(g=>d.append("index",g));let y=d.toString();s.search=y?`?${y}`:""}}return(!t||t===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),a!=="/"&&(s.pathname=s.pathname==="/"?a:Wn([a,s.pathname])),el(s)}function kw(t,{relative:l}={}){let a=k.useContext(Ed);Be(a!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=l0("useViewTransitionState"),o=Jr(t,{relative:l});if(!a.isTransitioning)return!1;let s=On(a.currentLocation.pathname,r)||a.currentLocation.pathname,c=On(a.nextLocation.pathname,r)||a.nextLocation.pathname;return Mo(o.pathname,c)!=null||Mo(o.pathname,s)!=null}var Io=wv();function Cw(t){return k.createElement(HE,{flushSync:Io.flushSync,...t})}const Ad="electric-agent:anthropic-api-key",Qo="electric-agent:oauth-token",_d="electric-agent:oauth-manual",Rd="electric-agent:gh-token";function i0(){return localStorage.getItem(Ad)}function Tw(t){localStorage.setItem(Ad,t)}function jw(){localStorage.removeItem(Ad)}function Aw(){return!!i0()}function Xf(){return localStorage.getItem(Qo)}function _w(t){localStorage.setItem(Qo,t)}function Rw(){localStorage.removeItem(Qo),localStorage.removeItem(_d)}function Nw(t){localStorage.setItem(Qo,t),localStorage.setItem(_d,"1")}function zo(){return localStorage.getItem(_d)==="1"}function Nd(){return localStorage.getItem(Rd)}function zw(t){localStorage.setItem(Rd,t)}function Dw(){localStorage.removeItem(Rd)}function Ow(){return!!Nd()}function Ma(){let t=localStorage.getItem("participant-id"),l=localStorage.getItem("participant-name");return t||(t=crypto.randomUUID(),localStorage.setItem("participant-id",t)),l||(l=`User-${t.slice(0,4)}`,localStorage.setItem("participant-name",l)),{id:t,displayName:l}}const Xo="electric-agent:sessions",zd="electric-agent:session-tokens";function za(){try{const t=localStorage.getItem(Xo);return t?JSON.parse(t):[]}catch{return[]}}function a0(t){const a=za().filter(r=>r.id!==t.id);a.push(t),localStorage.setItem(Xo,JSON.stringify(a))}function Cy(t,l){const a=za(),r=a.find(o=>o.id===t);r&&(Object.assign(r,l,{lastActiveAt:new Date().toISOString()}),localStorage.setItem(Xo,JSON.stringify(a)))}function Mw(t){const a=za().filter(r=>r.id!==t);localStorage.setItem(Xo,JSON.stringify(a)),Lw(t)}function Ty(t){return za().find(l=>l.id===t)}function Dd(){try{const t=localStorage.getItem(zd);return t?JSON.parse(t):{}}catch{return{}}}function Od(t,l){const a=Dd();a[t]=l,localStorage.setItem(zd,JSON.stringify(a))}function Md(t){return Dd()[t]}function Lw(t){const l=Dd();delete l[t],localStorage.setItem(zd,JSON.stringify(l))}const r0="electric-agent:room-tokens";function u0(){try{const t=localStorage.getItem(r0);return t?JSON.parse(t):{}}catch{return{}}}function o0(t,l){const a=u0();a[t]=l,localStorage.setItem(r0,JSON.stringify(a))}function s0(t){return u0()[t]}const Uw="/api";function c0(){const t={},l=i0(),a=Xf(),r=Nd();return a?t.oauthToken=a:l&&(t.apiKey=l),r&&(t.ghToken=r),t}function f0(){const t=Nd();return t?{"X-GH-Token":t}:{}}function Bw(){const t=Ma();return{"X-Participant-Id":t.id,"X-Participant-Name":t.displayName}}function Hw(t){return t.match(/^\/sessions\/([^/]+)/)?.[1]}function qw(t){const l=t.match(/^\/shared-sessions\/([^/]+)/);if(l&&l[1]!=="join")return l[1]}async function Dt(t,l){const a={...Bw(),...l?.headers};l?.body&&(a["Content-Type"]="application/json");const r=Hw(t);if(r){const c=Md(r);c&&(a.Authorization=`Bearer ${c}`)}const o=qw(t);if(o){const c=s0(o);c&&(a.Authorization=`Bearer ${c}`)}const s=await fetch(`${Uw}${t}`,{method:l?.method??"GET",headers:Object.keys(a).length>0?a:void 0,body:l?.body?JSON.stringify(l.body):void 0});if(!s.ok){const c=await s.json().catch(()=>({error:s.statusText}));throw new Error(c.error||s.statusText)}return s.json()}async function Yw(t,l){const a=await Dt("/sessions",{method:"POST",body:{description:t,name:l,...c0()}});return a.sessionToken&&Od(a.sessionId,a.sessionToken),a}function Gw(t,l){return Dt(`/sessions/${t}/iterate`,{method:"POST",body:{request:l}})}function $f(t,l,a){return Dt(`/sessions/${t}/respond`,{method:"POST",body:{gate:l,...a}})}function Vw(t){return Dt(`/sessions/${t}/interrupt`,{method:"POST"})}function Fw(t){return Dt(`/sessions/${t}`,{method:"DELETE"})}function Iw(){return Dt("/provision-electric",{method:"POST"})}function Qw(){return Dt("/github/repos",{headers:f0()})}function Xw(t){return Dt(`/github/repos/${t}/branches`,{headers:f0()})}function $w(){return Dt("/credentials/keychain")}async function Kw(t,l){const a=await Dt("/sessions/resume",{method:"POST",body:{repoUrl:t,branch:l,...c0()}});return a.sessionToken&&Od(a.sessionId,a.sessionToken),a}async function Zw(t){const l=Ma(),a=await Dt("/shared-sessions",{method:"POST",body:{name:t,participant:l}});return a.roomToken&&o0(a.id,a.roomToken),a}async function Pw(t){const l=await Dt(`/shared-sessions/join/${t}`);return l.roomToken&&o0(l.id,l.roomToken),l}function Jw(t){const l=Ma();return Dt(`/shared-sessions/${t}/join`,{method:"POST",body:{participant:l}})}function Ww(t){const l=Ma();return Dt(`/shared-sessions/${t}/leave`,{method:"POST",body:{participantId:l.id}})}function ek(t){const l=Ma();return Dt(`/shared-sessions/${t}/ping`,{method:"POST",body:{participantId:l.id,displayName:l.displayName}})}function tk(t){return Dt(`/shared-sessions/${t}/presence`)}function nk(t,l,a,r){const o=Ma();return Dt(`/shared-sessions/${t}/sessions`,{method:"POST",body:{sessionId:l,sessionName:a,sessionDescription:r,linkedBy:o.displayName}})}function lk(t,l){return Dt(`/shared-sessions/${t}/sessions/${l}`,{method:"DELETE"})}function ik(t,l){return Dt(`/shared-sessions/${t}/sessions/${l}/token`)}const Ld="electric-agent:joined-shared-sessions";function Lo(){try{const t=localStorage.getItem(Ld);return t?JSON.parse(t):[]}catch{return[]}}function ak(t){const l=Lo(),a=l.findIndex(r=>r.code===t.code);a>=0?l[a]=t:l.push(t),localStorage.setItem(Ld,JSON.stringify(l))}function d0(t){const a=Lo().filter(r=>r.code!==t);localStorage.setItem(Ld,JSON.stringify(a))}function rk(t,l,a){k.useEffect(()=>{function r(o){{const s=o.target?.tagName;if(s==="INPUT"||s==="TEXTAREA"||s==="SELECT")return}o.key===t&&(o.preventDefault(),l())}return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t,l,a?.disabled,a?.allowInInputs])}function $o(t,l){k.useEffect(()=>{if(l)return;function a(r){r.key==="Escape"&&(r.preventDefault(),t())}return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[t,l])}const jy=[{bg:"#4a3f6b",fg:"#d0bcff"},{bg:"#2d4a4a",fg:"#75fbfd"},{bg:"#3b4a2d",fg:"#a8e6a1"},{bg:"#4a3a2d",fg:"#ffb87a"},{bg:"#4a2d3b",fg:"#f8a4c8"},{bg:"#2d3b4a",fg:"#9ecbff"},{bg:"#4a4a2d",fg:"#e6e6a1"},{bg:"#3b2d4a",fg:"#c4a4f8"},{bg:"#2d4a3b",fg:"#75e6b8"},{bg:"#4a2d2d",fg:"#f8a4a4"},{bg:"#2d3a4a",fg:"#a4d4f8"},{bg:"#4a3b2d",fg:"#e6c4a1"}];function uk(t){let l=0;for(let a=0;a<t.length;a++)l=(l<<5)-l+t.charCodeAt(a)|0;return Math.abs(l)}function h0(t){return jy[uk(t)%jy.length]}function ok(t){const l=Date.now()-new Date(t).getTime(),a=Math.floor(l/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const r=Math.floor(a/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function sk({projectName:t,onConfirm:l,onCancel:a}){return $o(a),rk("Enter",l),Io.createPortal(x.jsx("div",{className:"modal-overlay",onClick:a,children:x.jsxs("div",{className:"modal-card",onClick:r=>r.stopPropagation(),children:[x.jsxs("div",{className:"modal-title",children:["Delete ",t,"?"]}),x.jsx("div",{className:"modal-body",children:"All containers, database state, and generated code will be permanently lost."}),x.jsxs("div",{className:"modal-actions",children:[x.jsx("button",{type:"button",className:"modal-btn",onClick:a,children:"Cancel"}),x.jsx("button",{type:"button",className:"modal-btn modal-btn-danger",onClick:l,children:"Delete"})]})]})}),document.body)}function ck({session:t,active:l,onClick:a,onDelete:r}){const[o,s]=k.useState(!1),d=`session-avatar ${`session-avatar-${t.status}`}`,p=h0(t.id),m={background:p.bg,color:p.fg},y=t.projectName.split(/[-_ ]+/).slice(0,2).map(g=>g.charAt(0).toUpperCase()).join("");return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:`session-item ${l?"active":""}`,onClick:a,title:t.projectName,children:[x.jsx("span",{className:d,style:m,children:y}),x.jsxs("div",{className:"session-item-details",children:[x.jsx("div",{className:"session-item-name",children:t.projectName}),x.jsx("div",{className:"session-item-meta",children:x.jsx("span",{children:ok(t.lastActiveAt)})})]}),x.jsx("button",{type:"button",className:"session-item-delete",onClick:g=>{g.stopPropagation(),s(!0)},title:"Delete session",children:"×"})]}),o&&x.jsx(sk,{projectName:t.projectName,onConfirm:()=>{s(!1),r()},onCancel:()=>s(!1)})]})}function fk({collapsed:t}){return x.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-label":t?"Expand menu":"Collapse menu",children:[x.jsx("title",{children:t?"Expand menu":"Collapse menu"}),x.jsx("rect",{x:"2",y:"2",width:"12",height:"12",rx:"2"}),x.jsx("line",{x1:"6",y1:"2",x2:"6",y2:"14"}),t?x.jsx("polyline",{points:"9 6.5 11.5 8 9 9.5"}):x.jsx("polyline",{points:"11.5 6.5 9 8 11.5 9.5"})]})}function dk(){return x.jsxs("svg",{viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",width:"14",height:"14",children:[x.jsx("title",{children:"Join room"}),x.jsx("path",{d:"M6.5 9.5a3.5 3.5 0 0 0 5 0l2-2a3.5 3.5 0 0 0-5-5l-1 1"}),x.jsx("path",{d:"M9.5 6.5a3.5 3.5 0 0 0-5 0l-2 2a3.5 3.5 0 0 0 5 5l1-1"})]})}function hk({collapsed:t,onToggle:l,mobileOpen:a,onMobileClose:r}){const{sessions:o,pendingProject:s,handleDeleteSession:c,joinedSharedSessions:d,refreshJoinedSharedSessions:p}=Po(),m=Oa(),y=tl(),[g,b]=k.useState(!1),[S,E]=k.useState(""),[j,N]=k.useState(!1),[C,A]=k.useState("");k.useEffect(()=>{t&&(b(!1),E(""),N(!1),A(""))},[t]);const D=y.pathname.startsWith("/session/")?y.pathname.split("/session/")[1]:null,te=y.pathname.startsWith("/shared/")?y.pathname.split("/shared/")[1]:null,P=[...o].sort((R,V)=>new Date(V.lastActiveAt).getTime()-new Date(R.lastActiveAt).getTime()),H=R=>{m(R),r?.()},_=k.useCallback(()=>{const R=S.trim();R&&(m(`/shared/${R}`),E(""),b(!1),r?.())},[S,m,r]),ne=k.useCallback(R=>{d0(R),p()},[p]),W=k.useCallback(async()=>{const R=C.trim();if(R)try{const{code:V}=await Zw(R);A(""),N(!1),m(`/shared/${V}`),r?.()}catch(V){console.error("Failed to create shared session:",V)}},[C,m,r]);return x.jsxs("aside",{className:`sidebar ${a?"mobile-open":""}`,children:[x.jsxs("div",{className:"sidebar-header",children:[x.jsxs("svg",{className:"sidebar-icon",viewBox:"0 0 192 192","aria-label":"Electric",children:[x.jsx("title",{children:"Electric"}),x.jsx("path",{d:"M106.992 16.1244C107.711 15.4029 108.683 15 109.692 15H170L84.0082 101.089C83.2888 101.811 82.3171 102.213 81.3081 102.213H21L106.992 16.1244Z",fill:"var(--brand-1)"}),x.jsx("path",{d:"M96.4157 104.125C96.4157 103.066 97.2752 102.204 98.331 102.204H170L96.4157 176V104.125Z",fill:"var(--brand-1)"})]}),x.jsx("span",{className:"sidebar-brand",children:"Electric Agent"})]}),x.jsxs("div",{className:"sidebar-sessions",children:[x.jsx("div",{className:"sidebar-section-label",children:"Sessions"}),x.jsxs("div",{className:"session-item",onClick:()=>H("/"),title:"New App",children:[x.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),x.jsx("div",{className:"session-item-details",children:x.jsx("div",{className:"session-item-name",children:"New App"})})]}),s&&x.jsxs("div",{className:"session-item session-item-pending",title:s.name,children:[x.jsx("span",{className:"session-avatar session-avatar-pending"}),x.jsxs("div",{className:"session-item-details",children:[x.jsx("div",{className:"session-item-name",children:s.name}),x.jsx("div",{className:"session-item-meta",children:x.jsx("span",{children:"Setting up..."})})]})]}),P.map(R=>x.jsx(ck,{session:R,active:R.id===D,onClick:()=>H(`/session/${R.id}`),onDelete:()=>c(R.id)},R.id)),x.jsx("div",{className:"sidebar-section-label",children:"Rooms"}),d.map(R=>{const V=h0(R.id),G=R.name.split(/[-_ ]+/).slice(0,2).map(F=>F.charAt(0).toUpperCase()).join("");return x.jsxs("div",{className:`session-item ${te===R.code?"active":""}`,onClick:()=>H(`/shared/${R.code}`),title:R.name,children:[x.jsx("span",{className:"session-avatar session-avatar-shared",style:{background:V.bg,color:V.fg},children:G}),x.jsxs("div",{className:"session-item-details",children:[x.jsx("div",{className:"session-item-name",children:R.name}),x.jsx("div",{className:"session-item-meta",children:x.jsx("span",{children:R.code})})]}),x.jsx("button",{type:"button",className:"session-item-delete",onClick:F=>{F.stopPropagation(),ne(R.code)},title:"Remove",children:"×"})]},R.code)}),j&&!t?x.jsxs("div",{className:"sidebar-join-input",children:[x.jsx("input",{type:"text",placeholder:"Room name...",value:C,onChange:R=>A(R.target.value),onKeyDown:R=>{R.key==="Enter"&&W(),R.key==="Escape"&&(N(!1),A(""))}}),x.jsx("button",{type:"button",className:"sidebar-join-go",onClick:W,disabled:!C.trim(),children:"Go"})]}):x.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),N(!0)},title:"Create room",children:[x.jsx("span",{className:"session-avatar new-project-avatar",children:"+"}),x.jsx("div",{className:"session-item-details",children:x.jsx("div",{className:"session-item-name",children:"Create"})})]}),g&&!t?x.jsxs("div",{className:"sidebar-join-input",children:[x.jsx("input",{type:"text",placeholder:"Invite code...",value:S,onChange:R=>E(R.target.value),onKeyDown:R=>{R.key==="Enter"&&_(),R.key==="Escape"&&(b(!1),E(""))}}),x.jsx("button",{type:"button",className:"sidebar-join-go",onClick:_,disabled:!S.trim(),children:"Go"})]}):x.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),b(!0)},title:"Join room",children:[x.jsx("span",{className:"session-avatar new-project-avatar",children:x.jsx(dk,{})}),x.jsx("div",{className:"session-item-details",children:x.jsx("div",{className:"session-item-name",children:"Join"})})]})]}),x.jsx("div",{className:"sidebar-collapse",children:x.jsxs("button",{type:"button",className:"sidebar-collapse-btn",onClick:l,children:[x.jsx(fk,{collapsed:t}),x.jsx("span",{className:"sidebar-collapse-label",children:t?"Expand menu":"Collapse menu"})]})})]})}let mk={data:""},pk=t=>{if(typeof window=="object"){let l=(t?t.querySelector("#_goober"):window._goober)||Object.assign(document.createElement("style"),{innerHTML:" ",id:"_goober"});return l.nonce=window.__nonce__,l.parentNode||(t||document.head).appendChild(l),l.firstChild}return t||mk},gk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,yk=/\/\*[^]*?\*\/| +/g,Ay=/\n+/g,oi=(t,l)=>{let a="",r="",o="";for(let s in t){let c=t[s];s[0]=="@"?s[1]=="i"?a=s+" "+c+";":r+=s[1]=="f"?oi(c,s):s+"{"+oi(c,s[1]=="k"?"":l)+"}":typeof c=="object"?r+=oi(c,l?l.replace(/([^,])+/g,d=>s.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,p=>/&/.test(p)?p.replace(/&/g,d):d?d+" "+p:p)):s):c!=null&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),o+=oi.p?oi.p(s,c):s+":"+c+";")}return a+(l&&o?l+"{"+o+"}":o)+r},Cl={},m0=t=>{if(typeof t=="object"){let l="";for(let a in t)l+=a+m0(t[a]);return l}return t},vk=(t,l,a,r,o)=>{let s=m0(t),c=Cl[s]||(Cl[s]=(p=>{let m=0,y=11;for(;m<p.length;)y=101*y+p.charCodeAt(m++)>>>0;return"go"+y})(s));if(!Cl[c]){let p=s!==t?t:(m=>{let y,g,b=[{}];for(;y=gk.exec(m.replace(yk,""));)y[4]?b.shift():y[3]?(g=y[3].replace(Ay," ").trim(),b.unshift(b[0][g]=b[0][g]||{})):b[0][y[1]]=y[2].replace(Ay," ").trim();return b[0]})(t);Cl[c]=oi(o?{["@keyframes "+c]:p}:p,a?"":"."+c)}let d=a&&Cl.g?Cl.g:null;return a&&(Cl.g=Cl[c]),((p,m,y,g)=>{g?m.data=m.data.replace(g,p):m.data.indexOf(p)===-1&&(m.data=y?p+m.data:m.data+p)})(Cl[c],l,r,d),c},bk=(t,l,a)=>t.reduce((r,o,s)=>{let c=l[s];if(c&&c.call){let d=c(a),p=d&&d.props&&d.props.className||/^go/.test(d)&&d;c=p?"."+p:d&&typeof d=="object"?d.props?"":oi(d,""):d===!1?"":d}return r+o+(c??"")},"");function Ko(t){let l=this||{},a=t.call?t(l.p):t;return vk(a.unshift?a.raw?bk(a,[].slice.call(arguments,1),l.p):a.reduce((r,o)=>Object.assign(r,o&&o.call?o(l.p):o),{}):a,pk(l.target),l.g,l.o,l.k)}let p0,Kf,Zf;Ko.bind({g:1});let Al=Ko.bind({k:1});function xk(t,l,a,r){oi.p=l,p0=t,Kf=a,Zf=r}function di(t,l){let a=this||{};return function(){let r=arguments;function o(s,c){let d=Object.assign({},s),p=d.className||o.className;a.p=Object.assign({theme:Kf&&Kf()},d),a.o=/ *go\d+/.test(p),d.className=Ko.apply(a,r)+(p?" "+p:"");let m=t;return t[0]&&(m=d.as||t,delete d.as),Zf&&m[0]&&Zf(d),p0(m,d)}return o}}var Sk=t=>typeof t=="function",Uo=(t,l)=>Sk(t)?t(l):t,Ek=(()=>{let t=0;return()=>(++t).toString()})(),g0=(()=>{let t;return()=>{if(t===void 0&&typeof window<"u"){let l=matchMedia("(prefers-reduced-motion: reduce)");t=!l||l.matches}return t}})(),wk=20,Ud="default",y0=(t,l)=>{let{toastLimit:a}=t.settings;switch(l.type){case 0:return{...t,toasts:[l.toast,...t.toasts].slice(0,a)};case 1:return{...t,toasts:t.toasts.map(c=>c.id===l.toast.id?{...c,...l.toast}:c)};case 2:let{toast:r}=l;return y0(t,{type:t.toasts.find(c=>c.id===r.id)?1:0,toast:r});case 3:let{toastId:o}=l;return{...t,toasts:t.toasts.map(c=>c.id===o||o===void 0?{...c,dismissed:!0,visible:!1}:c)};case 4:return l.toastId===void 0?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(c=>c.id!==l.toastId)};case 5:return{...t,pausedAt:l.time};case 6:let s=l.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(c=>({...c,pauseDuration:c.pauseDuration+s}))}}},Do=[],v0={toasts:[],pausedAt:void 0,settings:{toastLimit:wk}},Jn={},b0=(t,l=Ud)=>{Jn[l]=y0(Jn[l]||v0,t),Do.forEach(([a,r])=>{a===l&&r(Jn[l])})},x0=t=>Object.keys(Jn).forEach(l=>b0(t,l)),kk=t=>Object.keys(Jn).find(l=>Jn[l].toasts.some(a=>a.id===t)),Zo=(t=Ud)=>l=>{b0(l,t)},Ck={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Tk=(t={},l=Ud)=>{let[a,r]=k.useState(Jn[l]||v0),o=k.useRef(Jn[l]);k.useEffect(()=>(o.current!==Jn[l]&&r(Jn[l]),Do.push([l,r]),()=>{let c=Do.findIndex(([d])=>d===l);c>-1&&Do.splice(c,1)}),[l]);let s=a.toasts.map(c=>{var d,p,m;return{...t,...t[c.type],...c,removeDelay:c.removeDelay||((d=t[c.type])==null?void 0:d.removeDelay)||t?.removeDelay,duration:c.duration||((p=t[c.type])==null?void 0:p.duration)||t?.duration||Ck[c.type],style:{...t.style,...(m=t[c.type])==null?void 0:m.style,...c.style}}});return{...a,toasts:s}},jk=(t,l="blank",a)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:l,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...a,id:a?.id||Ek()}),Wr=t=>(l,a)=>{let r=jk(l,t,a);return Zo(r.toasterId||kk(r.id))({type:2,toast:r}),r.id},Lt=(t,l)=>Wr("blank")(t,l);Lt.error=Wr("error");Lt.success=Wr("success");Lt.loading=Wr("loading");Lt.custom=Wr("custom");Lt.dismiss=(t,l)=>{let a={type:3,toastId:t};l?Zo(l)(a):x0(a)};Lt.dismissAll=t=>Lt.dismiss(void 0,t);Lt.remove=(t,l)=>{let a={type:4,toastId:t};l?Zo(l)(a):x0(a)};Lt.removeAll=t=>Lt.remove(void 0,t);Lt.promise=(t,l,a)=>{let r=Lt.loading(l.loading,{...a,...a?.loading});return typeof t=="function"&&(t=t()),t.then(o=>{let s=l.success?Uo(l.success,o):void 0;return s?Lt.success(s,{id:r,...a,...a?.success}):Lt.dismiss(r),o}).catch(o=>{let s=l.error?Uo(l.error,o):void 0;s?Lt.error(s,{id:r,...a,...a?.error}):Lt.dismiss(r)}),t};var Ak=1e3,_k=(t,l="default")=>{let{toasts:a,pausedAt:r}=Tk(t,l),o=k.useRef(new Map).current,s=k.useCallback((g,b=Ak)=>{if(o.has(g))return;let S=setTimeout(()=>{o.delete(g),c({type:4,toastId:g})},b);o.set(g,S)},[]);k.useEffect(()=>{if(r)return;let g=Date.now(),b=a.map(S=>{if(S.duration===1/0)return;let E=(S.duration||0)+S.pauseDuration-(g-S.createdAt);if(E<0){S.visible&&Lt.dismiss(S.id);return}return setTimeout(()=>Lt.dismiss(S.id,l),E)});return()=>{b.forEach(S=>S&&clearTimeout(S))}},[a,r,l]);let c=k.useCallback(Zo(l),[l]),d=k.useCallback(()=>{c({type:5,time:Date.now()})},[c]),p=k.useCallback((g,b)=>{c({type:1,toast:{id:g,height:b}})},[c]),m=k.useCallback(()=>{r&&c({type:6,time:Date.now()})},[r,c]),y=k.useCallback((g,b)=>{let{reverseOrder:S=!1,gutter:E=8,defaultPosition:j}=b||{},N=a.filter(D=>(D.position||j)===(g.position||j)&&D.height),C=N.findIndex(D=>D.id===g.id),A=N.filter((D,te)=>te<C&&D.visible).length;return N.filter(D=>D.visible).slice(...S?[A+1]:[0,A]).reduce((D,te)=>D+(te.height||0)+E,0)},[a]);return k.useEffect(()=>{a.forEach(g=>{if(g.dismissed)s(g.id,g.removeDelay);else{let b=o.get(g.id);b&&(clearTimeout(b),o.delete(g.id))}})},[a,s]),{toasts:a,handlers:{updateHeight:p,startPause:d,endPause:m,calculateOffset:y}}},Rk=Al`
|
|
13
13
|
from {
|
|
14
14
|
transform: scale(0) rotate(45deg);
|
|
15
15
|
opacity: 0;
|
|
@@ -17,7 +17,7 @@ from {
|
|
|
17
17
|
to {
|
|
18
18
|
transform: scale(1) rotate(45deg);
|
|
19
19
|
opacity: 1;
|
|
20
|
-
}`,
|
|
20
|
+
}`,Nk=Al`
|
|
21
21
|
from {
|
|
22
22
|
transform: scale(0);
|
|
23
23
|
opacity: 0;
|
|
@@ -25,7 +25,7 @@ from {
|
|
|
25
25
|
to {
|
|
26
26
|
transform: scale(1);
|
|
27
27
|
opacity: 1;
|
|
28
|
-
}`,
|
|
28
|
+
}`,zk=Al`
|
|
29
29
|
from {
|
|
30
30
|
transform: scale(0) rotate(90deg);
|
|
31
31
|
opacity: 0;
|
|
@@ -33,7 +33,7 @@ from {
|
|
|
33
33
|
to {
|
|
34
34
|
transform: scale(1) rotate(90deg);
|
|
35
35
|
opacity: 1;
|
|
36
|
-
}`,
|
|
36
|
+
}`,Dk=di("div")`
|
|
37
37
|
width: 20px;
|
|
38
38
|
opacity: 0;
|
|
39
39
|
height: 20px;
|
|
@@ -42,14 +42,14 @@ to {
|
|
|
42
42
|
position: relative;
|
|
43
43
|
transform: rotate(45deg);
|
|
44
44
|
|
|
45
|
-
animation: ${
|
|
45
|
+
animation: ${Rk} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
46
46
|
forwards;
|
|
47
47
|
animation-delay: 100ms;
|
|
48
48
|
|
|
49
49
|
&:after,
|
|
50
50
|
&:before {
|
|
51
51
|
content: '';
|
|
52
|
-
animation: ${
|
|
52
|
+
animation: ${Nk} 0.15s ease-out forwards;
|
|
53
53
|
animation-delay: 150ms;
|
|
54
54
|
position: absolute;
|
|
55
55
|
border-radius: 3px;
|
|
@@ -62,18 +62,18 @@ to {
|
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
&:before {
|
|
65
|
-
animation: ${
|
|
65
|
+
animation: ${zk} 0.15s ease-out forwards;
|
|
66
66
|
animation-delay: 180ms;
|
|
67
67
|
transform: rotate(90deg);
|
|
68
68
|
}
|
|
69
|
-
`,
|
|
69
|
+
`,Ok=Al`
|
|
70
70
|
from {
|
|
71
71
|
transform: rotate(0deg);
|
|
72
72
|
}
|
|
73
73
|
to {
|
|
74
74
|
transform: rotate(360deg);
|
|
75
75
|
}
|
|
76
|
-
`,
|
|
76
|
+
`,Mk=di("div")`
|
|
77
77
|
width: 12px;
|
|
78
78
|
height: 12px;
|
|
79
79
|
box-sizing: border-box;
|
|
@@ -81,8 +81,8 @@ to {
|
|
|
81
81
|
border-radius: 100%;
|
|
82
82
|
border-color: ${t=>t.secondary||"#e0e0e0"};
|
|
83
83
|
border-right-color: ${t=>t.primary||"#616161"};
|
|
84
|
-
animation: ${
|
|
85
|
-
`,
|
|
84
|
+
animation: ${Ok} 1s linear infinite;
|
|
85
|
+
`,Lk=Al`
|
|
86
86
|
from {
|
|
87
87
|
transform: scale(0) rotate(45deg);
|
|
88
88
|
opacity: 0;
|
|
@@ -90,7 +90,7 @@ from {
|
|
|
90
90
|
to {
|
|
91
91
|
transform: scale(1) rotate(45deg);
|
|
92
92
|
opacity: 1;
|
|
93
|
-
}`,
|
|
93
|
+
}`,Uk=Al`
|
|
94
94
|
0% {
|
|
95
95
|
height: 0;
|
|
96
96
|
width: 0;
|
|
@@ -104,7 +104,7 @@ to {
|
|
|
104
104
|
100% {
|
|
105
105
|
opacity: 1;
|
|
106
106
|
height: 10px;
|
|
107
|
-
}`,
|
|
107
|
+
}`,Bk=di("div")`
|
|
108
108
|
width: 20px;
|
|
109
109
|
opacity: 0;
|
|
110
110
|
height: 20px;
|
|
@@ -113,13 +113,13 @@ to {
|
|
|
113
113
|
position: relative;
|
|
114
114
|
transform: rotate(45deg);
|
|
115
115
|
|
|
116
|
-
animation: ${
|
|
116
|
+
animation: ${Lk} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
117
117
|
forwards;
|
|
118
118
|
animation-delay: 100ms;
|
|
119
119
|
&:after {
|
|
120
120
|
content: '';
|
|
121
121
|
box-sizing: border-box;
|
|
122
|
-
animation: ${
|
|
122
|
+
animation: ${Uk} 0.2s ease-out forwards;
|
|
123
123
|
opacity: 0;
|
|
124
124
|
animation-delay: 200ms;
|
|
125
125
|
position: absolute;
|
|
@@ -131,16 +131,16 @@ to {
|
|
|
131
131
|
height: 10px;
|
|
132
132
|
width: 6px;
|
|
133
133
|
}
|
|
134
|
-
`,
|
|
134
|
+
`,Hk=di("div")`
|
|
135
135
|
position: absolute;
|
|
136
|
-
`,
|
|
136
|
+
`,qk=di("div")`
|
|
137
137
|
position: relative;
|
|
138
138
|
display: flex;
|
|
139
139
|
justify-content: center;
|
|
140
140
|
align-items: center;
|
|
141
141
|
min-width: 20px;
|
|
142
142
|
min-height: 20px;
|
|
143
|
-
`,
|
|
143
|
+
`,Yk=Al`
|
|
144
144
|
from {
|
|
145
145
|
transform: scale(0.6);
|
|
146
146
|
opacity: 0.4;
|
|
@@ -148,20 +148,20 @@ from {
|
|
|
148
148
|
to {
|
|
149
149
|
transform: scale(1);
|
|
150
150
|
opacity: 1;
|
|
151
|
-
}`,
|
|
151
|
+
}`,Gk=di("div")`
|
|
152
152
|
position: relative;
|
|
153
153
|
transform: scale(0.6);
|
|
154
154
|
opacity: 0.4;
|
|
155
155
|
min-width: 20px;
|
|
156
|
-
animation: ${
|
|
156
|
+
animation: ${Yk} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
157
157
|
forwards;
|
|
158
|
-
`,
|
|
158
|
+
`,Vk=({toast:t})=>{let{icon:l,type:a,iconTheme:r}=t;return l!==void 0?typeof l=="string"?k.createElement(Gk,null,l):l:a==="blank"?null:k.createElement(qk,null,k.createElement(Mk,{...r}),a!=="loading"&&k.createElement(Hk,null,a==="error"?k.createElement(Dk,{...r}):k.createElement(Bk,{...r})))},Fk=t=>`
|
|
159
159
|
0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
|
|
160
160
|
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
161
|
-
`,
|
|
161
|
+
`,Ik=t=>`
|
|
162
162
|
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
163
163
|
100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
|
|
164
|
-
`,
|
|
164
|
+
`,Qk="0%{opacity:0;} 100%{opacity:1;}",Xk="0%{opacity:1;} 100%{opacity:0;}",$k=di("div")`
|
|
165
165
|
display: flex;
|
|
166
166
|
align-items: center;
|
|
167
167
|
background: #fff;
|
|
@@ -173,62 +173,62 @@ to {
|
|
|
173
173
|
pointer-events: auto;
|
|
174
174
|
padding: 8px 10px;
|
|
175
175
|
border-radius: 8px;
|
|
176
|
-
`,
|
|
176
|
+
`,Kk=di("div")`
|
|
177
177
|
display: flex;
|
|
178
178
|
justify-content: center;
|
|
179
179
|
margin: 4px 10px;
|
|
180
180
|
color: inherit;
|
|
181
181
|
flex: 1 1 auto;
|
|
182
182
|
white-space: pre-line;
|
|
183
|
-
|
|
183
|
+
`,Zk=(t,l)=>{let a=t.includes("top")?1:-1,[r,o]=g0()?[Qk,Xk]:[Fk(a),Ik(a)];return{animation:l?`${Al(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${Al(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Pk=k.memo(({toast:t,position:l,style:a,children:r})=>{let o=t.height?Zk(t.position||l||"top-center",t.visible):{opacity:0},s=k.createElement(Vk,{toast:t}),c=k.createElement(Kk,{...t.ariaProps},Uo(t.message,t));return k.createElement($k,{className:t.className,style:{...o,...a,...t.style}},typeof r=="function"?r({icon:s,message:c}):k.createElement(k.Fragment,null,s,c))});xk(k.createElement);var Jk=({id:t,className:l,style:a,onHeightUpdate:r,children:o})=>{let s=k.useCallback(c=>{if(c){let d=()=>{let p=c.getBoundingClientRect().height;r(t,p)};d(),new MutationObserver(d).observe(c,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return k.createElement("div",{ref:s,className:l,style:a},o)},Wk=(t,l)=>{let a=t.includes("top"),r=a?{top:0}:{bottom:0},o=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:g0()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${l*(a?1:-1)}px)`,...r,...o}},eC=Ko`
|
|
184
184
|
z-index: 9999;
|
|
185
185
|
> * {
|
|
186
186
|
pointer-events: auto;
|
|
187
187
|
}
|
|
188
|
-
`,So=16,Wk=({reverseOrder:t,position:l="top-center",toastOptions:a,gutter:r,children:o,toasterId:s,containerStyle:c,containerClassName:d})=>{let{toasts:p,handlers:m}=jk(a,s);return k.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:So,left:So,right:So,bottom:So,pointerEvents:"none",...c},className:d,onMouseEnter:m.startPause,onMouseLeave:m.endPause},p.map(y=>{let g=y.position||l,b=m.calculateOffset(y,{reverseOrder:t,gutter:r,defaultPosition:l}),x=Pk(g,b);return k.createElement(Zk,{id:y.id,key:y.id,onHeightUpdate:m.updateHeight,className:y.visible?Jk:"",style:x},y.type==="custom"?Uo(y.message,y):o?o(y):k.createElement(Kk,{toast:y,position:g}))}))},jy=Dt;function eC(){return S.jsx(Wk,{position:"bottom-right",toastOptions:{style:{background:"var(--bg-surface)",color:"var(--text)",border:"1px solid var(--border)",fontFamily:"var(--font-mono)",fontSize:"13px"},success:{iconTheme:{primary:"var(--green)",secondary:"var(--bg-surface)"}},error:{iconTheme:{primary:"var(--red)",secondary:"var(--bg-surface)"}}}})}const E0=k.createContext(null);function Po(){const t=k.useContext(E0);if(!t)throw new Error("useAppContext must be used within AppShell");return t}function tC(){const[t,l]=k.useState(()=>window.innerWidth<=768);return k.useEffect(()=>{const a=window.matchMedia("(max-width: 768px)"),r=o=>l(o.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),t}function nC(){const[t,l]=k.useState(()=>za()),[a,r]=k.useState(null),[o,s]=k.useState(null),[c,d]=k.useState(!1),[p]=k.useState(!1),[m,y]=k.useState(null),[g,b]=k.useState(()=>Lo()),[x,E]=k.useState(()=>localStorage.getItem("sidebarCollapsed")==="true"),[A,z]=k.useState(!1),C=tC(),j=k.useCallback(()=>{E(le=>(localStorage.setItem("sidebarCollapsed",String(!le)),!le))},[]),D=k.useCallback(()=>z(!0),[]),te=k.useCallback(()=>z(!1),[]),P=Da(),H=tl(),_=k.useCallback(()=>{b(Lo())},[]),ne=k.useCallback(()=>{l(za()),y(null)},[]),J=k.useRef(H.pathname);k.useEffect(()=>{const le=ee=>ee.startsWith("/session/")||ee.startsWith("/shared/"),I=le(J.current),B=le(H.pathname);J.current=H.pathname,z(!1),B&&!I&&(E(!0),localStorage.setItem("sidebarCollapsed","true")),!B&&I&&(E(!1),localStorage.setItem("sidebarCollapsed","false")),B||ne()},[H.pathname,ne]);const R=k.useCallback(async()=>{const le=Mw();if(s(le),No()&&Xf()){r("oauth");return}try{const{oauthToken:I}=await Kw();if(I){Rw(I),r("keychain");return}}catch{if(Xf()){r("keychain");return}}if(_w()){r("api-key");return}r(null),d(!0)},[]);k.useEffect(()=>{R()},[R]);const V=k.useCallback(le=>{const I=le.split(/\s+/).slice(0,3).join(" ");y({name:I||"New project"}),P("/session/new",{state:{description:le}})},[P]),G=k.useCallback(async le=>{try{await Iw(le)}catch{}Lw(le),ne(),H.pathname===`/session/${le}`&&P("/")},[H.pathname,P,ne]),F={sessions:t,pendingProject:m,authSource:a,hasGhToken:o,showSettings:c,setShowSettings:d,refreshSessions:ne,refreshSettings:R,handleNewProject:V,handleDeleteSession:G,loading:p,joinedSharedSessions:g,refreshJoinedSharedSessions:_};return S.jsxs(E0.Provider,{value:F,children:[S.jsxs("div",{className:`app-shell ${x?"sidebar-collapsed":""}`,children:[C&&A&&S.jsx("div",{className:"sidebar-backdrop",onClick:te,onKeyDown:le=>{le.key==="Escape"&&te()}}),S.jsx(fk,{collapsed:x,onToggle:j,mobileOpen:A,onMobileClose:te}),S.jsx("main",{className:"main-content",children:S.jsx(VE,{context:{openMobileDrawer:D}})}),S.jsx("button",{type:"button",className:"global-settings-btn",onClick:()=>d(le=>!le),title:"Settings",children:S.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16","aria-label":"Settings",children:[S.jsx("title",{children:"Settings"}),S.jsx("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),S.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),S.jsx(eC,{})]})}function w0({onSubmit:t,placeholder:l,disabled:a,isRunning:r,onCancel:o}){const[s,c]=k.useState(""),d=k.useRef(null),p=k.useCallback(()=>{const b=s.trim();b&&(t(b),c(""),d.current&&(d.current.style.height="auto"))},[s,t]),m=k.useCallback(()=>{r&&o&&o()},[r,o]);$o(m,!r);const y=k.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},[p]),g=k.useCallback(()=>{const b=d.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,200)}px`)},[]);return S.jsxs("div",{className:"prompt-bar",children:[S.jsx("textarea",{ref:d,value:s,onChange:b=>{c(b.target.value),g()},onKeyDown:y,placeholder:l??"Describe what you want to build...",disabled:a,rows:1}),S.jsx("button",{className:"primary",onClick:p,disabled:a||!s.trim(),children:"Send"}),r&&o&&S.jsx("button",{className:"danger",onClick:o,children:"Stop"})]})}function lC(t){const l=Date.now()-new Date(t).getTime(),a=Math.floor(l/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const r=Math.floor(a/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function iC({onSelect:t,onClose:l}){const[a,r]=k.useState([]),[o,s]=k.useState(!0),[c,d]=k.useState(null),[p,m]=k.useState(""),[y,g]=k.useState(null),[b,x]=k.useState([]),[E,A]=k.useState(!1),[z,C]=k.useState(""),[j,D]=k.useState(""),[te,P]=k.useState(!1);k.useEffect(()=>{Xw().then(F=>{r(F.repos),s(!1)}).catch(F=>{d(F instanceof Error?F.message:"Failed to load repos"),s(!1)})},[]);function H(F){g(F),A(!0),x([]),C(""),P(!1),D(""),$w(F.nameWithOwner).then(le=>{x(le.branches),A(!1)}).catch(()=>{A(!1)})}function _(){g(null),x([]),C(""),P(!1)}function ne(F){y&&t(y.url,F)}const J=k.useCallback(()=>{y?_():l()},[y,l]);$o(J);const R=p?a.filter(F=>F.nameWithOwner.toLowerCase().includes(p.toLowerCase())):a,G=[...z?b.filter(F=>F.name.toLowerCase().includes(z.toLowerCase())):b].sort((F,le)=>F.isDefault&&!le.isDefault?-1:!F.isDefault&&le.isDefault?1:F.name.localeCompare(le.name));return Io.createPortal(S.jsx("div",{className:"modal-overlay",onClick:l,children:S.jsx("div",{className:"modal-card",onClick:F=>F.stopPropagation(),style:{maxWidth:500},children:y?S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"modal-title",children:[S.jsx("button",{type:"button",onClick:_,style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:"0 8px 0 0",fontSize:14},children:"←"}),y.nameWithOwner]}),S.jsx("div",{className:"repo-picker-filter",children:S.jsx("input",{type:"text",value:z,onChange:F=>C(F.target.value),placeholder:"Filter branches..."})}),E&&S.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading branches..."}),!E&&S.jsxs("div",{className:"repo-picker-list",children:[G.map(F=>S.jsx("div",{className:"repo-picker-item",onClick:()=>ne(F.name),children:S.jsxs("span",{className:"repo-picker-item-name",children:[F.name,F.isDefault&&S.jsx("span",{style:{marginLeft:8,fontSize:11,color:"var(--text-subtle)",fontWeight:400},children:"default"})]})},F.name)),te?S.jsxs("div",{className:"repo-picker-new-branch",children:[S.jsx("input",{type:"text",value:j,onChange:F=>D(F.target.value),onKeyDown:F=>{F.key==="Enter"&&j.trim()&&ne(j.trim())},placeholder:"branch-name"}),S.jsx("button",{type:"button",className:"modal-btn modal-btn-primary",disabled:!j.trim(),onClick:()=>ne(j.trim()),children:"Create"})]}):S.jsx("div",{className:"repo-picker-item",style:{color:"var(--brand-1)"},onClick:()=>P(!0),children:S.jsx("span",{className:"repo-picker-item-name",children:"+ Create new branch"})})]}),S.jsxs("div",{className:"modal-actions",children:[S.jsx("button",{type:"button",className:"modal-btn",onClick:_,children:"Back"}),S.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})]})]}):S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"modal-title",children:"Resume from GitHub"}),S.jsx("div",{className:"repo-picker-filter",children:S.jsx("input",{type:"text",value:p,onChange:F=>m(F.target.value),placeholder:"Filter repositories..."})}),o&&S.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading repositories..."}),c&&S.jsx("div",{style:{padding:"16px 0",color:"var(--red)",fontSize:13},children:c}),!o&&!c&&S.jsx("div",{className:"repo-picker-list",children:R.length===0?S.jsx("div",{style:{padding:16,textAlign:"center",color:"var(--text-subtle)",fontSize:13},children:p?"No matching repos":"No repos found"}):R.map(F=>S.jsxs("div",{className:"repo-picker-item",onClick:()=>H(F),children:[S.jsx("span",{className:"repo-picker-item-name",children:F.nameWithOwner}),S.jsx("span",{className:"repo-picker-item-date",children:lC(F.updatedAt)})]},F.nameWithOwner))}),S.jsx("div",{className:"modal-actions",children:S.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})})]})})}),document.body)}function k0({authSource:t,hasGhToken:l,onKeySaved:a,onClose:r,onCopyLog:o}){const s=k.useId(),c=k.useId(),[d,p]=k.useState(No()||t==="oauth"?"oauth":"api-key"),[m,y]=k.useState(""),[g,b]=k.useState(""),[x,E]=k.useState(!1),A=d==="api-key"?t==="api-key":No(),z=k.useCallback(()=>{m.trim()&&(d==="api-key"?jw(m.trim()):Nw(m.trim()),y(""),a())},[m,d,a]),C=k.useCallback(()=>{d==="api-key"?Aw():zw(),a()},[d,a]),j=k.useCallback(()=>{g.trim()&&(Dw(g.trim()),b(""),a())},[g,a]),D=k.useCallback(()=>{Ow(),a()},[a]),te=k.useCallback(ne=>{ne.key==="Enter"&&(ne.preventDefault(),z())},[z]),P=k.useCallback(ne=>{ne.key==="Enter"&&(ne.preventDefault(),j())},[j]),H=k.useCallback(()=>{o?.(),E(!0),setTimeout(()=>E(!1),2e3)},[o]);$o(r);const _=d==="api-key"?t==="api-key"?"Enter new key to override...":"sk-ant-...":No()?"Enter new token to override...":"Paste OAuth token...";return Io.createPortal(S.jsx("div",{className:"modal-overlay",onClick:r,children:S.jsxs("div",{className:"modal-card",onClick:ne=>ne.stopPropagation(),children:[S.jsx("div",{className:"modal-title",children:"Settings"}),S.jsxs("div",{className:"settings-field",style:{marginTop:12},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[S.jsx("label",{htmlFor:s,style:{margin:0},children:"Claude Authentication"}),S.jsx("span",{className:`settings-status ${t?"active":"missing"}`,children:t==="keychain"?"Using Claude keychain":t==="oauth"?"OAuth token set":t==="api-key"?"API key set":"No credentials"})]}),t==="keychain"&&S.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"Credentials detected from macOS Keychain. No manual key needed."}),!t&&S.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"If you have Claude Code installed on macOS, credentials are automatically read from the Keychain. Otherwise, enter a key below."}),S.jsxs("div",{className:"settings-input-row",children:[S.jsxs("select",{value:d,onChange:ne=>{p(ne.target.value),y("")},className:"settings-key-type-select",children:[S.jsx("option",{value:"api-key",children:"API Key"}),S.jsx("option",{value:"oauth",children:"OAuth Token"})]}),S.jsx("input",{id:s,type:"password",value:m,onChange:ne=>y(ne.target.value),onKeyDown:te,placeholder:_}),m.trim()?S.jsx("button",{type:"button",onClick:z,className:"primary",children:"Save"}):A&&S.jsx("button",{type:"button",onClick:C,className:"btn btn-danger",children:"Remove"})]})]}),S.jsx("div",{className:"settings-divider"}),S.jsx("div",{className:"settings-section-label",children:"GitHub"}),S.jsxs("div",{className:"settings-field",children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[S.jsx("label",{htmlFor:c,style:{margin:0},children:"Personal Access Token"}),S.jsx("span",{className:`settings-status ${l?"active":"missing"}`,children:l?"Connected":"Not connected"})]}),S.jsxs("div",{className:"settings-input-row",children:[S.jsx("input",{id:c,type:"password",value:g,onChange:ne=>b(ne.target.value),onKeyDown:P,placeholder:l?"Enter new token to override...":"ghp_..."}),g.trim()?S.jsx("button",{type:"button",onClick:j,className:"primary",children:"Save"}):l&&S.jsx("button",{type:"button",onClick:D,className:"btn btn-danger",children:"Remove"})]}),S.jsxs("div",{style:{fontSize:11,color:"var(--text-subtle)",marginTop:4},children:["Required scopes: ",S.jsx("code",{children:"repo"}),", ",S.jsx("code",{children:"read:user"}),". Create one at"," ",S.jsx("a",{href:"https://github.com/settings/tokens/new?scopes=repo,read:user",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--brand-1)"},children:"github.com/settings/tokens"})]})]}),S.jsx("div",{className:"settings-divider"}),o&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"settings-divider"}),S.jsx("div",{className:"settings-section-label",children:"Debug"}),S.jsx("button",{type:"button",className:"btn",onClick:H,children:x?"Copied!":"Copy session log"})]}),S.jsx("div",{className:"modal-actions",style:{marginTop:16},children:S.jsx("button",{type:"button",className:"modal-btn",onClick:r,children:"Close"})})]})}),document.body)}function aC(){const{authSource:t,hasGhToken:l,showSettings:a,setShowSettings:r,refreshSettings:o,refreshSessions:s,handleNewProject:c,loading:d}=Po(),p=Da(),{openMobileDrawer:m}=$v(),[y,g]=k.useState(!1),[b,x]=k.useState(!1),E=k.useCallback(async(A,z)=>{g(!1),x(!0);try{const{sessionId:C,session:j}=await Zw(A,z);i0(j),s(),p(`/session/${C}`)}catch(C){console.error("Failed to resume from GitHub:",C)}finally{x(!1)}},[p,s]);return S.jsxs(S.Fragment,{children:[a&&S.jsx(k0,{authSource:t,hasGhToken:l??!1,onKeySaved:o,onClose:()=>r(!1)}),S.jsxs("div",{className:"mobile-home-topbar",children:[S.jsx("button",{type:"button",className:"mobile-hamburger",onClick:m,"aria-label":"Open menu",children:S.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[S.jsx("title",{children:"Menu"}),S.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),S.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),S.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),S.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"mobile-topbar-logo"})]}),S.jsxs("div",{className:"hero",children:[S.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"hero-logo"}),S.jsx("p",{className:"hero-subtitle",children:"Build Reactive apps on Sync"}),S.jsx("div",{className:"hero-prompt",children:S.jsx(w0,{onSubmit:c,placeholder:t?"Describe the app you want to build...":"Set an API key in Settings to get started...",disabled:d||!t})}),l&&S.jsx("button",{type:"button",className:"hero-resume-btn",onClick:()=>g(!0),disabled:b,children:b?"Cloning...":"Resume from GitHub"})]}),y&&S.jsx(iC,{onSelect:E,onClose:()=>g(!1)})]})}function rC(t,l){const a={};return(t[t.length-1]===""?[...t,""]:t).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const uC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sC={};function Ay(t,l){return(sC.jsx?oC:uC).test(t)}const cC=/[ \t\n\f\r]/g;function fC(t){return typeof t=="object"?t.type==="text"?_y(t.value):!1:_y(t)}function _y(t){return t.replace(cC,"")===""}class eu{constructor(l,a,r){this.normal=a,this.property=l,r&&(this.space=r)}}eu.prototype.normal={};eu.prototype.property={};eu.prototype.space=void 0;function C0(t,l){const a={},r={};for(const o of t)Object.assign(a,o.property),Object.assign(r,o.normal);return new eu(a,r,l)}function Pf(t){return t.toLowerCase()}class un{constructor(l,a){this.attribute=a,this.property=l}}un.prototype.attribute="";un.prototype.booleanish=!1;un.prototype.boolean=!1;un.prototype.commaOrSpaceSeparated=!1;un.prototype.commaSeparated=!1;un.prototype.defined=!1;un.prototype.mustUseProperty=!1;un.prototype.number=!1;un.prototype.overloadedBoolean=!1;un.prototype.property="";un.prototype.spaceSeparated=!1;un.prototype.space=void 0;let dC=0;const Ue=Gi(),_t=Gi(),Jf=Gi(),fe=Gi(),ct=Gi(),Ra=Gi(),vn=Gi();function Gi(){return 2**++dC}const Wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:_t,commaOrSpaceSeparated:vn,commaSeparated:Ra,number:fe,overloadedBoolean:Jf,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),wf=Object.keys(Wf);class Ld extends un{constructor(l,a,r,o){let s=-1;if(super(l,a),Ry(this,"space",o),typeof r=="number")for(;++s<wf.length;){const c=wf[s];Ry(this,wf[s],(r&Wf[c])===Wf[c])}}}Ld.prototype.defined=!0;function Ry(t,l,a){a&&(t[l]=a)}function Oa(t){const l={},a={};for(const[r,o]of Object.entries(t.properties)){const s=new Ld(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),l[r]=s,a[Pf(r)]=r,a[Pf(s.attribute)]=r}return new eu(l,a,t.space)}const T0=Oa({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:ct,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:fe,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:ct,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:_t,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function j0(t,l){return l in t?t[l]:l}function A0(t,l){return j0(t,l.toLowerCase())}const hC=Oa({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ra,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ct,autoFocus:Ue,autoPlay:Ue,blocking:ct,capture:null,charSet:null,checked:Ue,cite:null,className:ct,cols:fe,colSpan:null,content:null,contentEditable:_t,controls:Ue,controlsList:ct,coords:fe|Ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Jf,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ct,height:fe,hidden:Jf,high:fe,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ue,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:fe,pattern:null,ping:ct,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ct,required:Ue,reversed:Ue,rows:fe,rowSpan:fe,sandbox:ct,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:_t,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:A0}),mC=Oa({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:vn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:ct,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ra,g2:Ra,glyphName:Ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:vn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vn,rev:vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vn,requiredFeatures:vn,requiredFonts:vn,requiredFormats:vn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:vn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:j0}),_0=Oa({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),R0=Oa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:A0}),z0=Oa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),pC={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},gC=/[A-Z]/g,zy=/-[a-z]/g,yC=/^data[-\w.:]+$/i;function vC(t,l){const a=Pf(l);let r=l,o=un;if(a in t.normal)return t.property[t.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&yC.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(zy,xC);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!zy.test(s)){let c=s.replace(gC,bC);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}o=Ld}return new o(r,l)}function bC(t){return"-"+t.toLowerCase()}function xC(t){return t.charAt(1).toUpperCase()}const SC=C0([T0,hC,_0,R0,z0],"html"),Ud=C0([T0,mC,_0,R0,z0],"svg");function EC(t){return t.join(" ").trim()}var ka={},kf,Ny;function wC(){if(Ny)return kf;Ny=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,a=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
189
|
-
`,m="/",y="*",g="",b="comment",x="declaration";function E(z,C){if(typeof z!="string")throw new TypeError("First argument must be a string");if(!z)return[];C=C||{};var j=1,D=1;function te(le){var I=le.match(l);I&&(j+=I.length);var B=le.lastIndexOf(p);D=~B?le.length-B:D+le.length}function P(){var le={line:j,column:D};return function(I){return I.position=new H(le),J(),I}}function H(le){this.start=le,this.end={line:j,column:D},this.source=C.source}H.prototype.content=z;function _(le){var I=new Error(C.source+":"+j+":"+D+": "+le);if(I.reason=le,I.filename=C.source,I.line=j,I.column=D,I.source=z,!C.silent)throw I}function ne(le){var I=le.exec(z);if(I){var B=I[0];return te(B),z=z.slice(B.length),I}}function J(){ne(a)}function R(le){var I;for(le=le||[];I=V();)I!==!1&&le.push(I);return le}function V(){var le=P();if(!(m!=z.charAt(0)||y!=z.charAt(1))){for(var I=2;g!=z.charAt(I)&&(y!=z.charAt(I)||m!=z.charAt(I+1));)++I;if(I+=2,g===z.charAt(I-1))return _("End of comment missing");var B=z.slice(2,I-2);return D+=2,te(B),z=z.slice(I),D+=2,le({type:b,comment:B})}}function G(){var le=P(),I=ne(r);if(I){if(V(),!ne(o))return _("property missing ':'");var B=ne(s),ee=le({type:x,property:A(I[0].replace(t,g)),value:B?A(B[0].replace(t,g)):g});return ne(c),ee}}function F(){var le=[];R(le);for(var I;I=G();)I!==!1&&(le.push(I),R(le));return le}return J(),F()}function A(z){return z?z.replace(d,g):g}return kf=E,kf}var Dy;function kC(){if(Dy)return ka;Dy=1;var t=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0}),ka.default=a;const l=t(wC());function a(r,o){let s=null;if(!r||typeof r!="string")return s;const c=(0,l.default)(r),d=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:y}=p;d?o(m,y,p):y&&(s=s||{},s[m]=y)}),s}return ka}var zr={},Oy;function CC(){if(Oy)return zr;Oy=1,Object.defineProperty(zr,"__esModule",{value:!0}),zr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,a=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(m){return!m||a.test(m)||t.test(m)},c=function(m,y){return y.toUpperCase()},d=function(m,y){return"".concat(y,"-")},p=function(m,y){return y===void 0&&(y={}),s(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(o,d):m=m.replace(r,d),m.replace(l,c))};return zr.camelCase=p,zr}var Nr,My;function TC(){if(My)return Nr;My=1;var t=Nr&&Nr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},l=t(kC()),a=CC();function r(o,s){var c={};return!o||typeof o!="string"||(0,l.default)(o,function(d,p){d&&p&&(c[(0,a.camelCase)(d,s)]=p)}),c}return r.default=r,Nr=r,Nr}var jC=TC();const AC=md(jC),N0=D0("end"),Bd=D0("start");function D0(t){return l;function l(a){const r=a&&a.position&&a.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function _C(t){const l=Bd(t),a=N0(t);if(l&&a)return{start:l,end:a}}function Br(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Ly(t.position):"start"in t||"end"in t?Ly(t):"line"in t||"column"in t?ed(t):""}function ed(t){return Uy(t&&t.line)+":"+Uy(t&&t.column)}function Ly(t){return ed(t&&t.start)+"-"+ed(t&&t.end)}function Uy(t){return t&&typeof t=="number"?t:1}class Xt extends Error{constructor(l,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let o="",s={},c=!1;if(a&&("line"in a&&"column"in a?s={place:a}:"start"in a&&"end"in a?s={place:a}:"type"in a?s={ancestors:[a],place:a.position}:s={...a}),typeof l=="string"?o=l:!s.cause&&l&&(c=!0,o=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?s.ruleId=r:(s.source=r.slice(0,p),s.ruleId=r.slice(p+1))}if(!s.place&&s.ancestors&&s.ancestors){const p=s.ancestors[s.ancestors.length-1];p&&(s.place=p.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=Br(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Xt.prototype.file="";Xt.prototype.name="";Xt.prototype.reason="";Xt.prototype.message="";Xt.prototype.stack="";Xt.prototype.column=void 0;Xt.prototype.line=void 0;Xt.prototype.ancestors=void 0;Xt.prototype.cause=void 0;Xt.prototype.fatal=void 0;Xt.prototype.place=void 0;Xt.prototype.ruleId=void 0;Xt.prototype.source=void 0;const Hd={}.hasOwnProperty,RC=new Map,zC=/[A-Z]/g,NC=new Set(["table","tbody","thead","tfoot","tr"]),DC=new Set(["td","th"]),O0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function OC(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=GC(a,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=YC(a,l.jsx,l.jsxs)}const o={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Ud:SC,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=M0(o,t,void 0);return s&&typeof s!="string"?s:o.create(t,o.Fragment,{children:s||void 0},void 0)}function M0(t,l,a){if(l.type==="element")return MC(t,l,a);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return LC(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return BC(t,l,a);if(l.type==="mdxjsEsm")return UC(t,l);if(l.type==="root")return HC(t,l,a);if(l.type==="text")return qC(t,l)}function MC(t,l,a){const r=t.schema;let o=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ud,t.schema=o),t.ancestors.push(l);const s=U0(t,l.tagName,!1),c=VC(t,l);let d=Yd(t,l);return NC.has(l.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!fC(p):!0})),L0(t,c,s,l),qd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function LC(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Ir(t,l.position)}function UC(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Ir(t,l.position)}function BC(t,l,a){const r=t.schema;let o=r;l.name==="svg"&&r.space==="html"&&(o=Ud,t.schema=o),t.ancestors.push(l);const s=l.name===null?t.Fragment:U0(t,l.name,!0),c=FC(t,l),d=Yd(t,l);return L0(t,c,s,l),qd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function HC(t,l,a){const r={};return qd(r,Yd(t,l)),t.create(l,t.Fragment,r,a)}function qC(t,l){return l.value}function L0(t,l,a,r){typeof a!="string"&&a!==t.Fragment&&t.passNode&&(l.node=r)}function qd(t,l){if(l.length>0){const a=l.length>1?l:l[0];a&&(t.children=a)}}function YC(t,l,a){return r;function r(o,s,c,d){const m=Array.isArray(c.children)?a:l;return d?m(s,c,d):m(s,c)}}function GC(t,l){return a;function a(r,o,s,c){const d=Array.isArray(s.children),p=Bd(r);return l(o,s,c,d,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function VC(t,l){const a={};let r,o;for(o in l.properties)if(o!=="children"&&Hd.call(l.properties,o)){const s=IC(t,o,l.properties[o]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&DC.has(l.tagName)?r=d:a[c]=d}}if(r){const s=a.style||(a.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function FC(t,l){const a={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const c=s.expression;c.type;const d=c.properties[0];d.type,Object.assign(a,t.evaluater.evaluateExpression(d.argument))}else Ir(t,l.position);else{const o=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const d=r.value.data.estree.body[0];d.type,s=t.evaluater.evaluateExpression(d.expression)}else Ir(t,l.position);else s=r.value===null?!0:r.value;a[o]=s}return a}function Yd(t,l){const a=[];let r=-1;const o=t.passKeys?new Map:RC;for(;++r<l.children.length;){const s=l.children[r];let c;if(t.passKeys){const p=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(p){const m=o.get(p)||0;c=p+"-"+m,o.set(p,m+1)}}const d=M0(t,s,c);d!==void 0&&a.push(d)}return a}function IC(t,l,a){const r=vC(t.schema,l);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?rC(a):EC(a)),r.property==="style"){let o=typeof a=="object"?a:QC(t,String(a));return t.stylePropertyNameCase==="css"&&(o=XC(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?pC[r.property]||r.property:r.attribute,a]}}function QC(t,l){try{return AC(l,{reactCompat:!0})}catch(a){if(t.ignoreInvalidStyle)return{};const r=a,o=new Xt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=O0+"#cannot-parse-style-attribute",o}}function U0(t,l,a){let r;if(!a)r={type:"Literal",value:l};else if(l.includes(".")){const o=l.split(".");let s=-1,c;for(;++s<o.length;){const d=Ay(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}r=c}else r=Ay(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const o=r.value;return Hd.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);Ir(t)}function Ir(t,l){const a=new Xt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=t.filePath||void 0,a.url=O0+"#cannot-handle-mdx-estrees-without-createevaluater",a}function XC(t){const l={};let a;for(a in t)Hd.call(t,a)&&(l[$C(a)]=t[a]);return l}function $C(t){let l=t.replace(zC,KC);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function KC(t){return"-"+t.toLowerCase()}const Cf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},ZC={};function Gd(t,l){const a=ZC,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,o=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return B0(t,r,o)}function B0(t,l,a){if(PC(t)){if("value"in t)return t.type==="html"&&!a?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return By(t.children,l,a)}return Array.isArray(t)?By(t,l,a):""}function By(t,l,a){const r=[];let o=-1;for(;++o<t.length;)r[o]=B0(t[o],l,a);return r.join("")}function PC(t){return!!(t&&typeof t=="object")}const Hy=document.createElement("i");function Vd(t){const l="&"+t+";";Hy.innerHTML=l;const a=Hy.textContent;return a.charCodeAt(a.length-1)===59&&t!=="semi"||a===l?!1:a}function xn(t,l,a,r){const o=t.length;let s=0,c;if(l<0?l=-l>o?0:o+l:l=l>o?o:l,a=a>0?a:0,r.length<1e4)c=Array.from(r),c.unshift(l,a),t.splice(...c);else for(a&&t.splice(l,a);s<r.length;)c=r.slice(s,s+1e4),c.unshift(l,0),t.splice(...c),s+=1e4,l+=1e4}function Dn(t,l){return t.length>0?(xn(t,t.length,0,l),t):l}const qy={}.hasOwnProperty;function H0(t){const l={};let a=-1;for(;++a<t.length;)JC(l,t[a]);return l}function JC(t,l){let a;for(a in l){const o=(qy.call(t,a)?t[a]:void 0)||(t[a]={}),s=l[a];let c;if(s)for(c in s){qy.call(o,c)||(o[c]=[]);const d=s[c];WC(o[c],Array.isArray(d)?d:d?[d]:[])}}}function WC(t,l){let a=-1;const r=[];for(;++a<l.length;)(l[a].add==="after"?t:r).push(l[a]);xn(t,0,0,r)}function q0(t,l){const a=Number.parseInt(t,l);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function In(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Zt=hi(/[A-Za-z]/),It=hi(/[\dA-Za-z]/),e2=hi(/[#-'*+\--9=?A-Z^-~]/);function Bo(t){return t!==null&&(t<32||t===127)}const td=hi(/\d/),t2=hi(/[\dA-Fa-f]/),n2=hi(/[!-/:-@[-`{-~]/);function _e(t){return t!==null&&t<-2}function st(t){return t!==null&&(t<0||t===32)}function Ye(t){return t===-2||t===-1||t===32}const Jo=hi(new RegExp("\\p{P}|\\p{S}","u")),qi=hi(/\s/);function hi(t){return l;function l(a){return a!==null&&a>-1&&t.test(String.fromCharCode(a))}}function Ma(t){const l=[];let a=-1,r=0,o=0;for(;++a<t.length;){const s=t.charCodeAt(a);let c="";if(s===37&&It(t.charCodeAt(a+1))&&It(t.charCodeAt(a+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const d=t.charCodeAt(a+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),o=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(t.slice(r,a),encodeURIComponent(c)),r=a+o+1,c=""),o&&(a+=o,o=0)}return l.join("")+t.slice(r)}function Ze(t,l,a,r){const o=r?r-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(p){return Ye(p)?(t.enter(a),d(p)):l(p)}function d(p){return Ye(p)&&s++<o?(t.consume(p),d):(t.exit(a),l(p))}}const l2={tokenize:i2};function i2(t){const l=t.attempt(this.parser.constructs.contentInitial,r,o);let a;return l;function r(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ze(t,l,"linePrefix")}function o(d){return t.enter("paragraph"),s(d)}function s(d){const p=t.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return _e(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const a2={tokenize:r2},Yy={tokenize:u2};function r2(t){const l=this,a=[];let r=0,o,s,c;return d;function d(D){if(r<a.length){const te=a[r];return l.containerState=te[1],t.attempt(te[0].continuation,p,m)(D)}return m(D)}function p(D){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,o&&j();const te=l.events.length;let P=te,H;for(;P--;)if(l.events[P][0]==="exit"&&l.events[P][1].type==="chunkFlow"){H=l.events[P][1].end;break}C(r);let _=te;for(;_<l.events.length;)l.events[_][1].end={...H},_++;return xn(l.events,P+1,0,l.events.slice(te)),l.events.length=_,m(D)}return d(D)}function m(D){if(r===a.length){if(!o)return b(D);if(o.currentConstruct&&o.currentConstruct.concrete)return E(D);l.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Yy,y,g)(D)}function y(D){return o&&j(),C(r),b(D)}function g(D){return l.parser.lazy[l.now().line]=r!==a.length,c=l.now().offset,E(D)}function b(D){return l.containerState={},t.attempt(Yy,x,E)(D)}function x(D){return r++,a.push([l.currentConstruct,l.containerState]),b(D)}function E(D){if(D===null){o&&j(),C(0),t.consume(D);return}return o=o||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),A(D)}function A(D){if(D===null){z(t.exit("chunkFlow"),!0),C(0),t.consume(D);return}return _e(D)?(t.consume(D),z(t.exit("chunkFlow")),r=0,l.interrupt=void 0,d):(t.consume(D),A)}function z(D,te){const P=l.sliceStream(D);if(te&&P.push(null),D.previous=s,s&&(s.next=D),s=D,o.defineSkip(D.start),o.write(P),l.parser.lazy[D.start.line]){let H=o.events.length;for(;H--;)if(o.events[H][1].start.offset<c&&(!o.events[H][1].end||o.events[H][1].end.offset>c))return;const _=l.events.length;let ne=_,J,R;for(;ne--;)if(l.events[ne][0]==="exit"&&l.events[ne][1].type==="chunkFlow"){if(J){R=l.events[ne][1].end;break}J=!0}for(C(r),H=_;H<l.events.length;)l.events[H][1].end={...R},H++;xn(l.events,ne+1,0,l.events.slice(_)),l.events.length=H}}function C(D){let te=a.length;for(;te-- >D;){const P=a[te];l.containerState=P[1],P[0].exit.call(l,t)}a.length=D}function j(){o.write([null]),s=void 0,o=void 0,l.containerState._closeFlow=void 0}}function u2(t,l,a){return Ze(t,t.attempt(this.parser.constructs.document,l,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Na(t){if(t===null||st(t)||qi(t))return 1;if(Jo(t))return 2}function Wo(t,l,a){const r=[];let o=-1;for(;++o<t.length;){const s=t[o].resolveAll;s&&!r.includes(s)&&(l=s(l,a),r.push(s))}return l}const nd={name:"attention",resolveAll:o2,tokenize:s2};function o2(t,l){let a=-1,r,o,s,c,d,p,m,y;for(;++a<t.length;)if(t[a][0]==="enter"&&t[a][1].type==="attentionSequence"&&t[a][1]._close){for(r=a;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[a][1]).charCodeAt(0)){if((t[r][1]._close||t[a][1]._open)&&(t[a][1].end.offset-t[a][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[a][1].end.offset-t[a][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[a][1].end.offset-t[a][1].start.offset>1?2:1;const g={...t[r][1].end},b={...t[a][1].start};Gy(g,-p),Gy(b,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...t[r][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...t[a][1].start},end:b},s={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[a][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[r][1].end={...c.start},t[a][1].start={...d.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=Dn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=Dn(m,[["enter",o,l],["enter",c,l],["exit",c,l],["enter",s,l]]),m=Dn(m,Wo(l.parser.constructs.insideSpan.null,t.slice(r+1,a),l)),m=Dn(m,[["exit",s,l],["enter",d,l],["exit",d,l],["exit",o,l]]),t[a][1].end.offset-t[a][1].start.offset?(y=2,m=Dn(m,[["enter",t[a][1],l],["exit",t[a][1],l]])):y=0,xn(t,r-1,a-r+3,m),a=r+m.length-y-2;break}}for(a=-1;++a<t.length;)t[a][1].type==="attentionSequence"&&(t[a][1].type="data");return t}function s2(t,l){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Na(r);let s;return c;function c(p){return s=p,t.enter("attentionSequence"),d(p)}function d(p){if(p===s)return t.consume(p),d;const m=t.exit("attentionSequence"),y=Na(p),g=!y||y===2&&o||a.includes(p),b=!o||o===2&&y||a.includes(r);return m._open=!!(s===42?g:g&&(o||!b)),m._close=!!(s===42?b:b&&(y||!g)),l(p)}}function Gy(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const c2={name:"autolink",tokenize:f2};function f2(t,l,a){let r=0;return o;function o(x){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(x){return Zt(x)?(t.consume(x),c):x===64?a(x):m(x)}function c(x){return x===43||x===45||x===46||It(x)?(r=1,d(x)):m(x)}function d(x){return x===58?(t.consume(x),r=0,p):(x===43||x===45||x===46||It(x))&&r++<32?(t.consume(x),d):(r=0,m(x))}function p(x){return x===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),l):x===null||x===32||x===60||Bo(x)?a(x):(t.consume(x),p)}function m(x){return x===64?(t.consume(x),y):e2(x)?(t.consume(x),m):a(x)}function y(x){return It(x)?g(x):a(x)}function g(x){return x===46?(t.consume(x),r=0,y):x===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(x),t.exit("autolinkMarker"),t.exit("autolink"),l):b(x)}function b(x){if((x===45||It(x))&&r++<63){const E=x===45?b:g;return t.consume(x),E}return a(x)}}const tu={partial:!0,tokenize:d2};function d2(t,l,a){return r;function r(s){return Ye(s)?Ze(t,o,"linePrefix")(s):o(s)}function o(s){return s===null||_e(s)?l(s):a(s)}}const Y0={continuation:{tokenize:m2},exit:p2,name:"blockQuote",tokenize:h2};function h2(t,l,a){const r=this;return o;function o(c){if(c===62){const d=r.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),s}return a(c)}function s(c){return Ye(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function m2(t,l,a){const r=this;return o;function o(c){return Ye(c)?Ze(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt(Y0,l,a)(c)}}function p2(t){t.exit("blockQuote")}const G0={name:"characterEscape",tokenize:g2};function g2(t,l,a){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),o}function o(s){return n2(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):a(s)}}const V0={name:"characterReference",tokenize:y2};function y2(t,l,a){const r=this;let o=0,s,c;return d;function d(g){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),p}function p(g){return g===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(g),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),s=31,c=It,y(g))}function m(g){return g===88||g===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(g),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,c=t2,y):(t.enter("characterReferenceValue"),s=7,c=td,y(g))}function y(g){if(g===59&&o){const b=t.exit("characterReferenceValue");return c===It&&!Vd(r.sliceSerialize(b))?a(g):(t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(g)&&o++<s?(t.consume(g),y):a(g)}}const Vy={partial:!0,tokenize:b2},Fy={concrete:!0,name:"codeFenced",tokenize:v2};function v2(t,l,a){const r=this,o={partial:!0,tokenize:P};let s=0,c=0,d;return p;function p(H){return m(H)}function m(H){const _=r.events[r.events.length-1];return s=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,d=H,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(H)}function y(H){return H===d?(c++,t.consume(H),y):c<3?a(H):(t.exit("codeFencedFenceSequence"),Ye(H)?Ze(t,g,"whitespace")(H):g(H))}function g(H){return H===null||_e(H)?(t.exit("codeFencedFence"),r.interrupt?l(H):t.check(Vy,A,te)(H)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(H))}function b(H){return H===null||_e(H)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(H)):Ye(H)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ze(t,x,"whitespace")(H)):H===96&&H===d?a(H):(t.consume(H),b)}function x(H){return H===null||_e(H)?g(H):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),E(H))}function E(H){return H===null||_e(H)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(H)):H===96&&H===d?a(H):(t.consume(H),E)}function A(H){return t.attempt(o,te,z)(H)}function z(H){return t.enter("lineEnding"),t.consume(H),t.exit("lineEnding"),C}function C(H){return s>0&&Ye(H)?Ze(t,j,"linePrefix",s+1)(H):j(H)}function j(H){return H===null||_e(H)?t.check(Vy,A,te)(H):(t.enter("codeFlowValue"),D(H))}function D(H){return H===null||_e(H)?(t.exit("codeFlowValue"),j(H)):(t.consume(H),D)}function te(H){return t.exit("codeFenced"),l(H)}function P(H,_,ne){let J=0;return R;function R(I){return H.enter("lineEnding"),H.consume(I),H.exit("lineEnding"),V}function V(I){return H.enter("codeFencedFence"),Ye(I)?Ze(H,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):G(I)}function G(I){return I===d?(H.enter("codeFencedFenceSequence"),F(I)):ne(I)}function F(I){return I===d?(J++,H.consume(I),F):J>=c?(H.exit("codeFencedFenceSequence"),Ye(I)?Ze(H,le,"whitespace")(I):le(I)):ne(I)}function le(I){return I===null||_e(I)?(H.exit("codeFencedFence"),_(I)):ne(I)}}}function b2(t,l,a){const r=this;return o;function o(c){return c===null?a(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s)}function s(c){return r.parser.lazy[r.now().line]?a(c):l(c)}}const Tf={name:"codeIndented",tokenize:S2},x2={partial:!0,tokenize:E2};function S2(t,l,a){const r=this;return o;function o(m){return t.enter("codeIndented"),Ze(t,s,"linePrefix",5)(m)}function s(m){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(m):a(m)}function c(m){return m===null?p(m):_e(m)?t.attempt(x2,c,p)(m):(t.enter("codeFlowValue"),d(m))}function d(m){return m===null||_e(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),d)}function p(m){return t.exit("codeIndented"),l(m)}}function E2(t,l,a){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?a(c):_e(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):Ze(t,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):_e(c)?o(c):a(c)}}const w2={name:"codeText",previous:C2,resolve:k2,tokenize:T2};function k2(t){let l=t.length-4,a=3,r,o;if((t[a][1].type==="lineEnding"||t[a][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=a;++r<l;)if(t[r][1].type==="codeTextData"){t[a][1].type="codeTextPadding",t[l][1].type="codeTextPadding",a+=2,l-=2;break}}for(r=a-1,l++;++r<=l;)o===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(o=r):(r===l||t[r][1].type==="lineEnding")&&(t[o][1].type="codeTextData",r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),l-=r-o-2,r=o+2),o=void 0);return t}function C2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function T2(t,l,a){let r=0,o,s;return c;function c(g){return t.enter("codeText"),t.enter("codeTextSequence"),d(g)}function d(g){return g===96?(t.consume(g),r++,d):(t.exit("codeTextSequence"),p(g))}function p(g){return g===null?a(g):g===32?(t.enter("space"),t.consume(g),t.exit("space"),p):g===96?(s=t.enter("codeTextSequence"),o=0,y(g)):_e(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||_e(g)?(t.exit("codeTextData"),p(g)):(t.consume(g),m)}function y(g){return g===96?(t.consume(g),o++,y):o===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(g)):(s.type="codeTextData",m(g))}}class j2{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,a){const r=a??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,a,r){const o=a||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Dr(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),Dr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Dr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const a=this.left.splice(l,Number.POSITIVE_INFINITY);Dr(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Dr(this.left,a.reverse())}}}function Dr(t,l){let a=0;if(l.length<1e4)t.push(...l);else for(;a<l.length;)t.push(...l.slice(a,a+1e4)),a+=1e4}function F0(t){const l={};let a=-1,r,o,s,c,d,p,m;const y=new j2(t);for(;++a<y.length;){for(;a in l;)a=l[a];if(r=y.get(a),a&&r[1].type==="chunkFlow"&&y.get(a-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,s=0,s<p.length&&p[s][1].type==="lineEndingBlank"&&(s+=2),s<p.length&&p[s][1].type==="content"))for(;++s<p.length&&p[s][1].type!=="content";)p[s][1].type==="chunkText"&&(p[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,A2(y,a)),a=l[a],m=!0);else if(r[1]._container){for(s=a,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(r[1].end={...y.get(o)[1].start},d=y.slice(o,a),d.unshift(r),y.splice(o,a-o+1,d))}}return xn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function A2(t,l){const a=t.get(l)[1],r=t.get(l)[2];let o=l-1;const s=[];let c=a._tokenizer;c||(c=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let y,g,b=-1,x=a,E=0,A=0;const z=[A];for(;x;){for(;t.get(++o)[1]!==x;);s.push(o),x._tokenizer||(y=r.sliceStream(x),x.next||y.push(null),g&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=a;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(A=b+1,z.push(A),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):z.pop(),b=z.length;b--;){const C=d.slice(z[b],z[b+1]),j=s.pop();p.push([j,j+C.length-1]),t.splice(j,2,C)}for(p.reverse(),b=-1;++b<p.length;)m[E+p[b][0]]=E+p[b][1],E+=p[b][1]-p[b][0]-1;return m}const _2={resolve:z2,tokenize:N2},R2={partial:!0,tokenize:D2};function z2(t){return F0(t),t}function N2(t,l){let a;return r;function r(d){return t.enter("content"),a=t.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?s(d):_e(d)?t.check(R2,c,s)(d):(t.consume(d),o)}function s(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),a.next=t.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,o}}function D2(t,l,a){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Ze(t,s,"linePrefix")}function s(c){if(c===null||_e(c))return a(c);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):t.interrupt(r.parser.constructs.flow,a,l)(c)}}function I0(t,l,a,r,o,s,c,d,p){const m=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(C){return C===60?(t.enter(r),t.enter(o),t.enter(s),t.consume(C),t.exit(s),b):C===null||C===32||C===41||Bo(C)?a(C):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),A(C))}function b(C){return C===62?(t.enter(s),t.consume(C),t.exit(s),t.exit(o),t.exit(r),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===62?(t.exit("chunkString"),t.exit(d),b(C)):C===null||C===60||_e(C)?a(C):(t.consume(C),C===92?E:x)}function E(C){return C===60||C===62||C===92?(t.consume(C),x):x(C)}function A(C){return!y&&(C===null||C===41||st(C))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),l(C)):y<m&&C===40?(t.consume(C),y++,A):C===41?(t.consume(C),y--,A):C===null||C===32||C===40||Bo(C)?a(C):(t.consume(C),C===92?z:A)}function z(C){return C===40||C===41||C===92?(t.consume(C),A):A(C)}}function Q0(t,l,a,r,o,s){const c=this;let d=0,p;return m;function m(x){return t.enter(r),t.enter(o),t.consume(x),t.exit(o),t.enter(s),y}function y(x){return d>999||x===null||x===91||x===93&&!p||x===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?a(x):x===93?(t.exit(s),t.enter(o),t.consume(x),t.exit(o),t.exit(r),l):_e(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||_e(x)||d++>999?(t.exit("chunkString"),y(x)):(t.consume(x),p||(p=!Ye(x)),x===92?b:g)}function b(x){return x===91||x===92||x===93?(t.consume(x),d++,g):g(x)}}function X0(t,l,a,r,o,s){let c;return d;function d(b){return b===34||b===39||b===40?(t.enter(r),t.enter(o),t.consume(b),t.exit(o),c=b===40?41:b,p):a(b)}function p(b){return b===c?(t.enter(o),t.consume(b),t.exit(o),t.exit(r),l):(t.enter(s),m(b))}function m(b){return b===c?(t.exit(s),p(c)):b===null?a(b):_e(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),Ze(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||_e(b)?(t.exit("chunkString"),m(b)):(t.consume(b),b===92?g:y)}function g(b){return b===c||b===92?(t.consume(b),y):y(b)}}function Hr(t,l){let a;return r;function r(o){return _e(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a=!0,r):Ye(o)?Ze(t,r,a?"linePrefix":"lineSuffix")(o):l(o)}}const O2={name:"definition",tokenize:L2},M2={partial:!0,tokenize:U2};function L2(t,l,a){const r=this;let o;return s;function s(x){return t.enter("definition"),c(x)}function c(x){return Q0.call(r,t,d,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return o=In(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),p):a(x)}function p(x){return st(x)?Hr(t,m)(x):m(x)}function m(x){return I0(t,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function y(x){return t.attempt(M2,g,g)(x)}function g(x){return Ye(x)?Ze(t,b,"whitespace")(x):b(x)}function b(x){return x===null||_e(x)?(t.exit("definition"),r.parser.defined.push(o),l(x)):a(x)}}function U2(t,l,a){return r;function r(d){return st(d)?Hr(t,o)(d):a(d)}function o(d){return X0(t,s,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Ye(d)?Ze(t,c,"whitespace")(d):c(d)}function c(d){return d===null||_e(d)?l(d):a(d)}}const B2={name:"hardBreakEscape",tokenize:H2};function H2(t,l,a){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),o}function o(s){return _e(s)?(t.exit("hardBreakEscape"),l(s)):a(s)}}const q2={name:"headingAtx",resolve:Y2,tokenize:G2};function Y2(t,l){let a=t.length-2,r=3,o,s;return t[r][1].type==="whitespace"&&(r+=2),a-2>r&&t[a][1].type==="whitespace"&&(a-=2),t[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&t[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[a][1].end},s={type:"chunkText",start:t[r][1].start,end:t[a][1].end,contentType:"text"},xn(t,r,a-r+1,[["enter",o,l],["enter",s,l],["exit",s,l],["exit",o,l]])),t}function G2(t,l,a){let r=0;return o;function o(y){return t.enter("atxHeading"),s(y)}function s(y){return t.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&r++<6?(t.consume(y),c):y===null||st(y)?(t.exit("atxHeadingSequence"),d(y)):a(y)}function d(y){return y===35?(t.enter("atxHeadingSequence"),p(y)):y===null||_e(y)?(t.exit("atxHeading"),l(y)):Ye(y)?Ze(t,d,"whitespace")(y):(t.enter("atxHeadingText"),m(y))}function p(y){return y===35?(t.consume(y),p):(t.exit("atxHeadingSequence"),d(y))}function m(y){return y===null||y===35||st(y)?(t.exit("atxHeadingText"),d(y)):(t.consume(y),m)}}const V2=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Iy=["pre","script","style","textarea"],F2={concrete:!0,name:"htmlFlow",resolveTo:X2,tokenize:$2},I2={partial:!0,tokenize:Z2},Q2={partial:!0,tokenize:K2};function X2(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function $2(t,l,a){const r=this;let o,s,c,d,p;return m;function m(T){return y(T)}function y(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),g}function g(T){return T===33?(t.consume(T),b):T===47?(t.consume(T),s=!0,A):T===63?(t.consume(T),o=3,r.interrupt?l:N):Zt(T)?(t.consume(T),c=String.fromCharCode(T),z):a(T)}function b(T){return T===45?(t.consume(T),o=2,x):T===91?(t.consume(T),o=5,d=0,E):Zt(T)?(t.consume(T),o=4,r.interrupt?l:N):a(T)}function x(T){return T===45?(t.consume(T),r.interrupt?l:N):a(T)}function E(T){const ce="CDATA[";return T===ce.charCodeAt(d++)?(t.consume(T),d===ce.length?r.interrupt?l:G:E):a(T)}function A(T){return Zt(T)?(t.consume(T),c=String.fromCharCode(T),z):a(T)}function z(T){if(T===null||T===47||T===62||st(T)){const ce=T===47,ve=c.toLowerCase();return!ce&&!s&&Iy.includes(ve)?(o=1,r.interrupt?l(T):G(T)):V2.includes(c.toLowerCase())?(o=6,ce?(t.consume(T),C):r.interrupt?l(T):G(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(T):s?j(T):D(T))}return T===45||It(T)?(t.consume(T),c+=String.fromCharCode(T),z):a(T)}function C(T){return T===62?(t.consume(T),r.interrupt?l:G):a(T)}function j(T){return Ye(T)?(t.consume(T),j):R(T)}function D(T){return T===47?(t.consume(T),R):T===58||T===95||Zt(T)?(t.consume(T),te):Ye(T)?(t.consume(T),D):R(T)}function te(T){return T===45||T===46||T===58||T===95||It(T)?(t.consume(T),te):P(T)}function P(T){return T===61?(t.consume(T),H):Ye(T)?(t.consume(T),P):D(T)}function H(T){return T===null||T===60||T===61||T===62||T===96?a(T):T===34||T===39?(t.consume(T),p=T,_):Ye(T)?(t.consume(T),H):ne(T)}function _(T){return T===p?(t.consume(T),p=null,J):T===null||_e(T)?a(T):(t.consume(T),_)}function ne(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||st(T)?P(T):(t.consume(T),ne)}function J(T){return T===47||T===62||Ye(T)?D(T):a(T)}function R(T){return T===62?(t.consume(T),V):a(T)}function V(T){return T===null||_e(T)?G(T):Ye(T)?(t.consume(T),V):a(T)}function G(T){return T===45&&o===2?(t.consume(T),B):T===60&&o===1?(t.consume(T),ee):T===62&&o===4?(t.consume(T),L):T===63&&o===3?(t.consume(T),N):T===93&&o===5?(t.consume(T),xe):_e(T)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(I2,Z,F)(T)):T===null||_e(T)?(t.exit("htmlFlowData"),F(T)):(t.consume(T),G)}function F(T){return t.check(Q2,le,Z)(T)}function le(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),I}function I(T){return T===null||_e(T)?F(T):(t.enter("htmlFlowData"),G(T))}function B(T){return T===45?(t.consume(T),N):G(T)}function ee(T){return T===47?(t.consume(T),c="",se):G(T)}function se(T){if(T===62){const ce=c.toLowerCase();return Iy.includes(ce)?(t.consume(T),L):G(T)}return Zt(T)&&c.length<8?(t.consume(T),c+=String.fromCharCode(T),se):G(T)}function xe(T){return T===93?(t.consume(T),N):G(T)}function N(T){return T===62?(t.consume(T),L):T===45&&o===2?(t.consume(T),N):G(T)}function L(T){return T===null||_e(T)?(t.exit("htmlFlowData"),Z(T)):(t.consume(T),L)}function Z(T){return t.exit("htmlFlow"),l(T)}}function K2(t,l,a){const r=this;return o;function o(c){return _e(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):a(c)}function s(c){return r.parser.lazy[r.now().line]?a(c):l(c)}}function Z2(t,l,a){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(tu,l,a)}}const P2={name:"htmlText",tokenize:J2};function J2(t,l,a){const r=this;let o,s,c;return d;function d(N){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(N),p}function p(N){return N===33?(t.consume(N),m):N===47?(t.consume(N),P):N===63?(t.consume(N),D):Zt(N)?(t.consume(N),ne):a(N)}function m(N){return N===45?(t.consume(N),y):N===91?(t.consume(N),s=0,E):Zt(N)?(t.consume(N),j):a(N)}function y(N){return N===45?(t.consume(N),x):a(N)}function g(N){return N===null?a(N):N===45?(t.consume(N),b):_e(N)?(c=g,ee(N)):(t.consume(N),g)}function b(N){return N===45?(t.consume(N),x):g(N)}function x(N){return N===62?B(N):N===45?b(N):g(N)}function E(N){const L="CDATA[";return N===L.charCodeAt(s++)?(t.consume(N),s===L.length?A:E):a(N)}function A(N){return N===null?a(N):N===93?(t.consume(N),z):_e(N)?(c=A,ee(N)):(t.consume(N),A)}function z(N){return N===93?(t.consume(N),C):A(N)}function C(N){return N===62?B(N):N===93?(t.consume(N),C):A(N)}function j(N){return N===null||N===62?B(N):_e(N)?(c=j,ee(N)):(t.consume(N),j)}function D(N){return N===null?a(N):N===63?(t.consume(N),te):_e(N)?(c=D,ee(N)):(t.consume(N),D)}function te(N){return N===62?B(N):D(N)}function P(N){return Zt(N)?(t.consume(N),H):a(N)}function H(N){return N===45||It(N)?(t.consume(N),H):_(N)}function _(N){return _e(N)?(c=_,ee(N)):Ye(N)?(t.consume(N),_):B(N)}function ne(N){return N===45||It(N)?(t.consume(N),ne):N===47||N===62||st(N)?J(N):a(N)}function J(N){return N===47?(t.consume(N),B):N===58||N===95||Zt(N)?(t.consume(N),R):_e(N)?(c=J,ee(N)):Ye(N)?(t.consume(N),J):B(N)}function R(N){return N===45||N===46||N===58||N===95||It(N)?(t.consume(N),R):V(N)}function V(N){return N===61?(t.consume(N),G):_e(N)?(c=V,ee(N)):Ye(N)?(t.consume(N),V):J(N)}function G(N){return N===null||N===60||N===61||N===62||N===96?a(N):N===34||N===39?(t.consume(N),o=N,F):_e(N)?(c=G,ee(N)):Ye(N)?(t.consume(N),G):(t.consume(N),le)}function F(N){return N===o?(t.consume(N),o=void 0,I):N===null?a(N):_e(N)?(c=F,ee(N)):(t.consume(N),F)}function le(N){return N===null||N===34||N===39||N===60||N===61||N===96?a(N):N===47||N===62||st(N)?J(N):(t.consume(N),le)}function I(N){return N===47||N===62||st(N)?J(N):a(N)}function B(N){return N===62?(t.consume(N),t.exit("htmlTextData"),t.exit("htmlText"),l):a(N)}function ee(N){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),se}function se(N){return Ye(N)?Ze(t,xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):xe(N)}function xe(N){return t.enter("htmlTextData"),c(N)}}const Fd={name:"labelEnd",resolveAll:nT,resolveTo:lT,tokenize:iT},W2={tokenize:aT},eT={tokenize:rT},tT={tokenize:uT};function nT(t){let l=-1;const a=[];for(;++l<t.length;){const r=t[l][1];if(a.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",l+=o}}return t.length!==a.length&&xn(t,0,t.length,a),t}function lT(t,l){let a=t.length,r=0,o,s,c,d;for(;a--;)if(o=t[a][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[a][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(t[a][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=a,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(c=a);const p={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[s][1].start},end:{...t[c][1].end}},y={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",p,l],["enter",m,l]],d=Dn(d,t.slice(s+1,s+r+3)),d=Dn(d,[["enter",y,l]]),d=Dn(d,Wo(l.parser.constructs.insideSpan.null,t.slice(s+r+4,c-3),l)),d=Dn(d,[["exit",y,l],t[c-2],t[c-1],["exit",m,l]]),d=Dn(d,t.slice(c+1)),d=Dn(d,[["exit",p,l]]),xn(t,s,t.length,d),t}function iT(t,l,a){const r=this;let o=r.events.length,s,c;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){s=r.events[o][1];break}return d;function d(b){return s?s._inactive?g(b):(c=r.parser.defined.includes(In(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),p):a(b)}function p(b){return b===40?t.attempt(W2,y,c?y:g)(b):b===91?t.attempt(eT,y,c?m:g)(b):c?y(b):g(b)}function m(b){return t.attempt(tT,y,g)(b)}function y(b){return l(b)}function g(b){return s._balanced=!0,a(b)}}function aT(t,l,a){return r;function r(g){return t.enter("resource"),t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),o}function o(g){return st(g)?Hr(t,s)(g):s(g)}function s(g){return g===41?y(g):I0(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return st(g)?Hr(t,p)(g):y(g)}function d(g){return a(g)}function p(g){return g===34||g===39||g===40?X0(t,m,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function m(g){return st(g)?Hr(t,y)(g):y(g)}function y(g){return g===41?(t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),t.exit("resource"),l):a(g)}}function rT(t,l,a){const r=this;return o;function o(d){return Q0.call(r,t,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return r.parser.defined.includes(In(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(d):a(d)}function c(d){return a(d)}}function uT(t,l,a){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),o}function o(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),l):a(s)}}const oT={name:"labelStartImage",resolveAll:Fd.resolveAll,tokenize:sT};function sT(t,l,a){const r=this;return o;function o(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),s}function s(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):a(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(d):l(d)}}const cT={name:"labelStartLink",resolveAll:Fd.resolveAll,tokenize:fT};function fT(t,l,a){const r=this;return o;function o(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(c):l(c)}}const jf={name:"lineEnding",tokenize:dT};function dT(t,l){return a;function a(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Ze(t,l,"linePrefix")}}const Oo={name:"thematicBreak",tokenize:hT};function hT(t,l,a){let r=0,o;return s;function s(m){return t.enter("thematicBreak"),c(m)}function c(m){return o=m,d(m)}function d(m){return m===o?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||_e(m))?(t.exit("thematicBreak"),l(m)):a(m)}function p(m){return m===o?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Ye(m)?Ze(t,d,"whitespace")(m):d(m))}}const rn={continuation:{tokenize:yT},exit:bT,name:"list",tokenize:gT},mT={partial:!0,tokenize:xT},pT={partial:!0,tokenize:vT};function gT(t,l,a){const r=this,o=r.events[r.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return d;function d(x){const E=r.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||x===r.containerState.marker:td(x)){if(r.containerState.type||(r.containerState.type=E,t.enter(E,{_container:!0})),E==="listUnordered")return t.enter("listItemPrefix"),x===42||x===45?t.check(Oo,a,m)(x):m(x);if(!r.interrupt||x===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(x)}return a(x)}function p(x){return td(x)&&++c<10?(t.consume(x),p):(!r.interrupt||c<2)&&(r.containerState.marker?x===r.containerState.marker:x===41||x===46)?(t.exit("listItemValue"),m(x)):a(x)}function m(x){return t.enter("listItemMarker"),t.consume(x),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||x,t.check(tu,r.interrupt?a:y,t.attempt(mT,b,g))}function y(x){return r.containerState.initialBlankLine=!0,s++,b(x)}function g(x){return Ye(x)?(t.enter("listItemPrefixWhitespace"),t.consume(x),t.exit("listItemPrefixWhitespace"),b):a(x)}function b(x){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(x)}}function yT(t,l,a){const r=this;return r.containerState._closeFlow=void 0,t.check(tu,o,s);function o(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ze(t,l,"listItemIndent",r.containerState.size+1)(d)}function s(d){return r.containerState.furtherBlankLines||!Ye(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(pT,l,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ze(t,t.attempt(rn,l,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function vT(t,l,a){const r=this;return Ze(t,o,"listItemIndent",r.containerState.size+1);function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?l(s):a(s)}}function bT(t){t.exit(this.containerState.type)}function xT(t,l,a){const r=this;return Ze(t,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=r.events[r.events.length-1];return!Ye(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):a(s)}}const Qy={name:"setextUnderline",resolveTo:ST,tokenize:ET};function ST(t,l){let a=t.length,r,o,s;for(;a--;)if(t[a][0]==="enter"){if(t[a][1].type==="content"){r=a;break}t[a][1].type==="paragraph"&&(o=a)}else t[a][1].type==="content"&&t.splice(a,1),!s&&t[a][1].type==="definition"&&(s=a);const c={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",s?(t.splice(o,0,["enter",c,l]),t.splice(s+1,0,["exit",t[r][1],l]),t[r][1].end={...t[s][1].end}):t[r][1]=c,t.push(["exit",c,l]),t}function ET(t,l,a){const r=this;let o;return s;function s(m){let y=r.events.length,g;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){g=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(t.enter("setextHeadingLine"),o=m,c(m)):a(m)}function c(m){return t.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===o?(t.consume(m),d):(t.exit("setextHeadingLineSequence"),Ye(m)?Ze(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||_e(m)?(t.exit("setextHeadingLine"),l(m)):a(m)}}const wT={tokenize:kT};function kT(t){const l=this,a=t.attempt(tu,r,t.attempt(this.parser.constructs.flowInitial,o,Ze(t,t.attempt(this.parser.constructs.flow,o,t.attempt(_2,o)),"linePrefix")));return a;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),l.currentConstruct=void 0,a}function o(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l.currentConstruct=void 0,a}}const CT={resolveAll:K0()},TT=$0("string"),jT=$0("text");function $0(t){return{resolveAll:K0(t==="text"?AT:void 0),tokenize:l};function l(a){const r=this,o=this.parser.constructs[t],s=a.attempt(o,c,d);return c;function c(y){return m(y)?s(y):d(y)}function d(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return m(y)?(a.exit("data"),s(y)):(a.consume(y),p)}function m(y){if(y===null)return!0;const g=o[y];let b=-1;if(g)for(;++b<g.length;){const x=g[b];if(!x.previous||x.previous.call(r,r.previous))return!0}return!1}}}function K0(t){return l;function l(a,r){let o=-1,s;for(;++o<=a.length;)s===void 0?a[o]&&a[o][1].type==="data"&&(s=o,o++):(!a[o]||a[o][1].type!=="data")&&(o!==s+2&&(a[s][1].end=a[o-1][1].end,a.splice(s+2,o-s-2),o=s+2),s=void 0);return t?t(a,r):a}}function AT(t,l){let a=0;for(;++a<=t.length;)if((a===t.length||t[a][1].type==="lineEnding")&&t[a-1][1].type==="data"){const r=t[a-1][1],o=l.sliceStream(r);let s=o.length,c=-1,d=0,p;for(;s--;){const m=o[s];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){s++;break}}if(l._contentTypeTextTrailing&&a===t.length&&(d=0),d){const m={type:a===t.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:r.start._bufferIndex+c,_index:r.start._index+s,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(t.splice(a,0,["enter",m,l],["exit",m,l]),a+=2)}a++}return t}const _T={42:rn,43:rn,45:rn,48:rn,49:rn,50:rn,51:rn,52:rn,53:rn,54:rn,55:rn,56:rn,57:rn,62:Y0},RT={91:O2},zT={[-2]:Tf,[-1]:Tf,32:Tf},NT={35:q2,42:Oo,45:[Qy,Oo],60:F2,61:Qy,95:Oo,96:Fy,126:Fy},DT={38:V0,92:G0},OT={[-5]:jf,[-4]:jf,[-3]:jf,33:oT,38:V0,42:nd,60:[c2,P2],91:cT,92:[B2,G0],93:Fd,95:nd,96:w2},MT={null:[nd,CT]},LT={null:[42,95]},UT={null:[]},BT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:LT,contentInitial:RT,disable:UT,document:_T,flow:NT,flowInitial:zT,insideSpan:MT,string:DT,text:OT},Symbol.toStringTag,{value:"Module"}));function HT(t,l,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const o={},s=[];let c=[],d=[];const p={attempt:_(P),check:_(H),consume:j,enter:D,exit:te,interrupt:_(H,{interrupt:!0})},m={code:null,containerState:{},defineSkip:A,events:[],now:E,parser:t,previous:null,sliceSerialize:b,sliceStream:x,write:g};let y=l.tokenize.call(m,p);return l.resolveAll&&s.push(l),m;function g(V){return c=Dn(c,V),z(),c[c.length-1]!==null?[]:(ne(l,0),m.events=Wo(s,m.events,m),m.events)}function b(V,G){return YT(x(V),G)}function x(V){return qT(c,V)}function E(){const{_bufferIndex:V,_index:G,line:F,column:le,offset:I}=r;return{_bufferIndex:V,_index:G,line:F,column:le,offset:I}}function A(V){o[V.line]=V.column,R()}function z(){let V;for(;r._index<c.length;){const G=c[r._index];if(typeof G=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<G.length;)C(G.charCodeAt(r._bufferIndex));else C(G)}}function C(V){y=y(V)}function j(V){_e(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,R()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=V}function D(V,G){const F=G||{};return F.type=V,F.start=E(),m.events.push(["enter",F,m]),d.push(F),F}function te(V){const G=d.pop();return G.end=E(),m.events.push(["exit",G,m]),G}function P(V,G){ne(V,G.from)}function H(V,G){G.restore()}function _(V,G){return F;function F(le,I,B){let ee,se,xe,N;return Array.isArray(le)?Z(le):"tokenize"in le?Z([le]):L(le);function L(be){return De;function De(pe){const Re=pe!==null&&be[pe],zt=pe!==null&&be.null,Ln=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(zt)?zt:zt?[zt]:[]];return Z(Ln)(pe)}}function Z(be){return ee=be,se=0,be.length===0?B:T(be[se])}function T(be){return De;function De(pe){return N=J(),xe=be,be.partial||(m.currentConstruct=be),be.name&&m.parser.constructs.disable.null.includes(be.name)?ve():be.tokenize.call(G?Object.assign(Object.create(m),G):m,p,ce,ve)(pe)}}function ce(be){return V(xe,N),I}function ve(be){return N.restore(),++se<ee.length?T(ee[se]):B}}}function ne(V,G){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&xn(m.events,G,m.events.length-G,V.resolve(m.events.slice(G),m)),V.resolveTo&&(m.events=V.resolveTo(m.events,m))}function J(){const V=E(),G=m.previous,F=m.currentConstruct,le=m.events.length,I=Array.from(d);return{from:le,restore:B};function B(){r=V,m.previous=G,m.currentConstruct=F,m.events.length=le,d=I,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function qT(t,l){const a=l.start._index,r=l.start._bufferIndex,o=l.end._index,s=l.end._bufferIndex;let c;if(a===o)c=[t[a].slice(r,s)];else{if(c=t.slice(a,o),r>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(r):c.shift()}s>0&&c.push(t[o].slice(0,s))}return c}function YT(t,l){let a=-1;const r=[];let o;for(;++a<t.length;){const s=t[a];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
188
|
+
`,So=16,tC=({reverseOrder:t,position:l="top-center",toastOptions:a,gutter:r,children:o,toasterId:s,containerStyle:c,containerClassName:d})=>{let{toasts:p,handlers:m}=_k(a,s);return k.createElement("div",{"data-rht-toaster":s||"",style:{position:"fixed",zIndex:9999,top:So,left:So,right:So,bottom:So,pointerEvents:"none",...c},className:d,onMouseEnter:m.startPause,onMouseLeave:m.endPause},p.map(y=>{let g=y.position||l,b=m.calculateOffset(y,{reverseOrder:t,gutter:r,defaultPosition:l}),S=Wk(g,b);return k.createElement(Jk,{id:y.id,key:y.id,onHeightUpdate:m.updateHeight,className:y.visible?eC:"",style:S},y.type==="custom"?Uo(y.message,y):o?o(y):k.createElement(Pk,{toast:y,position:g}))}))};function nC(){return x.jsx(tC,{position:"bottom-right",toastOptions:{style:{background:"var(--bg-surface)",color:"var(--text)",border:"1px solid var(--border)",fontFamily:"var(--font-mono)",fontSize:"13px"},success:{iconTheme:{primary:"var(--green)",secondary:"var(--bg-surface)"}},error:{iconTheme:{primary:"var(--red)",secondary:"var(--bg-surface)"}}}})}const S0=k.createContext(null);function Po(){const t=k.useContext(S0);if(!t)throw new Error("useAppContext must be used within AppShell");return t}function lC(){const[t,l]=k.useState(()=>window.innerWidth<=768);return k.useEffect(()=>{const a=window.matchMedia("(max-width: 768px)"),r=o=>l(o.matches);return a.addEventListener("change",r),()=>a.removeEventListener("change",r)},[]),t}function iC(){const[t,l]=k.useState(()=>za()),[a,r]=k.useState(null),[o,s]=k.useState(null),[c,d]=k.useState(!1),[p]=k.useState(!1),[m,y]=k.useState(null),[g,b]=k.useState(()=>Lo()),[S,E]=k.useState(()=>localStorage.getItem("sidebarCollapsed")==="true"),[j,N]=k.useState(!1),C=lC(),A=k.useCallback(()=>{E(le=>(localStorage.setItem("sidebarCollapsed",String(!le)),!le))},[]),D=k.useCallback(()=>N(!0),[]),te=k.useCallback(()=>N(!1),[]),P=Oa(),H=tl(),_=k.useCallback(()=>{b(Lo())},[]),ne=k.useCallback(()=>{l(za()),y(null)},[]),W=k.useRef(H.pathname);k.useEffect(()=>{const le=ee=>ee.startsWith("/session/")||ee.startsWith("/shared/"),$=le(W.current),U=le(H.pathname);W.current=H.pathname,N(!1),U&&!$&&(E(!0),localStorage.setItem("sidebarCollapsed","true")),!U&&$&&(E(!1),localStorage.setItem("sidebarCollapsed","false")),U||ne()},[H.pathname,ne]);const R=k.useCallback(async()=>{const le=Ow();if(s(le),zo()&&Xf()){r("oauth");return}try{const{oauthToken:$}=await $w();if($){_w($),r("keychain");return}}catch{if(Xf()){r("keychain");return}}if(Aw()){r("api-key");return}r(null),d(!0)},[]);k.useEffect(()=>{R()},[R]);const V=k.useCallback(le=>{const $=le.split(/\s+/).slice(0,3).join(" ");y({name:$||"New project"}),P("/session/new",{state:{description:le}})},[P]),G=k.useCallback(async le=>{try{await Fw(le)}catch{}Mw(le),ne(),H.pathname===`/session/${le}`&&P("/")},[H.pathname,P,ne]),F={sessions:t,pendingProject:m,authSource:a,hasGhToken:o,showSettings:c,setShowSettings:d,refreshSessions:ne,refreshSettings:R,handleNewProject:V,handleDeleteSession:G,loading:p,joinedSharedSessions:g,refreshJoinedSharedSessions:_};return x.jsxs(S0.Provider,{value:F,children:[x.jsxs("div",{className:`app-shell ${S?"sidebar-collapsed":""}`,children:[C&&j&&x.jsx("div",{className:"sidebar-backdrop",onClick:te,onKeyDown:le=>{le.key==="Escape"&&te()}}),x.jsx(hk,{collapsed:S,onToggle:A,mobileOpen:j,onMobileClose:te}),x.jsx("main",{className:"main-content",children:x.jsx(GE,{context:{openMobileDrawer:D}})}),x.jsx("button",{type:"button",className:"global-settings-btn",onClick:()=>d(le=>!le),title:"Settings",children:x.jsxs("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",width:"16",height:"16","aria-label":"Settings",children:[x.jsx("title",{children:"Settings"}),x.jsx("path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}),x.jsx("circle",{cx:"12",cy:"12",r:"3"})]})})]}),x.jsx(nC,{})]})}function E0({onSubmit:t,placeholder:l,disabled:a,isRunning:r,onCancel:o}){const[s,c]=k.useState(""),d=k.useRef(null),p=k.useCallback(()=>{const b=s.trim();b&&(t(b),c(""),d.current&&(d.current.style.height="auto"))},[s,t]),m=k.useCallback(()=>{r&&o&&o()},[r,o]);$o(m,!r);const y=k.useCallback(b=>{b.key==="Enter"&&!b.shiftKey&&(b.preventDefault(),p())},[p]),g=k.useCallback(()=>{const b=d.current;b&&(b.style.height="auto",b.style.height=`${Math.min(b.scrollHeight,200)}px`)},[]);return x.jsxs("div",{className:"prompt-bar",children:[x.jsx("textarea",{ref:d,value:s,onChange:b=>{c(b.target.value),g()},onKeyDown:y,placeholder:l??"Describe what you want to build...",disabled:a,rows:1}),x.jsx("button",{className:"primary",onClick:p,disabled:a||!s.trim(),children:"Send"}),r&&o&&x.jsx("button",{className:"danger",onClick:o,children:"Stop"})]})}function aC(t){const l=Date.now()-new Date(t).getTime(),a=Math.floor(l/6e4);if(a<1)return"just now";if(a<60)return`${a}m ago`;const r=Math.floor(a/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function rC({onSelect:t,onClose:l}){const[a,r]=k.useState([]),[o,s]=k.useState(!0),[c,d]=k.useState(null),[p,m]=k.useState(""),[y,g]=k.useState(null),[b,S]=k.useState([]),[E,j]=k.useState(!1),[N,C]=k.useState(""),[A,D]=k.useState(""),[te,P]=k.useState(!1);k.useEffect(()=>{Qw().then(F=>{r(F.repos),s(!1)}).catch(F=>{d(F instanceof Error?F.message:"Failed to load repos"),s(!1)})},[]);function H(F){g(F),j(!0),S([]),C(""),P(!1),D(""),Xw(F.nameWithOwner).then(le=>{S(le.branches),j(!1)}).catch(()=>{j(!1)})}function _(){g(null),S([]),C(""),P(!1)}function ne(F){y&&t(y.url,F)}const W=k.useCallback(()=>{y?_():l()},[y,l]);$o(W);const R=p?a.filter(F=>F.nameWithOwner.toLowerCase().includes(p.toLowerCase())):a,G=[...N?b.filter(F=>F.name.toLowerCase().includes(N.toLowerCase())):b].sort((F,le)=>F.isDefault&&!le.isDefault?-1:!F.isDefault&&le.isDefault?1:F.name.localeCompare(le.name));return Io.createPortal(x.jsx("div",{className:"modal-overlay",onClick:l,children:x.jsx("div",{className:"modal-card",onClick:F=>F.stopPropagation(),style:{maxWidth:500},children:y?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"modal-title",children:[x.jsx("button",{type:"button",onClick:_,style:{background:"none",border:"none",color:"var(--text-muted)",cursor:"pointer",padding:"0 8px 0 0",fontSize:14},children:"←"}),y.nameWithOwner]}),x.jsx("div",{className:"repo-picker-filter",children:x.jsx("input",{type:"text",value:N,onChange:F=>C(F.target.value),placeholder:"Filter branches..."})}),E&&x.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading branches..."}),!E&&x.jsxs("div",{className:"repo-picker-list",children:[G.map(F=>x.jsx("div",{className:"repo-picker-item",onClick:()=>ne(F.name),children:x.jsxs("span",{className:"repo-picker-item-name",children:[F.name,F.isDefault&&x.jsx("span",{style:{marginLeft:8,fontSize:11,color:"var(--text-subtle)",fontWeight:400},children:"default"})]})},F.name)),te?x.jsxs("div",{className:"repo-picker-new-branch",children:[x.jsx("input",{type:"text",value:A,onChange:F=>D(F.target.value),onKeyDown:F=>{F.key==="Enter"&&A.trim()&&ne(A.trim())},placeholder:"branch-name"}),x.jsx("button",{type:"button",className:"modal-btn modal-btn-primary",disabled:!A.trim(),onClick:()=>ne(A.trim()),children:"Create"})]}):x.jsx("div",{className:"repo-picker-item",style:{color:"var(--brand-1)"},onClick:()=>P(!0),children:x.jsx("span",{className:"repo-picker-item-name",children:"+ Create new branch"})})]}),x.jsxs("div",{className:"modal-actions",children:[x.jsx("button",{type:"button",className:"modal-btn",onClick:_,children:"Back"}),x.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})]})]}):x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"modal-title",children:"Resume from GitHub"}),x.jsx("div",{className:"repo-picker-filter",children:x.jsx("input",{type:"text",value:p,onChange:F=>m(F.target.value),placeholder:"Filter repositories..."})}),o&&x.jsx("div",{style:{padding:"24px 0",textAlign:"center",color:"var(--text-subtle)"},children:"Loading repositories..."}),c&&x.jsx("div",{style:{padding:"16px 0",color:"var(--red)",fontSize:13},children:c}),!o&&!c&&x.jsx("div",{className:"repo-picker-list",children:R.length===0?x.jsx("div",{style:{padding:16,textAlign:"center",color:"var(--text-subtle)",fontSize:13},children:p?"No matching repos":"No repos found"}):R.map(F=>x.jsxs("div",{className:"repo-picker-item",onClick:()=>H(F),children:[x.jsx("span",{className:"repo-picker-item-name",children:F.nameWithOwner}),x.jsx("span",{className:"repo-picker-item-date",children:aC(F.updatedAt)})]},F.nameWithOwner))}),x.jsx("div",{className:"modal-actions",children:x.jsx("button",{type:"button",className:"modal-btn",onClick:l,children:"Cancel"})})]})})}),document.body)}function w0({authSource:t,hasGhToken:l,onKeySaved:a,onClose:r,onCopyLog:o}){const s=k.useId(),c=k.useId(),[d,p]=k.useState(zo()||t==="oauth"?"oauth":"api-key"),[m,y]=k.useState(""),[g,b]=k.useState(""),[S,E]=k.useState(!1),j=d==="api-key"?t==="api-key":zo(),N=k.useCallback(()=>{m.trim()&&(d==="api-key"?Tw(m.trim()):Nw(m.trim()),y(""),a())},[m,d,a]),C=k.useCallback(()=>{d==="api-key"?jw():Rw(),a()},[d,a]),A=k.useCallback(()=>{g.trim()&&(zw(g.trim()),b(""),a())},[g,a]),D=k.useCallback(()=>{Dw(),a()},[a]),te=k.useCallback(ne=>{ne.key==="Enter"&&(ne.preventDefault(),N())},[N]),P=k.useCallback(ne=>{ne.key==="Enter"&&(ne.preventDefault(),A())},[A]),H=k.useCallback(()=>{o?.(),E(!0),setTimeout(()=>E(!1),2e3)},[o]);$o(r);const _=d==="api-key"?t==="api-key"?"Enter new key to override...":"sk-ant-...":zo()?"Enter new token to override...":"Paste OAuth token...";return Io.createPortal(x.jsx("div",{className:"modal-overlay",onClick:r,children:x.jsxs("div",{className:"modal-card",onClick:ne=>ne.stopPropagation(),children:[x.jsx("div",{className:"modal-title",children:"Settings"}),x.jsxs("div",{className:"settings-field",style:{marginTop:12},children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[x.jsx("label",{htmlFor:s,style:{margin:0},children:"Claude Authentication"}),x.jsx("span",{className:`settings-status ${t?"active":"missing"}`,children:t==="keychain"?"Using Claude keychain":t==="oauth"?"OAuth token set":t==="api-key"?"API key set":"No credentials"})]}),t==="keychain"&&x.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"Credentials detected from macOS Keychain. No manual key needed."}),!t&&x.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginBottom:8},children:"If you have Claude Code installed on macOS, credentials are automatically read from the Keychain. Otherwise, enter a key below."}),x.jsxs("div",{className:"settings-input-row",children:[x.jsxs("select",{value:d,onChange:ne=>{p(ne.target.value),y("")},className:"settings-key-type-select",children:[x.jsx("option",{value:"api-key",children:"API Key"}),x.jsx("option",{value:"oauth",children:"OAuth Token"})]}),x.jsx("input",{id:s,type:"password",value:m,onChange:ne=>y(ne.target.value),onKeyDown:te,placeholder:_}),m.trim()?x.jsx("button",{type:"button",onClick:N,className:"primary",children:"Save"}):j&&x.jsx("button",{type:"button",onClick:C,className:"btn btn-danger",children:"Remove"})]})]}),x.jsx("div",{className:"settings-divider"}),x.jsx("div",{className:"settings-section-label",children:"GitHub"}),x.jsxs("div",{className:"settings-field",children:[x.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[x.jsx("label",{htmlFor:c,style:{margin:0},children:"Personal Access Token"}),x.jsx("span",{className:`settings-status ${l?"active":"missing"}`,children:l?"Connected":"Not connected"})]}),x.jsxs("div",{className:"settings-input-row",children:[x.jsx("input",{id:c,type:"password",value:g,onChange:ne=>b(ne.target.value),onKeyDown:P,placeholder:l?"Enter new token to override...":"ghp_..."}),g.trim()?x.jsx("button",{type:"button",onClick:A,className:"primary",children:"Save"}):l&&x.jsx("button",{type:"button",onClick:D,className:"btn btn-danger",children:"Remove"})]}),x.jsxs("div",{style:{fontSize:11,color:"var(--text-subtle)",marginTop:4},children:["Required scopes: ",x.jsx("code",{children:"repo"}),", ",x.jsx("code",{children:"read:user"}),". Create one at"," ",x.jsx("a",{href:"https://github.com/settings/tokens/new?scopes=repo,read:user",target:"_blank",rel:"noopener noreferrer",style:{color:"var(--brand-1)"},children:"github.com/settings/tokens"})]})]}),x.jsx("div",{className:"settings-divider"}),o&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"settings-divider"}),x.jsx("div",{className:"settings-section-label",children:"Debug"}),x.jsx("button",{type:"button",className:"btn",onClick:H,children:S?"Copied!":"Copy session log"})]}),x.jsx("div",{className:"modal-actions",style:{marginTop:16},children:x.jsx("button",{type:"button",className:"modal-btn",onClick:r,children:"Close"})})]})}),document.body)}function uC(){const{authSource:t,hasGhToken:l,showSettings:a,setShowSettings:r,refreshSettings:o,refreshSessions:s,handleNewProject:c,loading:d}=Po(),p=Oa(),{openMobileDrawer:m}=Kv(),[y,g]=k.useState(!1),[b,S]=k.useState(!1),E=k.useCallback(async(j,N)=>{g(!1),S(!0);try{const{sessionId:C,session:A}=await Kw(j,N);a0(A),s(),p(`/session/${C}`)}catch(C){console.error("Failed to resume from GitHub:",C)}finally{S(!1)}},[p,s]);return x.jsxs(x.Fragment,{children:[a&&x.jsx(w0,{authSource:t,hasGhToken:l??!1,onKeySaved:o,onClose:()=>r(!1)}),x.jsxs("div",{className:"mobile-home-topbar",children:[x.jsx("button",{type:"button",className:"mobile-hamburger",onClick:m,"aria-label":"Open menu",children:x.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[x.jsx("title",{children:"Menu"}),x.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),x.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),x.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),x.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"mobile-topbar-logo"})]}),x.jsxs("div",{className:"hero",children:[x.jsx("img",{src:"/img/brand/logo.svg",alt:"Electric",className:"hero-logo"}),x.jsx("p",{className:"hero-subtitle",children:"Build Reactive apps on Sync"}),x.jsx("div",{className:"hero-prompt",children:x.jsx(E0,{onSubmit:c,placeholder:t?"Describe the app you want to build...":"Set an API key in Settings to get started...",disabled:d||!t})}),l&&x.jsx("button",{type:"button",className:"hero-resume-btn",onClick:()=>g(!0),disabled:b,children:b?"Cloning...":"Resume from GitHub"})]}),y&&x.jsx(rC,{onSelect:E,onClose:()=>g(!1)})]})}function oC(t,l){const a={};return(t[t.length-1]===""?[...t,""]:t).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const sC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,fC={};function _y(t,l){return(fC.jsx?cC:sC).test(t)}const dC=/[ \t\n\f\r]/g;function hC(t){return typeof t=="object"?t.type==="text"?Ry(t.value):!1:Ry(t)}function Ry(t){return t.replace(dC,"")===""}class eu{constructor(l,a,r){this.normal=a,this.property=l,r&&(this.space=r)}}eu.prototype.normal={};eu.prototype.property={};eu.prototype.space=void 0;function k0(t,l){const a={},r={};for(const o of t)Object.assign(a,o.property),Object.assign(r,o.normal);return new eu(a,r,l)}function Pf(t){return t.toLowerCase()}class un{constructor(l,a){this.attribute=a,this.property=l}}un.prototype.attribute="";un.prototype.booleanish=!1;un.prototype.boolean=!1;un.prototype.commaOrSpaceSeparated=!1;un.prototype.commaSeparated=!1;un.prototype.defined=!1;un.prototype.mustUseProperty=!1;un.prototype.number=!1;un.prototype.overloadedBoolean=!1;un.prototype.property="";un.prototype.spaceSeparated=!1;un.prototype.space=void 0;let mC=0;const Ue=Gi(),_t=Gi(),Jf=Gi(),fe=Gi(),ct=Gi(),Ra=Gi(),vn=Gi();function Gi(){return 2**++mC}const Wf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:_t,commaOrSpaceSeparated:vn,commaSeparated:Ra,number:fe,overloadedBoolean:Jf,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),wf=Object.keys(Wf);class Bd extends un{constructor(l,a,r,o){let s=-1;if(super(l,a),Ny(this,"space",o),typeof r=="number")for(;++s<wf.length;){const c=wf[s];Ny(this,wf[s],(r&Wf[c])===Wf[c])}}}Bd.prototype.defined=!0;function Ny(t,l,a){a&&(t[l]=a)}function La(t){const l={},a={};for(const[r,o]of Object.entries(t.properties)){const s=new Bd(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),l[r]=s,a[Pf(r)]=r,a[Pf(s.attribute)]=r}return new eu(l,a,t.space)}const C0=La({properties:{ariaActiveDescendant:null,ariaAtomic:_t,ariaAutoComplete:null,ariaBusy:_t,ariaChecked:_t,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:_t,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:_t,ariaFlowTo:ct,ariaGrabbed:_t,ariaHasPopup:null,ariaHidden:_t,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:fe,ariaLive:null,ariaModal:_t,ariaMultiLine:_t,ariaMultiSelectable:_t,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:_t,ariaReadOnly:_t,ariaRelevant:null,ariaRequired:_t,ariaRoleDescription:ct,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:_t,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(t,l){return l==="role"?l:"aria-"+l.slice(4).toLowerCase()}});function T0(t,l){return l in t?t[l]:l}function j0(t,l){return T0(t,l.toLowerCase())}const pC=La({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ra,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ct,autoFocus:Ue,autoPlay:Ue,blocking:ct,capture:null,charSet:null,checked:Ue,cite:null,className:ct,cols:fe,colSpan:null,content:null,contentEditable:_t,controls:Ue,controlsList:ct,coords:fe|Ra,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:Jf,draggable:_t,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ct,height:fe,hidden:Jf,high:fe,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ue,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ue,optimum:fe,pattern:null,ping:ct,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ct,required:Ue,reversed:Ue,rows:fe,rowSpan:fe,sandbox:ct,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:_t,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:_t,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:_t,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:j0}),gC=La({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:vn,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:ct,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ra,g2:Ra,glyphName:Ra,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:vn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:fe,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:vn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:vn,rev:vn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:vn,requiredFeatures:vn,requiredFonts:vn,requiredFormats:vn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:vn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:vn,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:vn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:T0}),A0=La({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,l){return"xlink:"+l.slice(5).toLowerCase()}}),_0=La({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:j0}),R0=La({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),yC={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},vC=/[A-Z]/g,zy=/-[a-z]/g,bC=/^data[-\w.:]+$/i;function xC(t,l){const a=Pf(l);let r=l,o=un;if(a in t.normal)return t.property[t.normal[a]];if(a.length>4&&a.slice(0,4)==="data"&&bC.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(zy,EC);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!zy.test(s)){let c=s.replace(vC,SC);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}o=Bd}return new o(r,l)}function SC(t){return"-"+t.toLowerCase()}function EC(t){return t.charAt(1).toUpperCase()}const wC=k0([C0,pC,A0,_0,R0],"html"),Hd=k0([C0,gC,A0,_0,R0],"svg");function kC(t){return t.join(" ").trim()}var ka={},kf,Dy;function CC(){if(Dy)return kf;Dy=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,l=/\n/g,a=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
189
|
+
`,m="/",y="*",g="",b="comment",S="declaration";function E(N,C){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];C=C||{};var A=1,D=1;function te(le){var $=le.match(l);$&&(A+=$.length);var U=le.lastIndexOf(p);D=~U?le.length-U:D+le.length}function P(){var le={line:A,column:D};return function($){return $.position=new H(le),W(),$}}function H(le){this.start=le,this.end={line:A,column:D},this.source=C.source}H.prototype.content=N;function _(le){var $=new Error(C.source+":"+A+":"+D+": "+le);if($.reason=le,$.filename=C.source,$.line=A,$.column=D,$.source=N,!C.silent)throw $}function ne(le){var $=le.exec(N);if($){var U=$[0];return te(U),N=N.slice(U.length),$}}function W(){ne(a)}function R(le){var $;for(le=le||[];$=V();)$!==!1&&le.push($);return le}function V(){var le=P();if(!(m!=N.charAt(0)||y!=N.charAt(1))){for(var $=2;g!=N.charAt($)&&(y!=N.charAt($)||m!=N.charAt($+1));)++$;if($+=2,g===N.charAt($-1))return _("End of comment missing");var U=N.slice(2,$-2);return D+=2,te(U),N=N.slice($),D+=2,le({type:b,comment:U})}}function G(){var le=P(),$=ne(r);if($){if(V(),!ne(o))return _("property missing ':'");var U=ne(s),ee=le({type:S,property:j($[0].replace(t,g)),value:U?j(U[0].replace(t,g)):g});return ne(c),ee}}function F(){var le=[];R(le);for(var $;$=G();)$!==!1&&(le.push($),R(le));return le}return W(),F()}function j(N){return N?N.replace(d,g):g}return kf=E,kf}var Oy;function TC(){if(Oy)return ka;Oy=1;var t=ka&&ka.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(ka,"__esModule",{value:!0}),ka.default=a;const l=t(CC());function a(r,o){let s=null;if(!r||typeof r!="string")return s;const c=(0,l.default)(r),d=typeof o=="function";return c.forEach(p=>{if(p.type!=="declaration")return;const{property:m,value:y}=p;d?o(m,y,p):y&&(s=s||{},s[m]=y)}),s}return ka}var Dr={},My;function jC(){if(My)return Dr;My=1,Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,l=/-([a-z])/g,a=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(m){return!m||a.test(m)||t.test(m)},c=function(m,y){return y.toUpperCase()},d=function(m,y){return"".concat(y,"-")},p=function(m,y){return y===void 0&&(y={}),s(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(o,d):m=m.replace(r,d),m.replace(l,c))};return Dr.camelCase=p,Dr}var Or,Ly;function AC(){if(Ly)return Or;Ly=1;var t=Or&&Or.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},l=t(TC()),a=jC();function r(o,s){var c={};return!o||typeof o!="string"||(0,l.default)(o,function(d,p){d&&p&&(c[(0,a.camelCase)(d,s)]=p)}),c}return r.default=r,Or=r,Or}var _C=AC();const RC=md(_C),N0=z0("end"),qd=z0("start");function z0(t){return l;function l(a){const r=a&&a.position&&a.position[t]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function NC(t){const l=qd(t),a=N0(t);if(l&&a)return{start:l,end:a}}function qr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?Uy(t.position):"start"in t||"end"in t?Uy(t):"line"in t||"column"in t?ed(t):""}function ed(t){return By(t&&t.line)+":"+By(t&&t.column)}function Uy(t){return ed(t&&t.start)+"-"+ed(t&&t.end)}function By(t){return t&&typeof t=="number"?t:1}class Xt extends Error{constructor(l,a,r){super(),typeof a=="string"&&(r=a,a=void 0);let o="",s={},c=!1;if(a&&("line"in a&&"column"in a?s={place:a}:"start"in a&&"end"in a?s={place:a}:"type"in a?s={ancestors:[a],place:a.position}:s={...a}),typeof l=="string"?o=l:!s.cause&&l&&(c=!0,o=l.message,s.cause=l),!s.ruleId&&!s.source&&typeof r=="string"){const p=r.indexOf(":");p===-1?s.ruleId=r:(s.source=r.slice(0,p),s.ruleId=r.slice(p+1))}if(!s.place&&s.ancestors&&s.ancestors){const p=s.ancestors[s.ancestors.length-1];p&&(s.place=p.position)}const d=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=d?d.line:void 0,this.name=qr(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Xt.prototype.file="";Xt.prototype.name="";Xt.prototype.reason="";Xt.prototype.message="";Xt.prototype.stack="";Xt.prototype.column=void 0;Xt.prototype.line=void 0;Xt.prototype.ancestors=void 0;Xt.prototype.cause=void 0;Xt.prototype.fatal=void 0;Xt.prototype.place=void 0;Xt.prototype.ruleId=void 0;Xt.prototype.source=void 0;const Yd={}.hasOwnProperty,zC=new Map,DC=/[A-Z]/g,OC=new Set(["table","tbody","thead","tfoot","tr"]),MC=new Set(["td","th"]),D0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function LC(t,l){if(!l||l.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const a=l.filePath||void 0;let r;if(l.development){if(typeof l.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=FC(a,l.jsxDEV)}else{if(typeof l.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof l.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=VC(a,l.jsx,l.jsxs)}const o={Fragment:l.Fragment,ancestors:[],components:l.components||{},create:r,elementAttributeNameCase:l.elementAttributeNameCase||"react",evaluater:l.createEvaluater?l.createEvaluater():void 0,filePath:a,ignoreInvalidStyle:l.ignoreInvalidStyle||!1,passKeys:l.passKeys!==!1,passNode:l.passNode||!1,schema:l.space==="svg"?Hd:wC,stylePropertyNameCase:l.stylePropertyNameCase||"dom",tableCellAlignToStyle:l.tableCellAlignToStyle!==!1},s=O0(o,t,void 0);return s&&typeof s!="string"?s:o.create(t,o.Fragment,{children:s||void 0},void 0)}function O0(t,l,a){if(l.type==="element")return UC(t,l,a);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return BC(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return qC(t,l,a);if(l.type==="mdxjsEsm")return HC(t,l);if(l.type==="root")return YC(t,l,a);if(l.type==="text")return GC(t,l)}function UC(t,l,a){const r=t.schema;let o=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Hd,t.schema=o),t.ancestors.push(l);const s=L0(t,l.tagName,!1),c=IC(t,l);let d=Vd(t,l);return OC.has(l.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!hC(p):!0})),M0(t,c,s,l),Gd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function BC(t,l){if(l.data&&l.data.estree&&t.evaluater){const r=l.data.estree.body[0];return r.type,t.evaluater.evaluateExpression(r.expression)}Qr(t,l.position)}function HC(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Qr(t,l.position)}function qC(t,l,a){const r=t.schema;let o=r;l.name==="svg"&&r.space==="html"&&(o=Hd,t.schema=o),t.ancestors.push(l);const s=l.name===null?t.Fragment:L0(t,l.name,!0),c=QC(t,l),d=Vd(t,l);return M0(t,c,s,l),Gd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function YC(t,l,a){const r={};return Gd(r,Vd(t,l)),t.create(l,t.Fragment,r,a)}function GC(t,l){return l.value}function M0(t,l,a,r){typeof a!="string"&&a!==t.Fragment&&t.passNode&&(l.node=r)}function Gd(t,l){if(l.length>0){const a=l.length>1?l:l[0];a&&(t.children=a)}}function VC(t,l,a){return r;function r(o,s,c,d){const m=Array.isArray(c.children)?a:l;return d?m(s,c,d):m(s,c)}}function FC(t,l){return a;function a(r,o,s,c){const d=Array.isArray(s.children),p=qd(r);return l(o,s,c,d,{columnNumber:p?p.column-1:void 0,fileName:t,lineNumber:p?p.line:void 0},void 0)}}function IC(t,l){const a={};let r,o;for(o in l.properties)if(o!=="children"&&Yd.call(l.properties,o)){const s=XC(t,o,l.properties[o]);if(s){const[c,d]=s;t.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&MC.has(l.tagName)?r=d:a[c]=d}}if(r){const s=a.style||(a.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return a}function QC(t,l){const a={};for(const r of l.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&t.evaluater){const s=r.data.estree.body[0];s.type;const c=s.expression;c.type;const d=c.properties[0];d.type,Object.assign(a,t.evaluater.evaluateExpression(d.argument))}else Qr(t,l.position);else{const o=r.name;let s;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&t.evaluater){const d=r.value.data.estree.body[0];d.type,s=t.evaluater.evaluateExpression(d.expression)}else Qr(t,l.position);else s=r.value===null?!0:r.value;a[o]=s}return a}function Vd(t,l){const a=[];let r=-1;const o=t.passKeys?new Map:zC;for(;++r<l.children.length;){const s=l.children[r];let c;if(t.passKeys){const p=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(p){const m=o.get(p)||0;c=p+"-"+m,o.set(p,m+1)}}const d=O0(t,s,c);d!==void 0&&a.push(d)}return a}function XC(t,l,a){const r=xC(t.schema,l);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?oC(a):kC(a)),r.property==="style"){let o=typeof a=="object"?a:$C(t,String(a));return t.stylePropertyNameCase==="css"&&(o=KC(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?yC[r.property]||r.property:r.attribute,a]}}function $C(t,l){try{return RC(l,{reactCompat:!0})}catch(a){if(t.ignoreInvalidStyle)return{};const r=a,o=new Xt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=D0+"#cannot-parse-style-attribute",o}}function L0(t,l,a){let r;if(!a)r={type:"Literal",value:l};else if(l.includes(".")){const o=l.split(".");let s=-1,c;for(;++s<o.length;){const d=_y(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(s&&d.type==="Literal"),optional:!1}:d}r=c}else r=_y(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const o=r.value;return Yd.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(r);Qr(t)}function Qr(t,l){const a=new Xt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:l,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw a.file=t.filePath||void 0,a.url=D0+"#cannot-handle-mdx-estrees-without-createevaluater",a}function KC(t){const l={};let a;for(a in t)Yd.call(t,a)&&(l[ZC(a)]=t[a]);return l}function ZC(t){let l=t.replace(DC,PC);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function PC(t){return"-"+t.toLowerCase()}const Cf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},JC={};function Fd(t,l){const a=JC,r=typeof a.includeImageAlt=="boolean"?a.includeImageAlt:!0,o=typeof a.includeHtml=="boolean"?a.includeHtml:!0;return U0(t,r,o)}function U0(t,l,a){if(WC(t)){if("value"in t)return t.type==="html"&&!a?"":t.value;if(l&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Hy(t.children,l,a)}return Array.isArray(t)?Hy(t,l,a):""}function Hy(t,l,a){const r=[];let o=-1;for(;++o<t.length;)r[o]=U0(t[o],l,a);return r.join("")}function WC(t){return!!(t&&typeof t=="object")}const qy=document.createElement("i");function Id(t){const l="&"+t+";";qy.innerHTML=l;const a=qy.textContent;return a.charCodeAt(a.length-1)===59&&t!=="semi"||a===l?!1:a}function xn(t,l,a,r){const o=t.length;let s=0,c;if(l<0?l=-l>o?0:o+l:l=l>o?o:l,a=a>0?a:0,r.length<1e4)c=Array.from(r),c.unshift(l,a),t.splice(...c);else for(a&&t.splice(l,a);s<r.length;)c=r.slice(s,s+1e4),c.unshift(l,0),t.splice(...c),s+=1e4,l+=1e4}function Dn(t,l){return t.length>0?(xn(t,t.length,0,l),t):l}const Yy={}.hasOwnProperty;function B0(t){const l={};let a=-1;for(;++a<t.length;)e2(l,t[a]);return l}function e2(t,l){let a;for(a in l){const o=(Yy.call(t,a)?t[a]:void 0)||(t[a]={}),s=l[a];let c;if(s)for(c in s){Yy.call(o,c)||(o[c]=[]);const d=s[c];t2(o[c],Array.isArray(d)?d:d?[d]:[])}}}function t2(t,l){let a=-1;const r=[];for(;++a<l.length;)(l[a].add==="after"?t:r).push(l[a]);xn(t,0,0,r)}function H0(t,l){const a=Number.parseInt(t,l);return a<9||a===11||a>13&&a<32||a>126&&a<160||a>55295&&a<57344||a>64975&&a<65008||(a&65535)===65535||(a&65535)===65534||a>1114111?"�":String.fromCodePoint(a)}function In(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Zt=hi(/[A-Za-z]/),Qt=hi(/[\dA-Za-z]/),n2=hi(/[#-'*+\--9=?A-Z^-~]/);function Bo(t){return t!==null&&(t<32||t===127)}const td=hi(/\d/),l2=hi(/[\dA-Fa-f]/),i2=hi(/[!-/:-@[-`{-~]/);function _e(t){return t!==null&&t<-2}function st(t){return t!==null&&(t<0||t===32)}function Ye(t){return t===-2||t===-1||t===32}const Jo=hi(new RegExp("\\p{P}|\\p{S}","u")),qi=hi(/\s/);function hi(t){return l;function l(a){return a!==null&&a>-1&&t.test(String.fromCharCode(a))}}function Ua(t){const l=[];let a=-1,r=0,o=0;for(;++a<t.length;){const s=t.charCodeAt(a);let c="";if(s===37&&Qt(t.charCodeAt(a+1))&&Qt(t.charCodeAt(a+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const d=t.charCodeAt(a+1);s<56320&&d>56319&&d<57344?(c=String.fromCharCode(s,d),o=1):c="�"}else c=String.fromCharCode(s);c&&(l.push(t.slice(r,a),encodeURIComponent(c)),r=a+o+1,c=""),o&&(a+=o,o=0)}return l.join("")+t.slice(r)}function Ze(t,l,a,r){const o=r?r-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(p){return Ye(p)?(t.enter(a),d(p)):l(p)}function d(p){return Ye(p)&&s++<o?(t.consume(p),d):(t.exit(a),l(p))}}const a2={tokenize:r2};function r2(t){const l=t.attempt(this.parser.constructs.contentInitial,r,o);let a;return l;function r(d){if(d===null){t.consume(d);return}return t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),Ze(t,l,"linePrefix")}function o(d){return t.enter("paragraph"),s(d)}function s(d){const p=t.enter("chunkText",{contentType:"text",previous:a});return a&&(a.next=p),a=p,c(d)}function c(d){if(d===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(d);return}return _e(d)?(t.consume(d),t.exit("chunkText"),s):(t.consume(d),c)}}const u2={tokenize:o2},Gy={tokenize:s2};function o2(t){const l=this,a=[];let r=0,o,s,c;return d;function d(D){if(r<a.length){const te=a[r];return l.containerState=te[1],t.attempt(te[0].continuation,p,m)(D)}return m(D)}function p(D){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,o&&A();const te=l.events.length;let P=te,H;for(;P--;)if(l.events[P][0]==="exit"&&l.events[P][1].type==="chunkFlow"){H=l.events[P][1].end;break}C(r);let _=te;for(;_<l.events.length;)l.events[_][1].end={...H},_++;return xn(l.events,P+1,0,l.events.slice(te)),l.events.length=_,m(D)}return d(D)}function m(D){if(r===a.length){if(!o)return b(D);if(o.currentConstruct&&o.currentConstruct.concrete)return E(D);l.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Gy,y,g)(D)}function y(D){return o&&A(),C(r),b(D)}function g(D){return l.parser.lazy[l.now().line]=r!==a.length,c=l.now().offset,E(D)}function b(D){return l.containerState={},t.attempt(Gy,S,E)(D)}function S(D){return r++,a.push([l.currentConstruct,l.containerState]),b(D)}function E(D){if(D===null){o&&A(),C(0),t.consume(D);return}return o=o||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),j(D)}function j(D){if(D===null){N(t.exit("chunkFlow"),!0),C(0),t.consume(D);return}return _e(D)?(t.consume(D),N(t.exit("chunkFlow")),r=0,l.interrupt=void 0,d):(t.consume(D),j)}function N(D,te){const P=l.sliceStream(D);if(te&&P.push(null),D.previous=s,s&&(s.next=D),s=D,o.defineSkip(D.start),o.write(P),l.parser.lazy[D.start.line]){let H=o.events.length;for(;H--;)if(o.events[H][1].start.offset<c&&(!o.events[H][1].end||o.events[H][1].end.offset>c))return;const _=l.events.length;let ne=_,W,R;for(;ne--;)if(l.events[ne][0]==="exit"&&l.events[ne][1].type==="chunkFlow"){if(W){R=l.events[ne][1].end;break}W=!0}for(C(r),H=_;H<l.events.length;)l.events[H][1].end={...R},H++;xn(l.events,ne+1,0,l.events.slice(_)),l.events.length=H}}function C(D){let te=a.length;for(;te-- >D;){const P=a[te];l.containerState=P[1],P[0].exit.call(l,t)}a.length=D}function A(){o.write([null]),s=void 0,o=void 0,l.containerState._closeFlow=void 0}}function s2(t,l,a){return Ze(t,t.attempt(this.parser.constructs.document,l,a),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Da(t){if(t===null||st(t)||qi(t))return 1;if(Jo(t))return 2}function Wo(t,l,a){const r=[];let o=-1;for(;++o<t.length;){const s=t[o].resolveAll;s&&!r.includes(s)&&(l=s(l,a),r.push(s))}return l}const nd={name:"attention",resolveAll:c2,tokenize:f2};function c2(t,l){let a=-1,r,o,s,c,d,p,m,y;for(;++a<t.length;)if(t[a][0]==="enter"&&t[a][1].type==="attentionSequence"&&t[a][1]._close){for(r=a;r--;)if(t[r][0]==="exit"&&t[r][1].type==="attentionSequence"&&t[r][1]._open&&l.sliceSerialize(t[r][1]).charCodeAt(0)===l.sliceSerialize(t[a][1]).charCodeAt(0)){if((t[r][1]._close||t[a][1]._open)&&(t[a][1].end.offset-t[a][1].start.offset)%3&&!((t[r][1].end.offset-t[r][1].start.offset+t[a][1].end.offset-t[a][1].start.offset)%3))continue;p=t[r][1].end.offset-t[r][1].start.offset>1&&t[a][1].end.offset-t[a][1].start.offset>1?2:1;const g={...t[r][1].end},b={...t[a][1].start};Vy(g,-p),Vy(b,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...t[r][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...t[a][1].start},end:b},s={type:p>1?"strongText":"emphasisText",start:{...t[r][1].end},end:{...t[a][1].start}},o={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},t[r][1].end={...c.start},t[a][1].start={...d.end},m=[],t[r][1].end.offset-t[r][1].start.offset&&(m=Dn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=Dn(m,[["enter",o,l],["enter",c,l],["exit",c,l],["enter",s,l]]),m=Dn(m,Wo(l.parser.constructs.insideSpan.null,t.slice(r+1,a),l)),m=Dn(m,[["exit",s,l],["enter",d,l],["exit",d,l],["exit",o,l]]),t[a][1].end.offset-t[a][1].start.offset?(y=2,m=Dn(m,[["enter",t[a][1],l],["exit",t[a][1],l]])):y=0,xn(t,r-1,a-r+3,m),a=r+m.length-y-2;break}}for(a=-1;++a<t.length;)t[a][1].type==="attentionSequence"&&(t[a][1].type="data");return t}function f2(t,l){const a=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Da(r);let s;return c;function c(p){return s=p,t.enter("attentionSequence"),d(p)}function d(p){if(p===s)return t.consume(p),d;const m=t.exit("attentionSequence"),y=Da(p),g=!y||y===2&&o||a.includes(p),b=!o||o===2&&y||a.includes(r);return m._open=!!(s===42?g:g&&(o||!b)),m._close=!!(s===42?b:b&&(y||!g)),l(p)}}function Vy(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const d2={name:"autolink",tokenize:h2};function h2(t,l,a){let r=0;return o;function o(S){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(S){return Zt(S)?(t.consume(S),c):S===64?a(S):m(S)}function c(S){return S===43||S===45||S===46||Qt(S)?(r=1,d(S)):m(S)}function d(S){return S===58?(t.consume(S),r=0,p):(S===43||S===45||S===46||Qt(S))&&r++<32?(t.consume(S),d):(r=0,m(S))}function p(S){return S===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):S===null||S===32||S===60||Bo(S)?a(S):(t.consume(S),p)}function m(S){return S===64?(t.consume(S),y):n2(S)?(t.consume(S),m):a(S)}function y(S){return Qt(S)?g(S):a(S)}function g(S){return S===46?(t.consume(S),r=0,y):S===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(S),t.exit("autolinkMarker"),t.exit("autolink"),l):b(S)}function b(S){if((S===45||Qt(S))&&r++<63){const E=S===45?b:g;return t.consume(S),E}return a(S)}}const tu={partial:!0,tokenize:m2};function m2(t,l,a){return r;function r(s){return Ye(s)?Ze(t,o,"linePrefix")(s):o(s)}function o(s){return s===null||_e(s)?l(s):a(s)}}const q0={continuation:{tokenize:g2},exit:y2,name:"blockQuote",tokenize:p2};function p2(t,l,a){const r=this;return o;function o(c){if(c===62){const d=r.containerState;return d.open||(t.enter("blockQuote",{_container:!0}),d.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(c),t.exit("blockQuoteMarker"),s}return a(c)}function s(c){return Ye(c)?(t.enter("blockQuotePrefixWhitespace"),t.consume(c),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),l):(t.exit("blockQuotePrefix"),l(c))}}function g2(t,l,a){const r=this;return o;function o(c){return Ye(c)?Ze(t,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return t.attempt(q0,l,a)(c)}}function y2(t){t.exit("blockQuote")}const Y0={name:"characterEscape",tokenize:v2};function v2(t,l,a){return r;function r(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),o}function o(s){return i2(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):a(s)}}const G0={name:"characterReference",tokenize:b2};function b2(t,l,a){const r=this;let o=0,s,c;return d;function d(g){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),p}function p(g){return g===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(g),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),s=31,c=Qt,y(g))}function m(g){return g===88||g===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(g),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,c=l2,y):(t.enter("characterReferenceValue"),s=7,c=td,y(g))}function y(g){if(g===59&&o){const b=t.exit("characterReferenceValue");return c===Qt&&!Id(r.sliceSerialize(b))?a(g):(t.enter("characterReferenceMarker"),t.consume(g),t.exit("characterReferenceMarker"),t.exit("characterReference"),l)}return c(g)&&o++<s?(t.consume(g),y):a(g)}}const Fy={partial:!0,tokenize:S2},Iy={concrete:!0,name:"codeFenced",tokenize:x2};function x2(t,l,a){const r=this,o={partial:!0,tokenize:P};let s=0,c=0,d;return p;function p(H){return m(H)}function m(H){const _=r.events[r.events.length-1];return s=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,d=H,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(H)}function y(H){return H===d?(c++,t.consume(H),y):c<3?a(H):(t.exit("codeFencedFenceSequence"),Ye(H)?Ze(t,g,"whitespace")(H):g(H))}function g(H){return H===null||_e(H)?(t.exit("codeFencedFence"),r.interrupt?l(H):t.check(Fy,j,te)(H)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(H))}function b(H){return H===null||_e(H)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(H)):Ye(H)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ze(t,S,"whitespace")(H)):H===96&&H===d?a(H):(t.consume(H),b)}function S(H){return H===null||_e(H)?g(H):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),E(H))}function E(H){return H===null||_e(H)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(H)):H===96&&H===d?a(H):(t.consume(H),E)}function j(H){return t.attempt(o,te,N)(H)}function N(H){return t.enter("lineEnding"),t.consume(H),t.exit("lineEnding"),C}function C(H){return s>0&&Ye(H)?Ze(t,A,"linePrefix",s+1)(H):A(H)}function A(H){return H===null||_e(H)?t.check(Fy,j,te)(H):(t.enter("codeFlowValue"),D(H))}function D(H){return H===null||_e(H)?(t.exit("codeFlowValue"),A(H)):(t.consume(H),D)}function te(H){return t.exit("codeFenced"),l(H)}function P(H,_,ne){let W=0;return R;function R($){return H.enter("lineEnding"),H.consume($),H.exit("lineEnding"),V}function V($){return H.enter("codeFencedFence"),Ye($)?Ze(H,G,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):G($)}function G($){return $===d?(H.enter("codeFencedFenceSequence"),F($)):ne($)}function F($){return $===d?(W++,H.consume($),F):W>=c?(H.exit("codeFencedFenceSequence"),Ye($)?Ze(H,le,"whitespace")($):le($)):ne($)}function le($){return $===null||_e($)?(H.exit("codeFencedFence"),_($)):ne($)}}}function S2(t,l,a){const r=this;return o;function o(c){return c===null?a(c):(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s)}function s(c){return r.parser.lazy[r.now().line]?a(c):l(c)}}const Tf={name:"codeIndented",tokenize:w2},E2={partial:!0,tokenize:k2};function w2(t,l,a){const r=this;return o;function o(m){return t.enter("codeIndented"),Ze(t,s,"linePrefix",5)(m)}function s(m){const y=r.events[r.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?c(m):a(m)}function c(m){return m===null?p(m):_e(m)?t.attempt(E2,c,p)(m):(t.enter("codeFlowValue"),d(m))}function d(m){return m===null||_e(m)?(t.exit("codeFlowValue"),c(m)):(t.consume(m),d)}function p(m){return t.exit("codeIndented"),l(m)}}function k2(t,l,a){const r=this;return o;function o(c){return r.parser.lazy[r.now().line]?a(c):_e(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),o):Ze(t,s,"linePrefix",5)(c)}function s(c){const d=r.events[r.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):_e(c)?o(c):a(c)}}const C2={name:"codeText",previous:j2,resolve:T2,tokenize:A2};function T2(t){let l=t.length-4,a=3,r,o;if((t[a][1].type==="lineEnding"||t[a][1].type==="space")&&(t[l][1].type==="lineEnding"||t[l][1].type==="space")){for(r=a;++r<l;)if(t[r][1].type==="codeTextData"){t[a][1].type="codeTextPadding",t[l][1].type="codeTextPadding",a+=2,l-=2;break}}for(r=a-1,l++;++r<=l;)o===void 0?r!==l&&t[r][1].type!=="lineEnding"&&(o=r):(r===l||t[r][1].type==="lineEnding")&&(t[o][1].type="codeTextData",r!==o+2&&(t[o][1].end=t[r-1][1].end,t.splice(o+2,r-o-2),l-=r-o-2,r=o+2),o=void 0);return t}function j2(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function A2(t,l,a){let r=0,o,s;return c;function c(g){return t.enter("codeText"),t.enter("codeTextSequence"),d(g)}function d(g){return g===96?(t.consume(g),r++,d):(t.exit("codeTextSequence"),p(g))}function p(g){return g===null?a(g):g===32?(t.enter("space"),t.consume(g),t.exit("space"),p):g===96?(s=t.enter("codeTextSequence"),o=0,y(g)):_e(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),p):(t.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||_e(g)?(t.exit("codeTextData"),p(g)):(t.consume(g),m)}function y(g){return g===96?(t.consume(g),o++,y):o===r?(t.exit("codeTextSequence"),t.exit("codeText"),l(g)):(s.type="codeTextData",m(g))}}class _2{constructor(l){this.left=l?[...l]:[],this.right=[]}get(l){if(l<0||l>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+l+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return l<this.left.length?this.left[l]:this.right[this.right.length-l+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(l,a){const r=a??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(l,r):l>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-l+this.left.length).reverse():this.left.slice(l).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(l,a,r){const o=a||0;this.setCursor(Math.trunc(l));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Mr(this.left,r),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(l){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(l)}pushMany(l){this.setCursor(Number.POSITIVE_INFINITY),Mr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Mr(this.right,l.reverse())}setCursor(l){if(!(l===this.left.length||l>this.left.length&&this.right.length===0||l<0&&this.left.length===0))if(l<this.left.length){const a=this.left.splice(l,Number.POSITIVE_INFINITY);Mr(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Mr(this.left,a.reverse())}}}function Mr(t,l){let a=0;if(l.length<1e4)t.push(...l);else for(;a<l.length;)t.push(...l.slice(a,a+1e4)),a+=1e4}function V0(t){const l={};let a=-1,r,o,s,c,d,p,m;const y=new _2(t);for(;++a<y.length;){for(;a in l;)a=l[a];if(r=y.get(a),a&&r[1].type==="chunkFlow"&&y.get(a-1)[1].type==="listItemPrefix"&&(p=r[1]._tokenizer.events,s=0,s<p.length&&p[s][1].type==="lineEndingBlank"&&(s+=2),s<p.length&&p[s][1].type==="content"))for(;++s<p.length&&p[s][1].type!=="content";)p[s][1].type==="chunkText"&&(p[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(l,R2(y,a)),a=l[a],m=!0);else if(r[1]._container){for(s=a,o=void 0;s--;)if(c=y.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(y.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(r[1].end={...y.get(o)[1].start},d=y.slice(o,a),d.unshift(r),y.splice(o,a-o+1,d))}}return xn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function R2(t,l){const a=t.get(l)[1],r=t.get(l)[2];let o=l-1;const s=[];let c=a._tokenizer;c||(c=r.parser[a.contentType](a.start),a._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const d=c.events,p=[],m={};let y,g,b=-1,S=a,E=0,j=0;const N=[j];for(;S;){for(;t.get(++o)[1]!==S;);s.push(o),S._tokenizer||(y=r.sliceStream(S),S.next||y.push(null),g&&c.defineSkip(S.start),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(y),S._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=S,S=S.next}for(S=a;++b<d.length;)d[b][0]==="exit"&&d[b-1][0]==="enter"&&d[b][1].type===d[b-1][1].type&&d[b][1].start.line!==d[b][1].end.line&&(j=b+1,N.push(j),S._tokenizer=void 0,S.previous=void 0,S=S.next);for(c.events=[],S?(S._tokenizer=void 0,S.previous=void 0):N.pop(),b=N.length;b--;){const C=d.slice(N[b],N[b+1]),A=s.pop();p.push([A,A+C.length-1]),t.splice(A,2,C)}for(p.reverse(),b=-1;++b<p.length;)m[E+p[b][0]]=E+p[b][1],E+=p[b][1]-p[b][0]-1;return m}const N2={resolve:D2,tokenize:O2},z2={partial:!0,tokenize:M2};function D2(t){return V0(t),t}function O2(t,l){let a;return r;function r(d){return t.enter("content"),a=t.enter("chunkContent",{contentType:"content"}),o(d)}function o(d){return d===null?s(d):_e(d)?t.check(z2,c,s)(d):(t.consume(d),o)}function s(d){return t.exit("chunkContent"),t.exit("content"),l(d)}function c(d){return t.consume(d),t.exit("chunkContent"),a.next=t.enter("chunkContent",{contentType:"content",previous:a}),a=a.next,o}}function M2(t,l,a){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Ze(t,s,"linePrefix")}function s(c){if(c===null||_e(c))return a(c);const d=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?l(c):t.interrupt(r.parser.constructs.flow,a,l)(c)}}function F0(t,l,a,r,o,s,c,d,p){const m=p||Number.POSITIVE_INFINITY;let y=0;return g;function g(C){return C===60?(t.enter(r),t.enter(o),t.enter(s),t.consume(C),t.exit(s),b):C===null||C===32||C===41||Bo(C)?a(C):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),j(C))}function b(C){return C===62?(t.enter(s),t.consume(C),t.exit(s),t.exit(o),t.exit(r),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),S(C))}function S(C){return C===62?(t.exit("chunkString"),t.exit(d),b(C)):C===null||C===60||_e(C)?a(C):(t.consume(C),C===92?E:S)}function E(C){return C===60||C===62||C===92?(t.consume(C),S):S(C)}function j(C){return!y&&(C===null||C===41||st(C))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),l(C)):y<m&&C===40?(t.consume(C),y++,j):C===41?(t.consume(C),y--,j):C===null||C===32||C===40||Bo(C)?a(C):(t.consume(C),C===92?N:j)}function N(C){return C===40||C===41||C===92?(t.consume(C),j):j(C)}}function I0(t,l,a,r,o,s){const c=this;let d=0,p;return m;function m(S){return t.enter(r),t.enter(o),t.consume(S),t.exit(o),t.enter(s),y}function y(S){return d>999||S===null||S===91||S===93&&!p||S===94&&!d&&"_hiddenFootnoteSupport"in c.parser.constructs?a(S):S===93?(t.exit(s),t.enter(o),t.consume(S),t.exit(o),t.exit(r),l):_e(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===null||S===91||S===93||_e(S)||d++>999?(t.exit("chunkString"),y(S)):(t.consume(S),p||(p=!Ye(S)),S===92?b:g)}function b(S){return S===91||S===92||S===93?(t.consume(S),d++,g):g(S)}}function Q0(t,l,a,r,o,s){let c;return d;function d(b){return b===34||b===39||b===40?(t.enter(r),t.enter(o),t.consume(b),t.exit(o),c=b===40?41:b,p):a(b)}function p(b){return b===c?(t.enter(o),t.consume(b),t.exit(o),t.exit(r),l):(t.enter(s),m(b))}function m(b){return b===c?(t.exit(s),p(c)):b===null?a(b):_e(b)?(t.enter("lineEnding"),t.consume(b),t.exit("lineEnding"),Ze(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(b))}function y(b){return b===c||b===null||_e(b)?(t.exit("chunkString"),m(b)):(t.consume(b),b===92?g:y)}function g(b){return b===c||b===92?(t.consume(b),y):y(b)}}function Yr(t,l){let a;return r;function r(o){return _e(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),a=!0,r):Ye(o)?Ze(t,r,a?"linePrefix":"lineSuffix")(o):l(o)}}const L2={name:"definition",tokenize:B2},U2={partial:!0,tokenize:H2};function B2(t,l,a){const r=this;let o;return s;function s(S){return t.enter("definition"),c(S)}function c(S){return I0.call(r,t,d,a,"definitionLabel","definitionLabelMarker","definitionLabelString")(S)}function d(S){return o=In(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),S===58?(t.enter("definitionMarker"),t.consume(S),t.exit("definitionMarker"),p):a(S)}function p(S){return st(S)?Yr(t,m)(S):m(S)}function m(S){return F0(t,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(S)}function y(S){return t.attempt(U2,g,g)(S)}function g(S){return Ye(S)?Ze(t,b,"whitespace")(S):b(S)}function b(S){return S===null||_e(S)?(t.exit("definition"),r.parser.defined.push(o),l(S)):a(S)}}function H2(t,l,a){return r;function r(d){return st(d)?Yr(t,o)(d):a(d)}function o(d){return Q0(t,s,a,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function s(d){return Ye(d)?Ze(t,c,"whitespace")(d):c(d)}function c(d){return d===null||_e(d)?l(d):a(d)}}const q2={name:"hardBreakEscape",tokenize:Y2};function Y2(t,l,a){return r;function r(s){return t.enter("hardBreakEscape"),t.consume(s),o}function o(s){return _e(s)?(t.exit("hardBreakEscape"),l(s)):a(s)}}const G2={name:"headingAtx",resolve:V2,tokenize:F2};function V2(t,l){let a=t.length-2,r=3,o,s;return t[r][1].type==="whitespace"&&(r+=2),a-2>r&&t[a][1].type==="whitespace"&&(a-=2),t[a][1].type==="atxHeadingSequence"&&(r===a-1||a-4>r&&t[a-2][1].type==="whitespace")&&(a-=r+1===a?2:4),a>r&&(o={type:"atxHeadingText",start:t[r][1].start,end:t[a][1].end},s={type:"chunkText",start:t[r][1].start,end:t[a][1].end,contentType:"text"},xn(t,r,a-r+1,[["enter",o,l],["enter",s,l],["exit",s,l],["exit",o,l]])),t}function F2(t,l,a){let r=0;return o;function o(y){return t.enter("atxHeading"),s(y)}function s(y){return t.enter("atxHeadingSequence"),c(y)}function c(y){return y===35&&r++<6?(t.consume(y),c):y===null||st(y)?(t.exit("atxHeadingSequence"),d(y)):a(y)}function d(y){return y===35?(t.enter("atxHeadingSequence"),p(y)):y===null||_e(y)?(t.exit("atxHeading"),l(y)):Ye(y)?Ze(t,d,"whitespace")(y):(t.enter("atxHeadingText"),m(y))}function p(y){return y===35?(t.consume(y),p):(t.exit("atxHeadingSequence"),d(y))}function m(y){return y===null||y===35||st(y)?(t.exit("atxHeadingText"),d(y)):(t.consume(y),m)}}const I2=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],Qy=["pre","script","style","textarea"],Q2={concrete:!0,name:"htmlFlow",resolveTo:K2,tokenize:Z2},X2={partial:!0,tokenize:J2},$2={partial:!0,tokenize:P2};function K2(t){let l=t.length;for(;l--&&!(t[l][0]==="enter"&&t[l][1].type==="htmlFlow"););return l>1&&t[l-2][1].type==="linePrefix"&&(t[l][1].start=t[l-2][1].start,t[l+1][1].start=t[l-2][1].start,t.splice(l-2,2)),t}function Z2(t,l,a){const r=this;let o,s,c,d,p;return m;function m(T){return y(T)}function y(T){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(T),g}function g(T){return T===33?(t.consume(T),b):T===47?(t.consume(T),s=!0,j):T===63?(t.consume(T),o=3,r.interrupt?l:z):Zt(T)?(t.consume(T),c=String.fromCharCode(T),N):a(T)}function b(T){return T===45?(t.consume(T),o=2,S):T===91?(t.consume(T),o=5,d=0,E):Zt(T)?(t.consume(T),o=4,r.interrupt?l:z):a(T)}function S(T){return T===45?(t.consume(T),r.interrupt?l:z):a(T)}function E(T){const ce="CDATA[";return T===ce.charCodeAt(d++)?(t.consume(T),d===ce.length?r.interrupt?l:G:E):a(T)}function j(T){return Zt(T)?(t.consume(T),c=String.fromCharCode(T),N):a(T)}function N(T){if(T===null||T===47||T===62||st(T)){const ce=T===47,ve=c.toLowerCase();return!ce&&!s&&Qy.includes(ve)?(o=1,r.interrupt?l(T):G(T)):I2.includes(c.toLowerCase())?(o=6,ce?(t.consume(T),C):r.interrupt?l(T):G(T)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(T):s?A(T):D(T))}return T===45||Qt(T)?(t.consume(T),c+=String.fromCharCode(T),N):a(T)}function C(T){return T===62?(t.consume(T),r.interrupt?l:G):a(T)}function A(T){return Ye(T)?(t.consume(T),A):R(T)}function D(T){return T===47?(t.consume(T),R):T===58||T===95||Zt(T)?(t.consume(T),te):Ye(T)?(t.consume(T),D):R(T)}function te(T){return T===45||T===46||T===58||T===95||Qt(T)?(t.consume(T),te):P(T)}function P(T){return T===61?(t.consume(T),H):Ye(T)?(t.consume(T),P):D(T)}function H(T){return T===null||T===60||T===61||T===62||T===96?a(T):T===34||T===39?(t.consume(T),p=T,_):Ye(T)?(t.consume(T),H):ne(T)}function _(T){return T===p?(t.consume(T),p=null,W):T===null||_e(T)?a(T):(t.consume(T),_)}function ne(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||st(T)?P(T):(t.consume(T),ne)}function W(T){return T===47||T===62||Ye(T)?D(T):a(T)}function R(T){return T===62?(t.consume(T),V):a(T)}function V(T){return T===null||_e(T)?G(T):Ye(T)?(t.consume(T),V):a(T)}function G(T){return T===45&&o===2?(t.consume(T),U):T===60&&o===1?(t.consume(T),ee):T===62&&o===4?(t.consume(T),L):T===63&&o===3?(t.consume(T),z):T===93&&o===5?(t.consume(T),xe):_e(T)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(X2,Z,F)(T)):T===null||_e(T)?(t.exit("htmlFlowData"),F(T)):(t.consume(T),G)}function F(T){return t.check($2,le,Z)(T)}function le(T){return t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),$}function $(T){return T===null||_e(T)?F(T):(t.enter("htmlFlowData"),G(T))}function U(T){return T===45?(t.consume(T),z):G(T)}function ee(T){return T===47?(t.consume(T),c="",se):G(T)}function se(T){if(T===62){const ce=c.toLowerCase();return Qy.includes(ce)?(t.consume(T),L):G(T)}return Zt(T)&&c.length<8?(t.consume(T),c+=String.fromCharCode(T),se):G(T)}function xe(T){return T===93?(t.consume(T),z):G(T)}function z(T){return T===62?(t.consume(T),L):T===45&&o===2?(t.consume(T),z):G(T)}function L(T){return T===null||_e(T)?(t.exit("htmlFlowData"),Z(T)):(t.consume(T),L)}function Z(T){return t.exit("htmlFlow"),l(T)}}function P2(t,l,a){const r=this;return o;function o(c){return _e(c)?(t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),s):a(c)}function s(c){return r.parser.lazy[r.now().line]?a(c):l(c)}}function J2(t,l,a){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(tu,l,a)}}const W2={name:"htmlText",tokenize:eT};function eT(t,l,a){const r=this;let o,s,c;return d;function d(z){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(z),p}function p(z){return z===33?(t.consume(z),m):z===47?(t.consume(z),P):z===63?(t.consume(z),D):Zt(z)?(t.consume(z),ne):a(z)}function m(z){return z===45?(t.consume(z),y):z===91?(t.consume(z),s=0,E):Zt(z)?(t.consume(z),A):a(z)}function y(z){return z===45?(t.consume(z),S):a(z)}function g(z){return z===null?a(z):z===45?(t.consume(z),b):_e(z)?(c=g,ee(z)):(t.consume(z),g)}function b(z){return z===45?(t.consume(z),S):g(z)}function S(z){return z===62?U(z):z===45?b(z):g(z)}function E(z){const L="CDATA[";return z===L.charCodeAt(s++)?(t.consume(z),s===L.length?j:E):a(z)}function j(z){return z===null?a(z):z===93?(t.consume(z),N):_e(z)?(c=j,ee(z)):(t.consume(z),j)}function N(z){return z===93?(t.consume(z),C):j(z)}function C(z){return z===62?U(z):z===93?(t.consume(z),C):j(z)}function A(z){return z===null||z===62?U(z):_e(z)?(c=A,ee(z)):(t.consume(z),A)}function D(z){return z===null?a(z):z===63?(t.consume(z),te):_e(z)?(c=D,ee(z)):(t.consume(z),D)}function te(z){return z===62?U(z):D(z)}function P(z){return Zt(z)?(t.consume(z),H):a(z)}function H(z){return z===45||Qt(z)?(t.consume(z),H):_(z)}function _(z){return _e(z)?(c=_,ee(z)):Ye(z)?(t.consume(z),_):U(z)}function ne(z){return z===45||Qt(z)?(t.consume(z),ne):z===47||z===62||st(z)?W(z):a(z)}function W(z){return z===47?(t.consume(z),U):z===58||z===95||Zt(z)?(t.consume(z),R):_e(z)?(c=W,ee(z)):Ye(z)?(t.consume(z),W):U(z)}function R(z){return z===45||z===46||z===58||z===95||Qt(z)?(t.consume(z),R):V(z)}function V(z){return z===61?(t.consume(z),G):_e(z)?(c=V,ee(z)):Ye(z)?(t.consume(z),V):W(z)}function G(z){return z===null||z===60||z===61||z===62||z===96?a(z):z===34||z===39?(t.consume(z),o=z,F):_e(z)?(c=G,ee(z)):Ye(z)?(t.consume(z),G):(t.consume(z),le)}function F(z){return z===o?(t.consume(z),o=void 0,$):z===null?a(z):_e(z)?(c=F,ee(z)):(t.consume(z),F)}function le(z){return z===null||z===34||z===39||z===60||z===61||z===96?a(z):z===47||z===62||st(z)?W(z):(t.consume(z),le)}function $(z){return z===47||z===62||st(z)?W(z):a(z)}function U(z){return z===62?(t.consume(z),t.exit("htmlTextData"),t.exit("htmlText"),l):a(z)}function ee(z){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(z),t.exit("lineEnding"),se}function se(z){return Ye(z)?Ze(t,xe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(z):xe(z)}function xe(z){return t.enter("htmlTextData"),c(z)}}const Qd={name:"labelEnd",resolveAll:iT,resolveTo:aT,tokenize:rT},tT={tokenize:uT},nT={tokenize:oT},lT={tokenize:sT};function iT(t){let l=-1;const a=[];for(;++l<t.length;){const r=t[l][1];if(a.push(t[l]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",l+=o}}return t.length!==a.length&&xn(t,0,t.length,a),t}function aT(t,l){let a=t.length,r=0,o,s,c,d;for(;a--;)if(o=t[a][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[a][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(t[a][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=a,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(c=a);const p={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[s][1].start},end:{...t[c][1].end}},y={type:"labelText",start:{...t[s+r+2][1].end},end:{...t[c-2][1].start}};return d=[["enter",p,l],["enter",m,l]],d=Dn(d,t.slice(s+1,s+r+3)),d=Dn(d,[["enter",y,l]]),d=Dn(d,Wo(l.parser.constructs.insideSpan.null,t.slice(s+r+4,c-3),l)),d=Dn(d,[["exit",y,l],t[c-2],t[c-1],["exit",m,l]]),d=Dn(d,t.slice(c+1)),d=Dn(d,[["exit",p,l]]),xn(t,s,t.length,d),t}function rT(t,l,a){const r=this;let o=r.events.length,s,c;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){s=r.events[o][1];break}return d;function d(b){return s?s._inactive?g(b):(c=r.parser.defined.includes(In(r.sliceSerialize({start:s.end,end:r.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(b),t.exit("labelMarker"),t.exit("labelEnd"),p):a(b)}function p(b){return b===40?t.attempt(tT,y,c?y:g)(b):b===91?t.attempt(nT,y,c?m:g)(b):c?y(b):g(b)}function m(b){return t.attempt(lT,y,g)(b)}function y(b){return l(b)}function g(b){return s._balanced=!0,a(b)}}function uT(t,l,a){return r;function r(g){return t.enter("resource"),t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),o}function o(g){return st(g)?Yr(t,s)(g):s(g)}function s(g){return g===41?y(g):F0(t,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return st(g)?Yr(t,p)(g):y(g)}function d(g){return a(g)}function p(g){return g===34||g===39||g===40?Q0(t,m,a,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):y(g)}function m(g){return st(g)?Yr(t,y)(g):y(g)}function y(g){return g===41?(t.enter("resourceMarker"),t.consume(g),t.exit("resourceMarker"),t.exit("resource"),l):a(g)}}function oT(t,l,a){const r=this;return o;function o(d){return I0.call(r,t,s,c,"reference","referenceMarker","referenceString")(d)}function s(d){return r.parser.defined.includes(In(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?l(d):a(d)}function c(d){return a(d)}}function sT(t,l,a){return r;function r(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),o}function o(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),l):a(s)}}const cT={name:"labelStartImage",resolveAll:Qd.resolveAll,tokenize:fT};function fT(t,l,a){const r=this;return o;function o(d){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(d),t.exit("labelImageMarker"),s}function s(d){return d===91?(t.enter("labelMarker"),t.consume(d),t.exit("labelMarker"),t.exit("labelImage"),c):a(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(d):l(d)}}const dT={name:"labelStartLink",resolveAll:Qd.resolveAll,tokenize:hT};function hT(t,l,a){const r=this;return o;function o(c){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(c),t.exit("labelMarker"),t.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?a(c):l(c)}}const jf={name:"lineEnding",tokenize:mT};function mT(t,l){return a;function a(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Ze(t,l,"linePrefix")}}const Oo={name:"thematicBreak",tokenize:pT};function pT(t,l,a){let r=0,o;return s;function s(m){return t.enter("thematicBreak"),c(m)}function c(m){return o=m,d(m)}function d(m){return m===o?(t.enter("thematicBreakSequence"),p(m)):r>=3&&(m===null||_e(m))?(t.exit("thematicBreak"),l(m)):a(m)}function p(m){return m===o?(t.consume(m),r++,p):(t.exit("thematicBreakSequence"),Ye(m)?Ze(t,d,"whitespace")(m):d(m))}}const rn={continuation:{tokenize:bT},exit:ST,name:"list",tokenize:vT},gT={partial:!0,tokenize:ET},yT={partial:!0,tokenize:xT};function vT(t,l,a){const r=this,o=r.events[r.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return d;function d(S){const E=r.containerState.type||(S===42||S===43||S===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!r.containerState.marker||S===r.containerState.marker:td(S)){if(r.containerState.type||(r.containerState.type=E,t.enter(E,{_container:!0})),E==="listUnordered")return t.enter("listItemPrefix"),S===42||S===45?t.check(Oo,a,m)(S):m(S);if(!r.interrupt||S===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),p(S)}return a(S)}function p(S){return td(S)&&++c<10?(t.consume(S),p):(!r.interrupt||c<2)&&(r.containerState.marker?S===r.containerState.marker:S===41||S===46)?(t.exit("listItemValue"),m(S)):a(S)}function m(S){return t.enter("listItemMarker"),t.consume(S),t.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||S,t.check(tu,r.interrupt?a:y,t.attempt(gT,b,g))}function y(S){return r.containerState.initialBlankLine=!0,s++,b(S)}function g(S){return Ye(S)?(t.enter("listItemPrefixWhitespace"),t.consume(S),t.exit("listItemPrefixWhitespace"),b):a(S)}function b(S){return r.containerState.size=s+r.sliceSerialize(t.exit("listItemPrefix"),!0).length,l(S)}}function bT(t,l,a){const r=this;return r.containerState._closeFlow=void 0,t.check(tu,o,s);function o(d){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ze(t,l,"listItemIndent",r.containerState.size+1)(d)}function s(d){return r.containerState.furtherBlankLines||!Ye(d)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,c(d)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,t.attempt(yT,l,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ze(t,t.attempt(rn,l,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function xT(t,l,a){const r=this;return Ze(t,o,"listItemIndent",r.containerState.size+1);function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===r.containerState.size?l(s):a(s)}}function ST(t){t.exit(this.containerState.type)}function ET(t,l,a){const r=this;return Ze(t,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=r.events[r.events.length-1];return!Ye(s)&&c&&c[1].type==="listItemPrefixWhitespace"?l(s):a(s)}}const Xy={name:"setextUnderline",resolveTo:wT,tokenize:kT};function wT(t,l){let a=t.length,r,o,s;for(;a--;)if(t[a][0]==="enter"){if(t[a][1].type==="content"){r=a;break}t[a][1].type==="paragraph"&&(o=a)}else t[a][1].type==="content"&&t.splice(a,1),!s&&t[a][1].type==="definition"&&(s=a);const c={type:"setextHeading",start:{...t[r][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",s?(t.splice(o,0,["enter",c,l]),t.splice(s+1,0,["exit",t[r][1],l]),t[r][1].end={...t[s][1].end}):t[r][1]=c,t.push(["exit",c,l]),t}function kT(t,l,a){const r=this;let o;return s;function s(m){let y=r.events.length,g;for(;y--;)if(r.events[y][1].type!=="lineEnding"&&r.events[y][1].type!=="linePrefix"&&r.events[y][1].type!=="content"){g=r.events[y][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||g)?(t.enter("setextHeadingLine"),o=m,c(m)):a(m)}function c(m){return t.enter("setextHeadingLineSequence"),d(m)}function d(m){return m===o?(t.consume(m),d):(t.exit("setextHeadingLineSequence"),Ye(m)?Ze(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||_e(m)?(t.exit("setextHeadingLine"),l(m)):a(m)}}const CT={tokenize:TT};function TT(t){const l=this,a=t.attempt(tu,r,t.attempt(this.parser.constructs.flowInitial,o,Ze(t,t.attempt(this.parser.constructs.flow,o,t.attempt(N2,o)),"linePrefix")));return a;function r(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),l.currentConstruct=void 0,a}function o(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),l.currentConstruct=void 0,a}}const jT={resolveAll:$0()},AT=X0("string"),_T=X0("text");function X0(t){return{resolveAll:$0(t==="text"?RT:void 0),tokenize:l};function l(a){const r=this,o=this.parser.constructs[t],s=a.attempt(o,c,d);return c;function c(y){return m(y)?s(y):d(y)}function d(y){if(y===null){a.consume(y);return}return a.enter("data"),a.consume(y),p}function p(y){return m(y)?(a.exit("data"),s(y)):(a.consume(y),p)}function m(y){if(y===null)return!0;const g=o[y];let b=-1;if(g)for(;++b<g.length;){const S=g[b];if(!S.previous||S.previous.call(r,r.previous))return!0}return!1}}}function $0(t){return l;function l(a,r){let o=-1,s;for(;++o<=a.length;)s===void 0?a[o]&&a[o][1].type==="data"&&(s=o,o++):(!a[o]||a[o][1].type!=="data")&&(o!==s+2&&(a[s][1].end=a[o-1][1].end,a.splice(s+2,o-s-2),o=s+2),s=void 0);return t?t(a,r):a}}function RT(t,l){let a=0;for(;++a<=t.length;)if((a===t.length||t[a][1].type==="lineEnding")&&t[a-1][1].type==="data"){const r=t[a-1][1],o=l.sliceStream(r);let s=o.length,c=-1,d=0,p;for(;s--;){const m=o[s];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(m===-2)p=!0,d++;else if(m!==-1){s++;break}}if(l._contentTypeTextTrailing&&a===t.length&&(d=0),d){const m={type:a===t.length||p||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:r.start._bufferIndex+c,_index:r.start._index+s,line:r.end.line,column:r.end.column-d,offset:r.end.offset-d},end:{...r.end}};r.end={...m.start},r.start.offset===r.end.offset?Object.assign(r,m):(t.splice(a,0,["enter",m,l],["exit",m,l]),a+=2)}a++}return t}const NT={42:rn,43:rn,45:rn,48:rn,49:rn,50:rn,51:rn,52:rn,53:rn,54:rn,55:rn,56:rn,57:rn,62:q0},zT={91:L2},DT={[-2]:Tf,[-1]:Tf,32:Tf},OT={35:G2,42:Oo,45:[Xy,Oo],60:Q2,61:Xy,95:Oo,96:Iy,126:Iy},MT={38:G0,92:Y0},LT={[-5]:jf,[-4]:jf,[-3]:jf,33:cT,38:G0,42:nd,60:[d2,W2],91:dT,92:[q2,Y0],93:Qd,95:nd,96:C2},UT={null:[nd,jT]},BT={null:[42,95]},HT={null:[]},qT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:BT,contentInitial:zT,disable:HT,document:NT,flow:OT,flowInitial:DT,insideSpan:UT,string:MT,text:LT},Symbol.toStringTag,{value:"Module"}));function YT(t,l,a){let r={_bufferIndex:-1,_index:0,line:a&&a.line||1,column:a&&a.column||1,offset:a&&a.offset||0};const o={},s=[];let c=[],d=[];const p={attempt:_(P),check:_(H),consume:A,enter:D,exit:te,interrupt:_(H,{interrupt:!0})},m={code:null,containerState:{},defineSkip:j,events:[],now:E,parser:t,previous:null,sliceSerialize:b,sliceStream:S,write:g};let y=l.tokenize.call(m,p);return l.resolveAll&&s.push(l),m;function g(V){return c=Dn(c,V),N(),c[c.length-1]!==null?[]:(ne(l,0),m.events=Wo(s,m.events,m),m.events)}function b(V,G){return VT(S(V),G)}function S(V){return GT(c,V)}function E(){const{_bufferIndex:V,_index:G,line:F,column:le,offset:$}=r;return{_bufferIndex:V,_index:G,line:F,column:le,offset:$}}function j(V){o[V.line]=V.column,R()}function N(){let V;for(;r._index<c.length;){const G=c[r._index];if(typeof G=="string")for(V=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===V&&r._bufferIndex<G.length;)C(G.charCodeAt(r._bufferIndex));else C(G)}}function C(V){y=y(V)}function A(V){_e(V)?(r.line++,r.column=1,r.offset+=V===-3?2:1,R()):V!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===c[r._index].length&&(r._bufferIndex=-1,r._index++)),m.previous=V}function D(V,G){const F=G||{};return F.type=V,F.start=E(),m.events.push(["enter",F,m]),d.push(F),F}function te(V){const G=d.pop();return G.end=E(),m.events.push(["exit",G,m]),G}function P(V,G){ne(V,G.from)}function H(V,G){G.restore()}function _(V,G){return F;function F(le,$,U){let ee,se,xe,z;return Array.isArray(le)?Z(le):"tokenize"in le?Z([le]):L(le);function L(be){return De;function De(pe){const Re=pe!==null&&be[pe],Nt=pe!==null&&be.null,Ln=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return Z(Ln)(pe)}}function Z(be){return ee=be,se=0,be.length===0?U:T(be[se])}function T(be){return De;function De(pe){return z=W(),xe=be,be.partial||(m.currentConstruct=be),be.name&&m.parser.constructs.disable.null.includes(be.name)?ve():be.tokenize.call(G?Object.assign(Object.create(m),G):m,p,ce,ve)(pe)}}function ce(be){return V(xe,z),$}function ve(be){return z.restore(),++se<ee.length?T(ee[se]):U}}}function ne(V,G){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&xn(m.events,G,m.events.length-G,V.resolve(m.events.slice(G),m)),V.resolveTo&&(m.events=V.resolveTo(m.events,m))}function W(){const V=E(),G=m.previous,F=m.currentConstruct,le=m.events.length,$=Array.from(d);return{from:le,restore:U};function U(){r=V,m.previous=G,m.currentConstruct=F,m.events.length=le,d=$,R()}}function R(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function GT(t,l){const a=l.start._index,r=l.start._bufferIndex,o=l.end._index,s=l.end._bufferIndex;let c;if(a===o)c=[t[a].slice(r,s)];else{if(c=t.slice(a,o),r>-1){const d=c[0];typeof d=="string"?c[0]=d.slice(r):c.shift()}s>0&&c.push(t[o].slice(0,s))}return c}function VT(t,l){let a=-1;const r=[];let o;for(;++a<t.length;){const s=t[a];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
|
|
190
190
|
`;break}case-3:{c=`\r
|
|
191
|
-
`;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,r.push(c)}return r.join("")}function GT(t){const r={constructs:H0([BT,...(t||{}).extensions||[]]),content:o(l2),defined:[],document:o(a2),flow:o(wT),lazy:{},string:o(TT),text:o(jT)};return r;function o(s){return c;function c(d){return HT(r,s,d)}}}function VT(t){for(;!F0(t););return t}const Xy=/[\0\t\n\r]/g;function FT(){let t=1,l="",a=!0,r;return o;function o(s,c,d){const p=[];let m,y,g,b,x;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,l="",a&&(s.charCodeAt(0)===65279&&g++,a=void 0);g<s.length;){if(Xy.lastIndex=g,m=Xy.exec(s),b=m&&m.index!==void 0?m.index:s.length,x=s.charCodeAt(b),!m){l=s.slice(g);break}if(x===10&&g===b&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),g<b&&(p.push(s.slice(g,b)),t+=b-g),x){case 0:{p.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,p.push(-2);t++<y;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}g=b+1}return d&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const IT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function QT(t){return t.replace(IT,XT)}function XT(t,l,a){if(l)return l;if(a.charCodeAt(0)===35){const o=a.charCodeAt(1),s=o===120||o===88;return q0(a.slice(s?2:1),s?16:10)}return Vd(a)||t}const Z0={}.hasOwnProperty;function $T(t,l,a){return typeof l!="string"&&(a=l,l=void 0),KT(a)(VT(GT(a).document().write(FT()(t,l,!0))))}function KT(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ll),autolinkProtocol:J,autolinkEmail:J,atxHeading:s(Rl),blockQuote:s(zt),characterEscape:J,characterReference:J,codeFenced:s(Ln),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Ln,c),codeText:s(yt,c),codeTextData:J,data:J,codeFlowValue:J,definition:s(Un),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Sn),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(Vi,c),htmlFlowData:J,htmlText:s(Vi,c),htmlTextData:J,image:s(Fi),label:c,link:s(ll),listItem:s(mi),listItemValue:b,listOrdered:s(zl,g),listUnordered:s(zl),paragraph:s(La),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Rl),strong:s(Ua),thematicBreak:s(il)},exit:{atxHeading:p(),atxHeadingSequence:P,autolink:p(),autolinkEmail:Re,autolinkProtocol:pe,blockQuote:p(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:be,characterReference:De,codeFenced:p(z),codeFencedFence:A,codeFencedFenceInfo:x,codeFencedFenceMeta:E,codeFlowValue:R,codeIndented:p(C),codeText:p(I),codeTextData:R,data:R,definition:p(),definitionDestinationString:te,definitionLabelString:j,definitionTitleString:D,emphasis:p(),hardBreakEscape:p(G),hardBreakTrailing:p(G),htmlFlow:p(F),htmlFlowData:R,htmlText:p(le),htmlTextData:R,image:p(ee),label:xe,labelText:se,lineEnding:V,link:p(B),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ce,resourceDestinationString:N,resourceTitleString:L,resource:Z,setextHeading:p(ne),setextHeadingLineSequence:_,setextHeadingText:H,strong:p(),thematicBreak:p()}};P0(l,(t||{}).mdastExtensions||[]);const a={};return r;function r(ae){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:l,enter:d,exit:m,buffer:c,resume:y,data:a},Ne=[];let Pe=-1;for(;++Pe<ae.length;)if(ae[Pe][1].type==="listOrdered"||ae[Pe][1].type==="listUnordered")if(ae[Pe][0]==="enter")Ne.push(Pe);else{const $t=Ne.pop();Pe=o(ae,$t,Pe)}for(Pe=-1;++Pe<ae.length;){const $t=l[ae[Pe][0]];Z0.call($t,ae[Pe][1].type)&&$t[ae[Pe][1].type].call(Object.assign({sliceSerialize:ae[Pe][2].sliceSerialize},Ce),ae[Pe][1])}if(Ce.tokenStack.length>0){const $t=Ce.tokenStack[Ce.tokenStack.length-1];($t[1]||$y).call(Ce,void 0,$t[0])}for(de.position={start:ii(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:ii(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<l.transforms.length;)de=l.transforms[Pe](de)||de;return de}function o(ae,de,Ce){let Ne=de-1,Pe=-1,$t=!1,on,Lt,nt,Ut;for(;++Ne<=Ce;){const tt=ae[Ne];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Pe++:Pe--,Ut=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(on&&!Ut&&!Pe&&!nt&&(nt=Ne),Ut=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ut=void 0}if(!Pe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Pe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(on){let Bn=Ne;for(Lt=void 0;Bn--;){const sn=ae[Bn];if(sn[1].type==="lineEnding"||sn[1].type==="lineEndingBlank"){if(sn[0]==="exit")continue;Lt&&(ae[Lt][1].type="lineEndingBlank",$t=!0),sn[1].type="lineEnding",Lt=Bn}else if(!(sn[1].type==="linePrefix"||sn[1].type==="blockQuotePrefix"||sn[1].type==="blockQuotePrefixWhitespace"||sn[1].type==="blockQuoteMarker"||sn[1].type==="listItemIndent"))break}nt&&(!Lt||nt<Lt)&&(on._spread=!0),on.end=Object.assign({},Lt?ae[Lt][1].start:tt[1].end),ae.splice(Lt||Ne,0,["exit",on,tt[2]]),Ne++,Ce++}if(tt[1].type==="listItemPrefix"){const Bn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};on=Bn,ae.splice(Ne,0,["enter",Bn,tt[2]]),Ne++,Ce++,nt=void 0,Ut=!0}}}return ae[de][1]._spread=$t,Ce}function s(ae,de){return Ce;function Ce(Ne){d.call(this,ae(Ne),Ne),de&&de.call(this,Ne)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ae,de,Ce){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([de,Ce||void 0]),ae.position={start:ii(de.start),end:void 0}}function p(ae){return de;function de(Ce){ae&&ae.call(this,Ce),m.call(this,Ce)}}function m(ae,de){const Ce=this.stack.pop(),Ne=this.tokenStack.pop();if(Ne)Ne[0].type!==ae.type&&(de?de.call(this,ae,Ne[0]):(Ne[1]||$y).call(this,ae,Ne[0]));else throw new Error("Cannot close `"+ae.type+"` ("+Br({start:ae.start,end:ae.end})+"): it’s not open");Ce.position.end=ii(ae.end)}function y(){return Gd(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ae){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.lang=ae}function E(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.meta=ae}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function z(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae.replace(/(\r?\n|\r)$/g,"")}function j(ae){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(ae)).toLowerCase()}function D(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.title=ae}function te(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.url=ae}function P(ae){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(ae).length;de.depth=Ce}}function H(){this.data.setextHeadingSlurpLineEnding=!0}function _(ae){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function J(ae){const Ce=this.stack[this.stack.length-1].children;let Ne=Ce[Ce.length-1];(!Ne||Ne.type!=="text")&&(Ne=pt(),Ne.position={start:ii(ae.start),end:void 0},Ce.push(Ne)),this.stack.push(Ne)}function R(ae){const de=this.stack.pop();de.value+=this.sliceSerialize(ae),de.position.end=ii(ae.end)}function V(ae){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=ii(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(de.type)&&(J.call(this,ae),R.call(this,ae))}function G(){this.data.atHardBreak=!0}function F(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae}function le(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae}function I(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae}function B(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=de,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function ee(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=de,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function se(ae){const de=this.sliceSerialize(ae),Ce=this.stack[this.stack.length-2];Ce.label=QT(de),Ce.identifier=In(de).toLowerCase()}function xe(){const ae=this.stack[this.stack.length-1],de=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ne=ae.children;Ce.children=Ne}else Ce.alt=de}function N(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.url=ae}function L(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.title=ae}function Z(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ce(ae){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function ve(ae){this.data.characterReferenceType=ae.type}function be(ae){const de=this.sliceSerialize(ae),Ce=this.data.characterReferenceType;let Ne;Ce?(Ne=q0(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ne=Vd(de);const Pe=this.stack[this.stack.length-1];Pe.value+=Ne}function De(ae){const de=this.stack.pop();de.position.end=ii(ae.end)}function pe(ae){R.call(this,ae);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ae)}function Re(ae){R.call(this,ae);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ae)}function zt(){return{type:"blockquote",children:[]}}function Ln(){return{type:"code",lang:null,meta:null,value:""}}function yt(){return{type:"inlineCode",value:""}}function Un(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Sn(){return{type:"emphasis",children:[]}}function Rl(){return{type:"heading",depth:0,children:[]}}function Pt(){return{type:"break"}}function Vi(){return{type:"html",value:""}}function Fi(){return{type:"image",title:null,url:"",alt:null}}function ll(){return{type:"link",title:null,url:"",children:[]}}function zl(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function mi(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function La(){return{type:"paragraph",children:[]}}function Ua(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function il(){return{type:"thematicBreak"}}}function ii(t){return{line:t.line,column:t.column,offset:t.offset}}function P0(t,l){let a=-1;for(;++a<l.length;){const r=l[a];Array.isArray(r)?P0(t,r):ZT(t,r)}}function ZT(t,l){let a;for(a in l)if(Z0.call(l,a))switch(a){case"canContainEols":{const r=l[a];r&&t[a].push(...r);break}case"transforms":{const r=l[a];r&&t[a].push(...r);break}case"enter":case"exit":{const r=l[a];r&&Object.assign(t[a],r);break}}}function $y(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+Br({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+Br({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+Br({start:l.start,end:l.end})+") is still open")}function PT(t){const l=this;l.parser=a;function a(r){return $T(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function JT(t,l){const a={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,a),t.applyData(l,a)}function WT(t,l){const a={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,a),[t.applyData(l,a),{type:"text",value:`
|
|
192
|
-
`}]}function
|
|
193
|
-
`:"",r={},o=l.lang?l.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};return l.meta&&(s.data={meta:l.meta}),t.patch(l,s),s=t.applyData(l,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(l,s),s}function
|
|
191
|
+
`;break}case-2:{c=l?" ":" ";break}case-1:{if(!l&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,r.push(c)}return r.join("")}function FT(t){const r={constructs:B0([qT,...(t||{}).extensions||[]]),content:o(a2),defined:[],document:o(u2),flow:o(CT),lazy:{},string:o(AT),text:o(_T)};return r;function o(s){return c;function c(d){return YT(r,s,d)}}}function IT(t){for(;!V0(t););return t}const $y=/[\0\t\n\r]/g;function QT(){let t=1,l="",a=!0,r;return o;function o(s,c,d){const p=[];let m,y,g,b,S;for(s=l+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),g=0,l="",a&&(s.charCodeAt(0)===65279&&g++,a=void 0);g<s.length;){if($y.lastIndex=g,m=$y.exec(s),b=m&&m.index!==void 0?m.index:s.length,S=s.charCodeAt(b),!m){l=s.slice(g);break}if(S===10&&g===b&&r)p.push(-3),r=void 0;else switch(r&&(p.push(-5),r=void 0),g<b&&(p.push(s.slice(g,b)),t+=b-g),S){case 0:{p.push(65533),t++;break}case 9:{for(y=Math.ceil(t/4)*4,p.push(-2);t++<y;)p.push(-1);break}case 10:{p.push(-4),t=1;break}default:r=!0,t=1}g=b+1}return d&&(r&&p.push(-5),l&&p.push(l),p.push(null)),p}}const XT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $T(t){return t.replace(XT,KT)}function KT(t,l,a){if(l)return l;if(a.charCodeAt(0)===35){const o=a.charCodeAt(1),s=o===120||o===88;return H0(a.slice(s?2:1),s?16:10)}return Id(a)||t}const K0={}.hasOwnProperty;function ZT(t,l,a){return typeof l!="string"&&(a=l,l=void 0),PT(a)(IT(FT(a).document().write(QT()(t,l,!0))))}function PT(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ll),autolinkProtocol:W,autolinkEmail:W,atxHeading:s(Rl),blockQuote:s(Nt),characterEscape:W,characterReference:W,codeFenced:s(Ln),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Ln,c),codeText:s(yt,c),codeTextData:W,data:W,codeFlowValue:W,definition:s(Un),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Sn),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(Vi,c),htmlFlowData:W,htmlText:s(Vi,c),htmlTextData:W,image:s(Fi),label:c,link:s(ll),listItem:s(mi),listItemValue:b,listOrdered:s(Nl,g),listUnordered:s(Nl),paragraph:s(Ba),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Rl),strong:s(Ha),thematicBreak:s(il)},exit:{atxHeading:p(),atxHeadingSequence:P,autolink:p(),autolinkEmail:Re,autolinkProtocol:pe,blockQuote:p(),characterEscapeValue:R,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:be,characterReference:De,codeFenced:p(N),codeFencedFence:j,codeFencedFenceInfo:S,codeFencedFenceMeta:E,codeFlowValue:R,codeIndented:p(C),codeText:p($),codeTextData:R,data:R,definition:p(),definitionDestinationString:te,definitionLabelString:A,definitionTitleString:D,emphasis:p(),hardBreakEscape:p(G),hardBreakTrailing:p(G),htmlFlow:p(F),htmlFlowData:R,htmlText:p(le),htmlTextData:R,image:p(ee),label:xe,labelText:se,lineEnding:V,link:p(U),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ce,resourceDestinationString:z,resourceTitleString:L,resource:Z,setextHeading:p(ne),setextHeadingLineSequence:_,setextHeadingText:H,strong:p(),thematicBreak:p()}};Z0(l,(t||{}).mdastExtensions||[]);const a={};return r;function r(ae){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:l,enter:d,exit:m,buffer:c,resume:y,data:a},ze=[];let Pe=-1;for(;++Pe<ae.length;)if(ae[Pe][1].type==="listOrdered"||ae[Pe][1].type==="listUnordered")if(ae[Pe][0]==="enter")ze.push(Pe);else{const $t=ze.pop();Pe=o(ae,$t,Pe)}for(Pe=-1;++Pe<ae.length;){const $t=l[ae[Pe][0]];K0.call($t,ae[Pe][1].type)&&$t[ae[Pe][1].type].call(Object.assign({sliceSerialize:ae[Pe][2].sliceSerialize},Ce),ae[Pe][1])}if(Ce.tokenStack.length>0){const $t=Ce.tokenStack[Ce.tokenStack.length-1];($t[1]||Ky).call(Ce,void 0,$t[0])}for(de.position={start:ii(ae.length>0?ae[0][1].start:{line:1,column:1,offset:0}),end:ii(ae.length>0?ae[ae.length-2][1].end:{line:1,column:1,offset:0})},Pe=-1;++Pe<l.transforms.length;)de=l.transforms[Pe](de)||de;return de}function o(ae,de,Ce){let ze=de-1,Pe=-1,$t=!1,on,Ut,nt,Bt;for(;++ze<=Ce;){const tt=ae[ze];switch(tt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{tt[0]==="enter"?Pe++:Pe--,Bt=void 0;break}case"lineEndingBlank":{tt[0]==="enter"&&(on&&!Bt&&!Pe&&!nt&&(nt=ze),Bt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Bt=void 0}if(!Pe&&tt[0]==="enter"&&tt[1].type==="listItemPrefix"||Pe===-1&&tt[0]==="exit"&&(tt[1].type==="listUnordered"||tt[1].type==="listOrdered")){if(on){let Bn=ze;for(Ut=void 0;Bn--;){const sn=ae[Bn];if(sn[1].type==="lineEnding"||sn[1].type==="lineEndingBlank"){if(sn[0]==="exit")continue;Ut&&(ae[Ut][1].type="lineEndingBlank",$t=!0),sn[1].type="lineEnding",Ut=Bn}else if(!(sn[1].type==="linePrefix"||sn[1].type==="blockQuotePrefix"||sn[1].type==="blockQuotePrefixWhitespace"||sn[1].type==="blockQuoteMarker"||sn[1].type==="listItemIndent"))break}nt&&(!Ut||nt<Ut)&&(on._spread=!0),on.end=Object.assign({},Ut?ae[Ut][1].start:tt[1].end),ae.splice(Ut||ze,0,["exit",on,tt[2]]),ze++,Ce++}if(tt[1].type==="listItemPrefix"){const Bn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};on=Bn,ae.splice(ze,0,["enter",Bn,tt[2]]),ze++,Ce++,nt=void 0,Bt=!0}}}return ae[de][1]._spread=$t,Ce}function s(ae,de){return Ce;function Ce(ze){d.call(this,ae(ze),ze),de&&de.call(this,ze)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ae,de,Ce){this.stack[this.stack.length-1].children.push(ae),this.stack.push(ae),this.tokenStack.push([de,Ce||void 0]),ae.position={start:ii(de.start),end:void 0}}function p(ae){return de;function de(Ce){ae&&ae.call(this,Ce),m.call(this,Ce)}}function m(ae,de){const Ce=this.stack.pop(),ze=this.tokenStack.pop();if(ze)ze[0].type!==ae.type&&(de?de.call(this,ae,ze[0]):(ze[1]||Ky).call(this,ae,ze[0]));else throw new Error("Cannot close `"+ae.type+"` ("+qr({start:ae.start,end:ae.end})+"): it’s not open");Ce.position.end=ii(ae.end)}function y(){return Fd(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ae){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ae),10),this.data.expectingFirstListItemValue=void 0}}function S(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.lang=ae}function E(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.meta=ae}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae.replace(/(\r?\n|\r)$/g,"")}function A(ae){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(ae)).toLowerCase()}function D(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.title=ae}function te(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.url=ae}function P(ae){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(ae).length;de.depth=Ce}}function H(){this.data.setextHeadingSlurpLineEnding=!0}function _(ae){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ae).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function W(ae){const Ce=this.stack[this.stack.length-1].children;let ze=Ce[Ce.length-1];(!ze||ze.type!=="text")&&(ze=pt(),ze.position={start:ii(ae.start),end:void 0},Ce.push(ze)),this.stack.push(ze)}function R(ae){const de=this.stack.pop();de.value+=this.sliceSerialize(ae),de.position.end=ii(ae.end)}function V(ae){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=ii(ae.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(de.type)&&(W.call(this,ae),R.call(this,ae))}function G(){this.data.atHardBreak=!0}function F(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae}function le(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae}function $(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.value=ae}function U(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=de,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function ee(){const ae=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ae.type+="Reference",ae.referenceType=de,delete ae.url,delete ae.title}else delete ae.identifier,delete ae.label;this.data.referenceType=void 0}function se(ae){const de=this.sliceSerialize(ae),Ce=this.stack[this.stack.length-2];Ce.label=$T(de),Ce.identifier=In(de).toLowerCase()}function xe(){const ae=this.stack[this.stack.length-1],de=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const ze=ae.children;Ce.children=ze}else Ce.alt=de}function z(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.url=ae}function L(){const ae=this.resume(),de=this.stack[this.stack.length-1];de.title=ae}function Z(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function ce(ae){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(ae)).toLowerCase(),this.data.referenceType="full"}function ve(ae){this.data.characterReferenceType=ae.type}function be(ae){const de=this.sliceSerialize(ae),Ce=this.data.characterReferenceType;let ze;Ce?(ze=H0(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):ze=Id(de);const Pe=this.stack[this.stack.length-1];Pe.value+=ze}function De(ae){const de=this.stack.pop();de.position.end=ii(ae.end)}function pe(ae){R.call(this,ae);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ae)}function Re(ae){R.call(this,ae);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ae)}function Nt(){return{type:"blockquote",children:[]}}function Ln(){return{type:"code",lang:null,meta:null,value:""}}function yt(){return{type:"inlineCode",value:""}}function Un(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Sn(){return{type:"emphasis",children:[]}}function Rl(){return{type:"heading",depth:0,children:[]}}function Pt(){return{type:"break"}}function Vi(){return{type:"html",value:""}}function Fi(){return{type:"image",title:null,url:"",alt:null}}function ll(){return{type:"link",title:null,url:"",children:[]}}function Nl(ae){return{type:"list",ordered:ae.type==="listOrdered",start:null,spread:ae._spread,children:[]}}function mi(ae){return{type:"listItem",spread:ae._spread,checked:null,children:[]}}function Ba(){return{type:"paragraph",children:[]}}function Ha(){return{type:"strong",children:[]}}function pt(){return{type:"text",value:""}}function il(){return{type:"thematicBreak"}}}function ii(t){return{line:t.line,column:t.column,offset:t.offset}}function Z0(t,l){let a=-1;for(;++a<l.length;){const r=l[a];Array.isArray(r)?Z0(t,r):JT(t,r)}}function JT(t,l){let a;for(a in l)if(K0.call(l,a))switch(a){case"canContainEols":{const r=l[a];r&&t[a].push(...r);break}case"transforms":{const r=l[a];r&&t[a].push(...r);break}case"enter":case"exit":{const r=l[a];r&&Object.assign(t[a],r);break}}}function Ky(t,l){throw t?new Error("Cannot close `"+t.type+"` ("+qr({start:t.start,end:t.end})+"): a different token (`"+l.type+"`, "+qr({start:l.start,end:l.end})+") is open"):new Error("Cannot close document, a token (`"+l.type+"`, "+qr({start:l.start,end:l.end})+") is still open")}function WT(t){const l=this;l.parser=a;function a(r){return ZT(r,{...l.data("settings"),...t,extensions:l.data("micromarkExtensions")||[],mdastExtensions:l.data("fromMarkdownExtensions")||[]})}}function ej(t,l){const a={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(l),!0)};return t.patch(l,a),t.applyData(l,a)}function tj(t,l){const a={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,a),[t.applyData(l,a),{type:"text",value:`
|
|
192
|
+
`}]}function nj(t,l){const a=l.value?l.value+`
|
|
193
|
+
`:"",r={},o=l.lang?l.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:r,children:[{type:"text",value:a}]};return l.meta&&(s.data={meta:l.meta}),t.patch(l,s),s=t.applyData(l,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(l,s),s}function lj(t,l){const a={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function ij(t,l){const a={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function aj(t,l){const a=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),o=Ua(r.toLowerCase()),s=t.footnoteOrder.indexOf(r);let c,d=t.footnoteCounts.get(r);d===void 0?(d=0,t.footnoteOrder.push(r),c=t.footnoteOrder.length):c=s+1,d+=1,t.footnoteCounts.set(r,d);const p={type:"element",tagName:"a",properties:{href:"#"+a+"fn-"+o,id:a+"fnref-"+o+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};t.patch(l,p);const m={type:"element",tagName:"sup",properties:{},children:[p]};return t.patch(l,m),t.applyData(l,m)}function rj(t,l){const a={type:"element",tagName:"h"+l.depth,properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function uj(t,l){if(t.options.allowDangerousHtml){const a={type:"raw",value:l.value};return t.patch(l,a),t.applyData(l,a)}}function P0(t,l){const a=l.referenceType;let r="]";if(a==="collapsed"?r+="[]":a==="full"&&(r+="["+(l.label||l.identifier)+"]"),l.type==="imageReference")return[{type:"text",value:"!["+l.alt+r}];const o=t.all(l),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=r:o.push({type:"text",value:r}),o}function oj(t,l){const a=String(l.identifier).toUpperCase(),r=t.definitionById.get(a);if(!r)return P0(t,l);const o={src:Ua(r.url||""),alt:l.alt};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"img",properties:o,children:[]};return t.patch(l,s),t.applyData(l,s)}function sj(t,l){const a={src:Ua(l.url)};l.alt!==null&&l.alt!==void 0&&(a.alt=l.alt),l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"img",properties:a,children:[]};return t.patch(l,r),t.applyData(l,r)}function cj(t,l){const a={type:"text",value:l.value.replace(/\r?\n|\r/g," ")};t.patch(l,a);const r={type:"element",tagName:"code",properties:{},children:[a]};return t.patch(l,r),t.applyData(l,r)}function fj(t,l){const a=String(l.identifier).toUpperCase(),r=t.definitionById.get(a);if(!r)return P0(t,l);const o={href:Ua(r.url||"")};r.title!==null&&r.title!==void 0&&(o.title=r.title);const s={type:"element",tagName:"a",properties:o,children:t.all(l)};return t.patch(l,s),t.applyData(l,s)}function dj(t,l){const a={href:Ua(l.url)};l.title!==null&&l.title!==void 0&&(a.title=l.title);const r={type:"element",tagName:"a",properties:a,children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function hj(t,l,a){const r=t.all(l),o=a?mj(a):J0(l),s={},c=[];if(typeof l.checked=="boolean"){const y=r[0];let g;y&&y.type==="element"&&y.tagName==="p"?g=y:(g={type:"element",tagName:"p",properties:{},children:[]},r.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:l.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let d=-1;for(;++d<r.length;){const y=r[d];(o||d!==0||y.type!=="element"||y.tagName!=="p")&&c.push({type:"text",value:`
|
|
194
194
|
`}),y.type==="element"&&y.tagName==="p"&&!o?c.push(...y.children):c.push(y)}const p=r[r.length-1];p&&(o||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
195
|
-
`});const m={type:"element",tagName:"li",properties:s,children:c};return t.patch(l,m),t.applyData(l,m)}function
|
|
195
|
+
`});const m={type:"element",tagName:"li",properties:s,children:c};return t.patch(l,m),t.applyData(l,m)}function mj(t){let l=!1;if(t.type==="list"){l=t.spread||!1;const a=t.children;let r=-1;for(;!l&&++r<a.length;)l=J0(a[r])}return l}function J0(t){const l=t.spread;return l??t.children.length>1}function pj(t,l){const a={},r=t.all(l);let o=-1;for(typeof l.start=="number"&&l.start!==1&&(a.start=l.start);++o<r.length;){const c=r[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){a.className=["contains-task-list"];break}}const s={type:"element",tagName:l.ordered?"ol":"ul",properties:a,children:t.wrap(r,!0)};return t.patch(l,s),t.applyData(l,s)}function gj(t,l){const a={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function yj(t,l){const a={type:"root",children:t.wrap(t.all(l))};return t.patch(l,a),t.applyData(l,a)}function vj(t,l){const a={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function bj(t,l){const a=t.all(l),r=a.shift(),o=[];if(r){const c={type:"element",tagName:"thead",properties:{},children:t.wrap([r],!0)};t.patch(l.children[0],c),o.push(c)}if(a.length>0){const c={type:"element",tagName:"tbody",properties:{},children:t.wrap(a,!0)},d=qd(l.children[1]),p=N0(l.children[l.children.length-1]);d&&p&&(c.position={start:d,end:p}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(l,s),t.applyData(l,s)}function xj(t,l,a){const r=a?a.children:void 0,s=(r?r.indexOf(l):1)===0?"th":"td",c=a&&a.type==="table"?a.align:void 0,d=c?c.length:l.children.length;let p=-1;const m=[];for(;++p<d;){const g=l.children[p],b={},S=c?c[p]:void 0;S&&(b.align=S);let E={type:"element",tagName:s,properties:b,children:[]};g&&(E.children=t.all(g),t.patch(g,E),E=t.applyData(g,E)),m.push(E)}const y={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(l,y),t.applyData(l,y)}function Sj(t,l){const a={type:"element",tagName:"td",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}const Zy=9,Py=32;function Ej(t){const l=String(t),a=/\r?\n|\r/g;let r=a.exec(l),o=0;const s=[];for(;r;)s.push(Jy(l.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=a.exec(l);return s.push(Jy(l.slice(o),o>0,!1)),s.join("")}function Jy(t,l,a){let r=0,o=t.length;if(l){let s=t.codePointAt(r);for(;s===Zy||s===Py;)r++,s=t.codePointAt(r)}if(a){let s=t.codePointAt(o-1);for(;s===Zy||s===Py;)o--,s=t.codePointAt(o-1)}return o>r?t.slice(r,o):""}function wj(t,l){const a={type:"text",value:Ej(String(l.value))};return t.patch(l,a),t.applyData(l,a)}function kj(t,l){const a={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,a),t.applyData(l,a)}const Cj={blockquote:ej,break:tj,code:nj,delete:lj,emphasis:ij,footnoteReference:aj,heading:rj,html:uj,imageReference:oj,image:sj,inlineCode:cj,linkReference:fj,link:dj,listItem:hj,list:pj,paragraph:gj,root:yj,strong:vj,table:bj,tableCell:Sj,tableRow:xj,text:wj,thematicBreak:kj,toml:Eo,yaml:Eo,definition:Eo,footnoteDefinition:Eo};function Eo(){}const W0=-1,es=0,Gr=1,Ho=2,Xd=3,$d=4,Kd=5,Zd=6,eb=7,tb=8,Wy=typeof self=="object"?self:globalThis,Tj=(t,l)=>{const a=(o,s)=>(t.set(s,o),o),r=o=>{if(t.has(o))return t.get(o);const[s,c]=l[o];switch(s){case es:case W0:return a(c,o);case Gr:{const d=a([],o);for(const p of c)d.push(r(p));return d}case Ho:{const d=a({},o);for(const[p,m]of c)d[r(p)]=r(m);return d}case Xd:return a(new Date(c),o);case $d:{const{source:d,flags:p}=c;return a(new RegExp(d,p),o)}case Kd:{const d=a(new Map,o);for(const[p,m]of c)d.set(r(p),r(m));return d}case Zd:{const d=a(new Set,o);for(const p of c)d.add(r(p));return d}case eb:{const{name:d,message:p}=c;return a(new Wy[d](p),o)}case tb:return a(BigInt(c),o);case"BigInt":return a(Object(BigInt(c)),o);case"ArrayBuffer":return a(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:d}=new Uint8Array(c);return a(new DataView(d),c)}}return a(new Wy[s](c),o)};return r},ev=t=>Tj(new Map,t)(0),Ca="",{toString:jj}={},{keys:Aj}=Object,Lr=t=>{const l=typeof t;if(l!=="object"||!t)return[es,l];const a=jj.call(t).slice(8,-1);switch(a){case"Array":return[Gr,Ca];case"Object":return[Ho,Ca];case"Date":return[Xd,Ca];case"RegExp":return[$d,Ca];case"Map":return[Kd,Ca];case"Set":return[Zd,Ca];case"DataView":return[Gr,a]}return a.includes("Array")?[Gr,a]:a.includes("Error")?[eb,a]:[Ho,a]},wo=([t,l])=>t===es&&(l==="function"||l==="symbol"),_j=(t,l,a,r)=>{const o=(c,d)=>{const p=r.push(c)-1;return a.set(d,p),p},s=c=>{if(a.has(c))return a.get(c);let[d,p]=Lr(c);switch(d){case es:{let y=c;switch(p){case"bigint":d=tb,y=c.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+p);y=null;break;case"undefined":return o([W0],c)}return o([d,y],c)}case Gr:{if(p){let b=c;return p==="DataView"?b=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(b=new Uint8Array(c)),o([p,[...b]],c)}const y=[],g=o([d,y],c);for(const b of c)y.push(s(b));return g}case Ho:{if(p)switch(p){case"BigInt":return o([p,c.toString()],c);case"Boolean":case"Number":case"String":return o([p,c.valueOf()],c)}if(l&&"toJSON"in c)return s(c.toJSON());const y=[],g=o([d,y],c);for(const b of Aj(c))(t||!wo(Lr(c[b])))&&y.push([s(b),s(c[b])]);return g}case Xd:return o([d,c.toISOString()],c);case $d:{const{source:y,flags:g}=c;return o([d,{source:y,flags:g}],c)}case Kd:{const y=[],g=o([d,y],c);for(const[b,S]of c)(t||!(wo(Lr(b))||wo(Lr(S))))&&y.push([s(b),s(S)]);return g}case Zd:{const y=[],g=o([d,y],c);for(const b of c)(t||!wo(Lr(b)))&&y.push(s(b));return g}}const{message:m}=c;return o([d,{name:p,message:m}],c)};return s},tv=(t,{json:l,lossy:a}={})=>{const r=[];return _j(!(l||a),!!l,new Map,r)(t),r},qo=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?ev(tv(t,l)):structuredClone(t):(t,l)=>ev(tv(t,l));function Rj(t,l){const a=[{type:"text",value:"↩"}];return l>1&&a.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(l)}]}),a}function Nj(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function zj(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=t.options.footnoteBackContent||Rj,r=t.options.footnoteBackLabel||Nj,o=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",c=t.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let p=-1;for(;++p<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[p]);if(!m)continue;const y=t.all(m),g=String(m.identifier).toUpperCase(),b=Ua(g.toLowerCase());let S=0;const E=[],j=t.footnoteCounts.get(g);for(;j!==void 0&&++S<=j;){E.length>0&&E.push({type:"text",value:" "});let A=typeof a=="string"?a:a(p,S);typeof A=="string"&&(A={type:"text",value:A}),E.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+b+(S>1?"-"+S:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,S),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const N=y[y.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const A=N.children[N.children.length-1];A&&A.type==="text"?A.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...E)}else y.push(...E);const C={type:"element",tagName:"li",properties:{id:l+"fn-"+b},children:t.wrap(y,!0)};t.patch(m,C),d.push(C)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...qo(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
196
196
|
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
|
|
197
|
-
`}]}}const ts=(function(t){if(t==null)return
|
|
197
|
+
`}]}}const ts=(function(t){if(t==null)return Lj;if(typeof t=="function")return ns(t);if(typeof t=="object")return Array.isArray(t)?Dj(t):Oj(t);if(typeof t=="string")return Mj(t);throw new Error("Expected function, string, or object as test")});function Dj(t){const l=[];let a=-1;for(;++a<t.length;)l[a]=ts(t[a]);return ns(r);function r(...o){let s=-1;for(;++s<l.length;)if(l[s].apply(this,o))return!0;return!1}}function Oj(t){const l=t;return ns(a);function a(r){const o=r;let s;for(s in t)if(o[s]!==l[s])return!1;return!0}}function Mj(t){return ns(l);function l(a){return a&&a.type===t}}function ns(t){return l;function l(a,r,o){return!!(Uj(a)&&t.call(this,a,typeof r=="number"?r:void 0,o||void 0))}}function Lj(){return!0}function Uj(t){return t!==null&&typeof t=="object"&&"type"in t}const nb=[],Bj=!0,ld=!1,Hj="skip";function lb(t,l,a,r){let o;typeof l=="function"&&typeof a!="function"?(r=a,a=l):o=l;const s=ts(o),c=r?-1:1;d(t,void 0,[])();function d(p,m,y){const g=p&&typeof p=="object"?p:{};if(typeof g.type=="string"){const S=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(S?"<"+S+">":""))+")"})}return b;function b(){let S=nb,E,j,N;if((!l||s(p,m,y[y.length-1]||void 0))&&(S=qj(a(p,y)),S[0]===ld))return S;if("children"in p&&p.children){const C=p;if(C.children&&S[0]!==Hj)for(j=(r?C.children.length:-1)+c,N=y.concat(C);j>-1&&j<C.children.length;){const A=C.children[j];if(E=d(A,j,N)(),E[0]===ld)return E;j=typeof E[1]=="number"?E[1]:j+c}}return S}}}function qj(t){return Array.isArray(t)?t:typeof t=="number"?[Bj,t]:t==null?nb:[t]}function Pd(t,l,a,r){let o,s,c;typeof l=="function"&&typeof a!="function"?(s=void 0,c=l,o=a):(s=l,c=a,o=r),lb(t,s,d,o);function d(p,m){const y=m[m.length-1],g=y?y.children.indexOf(p):void 0;return c(p,g,y)}}const id={}.hasOwnProperty,Yj={};function Gj(t,l){const a=l||Yj,r=new Map,o=new Map,s=new Map,c={...Cj,...a.handlers},d={all:m,applyData:Fj,definitionById:r,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:p,options:a,patch:Vj,wrap:Qj};return Pd(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const g=y.type==="definition"?r:o,b=String(y.identifier).toUpperCase();g.has(b)||g.set(b,y)}}),d;function p(y,g){const b=y.type,S=d.handlers[b];if(id.call(d.handlers,b)&&S)return S(d,y,g);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in y){const{children:j,...N}=y,C=qo(N);return C.children=d.all(y),C}return qo(y)}return(d.options.unknownHandler||Ij)(d,y,g)}function m(y){const g=[];if("children"in y){const b=y.children;let S=-1;for(;++S<b.length;){const E=d.one(b[S],y);if(E){if(S&&b[S-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=nv(E.value)),!Array.isArray(E)&&E.type==="element")){const j=E.children[0];j&&j.type==="text"&&(j.value=nv(j.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function Vj(t,l){t.position&&(l.position=NC(t))}function Fj(t,l){let a=l;if(t&&t.data){const r=t.data.hName,o=t.data.hChildren,s=t.data.hProperties;if(typeof r=="string")if(a.type==="element")a.tagName=r;else{const c="children"in a?a.children:[a];a={type:"element",tagName:r,properties:{},children:c}}a.type==="element"&&s&&Object.assign(a.properties,qo(s)),"children"in a&&a.children&&o!==null&&o!==void 0&&(a.children=o)}return a}function Ij(t,l){const a=l.data||{},r="value"in l&&!(id.call(a,"hProperties")||id.call(a,"hChildren"))?{type:"text",value:l.value}:{type:"element",tagName:"div",properties:{},children:t.all(l)};return t.patch(l,r),t.applyData(l,r)}function Qj(t,l){const a=[];let r=-1;for(l&&a.push({type:"text",value:`
|
|
198
198
|
`});++r<t.length;)r&&a.push({type:"text",value:`
|
|
199
199
|
`}),a.push(t[r]);return l&&t.length>0&&a.push({type:"text",value:`
|
|
200
|
-
`}),a}function
|
|
201
|
-
`},o),s}function Ij(t,l){return t&&"run"in t?async function(a,r){const o=nv(a,{file:r,...l});await t.run(o,r)}:function(a,r){return nv(a,{file:r,...t||l})}}function lv(t){if(t)throw t}var Af,iv;function Qj(){if(iv)return Af;iv=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},s=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var y=t.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!g)return!1;var b;for(b in m);return typeof b>"u"||t.call(m,b)},c=function(m,y){a&&y.name==="__proto__"?a(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},d=function(m,y){if(y==="__proto__")if(t.call(m,y)){if(r)return r(m,y).value}else return;return m[y]};return Af=function p(){var m,y,g,b,x,E,A=arguments[0],z=1,C=arguments.length,j=!1;for(typeof A=="boolean"&&(j=A,A=arguments[1]||{},z=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});z<C;++z)if(m=arguments[z],m!=null)for(y in m)g=d(A,y),b=d(m,y),A!==b&&(j&&b&&(s(b)||(x=o(b)))?(x?(x=!1,E=g&&o(g)?g:[]):E=g&&s(g)?g:{},c(A,{name:y,newValue:p(j,E,b)})):typeof b<"u"&&c(A,{name:y,newValue:b}));return A},Af}var Xj=Qj();const _f=md(Xj);function ad(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function $j(){const t=[],l={run:a,use:r};return l;function a(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...o);function d(p,...m){const y=t[++s];let g=-1;if(p){c(p);return}for(;++g<o.length;)(m[g]===null||m[g]===void 0)&&(m[g]=o[g]);o=m,y?Kj(y,d)(...m):c(null,...m)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),l}}function Kj(t,l){let a;return r;function r(...c){const d=t.length>c.length;let p;d&&c.push(o);try{p=t.apply(this,c)}catch(m){const y=m;if(d&&a)throw y;return o(y)}d||(p&&p.then&&typeof p.then=="function"?p.then(s,o):p instanceof Error?o(p):s(p))}function o(c,...d){a||(a=!0,l(c,...d))}function s(c){o(null,c)}}const Pn={basename:Zj,dirname:Pj,extname:Jj,join:Wj,sep:"/"};function Zj(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');nu(t);let a=0,r=-1,o=t.length,s;if(l===void 0||l.length===0||l.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(s){a=o+1;break}}else r<0&&(s=!0,r=o+1);return r<0?"":t.slice(a,r)}if(l===t)return"";let c=-1,d=l.length-1;for(;o--;)if(t.codePointAt(o)===47){if(s){a=o+1;break}}else c<0&&(s=!0,c=o+1),d>-1&&(t.codePointAt(o)===l.codePointAt(d--)?d<0&&(r=o):(d=-1,r=c));return a===r?r=c:r<0&&(r=t.length),t.slice(a,r)}function Pj(t){if(nu(t),t.length===0)return".";let l=-1,a=t.length,r;for(;--a;)if(t.codePointAt(a)===47){if(r){l=a;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function Jj(t){nu(t);let l=t.length,a=-1,r=0,o=-1,s=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){r=l+1;break}continue}a<0&&(c=!0,a=l+1),d===46?o<0?o=l:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||a<0||s===0||s===1&&o===a-1&&o===r+1?"":t.slice(o,a)}function Wj(...t){let l=-1,a;for(;++l<t.length;)nu(t[l]),t[l]&&(a=a===void 0?t[l]:a+"/"+t[l]);return a===void 0?".":eA(a)}function eA(t){nu(t);const l=t.codePointAt(0)===47;let a=tA(t,!l);return a.length===0&&!l&&(a="."),a.length>0&&t.codePointAt(t.length-1)===47&&(a+="/"),l?"/"+a:a}function tA(t,l){let a="",r=0,o=-1,s=0,c=-1,d,p;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(a.length<2||r!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",r=0):(a=a.slice(0,p),r=a.length-1-a.lastIndexOf("/")),o=c,s=0;continue}}else if(a.length>0){a="",r=0,o=c,s=0;continue}}l&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+t.slice(o+1,c):a=t.slice(o+1,c),r=c-o-1;o=c,s=0}else d===46&&s>-1?s++:s=-1}return a}function nu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const nA={cwd:lA};function lA(){return"/"}function rd(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function iA(t){if(typeof t=="string")t=new URL(t);else if(!rd(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return aA(t)}function aA(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const l=t.pathname;let a=-1;for(;++a<l.length;)if(l.codePointAt(a)===37&&l.codePointAt(a+1)===50){const r=l.codePointAt(a+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(l)}const Rf=["history","path","basename","stem","extname","dirname"];class ab{constructor(l){let a;l?rd(l)?a={path:l}:typeof l=="string"||rA(l)?a={value:l}:a=l:a={},this.cwd="cwd"in a?"":nA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Rf.length;){const s=Rf[r];s in a&&a[s]!==void 0&&a[s]!==null&&(this[s]=s==="history"?[...a[s]]:a[s])}let o;for(o in a)Rf.includes(o)||(this[o]=a[o])}get basename(){return typeof this.path=="string"?Pn.basename(this.path):void 0}set basename(l){Nf(l,"basename"),zf(l,"basename"),this.path=Pn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Pn.dirname(this.path):void 0}set dirname(l){av(this.basename,"dirname"),this.path=Pn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Pn.extname(this.path):void 0}set extname(l){if(zf(l,"extname"),av(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){rd(l)&&(l=iA(l)),Nf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Pn.basename(this.path,this.extname):void 0}set stem(l){Nf(l,"stem"),zf(l,"stem"),this.path=Pn.join(this.dirname||"",l+(this.extname||""))}fail(l,a,r){const o=this.message(l,a,r);throw o.fatal=!0,o}info(l,a,r){const o=this.message(l,a,r);return o.fatal=void 0,o}message(l,a,r){const o=new Xt(l,a,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function zf(t,l){if(t&&t.includes(Pn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Pn.sep+"`")}function Nf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function av(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function rA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const uA=(function(t){const r=this.constructor.prototype,o=r[t],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),oA={}.hasOwnProperty;class Zd extends uA{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=$j()}copy(){const l=new Zd;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];l.use(...r)}return l.data(_f(!0,{},this.namespace)),l}data(l,a){return typeof l=="string"?arguments.length===2?(Mf("data",this.frozen),this.namespace[l]=a,this):oA.call(this.namespace,l)&&this.namespace[l]||void 0:l?(Mf("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=a.call(l,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const a=ko(l),r=this.parser||this.Parser;return Df("parse",r),r(String(a),a)}process(l,a){const r=this;return this.freeze(),Df("process",this.parser||this.Parser),Of("process",this.compiler||this.Compiler),a?o(void 0,a):new Promise(o);function o(s,c){const d=ko(l),p=r.parse(d);r.run(p,d,function(y,g,b){if(y||!g||!b)return m(y);const x=g,E=r.stringify(x,b);fA(E)?b.value=E:b.result=E,m(y,b)});function m(y,g){y||!g?c(y):s?s(g):a(void 0,g)}}}processSync(l){let a=!1,r;return this.freeze(),Df("processSync",this.parser||this.Parser),Of("processSync",this.compiler||this.Compiler),this.process(l,o),uv("processSync","process",a),r;function o(s,c){a=!0,lv(s),r=c}}run(l,a,r){rv(l),this.freeze();const o=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?s(void 0,r):new Promise(s);function s(c,d){const p=ko(a);o.run(l,p,m);function m(y,g,b){const x=g||l;y?d(y):c?c(x):r(void 0,x,b)}}}runSync(l,a){let r=!1,o;return this.run(l,a,s),uv("runSync","run",r),o;function s(c,d){lv(c),o=d,r=!0}}stringify(l,a){this.freeze();const r=ko(a),o=this.compiler||this.Compiler;return Of("stringify",o),rv(l),o(l,r)}use(l,...a){const r=this.attachers,o=this.namespace;if(Mf("use",this.frozen),l!=null)if(typeof l=="function")p(l,a);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...g]=m;p(y,g)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(m.plugins),m.settings&&(o.settings=_f(!0,o.settings,m.settings))}function d(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const g=m[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,y){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===m){b=g;break}if(b===-1)r.push([m,...y]);else if(y.length>0){let[x,...E]=y;const A=r[b][1];ad(A)&&ad(x)&&(x=_f(!0,A,x)),r[b]=[m,x,...E]}}}}const sA=new Zd().freeze();function Df(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Of(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Mf(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rv(t){if(!ad(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function uv(t,l,a){if(!a)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function ko(t){return cA(t)?t:new ab(t)}function cA(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function fA(t){return typeof t=="string"||dA(t)}function dA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const hA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ov=[],sv={allowDangerousHtml:!0},mA=/^(https?|ircs?|mailto|xmpp)$/i,pA=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function gA(t){const l=yA(t),a=vA(t);return bA(l.runSync(l.parse(a),a),t)}function yA(t){const l=t.rehypePlugins||ov,a=t.remarkPlugins||ov,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...sv}:sv;return sA().use(PT).use(a).use(Ij,r).use(l)}function vA(t){const l=t.children||"",a=new ab;return typeof l=="string"&&(a.value=l),a}function bA(t,l){const a=l.allowedElements,r=l.allowElement,o=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,p=l.urlTransform||xA;for(const y of pA)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+hA+y.id,void 0);return Kd(t,m),OC(t,{Fragment:S.Fragment,components:o,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function m(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return c?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let x;for(x in Cf)if(Object.hasOwn(Cf,x)&&Object.hasOwn(y.properties,x)){const E=y.properties[x],A=Cf[x];(A===null||A.includes(y.tagName))&&(y.properties[x]=p(String(E||""),x,y))}}if(y.type==="element"){let x=a?!a.includes(y.tagName):s?s.includes(y.tagName):!1;if(!x&&r&&typeof g=="number"&&(x=!r(y,g,b)),x&&b&&typeof g=="number")return d&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function xA(t){const l=t.indexOf(":"),a=t.indexOf("?"),r=t.indexOf("#"),o=t.indexOf("/");return l===-1||o!==-1&&l>o||a!==-1&&l>a||r!==-1&&l>r||mA.test(t.slice(0,l))?t:""}function cv(t,l){const a=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,o=a.indexOf(l);for(;o!==-1;)r++,o=a.indexOf(l,o+l.length);return r}function SA(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function EA(t,l,a){const o=ts((a||{}).ignore||[]),s=wA(l);let c=-1;for(;++c<s.length;)ib(t,"text",d);function d(m,y){let g=-1,b;for(;++g<y.length;){const x=y[g],E=b?b.children:void 0;if(o(x,E?E.indexOf(x):void 0,b))return;b=x}if(b)return p(m,y)}function p(m,y){const g=y[y.length-1],b=s[c][0],x=s[c][1];let E=0;const z=g.children.indexOf(m);let C=!1,j=[];b.lastIndex=0;let D=b.exec(m.value);for(;D;){const te=D.index,P={index:D.index,input:D.input,stack:[...y,m]};let H=x(...D,P);if(typeof H=="string"&&(H=H.length>0?{type:"text",value:H}:void 0),H===!1?b.lastIndex=te+1:(E!==te&&j.push({type:"text",value:m.value.slice(E,te)}),Array.isArray(H)?j.push(...H):H&&j.push(H),E=te+D[0].length,C=!0),!b.global)break;D=b.exec(m.value)}return C?(E<m.value.length&&j.push({type:"text",value:m.value.slice(E)}),g.children.splice(z,1,...j)):j=[m],z+j.length}}function wA(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<a.length;){const o=a[r];l.push([kA(o[0]),CA(o[1])])}return l}function kA(t){return typeof t=="string"?new RegExp(SA(t),"g"):t}function CA(t){return typeof t=="function"?t:function(){return t}}const Lf="phrasing",Uf=["autolink","link","image","label"];function TA(){return{transforms:[DA],enter:{literalAutolink:AA,literalAutolinkEmail:Bf,literalAutolinkHttp:Bf,literalAutolinkWww:Bf},exit:{literalAutolink:NA,literalAutolinkEmail:zA,literalAutolinkHttp:_A,literalAutolinkWww:RA}}}function jA(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Lf,notInConstruct:Uf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Lf,notInConstruct:Uf},{character:":",before:"[ps]",after:"\\/",inConstruct:Lf,notInConstruct:Uf}]}}function AA(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Bf(t){this.config.enter.autolinkProtocol.call(this,t)}function _A(t){this.config.exit.autolinkProtocol.call(this,t)}function RA(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function zA(t){this.config.exit.autolinkEmail.call(this,t)}function NA(t){this.exit(t)}function DA(t){EA(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,OA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),MA]],{ignore:["link","linkReference"]})}function OA(t,l,a,r,o){let s="";if(!rb(o)||(/^w/i.test(l)&&(a=l+a,l="",s="http://"),!LA(a)))return!1;const c=UA(a+r);if(!c[0])return!1;const d={type:"link",title:null,url:s+l+c[0],children:[{type:"text",value:l+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function MA(t,l,a,r){return!rb(r,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+a,children:[{type:"text",value:l+"@"+a}]}}function LA(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function UA(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let a=l[0],r=a.indexOf(")");const o=cv(t,"(");let s=cv(t,")");for(;r!==-1&&o>s;)t+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),s++;return[t,a]}function rb(t,l){const a=t.input.charCodeAt(t.index-1);return(t.index===0||qi(a)||Jo(a))&&(!l||a!==47)}ub.peek=QA;function BA(){this.buffer()}function HA(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function qA(){this.buffer()}function YA(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function GA(t){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=In(this.sliceSerialize(t)).toLowerCase(),a.label=l}function VA(t){this.exit(t)}function FA(t){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=In(this.sliceSerialize(t)).toLowerCase(),a.label=l}function IA(t){this.exit(t)}function QA(){return"["}function ub(t,l,a,r){const o=a.createTracker(r);let s=o.move("[^");const c=a.enter("footnoteReference"),d=a.enter("reference");return s+=o.move(a.safe(a.associationId(t),{after:"]",before:s})),d(),c(),s+=o.move("]"),s}function XA(){return{enter:{gfmFootnoteCallString:BA,gfmFootnoteCall:HA,gfmFootnoteDefinitionLabelString:qA,gfmFootnoteDefinition:YA},exit:{gfmFootnoteCallString:GA,gfmFootnoteCall:VA,gfmFootnoteDefinitionLabelString:FA,gfmFootnoteDefinition:IA}}}function $A(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:a,footnoteReference:ub},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,o,s,c){const d=s.createTracker(c);let p=d.move("[^");const m=s.enter("footnoteDefinition"),y=s.enter("label");return p+=d.move(s.safe(s.associationId(r),{before:p,after:"]"})),y(),p+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),p+=d.move((l?`
|
|
202
|
-
`:" ")+s.indentLines(s.containerFlow(r,d.current()),l?
|
|
203
|
-
`)}function
|
|
204
|
-
`&&
|
|
205
|
-
`}function
|
|
200
|
+
`}),a}function nv(t){let l=0,a=t.charCodeAt(l);for(;a===9||a===32;)l++,a=t.charCodeAt(l);return t.slice(l)}function lv(t,l){const a=Gj(t,l),r=a.one(t,void 0),o=zj(a),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
|
|
201
|
+
`},o),s}function Xj(t,l){return t&&"run"in t?async function(a,r){const o=lv(a,{file:r,...l});await t.run(o,r)}:function(a,r){return lv(a,{file:r,...t||l})}}function iv(t){if(t)throw t}var Af,av;function $j(){if(av)return Af;av=1;var t=Object.prototype.hasOwnProperty,l=Object.prototype.toString,a=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):l.call(m)==="[object Array]"},s=function(m){if(!m||l.call(m)!=="[object Object]")return!1;var y=t.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!g)return!1;var b;for(b in m);return typeof b>"u"||t.call(m,b)},c=function(m,y){a&&y.name==="__proto__"?a(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},d=function(m,y){if(y==="__proto__")if(t.call(m,y)){if(r)return r(m,y).value}else return;return m[y]};return Af=function p(){var m,y,g,b,S,E,j=arguments[0],N=1,C=arguments.length,A=!1;for(typeof j=="boolean"&&(A=j,j=arguments[1]||{},N=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});N<C;++N)if(m=arguments[N],m!=null)for(y in m)g=d(j,y),b=d(m,y),j!==b&&(A&&b&&(s(b)||(S=o(b)))?(S?(S=!1,E=g&&o(g)?g:[]):E=g&&s(g)?g:{},c(j,{name:y,newValue:p(A,E,b)})):typeof b<"u"&&c(j,{name:y,newValue:b}));return j},Af}var Kj=$j();const _f=md(Kj);function ad(t){if(typeof t!="object"||t===null)return!1;const l=Object.getPrototypeOf(t);return(l===null||l===Object.prototype||Object.getPrototypeOf(l)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Zj(){const t=[],l={run:a,use:r};return l;function a(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);d(null,...o);function d(p,...m){const y=t[++s];let g=-1;if(p){c(p);return}for(;++g<o.length;)(m[g]===null||m[g]===void 0)&&(m[g]=o[g]);o=m,y?Pj(y,d)(...m):c(null,...m)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),l}}function Pj(t,l){let a;return r;function r(...c){const d=t.length>c.length;let p;d&&c.push(o);try{p=t.apply(this,c)}catch(m){const y=m;if(d&&a)throw y;return o(y)}d||(p&&p.then&&typeof p.then=="function"?p.then(s,o):p instanceof Error?o(p):s(p))}function o(c,...d){a||(a=!0,l(c,...d))}function s(c){o(null,c)}}const Pn={basename:Jj,dirname:Wj,extname:eA,join:tA,sep:"/"};function Jj(t,l){if(l!==void 0&&typeof l!="string")throw new TypeError('"ext" argument must be a string');nu(t);let a=0,r=-1,o=t.length,s;if(l===void 0||l.length===0||l.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(s){a=o+1;break}}else r<0&&(s=!0,r=o+1);return r<0?"":t.slice(a,r)}if(l===t)return"";let c=-1,d=l.length-1;for(;o--;)if(t.codePointAt(o)===47){if(s){a=o+1;break}}else c<0&&(s=!0,c=o+1),d>-1&&(t.codePointAt(o)===l.codePointAt(d--)?d<0&&(r=o):(d=-1,r=c));return a===r?r=c:r<0&&(r=t.length),t.slice(a,r)}function Wj(t){if(nu(t),t.length===0)return".";let l=-1,a=t.length,r;for(;--a;)if(t.codePointAt(a)===47){if(r){l=a;break}}else r||(r=!0);return l<0?t.codePointAt(0)===47?"/":".":l===1&&t.codePointAt(0)===47?"//":t.slice(0,l)}function eA(t){nu(t);let l=t.length,a=-1,r=0,o=-1,s=0,c;for(;l--;){const d=t.codePointAt(l);if(d===47){if(c){r=l+1;break}continue}a<0&&(c=!0,a=l+1),d===46?o<0?o=l:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||a<0||s===0||s===1&&o===a-1&&o===r+1?"":t.slice(o,a)}function tA(...t){let l=-1,a;for(;++l<t.length;)nu(t[l]),t[l]&&(a=a===void 0?t[l]:a+"/"+t[l]);return a===void 0?".":nA(a)}function nA(t){nu(t);const l=t.codePointAt(0)===47;let a=lA(t,!l);return a.length===0&&!l&&(a="."),a.length>0&&t.codePointAt(t.length-1)===47&&(a+="/"),l?"/"+a:a}function lA(t,l){let a="",r=0,o=-1,s=0,c=-1,d,p;for(;++c<=t.length;){if(c<t.length)d=t.codePointAt(c);else{if(d===47)break;d=47}if(d===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(a.length<2||r!==2||a.codePointAt(a.length-1)!==46||a.codePointAt(a.length-2)!==46){if(a.length>2){if(p=a.lastIndexOf("/"),p!==a.length-1){p<0?(a="",r=0):(a=a.slice(0,p),r=a.length-1-a.lastIndexOf("/")),o=c,s=0;continue}}else if(a.length>0){a="",r=0,o=c,s=0;continue}}l&&(a=a.length>0?a+"/..":"..",r=2)}else a.length>0?a+="/"+t.slice(o+1,c):a=t.slice(o+1,c),r=c-o-1;o=c,s=0}else d===46&&s>-1?s++:s=-1}return a}function nu(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const iA={cwd:aA};function aA(){return"/"}function rd(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function rA(t){if(typeof t=="string")t=new URL(t);else if(!rd(t)){const l=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw l.code="ERR_INVALID_ARG_TYPE",l}if(t.protocol!=="file:"){const l=new TypeError("The URL must be of scheme file");throw l.code="ERR_INVALID_URL_SCHEME",l}return uA(t)}function uA(t){if(t.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const l=t.pathname;let a=-1;for(;++a<l.length;)if(l.codePointAt(a)===37&&l.codePointAt(a+1)===50){const r=l.codePointAt(a+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(l)}const Rf=["history","path","basename","stem","extname","dirname"];class ib{constructor(l){let a;l?rd(l)?a={path:l}:typeof l=="string"||oA(l)?a={value:l}:a=l:a={},this.cwd="cwd"in a?"":iA.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Rf.length;){const s=Rf[r];s in a&&a[s]!==void 0&&a[s]!==null&&(this[s]=s==="history"?[...a[s]]:a[s])}let o;for(o in a)Rf.includes(o)||(this[o]=a[o])}get basename(){return typeof this.path=="string"?Pn.basename(this.path):void 0}set basename(l){zf(l,"basename"),Nf(l,"basename"),this.path=Pn.join(this.dirname||"",l)}get dirname(){return typeof this.path=="string"?Pn.dirname(this.path):void 0}set dirname(l){rv(this.basename,"dirname"),this.path=Pn.join(l||"",this.basename)}get extname(){return typeof this.path=="string"?Pn.extname(this.path):void 0}set extname(l){if(Nf(l,"extname"),rv(this.dirname,"extname"),l){if(l.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(l.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Pn.join(this.dirname,this.stem+(l||""))}get path(){return this.history[this.history.length-1]}set path(l){rd(l)&&(l=rA(l)),zf(l,"path"),this.path!==l&&this.history.push(l)}get stem(){return typeof this.path=="string"?Pn.basename(this.path,this.extname):void 0}set stem(l){zf(l,"stem"),Nf(l,"stem"),this.path=Pn.join(this.dirname||"",l+(this.extname||""))}fail(l,a,r){const o=this.message(l,a,r);throw o.fatal=!0,o}info(l,a,r){const o=this.message(l,a,r);return o.fatal=void 0,o}message(l,a,r){const o=new Xt(l,a,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(l){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(l||void 0).decode(this.value)}}function Nf(t,l){if(t&&t.includes(Pn.sep))throw new Error("`"+l+"` cannot be a path: did not expect `"+Pn.sep+"`")}function zf(t,l){if(!t)throw new Error("`"+l+"` cannot be empty")}function rv(t,l){if(!t)throw new Error("Setting `"+l+"` requires `path` to be set too")}function oA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const sA=(function(t){const r=this.constructor.prototype,o=r[t],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),cA={}.hasOwnProperty;class Jd extends sA{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Zj()}copy(){const l=new Jd;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];l.use(...r)}return l.data(_f(!0,{},this.namespace)),l}data(l,a){return typeof l=="string"?arguments.length===2?(Mf("data",this.frozen),this.namespace[l]=a,this):cA.call(this.namespace,l)&&this.namespace[l]||void 0:l?(Mf("data",this.frozen),this.namespace=l,this):this.namespace}freeze(){if(this.frozen)return this;const l=this;for(;++this.freezeIndex<this.attachers.length;){const[a,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=a.call(l,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(l){this.freeze();const a=ko(l),r=this.parser||this.Parser;return Df("parse",r),r(String(a),a)}process(l,a){const r=this;return this.freeze(),Df("process",this.parser||this.Parser),Of("process",this.compiler||this.Compiler),a?o(void 0,a):new Promise(o);function o(s,c){const d=ko(l),p=r.parse(d);r.run(p,d,function(y,g,b){if(y||!g||!b)return m(y);const S=g,E=r.stringify(S,b);hA(E)?b.value=E:b.result=E,m(y,b)});function m(y,g){y||!g?c(y):s?s(g):a(void 0,g)}}}processSync(l){let a=!1,r;return this.freeze(),Df("processSync",this.parser||this.Parser),Of("processSync",this.compiler||this.Compiler),this.process(l,o),ov("processSync","process",a),r;function o(s,c){a=!0,iv(s),r=c}}run(l,a,r){uv(l),this.freeze();const o=this.transformers;return!r&&typeof a=="function"&&(r=a,a=void 0),r?s(void 0,r):new Promise(s);function s(c,d){const p=ko(a);o.run(l,p,m);function m(y,g,b){const S=g||l;y?d(y):c?c(S):r(void 0,S,b)}}}runSync(l,a){let r=!1,o;return this.run(l,a,s),ov("runSync","run",r),o;function s(c,d){iv(c),o=d,r=!0}}stringify(l,a){this.freeze();const r=ko(a),o=this.compiler||this.Compiler;return Of("stringify",o),uv(l),o(l,r)}use(l,...a){const r=this.attachers,o=this.namespace;if(Mf("use",this.frozen),l!=null)if(typeof l=="function")p(l,a);else if(typeof l=="object")Array.isArray(l)?d(l):c(l);else throw new TypeError("Expected usable value, not `"+l+"`");return this;function s(m){if(typeof m=="function")p(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[y,...g]=m;p(y,g)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(m.plugins),m.settings&&(o.settings=_f(!0,o.settings,m.settings))}function d(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const g=m[y];s(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function p(m,y){let g=-1,b=-1;for(;++g<r.length;)if(r[g][0]===m){b=g;break}if(b===-1)r.push([m,...y]);else if(y.length>0){let[S,...E]=y;const j=r[b][1];ad(j)&&ad(S)&&(S=_f(!0,j,S)),r[b]=[m,S,...E]}}}}const fA=new Jd().freeze();function Df(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Of(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Mf(t,l){if(l)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function uv(t){if(!ad(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function ov(t,l,a){if(!a)throw new Error("`"+t+"` finished async. Use `"+l+"` instead")}function ko(t){return dA(t)?t:new ib(t)}function dA(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function hA(t){return typeof t=="string"||mA(t)}function mA(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const pA="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",sv=[],cv={allowDangerousHtml:!0},gA=/^(https?|ircs?|mailto|xmpp)$/i,yA=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function vA(t){const l=bA(t),a=xA(t);return SA(l.runSync(l.parse(a),a),t)}function bA(t){const l=t.rehypePlugins||sv,a=t.remarkPlugins||sv,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...cv}:cv;return fA().use(WT).use(a).use(Xj,r).use(l)}function xA(t){const l=t.children||"",a=new ib;return typeof l=="string"&&(a.value=l),a}function SA(t,l){const a=l.allowedElements,r=l.allowElement,o=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,p=l.urlTransform||EA;for(const y of yA)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+pA+y.id,void 0);return Pd(t,m),LC(t,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function m(y,g,b){if(y.type==="raw"&&b&&typeof g=="number")return c?b.children.splice(g,1):b.children[g]={type:"text",value:y.value},g;if(y.type==="element"){let S;for(S in Cf)if(Object.hasOwn(Cf,S)&&Object.hasOwn(y.properties,S)){const E=y.properties[S],j=Cf[S];(j===null||j.includes(y.tagName))&&(y.properties[S]=p(String(E||""),S,y))}}if(y.type==="element"){let S=a?!a.includes(y.tagName):s?s.includes(y.tagName):!1;if(!S&&r&&typeof g=="number"&&(S=!r(y,g,b)),S&&b&&typeof g=="number")return d&&y.children?b.children.splice(g,1,...y.children):b.children.splice(g,1),g}}}function EA(t){const l=t.indexOf(":"),a=t.indexOf("?"),r=t.indexOf("#"),o=t.indexOf("/");return l===-1||o!==-1&&l>o||a!==-1&&l>a||r!==-1&&l>r||gA.test(t.slice(0,l))?t:""}function fv(t,l){const a=String(t);if(typeof l!="string")throw new TypeError("Expected character");let r=0,o=a.indexOf(l);for(;o!==-1;)r++,o=a.indexOf(l,o+l.length);return r}function wA(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function kA(t,l,a){const o=ts((a||{}).ignore||[]),s=CA(l);let c=-1;for(;++c<s.length;)lb(t,"text",d);function d(m,y){let g=-1,b;for(;++g<y.length;){const S=y[g],E=b?b.children:void 0;if(o(S,E?E.indexOf(S):void 0,b))return;b=S}if(b)return p(m,y)}function p(m,y){const g=y[y.length-1],b=s[c][0],S=s[c][1];let E=0;const N=g.children.indexOf(m);let C=!1,A=[];b.lastIndex=0;let D=b.exec(m.value);for(;D;){const te=D.index,P={index:D.index,input:D.input,stack:[...y,m]};let H=S(...D,P);if(typeof H=="string"&&(H=H.length>0?{type:"text",value:H}:void 0),H===!1?b.lastIndex=te+1:(E!==te&&A.push({type:"text",value:m.value.slice(E,te)}),Array.isArray(H)?A.push(...H):H&&A.push(H),E=te+D[0].length,C=!0),!b.global)break;D=b.exec(m.value)}return C?(E<m.value.length&&A.push({type:"text",value:m.value.slice(E)}),g.children.splice(N,1,...A)):A=[m],N+A.length}}function CA(t){const l=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const a=!t[0]||Array.isArray(t[0])?t:[t];let r=-1;for(;++r<a.length;){const o=a[r];l.push([TA(o[0]),jA(o[1])])}return l}function TA(t){return typeof t=="string"?new RegExp(wA(t),"g"):t}function jA(t){return typeof t=="function"?t:function(){return t}}const Lf="phrasing",Uf=["autolink","link","image","label"];function AA(){return{transforms:[MA],enter:{literalAutolink:RA,literalAutolinkEmail:Bf,literalAutolinkHttp:Bf,literalAutolinkWww:Bf},exit:{literalAutolink:OA,literalAutolinkEmail:DA,literalAutolinkHttp:NA,literalAutolinkWww:zA}}}function _A(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Lf,notInConstruct:Uf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Lf,notInConstruct:Uf},{character:":",before:"[ps]",after:"\\/",inConstruct:Lf,notInConstruct:Uf}]}}function RA(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Bf(t){this.config.enter.autolinkProtocol.call(this,t)}function NA(t){this.config.exit.autolinkProtocol.call(this,t)}function zA(t){this.config.exit.data.call(this,t);const l=this.stack[this.stack.length-1];l.type,l.url="http://"+this.sliceSerialize(t)}function DA(t){this.config.exit.autolinkEmail.call(this,t)}function OA(t){this.exit(t)}function MA(t){kA(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,LA],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),UA]],{ignore:["link","linkReference"]})}function LA(t,l,a,r,o){let s="";if(!ab(o)||(/^w/i.test(l)&&(a=l+a,l="",s="http://"),!BA(a)))return!1;const c=HA(a+r);if(!c[0])return!1;const d={type:"link",title:null,url:s+l+c[0],children:[{type:"text",value:l+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function UA(t,l,a,r){return!ab(r,!0)||/[-\d_]$/.test(a)?!1:{type:"link",title:null,url:"mailto:"+l+"@"+a,children:[{type:"text",value:l+"@"+a}]}}function BA(t){const l=t.split(".");return!(l.length<2||l[l.length-1]&&(/_/.test(l[l.length-1])||!/[a-zA-Z\d]/.test(l[l.length-1]))||l[l.length-2]&&(/_/.test(l[l.length-2])||!/[a-zA-Z\d]/.test(l[l.length-2])))}function HA(t){const l=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!l)return[t,void 0];t=t.slice(0,l.index);let a=l[0],r=a.indexOf(")");const o=fv(t,"(");let s=fv(t,")");for(;r!==-1&&o>s;)t+=a.slice(0,r+1),a=a.slice(r+1),r=a.indexOf(")"),s++;return[t,a]}function ab(t,l){const a=t.input.charCodeAt(t.index-1);return(t.index===0||qi(a)||Jo(a))&&(!l||a!==47)}rb.peek=$A;function qA(){this.buffer()}function YA(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function GA(){this.buffer()}function VA(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function FA(t){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=In(this.sliceSerialize(t)).toLowerCase(),a.label=l}function IA(t){this.exit(t)}function QA(t){const l=this.resume(),a=this.stack[this.stack.length-1];a.type,a.identifier=In(this.sliceSerialize(t)).toLowerCase(),a.label=l}function XA(t){this.exit(t)}function $A(){return"["}function rb(t,l,a,r){const o=a.createTracker(r);let s=o.move("[^");const c=a.enter("footnoteReference"),d=a.enter("reference");return s+=o.move(a.safe(a.associationId(t),{after:"]",before:s})),d(),c(),s+=o.move("]"),s}function KA(){return{enter:{gfmFootnoteCallString:qA,gfmFootnoteCall:YA,gfmFootnoteDefinitionLabelString:GA,gfmFootnoteDefinition:VA},exit:{gfmFootnoteCallString:FA,gfmFootnoteCall:IA,gfmFootnoteDefinitionLabelString:QA,gfmFootnoteDefinition:XA}}}function ZA(t){let l=!1;return t&&t.firstLineBlank&&(l=!0),{handlers:{footnoteDefinition:a,footnoteReference:rb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function a(r,o,s,c){const d=s.createTracker(c);let p=d.move("[^");const m=s.enter("footnoteDefinition"),y=s.enter("label");return p+=d.move(s.safe(s.associationId(r),{before:p,after:"]"})),y(),p+=d.move("]:"),r.children&&r.children.length>0&&(d.shift(4),p+=d.move((l?`
|
|
202
|
+
`:" ")+s.indentLines(s.containerFlow(r,d.current()),l?ub:PA))),m(),p}}function PA(t,l,a){return l===0?t:ub(t,l,a)}function ub(t,l,a){return(a?"":" ")+t}const JA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ob.peek=l_;function WA(){return{canContainEols:["delete"],enter:{strikethrough:t_},exit:{strikethrough:n_}}}function e_(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:JA}],handlers:{delete:ob}}}function t_(t){this.enter({type:"delete",children:[]},t)}function n_(t){this.exit(t)}function ob(t,l,a,r){const o=a.createTracker(r),s=a.enter("strikethrough");let c=o.move("~~");return c+=a.containerPhrasing(t,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),s(),c}function l_(){return"~"}function i_(t){return t.length}function a_(t,l){const a=l||{},r=(a.align||[]).concat(),o=a.stringLength||i_,s=[],c=[],d=[],p=[];let m=0,y=-1;for(;++y<t.length;){const j=[],N=[];let C=-1;for(t[y].length>m&&(m=t[y].length);++C<t[y].length;){const A=r_(t[y][C]);if(a.alignDelimiters!==!1){const D=o(A);N[C]=D,(p[C]===void 0||D>p[C])&&(p[C]=D)}j.push(A)}c[y]=j,d[y]=N}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<m;)s[g]=dv(r[g]);else{const j=dv(r);for(;++g<m;)s[g]=j}g=-1;const b=[],S=[];for(;++g<m;){const j=s[g];let N="",C="";j===99?(N=":",C=":"):j===108?N=":":j===114&&(C=":");let A=a.alignDelimiters===!1?1:Math.max(1,p[g]-N.length-C.length);const D=N+"-".repeat(A)+C;a.alignDelimiters!==!1&&(A=N.length+A+C.length,A>p[g]&&(p[g]=A),S[g]=A),b[g]=D}c.splice(1,0,b),d.splice(1,0,S),y=-1;const E=[];for(;++y<c.length;){const j=c[y],N=d[y];g=-1;const C=[];for(;++g<m;){const A=j[g]||"";let D="",te="";if(a.alignDelimiters!==!1){const P=p[g]-(N[g]||0),H=s[g];H===114?D=" ".repeat(P):H===99?P%2?(D=" ".repeat(P/2+.5),te=" ".repeat(P/2-.5)):(D=" ".repeat(P/2),te=D):te=" ".repeat(P)}a.delimiterStart!==!1&&!g&&C.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&A==="")&&(a.delimiterStart!==!1||g)&&C.push(" "),a.alignDelimiters!==!1&&C.push(D),C.push(A),a.alignDelimiters!==!1&&C.push(te),a.padding!==!1&&C.push(" "),(a.delimiterEnd!==!1||g!==m-1)&&C.push("|")}E.push(a.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return E.join(`
|
|
203
|
+
`)}function r_(t){return t==null?"":String(t)}function dv(t){const l=typeof t=="string"?t.codePointAt(0):0;return l===67||l===99?99:l===76||l===108?108:l===82||l===114?114:0}function u_(t,l,a,r){const o=a.enter("blockquote"),s=a.createTracker(r);s.move("> "),s.shift(2);const c=a.indentLines(a.containerFlow(t,s.current()),o_);return o(),c}function o_(t,l,a){return">"+(a?"":" ")+t}function s_(t,l){return hv(t,l.inConstruct,!0)&&!hv(t,l.notInConstruct,!1)}function hv(t,l,a){if(typeof l=="string"&&(l=[l]),!l||l.length===0)return a;let r=-1;for(;++r<l.length;)if(t.includes(l[r]))return!0;return!1}function mv(t,l,a,r){let o=-1;for(;++o<a.unsafe.length;)if(a.unsafe[o].character===`
|
|
204
|
+
`&&s_(a.stack,a.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
205
|
+
`}function c_(t,l){const a=String(t);let r=a.indexOf(l),o=r,s=0,c=0;if(typeof l!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===o?++s>c&&(c=s):s=1,o=r+l.length,r=a.indexOf(l,o);return c}function f_(t,l){return!!(l.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function d_(t){const l=t.options.fence||"`";if(l!=="`"&&l!=="~")throw new Error("Cannot serialize code with `"+l+"` for `options.fence`, expected `` ` `` or `~`");return l}function h_(t,l,a,r){const o=d_(a),s=t.value||"",c=o==="`"?"GraveAccent":"Tilde";if(f_(t,a)){const g=a.enter("codeIndented"),b=a.indentLines(s,m_);return g(),b}const d=a.createTracker(r),p=o.repeat(Math.max(c_(s,o)+1,3)),m=a.enter("codeFenced");let y=d.move(p);if(t.lang){const g=a.enter(`codeFencedLang${c}`);y+=d.move(a.safe(t.lang,{before:y,after:" ",encode:["`"],...d.current()})),g()}if(t.lang&&t.meta){const g=a.enter(`codeFencedMeta${c}`);y+=d.move(" "),y+=d.move(a.safe(t.meta,{before:y,after:`
|
|
206
206
|
`,encode:["`"],...d.current()})),g()}return y+=d.move(`
|
|
207
207
|
`),s&&(y+=d.move(s+`
|
|
208
|
-
`)),y+=d.move(p),m(),y}function
|
|
209
|
-
`,...p.current()}))),d(),t.title&&(d=a.enter(`title${s}`),m+=p.move(" "+o),m+=p.move(a.safe(t.title,{before:m,after:o,...p.current()})),m+=p.move(o),d()),c(),m}function
|
|
208
|
+
`)),y+=d.move(p),m(),y}function m_(t,l,a){return(a?"":" ")+t}function Wd(t){const l=t.options.quote||'"';if(l!=='"'&&l!=="'")throw new Error("Cannot serialize title with `"+l+"` for `options.quote`, expected `\"`, or `'`");return l}function p_(t,l,a,r){const o=Wd(a),s=o==='"'?"Quote":"Apostrophe",c=a.enter("definition");let d=a.enter("label");const p=a.createTracker(r);let m=p.move("[");return m+=p.move(a.safe(a.associationId(t),{before:m,after:"]",...p.current()})),m+=p.move("]: "),d(),!t.url||/[\0- \u007F]/.test(t.url)?(d=a.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(a.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=a.enter("destinationRaw"),m+=p.move(a.safe(t.url,{before:m,after:t.title?" ":`
|
|
209
|
+
`,...p.current()}))),d(),t.title&&(d=a.enter(`title${s}`),m+=p.move(" "+o),m+=p.move(a.safe(t.title,{before:m,after:o,...p.current()})),m+=p.move(o),d()),c(),m}function g_(t){const l=t.options.emphasis||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize emphasis with `"+l+"` for `options.emphasis`, expected `*`, or `_`");return l}function Xr(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Yo(t,l,a){const r=Da(t),o=Da(l);return r===void 0?o===void 0?a==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}sb.peek=y_;function sb(t,l,a,r){const o=g_(a),s=a.enter("emphasis"),c=a.createTracker(r),d=c.move(o);let p=c.move(a.containerPhrasing(t,{after:o,before:d,...c.current()}));const m=p.charCodeAt(0),y=Yo(r.before.charCodeAt(r.before.length-1),m,o);y.inside&&(p=Xr(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=Yo(r.after.charCodeAt(0),g,o);b.inside&&(p=p.slice(0,-1)+Xr(g));const S=c.move(o);return s(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function y_(t,l,a){return a.options.emphasis||"*"}function v_(t,l){let a=!1;return Pd(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,ld}),!!((!t.depth||t.depth<3)&&Fd(t)&&(l.options.setext||a))}function b_(t,l,a,r){const o=Math.max(Math.min(6,t.depth||1),1),s=a.createTracker(r);if(v_(t,a)){const y=a.enter("headingSetext"),g=a.enter("phrasing"),b=a.containerPhrasing(t,{...s.current(),before:`
|
|
210
210
|
`,after:`
|
|
211
211
|
`});return g(),y(),b+`
|
|
212
212
|
`+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
213
213
|
`))+1))}const c="#".repeat(o),d=a.enter("headingAtx"),p=a.enter("phrasing");s.move(c+" ");let m=a.containerPhrasing(t,{before:"# ",after:`
|
|
214
|
-
`,...s.current()});return/^[\t ]/.test(m)&&(m=
|
|
215
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:p,tableRow:d}};function c(
|
|
216
|
-
`))}function p(x,E,A,z){const C=A.enter("tableCell"),j=A.enter("phrasing"),D=A.containerPhrasing(x,{...z,before:s,after:s});return j(),C(),D}function m(x,E){return l_(x,{align:E,alignDelimiters:r,padding:a,stringLength:o})}function y(x,E,A){const z=x.children;let C=-1;const j=[],D=E.enter("table");for(;++C<z.length;)j[C]=g(z[C],E,A);return D(),j}function g(x,E,A){const z=x.children;let C=-1;const j=[],D=E.enter("tableRow");for(;++C<z.length;)j[C]=p(z[C],x,E,A);return D(),j}function b(x,E,A){let z=xb.inlineCode(x,E,A);return A.stack.includes("tableCell")&&(z=z.replace(/\|/g,"\\$&")),z}}function F_(){return{exit:{taskListCheckValueChecked:pv,taskListCheckValueUnchecked:pv,paragraph:Q_}}}function I_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:X_}}}function pv(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function Q_(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const r=a.children[0];if(r&&r.type==="text"){const o=l.children;let s=-1,c;for(;++s<o.length;){const d=o[s];if(d.type==="paragraph"){c=d;break}}c===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function X_(t,l,a,r){const o=t.children[0],s=typeof t.checked=="boolean"&&o&&o.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=a.createTracker(r);s&&d.move(c);let p=xb.listItem(t,l,a,{...r,...d.current()});return s&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(y){return y+c}}function $_(){return[TA(),XA(),PA(),U_(),F_()]}function K_(t){return{extensions:[jA(),$A(t),JA(),V_(t),I_()]}}const Z_={tokenize:nR,partial:!0},Sb={tokenize:lR,partial:!0},Eb={tokenize:iR,partial:!0},wb={tokenize:aR,partial:!0},P_={tokenize:rR,partial:!0},kb={name:"wwwAutolink",tokenize:eR,previous:Tb},Cb={name:"protocolAutolink",tokenize:tR,previous:jb},_l={name:"emailAutolink",tokenize:W_,previous:Ab},nl={};function J_(){return{text:nl}}let Bi=48;for(;Bi<123;)nl[Bi]=_l,Bi++,Bi===58?Bi=65:Bi===91&&(Bi=97);nl[43]=_l;nl[45]=_l;nl[46]=_l;nl[95]=_l;nl[72]=[_l,Cb];nl[104]=[_l,Cb];nl[87]=[_l,kb];nl[119]=[_l,kb];function W_(t,l,a){const r=this;let o,s;return c;function c(g){return!ud(g)||!Ab.call(r,r.previous)||Wd(r.events)?a(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(g))}function d(g){return ud(g)?(t.consume(g),d):g===64?(t.consume(g),p):a(g)}function p(g){return g===46?t.check(P_,y,m)(g):g===45||g===95||It(g)?(s=!0,t.consume(g),p):y(g)}function m(g){return t.consume(g),o=!0,p}function y(g){return s&&o&&Zt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(g)):a(g)}}function eR(t,l,a){const r=this;return o;function o(c){return c!==87&&c!==119||!Tb.call(r,r.previous)||Wd(r.events)?a(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Z_,t.attempt(Sb,t.attempt(Eb,s),a),a)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function tR(t,l,a){const r=this;let o="",s=!1;return c;function c(g){return(g===72||g===104)&&jb.call(r,r.previous)&&!Wd(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),t.consume(g),d):a(g)}function d(g){if(Zt(g)&&o.length<5)return o+=String.fromCodePoint(g),t.consume(g),d;if(g===58){const b=o.toLowerCase();if(b==="http"||b==="https")return t.consume(g),p}return a(g)}function p(g){return g===47?(t.consume(g),s?m:(s=!0,p)):a(g)}function m(g){return g===null||Bo(g)||st(g)||qi(g)||Jo(g)?a(g):t.attempt(Sb,t.attempt(Eb,y),a)(g)}function y(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(g)}}function nR(t,l,a){let r=0;return o;function o(c){return(c===87||c===119)&&r<3?(r++,t.consume(c),o):c===46&&r===3?(t.consume(c),s):a(c)}function s(c){return c===null?a(c):l(c)}}function lR(t,l,a){let r,o,s;return c;function c(m){return m===46||m===95?t.check(wb,p,d)(m):m===null||st(m)||qi(m)||m!==45&&Jo(m)?p(m):(s=!0,t.consume(m),c)}function d(m){return m===95?r=!0:(o=r,r=void 0),t.consume(m),c}function p(m){return o||r||!s?a(m):l(m)}}function iR(t,l){let a=0,r=0;return o;function o(c){return c===40?(a++,t.consume(c),o):c===41&&r<a?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(wb,l,s)(c):c===null||st(c)||qi(c)?l(c):(t.consume(c),o)}function s(c){return c===41&&r++,t.consume(c),o}}function aR(t,l,a){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),r):d===38?(t.consume(d),s):d===93?(t.consume(d),o):d===60||d===null||st(d)||qi(d)?l(d):a(d)}function o(d){return d===null||d===40||d===91||st(d)||qi(d)?l(d):r(d)}function s(d){return Zt(d)?c(d):a(d)}function c(d){return d===59?(t.consume(d),r):Zt(d)?(t.consume(d),c):a(d)}}function rR(t,l,a){return r;function r(s){return t.consume(s),o}function o(s){return It(s)?a(s):l(s)}}function Tb(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||st(t)}function jb(t){return!Zt(t)}function Ab(t){return!(t===47||ud(t))}function ud(t){return t===43||t===45||t===46||t===95||It(t)}function Wd(t){let l=t.length,a=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return t.length>0&&!a&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const uR={tokenize:pR,partial:!0};function oR(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dR,continuation:{tokenize:hR},exit:mR}},text:{91:{name:"gfmFootnoteCall",tokenize:fR},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:sR,resolveTo:cR}}}}function sR(t,l,a){const r=this;let o=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;o--;){const p=r.events[o][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return d;function d(p){if(!c||!c._balanced)return a(p);const m=In(r.sliceSerialize({start:c.end,end:r.now()}));return m.codePointAt(0)!==94||!s.includes(m.slice(1))?a(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function cR(t,l){let a=t.length;for(;a--;)if(t[a][1].type==="labelImage"&&t[a][0]==="enter"){t[a][1];break}t[a+1][1].type="data",t[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[a+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[a+3][1].end),end:Object.assign({},t[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[t[a+1],t[a+2],["enter",r,l],t[a+3],t[a+4],["enter",o,l],["exit",o,l],["enter",s,l],["enter",c,l],["exit",c,l],["exit",s,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(a,t.length-a+1,...d),t}function fR(t,l,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,c;return d;function d(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?a(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(g){if(s>999||g===93&&!c||g===null||g===91||st(g))return a(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return o.includes(In(r.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):a(g)}return st(g)||(c=!0),s++,t.consume(g),g===92?y:m}function y(g){return g===91||g===92||g===93?(t.consume(g),s++,m):m(g)}}function dR(t,l,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,c=0,d;return p;function p(E){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(E){return E===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):a(E)}function y(E){if(c>999||E===93&&!d||E===null||E===91||st(E))return a(E);if(E===93){t.exit("chunkString");const A=t.exit("gfmFootnoteDefinitionLabelString");return s=In(r.sliceSerialize(A)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return st(E)||(d=!0),c++,t.consume(E),E===92?g:y}function g(E){return E===91||E===92||E===93?(t.consume(E),c++,y):y(E)}function b(E){return E===58?(t.enter("definitionMarker"),t.consume(E),t.exit("definitionMarker"),o.includes(s)||o.push(s),Ze(t,x,"gfmFootnoteDefinitionWhitespace")):a(E)}function x(E){return l(E)}}function hR(t,l,a){return t.check(tu,l,t.attempt(uR,l,a))}function mR(t){t.exit("gfmFootnoteDefinition")}function pR(t,l,a){const r=this;return Ze(t,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?l(s):a(s)}}function gR(t){let a=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:o};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(c,d){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},b=[["enter",y,d],["enter",c[m][1],d],["exit",c[m][1],d],["enter",g,d]],x=d.parser.constructs.insideSpan.null;x&&xn(b,b.length,0,Wo(x,c.slice(m+1,p),d)),xn(b,b.length,0,[["exit",g,d],["enter",c[p][1],d],["exit",c[p][1],d],["exit",y,d]]),xn(c,m-1,p-m+3,b),p=m+b.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function s(c,d,p){const m=this.previous,y=this.events;let g=0;return b;function b(E){return m===126&&y[y.length-1][1].type!=="characterEscape"?p(E):(c.enter("strikethroughSequenceTemporary"),x(E))}function x(E){const A=Na(m);if(E===126)return g>1?p(E):(c.consume(E),g++,x);if(g<2&&!a)return p(E);const z=c.exit("strikethroughSequenceTemporary"),C=Na(E);return z._open=!C||C===2&&!!A,z._close=!A||A===2&&!!C,d(E)}}}class yR{constructor(){this.map=[]}add(l,a,r){vR(this,l,a,r)}consume(l){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let a=this.map.length;const r=[];for(;a>0;)a-=1,r.push(l.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),l.length=this.map[a][0];r.push(l.slice()),l.length=0;let o=r.pop();for(;o;){for(const s of o)l.push(s);o=r.pop()}this.map.length=0}}function vR(t,l,a,r){let o=0;if(!(a===0&&r.length===0)){for(;o<t.map.length;){if(t.map[o][0]===l){t.map[o][1]+=a,t.map[o][2].push(...r);return}o+=1}t.map.push([l,a,r])}}function bR(t,l){let a=!1;const r=[];for(;l<t.length;){const o=t[l];if(a){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(a=!0);l+=1}return r}function xR(){return{flow:{null:{name:"table",tokenize:SR,resolveAll:ER}}}}function SR(t,l,a){const r=this;let o=0,s=0,c;return d;function d(R){let V=r.events.length-1;for(;V>-1;){const le=r.events[V][1].type;if(le==="lineEnding"||le==="linePrefix")V--;else break}const G=V>-1?r.events[V][1].type:null,F=G==="tableHead"||G==="tableRow"?H:p;return F===H&&r.parser.lazy[r.now().line]?a(R):F(R)}function p(R){return t.enter("tableHead"),t.enter("tableRow"),m(R)}function m(R){return R===124||(c=!0,s+=1),y(R)}function y(R){return R===null?a(R):_e(R)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),x):a(R):Ye(R)?Ze(t,y,"whitespace")(R):(s+=1,c&&(c=!1,o+=1),R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),g(R)))}function g(R){return R===null||R===124||st(R)?(t.exit("data"),y(R)):(t.consume(R),R===92?b:g)}function b(R){return R===92||R===124?(t.consume(R),g):g(R)}function x(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(R):(t.enter("tableDelimiterRow"),c=!1,Ye(R)?Ze(t,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):E(R))}function E(R){return R===45||R===58?z(R):R===124?(c=!0,t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),A):P(R)}function A(R){return Ye(R)?Ze(t,z,"whitespace")(R):z(R)}function z(R){return R===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),C):R===45?(s+=1,C(R)):R===null||_e(R)?te(R):P(R)}function C(R){return R===45?(t.enter("tableDelimiterFiller"),j(R)):P(R)}function j(R){return R===45?(t.consume(R),j):R===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),D):(t.exit("tableDelimiterFiller"),D(R))}function D(R){return Ye(R)?Ze(t,te,"whitespace")(R):te(R)}function te(R){return R===124?E(R):R===null||_e(R)?!c||o!==s?P(R):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(R)):P(R)}function P(R){return a(R)}function H(R){return t.enter("tableRow"),_(R)}function _(R){return R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),_):R===null||_e(R)?(t.exit("tableRow"),l(R)):Ye(R)?Ze(t,_,"whitespace")(R):(t.enter("data"),ne(R))}function ne(R){return R===null||R===124||st(R)?(t.exit("data"),_(R)):(t.consume(R),R===92?J:ne)}function J(R){return R===92||R===124?(t.consume(R),ne):ne(R)}}function ER(t,l){let a=-1,r=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],d=!1,p=0,m,y,g;const b=new yR;for(;++a<t.length;){const x=t[a],E=x[1];x[0]==="enter"?E.type==="tableHead"?(d=!1,p!==0&&(gv(b,l,p,m,y),y=void 0,p=0),m={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(a,0,[["enter",m,l]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],c=[0,a+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(a,0,[["enter",y,l]])),o=E.type==="tableDelimiterRow"?2:y?3:1):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=Co(b,l,s,o,void 0,g),s=[0,0,0,0]),c[2]=a)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(c[0]=c[1],g=Co(b,l,s,o,void 0,g)),s=c,c=[s[1],a,0,0])):E.type==="tableHead"?(d=!0,p=a):E.type==="tableRow"||E.type==="tableDelimiterRow"?(p=a,s[1]!==0?(c[0]=c[1],g=Co(b,l,s,o,a,g)):c[1]!==0&&(g=Co(b,l,c,o,a,g)),o=0):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=a)}for(p!==0&&gv(b,l,p,m,y),b.consume(l.events),a=-1;++a<l.events.length;){const x=l.events[a];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=bR(l.events,a))}return t}function Co(t,l,a,r,o,s){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";a[0]!==0&&(s.end=Object.assign({},ja(l.events,a[0])),t.add(a[0],0,[["exit",s,l]]));const p=ja(l.events,a[1]);if(s={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(a[1],0,[["enter",s,l]]),a[2]!==0){const m=ja(l.events,a[2]),y=ja(l.events,a[3]),g={type:d,start:Object.assign({},m),end:Object.assign({},y)};if(t.add(a[2],0,[["enter",g,l]]),r!==2){const b=l.events[a[2]],x=l.events[a[3]];if(b[1].end=Object.assign({},x[1].end),b[1].type="chunkText",b[1].contentType="text",a[3]>a[2]+1){const E=a[2]+1,A=a[3]-a[2]-1;t.add(E,A,[])}}t.add(a[3]+1,0,[["exit",g,l]])}return o!==void 0&&(s.end=Object.assign({},ja(l.events,o)),t.add(o,0,[["exit",s,l]]),s=void 0),s}function gv(t,l,a,r,o){const s=[],c=ja(l.events,a);o&&(o.end=Object.assign({},c),s.push(["exit",o,l])),r.end=Object.assign({},c),s.push(["exit",r,l]),t.add(a+1,0,s)}function ja(t,l){const a=t[l],r=a[0]==="enter"?"start":"end";return a[1][r]}const wR={name:"tasklistCheck",tokenize:CR};function kR(){return{text:{91:wR}}}function CR(t,l,a){const r=this;return o;function o(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),s)}function s(p){return st(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):a(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):a(p)}function d(p){return _e(p)?l(p):Ye(p)?t.check({tokenize:TR},l,a)(p):a(p)}}function TR(t,l,a){return Ze(t,r,"whitespace");function r(o){return o===null?a(o):l(o)}}function jR(t){return H0([J_(),oR(),gR(t),xR(),kR()])}const AR={};function _R(t){const l=this,a=t||AR,r=l.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(jR(a)),s.push($_()),c.push(K_(a))}const od=new Set(["<",">","{","}","[","]"]),RR=new Set(["for","do","while","if","else","return","function","var","let","const","true","false","undefined","this","new","delete","typeof","in","instanceof","void","break","continue","switch","case","default","throw","try","catch","finally","debugger","with","yield","async","await","class","extends","super","import","export","from","static"]),_b=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...od]),zR={keywords:RR,onCommentStart:Db,onCommentEnd:qR},eh=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[qf,NR,ai,DR,Yf,OR,MR,Tl,yv,sd,vv]=eh.map((t,l)=>l);function To(t){return/^[^\S\r\n]+$/g.test(t)}function LR(t){return _b.has(t)}function UR(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Go(t){return/^[\w_]+$/.test(t)||Rb(t)}function BR(t){const l=t[0];return Go(l)&&l===l.toUpperCase()||t==="null"}function Rb(t){return/[^\u0000-\u007f]/.test(t)}function zb(t){return/^[a-zA-Z]$/.test(t)}function Nb(t){return zb(t)||Rb(t)}function jo(t){return Nb(t[0])&&(t.length===1||Go(t.slice(1)))}function cd(t){return t==="`"}function fd(t){return t==='"'||t==="'"}function HR(t){return fd(t)||cd(t)}function Db(t,l){const a=t+l;return a==="/*"?2:a==="//"?1:0}function qR(t,l){return t+l==="*/"?2:l===`
|
|
217
|
-
`?1:0}function
|
|
218
|
-
`;if(
|
|
219
|
-
`;let De=!1;for(;!be();G++)if(t[G]==="/"&&t[G-1]!=="\\"){for(De=!0;ce!==G&&/^[a-z]$/.test(t[G+1])&&!be();)G++;break}
|
|
220
|
-
`?F===" "&&(To(s)||!s||L)?(s+=F
|
|
214
|
+
`,...s.current()});return/^[\t ]/.test(m)&&(m=Xr(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,a.options.closeAtx&&(m+=" "+c),p(),d(),m}cb.peek=x_;function cb(t){return t.value||""}function x_(){return"<"}fb.peek=S_;function fb(t,l,a,r){const o=Wd(a),s=o==='"'?"Quote":"Apostrophe",c=a.enter("image");let d=a.enter("label");const p=a.createTracker(r);let m=p.move("![");return m+=p.move(a.safe(t.alt,{before:m,after:"]",...p.current()})),m+=p.move("]("),d(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(d=a.enter("destinationLiteral"),m+=p.move("<"),m+=p.move(a.safe(t.url,{before:m,after:">",...p.current()})),m+=p.move(">")):(d=a.enter("destinationRaw"),m+=p.move(a.safe(t.url,{before:m,after:t.title?" ":")",...p.current()}))),d(),t.title&&(d=a.enter(`title${s}`),m+=p.move(" "+o),m+=p.move(a.safe(t.title,{before:m,after:o,...p.current()})),m+=p.move(o),d()),m+=p.move(")"),c(),m}function S_(){return"!"}db.peek=E_;function db(t,l,a,r){const o=t.referenceType,s=a.enter("imageReference");let c=a.enter("label");const d=a.createTracker(r);let p=d.move("![");const m=a.safe(t.alt,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const y=a.stack;a.stack=[],c=a.enter("reference");const g=a.safe(a.associationId(t),{before:p,after:"]",...d.current()});return c(),a.stack=y,s(),o==="full"||!m||m!==g?p+=d.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function E_(){return"!"}hb.peek=w_;function hb(t,l,a){let r=t.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<a.unsafe.length;){const c=a.unsafe[s],d=a.compilePattern(c);let p;if(c.atBreak)for(;p=d.exec(r);){let m=p.index;r.charCodeAt(m)===10&&r.charCodeAt(m-1)===13&&m--,r=r.slice(0,m)+" "+r.slice(p.index+1)}}return o+r+o}function w_(){return"`"}function mb(t,l){const a=Fd(t);return!!(!l.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(a===t.url||"mailto:"+a===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}pb.peek=k_;function pb(t,l,a,r){const o=Wd(a),s=o==='"'?"Quote":"Apostrophe",c=a.createTracker(r);let d,p;if(mb(t,a)){const y=a.stack;a.stack=[],d=a.enter("autolink");let g=c.move("<");return g+=c.move(a.containerPhrasing(t,{before:g,after:">",...c.current()})),g+=c.move(">"),d(),a.stack=y,g}d=a.enter("link"),p=a.enter("label");let m=c.move("[");return m+=c.move(a.containerPhrasing(t,{before:m,after:"](",...c.current()})),m+=c.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=a.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(a.safe(t.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(p=a.enter("destinationRaw"),m+=c.move(a.safe(t.url,{before:m,after:t.title?" ":")",...c.current()}))),p(),t.title&&(p=a.enter(`title${s}`),m+=c.move(" "+o),m+=c.move(a.safe(t.title,{before:m,after:o,...c.current()})),m+=c.move(o),p()),m+=c.move(")"),d(),m}function k_(t,l,a){return mb(t,a)?"<":"["}gb.peek=C_;function gb(t,l,a,r){const o=t.referenceType,s=a.enter("linkReference");let c=a.enter("label");const d=a.createTracker(r);let p=d.move("[");const m=a.containerPhrasing(t,{before:p,after:"]",...d.current()});p+=d.move(m+"]["),c();const y=a.stack;a.stack=[],c=a.enter("reference");const g=a.safe(a.associationId(t),{before:p,after:"]",...d.current()});return c(),a.stack=y,s(),o==="full"||!m||m!==g?p+=d.move(g+"]"):o==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function C_(){return"["}function eh(t){const l=t.options.bullet||"*";if(l!=="*"&&l!=="+"&&l!=="-")throw new Error("Cannot serialize items with `"+l+"` for `options.bullet`, expected `*`, `+`, or `-`");return l}function T_(t){const l=eh(t),a=t.options.bulletOther;if(!a)return l==="*"?"-":"*";if(a!=="*"&&a!=="+"&&a!=="-")throw new Error("Cannot serialize items with `"+a+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(a===l)throw new Error("Expected `bullet` (`"+l+"`) and `bulletOther` (`"+a+"`) to be different");return a}function j_(t){const l=t.options.bulletOrdered||".";if(l!=="."&&l!==")")throw new Error("Cannot serialize items with `"+l+"` for `options.bulletOrdered`, expected `.` or `)`");return l}function yb(t){const l=t.options.rule||"*";if(l!=="*"&&l!=="-"&&l!=="_")throw new Error("Cannot serialize rules with `"+l+"` for `options.rule`, expected `*`, `-`, or `_`");return l}function A_(t,l,a,r){const o=a.enter("list"),s=a.bulletCurrent;let c=t.ordered?j_(a):eh(a);const d=t.ordered?c==="."?")":".":T_(a);let p=l&&a.bulletLastUsed?c===a.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((c==="*"||c==="-")&&y&&(!y.children||!y.children[0])&&a.stack[a.stack.length-1]==="list"&&a.stack[a.stack.length-2]==="listItem"&&a.stack[a.stack.length-3]==="list"&&a.stack[a.stack.length-4]==="listItem"&&a.indexStack[a.indexStack.length-1]===0&&a.indexStack[a.indexStack.length-2]===0&&a.indexStack[a.indexStack.length-3]===0&&(p=!0),yb(a)===c&&y){let g=-1;for(;++g<t.children.length;){const b=t.children[g];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){p=!0;break}}}}p&&(c=d),a.bulletCurrent=c;const m=a.containerFlow(t,r);return a.bulletLastUsed=c,a.bulletCurrent=s,o(),m}function __(t){const l=t.options.listItemIndent||"one";if(l!=="tab"&&l!=="one"&&l!=="mixed")throw new Error("Cannot serialize items with `"+l+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return l}function R_(t,l,a,r){const o=__(a);let s=a.bulletCurrent||eh(a);l&&l.type==="list"&&l.ordered&&(s=(typeof l.start=="number"&&l.start>-1?l.start:1)+(a.options.incrementListMarker===!1?0:l.children.indexOf(t))+s);let c=s.length+1;(o==="tab"||o==="mixed"&&(l&&l.type==="list"&&l.spread||t.spread))&&(c=Math.ceil(c/4)*4);const d=a.createTracker(r);d.move(s+" ".repeat(c-s.length)),d.shift(c);const p=a.enter("listItem"),m=a.indentLines(a.containerFlow(t,d.current()),y);return p(),m;function y(g,b,S){return b?(S?"":" ".repeat(c))+g:(S?s:s+" ".repeat(c-s.length))+g}}function N_(t,l,a,r){const o=a.enter("paragraph"),s=a.enter("phrasing"),c=a.containerPhrasing(t,r);return s(),o(),c}const z_=ts(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function D_(t,l,a,r){return(t.children.some(function(c){return z_(c)})?a.containerPhrasing:a.containerFlow).call(a,t,r)}function O_(t){const l=t.options.strong||"*";if(l!=="*"&&l!=="_")throw new Error("Cannot serialize strong with `"+l+"` for `options.strong`, expected `*`, or `_`");return l}vb.peek=M_;function vb(t,l,a,r){const o=O_(a),s=a.enter("strong"),c=a.createTracker(r),d=c.move(o+o);let p=c.move(a.containerPhrasing(t,{after:o,before:d,...c.current()}));const m=p.charCodeAt(0),y=Yo(r.before.charCodeAt(r.before.length-1),m,o);y.inside&&(p=Xr(m)+p.slice(1));const g=p.charCodeAt(p.length-1),b=Yo(r.after.charCodeAt(0),g,o);b.inside&&(p=p.slice(0,-1)+Xr(g));const S=c.move(o+o);return s(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+S}function M_(t,l,a){return a.options.strong||"*"}function L_(t,l,a,r){return a.safe(t.value,r)}function U_(t){const l=t.options.ruleRepetition||3;if(l<3)throw new Error("Cannot serialize rules with repetition `"+l+"` for `options.ruleRepetition`, expected `3` or more");return l}function B_(t,l,a){const r=(yb(a)+(a.options.ruleSpaces?" ":"")).repeat(U_(a));return a.options.ruleSpaces?r.slice(0,-1):r}const bb={blockquote:u_,break:mv,code:h_,definition:p_,emphasis:sb,hardBreak:mv,heading:b_,html:cb,image:fb,imageReference:db,inlineCode:hb,link:pb,linkReference:gb,list:A_,listItem:R_,paragraph:N_,root:D_,strong:vb,text:L_,thematicBreak:B_};function H_(){return{enter:{table:q_,tableData:pv,tableHeader:pv,tableRow:G_},exit:{codeText:V_,table:Y_,tableData:Hf,tableHeader:Hf,tableRow:Hf}}}function q_(t){const l=t._align;this.enter({type:"table",align:l.map(function(a){return a==="none"?null:a}),children:[]},t),this.data.inTable=!0}function Y_(t){this.exit(t),this.data.inTable=void 0}function G_(t){this.enter({type:"tableRow",children:[]},t)}function Hf(t){this.exit(t)}function pv(t){this.enter({type:"tableCell",children:[]},t)}function V_(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,F_));const a=this.stack[this.stack.length-1];a.type,a.value=l,this.exit(t)}function F_(t,l){return l==="|"?l:t}function I_(t){const l=t||{},a=l.tableCellPadding,r=l.tablePipeAlign,o=l.stringLength,s=a?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
215
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:p,tableRow:d}};function c(S,E,j,N){return m(y(S,j,N),S.align)}function d(S,E,j,N){const C=g(S,j,N),A=m([C]);return A.slice(0,A.indexOf(`
|
|
216
|
+
`))}function p(S,E,j,N){const C=j.enter("tableCell"),A=j.enter("phrasing"),D=j.containerPhrasing(S,{...N,before:s,after:s});return A(),C(),D}function m(S,E){return a_(S,{align:E,alignDelimiters:r,padding:a,stringLength:o})}function y(S,E,j){const N=S.children;let C=-1;const A=[],D=E.enter("table");for(;++C<N.length;)A[C]=g(N[C],E,j);return D(),A}function g(S,E,j){const N=S.children;let C=-1;const A=[],D=E.enter("tableRow");for(;++C<N.length;)A[C]=p(N[C],S,E,j);return D(),A}function b(S,E,j){let N=bb.inlineCode(S,E,j);return j.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function Q_(){return{exit:{taskListCheckValueChecked:gv,taskListCheckValueUnchecked:gv,paragraph:$_}}}function X_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:K_}}}function gv(t){const l=this.stack[this.stack.length-2];l.type,l.checked=t.type==="taskListCheckValueChecked"}function $_(t){const l=this.stack[this.stack.length-2];if(l&&l.type==="listItem"&&typeof l.checked=="boolean"){const a=this.stack[this.stack.length-1];a.type;const r=a.children[0];if(r&&r.type==="text"){const o=l.children;let s=-1,c;for(;++s<o.length;){const d=o[s];if(d.type==="paragraph"){c=d;break}}c===a&&(r.value=r.value.slice(1),r.value.length===0?a.children.shift():a.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,a.position.start=Object.assign({},r.position.start)))}}this.exit(t)}function K_(t,l,a,r){const o=t.children[0],s=typeof t.checked=="boolean"&&o&&o.type==="paragraph",c="["+(t.checked?"x":" ")+"] ",d=a.createTracker(r);s&&d.move(c);let p=bb.listItem(t,l,a,{...r,...d.current()});return s&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),p;function m(y){return y+c}}function Z_(){return[AA(),KA(),WA(),H_(),Q_()]}function P_(t){return{extensions:[_A(),ZA(t),e_(),I_(t),X_()]}}const J_={tokenize:iR,partial:!0},xb={tokenize:aR,partial:!0},Sb={tokenize:rR,partial:!0},Eb={tokenize:uR,partial:!0},W_={tokenize:oR,partial:!0},wb={name:"wwwAutolink",tokenize:nR,previous:Cb},kb={name:"protocolAutolink",tokenize:lR,previous:Tb},_l={name:"emailAutolink",tokenize:tR,previous:jb},nl={};function eR(){return{text:nl}}let Bi=48;for(;Bi<123;)nl[Bi]=_l,Bi++,Bi===58?Bi=65:Bi===91&&(Bi=97);nl[43]=_l;nl[45]=_l;nl[46]=_l;nl[95]=_l;nl[72]=[_l,kb];nl[104]=[_l,kb];nl[87]=[_l,wb];nl[119]=[_l,wb];function tR(t,l,a){const r=this;let o,s;return c;function c(g){return!ud(g)||!jb.call(r,r.previous)||th(r.events)?a(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(g))}function d(g){return ud(g)?(t.consume(g),d):g===64?(t.consume(g),p):a(g)}function p(g){return g===46?t.check(W_,y,m)(g):g===45||g===95||Qt(g)?(s=!0,t.consume(g),p):y(g)}function m(g){return t.consume(g),o=!0,p}function y(g){return s&&o&&Zt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(g)):a(g)}}function nR(t,l,a){const r=this;return o;function o(c){return c!==87&&c!==119||!Cb.call(r,r.previous)||th(r.events)?a(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(J_,t.attempt(xb,t.attempt(Sb,s),a),a)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function lR(t,l,a){const r=this;let o="",s=!1;return c;function c(g){return(g===72||g===104)&&Tb.call(r,r.previous)&&!th(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),t.consume(g),d):a(g)}function d(g){if(Zt(g)&&o.length<5)return o+=String.fromCodePoint(g),t.consume(g),d;if(g===58){const b=o.toLowerCase();if(b==="http"||b==="https")return t.consume(g),p}return a(g)}function p(g){return g===47?(t.consume(g),s?m:(s=!0,p)):a(g)}function m(g){return g===null||Bo(g)||st(g)||qi(g)||Jo(g)?a(g):t.attempt(xb,t.attempt(Sb,y),a)(g)}function y(g){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),l(g)}}function iR(t,l,a){let r=0;return o;function o(c){return(c===87||c===119)&&r<3?(r++,t.consume(c),o):c===46&&r===3?(t.consume(c),s):a(c)}function s(c){return c===null?a(c):l(c)}}function aR(t,l,a){let r,o,s;return c;function c(m){return m===46||m===95?t.check(Eb,p,d)(m):m===null||st(m)||qi(m)||m!==45&&Jo(m)?p(m):(s=!0,t.consume(m),c)}function d(m){return m===95?r=!0:(o=r,r=void 0),t.consume(m),c}function p(m){return o||r||!s?a(m):l(m)}}function rR(t,l){let a=0,r=0;return o;function o(c){return c===40?(a++,t.consume(c),o):c===41&&r<a?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?t.check(Eb,l,s)(c):c===null||st(c)||qi(c)?l(c):(t.consume(c),o)}function s(c){return c===41&&r++,t.consume(c),o}}function uR(t,l,a){return r;function r(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(t.consume(d),r):d===38?(t.consume(d),s):d===93?(t.consume(d),o):d===60||d===null||st(d)||qi(d)?l(d):a(d)}function o(d){return d===null||d===40||d===91||st(d)||qi(d)?l(d):r(d)}function s(d){return Zt(d)?c(d):a(d)}function c(d){return d===59?(t.consume(d),r):Zt(d)?(t.consume(d),c):a(d)}}function oR(t,l,a){return r;function r(s){return t.consume(s),o}function o(s){return Qt(s)?a(s):l(s)}}function Cb(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||st(t)}function Tb(t){return!Zt(t)}function jb(t){return!(t===47||ud(t))}function ud(t){return t===43||t===45||t===46||t===95||Qt(t)}function th(t){let l=t.length,a=!1;for(;l--;){const r=t[l][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){a=!0;break}if(r._gfmAutolinkLiteralWalkedInto){a=!1;break}}return t.length>0&&!a&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),a}const sR={tokenize:yR,partial:!0};function cR(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:mR,continuation:{tokenize:pR},exit:gR}},text:{91:{name:"gfmFootnoteCall",tokenize:hR},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:fR,resolveTo:dR}}}}function fR(t,l,a){const r=this;let o=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let c;for(;o--;){const p=r.events[o][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return d;function d(p){if(!c||!c._balanced)return a(p);const m=In(r.sliceSerialize({start:c.end,end:r.now()}));return m.codePointAt(0)!==94||!s.includes(m.slice(1))?a(p):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),l(p))}}function dR(t,l){let a=t.length;for(;a--;)if(t[a][1].type==="labelImage"&&t[a][0]==="enter"){t[a][1];break}t[a+1][1].type="data",t[a+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},t[a+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[a+3][1].end),end:Object.assign({},t[a+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},d=[t[a+1],t[a+2],["enter",r,l],t[a+3],t[a+4],["enter",o,l],["exit",o,l],["enter",s,l],["enter",c,l],["exit",c,l],["exit",s,l],t[t.length-2],t[t.length-1],["exit",r,l]];return t.splice(a,t.length-a+1,...d),t}function hR(t,l,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=0,c;return d;function d(g){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),p}function p(g){return g!==94?a(g):(t.enter("gfmFootnoteCallMarker"),t.consume(g),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(g){if(s>999||g===93&&!c||g===null||g===91||st(g))return a(g);if(g===93){t.exit("chunkString");const b=t.exit("gfmFootnoteCallString");return o.includes(In(r.sliceSerialize(b)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),l):a(g)}return st(g)||(c=!0),s++,t.consume(g),g===92?y:m}function y(g){return g===91||g===92||g===93?(t.consume(g),s++,m):m(g)}}function mR(t,l,a){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,c=0,d;return p;function p(E){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(E){return E===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",y):a(E)}function y(E){if(c>999||E===93&&!d||E===null||E===91||st(E))return a(E);if(E===93){t.exit("chunkString");const j=t.exit("gfmFootnoteDefinitionLabelString");return s=In(r.sliceSerialize(j)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(E),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),b}return st(E)||(d=!0),c++,t.consume(E),E===92?g:y}function g(E){return E===91||E===92||E===93?(t.consume(E),c++,y):y(E)}function b(E){return E===58?(t.enter("definitionMarker"),t.consume(E),t.exit("definitionMarker"),o.includes(s)||o.push(s),Ze(t,S,"gfmFootnoteDefinitionWhitespace")):a(E)}function S(E){return l(E)}}function pR(t,l,a){return t.check(tu,l,t.attempt(sR,l,a))}function gR(t){t.exit("gfmFootnoteDefinition")}function yR(t,l,a){const r=this;return Ze(t,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=r.events[r.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?l(s):a(s)}}function vR(t){let a=(t||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:o};return a==null&&(a=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(c,d){let p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let m=p;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[p][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const y={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[p][1].start)},b=[["enter",y,d],["enter",c[m][1],d],["exit",c[m][1],d],["enter",g,d]],S=d.parser.constructs.insideSpan.null;S&&xn(b,b.length,0,Wo(S,c.slice(m+1,p),d)),xn(b,b.length,0,[["exit",g,d],["enter",c[p][1],d],["exit",c[p][1],d],["exit",y,d]]),xn(c,m-1,p-m+3,b),p=m+b.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function s(c,d,p){const m=this.previous,y=this.events;let g=0;return b;function b(E){return m===126&&y[y.length-1][1].type!=="characterEscape"?p(E):(c.enter("strikethroughSequenceTemporary"),S(E))}function S(E){const j=Da(m);if(E===126)return g>1?p(E):(c.consume(E),g++,S);if(g<2&&!a)return p(E);const N=c.exit("strikethroughSequenceTemporary"),C=Da(E);return N._open=!C||C===2&&!!j,N._close=!j||j===2&&!!C,d(E)}}}class bR{constructor(){this.map=[]}add(l,a,r){xR(this,l,a,r)}consume(l){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let a=this.map.length;const r=[];for(;a>0;)a-=1,r.push(l.slice(this.map[a][0]+this.map[a][1]),this.map[a][2]),l.length=this.map[a][0];r.push(l.slice()),l.length=0;let o=r.pop();for(;o;){for(const s of o)l.push(s);o=r.pop()}this.map.length=0}}function xR(t,l,a,r){let o=0;if(!(a===0&&r.length===0)){for(;o<t.map.length;){if(t.map[o][0]===l){t.map[o][1]+=a,t.map[o][2].push(...r);return}o+=1}t.map.push([l,a,r])}}function SR(t,l){let a=!1;const r=[];for(;l<t.length;){const o=t[l];if(a){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(t[l+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[l-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(a=!0);l+=1}return r}function ER(){return{flow:{null:{name:"table",tokenize:wR,resolveAll:kR}}}}function wR(t,l,a){const r=this;let o=0,s=0,c;return d;function d(R){let V=r.events.length-1;for(;V>-1;){const le=r.events[V][1].type;if(le==="lineEnding"||le==="linePrefix")V--;else break}const G=V>-1?r.events[V][1].type:null,F=G==="tableHead"||G==="tableRow"?H:p;return F===H&&r.parser.lazy[r.now().line]?a(R):F(R)}function p(R){return t.enter("tableHead"),t.enter("tableRow"),m(R)}function m(R){return R===124||(c=!0,s+=1),y(R)}function y(R){return R===null?a(R):_e(R)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),S):a(R):Ye(R)?Ze(t,y,"whitespace")(R):(s+=1,c&&(c=!1,o+=1),R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),g(R)))}function g(R){return R===null||R===124||st(R)?(t.exit("data"),y(R)):(t.consume(R),R===92?b:g)}function b(R){return R===92||R===124?(t.consume(R),g):g(R)}function S(R){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(R):(t.enter("tableDelimiterRow"),c=!1,Ye(R)?Ze(t,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):E(R))}function E(R){return R===45||R===58?N(R):R===124?(c=!0,t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),j):P(R)}function j(R){return Ye(R)?Ze(t,N,"whitespace")(R):N(R)}function N(R){return R===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),C):R===45?(s+=1,C(R)):R===null||_e(R)?te(R):P(R)}function C(R){return R===45?(t.enter("tableDelimiterFiller"),A(R)):P(R)}function A(R){return R===45?(t.consume(R),A):R===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(R),t.exit("tableDelimiterMarker"),D):(t.exit("tableDelimiterFiller"),D(R))}function D(R){return Ye(R)?Ze(t,te,"whitespace")(R):te(R)}function te(R){return R===124?E(R):R===null||_e(R)?!c||o!==s?P(R):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(R)):P(R)}function P(R){return a(R)}function H(R){return t.enter("tableRow"),_(R)}function _(R){return R===124?(t.enter("tableCellDivider"),t.consume(R),t.exit("tableCellDivider"),_):R===null||_e(R)?(t.exit("tableRow"),l(R)):Ye(R)?Ze(t,_,"whitespace")(R):(t.enter("data"),ne(R))}function ne(R){return R===null||R===124||st(R)?(t.exit("data"),_(R)):(t.consume(R),R===92?W:ne)}function W(R){return R===92||R===124?(t.consume(R),ne):ne(R)}}function kR(t,l){let a=-1,r=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],d=!1,p=0,m,y,g;const b=new bR;for(;++a<t.length;){const S=t[a],E=S[1];S[0]==="enter"?E.type==="tableHead"?(d=!1,p!==0&&(yv(b,l,p,m,y),y=void 0,p=0),m={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(a,0,[["enter",m,l]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(r=!0,g=void 0,s=[0,0,0,0],c=[0,a+1,0,0],d&&(d=!1,y={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(a,0,[["enter",y,l]])),o=E.type==="tableDelimiterRow"?2:y?3:1):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(r=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],g=Co(b,l,s,o,void 0,g),s=[0,0,0,0]),c[2]=a)):E.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(c[0]=c[1],g=Co(b,l,s,o,void 0,g)),s=c,c=[s[1],a,0,0])):E.type==="tableHead"?(d=!0,p=a):E.type==="tableRow"||E.type==="tableDelimiterRow"?(p=a,s[1]!==0?(c[0]=c[1],g=Co(b,l,s,o,a,g)):c[1]!==0&&(g=Co(b,l,c,o,a,g)),o=0):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=a)}for(p!==0&&yv(b,l,p,m,y),b.consume(l.events),a=-1;++a<l.events.length;){const S=l.events[a];S[0]==="enter"&&S[1].type==="table"&&(S[1]._align=SR(l.events,a))}return t}function Co(t,l,a,r,o,s){const c=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",d="tableContent";a[0]!==0&&(s.end=Object.assign({},ja(l.events,a[0])),t.add(a[0],0,[["exit",s,l]]));const p=ja(l.events,a[1]);if(s={type:c,start:Object.assign({},p),end:Object.assign({},p)},t.add(a[1],0,[["enter",s,l]]),a[2]!==0){const m=ja(l.events,a[2]),y=ja(l.events,a[3]),g={type:d,start:Object.assign({},m),end:Object.assign({},y)};if(t.add(a[2],0,[["enter",g,l]]),r!==2){const b=l.events[a[2]],S=l.events[a[3]];if(b[1].end=Object.assign({},S[1].end),b[1].type="chunkText",b[1].contentType="text",a[3]>a[2]+1){const E=a[2]+1,j=a[3]-a[2]-1;t.add(E,j,[])}}t.add(a[3]+1,0,[["exit",g,l]])}return o!==void 0&&(s.end=Object.assign({},ja(l.events,o)),t.add(o,0,[["exit",s,l]]),s=void 0),s}function yv(t,l,a,r,o){const s=[],c=ja(l.events,a);o&&(o.end=Object.assign({},c),s.push(["exit",o,l])),r.end=Object.assign({},c),s.push(["exit",r,l]),t.add(a+1,0,s)}function ja(t,l){const a=t[l],r=a[0]==="enter"?"start":"end";return a[1][r]}const CR={name:"tasklistCheck",tokenize:jR};function TR(){return{text:{91:CR}}}function jR(t,l,a){const r=this;return o;function o(p){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?a(p):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),s)}function s(p){return st(p)?(t.enter("taskListCheckValueUnchecked"),t.consume(p),t.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(t.enter("taskListCheckValueChecked"),t.consume(p),t.exit("taskListCheckValueChecked"),c):a(p)}function c(p){return p===93?(t.enter("taskListCheckMarker"),t.consume(p),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),d):a(p)}function d(p){return _e(p)?l(p):Ye(p)?t.check({tokenize:AR},l,a)(p):a(p)}}function AR(t,l,a){return Ze(t,r,"whitespace");function r(o){return o===null?a(o):l(o)}}function _R(t){return B0([eR(),cR(),vR(t),ER(),TR()])}const RR={};function NR(t){const l=this,a=t||RR,r=l.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(_R(a)),s.push(Z_()),c.push(P_(a))}const od=new Set(["<",">","{","}","[","]"]),zR=new Set(["for","do","while","if","else","return","function","var","let","const","true","false","undefined","this","new","delete","typeof","in","instanceof","void","break","continue","switch","case","default","throw","try","catch","finally","debugger","with","yield","async","await","class","extends","super","import","export","from","static"]),Ab=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...od]),DR={keywords:zR,onCommentStart:zb,onCommentEnd:GR},nh=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[qf,OR,ai,MR,Yf,LR,UR,Tl,vv,sd,bv]=nh.map((t,l)=>l);function To(t){return/^[^\S\r\n]+$/g.test(t)}function BR(t){return Ab.has(t)}function HR(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Go(t){return/^[\w_]+$/.test(t)||_b(t)}function qR(t){const l=t[0];return Go(l)&&l===l.toUpperCase()||t==="null"}function _b(t){return/[^\u0000-\u007f]/.test(t)}function Rb(t){return/^[a-zA-Z]$/.test(t)}function Nb(t){return Rb(t)||_b(t)}function jo(t){return Nb(t[0])&&(t.length===1||Go(t.slice(1)))}function cd(t){return t==="`"}function fd(t){return t==='"'||t==="'"}function YR(t){return fd(t)||cd(t)}function zb(t,l){const a=t+l;return a==="/*"?2:a==="//"?1:0}function GR(t,l){return t+l==="*/"?2:l===`
|
|
217
|
+
`?1:0}function VR(t){return t[0]==="/"&&!zb(t[0],t[1])}function FR(t,l){const{keywords:a,onCommentStart:r,onCommentEnd:o}={...DR,...l};let s="",c=-1,d=[-1,""],p=[-2,""];const m=[];let y=!1,g=0,b=!1,S=0;const E=()=>y&&!b&&!g,j=()=>g&&!E(),N=()=>!g&&E()&&!b&&S>0;let C=null,A=!1,D=0,te=0;const P=()=>C!==null,H=()=>A,_=()=>te>D,ne=()=>te>0&&te===D,W=()=>P()||_();function R(G){const F=G===`
|
|
218
|
+
`;if(j()){if(P())return ai;const[,$]=d;if(jo(G)&&($==="<"||$==="</"))return LR}if(N())return UR;if(P()||_())return ai;if(a.has(G))return d[1]==="."?qf:OR;if(F)return sd;if(To(G))return bv;if(G.split("").every(BR))return Tl;if(qR(G))return j()?qf:MR;if(jo(G)){const $=d[1]==="."&&jo(p[1]);if(!W()&&!$)return qf;if($)return Yf}return ai}const V=(G,F)=>{if(F&&(s=F),s){c=G||R(s);const le=[c,s];c!==bv&&c!==sd&&(p=d,d=le),m.push(le)}s=""};for(let G=0;G<t.length;G++){const F=t[G],le=t[G-1],$=t[G+1],U=le+F,ee=F+$;if(fd(F)&&!N()&&!_()){V(),le!=="\\"&&(C&&F===C?C=null:C||(C=F)),V(ai,F);continue}if(!_()&&le!=="\\n"&&cd(F)){V(),V(ai,F),te++;continue}if(_()){if(le!=="\\n"&&cd(F)&&te>0){V(),te--,V(ai,F);continue}if(ee==="${"){D++,V(ai),V(Tl,ee),G++;continue}}if(ne()&&F==="}"){V(),D--,V(Tl,F);continue}if(E()&&F==="{"){V(),V(Tl,F),b=!0;continue}if(y){if(!g&&F==="<"){V(),$==="/"?(g=2,s=ee,G++):(g=1,s=F),V(Tl);continue}if(g){if(F===">"&&!"/=".includes(le)){V(),g===1?(g=0,S++):(g=0,y=!1),V(Tl,F);continue}if(ee==="/>"||ee==="</"){s!=="<"&&s!=="/"&&V(),ee==="/>"?g=0:S--,S||(y=!1),s=ee,G++,V(Tl);continue}if(F==="<"){V(),s=F,V(Tl);continue}if($==="-"&&!W()&&!N()&&s){V(Yf,s+F+$),G++;continue}if($==="="&&!W()&&!To(F)){To(s)&&V();const Z=s+F;if(jo(Z)){V(Yf,Z);continue}}}}!g&&(F==="<"&&Nb($)||ee==="</")&&(g=$==="/"?2:1,F==="<"&&($==="/"||Rb($))&&!W()&&!N()&&!H()&&(y=!0));const se=YR(F),xe=_(),z=!y&&VR(ee),L=N();if(se||xe||fd(C))s+=F;else if(z){V();const[Z,T]=d;if(z&&Z!==-1&&!(Z===Tl&&T!==")"||Z===vv)){s=F,V();continue}A=!0;const ce=G++,ve=()=>G>=t.length,be=()=>ve()||t[G]===`
|
|
219
|
+
`;let De=!1;for(;!be();G++)if(t[G]==="/"&&t[G-1]!=="\\"){for(De=!0;ce!==G&&/^[a-z]$/.test(t[G+1])&&!be();)G++;break}A=!1,ce!==G&&De?(s=t.slice(ce,G+1),V(ai)):(s=F,V(),G=ce)}else if(r(F,$)){V();const Z=G,T=r(F,$);if(T)for(;G<t.length&&o(t[G-1],t[G])!=T;G++);s=t.slice(Z,G+1),V(vv)}else F===" "||F===`
|
|
220
|
+
`?F===" "&&(To(s)||!s||L)?(s+=F,$==="<"&&V()):(V(),s=F,V()):b&&F==="}"?(V(),s=F,V(),b=!1):L&&!od.has(F)||_()||(Go(F)===Go(s[s.length-1])||E())&&!Ab.has(F)?s+=F:(U==="</"&&(s=U),V(),U!=="</"&&(s=F),ee==="</"||ee==="/>"?(s=ee,V(),G++):od.has(F)&&V())}return V(),m}function IR(t){const l=[],a=c=>({type:"element",tagName:"span",children:c,properties:{className:"sh__line"}});function r(c){const d=c.map(([p,m])=>{const y=nh[p];return{type:"element",tagName:"span",children:[{type:"text",value:m}],properties:{className:`sh__token--${y}`,style:{color:`var(--sh-${y})`}}}});l.push(a(d))}const o=[];let s=!1;for(let c=0;c<t.length;c++){const d=t[c],[p,m]=d,y=c===t.length-1;if(p!==sd){if(m.includes(`
|
|
221
221
|
`)){const g=m.split(`
|
|
222
|
-
`);for(let b=0;b<g.length;b++)o.push([p,g[b]]),b<g.length-1&&(r(o),o.length=0)}else o.push(d);s=!1}else s?r([]):(r(o),o.length=0),y&&r([]),s=!0}return o.length&&r(o),l}const
|
|
223
|
-
`)}function
|
|
224
|
-
`)}function Gf({text:t,maxLen:l}){const a=t.length>l,r=a?t.slice(0,l):t,o=
|
|
225
|
-
... (truncated)`:"");return
|
|
222
|
+
`);for(let b=0;b<g.length;b++)o.push([p,g[b]]),b<g.length-1&&(r(o),o.length=0)}else o.push(d);s=!1}else s?r([]):(r(o),o.length=0),y&&r([]),s=!0}return o.length&&r(o),l}const QR=t=>{let l=`class="${t.className}"`;if(t.style){const a=Object.entries(t.style).map(([r,o])=>`${r}:${o}`).join(";");l+=` style="${a}"`}return l};function XR(t){return t.map(l=>{const{tagName:a}=l,r=l.children.map(o=>{const{tagName:s,children:c,properties:d}=o;return`<${s} ${QR(d)}>${HR(c[0].value)}</${s}>`}).join("");return`<${a} class="${l.properties.className}">${r}</${a}>`}).join(`
|
|
223
|
+
`)}function Db(t,l){const a=FR(t,l),r=IR(a);return XR(r)}new Map(nh.map((t,l)=>[t,l]));function $R({className:t,children:l}){const a=String(l).replace(/\n$/,"");if(!t)return x.jsx("code",{children:l});const o=Db(a);return x.jsx("code",{dangerouslySetInnerHTML:{__html:o}})}function dd({children:t,inline:l}){return x.jsx("div",{className:l?"markdown-inline":"markdown",children:x.jsx(vA,{remarkPlugins:[NR],components:{code:$R},children:t})})}const KR={plan:"[plan]",approve:"[approve]",task:"[task]",build:"[build]",fix:"[fix]",done:"[done]",error:"[error]",verbose:"[verbose]"};function ci({value:t}){return t?x.jsx("span",{className:"duration",children:t}):null}function ZR({entry:t,duration:l}){return x.jsxs("div",{className:"console-entry",children:[x.jsx("span",{className:`prefix ${t.level}`,children:KR[t.level]}),x.jsx("span",{children:t.message}),x.jsx(ci,{value:l})]})}function PR({entry:t}){return x.jsxs("div",{className:"console-entry user-message",children:[x.jsx("span",{className:"prefix",style:{color:"var(--orange)"},children:"[you]"}),x.jsx("span",{children:t.message})]})}const JR=300;function WR({entry:t,duration:l}){const a=t.agent||"agent";return t.text.length<=JR?x.jsxs("div",{className:"console-entry",children:[x.jsxs("span",{className:"prefix task",children:["[",a,"]"]}),x.jsx("span",{children:x.jsx(dd,{inline:!0,children:t.text})}),x.jsx(ci,{value:l})]}):x.jsxs("details",{className:"tool-inline",children:[x.jsxs("summary",{children:[x.jsx("span",{className:"tool-inline-name",children:a}),x.jsxs("span",{className:"tool-inline-summary",children:[t.text.slice(0,120),"..."]}),x.jsx(ci,{value:l})]}),x.jsx("div",{className:"tool-inline-body",children:x.jsx(dd,{children:t.text})})]})}function eN(t){const{tool_name:l,tool_input:a}=t;if(l==="Glob"){const r=a.pattern||"*",o=a.path;return o?`${r} in ${o}`:r}if(l==="Grep"){const o=[a.pattern||""];return a.path&&o.push(`in ${a.path}`),a.glob&&o.push(`(${a.glob})`),o.join(" ")}if(l==="Read"){const o=[a.file_path||"unknown file"];return a.offset&&o.push(`offset:${a.offset}`),a.limit&&o.push(`limit:${a.limit}`),o.join(" ")}return l==="Write"||l==="Edit"?a.file_path||"unknown file":l==="Bash"?(a.command||"").slice(0,80):l.includes("playbook")?a.name||"read":l.includes("build")?"pnpm build + check":l}function tN(t){return Object.entries(t).map(([a,r])=>{const o=typeof r=="string"?r:JSON.stringify(r,null,2);return o.length>500?`${a}: ${o.slice(0,500)}... (${o.length} chars)`:`${a}: ${o}`}).join(`
|
|
224
|
+
`)}function Gf({text:t,maxLen:l}){const a=t.length>l,r=a?t.slice(0,l):t,o=Db(r)+(a?`
|
|
225
|
+
... (truncated)`:"");return x.jsx("pre",{dangerouslySetInnerHTML:{__html:o}})}function nN(t){return t.tool_name!=="Write"?!1:(t.tool_input.file_path||"").endsWith(".md")}function hd({entry:t,duration:l}){const a=t.tool_response===null,r=t.tool_name==="Bash"||t.tool_name==="bash",o=r&&t.tool_input.command||"";if(r)return x.jsxs("details",{className:"tool-inline",children:[x.jsxs("summary",{children:[t.agent&&x.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),x.jsx("span",{className:"tool-inline-name",children:"$"}),x.jsx("span",{className:"tool-inline-command",children:o}),a?x.jsx("span",{className:"spinner-inline"}):x.jsx(ci,{value:l})]}),x.jsx("div",{className:"tool-inline-body",children:t.tool_response!==null&&x.jsx(Gf,{text:t.tool_response,maxLen:5e3})})]});if(nN(t)){const s=t.tool_input.content||"",c=t.tool_input.file_path||"unknown file";return x.jsxs("details",{className:"tool-inline",open:!0,children:[x.jsxs("summary",{children:[t.agent&&x.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),x.jsx("span",{className:"tool-inline-name",children:t.tool_name}),x.jsx("span",{className:"tool-inline-summary",children:c}),a?x.jsx("span",{className:"spinner-inline"}):x.jsx(ci,{value:l})]}),x.jsx("div",{className:"tool-inline-body",children:x.jsx(dd,{children:s})})]})}return x.jsxs("details",{className:"tool-inline",children:[x.jsxs("summary",{children:[t.agent&&x.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),x.jsx("span",{className:"tool-inline-name",children:t.tool_name}),x.jsx("span",{className:"tool-inline-summary",children:eN(t)}),a?x.jsx("span",{className:"spinner-inline"}):x.jsx(ci,{value:l})]}),x.jsxs("div",{className:"tool-inline-body",children:[x.jsx("div",{className:"section-label",children:"Input"}),x.jsx(Gf,{text:tN(t.tool_input),maxLen:5e3}),t.tool_response!==null&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"section-label",children:"Output"}),x.jsx(Gf,{text:t.tool_response,maxLen:5e3})]})]})]})}function lN(t){let l=0,a=!1;for(const{duration:c}of t)if(c)if(a=!0,c.endsWith("ms"))l+=Number.parseInt(c,10);else if(c.includes("m ")){const[d,p]=c.split("m ");l+=Number.parseInt(d,10)*6e4+Number.parseFloat(p)*1e3}else c.endsWith("s")&&(l+=Number.parseFloat(c)*1e3);if(!a)return null;if(l<1e3)return`${l}ms`;const r=l/1e3;if(r<60)return`${r.toFixed(0)}s`;const o=Math.floor(r/60),s=r%60;return`${o}m ${s.toFixed(0)}s`}function iN(t){const l=t.filter(r=>r.entry.kind==="tool_use").length;return t.filter(r=>r.entry.kind==="tool_use").every(r=>r.entry.tool_response!==null)?`${l} action${l!==1?"s":""}`:`${l} action${l!==1?"s":""}...`}function aN({items:t}){const[l,a]=k.useState(!1),r=t.filter(d=>d.entry.kind==="tool_use"),o=r.every(d=>d.entry.tool_response!==null),s=r.length>0?r[r.length-1]:t[t.length-1],c=lN(t);return x.jsxs("div",{className:"tool-group",children:[x.jsxs("div",{className:"tool-group-header",onClick:()=>a(d=>!d),children:[!o&&x.jsx("span",{className:"spinner-inline"}),x.jsx("span",{className:"tool-group-label",children:iN(t)}),x.jsx("span",{className:"tool-group-chevron",children:l?"▼":"▶"}),o&&x.jsx(ci,{value:c})]}),l&&x.jsx("div",{className:"tool-group-items",children:t.map(({entry:d,index:p,duration:m})=>d.kind==="tool_use"?x.jsx(hd,{entry:d,duration:m},d.tool_use_id||`gi-${p}`):null)}),!l&&s&&x.jsx("div",{className:"tool-group-tail",children:s.entry.kind==="tool_use"?x.jsx(hd,{entry:s.entry,duration:s.duration}):null})]})}function rN({sessionId:t,event:l,onResolved:a,resolved:r,resolvedDetails:o}){const s=l.runtime==="docker",[c,d]=k.useState(s?"local":"claim"),[p,m]=k.useState(""),[y,g]=k.useState("https://api.electric-sql.cloud"),[b,S]=k.useState(""),[E,j]=k.useState(""),[N,C]=k.useState(""),[A,D]=k.useState(""),[te,P]=k.useState(!1),[H,_]=k.useState(!1),[ne,W]=k.useState(!1),[R,V]=k.useState(null),G=l.ghAccounts.length>0,[F,le]=k.useState(l.ghAccounts[0]?.login??""),[$,U]=k.useState(l.projectName),[ee,se]=k.useState("private"),[xe,z]=k.useState(!1);async function L(){_(!0),V(null);try{const pe=await Iw();m(pe.databaseUrl),g(pe.electricUrl),S(pe.sourceId),j(pe.secret),C(pe.claimId),D(pe.claimUrl),W(!0)}catch(pe){V(pe instanceof Error?pe.message:"Provisioning failed")}finally{_(!1)}}async function Z(){P(!0);const pe=[];try{const Re={};c==="claim"?(Re.mode="claim",Re.databaseUrl=p,Re.electricUrl=y,Re.sourceId=b,Re.secret=E,Re.claimId=N,pe.push(`Database: ${p}`),pe.push(`Source ID: ${b}`),A&&pe.push(`Claim: ${A}`)):c==="cloud"?(Re.mode="cloud",Re.databaseUrl=p,Re.electricUrl=y,Re.sourceId=b,Re.secret=E,pe.push(`Database: ${p}`),pe.push(`Source ID: ${b}`)):(Re.mode="local",pe.push("Local Docker")),xe&&F&&$.trim()&&(Re.repoAccount=F,Re.repoName=$,Re.repoVisibility=ee,pe.push(`${F}/${$} (${ee})`)),Re._summary=pe.join(`
|
|
226
226
|
`),await $f(t,"infra_config",Re),a(pe.join(`
|
|
227
|
-
`))}catch{P(!1)}}const T=te||!!r,ce=p.trim()&&b.trim()&&E.trim(),ve=ne&&p.trim()&&b.trim()&&E.trim(),be=!xe||F&&I.trim(),De={claim:"Provisioned (Cloud)",local:"Local (Docker)",cloud:"Electric Cloud (BYO)"};if(r){const pe=o??{};return o||(pe.Infrastructure=De[c],(c==="cloud"||c==="claim")&&(p&&(pe["Connection string"]=p),b&&(pe["Source ID"]=b)),c==="claim"&&j&&(pe["Claim link"]=j),xe&&F&&I.trim()&&(pe.Repository=`${F}/${I}`,pe.Visibility=ee)),S.jsx("div",{className:"gate-prompt",children:S.jsx("div",{className:"gate-config-summary",children:Object.entries(pe).map(([Re,zt])=>S.jsxs("div",{children:[S.jsxs("strong",{children:[Re,":"]})," ",zt.startsWith("http")?S.jsx("a",{href:zt,target:"_blank",rel:"noopener noreferrer",children:zt}):zt]},Re))})})}return S.jsxs("div",{className:"gate-prompt",children:[S.jsxs("h3",{children:["Setup ",l.projectName]}),S.jsx("p",{className:"gate-summary",children:"Infrastructure"}),S.jsxs("div",{className:"gate-option-group",children:[S.jsxs("button",{type:"button",className:`gate-option ${c==="claim"?"active":""}`,onClick:()=>d("claim"),disabled:te,children:[S.jsx("span",{className:"gate-option-title",children:"Provision"}),S.jsx("span",{className:"gate-option-desc",children:"Auto-provision database & Electric Cloud (72h)"})]}),s&&S.jsxs("button",{type:"button",className:`gate-option ${c==="local"?"active":""}`,onClick:()=>d("local"),disabled:te,children:[S.jsx("span",{className:"gate-option-title",children:"Local"}),S.jsx("span",{className:"gate-option-desc",children:"Run with Docker Compose on your machine"})]}),S.jsxs("button",{type:"button",className:`gate-option ${c==="cloud"?"active":""}`,onClick:()=>d("cloud"),disabled:te,children:[S.jsx("span",{className:"gate-option-title",children:"Bring your own"}),S.jsx("span",{className:"gate-option-desc",children:"Provide your own database & Electric details"})]})]}),c==="claim"&&S.jsx("div",{className:"question",children:ne?S.jsxs("div",{style:{fontSize:"0.85em"},children:[S.jsx("p",{style:{color:"var(--color-done, #4c4)",margin:"0 0 6px"},children:"Resources provisioned successfully (72h TTL)."}),S.jsxs("div",{style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,padding:"8px 10px",margin:"6px 0",fontFamily:"monospace",fontSize:"0.9em",lineHeight:1.6,wordBreak:"break-all"},children:[S.jsxs("div",{children:[S.jsx("strong",{children:"Database URL:"})," ",p]}),S.jsxs("div",{children:[S.jsx("strong",{children:"Source ID:"})," ",b]}),S.jsxs("div",{children:[S.jsx("strong",{children:"Electric URL:"})," ",y]})]}),j&&S.jsxs("p",{style:{margin:"8px 0 0"},children:["Claim into your account:"," ",S.jsx("a",{href:j,target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:j})]})]}):S.jsxs(S.Fragment,{children:[S.jsx("p",{style:{fontSize:"0.85em",opacity:.7,margin:"0 0 8px"},children:"Automatically provision a Neon Postgres database and Electric Cloud source. Resources are available for 72 hours."}),S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:L,disabled:H||T,style:{marginBottom:8},children:H?"Provisioning...":"Provision Resources"}),H&&S.jsx("p",{style:{fontSize:"0.85em",opacity:.7},children:"This may take 30-60 seconds..."}),R&&S.jsx("p",{style:{color:"var(--color-error, #e55)",fontSize:"0.85em"},children:R})]})}),c==="cloud"&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Database URL"}),S.jsx("input",{type:"text",value:p,onChange:pe=>m(pe.target.value),disabled:T,placeholder:"postgresql://user:pass@host:5432/dbname"})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Electric URL"}),S.jsx("input",{type:"text",value:y,onChange:pe=>g(pe.target.value),disabled:T,placeholder:"https://api.electric-sql.cloud"})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Source ID"}),S.jsx("input",{type:"text",value:b,onChange:pe=>x(pe.target.value),disabled:T,placeholder:"Your Electric Cloud source ID"})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Secret"}),S.jsx("input",{type:"password",value:E,onChange:pe=>A(pe.target.value),disabled:T,placeholder:"Your Electric Cloud secret"})]})]}),G&&S.jsxs(S.Fragment,{children:[S.jsx("p",{className:"gate-summary",style:{marginTop:16},children:"GitHub Repository"}),S.jsx("div",{className:"gate-option-group",children:S.jsx("button",{type:"button",className:`gate-option ${xe?"active":""}`,onClick:()=>N(!xe),disabled:T,children:S.jsx("span",{className:"gate-option-title",children:"Create a GitHub repo for this project"})})}),xe&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Account"}),l.ghAccounts.length>1?S.jsx("select",{value:F,onChange:pe=>le(pe.target.value),disabled:T,children:l.ghAccounts.map(pe=>S.jsxs("option",{value:pe.login,children:[pe.login," ",pe.type==="org"?"(org)":"(personal)"]},pe.login))}):S.jsx("input",{type:"text",value:l.ghAccounts[0].login,disabled:!0})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Repository name"}),S.jsx("input",{type:"text",value:I,onChange:pe=>B(pe.target.value),disabled:T,placeholder:"my-app"})]}),S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Visibility"}),S.jsxs("div",{className:"gate-option-group",children:[S.jsx("button",{type:"button",className:`gate-option ${ee==="private"?"active":""}`,onClick:()=>se("private"),disabled:T,children:S.jsx("span",{className:"gate-option-title",children:"Private"})}),S.jsx("button",{type:"button",className:`gate-option ${ee==="public"?"active":""}`,onClick:()=>se("public"),disabled:T,children:S.jsx("span",{className:"gate-option-title",children:"Public"})})]})]})]})]}),S.jsx("div",{className:"gate-actions",children:S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:Z,disabled:T||c==="cloud"&&!ce||c==="claim"&&!ve||!be,children:te?"Configuring...":"Start"})})]})}function az({sessionId:t,event:l,onResolved:a,resolved:r,resolvedSummary:o}){const s=l.questions?.length?l.questions:[{question:l.question,options:l.options}],c=s.length>1,d=s.some(J=>J.multiSelect),p=c||d,[m,y]=k.useState({}),[g,b]=k.useState({}),[x,E]=k.useState({}),[A,z]=k.useState({}),[C,j]=k.useState(!1),D=C||!!r;function te(){const J={};for(const R of s)if(R.multiSelect){const V=g[R.question],G=A[R.question]?.trim(),F=V?[...V]:[];G&&F.push(G),J[R.question]=F.join(", ")}else J[R.question]=m[R.question]||A[R.question]?.trim()||"";return J}function P(J){const R=Object.entries(J).filter(([,V])=>V);return R.length===1?R[0][1].slice(0,80):R.map(([,V])=>V.slice(0,40)).join("; ").slice(0,120)}async function H(J,R){y(G=>({...G,[J]:R})),j(!0);const V={[J]:R};try{await $f(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:V,_summary:R}),a(R)}catch{y(G=>({...G,[J]:""})),j(!1)}}async function _(){const J=te(),R=P(J);j(!0);try{await $f(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:J,_summary:R}),a(R)}catch{j(!1)}}function ne(J,R){b(V=>{const G=new Set(V[J]??[]);return G.has(R)?G.delete(R):G.add(R),{...V,[J]:G}})}if(r){const J=o||"";return S.jsxs("div",{className:"gate-prompt",children:[S.jsx("h3",{children:"Question"}),s.map(R=>S.jsxs("div",{className:"gate-question-section",children:[R.header&&S.jsx("span",{className:"gate-question-header",children:R.header}),S.jsx("p",{className:"gate-summary",children:R.question})]},R.question)),S.jsx("div",{className:"gate-answer-summary",children:J})]})}return S.jsxs("div",{className:"gate-prompt",children:[S.jsx("h3",{children:"Question"}),s.map(J=>{const R=J.options&&J.options.length>0,V=x[J.question];return S.jsxs("div",{className:"gate-question-section",children:[J.header&&S.jsx("span",{className:"gate-question-header",children:J.header}),S.jsx("p",{className:"gate-summary",children:J.question}),R&&J.multiSelect&&S.jsxs("div",{className:"gate-option-group-vert",children:[J.options?.map(G=>{const F=g[J.question]?.has(G.label)??!1;return S.jsxs("button",{type:"button",className:`gate-option gate-option-checkbox ${F?"checked":""}`,onClick:()=>ne(J.question,G.label),disabled:D,children:[S.jsx("span",{className:"gate-checkbox-indicator",children:F?"☑":"☐"}),S.jsx("span",{className:"gate-option-title",children:G.label}),G.description&&S.jsx("span",{className:"gate-option-desc",children:G.description})]},G.label)}),!V&&S.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(G=>({...G,[J.question]:!0})),disabled:D,children:S.jsx("span",{className:"gate-option-title",children:"Other..."})}),V&&S.jsx("div",{className:"question",children:S.jsx("input",{type:"text",value:A[J.question]||"",onChange:G=>z(F=>({...F,[J.question]:G.target.value})),disabled:D,placeholder:"Type your answer..."})})]}),R&&!J.multiSelect&&S.jsxs("div",{className:"gate-option-group-vert",children:[J.options?.map(G=>{const F=m[J.question]===G.label;return S.jsxs("button",{type:"button",className:`gate-option ${F?"selected":""}`,onClick:()=>p?y(le=>({...le,[J.question]:G.label})):H(J.question,G.label),disabled:D,children:[S.jsx("span",{className:"gate-option-title",children:G.label}),G.description&&S.jsx("span",{className:"gate-option-desc",children:G.description})]},G.label)}),!V&&S.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(G=>({...G,[J.question]:!0})),disabled:D,children:S.jsx("span",{className:"gate-option-title",children:"Other..."})}),V&&S.jsx("div",{className:"question",children:S.jsx("input",{type:"text",value:A[J.question]||"",onChange:G=>{const F=G.target.value;z(le=>({...le,[J.question]:F})),y(le=>({...le,[J.question]:""}))},disabled:D,placeholder:"Type your answer..."})})]}),!R&&S.jsx("div",{className:"question",children:S.jsx("textarea",{value:A[J.question]||"",onChange:G=>z(F=>({...F,[J.question]:G.target.value})),disabled:D,rows:3,placeholder:"Type your answer..."})})]},J.question)}),p&&S.jsx("div",{className:"gate-actions",children:S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:_,disabled:D,children:C?"Submitting...":"Submit"})}),!p&&!s[0]?.options?.length&&S.jsx("div",{className:"gate-actions",children:S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:_,disabled:D||!A[s[0]?.question]?.trim(),children:C?"Submitting...":"Submit"})})]})}function rz(t){switch(t){case"infra_config_prompt":return"Project configured";case"ask_user_question":return"Question answered";default:return"Decision made"}}function uz({sessionId:t,entry:l,entryIndex:a,onResolved:r,duration:o}){const s=m=>r(a,m),{resolved:c,resolvedSummary:d}=l;let p=null;switch(l.event.type){case"infra_config_prompt":p=S.jsx(iz,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedDetails:l.resolvedDetails});break;case"ask_user_question":p=S.jsx(az,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedSummary:d});break;default:return null}return c?S.jsxs("div",{className:"gate-answered",children:[S.jsxs("div",{className:"gate-answered-header",children:[S.jsx("span",{className:"prefix done",children:"[gate]"}),S.jsx("span",{className:"gate-resolved-label",children:rz(l.event.type)}),S.jsx(ci,{value:o})]}),p]}):p}const bv={pending:"○",in_progress:"◉",completed:"✓"};function oz(t){switch(t){case"completed":return"todo-status-done";case"in_progress":return"todo-status-progress";default:return"todo-status-pending"}}function sz({entry:t}){const{todos:l}=t,a=l.filter(c=>c.status==="completed").length,r=l.filter(c=>c.status==="in_progress").length,o=l.length,s=[];return a>0&&s.push(`${a}/${o} done`),r>0&&s.push(`${r} in progress`),s.length===0&&s.push(`${o} pending`),S.jsxs("details",{className:"tool-inline",open:!0,children:[S.jsxs("summary",{children:[S.jsx("span",{className:"tool-inline-name",children:"TodoWrite"}),S.jsx("span",{className:"tool-inline-summary",children:s.join(", ")})]}),S.jsx("div",{className:"tool-inline-body",children:S.jsx("ul",{className:"todo-list",children:l.map(c=>S.jsxs("li",{className:"todo-item",children:[S.jsx("span",{className:`todo-status-icon ${oz(c.status)}`,children:bv[c.status]||bv.pending}),S.jsx("span",{className:"todo-content",children:c.content}),c.priority&&S.jsx("span",{className:"todo-priority",children:c.priority})]},c.id))})})]})}const cz=3;function xv(t){return t.kind==="tool_use"}function fz(t,l){const a=[];let r=0;for(;r<t.length;){const o=t[r];if(xv(o)){const s=[];for(;r<t.length&&xv(t[r]);)s.push({entry:t[r],index:r,duration:l[r]}),r++;if(s.length>=cz)a.push({type:"group",items:s});else for(const c of s)a.push({type:"single",...c});continue}a.push({type:"single",entry:o,index:r,duration:l[r]}),r++}return a}function dz(t){if(t.kind!=="user_prompt")return t.ts}function Mb(t){if(t<1e3)return`${t}ms`;const l=t/1e3;if(l<60)return`${l.toFixed(0)}s`;const a=Math.floor(l/60),r=l%60;return`${a}m ${r.toFixed(0)}s`}function hz({sinceTs:t}){const[l,a]=k.useState("");return k.useEffect(()=>{const r=new Date(t).getTime(),o=()=>{const c=Date.now()-r;a(Mb(Math.max(0,c)))};o();const s=setInterval(o,1e3);return()=>clearInterval(s)},[t]),S.jsxs("div",{className:"console-entry waiting-indicator",children:[S.jsx("span",{className:"spinner-inline"}),S.jsx("span",{className:"waiting-label",children:"Waiting for response..."}),S.jsx("span",{className:"duration",children:l})]})}function Lb({sessionId:t,entries:l,isLive:a,isComplete:r,onGateResolved:o}){const s=k.useRef(null),c=k.useRef(null),[d,p]=k.useState(!0),m=l.length,y=k.useCallback(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[]),g=k.useCallback(()=>{const C=s.current;if(!C)return;const D=C.scrollHeight-C.scrollTop-C.clientHeight<80;p(D)},[]);k.useEffect(()=>{d&&c.current?.scrollIntoView({behavior:"smooth"})},[m,d]);const b=[];let x=null;for(const C of l){const j=dz(C);if(C.kind==="user_prompt"||!j)b.push(null);else if(x){const D=new Date(j).getTime()-new Date(x).getTime();b.push(D>=0?Mb(D):null)}else b.push(null);j&&(x=j)}const E=k.useMemo(()=>fz(l,b),[l,b]);let A=!1,z="";if(a&&!r&&l.length>0){const C=l[l.length-1],j=C.kind==="tool_use"&&C.tool_response===null,D=C.kind==="gate"&&!C.resolved,te=C.kind==="assistant_message";!j&&!D&&!te&&(A=!0,z=x||new Date().toISOString())}return S.jsxs("div",{className:"console",ref:s,onScroll:g,children:[E.map(C=>{if(C.type==="group")return S.jsx(lz,{items:C.items},`group-${C.items[0].index}`);const{entry:j,index:D,duration:te}=C;switch(j.kind){case"log":return S.jsx($R,{entry:j,duration:te},`log-${D}`);case"user_prompt":return S.jsx(KR,{entry:j},`user-${D}`);case"tool_use":return S.jsx(hd,{entry:j,duration:te},j.tool_use_id||`tool-${D}`);case"assistant_message":return S.jsx(PR,{entry:j,duration:te},`text-${D}`);case"todo_widget":return S.jsx(sz,{entry:j},`todo-${D}`);case"gate":return S.jsx(uz,{sessionId:t,entry:j,entryIndex:D,onResolved:o,duration:te},`gate-${D}`);default:return null}}),A&&S.jsx(hz,{sinceTs:z}),S.jsx("div",{ref:c}),!d&&S.jsx("button",{type:"button",className:"jump-to-bottom",onClick:y,children:"Jump to latest"})]})}function Yr({variant:t="line",width:l}){const a=t==="block"?"skeleton skeleton-block":"skeleton skeleton-line";return S.jsx("div",{className:a,style:l?{width:l}:void 0})}function Ub(t){const[l,a]=k.useState([]),[r,o]=k.useState(!1),[s,c]=k.useState(!1),[d,p]=k.useState(null),m=k.useRef(!1),y=k.useRef(!1),g=k.useRef("-1"),b=k.useCallback(E=>{a(A=>{switch(E.type){case"log":return[...A,{kind:"log",level:E.level,message:E.message,ts:E.ts}];case"user_prompt":return[...A,{kind:"user_prompt",message:E.message}];case"pre_tool_use":return[...A,{kind:"tool_use",tool_name:E.tool_name,tool_use_id:E.tool_use_id,tool_input:E.tool_input,tool_response:null,agent:E.agent,ts:E.ts}];case"post_tool_use":{const z=[...A];for(let C=z.length-1;C>=0;C--){const j=z[C];if(j.kind==="tool_use"&&j.tool_use_id===E.tool_use_id){z[C]={...j,tool_response:E.tool_response,agent:j.agent||E.agent};break}}return z}case"post_tool_use_failure":{const z=[...A];for(let C=z.length-1;C>=0;C--){const j=z[C];if(j.kind==="tool_use"&&j.tool_use_id===E.tool_use_id){z[C]={...j,tool_response:`Error: ${E.error}`,agent:j.agent||E.agent};break}}return z}case"assistant_message":return[...A,{kind:"assistant_message",text:E.text,agent:E.agent,ts:E.ts}];case"todo_write":{const z=A.findIndex(j=>j.kind==="todo_widget"),C={kind:"todo_widget",tool_use_id:E.tool_use_id,todos:E.todos,ts:E.ts};if(z>=0){const j=[...A];return j[z]=C,j}return[...A,C]}case"ask_user_question":case"infra_config_prompt":return[...A,{kind:"gate",event:E,resolved:!1,ts:E.ts}];case"gate_resolved":{const z=[...A];let C=!1;for(let j=z.length-1;j>=0;j--){const D=z[j];if(D.kind==="gate"&&!D.resolved){z[j]={...D,resolved:!0,resolvedSummary:E.summary||D.resolvedSummary,resolvedDetails:E.details},C=!0;break}}if(!C&&E.details)for(let j=z.length-1;j>=0;j--){const D=z[j];if(D.kind==="gate"&&D.resolved&&!D.resolvedDetails){z[j]={...D,resolvedDetails:E.details};break}}return z}case"session_end":case"session_start":case"app_status":return A;default:return A}}),E.type==="app_status"&&p({status:E.status,port:E.port,previewUrl:E.previewUrl}),E.type==="session_end"&&(c(!0),y.current&&!m.current&&(m.current=!0,E.success?jy.success("Session completed successfully"):jy.error("Session completed with errors")))},[]);k.useEffect(()=>{if(!t)return;a([]),o(!1),c(!1),p(null),m.current=!1,y.current=!1,g.current="-1";let E=!1,A=null,z=0;const C=10;function j(){if(E)return;if(z>=C){console.warn(`[sse] Giving up on session ${t} after ${C} retries`),o(!1);return}const D=r0(t),te=new URLSearchParams;D&&te.set("token",D),g.current!=="-1"&&te.set("offset",g.current);const P=te.toString(),H=`/api/sessions/${t}/events${P?`?${P}`:""}`;A=new EventSource(H),A.onopen=()=>{E||(z=0,o(!0),setTimeout(()=>{y.current=!0},500))},A.onmessage=_=>{if(!E){_.lastEventId&&(g.current=_.lastEventId);try{const ne=JSON.parse(_.data);b(ne)}catch{}}},A.onerror=()=>{if(E)return;A?.close(),z++;const _=Math.min(1e3*2**(z-1),3e4);setTimeout(j,_)}}return j(),()=>{E=!0,A&&(A.close(),A=null)}},[t,b]);const x=k.useCallback((E,A)=>{a(z=>{const C=[...z],j=C[E];return j?.kind==="gate"&&(C[E]={...j,resolved:!0,resolvedSummary:A}),C})},[]);return{entries:l,isLive:r,isComplete:s,appStatus:d,markGateResolved:x}}function mz(t){const l=[];for(const a of t)switch(a.kind){case"user_prompt":l.push(`## User
|
|
227
|
+
`))}catch{P(!1)}}const T=te||!!r,ce=p.trim()&&b.trim()&&E.trim(),ve=ne&&p.trim()&&b.trim()&&E.trim(),be=!xe||F&&$.trim(),De={claim:"Provisioned (Cloud)",local:"Local (Docker)",cloud:"Electric Cloud (BYO)"};if(r){const pe=o??{};return o||(pe.Infrastructure=De[c],(c==="cloud"||c==="claim")&&(p&&(pe["Connection string"]=p),b&&(pe["Source ID"]=b)),c==="claim"&&A&&(pe["Claim link"]=A),xe&&F&&$.trim()&&(pe.Repository=`${F}/${$}`,pe.Visibility=ee)),x.jsx("div",{className:"gate-prompt",children:x.jsx("div",{className:"gate-config-summary",children:Object.entries(pe).map(([Re,Nt])=>x.jsxs("div",{children:[x.jsxs("strong",{children:[Re,":"]})," ",Nt.startsWith("http")?x.jsx("a",{href:Nt,target:"_blank",rel:"noopener noreferrer",children:Nt}):Nt]},Re))})})}return x.jsxs("div",{className:"gate-prompt",children:[x.jsxs("h3",{children:["Setup ",l.projectName]}),x.jsx("p",{className:"gate-summary",children:"Infrastructure"}),x.jsxs("div",{className:"gate-option-group",children:[x.jsxs("button",{type:"button",className:`gate-option ${c==="claim"?"active":""}`,onClick:()=>d("claim"),disabled:te,children:[x.jsx("span",{className:"gate-option-title",children:"Provision"}),x.jsx("span",{className:"gate-option-desc",children:"Auto-provision database & Electric Cloud (72h)"})]}),s&&x.jsxs("button",{type:"button",className:`gate-option ${c==="local"?"active":""}`,onClick:()=>d("local"),disabled:te,children:[x.jsx("span",{className:"gate-option-title",children:"Local"}),x.jsx("span",{className:"gate-option-desc",children:"Run with Docker Compose on your machine"})]}),x.jsxs("button",{type:"button",className:`gate-option ${c==="cloud"?"active":""}`,onClick:()=>d("cloud"),disabled:te,children:[x.jsx("span",{className:"gate-option-title",children:"Bring your own"}),x.jsx("span",{className:"gate-option-desc",children:"Provide your own database & Electric details"})]})]}),c==="claim"&&x.jsx("div",{className:"question",children:ne?x.jsxs("div",{style:{fontSize:"0.85em"},children:[x.jsx("p",{style:{color:"var(--color-done, #4c4)",margin:"0 0 6px"},children:"Resources provisioned successfully (72h TTL)."}),x.jsxs("div",{style:{background:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.1)",borderRadius:6,padding:"8px 10px",margin:"6px 0",fontFamily:"monospace",fontSize:"0.9em",lineHeight:1.6,wordBreak:"break-all"},children:[x.jsxs("div",{children:[x.jsx("strong",{children:"Database URL:"})," ",p]}),x.jsxs("div",{children:[x.jsx("strong",{children:"Source ID:"})," ",b]}),x.jsxs("div",{children:[x.jsx("strong",{children:"Electric URL:"})," ",y]})]}),A&&x.jsxs("p",{style:{margin:"8px 0 0"},children:["Claim into your account:"," ",x.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:A})]})]}):x.jsxs(x.Fragment,{children:[x.jsx("p",{style:{fontSize:"0.85em",opacity:.7,margin:"0 0 8px"},children:"Automatically provision a Neon Postgres database and Electric Cloud source. Resources are available for 72 hours."}),x.jsx("button",{className:"gate-btn gate-btn-primary",onClick:L,disabled:H||T,style:{marginBottom:8},children:H?"Provisioning...":"Provision Resources"}),H&&x.jsx("p",{style:{fontSize:"0.85em",opacity:.7},children:"This may take 30-60 seconds..."}),R&&x.jsx("p",{style:{color:"var(--color-error, #e55)",fontSize:"0.85em"},children:R})]})}),c==="cloud"&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"question",children:[x.jsx("label",{children:"Database URL"}),x.jsx("input",{type:"text",value:p,onChange:pe=>m(pe.target.value),disabled:T,placeholder:"postgresql://user:pass@host:5432/dbname"})]}),x.jsxs("div",{className:"question",children:[x.jsx("label",{children:"Electric URL"}),x.jsx("input",{type:"text",value:y,onChange:pe=>g(pe.target.value),disabled:T,placeholder:"https://api.electric-sql.cloud"})]}),x.jsxs("div",{className:"question",children:[x.jsx("label",{children:"Source ID"}),x.jsx("input",{type:"text",value:b,onChange:pe=>S(pe.target.value),disabled:T,placeholder:"Your Electric Cloud source ID"})]}),x.jsxs("div",{className:"question",children:[x.jsx("label",{children:"Secret"}),x.jsx("input",{type:"password",value:E,onChange:pe=>j(pe.target.value),disabled:T,placeholder:"Your Electric Cloud secret"})]})]}),G&&x.jsxs(x.Fragment,{children:[x.jsx("p",{className:"gate-summary",style:{marginTop:16},children:"GitHub Repository"}),x.jsx("div",{className:"gate-option-group",children:x.jsx("button",{type:"button",className:`gate-option ${xe?"active":""}`,onClick:()=>z(!xe),disabled:T,children:x.jsx("span",{className:"gate-option-title",children:"Create a GitHub repo for this project"})})}),xe&&x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"question",children:[x.jsx("label",{children:"Account"}),l.ghAccounts.length>1?x.jsx("select",{value:F,onChange:pe=>le(pe.target.value),disabled:T,children:l.ghAccounts.map(pe=>x.jsxs("option",{value:pe.login,children:[pe.login," ",pe.type==="org"?"(org)":"(personal)"]},pe.login))}):x.jsx("input",{type:"text",value:l.ghAccounts[0].login,disabled:!0})]}),x.jsxs("div",{className:"question",children:[x.jsx("label",{children:"Repository name"}),x.jsx("input",{type:"text",value:$,onChange:pe=>U(pe.target.value),disabled:T,placeholder:"my-app"})]}),x.jsxs("div",{className:"question",children:[x.jsx("label",{children:"Visibility"}),x.jsxs("div",{className:"gate-option-group",children:[x.jsx("button",{type:"button",className:`gate-option ${ee==="private"?"active":""}`,onClick:()=>se("private"),disabled:T,children:x.jsx("span",{className:"gate-option-title",children:"Private"})}),x.jsx("button",{type:"button",className:`gate-option ${ee==="public"?"active":""}`,onClick:()=>se("public"),disabled:T,children:x.jsx("span",{className:"gate-option-title",children:"Public"})})]})]})]})]}),x.jsx("div",{className:"gate-actions",children:x.jsx("button",{className:"gate-btn gate-btn-primary",onClick:Z,disabled:T||c==="cloud"&&!ce||c==="claim"&&!ve||!be,children:te?"Configuring...":"Start"})})]})}function uN({sessionId:t,event:l,onResolved:a,resolved:r,resolvedSummary:o}){const s=l.questions?.length?l.questions:[{question:l.question,options:l.options}],c=s.length>1,d=s.some(W=>W.multiSelect),p=c||d,[m,y]=k.useState({}),[g,b]=k.useState({}),[S,E]=k.useState({}),[j,N]=k.useState({}),[C,A]=k.useState(!1),D=C||!!r;function te(){const W={};for(const R of s)if(R.multiSelect){const V=g[R.question],G=j[R.question]?.trim(),F=V?[...V]:[];G&&F.push(G),W[R.question]=F.join(", ")}else W[R.question]=m[R.question]||j[R.question]?.trim()||"";return W}function P(W){const R=Object.entries(W).filter(([,V])=>V);return R.length===1?R[0][1].slice(0,80):R.map(([,V])=>V.slice(0,40)).join("; ").slice(0,120)}async function H(W,R){y(G=>({...G,[W]:R})),A(!0);const V={[W]:R};try{await $f(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:V,_summary:R}),a(R)}catch{y(G=>({...G,[W]:""})),A(!1)}}async function _(){const W=te(),R=P(W);A(!0);try{await $f(t,"ask_user_question",{toolUseId:l.tool_use_id,answers:W,_summary:R}),a(R)}catch{A(!1)}}function ne(W,R){b(V=>{const G=new Set(V[W]??[]);return G.has(R)?G.delete(R):G.add(R),{...V,[W]:G}})}if(r){const W=o||"";return x.jsxs("div",{className:"gate-prompt",children:[x.jsx("h3",{children:"Question"}),s.map(R=>x.jsxs("div",{className:"gate-question-section",children:[R.header&&x.jsx("span",{className:"gate-question-header",children:R.header}),x.jsx("p",{className:"gate-summary",children:R.question})]},R.question)),x.jsx("div",{className:"gate-answer-summary",children:W})]})}return x.jsxs("div",{className:"gate-prompt",children:[x.jsx("h3",{children:"Question"}),s.map(W=>{const R=W.options&&W.options.length>0,V=S[W.question];return x.jsxs("div",{className:"gate-question-section",children:[W.header&&x.jsx("span",{className:"gate-question-header",children:W.header}),x.jsx("p",{className:"gate-summary",children:W.question}),R&&W.multiSelect&&x.jsxs("div",{className:"gate-option-group-vert",children:[W.options?.map(G=>{const F=g[W.question]?.has(G.label)??!1;return x.jsxs("button",{type:"button",className:`gate-option gate-option-checkbox ${F?"checked":""}`,onClick:()=>ne(W.question,G.label),disabled:D,children:[x.jsx("span",{className:"gate-checkbox-indicator",children:F?"☑":"☐"}),x.jsx("span",{className:"gate-option-title",children:G.label}),G.description&&x.jsx("span",{className:"gate-option-desc",children:G.description})]},G.label)}),!V&&x.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(G=>({...G,[W.question]:!0})),disabled:D,children:x.jsx("span",{className:"gate-option-title",children:"Other..."})}),V&&x.jsx("div",{className:"question",children:x.jsx("input",{type:"text",value:j[W.question]||"",onChange:G=>N(F=>({...F,[W.question]:G.target.value})),disabled:D,placeholder:"Type your answer..."})})]}),R&&!W.multiSelect&&x.jsxs("div",{className:"gate-option-group-vert",children:[W.options?.map(G=>{const F=m[W.question]===G.label;return x.jsxs("button",{type:"button",className:`gate-option ${F?"selected":""}`,onClick:()=>p?y(le=>({...le,[W.question]:G.label})):H(W.question,G.label),disabled:D,children:[x.jsx("span",{className:"gate-option-title",children:G.label}),G.description&&x.jsx("span",{className:"gate-option-desc",children:G.description})]},G.label)}),!V&&x.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>E(G=>({...G,[W.question]:!0})),disabled:D,children:x.jsx("span",{className:"gate-option-title",children:"Other..."})}),V&&x.jsx("div",{className:"question",children:x.jsx("input",{type:"text",value:j[W.question]||"",onChange:G=>{const F=G.target.value;N(le=>({...le,[W.question]:F})),y(le=>({...le,[W.question]:""}))},disabled:D,placeholder:"Type your answer..."})})]}),!R&&x.jsx("div",{className:"question",children:x.jsx("textarea",{value:j[W.question]||"",onChange:G=>N(F=>({...F,[W.question]:G.target.value})),disabled:D,rows:3,placeholder:"Type your answer..."})})]},W.question)}),p&&x.jsx("div",{className:"gate-actions",children:x.jsx("button",{className:"gate-btn gate-btn-primary",onClick:_,disabled:D,children:C?"Submitting...":"Submit"})}),!p&&!s[0]?.options?.length&&x.jsx("div",{className:"gate-actions",children:x.jsx("button",{className:"gate-btn gate-btn-primary",onClick:_,disabled:D||!j[s[0]?.question]?.trim(),children:C?"Submitting...":"Submit"})})]})}function oN(t){switch(t){case"infra_config_prompt":return"Project configured";case"ask_user_question":return"Question answered";default:return"Decision made"}}function sN({sessionId:t,entry:l,entryIndex:a,onResolved:r,duration:o}){const s=m=>r(a,m),{resolved:c,resolvedSummary:d}=l;let p=null;switch(l.event.type){case"infra_config_prompt":p=x.jsx(rN,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedDetails:l.resolvedDetails});break;case"ask_user_question":p=x.jsx(uN,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedSummary:d});break;default:return null}return c?x.jsxs("div",{className:"gate-answered",children:[x.jsxs("div",{className:"gate-answered-header",children:[x.jsx("span",{className:"prefix done",children:"[gate]"}),x.jsx("span",{className:"gate-resolved-label",children:oN(l.event.type)}),x.jsx(ci,{value:o})]}),p]}):p}const xv={pending:"○",in_progress:"◉",completed:"✓"};function cN(t){switch(t){case"completed":return"todo-status-done";case"in_progress":return"todo-status-progress";default:return"todo-status-pending"}}function fN({entry:t}){const{todos:l}=t,a=l.filter(c=>c.status==="completed").length,r=l.filter(c=>c.status==="in_progress").length,o=l.length,s=[];return a>0&&s.push(`${a}/${o} done`),r>0&&s.push(`${r} in progress`),s.length===0&&s.push(`${o} pending`),x.jsxs("details",{className:"tool-inline",open:!0,children:[x.jsxs("summary",{children:[x.jsx("span",{className:"tool-inline-name",children:"TodoWrite"}),x.jsx("span",{className:"tool-inline-summary",children:s.join(", ")})]}),x.jsx("div",{className:"tool-inline-body",children:x.jsx("ul",{className:"todo-list",children:l.map(c=>x.jsxs("li",{className:"todo-item",children:[x.jsx("span",{className:`todo-status-icon ${cN(c.status)}`,children:xv[c.status]||xv.pending}),x.jsx("span",{className:"todo-content",children:c.content}),c.priority&&x.jsx("span",{className:"todo-priority",children:c.priority})]},c.id))})})]})}const dN=3;function Sv(t){return t.kind==="tool_use"}function hN(t,l){const a=[];let r=0;for(;r<t.length;){const o=t[r];if(Sv(o)){const s=[];for(;r<t.length&&Sv(t[r]);)s.push({entry:t[r],index:r,duration:l[r]}),r++;if(s.length>=dN)a.push({type:"group",items:s});else for(const c of s)a.push({type:"single",...c});continue}a.push({type:"single",entry:o,index:r,duration:l[r]}),r++}return a}function mN(t){if(t.kind!=="user_prompt")return t.ts}function Ob(t){if(t<1e3)return`${t}ms`;const l=t/1e3;if(l<60)return`${l.toFixed(0)}s`;const a=Math.floor(l/60),r=l%60;return`${a}m ${r.toFixed(0)}s`}function pN({sinceTs:t}){const[l,a]=k.useState("");return k.useEffect(()=>{const r=new Date(t).getTime(),o=()=>{const c=Date.now()-r;a(Ob(Math.max(0,c)))};o();const s=setInterval(o,1e3);return()=>clearInterval(s)},[t]),x.jsxs("div",{className:"console-entry waiting-indicator",children:[x.jsx("span",{className:"spinner-inline"}),x.jsx("span",{className:"waiting-label",children:"Waiting for response..."}),x.jsx("span",{className:"duration",children:l})]})}function Mb({sessionId:t,entries:l,isLive:a,isComplete:r,onGateResolved:o}){const s=k.useRef(null),c=k.useRef(null),[d,p]=k.useState(!0),m=l.length,y=k.useCallback(()=>{c.current?.scrollIntoView({behavior:"smooth"})},[]),g=k.useCallback(()=>{const C=s.current;if(!C)return;const D=C.scrollHeight-C.scrollTop-C.clientHeight<80;p(D)},[]);k.useEffect(()=>{d&&c.current?.scrollIntoView({behavior:"smooth"})},[m,d]);const b=[];let S=null;for(const C of l){const A=mN(C);if(C.kind==="user_prompt"||!A)b.push(null);else if(S){const D=new Date(A).getTime()-new Date(S).getTime();b.push(D>=0?Ob(D):null)}else b.push(null);A&&(S=A)}const E=k.useMemo(()=>hN(l,b),[l,b]);let j=!1,N="";if(a&&!r&&l.length>0){const C=l[l.length-1],A=C.kind==="tool_use"&&C.tool_response===null,D=C.kind==="gate"&&!C.resolved,te=C.kind==="assistant_message";!A&&!D&&!te&&(j=!0,N=S||new Date().toISOString())}return x.jsxs("div",{className:"console",ref:s,onScroll:g,children:[E.map(C=>{if(C.type==="group")return x.jsx(aN,{items:C.items},`group-${C.items[0].index}`);const{entry:A,index:D,duration:te}=C;switch(A.kind){case"log":return x.jsx(ZR,{entry:A,duration:te},`log-${D}`);case"user_prompt":return x.jsx(PR,{entry:A},`user-${D}`);case"tool_use":return x.jsx(hd,{entry:A,duration:te},A.tool_use_id||`tool-${D}`);case"assistant_message":return x.jsx(WR,{entry:A,duration:te},`text-${D}`);case"todo_widget":return x.jsx(fN,{entry:A},`todo-${D}`);case"gate":return x.jsx(sN,{sessionId:t,entry:A,entryIndex:D,onResolved:o,duration:te},`gate-${D}`);default:return null}}),j&&x.jsx(pN,{sinceTs:N}),x.jsx("div",{ref:c}),!d&&x.jsx("button",{type:"button",className:"jump-to-bottom",onClick:y,children:"Jump to latest"})]})}function Na({variant:t="line",width:l}){const a=t==="block"?"skeleton skeleton-block":"skeleton skeleton-line";return x.jsx("div",{className:a,style:l?{width:l}:void 0})}function Lb(t){const[l,a]=k.useState([]),[r,o]=k.useState(!1),[s,c]=k.useState(!1),[d,p]=k.useState(null),[m,y]=k.useState({totalCostUsd:0,totalTurns:0,totalDurationMs:0}),g=k.useRef("-1"),b=k.useCallback(E=>{a(j=>{switch(E.type){case"log":return[...j,{kind:"log",level:E.level,message:E.message,ts:E.ts}];case"user_prompt":return[...j,{kind:"user_prompt",message:E.message}];case"pre_tool_use":return[...j,{kind:"tool_use",tool_name:E.tool_name,tool_use_id:E.tool_use_id,tool_input:E.tool_input,tool_response:null,agent:E.agent,ts:E.ts}];case"post_tool_use":{const N=[...j];for(let C=N.length-1;C>=0;C--){const A=N[C];if(A.kind==="tool_use"&&A.tool_use_id===E.tool_use_id){N[C]={...A,tool_response:E.tool_response,agent:A.agent||E.agent};break}}return N}case"post_tool_use_failure":{const N=[...j];for(let C=N.length-1;C>=0;C--){const A=N[C];if(A.kind==="tool_use"&&A.tool_use_id===E.tool_use_id){N[C]={...A,tool_response:`Error: ${E.error}`,agent:A.agent||E.agent};break}}return N}case"assistant_message":return[...j,{kind:"assistant_message",text:E.text,agent:E.agent,ts:E.ts}];case"todo_write":{const N=j.findIndex(A=>A.kind==="todo_widget"),C={kind:"todo_widget",tool_use_id:E.tool_use_id,todos:E.todos,ts:E.ts};if(N>=0){const A=[...j];return A[N]=C,A}return[...j,C]}case"ask_user_question":case"infra_config_prompt":return[...j,{kind:"gate",event:E,resolved:!1,ts:E.ts}];case"gate_resolved":{const N=[...j];let C=!1;for(let A=N.length-1;A>=0;A--){const D=N[A];if(D.kind==="gate"&&!D.resolved){N[A]={...D,resolved:!0,resolvedSummary:E.summary||D.resolvedSummary,resolvedDetails:E.details},C=!0;break}}if(!C&&E.details)for(let A=N.length-1;A>=0;A--){const D=N[A];if(D.kind==="gate"&&D.resolved&&!D.resolvedDetails){N[A]={...D,resolvedDetails:E.details};break}}return N}case"session_end":case"session_start":case"app_status":return j;default:return j}}),E.type==="app_status"&&p({status:E.status,port:E.port,previewUrl:E.previewUrl}),E.type==="session_end"&&(c(!0),(E.cost_usd!=null||E.num_turns!=null||E.duration_ms!=null)&&y(j=>({totalCostUsd:j.totalCostUsd+(E.cost_usd??0),totalTurns:j.totalTurns+(E.num_turns??0),totalDurationMs:j.totalDurationMs+(E.duration_ms??0)})))},[]);k.useEffect(()=>{if(!t)return;a([]),o(!1),c(!1),p(null),y({totalCostUsd:0,totalTurns:0,totalDurationMs:0}),g.current="-1";let E=!1,j=null,N=0;const C=10;function A(){if(E)return;if(N>=C){console.warn(`[sse] Giving up on session ${t} after ${C} retries`),o(!1);return}const D=Md(t),te=new URLSearchParams;D&&te.set("token",D),g.current!=="-1"&&te.set("offset",g.current);const P=te.toString(),H=`/api/sessions/${t}/events${P?`?${P}`:""}`;j=new EventSource(H),j.onopen=()=>{E||(N=0,o(!0))},j.onmessage=_=>{if(!E){_.lastEventId&&(g.current=_.lastEventId);try{const ne=JSON.parse(_.data);b(ne)}catch{}}},j.onerror=()=>{if(E)return;j?.close(),N++;const _=Math.min(1e3*2**(N-1),3e4);setTimeout(A,_)}}return A(),()=>{E=!0,j&&(j.close(),j=null)}},[t,b]);const S=k.useCallback((E,j)=>{a(N=>{const C=[...N],A=C[E];return A?.kind==="gate"&&(C[E]={...A,resolved:!0,resolvedSummary:j}),C})},[]);return{entries:l,isLive:r,isComplete:s,appStatus:d,cost:m,markGateResolved:S}}function gN(t){const l=[];for(const a of t)switch(a.kind){case"user_prompt":l.push(`## User
|
|
228
228
|
|
|
229
229
|
${a.message}
|
|
230
230
|
`);break;case"assistant_message":l.push(`## Assistant
|
|
231
231
|
|
|
232
232
|
${a.text}
|
|
233
233
|
`);break;case"log":l.push(`[${a.level}] ${a.message}`);break;case"tool_use":{l.push(`### Tool: ${a.tool_name}`),l.push("**Input:**"),l.push("```json"),l.push(JSON.stringify(a.tool_input,null,2)),l.push("```"),a.tool_response!=null&&(l.push("**Output:**"),l.push("```"),l.push(a.tool_response),l.push("```")),l.push("");break}}return l.join(`
|
|
234
|
-
`)}function pz(){const{id:t}=Kv(),l=tl(),a=Da(),{openMobileDrawer:r}=$v(),{showSettings:o,setShowSettings:s,authSource:c,hasGhToken:d,refreshSettings:p,refreshSessions:m}=Po(),[y,g]=k.useState(!1);k.useEffect(()=>{if(!y)return;const I=()=>g(!1);return document.addEventListener("click",I),()=>document.removeEventListener("click",I)},[y]);const[b,x]=k.useState(t==="new"),[E,A]=k.useState(t==="new"?null:t??null),z=k.useRef(!1);k.useEffect(()=>{t&&t!=="new"&&(A(t),x(!1),z.current=!1)},[t]),k.useEffect(()=>{if(t!=="new"||z.current)return;const I=l.state;if(!I?.description){a("/",{replace:!0});return}z.current=!0,x(!0),Gw(I.description).then(({sessionId:B,session:ee})=>{i0(ee),m(),A(B),x(!1),a(`/session/${B}`,{replace:!0})}).catch(B=>{console.error("Failed to create session:",B),a("/",{replace:!0})})},[t,l.state,a,m]);const C=E,{entries:j,isLive:D,isComplete:te,appStatus:P,markGateResolved:H}=Ub(C),[_,ne]=k.useState(()=>C?ky(C)??null:null);k.useEffect(()=>{if(C){const I=ky(C);ne(I??null)}},[C]),k.useEffect(()=>{C&&te&&(wy(C,{status:"complete"}),m())},[C,te,m]);const J=P?.port,R=P?.previewUrl,V=k.useCallback(async I=>{if(C)try{await Vw(C,I)}catch(B){console.error("Failed to send iteration:",B)}},[C]),G=k.useCallback(async()=>{if(C)try{await Fw(C),wy(C,{status:"complete"}),ne(I=>I?{...I,status:"complete"}:null),m()}catch(I){console.error("Failed to interrupt:",I)}},[C,m]),F=k.useCallback(()=>{const I=mz(j);navigator.clipboard.writeText(I)},[j]);if(!t)return null;const le=_?.status==="running"&&!te;return S.jsxs(S.Fragment,{children:[o&&S.jsx(k0,{authSource:c,hasGhToken:d??!1,onKeySaved:p,onClose:()=>s(!1),onCopyLog:C?F:void 0}),S.jsxs("div",{className:"session-header",children:[S.jsx("button",{type:"button",className:"mobile-hamburger",onClick:r,"aria-label":"Open menu",children:S.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[S.jsx("title",{children:"Menu"}),S.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),S.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),S.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),S.jsx("span",{className:"session-header-name",children:b?"Initializing...":_?.projectName??"Loading..."}),le&&S.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),te&&S.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)"},children:"Complete"}),!b&&!D&&!te&&S.jsx("span",{className:"session-header-status",style:{color:"var(--yellow)"},children:"Connecting..."}),S.jsx("span",{className:"session-header-actions-group",children:P&&S.jsx("a",{href:R??(J?`http://localhost:${J}`:"#"),target:"_blank",rel:"noopener noreferrer",className:`session-header-action ${P.status==="running"?"primary":""}`,children:"Preview"})}),S.jsx("button",{type:"button",className:"session-header-overflow",onClick:I=>{I.stopPropagation(),g(B=>!B)},"aria-label":"More options",children:S.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[S.jsx("title",{children:"More"}),S.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),S.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),S.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),y&&S.jsxs("div",{className:"session-header-overflow-menu",children:[P&&S.jsx("a",{href:R??(J?`http://localhost:${J}`:"#"),target:"_blank",rel:"noopener noreferrer",className:"session-header-overflow-menu-item",onClick:()=>g(!1),children:"Preview App"}),S.jsx("button",{type:"button",className:"session-header-overflow-menu-item",onClick:()=>{g(!1),s(I=>!I)},children:"Settings"})]})]}),S.jsxs("div",{className:"session-content",children:[P&&(R||J)&&S.jsx("div",{className:"mobile-preview-bar",children:S.jsxs("a",{href:R??`http://localhost:${J}`,target:"_blank",rel:"noopener noreferrer",className:"mobile-preview-link",children:[S.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("title",{children:"Open preview"}),S.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),S.jsx("polyline",{points:"15 3 21 3 21 9"}),S.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"Open Preview"]})}),b?S.jsxs("div",{className:"session-initializing",children:[S.jsx("div",{className:"session-initializing-spinner"}),S.jsx("span",{children:"Setting up your project..."})]}):!D&&!te?S.jsxs("div",{className:"session-loading",children:[S.jsx(Yr,{variant:"block"}),S.jsx(Yr,{variant:"line",width:"80%"}),S.jsx(Yr,{variant:"line",width:"60%"})]}):S.jsx(Lb,{sessionId:C??"",entries:j,isLive:D,isComplete:te,onGateResolved:H}),S.jsx(w0,{onSubmit:V,placeholder:le?"Message...":"Ask anything...",disabled:b,isRunning:le,onCancel:G})]})]})}function gz({name:t,code:l,participants:a,revoked:r,isLive:o,onLeave:s,onLinkSession:c}){const[d,p]=k.useState(!1),m=k.useCallback(()=>{navigator.clipboard.writeText(l),p(!0),setTimeout(()=>p(!1),2e3)},[l]);return S.jsxs("div",{className:"shared-session-header",children:[S.jsx("span",{className:"shared-session-header-name",children:t}),o&&S.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),S.jsx("span",{className:"shared-session-header-participants",children:a.map(y=>S.jsx("span",{className:"shared-session-participant",title:y.displayName,children:y.displayName.slice(0,2).toUpperCase()},y.id))}),S.jsx("span",{className:"invite-code-label",children:"Join code:"}),S.jsxs("button",{type:"button",className:"invite-code-btn",onClick:m,children:[d?"Copied!":l,r&&" (revoked)"]}),S.jsx("button",{type:"button",className:"session-header-action primary",onClick:c,children:"Link Session"}),S.jsx("button",{type:"button",className:"session-header-action",onClick:s,children:"Leave"})]})}const Ao={name:"",code:"",participants:[],sessionIds:[],sessionNames:new Map,revoked:!1};function yz(t,l){switch(l.type){case"shared_session_created":return{...t,name:l.name,code:l.code};case"participant_joined":return t.participants.some(r=>r.id===l.participant.id)?t:{...t,participants:[...t.participants,l.participant]};case"participant_left":return{...t,participants:t.participants.filter(a=>a.id!==l.participantId)};case"session_linked":{if(t.sessionIds.includes(l.sessionId))return t;const a=new Map(t.sessionNames);return l.sessionName&&a.set(l.sessionId,l.sessionName),{...t,sessionIds:[...t.sessionIds,l.sessionId],sessionNames:a}}case"session_unlinked":{const a=new Map(t.sessionNames);return a.delete(l.sessionId),{...t,sessionIds:t.sessionIds.filter(r=>r!==l.sessionId),sessionNames:a}}case"code_revoked":return{...t,revoked:!0};default:return t}}function vz(t){const[l,a]=k.useState(Ao),[r,o]=k.useState(!1),s=k.useRef(Ao),c=k.useRef("-1"),d=k.useCallback(p=>{const m=yz(s.current,p);s.current=m,a(m)},[]);return k.useEffect(()=>{if(!t)return;a(Ao),s.current=Ao,o(!1),c.current="-1";let p=!1,m=null,y=0;const g=10;function b(){if(p)return;if(y>=g){o(!1);return}const x=c0(t),E=new URLSearchParams;x&&E.set("token",x),c.current!=="-1"&&E.set("offset",c.current);const A=E.toString(),z=`/api/shared-sessions/${t}/events${A?`?${A}`:""}`;m=new EventSource(z),m.onopen=()=>{p||(y=0,o(!0))},m.onmessage=C=>{if(!p){C.lastEventId&&(c.current=C.lastEventId);try{const j=JSON.parse(C.data);d(j)}catch{}}},m.onerror=()=>{if(p)return;m?.close(),y++;const C=Math.min(1e3*2**(y-1),3e4);setTimeout(b,C)}}return b(),()=>{p=!0,m&&(m.close(),m=null)}},[t,d]),{...l,isLive:r}}function bz(){const{code:t}=Kv(),l=Da(),{sessions:a,refreshJoinedSharedSessions:r}=Po(),[o,s]=k.useState(null),[c,d]=k.useState(null),[p,m]=k.useState(!0),[y,g]=k.useState(!1),[b,x]=k.useState(new Set);k.useEffect(()=>{if(!t)return;let P=!1;async function H(){try{const _=await Jw(t);if(P)return;if(_.revoked){d("This invite code has been revoked."),m(!1);return}s(_.id),await Ww(_.id),m(!1)}catch(_){if(P)return;d(_ instanceof Error?_.message:"Failed to join shared session"),m(!1)}}return H(),()=>{P=!0}},[t]);const E=vz(o);k.useEffect(()=>{t&&E.name&&o&&(lk({id:o,code:t,name:E.name}),r())},[t,E.name,o,r]);const A=k.useRef(!1);k.useEffect(()=>{E.sessionIds.length>0&&!A.current&&(A.current=!0,x(new Set([E.sessionIds[0]])))},[E.sessionIds]);const z=k.useCallback(async()=>{if(o){try{await ek(o)}catch{}t&&(h0(t),r()),l("/")}},[o,t,l,r]),C=k.useCallback(async P=>{if(!o)return;const H=a.find(_=>_.id===P);try{await tk(o,P,H?.projectName||"",H?.description||""),g(!1),x(_=>new Set([..._,P]))}catch(_){console.error("Failed to link session:",_)}},[o,a]),j=k.useCallback(async P=>{if(o)try{await nk(o,P),x(H=>{const _=new Set(H);return _.delete(P),_})}catch(H){console.error("Failed to unlink session:",H)}},[o]),D=k.useCallback(P=>{x(H=>{const _=new Set(H);return _.has(P)?_.delete(P):_.add(P),_})},[]);if(c)return S.jsxs("div",{className:"shared-session-error",children:[S.jsx("h2",{children:"Cannot join shared session"}),S.jsx("p",{children:c}),S.jsx("button",{type:"button",className:"btn",onClick:()=>l("/"),children:"Go Home"})]});if(p||!o)return S.jsxs("div",{style:{padding:16},children:[S.jsx(Yr,{variant:"block"}),S.jsx(Yr,{variant:"line",width:"60%"})]});const te=a.filter(P=>!E.sessionIds.includes(P.id));return S.jsxs(S.Fragment,{children:[S.jsx(gz,{name:E.name,code:E.code,participants:E.participants,revoked:E.revoked,isLive:E.isLive,onLeave:z,onLinkSession:()=>g(!0)}),S.jsxs("div",{className:"shared-session-content",children:[S.jsxs("div",{className:"shared-session-toolbar",children:[S.jsxs("span",{className:"shared-session-toolbar-label",children:[E.sessionIds.length," session",E.sessionIds.length!==1?"s":""," linked"]}),S.jsx("button",{type:"button",className:"shared-session-link-btn",onClick:()=>g(!0),children:"+ Link Session"})]}),E.sessionIds.length===0?S.jsx("div",{className:"shared-session-empty",children:S.jsx("p",{children:'No sessions linked yet. Click "Link Session" to add one.'})}):S.jsx("div",{className:"shared-session-panels",children:E.sessionIds.map(P=>S.jsx(Sz,{sessionId:P,sessionName:E.sessionNames.get(P),expanded:b.has(P),onToggle:()=>D(P),onUnlink:j},P))})]}),y&&S.jsx("div",{className:"modal-overlay",onClick:()=>g(!1),children:S.jsxs("div",{className:"modal-card",onClick:P=>P.stopPropagation(),children:[S.jsx("div",{className:"modal-title",children:"Link Session"}),S.jsx("div",{className:"modal-body",children:"Select a session to link to this shared room."}),te.length===0?S.jsx("p",{style:{color:"var(--text-subtle)",fontSize:13},children:"No sessions available to link."}):S.jsx("div",{className:"link-session-list",children:te.map(P=>S.jsx("button",{type:"button",className:"link-session-item",onClick:()=>C(P.id),children:P.projectName||P.description.slice(0,60)||P.id.slice(0,8)},P.id))}),S.jsx("div",{className:"modal-actions",children:S.jsx("button",{type:"button",className:"modal-btn",onClick:()=>g(!1),children:"Cancel"})})]})})]})}function xz(){return S.jsxs("svg",{className:"shared-session-panel-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-label":"Toggle panel",children:[S.jsx("title",{children:"Toggle panel"}),S.jsx("polyline",{points:"4 6 8 10 12 6"})]})}function Sz({sessionId:t,sessionName:l,expanded:a,onToggle:r,onUnlink:o}){const{entries:s,isLive:c,isComplete:d,markGateResolved:p}=Ub(t);return S.jsxs("div",{className:`shared-session-panel ${a?"expanded":"collapsed"}`,children:[S.jsxs("div",{className:"shared-session-panel-header",onClick:r,children:[S.jsx(xz,{}),S.jsx("span",{className:"shared-session-panel-id",children:l||t.slice(0,8)}),d?S.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)",fontSize:11},children:"Offline"}):c?S.jsx("span",{className:"session-header-status",style:{color:"var(--green)",fontSize:11},children:"Live"}):null,S.jsx("button",{type:"button",className:"shared-session-unlink-btn",onClick:m=>{m.stopPropagation(),o(t)},title:"Unlink session",children:"Unlink"})]}),S.jsx("div",{className:"shared-session-panel-body",children:S.jsx(Lb,{sessionId:t,entries:s,isLive:c,isComplete:d,onGateResolved:p})})]})}const Ez=mw([{element:S.jsx(nC,{}),children:[{path:"/",element:S.jsx(aC,{})},{path:"/session/:id",element:S.jsx(pz,{})},{path:"/shared/:code",element:S.jsx(bz,{})}]}]),Sv=document.getElementById("root");Sv&&tS.createRoot(Sv).render(S.jsx(k.StrictMode,{children:S.jsx(Tw,{router:Ez})}));
|
|
234
|
+
`)}function yN(){const{id:t}=Zv(),l=tl(),a=Oa(),{openMobileDrawer:r}=Kv(),{showSettings:o,setShowSettings:s,authSource:c,hasGhToken:d,refreshSettings:p,refreshSessions:m}=Po(),[y,g]=k.useState(!1);k.useEffect(()=>{if(!y)return;const U=()=>g(!1);return document.addEventListener("click",U),()=>document.removeEventListener("click",U)},[y]);const[b,S]=k.useState(t==="new"),[E,j]=k.useState(t==="new"?null:t??null),N=k.useRef(!1);k.useEffect(()=>{t&&t!=="new"&&(j(t),S(!1),N.current=!1)},[t]),k.useEffect(()=>{if(t!=="new"||N.current)return;const U=l.state;if(!U?.description){a("/",{replace:!0});return}N.current=!0,S(!0),Yw(U.description).then(({sessionId:ee,session:se})=>{a0(se),m(),j(ee),S(!1),a(`/session/${ee}`,{replace:!0})}).catch(ee=>{console.error("Failed to create session:",ee),a("/",{replace:!0})})},[t,l.state,a,m]);const C=E,{entries:A,isLive:D,isComplete:te,appStatus:P,cost:H,markGateResolved:_}=Lb(C),[ne,W]=k.useState(()=>C?Ty(C)??null:null);k.useEffect(()=>{if(C){const U=Ty(C);W(U??null)}},[C]),k.useEffect(()=>{C&&te&&(Cy(C,{status:"complete"}),m())},[C,te,m]);const R=P?.port,V=P?.previewUrl,G=k.useCallback(async U=>{if(C)try{await Gw(C,U)}catch(ee){console.error("Failed to send iteration:",ee)}},[C]),F=k.useCallback(async()=>{if(C)try{await Vw(C),Cy(C,{status:"complete"}),W(U=>U?{...U,status:"complete"}:null),m()}catch(U){console.error("Failed to interrupt:",U)}},[C,m]),le=k.useCallback(()=>{const U=gN(A);navigator.clipboard.writeText(U)},[A]);if(!t)return null;const $=ne?.status==="running"&&!te;return x.jsxs(x.Fragment,{children:[o&&x.jsx(w0,{authSource:c,hasGhToken:d??!1,onKeySaved:p,onClose:()=>s(!1),onCopyLog:C?le:void 0}),x.jsxs("div",{className:"session-header",children:[x.jsx("button",{type:"button",className:"mobile-hamburger",onClick:r,"aria-label":"Open menu",children:x.jsxs("svg",{width:"22",height:"22",viewBox:"0 0 18 18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",children:[x.jsx("title",{children:"Menu"}),x.jsx("line",{x1:"3",y1:"4.5",x2:"15",y2:"4.5"}),x.jsx("line",{x1:"3",y1:"9",x2:"15",y2:"9"}),x.jsx("line",{x1:"3",y1:"13.5",x2:"15",y2:"13.5"})]})}),x.jsx("span",{className:"session-header-name",children:b?"Initializing...":ne?.projectName??"Loading..."}),$&&x.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),!b&&!D&&!te&&x.jsx("span",{className:"session-header-status",style:{color:"var(--yellow)"},children:"Connecting..."}),H.totalCostUsd>0&&x.jsxs("span",{className:"session-header-cost",title:`${H.totalTurns} turns`,children:["$",H.totalCostUsd.toFixed(2)]}),x.jsx("span",{className:"session-header-actions-group",children:P&&x.jsx("a",{href:V??(R?`http://localhost:${R}`:"#"),target:"_blank",rel:"noopener noreferrer",className:`session-header-action ${P.status==="running"?"primary":""}`,children:"Open App"})}),x.jsx("button",{type:"button",className:"session-header-overflow",onClick:U=>{U.stopPropagation(),g(ee=>!ee)},"aria-label":"More options",children:x.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[x.jsx("title",{children:"More"}),x.jsx("circle",{cx:"8",cy:"3",r:"1.5"}),x.jsx("circle",{cx:"8",cy:"8",r:"1.5"}),x.jsx("circle",{cx:"8",cy:"13",r:"1.5"})]})}),y&&x.jsxs("div",{className:"session-header-overflow-menu",children:[P&&x.jsx("a",{href:V??(R?`http://localhost:${R}`:"#"),target:"_blank",rel:"noopener noreferrer",className:"session-header-overflow-menu-item",onClick:()=>g(!1),children:"Open App"}),H.totalCostUsd>0&&x.jsxs("span",{className:"session-header-overflow-menu-item session-header-overflow-cost",children:["Cost: $",H.totalCostUsd.toFixed(2)," (",H.totalTurns," turns)"]}),x.jsx("button",{type:"button",className:"session-header-overflow-menu-item",onClick:()=>{g(!1),s(U=>!U)},children:"Settings"})]})]}),x.jsxs("div",{className:"session-content",children:[P&&(V||R)&&x.jsx("div",{className:"mobile-preview-bar",children:x.jsxs("a",{href:V??`http://localhost:${R}`,target:"_blank",rel:"noopener noreferrer",className:"mobile-preview-link",children:[x.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[x.jsx("title",{children:"Open App"}),x.jsx("path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}),x.jsx("polyline",{points:"15 3 21 3 21 9"}),x.jsx("line",{x1:"10",y1:"14",x2:"21",y2:"3"})]}),"Open App"]})}),b?x.jsxs("div",{className:"session-initializing",children:[x.jsx("div",{className:"session-initializing-spinner"}),x.jsx("span",{children:"Setting up your project..."})]}):!D&&!te?x.jsxs("div",{className:"session-loading",children:[x.jsx(Na,{variant:"block"}),x.jsx(Na,{variant:"line",width:"80%"}),x.jsx(Na,{variant:"line",width:"60%"})]}):x.jsx(Mb,{sessionId:C??"",entries:A,isLive:D,isComplete:te,onGateResolved:_}),x.jsx(E0,{onSubmit:G,placeholder:$?"Message...":"Ask anything...",disabled:b,isRunning:$,onCancel:F})]})]})}function vN({name:t,code:l,participants:a,revoked:r,isLive:o,onLeave:s,onLinkSession:c}){const[d,p]=k.useState(!1),m=k.useCallback(()=>{navigator.clipboard.writeText(l),p(!0),setTimeout(()=>p(!1),2e3)},[l]);return x.jsxs("div",{className:"shared-session-header",children:[x.jsx("span",{className:"shared-session-header-name",children:t}),o&&x.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),x.jsx("span",{className:"shared-session-header-participants",children:a.map(y=>x.jsx("span",{className:"shared-session-participant",title:y.displayName,children:y.displayName.slice(0,2).toUpperCase()},y.id))}),x.jsx("span",{className:"invite-code-label",children:"Join code:"}),x.jsxs("button",{type:"button",className:"invite-code-btn",onClick:m,children:[d?"Copied!":l,r&&" (revoked)"]}),x.jsx("button",{type:"button",className:"session-header-action primary",onClick:c,children:"Link Session"}),x.jsx("button",{type:"button",className:"session-header-action",onClick:s,children:"Leave"})]})}const Ao={name:"",code:"",participants:[],sessionIds:[],sessionNames:new Map,revoked:!1};function bN(t,l){switch(l.type){case"shared_session_created":return{...t,name:l.name,code:l.code};case"participant_joined":case"participant_left":return t;case"session_linked":{if(t.sessionIds.includes(l.sessionId))return t;const a=new Map(t.sessionNames);return l.sessionName&&a.set(l.sessionId,l.sessionName),{...t,sessionIds:[...t.sessionIds,l.sessionId],sessionNames:a}}case"session_unlinked":{const a=new Map(t.sessionNames);return a.delete(l.sessionId),{...t,sessionIds:t.sessionIds.filter(r=>r!==l.sessionId),sessionNames:a}}case"code_revoked":return{...t,revoked:!0};default:return t}}const xN=3e4,SN=3e4;function EN(t){const[l,a]=k.useState(Ao),[r,o]=k.useState(!1),s=k.useRef(Ao),c=k.useRef("-1"),d=k.useCallback(p=>{const m=bN(s.current,p);s.current=m,a(m)},[]);return k.useEffect(()=>{if(!t)return;a(Ao),s.current=Ao,o(!1),c.current="-1";let p=!1,m=null,y=0;const g=10;function b(){if(p)return;if(y>=g){o(!1);return}const S=s0(t),E=new URLSearchParams;S&&E.set("token",S),c.current!=="-1"&&E.set("offset",c.current);const j=E.toString(),N=`/api/shared-sessions/${t}/events${j?`?${j}`:""}`;m=new EventSource(N),m.onopen=()=>{p||(y=0,o(!0))},m.onmessage=C=>{if(!p){C.lastEventId&&(c.current=C.lastEventId);try{const A=JSON.parse(C.data);d(A)}catch{}}},m.onerror=()=>{if(p)return;m?.close(),y++;const C=Math.min(1e3*2**(y-1),3e4);setTimeout(b,C)}}return b(),()=>{p=!0,m&&(m.close(),m=null)}},[t,d]),k.useEffect(()=>{if(!t)return;let p=!1;async function m(){if(!p)try{await ek(t);const{participants:g}=await tk(t);p||(a(b=>({...b,participants:g})),s.current={...s.current,participants:g})}catch{}}m();const y=setInterval(m,Math.min(xN,SN));return()=>{p=!0,clearInterval(y)}},[t]),{...l,isLive:r}}function wN(){const{code:t}=Zv(),l=Oa(),{sessions:a,refreshJoinedSharedSessions:r}=Po(),[o,s]=k.useState(null),[c,d]=k.useState(null),[p,m]=k.useState(!0),[y,g]=k.useState(!1),[b,S]=k.useState(new Set);k.useEffect(()=>{if(!t)return;let P=!1;async function H(){try{const _=await Pw(t);if(P)return;if(_.revoked){d("This invite code has been revoked."),m(!1);return}s(_.id),await Jw(_.id),m(!1)}catch(_){if(P)return;d(_ instanceof Error?_.message:"Failed to join shared session"),m(!1)}}return H(),()=>{P=!0}},[t]);const E=EN(o);k.useEffect(()=>{t&&E.name&&o&&(ak({id:o,code:t,name:E.name}),r())},[t,E.name,o,r]);const j=k.useRef(!1);k.useEffect(()=>{E.sessionIds.length>0&&!j.current&&(j.current=!0,S(new Set([E.sessionIds[0]])))},[E.sessionIds]);const N=k.useCallback(async()=>{if(o){try{await Ww(o)}catch{}t&&(d0(t),r()),l("/")}},[o,t,l,r]),C=k.useCallback(async P=>{if(!o)return;const H=a.find(_=>_.id===P);try{await nk(o,P,H?.projectName||"",H?.description||""),g(!1),S(_=>new Set([..._,P]))}catch(_){console.error("Failed to link session:",_)}},[o,a]),A=k.useCallback(async P=>{if(o)try{await lk(o,P),S(H=>{const _=new Set(H);return _.delete(P),_})}catch(H){console.error("Failed to unlink session:",H)}},[o]),D=k.useCallback(P=>{S(H=>{const _=new Set(H);return _.has(P)?_.delete(P):_.add(P),_})},[]);if(c)return x.jsxs("div",{className:"shared-session-error",children:[x.jsx("h2",{children:"Cannot join shared session"}),x.jsx("p",{children:c}),x.jsx("button",{type:"button",className:"btn",onClick:()=>l("/"),children:"Go Home"})]});if(p||!o)return x.jsxs("div",{style:{padding:16},children:[x.jsx(Na,{variant:"block"}),x.jsx(Na,{variant:"line",width:"60%"})]});const te=a.filter(P=>!E.sessionIds.includes(P.id));return x.jsxs(x.Fragment,{children:[x.jsx(vN,{name:E.name,code:E.code,participants:E.participants,revoked:E.revoked,isLive:E.isLive,onLeave:N,onLinkSession:()=>g(!0)}),x.jsxs("div",{className:"shared-session-content",children:[x.jsxs("div",{className:"shared-session-toolbar",children:[x.jsxs("span",{className:"shared-session-toolbar-label",children:[E.sessionIds.length," session",E.sessionIds.length!==1?"s":""," linked"]}),x.jsx("button",{type:"button",className:"shared-session-link-btn",onClick:()=>g(!0),children:"+ Link Session"})]}),E.sessionIds.length===0?x.jsx("div",{className:"shared-session-empty",children:x.jsx("p",{children:'No sessions linked yet. Click "Link Session" to add one.'})}):x.jsx("div",{className:"shared-session-panels",children:E.sessionIds.map(P=>x.jsx(CN,{roomId:o,sessionId:P,sessionName:E.sessionNames.get(P),expanded:b.has(P),onToggle:()=>D(P),onUnlink:A},P))})]}),y&&x.jsx("div",{className:"modal-overlay",onClick:()=>g(!1),children:x.jsxs("div",{className:"modal-card",onClick:P=>P.stopPropagation(),children:[x.jsx("div",{className:"modal-title",children:"Link Session"}),x.jsx("div",{className:"modal-body",children:"Select a session to link to this shared room."}),te.length===0?x.jsx("p",{style:{color:"var(--text-subtle)",fontSize:13},children:"No sessions available to link."}):x.jsx("div",{className:"link-session-list",children:te.map(P=>x.jsx("button",{type:"button",className:"link-session-item",onClick:()=>C(P.id),children:P.projectName||P.description.slice(0,60)||P.id.slice(0,8)},P.id))}),x.jsx("div",{className:"modal-actions",children:x.jsx("button",{type:"button",className:"modal-btn",onClick:()=>g(!1),children:"Cancel"})})]})})]})}function kN(){return x.jsxs("svg",{className:"shared-session-panel-chevron",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-label":"Toggle panel",children:[x.jsx("title",{children:"Toggle panel"}),x.jsx("polyline",{points:"4 6 8 10 12 6"})]})}function CN({roomId:t,sessionId:l,sessionName:a,expanded:r,onToggle:o,onUnlink:s}){const[c,d]=k.useState(!1),[p,m]=k.useState({isLive:!1,isComplete:!1});return k.useEffect(()=>{if(Md(l)){d(!0);return}let y=!1;return ik(t,l).then(({sessionToken:g})=>{y||(Od(l,g),d(!0))}).catch(g=>{y||console.error("Failed to fetch linked session token:",g)}),()=>{y=!0}},[t,l]),x.jsxs("div",{className:`shared-session-panel ${r?"expanded":"collapsed"}`,children:[x.jsxs("div",{className:"shared-session-panel-header",onClick:o,children:[x.jsx(kN,{}),x.jsx("span",{className:"shared-session-panel-id",children:a||l.slice(0,8)}),c?p.isComplete?x.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)",fontSize:11},children:"Offline"}):p.isLive?x.jsx("span",{className:"session-header-status",style:{color:"var(--green)",fontSize:11},children:"Live"}):null:x.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)",fontSize:11},children:"Connecting..."}),x.jsx("button",{type:"button",className:"shared-session-unlink-btn",onClick:y=>{y.stopPropagation(),s(l)},title:"Unlink session",children:"Unlink"})]}),x.jsx("div",{className:"shared-session-panel-body",children:c?x.jsx(TN,{sessionId:l,onStatusChange:m}):x.jsx(Na,{variant:"block"})})]})}function TN({sessionId:t,onStatusChange:l}){const{entries:a,isLive:r,isComplete:o,markGateResolved:s}=Lb(t);return k.useEffect(()=>{l({isLive:r,isComplete:o})},[r,o,l]),x.jsx(Mb,{sessionId:t,entries:a,isLive:r,isComplete:o,onGateResolved:s})}const jN=hw([{element:x.jsx(iC,{}),children:[{path:"/",element:x.jsx(uC,{})},{path:"/session/:id",element:x.jsx(yN,{})},{path:"/shared/:code",element:x.jsx(wN,{})}]}]),Ev=document.getElementById("root");Ev&&eS.createRoot(Ev).render(x.jsx(k.StrictMode,{children:x.jsx(Cw,{router:jN})}));
|