@electric-agent/studio 1.3.0 → 1.3.4
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-code-docker.d.ts +3 -0
- package/dist/bridge/claude-code-docker.d.ts.map +1 -1
- package/dist/bridge/claude-code-docker.js +20 -2
- package/dist/bridge/claude-code-docker.js.map +1 -1
- package/dist/bridge/claude-code-sprites.d.ts +3 -0
- package/dist/bridge/claude-code-sprites.d.ts.map +1 -1
- package/dist/bridge/claude-code-sprites.js +39 -19
- package/dist/bridge/claude-code-sprites.js.map +1 -1
- package/dist/bridge/claude-md-generator.d.ts.map +1 -1
- package/dist/bridge/claude-md-generator.js +3 -1
- package/dist/bridge/claude-md-generator.js.map +1 -1
- package/dist/bridge/hosted.d.ts +1 -0
- package/dist/bridge/hosted.d.ts.map +1 -1
- package/dist/bridge/hosted.js +4 -0
- package/dist/bridge/hosted.js.map +1 -1
- package/dist/bridge/types.d.ts +6 -0
- package/dist/bridge/types.d.ts.map +1 -1
- package/dist/client/assets/index-B6arNdVE.css +1 -0
- package/dist/client/assets/index-CxBu-PUg.js +234 -0
- package/dist/client/index.html +2 -2
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +25 -0
- package/dist/server.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/index-Bq9zwhHj.css +0 -1
- package/dist/client/assets/index-Dgpqg5fv.js +0 -234
|
@@ -1,234 +0,0 @@
|
|
|
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 pd(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ff={exports:{}},Tr={};var qg;function Fx(){if(qg)return Tr;qg=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 Yg;function Ix(){return Yg||(Yg=1,ff.exports=Fx()),ff.exports}var S=Ix(),df={exports:{}},Oe={};var Gg;function Xx(){if(Gg)return Oe;Gg=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(z){return z===null||typeof z!="object"?null:(z=b&&z[b]||z["@@iterator"],typeof z=="function"?z:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,D={};function T(z,V,C){this.props=z,this.context=V,this.refs=D,this.updater=C||E}T.prototype.isReactComponent={},T.prototype.setState=function(z,V){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,V,"setState")},T.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function A(){}A.prototype=T.prototype;function L(z,V,C){this.props=z,this.context=V,this.refs=D,this.updater=C||E}var W=L.prototype=new A;W.constructor=L,j(W,T.prototype),W.isPureReactComponent=!0;var K=Array.isArray;function B(){}var _={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function se(z,V,C){var ce=C.ref;return{$$typeof:t,type:z,key:V,ref:ce!==void 0?ce:null,props:C}}function N(z,V){return se(z.type,V,z.props)}function X(z){return typeof z=="object"&&z!==null&&z.$$typeof===t}function P(z){var V={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(C){return V[C]})}var I=/\/+/g;function le(z,V){return typeof z=="object"&&z!==null&&z.key!=null?P(""+z.key):V.toString(36)}function Q(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(B,B):(z.status="pending",z.then(function(V){z.status==="pending"&&(z.status="fulfilled",z.value=V)},function(V){z.status==="pending"&&(z.status="rejected",z.reason=V)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function H(z,V,C,ce,be){var xe=typeof z;(xe==="undefined"||xe==="boolean")&&(z=null);var Ne=!1;if(z===null)Ne=!0;else switch(xe){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(z.$$typeof){case t:case l:Ne=!0;break;case y:return Ne=z._init,H(Ne(z._payload),V,C,ce,be)}}if(Ne)return be=be(z),Ne=ce===""?"."+le(z,0):ce,K(be)?(C="",Ne!=null&&(C=Ne.replace(I,"$&/")+"/"),H(be,V,C,"",function(zt){return zt})):be!=null&&(X(be)&&(be=N(be,C+(be.key==null||z&&z.key===be.key?"":(""+be.key).replace(I,"$&/")+"/")+Ne)),V.push(be)),1;Ne=0;var pe=ce===""?".":ce+":";if(K(z))for(var Re=0;Re<z.length;Re++)ce=z[Re],xe=pe+le(ce,Re),Ne+=H(ce,V,C,xe,be);else if(Re=x(z),typeof Re=="function")for(z=Re.call(z),Re=0;!(ce=z.next()).done;)ce=ce.value,xe=pe+le(ce,Re++),Ne+=H(ce,V,C,xe,be);else if(xe==="object"){if(typeof z.then=="function")return H(Q(z),V,C,ce,be);throw V=String(z),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function ee(z,V,C){if(z==null)return z;var ce=[],be=0;return H(z,ce,"","",function(xe){return V.call(C,xe,be++)}),ce}function oe(z){if(z._status===-1){var V=z._result;V=V(),V.then(function(C){(z._status===0||z._status===-1)&&(z._status=1,z._result=C)},function(C){(z._status===0||z._status===-1)&&(z._status=2,z._result=C)}),z._status===-1&&(z._status=0,z._result=V)}if(z._status===1)return z._result.default;throw z._result}var ve=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},R={map:ee,forEach:function(z,V,C){ee(z,function(){V.apply(this,arguments)},C)},count:function(z){var V=0;return ee(z,function(){V++}),V},toArray:function(z){return ee(z,function(V){return V})||[]},only:function(z){if(!X(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return Oe.Activity=g,Oe.Children=R,Oe.Component=T,Oe.Fragment=a,Oe.Profiler=o,Oe.PureComponent=L,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(z){return _.H.useMemoCache(z)}},Oe.cache=function(z){return function(){return z.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(z,V,C){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ce=j({},z.props),be=z.key;if(V!=null)for(xe in V.key!==void 0&&(be=""+V.key),V)!ae.call(V,xe)||xe==="key"||xe==="__self"||xe==="__source"||xe==="ref"&&V.ref===void 0||(ce[xe]=V[xe]);var xe=arguments.length-2;if(xe===1)ce.children=C;else if(1<xe){for(var Ne=Array(xe),pe=0;pe<xe;pe++)Ne[pe]=arguments[pe+2];ce.children=Ne}return se(z.type,be,ce)},Oe.createContext=function(z){return z={$$typeof:c,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:s,_context:z},z},Oe.createElement=function(z,V,C){var ce,be={},xe=null;if(V!=null)for(ce in V.key!==void 0&&(xe=""+V.key),V)ae.call(V,ce)&&ce!=="key"&&ce!=="__self"&&ce!=="__source"&&(be[ce]=V[ce]);var Ne=arguments.length-2;if(Ne===1)be.children=C;else if(1<Ne){for(var pe=Array(Ne),Re=0;Re<Ne;Re++)pe[Re]=arguments[Re+2];be.children=pe}if(z&&z.defaultProps)for(ce in Ne=z.defaultProps,Ne)be[ce]===void 0&&(be[ce]=Ne[ce]);return se(z,xe,be)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(z){return{$$typeof:d,render:z}},Oe.isValidElement=X,Oe.lazy=function(z){return{$$typeof:y,_payload:{_status:-1,_result:z},_init:oe}},Oe.memo=function(z,V){return{$$typeof:m,type:z,compare:V===void 0?null:V}},Oe.startTransition=function(z){var V=_.T,C={};_.T=C;try{var ce=z(),be=_.S;be!==null&&be(C,ce),typeof ce=="object"&&ce!==null&&typeof ce.then=="function"&&ce.then(B,ve)}catch(xe){ve(xe)}finally{V!==null&&C.types!==null&&(V.types=C.types),_.T=V}},Oe.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},Oe.use=function(z){return _.H.use(z)},Oe.useActionState=function(z,V,C){return _.H.useActionState(z,V,C)},Oe.useCallback=function(z,V){return _.H.useCallback(z,V)},Oe.useContext=function(z){return _.H.useContext(z)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(z,V){return _.H.useDeferredValue(z,V)},Oe.useEffect=function(z,V){return _.H.useEffect(z,V)},Oe.useEffectEvent=function(z){return _.H.useEffectEvent(z)},Oe.useId=function(){return _.H.useId()},Oe.useImperativeHandle=function(z,V,C){return _.H.useImperativeHandle(z,V,C)},Oe.useInsertionEffect=function(z,V){return _.H.useInsertionEffect(z,V)},Oe.useLayoutEffect=function(z,V){return _.H.useLayoutEffect(z,V)},Oe.useMemo=function(z,V){return _.H.useMemo(z,V)},Oe.useOptimistic=function(z,V){return _.H.useOptimistic(z,V)},Oe.useReducer=function(z,V,C){return _.H.useReducer(z,V,C)},Oe.useRef=function(z){return _.H.useRef(z)},Oe.useState=function(z){return _.H.useState(z)},Oe.useSyncExternalStore=function(z,V,C){return _.H.useSyncExternalStore(z,V,C)},Oe.useTransition=function(){return _.H.useTransition()},Oe.version="19.2.4",Oe}var Vg;function gd(){return Vg||(Vg=1,df.exports=Xx()),df.exports}var k=gd();const Qx=pd(k),$x=Vx({__proto__:null,default:Qx},[k]);var hf={exports:{}},Ar={},mf={exports:{}},pf={};var Fg;function Zx(){return Fg||(Fg=1,(function(t){function l(H,ee){var oe=H.length;H.push(ee);e:for(;0<oe;){var ve=oe-1>>>1,R=H[ve];if(0<o(R,ee))H[ve]=ee,H[oe]=R,oe=ve;else break e}}function a(H){return H.length===0?null:H[0]}function r(H){if(H.length===0)return null;var ee=H[0],oe=H.pop();if(oe!==ee){H[0]=oe;e:for(var ve=0,R=H.length,z=R>>>1;ve<z;){var V=2*(ve+1)-1,C=H[V],ce=V+1,be=H[ce];if(0>o(C,oe))ce<R&&0>o(be,C)?(H[ve]=be,H[ce]=oe,ve=ce):(H[ve]=C,H[V]=oe,ve=V);else if(ce<R&&0>o(be,oe))H[ve]=be,H[ce]=oe,ve=ce;else break e}}return ee}function o(H,ee){var oe=H.sortIndex-ee.sortIndex;return oe!==0?oe:H.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,j=!1,D=!1,T=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function W(H){for(var ee=a(m);ee!==null;){if(ee.callback===null)r(m);else if(ee.startTime<=H)r(m),ee.sortIndex=ee.expirationTime,l(p,ee);else break;ee=a(m)}}function K(H){if(j=!1,W(H),!E)if(a(p)!==null)E=!0,B||(B=!0,P());else{var ee=a(m);ee!==null&&Q(K,ee.startTime-H)}}var B=!1,_=-1,ae=5,se=-1;function N(){return D?!0:!(t.unstable_now()-se<ae)}function X(){if(D=!1,B){var H=t.unstable_now();se=H;var ee=!0;try{e:{E=!1,j&&(j=!1,A(_),_=-1),x=!0;var oe=b;try{t:{for(W(H),g=a(p);g!==null&&!(g.expirationTime>H&&N());){var ve=g.callback;if(typeof ve=="function"){g.callback=null,b=g.priorityLevel;var R=ve(g.expirationTime<=H);if(H=t.unstable_now(),typeof R=="function"){g.callback=R,W(H),ee=!0;break t}g===a(p)&&r(p),W(H)}else r(p);g=a(p)}if(g!==null)ee=!0;else{var z=a(m);z!==null&&Q(K,z.startTime-H),ee=!1}}break e}finally{g=null,b=oe,x=!1}ee=void 0}}finally{ee?P():B=!1}}}var P;if(typeof L=="function")P=function(){L(X)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,le=I.port2;I.port1.onmessage=X,P=function(){le.postMessage(null)}}else P=function(){T(X,0)};function Q(H,ee){_=T(function(){H(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(H){H.callback=null},t.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<H?Math.floor(1e3/H):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(H){switch(b){case 1:case 2:case 3:var ee=3;break;default:ee=b}var oe=b;b=ee;try{return H()}finally{b=oe}},t.unstable_requestPaint=function(){D=!0},t.unstable_runWithPriority=function(H,ee){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var oe=b;b=H;try{return ee()}finally{b=oe}},t.unstable_scheduleCallback=function(H,ee,oe){var ve=t.unstable_now();switch(typeof oe=="object"&&oe!==null?(oe=oe.delay,oe=typeof oe=="number"&&0<oe?ve+oe:ve):oe=ve,H){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=oe+R,H={id:y++,callback:ee,priorityLevel:H,startTime:oe,expirationTime:R,sortIndex:-1},oe>ve?(H.sortIndex=oe,l(m,H),a(p)===null&&H===a(m)&&(j?(A(_),_=-1):j=!0,Q(K,oe-ve))):(H.sortIndex=R,l(p,H),E||x||(E=!0,B||(B=!0,P()))),H},t.unstable_shouldYield=N,t.unstable_wrapCallback=function(H){var ee=b;return function(){var oe=b;b=ee;try{return H.apply(this,arguments)}finally{b=oe}}}})(pf)),pf}var Ig;function Kx(){return Ig||(Ig=1,mf.exports=Zx()),mf.exports}var gf={exports:{}},Ft={};var Xg;function Px(){if(Xg)return Ft;Xg=1;var t=gd();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,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})}},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 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=Px(),gf.exports}var $g;function Jx(){if($g)return Ar;$g=1;var t=Kx(),l=gd(),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"),j=Symbol.for("react.fragment"),D=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),L=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),_=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),se=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function P(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function le(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case T:return"Profiler";case D:return"StrictMode";case K:return"Suspense";case B:return"SuspenseList";case se:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case L:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case W: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 ae:n=e._payload,e=e._init;try{return le(e(n))}catch{}}return null}var Q=Array.isArray,H=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,oe={pending:!1,data:null,method:null,action:null},ve=[],R=-1;function z(e){return{current:e}}function V(e){0>R||(e.current=ve[R],ve[R]=null,R--)}function C(e,n){R++,ve[R]=e.current,e.current=n}var ce=z(null),be=z(null),xe=z(null),Ne=z(null);function pe(e,n){switch(C(xe,n),C(be,e),C(ce,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?sg(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=sg(n),e=cg(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(ce),C(ce,e)}function Re(){V(ce),V(be),V(xe)}function zt(e){e.memoizedState!==null&&C(Ne,e);var n=ce.current,i=cg(n,e.type);n!==i&&(C(be,e),C(ce,i))}function Ln(e){be.current===e&&(V(ce),V(be)),Ne.current===e&&(V(Ne),Er._currentValue=oe)}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
|
-
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 re=function(){throw Error()};if(Object.defineProperty(re.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(re,[])}catch(J){var $=J}Reflect.construct(e,[],re)}else{try{re.call()}catch(J){$=J}e.call(re.prototype)}}else{try{throw Error()}catch(J){$=J}(re=e())&&typeof re.catch=="function"&&re.catch(function(){})}}catch(J){if(J&&$&&typeof J.stack=="string")return[J.stack,$.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
|
-
`),F=w.split(`
|
|
5
|
-
`);for(f=u=0;u<M.length&&!M[u].includes("DetermineComponentFrameRoot");)u++;for(;f<F.length&&!F[f].includes("DetermineComponentFrameRoot");)f++;if(u===M.length||f===F.length)for(u=M.length-1,f=F.length-1;1<=u&&0<=f&&M[u]!==F[f];)f--;for(;1<=u&&0<=f;u--,f--)if(M[u]!==F[f]){if(u!==1||f!==1)do if(u--,f--,0>f||M[u]!==F[f]){var te=`
|
|
6
|
-
`+M[u].replace(" at new "," at ");return e.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",e.displayName)),te}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
|
-
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,ne=t.unstable_ImmediatePriority,de=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,De=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,Dl=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=Dl;return Dl<<=1,(Dl&62914560)===0&&(Dl=4194304),e}function Nl(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,F=e.hiddenUpdates;for(i=v&~i;0<i;){var te=31-tt(i),re=1<<te;w[te]=0,M[te]=-1;var $=F[te];if($!==null)for(F[te]=null,te=0;te<$.length;te++){var J=$[te];J!==null&&(J.lane&=-536870913)}i&=~re}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:Z(i),(i&(e.suspendedLanes|n))!==0?0:i}function Z(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 ue(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,je="__reactEvents$"+ge,Te="__reactListeners$"+ge,Ze="__reactHandles$"+ge,Fe="__reactResources$"+ge,gt="__reactMarker$"+ge;function vt(e){delete e[me],delete e[ye],delete e[je],delete e[Te],delete e[Ze]}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=yg(e);e!==null;){if(i=e[me])return i;e=yg(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 Xe(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(Xe(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 Qe(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 nh(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=""+Qe(n)):e.value!==""+Qe(n)&&(e.value=""+Qe(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?as(e,v,Qe(n)):i!=null?as(e,v,Qe(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=""+Qe(w):e.removeAttribute("name")}function lh(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?""+Qe(i):"",n=n!=null?""+Qe(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=""+Qe(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 ih(e,n,i){if(n!=null&&(n=""+Qe(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+Qe(i):""}function ah(e,n,i,u){if(n==null){if(u!=null){if(i!=null)throw Error(r(92));if(Q(u)){if(1<u.length)throw Error(r(93));u=u[0]}i=u}i==null&&(i=""),n=i}i=Qe(n),e.defaultValue=i,u=e.textContent,u===i&&u!==""&&u!==null&&(e.value=u),Ba(e)}function Xi(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 rh(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 uh(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&&rh(e,f,u)}else for(var h in n)n.hasOwnProperty(h)&&rh(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 Qi=null,$i=null;function oh(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&&nh(u)}break e;case"textarea":ih(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&Ii(e,!!i.multiple,n,!1)}}}var ss=!1;function sh(e,n,i){if(ss)return e(n,i);ss=!0;try{var u=e(n);return u}finally{if(ss=!1,(Qi!==null||$i!==null)&&(Zu(),Qi&&(n=Qi,e=$i,$i=Qi=null,oh(n),e)))for(n=0;n<e.length;n++)oh(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 ch(){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 fh(){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:fh,this.isPropagationStopped=fh,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}),Yb=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}}),dh=Wt(hu),Gb=g({},hu,{dataTransfer:0}),Vb=Wt(Gb),Fb=g({},Ya,{relatedTarget:0}),ms=Wt(Fb),Ib=g({},Ei,{animationName:0,elapsedTime:0,pseudoElement:0}),Xb=Wt(Ib),Qb=g({},Ei,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$b=Wt(Qb),Zb=g({},Ei,{data:0}),hh=Wt(Zb),Kb={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({},Ya,{key:function(e){if(e.key){var n=Kb[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}),mh=Wt(n1),l1=g({},Ya,{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,Va=null;sl&&"documentMode"in document&&(Va=document.documentMode);var d1=sl&&"TextEvent"in window&&!Va,ph=sl&&(!gs||Va&&8<Va&&11>=Va),gh=" ",yh=!1;function vh(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 bh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zi=!1;function h1(e,n){switch(e){case"compositionend":return bh(n);case"keypress":return n.which!==32?null:(yh=!0,gh);case"textInput":return e=n.data,e===gh&&yh?null:e;default:return null}}function m1(e,n){if(Zi)return e==="compositionend"||!gs&&vh(e,n)?(e=ch(),su=fs=Ml=null,Zi=!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 ph&&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 xh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!p1[e.type]:n==="textarea"}function Sh(e,n,i,u){Qi?$i?$i.push(u):$i=[u]:Qi=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 g1(e){lg(e,0)}function mu(e){var n=Ot(e);if(nh(n))return e}function Eh(e,n){if(e==="change")return n}var wh=!1;if(sl){var ys;if(sl){var vs="oninput"in document;if(!vs){var kh=document.createElement("div");kh.setAttribute("oninput","return;"),vs=typeof kh.oninput=="function"}ys=vs}else ys=!1;wh=ys&&(!document.documentMode||9<document.documentMode)}function Ch(){Fa&&(Fa.detachEvent("onpropertychange",Th),Ia=Fa=null)}function Th(e){if(e.propertyName==="value"&&mu(Ia)){var n=[];Sh(n,Ia,e,os(e)),sh(g1,n)}}function y1(e,n,i){e==="focusin"?(Ch(),Fa=n,Ia=i,Fa.attachEvent("onpropertychange",Th)):e==="focusout"&&Ch()}function v1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return mu(Ia)}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 Xa(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 jh(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 _h(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?_h(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Rh(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,Ki=null,xs=null,Qa=null,Ss=!1;function zh(e,n,i){var u=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ss||Ki==null||Ki!==uu(u)||(u=Ki,"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}),Qa&&Xa(Qa,u)||(Qa=u,u=no(xs,"onSelect"),0<u.length&&(n=new du("onSelect","select",null,n,i),e.push({event:n,listeners:u}),n.target=Ki)))}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 Nh=ki("animationend"),Oh=ki("animationiteration"),Mh=ki("animationstart"),w1=ki("transitionrun"),k1=ki("transitionstart"),C1=ki("transitioncancel"),Lh=ki("transitionend"),Uh=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){Uh.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&&Bh(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 Bh(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 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 Hh(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=zx(e,i,ce.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case se:return e=dn(31,i,n,f),e.elementType=se,e.lanes=h,e;case j:return Ti(i.children,f,h,n);case D:v=8,f|=24;break;case T:return e=dn(12,i,n,f|2),e.elementType=T,e.lanes=h,e;case K:return e=dn(13,i,n,f),e.elementType=K,e.lanes=h,e;case B:return e=dn(19,i,n,f),e.elementType=B,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case L:v=10;break e;case A:v=9;break e;case W:v=11;break e;case _:v=14;break e;case ae: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 As(e,n,i){return e=dn(6,e,null,n),e.lanes=i,e}function qh(e){var n=dn(18,null,null,0);return n.stateNode=e,n}function js(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 Yh=new WeakMap;function Cn(e,n){if(typeof e=="object"&&e!==null){var i=Yh.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Fi(n)},Yh.set(e,n),n)}return{value:e,source:n,stack:Fi(n)}}var ea=[],ta=0,xu=null,$a=0,Tn=[],An=0,Ll=null,Qn=1,$n="";function fl(e,n){ea[ta++]=$a,ea[ta++]=xu,xu=e,$a=n}function Gh(e,n,i){Tn[An++]=Qn,Tn[An++]=$n,Tn[An++]=Ll,Ll=e;var u=Qn;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,Qn=1<<32-tt(n)+f|i<<f|u,$n=h+e}else Qn=1<<h|i<<f|u,$n=e}function _s(e){e.return!==null&&(fl(e,1),Gh(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[--An],Tn[An]=null,$n=Tn[--An],Tn[An]=null,Qn=Tn[--An],Tn[An]=null}function Vh(e,n){Tn[An++]=Qn,Tn[An++]=$n,Tn[An++]=Ll,Qn=n.id,$n=n.overflow,Ll=e}var Ht=null,ft=null,$e=!1,Ul=null,jn=!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 Za(Cn(n,e)),zs}function Fh(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),lh(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),ah(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||ug(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 Ih(e){for(Ht=e.return;Ht;)switch(Ht.tag){case 5:case 31:case 13:jn=!1;return;case 27:case 3:jn=!0;return;default:Ht=Ht.return}}function na(e){if(e!==Ht)return!1;if(!$e)return Ih(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")||Zc(e.type,e.memoizedProps)),i=!i),i&&ft&&Bl(e),Ih(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=gg(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));ft=gg(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 Ai(){ft=Ht=null,$e=!1}function Ds(){var e=Ul;return e!==null&&(ln===null?ln=e:ln.push.apply(ln,e),Ul=null),e}function Za(e){Ul===null?Ul=[e]:Ul.push(e)}var Ns=z(null),ji=null,dl=null;function Hl(e,n,i){C(Ns,n._currentValue),n._currentValue=i}function hl(e){e._currentValue=Ns.current,V(Ns)}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===Ne.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){ji=e,dl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Xh(ji,e)}function Eu(e,n){return ji===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 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()})}},j1=t.unstable_scheduleCallback,_1=t.unstable_NormalPriority,Ct={$$typeof:L,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ls(){return{controller:new A1,data:new Map,refCount:0}}function Ka(e){e.refCount--,e.refCount===0&&j1(_1,function(){e.controller.abort()})}var Pa=null,Us=0,ia=0,aa=null;function R1(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 z1(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 $h=H.S;H.S=function(e,n){zp=pt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&R1(e,n),$h!==null&&$h(e,n)};var Ri=z(null);function Bs(){var e=Ri.current;return e!==null?e:ot.pooledCache}function wu(e,n){n===null?C(Ri,Ri.current):C(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 Kh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ph(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,Wh(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,Wh(e),e}throw Di=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"?(Di=i,ra):i}}var Di=null;function Jh(){if(Di===null)throw Error(r(459));var e=Di;return Di=null,e}function Wh(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=[]),Ph(ua,e,n)}function Wa(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Au(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 em(e){function n(q,U){if(e){var G=q.deletions;G===null?(q.deletions=[U],q.flags|=16):G.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,G){return q.index=G,e?(G=q.alternate,G!==null?(G=G.index,G<U?(q.flags|=67108866,U):G):(q.flags|=67108866,U)):(q.flags|=1048576,U)}function v(q){return e&&q.alternate===null&&(q.flags|=67108866),q}function w(q,U,G,ie){return U===null||U.tag!==6?(U=As(G,q.mode,ie),U.return=q,U):(U=f(U,G),U.return=q,U)}function M(q,U,G,ie){var Ae=G.type;return Ae===j?te(q,U,G.props.children,ie,G.key):U!==null&&(U.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===ae&&zi(Ae)===U.type)?(U=f(U,G.props),Wa(U,G),U.return=q,U):(U=bu(G.type,G.key,G.props,null,q.mode,ie),Wa(U,G),U.return=q,U)}function F(q,U,G,ie){return U===null||U.tag!==4||U.stateNode.containerInfo!==G.containerInfo||U.stateNode.implementation!==G.implementation?(U=js(G,q.mode,ie),U.return=q,U):(U=f(U,G.children||[]),U.return=q,U)}function te(q,U,G,ie,Ae){return U===null||U.tag!==7?(U=Ti(G,q.mode,ie,Ae),U.return=q,U):(U=f(U,G),U.return=q,U)}function re(q,U,G){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=As(""+U,q.mode,G),U.return=q,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case x:return G=bu(U.type,U.key,U.props,null,q.mode,G),Wa(G,U),G.return=q,G;case E:return U=js(U,q.mode,G),U.return=q,U;case ae:return U=zi(U),re(q,U,G)}if(Q(U)||P(U))return U=Ti(U,q.mode,G,null),U.return=q,U;if(typeof U.then=="function")return re(q,Tu(U),G);if(U.$$typeof===L)return re(q,Eu(q,U),G);Au(q,U)}return null}function $(q,U,G,ie){var Ae=U!==null?U.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Ae!==null?null:w(q,U,""+G,ie);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return G.key===Ae?M(q,U,G,ie):null;case E:return G.key===Ae?F(q,U,G,ie):null;case ae:return G=zi(G),$(q,U,G,ie)}if(Q(G)||P(G))return Ae!==null?null:te(q,U,G,ie,null);if(typeof G.then=="function")return $(q,U,Tu(G),ie);if(G.$$typeof===L)return $(q,U,Eu(q,G),ie);Au(q,G)}return null}function J(q,U,G,ie,Ae){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return q=q.get(G)||null,w(U,q,""+ie,Ae);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case x:return q=q.get(ie.key===null?G:ie.key)||null,M(U,q,ie,Ae);case E:return q=q.get(ie.key===null?G:ie.key)||null,F(U,q,ie,Ae);case ae:return ie=zi(ie),J(q,U,G,ie,Ae)}if(Q(ie)||P(ie))return q=q.get(G)||null,te(U,q,ie,Ae,null);if(typeof ie.then=="function")return J(q,U,G,Tu(ie),Ae);if(ie.$$typeof===L)return J(q,U,G,Eu(U,ie),Ae);Au(U,ie)}return null}function Se(q,U,G,ie){for(var Ae=null,Je=null,Ee=U,Le=U=0,Ve=null;Ee!==null&&Le<G.length;Le++){Ee.index>Le?(Ve=Ee,Ee=null):Ve=Ee.sibling;var We=$(q,Ee,G[Le],ie);if(We===null){Ee===null&&(Ee=Ve);break}e&&Ee&&We.alternate===null&&n(q,Ee),U=h(We,U,Le),Je===null?Ae=We:Je.sibling=We,Je=We,Ee=Ve}if(Le===G.length)return i(q,Ee),$e&&fl(q,Le),Ae;if(Ee===null){for(;Le<G.length;Le++)Ee=re(q,G[Le],ie),Ee!==null&&(U=h(Ee,U,Le),Je===null?Ae=Ee:Je.sibling=Ee,Je=Ee);return $e&&fl(q,Le),Ae}for(Ee=u(Ee);Le<G.length;Le++)Ve=J(Ee,q,Le,G[Le],ie),Ve!==null&&(e&&Ve.alternate!==null&&Ee.delete(Ve.key===null?Le:Ve.key),U=h(Ve,U,Le),Je===null?Ae=Ve:Je.sibling=Ve,Je=Ve);return e&&Ee.forEach(function(li){return n(q,li)}),$e&&fl(q,Le),Ae}function ze(q,U,G,ie){if(G==null)throw Error(r(151));for(var Ae=null,Je=null,Ee=U,Le=U=0,Ve=null,We=G.next();Ee!==null&&!We.done;Le++,We=G.next()){Ee.index>Le?(Ve=Ee,Ee=null):Ve=Ee.sibling;var li=$(q,Ee,We.value,ie);if(li===null){Ee===null&&(Ee=Ve);break}e&&Ee&&li.alternate===null&&n(q,Ee),U=h(li,U,Le),Je===null?Ae=li:Je.sibling=li,Je=li,Ee=Ve}if(We.done)return i(q,Ee),$e&&fl(q,Le),Ae;if(Ee===null){for(;!We.done;Le++,We=G.next())We=re(q,We.value,ie),We!==null&&(U=h(We,U,Le),Je===null?Ae=We:Je.sibling=We,Je=We);return $e&&fl(q,Le),Ae}for(Ee=u(Ee);!We.done;Le++,We=G.next())We=J(Ee,q,Le,We.value,ie),We!==null&&(e&&We.alternate!==null&&Ee.delete(We.key===null?Le:We.key),U=h(We,U,Le),Je===null?Ae=We:Je.sibling=We,Je=We);return e&&Ee.forEach(function(Gx){return n(q,Gx)}),$e&&fl(q,Le),Ae}function ut(q,U,G,ie){if(typeof G=="object"&&G!==null&&G.type===j&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case x:e:{for(var Ae=G.key;U!==null;){if(U.key===Ae){if(Ae=G.type,Ae===j){if(U.tag===7){i(q,U.sibling),ie=f(U,G.props.children),ie.return=q,q=ie;break e}}else if(U.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===ae&&zi(Ae)===U.type){i(q,U.sibling),ie=f(U,G.props),Wa(ie,G),ie.return=q,q=ie;break e}i(q,U);break}else n(q,U);U=U.sibling}G.type===j?(ie=Ti(G.props.children,q.mode,ie,G.key),ie.return=q,q=ie):(ie=bu(G.type,G.key,G.props,null,q.mode,ie),Wa(ie,G),ie.return=q,q=ie)}return v(q);case E:e:{for(Ae=G.key;U!==null;){if(U.key===Ae)if(U.tag===4&&U.stateNode.containerInfo===G.containerInfo&&U.stateNode.implementation===G.implementation){i(q,U.sibling),ie=f(U,G.children||[]),ie.return=q,q=ie;break e}else{i(q,U);break}else n(q,U);U=U.sibling}ie=js(G,q.mode,ie),ie.return=q,q=ie}return v(q);case ae:return G=zi(G),ut(q,U,G,ie)}if(Q(G))return Se(q,U,G,ie);if(P(G)){if(Ae=P(G),typeof Ae!="function")throw Error(r(150));return G=Ae.call(G),ze(q,U,G,ie)}if(typeof G.then=="function")return ut(q,U,Tu(G),ie);if(G.$$typeof===L)return ut(q,U,Eu(q,G),ie);Au(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,U!==null&&U.tag===6?(i(q,U.sibling),ie=f(U,G),ie.return=q,q=ie):(i(q,U),ie=As(G,q.mode,ie),ie.return=q,q=ie),v(q)):i(q,U)}return function(q,U,G,ie){try{Ja=0;var Ae=ut(q,U,G,ie);return ua=null,Ae}catch(Ee){if(Ee===ra||Ee===ku)throw Ee;var Je=dn(29,Ee,null,q.mode);return Je.lanes=ie,Je.return=q,Je}}}var Ni=em(!0),tm=em(!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),Bh(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,F=M.next;M.next=null,v===null?h=F:v.next=F,v=M;var te=e.alternate;te!==null&&(te=te.updateQueue,w=te.lastBaseUpdate,w!==v&&(w===null?te.firstBaseUpdate=F:w.next=F,te.lastBaseUpdate=M))}if(h!==null){var re=f.baseState;v=0,te=F=M=null,w=h;do{var $=w.lane&-536870913,J=$!==w.lane;if(J?(Ge&$)===$:(u&$)===$){$!==0&&$===ia&&(Vs=!0),te!==null&&(te=te.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"){re=Se.call(ut,re,$);break e}re=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=ze.payload,$=typeof Se=="function"?Se.call(ut,re,$):Se,$==null)break e;re=g({},re,$);break e;case 2:ql=!0}}$=w.callback,$!==null&&(e.flags|=64,J&&(e.flags|=8192),J=f.callbacks,J===null?f.callbacks=[$]:J.push($))}else J={lane:$,tag:w.tag,payload:w.payload,callback:w.callback,next:null},te===null?(F=te=J,M=re):te=te.next=J,v|=$;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);te===null&&(M=re),f.baseState=M,f.firstBaseUpdate=F,f.lastBaseUpdate=te,h===null&&(f.shared.lanes=0),Ql|=v,e.lanes=v,e.memoizedState=re}}function nm(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function lm(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)nm(i[e],n)}var oa=z(null),ju=z(0);function im(e,n){e=El,C(ju,e),C(oa,n),El=e|n.baseLanes}function Fs(){C(ju,El),C(oa,oa.current)}function Is(){El=ju.current,V(oa),V(ju)}var hn=z(null),_n=null;function Vl(e){var n=e.alternate;C(wt,wt.current&1),C(hn,e),_n===null&&(n===null||oa.current!==null||n.memoizedState!==null)&&(_n=e)}function Xs(e){C(wt,wt.current),C(hn,e),_n===null&&(_n=e)}function am(e){e.tag===22?(C(wt,wt.current),C(hn,e),_n===null&&(_n=e)):Fl()}function Fl(){C(wt,wt.current),C(hn,hn.current)}function mn(e){V(hn),_n===e&&(_n=null),V(wt)}var wt=z(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 Qs(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,H.H=e===null||e.memoizedState===null?Gm:sc,Oi=!1,h=i(u,f),Oi=!1,sa&&(h=um(n,i,u,f)),rm(e),h}function rm(e){H.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||At||(e=e.dependencies,e!==null&&Su(e)&&(At=!0))}function um(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)}H.H=Vm,h=n(i,u)}while(sa);return h}function N1(){var e=H.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 Zs(){var e=zu!==0;return zu=0,e}function Ks(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 Zt(){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 Du(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ir(e){var n=lr;return lr+=1,ca===null&&(ca=[]),e=Ph(ca,e,n),n=Me,(Tt===null?n.memoizedState:Tt.next)===null&&(n=n.alternate,H.H=n===null||n.memoizedState===null?Gm:sc),e}function Nu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ir(e);if(e.$$typeof===L)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=Du(),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]=N;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,F=n,te=!1;do{var re=F.lane&-536870913;if(re!==F.lane?(Ge&re)===re:(ml&re)===re){var $=F.revertLane;if($===0)M!==null&&(M=M.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),re===ia&&(te=!0);else if((ml&$)===$){F=F.next,$===ia&&(te=!0);continue}else re={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},M===null?(w=M=re,v=h):M=M.next=re,Me.lanes|=$,Ql|=$;re=F.action,Oi&&i(h,re),h=F.hasEagerState?F.eagerState:i(h,re)}else $={lane:re,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},M===null?(w=M=$,v=h):M=M.next=$,Me.lanes|=re,Ql|=re;F=F.next}while(F!==null&&F!==n);if(M===null?v=h:M.next=w,!fn(h,e.memoizedState)&&(At=!0,te&&(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)||(At=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),i.lastRenderedState=h}return[h,u]}function om(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,At=!0),f=f.queue,lc(fm.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},cm.bind(null,u,f,i,n),null),ot===null)throw Error(r(349));h||(ml&127)!==0||sm(u,n,i)}return i}function sm(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Me.updateQueue,n===null?(n=Du(),Me.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function cm(e,n,i,u){n.value=i,n.getSnapshot=u,dm(n)&&hm(e)}function fm(e,n,i){return i(function(){dm(n)&&hm(e)})}function dm(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!fn(e,i)}catch{return!0}}function hm(e){var n=Ci(e,2);n!==null&&an(n,e,2)}function tc(e){var n=Zt();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 mm(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)}};H.T!==null?i(!0):h.isTransition=!1,u(h),i=n.pending,i===null?(h.next=n.pending=h,pm(n,h)):(h.next=i.next,n.pending=i.next=h)}}function pm(e,n){var i=n.action,u=n.payload,f=e.state;if(n.isTransition){var h=H.T,v={};H.T=v;try{var w=i(f,u),M=H.S;M!==null&&M(v,w),gm(e,n,w)}catch(F){nc(e,n,F)}finally{h!==null&&v.types!==null&&(h.types=v.types),H.T=h}}else try{h=i(f,u),gm(e,n,h)}catch(F){nc(e,n,F)}}function gm(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(u){ym(e,n,u)},function(u){return nc(e,n,u)}):ym(e,n,i)}function ym(e,n,i){n.status="fulfilled",n.value=i,vm(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,pm(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,vm(n),n=n.next;while(n!==u)}e.action=null}function vm(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function bm(e,n){return n}function xm(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=jn;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=Zt(),i.memoizedState=i.baseState=n,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bm,lastRenderedState:n},i.queue=u,i=Hm.bind(null,Me,u),u.dispatch=i,u=tc(!1),h=oc.bind(null,Me,!1,u.queue),u=Zt(),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 Sm(e){var n=kt();return Em(n,at,e)}function Em(e,n,i){if(n=Ws(e,n,bm)[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},M1.bind(null,f,i),null)),[u,h,e]}function M1(e,n){e.action=n}function wm(e){var n=kt(),i=at;if(i!==null)return Em(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=Du(),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 km(){return kt().memoizedState}function Mu(e,n,i,u){var f=Zt();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&&Qs(u,at.memoizedState.deps)?f.memoizedState=fa(n,h,i,u):(Me.flags|=e,f.memoizedState=fa(1|n,h,i,u))}function Cm(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=Du(),Me.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function Tm(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 jm(e,n){return Lu(4,4,e,n)}function _m(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 Rm(e,n,i){i=i!=null?i.concat([e]):null,Lu(4,4,_m.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&&Qs(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&&Qs(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,Ql|=e,i)}function Nm(e,n,i,u){return fn(i,n)?i:oa.current!==null?(e=ac(e,i,u),fn(e,n)||(At=!0),e):(ml&42)===0||(ml&1073741824)!==0&&(Ge&261930)===0?(At=!0,e.memoizedState=i):(e=Np(),Me.lanes|=e,Ql|=e,n)}function Om(e,n,i,u,f){var h=ee.p;ee.p=h!==0&&8>h?h:8;var v=H.T,w={};H.T=w,oc(e,!1,n,i);try{var M=f(),F=H.S;if(F!==null&&F(w,M),M!==null&&typeof M=="object"&&typeof M.then=="function"){var te=z1(M,u);ar(e,n,te,yn(e))}else ar(e,n,u,yn(e))}catch(re){ar(e,n,{then:function(){},status:"rejected",reason:re},yn())}finally{ee.p=h,v!==null&&w.types!==null&&(v.types=w.types),H.T=v}}function U1(){}function rc(e,n,i,u){if(e.tag!==5)throw Error(r(476));var f=Mm(e).queue;Om(e,f,n,oe,i===null?U1:function(){return Lm(e),i(u)})}function Mm(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:oe,baseState:oe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:oe},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 Lm(e){var n=Mm(e);n.next===null&&(n=e.alternate.memoizedState),ar(e,n.next.queue,{},yn())}function uc(){return qt(Er)}function Um(){return kt().memoizedState}function Bm(){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),er(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)?qm(n,i):(i=Cs(e,n,i,u),i!==null&&(an(i,e,u),Ym(i,n,u)))}function Hm(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))qm(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),Ym(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 qm(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 Ym(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:Nu,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 Gm={readContext:qt,use:Nu,useCallback:function(e,n){return Zt().memoizedState=[e,n===void 0?null:n],e},useContext:qt,useEffect:Cm,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Mu(4194308,4,_m.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=Zt();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=Zt();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=H1.bind(null,Me,e),[u.memoizedState,e]},useRef:function(e){var n=Zt();return e={current:e},n.memoizedState=e},useState:function(e){e=tc(e);var n=e.queue,i=Hm.bind(null,Me,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:ic,useDeferredValue:function(e,n){var i=Zt();return ac(i,e,n)},useTransition:function(){var e=tc(!1);return e=Om.bind(null,Me,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var u=Me,f=Zt();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||sm(u,n,i)}f.memoizedState=i;var h={value:i,getSnapshot:n};return f.queue=h,Cm(fm.bind(null,u,h,e),[e]),u.flags|=2048,fa(9,{destroy:void 0},cm.bind(null,u,h,i,n),null),i},useId:function(){var e=Zt(),n=ot.identifierPrefix;if($e){var i=$n,u=Qn;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:xm,useActionState:xm,useOptimistic:function(e){var n=Zt();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 Zt().memoizedState=B1.bind(null,Me)},useEffectEvent:function(e){var n=Zt(),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:Nu,useCallback:zm,useContext:qt,useEffect:lc,useImperativeHandle:Rm,useInsertionEffect:Am,useLayoutEffect:jm,useMemo:Dm,useReducer:Ou,useRef:km,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:om,useId:Um,useHostTransitionStatus:uc,useFormState:Sm,useActionState:Sm,useOptimistic:function(e,n){var i=kt();return mm(i,at,e,n)},useMemoCache:Js,useCacheRefresh:Bm};sc.useEffectEvent=Tm;var Vm={readContext:qt,use:Nu,useCallback:zm,useContext:qt,useEffect:lc,useImperativeHandle:Rm,useInsertionEffect:Am,useLayoutEffect:jm,useMemo:Dm,useReducer:ec,useRef:km,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:om,useId:Um,useHostTransitionStatus:uc,useFormState:wm,useActionState:wm,useOptimistic:function(e,n){var i=kt();return at!==null?mm(i,at,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Js,useCacheRefresh:Bm};Vm.useEffectEvent=Tm;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 Fm(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?!Xa(i,u)||!Xa(f,h):!0}function Im(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 Qm(e){console.error(e)}function $m(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 Km(e){return e=Yl(e),e.tag=3,e}function Pm(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?Ku():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),Ku(),!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}),Za(Cn(e,i)))):(u!==zs&&(n=Error(r(423),{cause:u}),Za(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),Pm(f,e,i,u),Gs(i,f),!1}i=i.return}while(i!==null);return!1}var hc=Error(r(461)),At=!1;function Yt(e,n,i,u){n.child=e===null?tm(n,null,i,u):Ni(n,e.child,i,u)}function Jm(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=Zs(),e!==null&&!At?(Ks(e,n,f),gl(e,n,f)):($e&&w&&_s(n),n.flags|=1,Yt(e,n,u,f),n.child)}function Wm(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,ep(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:Xa,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 ep(e,n,i,u,f){if(e!==null){var h=e.memoizedProps;if(Xa(h,u)&&e.ref===n.ref)if(At=!1,n.pendingProps=u=h,Sc(e,f))(e.flags&131072)!==0&&(At=!0);else return n.lanes=e.lanes,gl(e,n,f)}return mc(e,n,i,u,f)}function tp(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 np(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?im(n,h):Fs(),am(n);else return u=n.lanes=536870912,np(e,n,h!==null?h.baseLanes|i:i,i,u)}else h!==null?(wu(n,h.cachePool),im(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 np(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(),am(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 lp(e,n,i){return Ni(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,ur(null,e);if(Xs(n),(e=ft)?(e=pg(e,jn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Qn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},i=qh(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(Xs(n),f)if(n.flags&256)n.flags&=-257,n=lp(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(At||la(e,n,i,!1),f=(i&e.childLanes)!==0,At||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;Ku(),n=lp(e,n,i)}else e=h.treeContext,ft=Rn(v.nextSibling),Ht=n,$e=!0,Ul=null,jn=!1,e!==null&&Vh(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=Zs(),e!==null&&!At?(Ks(e,n,f),gl(e,n,f)):($e&&u&&_s(n),n.flags|=1,Yt(e,n,i,f),n.child)}function ip(e,n,i,u,f,h){return _i(n),n.updateQueue=null,i=um(n,u,i,f),rm(e),u=Zs(),e!==null&&!At?(Ks(e,n,h),gl(e,n,h)):($e&&u&&_s(n),n.flags|=1,Yt(e,n,i,h),n.child)}function ap(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 F=h.context,te=i.contextType;v=Wi,typeof te=="object"&&te!==null&&(v=qt(te));var re=i.getDerivedStateFromProps;te=typeof re=="function"||typeof h.getSnapshotBeforeUpdate=="function",w=n.pendingProps!==w,te||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(w||F!==v)&&Im(n,h,u,v),ql=!1;var $=n.memoizedState;h.state=$,nr(n,u,h,f),tr(),F=n.memoizedState,w||$!==F||ql?(typeof re=="function"&&(cc(n,i,re,u),F=n.memoizedState),(M=ql||Fm(n,i,M,u,$,F,v))?(te||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=F),h.props=u,h.state=F,h.context=v,u=M):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),u=!1)}else{h=n.stateNode,Ys(e,n),v=n.memoizedProps,te=Mi(i,v),h.props=te,re=n.pendingProps,$=h.context,F=i.contextType,M=Wi,typeof F=="object"&&F!==null&&(M=qt(F)),w=i.getDerivedStateFromProps,(F=typeof w=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(v!==re||$!==M)&&Im(n,h,u,M),ql=!1,$=n.memoizedState,h.state=$,nr(n,u,h,f),tr();var J=n.memoizedState;v!==re||$!==J||ql||e!==null&&e.dependencies!==null&&Su(e.dependencies)?(typeof w=="function"&&(cc(n,i,w,u),J=n.memoizedState),(te=ql||Fm(n,i,te,u,$,J,M)||e!==null&&e.dependencies!==null&&Su(e.dependencies))?(F||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&&$===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&$===e.memoizedState||(n.flags|=1024),n.memoizedProps=u,n.memoizedState=J),h.props=u,h.state=J,h.context=M,u=te):(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=Ni(n,e.child,null,f),n.child=Ni(n,null,i,f)):Yt(e,n,i,f),n.memoizedState=h.state,e=n.child):e=gl(e,n,f),e}function rp(e,n,i,u){return Ai(),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:Zh()}}function yc(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=gn),e}function up(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=pg(e,jn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ll!==null?{id:Qn,overflow:$n}:null,retryLane:536870912,hydrationErrors:null},i=qh(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,Ni(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 F=v.dgst;v=F,u=Error(r(419)),u.stack="",u.digest=v,Za({value:u,source:null,stack:null}),n=bc(e,n,i)}else if(At||la(e,n,i,!1),v=(i&e.childLanes)!==0,At||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)||Ku(),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,jn=!1,e!==null&&Vh(n,e),n=vc(n,u.children),n.flags|=4096);return n}return f?(Fl(),w=u.fallback,f=n.mode,M=e.child,F=M.sibling,u=cl(M,{mode:"hidden",children:u.children}),u.subtreeFlags=M.subtreeFlags&65011712,F!==null?w=cl(F,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=Zh(),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 Ni(n,e.child,null,i),e=vc(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function op(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 sp(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,C(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&&op(e,i,n);else if(e.tag===19)op(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),Ql|=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),Ai();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,Xs(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?up(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 sp(e,n,i);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),C(wt,wt.current),u)break;return null;case 22:return n.lanes=0,tp(e,n,i,n.pendingProps);case 24:Hl(n,Ct,e.memoizedState.cache)}return gl(e,n,i)}function cp(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)At=!0;else{if(!Sc(e,i)&&(n.flags&128)===0)return At=!1,G1(e,n,i);At=(e.flags&131072)!==0}else At=!1,$e&&(n.flags&1048576)!==0&&Gh(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=ap(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===W){n.tag=11,n=Jm(null,n,e,u,i);break e}else if(f===_){n.tag=14,n=Wm(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),ap(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=rp(e,n,u,i);break e}else if(u!==f){f=Cn(Error(r(424)),n),Za(f),n=rp(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,jn=!0,i=tm(n,null,u,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Ai(),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=Sg(n.type,null,n.pendingProps,null))?n.memoizedState=i:$e||(i=n.type,e=n.pendingProps,u=lo(xe.current).createElement(i),u[me]=n,u[ye]=e,Gt(u,i,e),ht(u),n.stateNode=u):n.memoizedState=Sg(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return zt(n),e===null&&$e&&(u=n.stateNode=vg(n.type,n.pendingProps,xe.current),Ht=n,jn=!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=vx(u,n.type,n.pendingProps,jn),u!==null?(n.stateNode=u,Ht=n,ft=Rn(u.firstChild),jn=!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,Zc(f,h)?u=null:v!==null&&Zc(f,v)&&(n.flags|=32),n.memoizedState!==null&&(f=$s(e,n,N1,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=bx(i,n.pendingProps,jn),i!==null?(n.stateNode=i,Ht=n,ft=null,e=!0):e=!1),e||Bl(n)),null;case 13:return up(e,n,i);case 4:return pe(n,n.stateNode.containerInfo),u=n.pendingProps,e===null?n.child=Ni(n,null,u,i):Yt(e,n,u,i),n.child;case 11:return Jm(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 Wm(e,n,n.type,n.pendingProps,i);case 15:return ep(e,n,n.type,n.pendingProps,i);case 19:return sp(e,n,i);case 31:return Y1(e,n,i);case 22:return tp(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(Up())e.flags|=8192;else throw Di=Cu,Hs}else e.flags&=-16777217}function fp(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Tg(n))if(Up())e.flags|=8192;else throw Di=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 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,Ds())),dt(n),null;case 26:var f=n.type,h=n.memoizedState;return e===null?(yl(n),h!==null?(dt(n),fp(n,h)):(dt(n),Ec(n,f,null,u,i))):h?h!==e.memoizedState?(yl(n),dt(n),fp(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=xe.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)?Fh(n):(e=vg(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))Fh(n);else{var v=lo(xe.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=xe.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||ug(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 Ai(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),e=!1}else i=Ds(),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 Ai(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;dt(n),f=!1}else f=Ds(),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(V(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;)Hh(i,e),i=i.sibling;return C(wt,wt.current&1|2),$e&&fl(n,u.treeForkCount),n.child}e=e.sibling}u.tail!==null&&pt()>Qu&&(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>Qu&&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,C(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&&V(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));Ai()}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));Ai()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return V(wt),null;case 4:return Re(),null;case 10:return hl(n.type),null;case 22:case 23:return mn(n),Is(),e!==null&&V(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 dp(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:V(wt);break;case 10:hl(n.type);break;case 22:case 23:mn(n),Is(),e!==null&&V(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,F=w;try{F()}catch(te){it(f,M,te)}}}u=u.next}while(u!==h)}}catch(te){it(n,n.return,te)}}function hp(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{lm(n,i)}catch(u){it(e,e.return,u)}}}function mp(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 Zn(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 pp(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 gp(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||gp(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 yp(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,jt=!1,Tc=!1,vp=typeof WeakSet=="function"?WeakSet:Set,Mt=null;function I1(e,n){if(e=e.containerInfo,Qc=co,e=Rh(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,F=0,te=0,re=e,$=null;t:for(;;){for(var J;re!==i||f!==0&&re.nodeType!==3||(w=v+f),re!==h||u!==0&&re.nodeType!==3||(M=v+u),re.nodeType===3&&(v+=re.nodeValue.length),(J=re.firstChild)!==null;)$=re,re=J;for(;;){if(re===e)break t;if($===i&&++F===f&&(w=v),$===h&&++te===u&&(M=v),(J=re.nextSibling)!==null)break;re=$,$=re.parentNode}re=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(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 bp(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&&hp(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{lm(e,n)}catch(v){it(i,i.return,v)}}break;case 27:n===null&&u&4&&yp(i);case 26:case 5:xl(e,i),n===null&&u&4&&pp(i),u&512&&cr(i,i.return);break;case 12:xl(e,i);break;case 31:xl(e,i),u&4&&Ep(e,i);break;case 13:xl(e,i),u&4&&wp(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||jt,f=vl;var h=jt;vl=u,(jt=n)&&!h?Sl(e,i,(i.subtreeFlags&8772)!==0):xl(e,i),vl=f,jt=h}break;case 30:break;default:xl(e,i)}}function xp(e){var n=e.alternate;n!==null&&(e.alternate=null,xp(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;)Sp(e,n,i),i=i.sibling}function Sp(e,n,i){if(nt&&typeof nt.onCommitFiberUnmount=="function")try{nt.onCommitFiberUnmount(Lt,i)}catch{}switch(i.tag){case 26:jt||Zn(i,n),bl(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:jt||Zn(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:jt||Zn(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,hg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),wa(e)):hg(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),jt||Il(4,i,n),bl(e,n,i);break;case 1:jt||(Zn(i,n),u=i.stateNode,typeof u.componentWillUnmount=="function"&&mp(i,n,u)),bl(e,n,i);break;case 21:bl(e,n,i);break;case 22:jt=(u=jt)||i.memoizedState!==null,bl(e,n,i),jt=u;break;default:bl(e,n,i)}}function Ep(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 wp(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 vp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new vp),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=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));Sp(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;)kp(n,e),n=n.sibling}var Vn=null;function kp(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&&(jt||i===null||Zn(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&&(jt||i===null||Zn(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=kg("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=kg("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 Cg(f,e.type,e.stateNode);else e.stateNode=wg(f,u,e.memoizedProps);else h!==u?(h===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):h.count--,u===null?Cg(f,e.type,e.stateNode):wg(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&&(jt||i===null||Zn(i,i.return)),i!==null&&u&4&&wc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(tn(n,e),nn(e),u&512&&(jt||i===null||Zn(i,i.return)),e.flags&32){f=e.stateNode;try{Xi(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,Cp(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)&&(Xu=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,F=vl,te=jt;if(vl=F||f,jt=te||M,tn(n,e),jt=te,vl=F,nn(e),u&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(i===null||M||vl||jt||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 re=M.memoizedProps.style,$=re!=null&&re.hasOwnProperty("display")?re.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 J=M.stateNode;f?mg(J,!0):mg(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(gp(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&&(Xi(v,""),i.flags&=-33);var w=kc(e);Vu(e,w,v);break;case 3:case 4:var M=i.stateNode.containerInfo,F=kc(e);Cc(e,F,M);break;default:throw Error(r(161))}}catch(te){it(e,e.return,te)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Cp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Cp(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;)bp(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:Zn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&mp(n,n.return,i),Li(n);break;case 27:br(n.stateNode);case 26:case 5:Zn(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(F){it(u,u.return,F)}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++)nm(M[f],w)}catch(F){it(u,u.return,F)}}i&&v&64&&hp(h),cr(h,h.return);break;case 27:yp(h);case 26:case 5:Sl(f,h,i),i&&u===null&&v&4&&pp(h),cr(h,h.return);break;case 12:Sl(f,h,i);break;case 31:Sl(f,h,i),i&&v&4&&Ep(f,h);break;case 13:Sl(f,h,i),i&&v&4&&wp(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 Ac(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&&Ka(i))}function jc(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ka(e))}function Fn(e,n,i,u){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Tp(e,n,i,u),n=n.sibling}function Tp(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&&Ka(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&&Ac(v,n);break;case 24:Fn(e,n,i,u),f&2048&&jc(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,F=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 te=v.stateNode;v.memoizedState!==null?te._visibility&2?da(h,v,w,M,f):fr(h,v):(te._visibility|=2,da(h,v,w,M,f)),f&&F&2048&&Ac(v.alternate,v);break;case 24:da(h,v,w,M,f),f&&F&2048&&jc(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&&Ac(u.alternate,u);break;case 24:fr(i,u),f&2048&&jc(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;)Ap(e,n,i),e=e.sibling}function Ap(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,Rp(u,e)}jp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_p(e),e=e.sibling}function _p(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,Rp(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 Rp(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:Ka(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(xp(u),u===i){Mt=null;break e}if(f!==null){f.return=h,Mt=f;break e}Mt=h}}}var Q1={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}},$1=typeof WeakMap=="function"?WeakMap:Map,et=0,ot=null,He=null,Ge=0,lt=0,pn=null,Xl=!1,ma=!1,_c=!1,El=0,St=0,Ql=0,Ui=0,Rc=0,gn=0,pa=0,mr=null,ln=null,zc=!1,Xu=0,zp=0,Qu=1/0,$u=null,$l=null,Dt=0,Zl=null,ga=null,wl=0,Dc=0,Nc=null,Dp=null,pr=0,Oc=null;function yn(){return(et&2)!==0&&Ge!==0?Ge&-Ge:H.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),Kl(e,Ge,gn,!1)),Ol(e,i),((et&2)===0||e!==ot)&&(e===ot&&((et&2)===0&&(Ui|=i),St===4&&Kl(e,Ge,gn,!1)),Kn(e))}function Op(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&&Kl(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),Kl(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:Kl(u,n,gn,!Xl);break e;case 2:ln=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=Xu+300-pt(),10<f)){if(Kl(u,n,gn,!Xl),gi(u,0,!0)!==0)break e;wl=n,u.timeoutHandle=fg(Mp.bind(null,u,i,ln,$u,zc,n,gn,Ui,pa,Xl,h,"Throttled",-0,0),f);break e}Mp(u,i,ln,$u,zc,n,gn,Ui,pa,Xl,h,null,-0,0)}}break}while(!0);Kn(e)}function Mp(e,n,i,u,f,h,v,w,M,F,te,re,$,J){if(e.timeoutHandle=-1,re=n.subtreeFlags,re&8192||(re&16785408)===16785408){re={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ol},Ap(n,h,re);var Se=(h&62914560)===h?Xu-pt():(h&4194048)===h?zp-pt():0;if(Se=Nx(re,Se),Se!==null){wl=h,e.cancelPendingCommit=Se(Vp.bind(null,e,n,h,i,u,f,v,w,M,te,re,null,$,J)),Kl(e,h,v,!F);return}}Vp(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 Kl(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 Zu(){return(et&6)===0?(gr(0),!1):!0}function Mc(){if(He!==null){if(lt===0)var e=He.return;else e=He,dl=ji=null,Ps(e),ua=null,Ja=0,e=He;for(;e!==null;)dp(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,Xl=!1,ma=yi(e,n),_c=!1,pa=gn=Rc=Ui=Ql=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 Lp(e,n){Me=null,H.H=rr,n===ra||n===ku?(n=Jh(),lt=3):n===Hs?(n=Jh(),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 Up(){var e=hn.current;return e===null?!0:(Ge&4194048)===Ge?_n===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===_n:!1}function Bp(){var e=H.H;return H.H=rr,e===null?rr:e}function Hp(){var e=H.A;return H.A=Q1,e}function Ku(){St=4,Xl||(Ge&4194048)!==Ge&&hn.current!==null||(ma=!0),(Ql&134217727)===0&&(Ui&134217727)===0||ot===null||Kl(ot,Ge,gn,!1)}function Lc(e,n,i){var u=et;et|=2;var f=Bp(),h=Hp();(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 F=lt;if(lt=0,pn=null,va(e,w,M,F),i&&ma){v=0;break e}break;default:F=lt,lt=0,pn=null,va(e,w,M,F)}}K1(),v=St;break}catch(te){Lp(e,te)}while(!0);return n&&e.shellSuspendCounter++,dl=ji=null,et=u,H.H=f,H.A=h,He===null&&(ot=null,Ge=0,gu()),v}function K1(){for(;He!==null;)qp(He)}function P1(e,n){var i=et;et|=2;var u=Bp(),f=Hp();ot!==e||Ge!==n?($u=null,Qu=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,Yp(n);break}n=function(){lt!==2&<!==9||ot!==e||(lt=7),Kn(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,Yp(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?Tg(v):w.stateNode.complete){lt=0,pn=null;var M=w.sibling;if(M!==null)He=M;else{var F=w.return;F!==null?(He=F,Pu(F)):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(te){Lp(e,te)}while(!0);return dl=ji=null,H.H=u,H.A=f,et=i,He!==null?0:(ot=null,Ge=0,gu(),St)}function J1(){for(;He!==null&&!La();)qp(He)}function qp(e){var n=cp(e.alternate,e,El);e.memoizedProps=e.pendingProps,n===null?Pu(e):He=n}function Yp(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=ip(i,n,n.pendingProps,n.type,void 0,Ge);break;case 11:n=ip(i,n,n.pendingProps,n.type.render,n.ref,Ge);break;case 5:Ps(n);default:dp(i,n),n=He=Hh(n,El),n=cp(i,n,El)}e.memoizedProps=e.pendingProps,n===null?Pu(e):He=n}function va(e,n,i,u){dl=ji=null,Ps(n),ua=null,Ja=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:(Xl=e=!0,(u===2||u===9||u===3||u===6)&&(u=hn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Gp(n,e)):Pu(n)}function Pu(e){var n=e;do{if((n.flags&32768)!==0){Gp(n,Xl);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 Gp(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 Vp(e,n,i,u,f,h,v,w,M){e.cancelPendingCommit=null;do Ju();while(Dt!==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,Zl=e,wl=i,Dc=h,Nc=f,Dp=u,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,nx(Ce,function(){return $p(),null})):(e.callbackNode=null,e.callbackPriority=0),u=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,f=ee.p,ee.p=2,v=et,et|=4;try{I1(e,n,i)}finally{et=v,ee.p=f,H.T=u}}Dt=1,Fp(),Ip(),Xp()}}function Fp(){if(Dt===1){Dt=0;var e=Zl,n=ga,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=H.T,H.T=null;var u=ee.p;ee.p=2;var f=et;et|=4;try{kp(n,e);var h=$c,v=Rh(e.containerInfo),w=h.focusedElem,M=h.selectionRange;if(v!==w&&w&&w.ownerDocument&&_h(w.ownerDocument.documentElement,w)){if(M!==null&&bs(w)){var F=M.start,te=M.end;if(te===void 0&&(te=F),"selectionStart"in w)w.selectionStart=F,w.selectionEnd=Math.min(te,w.value.length);else{var re=w.ownerDocument||document,$=re&&re.defaultView||window;if($.getSelection){var J=$.getSelection(),Se=w.textContent.length,ze=Math.min(M.start,Se),ut=M.end===void 0?ze:Math.min(M.end,Se);!J.extend&&ze>ut&&(v=ut,ut=ze,ze=v);var q=jh(w,ze),U=jh(w,ut);if(q&&U&&(J.rangeCount!==1||J.anchorNode!==q.node||J.anchorOffset!==q.offset||J.focusNode!==U.node||J.focusOffset!==U.offset)){var G=re.createRange();G.setStart(q.node,q.offset),J.removeAllRanges(),ze>ut?(J.addRange(G),J.extend(U.node,U.offset)):(G.setEnd(U.node,U.offset),J.addRange(G))}}}}for(re=[],J=w;J=J.parentNode;)J.nodeType===1&&re.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof w.focus=="function"&&w.focus(),w=0;w<re.length;w++){var ie=re[w];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}co=!!Qc,$c=Qc=null}finally{et=f,ee.p=u,H.T=i}}e.current=n,Dt=2}}function Ip(){if(Dt===2){Dt=0;var e=Zl,n=ga,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=H.T,H.T=null;var u=ee.p;ee.p=2;var f=et;et|=4;try{bp(e,n.alternate,n)}finally{et=f,ee.p=u,H.T=i}}Dt=3}}function Xp(){if(Dt===4||Dt===3){Dt=0,Ua();var e=Zl,n=ga,i=wl,u=Dp;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Dt=5:(Dt=0,ga=Zl=null,Qp(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&($l=null),ue(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=H.T,f=ee.p,ee.p=2,H.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{H.T=n,ee.p=f}}(wl&3)!==0&&Ju(),Kn(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,Ka(n)))}function Ju(){return Fp(),Ip(),Xp(),$p()}function $p(){if(Dt!==5)return!1;var e=Zl,n=Dc;Dc=0;var i=ue(wl),u=H.T,f=ee.p;try{ee.p=32>i?32:i,H.T=null,i=Nc,Nc=null;var h=Zl,v=wl;if(Dt=0,ga=Zl=null,wl=0,(et&6)!==0)throw Error(r(331));var w=et;if(et|=4,_p(h.current),Tp(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,H.T=u,Qp(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),Kn(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=Km(2),u=Gl(n,i,2),u!==null&&(Pm(i,u,n,e),Ol(u,2),Kn(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()-Xu?(et&2)===0&&ya(e,0):Rc|=i,pa===Ge&&(pa=0)),Kn(e)}function Kp(e,n){n===0&&(n=vi()),e=Ci(e,n),e!==null&&(Ol(e,n),Kn(e))}function ex(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),Kp(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),Kp(e,i)}function nx(e,n){return zl(e,n)}var Wu=null,ba=null,Bc=!1,eo=!1,Hc=!1,Pl=0;function Kn(e){e!==ba&&e.next===null&&(ba===null?Wu=ba=e:ba=ba.next=e),eo=!0,Bc||(Bc=!0,ix())}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,eg(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,eg(u,h));u=u.next}while(i);Hc=!1}}function lx(){Pp()}function Pp(){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=Jp(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}Dt!==0&&Dt!==5||gr(e),Pl!==0&&(Pl=0)}function Jp(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),ue(i)){case 2:case 8:i=de;break;case 32:i=Ce;break;case 268435456:i=Pe;break;default:i=Ce}return u=Wp.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 Wp(e,n){if(Dt!==0&&Dt!==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:(Op(e,u,n),Jp(e,pt()),e.callbackNode!=null&&e.callbackNode===i?Wp.bind(null,e):null)}function eg(e,n){if(Ju())return null;Op(e,n,!0)}function ix(){gx(function(){(et&6)!==0?zl(ne,lx):Pp()})}function qc(){if(Pl===0){var e=ia;e===0&&(e=al,al<<=1,(al&261888)===0&&(al=256)),Pl=e}return Pl}function tg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:ou(""+e)}function ng(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=tg((f[ye]||null).action),v=u.submitter;v&&(n=(n=v[ye]||null)?tg(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?ng(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?ng(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(Nh,"onAnimationEnd"),Gn(Oh,"onAnimationIteration"),Gn(Mh,"onAnimationStart"),Gn("dblclick","onDoubleClick"),Gn("focusin","onFocus"),Gn("focusout","onBlur"),Gn(w1,"onTransitionRun"),Gn(k1,"onTransitionStart"),Gn(C1,"onTransitionCancel"),Gn(Lh,"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(" "),ox=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(yr));function lg(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,F=w.currentTarget;if(w=w.listener,M!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=F;try{h(f)}catch(te){pu(te)}f.currentTarget=null,h=M}else for(v=0;v<u.length;v++){if(w=u[v],M=w.instance,F=w.currentTarget,w=w.listener,M!==h&&f.isPropagationStopped())break e;h=w,f.currentTarget=F;try{h(f)}catch(te){pu(te)}f.currentTarget=null,h=M}}}}function qe(e,n){var i=n[je];i===void 0&&(i=n[je]=new Set);var u=e+"__bubble";i.has(u)||(ig(n,e,2,!1),i.add(u))}function Vc(e,n,i){var u=0;n&&(u|=4),ig(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 ig(e,n,i,u){switch(Ng(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}sh(function(){var F=h,te=os(i),re=[];e:{var $=Uh.get(e);if($!==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=dh;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 Nh:case Oh:case Mh:J=Xb;break;case Lh: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=mh;break;case"toggle":case"beforetoggle":J=c1}var ze=(n&4)!==0,ut=!ze&&(e==="scroll"||e==="scrollend"),q=ze?$!==null?$+"Capture":null:$;ze=[];for(var U=F,G;U!==null;){var ie=U;if(G=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||G===null||q===null||(ie=Ha(U,q),ie!=null&&ze.push(vr(U,ie,G))),ut)break;U=U.return}0<ze.length&&($=new J($,Se,null,i,te),re.push({event:$,listeners:ze}))}}if((n&7)===0){e:{if($=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",$&&i!==us&&(Se=i.relatedTarget||i.fromElement)&&(bt(Se)||Se[we]))break e;if((J||$)&&($=te.window===te?te:($=te.ownerDocument)?$.defaultView||$.parentWindow:window,J?(Se=i.relatedTarget||i.toElement,J=F,Se=Se?bt(Se):null,Se!==null&&(ut=s(Se),ze=Se.tag,Se!==ut||ze!==5&&ze!==27&&ze!==6)&&(Se=null)):(J=null,Se=F),J!==Se)){if(ze=dh,ie="onMouseLeave",q="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(ze=mh,ie="onPointerLeave",q="onPointerEnter",U="pointer"),ut=J==null?$:Ot(J),G=Se==null?$:Ot(Se),$=new ze(ie,U+"leave",J,i,te),$.target=ut,$.relatedTarget=G,ie=null,bt(te)===F&&(ze=new ze(q,U+"enter",Se,i,te),ze.target=G,ze.relatedTarget=ut,ie=ze),ut=ie,J&&Se)t:{for(ze=sx,q=J,U=Se,G=0,ie=q;ie;ie=ze(ie))G++;ie=0;for(var Ae=U;Ae;Ae=ze(Ae))ie++;for(;0<G-ie;)q=ze(q),G--;for(;0<ie-G;)U=ze(U),ie--;for(;G--;){if(q===U||U!==null&&q===U.alternate){ze=q;break t}q=ze(q),U=ze(U)}ze=null}else ze=null;J!==null&&ag(re,$,J,ze,!1),Se!==null&&ut!==null&&ag(re,ut,Se,ze,!0)}}e:{if($=F?Ot(F):window,J=$.nodeName&&$.nodeName.toLowerCase(),J==="select"||J==="input"&&$.type==="file")var Je=Eh;else if(xh($))if(wh)Je=x1;else{Je=v1;var Ee=y1}else J=$.nodeName,!J||J.toLowerCase()!=="input"||$.type!=="checkbox"&&$.type!=="radio"?F&&rs(F.elementType)&&(Je=Eh):Je=b1;if(Je&&(Je=Je(e,F))){Sh(re,Je,i,te);break e}Ee&&Ee(e,$,F),e==="focusout"&&F&&$.type==="number"&&F.memoizedProps.value!=null&&as($,"number",$.value)}switch(Ee=F?Ot(F):window,e){case"focusin":(xh(Ee)||Ee.contentEditable==="true")&&(Ki=Ee,xs=F,Qa=null);break;case"focusout":Qa=xs=Ki=null;break;case"mousedown":Ss=!0;break;case"contextmenu":case"mouseup":case"dragend":Ss=!1,zh(re,i,te);break;case"selectionchange":if(E1)break;case"keydown":case"keyup":zh(re,i,te)}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 Zi?vh(e,i)&&(Ve="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ve="onCompositionStart");Ve&&(ph&&i.locale!=="ko"&&(Zi||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&Zi&&(Le=ch()):(Ml=te,fs="value"in Ml?Ml.value:Ml.textContent,Zi=!0)),Ee=no(F,Ve),0<Ee.length&&(Ve=new hh(Ve,e,null,i,te),re.push({event:Ve,listeners:Ee}),Le?Ve.data=Le:(Le=bh(i),Le!==null&&(Ve.data=Le)))),(Le=d1?h1(e,i):m1(e,i))&&(Ve=no(F,"onBeforeInput"),0<Ve.length&&(Ee=new hh("onBeforeInput","beforeinput",null,i,te),re.push({event:Ee,listeners:Ve}),Ee.data=Le)),ax(re,e,F,i,te)}lg(re,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 sx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ag(e,n,i,u,f){for(var h=n._reactName,v=[];i!==null&&i!==u;){var w=i,M=w.alternate,F=w.stateNode;if(w=w.tag,M!==null&&M===u)break;w!==5&&w!==26&&w!==27||F===null||(M=F,f?(F=Ha(i,h),F!=null&&v.unshift(vr(i,F,M))):f||(F=Ha(i,h),F!=null&&v.push(vr(i,F,M)))),i=i.return}v.length!==0&&e.push({event:n,listeners:v})}var cx=/\r\n?/g,fx=/\u0000|\uFFFD/g;function rg(e){return(typeof e=="string"?e:""+e).replace(cx,`
|
|
9
|
-
`).replace(fx,"")}function ug(e,n){return n=rg(n),rg(e)===n}function rt(e,n,i,u,f,h){switch(i){case"children":typeof u=="string"?n==="body"||n==="textarea"&&u===""||Xi(e,u):(typeof u=="number"||typeof u=="bigint")&&n!=="body"&&Xi(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":uh(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=Hb.get(i)||i,Et(e,i,u))}}function Xc(e,n,i,u,f,h){switch(i){case"style":uh(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"?Xi(e,u):(typeof u=="number"||typeof u=="bigint")&&Xi(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,F=null;for(u in i)if(i.hasOwnProperty(u)){var te=i[u];if(te!=null)switch(u){case"name":f=te;break;case"type":v=te;break;case"checked":M=te;break;case"defaultChecked":F=te;break;case"value":h=te;break;case"defaultValue":w=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,n));break;default:rt(e,n,u,te,i,null)}}lh(e,h,w,M,F,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)}ah(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(F in i)if(i.hasOwnProperty(F)&&(u=i[F],u!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:rt(e,n,F,u,i,null)}return;default:if(rs(n)){for(te in i)i.hasOwnProperty(te)&&(u=i[te],u!==void 0&&Xc(e,n,te,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,F=null,te=null;for(J in i){var re=i[J];if(i.hasOwnProperty(J)&&re!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":M=re;default:u.hasOwnProperty(J)||rt(e,n,J,null,u,re)}}for(var $ in u){var J=u[$];if(re=i[$],u.hasOwnProperty($)&&(J!=null||re!=null))switch($){case"type":h=J;break;case"name":f=J;break;case"checked":F=J;break;case"defaultChecked":te=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!==re&&rt(e,n,$,J,u,re)}}is(e,v,w,M,F,te,h,f);return;case"select":J=v=w=$=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":$=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,$!=null?Ii(e,!!i,$,!1):!!u!=!!i&&(n!=null?Ii(e,!!i,n,!0):Ii(e,!!i,i?[]:"",!1));return;case"textarea":J=$=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":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)}ih(e,$,J);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],J=i[M],u.hasOwnProperty(M)&&$!==J&&($!=null||J!=null)&&(M==="selected"?e.selected=$&&typeof $!="function"&&typeof $!="symbol":rt(e,n,M,$,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 ze in i)$=i[ze],i.hasOwnProperty(ze)&&$!=null&&!u.hasOwnProperty(ze)&&rt(e,n,ze,null,u,$);for(F in u)if($=u[F],J=i[F],u.hasOwnProperty(F)&&$!==J&&($!=null||J!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if($!=null)throw Error(r(137,n));break;default:rt(e,n,F,$,u,J)}return;default:if(rs(n)){for(var ut in i)$=i[ut],i.hasOwnProperty(ut)&&$!==void 0&&!u.hasOwnProperty(ut)&&Xc(e,n,ut,void 0,u,$);for(te in u)$=u[te],J=i[te],!u.hasOwnProperty(te)||$===J||$===void 0&&J===void 0||Xc(e,n,te,$,u,J);return}}for(var q in i)$=i[q],i.hasOwnProperty(q)&&$!=null&&!u.hasOwnProperty(q)&&rt(e,n,q,null,u,$);for(re in u)$=u[re],J=i[re],!u.hasOwnProperty(re)||$===J||$==null&&J==null||rt(e,n,re,$,u,J)}function og(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&&og(v)){for(v=0,w=f.responseEnd,u+=1;u<i.length;u++){var M=i[u],F=M.startTime;if(F>w)break;var te=M.transferSize,re=M.initiatorType;te&&og(re)&&(M=M.responseEnd,v+=te*(M<w?1:(w-F)/(M-F)))}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 Qc=null,$c=null;function lo(e){return e.nodeType===9?e:e.ownerDocument}function sg(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 cg(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 Zc(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 Kc=null;function mx(){var e=window.event;return e&&e.type==="popstate"?e===Kc?!1:(Kc=e,!0):(Kc=null,!1)}var fg=typeof setTimeout=="function"?setTimeout:void 0,px=typeof clearTimeout=="function"?clearTimeout:void 0,dg=typeof Promise=="function"?Promise:void 0,gx=typeof queueMicrotask=="function"?queueMicrotask:typeof dg<"u"?function(e){return dg.resolve(null).then(e).catch(yx)}:fg;function yx(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function hg(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 mg(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 pg(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 gg(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 yg(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 vg(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,bg=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:jx,S:Ax,M:_x};function Sx(){var e=kl.f(),n=Zu();return e||n}function Ex(e){var n=Ie(e);n!==null&&n.tag===5&&n.type==="form"?Lm(n):kl.r(e)}var xa=typeof document>"u"?null:document;function xg(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+'"]'),bg.has(f)||(bg.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 wx(e){kl.D(e),xg("dns-prefetch",e,null)}function kx(e,n){kl.C(e,n),xg("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)}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 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(!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(F,te){M.onload=F,M.onerror=te}),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 jx(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 _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(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 Sg(e,n,i,u){var f=(f=xe.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||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 xr(e){return'link[rel="stylesheet"]['+e+"]"}function Eg(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}),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 wg(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=Eg(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 kg(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 Cg(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function zx(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 Tg(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=Eg(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 Nx(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 Er={$$typeof:L,Provider:null,Consumer:null,_currentValue:oe,_currentValue2:oe,_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=Nl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nl(0),this.hiddenUpdates=Nl(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,F,te,re){return e=new Mx(e,n,i,v,M,F,te,re,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 _g(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 Rg(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){Rg(e,n),(e=e.alternate)&&Rg(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=Z(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=H.T;H.T=null;var h=ee.p;try{ee.p=2,rf(e,n,i,u)}finally{ee.p=h,H.T=f}}function Ux(e,n,i,u){var f=H.T;H.T=null;var h=ee.p;try{ee.p=8,rf(e,n,i,u)}finally{ee.p=h,H.T=f}}function rf(e,n,i,u){if(co){var f=uf(u);if(f===null)Ic(e,n,u,fo,i),Og(e,u);else if(Hx(f,e,n,i,u))u.stopPropagation();else if(Og(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}Kn(h),(et&6)===0&&(Qu=pt()+500,gr(0))}}break;case 31:case 13:w=Ci(h,2),w!==null&&an(w,h,2),Zu(),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 ne:return 2;case de:return 8;case Ce:case De: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=[],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 Og(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&&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=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 Mg(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 Lg(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),wr.forEach(Lg),kr.forEach(Lg)}function mo(e,n){e.blockedOn===n&&(e.blockedOn=null,sf||(sf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,qx)))}var po=null;function Ug(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);)Mg(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||Ug(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),Ug(i)}}}function Bg(){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();_g(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;_g(e.current,2,null,e,null,null),Zu(),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&&Mg(e)}};var Hg=l.version;if(Hg!=="19.2.4")throw Error(r(527,Hg,"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:H,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(Yx),nt=yo}catch{}}return Ar.createRoot=function(e,n){if(!o(e))throw Error(r(299));var i=!1,u="",f=Xm,h=Qm,v=$m;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,Bg),e[we]=n.current,Fc(e),new cf(n)},Ar.hydrateRoot=function(e,n,i){if(!o(e))throw Error(r(299));var u=!1,f="",h=Xm,v=Qm,w=$m,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,Bg),n.context=jg(null),i=n.current,u=yn(),u=Z(u),f=Yl(u),f.callback=null,Gl(i,f,u),i=u,n.current.lanes=i,Ol(n,i),Kn(n),e[we]=n.current,Fc(e),new go(n)},Ar.version="19.2.4",Ar}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 wv=t=>{throw TypeError(t)},tS=(t,l,a)=>l.has(t)||wv("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)?wv("Cannot add the same private member more than once"):l instanceof WeakSet?l.add(t):l.set(t,a),Kg="popstate";function lS(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 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 Pg(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||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 D=y(),T=D==null?null:D-m;m=D,p&&p({action:d,location:j.location,delta:T})}function b(D,T){d="PUSH";let A=Gr(j.location,D,T);m=y()+1;let L=Pg(A,m),W=j.createHref(A);try{c.pushState(L,"",W)}catch(K){if(K instanceof DOMException&&K.name==="DataCloneError")throw K;o.location.assign(W)}s&&p&&p({action:d,location:j.location,delta:1})}function x(D,T){d="REPLACE";let A=Gr(j.location,D,T);m=y();let L=Pg(A,m),W=j.createHref(A);c.replaceState(L,"",W),s&&p&&p({action:d,location:j.location,delta:0})}function E(D){return kv(D)}let j={get action(){return d},get location(){return t(o,c)},listen(D){if(p)throw new Error("A history only accepts one active listener");return o.addEventListener(Kg,g),p=D,()=>{o.removeEventListener(Kg,g),p=null}},createHref(D){return l(o,D)},createURL:E,encodeLocation(D){let T=E(D);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:b,replace:x,go(D){return c.go(D)}};return j}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,Jg=class{constructor(t){if(nS(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 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 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`),cS(s)){let m={...s,id:p};return r[p]=Wg(m,l(m)),m}else{let m={...s,id:p,children:void 0};return r[p]=Wg(m,l(m)),s.children&&(m.children=Vr(s.children,l,d,r,o)),m}})}function Wg(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);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 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: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 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 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,ey=t=>t==="*";function bS(t,l){let a=t.split("/"),r=a.length;return a.some(ey)&&(r+=vS),l&&(r+=pS),a.filter(o=>!ey(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 x=d[b];return g&&!x?m[y]=void 0:m[y]=(x||"").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,yd=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=ty(a.substring(1),"/"):s=ty(a,l)):s=l,{pathname:s,search:AS(r),hash:jS(o)}}function ty(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 jv(t){return t.filter((l,a)=>a===0||l.route.path&&l.route.path.length>0)}function vd(t){let l=jv(t);return l.map((a,r)=>r===l.length-1?a.pathname:a.pathnameBase)}function bd(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(/^\/*/,"/"),AS=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,jS=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,Qr=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"||!Av.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 _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=ja(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=ja(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=ja(a[o],c,(...p)=>ny(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=ja(a.middleware,s,(...d)=>ny(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=ja(a.navigate,r,(...s)=>{let[c,d]=s;return{to:typeof c=="number"||typeof c=="string"?c:c?el(c):".",...ly(t,d??{})}});o&&(o[si]=r,t.navigate=o)}if(a.fetch.length>0){let r=t.fetch[si]??t.fetch,o=ja(a.fetch,r,(...s)=>{let[c,,d,p]=s;return{href:d??".",fetcherKey:c,...ly(t,p??{})}});o&&(o[si]=r,t.fetch=o)}return t}function ja(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 ny(t){let{request:l,context:a,params:r,unstable_pattern:o}=t;return{request:zS(l),params:{...r},unstable_pattern:o,context:DS(a)}}function ly(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 zS(t){return{method:t.method,url:t.url,headers:{get:(...l)=>t.headers.get(...l)}}}function DS(t){if(OS(t)){let l={...t};return Object.freeze(l),l}else return{get:l=>t.get(l)}}var NS=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")===NS}var Dv=["POST","PUT","PATCH","DELETE"],MS=new Set(Dv),LS=["GET",...Dv],US=new Set(LS),Nv=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},jr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},qS=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),Ov="remix-router-transitions",Mv=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(Z=>Z.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,j=null,D=null,T=t.hydrationData!=null,A=ri(d,t.history.location,m),L=!1,W=null,K;if(A==null&&!t.patchRoutesOnNavigation){let O=Dn(404,{pathname:t.history.location.pathname}),{matches:Y,route:Z}=vo(d);K=!0,A=Y,W={[Z.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))K=!1;else if(!A.some(O=>xd(O.route)))K=!0;else{let O=t.hydrationData?t.hydrationData.loaderData:null,Y=t.hydrationData?t.hydrationData.errors:null;if(Y){let Z=A.findIndex(ue=>Y[ue.route.id]!==void 0);K=A.slice(0,Z+1).every(ue=>!If(ue.route,O,Y))}else K=A.every(Z=>!If(Z.route,O,Y))}else{K=!1,A=[];let O=vi(null,d,t.history.location.pathname);O.active&&O.matches&&(L=!0,A=O.matches)}let B,_={historyAction:t.history.action,location:t.history.location,matches:A,initialized:K,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||W,fetchers:new Map,blockers:new Map},ae="POP",se=null,N=!1,X,P=!1,I=new Map,le=null,Q=!1,H=!1,ee=new Set,oe=new Map,ve=0,R=-1,z=new Map,V=new Set,C=new Map,ce=new Map,be=new Set,xe=new Map,Ne,pe=null;function Re(){if(b=t.history.listen(({action:O,location:Y,delta:Z})=>{if(Ne){Ne(),Ne=void 0;return}Rt(xe.size===0||Z!=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 ue=pi({currentLocation:_.location,nextLocation:Y,historyAction:O});if(ue&&Z!=null){let he=new Promise(ke=>{Ne=ke});t.history.go(Z*-1),al(ue,{state:"blocked",location:Y,proceed(){al(ue,{state:"proceeding",proceed:void 0,reset:void 0,location:Y}),he.then(()=>t.history.go(Z))},reset(){let ke=new Map(_.blockers);ke.set(ue,jr),yt({blockers:ke})}}),se?.resolve(),se=null;return}return Pt(O,Y)}),a){cE(l,I);let O=()=>fE(l,I);l.addEventListener("pagehide",O),le=()=>l.removeEventListener("pagehide",O)}return _.initialized||Pt("POP",_.location,{initialHydration:!0}),B}function zt(){b&&b(),le&&le(),x.clear(),X&&X.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 Z=[],ue=[];_.fetchers.forEach((he,ke)=>{he.state==="idle"&&(be.has(ke)?Z.push(ke):ue.push(ke))}),be.forEach(he=>{!_.fetchers.has(he)&&!oe.has(he)&&Z.push(he)}),[...x].forEach(he=>he(_,{deletedFetchers:Z,newErrors:O.errors??null,viewTransitionOpts:Y.viewTransitionOpts,flushSync:Y.flushSync===!0})),Z.forEach(he=>on(he)),ue.forEach(he=>_.fetchers.delete(he))}function Un(O,Y,{flushSync:Z}={}){let ue=_.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:ue?he=_.actionData:he=null;let ke=Y.loaderData?hy(_.loaderData,Y.loaderData,Y.matches||[],Y.errors):_.loaderData,ge=_.blockers;ge.size>0&&(ge=new Map(ge),ge.forEach((je,Te)=>ge.set(Te,jr)));let me=Q?!1:iu(O,Y.matches||_.matches),ye=N===!0||_.navigation.formMethod!=null&&It(_.navigation.formMethod)&&O.state?._isRedirect!==!0;p&&(d=p,p=void 0),Q||ae==="POP"||(ae==="PUSH"?t.history.push(O,O.state):ae==="REPLACE"&&t.history.replace(O,O.state));let we;if(ae==="POP"){let je=I.get(_.location.pathname);je&&je.has(O.pathname)?we={currentLocation:_.location,nextLocation:O}:I.has(O.pathname)&&(we={currentLocation:O,nextLocation:_.location})}else if(P){let je=I.get(_.location.pathname);je?je.add(O.pathname):(je=new Set([O.pathname]),I.set(_.location.pathname,je)),we={currentLocation:_.location,nextLocation:O}}yt({...Y,actionData:he,loaderData:ke,historyAction:ae,location:O,initialized:!0,navigation:bf,revalidation:"idle",restoreScrollPosition:me,preventScrollReset:ye,blockers:ge},{viewTransitionOpts:we,flushSync:Z===!0}),ae="POP",N=!1,P=!1,Q=!1,H=!1,se?.resolve(),se=null,pe?.resolve(),pe=null}async function Sn(O,Y){if(se?.resolve(),se=null,typeof O=="number"){se||(se=yy());let Fe=se.promise;return t.history.go(O),Fe}let Z=Ff(_.location,_.matches,m,O,Y?.fromRouteId,Y?.relative),{path:ue,submission:he,error:ke}=iy(!1,Z,Y),ge=_.location,me=Gr(_.location,ue,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 je=Y&&"preventScrollReset"in Y?Y.preventScrollReset===!0:void 0,Te=(Y&&Y.flushSync)===!0,Ze=pi({currentLocation:ge,nextLocation:me,historyAction:we});if(Ze){al(Ze,{state:"blocked",location:me,proceed(){al(Ze,{state:"proceeding",proceed:void 0,reset:void 0,location:me}),Sn(O,Y)},reset(){let Fe=new Map(_.blockers);Fe.set(Ze,jr),yt({blockers:Fe})}});return}await Pt(we,me,{submission:he,pendingError:ke,preventScrollReset:je,replace:Y&&Y.replace,enableViewTransition:Y&&Y.viewTransition,flushSync:Te,callSiteDefaultShouldRevalidate:Y&&Y.unstable_defaultShouldRevalidate})}function Rl(){pe||(pe=yy()),de(),yt({revalidation:"loading"});let O=pe.promise;return _.navigation.state==="submitting"?O:_.navigation.state==="idle"?(Pt(_.historyAction,_.location,{startUninterruptedRevalidation:!0}),O):(Pt(ae||_.historyAction,_.navigation.location,{overrideNavigation:_.navigation,enableViewTransition:P===!0}),O)}async function Pt(O,Y,Z){X&&X.abort(),X=null,ae=O,Q=(Z&&Z.startUninterruptedRevalidation)===!0,yi(_.location,_.matches),N=(Z&&Z.preventScrollReset)===!0,P=(Z&&Z.enableViewTransition)===!0;let ue=p||d,he=Z&&Z.overrideNavigation,ke=Z?.initialHydration&&_.matches&&_.matches.length>0&&!L?_.matches:ri(ue,Y,m),ge=(Z&&Z.flushSync)===!0;if(ke&&_.initialized&&!H&&eE(_.location,Y)&&!(Z&&Z.submission&&It(Z.submission.formMethod))){Un(Y,{matches:ke},{flushSync:ge});return}let me=vi(ke,ue,Y.pathname);if(me.active&&me.matches&&(ke=me.matches),!ke){let{error:vt,notFoundMatches:bt,route:Ie}=Dl(Y.pathname);Un(Y,{matches:bt,loaderData:{},errors:{[Ie.id]:vt}},{flushSync:ge});return}X=new AbortController;let ye=Ta(t.history,Y,X.signal,Z&&Z.submission),we=t.getContext?await t.getContext():new Jg,je;if(Z&&Z.pendingError)je=[ui(ke).route.id,{type:"error",error:Z.pendingError}];else if(Z&&Z.submission&&It(Z.submission.formMethod)){let vt=await Vi(ye,Y,Z.submission,ke,we,me.active,Z&&Z.initialHydration===!0,{replace:Z.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){X=null,Un(Y,{matches:vt.matches,loaderData:{},errors:{[bt]:Ie.error}});return}}ke=vt.matches||ke,je=vt.pendingActionResult,he=xf(Y,Z.submission),ge=!1,me.active=!1,ye=Ta(t.history,ye.url,ye.signal)}let{shortCircuited:Te,matches:Ze,loaderData:Fe,errors:gt}=await Fi(ye,Y,ke,we,me.active,he,Z&&Z.submission,Z&&Z.fetcherSubmission,Z&&Z.replace,Z&&Z.initialHydration===!0,ge,je,Z&&Z.callSiteDefaultShouldRevalidate);Te||(X=null,Un(Y,{matches:Ze||ke,...my(je),loaderData:Fe,errors:gt}))}async function Vi(O,Y,Z,ue,he,ke,ge,me={}){de();let ye=oE(Y,Z);if(yt({navigation:ye},{flushSync:me.flushSync===!0}),ke){let Te=await Nl(ue,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 Ze=ui(Te.partialMatches).route.id;return{matches:Te.partialMatches,pendingActionResult:[Ze,{type:"error",error:Te.error}]}}else if(Te.matches)ue=Te.matches;else{let{notFoundMatches:Ze,error:Fe,route:gt}=Dl(Y.pathname);return{matches:Ze,pendingActionResult:[gt.id,{type:"error",error:Fe}]}}}let we,je=_o(ue,Y);if(!je.route.action&&!je.route.lazy)we={type:"error",error:Dn(405,{method:O.method,pathname:Y.pathname,routeId:je.route.id})};else{let Te=_a(s,c,O,ue,je,ge?[]:r,he),Ze=await il(O,Te,he,null);if(we=Ze[je.route.id],!we){for(let Fe of ue)if(Ze[Fe.route.id]){we=Ze[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=cy(we.response.headers.get("Location"),new URL(O.url),m,t.history)===_.location.pathname+_.location.search,await pt(O,we,!0,{submission:Z,replace:Te}),{shortCircuited:!0}}if(bn(we)){let Te=ui(ue,je.route.id);return(me&&me.replace)!==!0&&(ae="PUSH"),{matches:ue,pendingActionResult:[Te.route.id,we,je.route.id]}}return{matches:ue,pendingActionResult:[je.route.id,we]}}async function Fi(O,Y,Z,ue,he,ke,ge,me,ye,we,je,Te,Ze){let Fe=ke||xf(Y,ge),gt=ge||me||gy(Fe),vt=!Q&&!we;if(he){if(vt){let Et=ll(Te);yt({navigation:Fe,...Et!==void 0?{actionData:Et}:{}},{flushSync:je})}let Xe=await Nl(Z,Y.pathname,O.signal);if(Xe.type==="aborted")return{shortCircuited:!0};if(Xe.type==="error"){if(Xe.partialMatches.length===0){let{matches:Yn,route:Bt}=vo(d);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Xe.error}}}let Et=ui(Xe.partialMatches).route.id;return{matches:Xe.partialMatches,loaderData:{},errors:{[Et]:Xe.error}}}else if(Xe.matches)Z=Xe.matches;else{let{error:Et,notFoundMatches:Yn,route:Bt}=Dl(Y.pathname);return{matches:Yn,loaderData:{},errors:{[Bt.id]:Et}}}}let bt=p||d,{dsMatches:Ie,revalidatingFetchers:Ot}=ay(O,ue,s,c,t.history,_,Z,gt,Y,we?[]:r,we===!0,H,ee,be,C,V,bt,m,t.patchRoutesOnNavigation!=null,Te,Ze);if(R=++ve,!t.dataStrategy&&!Ie.some(Xe=>Xe.shouldLoad)&&!Ie.some(Xe=>Xe.route.middleware&&Xe.route.middleware.length>0)&&Ot.length===0){let Xe=tt();return Un(Y,{matches:Z,loaderData:{},errors:Te&&bn(Te[1])?{[Te[0]]:Te[1].error}:null,...my(Te),...Xe?{fetchers:new Map(_.fetchers)}:{}},{flushSync:je}),{shortCircuited:!0}}if(vt){let Xe={};if(!he){Xe.navigation=Fe;let Et=ll(Te);Et!==void 0&&(Xe.actionData=Et)}Ot.length>0&&(Xe.fetchers=zl(Ot)),yt(Xe,{flushSync:je})}Ot.forEach(Xe=>{nt(Xe.key),Xe.controller&&oe.set(Xe.key,Xe.controller)});let Jt=()=>Ot.forEach(Xe=>nt(Xe.key));X&&X.signal.addEventListener("abort",Jt);let{loaderResults:ht,fetcherResults:Hn}=await ne(Ie,Ot,O,ue);if(O.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",Jt),Ot.forEach(Xe=>oe.delete(Xe.key));let cn=bo(ht);if(cn)return await pt(O,cn.result,!0,{replace:ye}),{shortCircuited:!0};if(cn=bo(Hn),cn)return V.add(cn.key),await pt(O,cn.result,!0,{replace:ye}),{shortCircuited:!0};let{loaderData:qn,errors:En}=dy(_,Z,ht,Te,Ot,Hn);we&&_.errors&&(En={..._.errors,...En});let ul=tt(),bi=Bn(R),xi=ul||bi||Ot.length>0;return{matches:Z,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 Z=_.fetchers.get(Y.key),ue=_r(void 0,Z?Z.data:void 0);_.fetchers.set(Y.key,ue)}),new Map(_.fetchers)}async function mi(O,Y,Z,ue){nt(O);let he=(ue&&ue.flushSync)===!0,ke=p||d,ge=Ff(_.location,_.matches,m,Z,Y,ue?.relative),me=ri(ke,ge,m),ye=vi(me,ke,ge);if(ye.active&&ye.matches&&(me=ye.matches),!me){De(O,Y,Dn(404,{pathname:ge}),{flushSync:he});return}let{path:we,submission:je,error:Te}=iy(!0,ge,ue);if(Te){De(O,Y,Te,{flushSync:he});return}let Ze=t.getContext?await t.getContext():new Jg,Fe=(ue&&ue.preventScrollReset)===!0;if(je&&It(je.formMethod)){await La(O,Y,we,me,Ze,ye.active,he,Fe,je,ue&&ue.unstable_defaultShouldRevalidate);return}C.set(O,{routeId:Y,path:we}),await Ua(O,Y,we,me,Ze,ye.active,he,Fe,je)}async function La(O,Y,Z,ue,he,ke,ge,me,ye,we){de(),C.delete(O);let je=_.fetchers.get(O);Ce(O,sE(ye,je),{flushSync:ge});let Te=new AbortController,Ze=Ta(t.history,Z,Te.signal,ye);if(ke){let Qe=await Nl(ue,new URL(Ze.url).pathname,Ze.signal,O);if(Qe.type==="aborted")return;if(Qe.type==="error"){De(O,Y,Qe.error,{flushSync:ge});return}else if(Qe.matches)ue=Qe.matches;else{De(O,Y,Dn(404,{pathname:Z}),{flushSync:ge});return}}let Fe=_o(ue,Z);if(!Fe.route.action&&!Fe.route.lazy){let Qe=Dn(405,{method:ye.formMethod,pathname:Z,routeId:Y});De(O,Y,Qe,{flushSync:ge});return}oe.set(O,Te);let gt=ve,vt=_a(s,c,Ze,ue,Fe,r,he),bt=await il(Ze,vt,he,O),Ie=bt[Fe.route.id];if(!Ie){for(let Qe of vt)if(bt[Qe.route.id]){Ie=bt[Qe.route.id];break}}if(Ze.signal.aborted){oe.get(O)===Te&&oe.delete(O);return}if(be.has(O)){if(Hi(Ie)||bn(Ie)){Ce(O,Al(void 0));return}}else{if(Hi(Ie))if(oe.delete(O),R>gt){Ce(O,Al(void 0));return}else return V.add(O),Ce(O,_r(ye)),pt(Ze,Ie,!1,{fetcherSubmission:ye,preventScrollReset:me});if(bn(Ie)){De(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=++ve;z.set(O,cn);let qn=_r(ye,Ie.data);_.fetchers.set(O,qn);let{dsMatches:En,revalidatingFetchers:ul}=ay(Jt,he,s,c,t.history,_,Hn,ye,Ot,r,!1,H,ee,be,C,V,ht,m,t.patchRoutesOnNavigation!=null,[Fe.route.id,Ie],we);ul.filter(Qe=>Qe.key!==O).forEach(Qe=>{let Si=Qe.key,ru=_.fetchers.get(Si),Ba=_r(void 0,ru?ru.data:void 0);_.fetchers.set(Si,Ba),nt(Si),Qe.controller&&oe.set(Si,Qe.controller)}),yt({fetchers:new Map(_.fetchers)});let bi=()=>ul.forEach(Qe=>nt(Qe.key));Te.signal.addEventListener("abort",bi);let{loaderResults:xi,fetcherResults:Xe}=await ne(En,ul,Jt,he);if(Te.signal.aborted)return;if(Te.signal.removeEventListener("abort",bi),z.delete(O),oe.delete(O),ul.forEach(Qe=>oe.delete(Qe.key)),_.fetchers.has(O)){let Qe=Al(Ie.data);_.fetchers.set(O,Qe)}let Et=bo(xi);if(Et)return pt(Jt,Et.result,!1,{preventScrollReset:me});if(Et=bo(Xe),Et)return V.add(Et.key),pt(Jt,Et.result,!1,{preventScrollReset:me});let{loaderData:Yn,errors:Bt}=dy(_,Hn,xi,void 0,ul,Xe);Bn(cn),_.navigation.state==="loading"&&cn>R?(Be(ae,"Expected pending action"),X&&X.abort(),Un(_.navigation.location,{matches:Hn,loaderData:Yn,errors:Bt,fetchers:new Map(_.fetchers)})):(yt({errors:Bt,loaderData:hy(_.loaderData,Yn,Hn,Bt),fetchers:new Map(_.fetchers)}),H=!1)}async function Ua(O,Y,Z,ue,he,ke,ge,me,ye){let we=_.fetchers.get(O);Ce(O,_r(ye,we?we.data:void 0),{flushSync:ge});let je=new AbortController,Te=Ta(t.history,Z,je.signal);if(ke){let Ie=await Nl(ue,new URL(Te.url).pathname,Te.signal,O);if(Ie.type==="aborted")return;if(Ie.type==="error"){De(O,Y,Ie.error,{flushSync:ge});return}else if(Ie.matches)ue=Ie.matches;else{De(O,Y,Dn(404,{pathname:Z}),{flushSync:ge});return}}let Ze=_o(ue,Z);oe.set(O,je);let Fe=ve,gt=_a(s,c,Te,ue,Ze,r,he),bt=(await il(Te,gt,he,O))[Ze.route.id];if(oe.get(O)===je&&oe.delete(O),!Te.signal.aborted){if(be.has(O)){Ce(O,Al(void 0));return}if(Hi(bt))if(R>Fe){Ce(O,Al(void 0));return}else{V.add(O),await pt(Te,bt,!1,{preventScrollReset:me});return}if(bn(bt)){De(O,Y,bt.error);return}Ce(O,Al(bt.data))}}async function pt(O,Y,Z,{submission:ue,fetcherSubmission:he,preventScrollReset:ke,replace:ge}={}){Z||(se?.resolve(),se=null),Y.response.headers.has("X-Remix-Revalidate")&&(H=!0);let me=Y.response.headers.get("Location");Be(me,"Expected a Location header on the redirect Response"),me=cy(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(yd(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}}X=null;let we=ge===!0||Y.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:je,formAction:Te,formEncType:Ze}=_.navigation;!ue&&!he&&je&&Te&&Ze&&(ue=gy(_.navigation));let Fe=ue||he;if(BS.has(Y.response.status)&&Fe&&It(Fe.formMethod))await Pt(we,ye,{submission:{...Fe,formAction:me},preventScrollReset:ke||N,enableViewTransition:Z?P:void 0});else{let gt=xf(ye,ue);await Pt(we,ye,{overrideNavigation:gt,fetcherSubmission:he,preventScrollReset:ke||N,enableViewTransition:Z?P:void 0})}}async function il(O,Y,Z,ue){let he,ke={};try{he=await $S(y,O,Y,ue,Z,!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 ne(O,Y,Z,ue){let he=il(Z,O,ue,null),ke=Promise.all(Y.map(async ye=>{if(ye.matches&&ye.match&&ye.request&&ye.controller){let je=(await il(ye.request,ye.matches,ue,ye.key))[ye.match.route.id];return{[ye.key]:je}}else return Promise.resolve({[ye.key]:{type:"error",error:Dn(404,{pathname:ye.path})}})})),ge=await he,me=(await ke).reduce((ye,we)=>Object.assign(ye,we),{});return{loaderResults:ge,fetcherResults:me}}function de(){H=!0,C.forEach((O,Y)=>{oe.has(Y)&&ee.add(Y),nt(Y)})}function Ce(O,Y,Z={}){_.fetchers.set(O,Y),yt({fetchers:new Map(_.fetchers)},{flushSync:(Z&&Z.flushSync)===!0})}function De(O,Y,Z,ue={}){let he=ui(_.matches,Y);on(O),yt({errors:{[he.route.id]:Z},fetchers:new Map(_.fetchers)},{flushSync:(ue&&ue.flushSync)===!0})}function Pe(O){return ce.set(O,(ce.get(O)||0)+1),be.has(O)&&be.delete(O),_.fetchers.get(O)||HS}function $t(O,Y){nt(O,Y?.reason),Ce(O,Al(null))}function on(O){let Y=_.fetchers.get(O);oe.has(O)&&!(Y&&Y.state==="loading"&&z.has(O))&&nt(O),C.delete(O),z.delete(O),V.delete(O),be.delete(O),ee.delete(O),_.fetchers.delete(O)}function Lt(O){let Y=(ce.get(O)||0)-1;Y<=0?(ce.delete(O),be.add(O)):ce.set(O,Y),yt({fetchers:new Map(_.fetchers)})}function nt(O,Y){let Z=oe.get(O);Z&&(Z.abort(Y),oe.delete(O))}function Ut(O){for(let Y of O){let Z=Pe(Y),ue=Al(Z.data);_.fetchers.set(Y,ue)}}function tt(){let O=[],Y=!1;for(let Z of V){let ue=_.fetchers.get(Z);Be(ue,`Expected fetcher: ${Z}`),ue.state==="loading"&&(V.delete(Z),O.push(Z),Y=!0)}return Ut(O),Y}function Bn(O){let Y=[];for(let[Z,ue]of z)if(ue<O){let he=_.fetchers.get(Z);Be(he,`Expected fetcher: ${Z}`),he.state==="loading"&&(nt(Z),z.delete(Z),Y.push(Z))}return Ut(Y),Y.length>0}function sn(O,Y){let Z=_.blockers.get(O)||jr;return xe.get(O)!==Y&&xe.set(O,Y),Z}function lu(O){_.blockers.delete(O),xe.delete(O)}function al(O,Y){let Z=_.blockers.get(O)||jr;Be(Z.state==="unblocked"&&Y.state==="blocked"||Z.state==="blocked"&&Y.state==="blocked"||Z.state==="blocked"&&Y.state==="proceeding"||Z.state==="blocked"&&Y.state==="unblocked"||Z.state==="proceeding"&&Y.state==="unblocked",`Invalid blocker state transition: ${Z.state} -> ${Y.state}`);let ue=new Map(_.blockers);ue.set(O,Y),yt({blockers:ue})}function pi({currentLocation:O,nextLocation:Y,historyAction:Z}){if(xe.size===0)return;xe.size>1&&Rt(!1,"A router only supports one blocker at a time");let ue=Array.from(xe.entries()),[he,ke]=ue[ue.length-1],ge=_.blockers.get(he);if(!(ge&&ge.state==="proceeding")&&ke({currentLocation:O,nextLocation:Y,historyAction:Z}))return he}function Dl(O){let Y=Dn(404,{pathname:O}),Z=p||d,{matches:ue,route:he}=vo(Z);return{notFoundMatches:ue,route:he,error:Y}}function rl(O,Y,Z){if(E=O,D=Y,j=Z||null,!T&&_.navigation===bf){T=!0;let ue=iu(_.location,_.matches);ue!=null&&yt({restoreScrollPosition:ue})}return()=>{E=null,D=null,j=null}}function gi(O,Y){return j&&j(O,Y.map(ue=>fS(ue,_.loaderData)))||O.key}function yi(O,Y){if(E&&D){let Z=gi(O,Y);E[Z]=D()}}function iu(O,Y){if(E){let Z=gi(O,Y),ue=E[Z];if(typeof ue=="number")return ue}return null}function vi(O,Y,Z){if(t.patchRoutesOnNavigation)if(O){if(Object.keys(O[0].params).length>0)return{active:!0,matches:Lr(Y,Z,m,!0)}}else return{active:!0,matches:Lr(Y,Z,m,!0)||[]};return{active:!1,matches:null}}async function Nl(O,Y,Z,ue){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:Z,path:Y,matches:he,fetcherKey:ue,patch:(je,Te)=>{Z.aborted||ry(je,Te,ge,me,s,!1)}})}catch(je){return{type:"error",error:je,partialMatches:he}}finally{ke&&!Z.aborted&&(d=[...d])}if(Z.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((Z,ue)=>Z.route.id===Y[ue].route.id)}function ls(O){c={},p=Vr(O,s,void 0,c)}function au(O,Y,Z=!1){let ue=p==null;ry(O,Y,p||d,c,s,Z),ue&&(d=[...d],yt({}))}return B={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:oe,_internalSetRoutes:ls,_internalSetStateDoNotUseOrYouWillBreakYourApp(O){yt(O)}},t.unstable_instrumentations&&(B=RS(B,t.unstable_instrumentations.map(O=>O.router).filter(Boolean))),B}function GS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Ff(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=bd(r||".",vd(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=Ed(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=kS({basename:a,pathname:p.pathname})),el(p)}function iy(t,l,a){if(!a||!GS(a))return{path:l};if(a.formMethod&&!uE(a.formMethod))return{path:l,error:Dn(405,{method:a.formMethod})};let r=()=>({path:l,error:Dn(400,{type:"invalid-body"})}),s=(a.formMethod||"get").toUpperCase(),c=Yv(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,[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(!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=fy(d);else if(a.body==null)d=new URLSearchParams,p=new FormData;else try{d=new URLSearchParams(a.body),p=fy(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&&Ed(y.search)&&d.append("index",""),y.search=`?${d}`,{path:el(y),submission:m}}function ay(t,l,a,r,o,s,c,d,p,m,y,g,b,x,E,j,D,T,A,L,W){let K=L?bn(L[1])?L[1].error:L[1].data:void 0,B=o.createURL(s.location),_=o.createURL(p),ae;if(y&&s.errors){let Q=Object.keys(s.errors)[0];ae=c.findIndex(H=>H.route.id===Q)}else if(L&&bn(L[1])){let Q=L[0];ae=c.findIndex(H=>H.route.id===Q)-1}let se=L?L[1].statusCode:void 0,N=se&&se>=400,X={currentUrl:B,currentParams:s.matches[0]?.params||{},nextUrl:_,nextParams:c[0].params,...d,actionResult:K,actionStatus:se},P=$r(c),I=c.map((Q,H)=>{let{route:ee}=Q,oe=null;if(ae!=null&&H>ae?oe=!1:ee.lazy?oe=!0:xd(ee)?y?oe=If(ee,s.loaderData,s.errors):VS(s.loaderData,s.matches[H],Q)&&(oe=!0):oe=!1,oe!==null)return Xf(a,r,t,P,Q,m,l,oe);let ve=!1;typeof W=="boolean"?ve=W:N?ve=!1:(g||B.pathname+B.search===_.pathname+_.search||B.search!==_.search||FS(s.matches[H],Q))&&(ve=!0);let R={...X,defaultShouldRevalidate:ve},z=Ur(Q,R);return Xf(a,r,t,P,Q,m,l,z,R,W)}),le=[];return E.forEach((Q,H)=>{if(y||!c.some(ce=>ce.route.id===Q.routeId)||x.has(H))return;let ee=s.fetchers.get(H),oe=ee&&ee.state!=="idle"&&ee.data===void 0,ve=ri(D,Q.path,T);if(!ve){if(A&&oe)return;le.push({key:H,routeId:Q.routeId,path:Q.path,matches:null,match:null,request:null,controller:null});return}if(j.has(H))return;let R=_o(ve,Q.path),z=new AbortController,V=Ta(o,Q.path,z.signal),C=null;if(b.has(H))b.delete(H),C=_a(a,r,V,ve,R,m,l);else if(oe)g&&(C=_a(a,r,V,ve,R,m,l));else{let ce;typeof W=="boolean"?ce=W:N?ce=!1:ce=g;let be={...X,defaultShouldRevalidate:ce};Ur(R,be)&&(C=_a(a,r,V,ve,R,m,l,be))}C&&le.push({key:H,routeId:Q.routeId,path:Q.path,matches:C,match:R,request:V,controller:z})}),{dsMatches:I,revalidatingFetchers:le}}function xd(t){return t.loader!=null||t.middleware!=null&&t.middleware.length>0}function If(t,l,a){if(t.lazy)return!0;if(!xd(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 Ur(t,l){if(t.route.shouldRevalidate){let a=t.route.shouldRevalidate(l);if(typeof a=="boolean")return a}return l.defaultShouldRevalidate}function ry(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 uy=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=uy.get(o);c||(c={},uy.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},oy=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=oy.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 j=b[E];if(j===void 0)continue;let D=sS(E),A=s[E]!==void 0&&E!=="hasErrorBoundary";D?Rt(!D,"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.`):x[E]=j}Object.assign(s,x),Object.assign(s,{...r(s),lazy:void 0})})();return oy.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 sy(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,()=>sy(t)):sy(t)}function Bv(t,l){return QS(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 QS(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=IS(r.route,It(a.method)?"action":"loader",l,t,o);return{middleware:s,route:c.lazyRoutePromise,handler:c.lazyHandlerPromise}}function Xf(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:j}=o.route,D=y||d||b&&!It(a.method)&&(x||E),T=j&&j.length>0&&!E&&!x;return D&&(It(a.method)||!T)?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})}:Xf(t,l,a,$r(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:$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=It(t.method),y=m?"action":"loader",g=b=>{let x,E=new Promise((T,A)=>x=A);p=()=>x(),t.signal.addEventListener("abort",p);let j=T=>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},...T!==void 0?[T]:[]),D=(async()=>{try{return{type:"data",result:await(s?s(A=>j(A)):j())}}catch(T){return{type:"error",result:T}}})();return Promise.race([D,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(j=>{x=j}),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),j=E.pathname+E.search;throw Dn(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 x=new URL(t.url),E=x.pathname+x.search;throw Dn(404,{pathname:E})}}catch(b){return{type:"error",result:b}}finally{p&&t.signal.removeEventListener("abort",p)}return d}async function KS(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(Sd(l)){let r;try{r=await KS(l)}catch(o){return{type:"error",error:o}}return a==="error"?{type:"error",error:new Qr(l.status,l.statusText,r),statusCode:l.status,headers:l.headers}:{type:"data",data:r,statusCode:l.status,headers:l.headers}}return a==="error"?py(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: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}:py(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"),!yd(s)){let c=r.slice(0,r.findIndex(d=>d.route.id===a)+1);s=Ff(new URL(l.url),c,o,s),t.headers.set("Location",s)}return t}function cy(t,l,a,r){let o=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(yd(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&&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 fy(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,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 j=ui(t,b);c[j.route.id]==null&&(c[j.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 dy(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 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=Al(b.data);t.fetchers.set(m,x)}}),{loaderData:c,errors:d}}function hy(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 my(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 Dn(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 Qr(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 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 Qr(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 Sd(t.result)&&Nv.has(t.result.status)}function bn(t){return t.type==="error"}function Hi(t){return(t&&t.type)==="redirect"}function py(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function Sd(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function aE(t){return Nv.has(t)}function rE(t){return Sd(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 Ed(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&&Ed(a||""))return t[t.length-1];let r=jv(t);return r[r.length-1]}function gy(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 _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 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 Al(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(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 fE(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 yy(){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 Gv=k.createContext(!1);function dE(){return k.useContext(Gv)}var wd=k.createContext({isTransitioning:!1});wd.displayName="ViewTransition";var Vv=k.createContext(new Map);Vv.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 Xn=k.createContext({outlet:null,matches:[],isDataRoute:!1});Xn.displayName="Route";var kd=k.createContext(null);kd.displayName="RouteError";var Fv="REACT_ROUTER_ERROR",mE="REDIRECT",pE="ROUTE_ERROR_RESPONSE";function gE(t){if(t.startsWith(`${Fv}:${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(`${Fv}:${pE}:{`))try{let l=JSON.parse(t.slice(40));if(typeof l=="object"&&l&&typeof l.status=="number"&&typeof l.statusText=="string")return new Qr(l.status,l.statusText,l.data)}catch{}}function vE(t,{relative:l}={}){Be(Kr(),"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 Kr(){return k.useContext(Vo)!=null}function tl(){return Be(Kr(),"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 Xv(t){k.useContext(Mn).static||k.useLayoutEffect(t)}function Na(){let{isDataRoute:t}=k.useContext(Xn);return t?DE():bE()}function bE(){Be(Kr(),"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(Xn),{pathname:o}=tl(),s=JSON.stringify(vd(r)),c=k.useRef(!1);return Xv(()=>{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=bd(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 Qv=k.createContext(null);function $v(){return k.useContext(Qv)}function xE(t){let l=k.useContext(Xn).outlet;return k.useMemo(()=>l&&k.createElement(Qv.Provider,{value:t},l),[l,t])}function Zv(){let{matches:t}=k.useContext(Xn),l=t[t.length-1];return l?l.params:{}}function Pr(t,{relative:l}={}){let{matches:a}=k.useContext(Xn),{pathname:r}=tl(),o=JSON.stringify(vd(a));return k.useMemo(()=>bd(t,JSON.parse(o),r,l==="path"),[t,o,r,l])}function SE(t,l,a,r,o){Be(Kr(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:s}=k.useContext(Mn),{matches:c}=k.useContext(Xn),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||"";Pv(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
|
-
|
|
12
|
-
Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=tl(),x;x=b;let E=x.pathname||"/",j=E;if(y!=="/"){let A=y.replace(/^\//,"").split("/");j="/"+E.replace(/^\//,"").split("/").slice(A.length).join("/")}let D=ri(t,{pathname:j});return Rt(g||D!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Rt(D==null||D[D.length-1].route.element!==void 0||D[D.length-1].route.Component!==void 0||D[D.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.`),TE(D&&D.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=zE(),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 wE=k.createElement(EE,null),Kv=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(Xn.Provider,{value:this.props.routeContext},k.createElement(kd.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?k.createElement(kE,{error:t},l):l}};Kv.contextType=Gv;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=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 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(Xn.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: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,j=null,D=null;a&&(x=c&&g.route.id?c[g.route.id]:void 0,j=g.route.errorElement||wE,d&&(p<0&&b===0?(Pv("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,D=null):p===b&&(E=!0,D=g.route.hydrateFallbackElement||null)));let T=l.concat(s.slice(0,b+1)),A=()=>{let L;return x?L=j:E?L=D:g.route.Component?L=k.createElement(g.route.Component,null):g.route.element?L=g.route.element:L=y,k.createElement(CE,{match:g,routeContext:{outlet:y,matches:T,isDataRoute:a!=null},children:L})};return a&&(g.route.ErrorBoundary||g.route.errorElement||b===0)?k.createElement(Kv,{location:a.location,revalidation:a.revalidation,component:j,error:x,children:A(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:m}):A()},null)}function Cd(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,Cd(t)),l}function jE(t){let l=k.useContext(Zr);return Be(l,Cd(t)),l}function _E(t){let l=k.useContext(Xn);return Be(l,Cd(t)),l}function Td(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 Td("useRouteId")}function zE(){let t=k.useContext(kd),l=jE("useRouteError"),a=Td("useRouteError");return t!==void 0?t:l.errors?.[a]}function DE(){let{router:t}=AE("useNavigate"),l=Td("useNavigate"),a=k.useRef(!1);return Xv(()=>{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 vy={};function Pv(t,l,a){!l&&!vy[t]&&(vy[t]=!0,Rt(!1,a))}var by={};function xy(t,l){!t&&!by[l]&&(by[l]=!0,console.warn(l))}var NE="useOptimistic",Sy=$x[NE],OE=()=>{};function ME(t){return Sy?Sy(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}),[x,E]=k.useState(),[j,D]=k.useState(),[T,A]=k.useState(),L=k.useRef(new Map),W=k.useCallback((ae,{deletedFetchers:se,newErrors:N,flushSync:X,viewTransitionOpts:P})=>{N&&a&&Object.values(N).forEach(le=>a(le,{location:ae.location,params:ae.matches[0]?.params??{},unstable_pattern:$r(ae.matches)})),ae.fetchers.forEach((le,Q)=>{le.data!==void 0&&L.current.set(Q,le.data)}),se.forEach(le=>L.current.delete(le)),xy(X===!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 I=t.window!=null&&t.window.document!=null&&typeof t.window.document.startViewTransition=="function";if(xy(P==null||I,"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."),!P||!I){l&&X?l(()=>c(ae)):r===!1?c(ae):k.startTransition(()=>{r===!0&&p(le=>Ey(le,ae)),c(ae)});return}if(l&&X){l(()=>{j&&(x?.resolve(),j.skipTransition()),b({isTransitioning:!0,flushSync:!0,currentLocation:P.currentLocation,nextLocation:P.nextLocation})});let le=t.window.document.startViewTransition(()=>{l(()=>c(ae))});le.finished.finally(()=>{l(()=>{E(void 0),D(void 0),y(void 0),b({isTransitioning:!1})})}),l(()=>D(le));return}j?(x?.resolve(),j.skipTransition(),A({state:ae,currentLocation:P.currentLocation,nextLocation:P.nextLocation})):(y(ae),b({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}))},[t.window,l,j,x,r,p,a]);k.useLayoutEffect(()=>t.subscribe(W),[t,W]),k.useEffect(()=>{g.isTransitioning&&!g.flushSync&&E(new BE)},[g]),k.useEffect(()=>{if(x&&m&&t.window){let ae=m,se=x.promise,N=t.window.document.startViewTransition(async()=>{r===!1?c(ae):k.startTransition(()=>{r===!0&&p(X=>Ey(X,ae)),c(ae)}),await se});N.finished.finally(()=>{E(void 0),D(void 0),y(void 0),b({isTransitioning:!1})}),D(N)}},[m,x,t.window,r,p]),k.useEffect(()=>{x&&m&&d.location.key===m.location.key&&x.resolve()},[x,j,d.location,m]),k.useEffect(()=>{!g.isTransitioning&&T&&(y(T.state),b({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),A(void 0))},[g.isTransitioning,T]);let K=k.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:ae=>t.navigate(ae),push:(ae,se,N)=>t.navigate(ae,{state:se,preventScrollReset:N?.preventScrollReset}),replace:(ae,se,N)=>t.navigate(ae,{replace:!0,state:se,preventScrollReset:N?.preventScrollReset})}),[t]),B=t.basename||"/",_=k.useMemo(()=>({router:t,navigator:K,static:!1,basename:B,onError:a}),[t,K,B,a]);return k.createElement(k.Fragment,null,k.createElement(Yi.Provider,{value:_},k.createElement(Zr.Provider,{value:d},k.createElement(Vv.Provider,{value:L.current},k.createElement(wd.Provider,{value:g},k.createElement(VE,{basename:B,location:d.location,navigationType:d.historyAction,navigator:K,unstable_useTransitions:r},k.createElement(qE,{routes:t.routes,future:t.future,state:d,onError:a})))))),null)}function Ey(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(!Kr(),"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 j=On(m,d);return j==null?null:{location:{pathname:j,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 FE(t){return Fo(t)&&t.tagName.toLowerCase()==="button"}function IE(t){return Fo(t)&&t.tagName.toLowerCase()==="form"}function XE(t){return Fo(t)&&t.tagName.toLowerCase()==="input"}function QE(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function $E(t,l){return t.button===0&&(!l||l==="_self")&&!QE(t)}var xo=null;function ZE(){if(xo===null)try{new FormData(document.createElement("form"),0),xo=!1}catch{xo=!0}return xo}var KE=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ef(t){return t!=null&&!KE.has(t)?(Rt(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${zo}"`),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"))||zo,s=new FormData(t)}else if(FE(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 Ad(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 wy(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 Jv(){let t=k.useContext(Yi);return Ad(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function rw(){let t=k.useContext(Zr);return Ad(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 Ad(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=T=>{T.forEach(A=>{c(A.isIntersecting)})},D=new IntersectionObserver(j,{threshold:.5});return b.current&&D.observe(b.current),()=>{D.disconnect()}}},[t]),k.useEffect(()=>{if(r){let j=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(j)}}},[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 ow({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(cw,{page:t,matches:r,...l}):null}function sw(t){let{manifest:l,routeModules:a}=Wv(),[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}=Wv(),{basename:d}=Jv(),{loaderData:p,matches:m}=rw(),y=k.useMemo(()=>wy(t,l,m,s,r,"data"),[t,l,m,s,r]),g=k.useMemo(()=>wy(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,D=!1;if(l.forEach(A=>{let L=s.routes[A.route.id];!L||!L.hasLoader||(!y.some(W=>W.route.id===A.route.id)&&A.route.id in p&&c[A.route.id]?.shouldRevalidate||L.hasClientLoader?D=!0:j.add(A.route.id))}),j.size===0)return[];let T=JE(t,d,o.unstable_trailingSlashAwareDataRequests,"data");return D&&j.size>0&&T.searchParams.set("_routes",l.filter(A=>j.has(A.route.id)).map(A=>A.route.id).join(",")),[T.pathname+T.search]},[d,o.unstable_trailingSlashAwareDataRequests,p,r,s,y,l,t,c]),x=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})),x.map(j=>k.createElement("link",{key:j,rel:"modulepreload",href:j,...a})),E.map(({key:j,link:D})=>k.createElement("link",{key:j,nonce:a.nonce,...D,crossOrigin:D.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 Qr(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:j,unstable_useTransitions:D}=k.useContext(Mn),T=typeof m=="string"&&e0.test(m),A=Rv(m,j);m=A.to;let L=vE(m,{relative:o}),[W,K,B]=uw(r,x),_=bw(m,{replace:c,state:d,target:p,preventScrollReset:y,relative:o,viewTransition:g,unstable_defaultShouldRevalidate:b,unstable_useTransitions:D});function ae(N){l&&l(N),N.defaultPrevented||_(N)}let se=k.createElement("a",{...x,...B,href:A.absoluteURL||L,onClick:A.isExternal||s?l:ae,ref:fw(E,K),target:p,"data-discover":!T&&a==="render"?"true":void 0});return W&&!T?k.createElement(k.Fragment,null,se,k.createElement(ow,{page:L})):se});t0.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=Pr(c,{relative:m.relative}),b=tl(),x=k.useContext(Zr),{navigator:E,basename:j}=k.useContext(Mn),D=x!=null&&kw(g)&&d===!0,T=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,A=b.pathname,L=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;a||(A=A.toLowerCase(),L=L?L.toLowerCase():null,T=T.toLowerCase()),L&&j&&(L=On(L,j)||L);const W=T!=="/"&&T.endsWith("/")?T.length-1:T.length;let K=A===T||!o&&A.startsWith(T)&&A.charAt(W)==="/",B=L!=null&&(L===T||!o&&L.startsWith(T)&&L.charAt(T.length)==="/"),_={isActive:K,isPending:B,isTransitioning:D},ae=K?l:void 0,se;typeof r=="function"?se=r(_):se=[r,K?"active":null,B?"pending":null,D?"transitioning":null].filter(Boolean).join(" ");let N=typeof s=="function"?s(_):s;return k.createElement(t0,{...m,"aria-current":ae,className:se,ref:y,style:N,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,...x},E)=>{let{unstable_useTransitions:j}=k.useContext(Mn),D=Ew(),T=ww(d,{relative:m}),A=c.toLowerCase()==="get"?"get":"post",L=typeof d=="string"&&e0.test(d),W=K=>{if(p&&p(K),K.defaultPrevented)return;K.preventDefault();let B=K.nativeEvent.submitter,_=B?.getAttribute("formmethod")||c,ae=()=>D(B||K.currentTarget,{fetcherKey:l,method:_,navigate:a,replace:o,state:s,relative:m,preventScrollReset:y,viewTransition:g,unstable_defaultShouldRevalidate:b});j&&a!==!1?k.startTransition(()=>ae()):ae()};return k.createElement("form",{ref:E,method:A,action:T,onSubmit:r?p:W,...x,"data-discover":!L&&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 n0(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=Na(),y=tl(),g=Pr(t,{relative:s});return k.useCallback(b=>{if($E(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 xw=0,Sw=()=>`__${String(++xw)}__`;function Ew(){let{router:t}=n0("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(Xn);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 kw(t,{relative:l}={}){let a=k.useContext(wd);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 Cw(t){return k.createElement(HE,{flushSync:Io.flushSync,...t})}const _d="electric-agent:anthropic-api-key",Xo="electric-agent:oauth-token",Rd="electric-agent:oauth-manual",zd="electric-agent:gh-token";function l0(){return localStorage.getItem(_d)}function Tw(t){localStorage.setItem(_d,t)}function Aw(){localStorage.removeItem(_d)}function jw(){return!!l0()}function $f(){return localStorage.getItem(Xo)}function _w(t){localStorage.setItem(Xo,t)}function Rw(){localStorage.removeItem(Xo),localStorage.removeItem(Rd)}function zw(t){localStorage.setItem(Xo,t),localStorage.setItem(Rd,"1")}function Do(){return localStorage.getItem(Rd)==="1"}function Dd(){return localStorage.getItem(zd)}function Dw(t){localStorage.setItem(zd,t)}function Nw(){localStorage.removeItem(zd)}function Ow(){return!!Dd()}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 Qo="electric-agent:sessions",Nd="electric-agent:session-tokens";function za(){try{const t=localStorage.getItem(Qo);return t?JSON.parse(t):[]}catch{return[]}}function Mw(t){const a=za().filter(r=>r.id!==t.id);a.push(t),localStorage.setItem(Qo,JSON.stringify(a))}function wf(t,l){const a=za(),r=a.find(o=>o.id===t);r&&(Object.assign(r,l,{lastActiveAt:new Date().toISOString()}),localStorage.setItem(Qo,JSON.stringify(a)))}function Lw(t){const a=za().filter(r=>r.id!==t);localStorage.setItem(Qo,JSON.stringify(a)),Uw(t)}function ky(t){return za().find(l=>l.id===t)}function Od(){try{const t=localStorage.getItem(Nd);return t?JSON.parse(t):{}}catch{return{}}}function i0(t,l){const a=Od();a[t]=l,localStorage.setItem(Nd,JSON.stringify(a))}function a0(t){return Od()[t]}function Uw(t){const l=Od();delete l[t],localStorage.setItem(Nd,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 Bw="/api";function c0(){const t={},l=l0(),a=$f(),r=Dd();return a?t.oauthToken=a:l&&(t.apiKey=l),r&&(t.ghToken=r),t}function f0(){const t=Dd();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 Vt(t,l){const a={...Hw(),...l?.headers};l?.body&&(a["Content-Type"]="application/json");const r=qw(t);if(r){const c=a0(r);c&&(a.Authorization=`Bearer ${c}`)}const o=Yw(t);if(o){const c=s0(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 Vt("/sessions",{method:"POST",body:{description:t,name:l,...c0()}});return a.sessionToken&&i0(a.sessionId,a.sessionToken),a}function Vw(t,l){return Vt(`/sessions/${t}/iterate`,{method:"POST",body:{request:l}})}function Zf(t,l,a){return Vt(`/sessions/${t}/respond`,{method:"POST",body:{gate:l,...a}})}function Fw(t){return Vt(`/sessions/${t}/cancel`,{method:"POST"})}function Iw(t){return Vt(`/sessions/${t}`,{method:"DELETE"})}function Xw(t){return Vt(`/sessions/${t}/app-status`)}function Qw(){return Vt("/provision-electric",{method:"POST"})}function $w(){return Vt("/github/repos",{headers:f0()})}function Zw(t){return Vt(`/github/repos/${t}/branches`,{headers:f0()})}function Kw(){return Vt("/credentials/keychain")}async function Pw(t,l){const a=await Vt("/sessions/resume",{method:"POST",body:{repoUrl:t,branch:l,...c0()}});return a.sessionToken&&i0(a.sessionId,a.sessionToken),a}async function Jw(t){const l=Jr(),a=await Vt("/shared-sessions",{method:"POST",body:{name:t,participant:l}});return a.roomToken&&o0(a.id,a.roomToken),a}async function Ww(t){const l=await Vt(`/shared-sessions/join/${t}`);return l.roomToken&&o0(l.id,l.roomToken),l}function ek(t){const l=Jr();return Vt(`/shared-sessions/${t}/join`,{method:"POST",body:{participant:l}})}function tk(t){const l=Jr();return Vt(`/shared-sessions/${t}/leave`,{method:"POST",body:{participantId:l.id}})}function nk(t,l,a,r){const o=Jr();return Vt(`/shared-sessions/${t}/sessions`,{method:"POST",body:{sessionId:l,sessionName:a,sessionDescription:r,linkedBy:o.displayName}})}function lk(t,l){return Vt(`/shared-sessions/${t}/sessions/${l}`,{method:"DELETE"})}const Md="electric-agent:joined-shared-sessions";function Lo(){try{const t=localStorage.getItem(Md);return t?JSON.parse(t):[]}catch{return[]}}function ik(t){const a=Lo().filter(r=>r.code!==t.code);a.push(t),localStorage.setItem(Md,JSON.stringify(a))}function d0(t){const a=Lo().filter(r=>r.code!==t);localStorage.setItem(Md,JSON.stringify(a))}function ak(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 rk(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 Cy[rk(t)%Cy.length]}function uk(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 ok({projectName:t,onConfirm:l,onCancel:a}){return $o(a),ak("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 sk({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 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:uk(t.lastActiveAt)})})]}),S.jsx("button",{type:"button",className:"session-item-delete",onClick:g=>{g.stopPropagation(),s(!0)},title:"Delete session",children:"×"})]}),o&&S.jsx(ok,{projectName:t.projectName,onConfirm:()=>{s(!1),r()},onCancel:()=>s(!1)})]})}function ck({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 fk(){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 dk({collapsed:t,onToggle:l,mobileOpen:a,onMobileClose:r}){const{sessions:o,pendingProject:s,handleDeleteSession:c,joinedSharedSessions:d,refreshJoinedSharedSessions:p}=Po(),m=Na(),y=tl(),[g,b]=k.useState(!1),[x,E]=k.useState(""),[j,D]=k.useState(!1),[T,A]=k.useState("");k.useEffect(()=>{t&&(b(!1),E(""),D(!1),A(""))},[t]);const L=y.pathname.startsWith("/session/")?y.pathname.split("/session/")[1]:null,W=y.pathname.startsWith("/shared/")?y.pathname.split("/shared/")[1]:null,K=[...o].sort((N,X)=>new Date(X.lastActiveAt).getTime()-new Date(N.lastActiveAt).getTime()),B=N=>{m(N),r?.()},_=k.useCallback(()=>{const N=x.trim();N&&(m(`/shared/${N}`),E(""),b(!1),r?.())},[x,m,r]),ae=k.useCallback(N=>{d0(N),p()},[p]),se=k.useCallback(async()=>{const N=T.trim();if(N)try{const{code:X}=await Jw(N);A(""),D(!1),m(`/shared/${X}`),r?.()}catch(X){console.error("Failed to create shared session:",X)}},[T,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:()=>B("/"),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..."})})]})]}),K.map(N=>S.jsx(sk,{session:N,active:N.id===L,onClick:()=>B(`/session/${N.id}`),onDelete:()=>c(N.id)},N.id)),S.jsx("div",{className:"sidebar-section-label",children:"Rooms"}),d.map(N=>{const X=h0(N.id),P=N.name.split(/[-_ ]+/).slice(0,2).map(I=>I.charAt(0).toUpperCase()).join("");return S.jsxs("div",{className:`session-item ${W===N.code?"active":""}`,onClick:()=>B(`/shared/${N.code}`),title:N.name,children:[S.jsx("span",{className:"session-avatar session-avatar-shared",style:{background:X.bg,color:X.fg},children:P}),S.jsxs("div",{className:"session-item-details",children:[S.jsx("div",{className:"session-item-name",children:N.name}),S.jsx("div",{className:"session-item-meta",children:S.jsx("span",{children:N.code})})]}),S.jsx("button",{type:"button",className:"session-item-delete",onClick:I=>{I.stopPropagation(),ae(N.code)},title:"Remove",children:"×"})]},N.code)}),j&&!t?S.jsxs("div",{className:"sidebar-join-input",children:[S.jsx("input",{type:"text",placeholder:"Room name...",value:T,onChange:N=>A(N.target.value),onKeyDown:N=>{N.key==="Enter"&&se(),N.key==="Escape"&&(D(!1),A(""))}}),S.jsx("button",{type:"button",className:"sidebar-join-go",onClick:se,disabled:!T.trim(),children:"Go"})]}):S.jsxs("div",{className:"session-item",onClick:()=>{t&&l(),D(!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:N=>E(N.target.value),onKeyDown:N=>{N.key==="Enter"&&_(),N.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(fk,{})}),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(ck,{collapsed:t}),S.jsx("span",{className:"sidebar-collapse-label",children:t?"Expand menu":"Collapse menu"})]})})]})}let hk={data:""},mk=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||hk},pk=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,gk=/\/\*[^]*?\*\/| +/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={},m0=t=>{if(typeof t=="object"){let l="";for(let a in t)l+=a+m0(t[a]);return l}return t},yk=(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=pk.exec(m.replace(gk,""));)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},vk=(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 Zo(t){let l=this||{},a=t.call?t(l.p):t;return yk(a.unshift?a.raw?vk(a,[].slice.call(arguments,1),l.p):a.reduce((r,o)=>Object.assign(r,o&&o.call?o(l.p):o),{}):a,mk(l.target),l.g,l.o,l.k)}let p0,Kf,Pf;Zo.bind({g:1});let jl=Zo.bind({k:1});function bk(t,l,a,r){oi.p=l,p0=t,Kf=a,Pf=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=Zo.apply(a,r)+(p?" "+p:"");let m=t;return t[0]&&(m=d.as||t,delete d.as),Pf&&m[0]&&Pf(d),p0(m,d)}return o}}var xk=t=>typeof t=="function",Uo=(t,l)=>xk(t)?t(l):t,Sk=(()=>{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}})(),Ek=20,Ld="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}))}}},No=[],v0={toasts:[],pausedAt:void 0,settings:{toastLimit:Ek}},Jn={},b0=(t,l=Ld)=>{Jn[l]=y0(Jn[l]||v0,t),No.forEach(([a,r])=>{a===l&&r(Jn[l])})},x0=t=>Object.keys(Jn).forEach(l=>b0(t,l)),wk=t=>Object.keys(Jn).find(l=>Jn[l].toasts.some(a=>a.id===t)),Ko=(t=Ld)=>l=>{b0(l,t)},kk={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Ck=(t={},l=Ld)=>{let[a,r]=k.useState(Jn[l]||v0),o=k.useRef(Jn[l]);k.useEffect(()=>(o.current!==Jn[l]&&r(Jn[l]),No.push([l,r]),()=>{let c=No.findIndex(([d])=>d===l);c>-1&&No.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||kk[c.type],style:{...t.style,...(m=t[c.type])==null?void 0:m.style,...c.style}}});return{...a,toasts:s}},Tk=(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||Sk()}),Wr=t=>(l,a)=>{let r=Tk(l,t,a);return Ko(r.toasterId||wk(r.id))({type:2,toast:r}),r.id},Nt=(t,l)=>Wr("blank")(t,l);Nt.error=Wr("error");Nt.success=Wr("success");Nt.loading=Wr("loading");Nt.custom=Wr("custom");Nt.dismiss=(t,l)=>{let a={type:3,toastId:t};l?Ko(l)(a):x0(a)};Nt.dismissAll=t=>Nt.dismiss(void 0,t);Nt.remove=(t,l)=>{let a={type:4,toastId:t};l?Ko(l)(a):x0(a)};Nt.removeAll=t=>Nt.remove(void 0,t);Nt.promise=(t,l,a)=>{let r=Nt.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?Nt.success(s,{id:r,...a,...a?.success}):Nt.dismiss(r),o}).catch(o=>{let s=l.error?Uo(l.error,o):void 0;s?Nt.error(s,{id:r,...a,...a?.error}):Nt.dismiss(r)}),t};var Ak=1e3,jk=(t,l="default")=>{let{toasts:a,pausedAt:r}=Ck(t,l),o=k.useRef(new Map).current,s=k.useCallback((g,b=Ak)=>{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&&Nt.dismiss(x.id);return}return setTimeout(()=>Nt.dismiss(x.id,l),E)});return()=>{b.forEach(x=>x&&clearTimeout(x))}},[a,r,l]);let c=k.useCallback(Ko(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:j}=b||{},D=a.filter(L=>(L.position||j)===(g.position||j)&&L.height),T=D.findIndex(L=>L.id===g.id),A=D.filter((L,W)=>W<T&&L.visible).length;return D.filter(L=>L.visible).slice(...x?[A+1]:[0,A]).reduce((L,W)=>L+(W.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}}},_k=jl`
|
|
13
|
-
from {
|
|
14
|
-
transform: scale(0) rotate(45deg);
|
|
15
|
-
opacity: 0;
|
|
16
|
-
}
|
|
17
|
-
to {
|
|
18
|
-
transform: scale(1) rotate(45deg);
|
|
19
|
-
opacity: 1;
|
|
20
|
-
}`,Rk=jl`
|
|
21
|
-
from {
|
|
22
|
-
transform: scale(0);
|
|
23
|
-
opacity: 0;
|
|
24
|
-
}
|
|
25
|
-
to {
|
|
26
|
-
transform: scale(1);
|
|
27
|
-
opacity: 1;
|
|
28
|
-
}`,zk=jl`
|
|
29
|
-
from {
|
|
30
|
-
transform: scale(0) rotate(90deg);
|
|
31
|
-
opacity: 0;
|
|
32
|
-
}
|
|
33
|
-
to {
|
|
34
|
-
transform: scale(1) rotate(90deg);
|
|
35
|
-
opacity: 1;
|
|
36
|
-
}`,Dk=di("div")`
|
|
37
|
-
width: 20px;
|
|
38
|
-
opacity: 0;
|
|
39
|
-
height: 20px;
|
|
40
|
-
border-radius: 10px;
|
|
41
|
-
background: ${t=>t.primary||"#ff4b4b"};
|
|
42
|
-
position: relative;
|
|
43
|
-
transform: rotate(45deg);
|
|
44
|
-
|
|
45
|
-
animation: ${_k} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
46
|
-
forwards;
|
|
47
|
-
animation-delay: 100ms;
|
|
48
|
-
|
|
49
|
-
&:after,
|
|
50
|
-
&:before {
|
|
51
|
-
content: '';
|
|
52
|
-
animation: ${Rk} 0.15s ease-out forwards;
|
|
53
|
-
animation-delay: 150ms;
|
|
54
|
-
position: absolute;
|
|
55
|
-
border-radius: 3px;
|
|
56
|
-
opacity: 0;
|
|
57
|
-
background: ${t=>t.secondary||"#fff"};
|
|
58
|
-
bottom: 9px;
|
|
59
|
-
left: 4px;
|
|
60
|
-
height: 2px;
|
|
61
|
-
width: 12px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&:before {
|
|
65
|
-
animation: ${zk} 0.15s ease-out forwards;
|
|
66
|
-
animation-delay: 180ms;
|
|
67
|
-
transform: rotate(90deg);
|
|
68
|
-
}
|
|
69
|
-
`,Nk=jl`
|
|
70
|
-
from {
|
|
71
|
-
transform: rotate(0deg);
|
|
72
|
-
}
|
|
73
|
-
to {
|
|
74
|
-
transform: rotate(360deg);
|
|
75
|
-
}
|
|
76
|
-
`,Ok=di("div")`
|
|
77
|
-
width: 12px;
|
|
78
|
-
height: 12px;
|
|
79
|
-
box-sizing: border-box;
|
|
80
|
-
border: 2px solid;
|
|
81
|
-
border-radius: 100%;
|
|
82
|
-
border-color: ${t=>t.secondary||"#e0e0e0"};
|
|
83
|
-
border-right-color: ${t=>t.primary||"#616161"};
|
|
84
|
-
animation: ${Nk} 1s linear infinite;
|
|
85
|
-
`,Mk=jl`
|
|
86
|
-
from {
|
|
87
|
-
transform: scale(0) rotate(45deg);
|
|
88
|
-
opacity: 0;
|
|
89
|
-
}
|
|
90
|
-
to {
|
|
91
|
-
transform: scale(1) rotate(45deg);
|
|
92
|
-
opacity: 1;
|
|
93
|
-
}`,Lk=jl`
|
|
94
|
-
0% {
|
|
95
|
-
height: 0;
|
|
96
|
-
width: 0;
|
|
97
|
-
opacity: 0;
|
|
98
|
-
}
|
|
99
|
-
40% {
|
|
100
|
-
height: 0;
|
|
101
|
-
width: 6px;
|
|
102
|
-
opacity: 1;
|
|
103
|
-
}
|
|
104
|
-
100% {
|
|
105
|
-
opacity: 1;
|
|
106
|
-
height: 10px;
|
|
107
|
-
}`,Uk=di("div")`
|
|
108
|
-
width: 20px;
|
|
109
|
-
opacity: 0;
|
|
110
|
-
height: 20px;
|
|
111
|
-
border-radius: 10px;
|
|
112
|
-
background: ${t=>t.primary||"#61d345"};
|
|
113
|
-
position: relative;
|
|
114
|
-
transform: rotate(45deg);
|
|
115
|
-
|
|
116
|
-
animation: ${Mk} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
117
|
-
forwards;
|
|
118
|
-
animation-delay: 100ms;
|
|
119
|
-
&:after {
|
|
120
|
-
content: '';
|
|
121
|
-
box-sizing: border-box;
|
|
122
|
-
animation: ${Lk} 0.2s ease-out forwards;
|
|
123
|
-
opacity: 0;
|
|
124
|
-
animation-delay: 200ms;
|
|
125
|
-
position: absolute;
|
|
126
|
-
border-right: 2px solid;
|
|
127
|
-
border-bottom: 2px solid;
|
|
128
|
-
border-color: ${t=>t.secondary||"#fff"};
|
|
129
|
-
bottom: 6px;
|
|
130
|
-
left: 6px;
|
|
131
|
-
height: 10px;
|
|
132
|
-
width: 6px;
|
|
133
|
-
}
|
|
134
|
-
`,Bk=di("div")`
|
|
135
|
-
position: absolute;
|
|
136
|
-
`,Hk=di("div")`
|
|
137
|
-
position: relative;
|
|
138
|
-
display: flex;
|
|
139
|
-
justify-content: center;
|
|
140
|
-
align-items: center;
|
|
141
|
-
min-width: 20px;
|
|
142
|
-
min-height: 20px;
|
|
143
|
-
`,qk=jl`
|
|
144
|
-
from {
|
|
145
|
-
transform: scale(0.6);
|
|
146
|
-
opacity: 0.4;
|
|
147
|
-
}
|
|
148
|
-
to {
|
|
149
|
-
transform: scale(1);
|
|
150
|
-
opacity: 1;
|
|
151
|
-
}`,Yk=di("div")`
|
|
152
|
-
position: relative;
|
|
153
|
-
transform: scale(0.6);
|
|
154
|
-
opacity: 0.4;
|
|
155
|
-
min-width: 20px;
|
|
156
|
-
animation: ${qk} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
157
|
-
forwards;
|
|
158
|
-
`,Gk=({toast:t})=>{let{icon:l,type:a,iconTheme:r}=t;return l!==void 0?typeof l=="string"?k.createElement(Yk,null,l):l:a==="blank"?null:k.createElement(Hk,null,k.createElement(Ok,{...r}),a!=="loading"&&k.createElement(Bk,null,a==="error"?k.createElement(Dk,{...r}):k.createElement(Uk,{...r})))},Vk=t=>`
|
|
159
|
-
0% {transform: translate3d(0,${t*-200}%,0) scale(.6); opacity:.5;}
|
|
160
|
-
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
161
|
-
`,Fk=t=>`
|
|
162
|
-
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
163
|
-
100% {transform: translate3d(0,${t*-150}%,-1px) scale(.6); opacity:0;}
|
|
164
|
-
`,Ik="0%{opacity:0;} 100%{opacity:1;}",Xk="0%{opacity:1;} 100%{opacity:0;}",Qk=di("div")`
|
|
165
|
-
display: flex;
|
|
166
|
-
align-items: center;
|
|
167
|
-
background: #fff;
|
|
168
|
-
color: #363636;
|
|
169
|
-
line-height: 1.3;
|
|
170
|
-
will-change: transform;
|
|
171
|
-
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
172
|
-
max-width: 350px;
|
|
173
|
-
pointer-events: auto;
|
|
174
|
-
padding: 8px 10px;
|
|
175
|
-
border-radius: 8px;
|
|
176
|
-
`,$k=di("div")`
|
|
177
|
-
display: flex;
|
|
178
|
-
justify-content: center;
|
|
179
|
-
margin: 4px 10px;
|
|
180
|
-
color: inherit;
|
|
181
|
-
flex: 1 1 auto;
|
|
182
|
-
white-space: pre-line;
|
|
183
|
-
`,Zk=(t,l)=>{let a=t.includes("top")?1:-1,[r,o]=g0()?[Ik,Xk]:[Vk(a),Fk(a)];return{animation:l?`${jl(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${jl(o)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}},Kk=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(Gk,{toast:t}),c=k.createElement($k,{...t.ariaProps},Uo(t.message,t));return k.createElement(Qk,{className:t.className,style:{...o,...a,...t.style}},typeof r=="function"?r({icon:s,message:c}):k.createElement(k.Fragment,null,s,c))});bk(k.createElement);var Pk=({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)},Jk=(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}},Wk=Zo`
|
|
184
|
-
z-index: 9999;
|
|
185
|
-
> * {
|
|
186
|
-
pointer-events: auto;
|
|
187
|
-
}
|
|
188
|
-
`,So=16,eC=({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=Jk(g,b);return k.createElement(Pk,{id:y.id,key:y.id,onHeightUpdate:m.updateHeight,className:y.visible?Wk:"",style:x},y.type==="custom"?Uo(y.message,y):o?o(y):k.createElement(Kk,{toast:y,position:g}))}))},Ay=Nt;function tC(){return S.jsx(eC,{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 nC(){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 lC(){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"),[j,D]=k.useState(!1),T=nC(),A=k.useCallback(()=>{E(le=>(localStorage.setItem("sidebarCollapsed",String(!le)),!le))},[]),L=k.useCallback(()=>D(!0),[]),W=k.useCallback(()=>D(!1),[]),K=Na(),B=tl(),_=k.useCallback(()=>{b(Lo())},[]),ae=k.useCallback(()=>{l(za()),y(null)},[]),se=k.useRef(B.pathname);k.useEffect(()=>{const le=ee=>ee.startsWith("/session/")||ee.startsWith("/shared/"),Q=le(se.current),H=le(B.pathname);se.current=B.pathname,D(!1),H&&!Q&&(E(!0),localStorage.setItem("sidebarCollapsed","true")),!H&&Q&&(E(!1),localStorage.setItem("sidebarCollapsed","false")),H||ae()},[B.pathname,ae]);const N=k.useCallback(async()=>{const le=Ow();if(s(le),Do()&&$f()){r("oauth");return}try{const{oauthToken:Q}=await Kw();if(Q){_w(Q),r("keychain");return}}catch{if($f()){r("keychain");return}}if(jw()){r("api-key");return}r(null),d(!0)},[]);k.useEffect(()=>{N()},[N]);const X=k.useCallback(le=>{const Q=le.split(/\s+/).slice(0,3).join(" ");y({name:Q||"New project"}),K("/session/new",{state:{description:le}})},[K]),P=k.useCallback(async le=>{try{await Iw(le)}catch{}Lw(le),ae(),B.pathname===`/session/${le}`&&K("/")},[B.pathname,K,ae]),I={sessions:t,pendingProject:m,authSource:a,hasGhToken:o,showSettings:c,setShowSettings:d,refreshSessions:ae,refreshSettings:N,handleNewProject:X,handleDeleteSession:P,loading:p,joinedSharedSessions:g,refreshJoinedSharedSessions:_};return S.jsxs(S0.Provider,{value:I,children:[S.jsxs("div",{className:`app-shell ${x?"sidebar-collapsed":""}`,children:[T&&j&&S.jsx("div",{className:"sidebar-backdrop",onClick:W,onKeyDown:le=>{le.key==="Escape"&&W()}}),S.jsx(dk,{collapsed:x,onToggle:A,mobileOpen:j,onMobileClose:W}),S.jsx("main",{className:"main-content",children:S.jsx(GE,{context:{openMobileDrawer:L}})}),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(tC,{})]})}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 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 iC(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 aC({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,j]=k.useState(!1),[D,T]=k.useState(""),[A,L]=k.useState(""),[W,K]=k.useState(!1);k.useEffect(()=>{$w().then(I=>{r(I.repos),s(!1)}).catch(I=>{d(I instanceof Error?I.message:"Failed to load repos"),s(!1)})},[]);function B(I){g(I),j(!0),x([]),T(""),K(!1),L(""),Zw(I.nameWithOwner).then(le=>{x(le.branches),j(!1)}).catch(()=>{j(!1)})}function _(){g(null),x([]),T(""),K(!1)}function ae(I){y&&t(y.url,I)}const se=k.useCallback(()=>{y?_():l()},[y,l]);$o(se);const N=p?a.filter(I=>I.nameWithOwner.toLowerCase().includes(p.toLowerCase())):a,P=[...D?b.filter(I=>I.name.toLowerCase().includes(D.toLowerCase())):b].sort((I,le)=>I.isDefault&&!le.isDefault?-1:!I.isDefault&&le.isDefault?1:I.name.localeCompare(le.name));return Io.createPortal(S.jsx("div",{className:"modal-overlay",onClick:l,children:S.jsx("div",{className:"modal-card",onClick:I=>I.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:D,onChange:I=>T(I.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:[P.map(I=>S.jsx("div",{className:"repo-picker-item",onClick:()=>ae(I.name),children:S.jsxs("span",{className:"repo-picker-item-name",children:[I.name,I.isDefault&&S.jsx("span",{style:{marginLeft:8,fontSize:11,color:"var(--text-subtle)",fontWeight:400},children:"default"})]})},I.name)),W?S.jsxs("div",{className:"repo-picker-new-branch",children:[S.jsx("input",{type:"text",value:A,onChange:I=>L(I.target.value),onKeyDown:I=>{I.key==="Enter"&&A.trim()&&ae(A.trim())},placeholder:"branch-name"}),S.jsx("button",{type:"button",className:"modal-btn modal-btn-primary",disabled:!A.trim(),onClick:()=>ae(A.trim()),children:"Create"})]}):S.jsx("div",{className:"repo-picker-item",style:{color:"var(--brand-1)"},onClick:()=>K(!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:I=>m(I.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:N.length===0?S.jsx("div",{style:{padding:16,textAlign:"center",color:"var(--text-subtle)",fontSize:13},children:p?"No matching repos":"No repos found"}):N.map(I=>S.jsxs("div",{className:"repo-picker-item",onClick:()=>B(I),children:[S.jsx("span",{className:"repo-picker-item-name",children:I.nameWithOwner}),S.jsx("span",{className:"repo-picker-item-date",children:iC(I.updatedAt)})]},I.nameWithOwner))}),S.jsx("div",{className:"modal-actions",children:S.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=k.useId(),[p,m]=k.useState(""),[y,g]=k.useState(""),[b,x]=k.useState(""),[E,j]=k.useState(!1),D=k.useCallback(()=>{p.trim()&&(Tw(p.trim()),m(""),a())},[p,a]),T=k.useCallback(()=>{Aw(),a()},[a]),A=k.useCallback(()=>{y.trim()&&(zw(y.trim()),g(""),a())},[y,a]),L=k.useCallback(()=>{Rw(),a()},[a]),W=k.useCallback(()=>{b.trim()&&(Dw(b.trim()),x(""),a())},[b,a]),K=k.useCallback(()=>{Nw(),a()},[a]),B=k.useCallback(N=>{N.key==="Enter"&&(N.preventDefault(),D())},[D]),_=k.useCallback(N=>{N.key==="Enter"&&(N.preventDefault(),A())},[A]),ae=k.useCallback(N=>{N.key==="Enter"&&(N.preventDefault(),W())},[W]),se=k.useCallback(()=>{o?.(),j(!0),setTimeout(()=>j(!1),2e3)},[o]);return $o(r),Io.createPortal(S.jsx("div",{className:"modal-overlay",onClick:r,children:S.jsxs("div",{className:"modal-card",onClick:N=>N.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:"Anthropic API Key"}),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"})]}),S.jsxs("div",{className:"settings-input-row",children:[S.jsx("input",{id:s,type:"password",value:p,onChange:N=>m(N.target.value),onKeyDown:B,placeholder:t==="api-key"?"Enter new key to override...":"sk-ant-..."}),p.trim()?S.jsx("button",{type:"button",onClick:D,className:"primary",children:"Save"}):t==="api-key"&&S.jsx("button",{type:"button",onClick:T,className:"btn btn-danger",children:"Remove"})]})]}),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:"OAuth Token"}),Do()&&S.jsx("span",{className:"settings-status active",children:"Manual override"})]}),S.jsxs("div",{className:"settings-input-row",children:[S.jsx("input",{id:c,type:"password",value:y,onChange:N=>g(N.target.value),onKeyDown:_,placeholder:Do()?"Enter new token to override...":"Paste OAuth token..."}),y.trim()?S.jsx("button",{type:"button",onClick:A,className:"primary",children:"Save"}):Do()&&S.jsx("button",{type:"button",onClick:L,className:"btn btn-danger",children:"Remove"})]}),S.jsx("div",{style:{fontSize:11,color:"var(--text-subtle)",marginTop:4},children:"Override the OAuth token used for Claude authentication. Takes priority over keychain."})]}),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:d,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:d,type:"password",value:b,onChange:N=>x(N.target.value),onKeyDown:ae,placeholder:l?"Enter new token to override...":"ghp_..."}),b.trim()?S.jsx("button",{type:"button",onClick:W,className:"primary",children:"Save"}):l&&S.jsx("button",{type:"button",onClick:K,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:se,children:E?"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 rC(){const{authSource:t,hasGhToken:l,showSettings:a,setShowSettings:r,refreshSettings:o,refreshSessions:s,handleNewProject:c,loading:d}=Po(),p=Na(),{openMobileDrawer:m}=$v(),[y,g]=k.useState(!1),[b,x]=k.useState(!1),E=k.useCallback(async(j,D)=>{g(!1),x(!0);try{const{sessionId:T}=await Pw(j,D);await s(),p(`/session/${T}`)}catch(T){console.error("Failed to resume from GitHub:",T)}finally{x(!1)}},[p,s]);return S.jsxs(S.Fragment,{children:[a&&S.jsx(w0,{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(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&&S.jsx("button",{type:"button",className:"hero-resume-btn",onClick:()=>g(!0),disabled:b,children:b?"Cloning...":"Resume from GitHub"})]}),y&&S.jsx(aC,{onSelect:E,onClose:()=>g(!1)})]})}function uC(t,l){const a={};return(t[t.length-1]===""?[...t,""]:t).join((a.padRight?" ":"")+","+(a.padLeft===!1?"":" ")).trim()}const oC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cC={};function jy(t,l){return(cC.jsx?sC:oC).test(t)}const fC=/[ \t\n\f\r]/g;function dC(t){return typeof t=="object"?t.type==="text"?_y(t.value):!1:_y(t)}function _y(t){return t.replace(fC,"")===""}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 Jf(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 hC=0;const Ue=Gi(),_t=Gi(),Wf=Gi(),fe=Gi(),ct=Gi(),Ra=Gi(),vn=Gi();function Gi(){return 2**++hC}const ed=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:_t,commaOrSpaceSeparated:vn,commaSeparated:Ra,number:fe,overloadedBoolean:Wf,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),kf=Object.keys(ed);class Ud extends un{constructor(l,a,r,o){let s=-1;if(super(l,a),Ry(this,"space",o),typeof r=="number")for(;++s<kf.length;){const c=kf[s];Ry(this,kf[s],(r&ed[c])===ed[c])}}}Ud.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 Ud(r,t.transform(t.attributes||{},r),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),l[r]=s,a[Jf(r)]=r,a[Jf(s.attribute)]=r}return new eu(l,a,t.space)}const C0=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 T0(t,l){return l in t?t[l]:l}function A0(t,l){return T0(t,l.toLowerCase())}const mC=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:Wf,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:Wf,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}),pC=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:T0}),j0=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()}}),_0=Oa({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:A0}),R0=Oa({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,l){return"xml:"+l.slice(3).toLowerCase()}}),gC={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"},yC=/[A-Z]/g,zy=/-[a-z]/g,vC=/^data[-\w.:]+$/i;function bC(t,l){const a=Jf(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"&&vC.test(l)){if(l.charAt(4)==="-"){const s=l.slice(5).replace(zy,SC);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=l.slice(4);if(!zy.test(s)){let c=s.replace(yC,xC);c.charAt(0)!=="-"&&(c="-"+c),l="data"+c}}o=Ud}return new o(r,l)}function xC(t){return"-"+t.toLowerCase()}function SC(t){return t.charAt(1).toUpperCase()}const EC=k0([C0,mC,j0,_0,R0],"html"),Bd=k0([C0,pC,j0,_0,R0],"svg");function wC(t){return t.join(" ").trim()}var ka={},Cf,Dy;function kC(){if(Dy)return Cf;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",x="declaration";function E(D,T){if(typeof D!="string")throw new TypeError("First argument must be a string");if(!D)return[];T=T||{};var A=1,L=1;function W(le){var Q=le.match(l);Q&&(A+=Q.length);var H=le.lastIndexOf(p);L=~H?le.length-H:L+le.length}function K(){var le={line:A,column:L};return function(Q){return Q.position=new B(le),se(),Q}}function B(le){this.start=le,this.end={line:A,column:L},this.source=T.source}B.prototype.content=D;function _(le){var Q=new Error(T.source+":"+A+":"+L+": "+le);if(Q.reason=le,Q.filename=T.source,Q.line=A,Q.column=L,Q.source=D,!T.silent)throw Q}function ae(le){var Q=le.exec(D);if(Q){var H=Q[0];return W(H),D=D.slice(H.length),Q}}function se(){ae(a)}function N(le){var Q;for(le=le||[];Q=X();)Q!==!1&&le.push(Q);return le}function X(){var le=K();if(!(m!=D.charAt(0)||y!=D.charAt(1))){for(var Q=2;g!=D.charAt(Q)&&(y!=D.charAt(Q)||m!=D.charAt(Q+1));)++Q;if(Q+=2,g===D.charAt(Q-1))return _("End of comment missing");var H=D.slice(2,Q-2);return L+=2,W(H),D=D.slice(Q),L+=2,le({type:b,comment:H})}}function P(){var le=K(),Q=ae(r);if(Q){if(X(),!ae(o))return _("property missing ':'");var H=ae(s),ee=le({type:x,property:j(Q[0].replace(t,g)),value:H?j(H[0].replace(t,g)):g});return ae(c),ee}}function I(){var le=[];N(le);for(var Q;Q=P();)Q!==!1&&(le.push(Q),N(le));return le}return se(),I()}function j(D){return D?D.replace(d,g):g}return Cf=E,Cf}var Ny;function CC(){if(Ny)return ka;Ny=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(kC());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 TC(){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 Dr,My;function AC(){if(My)return Dr;My=1;var t=Dr&&Dr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},l=t(CC()),a=TC();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,Dr=r,Dr}var jC=AC();const _C=pd(jC),z0=D0("end"),Hd=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 RC(t){const l=Hd(t),a=z0(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?td(t):""}function td(t){return Uy(t&&t.line)+":"+Uy(t&&t.column)}function Ly(t){return td(t&&t.start)+"-"+td(t&&t.end)}function Uy(t){return t&&typeof t=="number"?t:1}class Qt 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}}Qt.prototype.file="";Qt.prototype.name="";Qt.prototype.reason="";Qt.prototype.message="";Qt.prototype.stack="";Qt.prototype.column=void 0;Qt.prototype.line=void 0;Qt.prototype.ancestors=void 0;Qt.prototype.cause=void 0;Qt.prototype.fatal=void 0;Qt.prototype.place=void 0;Qt.prototype.ruleId=void 0;Qt.prototype.source=void 0;const qd={}.hasOwnProperty,zC=new Map,DC=/[A-Z]/g,NC=new Set(["table","tbody","thead","tfoot","tr"]),OC=new Set(["td","th"]),N0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function MC(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=VC(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=GC(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"?Bd:EC,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 LC(t,l,a);if(l.type==="mdxFlowExpression"||l.type==="mdxTextExpression")return UC(t,l);if(l.type==="mdxJsxFlowElement"||l.type==="mdxJsxTextElement")return HC(t,l,a);if(l.type==="mdxjsEsm")return BC(t,l);if(l.type==="root")return qC(t,l,a);if(l.type==="text")return YC(t,l)}function LC(t,l,a){const r=t.schema;let o=r;l.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Bd,t.schema=o),t.ancestors.push(l);const s=L0(t,l.tagName,!1),c=FC(t,l);let d=Gd(t,l);return NC.has(l.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!dC(p):!0})),M0(t,c,s,l),Yd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function UC(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 BC(t,l){if(l.data&&l.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(l.data.estree);Ir(t,l.position)}function HC(t,l,a){const r=t.schema;let o=r;l.name==="svg"&&r.space==="html"&&(o=Bd,t.schema=o),t.ancestors.push(l);const s=l.name===null?t.Fragment:L0(t,l.name,!0),c=IC(t,l),d=Gd(t,l);return M0(t,c,s,l),Yd(c,d),t.ancestors.pop(),t.schema=r,t.create(l,s,c,a)}function qC(t,l,a){const r={};return Yd(r,Gd(t,l)),t.create(l,t.Fragment,r,a)}function YC(t,l){return l.value}function M0(t,l,a,r){typeof a!="string"&&a!==t.Fragment&&t.passNode&&(l.node=r)}function Yd(t,l){if(l.length>0){const a=l.length>1?l:l[0];a&&(t.children=a)}}function GC(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 VC(t,l){return a;function a(r,o,s,c){const d=Array.isArray(s.children),p=Hd(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 FC(t,l){const a={};let r,o;for(o in l.properties)if(o!=="children"&&qd.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"&&OC.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 IC(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 Gd(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=bC(t.schema,l);if(!(a==null||typeof a=="number"&&Number.isNaN(a))){if(Array.isArray(a)&&(a=r.commaSeparated?uC(a):wC(a)),r.property==="style"){let o=typeof a=="object"?a:QC(t,String(a));return t.stylePropertyNameCase==="css"&&(o=$C(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&r.space?gC[r.property]||r.property:r.attribute,a]}}function QC(t,l){try{return _C(l,{reactCompat:!0})}catch(a){if(t.ignoreInvalidStyle)return{};const r=a,o=new Qt("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=N0+"#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=jy(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=jy(l)&&!/^[a-z]/.test(l)?{type:"Identifier",name:l}:{type:"Literal",value:l};if(r.type==="Literal"){const o=r.value;return qd.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 Qt("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=N0+"#cannot-handle-mdx-estrees-without-createevaluater",a}function $C(t){const l={};let a;for(a in t)qd.call(t,a)&&(l[ZC(a)]=t[a]);return l}function ZC(t){let l=t.replace(DC,KC);return l.slice(0,3)==="ms-"&&(l="-"+l),l}function KC(t){return"-"+t.toLowerCase()}const Tf={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"]},PC={};function Vd(t,l){const a=PC,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(JC(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]=U0(t[o],l,a);return r.join("")}function JC(t){return!!(t&&typeof t=="object")}const Hy=document.createElement("i");function Fd(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 Nn(t,l){return t.length>0?(xn(t,t.length,0,l),t):l}const qy={}.hasOwnProperty;function B0(t){const l={};let a=-1;for(;++a<t.length;)WC(l,t[a]);return l}function WC(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];e2(o[c],Array.isArray(d)?d:d?[d]:[])}}}function e2(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 Kt=hi(/[A-Za-z]/),Xt=hi(/[\dA-Za-z]/),t2=hi(/[#-'*+\--9=?A-Z^-~]/);function Bo(t){return t!==null&&(t<32||t===127)}const nd=hi(/\d/),n2=hi(/[\dA-Fa-f]/),l2=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&&Xt(t.charCodeAt(a+1))&&Xt(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 Ke(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 i2={tokenize:a2};function a2(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"),Ke(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 r2={tokenize:u2},Yy={tokenize:o2};function u2(t){const l=this,a=[];let r=0,o,s,c;return d;function d(L){if(r<a.length){const W=a[r];return l.containerState=W[1],t.attempt(W[0].continuation,p,m)(L)}return m(L)}function p(L){if(r++,l.containerState._closeFlow){l.containerState._closeFlow=void 0,o&&A();const W=l.events.length;let K=W,B;for(;K--;)if(l.events[K][0]==="exit"&&l.events[K][1].type==="chunkFlow"){B=l.events[K][1].end;break}T(r);let _=W;for(;_<l.events.length;)l.events[_][1].end={...B},_++;return xn(l.events,K+1,0,l.events.slice(W)),l.events.length=_,m(L)}return d(L)}function m(L){if(r===a.length){if(!o)return b(L);if(o.currentConstruct&&o.currentConstruct.concrete)return E(L);l.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return l.containerState={},t.check(Yy,y,g)(L)}function y(L){return o&&A(),T(r),b(L)}function g(L){return l.parser.lazy[l.now().line]=r!==a.length,c=l.now().offset,E(L)}function b(L){return l.containerState={},t.attempt(Yy,x,E)(L)}function x(L){return r++,a.push([l.currentConstruct,l.containerState]),b(L)}function E(L){if(L===null){o&&A(),T(0),t.consume(L);return}return o=o||l.parser.flow(l.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),j(L)}function j(L){if(L===null){D(t.exit("chunkFlow"),!0),T(0),t.consume(L);return}return _e(L)?(t.consume(L),D(t.exit("chunkFlow")),r=0,l.interrupt=void 0,d):(t.consume(L),j)}function D(L,W){const K=l.sliceStream(L);if(W&&K.push(null),L.previous=s,s&&(s.next=L),s=L,o.defineSkip(L.start),o.write(K),l.parser.lazy[L.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<c&&(!o.events[B][1].end||o.events[B][1].end.offset>c))return;const _=l.events.length;let ae=_,se,N;for(;ae--;)if(l.events[ae][0]==="exit"&&l.events[ae][1].type==="chunkFlow"){if(se){N=l.events[ae][1].end;break}se=!0}for(T(r),B=_;B<l.events.length;)l.events[B][1].end={...N},B++;xn(l.events,ae+1,0,l.events.slice(_)),l.events.length=B}}function T(L){let W=a.length;for(;W-- >L;){const K=a[W];l.containerState=K[1],K[0].exit.call(l,t)}a.length=L}function A(){o.write([null]),s=void 0,o=void 0,l.containerState._closeFlow=void 0}}function o2(t,l,a){return Ke(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 ld={name:"attention",resolveAll:s2,tokenize:c2};function s2(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=Nn(m,[["enter",t[r][1],l],["exit",t[r][1],l]])),m=Nn(m,[["enter",o,l],["enter",c,l],["exit",c,l],["enter",s,l]]),m=Nn(m,Wo(l.parser.constructs.insideSpan.null,t.slice(r+1,a),l)),m=Nn(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=Nn(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 c2(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 Gy(t,l){t.column+=l,t.offset+=l,t._bufferIndex+=l}const f2={name:"autolink",tokenize:d2};function d2(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 Kt(x)?(t.consume(x),c):x===64?a(x):m(x)}function c(x){return x===43||x===45||x===46||Xt(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||Xt(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):t2(x)?(t.consume(x),m):a(x)}function y(x){return Xt(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||Xt(x))&&r++<63){const E=x===45?b:g;return t.consume(x),E}return a(x)}}const tu={partial:!0,tokenize:h2};function h2(t,l,a){return r;function r(s){return Ye(s)?Ke(t,o,"linePrefix")(s):o(s)}function o(s){return s===null||_e(s)?l(s):a(s)}}const q0={continuation:{tokenize:p2},exit:g2,name:"blockQuote",tokenize:m2};function m2(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 p2(t,l,a){const r=this;return o;function o(c){return Ye(c)?Ke(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 g2(t){t.exit("blockQuote")}const Y0={name:"characterEscape",tokenize:y2};function y2(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 l2(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),l):a(s)}}const G0={name:"characterReference",tokenize:v2};function v2(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=Xt,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=n2,y):(t.enter("characterReferenceValue"),s=7,c=nd,y(g))}function y(g){if(g===59&&o){const b=t.exit("characterReferenceValue");return c===Xt&&!Fd(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:x2},Fy={concrete:!0,name:"codeFenced",tokenize:b2};function b2(t,l,a){const r=this,o={partial:!0,tokenize:K};let s=0,c=0,d;return p;function p(B){return m(B)}function m(B){const _=r.events[r.events.length-1];return s=_&&_[1].type==="linePrefix"?_[2].sliceSerialize(_[1],!0).length:0,d=B,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(B)}function y(B){return B===d?(c++,t.consume(B),y):c<3?a(B):(t.exit("codeFencedFenceSequence"),Ye(B)?Ke(t,g,"whitespace")(B):g(B))}function g(B){return B===null||_e(B)?(t.exit("codeFencedFence"),r.interrupt?l(B):t.check(Vy,j,W)(B)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||_e(B)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),g(B)):Ye(B)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ke(t,x,"whitespace")(B)):B===96&&B===d?a(B):(t.consume(B),b)}function x(B){return B===null||_e(B)?g(B):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),E(B))}function E(B){return B===null||_e(B)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),g(B)):B===96&&B===d?a(B):(t.consume(B),E)}function j(B){return t.attempt(o,W,D)(B)}function D(B){return t.enter("lineEnding"),t.consume(B),t.exit("lineEnding"),T}function T(B){return s>0&&Ye(B)?Ke(t,A,"linePrefix",s+1)(B):A(B)}function A(B){return B===null||_e(B)?t.check(Vy,j,W)(B):(t.enter("codeFlowValue"),L(B))}function L(B){return B===null||_e(B)?(t.exit("codeFlowValue"),A(B)):(t.consume(B),L)}function W(B){return t.exit("codeFenced"),l(B)}function K(B,_,ae){let se=0;return N;function N(Q){return B.enter("lineEnding"),B.consume(Q),B.exit("lineEnding"),X}function X(Q){return B.enter("codeFencedFence"),Ye(Q)?Ke(B,P,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):P(Q)}function P(Q){return Q===d?(B.enter("codeFencedFenceSequence"),I(Q)):ae(Q)}function I(Q){return Q===d?(se++,B.consume(Q),I):se>=c?(B.exit("codeFencedFenceSequence"),Ye(Q)?Ke(B,le,"whitespace")(Q):le(Q)):ae(Q)}function le(Q){return Q===null||_e(Q)?(B.exit("codeFencedFence"),_(Q)):ae(Q)}}}function x2(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 Af={name:"codeIndented",tokenize:E2},S2={partial:!0,tokenize:w2};function E2(t,l,a){const r=this;return o;function o(m){return t.enter("codeIndented"),Ke(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(S2,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 w2(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):Ke(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 k2={name:"codeText",previous:T2,resolve:C2,tokenize:A2};function C2(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 T2(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 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&&Nr(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),Nr(this.left,l)}unshift(l){this.setCursor(0),this.right.push(l)}unshiftMany(l){this.setCursor(0),Nr(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);Nr(this.right,a.reverse())}else{const a=this.right.splice(this.left.length+this.right.length-l,Number.POSITIVE_INFINITY);Nr(this.left,a.reverse())}}}function Nr(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 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,_2(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 _2(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,j=0;const D=[j];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&&(j=b+1,D.push(j),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):D.pop(),b=D.length;b--;){const T=d.slice(D[b],D[b+1]),A=s.pop();p.push([A,A+T.length-1]),t.splice(A,2,T)}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 R2={resolve:D2,tokenize:N2},z2={partial:!0,tokenize:O2};function D2(t){return V0(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(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 O2(t,l,a){const r=this;return o;function o(c){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),Ke(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(T){return T===60?(t.enter(r),t.enter(o),t.enter(s),t.consume(T),t.exit(s),b):T===null||T===32||T===41||Bo(T)?a(T):(t.enter(r),t.enter(c),t.enter(d),t.enter("chunkString",{contentType:"string"}),j(T))}function b(T){return T===62?(t.enter(s),t.consume(T),t.exit(s),t.exit(o),t.exit(r),l):(t.enter(d),t.enter("chunkString",{contentType:"string"}),x(T))}function x(T){return T===62?(t.exit("chunkString"),t.exit(d),b(T)):T===null||T===60||_e(T)?a(T):(t.consume(T),T===92?E:x)}function E(T){return T===60||T===62||T===92?(t.consume(T),x):x(T)}function j(T){return!y&&(T===null||T===41||st(T))?(t.exit("chunkString"),t.exit(d),t.exit(c),t.exit(r),l(T)):y<m&&T===40?(t.consume(T),y++,j):T===41?(t.consume(T),y--,j):T===null||T===32||T===40||Bo(T)?a(T):(t.consume(T),T===92?D:j)}function D(T){return T===40||T===41||T===92?(t.consume(T),j):j(T)}}function I0(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"),Ke(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)?Ke(t,r,a?"linePrefix":"lineSuffix")(o):l(o)}}const M2={name:"definition",tokenize:U2},L2={partial:!0,tokenize:B2};function U2(t,l,a){const r=this;let o;return s;function s(x){return t.enter("definition"),c(x)}function c(x){return I0.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 F0(t,y,a,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function y(x){return t.attempt(L2,g,g)(x)}function g(x){return Ye(x)?Ke(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 B2(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)?Ke(t,c,"whitespace")(d):c(d)}function c(d){return d===null||_e(d)?l(d):a(d)}}const H2={name:"hardBreakEscape",tokenize:q2};function q2(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 Y2={name:"headingAtx",resolve:G2,tokenize:V2};function G2(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 V2(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)?Ke(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 F2=["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"],I2={concrete:!0,name:"htmlFlow",resolveTo:$2,tokenize:Z2},X2={partial:!0,tokenize:P2},Q2={partial:!0,tokenize:K2};function $2(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(C){return y(C)}function y(C){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(C),g}function g(C){return C===33?(t.consume(C),b):C===47?(t.consume(C),s=!0,j):C===63?(t.consume(C),o=3,r.interrupt?l:R):Kt(C)?(t.consume(C),c=String.fromCharCode(C),D):a(C)}function b(C){return C===45?(t.consume(C),o=2,x):C===91?(t.consume(C),o=5,d=0,E):Kt(C)?(t.consume(C),o=4,r.interrupt?l:R):a(C)}function x(C){return C===45?(t.consume(C),r.interrupt?l:R):a(C)}function E(C){const ce="CDATA[";return C===ce.charCodeAt(d++)?(t.consume(C),d===ce.length?r.interrupt?l:P:E):a(C)}function j(C){return Kt(C)?(t.consume(C),c=String.fromCharCode(C),D):a(C)}function D(C){if(C===null||C===47||C===62||st(C)){const ce=C===47,be=c.toLowerCase();return!ce&&!s&&Iy.includes(be)?(o=1,r.interrupt?l(C):P(C)):F2.includes(c.toLowerCase())?(o=6,ce?(t.consume(C),T):r.interrupt?l(C):P(C)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?a(C):s?A(C):L(C))}return C===45||Xt(C)?(t.consume(C),c+=String.fromCharCode(C),D):a(C)}function T(C){return C===62?(t.consume(C),r.interrupt?l:P):a(C)}function A(C){return Ye(C)?(t.consume(C),A):N(C)}function L(C){return C===47?(t.consume(C),N):C===58||C===95||Kt(C)?(t.consume(C),W):Ye(C)?(t.consume(C),L):N(C)}function W(C){return C===45||C===46||C===58||C===95||Xt(C)?(t.consume(C),W):K(C)}function K(C){return C===61?(t.consume(C),B):Ye(C)?(t.consume(C),K):L(C)}function B(C){return C===null||C===60||C===61||C===62||C===96?a(C):C===34||C===39?(t.consume(C),p=C,_):Ye(C)?(t.consume(C),B):ae(C)}function _(C){return C===p?(t.consume(C),p=null,se):C===null||_e(C)?a(C):(t.consume(C),_)}function ae(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||st(C)?K(C):(t.consume(C),ae)}function se(C){return C===47||C===62||Ye(C)?L(C):a(C)}function N(C){return C===62?(t.consume(C),X):a(C)}function X(C){return C===null||_e(C)?P(C):Ye(C)?(t.consume(C),X):a(C)}function P(C){return C===45&&o===2?(t.consume(C),H):C===60&&o===1?(t.consume(C),ee):C===62&&o===4?(t.consume(C),z):C===63&&o===3?(t.consume(C),R):C===93&&o===5?(t.consume(C),ve):_e(C)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(X2,V,I)(C)):C===null||_e(C)?(t.exit("htmlFlowData"),I(C)):(t.consume(C),P)}function I(C){return t.check(Q2,le,V)(C)}function le(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),Q}function Q(C){return C===null||_e(C)?I(C):(t.enter("htmlFlowData"),P(C))}function H(C){return C===45?(t.consume(C),R):P(C)}function ee(C){return C===47?(t.consume(C),c="",oe):P(C)}function oe(C){if(C===62){const ce=c.toLowerCase();return Iy.includes(ce)?(t.consume(C),z):P(C)}return Kt(C)&&c.length<8?(t.consume(C),c+=String.fromCharCode(C),oe):P(C)}function ve(C){return C===93?(t.consume(C),R):P(C)}function R(C){return C===62?(t.consume(C),z):C===45&&o===2?(t.consume(C),R):P(C)}function z(C){return C===null||_e(C)?(t.exit("htmlFlowData"),V(C)):(t.consume(C),z)}function V(C){return t.exit("htmlFlow"),l(C)}}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 P2(t,l,a){return r;function r(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(tu,l,a)}}const J2={name:"htmlText",tokenize:W2};function W2(t,l,a){const r=this;let o,s,c;return d;function d(R){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(R),p}function p(R){return R===33?(t.consume(R),m):R===47?(t.consume(R),K):R===63?(t.consume(R),L):Kt(R)?(t.consume(R),ae):a(R)}function m(R){return R===45?(t.consume(R),y):R===91?(t.consume(R),s=0,E):Kt(R)?(t.consume(R),A):a(R)}function y(R){return R===45?(t.consume(R),x):a(R)}function g(R){return R===null?a(R):R===45?(t.consume(R),b):_e(R)?(c=g,ee(R)):(t.consume(R),g)}function b(R){return R===45?(t.consume(R),x):g(R)}function x(R){return R===62?H(R):R===45?b(R):g(R)}function E(R){const z="CDATA[";return R===z.charCodeAt(s++)?(t.consume(R),s===z.length?j:E):a(R)}function j(R){return R===null?a(R):R===93?(t.consume(R),D):_e(R)?(c=j,ee(R)):(t.consume(R),j)}function D(R){return R===93?(t.consume(R),T):j(R)}function T(R){return R===62?H(R):R===93?(t.consume(R),T):j(R)}function A(R){return R===null||R===62?H(R):_e(R)?(c=A,ee(R)):(t.consume(R),A)}function L(R){return R===null?a(R):R===63?(t.consume(R),W):_e(R)?(c=L,ee(R)):(t.consume(R),L)}function W(R){return R===62?H(R):L(R)}function K(R){return Kt(R)?(t.consume(R),B):a(R)}function B(R){return R===45||Xt(R)?(t.consume(R),B):_(R)}function _(R){return _e(R)?(c=_,ee(R)):Ye(R)?(t.consume(R),_):H(R)}function ae(R){return R===45||Xt(R)?(t.consume(R),ae):R===47||R===62||st(R)?se(R):a(R)}function se(R){return R===47?(t.consume(R),H):R===58||R===95||Kt(R)?(t.consume(R),N):_e(R)?(c=se,ee(R)):Ye(R)?(t.consume(R),se):H(R)}function N(R){return R===45||R===46||R===58||R===95||Xt(R)?(t.consume(R),N):X(R)}function X(R){return R===61?(t.consume(R),P):_e(R)?(c=X,ee(R)):Ye(R)?(t.consume(R),X):se(R)}function P(R){return R===null||R===60||R===61||R===62||R===96?a(R):R===34||R===39?(t.consume(R),o=R,I):_e(R)?(c=P,ee(R)):Ye(R)?(t.consume(R),P):(t.consume(R),le)}function I(R){return R===o?(t.consume(R),o=void 0,Q):R===null?a(R):_e(R)?(c=I,ee(R)):(t.consume(R),I)}function le(R){return R===null||R===34||R===39||R===60||R===61||R===96?a(R):R===47||R===62||st(R)?se(R):(t.consume(R),le)}function Q(R){return R===47||R===62||st(R)?se(R):a(R)}function H(R){return R===62?(t.consume(R),t.exit("htmlTextData"),t.exit("htmlText"),l):a(R)}function ee(R){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),oe}function oe(R){return Ye(R)?Ke(t,ve,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):ve(R)}function ve(R){return t.enter("htmlTextData"),c(R)}}const Id={name:"labelEnd",resolveAll:lT,resolveTo:iT,tokenize:aT},eT={tokenize:rT},tT={tokenize:uT},nT={tokenize:oT};function lT(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 iT(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=Nn(d,t.slice(s+1,s+r+3)),d=Nn(d,[["enter",y,l]]),d=Nn(d,Wo(l.parser.constructs.insideSpan.null,t.slice(s+r+4,c-3),l)),d=Nn(d,[["exit",y,l],t[c-2],t[c-1],["exit",m,l]]),d=Nn(d,t.slice(c+1)),d=Nn(d,[["exit",p,l]]),xn(t,s,t.length,d),t}function aT(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(eT,y,c?y:g)(b):b===91?t.attempt(tT,y,c?m:g)(b):c?y(b):g(b)}function m(b){return t.attempt(nT,y,g)(b)}function y(b){return l(b)}function g(b){return s._balanced=!0,a(b)}}function rT(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):F0(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 uT(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 oT(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 sT={name:"labelStartImage",resolveAll:Id.resolveAll,tokenize:cT};function cT(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 fT={name:"labelStartLink",resolveAll:Id.resolveAll,tokenize:dT};function dT(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:hT};function hT(t,l){return a;function a(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),Ke(t,l,"linePrefix")}}const Oo={name:"thematicBreak",tokenize:mT};function mT(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)?Ke(t,d,"whitespace")(m):d(m))}}const rn={continuation:{tokenize:vT},exit:xT,name:"list",tokenize:yT},pT={partial:!0,tokenize:ST},gT={partial:!0,tokenize:bT};function yT(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:nd(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 nd(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(pT,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 vT(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,Ke(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(gT,l,c)(d))}function c(d){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ke(t,t.attempt(rn,l,a),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function bT(t,l,a){const r=this;return Ke(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 xT(t){t.exit(this.containerState.type)}function ST(t,l,a){const r=this;return Ke(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:ET,tokenize:wT};function ET(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 wT(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)?Ke(t,p,"lineSuffix")(m):p(m))}function p(m){return m===null||_e(m)?(t.exit("setextHeadingLine"),l(m)):a(m)}}const kT={tokenize:CT};function CT(t){const l=this,a=t.attempt(tu,r,t.attempt(this.parser.constructs.flowInitial,o,Ke(t,t.attempt(this.parser.constructs.flow,o,t.attempt(R2,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 TT={resolveAll:$0()},AT=Q0("string"),jT=Q0("text");function Q0(t){return{resolveAll:$0(t==="text"?_T: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 $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 _T(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 RT={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:M2},DT={[-2]:Af,[-1]:Af,32:Af},NT={35:Y2,42:Oo,45:[Xy,Oo],60:I2,61:Xy,95:Oo,96:Fy,126:Fy},OT={38:G0,92:Y0},MT={[-5]:jf,[-4]:jf,[-3]:jf,33:sT,38:G0,42:ld,60:[f2,J2],91:fT,92:[H2,Y0],93:Id,95:ld,96:k2},LT={null:[ld,TT]},UT={null:[42,95]},BT={null:[]},HT=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:UT,contentInitial:zT,disable:BT,document:RT,flow:NT,flowInitial:DT,insideSpan:LT,string:OT,text:MT},Symbol.toStringTag,{value:"Module"}));function qT(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:_(K),check:_(B),consume:A,enter:L,exit:W,interrupt:_(B,{interrupt:!0})},m={code:null,containerState:{},defineSkip:j,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(X){return c=Nn(c,X),D(),c[c.length-1]!==null?[]:(ae(l,0),m.events=Wo(s,m.events,m),m.events)}function b(X,P){return GT(x(X),P)}function x(X){return YT(c,X)}function E(){const{_bufferIndex:X,_index:P,line:I,column:le,offset:Q}=r;return{_bufferIndex:X,_index:P,line:I,column:le,offset:Q}}function j(X){o[X.line]=X.column,N()}function D(){let X;for(;r._index<c.length;){const P=c[r._index];if(typeof P=="string")for(X=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===X&&r._bufferIndex<P.length;)T(P.charCodeAt(r._bufferIndex));else T(P)}}function T(X){y=y(X)}function A(X){_e(X)?(r.line++,r.column=1,r.offset+=X===-3?2:1,N()):X!==-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=X}function L(X,P){const I=P||{};return I.type=X,I.start=E(),m.events.push(["enter",I,m]),d.push(I),I}function W(X){const P=d.pop();return P.end=E(),m.events.push(["exit",P,m]),P}function K(X,P){ae(X,P.from)}function B(X,P){P.restore()}function _(X,P){return I;function I(le,Q,H){let ee,oe,ve,R;return Array.isArray(le)?V(le):"tokenize"in le?V([le]):z(le);function z(xe){return Ne;function Ne(pe){const Re=pe!==null&&xe[pe],zt=pe!==null&&xe.null,Ln=[...Array.isArray(Re)?Re:Re?[Re]:[],...Array.isArray(zt)?zt:zt?[zt]:[]];return V(Ln)(pe)}}function V(xe){return ee=xe,oe=0,xe.length===0?H:C(xe[oe])}function C(xe){return Ne;function Ne(pe){return R=se(),ve=xe,xe.partial||(m.currentConstruct=xe),xe.name&&m.parser.constructs.disable.null.includes(xe.name)?be():xe.tokenize.call(P?Object.assign(Object.create(m),P):m,p,ce,be)(pe)}}function ce(xe){return X(ve,R),Q}function be(xe){return R.restore(),++oe<ee.length?C(ee[oe]):H}}}function ae(X,P){X.resolveAll&&!s.includes(X)&&s.push(X),X.resolve&&xn(m.events,P,m.events.length-P,X.resolve(m.events.slice(P),m)),X.resolveTo&&(m.events=X.resolveTo(m.events,m))}function se(){const X=E(),P=m.previous,I=m.currentConstruct,le=m.events.length,Q=Array.from(d);return{from:le,restore:H};function H(){r=X,m.previous=P,m.currentConstruct=I,m.events.length=le,d=Q,N()}}function N(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function YT(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 GT(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
|
-
`;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 VT(t){const r={constructs:B0([HT,...(t||{}).extensions||[]]),content:o(i2),defined:[],document:o(r2),flow:o(kT),lazy:{},string:o(AT),text:o(jT)};return r;function o(s){return c;function c(d){return qT(r,s,d)}}}function FT(t){for(;!V0(t););return t}const Qy=/[\0\t\n\r]/g;function IT(){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(Qy.lastIndex=g,m=Qy.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 XT=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function QT(t){return t.replace(XT,$T)}function $T(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 Fd(a)||t}const Z0={}.hasOwnProperty;function ZT(t,l,a){return typeof l!="string"&&(a=l,l=void 0),KT(a)(FT(VT(a).document().write(IT()(t,l,!0))))}function KT(t){const l={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(ll),autolinkProtocol:se,autolinkEmail:se,atxHeading:s(Rl),blockQuote:s(zt),characterEscape:se,characterReference:se,codeFenced:s(Ln),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(Ln,c),codeText:s(yt,c),codeTextData:se,data:se,codeFlowValue:se,definition:s(Un),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Sn),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(Vi,c),htmlFlowData:se,htmlText:s(Vi,c),htmlTextData:se,image:s(Fi),label:c,link:s(ll),listItem:s(mi),listItemValue:b,listOrdered:s(zl,g),listUnordered:s(zl),paragraph:s(La),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Rl),strong:s(Ua),thematicBreak:s(il)},exit:{atxHeading:p(),atxHeadingSequence:K,autolink:p(),autolinkEmail:Re,autolinkProtocol:pe,blockQuote:p(),characterEscapeValue:N,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:xe,characterReference:Ne,codeFenced:p(D),codeFencedFence:j,codeFencedFenceInfo:x,codeFencedFenceMeta:E,codeFlowValue:N,codeIndented:p(T),codeText:p(Q),codeTextData:N,data:N,definition:p(),definitionDestinationString:W,definitionLabelString:A,definitionTitleString:L,emphasis:p(),hardBreakEscape:p(P),hardBreakTrailing:p(P),htmlFlow:p(I),htmlFlowData:N,htmlText:p(le),htmlTextData:N,image:p(ee),label:ve,labelText:oe,lineEnding:X,link:p(H),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:ce,resourceDestinationString:R,resourceTitleString:z,resource:V,setextHeading:p(ae),setextHeadingLineSequence:_,setextHeadingText:B,strong:p(),thematicBreak:p()}};K0(l,(t||{}).mdastExtensions||[]);const a={};return r;function r(ne){let de={type:"root",children:[]};const Ce={stack:[de],tokenStack:[],config:l,enter:d,exit:m,buffer:c,resume:y,data:a},De=[];let Pe=-1;for(;++Pe<ne.length;)if(ne[Pe][1].type==="listOrdered"||ne[Pe][1].type==="listUnordered")if(ne[Pe][0]==="enter")De.push(Pe);else{const $t=De.pop();Pe=o(ne,$t,Pe)}for(Pe=-1;++Pe<ne.length;){const $t=l[ne[Pe][0]];Z0.call($t,ne[Pe][1].type)&&$t[ne[Pe][1].type].call(Object.assign({sliceSerialize:ne[Pe][2].sliceSerialize},Ce),ne[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(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:ii(ne.length>0?ne[ne.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(ne,de,Ce){let De=de-1,Pe=-1,$t=!1,on,Lt,nt,Ut;for(;++De<=Ce;){const tt=ne[De];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=De),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=De;for(Lt=void 0;Bn--;){const sn=ne[Bn];if(sn[1].type==="lineEnding"||sn[1].type==="lineEndingBlank"){if(sn[0]==="exit")continue;Lt&&(ne[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?ne[Lt][1].start:tt[1].end),ne.splice(Lt||De,0,["exit",on,tt[2]]),De++,Ce++}if(tt[1].type==="listItemPrefix"){const Bn={type:"listItem",_spread:!1,start:Object.assign({},tt[1].start),end:void 0};on=Bn,ne.splice(De,0,["enter",Bn,tt[2]]),De++,Ce++,nt=void 0,Ut=!0}}}return ne[de][1]._spread=$t,Ce}function s(ne,de){return Ce;function Ce(De){d.call(this,ne(De),De),de&&de.call(this,De)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ne,de,Ce){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([de,Ce||void 0]),ne.position={start:ii(de.start),end:void 0}}function p(ne){return de;function de(Ce){ne&&ne.call(this,Ce),m.call(this,Ce)}}function m(ne,de){const Ce=this.stack.pop(),De=this.tokenStack.pop();if(De)De[0].type!==ne.type&&(de?de.call(this,ne,De[0]):(De[1]||$y).call(this,ne,De[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Br({start:ne.start,end:ne.end})+"): it’s not open");Ce.position.end=ii(ne.end)}function y(){return Vd(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function b(ne){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.lang=ne}function E(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.meta=ne}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function D(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function T(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne.replace(/(\r?\n|\r)$/g,"")}function A(ne){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(ne)).toLowerCase()}function L(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.title=ne}function W(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.url=ne}function K(ne){const de=this.stack[this.stack.length-1];if(!de.depth){const Ce=this.sliceSerialize(ne).length;de.depth=Ce}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function _(ne){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function ae(){this.data.setextHeadingSlurpLineEnding=void 0}function se(ne){const Ce=this.stack[this.stack.length-1].children;let De=Ce[Ce.length-1];(!De||De.type!=="text")&&(De=pt(),De.position={start:ii(ne.start),end:void 0},Ce.push(De)),this.stack.push(De)}function N(ne){const de=this.stack.pop();de.value+=this.sliceSerialize(ne),de.position.end=ii(ne.end)}function X(ne){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=de.children[de.children.length-1];Ce.position.end=ii(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&l.canContainEols.includes(de.type)&&(se.call(this,ne),N.call(this,ne))}function P(){this.data.atHardBreak=!0}function I(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function le(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function Q(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function H(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=de,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function ee(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=de,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function oe(ne){const de=this.sliceSerialize(ne),Ce=this.stack[this.stack.length-2];Ce.label=QT(de),Ce.identifier=In(de).toLowerCase()}function ve(){const ne=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 De=ne.children;Ce.children=De}else Ce.alt=de}function R(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.url=ne}function z(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.title=ne}function V(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function ce(ne){const de=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=de,Ce.identifier=In(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function be(ne){this.data.characterReferenceType=ne.type}function xe(ne){const de=this.sliceSerialize(ne),Ce=this.data.characterReferenceType;let De;Ce?(De=H0(de,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):De=Fd(de);const Pe=this.stack[this.stack.length-1];Pe.value+=De}function Ne(ne){const de=this.stack.pop();de.position.end=ii(ne.end)}function pe(ne){N.call(this,ne);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ne)}function Re(ne){N.call(this,ne);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ne)}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(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function mi(ne){return{type:"listItem",spread:ne._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 K0(t,l){let a=-1;for(;++a<l.length;){const r=l[a];Array.isArray(r)?K0(t,r):PT(t,r)}}function PT(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 JT(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 WT(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 eA(t,l){const a={type:"element",tagName:"br",properties:{},children:[]};return t.patch(l,a),[t.applyData(l,a),{type:"text",value:`
|
|
192
|
-
`}]}function tA(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 nA(t,l){const a={type:"element",tagName:"del",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function lA(t,l){const a={type:"element",tagName:"em",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function iA(t,l){const a=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=String(l.identifier).toUpperCase(),o=Ma(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 aA(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 rA(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 uA(t,l){const a=String(l.identifier).toUpperCase(),r=t.definitionById.get(a);if(!r)return P0(t,l);const o={src:Ma(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 oA(t,l){const a={src:Ma(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 sA(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 cA(t,l){const a=String(l.identifier).toUpperCase(),r=t.definitionById.get(a);if(!r)return P0(t,l);const o={href:Ma(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 fA(t,l){const a={href:Ma(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 dA(t,l,a){const r=t.all(l),o=a?hA(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
|
-
`}),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 hA(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 mA(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 pA(t,l){const a={type:"element",tagName:"p",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function gA(t,l){const a={type:"root",children:t.wrap(t.all(l))};return t.patch(l,a),t.applyData(l,a)}function yA(t,l){const a={type:"element",tagName:"strong",properties:{},children:t.all(l)};return t.patch(l,a),t.applyData(l,a)}function vA(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=Hd(l.children[1]),p=z0(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 bA(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={},x=c?c[p]:void 0;x&&(b.align=x);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 xA(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,Ky=32;function SA(t){const l=String(t),a=/\r?\n|\r/g;let r=a.exec(l),o=0;const s=[];for(;r;)s.push(Py(l.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=a.exec(l);return s.push(Py(l.slice(o),o>0,!1)),s.join("")}function Py(t,l,a){let r=0,o=t.length;if(l){let s=t.codePointAt(r);for(;s===Zy||s===Ky;)r++,s=t.codePointAt(r)}if(a){let s=t.codePointAt(o-1);for(;s===Zy||s===Ky;)o--,s=t.codePointAt(o-1)}return o>r?t.slice(r,o):""}function EA(t,l){const a={type:"text",value:SA(String(l.value))};return t.patch(l,a),t.applyData(l,a)}function wA(t,l){const a={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(l,a),t.applyData(l,a)}const kA={blockquote:WT,break:eA,code:tA,delete:nA,emphasis:lA,footnoteReference:iA,heading:aA,html:rA,imageReference:uA,image:oA,inlineCode:sA,linkReference:cA,link:fA,listItem:dA,list:mA,paragraph:pA,root:gA,strong:yA,table:vA,tableCell:xA,tableRow:bA,text:EA,thematicBreak:wA,toml:Eo,yaml:Eo,definition:Eo,footnoteDefinition:Eo};function Eo(){}const W0=-1,es=0,qr=1,Ho=2,Xd=3,Qd=4,$d=5,Zd=6,eb=7,tb=8,Jy=typeof self=="object"?self:globalThis,CA=(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 qr:{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 Qd:{const{source:d,flags:p}=c;return a(new RegExp(d,p),o)}case $d:{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 Jy[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 Jy[s](c),o)};return r},Wy=t=>CA(new Map,t)(0),Ca="",{toString:TA}={},{keys:AA}=Object,Or=t=>{const l=typeof t;if(l!=="object"||!t)return[es,l];const a=TA.call(t).slice(8,-1);switch(a){case"Array":return[qr,Ca];case"Object":return[Ho,Ca];case"Date":return[Xd,Ca];case"RegExp":return[Qd,Ca];case"Map":return[$d,Ca];case"Set":return[Zd,Ca];case"DataView":return[qr,a]}return a.includes("Array")?[qr,a]:a.includes("Error")?[eb,a]:[Ho,a]},wo=([t,l])=>t===es&&(l==="function"||l==="symbol"),jA=(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]=Or(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 qr:{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 AA(c))(t||!wo(Or(c[b])))&&y.push([s(b),s(c[b])]);return g}case Xd:return o([d,c.toISOString()],c);case Qd:{const{source:y,flags:g}=c;return o([d,{source:y,flags:g}],c)}case $d:{const y=[],g=o([d,y],c);for(const[b,x]of c)(t||!(wo(Or(b))||wo(Or(x))))&&y.push([s(b),s(x)]);return g}case Zd:{const y=[],g=o([d,y],c);for(const b of c)(t||!wo(Or(b)))&&y.push(s(b));return g}}const{message:m}=c;return o([d,{name:p,message:m}],c)};return s},ev=(t,{json:l,lossy:a}={})=>{const r=[];return jA(!(l||a),!!l,new Map,r)(t),r},qo=typeof structuredClone=="function"?(t,l)=>l&&("json"in l||"lossy"in l)?Wy(ev(t,l)):structuredClone(t):(t,l)=>Wy(ev(t,l));function _A(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 RA(t,l){return"Back to reference "+(t+1)+(l>1?"-"+l:"")}function zA(t){const l=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",a=t.options.footnoteBackContent||_A,r=t.options.footnoteBackLabel||RA,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=Ma(g.toLowerCase());let x=0;const E=[],j=t.footnoteCounts.get(g);for(;j!==void 0&&++x<=j;){E.length>0&&E.push({type:"text",value:" "});let A=typeof a=="string"?a:a(p,x);typeof A=="string"&&(A={type:"text",value:A}),E.push({type:"element",tagName:"a",properties:{href:"#"+l+"fnref-"+b+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(p,x),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const D=y[y.length-1];if(D&&D.type==="element"&&D.tagName==="p"){const A=D.children[D.children.length-1];A&&A.type==="text"?A.value+=" ":D.children.push({type:"text",value:" "}),D.children.push(...E)}else y.push(...E);const T={type:"element",tagName:"li",properties:{id:l+"fn-"+b},children:t.wrap(y,!0)};t.patch(m,T),d.push(T)}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
|
-
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(d,!0)},{type:"text",value:`
|
|
197
|
-
`}]}}const ts=(function(t){if(t==null)return MA;if(typeof t=="function")return ns(t);if(typeof t=="object")return Array.isArray(t)?DA(t):NA(t);if(typeof t=="string")return OA(t);throw new Error("Expected function, string, or object as test")});function DA(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 NA(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 OA(t){return ns(l);function l(a){return a&&a.type===t}}function ns(t){return l;function l(a,r,o){return!!(LA(a)&&t.call(this,a,typeof r=="number"?r:void 0,o||void 0))}}function MA(){return!0}function LA(t){return t!==null&&typeof t=="object"&&"type"in t}const nb=[],UA=!0,id=!1,BA="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 x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(p.type+(x?"<"+x+">":""))+")"})}return b;function b(){let x=nb,E,j,D;if((!l||s(p,m,y[y.length-1]||void 0))&&(x=HA(a(p,y)),x[0]===id))return x;if("children"in p&&p.children){const T=p;if(T.children&&x[0]!==BA)for(j=(r?T.children.length:-1)+c,D=y.concat(T);j>-1&&j<T.children.length;){const A=T.children[j];if(E=d(A,j,D)(),E[0]===id)return E;j=typeof E[1]=="number"?E[1]:j+c}}return x}}}function HA(t){return Array.isArray(t)?t:typeof t=="number"?[UA,t]:t==null?nb:[t]}function Kd(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 ad={}.hasOwnProperty,qA={};function YA(t,l){const a=l||qA,r=new Map,o=new Map,s=new Map,c={...kA,...a.handlers},d={all:m,applyData:VA,definitionById:r,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:p,options:a,patch:GA,wrap:IA};return Kd(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,x=d.handlers[b];if(ad.call(d.handlers,b)&&x)return x(d,y,g);if(d.options.passThrough&&d.options.passThrough.includes(b)){if("children"in y){const{children:j,...D}=y,T=qo(D);return T.children=d.all(y),T}return qo(y)}return(d.options.unknownHandler||FA)(d,y,g)}function m(y){const g=[];if("children"in y){const b=y.children;let x=-1;for(;++x<b.length;){const E=d.one(b[x],y);if(E){if(x&&b[x-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=tv(E.value)),!Array.isArray(E)&&E.type==="element")){const j=E.children[0];j&&j.type==="text"&&(j.value=tv(j.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function GA(t,l){t.position&&(l.position=RC(t))}function VA(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 FA(t,l){const a=l.data||{},r="value"in l&&!(ad.call(a,"hProperties")||ad.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 IA(t,l){const a=[];let r=-1;for(l&&a.push({type:"text",value:`
|
|
198
|
-
`});++r<t.length;)r&&a.push({type:"text",value:`
|
|
199
|
-
`}),a.push(t[r]);return l&&t.length>0&&a.push({type:"text",value:`
|
|
200
|
-
`}),a}function tv(t){let l=0,a=t.charCodeAt(l);for(;a===9||a===32;)l++,a=t.charCodeAt(l);return t.slice(l)}function nv(t,l){const a=YA(t,l),r=a.one(t,void 0),o=zA(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 XA(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 _f,iv;function QA(){if(iv)return _f;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 _f=function p(){var m,y,g,b,x,E,j=arguments[0],D=1,T=arguments.length,A=!1;for(typeof j=="boolean"&&(A=j,j=arguments[1]||{},D=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});D<T;++D)if(m=arguments[D],m!=null)for(y in m)g=d(j,y),b=d(m,y),j!==b&&(A&&b&&(s(b)||(x=o(b)))?(x?(x=!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},_f}var $A=QA();const Rf=pd($A);function rd(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 ZA(){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?KA(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 KA(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:PA,dirname:JA,extname:WA,join:ej,sep:"/"};function PA(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 JA(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 WA(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 ej(...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?".":tj(a)}function tj(t){nu(t);const l=t.codePointAt(0)===47;let a=nj(t,!l);return a.length===0&&!l&&(a="."),a.length>0&&t.codePointAt(t.length-1)===47&&(a+="/"),l?"/"+a:a}function nj(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 lj={cwd:ij};function ij(){return"/"}function ud(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function aj(t){if(typeof t=="string")t=new URL(t);else if(!ud(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 rj(t)}function rj(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 zf=["history","path","basename","stem","extname","dirname"];class ib{constructor(l){let a;l?ud(l)?a={path:l}:typeof l=="string"||uj(l)?a={value:l}:a=l:a={},this.cwd="cwd"in a?"":lj.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<zf.length;){const s=zf[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)zf.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"),Df(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(Df(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){ud(l)&&(l=aj(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"),Df(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 Qt(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 Df(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 uj(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const oj=(function(t){const r=this.constructor.prototype,o=r[t],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),sj={}.hasOwnProperty;class Pd extends oj{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=ZA()}copy(){const l=new Pd;let a=-1;for(;++a<this.attachers.length;){const r=this.attachers[a];l.use(...r)}return l.data(Rf(!0,{},this.namespace)),l}data(l,a){return typeof l=="string"?arguments.length===2?(Lf("data",this.frozen),this.namespace[l]=a,this):sj.call(this.namespace,l)&&this.namespace[l]||void 0:l?(Lf("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 Of("parse",r),r(String(a),a)}process(l,a){const r=this;return this.freeze(),Of("process",this.parser||this.Parser),Mf("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);dj(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(),Of("processSync",this.parser||this.Parser),Mf("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 Mf("stringify",o),rv(l),o(l,r)}use(l,...a){const r=this.attachers,o=this.namespace;if(Lf("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=Rf(!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 j=r[b][1];rd(j)&&rd(x)&&(x=Rf(!0,j,x)),r[b]=[m,x,...E]}}}}const cj=new Pd().freeze();function Of(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Mf(t,l){if(typeof l!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Lf(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(!rd(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 fj(t)?t:new ib(t)}function fj(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function dj(t){return typeof t=="string"||hj(t)}function hj(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const mj="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",ov=[],sv={allowDangerousHtml:!0},pj=/^(https?|ircs?|mailto|xmpp)$/i,gj=[{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 yj(t){const l=vj(t),a=bj(t);return xj(l.runSync(l.parse(a),a),t)}function vj(t){const l=t.rehypePlugins||ov,a=t.remarkPlugins||ov,r=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...sv}:sv;return cj().use(JT).use(a).use(XA,r).use(l)}function bj(t){const l=t.children||"",a=new ib;return typeof l=="string"&&(a.value=l),a}function xj(t,l){const a=l.allowedElements,r=l.allowElement,o=l.components,s=l.disallowedElements,c=l.skipHtml,d=l.unwrapDisallowed,p=l.urlTransform||Sj;for(const y of gj)Object.hasOwn(l,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+mj+y.id,void 0);return Kd(t,m),MC(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 Tf)if(Object.hasOwn(Tf,x)&&Object.hasOwn(y.properties,x)){const E=y.properties[x],j=Tf[x];(j===null||j.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 Sj(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||pj.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 Ej(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wj(t,l,a){const o=ts((a||{}).ignore||[]),s=kj(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 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 D=g.children.indexOf(m);let T=!1,A=[];b.lastIndex=0;let L=b.exec(m.value);for(;L;){const W=L.index,K={index:L.index,input:L.input,stack:[...y,m]};let B=x(...L,K);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?b.lastIndex=W+1:(E!==W&&A.push({type:"text",value:m.value.slice(E,W)}),Array.isArray(B)?A.push(...B):B&&A.push(B),E=W+L[0].length,T=!0),!b.global)break;L=b.exec(m.value)}return T?(E<m.value.length&&A.push({type:"text",value:m.value.slice(E)}),g.children.splice(D,1,...A)):A=[m],D+A.length}}function kj(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([Cj(o[0]),Tj(o[1])])}return l}function Cj(t){return typeof t=="string"?new RegExp(Ej(t),"g"):t}function Tj(t){return typeof t=="function"?t:function(){return t}}const Uf="phrasing",Bf=["autolink","link","image","label"];function Aj(){return{transforms:[Oj],enter:{literalAutolink:_j,literalAutolinkEmail:Hf,literalAutolinkHttp:Hf,literalAutolinkWww:Hf},exit:{literalAutolink:Nj,literalAutolinkEmail:Dj,literalAutolinkHttp:Rj,literalAutolinkWww:zj}}}function jj(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Uf,notInConstruct:Bf},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Uf,notInConstruct:Bf},{character:":",before:"[ps]",after:"\\/",inConstruct:Uf,notInConstruct:Bf}]}}function _j(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Hf(t){this.config.enter.autolinkProtocol.call(this,t)}function Rj(t){this.config.exit.autolinkProtocol.call(this,t)}function zj(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 Dj(t){this.config.exit.autolinkEmail.call(this,t)}function Nj(t){this.exit(t)}function Oj(t){wj(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,Mj],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Lj]],{ignore:["link","linkReference"]})}function Mj(t,l,a,r,o){let s="";if(!ab(o)||(/^w/i.test(l)&&(a=l+a,l="",s="http://"),!Uj(a)))return!1;const c=Bj(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 Lj(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 Uj(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 Bj(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 ab(t,l){const a=t.input.charCodeAt(t.index-1);return(t.index===0||qi(a)||Jo(a))&&(!l||a!==47)}rb.peek=Qj;function Hj(){this.buffer()}function qj(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Yj(){this.buffer()}function Gj(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Vj(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 Fj(t){this.exit(t)}function Ij(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 Xj(t){this.exit(t)}function Qj(){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 $j(){return{enter:{gfmFootnoteCallString:Hj,gfmFootnoteCall:qj,gfmFootnoteDefinitionLabelString:Yj,gfmFootnoteDefinition:Gj},exit:{gfmFootnoteCallString:Vj,gfmFootnoteCall:Fj,gfmFootnoteDefinitionLabelString:Ij,gfmFootnoteDefinition:Xj}}}function Zj(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:Kj))),m(),p}}function Kj(t,l,a){return l===0?t:ub(t,l,a)}function ub(t,l,a){return(a?"":" ")+t}const Pj=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ob.peek=n_;function Jj(){return{canContainEols:["delete"],enter:{strikethrough:e_},exit:{strikethrough:t_}}}function Wj(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Pj}],handlers:{delete:ob}}}function e_(t){this.enter({type:"delete",children:[]},t)}function t_(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 n_(){return"~"}function l_(t){return t.length}function i_(t,l){const a=l||{},r=(a.align||[]).concat(),o=a.stringLength||l_,s=[],c=[],d=[],p=[];let m=0,y=-1;for(;++y<t.length;){const j=[],D=[];let T=-1;for(t[y].length>m&&(m=t[y].length);++T<t[y].length;){const A=a_(t[y][T]);if(a.alignDelimiters!==!1){const L=o(A);D[T]=L,(p[T]===void 0||L>p[T])&&(p[T]=L)}j.push(A)}c[y]=j,d[y]=D}let g=-1;if(typeof r=="object"&&"length"in r)for(;++g<m;)s[g]=fv(r[g]);else{const j=fv(r);for(;++g<m;)s[g]=j}g=-1;const b=[],x=[];for(;++g<m;){const j=s[g];let D="",T="";j===99?(D=":",T=":"):j===108?D=":":j===114&&(T=":");let A=a.alignDelimiters===!1?1:Math.max(1,p[g]-D.length-T.length);const L=D+"-".repeat(A)+T;a.alignDelimiters!==!1&&(A=D.length+A+T.length,A>p[g]&&(p[g]=A),x[g]=A),b[g]=L}c.splice(1,0,b),d.splice(1,0,x),y=-1;const E=[];for(;++y<c.length;){const j=c[y],D=d[y];g=-1;const T=[];for(;++g<m;){const A=j[g]||"";let L="",W="";if(a.alignDelimiters!==!1){const K=p[g]-(D[g]||0),B=s[g];B===114?L=" ".repeat(K):B===99?K%2?(L=" ".repeat(K/2+.5),W=" ".repeat(K/2-.5)):(L=" ".repeat(K/2),W=L):W=" ".repeat(K)}a.delimiterStart!==!1&&!g&&T.push("|"),a.padding!==!1&&!(a.alignDelimiters===!1&&A==="")&&(a.delimiterStart!==!1||g)&&T.push(" "),a.alignDelimiters!==!1&&T.push(L),T.push(A),a.alignDelimiters!==!1&&T.push(W),a.padding!==!1&&T.push(" "),(a.delimiterEnd!==!1||g!==m-1)&&T.push("|")}E.push(a.delimiterEnd===!1?T.join("").replace(/ +$/,""):T.join(""))}return E.join(`
|
|
203
|
-
`)}function a_(t){return t==null?"":String(t)}function fv(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 r_(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()),u_);return o(),c}function u_(t,l,a){return">"+(a?"":" ")+t}function o_(t,l){return dv(t,l.inConstruct,!0)&&!dv(t,l.notInConstruct,!1)}function dv(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 hv(t,l,a,r){let o=-1;for(;++o<a.unsafe.length;)if(a.unsafe[o].character===`
|
|
204
|
-
`&&o_(a.stack,a.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
205
|
-
`}function s_(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 c_(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 f_(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 d_(t,l,a,r){const o=f_(a),s=t.value||"",c=o==="`"?"GraveAccent":"Tilde";if(c_(t,a)){const g=a.enter("codeIndented"),b=a.indentLines(s,h_);return g(),b}const d=a.createTracker(r),p=o.repeat(Math.max(s_(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
|
-
`,encode:["`"],...d.current()})),g()}return y+=d.move(`
|
|
207
|
-
`),s&&(y+=d.move(s+`
|
|
208
|
-
`)),y+=d.move(p),m(),y}function h_(t,l,a){return(a?"":" ")+t}function Jd(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 m_(t,l,a,r){const o=Jd(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 p_(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=g_;function sb(t,l,a,r){const o=p_(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 x=c.move(o);return s(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+x}function g_(t,l,a){return a.options.emphasis||"*"}function y_(t,l){let a=!1;return Kd(t,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return a=!0,id}),!!((!t.depth||t.depth<3)&&Vd(t)&&(l.options.setext||a))}function v_(t,l,a,r){const o=Math.max(Math.min(6,t.depth||1),1),s=a.createTracker(r);if(y_(t,a)){const y=a.enter("headingSetext"),g=a.enter("phrasing"),b=a.containerPhrasing(t,{...s.current(),before:`
|
|
210
|
-
`,after:`
|
|
211
|
-
`});return g(),y(),b+`
|
|
212
|
-
`+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
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=Xr(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,a.options.closeAtx&&(m+=" "+c),p(),d(),m}cb.peek=b_;function cb(t){return t.value||""}function b_(){return"<"}fb.peek=x_;function fb(t,l,a,r){const o=Jd(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 x_(){return"!"}db.peek=S_;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 S_(){return"!"}hb.peek=E_;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 E_(){return"`"}function mb(t,l){const a=Vd(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=w_;function pb(t,l,a,r){const o=Jd(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 w_(t,l,a){return mb(t,a)?"<":"["}gb.peek=k_;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 k_(){return"["}function Wd(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 C_(t){const l=Wd(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 T_(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?T_(a):Wd(a);const d=t.ordered?c==="."?")":".":C_(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 j_(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 __(t,l,a,r){const o=j_(a);let s=a.bulletCurrent||Wd(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,x){return b?(x?"":" ".repeat(c))+g:(x?s:s+" ".repeat(c-s.length))+g}}function R_(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 N_(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=O_;function vb(t,l,a,r){const o=N_(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 x=c.move(o+o);return s(),a.attentionEncodeSurroundingInfo={after:b.outside,before:y.outside},d+p+x}function O_(t,l,a){return a.options.strong||"*"}function M_(t,l,a,r){return a.safe(t.value,r)}function L_(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 U_(t,l,a){const r=(yb(a)+(a.options.ruleSpaces?" ":"")).repeat(L_(a));return a.options.ruleSpaces?r.slice(0,-1):r}const bb={blockquote:r_,break:hv,code:d_,definition:m_,emphasis:sb,hardBreak:hv,heading:v_,html:cb,image:fb,imageReference:db,inlineCode:hb,link:pb,linkReference:gb,list:A_,listItem:__,paragraph:R_,root:D_,strong:vb,text:M_,thematicBreak:U_};function B_(){return{enter:{table:H_,tableData:mv,tableHeader:mv,tableRow:Y_},exit:{codeText:G_,table:q_,tableData:qf,tableHeader:qf,tableRow:qf}}}function H_(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 q_(t){this.exit(t),this.data.inTable=void 0}function Y_(t){this.enter({type:"tableRow",children:[]},t)}function qf(t){this.exit(t)}function mv(t){this.enter({type:"tableCell",children:[]},t)}function G_(t){let l=this.resume();this.data.inTable&&(l=l.replace(/\\([\\|])/g,V_));const a=this.stack[this.stack.length-1];a.type,a.value=l,this.exit(t)}function V_(t,l){return l==="|"?l:t}function F_(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(x,E,j,D){return m(y(x,j,D),x.align)}function d(x,E,j,D){const T=g(x,j,D),A=m([T]);return A.slice(0,A.indexOf(`
|
|
216
|
-
`))}function p(x,E,j,D){const T=j.enter("tableCell"),A=j.enter("phrasing"),L=j.containerPhrasing(x,{...D,before:s,after:s});return A(),T(),L}function m(x,E){return i_(x,{align:E,alignDelimiters:r,padding:a,stringLength:o})}function y(x,E,j){const D=x.children;let T=-1;const A=[],L=E.enter("table");for(;++T<D.length;)A[T]=g(D[T],E,j);return L(),A}function g(x,E,j){const D=x.children;let T=-1;const A=[],L=E.enter("tableRow");for(;++T<D.length;)A[T]=p(D[T],x,E,j);return L(),A}function b(x,E,j){let D=bb.inlineCode(x,E,j);return j.stack.includes("tableCell")&&(D=D.replace(/\|/g,"\\$&")),D}}function I_(){return{exit:{taskListCheckValueChecked:pv,taskListCheckValueUnchecked:pv,paragraph:Q_}}}function X_(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:$_}}}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 $_(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[Aj(),$j(),Jj(),B_(),I_()]}function K_(t){return{extensions:[jj(),Zj(t),Wj(),F_(t),X_()]}}const P_={tokenize:lR,partial:!0},xb={tokenize:iR,partial:!0},Sb={tokenize:aR,partial:!0},Eb={tokenize:rR,partial:!0},J_={tokenize:uR,partial:!0},wb={name:"wwwAutolink",tokenize:tR,previous:Cb},kb={name:"protocolAutolink",tokenize:nR,previous:Tb},_l={name:"emailAutolink",tokenize:eR,previous:Ab},nl={};function W_(){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 eR(t,l,a){const r=this;let o,s;return c;function c(g){return!od(g)||!Ab.call(r,r.previous)||eh(r.events)?a(g):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),d(g))}function d(g){return od(g)?(t.consume(g),d):g===64?(t.consume(g),p):a(g)}function p(g){return g===46?t.check(J_,y,m)(g):g===45||g===95||Xt(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&&Kt(r.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),l(g)):a(g)}}function tR(t,l,a){const r=this;return o;function o(c){return c!==87&&c!==119||!Cb.call(r,r.previous)||eh(r.events)?a(c):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(P_,t.attempt(xb,t.attempt(Sb,s),a),a)(c))}function s(c){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),l(c)}}function nR(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)&&!eh(r.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(g),t.consume(g),d):a(g)}function d(g){if(Kt(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 lR(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 iR(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 aR(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 rR(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 Kt(d)?c(d):a(d)}function c(d){return d===59?(t.consume(d),r):Kt(d)?(t.consume(d),c):a(d)}}function uR(t,l,a){return r;function r(s){return t.consume(s),o}function o(s){return Xt(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!Kt(t)}function Ab(t){return!(t===47||od(t))}function od(t){return t===43||t===45||t===46||t===95||Xt(t)}function eh(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 oR={tokenize:gR,partial:!0};function sR(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:hR,continuation:{tokenize:mR},exit:pR}},text:{91:{name:"gfmFootnoteCall",tokenize:dR},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cR,resolveTo:fR}}}}function cR(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 fR(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 dR(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 hR(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),Ke(t,x,"gfmFootnoteDefinitionWhitespace")):a(E)}function x(E){return l(E)}}function mR(t,l,a){return t.check(tu,l,t.attempt(oR,l,a))}function pR(t){t.exit("gfmFootnoteDefinition")}function gR(t,l,a){const r=this;return Ke(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 yR(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 j=Da(m);if(E===126)return g>1?p(E):(c.consume(E),g++,x);if(g<2&&!a)return p(E);const D=c.exit("strikethroughSequenceTemporary"),T=Da(E);return D._open=!T||T===2&&!!j,D._close=!j||j===2&&!!T,d(E)}}}class vR{constructor(){this.map=[]}add(l,a,r){bR(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 bR(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 xR(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 SR(){return{flow:{null:{name:"table",tokenize:ER,resolveAll:wR}}}}function ER(t,l,a){const r=this;let o=0,s=0,c;return d;function d(N){let X=r.events.length-1;for(;X>-1;){const le=r.events[X][1].type;if(le==="lineEnding"||le==="linePrefix")X--;else break}const P=X>-1?r.events[X][1].type:null,I=P==="tableHead"||P==="tableRow"?B:p;return I===B&&r.parser.lazy[r.now().line]?a(N):I(N)}function p(N){return t.enter("tableHead"),t.enter("tableRow"),m(N)}function m(N){return N===124||(c=!0,s+=1),y(N)}function y(N){return N===null?a(N):_e(N)?s>1?(s=0,r.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(N),t.exit("lineEnding"),x):a(N):Ye(N)?Ke(t,y,"whitespace")(N):(s+=1,c&&(c=!1,o+=1),N===124?(t.enter("tableCellDivider"),t.consume(N),t.exit("tableCellDivider"),c=!0,y):(t.enter("data"),g(N)))}function g(N){return N===null||N===124||st(N)?(t.exit("data"),y(N)):(t.consume(N),N===92?b:g)}function b(N){return N===92||N===124?(t.consume(N),g):g(N)}function x(N){return r.interrupt=!1,r.parser.lazy[r.now().line]?a(N):(t.enter("tableDelimiterRow"),c=!1,Ye(N)?Ke(t,E,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):E(N))}function E(N){return N===45||N===58?D(N):N===124?(c=!0,t.enter("tableCellDivider"),t.consume(N),t.exit("tableCellDivider"),j):K(N)}function j(N){return Ye(N)?Ke(t,D,"whitespace")(N):D(N)}function D(N){return N===58?(s+=1,c=!0,t.enter("tableDelimiterMarker"),t.consume(N),t.exit("tableDelimiterMarker"),T):N===45?(s+=1,T(N)):N===null||_e(N)?W(N):K(N)}function T(N){return N===45?(t.enter("tableDelimiterFiller"),A(N)):K(N)}function A(N){return N===45?(t.consume(N),A):N===58?(c=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(N),t.exit("tableDelimiterMarker"),L):(t.exit("tableDelimiterFiller"),L(N))}function L(N){return Ye(N)?Ke(t,W,"whitespace")(N):W(N)}function W(N){return N===124?E(N):N===null||_e(N)?!c||o!==s?K(N):(t.exit("tableDelimiterRow"),t.exit("tableHead"),l(N)):K(N)}function K(N){return a(N)}function B(N){return t.enter("tableRow"),_(N)}function _(N){return N===124?(t.enter("tableCellDivider"),t.consume(N),t.exit("tableCellDivider"),_):N===null||_e(N)?(t.exit("tableRow"),l(N)):Ye(N)?Ke(t,_,"whitespace")(N):(t.enter("data"),ae(N))}function ae(N){return N===null||N===124||st(N)?(t.exit("data"),_(N)):(t.consume(N),N===92?se:ae)}function se(N){return N===92||N===124?(t.consume(N),ae):ae(N)}}function wR(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 vR;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=xR(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({},Aa(l.events,a[0])),t.add(a[0],0,[["exit",s,l]]));const p=Aa(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=Aa(l.events,a[2]),y=Aa(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,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({},Aa(l.events,o)),t.add(o,0,[["exit",s,l]]),s=void 0),s}function gv(t,l,a,r,o){const s=[],c=Aa(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 Aa(t,l){const a=t[l],r=a[0]==="enter"?"start":"end";return a[1][r]}const kR={name:"tasklistCheck",tokenize:TR};function CR(){return{text:{91:kR}}}function TR(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 Ke(t,r,"whitespace");function r(o){return o===null?a(o):l(o)}}function jR(t){return B0([W_(),sR(),yR(t),SR(),CR()])}const _R={};function RR(t){const l=this,a=t||_R,r=l.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),c=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(jR(a)),s.push(Z_()),c.push(K_(a))}const sd=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"]),jb=new Set(["+","-","*","/","%","=","!","&","|","^","~","!","?",":",".",",",";","'",'"',".","(",")","[","]","#","@","\\",...sd]),DR={keywords:zR,onCommentStart:Db,onCommentEnd:YR},th=["identifier","keyword","string","class","property","entity","jsxliterals","sign","comment","break","space"],[Yf,NR,ai,OR,Gf,MR,LR,Tl,yv,cd,vv]=th.map((t,l)=>l);function To(t){return/^[^\S\r\n]+$/g.test(t)}function UR(t){return jb.has(t)}function BR(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function Go(t){return/^[\w_]+$/.test(t)||_b(t)}function HR(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 zb(t){return Rb(t)||_b(t)}function Ao(t){return zb(t[0])&&(t.length===1||Go(t.slice(1)))}function fd(t){return t==="`"}function dd(t){return t==='"'||t==="'"}function qR(t){return dd(t)||fd(t)}function Db(t,l){const a=t+l;return a==="/*"?2:a==="//"?1:0}function YR(t,l){return t+l==="*/"?2:l===`
|
|
217
|
-
`?1:0}function GR(t){return t[0]==="/"&&!Db(t[0],t[1])}function VR(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,x=0;const E=()=>y&&!b&&!g,j=()=>g&&!E(),D=()=>!g&&E()&&!b&&x>0;let T=null,A=!1,L=0,W=0;const K=()=>T!==null,B=()=>A,_=()=>W>L,ae=()=>W>0&&W===L,se=()=>K()||_();function N(P){const I=P===`
|
|
218
|
-
`;if(j()){if(K())return ai;const[,Q]=d;if(Ao(P)&&(Q==="<"||Q==="</"))return MR}if(D())return LR;if(K()||_())return ai;if(a.has(P))return d[1]==="."?Yf:NR;if(I)return cd;if(To(P))return vv;if(P.split("").every(UR))return Tl;if(HR(P))return j()?Yf:OR;if(Ao(P)){const Q=d[1]==="."&&Ao(p[1]);if(!se()&&!Q)return Yf;if(Q)return Gf}return ai}const X=(P,I)=>{if(I&&(s=I),s){c=P||N(s);const le=[c,s];c!==vv&&c!==cd&&(p=d,d=le),m.push(le)}s=""};for(let P=0;P<t.length;P++){const I=t[P],le=t[P-1],Q=t[P+1],H=le+I,ee=I+Q;if(dd(I)&&!D()&&!_()){X(),le!=="\\"&&(T&&I===T?T=null:T||(T=I)),X(ai,I);continue}if(!_()&&le!=="\\n"&&fd(I)){X(),X(ai,I),W++;continue}if(_()){if(le!=="\\n"&&fd(I)&&W>0){X(),W--,X(ai,I);continue}if(ee==="${"){L++,X(ai),X(Tl,ee),P++;continue}}if(ae()&&I==="}"){X(),L--,X(Tl,I);continue}if(E()&&I==="{"){X(),X(Tl,I),b=!0;continue}if(y){if(!g&&I==="<"){X(),Q==="/"?(g=2,s=ee,P++):(g=1,s=I),X(Tl);continue}if(g){if(I===">"&&!"/=".includes(le)){X(),g===1?(g=0,x++):(g=0,y=!1),X(Tl,I);continue}if(ee==="/>"||ee==="</"){s!=="<"&&s!=="/"&&X(),ee==="/>"?g=0:x--,x||(y=!1),s=ee,P++,X(Tl);continue}if(I==="<"){X(),s=I,X(Tl);continue}if(Q==="-"&&!se()&&!D()&&s){X(Gf,s+I+Q),P++;continue}if(Q==="="&&!se()&&!To(I)){To(s)&&X();const V=s+I;if(Ao(V)){X(Gf,V);continue}}}}!g&&(I==="<"&&zb(Q)||ee==="</")&&(g=Q==="/"?2:1,I==="<"&&(Q==="/"||Rb(Q))&&!se()&&!D()&&!B()&&(y=!0));const oe=qR(I),ve=_(),R=!y&&GR(ee),z=D();if(oe||ve||dd(T))s+=I;else if(R){X();const[V,C]=d;if(R&&V!==-1&&!(V===Tl&&C!==")"||V===yv)){s=I,X();continue}A=!0;const ce=P++,be=()=>P>=t.length,xe=()=>be()||t[P]===`
|
|
219
|
-
`;let Ne=!1;for(;!xe();P++)if(t[P]==="/"&&t[P-1]!=="\\"){for(Ne=!0;ce!==P&&/^[a-z]$/.test(t[P+1])&&!xe();)P++;break}A=!1,ce!==P&&Ne?(s=t.slice(ce,P+1),X(ai)):(s=I,X(),P=ce)}else if(r(I,Q)){X();const V=P,C=r(I,Q);if(C)for(;P<t.length&&o(t[P-1],t[P])!=C;P++);s=t.slice(V,P+1),X(yv)}else I===" "||I===`
|
|
220
|
-
`?I===" "&&(To(s)||!s||z)?(s+=I,Q==="<"&&X()):(X(),s=I,X()):b&&I==="}"?(X(),s=I,X(),b=!1):z&&!sd.has(I)||_()||(Go(I)===Go(s[s.length-1])||E())&&!jb.has(I)?s+=I:(H==="</"&&(s=H),X(),H!=="</"&&(s=I),ee==="</"||ee==="/>"?(s=ee,X(),P++):sd.has(I)&&X())}return X(),m}function FR(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=th[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!==cd){if(m.includes(`
|
|
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 IR=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} ${IR(d)}>${BR(c[0].value)}</${s}>`}).join("");return`<${a} class="${l.properties.className}">${r}</${a}>`}).join(`
|
|
223
|
-
`)}function Nb(t,l){const a=VR(t,l),r=FR(a);return XR(r)}new Map(th.map((t,l)=>[t,l]));function QR({className:t,children:l}){const a=String(l).replace(/\n$/,"");if(!t)return S.jsx("code",{children:l});const o=Nb(a);return S.jsx("code",{dangerouslySetInnerHTML:{__html:o}})}function hd({children:t,inline:l}){return S.jsx("div",{className:l?"markdown-inline":"markdown",children:S.jsx(yj,{remarkPlugins:[RR],components:{code:QR},children:t})})}const $R={plan:"[plan]",approve:"[approve]",task:"[task]",build:"[build]",fix:"[fix]",done:"[done]",error:"[error]",verbose:"[verbose]"};function ci({value:t}){return t?S.jsx("span",{className:"duration",children:t}):null}function ZR({entry:t,duration:l}){return S.jsxs("div",{className:"console-entry",children:[S.jsx("span",{className:`prefix ${t.level}`,children:$R[t.level]}),S.jsx("span",{children:t.message}),S.jsx(ci,{value:l})]})}function KR({entry:t}){return S.jsxs("div",{className:"console-entry user-message",children:[S.jsx("span",{className:"prefix",style:{color:"var(--orange)"},children:"[you]"}),S.jsx("span",{children:t.message})]})}const PR=300;function JR({entry:t,duration:l}){const a=t.agent||"agent";return t.text.length<=PR?S.jsxs("div",{className:"console-entry",children:[S.jsxs("span",{className:"prefix task",children:["[",a,"]"]}),S.jsx("span",{children:S.jsx(hd,{inline:!0,children:t.text})}),S.jsx(ci,{value:l})]}):S.jsxs("details",{className:"tool-inline",children:[S.jsxs("summary",{children:[S.jsx("span",{className:"tool-inline-name",children:a}),S.jsxs("span",{className:"tool-inline-summary",children:[t.text.slice(0,120),"..."]}),S.jsx(ci,{value:l})]}),S.jsx("div",{className:"tool-inline-body",children:S.jsx(hd,{children:t.text})})]})}function WR(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 ez(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 Vf({text:t,maxLen:l}){const a=t.length>l,r=a?t.slice(0,l):t,o=Nb(r)+(a?`
|
|
225
|
-
... (truncated)`:"");return S.jsx("pre",{dangerouslySetInnerHTML:{__html:o}})}function tz(t){return t.tool_name!=="Write"?!1:(t.tool_input.file_path||"").endsWith(".md")}function md({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 S.jsxs("details",{className:"tool-inline",children:[S.jsxs("summary",{children:[t.agent&&S.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),S.jsx("span",{className:"tool-inline-name",children:"$"}),S.jsx("span",{className:"tool-inline-command",children:o}),a?S.jsx("span",{className:"spinner-inline"}):S.jsx(ci,{value:l})]}),S.jsx("div",{className:"tool-inline-body",children:t.tool_response!==null&&S.jsx(Vf,{text:t.tool_response,maxLen:5e3})})]});if(tz(t)){const s=t.tool_input.content||"",c=t.tool_input.file_path||"unknown file";return S.jsxs("details",{className:"tool-inline",open:!0,children:[S.jsxs("summary",{children:[t.agent&&S.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),S.jsx("span",{className:"tool-inline-name",children:t.tool_name}),S.jsx("span",{className:"tool-inline-summary",children:c}),a?S.jsx("span",{className:"spinner-inline"}):S.jsx(ci,{value:l})]}),S.jsx("div",{className:"tool-inline-body",children:S.jsx(hd,{children:s})})]})}return S.jsxs("details",{className:"tool-inline",children:[S.jsxs("summary",{children:[t.agent&&S.jsxs("span",{className:"tool-inline-agent",children:["[",t.agent,"]"]}),S.jsx("span",{className:"tool-inline-name",children:t.tool_name}),S.jsx("span",{className:"tool-inline-summary",children:WR(t)}),a?S.jsx("span",{className:"spinner-inline"}):S.jsx(ci,{value:l})]}),S.jsxs("div",{className:"tool-inline-body",children:[S.jsx("div",{className:"section-label",children:"Input"}),S.jsx(Vf,{text:ez(t.tool_input),maxLen:5e3}),t.tool_response!==null&&S.jsxs(S.Fragment,{children:[S.jsx("div",{className:"section-label",children:"Output"}),S.jsx(Vf,{text:t.tool_response,maxLen:5e3})]})]})]})}function nz(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 lz(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 iz({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=nz(t);return S.jsxs("div",{className:"tool-group",children:[S.jsxs("div",{className:"tool-group-header",onClick:()=>a(d=>!d),children:[!o&&S.jsx("span",{className:"spinner-inline"}),S.jsx("span",{className:"tool-group-label",children:lz(t)}),S.jsx("span",{className:"tool-group-chevron",children:l?"▼":"▶"}),o&&S.jsx(ci,{value:c})]}),l&&S.jsx("div",{className:"tool-group-items",children:t.map(({entry:d,index:p,duration:m})=>d.kind==="tool_use"?S.jsx(md,{entry:d,duration:m},d.tool_use_id||`gi-${p}`):null)}),!l&&s&&S.jsx("div",{className:"tool-group-tail",children:s.entry.kind==="tool_use"?S.jsx(md,{entry:s.entry,duration:s.duration}):null})]})}function az({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,x]=k.useState(""),[E,j]=k.useState(""),[D,T]=k.useState(""),[A,L]=k.useState(""),[W,K]=k.useState(!1),[B,_]=k.useState(!1),[ae,se]=k.useState(!1),[N,X]=k.useState(null),P=l.ghAccounts.length>0,[I,le]=k.useState(l.ghAccounts[0]?.login??""),[Q,H]=k.useState(l.projectName),[ee,oe]=k.useState("private"),[ve,R]=k.useState(!1);async function z(){_(!0),X(null);try{const pe=await Qw();m(pe.databaseUrl),g(pe.electricUrl),x(pe.sourceId),j(pe.secret),T(pe.claimId),L(pe.claimUrl),se(!0)}catch(pe){X(pe instanceof Error?pe.message:"Provisioning failed")}finally{_(!1)}}async function V(){K(!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=D,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")),ve&&I&&Q.trim()&&(Re.repoAccount=I,Re.repoName=Q,Re.repoVisibility=ee,pe.push(`${I}/${Q} (${ee})`)),Re._summary=pe.join(`
|
|
226
|
-
`),await Zf(t,"infra_config",Re),a(pe.join(`
|
|
227
|
-
`))}catch{K(!1)}}const C=W||!!r,ce=p.trim()&&b.trim()&&E.trim(),be=ae&&p.trim()&&b.trim()&&E.trim(),xe=!ve||I&&Q.trim(),Ne={claim:"Provisioned (Cloud)",local:"Local (Docker)",cloud:"Electric Cloud (BYO)"};if(r){const pe=o??{};return o||(pe.Infrastructure=Ne[c],(c==="cloud"||c==="claim")&&(p&&(pe["Connection string"]=p),b&&(pe["Source ID"]=b)),c==="claim"&&A&&(pe["Claim link"]=A),ve&&I&&Q.trim()&&(pe.Repository=`${I}/${Q}`,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:W,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:W,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:W,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:ae?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]})]}),A&&S.jsxs("p",{style:{margin:"8px 0 0"},children:["Claim into your account:"," ",S.jsx("a",{href:A,target:"_blank",rel:"noopener noreferrer",style:{wordBreak:"break-all"},children:A})]})]}):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:z,disabled:B||C,style:{marginBottom:8},children:B?"Provisioning...":"Provision Resources"}),B&&S.jsx("p",{style:{fontSize:"0.85em",opacity:.7},children:"This may take 30-60 seconds..."}),N&&S.jsx("p",{style:{color:"var(--color-error, #e55)",fontSize:"0.85em"},children:N})]})}),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:C,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:C,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:C,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=>j(pe.target.value),disabled:C,placeholder:"Your Electric Cloud secret"})]})]}),P&&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 ${ve?"active":""}`,onClick:()=>R(!ve),disabled:C,children:S.jsx("span",{className:"gate-option-title",children:"Create a GitHub repo for this project"})})}),ve&&S.jsxs(S.Fragment,{children:[S.jsxs("div",{className:"question",children:[S.jsx("label",{children:"Account"}),l.ghAccounts.length>1?S.jsx("select",{value:I,onChange:pe=>le(pe.target.value),disabled:C,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:Q,onChange:pe=>H(pe.target.value),disabled:C,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:()=>oe("private"),disabled:C,children:S.jsx("span",{className:"gate-option-title",children:"Private"})}),S.jsx("button",{type:"button",className:`gate-option ${ee==="public"?"active":""}`,onClick:()=>oe("public"),disabled:C,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:V,disabled:C||c==="cloud"&&!ce||c==="claim"&&!be||!xe,children:W?"Configuring...":"Start"})})]})}function rz({sessionId:t,event:l,onResolved:a,resolved:r,resolvedSummary:o}){const[s,c]=k.useState(""),[d,p]=k.useState(null),[m,y]=k.useState(!1),g=m||!!r,b=d||o||"";async function x(A){p(A),y(!0);try{await Zf(t,"ask_user_question",{toolUseId:l.tool_use_id,answer:A,_summary:A}),a(A)}catch{p(null),y(!1)}}async function E(){if(!s.trim())return;y(!0);const A=s.trim().slice(0,80);try{await Zf(t,"ask_user_question",{toolUseId:l.tool_use_id,answer:s.trim(),_summary:A}),a(A)}catch{y(!1)}}const[j,D]=k.useState(!1),T=l.options&&l.options.length>0;return S.jsxs("div",{className:"gate-prompt",children:[S.jsx("h3",{children:"Question"}),S.jsx("p",{className:"gate-summary",children:l.question}),T&&S.jsxs("div",{className:"gate-option-group-vert",children:[l.options.map(A=>{const L=r&&A.label===b;return S.jsxs("button",{type:"button",className:`gate-option ${L?"selected":""}`,onClick:()=>x(A.label),disabled:g,children:[S.jsx("span",{className:"gate-option-title",children:A.label}),A.description&&S.jsx("span",{className:"gate-option-desc",children:A.description})]},A.label)}),!r&&!j&&S.jsx("button",{type:"button",className:"gate-option gate-option-other",onClick:()=>D(!0),disabled:g,children:S.jsx("span",{className:"gate-option-title",children:"Other..."})})]}),r&&!T&&S.jsx("div",{className:"gate-answer-summary",children:b}),!r&&(j||!T)&&S.jsx("div",{className:"question",children:S.jsx("textarea",{value:s,onChange:A=>c(A.target.value),disabled:g,rows:3,placeholder:"Type your answer..."})}),!r&&(j||!T)&&S.jsx("div",{className:"gate-actions",children:S.jsx("button",{className:"gate-btn gate-btn-primary",onClick:E,disabled:g||!s.trim(),children:m?"Submitting...":"Submit"})})]})}function uz(t){switch(t){case"infra_config_prompt":return"Project configured";case"ask_user_question":return"Question answered";default:return"Decision made"}}function oz({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(az,{sessionId:t,event:l.event,onResolved:s,resolved:c,resolvedDetails:l.resolvedDetails});break;case"ask_user_question":p=S.jsx(rz,{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:uz(l.event.type)}),S.jsx(ci,{value:o})]}),p]}):p}const bv={pending:"○",in_progress:"◉",completed:"✓"};function sz(t){switch(t){case"completed":return"todo-status-done";case"in_progress":return"todo-status-progress";default:return"todo-status-pending"}}function cz({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 ${sz(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 fz=3;function xv(t){return t.kind==="tool_use"}function dz(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>=fz)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 hz(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 mz({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]),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 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 T=s.current;if(!T)return;const L=T.scrollHeight-T.scrollTop-T.clientHeight<80;p(L)},[]);k.useEffect(()=>{d&&c.current?.scrollIntoView({behavior:"smooth"})},[m,d]);const b=[];let x=null;for(const T of l){const A=hz(T);if(T.kind==="user_prompt"||!A)b.push(null);else if(x){const L=new Date(A).getTime()-new Date(x).getTime();b.push(L>=0?Ob(L):null)}else b.push(null);A&&(x=A)}const E=k.useMemo(()=>dz(l,b),[l,b]);let j=!1,D="";if(a&&!r&&l.length>0){const T=l[l.length-1],A=T.kind==="tool_use"&&T.tool_response===null,L=T.kind==="gate"&&!T.resolved,W=T.kind==="assistant_message";!A&&!L&&!W&&(j=!0,D=x||new Date().toISOString())}return S.jsxs("div",{className:"console",ref:s,onScroll:g,children:[E.map(T=>{if(T.type==="group")return S.jsx(iz,{items:T.items},`group-${T.items[0].index}`);const{entry:A,index:L,duration:W}=T;switch(A.kind){case"log":return S.jsx(ZR,{entry:A,duration:W},`log-${L}`);case"user_prompt":return S.jsx(KR,{entry:A},`user-${L}`);case"tool_use":return S.jsx(md,{entry:A,duration:W},A.tool_use_id||`tool-${L}`);case"assistant_message":return S.jsx(JR,{entry:A,duration:W},`text-${L}`);case"todo_widget":return S.jsx(cz,{entry:A},`todo-${L}`);case"gate":return S.jsx(oz,{sessionId:t,entry:A,entryIndex:L,onResolved:o,duration:W},`gate-${L}`);default:return null}}),j&&S.jsx(mz,{sinceTs:D}),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 Lb(t){const[l,a]=k.useState([]),[r,o]=k.useState(!1),[s,c]=k.useState(!1),[d,p]=k.useState(!1),m=k.useRef(!1),y=k.useRef(!1),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 D=[...j];for(let T=D.length-1;T>=0;T--){const A=D[T];if(A.kind==="tool_use"&&A.tool_use_id===E.tool_use_id){D[T]={...A,tool_response:E.tool_response,agent:A.agent||E.agent};break}}return D}case"post_tool_use_failure":{const D=[...j];for(let T=D.length-1;T>=0;T--){const A=D[T];if(A.kind==="tool_use"&&A.tool_use_id===E.tool_use_id){D[T]={...A,tool_response:`Error: ${E.error}`,agent:A.agent||E.agent};break}}return D}case"assistant_message":return[...j,{kind:"assistant_message",text:E.text,agent:E.agent,ts:E.ts}];case"todo_write":{const D=j.findIndex(A=>A.kind==="todo_widget"),T={kind:"todo_widget",tool_use_id:E.tool_use_id,todos:E.todos,ts:E.ts};if(D>=0){const A=[...j];return A[D]=T,A}return[...j,T]}case"ask_user_question":case"infra_config_prompt":return[...j,{kind:"gate",event:E,resolved:!1,ts:E.ts}];case"gate_resolved":{const D=[...j];let T=!1;for(let A=D.length-1;A>=0;A--){const L=D[A];if(L.kind==="gate"&&!L.resolved){D[A]={...L,resolved:!0,resolvedSummary:E.summary||L.resolvedSummary,resolvedDetails:E.details},T=!0;break}}if(!T&&E.details)for(let A=D.length-1;A>=0;A--){const L=D[A];if(L.kind==="gate"&&L.resolved&&!L.resolvedDetails){D[A]={...L,resolvedDetails:E.details};break}}return D}case"session_end":case"session_start":case"app_ready":return j;default:return j}}),E.type==="app_ready"&&p(!0),E.type==="session_end"&&(c(!0),y.current&&!m.current&&(m.current=!0,E.success?Ay.success("Session completed successfully"):Ay.error("Session completed with errors")))},[]);k.useEffect(()=>{if(!t)return;a([]),o(!1),c(!1),p(!1),m.current=!1,y.current=!1,g.current="-1";let E=!1,j=null,D=0;const T=10;function A(){if(E)return;if(D>=T){console.warn(`[sse] Giving up on session ${t} after ${T} retries`),o(!1);return}const L=a0(t),W=new URLSearchParams;L&&W.set("token",L),g.current!=="-1"&&W.set("offset",g.current);const K=W.toString(),B=`/api/sessions/${t}/events${K?`?${K}`:""}`;j=new EventSource(B),j.onopen=()=>{E||(D=0,o(!0),setTimeout(()=>{y.current=!0},500))},j.onmessage=_=>{if(!E){_.lastEventId&&(g.current=_.lastEventId);try{const ae=JSON.parse(_.data);b(ae)}catch{}}},j.onerror=()=>{if(E)return;j?.close(),D++;const _=Math.min(1e3*2**(D-1),3e4);setTimeout(A,_)}}return A(),()=>{E=!0,j&&(j.close(),j=null)}},[t,b]);const x=k.useCallback((E,j)=>{a(D=>{const T=[...D],A=T[E];return A?.kind==="gate"&&(T[E]={...A,resolved:!0,resolvedSummary:j}),T})},[]);return{entries:l,isLive:r,isComplete:s,appReady:d,markGateResolved:x}}function pz(t){const l=[];for(const a of t)switch(a.kind){case"user_prompt":l.push(`## User
|
|
228
|
-
|
|
229
|
-
${a.message}
|
|
230
|
-
`);break;case"assistant_message":l.push(`## Assistant
|
|
231
|
-
|
|
232
|
-
${a.text}
|
|
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 gz(){const{id:t}=Zv(),l=tl(),a=Na(),{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 z=()=>g(!1);return document.addEventListener("click",z),()=>document.removeEventListener("click",z)},[y]);const[b,x]=k.useState(t==="new"),[E,j]=k.useState(t==="new"?null:t??null),D=k.useRef(!1);k.useEffect(()=>{t&&t!=="new"&&(j(t),x(!1),D.current=!1)},[t]),k.useEffect(()=>{if(t!=="new"||D.current)return;const z=l.state;if(!z?.description){a("/",{replace:!0});return}D.current=!0,x(!0),Gw(z.description).then(({sessionId:V,session:C})=>{Mw(C),m(),j(V),x(!1),a(`/session/${V}`,{replace:!0})}).catch(V=>{console.error("Failed to create session:",V),a("/",{replace:!0})})},[t,l.state,a,m]);const T=E,{entries:A,isLive:L,isComplete:W,appReady:K,markGateResolved:B}=Lb(T),[_,ae]=k.useState(()=>T?ky(T)??null:null),[se,N]=k.useState("hidden"),[X,P]=k.useState(()=>_?.appPort),[I,le]=k.useState(()=>_?.previewUrl);k.useEffect(()=>{if(T){const z=ky(T);ae(z??null),z?.appPort&&P(z.appPort),z?.previewUrl&&le(z.previewUrl)}},[T]),k.useEffect(()=>{T&&W&&(wf(T,{status:"complete"}),m())},[T,W,m]);const Q=W||K||_?.status==="complete"||_?.status==="error",H=se==="running"&&!!I;k.useEffect(()=>{if(!T||!Q||H){Q||N("hidden");return}const z=async()=>{try{const C=await Xw(T);N(C.running?"running":"stopped"),C.port&&P(C.port),C.previewUrl&&le(C.previewUrl),(C.port||C.previewUrl)&&wf(T,{...C.port?{appPort:C.port}:{},...C.previewUrl?{previewUrl:C.previewUrl}:{}})}catch{N("stopped")}};z();const V=setInterval(z,1e4);return()=>clearInterval(V)},[T,Q,H]);const ee=k.useCallback(async z=>{if(T)try{await Vw(T,z)}catch(V){console.error("Failed to send iteration:",V)}},[T]),oe=k.useCallback(async()=>{if(T)try{await Fw(T),wf(T,{status:"cancelled"}),ae(z=>z?{...z,status:"cancelled"}:null),m()}catch(z){console.error("Failed to cancel:",z)}},[T,m]),ve=k.useCallback(()=>{const z=pz(A);navigator.clipboard.writeText(z)},[A]);if(!t)return null;const R=_?.status==="running"&&!W;return S.jsxs(S.Fragment,{children:[o&&S.jsx(w0,{authSource:c,hasGhToken:d??!1,onKeySaved:p,onClose:()=>s(!1),onCopyLog:T?ve: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..."}),R&&S.jsx("span",{className:"session-header-status",style:{color:"var(--green)"},children:"Live"}),W&&S.jsx("span",{className:"session-header-status",style:{color:"var(--text-subtle)"},children:"Complete"}),!b&&!L&&!W&&S.jsx("span",{className:"session-header-status",style:{color:"var(--yellow)"},children:"Connecting..."}),S.jsx("span",{className:"session-header-actions-group",children:X&&(K||se==="running"||Q)&&S.jsx("a",{href:I??`http://localhost:${X}`,target:"_blank",rel:"noopener noreferrer",className:"session-header-action primary",children:"Preview"})}),S.jsx("button",{type:"button",className:"session-header-overflow",onClick:z=>{z.stopPropagation(),g(V=>!V)},"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:[X&&(K||se==="running"||Q)&&S.jsx("a",{href:I??`http://localhost:${X}`,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(z=>!z)},children:"Settings"})]})]}),S.jsxs("div",{className:"session-content",children:[(I||X)&&Q&&S.jsx("div",{className:"mobile-preview-bar",children:S.jsxs("a",{href:I??`http://localhost:${X}`,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..."})]}):!L&&!W?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(Mb,{sessionId:T??"",entries:A,isLive:L,isComplete:W,onGateResolved:B}),S.jsx(E0,{onSubmit:ee,placeholder:R?"Message...":"Ask anything...",disabled:b,isRunning:R,onCancel:oe})]})]})}function yz({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 jo={name:"",code:"",participants:[],sessionIds:[],sessionNames:new Map,revoked:!1};function vz(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 bz(t){const[l,a]=k.useState(jo),[r,o]=k.useState(!1),s=k.useRef(jo),c=k.useRef("-1"),d=k.useCallback(p=>{const m=vz(s.current,p);s.current=m,a(m)},[]);return k.useEffect(()=>{if(!t)return;a(jo),s.current=jo,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=s0(t),E=new URLSearchParams;x&&E.set("token",x),c.current!=="-1"&&E.set("offset",c.current);const j=E.toString(),D=`/api/shared-sessions/${t}/events${j?`?${j}`:""}`;m=new EventSource(D),m.onopen=()=>{p||(y=0,o(!0))},m.onmessage=T=>{if(!p){T.lastEventId&&(c.current=T.lastEventId);try{const A=JSON.parse(T.data);d(A)}catch{}}},m.onerror=()=>{if(p)return;m?.close(),y++;const T=Math.min(1e3*2**(y-1),3e4);setTimeout(b,T)}}return b(),()=>{p=!0,m&&(m.close(),m=null)}},[t,d]),{...l,isLive:r}}function xz(){const{code:t}=Zv(),l=Na(),{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 K=!1;async function B(){try{const _=await Ww(t);if(K)return;if(_.revoked){d("This invite code has been revoked."),m(!1);return}s(_.id),await ek(_.id),m(!1)}catch(_){if(K)return;d(_ instanceof Error?_.message:"Failed to join shared session"),m(!1)}}return B(),()=>{K=!0}},[t]);const E=bz(o);k.useEffect(()=>{t&&E.name&&o&&(ik({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,x(new Set([E.sessionIds[0]])))},[E.sessionIds]);const D=k.useCallback(async()=>{if(o){try{await tk(o)}catch{}t&&(d0(t),r()),l("/")}},[o,t,l,r]),T=k.useCallback(async K=>{if(!o)return;const B=a.find(_=>_.id===K);try{await nk(o,K,B?.projectName||"",B?.description||""),g(!1),x(_=>new Set([..._,K]))}catch(_){console.error("Failed to link session:",_)}},[o,a]),A=k.useCallback(async K=>{if(o)try{await lk(o,K),x(B=>{const _=new Set(B);return _.delete(K),_})}catch(B){console.error("Failed to unlink session:",B)}},[o]),L=k.useCallback(K=>{x(B=>{const _=new Set(B);return _.has(K)?_.delete(K):_.add(K),_})},[]);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 W=a.filter(K=>!E.sessionIds.includes(K.id));return S.jsxs(S.Fragment,{children:[S.jsx(yz,{name:E.name,code:E.code,participants:E.participants,revoked:E.revoked,isLive:E.isLive,onLeave:D,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(K=>S.jsx(Ez,{sessionId:K,sessionName:E.sessionNames.get(K),expanded:b.has(K),onToggle:()=>L(K),onUnlink:A},K))})]}),y&&S.jsx("div",{className:"modal-overlay",onClick:()=>g(!1),children:S.jsxs("div",{className:"modal-card",onClick:K=>K.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."}),W.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:W.map(K=>S.jsx("button",{type:"button",className:"link-session-item",onClick:()=>T(K.id),children:K.projectName||K.description.slice(0,60)||K.id.slice(0,8)},K.id))}),S.jsx("div",{className:"modal-actions",children:S.jsx("button",{type:"button",className:"modal-btn",onClick:()=>g(!1),children:"Cancel"})})]})})]})}function Sz(){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 Ez({sessionId:t,sessionName:l,expanded:a,onToggle:r,onUnlink:o}){const{entries:s,isLive:c,isComplete:d,markGateResolved:p}=Lb(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(Sz,{}),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(Mb,{sessionId:t,entries:s,isLive:c,isComplete:d,onGateResolved:p})})]})}const wz=hw([{element:S.jsx(lC,{}),children:[{path:"/",element:S.jsx(rC,{})},{path:"/session/:id",element:S.jsx(gz,{})},{path:"/shared/:code",element:S.jsx(xz,{})}]}]),Sv=document.getElementById("root");Sv&&eS.createRoot(Sv).render(S.jsx(k.StrictMode,{children:S.jsx(Cw,{router:wz})}));
|