@unity-china/codely-cli 1.0.0-rc.1 → 1.0.0-rc.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,42 +1,42 @@
1
- var bx=Object.create;var Ys=Object.defineProperty;var xx=Object.getOwnPropertyDescriptor;var kx=Object.getOwnPropertyNames;var Sx=Object.getPrototypeOf,Tx=Object.prototype.hasOwnProperty;var Ve=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),dp=(t,e)=>{for(var n in e)Ys(t,n,{get:e[n],enumerable:!0})},wx=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of kx(e))!Tx.call(t,i)&&i!==n&&Ys(t,i,{get:()=>e[i],enumerable:!(l=xx(e,i))||l.enumerable});return t};var Q=(t,e,n)=>(n=t!=null?bx(Sx(t)):{},wx(e||!t||!t.__esModule?Ys(n,"default",{value:t,enumerable:!0}):n,t));var wp=Ve(dt=>{"use strict";var Fs=Symbol.for("react.transitional.element"),Ex=Symbol.for("react.portal"),Cx=Symbol.for("react.fragment"),Nx=Symbol.for("react.strict_mode"),Ax=Symbol.for("react.profiler"),Rx=Symbol.for("react.consumer"),Mx=Symbol.for("react.context"),Dx=Symbol.for("react.forward_ref"),_x=Symbol.for("react.suspense"),Ox=Symbol.for("react.memo"),vp=Symbol.for("react.lazy"),mp=Symbol.iterator;function zx(t){return t===null||typeof t!="object"?null:(t=mp&&t[mp]||t["@@iterator"],typeof t=="function"?t:null)}var bp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xp=Object.assign,kp={};function Yi(t,e,n){this.props=t,this.context=e,this.refs=kp,this.updater=n||bp}Yi.prototype.isReactComponent={};Yi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Yi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Sp(){}Sp.prototype=Yi.prototype;function Qs(t,e,n){this.props=t,this.context=e,this.refs=kp,this.updater=n||bp}var Gs=Qs.prototype=new Sp;Gs.constructor=Qs;xp(Gs,Yi.prototype);Gs.isPureReactComponent=!0;var pp=Array.isArray,Gt={H:null,A:null,T:null,S:null,V:null},Tp=Object.prototype.hasOwnProperty;function Xs(t,e,n,l,i,r){return n=r.ref,{$$typeof:Fs,type:t,key:e,ref:n!==void 0?n:null,props:r}}function Lx(t,e){return Xs(t.type,e,void 0,void 0,void 0,t.props)}function Ps(t){return typeof t=="object"&&t!==null&&t.$$typeof===Fs}function Ux(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var hp=/\/+/g;function Vs(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Ux(""+t.key):e.toString(36)}function gp(){}function Bx(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(gp,gp):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function ji(t,e,n,l,i){var r=typeof t;(r==="undefined"||r==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(r){case"bigint":case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case Fs:case Ex:a=!0;break;case vp:return a=t._init,ji(a(t._payload),e,n,l,i)}}if(a)return i=i(t),a=l===""?"."+Vs(t,0):l,pp(i)?(n="",a!=null&&(n=a.replace(hp,"$&/")+"/"),ji(i,e,n,"",function(s){return s})):i!=null&&(Ps(i)&&(i=Lx(i,n+(i.key==null||t&&t.key===i.key?"":(""+i.key).replace(hp,"$&/")+"/")+a)),e.push(i)),1;a=0;var o=l===""?".":l+":";if(pp(t))for(var u=0;u<t.length;u++)l=t[u],r=o+Vs(l,u),a+=ji(l,e,n,r,i);else if(u=zx(t),typeof u=="function")for(t=u.call(t),u=0;!(l=t.next()).done;)l=l.value,r=o+Vs(l,u++),a+=ji(l,e,n,r,i);else if(r==="object"){if(typeof t.then=="function")return ji(Bx(t),e,n,l,i);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return a}function wo(t,e,n){if(t==null)return t;var l=[],i=0;return ji(t,l,"","",function(r){return e.call(n,r,i++)}),l}function Hx(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var yp=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function qx(){}dt.Children={map:wo,forEach:function(t,e,n){wo(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return wo(t,function(){e++}),e},toArray:function(t){return wo(t,function(e){return e})||[]},only:function(t){if(!Ps(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};dt.Component=Yi;dt.Fragment=Cx;dt.Profiler=Ax;dt.PureComponent=Qs;dt.StrictMode=Nx;dt.Suspense=_x;dt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gt;dt.__COMPILER_RUNTIME={__proto__:null,c:function(t){return Gt.H.useMemoCache(t)}};dt.cache=function(t){return function(){return t.apply(null,arguments)}};dt.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var l=xp({},t.props),i=t.key,r=void 0;if(e!=null)for(a in e.ref!==void 0&&(r=void 0),e.key!==void 0&&(i=""+e.key),e)!Tp.call(e,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&e.ref===void 0||(l[a]=e[a]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var o=Array(a),u=0;u<a;u++)o[u]=arguments[u+2];l.children=o}return Xs(t.type,i,void 0,void 0,r,l)};dt.createContext=function(t){return t={$$typeof:Mx,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Rx,_context:t},t};dt.createElement=function(t,e,n){var l,i={},r=null;if(e!=null)for(l in e.key!==void 0&&(r=""+e.key),e)Tp.call(e,l)&&l!=="key"&&l!=="__self"&&l!=="__source"&&(i[l]=e[l]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),u=0;u<a;u++)o[u]=arguments[u+2];i.children=o}if(t&&t.defaultProps)for(l in a=t.defaultProps,a)i[l]===void 0&&(i[l]=a[l]);return Xs(t,r,void 0,void 0,null,i)};dt.createRef=function(){return{current:null}};dt.forwardRef=function(t){return{$$typeof:Dx,render:t}};dt.isValidElement=Ps;dt.lazy=function(t){return{$$typeof:vp,_payload:{_status:-1,_result:t},_init:Hx}};dt.memo=function(t,e){return{$$typeof:Ox,type:t,compare:e===void 0?null:e}};dt.startTransition=function(t){var e=Gt.T,n={};Gt.T=n;try{var l=t(),i=Gt.S;i!==null&&i(n,l),typeof l=="object"&&l!==null&&typeof l.then=="function"&&l.then(qx,yp)}catch(r){yp(r)}finally{Gt.T=e}};dt.unstable_useCacheRefresh=function(){return Gt.H.useCacheRefresh()};dt.use=function(t){return Gt.H.use(t)};dt.useActionState=function(t,e,n){return Gt.H.useActionState(t,e,n)};dt.useCallback=function(t,e){return Gt.H.useCallback(t,e)};dt.useContext=function(t){return Gt.H.useContext(t)};dt.useDebugValue=function(){};dt.useDeferredValue=function(t,e){return Gt.H.useDeferredValue(t,e)};dt.useEffect=function(t,e,n){var l=Gt.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return l.useEffect(t,e)};dt.useId=function(){return Gt.H.useId()};dt.useImperativeHandle=function(t,e,n){return Gt.H.useImperativeHandle(t,e,n)};dt.useInsertionEffect=function(t,e){return Gt.H.useInsertionEffect(t,e)};dt.useLayoutEffect=function(t,e){return Gt.H.useLayoutEffect(t,e)};dt.useMemo=function(t,e){return Gt.H.useMemo(t,e)};dt.useOptimistic=function(t,e){return Gt.H.useOptimistic(t,e)};dt.useReducer=function(t,e,n){return Gt.H.useReducer(t,e,n)};dt.useRef=function(t){return Gt.H.useRef(t)};dt.useState=function(t){return Gt.H.useState(t)};dt.useSyncExternalStore=function(t,e,n){return Gt.H.useSyncExternalStore(t,e,n)};dt.useTransition=function(){return Gt.H.useTransition()};dt.version="19.1.1"});var ie=Ve((OA,Ep)=>{"use strict";Ep.exports=wp()});var Lp=Ve(Xt=>{"use strict";function $s(t,e){var n=t.length;t.push(e);t:for(;0<n;){var l=n-1>>>1,i=t[l];if(0<Eo(i,e))t[l]=e,t[n]=i,n=l;else break t}}function Hn(t){return t.length===0?null:t[0]}function No(t){if(t.length===0)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var l=0,i=t.length,r=i>>>1;l<r;){var a=2*(l+1)-1,o=t[a],u=a+1,s=t[u];if(0>Eo(o,n))u<i&&0>Eo(s,o)?(t[l]=s,t[u]=n,l=u):(t[l]=o,t[a]=n,l=a);else if(u<i&&0>Eo(s,n))t[l]=s,t[u]=n,l=u;else break t}}return e}function Eo(t,e){var n=t.sortIndex-e.sortIndex;return n!==0?n:t.id-e.id}Xt.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Cp=performance,Xt.unstable_now=function(){return Cp.now()}):(Zs=Date,Np=Zs.now(),Xt.unstable_now=function(){return Zs.now()-Np});var Cp,Zs,Np,$n=[],vl=[],Ix=1,bn=null,Oe=3,Ws=!1,Kr=!1,Jr=!1,tc=!1,Mp=typeof setTimeout=="function"?setTimeout:null,Dp=typeof clearTimeout=="function"?clearTimeout:null,Ap=typeof setImmediate<"u"?setImmediate:null;function Co(t){for(var e=Hn(vl);e!==null;){if(e.callback===null)No(vl);else if(e.startTime<=t)No(vl),e.sortIndex=e.expirationTime,$s($n,e);else break;e=Hn(vl)}}function ec(t){if(Jr=!1,Co(t),!Kr)if(Hn($n)!==null)Kr=!0,Fi||(Fi=!0,Vi());else{var e=Hn(vl);e!==null&&nc(ec,e.startTime-t)}}var Fi=!1,$r=-1,_p=5,Op=-1;function zp(){return tc?!0:!(Xt.unstable_now()-Op<_p)}function Ks(){if(tc=!1,Fi){var t=Xt.unstable_now();Op=t;var e=!0;try{t:{Kr=!1,Jr&&(Jr=!1,Dp($r),$r=-1),Ws=!0;var n=Oe;try{e:{for(Co(t),bn=Hn($n);bn!==null&&!(bn.expirationTime>t&&zp());){var l=bn.callback;if(typeof l=="function"){bn.callback=null,Oe=bn.priorityLevel;var i=l(bn.expirationTime<=t);if(t=Xt.unstable_now(),typeof i=="function"){bn.callback=i,Co(t),e=!0;break e}bn===Hn($n)&&No($n),Co(t)}else No($n);bn=Hn($n)}if(bn!==null)e=!0;else{var r=Hn(vl);r!==null&&nc(ec,r.startTime-t),e=!1}}break t}finally{bn=null,Oe=n,Ws=!1}e=void 0}}finally{e?Vi():Fi=!1}}}var Vi;typeof Ap=="function"?Vi=function(){Ap(Ks)}:typeof MessageChannel<"u"?(Js=new MessageChannel,Rp=Js.port2,Js.port1.onmessage=Ks,Vi=function(){Rp.postMessage(null)}):Vi=function(){Mp(Ks,0)};var Js,Rp;function nc(t,e){$r=Mp(function(){t(Xt.unstable_now())},e)}Xt.unstable_IdlePriority=5;Xt.unstable_ImmediatePriority=1;Xt.unstable_LowPriority=4;Xt.unstable_NormalPriority=3;Xt.unstable_Profiling=null;Xt.unstable_UserBlockingPriority=2;Xt.unstable_cancelCallback=function(t){t.callback=null};Xt.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):_p=0<t?Math.floor(1e3/t):5};Xt.unstable_getCurrentPriorityLevel=function(){return Oe};Xt.unstable_next=function(t){switch(Oe){case 1:case 2:case 3:var e=3;break;default:e=Oe}var n=Oe;Oe=e;try{return t()}finally{Oe=n}};Xt.unstable_requestPaint=function(){tc=!0};Xt.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=Oe;Oe=t;try{return e()}finally{Oe=n}};Xt.unstable_scheduleCallback=function(t,e,n){var l=Xt.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?l+n:l):n=l,t){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,t={id:Ix++,callback:e,priorityLevel:t,startTime:n,expirationTime:i,sortIndex:-1},n>l?(t.sortIndex=n,$s(vl,t),Hn($n)===null&&t===Hn(vl)&&(Jr?(Dp($r),$r=-1):Jr=!0,nc(ec,n-l))):(t.sortIndex=i,$s($n,t),Kr||Ws||(Kr=!0,Fi||(Fi=!0,Vi()))),t};Xt.unstable_shouldYield=zp;Xt.unstable_wrapCallback=function(t){var e=Oe;return function(){var n=Oe;Oe=e;try{return t.apply(this,arguments)}finally{Oe=n}}}});var Bp=Ve((LA,Up)=>{"use strict";Up.exports=Lp()});var qp=Ve(Qe=>{"use strict";var jx=ie();function Hp(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function bl(){}var Fe={d:{f:bl,r:function(){throw Error(Hp(522))},D:bl,C:bl,L:bl,m:bl,X:bl,S:bl,M:bl},p:0,findDOMNode:null},Yx=Symbol.for("react.portal");function Vx(t,e,n){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Yx,key:l==null?null:""+l,children:t,containerInfo:e,implementation:n}}var Wr=jx.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Ao(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}Qe.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Fe;Qe.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(Hp(299));return Vx(t,e,null,n)};Qe.flushSync=function(t){var e=Wr.T,n=Fe.p;try{if(Wr.T=null,Fe.p=2,t)return t()}finally{Wr.T=e,Fe.p=n,Fe.d.f()}};Qe.preconnect=function(t,e){typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,Fe.d.C(t,e))};Qe.prefetchDNS=function(t){typeof t=="string"&&Fe.d.D(t)};Qe.preinit=function(t,e){if(typeof t=="string"&&e&&typeof e.as=="string"){var n=e.as,l=Ao(n,e.crossOrigin),i=typeof e.integrity=="string"?e.integrity:void 0,r=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;n==="style"?Fe.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:l,integrity:i,fetchPriority:r}):n==="script"&&Fe.d.X(t,{crossOrigin:l,integrity:i,fetchPriority:r,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};Qe.preinitModule=function(t,e){if(typeof t=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var n=Ao(e.as,e.crossOrigin);Fe.d.M(t,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&Fe.d.M(t)};Qe.preload=function(t,e){if(typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var n=e.as,l=Ao(n,e.crossOrigin);Fe.d.L(t,n,{crossOrigin:l,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};Qe.preloadModule=function(t,e){if(typeof t=="string")if(e){var n=Ao(e.as,e.crossOrigin);Fe.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else Fe.d.m(t)};Qe.requestFormReset=function(t){Fe.d.r(t)};Qe.unstable_batchedUpdates=function(t,e){return t(e)};Qe.useFormState=function(t,e,n){return Wr.H.useFormState(t,e,n)};Qe.useFormStatus=function(){return Wr.H.useHostTransitionStatus()};Qe.version="19.1.1"});var lc=Ve((BA,jp)=>{"use strict";function Ip(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ip)}catch(t){console.error(t)}}Ip(),jp.exports=qp()});var Vv=Ve(Ku=>{"use strict";var ye=Bp(),sg=ie(),Fx=lc();function O(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function cg(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Ia(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function fg(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Yp(t){if(Ia(t)!==t)throw Error(O(188))}function Qx(t){var e=t.alternate;if(!e){if(e=Ia(t),e===null)throw Error(O(188));return e!==t?null:t}for(var n=t,l=e;;){var i=n.return;if(i===null)break;var r=i.alternate;if(r===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===n)return Yp(i),t;if(r===l)return Yp(i),e;r=r.sibling}throw Error(O(188))}if(n.return!==l.return)n=i,l=r;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,l=r;break}if(o===l){a=!0,l=i,n=r;break}o=o.sibling}if(!a){for(o=r.child;o;){if(o===n){a=!0,n=r,l=i;break}if(o===l){a=!0,l=r,n=i;break}o=o.sibling}if(!a)throw Error(O(189))}}if(n.alternate!==l)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?t:e}function dg(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=dg(t),e!==null)return e;t=t.sibling}return null}var Ft=Object.assign,Gx=Symbol.for("react.element"),Ro=Symbol.for("react.transitional.element"),ua=Symbol.for("react.portal"),Ji=Symbol.for("react.fragment"),mg=Symbol.for("react.strict_mode"),Lc=Symbol.for("react.profiler"),Xx=Symbol.for("react.provider"),pg=Symbol.for("react.consumer"),ll=Symbol.for("react.context"),Df=Symbol.for("react.forward_ref"),Uc=Symbol.for("react.suspense"),Bc=Symbol.for("react.suspense_list"),_f=Symbol.for("react.memo"),Sl=Symbol.for("react.lazy");Symbol.for("react.scope");var Hc=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var Px=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var Vp=Symbol.iterator;function ta(t){return t===null||typeof t!="object"?null:(t=Vp&&t[Vp]||t["@@iterator"],typeof t=="function"?t:null)}var Zx=Symbol.for("react.client.reference");function qc(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===Zx?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Ji:return"Fragment";case Lc:return"Profiler";case mg:return"StrictMode";case Uc:return"Suspense";case Bc:return"SuspenseList";case Hc:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case ua:return"Portal";case ll:return(t.displayName||"Context")+".Provider";case pg:return(t._context.displayName||"Context")+".Consumer";case Df:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case _f:return e=t.displayName||null,e!==null?e:qc(t.type)||"Memo";case Sl:e=t._payload,t=t._init;try{return qc(t(e))}catch{}}return null}var sa=Array.isArray,it=sg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,_t=Fx.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ui={pending:!1,data:null,method:null,action:null},Ic=[],$i=-1;function Qn(t){return{current:t}}function Te(t){0>$i||(t.current=Ic[$i],Ic[$i]=null,$i--)}function Zt(t,e){$i++,Ic[$i]=t.current,t.current=e}var Yn=Qn(null),Ca=Qn(null),_l=Qn(null),ru=Qn(null);function au(t,e){switch(Zt(_l,e),Zt(Ca,t),Zt(Yn,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Zh(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Zh(e),t=Dv(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Te(Yn),Zt(Yn,t)}function yr(){Te(Yn),Te(Ca),Te(_l)}function jc(t){t.memoizedState!==null&&Zt(ru,t);var e=Yn.current,n=Dv(e,t.type);e!==n&&(Zt(Ca,t),Zt(Yn,n))}function ou(t){Ca.current===t&&(Te(Yn),Te(Ca)),ru.current===t&&(Te(ru),Ua._currentValue=ui)}var Yc=Object.prototype.hasOwnProperty,Of=ye.unstable_scheduleCallback,ic=ye.unstable_cancelCallback,Kx=ye.unstable_shouldYield,Jx=ye.unstable_requestPaint,Vn=ye.unstable_now,$x=ye.unstable_getCurrentPriorityLevel,hg=ye.unstable_ImmediatePriority,gg=ye.unstable_UserBlockingPriority,uu=ye.unstable_NormalPriority,Wx=ye.unstable_LowPriority,yg=ye.unstable_IdlePriority,tk=ye.log,ek=ye.unstable_setDisableYieldValue,ja=null,cn=null;function Al(t){if(typeof tk=="function"&&ek(t),cn&&typeof cn.setStrictMode=="function")try{cn.setStrictMode(ja,t)}catch{}}var fn=Math.clz32?Math.clz32:ik,nk=Math.log,lk=Math.LN2;function ik(t){return t>>>=0,t===0?32:31-(nk(t)/lk|0)|0}var Mo=256,Do=4194304;function ri(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Lu(t,e,n){var l=t.pendingLanes;if(l===0)return 0;var i=0,r=t.suspendedLanes,a=t.pingedLanes;t=t.warmLanes;var o=l&134217727;return o!==0?(l=o&~r,l!==0?i=ri(l):(a&=o,a!==0?i=ri(a):n||(n=o&~t,n!==0&&(i=ri(n))))):(o=l&~r,o!==0?i=ri(o):a!==0?i=ri(a):n||(n=l&~t,n!==0&&(i=ri(n)))),i===0?0:e!==0&&e!==i&&(e&r)===0&&(r=i&-i,n=e&-e,r>=n||r===32&&(n&4194048)!==0)?e:i}function Ya(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function rk(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 vg(){var t=Mo;return Mo<<=1,(Mo&4194048)===0&&(Mo=256),t}function bg(){var t=Do;return Do<<=1,(Do&62914560)===0&&(Do=4194304),t}function rc(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Va(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function ak(t,e,n,l,i,r){var a=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var o=t.entanglements,u=t.expirationTimes,s=t.hiddenUpdates;for(n=a&~n;0<n;){var f=31-fn(n),c=1<<f;o[f]=0,u[f]=-1;var m=s[f];if(m!==null)for(s[f]=null,f=0;f<m.length;f++){var d=m[f];d!==null&&(d.lane&=-536870913)}n&=~c}l!==0&&xg(t,l,0),r!==0&&i===0&&t.tag!==0&&(t.suspendedLanes|=r&~(a&~e))}function xg(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var l=31-fn(e);t.entangledLanes|=e,t.entanglements[l]=t.entanglements[l]|1073741824|n&4194090}function kg(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var l=31-fn(n),i=1<<l;i&e|t[l]&e&&(t[l]|=e),n&=~i}}function zf(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Lf(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Sg(){var t=_t.p;return t!==0?t:(t=window.event,t===void 0?32:jv(t.type))}function ok(t,e){var n=_t.p;try{return _t.p=t,e()}finally{_t.p=n}}var Vl=Math.random().toString(36).slice(2),ze="__reactFiber$"+Vl,en="__reactProps$"+Vl,Ar="__reactContainer$"+Vl,Vc="__reactEvents$"+Vl,uk="__reactListeners$"+Vl,sk="__reactHandles$"+Vl,Fp="__reactResources$"+Vl,Fa="__reactMarker$"+Vl;function Uf(t){delete t[ze],delete t[en],delete t[Vc],delete t[uk],delete t[sk]}function Wi(t){var e=t[ze];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ar]||n[ze]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=$h(t);t!==null;){if(n=t[ze])return n;t=$h(t)}return e}t=n,n=t.parentNode}return null}function Rr(t){if(t=t[ze]||t[Ar]){var e=t.tag;if(e===5||e===6||e===13||e===26||e===27||e===3)return t}return null}function ca(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(O(33))}function sr(t){var e=t[Fp];return e||(e=t[Fp]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function ke(t){t[Fa]=!0}var Tg=new Set,wg={};function bi(t,e){vr(t,e),vr(t+"Capture",e)}function vr(t,e){for(wg[t]=e,t=0;t<e.length;t++)Tg.add(e[t])}var ck=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]*$"),Qp={},Gp={};function fk(t){return Yc.call(Gp,t)?!0:Yc.call(Qp,t)?!1:ck.test(t)?Gp[t]=!0:(Qp[t]=!0,!1)}function Go(t,e,n){if(fk(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function _o(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Wn(t,e,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+l)}}var ac,Xp;function Pi(t){if(ac===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);ac=e&&e[1]||"",Xp=-1<n.stack.indexOf(`
1
+ var zx=Object.create;var Gu=Object.defineProperty;var Lx=Object.getOwnPropertyDescriptor;var Ux=Object.getOwnPropertyNames;var Bx=Object.getPrototypeOf,Hx=Object.prototype.hasOwnProperty;var Ze=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),vp=(t,e)=>{for(var n in e)Gu(t,n,{get:e[n],enumerable:!0})},qx=(t,e,n,l)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Ux(e))!Hx.call(t,i)&&i!==n&&Gu(t,i,{get:()=>e[i],enumerable:!(l=Lx(e,i))||l.enumerable});return t};var G=(t,e,n)=>(n=t!=null?zx(Bx(t)):{},qx(e||!t||!t.__esModule?Gu(n,"default",{value:t,enumerable:!0}):n,t));var Mp=Ze(mt=>{"use strict";var Pu=Symbol.for("react.transitional.element"),Ix=Symbol.for("react.portal"),jx=Symbol.for("react.fragment"),Yx=Symbol.for("react.strict_mode"),Vx=Symbol.for("react.profiler"),Fx=Symbol.for("react.consumer"),Qx=Symbol.for("react.context"),Gx=Symbol.for("react.forward_ref"),Xx=Symbol.for("react.suspense"),Px=Symbol.for("react.memo"),Tp=Symbol.for("react.lazy"),bp=Symbol.iterator;function Zx(t){return t===null||typeof t!="object"?null:(t=bp&&t[bp]||t["@@iterator"],typeof t=="function"?t:null)}var Ep={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Cp=Object.assign,Ap={};function Qi(t,e,n){this.props=t,this.context=e,this.refs=Ap,this.updater=n||Ep}Qi.prototype.isReactComponent={};Qi.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Qi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function Np(){}Np.prototype=Qi.prototype;function Zu(t,e,n){this.props=t,this.context=e,this.refs=Ap,this.updater=n||Ep}var Ku=Zu.prototype=new Np;Ku.constructor=Zu;Cp(Ku,Qi.prototype);Ku.isPureReactComponent=!0;var xp=Array.isArray,Kt={H:null,A:null,T:null,S:null,V:null},Rp=Object.prototype.hasOwnProperty;function Ju(t,e,n,l,i,r){return n=r.ref,{$$typeof:Pu,type:t,key:e,ref:n!==void 0?n:null,props:r}}function Kx(t,e){return Ju(t.type,e,void 0,void 0,void 0,t.props)}function $u(t){return typeof t=="object"&&t!==null&&t.$$typeof===Pu}function Jx(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var kp=/\/+/g;function Xu(t,e){return typeof t=="object"&&t!==null&&t.key!=null?Jx(""+t.key):e.toString(36)}function Sp(){}function $x(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then(Sp,Sp):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function Fi(t,e,n,l,i){var r=typeof t;(r==="undefined"||r==="boolean")&&(t=null);var a=!1;if(t===null)a=!0;else switch(r){case"bigint":case"string":case"number":a=!0;break;case"object":switch(t.$$typeof){case Pu:case Ix:a=!0;break;case Tp:return a=t._init,Fi(a(t._payload),e,n,l,i)}}if(a)return i=i(t),a=l===""?"."+Xu(t,0):l,xp(i)?(n="",a!=null&&(n=a.replace(kp,"$&/")+"/"),Fi(i,e,n,"",function(u){return u})):i!=null&&($u(i)&&(i=Kx(i,n+(i.key==null||t&&t.key===i.key?"":(""+i.key).replace(kp,"$&/")+"/")+a)),e.push(i)),1;a=0;var o=l===""?".":l+":";if(xp(t))for(var s=0;s<t.length;s++)l=t[s],r=o+Xu(l,s),a+=Fi(l,e,n,r,i);else if(s=Zx(t),typeof s=="function")for(t=s.call(t),s=0;!(l=t.next()).done;)l=l.value,r=o+Xu(l,s++),a+=Fi(l,e,n,r,i);else if(r==="object"){if(typeof t.then=="function")return Fi($x(t),e,n,l,i);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return a}function Ao(t,e,n){if(t==null)return t;var l=[],i=0;return Fi(t,l,"","",function(r){return e.call(n,r,i++)}),l}function Wx(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var wp=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function tk(){}mt.Children={map:Ao,forEach:function(t,e,n){Ao(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Ao(t,function(){e++}),e},toArray:function(t){return Ao(t,function(e){return e})||[]},only:function(t){if(!$u(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};mt.Component=Qi;mt.Fragment=jx;mt.Profiler=Vx;mt.PureComponent=Zu;mt.StrictMode=Yx;mt.Suspense=Xx;mt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Kt;mt.__COMPILER_RUNTIME={__proto__:null,c:function(t){return Kt.H.useMemoCache(t)}};mt.cache=function(t){return function(){return t.apply(null,arguments)}};mt.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var l=Cp({},t.props),i=t.key,r=void 0;if(e!=null)for(a in e.ref!==void 0&&(r=void 0),e.key!==void 0&&(i=""+e.key),e)!Rp.call(e,a)||a==="key"||a==="__self"||a==="__source"||a==="ref"&&e.ref===void 0||(l[a]=e[a]);var a=arguments.length-2;if(a===1)l.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];l.children=o}return Ju(t.type,i,void 0,void 0,r,l)};mt.createContext=function(t){return t={$$typeof:Qx,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Fx,_context:t},t};mt.createElement=function(t,e,n){var l,i={},r=null;if(e!=null)for(l in e.key!==void 0&&(r=""+e.key),e)Rp.call(e,l)&&l!=="key"&&l!=="__self"&&l!=="__source"&&(i[l]=e[l]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];i.children=o}if(t&&t.defaultProps)for(l in a=t.defaultProps,a)i[l]===void 0&&(i[l]=a[l]);return Ju(t,r,void 0,void 0,null,i)};mt.createRef=function(){return{current:null}};mt.forwardRef=function(t){return{$$typeof:Gx,render:t}};mt.isValidElement=$u;mt.lazy=function(t){return{$$typeof:Tp,_payload:{_status:-1,_result:t},_init:Wx}};mt.memo=function(t,e){return{$$typeof:Px,type:t,compare:e===void 0?null:e}};mt.startTransition=function(t){var e=Kt.T,n={};Kt.T=n;try{var l=t(),i=Kt.S;i!==null&&i(n,l),typeof l=="object"&&l!==null&&typeof l.then=="function"&&l.then(tk,wp)}catch(r){wp(r)}finally{Kt.T=e}};mt.unstable_useCacheRefresh=function(){return Kt.H.useCacheRefresh()};mt.use=function(t){return Kt.H.use(t)};mt.useActionState=function(t,e,n){return Kt.H.useActionState(t,e,n)};mt.useCallback=function(t,e){return Kt.H.useCallback(t,e)};mt.useContext=function(t){return Kt.H.useContext(t)};mt.useDebugValue=function(){};mt.useDeferredValue=function(t,e){return Kt.H.useDeferredValue(t,e)};mt.useEffect=function(t,e,n){var l=Kt.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return l.useEffect(t,e)};mt.useId=function(){return Kt.H.useId()};mt.useImperativeHandle=function(t,e,n){return Kt.H.useImperativeHandle(t,e,n)};mt.useInsertionEffect=function(t,e){return Kt.H.useInsertionEffect(t,e)};mt.useLayoutEffect=function(t,e){return Kt.H.useLayoutEffect(t,e)};mt.useMemo=function(t,e){return Kt.H.useMemo(t,e)};mt.useOptimistic=function(t,e){return Kt.H.useOptimistic(t,e)};mt.useReducer=function(t,e,n){return Kt.H.useReducer(t,e,n)};mt.useRef=function(t){return Kt.H.useRef(t)};mt.useState=function(t){return Kt.H.useState(t)};mt.useSyncExternalStore=function(t,e,n){return Kt.H.useSyncExternalStore(t,e,n)};mt.useTransition=function(){return Kt.H.useTransition()};mt.version="19.1.1"});var le=Ze((JN,Dp)=>{"use strict";Dp.exports=Mp()});var jp=Ze(Jt=>{"use strict";function nc(t,e){var n=t.length;t.push(e);t:for(;0<n;){var l=n-1>>>1,i=t[l];if(0<No(i,e))t[l]=e,t[n]=i,n=l;else break t}}function jn(t){return t.length===0?null:t[0]}function Mo(t){if(t.length===0)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var l=0,i=t.length,r=i>>>1;l<r;){var a=2*(l+1)-1,o=t[a],s=a+1,u=t[s];if(0>No(o,n))s<i&&0>No(u,o)?(t[l]=u,t[s]=n,l=s):(t[l]=o,t[a]=n,l=a);else if(s<i&&0>No(u,n))t[l]=u,t[s]=n,l=s;else break t}}return e}function No(t,e){var n=t.sortIndex-e.sortIndex;return n!==0?n:t.id-e.id}Jt.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Op=performance,Jt.unstable_now=function(){return Op.now()}):(Wu=Date,_p=Wu.now(),Jt.unstable_now=function(){return Wu.now()-_p});var Op,Wu,_p,el=[],kl=[],ek=1,Sn=null,Ie=3,lc=!1,Wr=!1,ta=!1,ic=!1,Up=typeof setTimeout=="function"?setTimeout:null,Bp=typeof clearTimeout=="function"?clearTimeout:null,zp=typeof setImmediate<"u"?setImmediate:null;function Ro(t){for(var e=jn(kl);e!==null;){if(e.callback===null)Mo(kl);else if(e.startTime<=t)Mo(kl),e.sortIndex=e.expirationTime,nc(el,e);else break;e=jn(kl)}}function rc(t){if(ta=!1,Ro(t),!Wr)if(jn(el)!==null)Wr=!0,Xi||(Xi=!0,Gi());else{var e=jn(kl);e!==null&&ac(rc,e.startTime-t)}}var Xi=!1,ea=-1,Hp=5,qp=-1;function Ip(){return ic?!0:!(Jt.unstable_now()-qp<Hp)}function tc(){if(ic=!1,Xi){var t=Jt.unstable_now();qp=t;var e=!0;try{t:{Wr=!1,ta&&(ta=!1,Bp(ea),ea=-1),lc=!0;var n=Ie;try{e:{for(Ro(t),Sn=jn(el);Sn!==null&&!(Sn.expirationTime>t&&Ip());){var l=Sn.callback;if(typeof l=="function"){Sn.callback=null,Ie=Sn.priorityLevel;var i=l(Sn.expirationTime<=t);if(t=Jt.unstable_now(),typeof i=="function"){Sn.callback=i,Ro(t),e=!0;break e}Sn===jn(el)&&Mo(el),Ro(t)}else Mo(el);Sn=jn(el)}if(Sn!==null)e=!0;else{var r=jn(kl);r!==null&&ac(rc,r.startTime-t),e=!1}}break t}finally{Sn=null,Ie=n,lc=!1}e=void 0}}finally{e?Gi():Xi=!1}}}var Gi;typeof zp=="function"?Gi=function(){zp(tc)}:typeof MessageChannel<"u"?(ec=new MessageChannel,Lp=ec.port2,ec.port1.onmessage=tc,Gi=function(){Lp.postMessage(null)}):Gi=function(){Up(tc,0)};var ec,Lp;function ac(t,e){ea=Up(function(){t(Jt.unstable_now())},e)}Jt.unstable_IdlePriority=5;Jt.unstable_ImmediatePriority=1;Jt.unstable_LowPriority=4;Jt.unstable_NormalPriority=3;Jt.unstable_Profiling=null;Jt.unstable_UserBlockingPriority=2;Jt.unstable_cancelCallback=function(t){t.callback=null};Jt.unstable_forceFrameRate=function(t){0>t||125<t?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Hp=0<t?Math.floor(1e3/t):5};Jt.unstable_getCurrentPriorityLevel=function(){return Ie};Jt.unstable_next=function(t){switch(Ie){case 1:case 2:case 3:var e=3;break;default:e=Ie}var n=Ie;Ie=e;try{return t()}finally{Ie=n}};Jt.unstable_requestPaint=function(){ic=!0};Jt.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var n=Ie;Ie=t;try{return e()}finally{Ie=n}};Jt.unstable_scheduleCallback=function(t,e,n){var l=Jt.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?l+n:l):n=l,t){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,t={id:ek++,callback:e,priorityLevel:t,startTime:n,expirationTime:i,sortIndex:-1},n>l?(t.sortIndex=n,nc(kl,t),jn(el)===null&&t===jn(kl)&&(ta?(Bp(ea),ea=-1):ta=!0,ac(rc,n-l))):(t.sortIndex=i,nc(el,t),Wr||lc||(Wr=!0,Xi||(Xi=!0,Gi()))),t};Jt.unstable_shouldYield=Ip;Jt.unstable_wrapCallback=function(t){var e=Ie;return function(){var n=Ie;Ie=e;try{return t.apply(this,arguments)}finally{Ie=n}}}});var Vp=Ze((WN,Yp)=>{"use strict";Yp.exports=jp()});var Qp=Ze(Je=>{"use strict";var nk=le();function Fp(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Sl(){}var Ke={d:{f:Sl,r:function(){throw Error(Fp(522))},D:Sl,C:Sl,L:Sl,m:Sl,X:Sl,S:Sl,M:Sl},p:0,findDOMNode:null},lk=Symbol.for("react.portal");function ik(t,e,n){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:lk,key:l==null?null:""+l,children:t,containerInfo:e,implementation:n}}var na=nk.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Do(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}Je.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ke;Je.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(Fp(299));return ik(t,e,null,n)};Je.flushSync=function(t){var e=na.T,n=Ke.p;try{if(na.T=null,Ke.p=2,t)return t()}finally{na.T=e,Ke.p=n,Ke.d.f()}};Je.preconnect=function(t,e){typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,Ke.d.C(t,e))};Je.prefetchDNS=function(t){typeof t=="string"&&Ke.d.D(t)};Je.preinit=function(t,e){if(typeof t=="string"&&e&&typeof e.as=="string"){var n=e.as,l=Do(n,e.crossOrigin),i=typeof e.integrity=="string"?e.integrity:void 0,r=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;n==="style"?Ke.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:l,integrity:i,fetchPriority:r}):n==="script"&&Ke.d.X(t,{crossOrigin:l,integrity:i,fetchPriority:r,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};Je.preinitModule=function(t,e){if(typeof t=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var n=Do(e.as,e.crossOrigin);Ke.d.M(t,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&Ke.d.M(t)};Je.preload=function(t,e){if(typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var n=e.as,l=Do(n,e.crossOrigin);Ke.d.L(t,n,{crossOrigin:l,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};Je.preloadModule=function(t,e){if(typeof t=="string")if(e){var n=Do(e.as,e.crossOrigin);Ke.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else Ke.d.m(t)};Je.requestFormReset=function(t){Ke.d.r(t)};Je.unstable_batchedUpdates=function(t,e){return t(e)};Je.useFormState=function(t,e,n){return na.H.useFormState(t,e,n)};Je.useFormStatus=function(){return na.H.useHostTransitionStatus()};Je.version="19.1.1"});var oc=Ze((eR,Xp)=>{"use strict";function Gp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gp)}catch(t){console.error(t)}}Gp(),Xp.exports=Qp()});var Zv=Ze(Ws=>{"use strict";var Se=Vp(),hg=le(),rk=oc();function _(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function gg(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function Va(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function yg(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Pp(t){if(Va(t)!==t)throw Error(_(188))}function ak(t){var e=t.alternate;if(!e){if(e=Va(t),e===null)throw Error(_(188));return e!==t?null:t}for(var n=t,l=e;;){var i=n.return;if(i===null)break;var r=i.alternate;if(r===null){if(l=i.return,l!==null){n=l;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===n)return Pp(i),t;if(r===l)return Pp(i),e;r=r.sibling}throw Error(_(188))}if(n.return!==l.return)n=i,l=r;else{for(var a=!1,o=i.child;o;){if(o===n){a=!0,n=i,l=r;break}if(o===l){a=!0,l=i,n=r;break}o=o.sibling}if(!a){for(o=r.child;o;){if(o===n){a=!0,n=r,l=i;break}if(o===l){a=!0,l=r,n=i;break}o=o.sibling}if(!a)throw Error(_(189))}}if(n.alternate!==l)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?t:e}function vg(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=vg(t),e!==null)return e;t=t.sibling}return null}var Zt=Object.assign,ok=Symbol.for("react.element"),Oo=Symbol.for("react.transitional.element"),fa=Symbol.for("react.portal"),tr=Symbol.for("react.fragment"),bg=Symbol.for("react.strict_mode"),qc=Symbol.for("react.profiler"),sk=Symbol.for("react.provider"),xg=Symbol.for("react.consumer"),al=Symbol.for("react.context"),Lf=Symbol.for("react.forward_ref"),Ic=Symbol.for("react.suspense"),jc=Symbol.for("react.suspense_list"),Uf=Symbol.for("react.memo"),El=Symbol.for("react.lazy");Symbol.for("react.scope");var Yc=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var uk=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var Zp=Symbol.iterator;function la(t){return t===null||typeof t!="object"?null:(t=Zp&&t[Zp]||t["@@iterator"],typeof t=="function"?t:null)}var ck=Symbol.for("react.client.reference");function Vc(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ck?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case tr:return"Fragment";case qc:return"Profiler";case bg:return"StrictMode";case Ic:return"Suspense";case jc:return"SuspenseList";case Yc:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case fa:return"Portal";case al:return(t.displayName||"Context")+".Provider";case xg:return(t._context.displayName||"Context")+".Consumer";case Lf:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Uf:return e=t.displayName||null,e!==null?e:Vc(t.type)||"Memo";case El:e=t._payload,t=t._init;try{return Vc(t(e))}catch{}}return null}var da=Array.isArray,at=hg.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Lt=rk.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,fi={pending:!1,data:null,method:null,action:null},Fc=[],er=-1;function Pn(t){return{current:t}}function Oe(t){0>er||(t.current=Fc[er],Fc[er]=null,er--)}function Wt(t,e){er++,Fc[er]=t.current,t.current=e}var Qn=Pn(null),Ra=Pn(null),Ll=Pn(null),ss=Pn(null);function us(t,e){switch(Wt(Ll,e),Wt(Ra,t),Wt(Qn,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?eg(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=eg(e),t=Bv(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Oe(Qn),Wt(Qn,t)}function xr(){Oe(Qn),Oe(Ra),Oe(Ll)}function Qc(t){t.memoizedState!==null&&Wt(ss,t);var e=Qn.current,n=Bv(e,t.type);e!==n&&(Wt(Ra,t),Wt(Qn,n))}function cs(t){Ra.current===t&&(Oe(Qn),Oe(Ra)),ss.current===t&&(Oe(ss),qa._currentValue=fi)}var Gc=Object.prototype.hasOwnProperty,Bf=Se.unstable_scheduleCallback,sc=Se.unstable_cancelCallback,fk=Se.unstable_shouldYield,dk=Se.unstable_requestPaint,Gn=Se.unstable_now,mk=Se.unstable_getCurrentPriorityLevel,kg=Se.unstable_ImmediatePriority,Sg=Se.unstable_UserBlockingPriority,fs=Se.unstable_NormalPriority,pk=Se.unstable_LowPriority,wg=Se.unstable_IdlePriority,hk=Se.log,gk=Se.unstable_setDisableYieldValue,Fa=null,pn=null;function Dl(t){if(typeof hk=="function"&&gk(t),pn&&typeof pn.setStrictMode=="function")try{pn.setStrictMode(Fa,t)}catch{}}var hn=Math.clz32?Math.clz32:bk,yk=Math.log,vk=Math.LN2;function bk(t){return t>>>=0,t===0?32:31-(yk(t)/vk|0)|0}var _o=256,zo=4194304;function si(t){var e=t&42;if(e!==0)return e;switch(t&-t){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:case 262144:case 524288:case 1048576:case 2097152:return t&4194048;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Hs(t,e,n){var l=t.pendingLanes;if(l===0)return 0;var i=0,r=t.suspendedLanes,a=t.pingedLanes;t=t.warmLanes;var o=l&134217727;return o!==0?(l=o&~r,l!==0?i=si(l):(a&=o,a!==0?i=si(a):n||(n=o&~t,n!==0&&(i=si(n))))):(o=l&~r,o!==0?i=si(o):a!==0?i=si(a):n||(n=l&~t,n!==0&&(i=si(n)))),i===0?0:e!==0&&e!==i&&(e&r)===0&&(r=i&-i,n=e&-e,r>=n||r===32&&(n&4194048)!==0)?e:i}function Qa(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function xk(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Tg(){var t=_o;return _o<<=1,(_o&4194048)===0&&(_o=256),t}function Eg(){var t=zo;return zo<<=1,(zo&62914560)===0&&(zo=4194304),t}function uc(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function Ga(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function kk(t,e,n,l,i,r){var a=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var o=t.entanglements,s=t.expirationTimes,u=t.hiddenUpdates;for(n=a&~n;0<n;){var f=31-hn(n),c=1<<f;o[f]=0,s[f]=-1;var m=u[f];if(m!==null)for(u[f]=null,f=0;f<m.length;f++){var d=m[f];d!==null&&(d.lane&=-536870913)}n&=~c}l!==0&&Cg(t,l,0),r!==0&&i===0&&t.tag!==0&&(t.suspendedLanes|=r&~(a&~e))}function Cg(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var l=31-hn(e);t.entangledLanes|=e,t.entanglements[l]=t.entanglements[l]|1073741824|n&4194090}function Ag(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var l=31-hn(n),i=1<<l;i&e|t[l]&e&&(t[l]|=e),n&=~i}}function Hf(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function qf(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Ng(){var t=Lt.p;return t!==0?t:(t=window.event,t===void 0?32:Xv(t.type))}function Sk(t,e){var n=Lt.p;try{return Lt.p=t,e()}finally{Lt.p=n}}var Gl=Math.random().toString(36).slice(2),je="__reactFiber$"+Gl,an="__reactProps$"+Gl,Dr="__reactContainer$"+Gl,Xc="__reactEvents$"+Gl,wk="__reactListeners$"+Gl,Tk="__reactHandles$"+Gl,Kp="__reactResources$"+Gl,Xa="__reactMarker$"+Gl;function If(t){delete t[je],delete t[an],delete t[Xc],delete t[wk],delete t[Tk]}function nr(t){var e=t[je];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Dr]||n[je]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=ig(t);t!==null;){if(n=t[je])return n;t=ig(t)}return e}t=n,n=t.parentNode}return null}function Or(t){if(t=t[je]||t[Dr]){var e=t.tag;if(e===5||e===6||e===13||e===26||e===27||e===3)return t}return null}function ma(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(_(33))}function dr(t){var e=t[Kp];return e||(e=t[Kp]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Me(t){t[Xa]=!0}var Rg=new Set,Mg={};function Si(t,e){kr(t,e),kr(t+"Capture",e)}function kr(t,e){for(Mg[t]=e,t=0;t<e.length;t++)Rg.add(e[t])}var Ek=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]*$"),Jp={},$p={};function Ck(t){return Gc.call($p,t)?!0:Gc.call(Jp,t)?!1:Ek.test(t)?$p[t]=!0:(Jp[t]=!0,!1)}function Zo(t,e,n){if(Ck(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Lo(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function nl(t,e,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+l)}}var cc,Wp;function Ji(t){if(cc===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);cc=e&&e[1]||"",Wp=-1<n.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+ac+t+Xp}var oc=!1;function uc(t,e){if(!t||oc)return"";oc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(e){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(d){var m=d}Reflect.construct(t,[],c)}else{try{c.call()}catch(d){m=d}t.call(c.prototype)}}else{try{throw Error()}catch(d){m=d}(c=t())&&typeof c.catch=="function"&&c.catch(function(){})}}catch(d){if(d&&m&&typeof d.stack=="string")return[d.stack,m.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=l.DetermineComponentFrameRoot(),a=r[0],o=r[1];if(a&&o){var u=a.split(`
4
- `),s=o.split(`
5
- `);for(i=l=0;l<u.length&&!u[l].includes("DetermineComponentFrameRoot");)l++;for(;i<s.length&&!s[i].includes("DetermineComponentFrameRoot");)i++;if(l===u.length||i===s.length)for(l=u.length-1,i=s.length-1;1<=l&&0<=i&&u[l]!==s[i];)i--;for(;1<=l&&0<=i;l--,i--)if(u[l]!==s[i]){if(l!==1||i!==1)do if(l--,i--,0>i||u[l]!==s[i]){var f=`
6
- `+u[l].replace(" at new "," at ");return t.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",t.displayName)),f}while(1<=l&&0<=i);break}}}finally{oc=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Pi(n):""}function dk(t){switch(t.tag){case 26:case 27:case 5:return Pi(t.type);case 16:return Pi("Lazy");case 13:return Pi("Suspense");case 19:return Pi("SuspenseList");case 0:case 15:return uc(t.type,!1);case 11:return uc(t.type.render,!1);case 1:return uc(t.type,!0);case 31:return Pi("Activity");default:return""}}function Pp(t){try{var e="";do e+=dk(t),t=t.return;while(t);return e}catch(n){return`
3
+ `+cc+t+Wp}var fc=!1;function dc(t,e){if(!t||fc)return"";fc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(e){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(d){var m=d}Reflect.construct(t,[],c)}else{try{c.call()}catch(d){m=d}t.call(c.prototype)}}else{try{throw Error()}catch(d){m=d}(c=t())&&typeof c.catch=="function"&&c.catch(function(){})}}catch(d){if(d&&m&&typeof d.stack=="string")return[d.stack,m.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=l.DetermineComponentFrameRoot(),a=r[0],o=r[1];if(a&&o){var s=a.split(`
4
+ `),u=o.split(`
5
+ `);for(i=l=0;l<s.length&&!s[l].includes("DetermineComponentFrameRoot");)l++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(l===s.length||i===u.length)for(l=s.length-1,i=u.length-1;1<=l&&0<=i&&s[l]!==u[i];)i--;for(;1<=l&&0<=i;l--,i--)if(s[l]!==u[i]){if(l!==1||i!==1)do if(l--,i--,0>i||s[l]!==u[i]){var f=`
6
+ `+s[l].replace(" at new "," at ");return t.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",t.displayName)),f}while(1<=l&&0<=i);break}}}finally{fc=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Ji(n):""}function Ak(t){switch(t.tag){case 26:case 27:case 5:return Ji(t.type);case 16:return Ji("Lazy");case 13:return Ji("Suspense");case 19:return Ji("SuspenseList");case 0:case 15:return dc(t.type,!1);case 11:return dc(t.type.render,!1);case 1:return dc(t.type,!0);case 31:return Ji("Activity");default:return""}}function th(t){try{var e="";do e+=Ak(t),t=t.return;while(t);return e}catch(n){return`
7
7
  Error generating stack: `+n.message+`
8
- `+n.stack}}function kn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Eg(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function mk(t){var e=Eg(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),l=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,r=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){l=""+a,r.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(a){l=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function su(t){t._valueTracker||(t._valueTracker=mk(t))}function Cg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),l="";return t&&(l=Eg(t)?t.checked?"true":"false":t.value),t=l,t!==n?(e.setValue(t),!0):!1}function cu(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var pk=/[\n"\\]/g;function wn(t){return t.replace(pk,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Fc(t,e,n,l,i,r,a,o){t.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?t.type=a:t.removeAttribute("type"),e!=null?a==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+kn(e)):t.value!==""+kn(e)&&(t.value=""+kn(e)):a!=="submit"&&a!=="reset"||t.removeAttribute("value"),e!=null?Qc(t,a,kn(e)):n!=null?Qc(t,a,kn(n)):l!=null&&t.removeAttribute("value"),i==null&&r!=null&&(t.defaultChecked=!!r),i!=null&&(t.checked=i&&typeof i!="function"&&typeof i!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.name=""+kn(o):t.removeAttribute("name")}function Ng(t,e,n,l,i,r,a,o){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.type=r),e!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||e!=null))return;n=n!=null?""+kn(n):"",e=e!=null?""+kn(e):n,o||e===t.value||(t.value=e),t.defaultValue=e}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=o?t.checked:!!l,t.defaultChecked=!!l,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(t.name=a)}function Qc(t,e,n){e==="number"&&cu(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function cr(t,e,n,l){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&l&&(t[n].defaultSelected=!0)}else{for(n=""+kn(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,l&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function Ag(t,e,n){if(e!=null&&(e=""+kn(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+kn(n):""}function Rg(t,e,n,l){if(e==null){if(l!=null){if(n!=null)throw Error(O(92));if(sa(l)){if(1<l.length)throw Error(O(93));l=l[0]}n=l}n==null&&(n=""),e=n}n=kn(e),t.defaultValue=n,l=t.textContent,l===n&&l!==""&&l!==null&&(t.value=l)}function br(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var hk=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 Zp(t,e,n){var l=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":l?t.setProperty(e,n):typeof n!="number"||n===0||hk.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Mg(t,e,n){if(e!=null&&typeof e!="object")throw Error(O(62));if(t=t.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||e!=null&&e.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var i in e)l=e[i],e.hasOwnProperty(i)&&n[i]!==l&&Zp(t,i,l)}else for(var r in e)e.hasOwnProperty(r)&&Zp(t,r,e[r])}function Bf(t){if(t.indexOf("-")===-1)return!1;switch(t){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 gk=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"]]),yk=/^[\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 Xo(t){return yk.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Gc=null;function Hf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var tr=null,fr=null;function Kp(t){var e=Rr(t);if(e&&(t=e.stateNode)){var n=t[en]||null;t:switch(t=e.stateNode,e.type){case"input":if(Fc(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+wn(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var l=n[e];if(l!==t&&l.form===t.form){var i=l[en]||null;if(!i)throw Error(O(90));Fc(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(e=0;e<n.length;e++)l=n[e],l.form===t.form&&Cg(l)}break t;case"textarea":Ag(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&cr(t,!!n.multiple,e,!1)}}}var sc=!1;function Dg(t,e,n){if(sc)return t(e,n);sc=!0;try{var l=t(e);return l}finally{if(sc=!1,(tr!==null||fr!==null)&&(Qu(),tr&&(e=tr,t=fr,fr=tr=null,Kp(e),t)))for(e=0;e<t.length;e++)Kp(t[e])}}function Na(t,e){var n=t.stateNode;if(n===null)return null;var l=n[en]||null;if(l===null)return null;n=l[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(O(231,e,typeof n));return n}var cl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xc=!1;if(cl)try{Qi={},Object.defineProperty(Qi,"passive",{get:function(){Xc=!0}}),window.addEventListener("test",Qi,Qi),window.removeEventListener("test",Qi,Qi)}catch{Xc=!1}var Qi,Rl=null,qf=null,Po=null;function _g(){if(Po)return Po;var t,e=qf,n=e.length,l,i="value"in Rl?Rl.value:Rl.textContent,r=i.length;for(t=0;t<n&&e[t]===i[t];t++);var a=n-t;for(l=1;l<=a&&e[n-l]===i[r-l];l++);return Po=i.slice(t,1<l?1-l:void 0)}function Zo(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Oo(){return!0}function Jp(){return!1}function nn(t){function e(n,l,i,r,a){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=r,this.target=a,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(n=t[o],this[o]=n?n(r):r[o]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Oo:Jp,this.isPropagationStopped=Jp,this}return Ft(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Oo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Oo)},persist:function(){},isPersistent:Oo}),e}var xi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Uu=nn(xi),Qa=Ft({},xi,{view:0,detail:0}),vk=nn(Qa),cc,fc,ea,Bu=Ft({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:If,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ea&&(ea&&t.type==="mousemove"?(cc=t.screenX-ea.screenX,fc=t.screenY-ea.screenY):fc=cc=0,ea=t),cc)},movementY:function(t){return"movementY"in t?t.movementY:fc}}),$p=nn(Bu),bk=Ft({},Bu,{dataTransfer:0}),xk=nn(bk),kk=Ft({},Qa,{relatedTarget:0}),dc=nn(kk),Sk=Ft({},xi,{animationName:0,elapsedTime:0,pseudoElement:0}),Tk=nn(Sk),wk=Ft({},xi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ek=nn(wk),Ck=Ft({},xi,{data:0}),Wp=nn(Ck),Nk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ak={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"},Rk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mk(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Rk[t])?!!e[t]:!1}function If(){return Mk}var Dk=Ft({},Qa,{key:function(t){if(t.key){var e=Nk[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Zo(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Ak[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:If,charCode:function(t){return t.type==="keypress"?Zo(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Zo(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),_k=nn(Dk),Ok=Ft({},Bu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),th=nn(Ok),zk=Ft({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:If}),Lk=nn(zk),Uk=Ft({},xi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Bk=nn(Uk),Hk=Ft({},Bu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),qk=nn(Hk),Ik=Ft({},xi,{newState:0,oldState:0}),jk=nn(Ik),Yk=[9,13,27,32],jf=cl&&"CompositionEvent"in window,da=null;cl&&"documentMode"in document&&(da=document.documentMode);var Vk=cl&&"TextEvent"in window&&!da,Og=cl&&(!jf||da&&8<da&&11>=da),eh=" ",nh=!1;function zg(t,e){switch(t){case"keyup":return Yk.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var er=!1;function Fk(t,e){switch(t){case"compositionend":return Lg(e);case"keypress":return e.which!==32?null:(nh=!0,eh);case"textInput":return t=e.data,t===eh&&nh?null:t;default:return null}}function Qk(t,e){if(er)return t==="compositionend"||!jf&&zg(t,e)?(t=_g(),Po=qf=Rl=null,er=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Og&&e.locale!=="ko"?null:e.data;default:return null}}var Gk={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function lh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Gk[t.type]:e==="textarea"}function Ug(t,e,n,l){tr?fr?fr.push(l):fr=[l]:tr=l,e=Au(e,"onChange"),0<e.length&&(n=new Uu("onChange","change",null,n,l),t.push({event:n,listeners:e}))}var ma=null,Aa=null;function Xk(t){Av(t,0)}function Hu(t){var e=ca(t);if(Cg(e))return t}function ih(t,e){if(t==="change")return e}var Bg=!1;cl&&(cl?(Lo="oninput"in document,Lo||(mc=document.createElement("div"),mc.setAttribute("oninput","return;"),Lo=typeof mc.oninput=="function"),zo=Lo):zo=!1,Bg=zo&&(!document.documentMode||9<document.documentMode));var zo,Lo,mc;function rh(){ma&&(ma.detachEvent("onpropertychange",Hg),Aa=ma=null)}function Hg(t){if(t.propertyName==="value"&&Hu(Aa)){var e=[];Ug(e,Aa,t,Hf(t)),Dg(Xk,e)}}function Pk(t,e,n){t==="focusin"?(rh(),ma=e,Aa=n,ma.attachEvent("onpropertychange",Hg)):t==="focusout"&&rh()}function Zk(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Hu(Aa)}function Kk(t,e){if(t==="click")return Hu(e)}function Jk(t,e){if(t==="input"||t==="change")return Hu(e)}function $k(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var pn=typeof Object.is=="function"?Object.is:$k;function Ra(t,e){if(pn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),l=Object.keys(e);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!Yc.call(e,i)||!pn(t[i],e[i]))return!1}return!0}function ah(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function oh(t,e){var n=ah(t);t=0;for(var l;n;){if(n.nodeType===3){if(l=t+n.textContent.length,t<=e&&l>=e)return{node:n,offset:e-t};t=l}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=ah(n)}}function qg(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?qg(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Ig(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=cu(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=cu(t.document)}return e}function Yf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Wk=cl&&"documentMode"in document&&11>=document.documentMode,nr=null,Pc=null,pa=null,Zc=!1;function uh(t,e,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Zc||nr==null||nr!==cu(l)||(l=nr,"selectionStart"in l&&Yf(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),pa&&Ra(pa,l)||(pa=l,l=Au(Pc,"onSelect"),0<l.length&&(e=new Uu("onSelect","select",null,e,n),t.push({event:e,listeners:l}),e.target=nr)))}function ii(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var lr={animationend:ii("Animation","AnimationEnd"),animationiteration:ii("Animation","AnimationIteration"),animationstart:ii("Animation","AnimationStart"),transitionrun:ii("Transition","TransitionRun"),transitionstart:ii("Transition","TransitionStart"),transitioncancel:ii("Transition","TransitionCancel"),transitionend:ii("Transition","TransitionEnd")},pc={},jg={};cl&&(jg=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function ki(t){if(pc[t])return pc[t];if(!lr[t])return t;var e=lr[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in jg)return pc[t]=e[n];return t}var Yg=ki("animationend"),Vg=ki("animationiteration"),Fg=ki("animationstart"),tS=ki("transitionrun"),eS=ki("transitionstart"),nS=ki("transitioncancel"),Qg=ki("transitionend"),Gg=new Map,Kc="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(" ");Kc.push("scrollEnd");function zn(t,e){Gg.set(t,e),bi(e,[t])}var sh=new WeakMap;function En(t,e){if(typeof t=="object"&&t!==null){var n=sh.get(t);return n!==void 0?n:(e={value:t,source:e,stack:Pp(e)},sh.set(t,e),e)}return{value:t,source:e,stack:Pp(e)}}var xn=[],ir=0,Vf=0;function qu(){for(var t=ir,e=Vf=ir=0;e<t;){var n=xn[e];xn[e++]=null;var l=xn[e];xn[e++]=null;var i=xn[e];xn[e++]=null;var r=xn[e];if(xn[e++]=null,l!==null&&i!==null){var a=l.pending;a===null?i.next=i:(i.next=a.next,a.next=i),l.pending=i}r!==0&&Xg(n,i,r)}}function Iu(t,e,n,l){xn[ir++]=t,xn[ir++]=e,xn[ir++]=n,xn[ir++]=l,Vf|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function Ff(t,e,n,l){return Iu(t,e,n,l),fu(t)}function Mr(t,e){return Iu(t,null,null,e),fu(t)}function Xg(t,e,n){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n);for(var i=!1,r=t.return;r!==null;)r.childLanes|=n,l=r.alternate,l!==null&&(l.childLanes|=n),r.tag===22&&(t=r.stateNode,t===null||t._visibility&1||(i=!0)),t=r,r=r.return;return t.tag===3?(r=t.stateNode,i&&e!==null&&(i=31-fn(n),t=r.hiddenUpdates,l=t[i],l===null?t[i]=[e]:l.push(e),e.lane=n|536870912),r):null}function fu(t){if(50<wa)throw wa=0,vf=null,Error(O(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var rr={};function lS(t,e,n,l){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function sn(t,e,n,l){return new lS(t,e,n,l)}function Qf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ul(t,e){var n=t.alternate;return n===null?(n=sn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function Pg(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Ko(t,e,n,l,i,r){var a=0;if(l=t,typeof t=="function")Qf(t)&&(a=1);else if(typeof t=="string")a=lT(t,n,Yn.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Hc:return t=sn(31,n,e,i),t.elementType=Hc,t.lanes=r,t;case Ji:return si(n.children,i,r,e);case mg:a=8,i|=24;break;case Lc:return t=sn(12,n,e,i|2),t.elementType=Lc,t.lanes=r,t;case Uc:return t=sn(13,n,e,i),t.elementType=Uc,t.lanes=r,t;case Bc:return t=sn(19,n,e,i),t.elementType=Bc,t.lanes=r,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case Xx:case ll:a=10;break t;case pg:a=9;break t;case Df:a=11;break t;case _f:a=14;break t;case Sl:a=16,l=null;break t}a=29,n=Error(O(130,t===null?"null":typeof t,"")),l=null}return e=sn(a,n,e,i),e.elementType=t,e.type=l,e.lanes=r,e}function si(t,e,n,l){return t=sn(7,t,l,e),t.lanes=n,t}function hc(t,e,n){return t=sn(6,t,null,e),t.lanes=n,t}function gc(t,e,n){return e=sn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var ar=[],or=0,du=null,mu=0,Sn=[],Tn=0,ci=null,il=1,rl="";function ai(t,e){ar[or++]=mu,ar[or++]=du,du=t,mu=e}function Zg(t,e,n){Sn[Tn++]=il,Sn[Tn++]=rl,Sn[Tn++]=ci,ci=t;var l=il;t=rl;var i=32-fn(l)-1;l&=~(1<<i),n+=1;var r=32-fn(e)+i;if(30<r){var a=i-i%5;r=(l&(1<<a)-1).toString(32),l>>=a,i-=a,il=1<<32-fn(e)+i|n<<i|l,rl=r+t}else il=1<<r|n<<i|l,rl=t}function Gf(t){t.return!==null&&(ai(t,1),Zg(t,1,0))}function Xf(t){for(;t===du;)du=ar[--or],ar[or]=null,mu=ar[--or],ar[or]=null;for(;t===ci;)ci=Sn[--Tn],Sn[Tn]=null,rl=Sn[--Tn],Sn[Tn]=null,il=Sn[--Tn],Sn[Tn]=null}var Ge=null,Wt=null,Dt=!1,fi=null,In=!1,Jc=Error(O(519));function hi(t){var e=Error(O(418,""));throw Ma(En(e,t)),Jc}function ch(t){var e=t.stateNode,n=t.type,l=t.memoizedProps;switch(e[ze]=t,e[en]=l,n){case"dialog":yt("cancel",e),yt("close",e);break;case"iframe":case"object":case"embed":yt("load",e);break;case"video":case"audio":for(n=0;n<Oa.length;n++)yt(Oa[n],e);break;case"source":yt("error",e);break;case"img":case"image":case"link":yt("error",e),yt("load",e);break;case"details":yt("toggle",e);break;case"input":yt("invalid",e),Ng(e,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),su(e);break;case"select":yt("invalid",e);break;case"textarea":yt("invalid",e),Rg(e,l.value,l.defaultValue,l.children),su(e)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||l.suppressHydrationWarning===!0||Mv(e.textContent,n)?(l.popover!=null&&(yt("beforetoggle",e),yt("toggle",e)),l.onScroll!=null&&yt("scroll",e),l.onScrollEnd!=null&&yt("scrollend",e),l.onClick!=null&&(e.onclick=Pu),e=!0):e=!1,e||hi(t)}function fh(t){for(Ge=t.return;Ge;)switch(Ge.tag){case 5:case 13:In=!1;return;case 27:case 3:In=!0;return;default:Ge=Ge.return}}function na(t){if(t!==Ge)return!1;if(!Dt)return fh(t),Dt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||wf(t.type,t.memoizedProps)),n=!n),n&&Wt&&hi(t),fh(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(O(317));t:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8)if(n=t.data,n==="/$"){if(e===0){Wt=On(t.nextSibling);break t}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++;t=t.nextSibling}Wt=null}}else e===27?(e=Wt,Fl(t.type)?(t=Nf,Nf=null,Wt=t):Wt=e):Wt=Ge?On(t.stateNode.nextSibling):null;return!0}function Ga(){Wt=Ge=null,Dt=!1}function dh(){var t=fi;return t!==null&&(tn===null?tn=t:tn.push.apply(tn,t),fi=null),t}function Ma(t){fi===null?fi=[t]:fi.push(t)}var $c=Qn(null),Si=null,al=null;function wl(t,e,n){Zt($c,e._currentValue),e._currentValue=n}function sl(t){t._currentValue=$c.current,Te($c)}function Wc(t,e,n){for(;t!==null;){var l=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,l!==null&&(l.childLanes|=e)):l!==null&&(l.childLanes&e)!==e&&(l.childLanes|=e),t===n)break;t=t.return}}function tf(t,e,n,l){var i=t.child;for(i!==null&&(i.return=t);i!==null;){var r=i.dependencies;if(r!==null){var a=i.child;r=r.firstContext;t:for(;r!==null;){var o=r;r=i;for(var u=0;u<e.length;u++)if(o.context===e[u]){r.lanes|=n,o=r.alternate,o!==null&&(o.lanes|=n),Wc(r.return,n,t),l||(a=null);break t}r=o.next}}else if(i.tag===18){if(a=i.return,a===null)throw Error(O(341));a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),Wc(a,n,t),a=null}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}}function Xa(t,e,n,l){t=null;for(var i=e,r=!1;i!==null;){if(!r){if((i.flags&524288)!==0)r=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var a=i.alternate;if(a===null)throw Error(O(387));if(a=a.memoizedProps,a!==null){var o=i.type;pn(i.pendingProps.value,a.value)||(t!==null?t.push(o):t=[o])}}else if(i===ru.current){if(a=i.alternate,a===null)throw Error(O(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(t!==null?t.push(Ua):t=[Ua])}i=i.return}t!==null&&tf(e,t,n,l),e.flags|=262144}function pu(t){for(t=t.firstContext;t!==null;){if(!pn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function gi(t){Si=t,al=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Le(t){return Kg(Si,t)}function Uo(t,e){return Si===null&&gi(t),Kg(t,e)}function Kg(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},al===null){if(t===null)throw Error(O(308));al=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else al=al.next=e;return n}var iS=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},rS=ye.unstable_scheduleCallback,aS=ye.unstable_NormalPriority,he={$$typeof:ll,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Pf(){return{controller:new iS,data:new Map,refCount:0}}function Pa(t){t.refCount--,t.refCount===0&&rS(aS,function(){t.controller.abort()})}var ha=null,ef=0,xr=0,dr=null;function oS(t,e){if(ha===null){var n=ha=[];ef=0,xr=yd(),dr={status:"pending",value:void 0,then:function(l){n.push(l)}}}return ef++,e.then(mh,mh),e}function mh(){if(--ef===0&&ha!==null){dr!==null&&(dr.status="fulfilled");var t=ha;ha=null,xr=0,dr=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function uS(t,e){var n=[],l={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return t.then(function(){l.status="fulfilled",l.value=e;for(var i=0;i<n.length;i++)(0,n[i])(e)},function(i){for(l.status="rejected",l.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),l}var ph=it.S;it.S=function(t,e){typeof e=="object"&&e!==null&&typeof e.then=="function"&&oS(t,e),ph!==null&&ph(t,e)};var di=Qn(null);function Zf(){var t=di.current;return t!==null?t:Vt.pooledCache}function Jo(t,e){e===null?Zt(di,di.current):Zt(di,e.pool)}function Jg(){var t=Zf();return t===null?null:{parent:he._currentValue,pool:t}}var Za=Error(O(460)),$g=Error(O(474)),ju=Error(O(542)),nf={then:function(){}};function hh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Bo(){}function Wg(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Bo,Bo),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,yh(t),t;default:if(typeof e.status=="string")e.then(Bo,Bo);else{if(t=Vt,t!==null&&100<t.shellSuspendCounter)throw Error(O(482));t=e,t.status="pending",t.then(function(l){if(e.status==="pending"){var i=e;i.status="fulfilled",i.value=l}},function(l){if(e.status==="pending"){var i=e;i.status="rejected",i.reason=l}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,yh(t),t}throw ga=e,Za}}var ga=null;function gh(){if(ga===null)throw Error(O(459));var t=ga;return ga=null,t}function yh(t){if(t===Za||t===ju)throw Error(O(483))}var Tl=!1;function Kf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lf(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ol(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function zl(t,e,n){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Ut&2)!==0){var i=l.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),l.pending=e,e=fu(t),Xg(t,null,n),e}return Iu(t,l,e,n),fu(t)}function ya(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,kg(t,n)}}function yc(t,e){var n=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?i=r=a:r=r.next=a,n=n.next}while(n!==null);r===null?i=r=e:r=r.next=e}else i=r=e;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var rf=!1;function va(){if(rf){var t=dr;if(t!==null)throw t}}function ba(t,e,n,l){rf=!1;var i=t.updateQueue;Tl=!1;var r=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var u=o,s=u.next;u.next=null,a===null?r=s:a.next=s,a=u;var f=t.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=s:o.next=s,f.lastBaseUpdate=u))}if(r!==null){var c=i.baseState;a=0,f=s=u=null,o=r;do{var m=o.lane&-536870913,d=m!==o.lane;if(d?(wt&m)===m:(l&m)===m){m!==0&&m===xr&&(rf=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});t:{var g=t,b=o;m=e;var N=n;switch(b.tag){case 1:if(g=b.payload,typeof g=="function"){c=g.call(N,c,m);break t}c=g;break t;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,m=typeof g=="function"?g.call(N,c,m):g,m==null)break t;c=Ft({},c,m);break t;case 2:Tl=!0}}m=o.callback,m!==null&&(t.flags|=64,d&&(t.flags|=8192),d=i.callbacks,d===null?i.callbacks=[m]:d.push(m))}else d={lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(s=f=d,u=c):f=f.next=d,a|=m;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;d=o,o=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);f===null&&(u=c),i.baseState=u,i.firstBaseUpdate=s,i.lastBaseUpdate=f,r===null&&(i.shared.lanes=0),Yl|=a,t.lanes=a,t.memoizedState=c}}function ty(t,e){if(typeof t!="function")throw Error(O(191,t));t.call(e)}function ey(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)ty(n[t],e)}var kr=Qn(null),hu=Qn(0);function vh(t,e){t=ml,Zt(hu,t),Zt(kr,e),ml=t|e.baseLanes}function af(){Zt(hu,ml),Zt(kr,kr.current)}function Jf(){ml=hu.current,Te(kr),Te(hu)}var Il=0,pt=null,It=null,fe=null,gu=!1,mr=!1,yi=!1,yu=0,Da=0,pr=null,sS=0;function re(){throw Error(O(321))}function $f(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!pn(t[n],e[n]))return!1;return!0}function Wf(t,e,n,l,i,r){return Il=r,pt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,it.H=t===null||t.memoizedState===null?_y:Oy,yi=!1,r=n(l,i),yi=!1,mr&&(r=ly(e,n,l,i)),ny(t),r}function ny(t){it.H=vu;var e=It!==null&&It.next!==null;if(Il=0,fe=It=pt=null,gu=!1,Da=0,pr=null,e)throw Error(O(300));t===null||Se||(t=t.dependencies,t!==null&&pu(t)&&(Se=!0))}function ly(t,e,n,l){pt=t;var i=0;do{if(mr&&(pr=null),Da=0,mr=!1,25<=i)throw Error(O(301));if(i+=1,fe=It=null,t.updateQueue!=null){var r=t.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}it.H=gS,r=e(n,l)}while(mr);return r}function cS(){var t=it.H,e=t.useState()[0];return e=typeof e.then=="function"?Ka(e):e,t=t.useState()[0],(It!==null?It.memoizedState:null)!==t&&(pt.flags|=1024),e}function td(){var t=yu!==0;return yu=0,t}function ed(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function nd(t){if(gu){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}gu=!1}Il=0,fe=It=pt=null,mr=!1,Da=yu=0,pr=null}function $e(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fe===null?pt.memoizedState=fe=t:fe=fe.next=t,fe}function de(){if(It===null){var t=pt.alternate;t=t!==null?t.memoizedState:null}else t=It.next;var e=fe===null?pt.memoizedState:fe.next;if(e!==null)fe=e,It=t;else{if(t===null)throw pt.alternate===null?Error(O(467)):Error(O(310));It=t,t={memoizedState:It.memoizedState,baseState:It.baseState,baseQueue:It.baseQueue,queue:It.queue,next:null},fe===null?pt.memoizedState=fe=t:fe=fe.next=t}return fe}function ld(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ka(t){var e=Da;return Da+=1,pr===null&&(pr=[]),t=Wg(pr,t,e),e=pt,(fe===null?e.memoizedState:fe.next)===null&&(e=e.alternate,it.H=e===null||e.memoizedState===null?_y:Oy),t}function Yu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ka(t);if(t.$$typeof===ll)return Le(t)}throw Error(O(438,String(t)))}function id(t){var e=null,n=pt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var l=pt.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(e={data:l.data.map(function(i){return i.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=ld(),pt.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),l=0;l<t;l++)n[l]=Px;return e.index++,n}function fl(t,e){return typeof e=="function"?e(t):e}function $o(t){var e=de();return rd(e,It,t)}function rd(t,e,n){var l=t.queue;if(l===null)throw Error(O(311));l.lastRenderedReducer=n;var i=t.baseQueue,r=l.pending;if(r!==null){if(i!==null){var a=i.next;i.next=r.next,r.next=a}e.baseQueue=i=r,l.pending=null}if(r=t.baseState,i===null)t.memoizedState=r;else{e=i.next;var o=a=null,u=null,s=e,f=!1;do{var c=s.lane&-536870913;if(c!==s.lane?(wt&c)===c:(Il&c)===c){var m=s.revertLane;if(m===0)u!==null&&(u=u.next={lane:0,revertLane:0,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}),c===xr&&(f=!0);else if((Il&m)===m){s=s.next,m===xr&&(f=!0);continue}else c={lane:0,revertLane:s.revertLane,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null},u===null?(o=u=c,a=r):u=u.next=c,pt.lanes|=m,Yl|=m;c=s.action,yi&&n(r,c),r=s.hasEagerState?s.eagerState:n(r,c)}else m={lane:c,revertLane:s.revertLane,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null},u===null?(o=u=m,a=r):u=u.next=m,pt.lanes|=c,Yl|=c;s=s.next}while(s!==null&&s!==e);if(u===null?a=r:u.next=o,!pn(r,t.memoizedState)&&(Se=!0,f&&(n=dr,n!==null)))throw n;t.memoizedState=r,t.baseState=a,t.baseQueue=u,l.lastRenderedState=r}return i===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function vc(t){var e=de(),n=e.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=t;var l=n.dispatch,i=n.pending,r=e.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do r=t(r,a.action),a=a.next;while(a!==i);pn(r,e.memoizedState)||(Se=!0),e.memoizedState=r,e.baseQueue===null&&(e.baseState=r),n.lastRenderedState=r}return[r,l]}function iy(t,e,n){var l=pt,i=de(),r=Dt;if(r){if(n===void 0)throw Error(O(407));n=n()}else n=e();var a=!pn((It||i).memoizedState,n);a&&(i.memoizedState=n,Se=!0),i=i.queue;var o=oy.bind(null,l,i,t);if(Ja(2048,8,o,[t]),i.getSnapshot!==e||a||fe!==null&&fe.memoizedState.tag&1){if(l.flags|=2048,Sr(9,Vu(),ay.bind(null,l,i,n,e),null),Vt===null)throw Error(O(349));r||(Il&124)!==0||ry(l,e,n)}return n}function ry(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=pt.updateQueue,e===null?(e=ld(),pt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function ay(t,e,n,l){e.value=n,e.getSnapshot=l,uy(e)&&sy(t)}function oy(t,e,n){return n(function(){uy(e)&&sy(t)})}function uy(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!pn(t,n)}catch{return!0}}function sy(t){var e=Mr(t,2);e!==null&&mn(e,t,2)}function of(t){var e=$e();if(typeof t=="function"){var n=t;if(t=n(),yi){Al(!0);try{n()}finally{Al(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:t},e}function cy(t,e,n,l){return t.baseState=n,rd(t,It,typeof l=="function"?l:fl)}function fS(t,e,n,l,i){if(Fu(t))throw Error(O(485));if(t=e.action,t!==null){var r={payload:i,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){r.listeners.push(a)}};it.T!==null?n(!0):r.isTransition=!1,l(r),n=e.pending,n===null?(r.next=e.pending=r,fy(e,r)):(r.next=n.next,e.pending=n.next=r)}}function fy(t,e){var n=e.action,l=e.payload,i=t.state;if(e.isTransition){var r=it.T,a={};it.T=a;try{var o=n(i,l),u=it.S;u!==null&&u(a,o),bh(t,e,o)}catch(s){uf(t,e,s)}finally{it.T=r}}else try{r=n(i,l),bh(t,e,r)}catch(s){uf(t,e,s)}}function bh(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){xh(t,e,l)},function(l){return uf(t,e,l)}):xh(t,e,n)}function xh(t,e,n){e.status="fulfilled",e.value=n,dy(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,fy(t,n)))}function uf(t,e,n){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do e.status="rejected",e.reason=n,dy(e),e=e.next;while(e!==l)}t.action=null}function dy(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function my(t,e){return e}function kh(t,e){if(Dt){var n=Vt.formState;if(n!==null){t:{var l=pt;if(Dt){if(Wt){e:{for(var i=Wt,r=In;i.nodeType!==8;){if(!r){i=null;break e}if(i=On(i.nextSibling),i===null){i=null;break e}}r=i.data,i=r==="F!"||r==="F"?i:null}if(i){Wt=On(i.nextSibling),l=i.data==="F!";break t}}hi(l)}l=!1}l&&(e=n[0])}}return n=$e(),n.memoizedState=n.baseState=e,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:my,lastRenderedState:e},n.queue=l,n=Ry.bind(null,pt,l),l.dispatch=n,l=of(!1),r=sd.bind(null,pt,!1,l.queue),l=$e(),i={state:e,dispatch:null,action:t,pending:null},l.queue=i,n=fS.bind(null,pt,i,r,n),i.dispatch=n,l.memoizedState=t,[e,n,!1]}function Sh(t){var e=de();return py(e,It,t)}function py(t,e,n){if(e=rd(t,e,my)[0],t=$o(fl)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var l=Ka(e)}catch(a){throw a===Za?ju:a}else l=e;e=de();var i=e.queue,r=i.dispatch;return n!==e.memoizedState&&(pt.flags|=2048,Sr(9,Vu(),dS.bind(null,i,n),null)),[l,r,t]}function dS(t,e){t.action=e}function Th(t){var e=de(),n=It;if(n!==null)return py(e,n,t);de(),e=e.memoizedState,n=de();var l=n.queue.dispatch;return n.memoizedState=t,[e,l,!1]}function Sr(t,e,n,l){return t={tag:t,create:n,deps:l,inst:e,next:null},e=pt.updateQueue,e===null&&(e=ld(),pt.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(l=n.next,n.next=t,t.next=l,e.lastEffect=t),t}function Vu(){return{destroy:void 0,resource:void 0}}function hy(){return de().memoizedState}function Wo(t,e,n,l){var i=$e();l=l===void 0?null:l,pt.flags|=t,i.memoizedState=Sr(1|e,Vu(),n,l)}function Ja(t,e,n,l){var i=de();l=l===void 0?null:l;var r=i.memoizedState.inst;It!==null&&l!==null&&$f(l,It.memoizedState.deps)?i.memoizedState=Sr(e,r,n,l):(pt.flags|=t,i.memoizedState=Sr(1|e,r,n,l))}function wh(t,e){Wo(8390656,8,t,e)}function gy(t,e){Ja(2048,8,t,e)}function yy(t,e){return Ja(4,2,t,e)}function vy(t,e){return Ja(4,4,t,e)}function by(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function xy(t,e,n){n=n!=null?n.concat([t]):null,Ja(4,4,by.bind(null,e,t),n)}function ad(){}function ky(t,e){var n=de();e=e===void 0?null:e;var l=n.memoizedState;return e!==null&&$f(e,l[1])?l[0]:(n.memoizedState=[t,e],t)}function Sy(t,e){var n=de();e=e===void 0?null:e;var l=n.memoizedState;if(e!==null&&$f(e,l[1]))return l[0];if(l=t(),yi){Al(!0);try{t()}finally{Al(!1)}}return n.memoizedState=[l,e],l}function od(t,e,n){return n===void 0||(Il&1073741824)!==0?t.memoizedState=e:(t.memoizedState=n,t=dv(),pt.lanes|=t,Yl|=t,n)}function Ty(t,e,n,l){return pn(n,e)?n:kr.current!==null?(t=od(t,n,l),pn(t,e)||(Se=!0),t):(Il&42)===0?(Se=!0,t.memoizedState=n):(t=dv(),pt.lanes|=t,Yl|=t,e)}function wy(t,e,n,l,i){var r=_t.p;_t.p=r!==0&&8>r?r:8;var a=it.T,o={};it.T=o,sd(t,!1,e,n);try{var u=i(),s=it.S;if(s!==null&&s(o,u),u!==null&&typeof u=="object"&&typeof u.then=="function"){var f=uS(u,l);xa(t,e,f,dn(t))}else xa(t,e,l,dn(t))}catch(c){xa(t,e,{then:function(){},status:"rejected",reason:c},dn())}finally{_t.p=r,it.T=a}}function mS(){}function sf(t,e,n,l){if(t.tag!==5)throw Error(O(476));var i=Ey(t).queue;wy(t,i,e,ui,n===null?mS:function(){return Cy(t),n(l)})}function Ey(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:ui,baseState:ui,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:ui},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Cy(t){var e=Ey(t).next.queue;xa(t,e,{},dn())}function ud(){return Le(Ua)}function Ny(){return de().memoizedState}function Ay(){return de().memoizedState}function pS(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=dn();t=Ol(n);var l=zl(e,t,n);l!==null&&(mn(l,e,n),ya(l,e,n)),e={cache:Pf()},t.payload=e;return}e=e.return}}function hS(t,e,n){var l=dn();n={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Fu(t)?My(e,n):(n=Ff(t,e,n,l),n!==null&&(mn(n,t,l),Dy(n,e,l)))}function Ry(t,e,n){var l=dn();xa(t,e,n,l)}function xa(t,e,n,l){var i={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fu(t))My(e,i);else{var r=t.alternate;if(t.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var a=e.lastRenderedState,o=r(a,n);if(i.hasEagerState=!0,i.eagerState=o,pn(o,a))return Iu(t,e,i,0),Vt===null&&qu(),!1}catch{}finally{}if(n=Ff(t,e,i,l),n!==null)return mn(n,t,l),Dy(n,e,l),!0}return!1}function sd(t,e,n,l){if(l={lane:2,revertLane:yd(),action:l,hasEagerState:!1,eagerState:null,next:null},Fu(t)){if(e)throw Error(O(479))}else e=Ff(t,n,l,2),e!==null&&mn(e,t,2)}function Fu(t){var e=t.alternate;return t===pt||e!==null&&e===pt}function My(t,e){mr=gu=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Dy(t,e,n){if((n&4194048)!==0){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,kg(t,n)}}var vu={readContext:Le,use:Yu,useCallback:re,useContext:re,useEffect:re,useImperativeHandle:re,useLayoutEffect:re,useInsertionEffect:re,useMemo:re,useReducer:re,useRef:re,useState:re,useDebugValue:re,useDeferredValue:re,useTransition:re,useSyncExternalStore:re,useId:re,useHostTransitionStatus:re,useFormState:re,useActionState:re,useOptimistic:re,useMemoCache:re,useCacheRefresh:re},_y={readContext:Le,use:Yu,useCallback:function(t,e){return $e().memoizedState=[t,e===void 0?null:e],t},useContext:Le,useEffect:wh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,Wo(4194308,4,by.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Wo(4194308,4,t,e)},useInsertionEffect:function(t,e){Wo(4,2,t,e)},useMemo:function(t,e){var n=$e();e=e===void 0?null:e;var l=t();if(yi){Al(!0);try{t()}finally{Al(!1)}}return n.memoizedState=[l,e],l},useReducer:function(t,e,n){var l=$e();if(n!==void 0){var i=n(e);if(yi){Al(!0);try{n(e)}finally{Al(!1)}}}else i=e;return l.memoizedState=l.baseState=i,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},l.queue=t,t=t.dispatch=hS.bind(null,pt,t),[l.memoizedState,t]},useRef:function(t){var e=$e();return t={current:t},e.memoizedState=t},useState:function(t){t=of(t);var e=t.queue,n=Ry.bind(null,pt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:ad,useDeferredValue:function(t,e){var n=$e();return od(n,t,e)},useTransition:function(){var t=of(!1);return t=wy.bind(null,pt,t.queue,!0,!1),$e().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var l=pt,i=$e();if(Dt){if(n===void 0)throw Error(O(407));n=n()}else{if(n=e(),Vt===null)throw Error(O(349));(wt&124)!==0||ry(l,e,n)}i.memoizedState=n;var r={value:n,getSnapshot:e};return i.queue=r,wh(oy.bind(null,l,r,t),[t]),l.flags|=2048,Sr(9,Vu(),ay.bind(null,l,r,n,e),null),n},useId:function(){var t=$e(),e=Vt.identifierPrefix;if(Dt){var n=rl,l=il;n=(l&~(1<<32-fn(l)-1)).toString(32)+n,e="\xAB"+e+"R"+n,n=yu++,0<n&&(e+="H"+n.toString(32)),e+="\xBB"}else n=sS++,e="\xAB"+e+"r"+n.toString(32)+"\xBB";return t.memoizedState=e},useHostTransitionStatus:ud,useFormState:kh,useActionState:kh,useOptimistic:function(t){var e=$e();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=sd.bind(null,pt,!0,n),n.dispatch=e,[t,e]},useMemoCache:id,useCacheRefresh:function(){return $e().memoizedState=pS.bind(null,pt)}},Oy={readContext:Le,use:Yu,useCallback:ky,useContext:Le,useEffect:gy,useImperativeHandle:xy,useInsertionEffect:yy,useLayoutEffect:vy,useMemo:Sy,useReducer:$o,useRef:hy,useState:function(){return $o(fl)},useDebugValue:ad,useDeferredValue:function(t,e){var n=de();return Ty(n,It.memoizedState,t,e)},useTransition:function(){var t=$o(fl)[0],e=de().memoizedState;return[typeof t=="boolean"?t:Ka(t),e]},useSyncExternalStore:iy,useId:Ny,useHostTransitionStatus:ud,useFormState:Sh,useActionState:Sh,useOptimistic:function(t,e){var n=de();return cy(n,It,t,e)},useMemoCache:id,useCacheRefresh:Ay},gS={readContext:Le,use:Yu,useCallback:ky,useContext:Le,useEffect:gy,useImperativeHandle:xy,useInsertionEffect:yy,useLayoutEffect:vy,useMemo:Sy,useReducer:vc,useRef:hy,useState:function(){return vc(fl)},useDebugValue:ad,useDeferredValue:function(t,e){var n=de();return It===null?od(n,t,e):Ty(n,It.memoizedState,t,e)},useTransition:function(){var t=vc(fl)[0],e=de().memoizedState;return[typeof t=="boolean"?t:Ka(t),e]},useSyncExternalStore:iy,useId:Ny,useHostTransitionStatus:ud,useFormState:Th,useActionState:Th,useOptimistic:function(t,e){var n=de();return It!==null?cy(n,It,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:id,useCacheRefresh:Ay},hr=null,_a=0;function Ho(t){var e=_a;return _a+=1,hr===null&&(hr=[]),Wg(hr,t,e)}function la(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function qo(t,e){throw e.$$typeof===Gx?Error(O(525)):(t=Object.prototype.toString.call(e),Error(O(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Eh(t){var e=t._init;return e(t._payload)}function zy(t){function e(p,h){if(t){var y=p.deletions;y===null?(p.deletions=[h],p.flags|=16):y.push(h)}}function n(p,h){if(!t)return null;for(;h!==null;)e(p,h),h=h.sibling;return null}function l(p){for(var h=new Map;p!==null;)p.key!==null?h.set(p.key,p):h.set(p.index,p),p=p.sibling;return h}function i(p,h){return p=ul(p,h),p.index=0,p.sibling=null,p}function r(p,h,y){return p.index=y,t?(y=p.alternate,y!==null?(y=y.index,y<h?(p.flags|=67108866,h):y):(p.flags|=67108866,h)):(p.flags|=1048576,h)}function a(p){return t&&p.alternate===null&&(p.flags|=67108866),p}function o(p,h,y,w){return h===null||h.tag!==6?(h=hc(y,p.mode,w),h.return=p,h):(h=i(h,y),h.return=p,h)}function u(p,h,y,w){var A=y.type;return A===Ji?f(p,h,y.props.children,w,y.key):h!==null&&(h.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Sl&&Eh(A)===h.type)?(h=i(h,y.props),la(h,y),h.return=p,h):(h=Ko(y.type,y.key,y.props,null,p.mode,w),la(h,y),h.return=p,h)}function s(p,h,y,w){return h===null||h.tag!==4||h.stateNode.containerInfo!==y.containerInfo||h.stateNode.implementation!==y.implementation?(h=gc(y,p.mode,w),h.return=p,h):(h=i(h,y.children||[]),h.return=p,h)}function f(p,h,y,w,A){return h===null||h.tag!==7?(h=si(y,p.mode,w,A),h.return=p,h):(h=i(h,y),h.return=p,h)}function c(p,h,y){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=hc(""+h,p.mode,y),h.return=p,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Ro:return y=Ko(h.type,h.key,h.props,null,p.mode,y),la(y,h),y.return=p,y;case ua:return h=gc(h,p.mode,y),h.return=p,h;case Sl:var w=h._init;return h=w(h._payload),c(p,h,y)}if(sa(h)||ta(h))return h=si(h,p.mode,y,null),h.return=p,h;if(typeof h.then=="function")return c(p,Ho(h),y);if(h.$$typeof===ll)return c(p,Uo(p,h),y);qo(p,h)}return null}function m(p,h,y,w){var A=h!==null?h.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return A!==null?null:o(p,h,""+y,w);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ro:return y.key===A?u(p,h,y,w):null;case ua:return y.key===A?s(p,h,y,w):null;case Sl:return A=y._init,y=A(y._payload),m(p,h,y,w)}if(sa(y)||ta(y))return A!==null?null:f(p,h,y,w,null);if(typeof y.then=="function")return m(p,h,Ho(y),w);if(y.$$typeof===ll)return m(p,h,Uo(p,y),w);qo(p,y)}return null}function d(p,h,y,w,A){if(typeof w=="string"&&w!==""||typeof w=="number"||typeof w=="bigint")return p=p.get(y)||null,o(h,p,""+w,A);if(typeof w=="object"&&w!==null){switch(w.$$typeof){case Ro:return p=p.get(w.key===null?y:w.key)||null,u(h,p,w,A);case ua:return p=p.get(w.key===null?y:w.key)||null,s(h,p,w,A);case Sl:var E=w._init;return w=E(w._payload),d(p,h,y,w,A)}if(sa(w)||ta(w))return p=p.get(y)||null,f(h,p,w,A,null);if(typeof w.then=="function")return d(p,h,y,Ho(w),A);if(w.$$typeof===ll)return d(p,h,y,Uo(h,w),A);qo(h,w)}return null}function g(p,h,y,w){for(var A=null,E=null,D=h,L=h=0,I=null;D!==null&&L<y.length;L++){D.index>L?(I=D,D=null):I=D.sibling;var T=m(p,D,y[L],w);if(T===null){D===null&&(D=I);break}t&&D&&T.alternate===null&&e(p,D),h=r(T,h,L),E===null?A=T:E.sibling=T,E=T,D=I}if(L===y.length)return n(p,D),Dt&&ai(p,L),A;if(D===null){for(;L<y.length;L++)D=c(p,y[L],w),D!==null&&(h=r(D,h,L),E===null?A=D:E.sibling=D,E=D);return Dt&&ai(p,L),A}for(D=l(D);L<y.length;L++)I=d(D,p,L,y[L],w),I!==null&&(t&&I.alternate!==null&&D.delete(I.key===null?L:I.key),h=r(I,h,L),E===null?A=I:E.sibling=I,E=I);return t&&D.forEach(function(lt){return e(p,lt)}),Dt&&ai(p,L),A}function b(p,h,y,w){if(y==null)throw Error(O(151));for(var A=null,E=null,D=h,L=h=0,I=null,T=y.next();D!==null&&!T.done;L++,T=y.next()){D.index>L?(I=D,D=null):I=D.sibling;var lt=m(p,D,T.value,w);if(lt===null){D===null&&(D=I);break}t&&D&&lt.alternate===null&&e(p,D),h=r(lt,h,L),E===null?A=lt:E.sibling=lt,E=lt,D=I}if(T.done)return n(p,D),Dt&&ai(p,L),A;if(D===null){for(;!T.done;L++,T=y.next())T=c(p,T.value,w),T!==null&&(h=r(T,h,L),E===null?A=T:E.sibling=T,E=T);return Dt&&ai(p,L),A}for(D=l(D);!T.done;L++,T=y.next())T=d(D,p,L,T.value,w),T!==null&&(t&&T.alternate!==null&&D.delete(T.key===null?L:T.key),h=r(T,h,L),E===null?A=T:E.sibling=T,E=T);return t&&D.forEach(function(K){return e(p,K)}),Dt&&ai(p,L),A}function N(p,h,y,w){if(typeof y=="object"&&y!==null&&y.type===Ji&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Ro:t:{for(var A=y.key;h!==null;){if(h.key===A){if(A=y.type,A===Ji){if(h.tag===7){n(p,h.sibling),w=i(h,y.props.children),w.return=p,p=w;break t}}else if(h.elementType===A||typeof A=="object"&&A!==null&&A.$$typeof===Sl&&Eh(A)===h.type){n(p,h.sibling),w=i(h,y.props),la(w,y),w.return=p,p=w;break t}n(p,h);break}else e(p,h);h=h.sibling}y.type===Ji?(w=si(y.props.children,p.mode,w,y.key),w.return=p,p=w):(w=Ko(y.type,y.key,y.props,null,p.mode,w),la(w,y),w.return=p,p=w)}return a(p);case ua:t:{for(A=y.key;h!==null;){if(h.key===A)if(h.tag===4&&h.stateNode.containerInfo===y.containerInfo&&h.stateNode.implementation===y.implementation){n(p,h.sibling),w=i(h,y.children||[]),w.return=p,p=w;break t}else{n(p,h);break}else e(p,h);h=h.sibling}w=gc(y,p.mode,w),w.return=p,p=w}return a(p);case Sl:return A=y._init,y=A(y._payload),N(p,h,y,w)}if(sa(y))return g(p,h,y,w);if(ta(y)){if(A=ta(y),typeof A!="function")throw Error(O(150));return y=A.call(y),b(p,h,y,w)}if(typeof y.then=="function")return N(p,h,Ho(y),w);if(y.$$typeof===ll)return N(p,h,Uo(p,y),w);qo(p,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,h!==null&&h.tag===6?(n(p,h.sibling),w=i(h,y),w.return=p,p=w):(n(p,h),w=hc(y,p.mode,w),w.return=p,p=w),a(p)):n(p,h)}return function(p,h,y,w){try{_a=0;var A=N(p,h,y,w);return hr=null,A}catch(D){if(D===Za||D===ju)throw D;var E=sn(29,D,null,p.mode);return E.lanes=w,E.return=p,E}finally{}}}var Tr=zy(!0),Ly=zy(!1),Nn=Qn(null),Fn=null;function El(t){var e=t.alternate;Zt(ge,ge.current&1),Zt(Nn,t),Fn===null&&(e===null||kr.current!==null||e.memoizedState!==null)&&(Fn=t)}function Uy(t){if(t.tag===22){if(Zt(ge,ge.current),Zt(Nn,t),Fn===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(Fn=t)}}else Cl(t)}function Cl(){Zt(ge,ge.current),Zt(Nn,Nn.current)}function ol(t){Te(Nn),Fn===t&&(Fn=null),Te(ge)}var ge=Qn(0);function bu(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||Cf(n)))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function bc(t,e,n,l){e=t.memoizedState,n=n(l,e),n=n==null?e:Ft({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var cf={enqueueSetState:function(t,e,n){t=t._reactInternals;var l=dn(),i=Ol(l);i.payload=e,n!=null&&(i.callback=n),e=zl(t,i,l),e!==null&&(mn(e,t,l),ya(e,t,l))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var l=dn(),i=Ol(l);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=zl(t,i,l),e!==null&&(mn(e,t,l),ya(e,t,l))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=dn(),l=Ol(n);l.tag=2,e!=null&&(l.callback=e),e=zl(t,l,n),e!==null&&(mn(e,t,n),ya(e,t,n))}};function Ch(t,e,n,l,i,r,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,r,a):e.prototype&&e.prototype.isPureReactComponent?!Ra(n,l)||!Ra(i,r):!0}function Nh(t,e,n,l){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,l),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,l),e.state!==t&&cf.enqueueReplaceState(e,e.state,null)}function vi(t,e){var n=e;if("ref"in e){n={};for(var l in e)l!=="ref"&&(n[l]=e[l])}if(t=t.defaultProps){n===e&&(n=Ft({},n));for(var i in t)n[i]===void 0&&(n[i]=t[i])}return n}var xu=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function By(t){xu(t)}function Hy(t){console.error(t)}function qy(t){xu(t)}function ku(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(l){setTimeout(function(){throw l})}}function Ah(t,e,n){try{var l=t.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function ff(t,e,n){return n=Ol(n),n.tag=3,n.payload={element:null},n.callback=function(){ku(t,e)},n}function Iy(t){return t=Ol(t),t.tag=3,t}function jy(t,e,n,l){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=l.value;t.payload=function(){return i(r)},t.callback=function(){Ah(e,n,l)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(t.callback=function(){Ah(e,n,l),typeof i!="function"&&(Ll===null?Ll=new Set([this]):Ll.add(this));var o=l.stack;this.componentDidCatch(l.value,{componentStack:o!==null?o:""})})}function yS(t,e,n,l,i){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(e=n.alternate,e!==null&&Xa(e,n,i,!0),n=Nn.current,n!==null){switch(n.tag){case 13:return Fn===null?bf():n.alternate===null&&te===0&&(te=3),n.flags&=-257,n.flags|=65536,n.lanes=i,l===nf?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([l]):e.add(l),Mc(t,l,i)),!1;case 22:return n.flags|=65536,l===nf?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([l]):n.add(l)),Mc(t,l,i)),!1}throw Error(O(435,n.tag))}return Mc(t,l,i),bf(),!1}if(Dt)return e=Nn.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=i,l!==Jc&&(t=Error(O(422),{cause:l}),Ma(En(t,n)))):(l!==Jc&&(e=Error(O(423),{cause:l}),Ma(En(e,n))),t=t.current.alternate,t.flags|=65536,i&=-i,t.lanes|=i,l=En(l,n),i=ff(t.stateNode,l,i),yc(t,i),te!==4&&(te=2)),!1;var r=Error(O(520),{cause:l});if(r=En(r,n),Ta===null?Ta=[r]:Ta.push(r),te!==4&&(te=2),e===null)return!0;l=En(l,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=i&-i,n.lanes|=t,t=ff(n.stateNode,l,t),yc(n,t),!1;case 1:if(e=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Ll===null||!Ll.has(r))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Iy(i),jy(i,t,n,l),yc(n,i),!1}n=n.return}while(n!==null);return!1}var Yy=Error(O(461)),Se=!1;function Ce(t,e,n,l){e.child=t===null?Ly(e,null,n,l):Tr(e,t.child,n,l)}function Rh(t,e,n,l,i){n=n.render;var r=e.ref;if("ref"in l){var a={};for(var o in l)o!=="ref"&&(a[o]=l[o])}else a=l;return gi(e),l=Wf(t,e,n,a,r,i),o=td(),t!==null&&!Se?(ed(t,e,i),dl(t,e,i)):(Dt&&o&&Gf(e),e.flags|=1,Ce(t,e,l,i),e.child)}function Mh(t,e,n,l,i){if(t===null){var r=n.type;return typeof r=="function"&&!Qf(r)&&r.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=r,Vy(t,e,r,l,i)):(t=Ko(n.type,null,l,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(r=t.child,!cd(t,i)){var a=r.memoizedProps;if(n=n.compare,n=n!==null?n:Ra,n(a,l)&&t.ref===e.ref)return dl(t,e,i)}return e.flags|=1,t=ul(r,l),t.ref=e.ref,t.return=e,e.child=t}function Vy(t,e,n,l,i){if(t!==null){var r=t.memoizedProps;if(Ra(r,l)&&t.ref===e.ref)if(Se=!1,e.pendingProps=l=r,cd(t,i))(t.flags&131072)!==0&&(Se=!0);else return e.lanes=t.lanes,dl(t,e,i)}return df(t,e,n,l,i)}function Fy(t,e,n){var l=e.pendingProps,i=l.children,r=t!==null?t.memoizedState:null;if(l.mode==="hidden"){if((e.flags&128)!==0){if(l=r!==null?r.baseLanes|n:n,t!==null){for(i=e.child=t.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;e.childLanes=r&~l}else e.childLanes=0,e.child=null;return Dh(t,e,l,n)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&Jo(e,r!==null?r.cachePool:null),r!==null?vh(e,r):af(),Uy(e);else return e.lanes=e.childLanes=536870912,Dh(t,e,r!==null?r.baseLanes|n:n,n)}else r!==null?(Jo(e,r.cachePool),vh(e,r),Cl(e),e.memoizedState=null):(t!==null&&Jo(e,null),af(),Cl(e));return Ce(t,e,i,n),e.child}function Dh(t,e,n,l){var i=Zf();return i=i===null?null:{parent:he._currentValue,pool:i},e.memoizedState={baseLanes:n,cachePool:i},t!==null&&Jo(e,null),af(),Uy(e),t!==null&&Xa(t,e,l,!0),null}function tu(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(O(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function df(t,e,n,l,i){return gi(e),n=Wf(t,e,n,l,void 0,i),l=td(),t!==null&&!Se?(ed(t,e,i),dl(t,e,i)):(Dt&&l&&Gf(e),e.flags|=1,Ce(t,e,n,i),e.child)}function _h(t,e,n,l,i,r){return gi(e),e.updateQueue=null,n=ly(e,l,n,i),ny(t),l=td(),t!==null&&!Se?(ed(t,e,r),dl(t,e,r)):(Dt&&l&&Gf(e),e.flags|=1,Ce(t,e,n,r),e.child)}function Oh(t,e,n,l,i){if(gi(e),e.stateNode===null){var r=rr,a=n.contextType;typeof a=="object"&&a!==null&&(r=Le(a)),r=new n(l,r),e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=cf,e.stateNode=r,r._reactInternals=e,r=e.stateNode,r.props=l,r.state=e.memoizedState,r.refs={},Kf(e),a=n.contextType,r.context=typeof a=="object"&&a!==null?Le(a):rr,r.state=e.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(bc(e,n,a,l),r.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(a=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),a!==r.state&&cf.enqueueReplaceState(r,r.state,null),ba(e,l,r,i),va(),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308),l=!0}else if(t===null){r=e.stateNode;var o=e.memoizedProps,u=vi(n,o);r.props=u;var s=r.context,f=n.contextType;a=rr,typeof f=="object"&&f!==null&&(a=Le(f));var c=n.getDerivedStateFromProps;f=typeof c=="function"||typeof r.getSnapshotBeforeUpdate=="function",o=e.pendingProps!==o,f||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o||s!==a)&&Nh(e,r,l,a),Tl=!1;var m=e.memoizedState;r.state=m,ba(e,l,r,i),va(),s=e.memoizedState,o||m!==s||Tl?(typeof c=="function"&&(bc(e,n,c,l),s=e.memoizedState),(u=Tl||Ch(e,n,u,l,m,s,a))?(f||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(e.flags|=4194308)):(typeof r.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=l,e.memoizedState=s),r.props=l,r.state=s,r.context=a,l=u):(typeof r.componentDidMount=="function"&&(e.flags|=4194308),l=!1)}else{r=e.stateNode,lf(t,e),a=e.memoizedProps,f=vi(n,a),r.props=f,c=e.pendingProps,m=r.context,s=n.contextType,u=rr,typeof s=="object"&&s!==null&&(u=Le(s)),o=n.getDerivedStateFromProps,(s=typeof o=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(a!==c||m!==u)&&Nh(e,r,l,u),Tl=!1,m=e.memoizedState,r.state=m,ba(e,l,r,i),va();var d=e.memoizedState;a!==c||m!==d||Tl||t!==null&&t.dependencies!==null&&pu(t.dependencies)?(typeof o=="function"&&(bc(e,n,o,l),d=e.memoizedState),(f=Tl||Ch(e,n,f,l,m,d,u)||t!==null&&t.dependencies!==null&&pu(t.dependencies))?(s||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,d,u),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,d,u)),typeof r.componentDidUpdate=="function"&&(e.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof r.componentDidUpdate!="function"||a===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&m===t.memoizedState||(e.flags|=1024),e.memoizedProps=l,e.memoizedState=d),r.props=l,r.state=d,r.context=u,l=f):(typeof r.componentDidUpdate!="function"||a===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&m===t.memoizedState||(e.flags|=1024),l=!1)}return r=l,tu(t,e),l=(e.flags&128)!==0,r||l?(r=e.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:r.render(),e.flags|=1,t!==null&&l?(e.child=Tr(e,t.child,null,i),e.child=Tr(e,null,n,i)):Ce(t,e,n,i),e.memoizedState=r.state,t=e.child):t=dl(t,e,i),t}function zh(t,e,n,l){return Ga(),e.flags|=256,Ce(t,e,n,l),e.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kc(t){return{baseLanes:t,cachePool:Jg()}}function Sc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=Cn),t}function Qy(t,e,n){var l=e.pendingProps,i=!1,r=(e.flags&128)!==0,a;if((a=r)||(a=t!==null&&t.memoizedState===null?!1:(ge.current&2)!==0),a&&(i=!0,e.flags&=-129),a=(e.flags&32)!==0,e.flags&=-33,t===null){if(Dt){if(i?El(e):Cl(e),Dt){var o=Wt,u;if(u=o){t:{for(u=o,o=In;u.nodeType!==8;){if(!o){o=null;break t}if(u=On(u.nextSibling),u===null){o=null;break t}}o=u}o!==null?(e.memoizedState={dehydrated:o,treeContext:ci!==null?{id:il,overflow:rl}:null,retryLane:536870912,hydrationErrors:null},u=sn(18,null,null,0),u.stateNode=o,u.return=e,e.child=u,Ge=e,Wt=null,u=!0):u=!1}u||hi(e)}if(o=e.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return Cf(o)?e.lanes=32:e.lanes=536870912,null;ol(e)}return o=l.children,l=l.fallback,i?(Cl(e),i=e.mode,o=Su({mode:"hidden",children:o},i),l=si(l,i,n,null),o.return=e,l.return=e,o.sibling=l,e.child=o,i=e.child,i.memoizedState=kc(n),i.childLanes=Sc(t,a,n),e.memoizedState=xc,l):(El(e),mf(e,o))}if(u=t.memoizedState,u!==null&&(o=u.dehydrated,o!==null)){if(r)e.flags&256?(El(e),e.flags&=-257,e=Tc(t,e,n)):e.memoizedState!==null?(Cl(e),e.child=t.child,e.flags|=128,e=null):(Cl(e),i=l.fallback,o=e.mode,l=Su({mode:"visible",children:l.children},o),i=si(i,o,n,null),i.flags|=2,l.return=e,i.return=e,l.sibling=i,e.child=l,Tr(e,t.child,null,n),l=e.child,l.memoizedState=kc(n),l.childLanes=Sc(t,a,n),e.memoizedState=xc,e=i);else if(El(e),Cf(o)){if(a=o.nextSibling&&o.nextSibling.dataset,a)var s=a.dgst;a=s,l=Error(O(419)),l.stack="",l.digest=a,Ma({value:l,source:null,stack:null}),e=Tc(t,e,n)}else if(Se||Xa(t,e,n,!1),a=(n&t.childLanes)!==0,Se||a){if(a=Vt,a!==null&&(l=n&-n,l=(l&42)!==0?1:zf(l),l=(l&(a.suspendedLanes|n))!==0?0:l,l!==0&&l!==u.retryLane))throw u.retryLane=l,Mr(t,l),mn(a,t,l),Yy;o.data==="$?"||bf(),e=Tc(t,e,n)}else o.data==="$?"?(e.flags|=192,e.child=t.child,e=null):(t=u.treeContext,Wt=On(o.nextSibling),Ge=e,Dt=!0,fi=null,In=!1,t!==null&&(Sn[Tn++]=il,Sn[Tn++]=rl,Sn[Tn++]=ci,il=t.id,rl=t.overflow,ci=e),e=mf(e,l.children),e.flags|=4096);return e}return i?(Cl(e),i=l.fallback,o=e.mode,u=t.child,s=u.sibling,l=ul(u,{mode:"hidden",children:l.children}),l.subtreeFlags=u.subtreeFlags&65011712,s!==null?i=ul(s,i):(i=si(i,o,n,null),i.flags|=2),i.return=e,l.return=e,l.sibling=i,e.child=l,l=i,i=e.child,o=t.child.memoizedState,o===null?o=kc(n):(u=o.cachePool,u!==null?(s=he._currentValue,u=u.parent!==s?{parent:s,pool:s}:u):u=Jg(),o={baseLanes:o.baseLanes|n,cachePool:u}),i.memoizedState=o,i.childLanes=Sc(t,a,n),e.memoizedState=xc,l):(El(e),n=t.child,t=n.sibling,n=ul(n,{mode:"visible",children:l.children}),n.return=e,n.sibling=null,t!==null&&(a=e.deletions,a===null?(e.deletions=[t],e.flags|=16):a.push(t)),e.child=n,e.memoizedState=null,n)}function mf(t,e){return e=Su({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Su(t,e){return t=sn(22,t,null,e),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Tc(t,e,n){return Tr(e,t.child,null,n),t=mf(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Lh(t,e,n){t.lanes|=e;var l=t.alternate;l!==null&&(l.lanes|=e),Wc(t.return,e,n)}function wc(t,e,n,l,i){var r=t.memoizedState;r===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i}:(r.isBackwards=e,r.rendering=null,r.renderingStartTime=0,r.last=l,r.tail=n,r.tailMode=i)}function Gy(t,e,n){var l=e.pendingProps,i=l.revealOrder,r=l.tail;if(Ce(t,e,l.children,n),l=ge.current,(l&2)!==0)l=l&1|2,e.flags|=128;else{if(t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Lh(t,n,e);else if(t.tag===19)Lh(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}switch(Zt(ge,l),i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&bu(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),wc(e,!1,i,n,r);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&bu(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}wc(e,!0,n,null,r);break;case"together":wc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function dl(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Yl|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Xa(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(O(153));if(e.child!==null){for(t=e.child,n=ul(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=ul(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function cd(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&pu(t)))}function vS(t,e,n){switch(e.tag){case 3:au(e,e.stateNode.containerInfo),wl(e,he,t.memoizedState.cache),Ga();break;case 27:case 5:jc(e);break;case 4:au(e,e.stateNode.containerInfo);break;case 10:wl(e,e.type,e.memoizedProps.value);break;case 13:var l=e.memoizedState;if(l!==null)return l.dehydrated!==null?(El(e),e.flags|=128,null):(n&e.child.childLanes)!==0?Qy(t,e,n):(El(e),t=dl(t,e,n),t!==null?t.sibling:null);El(e);break;case 19:var i=(t.flags&128)!==0;if(l=(n&e.childLanes)!==0,l||(Xa(t,e,n,!1),l=(n&e.childLanes)!==0),i){if(l)return Gy(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Zt(ge,ge.current),l)break;return null;case 22:case 23:return e.lanes=0,Fy(t,e,n);case 24:wl(e,he,t.memoizedState.cache)}return dl(t,e,n)}function Xy(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)Se=!0;else{if(!cd(t,n)&&(e.flags&128)===0)return Se=!1,vS(t,e,n);Se=(t.flags&131072)!==0}else Se=!1,Dt&&(e.flags&1048576)!==0&&Zg(e,mu,e.index);switch(e.lanes=0,e.tag){case 16:t:{t=e.pendingProps;var l=e.elementType,i=l._init;if(l=i(l._payload),e.type=l,typeof l=="function")Qf(l)?(t=vi(l,t),e.tag=1,e=Oh(null,e,l,t,n)):(e.tag=0,e=df(null,e,l,t,n));else{if(l!=null){if(i=l.$$typeof,i===Df){e.tag=11,e=Rh(null,e,l,t,n);break t}else if(i===_f){e.tag=14,e=Mh(null,e,l,t,n);break t}}throw e=qc(l)||l,Error(O(306,e,""))}}return e;case 0:return df(t,e,e.type,e.pendingProps,n);case 1:return l=e.type,i=vi(l,e.pendingProps),Oh(t,e,l,i,n);case 3:t:{if(au(e,e.stateNode.containerInfo),t===null)throw Error(O(387));l=e.pendingProps;var r=e.memoizedState;i=r.element,lf(t,e),ba(e,l,null,n);var a=e.memoizedState;if(l=a.cache,wl(e,he,l),l!==r.cache&&tf(e,[he],n,!0),va(),l=a.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:a.cache},e.updateQueue.baseState=r,e.memoizedState=r,e.flags&256){e=zh(t,e,l,n);break t}else if(l!==i){i=En(Error(O(424)),e),Ma(i),e=zh(t,e,l,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Wt=On(t.firstChild),Ge=e,Dt=!0,fi=null,In=!0,n=Ly(e,null,l,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ga(),l===i){e=dl(t,e,n);break t}Ce(t,e,l,n)}e=e.child}return e;case 26:return tu(t,e),t===null?(n=tg(e.type,null,e.pendingProps,null))?e.memoizedState=n:Dt||(n=e.type,t=e.pendingProps,l=Ru(_l.current).createElement(n),l[ze]=e,l[en]=t,Ae(l,n,t),ke(l),e.stateNode=l):e.memoizedState=tg(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return jc(e),t===null&&Dt&&(l=e.stateNode=Ov(e.type,e.pendingProps,_l.current),Ge=e,In=!0,i=Wt,Fl(e.type)?(Nf=i,Wt=On(l.firstChild)):Wt=i),Ce(t,e,e.pendingProps.children,n),tu(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Dt&&((i=l=Wt)&&(l=FS(l,e.type,e.pendingProps,In),l!==null?(e.stateNode=l,Ge=e,Wt=On(l.firstChild),In=!1,i=!0):i=!1),i||hi(e)),jc(e),i=e.type,r=e.pendingProps,a=t!==null?t.memoizedProps:null,l=r.children,wf(i,r)?l=null:a!==null&&wf(i,a)&&(e.flags|=32),e.memoizedState!==null&&(i=Wf(t,e,cS,null,null,n),Ua._currentValue=i),tu(t,e),Ce(t,e,l,n),e.child;case 6:return t===null&&Dt&&((t=n=Wt)&&(n=QS(n,e.pendingProps,In),n!==null?(e.stateNode=n,Ge=e,Wt=null,t=!0):t=!1),t||hi(e)),null;case 13:return Qy(t,e,n);case 4:return au(e,e.stateNode.containerInfo),l=e.pendingProps,t===null?e.child=Tr(e,null,l,n):Ce(t,e,l,n),e.child;case 11:return Rh(t,e,e.type,e.pendingProps,n);case 7:return Ce(t,e,e.pendingProps,n),e.child;case 8:return Ce(t,e,e.pendingProps.children,n),e.child;case 12:return Ce(t,e,e.pendingProps.children,n),e.child;case 10:return l=e.pendingProps,wl(e,e.type,l.value),Ce(t,e,l.children,n),e.child;case 9:return i=e.type._context,l=e.pendingProps.children,gi(e),i=Le(i),l=l(i),e.flags|=1,Ce(t,e,l,n),e.child;case 14:return Mh(t,e,e.type,e.pendingProps,n);case 15:return Vy(t,e,e.type,e.pendingProps,n);case 19:return Gy(t,e,n);case 31:return l=e.pendingProps,n=e.mode,l={mode:l.mode,children:l.children},t===null?(n=Su(l,n),n.ref=e.ref,e.child=n,n.return=e,e=n):(n=ul(t.child,l),n.ref=e.ref,e.child=n,n.return=e,e=n),e;case 22:return Fy(t,e,n);case 24:return gi(e),l=Le(he),t===null?(i=Zf(),i===null&&(i=Vt,r=Pf(),i.pooledCache=r,r.refCount++,r!==null&&(i.pooledCacheLanes|=n),i=r),e.memoizedState={parent:l,cache:i},Kf(e),wl(e,he,i)):((t.lanes&n)!==0&&(lf(t,e),ba(e,null,null,n),va()),i=t.memoizedState,r=e.memoizedState,i.parent!==l?(i={parent:l,cache:l},e.memoizedState=i,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=i),wl(e,he,l)):(l=r.cache,wl(e,he,l),l!==i.cache&&tf(e,[he],n,!0))),Ce(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(O(156,e.tag))}function tl(t){t.flags|=4}function Uh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Uv(e)){if(e=Nn.current,e!==null&&((wt&4194048)===wt?Fn!==null:(wt&62914560)!==wt&&(wt&536870912)===0||e!==Fn))throw ga=nf,$g;t.flags|=8192}}function Io(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?bg():536870912,t.lanes|=e,wr|=e)}function ia(t,e){if(!Dt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function $t(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,l=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=l,t.childLanes=n,e}function bS(t,e,n){var l=e.pendingProps;switch(Xf(e),e.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $t(e),null;case 1:return $t(e),null;case 3:return n=e.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),sl(he),yr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(na(e)?tl(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,dh())),$t(e),null;case 26:return n=e.memoizedState,t===null?(tl(e),n!==null?($t(e),Uh(e,n)):($t(e),e.flags&=-16777217)):n?n!==t.memoizedState?(tl(e),$t(e),Uh(e,n)):($t(e),e.flags&=-16777217):(t.memoizedProps!==l&&tl(e),$t(e),e.flags&=-16777217),null;case 27:ou(e),n=_l.current;var i=e.type;if(t!==null&&e.stateNode!=null)t.memoizedProps!==l&&tl(e);else{if(!l){if(e.stateNode===null)throw Error(O(166));return $t(e),null}t=Yn.current,na(e)?ch(e,t):(t=Ov(i,l,n),e.stateNode=t,tl(e))}return $t(e),null;case 5:if(ou(e),n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&tl(e);else{if(!l){if(e.stateNode===null)throw Error(O(166));return $t(e),null}if(t=Yn.current,na(e))ch(e,t);else{switch(i=Ru(_l.current),t){case 1:t=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:t=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":t=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":t=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":t=i.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?i.createElement("select",{is:l.is}):i.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?i.createElement(n,{is:l.is}):i.createElement(n)}}t[ze]=e,t[en]=l;t:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)t.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=t;t:switch(Ae(t,n,l),n){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&tl(e)}}return $t(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&tl(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(O(166));if(t=_l.current,na(e)){if(t=e.stateNode,n=e.memoizedProps,l=null,i=Ge,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}t[ze]=e,t=!!(t.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Mv(t.nodeValue,n)),t||hi(e)}else t=Ru(t).createTextNode(l),t[ze]=e,e.stateNode=t}return $t(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(i=na(e),l!==null&&l.dehydrated!==null){if(t===null){if(!i)throw Error(O(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[ze]=e}else Ga(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;$t(e),i=!1}else i=dh(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),i=!0;if(!i)return e.flags&256?(ol(e),e):(ol(e),null)}if(ol(e),(e.flags&128)!==0)return e.lanes=n,e;if(n=l!==null,t=t!==null&&t.memoizedState!==null,n){l=e.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool);var r=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==i&&(l.flags|=2048)}return n!==t&&n&&(e.child.flags|=8192),Io(e,e.updateQueue),$t(e),null;case 4:return yr(),t===null&&vd(e.stateNode.containerInfo),$t(e),null;case 10:return sl(e.type),$t(e),null;case 19:if(Te(ge),i=e.memoizedState,i===null)return $t(e),null;if(l=(e.flags&128)!==0,r=i.rendering,r===null)if(l)ia(i,!1);else{if(te!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(r=bu(t),r!==null){for(e.flags|=128,ia(i,!1),t=r.updateQueue,e.updateQueue=t,Io(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)Pg(n,t),n=n.sibling;return Zt(ge,ge.current&1|2),e.child}t=t.sibling}i.tail!==null&&Vn()>wu&&(e.flags|=128,l=!0,ia(i,!1),e.lanes=4194304)}else{if(!l)if(t=bu(r),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Io(e,t),ia(i,!0),i.tail===null&&i.tailMode==="hidden"&&!r.alternate&&!Dt)return $t(e),null}else 2*Vn()-i.renderingStartTime>wu&&n!==536870912&&(e.flags|=128,l=!0,ia(i,!1),e.lanes=4194304);i.isBackwards?(r.sibling=e.child,e.child=r):(t=i.last,t!==null?t.sibling=r:e.child=r,i.last=r)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Vn(),e.sibling=null,t=ge.current,Zt(ge,l?t&1|2:t&1),e):($t(e),null);case 22:case 23:return ol(e),Jf(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?(n&536870912)!==0&&(e.flags&128)===0&&($t(e),e.subtreeFlags&6&&(e.flags|=8192)):$t(e),n=e.updateQueue,n!==null&&Io(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==n&&(e.flags|=2048),t!==null&&Te(di),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),sl(he),$t(e),null;case 25:return null;case 30:return null}throw Error(O(156,e.tag))}function xS(t,e){switch(Xf(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return sl(he),yr(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return ou(e),null;case 13:if(ol(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(O(340));Ga()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Te(ge),null;case 4:return yr(),null;case 10:return sl(e.type),null;case 22:case 23:return ol(e),Jf(),t!==null&&Te(di),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return sl(he),null;case 25:return null;default:return null}}function Py(t,e){switch(Xf(e),e.tag){case 3:sl(he),yr();break;case 26:case 27:case 5:ou(e);break;case 4:yr();break;case 13:ol(e);break;case 19:Te(ge);break;case 10:sl(e.type);break;case 22:case 23:ol(e),Jf(),t!==null&&Te(di);break;case 24:sl(he)}}function $a(t,e){try{var n=e.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&t)===t){l=void 0;var r=n.create,a=n.inst;l=r(),a.destroy=l}n=n.next}while(n!==i)}}catch(o){Yt(e,e.return,o)}}function jl(t,e,n){try{var l=e.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var r=i.next;l=r;do{if((l.tag&t)===t){var a=l.inst,o=a.destroy;if(o!==void 0){a.destroy=void 0,i=e;var u=n,s=o;try{s()}catch(f){Yt(i,u,f)}}}l=l.next}while(l!==r)}}catch(f){Yt(e,e.return,f)}}function Zy(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{ey(e,n)}catch(l){Yt(t,t.return,l)}}}function Ky(t,e,n){n.props=vi(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(l){Yt(t,e,l)}}function ka(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof n=="function"?t.refCleanup=n(l):n.current=l}}catch(i){Yt(t,e,i)}}function jn(t,e){var n=t.ref,l=t.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(i){Yt(t,e,i)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Yt(t,e,i)}else n.current=null}function Jy(t){var e=t.type,n=t.memoizedProps,l=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break t;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(i){Yt(t,t.return,i)}}function Ec(t,e,n){try{var l=t.stateNode;qS(l,t.type,n,e),l[en]=e}catch(i){Yt(t,t.return,i)}}function $y(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Fl(t.type)||t.tag===4}function Cc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||$y(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Fl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function pf(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Pu));else if(l!==4&&(l===27&&Fl(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(pf(t,e,n),t=t.sibling;t!==null;)pf(t,e,n),t=t.sibling}function Tu(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(l!==4&&(l===27&&Fl(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Tu(t,e,n),t=t.sibling;t!==null;)Tu(t,e,n),t=t.sibling}function Wy(t){var e=t.stateNode,n=t.memoizedProps;try{for(var l=t.type,i=e.attributes;i.length;)e.removeAttributeNode(i[0]);Ae(e,l,n),e[ze]=t,e[en]=n}catch(r){Yt(t,t.return,r)}}var nl=!1,ae=!1,Nc=!1,Bh=typeof WeakSet=="function"?WeakSet:Set,xe=null;function kS(t,e){if(t=t.containerInfo,Sf=Ou,t=Ig(t),Yf(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,r=l.focusNode;l=l.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break t}var a=0,o=-1,u=-1,s=0,f=0,c=t,m=null;e:for(;;){for(var d;c!==n||i!==0&&c.nodeType!==3||(o=a+i),c!==r||l!==0&&c.nodeType!==3||(u=a+l),c.nodeType===3&&(a+=c.nodeValue.length),(d=c.firstChild)!==null;)m=c,c=d;for(;;){if(c===t)break e;if(m===n&&++s===i&&(o=a),m===r&&++f===l&&(u=a),(d=c.nextSibling)!==null)break;c=m,m=c.parentNode}c=d}n=o===-1||u===-1?null:{start:o,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Tf={focusedElem:t,selectionRange:n},Ou=!1,xe=e;xe!==null;)if(e=xe,t=e.child,(e.subtreeFlags&1024)!==0&&t!==null)t.return=e,xe=t;else for(;xe!==null;){switch(e=xe,r=e.alternate,t=e.flags,e.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&r!==null){t=void 0,n=e,i=r.memoizedProps,r=r.memoizedState,l=n.stateNode;try{var g=vi(n.type,i,n.elementType===n.type);t=l.getSnapshotBeforeUpdate(g,r),l.__reactInternalSnapshotBeforeUpdate=t}catch(b){Yt(n,n.return,b)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Ef(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Ef(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(O(163))}if(t=e.sibling,t!==null){t.return=e.return,xe=t;break}xe=e.return}}function tv(t,e,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:xl(t,n),l&4&&$a(5,n);break;case 1:if(xl(t,n),l&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(a){Yt(n,n.return,a)}else{var i=vi(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(i,e,t.__reactInternalSnapshotBeforeUpdate)}catch(a){Yt(n,n.return,a)}}l&64&&Zy(n),l&512&&ka(n,n.return);break;case 3:if(xl(t,n),l&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{ey(t,e)}catch(a){Yt(n,n.return,a)}}break;case 27:e===null&&l&4&&Wy(n);case 26:case 5:xl(t,n),e===null&&l&4&&Jy(n),l&512&&ka(n,n.return);break;case 12:xl(t,n);break;case 13:xl(t,n),l&4&&lv(t,n),l&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=MS.bind(null,n),GS(t,n))));break;case 22:if(l=n.memoizedState!==null||nl,!l){e=e!==null&&e.memoizedState!==null||ae,i=nl;var r=ae;nl=l,(ae=e)&&!r?kl(t,n,(n.subtreeFlags&8772)!==0):xl(t,n),nl=i,ae=r}break;case 30:break;default:xl(t,n)}}function ev(t){var e=t.alternate;e!==null&&(t.alternate=null,ev(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Uf(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var Pt=null,We=!1;function el(t,e,n){for(n=n.child;n!==null;)nv(t,e,n),n=n.sibling}function nv(t,e,n){if(cn&&typeof cn.onCommitFiberUnmount=="function")try{cn.onCommitFiberUnmount(ja,n)}catch{}switch(n.tag){case 26:ae||jn(n,e),el(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ae||jn(n,e);var l=Pt,i=We;Fl(n.type)&&(Pt=n.stateNode,We=!1),el(t,e,n),Ea(n.stateNode),Pt=l,We=i;break;case 5:ae||jn(n,e);case 6:if(l=Pt,i=We,Pt=null,el(t,e,n),Pt=l,We=i,Pt!==null)if(We)try{(Pt.nodeType===9?Pt.body:Pt.nodeName==="HTML"?Pt.ownerDocument.body:Pt).removeChild(n.stateNode)}catch(r){Yt(n,e,r)}else try{Pt.removeChild(n.stateNode)}catch(r){Yt(n,e,r)}break;case 18:Pt!==null&&(We?(t=Pt,Jh(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),qa(t)):Jh(Pt,n.stateNode));break;case 4:l=Pt,i=We,Pt=n.stateNode.containerInfo,We=!0,el(t,e,n),Pt=l,We=i;break;case 0:case 11:case 14:case 15:ae||jl(2,n,e),ae||jl(4,n,e),el(t,e,n);break;case 1:ae||(jn(n,e),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Ky(n,e,l)),el(t,e,n);break;case 21:el(t,e,n);break;case 22:ae=(l=ae)||n.memoizedState!==null,el(t,e,n),ae=l;break;default:el(t,e,n)}}function lv(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{qa(t)}catch(n){Yt(e,e.return,n)}}function SS(t){switch(t.tag){case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Bh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Bh),e;default:throw Error(O(435,t.tag))}}function Ac(t,e){var n=SS(t);e.forEach(function(l){var i=DS.bind(null,t,l);n.has(l)||(n.add(l),l.then(i,i))})}function an(t,e){var n=e.deletions;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l],r=t,a=e,o=a;t:for(;o!==null;){switch(o.tag){case 27:if(Fl(o.type)){Pt=o.stateNode,We=!1;break t}break;case 5:Pt=o.stateNode,We=!1;break t;case 3:case 4:Pt=o.stateNode.containerInfo,We=!0;break t}o=o.return}if(Pt===null)throw Error(O(160));nv(r,a,i),Pt=null,We=!1,r=i.alternate,r!==null&&(r.return=null),i.return=null}if(e.subtreeFlags&13878)for(e=e.child;e!==null;)iv(e,t),e=e.sibling}var _n=null;function iv(t,e){var n=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:an(e,t),on(t),l&4&&(jl(3,t,t.return),$a(3,t),jl(5,t,t.return));break;case 1:an(e,t),on(t),l&512&&(ae||n===null||jn(n,n.return)),l&64&&nl&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var i=_n;if(an(e,t),on(t),l&512&&(ae||n===null||jn(n,n.return)),l&4){var r=n!==null?n.memoizedState:null;if(l=t.memoizedState,n===null)if(l===null)if(t.stateNode===null){t:{l=t.type,n=t.memoizedProps,i=i.ownerDocument||i;e:switch(l){case"title":r=i.getElementsByTagName("title")[0],(!r||r[Fa]||r[ze]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(l),i.head.insertBefore(r,i.querySelector("head > title"))),Ae(r,l,n),r[ze]=t,ke(r),l=r;break t;case"link":var a=ng("link","href",i).get(l+(n.href||""));if(a){for(var o=0;o<a.length;o++)if(r=a[o],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(o,1);break e}}r=i.createElement(l),Ae(r,l,n),i.head.appendChild(r);break;case"meta":if(a=ng("meta","content",i).get(l+(n.content||""))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(o,1);break e}}r=i.createElement(l),Ae(r,l,n),i.head.appendChild(r);break;default:throw Error(O(468,l))}r[ze]=t,ke(r),l=r}t.stateNode=l}else lg(i,t.type,t.stateNode);else t.stateNode=eg(i,l,t.memoizedProps);else r!==l?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,l===null?lg(i,t.type,t.stateNode):eg(i,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Ec(t,t.memoizedProps,n.memoizedProps)}break;case 27:an(e,t),on(t),l&512&&(ae||n===null||jn(n,n.return)),n!==null&&l&4&&Ec(t,t.memoizedProps,n.memoizedProps);break;case 5:if(an(e,t),on(t),l&512&&(ae||n===null||jn(n,n.return)),t.flags&32){i=t.stateNode;try{br(i,"")}catch(d){Yt(t,t.return,d)}}l&4&&t.stateNode!=null&&(i=t.memoizedProps,Ec(t,i,n!==null?n.memoizedProps:i)),l&1024&&(Nc=!0);break;case 6:if(an(e,t),on(t),l&4){if(t.stateNode===null)throw Error(O(162));l=t.memoizedProps,n=t.stateNode;try{n.nodeValue=l}catch(d){Yt(t,t.return,d)}}break;case 3:if(lu=null,i=_n,_n=Mu(e.containerInfo),an(e,t),_n=i,on(t),l&4&&n!==null&&n.memoizedState.isDehydrated)try{qa(e.containerInfo)}catch(d){Yt(t,t.return,d)}Nc&&(Nc=!1,rv(t));break;case 4:l=_n,_n=Mu(t.stateNode.containerInfo),an(e,t),on(t),_n=l;break;case 12:an(e,t),on(t);break;case 13:an(e,t),on(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(hd=Vn()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Ac(t,l)));break;case 22:i=t.memoizedState!==null;var u=n!==null&&n.memoizedState!==null,s=nl,f=ae;if(nl=s||i,ae=f||u,an(e,t),ae=f,nl=s,on(t),l&8192)t:for(e=t.stateNode,e._visibility=i?e._visibility&-2:e._visibility|1,i&&(n===null||u||nl||ae||oi(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){u=n=e;try{if(r=u.stateNode,i)a=r.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{o=u.stateNode;var c=u.memoizedProps.style,m=c!=null&&c.hasOwnProperty("display")?c.display:null;o.style.display=m==null||typeof m=="boolean"?"":(""+m).trim()}}catch(d){Yt(u,u.return,d)}}}else if(e.tag===6){if(n===null){u=e;try{u.stateNode.nodeValue=i?"":u.memoizedProps}catch(d){Yt(u,u.return,d)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}l&4&&(l=t.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Ac(t,n))));break;case 19:an(e,t),on(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Ac(t,l)));break;case 30:break;case 21:break;default:an(e,t),on(t)}}function on(t){var e=t.flags;if(e&2){try{for(var n,l=t.return;l!==null;){if($y(l)){n=l;break}l=l.return}if(n==null)throw Error(O(160));switch(n.tag){case 27:var i=n.stateNode,r=Cc(t);Tu(t,r,i);break;case 5:var a=n.stateNode;n.flags&32&&(br(a,""),n.flags&=-33);var o=Cc(t);Tu(t,o,a);break;case 3:case 4:var u=n.stateNode.containerInfo,s=Cc(t);pf(t,s,u);break;default:throw Error(O(161))}}catch(f){Yt(t,t.return,f)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function rv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;rv(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function xl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)tv(t,e.alternate,e),e=e.sibling}function oi(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:jl(4,e,e.return),oi(e);break;case 1:jn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&Ky(e,e.return,n),oi(e);break;case 27:Ea(e.stateNode);case 26:case 5:jn(e,e.return),oi(e);break;case 22:e.memoizedState===null&&oi(e);break;case 30:oi(e);break;default:oi(e)}t=t.sibling}}function kl(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var l=e.alternate,i=t,r=e,a=r.flags;switch(r.tag){case 0:case 11:case 15:kl(i,r,n),$a(4,r);break;case 1:if(kl(i,r,n),l=r,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(s){Yt(l,l.return,s)}if(l=r,i=l.updateQueue,i!==null){var o=l.stateNode;try{var u=i.shared.hiddenCallbacks;if(u!==null)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)ty(u[i],o)}catch(s){Yt(l,l.return,s)}}n&&a&64&&Zy(r),ka(r,r.return);break;case 27:Wy(r);case 26:case 5:kl(i,r,n),n&&l===null&&a&4&&Jy(r),ka(r,r.return);break;case 12:kl(i,r,n);break;case 13:kl(i,r,n),n&&a&4&&lv(i,r);break;case 22:r.memoizedState===null&&kl(i,r,n),ka(r,r.return);break;case 30:break;default:kl(i,r,n)}e=e.sibling}}function fd(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&Pa(n))}function dd(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Pa(t))}function qn(t,e,n,l){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)av(t,e,n,l),e=e.sibling}function av(t,e,n,l){var i=e.flags;switch(e.tag){case 0:case 11:case 15:qn(t,e,n,l),i&2048&&$a(9,e);break;case 1:qn(t,e,n,l);break;case 3:qn(t,e,n,l),i&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Pa(t)));break;case 12:if(i&2048){qn(t,e,n,l),t=e.stateNode;try{var r=e.memoizedProps,a=r.id,o=r.onPostCommit;typeof o=="function"&&o(a,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(u){Yt(e,e.return,u)}}else qn(t,e,n,l);break;case 13:qn(t,e,n,l);break;case 23:break;case 22:r=e.stateNode,a=e.alternate,e.memoizedState!==null?r._visibility&2?qn(t,e,n,l):Sa(t,e):r._visibility&2?qn(t,e,n,l):(r._visibility|=2,Zi(t,e,n,l,(e.subtreeFlags&10256)!==0)),i&2048&&fd(a,e);break;case 24:qn(t,e,n,l),i&2048&&dd(e.alternate,e);break;default:qn(t,e,n,l)}}function Zi(t,e,n,l,i){for(i=i&&(e.subtreeFlags&10256)!==0,e=e.child;e!==null;){var r=t,a=e,o=n,u=l,s=a.flags;switch(a.tag){case 0:case 11:case 15:Zi(r,a,o,u,i),$a(8,a);break;case 23:break;case 22:var f=a.stateNode;a.memoizedState!==null?f._visibility&2?Zi(r,a,o,u,i):Sa(r,a):(f._visibility|=2,Zi(r,a,o,u,i)),i&&s&2048&&fd(a.alternate,a);break;case 24:Zi(r,a,o,u,i),i&&s&2048&&dd(a.alternate,a);break;default:Zi(r,a,o,u,i)}e=e.sibling}}function Sa(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,l=e,i=l.flags;switch(l.tag){case 22:Sa(n,l),i&2048&&fd(l.alternate,l);break;case 24:Sa(n,l),i&2048&&dd(l.alternate,l);break;default:Sa(n,l)}e=e.sibling}}var fa=8192;function Gi(t){if(t.subtreeFlags&fa)for(t=t.child;t!==null;)ov(t),t=t.sibling}function ov(t){switch(t.tag){case 26:Gi(t),t.flags&fa&&t.memoizedState!==null&&rT(_n,t.memoizedState,t.memoizedProps);break;case 5:Gi(t);break;case 3:case 4:var e=_n;_n=Mu(t.stateNode.containerInfo),Gi(t),_n=e;break;case 22:t.memoizedState===null&&(e=t.alternate,e!==null&&e.memoizedState!==null?(e=fa,fa=16777216,Gi(t),fa=e):Gi(t));break;default:Gi(t)}}function uv(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function ra(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];xe=l,cv(l,t)}uv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)sv(t),t=t.sibling}function sv(t){switch(t.tag){case 0:case 11:case 15:ra(t),t.flags&2048&&jl(9,t,t.return);break;case 3:ra(t);break;case 12:ra(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,eu(t)):ra(t);break;default:ra(t)}}function eu(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];xe=l,cv(l,t)}uv(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:jl(8,e,e.return),eu(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,eu(e));break;default:eu(e)}t=t.sibling}}function cv(t,e){for(;xe!==null;){var n=xe;switch(n.tag){case 0:case 11:case 15:jl(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Pa(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,xe=l;else t:for(n=t;xe!==null;){l=xe;var i=l.sibling,r=l.return;if(ev(l),l===n){xe=null;break t}if(i!==null){i.return=r,xe=i;break t}xe=r}}}var TS={getCacheForType:function(t){var e=Le(he),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n}},wS=typeof WeakMap=="function"?WeakMap:Map,Ut=0,Vt=null,vt=null,wt=0,Lt=0,un=null,Ml=!1,Dr=!1,md=!1,ml=0,te=0,Yl=0,mi=0,pd=0,Cn=0,wr=0,Ta=null,tn=null,hf=!1,hd=0,wu=1/0,Eu=null,Ll=null,Ne=0,Ul=null,Er=null,gr=0,gf=0,yf=null,fv=null,wa=0,vf=null;function dn(){if((Ut&2)!==0&&wt!==0)return wt&-wt;if(it.T!==null){var t=xr;return t!==0?t:yd()}return Sg()}function dv(){Cn===0&&(Cn=(wt&536870912)===0||Dt?vg():536870912);var t=Nn.current;return t!==null&&(t.flags|=32),Cn}function mn(t,e,n){(t===Vt&&(Lt===2||Lt===9)||t.cancelPendingCommit!==null)&&(Cr(t,0),Dl(t,wt,Cn,!1)),Va(t,n),((Ut&2)===0||t!==Vt)&&(t===Vt&&((Ut&2)===0&&(mi|=n),te===4&&Dl(t,wt,Cn,!1)),Gn(t))}function mv(t,e,n){if((Ut&6)!==0)throw Error(O(327));var l=!n&&(e&124)===0&&(e&t.expiredLanes)===0||Ya(t,e),i=l?NS(t,e):Rc(t,e,!0),r=l;do{if(i===0){Dr&&!l&&Dl(t,e,0,!1);break}else{if(n=t.current.alternate,r&&!ES(n)){i=Rc(t,e,!1),r=!1;continue}if(i===2){if(r=e,t.errorRecoveryDisabledLanes&r)var a=0;else a=t.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){e=a;t:{var o=t;i=Ta;var u=o.current.memoizedState.isDehydrated;if(u&&(Cr(o,a).flags|=256),a=Rc(o,a,!1),a!==2){if(md&&!u){o.errorRecoveryDisabledLanes|=r,mi|=r,i=4;break t}r=tn,tn=i,r!==null&&(tn===null?tn=r:tn.push.apply(tn,r))}i=a}if(r=!1,i!==2)continue}}if(i===1){Cr(t,0),Dl(t,e,0,!0);break}t:{switch(l=t,r=i,r){case 0:case 1:throw Error(O(345));case 4:if((e&4194048)!==e)break;case 6:Dl(l,e,Cn,!Ml);break t;case 2:tn=null;break;case 3:case 5:break;default:throw Error(O(329))}if((e&62914560)===e&&(i=hd+300-Vn(),10<i)){if(Dl(l,e,Cn,!Ml),Lu(l,0,!0)!==0)break t;l.timeoutHandle=_v(Hh.bind(null,l,n,tn,Eu,hf,e,Cn,mi,wr,Ml,r,2,-0,0),i);break t}Hh(l,n,tn,Eu,hf,e,Cn,mi,wr,Ml,r,0,-0,0)}}break}while(!0);Gn(t)}function Hh(t,e,n,l,i,r,a,o,u,s,f,c,m,d){if(t.timeoutHandle=-1,c=e.subtreeFlags,(c&8192||(c&16785408)===16785408)&&(La={stylesheets:null,count:0,unsuspend:iT},ov(e),c=aT(),c!==null)){t.cancelPendingCommit=c(Ih.bind(null,t,e,r,n,l,i,a,o,u,f,1,m,d)),Dl(t,r,a,!s);return}Ih(t,e,r,n,l,i,a,o,u)}function ES(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var i=n[l],r=i.getSnapshot;i=i.value;try{if(!pn(r(),i))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Dl(t,e,n,l){e&=~pd,e&=~mi,t.suspendedLanes|=e,t.pingedLanes&=~e,l&&(t.warmLanes|=e),l=t.expirationTimes;for(var i=e;0<i;){var r=31-fn(i),a=1<<r;l[r]=-1,i&=~a}n!==0&&xg(t,n,e)}function Qu(){return(Ut&6)===0?(Wa(0,!1),!1):!0}function gd(){if(vt!==null){if(Lt===0)var t=vt.return;else t=vt,al=Si=null,nd(t),hr=null,_a=0,t=vt;for(;t!==null;)Py(t.alternate,t),t=t.return;vt=null}}function Cr(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,jS(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),gd(),Vt=t,vt=n=ul(t.current,null),wt=e,Lt=0,un=null,Ml=!1,Dr=Ya(t,e),md=!1,wr=Cn=pd=mi=Yl=te=0,tn=Ta=null,hf=!1,(e&8)!==0&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var i=31-fn(l),r=1<<i;e|=t[i],l&=~r}return ml=e,qu(),n}function pv(t,e){pt=null,it.H=vu,e===Za||e===ju?(e=gh(),Lt=3):e===$g?(e=gh(),Lt=4):Lt=e===Yy?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,un=e,vt===null&&(te=1,ku(t,En(e,t.current)))}function hv(){var t=it.H;return it.H=vu,t===null?vu:t}function gv(){var t=it.A;return it.A=TS,t}function bf(){te=4,Ml||(wt&4194048)!==wt&&Nn.current!==null||(Dr=!0),(Yl&134217727)===0&&(mi&134217727)===0||Vt===null||Dl(Vt,wt,Cn,!1)}function Rc(t,e,n){var l=Ut;Ut|=2;var i=hv(),r=gv();(Vt!==t||wt!==e)&&(Eu=null,Cr(t,e)),e=!1;var a=te;t:do try{if(Lt!==0&&vt!==null){var o=vt,u=un;switch(Lt){case 8:gd(),a=6;break t;case 3:case 2:case 9:case 6:Nn.current===null&&(e=!0);var s=Lt;if(Lt=0,un=null,ur(t,o,u,s),n&&Dr){a=0;break t}break;default:s=Lt,Lt=0,un=null,ur(t,o,u,s)}}CS(),a=te;break}catch(f){pv(t,f)}while(!0);return e&&t.shellSuspendCounter++,al=Si=null,Ut=l,it.H=i,it.A=r,vt===null&&(Vt=null,wt=0,qu()),a}function CS(){for(;vt!==null;)yv(vt)}function NS(t,e){var n=Ut;Ut|=2;var l=hv(),i=gv();Vt!==t||wt!==e?(Eu=null,wu=Vn()+500,Cr(t,e)):Dr=Ya(t,e);t:do try{if(Lt!==0&&vt!==null){e=vt;var r=un;e:switch(Lt){case 1:Lt=0,un=null,ur(t,e,r,1);break;case 2:case 9:if(hh(r)){Lt=0,un=null,qh(e);break}e=function(){Lt!==2&&Lt!==9||Vt!==t||(Lt=7),Gn(t)},r.then(e,e);break t;case 3:Lt=7;break t;case 4:Lt=5;break t;case 7:hh(r)?(Lt=0,un=null,qh(e)):(Lt=0,un=null,ur(t,e,r,7));break;case 5:var a=null;switch(vt.tag){case 26:a=vt.memoizedState;case 5:case 27:var o=vt;if(!a||Uv(a)){Lt=0,un=null;var u=o.sibling;if(u!==null)vt=u;else{var s=o.return;s!==null?(vt=s,Gu(s)):vt=null}break e}}Lt=0,un=null,ur(t,e,r,5);break;case 6:Lt=0,un=null,ur(t,e,r,6);break;case 8:gd(),te=6;break t;default:throw Error(O(462))}}AS();break}catch(f){pv(t,f)}while(!0);return al=Si=null,it.H=l,it.A=i,Ut=n,vt!==null?0:(Vt=null,wt=0,qu(),te)}function AS(){for(;vt!==null&&!Kx();)yv(vt)}function yv(t){var e=Xy(t.alternate,t,ml);t.memoizedProps=t.pendingProps,e===null?Gu(t):vt=e}function qh(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=_h(n,e,e.pendingProps,e.type,void 0,wt);break;case 11:e=_h(n,e,e.pendingProps,e.type.render,e.ref,wt);break;case 5:nd(e);default:Py(n,e),e=vt=Pg(e,ml),e=Xy(n,e,ml)}t.memoizedProps=t.pendingProps,e===null?Gu(t):vt=e}function ur(t,e,n,l){al=Si=null,nd(e),hr=null,_a=0;var i=e.return;try{if(yS(t,i,e,n,wt)){te=1,ku(t,En(n,t.current)),vt=null;return}}catch(r){if(i!==null)throw vt=i,r;te=1,ku(t,En(n,t.current)),vt=null;return}e.flags&32768?(Dt||l===1?t=!0:Dr||(wt&536870912)!==0?t=!1:(Ml=t=!0,(l===2||l===9||l===3||l===6)&&(l=Nn.current,l!==null&&l.tag===13&&(l.flags|=16384))),vv(e,t)):Gu(e)}function Gu(t){var e=t;do{if((e.flags&32768)!==0){vv(e,Ml);return}t=e.return;var n=bS(e.alternate,e,ml);if(n!==null){vt=n;return}if(e=e.sibling,e!==null){vt=e;return}vt=e=t}while(e!==null);te===0&&(te=5)}function vv(t,e){do{var n=xS(t.alternate,t);if(n!==null){n.flags&=32767,vt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){vt=t;return}vt=t=n}while(t!==null);te=6,vt=null}function Ih(t,e,n,l,i,r,a,o,u){t.cancelPendingCommit=null;do Xu();while(Ne!==0);if((Ut&6)!==0)throw Error(O(327));if(e!==null){if(e===t.current)throw Error(O(177));if(r=e.lanes|e.childLanes,r|=Vf,ak(t,n,r,a,o,u),t===Vt&&(vt=Vt=null,wt=0),Er=e,Ul=t,gr=n,gf=r,yf=i,fv=l,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,_S(uu,function(){return Tv(!0),null})):(t.callbackNode=null,t.callbackPriority=0),l=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||l){l=it.T,it.T=null,i=_t.p,_t.p=2,a=Ut,Ut|=4;try{kS(t,e,n)}finally{Ut=a,_t.p=i,it.T=l}}Ne=1,bv(),xv(),kv()}}function bv(){if(Ne===1){Ne=0;var t=Ul,e=Er,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=it.T,it.T=null;var l=_t.p;_t.p=2;var i=Ut;Ut|=4;try{iv(e,t);var r=Tf,a=Ig(t.containerInfo),o=r.focusedElem,u=r.selectionRange;if(a!==o&&o&&o.ownerDocument&&qg(o.ownerDocument.documentElement,o)){if(u!==null&&Yf(o)){var s=u.start,f=u.end;if(f===void 0&&(f=s),"selectionStart"in o)o.selectionStart=s,o.selectionEnd=Math.min(f,o.value.length);else{var c=o.ownerDocument||document,m=c&&c.defaultView||window;if(m.getSelection){var d=m.getSelection(),g=o.textContent.length,b=Math.min(u.start,g),N=u.end===void 0?b:Math.min(u.end,g);!d.extend&&b>N&&(a=N,N=b,b=a);var p=oh(o,b),h=oh(o,N);if(p&&h&&(d.rangeCount!==1||d.anchorNode!==p.node||d.anchorOffset!==p.offset||d.focusNode!==h.node||d.focusOffset!==h.offset)){var y=c.createRange();y.setStart(p.node,p.offset),d.removeAllRanges(),b>N?(d.addRange(y),d.extend(h.node,h.offset)):(y.setEnd(h.node,h.offset),d.addRange(y))}}}}for(c=[],d=o;d=d.parentNode;)d.nodeType===1&&c.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<c.length;o++){var w=c[o];w.element.scrollLeft=w.left,w.element.scrollTop=w.top}}Ou=!!Sf,Tf=Sf=null}finally{Ut=i,_t.p=l,it.T=n}}t.current=e,Ne=2}}function xv(){if(Ne===2){Ne=0;var t=Ul,e=Er,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=it.T,it.T=null;var l=_t.p;_t.p=2;var i=Ut;Ut|=4;try{tv(t,e.alternate,e)}finally{Ut=i,_t.p=l,it.T=n}}Ne=3}}function kv(){if(Ne===4||Ne===3){Ne=0,Jx();var t=Ul,e=Er,n=gr,l=fv;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Ne=5:(Ne=0,Er=Ul=null,Sv(t,t.pendingLanes));var i=t.pendingLanes;if(i===0&&(Ll=null),Lf(n),e=e.stateNode,cn&&typeof cn.onCommitFiberRoot=="function")try{cn.onCommitFiberRoot(ja,e,void 0,(e.current.flags&128)===128)}catch{}if(l!==null){e=it.T,i=_t.p,_t.p=2,it.T=null;try{for(var r=t.onRecoverableError,a=0;a<l.length;a++){var o=l[a];r(o.value,{componentStack:o.stack})}}finally{it.T=e,_t.p=i}}(gr&3)!==0&&Xu(),Gn(t),i=t.pendingLanes,(n&4194090)!==0&&(i&42)!==0?t===vf?wa++:(wa=0,vf=t):wa=0,Wa(0,!1)}}function Sv(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Pa(e)))}function Xu(t){return bv(),xv(),kv(),Tv(t)}function Tv(){if(Ne!==5)return!1;var t=Ul,e=gf;gf=0;var n=Lf(gr),l=it.T,i=_t.p;try{_t.p=32>n?32:n,it.T=null,n=yf,yf=null;var r=Ul,a=gr;if(Ne=0,Er=Ul=null,gr=0,(Ut&6)!==0)throw Error(O(331));var o=Ut;if(Ut|=4,sv(r.current),av(r,r.current,a,n),Ut=o,Wa(0,!1),cn&&typeof cn.onPostCommitFiberRoot=="function")try{cn.onPostCommitFiberRoot(ja,r)}catch{}return!0}finally{_t.p=i,it.T=l,Sv(t,e)}}function jh(t,e,n){e=En(n,e),e=ff(t.stateNode,e,2),t=zl(t,e,2),t!==null&&(Va(t,2),Gn(t))}function Yt(t,e,n){if(t.tag===3)jh(t,t,n);else for(;e!==null;){if(e.tag===3){jh(e,t,n);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Ll===null||!Ll.has(l))){t=En(n,t),n=Iy(2),l=zl(e,n,2),l!==null&&(jy(n,l,e,t),Va(l,2),Gn(l));break}}e=e.return}}function Mc(t,e,n){var l=t.pingCache;if(l===null){l=t.pingCache=new wS;var i=new Set;l.set(e,i)}else i=l.get(e),i===void 0&&(i=new Set,l.set(e,i));i.has(n)||(md=!0,i.add(n),t=RS.bind(null,t,e,n),e.then(t,t))}function RS(t,e,n){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Vt===t&&(wt&n)===n&&(te===4||te===3&&(wt&62914560)===wt&&300>Vn()-hd?(Ut&2)===0&&Cr(t,0):pd|=n,wr===wt&&(wr=0)),Gn(t)}function wv(t,e){e===0&&(e=bg()),t=Mr(t,e),t!==null&&(Va(t,e),Gn(t))}function MS(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),wv(t,n)}function DS(t,e){var n=0;switch(t.tag){case 13:var l=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(O(314))}l!==null&&l.delete(e),wv(t,n)}function _S(t,e){return Of(t,e)}var Cu=null,Ki=null,xf=!1,Nu=!1,Dc=!1,pi=0;function Gn(t){t!==Ki&&t.next===null&&(Ki===null?Cu=Ki=t:Ki=Ki.next=t),Nu=!0,xf||(xf=!0,zS())}function Wa(t,e){if(!Dc&&Nu){Dc=!0;do for(var n=!1,l=Cu;l!==null;){if(!e)if(t!==0){var i=l.pendingLanes;if(i===0)var r=0;else{var a=l.suspendedLanes,o=l.pingedLanes;r=(1<<31-fn(42|t)+1)-1,r&=i&~(a&~o),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Yh(l,r))}else r=wt,r=Lu(l,l===Vt?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||Ya(l,r)||(n=!0,Yh(l,r));l=l.next}while(n);Dc=!1}}function OS(){Ev()}function Ev(){Nu=xf=!1;var t=0;pi!==0&&(IS()&&(t=pi),pi=0);for(var e=Vn(),n=null,l=Cu;l!==null;){var i=l.next,r=Cv(l,e);r===0?(l.next=null,n===null?Cu=i:n.next=i,i===null&&(Ki=n)):(n=l,(t!==0||(r&3)!==0)&&(Nu=!0)),l=i}Wa(t,!1)}function Cv(t,e){for(var n=t.suspendedLanes,l=t.pingedLanes,i=t.expirationTimes,r=t.pendingLanes&-62914561;0<r;){var a=31-fn(r),o=1<<a,u=i[a];u===-1?((o&n)===0||(o&l)!==0)&&(i[a]=rk(o,e)):u<=e&&(t.expiredLanes|=o),r&=~o}if(e=Vt,n=wt,n=Lu(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,n===0||t===e&&(Lt===2||Lt===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&ic(l),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||Ya(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(l!==null&&ic(l),Lf(n)){case 2:case 8:n=gg;break;case 32:n=uu;break;case 268435456:n=yg;break;default:n=uu}return l=Nv.bind(null,t),n=Of(n,l),t.callbackPriority=e,t.callbackNode=n,e}return l!==null&&l!==null&&ic(l),t.callbackPriority=2,t.callbackNode=null,2}function Nv(t,e){if(Ne!==0&&Ne!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Xu(!0)&&t.callbackNode!==n)return null;var l=wt;return l=Lu(t,t===Vt?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(mv(t,l,e),Cv(t,Vn()),t.callbackNode!=null&&t.callbackNode===n?Nv.bind(null,t):null)}function Yh(t,e){if(Xu())return null;mv(t,e,!0)}function zS(){YS(function(){(Ut&6)!==0?Of(hg,OS):Ev()})}function yd(){return pi===0&&(pi=vg()),pi}function Vh(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Xo(""+t)}function Fh(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function LS(t,e,n,l,i){if(e==="submit"&&n&&n.stateNode===i){var r=Vh((i[en]||null).action),a=l.submitter;a&&(e=(e=a[en]||null)?Vh(e.formAction):a.getAttribute("formAction"),e!==null&&(r=e,a=null));var o=new Uu("action","action",null,l,i);t.push({event:o,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(pi!==0){var u=a?Fh(i,a):new FormData(i);sf(n,{pending:!0,data:u,method:i.method,action:r},null,u)}}else typeof r=="function"&&(o.preventDefault(),u=a?Fh(i,a):new FormData(i),sf(n,{pending:!0,data:u,method:i.method,action:r},r,u))},currentTarget:i}]})}}for(jo=0;jo<Kc.length;jo++)Yo=Kc[jo],Qh=Yo.toLowerCase(),Gh=Yo[0].toUpperCase()+Yo.slice(1),zn(Qh,"on"+Gh);var Yo,Qh,Gh,jo;zn(Yg,"onAnimationEnd");zn(Vg,"onAnimationIteration");zn(Fg,"onAnimationStart");zn("dblclick","onDoubleClick");zn("focusin","onFocus");zn("focusout","onBlur");zn(tS,"onTransitionRun");zn(eS,"onTransitionStart");zn(nS,"onTransitionCancel");zn(Qg,"onTransitionEnd");vr("onMouseEnter",["mouseout","mouseover"]);vr("onMouseLeave",["mouseout","mouseover"]);vr("onPointerEnter",["pointerout","pointerover"]);vr("onPointerLeave",["pointerout","pointerover"]);bi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));bi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));bi("onBeforeInput",["compositionend","keypress","textInput","paste"]);bi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));bi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));bi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Oa="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(" "),US=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Oa));function Av(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var l=t[n],i=l.event;l=l.listeners;t:{var r=void 0;if(e)for(var a=l.length-1;0<=a;a--){var o=l[a],u=o.instance,s=o.currentTarget;if(o=o.listener,u!==r&&i.isPropagationStopped())break t;r=o,i.currentTarget=s;try{r(i)}catch(f){xu(f)}i.currentTarget=null,r=u}else for(a=0;a<l.length;a++){if(o=l[a],u=o.instance,s=o.currentTarget,o=o.listener,u!==r&&i.isPropagationStopped())break t;r=o,i.currentTarget=s;try{r(i)}catch(f){xu(f)}i.currentTarget=null,r=u}}}}function yt(t,e){var n=e[Vc];n===void 0&&(n=e[Vc]=new Set);var l=t+"__bubble";n.has(l)||(Rv(e,t,2,!1),n.add(l))}function _c(t,e,n){var l=0;e&&(l|=4),Rv(n,t,l,e)}var Vo="_reactListening"+Math.random().toString(36).slice(2);function vd(t){if(!t[Vo]){t[Vo]=!0,Tg.forEach(function(n){n!=="selectionchange"&&(US.has(n)||_c(n,!1,t),_c(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Vo]||(e[Vo]=!0,_c("selectionchange",!1,e))}}function Rv(t,e,n,l){switch(jv(e)){case 2:var i=sT;break;case 8:i=cT;break;default:i=Sd}n=i.bind(null,e,n,t),i=void 0,!Xc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),l?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Oc(t,e,n,l,i){var r=l;if((e&1)===0&&(e&2)===0&&l!==null)t:for(;;){if(l===null)return;var a=l.tag;if(a===3||a===4){var o=l.stateNode.containerInfo;if(o===i)break;if(a===4)for(a=l.return;a!==null;){var u=a.tag;if((u===3||u===4)&&a.stateNode.containerInfo===i)return;a=a.return}for(;o!==null;){if(a=Wi(o),a===null)return;if(u=a.tag,u===5||u===6||u===26||u===27){l=r=a;continue t}o=o.parentNode}}l=l.return}Dg(function(){var s=r,f=Hf(n),c=[];t:{var m=Gg.get(t);if(m!==void 0){var d=Uu,g=t;switch(t){case"keypress":if(Zo(n)===0)break t;case"keydown":case"keyup":d=_k;break;case"focusin":g="focus",d=dc;break;case"focusout":g="blur",d=dc;break;case"beforeblur":case"afterblur":d=dc;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=$p;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=xk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Lk;break;case Yg:case Vg:case Fg:d=Tk;break;case Qg:d=Bk;break;case"scroll":case"scrollend":d=vk;break;case"wheel":d=qk;break;case"copy":case"cut":case"paste":d=Ek;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=th;break;case"toggle":case"beforetoggle":d=jk}var b=(e&4)!==0,N=!b&&(t==="scroll"||t==="scrollend"),p=b?m!==null?m+"Capture":null:m;b=[];for(var h=s,y;h!==null;){var w=h;if(y=w.stateNode,w=w.tag,w!==5&&w!==26&&w!==27||y===null||p===null||(w=Na(h,p),w!=null&&b.push(za(h,w,y))),N)break;h=h.return}0<b.length&&(m=new d(m,g,null,n,f),c.push({event:m,listeners:b}))}}if((e&7)===0){t:{if(m=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",m&&n!==Gc&&(g=n.relatedTarget||n.fromElement)&&(Wi(g)||g[Ar]))break t;if((d||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,d?(g=n.relatedTarget||n.toElement,d=s,g=g?Wi(g):null,g!==null&&(N=Ia(g),b=g.tag,g!==N||b!==5&&b!==27&&b!==6)&&(g=null)):(d=null,g=s),d!==g)){if(b=$p,w="onMouseLeave",p="onMouseEnter",h="mouse",(t==="pointerout"||t==="pointerover")&&(b=th,w="onPointerLeave",p="onPointerEnter",h="pointer"),N=d==null?m:ca(d),y=g==null?m:ca(g),m=new b(w,h+"leave",d,n,f),m.target=N,m.relatedTarget=y,w=null,Wi(f)===s&&(b=new b(p,h+"enter",g,n,f),b.target=y,b.relatedTarget=N,w=b),N=w,d&&g)e:{for(b=d,p=g,h=0,y=b;y;y=Xi(y))h++;for(y=0,w=p;w;w=Xi(w))y++;for(;0<h-y;)b=Xi(b),h--;for(;0<y-h;)p=Xi(p),y--;for(;h--;){if(b===p||p!==null&&b===p.alternate)break e;b=Xi(b),p=Xi(p)}b=null}else b=null;d!==null&&Xh(c,m,d,b,!1),g!==null&&N!==null&&Xh(c,N,g,b,!0)}}t:{if(m=s?ca(s):window,d=m.nodeName&&m.nodeName.toLowerCase(),d==="select"||d==="input"&&m.type==="file")var A=ih;else if(lh(m))if(Bg)A=Jk;else{A=Zk;var E=Pk}else d=m.nodeName,!d||d.toLowerCase()!=="input"||m.type!=="checkbox"&&m.type!=="radio"?s&&Bf(s.elementType)&&(A=ih):A=Kk;if(A&&(A=A(t,s))){Ug(c,A,n,f);break t}E&&E(t,m,s),t==="focusout"&&s&&m.type==="number"&&s.memoizedProps.value!=null&&Qc(m,"number",m.value)}switch(E=s?ca(s):window,t){case"focusin":(lh(E)||E.contentEditable==="true")&&(nr=E,Pc=s,pa=null);break;case"focusout":pa=Pc=nr=null;break;case"mousedown":Zc=!0;break;case"contextmenu":case"mouseup":case"dragend":Zc=!1,uh(c,n,f);break;case"selectionchange":if(Wk)break;case"keydown":case"keyup":uh(c,n,f)}var D;if(jf)t:{switch(t){case"compositionstart":var L="onCompositionStart";break t;case"compositionend":L="onCompositionEnd";break t;case"compositionupdate":L="onCompositionUpdate";break t}L=void 0}else er?zg(t,n)&&(L="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(L="onCompositionStart");L&&(Og&&n.locale!=="ko"&&(er||L!=="onCompositionStart"?L==="onCompositionEnd"&&er&&(D=_g()):(Rl=f,qf="value"in Rl?Rl.value:Rl.textContent,er=!0)),E=Au(s,L),0<E.length&&(L=new Wp(L,t,null,n,f),c.push({event:L,listeners:E}),D?L.data=D:(D=Lg(n),D!==null&&(L.data=D)))),(D=Vk?Fk(t,n):Qk(t,n))&&(L=Au(s,"onBeforeInput"),0<L.length&&(E=new Wp("onBeforeInput","beforeinput",null,n,f),c.push({event:E,listeners:L}),E.data=D)),LS(c,t,s,n,f)}Av(c,e)})}function za(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Au(t,e){for(var n=e+"Capture",l=[];t!==null;){var i=t,r=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||r===null||(i=Na(t,n),i!=null&&l.unshift(za(t,i,r)),i=Na(t,e),i!=null&&l.push(za(t,i,r))),t.tag===3)return l;t=t.return}return[]}function Xi(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Xh(t,e,n,l,i){for(var r=e._reactName,a=[];n!==null&&n!==l;){var o=n,u=o.alternate,s=o.stateNode;if(o=o.tag,u!==null&&u===l)break;o!==5&&o!==26&&o!==27||s===null||(u=s,i?(s=Na(n,r),s!=null&&a.unshift(za(n,s,u))):i||(s=Na(n,r),s!=null&&a.push(za(n,s,u)))),n=n.return}a.length!==0&&t.push({event:e,listeners:a})}var BS=/\r\n?/g,HS=/\u0000|\uFFFD/g;function Ph(t){return(typeof t=="string"?t:""+t).replace(BS,`
9
- `).replace(HS,"")}function Mv(t,e){return e=Ph(e),Ph(t)===e}function Pu(){}function qt(t,e,n,l,i,r){switch(n){case"children":typeof l=="string"?e==="body"||e==="textarea"&&l===""||br(t,l):(typeof l=="number"||typeof l=="bigint")&&e!=="body"&&br(t,""+l);break;case"className":_o(t,"class",l);break;case"tabIndex":_o(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":_o(t,n,l);break;case"style":Mg(t,l,r);break;case"data":if(e!=="object"){_o(t,"data",l);break}case"src":case"href":if(l===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(n);break}l=Xo(""+l),t.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(n,"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 r=="function"&&(n==="formAction"?(e!=="input"&&qt(t,e,"name",i.name,i,null),qt(t,e,"formEncType",i.formEncType,i,null),qt(t,e,"formMethod",i.formMethod,i,null),qt(t,e,"formTarget",i.formTarget,i,null)):(qt(t,e,"encType",i.encType,i,null),qt(t,e,"method",i.method,i,null),qt(t,e,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(n);break}l=Xo(""+l),t.setAttribute(n,l);break;case"onClick":l!=null&&(t.onclick=Pu);break;case"onScroll":l!=null&&yt("scroll",t);break;case"onScrollEnd":l!=null&&yt("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(O(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(O(60));t.innerHTML=n}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}n=Xo(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,""+l):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":l===!0?t.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,l):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(n,l):t.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(n):t.setAttribute(n,l);break;case"popover":yt("beforetoggle",t),yt("toggle",t),Go(t,"popover",l);break;case"xlinkActuate":Wn(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Wn(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Wn(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Wn(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Wn(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Wn(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Wn(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Wn(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Wn(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Go(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=gk.get(n)||n,Go(t,n,l))}}function kf(t,e,n,l,i,r){switch(n){case"style":Mg(t,l,r);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(O(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(O(60));t.innerHTML=n}}break;case"children":typeof l=="string"?br(t,l):(typeof l=="number"||typeof l=="bigint")&&br(t,""+l);break;case"onScroll":l!=null&&yt("scroll",t);break;case"onScrollEnd":l!=null&&yt("scrollend",t);break;case"onClick":l!=null&&(t.onclick=Pu);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!wg.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),e=n.slice(2,i?n.length-7:void 0),r=t[en]||null,r=r!=null?r[n]:null,typeof r=="function"&&t.removeEventListener(e,r,i),typeof l=="function")){typeof r!="function"&&r!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,l,i);break t}n in t?t[n]=l:l===!0?t.setAttribute(n,""):Go(t,n,l)}}}function Ae(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":yt("error",t),yt("load",t);var l=!1,i=!1,r;for(r in n)if(n.hasOwnProperty(r)){var a=n[r];if(a!=null)switch(r){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(O(137,e));default:qt(t,e,r,a,n,null)}}i&&qt(t,e,"srcSet",n.srcSet,n,null),l&&qt(t,e,"src",n.src,n,null);return;case"input":yt("invalid",t);var o=r=a=i=null,u=null,s=null;for(l in n)if(n.hasOwnProperty(l)){var f=n[l];if(f!=null)switch(l){case"name":i=f;break;case"type":a=f;break;case"checked":u=f;break;case"defaultChecked":s=f;break;case"value":r=f;break;case"defaultValue":o=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(O(137,e));break;default:qt(t,e,l,f,n,null)}}Ng(t,r,o,u,s,a,i,!1),su(t);return;case"select":yt("invalid",t),l=a=r=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":r=o;break;case"defaultValue":a=o;break;case"multiple":l=o;default:qt(t,e,i,o,n,null)}e=r,n=a,t.multiple=!!l,e!=null?cr(t,!!l,e,!1):n!=null&&cr(t,!!l,n,!0);return;case"textarea":yt("invalid",t),r=i=l=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":l=o;break;case"defaultValue":i=o;break;case"children":r=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(O(91));break;default:qt(t,e,a,o,n,null)}Rg(t,l,i,r),su(t);return;case"option":for(u in n)if(n.hasOwnProperty(u)&&(l=n[u],l!=null))switch(u){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:qt(t,e,u,l,n,null)}return;case"dialog":yt("beforetoggle",t),yt("toggle",t),yt("cancel",t),yt("close",t);break;case"iframe":case"object":yt("load",t);break;case"video":case"audio":for(l=0;l<Oa.length;l++)yt(Oa[l],t);break;case"image":yt("error",t),yt("load",t);break;case"details":yt("toggle",t);break;case"embed":case"source":case"link":yt("error",t),yt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"children":case"dangerouslySetInnerHTML":throw Error(O(137,e));default:qt(t,e,s,l,n,null)}return;default:if(Bf(e)){for(f in n)n.hasOwnProperty(f)&&(l=n[f],l!==void 0&&kf(t,e,f,l,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(l=n[o],l!=null&&qt(t,e,o,l,n,null))}function qS(t,e,n,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,r=null,a=null,o=null,u=null,s=null,f=null;for(d in n){var c=n[d];if(n.hasOwnProperty(d)&&c!=null)switch(d){case"checked":break;case"value":break;case"defaultValue":u=c;default:l.hasOwnProperty(d)||qt(t,e,d,null,l,c)}}for(var m in l){var d=l[m];if(c=n[m],l.hasOwnProperty(m)&&(d!=null||c!=null))switch(m){case"type":r=d;break;case"name":i=d;break;case"checked":s=d;break;case"defaultChecked":f=d;break;case"value":a=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(O(137,e));break;default:d!==c&&qt(t,e,m,d,l,c)}}Fc(t,a,o,u,s,f,r,i);return;case"select":d=a=o=m=null;for(r in n)if(u=n[r],n.hasOwnProperty(r)&&u!=null)switch(r){case"value":break;case"multiple":d=u;default:l.hasOwnProperty(r)||qt(t,e,r,null,l,u)}for(i in l)if(r=l[i],u=n[i],l.hasOwnProperty(i)&&(r!=null||u!=null))switch(i){case"value":m=r;break;case"defaultValue":o=r;break;case"multiple":a=r;default:r!==u&&qt(t,e,i,r,l,u)}e=o,n=a,l=d,m!=null?cr(t,!!n,m,!1):!!l!=!!n&&(e!=null?cr(t,!!n,e,!0):cr(t,!!n,n?[]:"",!1));return;case"textarea":d=m=null;for(o in n)if(i=n[o],n.hasOwnProperty(o)&&i!=null&&!l.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:qt(t,e,o,null,l,i)}for(a in l)if(i=l[a],r=n[a],l.hasOwnProperty(a)&&(i!=null||r!=null))switch(a){case"value":m=i;break;case"defaultValue":d=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(O(91));break;default:i!==r&&qt(t,e,a,i,l,r)}Ag(t,m,d);return;case"option":for(var g in n)if(m=n[g],n.hasOwnProperty(g)&&m!=null&&!l.hasOwnProperty(g))switch(g){case"selected":t.selected=!1;break;default:qt(t,e,g,null,l,m)}for(u in l)if(m=l[u],d=n[u],l.hasOwnProperty(u)&&m!==d&&(m!=null||d!=null))switch(u){case"selected":t.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:qt(t,e,u,m,l,d)}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 b in n)m=n[b],n.hasOwnProperty(b)&&m!=null&&!l.hasOwnProperty(b)&&qt(t,e,b,null,l,m);for(s in l)if(m=l[s],d=n[s],l.hasOwnProperty(s)&&m!==d&&(m!=null||d!=null))switch(s){case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(O(137,e));break;default:qt(t,e,s,m,l,d)}return;default:if(Bf(e)){for(var N in n)m=n[N],n.hasOwnProperty(N)&&m!==void 0&&!l.hasOwnProperty(N)&&kf(t,e,N,void 0,l,m);for(f in l)m=l[f],d=n[f],!l.hasOwnProperty(f)||m===d||m===void 0&&d===void 0||kf(t,e,f,m,l,d);return}}for(var p in n)m=n[p],n.hasOwnProperty(p)&&m!=null&&!l.hasOwnProperty(p)&&qt(t,e,p,null,l,m);for(c in l)m=l[c],d=n[c],!l.hasOwnProperty(c)||m===d||m==null&&d==null||qt(t,e,c,m,l,d)}var Sf=null,Tf=null;function Ru(t){return t.nodeType===9?t:t.ownerDocument}function Zh(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Dv(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function wf(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var zc=null;function IS(){var t=window.event;return t&&t.type==="popstate"?t===zc?!1:(zc=t,!0):(zc=null,!1)}var _v=typeof setTimeout=="function"?setTimeout:void 0,jS=typeof clearTimeout=="function"?clearTimeout:void 0,Kh=typeof Promise=="function"?Promise:void 0,YS=typeof queueMicrotask=="function"?queueMicrotask:typeof Kh<"u"?function(t){return Kh.resolve(null).then(t).catch(VS)}:_v;function VS(t){setTimeout(function(){throw t})}function Fl(t){return t==="head"}function Jh(t,e){var n=e,l=0,i=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(0<l&&8>l){n=l;var a=t.ownerDocument;if(n&1&&Ea(a.documentElement),n&2&&Ea(a.body),n&4)for(n=a.head,Ea(n),a=n.firstChild;a;){var o=a.nextSibling,u=a.nodeName;a[Fa]||u==="SCRIPT"||u==="STYLE"||u==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=o}}if(i===0){t.removeChild(r),qa(e);return}i--}else n==="$"||n==="$?"||n==="$!"?i++:l=n.charCodeAt(0)-48;else l=0;n=r}while(n);qa(e)}function Ef(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Ef(n),Uf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function FS(t,e,n,l){for(;t.nodeType===1;){var i=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[Fa])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(r=t.getAttribute("rel"),r==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(r!==i.rel||t.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||t.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||t.getAttribute("title")!==(i.title==null?null:i.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(r=t.getAttribute("src"),(r!==(i.src==null?null:i.src)||t.getAttribute("type")!==(i.type==null?null:i.type)||t.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&r&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var r=i.name==null?null:""+i.name;if(i.type==="hidden"&&t.getAttribute("name")===r)return t}else return t;if(t=On(t.nextSibling),t===null)break}return null}function QS(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=On(t.nextSibling),t===null))return null;return t}function Cf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function GS(t,e){var n=t.ownerDocument;if(t.data!=="$?"||n.readyState==="complete")e();else{var l=function(){e(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function On(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="F!"||e==="F")break;if(e==="/$")return null}}return t}var Nf=null;function $h(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}function Ov(t,e,n){switch(e=Ru(n),t){case"html":if(t=e.documentElement,!t)throw Error(O(452));return t;case"head":if(t=e.head,!t)throw Error(O(453));return t;case"body":if(t=e.body,!t)throw Error(O(454));return t;default:throw Error(O(451))}}function Ea(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Uf(t)}var An=new Map,Wh=new Set;function Mu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var pl=_t.d;_t.d={f:XS,r:PS,D:ZS,C:KS,L:JS,m:$S,X:tT,S:WS,M:eT};function XS(){var t=pl.f(),e=Qu();return t||e}function PS(t){var e=Rr(t);e!==null&&e.tag===5&&e.type==="form"?Cy(e):pl.r(t)}var _r=typeof document>"u"?null:document;function zv(t,e,n){var l=_r;if(l&&typeof e=="string"&&e){var i=wn(e);i='link[rel="'+t+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Wh.has(i)||(Wh.add(i),t={rel:t,crossOrigin:n,href:e},l.querySelector(i)===null&&(e=l.createElement("link"),Ae(e,"link",t),ke(e),l.head.appendChild(e)))}}function ZS(t){pl.D(t),zv("dns-prefetch",t,null)}function KS(t,e){pl.C(t,e),zv("preconnect",t,e)}function JS(t,e,n){pl.L(t,e,n);var l=_r;if(l&&t&&e){var i='link[rel="preload"][as="'+wn(e)+'"]';e==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+wn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+wn(n.imageSizes)+'"]')):i+='[href="'+wn(t)+'"]';var r=i;switch(e){case"style":r=Nr(t);break;case"script":r=Or(t)}An.has(r)||(t=Ft({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),An.set(r,t),l.querySelector(i)!==null||e==="style"&&l.querySelector(to(r))||e==="script"&&l.querySelector(eo(r))||(e=l.createElement("link"),Ae(e,"link",t),ke(e),l.head.appendChild(e)))}}function $S(t,e){pl.m(t,e);var n=_r;if(n&&t){var l=e&&typeof e.as=="string"?e.as:"script",i='link[rel="modulepreload"][as="'+wn(l)+'"][href="'+wn(t)+'"]',r=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Or(t)}if(!An.has(r)&&(t=Ft({rel:"modulepreload",href:t},e),An.set(r,t),n.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(eo(r)))return}l=n.createElement("link"),Ae(l,"link",t),ke(l),n.head.appendChild(l)}}}function WS(t,e,n){pl.S(t,e,n);var l=_r;if(l&&t){var i=sr(l).hoistableStyles,r=Nr(t);e=e||"default";var a=i.get(r);if(!a){var o={loading:0,preload:null};if(a=l.querySelector(to(r)))o.loading=5;else{t=Ft({rel:"stylesheet",href:t,"data-precedence":e},n),(n=An.get(r))&&bd(t,n);var u=a=l.createElement("link");ke(u),Ae(u,"link",t),u._p=new Promise(function(s,f){u.onload=s,u.onerror=f}),u.addEventListener("load",function(){o.loading|=1}),u.addEventListener("error",function(){o.loading|=2}),o.loading|=4,nu(a,e,l)}a={type:"stylesheet",instance:a,count:1,state:o},i.set(r,a)}}}function tT(t,e){pl.X(t,e);var n=_r;if(n&&t){var l=sr(n).hoistableScripts,i=Or(t),r=l.get(i);r||(r=n.querySelector(eo(i)),r||(t=Ft({src:t,async:!0},e),(e=An.get(i))&&xd(t,e),r=n.createElement("script"),ke(r),Ae(r,"link",t),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function eT(t,e){pl.M(t,e);var n=_r;if(n&&t){var l=sr(n).hoistableScripts,i=Or(t),r=l.get(i);r||(r=n.querySelector(eo(i)),r||(t=Ft({src:t,async:!0,type:"module"},e),(e=An.get(i))&&xd(t,e),r=n.createElement("script"),ke(r),Ae(r,"link",t),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function tg(t,e,n,l){var i=(i=_l.current)?Mu(i):null;if(!i)throw Error(O(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Nr(n.href),n=sr(i).hoistableStyles,l=n.get(e),l||(l={type:"style",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Nr(n.href);var r=sr(i).hoistableStyles,a=r.get(t);if(a||(i=i.ownerDocument||i,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(t,a),(r=i.querySelector(to(t)))&&!r._p&&(a.instance=r,a.state.loading=5),An.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},An.set(t,n),r||nT(i,t,n,a.state))),e&&l===null)throw Error(O(528,""));return a}if(e&&l!==null)throw Error(O(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Or(n),n=sr(i).hoistableScripts,l=n.get(e),l||(l={type:"script",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(O(444,t))}}function Nr(t){return'href="'+wn(t)+'"'}function to(t){return'link[rel="stylesheet"]['+t+"]"}function Lv(t){return Ft({},t,{"data-precedence":t.precedence,precedence:null})}function nT(t,e,n,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),Ae(e,"link",n),ke(e),t.head.appendChild(e))}function Or(t){return'[src="'+wn(t)+'"]'}function eo(t){return"script[async]"+t}function eg(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+wn(n.href)+'"]');if(l)return e.instance=l,ke(l),l;var i=Ft({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),ke(l),Ae(l,"style",i),nu(l,n.precedence,t),e.instance=l;case"stylesheet":i=Nr(n.href);var r=t.querySelector(to(i));if(r)return e.state.loading|=4,e.instance=r,ke(r),r;l=Lv(n),(i=An.get(i))&&bd(l,i),r=(t.ownerDocument||t).createElement("link"),ke(r);var a=r;return a._p=new Promise(function(o,u){a.onload=o,a.onerror=u}),Ae(r,"link",l),e.state.loading|=4,nu(r,n.precedence,t),e.instance=r;case"script":return r=Or(n.src),(i=t.querySelector(eo(r)))?(e.instance=i,ke(i),i):(l=n,(i=An.get(r))&&(l=Ft({},n),xd(l,i)),t=t.ownerDocument||t,i=t.createElement("script"),ke(i),Ae(i,"link",l),t.head.appendChild(i),e.instance=i);case"void":return null;default:throw Error(O(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(l=e.instance,e.state.loading|=4,nu(l,n.precedence,t));return e.instance}function nu(t,e,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,r=i,a=0;a<l.length;a++){var o=l[a];if(o.dataset.precedence===e)r=o;else if(r!==i)break}r?r.parentNode.insertBefore(t,r.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function bd(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function xd(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var lu=null;function ng(t,e,n){if(lu===null){var l=new Map,i=lu=new Map;i.set(n,l)}else i=lu,l=i.get(n),l||(l=new Map,i.set(n,l));if(l.has(t))return l;for(l.set(t,null),n=n.getElementsByTagName(t),i=0;i<n.length;i++){var r=n[i];if(!(r[Fa]||r[ze]||t==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var a=r.getAttribute(e)||"";a=t+a;var o=l.get(a);o?o.push(r):l.set(a,[r])}}return l}function lg(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function lT(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Uv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var La=null;function iT(){}function rT(t,e,n){if(La===null)throw Error(O(475));var l=La;if(e.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var i=Nr(n.href),r=t.querySelector(to(i));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=Du.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=r,ke(r);return}r=t.ownerDocument||t,n=Lv(n),(i=An.get(i))&&bd(n,i),r=r.createElement("link"),ke(r);var a=r;a._p=new Promise(function(o,u){a.onload=o,a.onerror=u}),Ae(r,"link",n),e.instance=r}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=Du.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}function aT(){if(La===null)throw Error(O(475));var t=La;return t.stylesheets&&t.count===0&&Af(t,t.stylesheets),0<t.count?function(e){var n=setTimeout(function(){if(t.stylesheets&&Af(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(n)}}:null}function Du(){if(this.count--,this.count===0){if(this.stylesheets)Af(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var _u=null;function Af(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,_u=new Map,e.forEach(oT,t),_u=null,Du.call(t))}function oT(t,e){if(!(e.state.loading&4)){var n=_u.get(t);if(n)var l=n.get(null);else{n=new Map,_u.set(t,n);for(var i=t.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<i.length;r++){var a=i[r];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),l=a)}l&&n.set(null,l)}i=e.instance,a=i.getAttribute("data-precedence"),r=n.get(a)||l,r===l&&n.set(null,i),n.set(a,i),this.count++,l=Du.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),r?r.parentNode.insertBefore(i,r.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(i,t.firstChild)),e.state.loading|=4}}var Ua={$$typeof:ll,Provider:null,Consumer:null,_currentValue:ui,_currentValue2:ui,_threadCount:0};function uT(t,e,n,l,i,r,a,o){this.tag=1,this.containerInfo=t,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=rc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rc(0),this.hiddenUpdates=rc(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=r,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function Bv(t,e,n,l,i,r,a,o,u,s,f,c){return t=new uT(t,e,n,a,o,u,s,c),e=1,r===!0&&(e|=24),r=sn(3,null,null,e),t.current=r,r.stateNode=t,e=Pf(),e.refCount++,t.pooledCache=e,e.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:e},Kf(r),t}function Hv(t){return t?(t=rr,t):rr}function qv(t,e,n,l,i,r){i=Hv(i),l.context===null?l.context=i:l.pendingContext=i,l=Ol(e),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=zl(t,l,e),n!==null&&(mn(n,t,e),ya(n,t,e))}function ig(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function kd(t,e){ig(t,e),(t=t.alternate)&&ig(t,e)}function Iv(t){if(t.tag===13){var e=Mr(t,67108864);e!==null&&mn(e,t,67108864),kd(t,67108864)}}var Ou=!0;function sT(t,e,n,l){var i=it.T;it.T=null;var r=_t.p;try{_t.p=2,Sd(t,e,n,l)}finally{_t.p=r,it.T=i}}function cT(t,e,n,l){var i=it.T;it.T=null;var r=_t.p;try{_t.p=8,Sd(t,e,n,l)}finally{_t.p=r,it.T=i}}function Sd(t,e,n,l){if(Ou){var i=Rf(l);if(i===null)Oc(t,e,l,zu,n),rg(t,l);else if(dT(i,t,e,n,l))l.stopPropagation();else if(rg(t,l),e&4&&-1<fT.indexOf(t)){for(;i!==null;){var r=Rr(i);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var a=ri(r.pendingLanes);if(a!==0){var o=r;for(o.pendingLanes|=2,o.entangledLanes|=2;a;){var u=1<<31-fn(a);o.entanglements[1]|=u,a&=~u}Gn(r),(Ut&6)===0&&(wu=Vn()+500,Wa(0,!1))}}break;case 13:o=Mr(r,2),o!==null&&mn(o,r,2),Qu(),kd(r,2)}if(r=Rf(l),r===null&&Oc(t,e,l,zu,n),r===i)break;i=r}i!==null&&l.stopPropagation()}else Oc(t,e,l,null,n)}}function Rf(t){return t=Hf(t),Td(t)}var zu=null;function Td(t){if(zu=null,t=Wi(t),t!==null){var e=Ia(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=fg(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return zu=t,null}function jv(t){switch(t){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($x()){case hg:return 2;case gg:return 8;case uu:case Wx:return 32;case yg:return 268435456;default:return 32}default:return 32}}var Mf=!1,Bl=null,Hl=null,ql=null,Ba=new Map,Ha=new Map,Nl=[],fT="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 rg(t,e){switch(t){case"focusin":case"focusout":Bl=null;break;case"dragenter":case"dragleave":Hl=null;break;case"mouseover":case"mouseout":ql=null;break;case"pointerover":case"pointerout":Ba.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ha.delete(e.pointerId)}}function aa(t,e,n,l,i,r){return t===null||t.nativeEvent!==r?(t={blockedOn:e,domEventName:n,eventSystemFlags:l,nativeEvent:r,targetContainers:[i]},e!==null&&(e=Rr(e),e!==null&&Iv(e)),t):(t.eventSystemFlags|=l,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function dT(t,e,n,l,i){switch(e){case"focusin":return Bl=aa(Bl,t,e,n,l,i),!0;case"dragenter":return Hl=aa(Hl,t,e,n,l,i),!0;case"mouseover":return ql=aa(ql,t,e,n,l,i),!0;case"pointerover":var r=i.pointerId;return Ba.set(r,aa(Ba.get(r)||null,t,e,n,l,i)),!0;case"gotpointercapture":return r=i.pointerId,Ha.set(r,aa(Ha.get(r)||null,t,e,n,l,i)),!0}return!1}function Yv(t){var e=Wi(t.target);if(e!==null){var n=Ia(e);if(n!==null){if(e=n.tag,e===13){if(e=fg(n),e!==null){t.blockedOn=e,ok(t.priority,function(){if(n.tag===13){var l=dn();l=zf(l);var i=Mr(n,l);i!==null&&mn(i,n,l),kd(n,l)}});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function iu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=Rf(t.nativeEvent);if(n===null){n=t.nativeEvent;var l=new n.constructor(n.type,n);Gc=l,n.target.dispatchEvent(l),Gc=null}else return e=Rr(n),e!==null&&Iv(e),t.blockedOn=n,!1;e.shift()}return!0}function ag(t,e,n){iu(t)&&n.delete(e)}function mT(){Mf=!1,Bl!==null&&iu(Bl)&&(Bl=null),Hl!==null&&iu(Hl)&&(Hl=null),ql!==null&&iu(ql)&&(ql=null),Ba.forEach(ag),Ha.forEach(ag)}function Fo(t,e){t.blockedOn===e&&(t.blockedOn=null,Mf||(Mf=!0,ye.unstable_scheduleCallback(ye.unstable_NormalPriority,mT)))}var Qo=null;function og(t){Qo!==t&&(Qo=t,ye.unstable_scheduleCallback(ye.unstable_NormalPriority,function(){Qo===t&&(Qo=null);for(var e=0;e<t.length;e+=3){var n=t[e],l=t[e+1],i=t[e+2];if(typeof l!="function"){if(Td(l||n)===null)continue;break}var r=Rr(n);r!==null&&(t.splice(e,3),e-=3,sf(r,{pending:!0,data:i,method:n.method,action:l},l,i))}}))}function qa(t){function e(u){return Fo(u,t)}Bl!==null&&Fo(Bl,t),Hl!==null&&Fo(Hl,t),ql!==null&&Fo(ql,t),Ba.forEach(e),Ha.forEach(e);for(var n=0;n<Nl.length;n++){var l=Nl[n];l.blockedOn===t&&(l.blockedOn=null)}for(;0<Nl.length&&(n=Nl[0],n.blockedOn===null);)Yv(n),n.blockedOn===null&&Nl.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var i=n[l],r=n[l+1],a=i[en]||null;if(typeof r=="function")a||og(n);else if(a){var o=null;if(r&&r.hasAttribute("formAction")){if(i=r,a=r[en]||null)o=a.formAction;else if(Td(i)!==null)continue}else o=a.action;typeof o=="function"?n[l+1]=o:(n.splice(l,3),l-=3),og(n)}}}function wd(t){this._internalRoot=t}Zu.prototype.render=wd.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(O(409));var n=e.current,l=dn();qv(n,l,t,e,null,null)};Zu.prototype.unmount=wd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;qv(t.current,2,null,t,null,null),Qu(),e[Ar]=null}};function Zu(t){this._internalRoot=t}Zu.prototype.unstable_scheduleHydration=function(t){if(t){var e=Sg();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Nl.length&&e!==0&&e<Nl[n].priority;n++);Nl.splice(n,0,t),n===0&&Yv(t)}};var ug=sg.version;if(ug!=="19.1.1")throw Error(O(527,ug,"19.1.1"));_t.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(O(188)):(t=Object.keys(t).join(","),Error(O(268,t)));return t=Qx(e),t=t!==null?dg(t):null,t=t===null?null:t.stateNode,t};var pT={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:it,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(oa=__REACT_DEVTOOLS_GLOBAL_HOOK__,!oa.isDisabled&&oa.supportsFiber))try{ja=oa.inject(pT),cn=oa}catch{}var oa;Ku.createRoot=function(t,e){if(!cg(t))throw Error(O(299));var n=!1,l="",i=By,r=Hy,a=qy,o=null;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(l=e.identifierPrefix),e.onUncaughtError!==void 0&&(i=e.onUncaughtError),e.onCaughtError!==void 0&&(r=e.onCaughtError),e.onRecoverableError!==void 0&&(a=e.onRecoverableError),e.unstable_transitionCallbacks!==void 0&&(o=e.unstable_transitionCallbacks)),e=Bv(t,1,!1,null,null,n,l,i,r,a,o,null),t[Ar]=e.current,vd(t),new wd(e)};Ku.hydrateRoot=function(t,e,n){if(!cg(t))throw Error(O(299));var l=!1,i="",r=By,a=Hy,o=qy,u=null,s=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(u=n.unstable_transitionCallbacks),n.formState!==void 0&&(s=n.formState)),e=Bv(t,1,!0,e,n??null,l,i,r,a,o,u,s),e.context=Hv(null),n=e.current,l=dn(),l=zf(l),i=Ol(l),i.callback=null,zl(n,i,l),n=l,e.current.lanes=n,Va(e,n),Gn(e),t[Ar]=e.current,vd(t),new Zu(e)};Ku.version="19.1.1"});var Gv=Ve((qA,Qv)=>{"use strict";function Fv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Fv)}catch(t){console.error(t)}}Fv(),Qv.exports=Vv()});var ob=Ve((F2,ab)=>{"use strict";var nb=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,wT=/\n/g,ET=/^\s*/,CT=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,NT=/^:\s*/,AT=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,RT=/^[;\s]*/,MT=/^\s+|\s+$/g,DT=`
10
- `,lb="/",ib="*",Ei="",_T="comment",OT="declaration";function zT(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,l=1;function i(g){var b=g.match(wT);b&&(n+=b.length);var N=g.lastIndexOf(DT);l=~N?g.length-N:l+g.length}function r(){var g={line:n,column:l};return function(b){return b.position=new a(g),s(),b}}function a(g){this.start=g,this.end={line:n,column:l},this.source=e.source}a.prototype.content=t;function o(g){var b=new Error(e.source+":"+n+":"+l+": "+g);if(b.reason=g,b.filename=e.source,b.line=n,b.column=l,b.source=t,!e.silent)throw b}function u(g){var b=g.exec(t);if(b){var N=b[0];return i(N),t=t.slice(N.length),b}}function s(){u(ET)}function f(g){var b;for(g=g||[];b=c();)b!==!1&&g.push(b);return g}function c(){var g=r();if(!(lb!=t.charAt(0)||ib!=t.charAt(1))){for(var b=2;Ei!=t.charAt(b)&&(ib!=t.charAt(b)||lb!=t.charAt(b+1));)++b;if(b+=2,Ei===t.charAt(b-1))return o("End of comment missing");var N=t.slice(2,b-2);return l+=2,i(N),t=t.slice(b),l+=2,g({type:_T,comment:N})}}function m(){var g=r(),b=u(CT);if(b){if(c(),!u(NT))return o("property missing ':'");var N=u(AT),p=g({type:OT,property:rb(b[0].replace(nb,Ei)),value:N?rb(N[0].replace(nb,Ei)):Ei});return u(RT),p}}function d(){var g=[];f(g);for(var b;b=m();)b!==!1&&(g.push(b),f(g));return g}return s(),d()}function rb(t){return t?t.replace(MT,Ei):Ei}ab.exports=zT});var ub=Ve(io=>{"use strict";var LT=io&&io.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(io,"__esModule",{value:!0});io.default=BT;var UT=LT(ob());function BT(t,e){let n=null;if(!t||typeof t!="string")return n;let l=(0,UT.default)(t),i=typeof e=="function";return l.forEach(r=>{if(r.type!=="declaration")return;let{property:a,value:o}=r;i?e(a,o,r):o&&(n=n||{},n[a]=o)}),n}});var cb=Ve(ls=>{"use strict";Object.defineProperty(ls,"__esModule",{value:!0});ls.camelCase=void 0;var HT=/^--[a-zA-Z0-9_-]+$/,qT=/-([a-z])/g,IT=/^[^-]+$/,jT=/^-(webkit|moz|ms|o|khtml)-/,YT=/^-(ms)-/,VT=function(t){return!t||IT.test(t)||HT.test(t)},FT=function(t,e){return e.toUpperCase()},sb=function(t,e){return"".concat(e,"-")},QT=function(t,e){return e===void 0&&(e={}),VT(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(YT,sb):t=t.replace(jT,sb),t.replace(qT,FT))};ls.camelCase=QT});var db=Ve((Ud,fb)=>{"use strict";var GT=Ud&&Ud.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},XT=GT(ub()),PT=cb();function Ld(t,e){var n={};return!t||typeof t!="string"||(0,XT.default)(t,function(l,i){l&&i&&(n[(0,PT.camelCase)(l,e)]=i)}),n}Ld.default=Ld;fb.exports=Ld});var Sb=Ve(rs=>{"use strict";var pw=Symbol.for("react.transitional.element"),hw=Symbol.for("react.fragment");function kb(t,e,n){var l=null;if(n!==void 0&&(l=""+n),e.key!==void 0&&(l=""+e.key),"key"in e){n={};for(var i in e)i!=="key"&&(n[i]=e[i])}else n=e;return e=n.ref,{$$typeof:pw,type:t,key:l,ref:e!==void 0?e:null,props:n}}rs.Fragment=hw;rs.jsx=kb;rs.jsxs=kb});var rt=Ve((yR,Tb)=>{"use strict";Tb.exports=Sb()});var q0=Ve((S3,H0)=>{"use strict";var As=Object.prototype.hasOwnProperty,B0=Object.prototype.toString,D0=Object.defineProperty,_0=Object.getOwnPropertyDescriptor,O0=function(e){return typeof Array.isArray=="function"?Array.isArray(e):B0.call(e)==="[object Array]"},z0=function(e){if(!e||B0.call(e)!=="[object Object]")return!1;var n=As.call(e,"constructor"),l=e.constructor&&e.constructor.prototype&&As.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!l)return!1;var i;for(i in e);return typeof i>"u"||As.call(e,i)},L0=function(e,n){D0&&n.name==="__proto__"?D0(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},U0=function(e,n){if(n==="__proto__")if(As.call(e,n)){if(_0)return _0(e,n).value}else return;return e[n]};H0.exports=function t(){var e,n,l,i,r,a,o=arguments[0],u=1,s=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},u=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});u<s;++u)if(e=arguments[u],e!=null)for(n in e)l=U0(o,n),i=U0(e,n),o!==i&&(f&&i&&(z0(i)||(r=O0(i)))?(r?(r=!1,a=l&&O0(l)?l:[]):a=l&&z0(l)?l:{},L0(o,{name:n,newValue:t(f,a,i)})):typeof i<"u"&&L0(o,{name:n,newValue:i}));return o}});var gx=Q(ie(),1),yx=Q(Gv(),1);var Rt=Q(ie(),1);function Xv(){return window.__CODELY__??{}}function Ed(t){return t.mode??"chat"}function Ju(t){return t.controlPlaneApiBase??"/__codely__/control-plane"}var H1=Q(ie(),1);function Pv(t,e){let n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var hT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yT={};function $u(t,e){return((e||yT).jsx?gT:hT).test(t)}var vT=/[ \t\n\f\r]/g;function Cd(t){return typeof t=="object"?t.type==="text"?Zv(t.value):!1:Zv(t)}function Zv(t){return t.replace(vT,"")===""}var hl=class{constructor(e,n,l){this.normal=n,this.property=e,l&&(this.space=l)}};hl.prototype.normal={};hl.prototype.property={};hl.prototype.space=void 0;function Nd(t,e){let n={},l={};for(let i of t)Object.assign(n,i.property),Object.assign(l,i.normal);return new hl(n,l,e)}function no(t){return t.toLowerCase()}var we=class{constructor(e,n){this.attribute=n,this.property=e}};we.prototype.attribute="";we.prototype.booleanish=!1;we.prototype.boolean=!1;we.prototype.commaOrSpaceSeparated=!1;we.prototype.commaSeparated=!1;we.prototype.defined=!1;we.prototype.mustUseProperty=!1;we.prototype.number=!1;we.prototype.overloadedBoolean=!1;we.prototype.property="";we.prototype.spaceSeparated=!1;we.prototype.space=void 0;var lo={};dp(lo,{boolean:()=>ut,booleanish:()=>ee,commaOrSpaceSeparated:()=>ln,commaSeparated:()=>Ql,number:()=>U,overloadedBoolean:()=>Wu,spaceSeparated:()=>Bt});var bT=0,ut=Ti(),ee=Ti(),Wu=Ti(),U=Ti(),Bt=Ti(),Ql=Ti(),ln=Ti();function Ti(){return 2**++bT}var Ad=Object.keys(lo),wi=class extends we{constructor(e,n,l,i){let r=-1;if(super(e,n),Kv(this,"space",i),typeof l=="number")for(;++r<Ad.length;){let a=Ad[r];Kv(this,Ad[r],(l&lo[a])===lo[a])}}};wi.prototype.defined=!0;function Kv(t,e,n){n&&(t[e]=n)}function Rn(t){let e={},n={};for(let[l,i]of Object.entries(t.properties)){let r=new wi(l,t.transform(t.attributes||{},l),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),e[l]=r,n[no(l)]=l,n[no(r.attribute)]=l}return new hl(e,n,t.space)}var Rd=Rn({properties:{ariaActiveDescendant:null,ariaAtomic:ee,ariaAutoComplete:null,ariaBusy:ee,ariaChecked:ee,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:Bt,ariaCurrent:null,ariaDescribedBy:Bt,ariaDetails:null,ariaDisabled:ee,ariaDropEffect:Bt,ariaErrorMessage:null,ariaExpanded:ee,ariaFlowTo:Bt,ariaGrabbed:ee,ariaHasPopup:null,ariaHidden:ee,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Bt,ariaLevel:U,ariaLive:null,ariaModal:ee,ariaMultiLine:ee,ariaMultiSelectable:ee,ariaOrientation:null,ariaOwns:Bt,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:ee,ariaReadOnly:ee,ariaRelevant:null,ariaRequired:ee,ariaRoleDescription:Bt,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:ee,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function ts(t,e){return e in t?t[e]:e}function es(t,e){return ts(t,e.toLowerCase())}var Jv=Rn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ql,acceptCharset:Bt,accessKey:Bt,action:null,allow:null,allowFullScreen:ut,allowPaymentRequest:ut,allowUserMedia:ut,alt:null,as:null,async:ut,autoCapitalize:null,autoComplete:Bt,autoFocus:ut,autoPlay:ut,blocking:Bt,capture:null,charSet:null,checked:ut,cite:null,className:Bt,cols:U,colSpan:null,content:null,contentEditable:ee,controls:ut,controlsList:Bt,coords:U|Ql,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ut,defer:ut,dir:null,dirName:null,disabled:ut,download:Wu,draggable:ee,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ut,formTarget:null,headers:Bt,height:U,hidden:Wu,high:U,href:null,hrefLang:null,htmlFor:Bt,httpEquiv:Bt,id:null,imageSizes:null,imageSrcSet:null,inert:ut,inputMode:null,integrity:null,is:null,isMap:ut,itemId:null,itemProp:Bt,itemRef:Bt,itemScope:ut,itemType:Bt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ut,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:ut,muted:ut,name:null,nonce:null,noModule:ut,noValidate:ut,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:ut,optimum:U,pattern:null,ping:Bt,placeholder:null,playsInline:ut,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ut,referrerPolicy:null,rel:Bt,required:ut,reversed:ut,rows:U,rowSpan:U,sandbox:Bt,scope:null,scoped:ut,seamless:ut,selected:ut,shadowRootClonable:ut,shadowRootDelegatesFocus:ut,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:ee,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:ut,useMap:null,value:ee,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Bt,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ut,declare:ut,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:ut,noHref:ut,noShade:ut,noWrap:ut,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:ee,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ut,disableRemotePlayback:ut,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:es});var $v=Rn({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:ln,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:Bt,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:ut,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:Ql,g2:Ql,glyphName:Ql,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Bt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ln,rev:ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ln,requiredFeatures:ln,requiredFonts:ln,requiredFormats:ln,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ln,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:ts});var Md=Rn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}});var Dd=Rn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:es});var _d=Rn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var Od={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"};var xT=/[A-Z]/g,Wv=/-[a-z]/g,kT=/^data[-\w.:]+$/i;function zd(t,e){let n=no(e),l=e,i=we;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kT.test(e)){if(e.charAt(4)==="-"){let r=e.slice(5).replace(Wv,TT);l="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{let r=e.slice(4);if(!Wv.test(r)){let a=r.replace(xT,ST);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=wi}return new i(l,e)}function ST(t){return"-"+t.toLowerCase()}function TT(t){return t.charAt(1).toUpperCase()}var tb=Nd([Rd,Jv,Md,Dd,_d],"html"),ns=Nd([Rd,$v,Md,Dd,_d],"svg");function eb(t){return t.join(" ").trim()}var gb=Q(db(),1);var is=mb("end"),zr=mb("start");function mb(t){return e;function e(n){let l=n&&n.position&&n.position[t]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function Bd(t){let e=zr(t),n=is(t);if(e&&n)return{start:e,end:n}}function Gl(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?pb(t.position):"start"in t||"end"in t?pb(t):"line"in t||"column"in t?Hd(t):""}function Hd(t){return hb(t&&t.line)+":"+hb(t&&t.column)}function pb(t){return Hd(t&&t.start)+"-"+Hd(t&&t.end)}function hb(t){return t&&typeof t=="number"?t:1}var oe=class extends Error{constructor(e,n,l){super(),typeof n=="string"&&(l=n,n=void 0);let i="",r={},a=!1;if(n&&("line"in n&&"column"in n?r={place:n}:"start"in n&&"end"in n?r={place:n}:"type"in n?r={ancestors:[n],place:n.position}:r={...n}),typeof e=="string"?i=e:!r.cause&&e&&(a=!0,i=e.message,r.cause=e),!r.ruleId&&!r.source&&typeof l=="string"){let u=l.indexOf(":");u===-1?r.ruleId=l:(r.source=l.slice(0,u),r.ruleId=l.slice(u+1))}if(!r.place&&r.ancestors&&r.ancestors){let u=r.ancestors[r.ancestors.length-1];u&&(r.place=u.position)}let o=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Gl(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=a&&r.cause&&typeof r.cause.stack=="string"?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};oe.prototype.file="";oe.prototype.name="";oe.prototype.reason="";oe.prototype.message="";oe.prototype.stack="";oe.prototype.column=void 0;oe.prototype.line=void 0;oe.prototype.ancestors=void 0;oe.prototype.cause=void 0;oe.prototype.fatal=void 0;oe.prototype.place=void 0;oe.prototype.ruleId=void 0;oe.prototype.source=void 0;var qd={}.hasOwnProperty,ZT=new Map,KT=/[A-Z]/g,JT=new Set(["table","tbody","thead","tfoot","tr"]),$T=new Set(["td","th"]),yb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Id(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let n=e.filePath||void 0,l;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=aw(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=rw(n,e.jsx,e.jsxs)}let i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:l,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?ns:tb,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},r=vb(i,t,void 0);return r&&typeof r!="string"?r:i.create(t,i.Fragment,{children:r||void 0},void 0)}function vb(t,e,n){if(e.type==="element")return WT(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return tw(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return nw(t,e,n);if(e.type==="mdxjsEsm")return ew(t,e);if(e.type==="root")return lw(t,e,n);if(e.type==="text")return iw(t,e)}function WT(t,e,n){let l=t.schema,i=l;e.tagName.toLowerCase()==="svg"&&l.space==="html"&&(i=ns,t.schema=i),t.ancestors.push(e);let r=xb(t,e.tagName,!1),a=ow(t,e),o=Yd(t,e);return JT.has(e.tagName)&&(o=o.filter(function(u){return typeof u=="string"?!Cd(u):!0})),bb(t,a,r,e),jd(a,o),t.ancestors.pop(),t.schema=l,t.create(e,r,a,n)}function tw(t,e){if(e.data&&e.data.estree&&t.evaluater){let l=e.data.estree.body[0];return l.type,t.evaluater.evaluateExpression(l.expression)}ro(t,e.position)}function ew(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);ro(t,e.position)}function nw(t,e,n){let l=t.schema,i=l;e.name==="svg"&&l.space==="html"&&(i=ns,t.schema=i),t.ancestors.push(e);let r=e.name===null?t.Fragment:xb(t,e.name,!0),a=uw(t,e),o=Yd(t,e);return bb(t,a,r,e),jd(a,o),t.ancestors.pop(),t.schema=l,t.create(e,r,a,n)}function lw(t,e,n){let l={};return jd(l,Yd(t,e)),t.create(e,t.Fragment,l,n)}function iw(t,e){return e.value}function bb(t,e,n,l){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=l)}function jd(t,e){if(e.length>0){let n=e.length>1?e:e[0];n&&(t.children=n)}}function rw(t,e,n){return l;function l(i,r,a,o){let s=Array.isArray(a.children)?n:e;return o?s(r,a,o):s(r,a)}}function aw(t,e){return n;function n(l,i,r,a){let o=Array.isArray(r.children),u=zr(l);return e(i,r,a,o,{columnNumber:u?u.column-1:void 0,fileName:t,lineNumber:u?u.line:void 0},void 0)}}function ow(t,e){let n={},l,i;for(i in e.properties)if(i!=="children"&&qd.call(e.properties,i)){let r=sw(t,i,e.properties[i]);if(r){let[a,o]=r;t.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&$T.has(e.tagName)?l=o:n[a]=o}}if(l){let r=n.style||(n.style={});r[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return n}function uw(t,e){let n={};for(let l of e.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&t.evaluater){let r=l.data.estree.body[0];r.type;let a=r.expression;a.type;let o=a.properties[0];o.type,Object.assign(n,t.evaluater.evaluateExpression(o.argument))}else ro(t,e.position);else{let i=l.name,r;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&t.evaluater){let o=l.value.data.estree.body[0];o.type,r=t.evaluater.evaluateExpression(o.expression)}else ro(t,e.position);else r=l.value===null?!0:l.value;n[i]=r}return n}function Yd(t,e){let n=[],l=-1,i=t.passKeys?new Map:ZT;for(;++l<e.children.length;){let r=e.children[l],a;if(t.passKeys){let u=r.type==="element"?r.tagName:r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement"?r.name:void 0;if(u){let s=i.get(u)||0;a=u+"-"+s,i.set(u,s+1)}}let o=vb(t,r,a);o!==void 0&&n.push(o)}return n}function sw(t,e,n){let l=zd(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=l.commaSeparated?Pv(n):eb(n)),l.property==="style"){let i=typeof n=="object"?n:cw(t,String(n));return t.stylePropertyNameCase==="css"&&(i=fw(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&l.space?Od[l.property]||l.property:l.attribute,n]}}function cw(t,e){try{return(0,gb.default)(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};let l=n,i=new oe("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=yb+"#cannot-parse-style-attribute",i}}function xb(t,e,n){let l;if(!n)l={type:"Literal",value:e};else if(e.includes(".")){let i=e.split("."),r=-1,a;for(;++r<i.length;){let o=$u(i[r])?{type:"Identifier",name:i[r]}:{type:"Literal",value:i[r]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(r&&o.type==="Literal"),optional:!1}:o}l=a}else l=$u(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(l.type==="Literal"){let i=l.value;return qd.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(l);ro(t)}function ro(t,e){let n=new oe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=yb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function fw(t){let e={},n;for(n in t)qd.call(t,n)&&(e[dw(n)]=t[n]);return e}function dw(t){let e=t.replace(KT,mw);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function mw(t){return"-"+t.toLowerCase()}var ao={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"]};var qr=Q(rt(),1),Z0=Q(ie(),1);var gw={};function Ci(t,e){let n=e||gw,l=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Eb(t,l,i)}function Eb(t,e,n){if(yw(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return wb(t.children,e,n)}return Array.isArray(t)?wb(t,e,n):""}function wb(t,e,n){let l=[],i=-1;for(;++i<t.length;)l[i]=Eb(t[i],e,n);return l.join("")}function yw(t){return!!(t&&typeof t=="object")}var Cb=document.createElement("i");function Lr(t){let e="&"+t+";";Cb.innerHTML=e;let n=Cb.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function ue(t,e,n,l){let i=t.length,r=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,l.length<1e4)a=Array.from(l),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);r<l.length;)a=l.slice(r,r+1e4),a.unshift(e,0),t.splice(...a),r+=1e4,e+=1e4}function Xe(t,e){return t.length>0?(ue(t,t.length,0,e),t):e}var Nb={}.hasOwnProperty;function as(t){let e={},n=-1;for(;++n<t.length;)vw(e,t[n]);return e}function vw(t,e){let n;for(n in e){let i=(Nb.call(t,n)?t[n]:void 0)||(t[n]={}),r=e[n],a;if(r)for(a in r){Nb.call(i,a)||(i[a]=[]);let o=r[a];bw(i[a],Array.isArray(o)?o:o?[o]:[])}}}function bw(t,e){let n=-1,l=[];for(;++n<e.length;)(e[n].add==="after"?t:l).push(e[n]);ue(t,0,0,l)}function os(t,e){let n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}function Ue(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var ve=Xl(/[A-Za-z]/),ne=Xl(/[\dA-Za-z]/),Ab=Xl(/[#-'*+\--9=?A-Z^-~]/);function Ni(t){return t!==null&&(t<32||t===127)}var oo=Xl(/\d/),Rb=Xl(/[\dA-Fa-f]/),Mb=Xl(/[!-/:-@[-`{-~]/);function Y(t){return t!==null&&t<-2}function ht(t){return t!==null&&(t<0||t===32)}function nt(t){return t===-2||t===-1||t===32}var Ai=Xl(/\p{P}|\p{S}/u),Xn=Xl(/\s/);function Xl(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function Mn(t){let e=[],n=-1,l=0,i=0;for(;++n<t.length;){let r=t.charCodeAt(n),a="";if(r===37&&ne(t.charCodeAt(n+1))&&ne(t.charCodeAt(n+2)))i=2;else if(r<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(r))||(a=String.fromCharCode(r));else if(r>55295&&r<57344){let o=t.charCodeAt(n+1);r<56320&&o>56319&&o<57344?(a=String.fromCharCode(r,o),i=1):a="\uFFFD"}else a=String.fromCharCode(r);a&&(e.push(t.slice(l,n),encodeURIComponent(a)),l=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(l)}function $(t,e,n,l){let i=l?l-1:Number.POSITIVE_INFINITY,r=0;return a;function a(u){return nt(u)?(t.enter(n),o(u)):e(u)}function o(u){return nt(u)&&r++<i?(t.consume(u),o):(t.exit(n),e(u))}}var Db={tokenize:xw};function xw(t){let e=t.attempt(this.parser.constructs.contentInitial,l,i),n;return e;function l(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),$(t,e,"linePrefix")}function i(o){return t.enter("paragraph"),r(o)}function r(o){let u=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=u),n=u,a(o)}function a(o){if(o===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(o);return}return Y(o)?(t.consume(o),t.exit("chunkText"),r):(t.consume(o),a)}}var Ob={tokenize:kw},_b={tokenize:Sw};function kw(t){let e=this,n=[],l=0,i,r,a;return o;function o(y){if(l<n.length){let w=n[l];return e.containerState=w[1],t.attempt(w[0].continuation,u,s)(y)}return s(y)}function u(y){if(l++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&h();let w=e.events.length,A=w,E;for(;A--;)if(e.events[A][0]==="exit"&&e.events[A][1].type==="chunkFlow"){E=e.events[A][1].end;break}p(l);let D=w;for(;D<e.events.length;)e.events[D][1].end={...E},D++;return ue(e.events,A+1,0,e.events.slice(w)),e.events.length=D,s(y)}return o(y)}function s(y){if(l===n.length){if(!i)return m(y);if(i.currentConstruct&&i.currentConstruct.concrete)return g(y);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(_b,f,c)(y)}function f(y){return i&&h(),p(l),m(y)}function c(y){return e.parser.lazy[e.now().line]=l!==n.length,a=e.now().offset,g(y)}function m(y){return e.containerState={},t.attempt(_b,d,g)(y)}function d(y){return l++,n.push([e.currentConstruct,e.containerState]),m(y)}function g(y){if(y===null){i&&h(),p(0),t.consume(y);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:r}),b(y)}function b(y){if(y===null){N(t.exit("chunkFlow"),!0),p(0),t.consume(y);return}return Y(y)?(t.consume(y),N(t.exit("chunkFlow")),l=0,e.interrupt=void 0,o):(t.consume(y),b)}function N(y,w){let A=e.sliceStream(y);if(w&&A.push(null),y.previous=r,r&&(r.next=y),r=y,i.defineSkip(y.start),i.write(A),e.parser.lazy[y.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<a&&(!i.events[E][1].end||i.events[E][1].end.offset>a))return;let D=e.events.length,L=D,I,T;for(;L--;)if(e.events[L][0]==="exit"&&e.events[L][1].type==="chunkFlow"){if(I){T=e.events[L][1].end;break}I=!0}for(p(l),E=D;E<e.events.length;)e.events[E][1].end={...T},E++;ue(e.events,L+1,0,e.events.slice(D)),e.events.length=E}}function p(y){let w=n.length;for(;w-- >y;){let A=n[w];e.containerState=A[1],A[0].exit.call(e,t)}n.length=y}function h(){i.write([null]),r=void 0,i=void 0,e.containerState._closeFlow=void 0}}function Sw(t,e,n){return $(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function gl(t){if(t===null||ht(t)||Xn(t))return 1;if(Ai(t))return 2}function Pl(t,e,n){let l=[],i=-1;for(;++i<t.length;){let r=t[i].resolveAll;r&&!l.includes(r)&&(e=r(e,n),l.push(r))}return e}var uo={name:"attention",resolveAll:Tw,tokenize:ww};function Tw(t,e){let n=-1,l,i,r,a,o,u,s,f;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(l=n;l--;)if(t[l][0]==="exit"&&t[l][1].type==="attentionSequence"&&t[l][1]._open&&e.sliceSerialize(t[l][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[l][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[l][1].end.offset-t[l][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;u=t[l][1].end.offset-t[l][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;let c={...t[l][1].end},m={...t[n][1].start};zb(c,-u),zb(m,u),a={type:u>1?"strongSequence":"emphasisSequence",start:c,end:{...t[l][1].end}},o={type:u>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:m},r={type:u>1?"strongText":"emphasisText",start:{...t[l][1].end},end:{...t[n][1].start}},i={type:u>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},t[l][1].end={...a.start},t[n][1].start={...o.end},s=[],t[l][1].end.offset-t[l][1].start.offset&&(s=Xe(s,[["enter",t[l][1],e],["exit",t[l][1],e]])),s=Xe(s,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",r,e]]),s=Xe(s,Pl(e.parser.constructs.insideSpan.null,t.slice(l+1,n),e)),s=Xe(s,[["exit",r,e],["enter",o,e],["exit",o,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(f=2,s=Xe(s,[["enter",t[n][1],e],["exit",t[n][1],e]])):f=0,ue(t,l-1,n-l+3,s),n=l+s.length-f-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function ww(t,e){let n=this.parser.constructs.attentionMarkers.null,l=this.previous,i=gl(l),r;return a;function a(u){return r=u,t.enter("attentionSequence"),o(u)}function o(u){if(u===r)return t.consume(u),o;let s=t.exit("attentionSequence"),f=gl(u),c=!f||f===2&&i||n.includes(u),m=!i||i===2&&f||n.includes(l);return s._open=!!(r===42?c:c&&(i||!m)),s._close=!!(r===42?m:m&&(f||!c)),e(u)}}function zb(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var Vd={name:"autolink",tokenize:Ew};function Ew(t,e,n){let l=0;return i;function i(d){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),r}function r(d){return ve(d)?(t.consume(d),a):d===64?n(d):s(d)}function a(d){return d===43||d===45||d===46||ne(d)?(l=1,o(d)):s(d)}function o(d){return d===58?(t.consume(d),l=0,u):(d===43||d===45||d===46||ne(d))&&l++<32?(t.consume(d),o):(l=0,s(d))}function u(d){return d===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):d===null||d===32||d===60||Ni(d)?n(d):(t.consume(d),u)}function s(d){return d===64?(t.consume(d),f):Ab(d)?(t.consume(d),s):n(d)}function f(d){return ne(d)?c(d):n(d)}function c(d){return d===46?(t.consume(d),l=0,f):d===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):m(d)}function m(d){if((d===45||ne(d))&&l++<63){let g=d===45?m:c;return t.consume(d),g}return n(d)}}var Pn={partial:!0,tokenize:Cw};function Cw(t,e,n){return l;function l(r){return nt(r)?$(t,i,"linePrefix")(r):i(r)}function i(r){return r===null||Y(r)?e(r):n(r)}}var us={continuation:{tokenize:Aw},exit:Rw,name:"blockQuote",tokenize:Nw};function Nw(t,e,n){let l=this;return i;function i(a){if(a===62){let o=l.containerState;return o.open||(t.enter("blockQuote",{_container:!0}),o.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),r}return n(a)}function r(a){return nt(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function Aw(t,e,n){let l=this;return i;function i(a){return nt(a)?$(t,r,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):r(a)}function r(a){return t.attempt(us,e,n)(a)}}function Rw(t){t.exit("blockQuote")}var ss={name:"characterEscape",tokenize:Mw};function Mw(t,e,n){return l;function l(r){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(r),t.exit("escapeMarker"),i}function i(r){return Mb(r)?(t.enter("characterEscapeValue"),t.consume(r),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(r)}}var cs={name:"characterReference",tokenize:Dw};function Dw(t,e,n){let l=this,i=0,r,a;return o;function o(c){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(c),t.exit("characterReferenceMarker"),u}function u(c){return c===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(c),t.exit("characterReferenceMarkerNumeric"),s):(t.enter("characterReferenceValue"),r=31,a=ne,f(c))}function s(c){return c===88||c===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(c),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),r=6,a=Rb,f):(t.enter("characterReferenceValue"),r=7,a=oo,f(c))}function f(c){if(c===59&&i){let m=t.exit("characterReferenceValue");return a===ne&&!Lr(l.sliceSerialize(m))?n(c):(t.enter("characterReferenceMarker"),t.consume(c),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(c)&&i++<r?(t.consume(c),f):n(c)}}var Lb={partial:!0,tokenize:Ow},fs={concrete:!0,name:"codeFenced",tokenize:_w};function _w(t,e,n){let l=this,i={partial:!0,tokenize:A},r=0,a=0,o;return u;function u(E){return s(E)}function s(E){let D=l.events[l.events.length-1];return r=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,o=E,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),f(E)}function f(E){return E===o?(a++,t.consume(E),f):a<3?n(E):(t.exit("codeFencedFenceSequence"),nt(E)?$(t,c,"whitespace")(E):c(E))}function c(E){return E===null||Y(E)?(t.exit("codeFencedFence"),l.interrupt?e(E):t.check(Lb,b,w)(E)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||Y(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),c(E)):nt(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),$(t,d,"whitespace")(E)):E===96&&E===o?n(E):(t.consume(E),m)}function d(E){return E===null||Y(E)?c(E):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===null||Y(E)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),c(E)):E===96&&E===o?n(E):(t.consume(E),g)}function b(E){return t.attempt(i,w,N)(E)}function N(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),p}function p(E){return r>0&&nt(E)?$(t,h,"linePrefix",r+1)(E):h(E)}function h(E){return E===null||Y(E)?t.check(Lb,b,w)(E):(t.enter("codeFlowValue"),y(E))}function y(E){return E===null||Y(E)?(t.exit("codeFlowValue"),h(E)):(t.consume(E),y)}function w(E){return t.exit("codeFenced"),e(E)}function A(E,D,L){let I=0;return T;function T(tt){return E.enter("lineEnding"),E.consume(tt),E.exit("lineEnding"),lt}function lt(tt){return E.enter("codeFencedFence"),nt(tt)?$(E,K,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(tt):K(tt)}function K(tt){return tt===o?(E.enter("codeFencedFenceSequence"),G(tt)):L(tt)}function G(tt){return tt===o?(I++,E.consume(tt),G):I>=a?(E.exit("codeFencedFenceSequence"),nt(tt)?$(E,P,"whitespace")(tt):P(tt)):L(tt)}function P(tt){return tt===null||Y(tt)?(E.exit("codeFencedFence"),D(tt)):L(tt)}}}function Ow(t,e,n){let l=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r)}function r(a){return l.parser.lazy[l.now().line]?n(a):e(a)}}var so={name:"codeIndented",tokenize:Lw},zw={partial:!0,tokenize:Uw};function Lw(t,e,n){let l=this;return i;function i(s){return t.enter("codeIndented"),$(t,r,"linePrefix",5)(s)}function r(s){let f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(s):n(s)}function a(s){return s===null?u(s):Y(s)?t.attempt(zw,a,u)(s):(t.enter("codeFlowValue"),o(s))}function o(s){return s===null||Y(s)?(t.exit("codeFlowValue"),a(s)):(t.consume(s),o)}function u(s){return t.exit("codeIndented"),e(s)}}function Uw(t,e,n){let l=this;return i;function i(a){return l.parser.lazy[l.now().line]?n(a):Y(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):$(t,r,"linePrefix",5)(a)}function r(a){let o=l.events[l.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):Y(a)?i(a):n(a)}}var Fd={name:"codeText",previous:Hw,resolve:Bw,tokenize:qw};function Bw(t){let e=t.length-4,n=3,l,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(l=n;++l<e;)if(t[l][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(l=n-1,e++;++l<=e;)i===void 0?l!==e&&t[l][1].type!=="lineEnding"&&(i=l):(l===e||t[l][1].type==="lineEnding")&&(t[i][1].type="codeTextData",l!==i+2&&(t[i][1].end=t[l-1][1].end,t.splice(i+2,l-i-2),e-=l-i-2,l=i+2),i=void 0);return t}function Hw(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qw(t,e,n){let l=this,i=0,r,a;return o;function o(m){return t.enter("codeText"),t.enter("codeTextSequence"),u(m)}function u(m){return m===96?(t.consume(m),i++,u):(t.exit("codeTextSequence"),s(m))}function s(m){return m===null?n(m):m===32?(t.enter("space"),t.consume(m),t.exit("space"),s):m===96?(a=t.enter("codeTextSequence"),r=0,c(m)):Y(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),s):(t.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Y(m)?(t.exit("codeTextData"),s(m)):(t.consume(m),f)}function c(m){return m===96?(t.consume(m),r++,c):r===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(m)):(a.type="codeTextData",f(m))}}var ds=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){let l=n??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(e,l):e>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(e,n,l){let i=n||0;this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return l&&co(this.left,l),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),co(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),co(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let n=this.left.splice(e,Number.POSITIVE_INFINITY);co(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);co(this.left,n.reverse())}}};function co(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function ms(t){let e={},n=-1,l,i,r,a,o,u,s,f=new ds(t);for(;++n<f.length;){for(;n in e;)n=e[n];if(l=f.get(n),n&&l[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(u=l[1]._tokenizer.events,r=0,r<u.length&&u[r][1].type==="lineEndingBlank"&&(r+=2),r<u.length&&u[r][1].type==="content"))for(;++r<u.length&&u[r][1].type!=="content";)u[r][1].type==="chunkText"&&(u[r][1]._isInFirstContentOfListItem=!0,r++);if(l[0]==="enter")l[1].contentType&&(Object.assign(e,Iw(f,n)),n=e[n],s=!0);else if(l[1]._container){for(r=n,i=void 0;r--;)if(a=f.get(r),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=r);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(l[1].end={...f.get(i)[1].start},o=f.slice(i,n),o.unshift(l),f.splice(i,n-i+1,o))}}return ue(t,0,Number.POSITIVE_INFINITY,f.slice(0)),!s}function Iw(t,e){let n=t.get(e)[1],l=t.get(e)[2],i=e-1,r=[],a=n._tokenizer;a||(a=l.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let o=a.events,u=[],s={},f,c,m=-1,d=n,g=0,b=0,N=[b];for(;d;){for(;t.get(++i)[1]!==d;);r.push(i),d._tokenizer||(f=l.sliceStream(d),d.next||f.push(null),c&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=d,d=d.next}for(d=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(b=m+1,N.push(b),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):N.pop(),m=N.length;m--;){let p=o.slice(N[m],N[m+1]),h=r.pop();u.push([h,h+p.length-1]),t.splice(h,2,p)}for(u.reverse(),m=-1;++m<u.length;)s[g+u[m][0]]=g+u[m][1],g+=u[m][1]-u[m][0]-1;return s}var Qd={resolve:Yw,tokenize:Vw},jw={partial:!0,tokenize:Fw};function Yw(t){return ms(t),t}function Vw(t,e){let n;return l;function l(o){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?r(o):Y(o)?t.check(jw,a,r)(o):(t.consume(o),i)}function r(o){return t.exit("chunkContent"),t.exit("content"),e(o)}function a(o){return t.consume(o),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Fw(t,e,n){let l=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),$(t,r,"linePrefix")}function r(a){if(a===null||Y(a))return n(a);let o=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):t.interrupt(l.parser.constructs.flow,n,e)(a)}}function ps(t,e,n,l,i,r,a,o,u){let s=u||Number.POSITIVE_INFINITY,f=0;return c;function c(p){return p===60?(t.enter(l),t.enter(i),t.enter(r),t.consume(p),t.exit(r),m):p===null||p===32||p===41||Ni(p)?n(p):(t.enter(l),t.enter(a),t.enter(o),t.enter("chunkString",{contentType:"string"}),b(p))}function m(p){return p===62?(t.enter(r),t.consume(p),t.exit(r),t.exit(i),t.exit(l),e):(t.enter(o),t.enter("chunkString",{contentType:"string"}),d(p))}function d(p){return p===62?(t.exit("chunkString"),t.exit(o),m(p)):p===null||p===60||Y(p)?n(p):(t.consume(p),p===92?g:d)}function g(p){return p===60||p===62||p===92?(t.consume(p),d):d(p)}function b(p){return!f&&(p===null||p===41||ht(p))?(t.exit("chunkString"),t.exit(o),t.exit(a),t.exit(l),e(p)):f<s&&p===40?(t.consume(p),f++,b):p===41?(t.consume(p),f--,b):p===null||p===32||p===40||Ni(p)?n(p):(t.consume(p),p===92?N:b)}function N(p){return p===40||p===41||p===92?(t.consume(p),b):b(p)}}function hs(t,e,n,l,i,r){let a=this,o=0,u;return s;function s(d){return t.enter(l),t.enter(i),t.consume(d),t.exit(i),t.enter(r),f}function f(d){return o>999||d===null||d===91||d===93&&!u||d===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(t.exit(r),t.enter(i),t.consume(d),t.exit(i),t.exit(l),e):Y(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),f):(t.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===null||d===91||d===93||Y(d)||o++>999?(t.exit("chunkString"),f(d)):(t.consume(d),u||(u=!nt(d)),d===92?m:c)}function m(d){return d===91||d===92||d===93?(t.consume(d),o++,c):c(d)}}function gs(t,e,n,l,i,r){let a;return o;function o(m){return m===34||m===39||m===40?(t.enter(l),t.enter(i),t.consume(m),t.exit(i),a=m===40?41:m,u):n(m)}function u(m){return m===a?(t.enter(i),t.consume(m),t.exit(i),t.exit(l),e):(t.enter(r),s(m))}function s(m){return m===a?(t.exit(r),u(a)):m===null?n(m):Y(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),$(t,s,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||Y(m)?(t.exit("chunkString"),s(m)):(t.consume(m),m===92?c:f)}function c(m){return m===a||m===92?(t.consume(m),f):f(m)}}function Ri(t,e){let n;return l;function l(i){return Y(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,l):nt(i)?$(t,l,n?"linePrefix":"lineSuffix")(i):e(i)}}var Gd={name:"definition",tokenize:Gw},Qw={partial:!0,tokenize:Xw};function Gw(t,e,n){let l=this,i;return r;function r(d){return t.enter("definition"),a(d)}function a(d){return hs.call(l,t,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function o(d){return i=Ue(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),u):n(d)}function u(d){return ht(d)?Ri(t,s)(d):s(d)}function s(d){return ps(t,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function f(d){return t.attempt(Qw,c,c)(d)}function c(d){return nt(d)?$(t,m,"whitespace")(d):m(d)}function m(d){return d===null||Y(d)?(t.exit("definition"),l.parser.defined.push(i),e(d)):n(d)}}function Xw(t,e,n){return l;function l(o){return ht(o)?Ri(t,i)(o):n(o)}function i(o){return gs(t,r,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function r(o){return nt(o)?$(t,a,"whitespace")(o):a(o)}function a(o){return o===null||Y(o)?e(o):n(o)}}var Xd={name:"hardBreakEscape",tokenize:Pw};function Pw(t,e,n){return l;function l(r){return t.enter("hardBreakEscape"),t.consume(r),i}function i(r){return Y(r)?(t.exit("hardBreakEscape"),e(r)):n(r)}}var Pd={name:"headingAtx",resolve:Zw,tokenize:Kw};function Zw(t,e){let n=t.length-2,l=3,i,r;return t[l][1].type==="whitespace"&&(l+=2),n-2>l&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(l===n-1||n-4>l&&t[n-2][1].type==="whitespace")&&(n-=l+1===n?2:4),n>l&&(i={type:"atxHeadingText",start:t[l][1].start,end:t[n][1].end},r={type:"chunkText",start:t[l][1].start,end:t[n][1].end,contentType:"text"},ue(t,l,n-l+1,[["enter",i,e],["enter",r,e],["exit",r,e],["exit",i,e]])),t}function Kw(t,e,n){let l=0;return i;function i(f){return t.enter("atxHeading"),r(f)}function r(f){return t.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&l++<6?(t.consume(f),a):f===null||ht(f)?(t.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(t.enter("atxHeadingSequence"),u(f)):f===null||Y(f)?(t.exit("atxHeading"),e(f)):nt(f)?$(t,o,"whitespace")(f):(t.enter("atxHeadingText"),s(f))}function u(f){return f===35?(t.consume(f),u):(t.exit("atxHeadingSequence"),o(f))}function s(f){return f===null||f===35||ht(f)?(t.exit("atxHeadingText"),o(f)):(t.consume(f),s)}}var Ub=["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"],Zd=["pre","script","style","textarea"];var Kd={concrete:!0,name:"htmlFlow",resolveTo:Ww,tokenize:tE},Jw={partial:!0,tokenize:nE},$w={partial:!0,tokenize:eE};function Ww(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function tE(t,e,n){let l=this,i,r,a,o,u;return s;function s(k){return f(k)}function f(k){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(k),c}function c(k){return k===33?(t.consume(k),m):k===47?(t.consume(k),r=!0,b):k===63?(t.consume(k),i=3,l.interrupt?e:x):ve(k)?(t.consume(k),a=String.fromCharCode(k),N):n(k)}function m(k){return k===45?(t.consume(k),i=2,d):k===91?(t.consume(k),i=5,o=0,g):ve(k)?(t.consume(k),i=4,l.interrupt?e:x):n(k)}function d(k){return k===45?(t.consume(k),l.interrupt?e:x):n(k)}function g(k){let ct="CDATA[";return k===ct.charCodeAt(o++)?(t.consume(k),o===ct.length?l.interrupt?e:K:g):n(k)}function b(k){return ve(k)?(t.consume(k),a=String.fromCharCode(k),N):n(k)}function N(k){if(k===null||k===47||k===62||ht(k)){let ct=k===47,be=a.toLowerCase();return!ct&&!r&&Zd.includes(be)?(i=1,l.interrupt?e(k):K(k)):Ub.includes(a.toLowerCase())?(i=6,ct?(t.consume(k),p):l.interrupt?e(k):K(k)):(i=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(k):r?h(k):y(k))}return k===45||ne(k)?(t.consume(k),a+=String.fromCharCode(k),N):n(k)}function p(k){return k===62?(t.consume(k),l.interrupt?e:K):n(k)}function h(k){return nt(k)?(t.consume(k),h):T(k)}function y(k){return k===47?(t.consume(k),T):k===58||k===95||ve(k)?(t.consume(k),w):nt(k)?(t.consume(k),y):T(k)}function w(k){return k===45||k===46||k===58||k===95||ne(k)?(t.consume(k),w):A(k)}function A(k){return k===61?(t.consume(k),E):nt(k)?(t.consume(k),A):y(k)}function E(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(t.consume(k),u=k,D):nt(k)?(t.consume(k),E):L(k)}function D(k){return k===u?(t.consume(k),u=null,I):k===null||Y(k)?n(k):(t.consume(k),D)}function L(k){return k===null||k===34||k===39||k===47||k===60||k===61||k===62||k===96||ht(k)?A(k):(t.consume(k),L)}function I(k){return k===47||k===62||nt(k)?y(k):n(k)}function T(k){return k===62?(t.consume(k),lt):n(k)}function lt(k){return k===null||Y(k)?K(k):nt(k)?(t.consume(k),lt):n(k)}function K(k){return k===45&&i===2?(t.consume(k),ot):k===60&&i===1?(t.consume(k),gt):k===62&&i===4?(t.consume(k),Nt):k===63&&i===3?(t.consume(k),x):k===93&&i===5?(t.consume(k),H):Y(k)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(Jw,At,G)(k)):k===null||Y(k)?(t.exit("htmlFlowData"),G(k)):(t.consume(k),K)}function G(k){return t.check($w,P,At)(k)}function P(k){return t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),tt}function tt(k){return k===null||Y(k)?G(k):(t.enter("htmlFlowData"),K(k))}function ot(k){return k===45?(t.consume(k),x):K(k)}function gt(k){return k===47?(t.consume(k),a="",Ot):K(k)}function Ot(k){if(k===62){let ct=a.toLowerCase();return Zd.includes(ct)?(t.consume(k),Nt):K(k)}return ve(k)&&a.length<8?(t.consume(k),a+=String.fromCharCode(k),Ot):K(k)}function H(k){return k===93?(t.consume(k),x):K(k)}function x(k){return k===62?(t.consume(k),Nt):k===45&&i===2?(t.consume(k),x):K(k)}function Nt(k){return k===null||Y(k)?(t.exit("htmlFlowData"),At(k)):(t.consume(k),Nt)}function At(k){return t.exit("htmlFlow"),e(k)}}function eE(t,e,n){let l=this;return i;function i(a){return Y(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r):n(a)}function r(a){return l.parser.lazy[l.now().line]?n(a):e(a)}}function nE(t,e,n){return l;function l(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Pn,e,n)}}var Jd={name:"htmlText",tokenize:lE};function lE(t,e,n){let l=this,i,r,a;return o;function o(x){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(x),u}function u(x){return x===33?(t.consume(x),s):x===47?(t.consume(x),A):x===63?(t.consume(x),y):ve(x)?(t.consume(x),L):n(x)}function s(x){return x===45?(t.consume(x),f):x===91?(t.consume(x),r=0,g):ve(x)?(t.consume(x),h):n(x)}function f(x){return x===45?(t.consume(x),d):n(x)}function c(x){return x===null?n(x):x===45?(t.consume(x),m):Y(x)?(a=c,gt(x)):(t.consume(x),c)}function m(x){return x===45?(t.consume(x),d):c(x)}function d(x){return x===62?ot(x):x===45?m(x):c(x)}function g(x){let Nt="CDATA[";return x===Nt.charCodeAt(r++)?(t.consume(x),r===Nt.length?b:g):n(x)}function b(x){return x===null?n(x):x===93?(t.consume(x),N):Y(x)?(a=b,gt(x)):(t.consume(x),b)}function N(x){return x===93?(t.consume(x),p):b(x)}function p(x){return x===62?ot(x):x===93?(t.consume(x),p):b(x)}function h(x){return x===null||x===62?ot(x):Y(x)?(a=h,gt(x)):(t.consume(x),h)}function y(x){return x===null?n(x):x===63?(t.consume(x),w):Y(x)?(a=y,gt(x)):(t.consume(x),y)}function w(x){return x===62?ot(x):y(x)}function A(x){return ve(x)?(t.consume(x),E):n(x)}function E(x){return x===45||ne(x)?(t.consume(x),E):D(x)}function D(x){return Y(x)?(a=D,gt(x)):nt(x)?(t.consume(x),D):ot(x)}function L(x){return x===45||ne(x)?(t.consume(x),L):x===47||x===62||ht(x)?I(x):n(x)}function I(x){return x===47?(t.consume(x),ot):x===58||x===95||ve(x)?(t.consume(x),T):Y(x)?(a=I,gt(x)):nt(x)?(t.consume(x),I):ot(x)}function T(x){return x===45||x===46||x===58||x===95||ne(x)?(t.consume(x),T):lt(x)}function lt(x){return x===61?(t.consume(x),K):Y(x)?(a=lt,gt(x)):nt(x)?(t.consume(x),lt):I(x)}function K(x){return x===null||x===60||x===61||x===62||x===96?n(x):x===34||x===39?(t.consume(x),i=x,G):Y(x)?(a=K,gt(x)):nt(x)?(t.consume(x),K):(t.consume(x),P)}function G(x){return x===i?(t.consume(x),i=void 0,tt):x===null?n(x):Y(x)?(a=G,gt(x)):(t.consume(x),G)}function P(x){return x===null||x===34||x===39||x===60||x===61||x===96?n(x):x===47||x===62||ht(x)?I(x):(t.consume(x),P)}function tt(x){return x===47||x===62||ht(x)?I(x):n(x)}function ot(x){return x===62?(t.consume(x),t.exit("htmlTextData"),t.exit("htmlText"),e):n(x)}function gt(x){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),Ot}function Ot(x){return nt(x)?$(t,H,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(x):H(x)}function H(x){return t.enter("htmlTextData"),a(x)}}var Mi={name:"labelEnd",resolveAll:oE,resolveTo:uE,tokenize:sE},iE={tokenize:cE},rE={tokenize:fE},aE={tokenize:dE};function oE(t){let e=-1,n=[];for(;++e<t.length;){let l=t[e][1];if(n.push(t[e]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){let i=l.type==="labelImage"?4:2;l.type="data",e+=i}}return t.length!==n.length&&ue(t,0,t.length,n),t}function uE(t,e){let n=t.length,l=0,i,r,a,o;for(;n--;)if(i=t[n][1],r){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(r=n,i.type!=="labelLink")){l=2;break}}else i.type==="labelEnd"&&(a=n);let u={type:t[r][1].type==="labelLink"?"link":"image",start:{...t[r][1].start},end:{...t[t.length-1][1].end}},s={type:"label",start:{...t[r][1].start},end:{...t[a][1].end}},f={type:"labelText",start:{...t[r+l+2][1].end},end:{...t[a-2][1].start}};return o=[["enter",u,e],["enter",s,e]],o=Xe(o,t.slice(r+1,r+l+3)),o=Xe(o,[["enter",f,e]]),o=Xe(o,Pl(e.parser.constructs.insideSpan.null,t.slice(r+l+4,a-3),e)),o=Xe(o,[["exit",f,e],t[a-2],t[a-1],["exit",s,e]]),o=Xe(o,t.slice(a+1)),o=Xe(o,[["exit",u,e]]),ue(t,r,t.length,o),t}function sE(t,e,n){let l=this,i=l.events.length,r,a;for(;i--;)if((l.events[i][1].type==="labelImage"||l.events[i][1].type==="labelLink")&&!l.events[i][1]._balanced){r=l.events[i][1];break}return o;function o(m){return r?r._inactive?c(m):(a=l.parser.defined.includes(Ue(l.sliceSerialize({start:r.end,end:l.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(m),t.exit("labelMarker"),t.exit("labelEnd"),u):n(m)}function u(m){return m===40?t.attempt(iE,f,a?f:c)(m):m===91?t.attempt(rE,f,a?s:c)(m):a?f(m):c(m)}function s(m){return t.attempt(aE,f,c)(m)}function f(m){return e(m)}function c(m){return r._balanced=!0,n(m)}}function cE(t,e,n){return l;function l(c){return t.enter("resource"),t.enter("resourceMarker"),t.consume(c),t.exit("resourceMarker"),i}function i(c){return ht(c)?Ri(t,r)(c):r(c)}function r(c){return c===41?f(c):ps(t,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return ht(c)?Ri(t,u)(c):f(c)}function o(c){return n(c)}function u(c){return c===34||c===39||c===40?gs(t,s,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function s(c){return ht(c)?Ri(t,f)(c):f(c)}function f(c){return c===41?(t.enter("resourceMarker"),t.consume(c),t.exit("resourceMarker"),t.exit("resource"),e):n(c)}}function fE(t,e,n){let l=this;return i;function i(o){return hs.call(l,t,r,a,"reference","referenceMarker","referenceString")(o)}function r(o){return l.parser.defined.includes(Ue(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?e(o):n(o)}function a(o){return n(o)}}function dE(t,e,n){return l;function l(r){return t.enter("reference"),t.enter("referenceMarker"),t.consume(r),t.exit("referenceMarker"),i}function i(r){return r===93?(t.enter("referenceMarker"),t.consume(r),t.exit("referenceMarker"),t.exit("reference"),e):n(r)}}var $d={name:"labelStartImage",resolveAll:Mi.resolveAll,tokenize:mE};function mE(t,e,n){let l=this;return i;function i(o){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(o),t.exit("labelImageMarker"),r}function r(o){return o===91?(t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in l.parser.constructs?n(o):e(o)}}var Wd={name:"labelStartLink",resolveAll:Mi.resolveAll,tokenize:pE};function pE(t,e,n){let l=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),r}function r(a){return a===94&&"_hiddenFootnoteSupport"in l.parser.constructs?n(a):e(a)}}var fo={name:"lineEnding",tokenize:hE};function hE(t,e){return n;function n(l){return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),$(t,e,"linePrefix")}}var Di={name:"thematicBreak",tokenize:gE};function gE(t,e,n){let l=0,i;return r;function r(s){return t.enter("thematicBreak"),a(s)}function a(s){return i=s,o(s)}function o(s){return s===i?(t.enter("thematicBreakSequence"),u(s)):l>=3&&(s===null||Y(s))?(t.exit("thematicBreak"),e(s)):n(s)}function u(s){return s===i?(t.consume(s),l++,u):(t.exit("thematicBreakSequence"),nt(s)?$(t,o,"whitespace")(s):o(s))}}var Be={continuation:{tokenize:xE},exit:SE,name:"list",tokenize:bE},yE={partial:!0,tokenize:TE},vE={partial:!0,tokenize:kE};function bE(t,e,n){let l=this,i=l.events[l.events.length-1],r=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(d){let g=l.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!l.containerState.marker||d===l.containerState.marker:oo(d)){if(l.containerState.type||(l.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(Di,n,s)(d):s(d);if(!l.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),u(d)}return n(d)}function u(d){return oo(d)&&++a<10?(t.consume(d),u):(!l.interrupt||a<2)&&(l.containerState.marker?d===l.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),s(d)):n(d)}function s(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||d,t.check(Pn,l.interrupt?n:f,t.attempt(yE,m,c))}function f(d){return l.containerState.initialBlankLine=!0,r++,m(d)}function c(d){return nt(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),m):n(d)}function m(d){return l.containerState.size=r+l.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function xE(t,e,n){let l=this;return l.containerState._closeFlow=void 0,t.check(Pn,i,r);function i(o){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,$(t,e,"listItemIndent",l.containerState.size+1)(o)}function r(o){return l.containerState.furtherBlankLines||!nt(o)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,a(o)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,t.attempt(vE,e,a)(o))}function a(o){return l.containerState._closeFlow=!0,l.interrupt=void 0,$(t,t.attempt(Be,e,n),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function kE(t,e,n){let l=this;return $(t,i,"listItemIndent",l.containerState.size+1);function i(r){let a=l.events[l.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===l.containerState.size?e(r):n(r)}}function SE(t){t.exit(this.containerState.type)}function TE(t,e,n){let l=this;return $(t,i,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(r){let a=l.events[l.events.length-1];return!nt(r)&&a&&a[1].type==="listItemPrefixWhitespace"?e(r):n(r)}}var ys={name:"setextUnderline",resolveTo:wE,tokenize:EE};function wE(t,e){let n=t.length,l,i,r;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){l=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!r&&t[n][1].type==="definition"&&(r=n);let a={type:"setextHeading",start:{...t[l][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",r?(t.splice(i,0,["enter",a,e]),t.splice(r+1,0,["exit",t[l][1],e]),t[l][1].end={...t[r][1].end}):t[l][1]=a,t.push(["exit",a,e]),t}function EE(t,e,n){let l=this,i;return r;function r(s){let f=l.events.length,c;for(;f--;)if(l.events[f][1].type!=="lineEnding"&&l.events[f][1].type!=="linePrefix"&&l.events[f][1].type!=="content"){c=l.events[f][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||c)?(t.enter("setextHeadingLine"),i=s,a(s)):n(s)}function a(s){return t.enter("setextHeadingLineSequence"),o(s)}function o(s){return s===i?(t.consume(s),o):(t.exit("setextHeadingLineSequence"),nt(s)?$(t,u,"lineSuffix")(s):u(s))}function u(s){return s===null||Y(s)?(t.exit("setextHeadingLine"),e(s)):n(s)}}var Bb={tokenize:CE};function CE(t){let e=this,n=t.attempt(Pn,l,t.attempt(this.parser.constructs.flowInitial,i,$(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Qd,i)),"linePrefix")));return n;function l(r){if(r===null){t.consume(r);return}return t.enter("lineEndingBlank"),t.consume(r),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(r){if(r===null){t.consume(r);return}return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),e.currentConstruct=void 0,n}}var Hb={resolveAll:Yb()},qb=jb("string"),Ib=jb("text");function jb(t){return{resolveAll:Yb(t==="text"?NE:void 0),tokenize:e};function e(n){let l=this,i=this.parser.constructs[t],r=n.attempt(i,a,o);return a;function a(f){return s(f)?r(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),u}function u(f){return s(f)?(n.exit("data"),r(f)):(n.consume(f),u)}function s(f){if(f===null)return!0;let c=i[f],m=-1;if(c)for(;++m<c.length;){let d=c[m];if(!d.previous||d.previous.call(l,l.previous))return!0}return!1}}}function Yb(t){return e;function e(n,l){let i=-1,r;for(;++i<=n.length;)r===void 0?n[i]&&n[i][1].type==="data"&&(r=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==r+2&&(n[r][1].end=n[i-1][1].end,n.splice(r+2,i-r-2),i=r+2),r=void 0);return t?t(n,l):n}}function NE(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){let l=t[n-1][1],i=e.sliceStream(l),r=i.length,a=-1,o=0,u;for(;r--;){let s=i[r];if(typeof s=="string"){for(a=s.length;s.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(s===-2)u=!0,o++;else if(s!==-1){r++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(o=0),o){let s={type:n===t.length||u||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:r?a:l.start._bufferIndex+a,_index:l.start._index+r,line:l.end.line,column:l.end.column-o,offset:l.end.offset-o},end:{...l.end}};l.end={...s.start},l.start.offset===l.end.offset?Object.assign(l,s):(t.splice(n,0,["enter",s,e],["exit",s,e]),n+=2)}n++}return t}var tm={};dp(tm,{attentionMarkers:()=>LE,contentInitial:()=>RE,disable:()=>UE,document:()=>AE,flow:()=>DE,flowInitial:()=>ME,insideSpan:()=>zE,string:()=>_E,text:()=>OE});var AE={42:Be,43:Be,45:Be,48:Be,49:Be,50:Be,51:Be,52:Be,53:Be,54:Be,55:Be,56:Be,57:Be,62:us},RE={91:Gd},ME={[-2]:so,[-1]:so,32:so},DE={35:Pd,42:Di,45:[ys,Di],60:Kd,61:ys,95:Di,96:fs,126:fs},_E={38:cs,92:ss},OE={[-5]:fo,[-4]:fo,[-3]:fo,33:$d,38:cs,42:uo,60:[Vd,Jd],91:Wd,92:[Xd,ss],93:Mi,95:uo,96:Fd},zE={null:[uo,Hb]},LE={null:[42,95]},UE={null:[]};function Vb(t,e,n){let l={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},r=[],a=[],o=[],u=!0,s={attempt:I(D),check:I(L),consume:w,enter:A,exit:E,interrupt:I(L,{interrupt:!0})},f={code:null,containerState:{},defineSkip:p,events:[],now:N,parser:t,previous:null,sliceSerialize:g,sliceStream:b,write:d},c=e.tokenize.call(f,s),m;return e.resolveAll&&r.push(e),f;function d(G){return a=Xe(a,G),h(),a[a.length-1]!==null?[]:(T(e,0),f.events=Pl(r,f.events,f),f.events)}function g(G,P){return HE(b(G),P)}function b(G){return BE(a,G)}function N(){let{_bufferIndex:G,_index:P,line:tt,column:ot,offset:gt}=l;return{_bufferIndex:G,_index:P,line:tt,column:ot,offset:gt}}function p(G){i[G.line]=G.column,K()}function h(){let G;for(;l._index<a.length;){let P=a[l._index];if(typeof P=="string")for(G=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===G&&l._bufferIndex<P.length;)y(P.charCodeAt(l._bufferIndex));else y(P)}}function y(G){u=void 0,m=G,c=c(G)}function w(G){Y(G)?(l.line++,l.column=1,l.offset+=G===-3?2:1,K()):G!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===a[l._index].length&&(l._bufferIndex=-1,l._index++)),f.previous=G,u=!0}function A(G,P){let tt=P||{};return tt.type=G,tt.start=N(),f.events.push(["enter",tt,f]),o.push(tt),tt}function E(G){let P=o.pop();return P.end=N(),f.events.push(["exit",P,f]),P}function D(G,P){T(G,P.from)}function L(G,P){P.restore()}function I(G,P){return tt;function tt(ot,gt,Ot){let H,x,Nt,At;return Array.isArray(ot)?ct(ot):"tokenize"in ot?ct([ot]):k(ot);function k(B){return Z;function Z(j){let V=j!==null&&B[j],W=j!==null&&B.null,kt=[...Array.isArray(V)?V:V?[V]:[],...Array.isArray(W)?W:W?[W]:[]];return ct(kt)(j)}}function ct(B){return H=B,x=0,B.length===0?Ot:be(B[x])}function be(B){return Z;function Z(j){return At=lt(),Nt=B,B.partial||(f.currentConstruct=B),B.name&&f.parser.constructs.disable.null.includes(B.name)?pe(j):B.tokenize.call(P?Object.assign(Object.create(f),P):f,s,me,pe)(j)}}function me(B){return u=!0,G(Nt,At),gt}function pe(B){return u=!0,At.restore(),++x<H.length?be(H[x]):Ot}}}function T(G,P){G.resolveAll&&!r.includes(G)&&r.push(G),G.resolve&&ue(f.events,P,f.events.length-P,G.resolve(f.events.slice(P),f)),G.resolveTo&&(f.events=G.resolveTo(f.events,f))}function lt(){let G=N(),P=f.previous,tt=f.currentConstruct,ot=f.events.length,gt=Array.from(o);return{from:ot,restore:Ot};function Ot(){l=G,f.previous=P,f.currentConstruct=tt,f.events.length=ot,o=gt,K()}}function K(){l.line in i&&l.column<2&&(l.column=i[l.line],l.offset+=i[l.line]-1)}}function BE(t,e){let n=e.start._index,l=e.start._bufferIndex,i=e.end._index,r=e.end._bufferIndex,a;if(n===i)a=[t[n].slice(l,r)];else{if(a=t.slice(n,i),l>-1){let o=a[0];typeof o=="string"?a[0]=o.slice(l):a.shift()}r>0&&a.push(t[i].slice(0,r))}return a}function HE(t,e){let n=-1,l=[],i;for(;++n<t.length;){let r=t[n],a;if(typeof r=="string")a=r;else switch(r){case-5:{a="\r";break}case-4:{a=`
8
+ `+n.stack}}function Tn(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function Dg(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Nk(t){var e=Dg(t)?"checked":"value",n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),l=""+t[e];if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,r=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(a){l=""+a,r.call(this,a)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(a){l=""+a},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function ds(t){t._valueTracker||(t._valueTracker=Nk(t))}function Og(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),l="";return t&&(l=Dg(t)?t.checked?"true":"false":t.value),t=l,t!==n?(e.setValue(t),!0):!1}function ms(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var Rk=/[\n"\\]/g;function An(t){return t.replace(Rk,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Pc(t,e,n,l,i,r,a,o){t.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?t.type=a:t.removeAttribute("type"),e!=null?a==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Tn(e)):t.value!==""+Tn(e)&&(t.value=""+Tn(e)):a!=="submit"&&a!=="reset"||t.removeAttribute("value"),e!=null?Zc(t,a,Tn(e)):n!=null?Zc(t,a,Tn(n)):l!=null&&t.removeAttribute("value"),i==null&&r!=null&&(t.defaultChecked=!!r),i!=null&&(t.checked=i&&typeof i!="function"&&typeof i!="symbol"),o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?t.name=""+Tn(o):t.removeAttribute("name")}function _g(t,e,n,l,i,r,a,o){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(t.type=r),e!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||e!=null))return;n=n!=null?""+Tn(n):"",e=e!=null?""+Tn(e):n,o||e===t.value||(t.value=e),t.defaultValue=e}l=l??i,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=o?t.checked:!!l,t.defaultChecked=!!l,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(t.name=a)}function Zc(t,e,n){e==="number"&&ms(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function mr(t,e,n,l){if(t=t.options,e){e={};for(var i=0;i<n.length;i++)e["$"+n[i]]=!0;for(n=0;n<t.length;n++)i=e.hasOwnProperty("$"+t[n].value),t[n].selected!==i&&(t[n].selected=i),i&&l&&(t[n].defaultSelected=!0)}else{for(n=""+Tn(n),e=null,i=0;i<t.length;i++){if(t[i].value===n){t[i].selected=!0,l&&(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&&(e.selected=!0)}}function zg(t,e,n){if(e!=null&&(e=""+Tn(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+Tn(n):""}function Lg(t,e,n,l){if(e==null){if(l!=null){if(n!=null)throw Error(_(92));if(da(l)){if(1<l.length)throw Error(_(93));l=l[0]}n=l}n==null&&(n=""),e=n}n=Tn(e),t.defaultValue=n,l=t.textContent,l===n&&l!==""&&l!==null&&(t.value=l)}function Sr(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var Mk=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function eh(t,e,n){var l=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":l?t.setProperty(e,n):typeof n!="number"||n===0||Mk.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Ug(t,e,n){if(e!=null&&typeof e!="object")throw Error(_(62));if(t=t.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||e!=null&&e.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var i in e)l=e[i],e.hasOwnProperty(i)&&n[i]!==l&&eh(t,i,l)}else for(var r in e)e.hasOwnProperty(r)&&eh(t,r,e[r])}function jf(t){if(t.indexOf("-")===-1)return!1;switch(t){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 Dk=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"]]),Ok=/^[\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 Ko(t){return Ok.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}var Kc=null;function Yf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var lr=null,pr=null;function nh(t){var e=Or(t);if(e&&(t=e.stateNode)){var n=t[an]||null;t:switch(t=e.stateNode,e.type){case"input":if(Pc(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+An(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var l=n[e];if(l!==t&&l.form===t.form){var i=l[an]||null;if(!i)throw Error(_(90));Pc(l,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(e=0;e<n.length;e++)l=n[e],l.form===t.form&&Og(l)}break t;case"textarea":zg(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&mr(t,!!n.multiple,e,!1)}}}var mc=!1;function Bg(t,e,n){if(mc)return t(e,n);mc=!0;try{var l=t(e);return l}finally{if(mc=!1,(lr!==null||pr!==null)&&(Ps(),lr&&(e=lr,t=pr,pr=lr=null,nh(e),t)))for(e=0;e<t.length;e++)nh(t[e])}}function Ma(t,e){var n=t.stateNode;if(n===null)return null;var l=n[an]||null;if(l===null)return null;n=l[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(_(231,e,typeof n));return n}var ml=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jc=!1;if(ml)try{Pi={},Object.defineProperty(Pi,"passive",{get:function(){Jc=!0}}),window.addEventListener("test",Pi,Pi),window.removeEventListener("test",Pi,Pi)}catch{Jc=!1}var Pi,Ol=null,Vf=null,Jo=null;function Hg(){if(Jo)return Jo;var t,e=Vf,n=e.length,l,i="value"in Ol?Ol.value:Ol.textContent,r=i.length;for(t=0;t<n&&e[t]===i[t];t++);var a=n-t;for(l=1;l<=a&&e[n-l]===i[r-l];l++);return Jo=i.slice(t,1<l?1-l:void 0)}function $o(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Uo(){return!0}function lh(){return!1}function on(t){function e(n,l,i,r,a){this._reactName=n,this._targetInst=i,this.type=l,this.nativeEvent=r,this.target=a,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&&(n=t[o],this[o]=n?n(r):r[o]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Uo:lh,this.isPropagationStopped=lh,this}return Zt(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Uo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Uo)},persist:function(){},isPersistent:Uo}),e}var wi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qs=on(wi),Pa=Zt({},wi,{view:0,detail:0}),_k=on(Pa),pc,hc,ia,Is=Zt({},Pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ff,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==ia&&(ia&&t.type==="mousemove"?(pc=t.screenX-ia.screenX,hc=t.screenY-ia.screenY):hc=pc=0,ia=t),pc)},movementY:function(t){return"movementY"in t?t.movementY:hc}}),ih=on(Is),zk=Zt({},Is,{dataTransfer:0}),Lk=on(zk),Uk=Zt({},Pa,{relatedTarget:0}),gc=on(Uk),Bk=Zt({},wi,{animationName:0,elapsedTime:0,pseudoElement:0}),Hk=on(Bk),qk=Zt({},wi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),Ik=on(qk),jk=Zt({},wi,{data:0}),rh=on(jk),Yk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vk={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"},Fk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qk(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=Fk[t])?!!e[t]:!1}function Ff(){return Qk}var Gk=Zt({},Pa,{key:function(t){if(t.key){var e=Yk[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=$o(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?Vk[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ff,charCode:function(t){return t.type==="keypress"?$o(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?$o(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),Xk=on(Gk),Pk=Zt({},Is,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ah=on(Pk),Zk=Zt({},Pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ff}),Kk=on(Zk),Jk=Zt({},wi,{propertyName:0,elapsedTime:0,pseudoElement:0}),$k=on(Jk),Wk=Zt({},Is,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),tS=on(Wk),eS=Zt({},wi,{newState:0,oldState:0}),nS=on(eS),lS=[9,13,27,32],Qf=ml&&"CompositionEvent"in window,ha=null;ml&&"documentMode"in document&&(ha=document.documentMode);var iS=ml&&"TextEvent"in window&&!ha,qg=ml&&(!Qf||ha&&8<ha&&11>=ha),oh=" ",sh=!1;function Ig(t,e){switch(t){case"keyup":return lS.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var ir=!1;function rS(t,e){switch(t){case"compositionend":return jg(e);case"keypress":return e.which!==32?null:(sh=!0,oh);case"textInput":return t=e.data,t===oh&&sh?null:t;default:return null}}function aS(t,e){if(ir)return t==="compositionend"||!Qf&&Ig(t,e)?(t=Hg(),Jo=Vf=Ol=null,ir=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return qg&&e.locale!=="ko"?null:e.data;default:return null}}var oS={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 uh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!oS[t.type]:e==="textarea"}function Yg(t,e,n,l){lr?pr?pr.push(l):pr=[l]:lr=l,e=Ds(e,"onChange"),0<e.length&&(n=new qs("onChange","change",null,n,l),t.push({event:n,listeners:e}))}var ga=null,Da=null;function sS(t){zv(t,0)}function js(t){var e=ma(t);if(Og(e))return t}function ch(t,e){if(t==="change")return e}var Vg=!1;ml&&(ml?(Ho="oninput"in document,Ho||(yc=document.createElement("div"),yc.setAttribute("oninput","return;"),Ho=typeof yc.oninput=="function"),Bo=Ho):Bo=!1,Vg=Bo&&(!document.documentMode||9<document.documentMode));var Bo,Ho,yc;function fh(){ga&&(ga.detachEvent("onpropertychange",Fg),Da=ga=null)}function Fg(t){if(t.propertyName==="value"&&js(Da)){var e=[];Yg(e,Da,t,Yf(t)),Bg(sS,e)}}function uS(t,e,n){t==="focusin"?(fh(),ga=e,Da=n,ga.attachEvent("onpropertychange",Fg)):t==="focusout"&&fh()}function cS(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return js(Da)}function fS(t,e){if(t==="click")return js(e)}function dS(t,e){if(t==="input"||t==="change")return js(e)}function mS(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var vn=typeof Object.is=="function"?Object.is:mS;function Oa(t,e){if(vn(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),l=Object.keys(e);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var i=n[l];if(!Gc.call(e,i)||!vn(t[i],e[i]))return!1}return!0}function dh(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function mh(t,e){var n=dh(t);t=0;for(var l;n;){if(n.nodeType===3){if(l=t+n.textContent.length,t<=e&&l>=e)return{node:n,offset:e-t};t=l}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=dh(n)}}function Qg(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Qg(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Gg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=ms(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=ms(t.document)}return e}function Gf(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var pS=ml&&"documentMode"in document&&11>=document.documentMode,rr=null,$c=null,ya=null,Wc=!1;function ph(t,e,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Wc||rr==null||rr!==ms(l)||(l=rr,"selectionStart"in l&&Gf(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ya&&Oa(ya,l)||(ya=l,l=Ds($c,"onSelect"),0<l.length&&(e=new qs("onSelect","select",null,e,n),t.push({event:e,listeners:l}),e.target=rr)))}function oi(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var ar={animationend:oi("Animation","AnimationEnd"),animationiteration:oi("Animation","AnimationIteration"),animationstart:oi("Animation","AnimationStart"),transitionrun:oi("Transition","TransitionRun"),transitionstart:oi("Transition","TransitionStart"),transitioncancel:oi("Transition","TransitionCancel"),transitionend:oi("Transition","TransitionEnd")},vc={},Xg={};ml&&(Xg=document.createElement("div").style,"AnimationEvent"in window||(delete ar.animationend.animation,delete ar.animationiteration.animation,delete ar.animationstart.animation),"TransitionEvent"in window||delete ar.transitionend.transition);function Ti(t){if(vc[t])return vc[t];if(!ar[t])return t;var e=ar[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Xg)return vc[t]=e[n];return t}var Pg=Ti("animationend"),Zg=Ti("animationiteration"),Kg=Ti("animationstart"),hS=Ti("transitionrun"),gS=Ti("transitionstart"),yS=Ti("transitioncancel"),Jg=Ti("transitionend"),$g=new Map,tf="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(" ");tf.push("scrollEnd");function Bn(t,e){$g.set(t,e),Si(e,[t])}var hh=new WeakMap;function Nn(t,e){if(typeof t=="object"&&t!==null){var n=hh.get(t);return n!==void 0?n:(e={value:t,source:e,stack:th(e)},hh.set(t,e),e)}return{value:t,source:e,stack:th(e)}}var wn=[],or=0,Xf=0;function Ys(){for(var t=or,e=Xf=or=0;e<t;){var n=wn[e];wn[e++]=null;var l=wn[e];wn[e++]=null;var i=wn[e];wn[e++]=null;var r=wn[e];if(wn[e++]=null,l!==null&&i!==null){var a=l.pending;a===null?i.next=i:(i.next=a.next,a.next=i),l.pending=i}r!==0&&Wg(n,i,r)}}function Vs(t,e,n,l){wn[or++]=t,wn[or++]=e,wn[or++]=n,wn[or++]=l,Xf|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function Pf(t,e,n,l){return Vs(t,e,n,l),ps(t)}function _r(t,e){return Vs(t,null,null,e),ps(t)}function Wg(t,e,n){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n);for(var i=!1,r=t.return;r!==null;)r.childLanes|=n,l=r.alternate,l!==null&&(l.childLanes|=n),r.tag===22&&(t=r.stateNode,t===null||t._visibility&1||(i=!0)),t=r,r=r.return;return t.tag===3?(r=t.stateNode,i&&e!==null&&(i=31-hn(n),t=r.hiddenUpdates,l=t[i],l===null?t[i]=[e]:l.push(e),e.lane=n|536870912),r):null}function ps(t){if(50<Aa)throw Aa=0,Sf=null,Error(_(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var sr={};function vS(t,e,n,l){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function mn(t,e,n,l){return new vS(t,e,n,l)}function Zf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function fl(t,e){var n=t.alternate;return n===null?(n=mn(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function ty(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Wo(t,e,n,l,i,r){var a=0;if(l=t,typeof t=="function")Zf(t)&&(a=1);else if(typeof t=="string")a=vw(t,n,Qn.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Yc:return t=mn(31,n,e,i),t.elementType=Yc,t.lanes=r,t;case tr:return di(n.children,i,r,e);case bg:a=8,i|=24;break;case qc:return t=mn(12,n,e,i|2),t.elementType=qc,t.lanes=r,t;case Ic:return t=mn(13,n,e,i),t.elementType=Ic,t.lanes=r,t;case jc:return t=mn(19,n,e,i),t.elementType=jc,t.lanes=r,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case sk:case al:a=10;break t;case xg:a=9;break t;case Lf:a=11;break t;case Uf:a=14;break t;case El:a=16,l=null;break t}a=29,n=Error(_(130,t===null?"null":typeof t,"")),l=null}return e=mn(a,n,e,i),e.elementType=t,e.type=l,e.lanes=r,e}function di(t,e,n,l){return t=mn(7,t,l,e),t.lanes=n,t}function bc(t,e,n){return t=mn(6,t,null,e),t.lanes=n,t}function xc(t,e,n){return e=mn(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var ur=[],cr=0,hs=null,gs=0,En=[],Cn=0,mi=null,ol=1,sl="";function ui(t,e){ur[cr++]=gs,ur[cr++]=hs,hs=t,gs=e}function ey(t,e,n){En[Cn++]=ol,En[Cn++]=sl,En[Cn++]=mi,mi=t;var l=ol;t=sl;var i=32-hn(l)-1;l&=~(1<<i),n+=1;var r=32-hn(e)+i;if(30<r){var a=i-i%5;r=(l&(1<<a)-1).toString(32),l>>=a,i-=a,ol=1<<32-hn(e)+i|n<<i|l,sl=r+t}else ol=1<<r|n<<i|l,sl=t}function Kf(t){t.return!==null&&(ui(t,1),ey(t,1,0))}function Jf(t){for(;t===hs;)hs=ur[--cr],ur[cr]=null,gs=ur[--cr],ur[cr]=null;for(;t===mi;)mi=En[--Cn],En[Cn]=null,sl=En[--Cn],En[Cn]=null,ol=En[--Cn],En[Cn]=null}var $e=null,ie=null,zt=!1,pi=null,Vn=!1,ef=Error(_(519));function vi(t){var e=Error(_(418,""));throw _a(Nn(e,t)),ef}function gh(t){var e=t.stateNode,n=t.type,l=t.memoizedProps;switch(e[je]=t,e[an]=l,n){case"dialog":vt("cancel",e),vt("close",e);break;case"iframe":case"object":case"embed":vt("load",e);break;case"video":case"audio":for(n=0;n<Ua.length;n++)vt(Ua[n],e);break;case"source":vt("error",e);break;case"img":case"image":case"link":vt("error",e),vt("load",e);break;case"details":vt("toggle",e);break;case"input":vt("invalid",e),_g(e,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0),ds(e);break;case"select":vt("invalid",e);break;case"textarea":vt("invalid",e),Lg(e,l.value,l.defaultValue,l.children),ds(e)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||l.suppressHydrationWarning===!0||Uv(e.textContent,n)?(l.popover!=null&&(vt("beforetoggle",e),vt("toggle",e)),l.onScroll!=null&&vt("scroll",e),l.onScrollEnd!=null&&vt("scrollend",e),l.onClick!=null&&(e.onclick=Js),e=!0):e=!1,e||vi(t)}function yh(t){for($e=t.return;$e;)switch($e.tag){case 5:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:$e=$e.return}}function ra(t){if(t!==$e)return!1;if(!zt)return yh(t),zt=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Nf(t.type,t.memoizedProps)),n=!n),n&&ie&&vi(t),yh(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(_(317));t:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8)if(n=t.data,n==="/$"){if(e===0){ie=Un(t.nextSibling);break t}e--}else n!=="$"&&n!=="$!"&&n!=="$?"||e++;t=t.nextSibling}ie=null}}else e===27?(e=ie,Xl(t.type)?(t=Df,Df=null,ie=t):ie=e):ie=$e?Un(t.stateNode.nextSibling):null;return!0}function Za(){ie=$e=null,zt=!1}function vh(){var t=pi;return t!==null&&(rn===null?rn=t:rn.push.apply(rn,t),pi=null),t}function _a(t){pi===null?pi=[t]:pi.push(t)}var nf=Pn(null),Ei=null,ul=null;function Al(t,e,n){Wt(nf,e._currentValue),e._currentValue=n}function dl(t){t._currentValue=nf.current,Oe(nf)}function lf(t,e,n){for(;t!==null;){var l=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,l!==null&&(l.childLanes|=e)):l!==null&&(l.childLanes&e)!==e&&(l.childLanes|=e),t===n)break;t=t.return}}function rf(t,e,n,l){var i=t.child;for(i!==null&&(i.return=t);i!==null;){var r=i.dependencies;if(r!==null){var a=i.child;r=r.firstContext;t:for(;r!==null;){var o=r;r=i;for(var s=0;s<e.length;s++)if(o.context===e[s]){r.lanes|=n,o=r.alternate,o!==null&&(o.lanes|=n),lf(r.return,n,t),l||(a=null);break t}r=o.next}}else if(i.tag===18){if(a=i.return,a===null)throw Error(_(341));a.lanes|=n,r=a.alternate,r!==null&&(r.lanes|=n),lf(a,n,t),a=null}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===t){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}}function Ka(t,e,n,l){t=null;for(var i=e,r=!1;i!==null;){if(!r){if((i.flags&524288)!==0)r=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var a=i.alternate;if(a===null)throw Error(_(387));if(a=a.memoizedProps,a!==null){var o=i.type;vn(i.pendingProps.value,a.value)||(t!==null?t.push(o):t=[o])}}else if(i===ss.current){if(a=i.alternate,a===null)throw Error(_(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(t!==null?t.push(qa):t=[qa])}i=i.return}t!==null&&rf(e,t,n,l),e.flags|=262144}function ys(t){for(t=t.firstContext;t!==null;){if(!vn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function bi(t){Ei=t,ul=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ye(t){return ny(Ei,t)}function qo(t,e){return Ei===null&&bi(t),ny(t,e)}function ny(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},ul===null){if(t===null)throw Error(_(308));ul=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else ul=ul.next=e;return n}var bS=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},xS=Se.unstable_scheduleCallback,kS=Se.unstable_NormalPriority,xe={$$typeof:al,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function $f(){return{controller:new bS,data:new Map,refCount:0}}function Ja(t){t.refCount--,t.refCount===0&&xS(kS,function(){t.controller.abort()})}var va=null,af=0,wr=0,hr=null;function SS(t,e){if(va===null){var n=va=[];af=0,wr=kd(),hr={status:"pending",value:void 0,then:function(l){n.push(l)}}}return af++,e.then(bh,bh),e}function bh(){if(--af===0&&va!==null){hr!==null&&(hr.status="fulfilled");var t=va;va=null,wr=0,hr=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function wS(t,e){var n=[],l={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return t.then(function(){l.status="fulfilled",l.value=e;for(var i=0;i<n.length;i++)(0,n[i])(e)},function(i){for(l.status="rejected",l.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),l}var xh=at.S;at.S=function(t,e){typeof e=="object"&&e!==null&&typeof e.then=="function"&&SS(t,e),xh!==null&&xh(t,e)};var hi=Pn(null);function Wf(){var t=hi.current;return t!==null?t:Xt.pooledCache}function ts(t,e){e===null?Wt(hi,hi.current):Wt(hi,e.pool)}function ly(){var t=Wf();return t===null?null:{parent:xe._currentValue,pool:t}}var $a=Error(_(460)),iy=Error(_(474)),Fs=Error(_(542)),of={then:function(){}};function kh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Io(){}function ry(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Io,Io),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,wh(t),t;default:if(typeof e.status=="string")e.then(Io,Io);else{if(t=Xt,t!==null&&100<t.shellSuspendCounter)throw Error(_(482));t=e,t.status="pending",t.then(function(l){if(e.status==="pending"){var i=e;i.status="fulfilled",i.value=l}},function(l){if(e.status==="pending"){var i=e;i.status="rejected",i.reason=l}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,wh(t),t}throw ba=e,$a}}var ba=null;function Sh(){if(ba===null)throw Error(_(459));var t=ba;return ba=null,t}function wh(t){if(t===$a||t===Fs)throw Error(_(483))}var Cl=!1;function td(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sf(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Ul(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Bl(t,e,n){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(Ht&2)!==0){var i=l.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),l.pending=e,e=ps(t),Wg(t,null,n),e}return Vs(t,l,e,n),ps(t)}function xa(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,Ag(t,n)}}function kc(t,e){var n=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var i=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?i=r=a:r=r.next=a,n=n.next}while(n!==null);r===null?i=r=e:r=r.next=e}else i=r=e;n={baseState:l.baseState,firstBaseUpdate:i,lastBaseUpdate:r,shared:l.shared,callbacks:l.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var uf=!1;function ka(){if(uf){var t=hr;if(t!==null)throw t}}function Sa(t,e,n,l){uf=!1;var i=t.updateQueue;Cl=!1;var r=i.firstBaseUpdate,a=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var s=o,u=s.next;s.next=null,a===null?r=u:a.next=u,a=s;var f=t.alternate;f!==null&&(f=f.updateQueue,o=f.lastBaseUpdate,o!==a&&(o===null?f.firstBaseUpdate=u:o.next=u,f.lastBaseUpdate=s))}if(r!==null){var c=i.baseState;a=0,f=u=s=null,o=r;do{var m=o.lane&-536870913,d=m!==o.lane;if(d?(At&m)===m:(l&m)===m){m!==0&&m===wr&&(uf=!0),f!==null&&(f=f.next={lane:0,tag:o.tag,payload:o.payload,callback:null,next:null});t:{var g=t,x=o;m=e;var C=n;switch(x.tag){case 1:if(g=x.payload,typeof g=="function"){c=g.call(C,c,m);break t}c=g;break t;case 3:g.flags=g.flags&-65537|128;case 0:if(g=x.payload,m=typeof g=="function"?g.call(C,c,m):g,m==null)break t;c=Zt({},c,m);break t;case 2:Cl=!0}}m=o.callback,m!==null&&(t.flags|=64,d&&(t.flags|=8192),d=i.callbacks,d===null?i.callbacks=[m]:d.push(m))}else d={lane:m,tag:o.tag,payload:o.payload,callback:o.callback,next:null},f===null?(u=f=d,s=c):f=f.next=d,a|=m;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;d=o,o=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);f===null&&(s=c),i.baseState=s,i.firstBaseUpdate=u,i.lastBaseUpdate=f,r===null&&(i.shared.lanes=0),Ql|=a,t.lanes=a,t.memoizedState=c}}function ay(t,e){if(typeof t!="function")throw Error(_(191,t));t.call(e)}function oy(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)ay(n[t],e)}var Tr=Pn(null),vs=Pn(0);function Th(t,e){t=gl,Wt(vs,t),Wt(Tr,e),gl=t|e.baseLanes}function cf(){Wt(vs,gl),Wt(Tr,Tr.current)}function ed(){gl=vs.current,Oe(Tr),Oe(vs)}var Vl=0,pt=null,Yt=null,ye=null,bs=!1,gr=!1,xi=!1,xs=0,za=0,yr=null,TS=0;function ue(){throw Error(_(321))}function nd(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!vn(t[n],e[n]))return!1;return!0}function ld(t,e,n,l,i,r){return Vl=r,pt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,at.H=t===null||t.memoizedState===null?Hy:qy,xi=!1,r=n(l,i),xi=!1,gr&&(r=uy(e,n,l,i)),sy(t),r}function sy(t){at.H=ks;var e=Yt!==null&&Yt.next!==null;if(Vl=0,ye=Yt=pt=null,bs=!1,za=0,yr=null,e)throw Error(_(300));t===null||De||(t=t.dependencies,t!==null&&ys(t)&&(De=!0))}function uy(t,e,n,l){pt=t;var i=0;do{if(gr&&(yr=null),za=0,gr=!1,25<=i)throw Error(_(301));if(i+=1,ye=Yt=null,t.updateQueue!=null){var r=t.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}at.H=DS,r=e(n,l)}while(gr);return r}function ES(){var t=at.H,e=t.useState()[0];return e=typeof e.then=="function"?Wa(e):e,t=t.useState()[0],(Yt!==null?Yt.memoizedState:null)!==t&&(pt.flags|=1024),e}function id(){var t=xs!==0;return xs=0,t}function rd(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function ad(t){if(bs){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}bs=!1}Vl=0,ye=Yt=pt=null,gr=!1,za=xs=0,yr=null}function nn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ye===null?pt.memoizedState=ye=t:ye=ye.next=t,ye}function ve(){if(Yt===null){var t=pt.alternate;t=t!==null?t.memoizedState:null}else t=Yt.next;var e=ye===null?pt.memoizedState:ye.next;if(e!==null)ye=e,Yt=t;else{if(t===null)throw pt.alternate===null?Error(_(467)):Error(_(310));Yt=t,t={memoizedState:Yt.memoizedState,baseState:Yt.baseState,baseQueue:Yt.baseQueue,queue:Yt.queue,next:null},ye===null?pt.memoizedState=ye=t:ye=ye.next=t}return ye}function od(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wa(t){var e=za;return za+=1,yr===null&&(yr=[]),t=ry(yr,t,e),e=pt,(ye===null?e.memoizedState:ye.next)===null&&(e=e.alternate,at.H=e===null||e.memoizedState===null?Hy:qy),t}function Qs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Wa(t);if(t.$$typeof===al)return Ye(t)}throw Error(_(438,String(t)))}function sd(t){var e=null,n=pt.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var l=pt.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(e={data:l.data.map(function(i){return i.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=od(),pt.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),l=0;l<t;l++)n[l]=uk;return e.index++,n}function pl(t,e){return typeof e=="function"?e(t):e}function es(t){var e=ve();return ud(e,Yt,t)}function ud(t,e,n){var l=t.queue;if(l===null)throw Error(_(311));l.lastRenderedReducer=n;var i=t.baseQueue,r=l.pending;if(r!==null){if(i!==null){var a=i.next;i.next=r.next,r.next=a}e.baseQueue=i=r,l.pending=null}if(r=t.baseState,i===null)t.memoizedState=r;else{e=i.next;var o=a=null,s=null,u=e,f=!1;do{var c=u.lane&-536870913;if(c!==u.lane?(At&c)===c:(Vl&c)===c){var m=u.revertLane;if(m===0)s!==null&&(s=s.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),c===wr&&(f=!0);else if((Vl&m)===m){u=u.next,m===wr&&(f=!0);continue}else c={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(o=s=c,a=r):s=s.next=c,pt.lanes|=m,Ql|=m;c=u.action,xi&&n(r,c),r=u.hasEagerState?u.eagerState:n(r,c)}else m={lane:c,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},s===null?(o=s=m,a=r):s=s.next=m,pt.lanes|=c,Ql|=c;u=u.next}while(u!==null&&u!==e);if(s===null?a=r:s.next=o,!vn(r,t.memoizedState)&&(De=!0,f&&(n=hr,n!==null)))throw n;t.memoizedState=r,t.baseState=a,t.baseQueue=s,l.lastRenderedState=r}return i===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function Sc(t){var e=ve(),n=e.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=t;var l=n.dispatch,i=n.pending,r=e.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do r=t(r,a.action),a=a.next;while(a!==i);vn(r,e.memoizedState)||(De=!0),e.memoizedState=r,e.baseQueue===null&&(e.baseState=r),n.lastRenderedState=r}return[r,l]}function cy(t,e,n){var l=pt,i=ve(),r=zt;if(r){if(n===void 0)throw Error(_(407));n=n()}else n=e();var a=!vn((Yt||i).memoizedState,n);a&&(i.memoizedState=n,De=!0),i=i.queue;var o=my.bind(null,l,i,t);if(to(2048,8,o,[t]),i.getSnapshot!==e||a||ye!==null&&ye.memoizedState.tag&1){if(l.flags|=2048,Er(9,Gs(),dy.bind(null,l,i,n,e),null),Xt===null)throw Error(_(349));r||(Vl&124)!==0||fy(l,e,n)}return n}function fy(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=pt.updateQueue,e===null?(e=od(),pt.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function dy(t,e,n,l){e.value=n,e.getSnapshot=l,py(e)&&hy(t)}function my(t,e,n){return n(function(){py(e)&&hy(t)})}function py(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!vn(t,n)}catch{return!0}}function hy(t){var e=_r(t,2);e!==null&&yn(e,t,2)}function ff(t){var e=nn();if(typeof t=="function"){var n=t;if(t=n(),xi){Dl(!0);try{n()}finally{Dl(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:t},e}function gy(t,e,n,l){return t.baseState=n,ud(t,Yt,typeof l=="function"?l:pl)}function CS(t,e,n,l,i){if(Xs(t))throw Error(_(485));if(t=e.action,t!==null){var r={payload:i,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){r.listeners.push(a)}};at.T!==null?n(!0):r.isTransition=!1,l(r),n=e.pending,n===null?(r.next=e.pending=r,yy(e,r)):(r.next=n.next,e.pending=n.next=r)}}function yy(t,e){var n=e.action,l=e.payload,i=t.state;if(e.isTransition){var r=at.T,a={};at.T=a;try{var o=n(i,l),s=at.S;s!==null&&s(a,o),Eh(t,e,o)}catch(u){df(t,e,u)}finally{at.T=r}}else try{r=n(i,l),Eh(t,e,r)}catch(u){df(t,e,u)}}function Eh(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Ch(t,e,l)},function(l){return df(t,e,l)}):Ch(t,e,n)}function Ch(t,e,n){e.status="fulfilled",e.value=n,vy(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,yy(t,n)))}function df(t,e,n){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do e.status="rejected",e.reason=n,vy(e),e=e.next;while(e!==l)}t.action=null}function vy(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function by(t,e){return e}function Ah(t,e){if(zt){var n=Xt.formState;if(n!==null){t:{var l=pt;if(zt){if(ie){e:{for(var i=ie,r=Vn;i.nodeType!==8;){if(!r){i=null;break e}if(i=Un(i.nextSibling),i===null){i=null;break e}}r=i.data,i=r==="F!"||r==="F"?i:null}if(i){ie=Un(i.nextSibling),l=i.data==="F!";break t}}vi(l)}l=!1}l&&(e=n[0])}}return n=nn(),n.memoizedState=n.baseState=e,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:by,lastRenderedState:e},n.queue=l,n=Ly.bind(null,pt,l),l.dispatch=n,l=ff(!1),r=md.bind(null,pt,!1,l.queue),l=nn(),i={state:e,dispatch:null,action:t,pending:null},l.queue=i,n=CS.bind(null,pt,i,r,n),i.dispatch=n,l.memoizedState=t,[e,n,!1]}function Nh(t){var e=ve();return xy(e,Yt,t)}function xy(t,e,n){if(e=ud(t,e,by)[0],t=es(pl)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var l=Wa(e)}catch(a){throw a===$a?Fs:a}else l=e;e=ve();var i=e.queue,r=i.dispatch;return n!==e.memoizedState&&(pt.flags|=2048,Er(9,Gs(),AS.bind(null,i,n),null)),[l,r,t]}function AS(t,e){t.action=e}function Rh(t){var e=ve(),n=Yt;if(n!==null)return xy(e,n,t);ve(),e=e.memoizedState,n=ve();var l=n.queue.dispatch;return n.memoizedState=t,[e,l,!1]}function Er(t,e,n,l){return t={tag:t,create:n,deps:l,inst:e,next:null},e=pt.updateQueue,e===null&&(e=od(),pt.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(l=n.next,n.next=t,t.next=l,e.lastEffect=t),t}function Gs(){return{destroy:void 0,resource:void 0}}function ky(){return ve().memoizedState}function ns(t,e,n,l){var i=nn();l=l===void 0?null:l,pt.flags|=t,i.memoizedState=Er(1|e,Gs(),n,l)}function to(t,e,n,l){var i=ve();l=l===void 0?null:l;var r=i.memoizedState.inst;Yt!==null&&l!==null&&nd(l,Yt.memoizedState.deps)?i.memoizedState=Er(e,r,n,l):(pt.flags|=t,i.memoizedState=Er(1|e,r,n,l))}function Mh(t,e){ns(8390656,8,t,e)}function Sy(t,e){to(2048,8,t,e)}function wy(t,e){return to(4,2,t,e)}function Ty(t,e){return to(4,4,t,e)}function Ey(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Cy(t,e,n){n=n!=null?n.concat([t]):null,to(4,4,Ey.bind(null,e,t),n)}function cd(){}function Ay(t,e){var n=ve();e=e===void 0?null:e;var l=n.memoizedState;return e!==null&&nd(e,l[1])?l[0]:(n.memoizedState=[t,e],t)}function Ny(t,e){var n=ve();e=e===void 0?null:e;var l=n.memoizedState;if(e!==null&&nd(e,l[1]))return l[0];if(l=t(),xi){Dl(!0);try{t()}finally{Dl(!1)}}return n.memoizedState=[l,e],l}function fd(t,e,n){return n===void 0||(Vl&1073741824)!==0?t.memoizedState=e:(t.memoizedState=n,t=vv(),pt.lanes|=t,Ql|=t,n)}function Ry(t,e,n,l){return vn(n,e)?n:Tr.current!==null?(t=fd(t,n,l),vn(t,e)||(De=!0),t):(Vl&42)===0?(De=!0,t.memoizedState=n):(t=vv(),pt.lanes|=t,Ql|=t,e)}function My(t,e,n,l,i){var r=Lt.p;Lt.p=r!==0&&8>r?r:8;var a=at.T,o={};at.T=o,md(t,!1,e,n);try{var s=i(),u=at.S;if(u!==null&&u(o,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var f=wS(s,l);wa(t,e,f,gn(t))}else wa(t,e,l,gn(t))}catch(c){wa(t,e,{then:function(){},status:"rejected",reason:c},gn())}finally{Lt.p=r,at.T=a}}function NS(){}function mf(t,e,n,l){if(t.tag!==5)throw Error(_(476));var i=Dy(t).queue;My(t,i,e,fi,n===null?NS:function(){return Oy(t),n(l)})}function Dy(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:fi,baseState:fi,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:fi},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pl,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Oy(t){var e=Dy(t).next.queue;wa(t,e,{},gn())}function dd(){return Ye(qa)}function _y(){return ve().memoizedState}function zy(){return ve().memoizedState}function RS(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=gn();t=Ul(n);var l=Bl(e,t,n);l!==null&&(yn(l,e,n),xa(l,e,n)),e={cache:$f()},t.payload=e;return}e=e.return}}function MS(t,e,n){var l=gn();n={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},Xs(t)?Uy(e,n):(n=Pf(t,e,n,l),n!==null&&(yn(n,t,l),By(n,e,l)))}function Ly(t,e,n){var l=gn();wa(t,e,n,l)}function wa(t,e,n,l){var i={lane:l,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xs(t))Uy(e,i);else{var r=t.alternate;if(t.lanes===0&&(r===null||r.lanes===0)&&(r=e.lastRenderedReducer,r!==null))try{var a=e.lastRenderedState,o=r(a,n);if(i.hasEagerState=!0,i.eagerState=o,vn(o,a))return Vs(t,e,i,0),Xt===null&&Ys(),!1}catch{}finally{}if(n=Pf(t,e,i,l),n!==null)return yn(n,t,l),By(n,e,l),!0}return!1}function md(t,e,n,l){if(l={lane:2,revertLane:kd(),action:l,hasEagerState:!1,eagerState:null,next:null},Xs(t)){if(e)throw Error(_(479))}else e=Pf(t,n,l,2),e!==null&&yn(e,t,2)}function Xs(t){var e=t.alternate;return t===pt||e!==null&&e===pt}function Uy(t,e){gr=bs=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function By(t,e,n){if((n&4194048)!==0){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,Ag(t,n)}}var ks={readContext:Ye,use:Qs,useCallback:ue,useContext:ue,useEffect:ue,useImperativeHandle:ue,useLayoutEffect:ue,useInsertionEffect:ue,useMemo:ue,useReducer:ue,useRef:ue,useState:ue,useDebugValue:ue,useDeferredValue:ue,useTransition:ue,useSyncExternalStore:ue,useId:ue,useHostTransitionStatus:ue,useFormState:ue,useActionState:ue,useOptimistic:ue,useMemoCache:ue,useCacheRefresh:ue},Hy={readContext:Ye,use:Qs,useCallback:function(t,e){return nn().memoizedState=[t,e===void 0?null:e],t},useContext:Ye,useEffect:Mh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,ns(4194308,4,Ey.bind(null,e,t),n)},useLayoutEffect:function(t,e){return ns(4194308,4,t,e)},useInsertionEffect:function(t,e){ns(4,2,t,e)},useMemo:function(t,e){var n=nn();e=e===void 0?null:e;var l=t();if(xi){Dl(!0);try{t()}finally{Dl(!1)}}return n.memoizedState=[l,e],l},useReducer:function(t,e,n){var l=nn();if(n!==void 0){var i=n(e);if(xi){Dl(!0);try{n(e)}finally{Dl(!1)}}}else i=e;return l.memoizedState=l.baseState=i,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:i},l.queue=t,t=t.dispatch=MS.bind(null,pt,t),[l.memoizedState,t]},useRef:function(t){var e=nn();return t={current:t},e.memoizedState=t},useState:function(t){t=ff(t);var e=t.queue,n=Ly.bind(null,pt,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:cd,useDeferredValue:function(t,e){var n=nn();return fd(n,t,e)},useTransition:function(){var t=ff(!1);return t=My.bind(null,pt,t.queue,!0,!1),nn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var l=pt,i=nn();if(zt){if(n===void 0)throw Error(_(407));n=n()}else{if(n=e(),Xt===null)throw Error(_(349));(At&124)!==0||fy(l,e,n)}i.memoizedState=n;var r={value:n,getSnapshot:e};return i.queue=r,Mh(my.bind(null,l,r,t),[t]),l.flags|=2048,Er(9,Gs(),dy.bind(null,l,r,n,e),null),n},useId:function(){var t=nn(),e=Xt.identifierPrefix;if(zt){var n=sl,l=ol;n=(l&~(1<<32-hn(l)-1)).toString(32)+n,e="\xAB"+e+"R"+n,n=xs++,0<n&&(e+="H"+n.toString(32)),e+="\xBB"}else n=TS++,e="\xAB"+e+"r"+n.toString(32)+"\xBB";return t.memoizedState=e},useHostTransitionStatus:dd,useFormState:Ah,useActionState:Ah,useOptimistic:function(t){var e=nn();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=md.bind(null,pt,!0,n),n.dispatch=e,[t,e]},useMemoCache:sd,useCacheRefresh:function(){return nn().memoizedState=RS.bind(null,pt)}},qy={readContext:Ye,use:Qs,useCallback:Ay,useContext:Ye,useEffect:Sy,useImperativeHandle:Cy,useInsertionEffect:wy,useLayoutEffect:Ty,useMemo:Ny,useReducer:es,useRef:ky,useState:function(){return es(pl)},useDebugValue:cd,useDeferredValue:function(t,e){var n=ve();return Ry(n,Yt.memoizedState,t,e)},useTransition:function(){var t=es(pl)[0],e=ve().memoizedState;return[typeof t=="boolean"?t:Wa(t),e]},useSyncExternalStore:cy,useId:_y,useHostTransitionStatus:dd,useFormState:Nh,useActionState:Nh,useOptimistic:function(t,e){var n=ve();return gy(n,Yt,t,e)},useMemoCache:sd,useCacheRefresh:zy},DS={readContext:Ye,use:Qs,useCallback:Ay,useContext:Ye,useEffect:Sy,useImperativeHandle:Cy,useInsertionEffect:wy,useLayoutEffect:Ty,useMemo:Ny,useReducer:Sc,useRef:ky,useState:function(){return Sc(pl)},useDebugValue:cd,useDeferredValue:function(t,e){var n=ve();return Yt===null?fd(n,t,e):Ry(n,Yt.memoizedState,t,e)},useTransition:function(){var t=Sc(pl)[0],e=ve().memoizedState;return[typeof t=="boolean"?t:Wa(t),e]},useSyncExternalStore:cy,useId:_y,useHostTransitionStatus:dd,useFormState:Rh,useActionState:Rh,useOptimistic:function(t,e){var n=ve();return Yt!==null?gy(n,Yt,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:sd,useCacheRefresh:zy},vr=null,La=0;function jo(t){var e=La;return La+=1,vr===null&&(vr=[]),ry(vr,t,e)}function aa(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Yo(t,e){throw e.$$typeof===ok?Error(_(525)):(t=Object.prototype.toString.call(e),Error(_(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function Dh(t){var e=t._init;return e(t._payload)}function Iy(t){function e(h,p){if(t){var y=h.deletions;y===null?(h.deletions=[p],h.flags|=16):y.push(p)}}function n(h,p){if(!t)return null;for(;p!==null;)e(h,p),p=p.sibling;return null}function l(h){for(var p=new Map;h!==null;)h.key!==null?p.set(h.key,h):p.set(h.index,h),h=h.sibling;return p}function i(h,p){return h=fl(h,p),h.index=0,h.sibling=null,h}function r(h,p,y){return h.index=y,t?(y=h.alternate,y!==null?(y=y.index,y<p?(h.flags|=67108866,p):y):(h.flags|=67108866,p)):(h.flags|=1048576,p)}function a(h){return t&&h.alternate===null&&(h.flags|=67108866),h}function o(h,p,y,T){return p===null||p.tag!==6?(p=bc(y,h.mode,T),p.return=h,p):(p=i(p,y),p.return=h,p)}function s(h,p,y,T){var N=y.type;return N===tr?f(h,p,y.props.children,T,y.key):p!==null&&(p.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===El&&Dh(N)===p.type)?(p=i(p,y.props),aa(p,y),p.return=h,p):(p=Wo(y.type,y.key,y.props,null,h.mode,T),aa(p,y),p.return=h,p)}function u(h,p,y,T){return p===null||p.tag!==4||p.stateNode.containerInfo!==y.containerInfo||p.stateNode.implementation!==y.implementation?(p=xc(y,h.mode,T),p.return=h,p):(p=i(p,y.children||[]),p.return=h,p)}function f(h,p,y,T,N){return p===null||p.tag!==7?(p=di(y,h.mode,T,N),p.return=h,p):(p=i(p,y),p.return=h,p)}function c(h,p,y){if(typeof p=="string"&&p!==""||typeof p=="number"||typeof p=="bigint")return p=bc(""+p,h.mode,y),p.return=h,p;if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Oo:return y=Wo(p.type,p.key,p.props,null,h.mode,y),aa(y,p),y.return=h,y;case fa:return p=xc(p,h.mode,y),p.return=h,p;case El:var T=p._init;return p=T(p._payload),c(h,p,y)}if(da(p)||la(p))return p=di(p,h.mode,y,null),p.return=h,p;if(typeof p.then=="function")return c(h,jo(p),y);if(p.$$typeof===al)return c(h,qo(h,p),y);Yo(h,p)}return null}function m(h,p,y,T){var N=p!==null?p.key:null;if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return N!==null?null:o(h,p,""+y,T);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Oo:return y.key===N?s(h,p,y,T):null;case fa:return y.key===N?u(h,p,y,T):null;case El:return N=y._init,y=N(y._payload),m(h,p,y,T)}if(da(y)||la(y))return N!==null?null:f(h,p,y,T,null);if(typeof y.then=="function")return m(h,p,jo(y),T);if(y.$$typeof===al)return m(h,p,qo(h,y),T);Yo(h,y)}return null}function d(h,p,y,T,N){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return h=h.get(y)||null,o(p,h,""+T,N);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Oo:return h=h.get(T.key===null?y:T.key)||null,s(p,h,T,N);case fa:return h=h.get(T.key===null?y:T.key)||null,u(p,h,T,N);case El:var E=T._init;return T=E(T._payload),d(h,p,y,T,N)}if(da(T)||la(T))return h=h.get(y)||null,f(p,h,T,N,null);if(typeof T.then=="function")return d(h,p,y,jo(T),N);if(T.$$typeof===al)return d(h,p,y,qo(p,T),N);Yo(p,T)}return null}function g(h,p,y,T){for(var N=null,E=null,M=p,z=p=0,Y=null;M!==null&&z<y.length;z++){M.index>z?(Y=M,M=null):Y=M.sibling;var w=m(h,M,y[z],T);if(w===null){M===null&&(M=Y);break}t&&M&&w.alternate===null&&e(h,M),p=r(w,p,z),E===null?N=w:E.sibling=w,E=w,M=Y}if(z===y.length)return n(h,M),zt&&ui(h,z),N;if(M===null){for(;z<y.length;z++)M=c(h,y[z],T),M!==null&&(p=r(M,p,z),E===null?N=M:E.sibling=M,E=M);return zt&&ui(h,z),N}for(M=l(M);z<y.length;z++)Y=d(M,h,z,y[z],T),Y!==null&&(t&&Y.alternate!==null&&M.delete(Y.key===null?z:Y.key),p=r(Y,p,z),E===null?N=Y:E.sibling=Y,E=Y);return t&&M.forEach(function(P){return e(h,P)}),zt&&ui(h,z),N}function x(h,p,y,T){if(y==null)throw Error(_(151));for(var N=null,E=null,M=p,z=p=0,Y=null,w=y.next();M!==null&&!w.done;z++,w=y.next()){M.index>z?(Y=M,M=null):Y=M.sibling;var P=m(h,M,w.value,T);if(P===null){M===null&&(M=Y);break}t&&M&&P.alternate===null&&e(h,M),p=r(P,p,z),E===null?N=P:E.sibling=P,E=P,M=Y}if(w.done)return n(h,M),zt&&ui(h,z),N;if(M===null){for(;!w.done;z++,w=y.next())w=c(h,w.value,T),w!==null&&(p=r(w,p,z),E===null?N=w:E.sibling=w,E=w);return zt&&ui(h,z),N}for(M=l(M);!w.done;z++,w=y.next())w=d(M,h,z,w.value,T),w!==null&&(t&&w.alternate!==null&&M.delete(w.key===null?z:w.key),p=r(w,p,z),E===null?N=w:E.sibling=w,E=w);return t&&M.forEach(function(q){return e(h,q)}),zt&&ui(h,z),N}function C(h,p,y,T){if(typeof y=="object"&&y!==null&&y.type===tr&&y.key===null&&(y=y.props.children),typeof y=="object"&&y!==null){switch(y.$$typeof){case Oo:t:{for(var N=y.key;p!==null;){if(p.key===N){if(N=y.type,N===tr){if(p.tag===7){n(h,p.sibling),T=i(p,y.props.children),T.return=h,h=T;break t}}else if(p.elementType===N||typeof N=="object"&&N!==null&&N.$$typeof===El&&Dh(N)===p.type){n(h,p.sibling),T=i(p,y.props),aa(T,y),T.return=h,h=T;break t}n(h,p);break}else e(h,p);p=p.sibling}y.type===tr?(T=di(y.props.children,h.mode,T,y.key),T.return=h,h=T):(T=Wo(y.type,y.key,y.props,null,h.mode,T),aa(T,y),T.return=h,h=T)}return a(h);case fa:t:{for(N=y.key;p!==null;){if(p.key===N)if(p.tag===4&&p.stateNode.containerInfo===y.containerInfo&&p.stateNode.implementation===y.implementation){n(h,p.sibling),T=i(p,y.children||[]),T.return=h,h=T;break t}else{n(h,p);break}else e(h,p);p=p.sibling}T=xc(y,h.mode,T),T.return=h,h=T}return a(h);case El:return N=y._init,y=N(y._payload),C(h,p,y,T)}if(da(y))return g(h,p,y,T);if(la(y)){if(N=la(y),typeof N!="function")throw Error(_(150));return y=N.call(y),x(h,p,y,T)}if(typeof y.then=="function")return C(h,p,jo(y),T);if(y.$$typeof===al)return C(h,p,qo(h,y),T);Yo(h,y)}return typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint"?(y=""+y,p!==null&&p.tag===6?(n(h,p.sibling),T=i(p,y),T.return=h,h=T):(n(h,p),T=bc(y,h.mode,T),T.return=h,h=T),a(h)):n(h,p)}return function(h,p,y,T){try{La=0;var N=C(h,p,y,T);return vr=null,N}catch(M){if(M===$a||M===Fs)throw M;var E=mn(29,M,null,h.mode);return E.lanes=T,E.return=h,E}finally{}}}var Cr=Iy(!0),jy=Iy(!1),Mn=Pn(null),Xn=null;function Nl(t){var e=t.alternate;Wt(ke,ke.current&1),Wt(Mn,t),Xn===null&&(e===null||Tr.current!==null||e.memoizedState!==null)&&(Xn=t)}function Yy(t){if(t.tag===22){if(Wt(ke,ke.current),Wt(Mn,t),Xn===null){var e=t.alternate;e!==null&&e.memoizedState!==null&&(Xn=t)}}else Rl(t)}function Rl(){Wt(ke,ke.current),Wt(Mn,Mn.current)}function cl(t){Oe(Mn),Xn===t&&(Xn=null),Oe(ke)}var ke=Pn(0);function Ss(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||Mf(n)))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function wc(t,e,n,l){e=t.memoizedState,n=n(l,e),n=n==null?e:Zt({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var pf={enqueueSetState:function(t,e,n){t=t._reactInternals;var l=gn(),i=Ul(l);i.payload=e,n!=null&&(i.callback=n),e=Bl(t,i,l),e!==null&&(yn(e,t,l),xa(e,t,l))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var l=gn(),i=Ul(l);i.tag=1,i.payload=e,n!=null&&(i.callback=n),e=Bl(t,i,l),e!==null&&(yn(e,t,l),xa(e,t,l))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=gn(),l=Ul(n);l.tag=2,e!=null&&(l.callback=e),e=Bl(t,l,n),e!==null&&(yn(e,t,n),xa(e,t,n))}};function Oh(t,e,n,l,i,r,a){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,r,a):e.prototype&&e.prototype.isPureReactComponent?!Oa(n,l)||!Oa(i,r):!0}function _h(t,e,n,l){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,l),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,l),e.state!==t&&pf.enqueueReplaceState(e,e.state,null)}function ki(t,e){var n=e;if("ref"in e){n={};for(var l in e)l!=="ref"&&(n[l]=e[l])}if(t=t.defaultProps){n===e&&(n=Zt({},n));for(var i in t)n[i]===void 0&&(n[i]=t[i])}return n}var ws=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)};function Vy(t){ws(t)}function Fy(t){console.error(t)}function Qy(t){ws(t)}function Ts(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(l){setTimeout(function(){throw l})}}function zh(t,e,n){try{var l=t.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function hf(t,e,n){return n=Ul(n),n.tag=3,n.payload={element:null},n.callback=function(){Ts(t,e)},n}function Gy(t){return t=Ul(t),t.tag=3,t}function Xy(t,e,n,l){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=l.value;t.payload=function(){return i(r)},t.callback=function(){zh(e,n,l)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(t.callback=function(){zh(e,n,l),typeof i!="function"&&(Hl===null?Hl=new Set([this]):Hl.add(this));var o=l.stack;this.componentDidCatch(l.value,{componentStack:o!==null?o:""})})}function OS(t,e,n,l,i){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(e=n.alternate,e!==null&&Ka(e,n,i,!0),n=Mn.current,n!==null){switch(n.tag){case 13:return Xn===null?wf():n.alternate===null&&re===0&&(re=3),n.flags&=-257,n.flags|=65536,n.lanes=i,l===of?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([l]):e.add(l),zc(t,l,i)),!1;case 22:return n.flags|=65536,l===of?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([l]):n.add(l)),zc(t,l,i)),!1}throw Error(_(435,n.tag))}return zc(t,l,i),wf(),!1}if(zt)return e=Mn.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=i,l!==ef&&(t=Error(_(422),{cause:l}),_a(Nn(t,n)))):(l!==ef&&(e=Error(_(423),{cause:l}),_a(Nn(e,n))),t=t.current.alternate,t.flags|=65536,i&=-i,t.lanes|=i,l=Nn(l,n),i=hf(t.stateNode,l,i),kc(t,i),re!==4&&(re=2)),!1;var r=Error(_(520),{cause:l});if(r=Nn(r,n),Ca===null?Ca=[r]:Ca.push(r),re!==4&&(re=2),e===null)return!0;l=Nn(l,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=i&-i,n.lanes|=t,t=hf(n.stateNode,l,t),kc(n,t),!1;case 1:if(e=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Hl===null||!Hl.has(r))))return n.flags|=65536,i&=-i,n.lanes|=i,i=Gy(i),Xy(i,t,n,l),kc(n,i),!1}n=n.return}while(n!==null);return!1}var Py=Error(_(461)),De=!1;function Ue(t,e,n,l){e.child=t===null?jy(e,null,n,l):Cr(e,t.child,n,l)}function Lh(t,e,n,l,i){n=n.render;var r=e.ref;if("ref"in l){var a={};for(var o in l)o!=="ref"&&(a[o]=l[o])}else a=l;return bi(e),l=ld(t,e,n,a,r,i),o=id(),t!==null&&!De?(rd(t,e,i),hl(t,e,i)):(zt&&o&&Kf(e),e.flags|=1,Ue(t,e,l,i),e.child)}function Uh(t,e,n,l,i){if(t===null){var r=n.type;return typeof r=="function"&&!Zf(r)&&r.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=r,Zy(t,e,r,l,i)):(t=Wo(n.type,null,l,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(r=t.child,!pd(t,i)){var a=r.memoizedProps;if(n=n.compare,n=n!==null?n:Oa,n(a,l)&&t.ref===e.ref)return hl(t,e,i)}return e.flags|=1,t=fl(r,l),t.ref=e.ref,t.return=e,e.child=t}function Zy(t,e,n,l,i){if(t!==null){var r=t.memoizedProps;if(Oa(r,l)&&t.ref===e.ref)if(De=!1,e.pendingProps=l=r,pd(t,i))(t.flags&131072)!==0&&(De=!0);else return e.lanes=t.lanes,hl(t,e,i)}return gf(t,e,n,l,i)}function Ky(t,e,n){var l=e.pendingProps,i=l.children,r=t!==null?t.memoizedState:null;if(l.mode==="hidden"){if((e.flags&128)!==0){if(l=r!==null?r.baseLanes|n:n,t!==null){for(i=e.child=t.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;e.childLanes=r&~l}else e.childLanes=0,e.child=null;return Bh(t,e,l,n)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&ts(e,r!==null?r.cachePool:null),r!==null?Th(e,r):cf(),Yy(e);else return e.lanes=e.childLanes=536870912,Bh(t,e,r!==null?r.baseLanes|n:n,n)}else r!==null?(ts(e,r.cachePool),Th(e,r),Rl(e),e.memoizedState=null):(t!==null&&ts(e,null),cf(),Rl(e));return Ue(t,e,i,n),e.child}function Bh(t,e,n,l){var i=Wf();return i=i===null?null:{parent:xe._currentValue,pool:i},e.memoizedState={baseLanes:n,cachePool:i},t!==null&&ts(e,null),cf(),Yy(e),t!==null&&Ka(t,e,l,!0),null}function ls(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(_(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function gf(t,e,n,l,i){return bi(e),n=ld(t,e,n,l,void 0,i),l=id(),t!==null&&!De?(rd(t,e,i),hl(t,e,i)):(zt&&l&&Kf(e),e.flags|=1,Ue(t,e,n,i),e.child)}function Hh(t,e,n,l,i,r){return bi(e),e.updateQueue=null,n=uy(e,l,n,i),sy(t),l=id(),t!==null&&!De?(rd(t,e,r),hl(t,e,r)):(zt&&l&&Kf(e),e.flags|=1,Ue(t,e,n,r),e.child)}function qh(t,e,n,l,i){if(bi(e),e.stateNode===null){var r=sr,a=n.contextType;typeof a=="object"&&a!==null&&(r=Ye(a)),r=new n(l,r),e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=pf,e.stateNode=r,r._reactInternals=e,r=e.stateNode,r.props=l,r.state=e.memoizedState,r.refs={},td(e),a=n.contextType,r.context=typeof a=="object"&&a!==null?Ye(a):sr,r.state=e.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(wc(e,n,a,l),r.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(a=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),a!==r.state&&pf.enqueueReplaceState(r,r.state,null),Sa(e,l,r,i),ka(),r.state=e.memoizedState),typeof r.componentDidMount=="function"&&(e.flags|=4194308),l=!0}else if(t===null){r=e.stateNode;var o=e.memoizedProps,s=ki(n,o);r.props=s;var u=r.context,f=n.contextType;a=sr,typeof f=="object"&&f!==null&&(a=Ye(f));var c=n.getDerivedStateFromProps;f=typeof c=="function"||typeof r.getSnapshotBeforeUpdate=="function",o=e.pendingProps!==o,f||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(o||u!==a)&&_h(e,r,l,a),Cl=!1;var m=e.memoizedState;r.state=m,Sa(e,l,r,i),ka(),u=e.memoizedState,o||m!==u||Cl?(typeof c=="function"&&(wc(e,n,c,l),u=e.memoizedState),(s=Cl||Oh(e,n,s,l,m,u,a))?(f||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(e.flags|=4194308)):(typeof r.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=l,e.memoizedState=u),r.props=l,r.state=u,r.context=a,l=s):(typeof r.componentDidMount=="function"&&(e.flags|=4194308),l=!1)}else{r=e.stateNode,sf(t,e),a=e.memoizedProps,f=ki(n,a),r.props=f,c=e.pendingProps,m=r.context,u=n.contextType,s=sr,typeof u=="object"&&u!==null&&(s=Ye(u)),o=n.getDerivedStateFromProps,(u=typeof o=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(a!==c||m!==s)&&_h(e,r,l,s),Cl=!1,m=e.memoizedState,r.state=m,Sa(e,l,r,i),ka();var d=e.memoizedState;a!==c||m!==d||Cl||t!==null&&t.dependencies!==null&&ys(t.dependencies)?(typeof o=="function"&&(wc(e,n,o,l),d=e.memoizedState),(f=Cl||Oh(e,n,f,l,m,d,s)||t!==null&&t.dependencies!==null&&ys(t.dependencies))?(u||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(l,d,s),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(l,d,s)),typeof r.componentDidUpdate=="function"&&(e.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof r.componentDidUpdate!="function"||a===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&m===t.memoizedState||(e.flags|=1024),e.memoizedProps=l,e.memoizedState=d),r.props=l,r.state=d,r.context=s,l=f):(typeof r.componentDidUpdate!="function"||a===t.memoizedProps&&m===t.memoizedState||(e.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||a===t.memoizedProps&&m===t.memoizedState||(e.flags|=1024),l=!1)}return r=l,ls(t,e),l=(e.flags&128)!==0,r||l?(r=e.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:r.render(),e.flags|=1,t!==null&&l?(e.child=Cr(e,t.child,null,i),e.child=Cr(e,null,n,i)):Ue(t,e,n,i),e.memoizedState=r.state,t=e.child):t=hl(t,e,i),t}function Ih(t,e,n,l){return Za(),e.flags|=256,Ue(t,e,n,l),e.child}var Tc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ec(t){return{baseLanes:t,cachePool:ly()}}function Cc(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=Rn),t}function Jy(t,e,n){var l=e.pendingProps,i=!1,r=(e.flags&128)!==0,a;if((a=r)||(a=t!==null&&t.memoizedState===null?!1:(ke.current&2)!==0),a&&(i=!0,e.flags&=-129),a=(e.flags&32)!==0,e.flags&=-33,t===null){if(zt){if(i?Nl(e):Rl(e),zt){var o=ie,s;if(s=o){t:{for(s=o,o=Vn;s.nodeType!==8;){if(!o){o=null;break t}if(s=Un(s.nextSibling),s===null){o=null;break t}}o=s}o!==null?(e.memoizedState={dehydrated:o,treeContext:mi!==null?{id:ol,overflow:sl}:null,retryLane:536870912,hydrationErrors:null},s=mn(18,null,null,0),s.stateNode=o,s.return=e,e.child=s,$e=e,ie=null,s=!0):s=!1}s||vi(e)}if(o=e.memoizedState,o!==null&&(o=o.dehydrated,o!==null))return Mf(o)?e.lanes=32:e.lanes=536870912,null;cl(e)}return o=l.children,l=l.fallback,i?(Rl(e),i=e.mode,o=Es({mode:"hidden",children:o},i),l=di(l,i,n,null),o.return=e,l.return=e,o.sibling=l,e.child=o,i=e.child,i.memoizedState=Ec(n),i.childLanes=Cc(t,a,n),e.memoizedState=Tc,l):(Nl(e),yf(e,o))}if(s=t.memoizedState,s!==null&&(o=s.dehydrated,o!==null)){if(r)e.flags&256?(Nl(e),e.flags&=-257,e=Ac(t,e,n)):e.memoizedState!==null?(Rl(e),e.child=t.child,e.flags|=128,e=null):(Rl(e),i=l.fallback,o=e.mode,l=Es({mode:"visible",children:l.children},o),i=di(i,o,n,null),i.flags|=2,l.return=e,i.return=e,l.sibling=i,e.child=l,Cr(e,t.child,null,n),l=e.child,l.memoizedState=Ec(n),l.childLanes=Cc(t,a,n),e.memoizedState=Tc,e=i);else if(Nl(e),Mf(o)){if(a=o.nextSibling&&o.nextSibling.dataset,a)var u=a.dgst;a=u,l=Error(_(419)),l.stack="",l.digest=a,_a({value:l,source:null,stack:null}),e=Ac(t,e,n)}else if(De||Ka(t,e,n,!1),a=(n&t.childLanes)!==0,De||a){if(a=Xt,a!==null&&(l=n&-n,l=(l&42)!==0?1:Hf(l),l=(l&(a.suspendedLanes|n))!==0?0:l,l!==0&&l!==s.retryLane))throw s.retryLane=l,_r(t,l),yn(a,t,l),Py;o.data==="$?"||wf(),e=Ac(t,e,n)}else o.data==="$?"?(e.flags|=192,e.child=t.child,e=null):(t=s.treeContext,ie=Un(o.nextSibling),$e=e,zt=!0,pi=null,Vn=!1,t!==null&&(En[Cn++]=ol,En[Cn++]=sl,En[Cn++]=mi,ol=t.id,sl=t.overflow,mi=e),e=yf(e,l.children),e.flags|=4096);return e}return i?(Rl(e),i=l.fallback,o=e.mode,s=t.child,u=s.sibling,l=fl(s,{mode:"hidden",children:l.children}),l.subtreeFlags=s.subtreeFlags&65011712,u!==null?i=fl(u,i):(i=di(i,o,n,null),i.flags|=2),i.return=e,l.return=e,l.sibling=i,e.child=l,l=i,i=e.child,o=t.child.memoizedState,o===null?o=Ec(n):(s=o.cachePool,s!==null?(u=xe._currentValue,s=s.parent!==u?{parent:u,pool:u}:s):s=ly(),o={baseLanes:o.baseLanes|n,cachePool:s}),i.memoizedState=o,i.childLanes=Cc(t,a,n),e.memoizedState=Tc,l):(Nl(e),n=t.child,t=n.sibling,n=fl(n,{mode:"visible",children:l.children}),n.return=e,n.sibling=null,t!==null&&(a=e.deletions,a===null?(e.deletions=[t],e.flags|=16):a.push(t)),e.child=n,e.memoizedState=null,n)}function yf(t,e){return e=Es({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Es(t,e){return t=mn(22,t,null,e),t.lanes=0,t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},t}function Ac(t,e,n){return Cr(e,t.child,null,n),t=yf(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function jh(t,e,n){t.lanes|=e;var l=t.alternate;l!==null&&(l.lanes|=e),lf(t.return,e,n)}function Nc(t,e,n,l,i){var r=t.memoizedState;r===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:i}:(r.isBackwards=e,r.rendering=null,r.renderingStartTime=0,r.last=l,r.tail=n,r.tailMode=i)}function $y(t,e,n){var l=e.pendingProps,i=l.revealOrder,r=l.tail;if(Ue(t,e,l.children,n),l=ke.current,(l&2)!==0)l=l&1|2,e.flags|=128;else{if(t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&jh(t,n,e);else if(t.tag===19)jh(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}l&=1}switch(Wt(ke,l),i){case"forwards":for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&&Ss(t)===null&&(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),Nc(e,!1,i,n,r);break;case"backwards":for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&&Ss(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}Nc(e,!0,n,null,r);break;case"together":Nc(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function hl(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),Ql|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Ka(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(_(153));if(e.child!==null){for(t=e.child,n=fl(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=fl(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function pd(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&ys(t)))}function _S(t,e,n){switch(e.tag){case 3:us(e,e.stateNode.containerInfo),Al(e,xe,t.memoizedState.cache),Za();break;case 27:case 5:Qc(e);break;case 4:us(e,e.stateNode.containerInfo);break;case 10:Al(e,e.type,e.memoizedProps.value);break;case 13:var l=e.memoizedState;if(l!==null)return l.dehydrated!==null?(Nl(e),e.flags|=128,null):(n&e.child.childLanes)!==0?Jy(t,e,n):(Nl(e),t=hl(t,e,n),t!==null?t.sibling:null);Nl(e);break;case 19:var i=(t.flags&128)!==0;if(l=(n&e.childLanes)!==0,l||(Ka(t,e,n,!1),l=(n&e.childLanes)!==0),i){if(l)return $y(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Wt(ke,ke.current),l)break;return null;case 22:case 23:return e.lanes=0,Ky(t,e,n);case 24:Al(e,xe,t.memoizedState.cache)}return hl(t,e,n)}function Wy(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)De=!0;else{if(!pd(t,n)&&(e.flags&128)===0)return De=!1,_S(t,e,n);De=(t.flags&131072)!==0}else De=!1,zt&&(e.flags&1048576)!==0&&ey(e,gs,e.index);switch(e.lanes=0,e.tag){case 16:t:{t=e.pendingProps;var l=e.elementType,i=l._init;if(l=i(l._payload),e.type=l,typeof l=="function")Zf(l)?(t=ki(l,t),e.tag=1,e=qh(null,e,l,t,n)):(e.tag=0,e=gf(null,e,l,t,n));else{if(l!=null){if(i=l.$$typeof,i===Lf){e.tag=11,e=Lh(null,e,l,t,n);break t}else if(i===Uf){e.tag=14,e=Uh(null,e,l,t,n);break t}}throw e=Vc(l)||l,Error(_(306,e,""))}}return e;case 0:return gf(t,e,e.type,e.pendingProps,n);case 1:return l=e.type,i=ki(l,e.pendingProps),qh(t,e,l,i,n);case 3:t:{if(us(e,e.stateNode.containerInfo),t===null)throw Error(_(387));l=e.pendingProps;var r=e.memoizedState;i=r.element,sf(t,e),Sa(e,l,null,n);var a=e.memoizedState;if(l=a.cache,Al(e,xe,l),l!==r.cache&&rf(e,[xe],n,!0),ka(),l=a.element,r.isDehydrated)if(r={element:l,isDehydrated:!1,cache:a.cache},e.updateQueue.baseState=r,e.memoizedState=r,e.flags&256){e=Ih(t,e,l,n);break t}else if(l!==i){i=Nn(Error(_(424)),e),_a(i),e=Ih(t,e,l,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(ie=Un(t.firstChild),$e=e,zt=!0,pi=null,Vn=!0,n=jy(e,null,l,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Za(),l===i){e=hl(t,e,n);break t}Ue(t,e,l,n)}e=e.child}return e;case 26:return ls(t,e),t===null?(n=ag(e.type,null,e.pendingProps,null))?e.memoizedState=n:zt||(n=e.type,t=e.pendingProps,l=Os(Ll.current).createElement(n),l[je]=e,l[an]=t,He(l,n,t),Me(l),e.stateNode=l):e.memoizedState=ag(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Qc(e),t===null&&zt&&(l=e.stateNode=qv(e.type,e.pendingProps,Ll.current),$e=e,Vn=!0,i=ie,Xl(e.type)?(Df=i,ie=Un(l.firstChild)):ie=i),Ue(t,e,e.pendingProps.children,n),ls(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&zt&&((i=l=ie)&&(l=rw(l,e.type,e.pendingProps,Vn),l!==null?(e.stateNode=l,$e=e,ie=Un(l.firstChild),Vn=!1,i=!0):i=!1),i||vi(e)),Qc(e),i=e.type,r=e.pendingProps,a=t!==null?t.memoizedProps:null,l=r.children,Nf(i,r)?l=null:a!==null&&Nf(i,a)&&(e.flags|=32),e.memoizedState!==null&&(i=ld(t,e,ES,null,null,n),qa._currentValue=i),ls(t,e),Ue(t,e,l,n),e.child;case 6:return t===null&&zt&&((t=n=ie)&&(n=aw(n,e.pendingProps,Vn),n!==null?(e.stateNode=n,$e=e,ie=null,t=!0):t=!1),t||vi(e)),null;case 13:return Jy(t,e,n);case 4:return us(e,e.stateNode.containerInfo),l=e.pendingProps,t===null?e.child=Cr(e,null,l,n):Ue(t,e,l,n),e.child;case 11:return Lh(t,e,e.type,e.pendingProps,n);case 7:return Ue(t,e,e.pendingProps,n),e.child;case 8:return Ue(t,e,e.pendingProps.children,n),e.child;case 12:return Ue(t,e,e.pendingProps.children,n),e.child;case 10:return l=e.pendingProps,Al(e,e.type,l.value),Ue(t,e,l.children,n),e.child;case 9:return i=e.type._context,l=e.pendingProps.children,bi(e),i=Ye(i),l=l(i),e.flags|=1,Ue(t,e,l,n),e.child;case 14:return Uh(t,e,e.type,e.pendingProps,n);case 15:return Zy(t,e,e.type,e.pendingProps,n);case 19:return $y(t,e,n);case 31:return l=e.pendingProps,n=e.mode,l={mode:l.mode,children:l.children},t===null?(n=Es(l,n),n.ref=e.ref,e.child=n,n.return=e,e=n):(n=fl(t.child,l),n.ref=e.ref,e.child=n,n.return=e,e=n),e;case 22:return Ky(t,e,n);case 24:return bi(e),l=Ye(xe),t===null?(i=Wf(),i===null&&(i=Xt,r=$f(),i.pooledCache=r,r.refCount++,r!==null&&(i.pooledCacheLanes|=n),i=r),e.memoizedState={parent:l,cache:i},td(e),Al(e,xe,i)):((t.lanes&n)!==0&&(sf(t,e),Sa(e,null,null,n),ka()),i=t.memoizedState,r=e.memoizedState,i.parent!==l?(i={parent:l,cache:l},e.memoizedState=i,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=i),Al(e,xe,l)):(l=r.cache,Al(e,xe,l),l!==i.cache&&rf(e,[xe],n,!0))),Ue(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(_(156,e.tag))}function ll(t){t.flags|=4}function Yh(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Yv(e)){if(e=Mn.current,e!==null&&((At&4194048)===At?Xn!==null:(At&62914560)!==At&&(At&536870912)===0||e!==Xn))throw ba=of,iy;t.flags|=8192}}function Vo(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Eg():536870912,t.lanes|=e,Ar|=e)}function oa(t,e){if(!zt)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function ne(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,l=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags&65011712,l|=i.flags&65011712,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,l|=i.subtreeFlags,l|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=l,t.childLanes=n,e}function zS(t,e,n){var l=e.pendingProps;switch(Jf(e),e.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ne(e),null;case 1:return ne(e),null;case 3:return n=e.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),dl(xe),xr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(ra(e)?ll(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,vh())),ne(e),null;case 26:return n=e.memoizedState,t===null?(ll(e),n!==null?(ne(e),Yh(e,n)):(ne(e),e.flags&=-16777217)):n?n!==t.memoizedState?(ll(e),ne(e),Yh(e,n)):(ne(e),e.flags&=-16777217):(t.memoizedProps!==l&&ll(e),ne(e),e.flags&=-16777217),null;case 27:cs(e),n=Ll.current;var i=e.type;if(t!==null&&e.stateNode!=null)t.memoizedProps!==l&&ll(e);else{if(!l){if(e.stateNode===null)throw Error(_(166));return ne(e),null}t=Qn.current,ra(e)?gh(e,t):(t=qv(i,l,n),e.stateNode=t,ll(e))}return ne(e),null;case 5:if(cs(e),n=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&ll(e);else{if(!l){if(e.stateNode===null)throw Error(_(166));return ne(e),null}if(t=Qn.current,ra(e))gh(e,t);else{switch(i=Os(Ll.current),t){case 1:t=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:t=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":t=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":t=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":t=i.createElement("div"),t.innerHTML="<script><\/script>",t=t.removeChild(t.firstChild);break;case"select":t=typeof l.is=="string"?i.createElement("select",{is:l.is}):i.createElement("select"),l.multiple?t.multiple=!0:l.size&&(t.size=l.size);break;default:t=typeof l.is=="string"?i.createElement(n,{is:l.is}):i.createElement(n)}}t[je]=e,t[an]=l;t:for(i=e.child;i!==null;){if(i.tag===5||i.tag===6)t.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break t;for(;i.sibling===null;){if(i.return===null||i.return===e)break t;i=i.return}i.sibling.return=i.return,i=i.sibling}e.stateNode=t;t:switch(He(t,n,l),n){case"button":case"input":case"select":case"textarea":t=!!l.autoFocus;break t;case"img":t=!0;break t;default:t=!1}t&&ll(e)}}return ne(e),e.flags&=-16777217,null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&ll(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(_(166));if(t=Ll.current,ra(e)){if(t=e.stateNode,n=e.memoizedProps,l=null,i=$e,i!==null)switch(i.tag){case 27:case 5:l=i.memoizedProps}t[je]=e,t=!!(t.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Uv(t.nodeValue,n)),t||vi(e)}else t=Os(t).createTextNode(l),t[je]=e,e.stateNode=t}return ne(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(i=ra(e),l!==null&&l.dehydrated!==null){if(t===null){if(!i)throw Error(_(318));if(i=e.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_(317));i[je]=e}else Za(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ne(e),i=!1}else i=vh(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=i),i=!0;if(!i)return e.flags&256?(cl(e),e):(cl(e),null)}if(cl(e),(e.flags&128)!==0)return e.lanes=n,e;if(n=l!==null,t=t!==null&&t.memoizedState!==null,n){l=e.child,i=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(i=l.alternate.memoizedState.cachePool.pool);var r=null;l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(r=l.memoizedState.cachePool.pool),r!==i&&(l.flags|=2048)}return n!==t&&n&&(e.child.flags|=8192),Vo(e,e.updateQueue),ne(e),null;case 4:return xr(),t===null&&Sd(e.stateNode.containerInfo),ne(e),null;case 10:return dl(e.type),ne(e),null;case 19:if(Oe(ke),i=e.memoizedState,i===null)return ne(e),null;if(l=(e.flags&128)!==0,r=i.rendering,r===null)if(l)oa(i,!1);else{if(re!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(r=Ss(t),r!==null){for(e.flags|=128,oa(i,!1),t=r.updateQueue,e.updateQueue=t,Vo(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)ty(n,t),n=n.sibling;return Wt(ke,ke.current&1|2),e.child}t=t.sibling}i.tail!==null&&Gn()>As&&(e.flags|=128,l=!0,oa(i,!1),e.lanes=4194304)}else{if(!l)if(t=Ss(r),t!==null){if(e.flags|=128,l=!0,t=t.updateQueue,e.updateQueue=t,Vo(e,t),oa(i,!0),i.tail===null&&i.tailMode==="hidden"&&!r.alternate&&!zt)return ne(e),null}else 2*Gn()-i.renderingStartTime>As&&n!==536870912&&(e.flags|=128,l=!0,oa(i,!1),e.lanes=4194304);i.isBackwards?(r.sibling=e.child,e.child=r):(t=i.last,t!==null?t.sibling=r:e.child=r,i.last=r)}return i.tail!==null?(e=i.tail,i.rendering=e,i.tail=e.sibling,i.renderingStartTime=Gn(),e.sibling=null,t=ke.current,Wt(ke,l?t&1|2:t&1),e):(ne(e),null);case 22:case 23:return cl(e),ed(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?(n&536870912)!==0&&(e.flags&128)===0&&(ne(e),e.subtreeFlags&6&&(e.flags|=8192)):ne(e),n=e.updateQueue,n!==null&&Vo(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==n&&(e.flags|=2048),t!==null&&Oe(hi),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),dl(xe),ne(e),null;case 25:return null;case 30:return null}throw Error(_(156,e.tag))}function LS(t,e){switch(Jf(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return dl(xe),xr(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return cs(e),null;case 13:if(cl(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(_(340));Za()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Oe(ke),null;case 4:return xr(),null;case 10:return dl(e.type),null;case 22:case 23:return cl(e),ed(),t!==null&&Oe(hi),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return dl(xe),null;case 25:return null;default:return null}}function tv(t,e){switch(Jf(e),e.tag){case 3:dl(xe),xr();break;case 26:case 27:case 5:cs(e);break;case 4:xr();break;case 13:cl(e);break;case 19:Oe(ke);break;case 10:dl(e.type);break;case 22:case 23:cl(e),ed(),t!==null&&Oe(hi);break;case 24:dl(xe)}}function eo(t,e){try{var n=e.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var i=l.next;n=i;do{if((n.tag&t)===t){l=void 0;var r=n.create,a=n.inst;l=r(),a.destroy=l}n=n.next}while(n!==i)}}catch(o){Ft(e,e.return,o)}}function Fl(t,e,n){try{var l=e.updateQueue,i=l!==null?l.lastEffect:null;if(i!==null){var r=i.next;l=r;do{if((l.tag&t)===t){var a=l.inst,o=a.destroy;if(o!==void 0){a.destroy=void 0,i=e;var s=n,u=o;try{u()}catch(f){Ft(i,s,f)}}}l=l.next}while(l!==r)}}catch(f){Ft(e,e.return,f)}}function ev(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{oy(e,n)}catch(l){Ft(t,t.return,l)}}}function nv(t,e,n){n.props=ki(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(l){Ft(t,e,l)}}function Ta(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof n=="function"?t.refCleanup=n(l):n.current=l}}catch(i){Ft(t,e,i)}}function Fn(t,e){var n=t.ref,l=t.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(i){Ft(t,e,i)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Ft(t,e,i)}else n.current=null}function lv(t){var e=t.type,n=t.memoizedProps,l=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break t;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(i){Ft(t,t.return,i)}}function Rc(t,e,n){try{var l=t.stateNode;tw(l,t.type,n,e),l[an]=e}catch(i){Ft(t,t.return,i)}}function iv(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Xl(t.type)||t.tag===4}function Mc(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||iv(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Xl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function vf(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Js));else if(l!==4&&(l===27&&Xl(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(vf(t,e,n),t=t.sibling;t!==null;)vf(t,e,n),t=t.sibling}function Cs(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(l!==4&&(l===27&&Xl(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Cs(t,e,n),t=t.sibling;t!==null;)Cs(t,e,n),t=t.sibling}function rv(t){var e=t.stateNode,n=t.memoizedProps;try{for(var l=t.type,i=e.attributes;i.length;)e.removeAttributeNode(i[0]);He(e,l,n),e[je]=t,e[an]=n}catch(r){Ft(t,t.return,r)}}var rl=!1,ce=!1,Dc=!1,Vh=typeof WeakSet=="function"?WeakSet:Set,Re=null;function US(t,e){if(t=t.containerInfo,Cf=Us,t=Gg(t),Gf(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var i=l.anchorOffset,r=l.focusNode;l=l.focusOffset;try{n.nodeType,r.nodeType}catch{n=null;break t}var a=0,o=-1,s=-1,u=0,f=0,c=t,m=null;e:for(;;){for(var d;c!==n||i!==0&&c.nodeType!==3||(o=a+i),c!==r||l!==0&&c.nodeType!==3||(s=a+l),c.nodeType===3&&(a+=c.nodeValue.length),(d=c.firstChild)!==null;)m=c,c=d;for(;;){if(c===t)break e;if(m===n&&++u===i&&(o=a),m===r&&++f===l&&(s=a),(d=c.nextSibling)!==null)break;c=m,m=c.parentNode}c=d}n=o===-1||s===-1?null:{start:o,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Af={focusedElem:t,selectionRange:n},Us=!1,Re=e;Re!==null;)if(e=Re,t=e.child,(e.subtreeFlags&1024)!==0&&t!==null)t.return=e,Re=t;else for(;Re!==null;){switch(e=Re,r=e.alternate,t=e.flags,e.tag){case 0:break;case 11:case 15:break;case 1:if((t&1024)!==0&&r!==null){t=void 0,n=e,i=r.memoizedProps,r=r.memoizedState,l=n.stateNode;try{var g=ki(n.type,i,n.elementType===n.type);t=l.getSnapshotBeforeUpdate(g,r),l.__reactInternalSnapshotBeforeUpdate=t}catch(x){Ft(n,n.return,x)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Rf(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Rf(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(_(163))}if(t=e.sibling,t!==null){t.return=e.return,Re=t;break}Re=e.return}}function av(t,e,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:wl(t,n),l&4&&eo(5,n);break;case 1:if(wl(t,n),l&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(a){Ft(n,n.return,a)}else{var i=ki(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(i,e,t.__reactInternalSnapshotBeforeUpdate)}catch(a){Ft(n,n.return,a)}}l&64&&ev(n),l&512&&Ta(n,n.return);break;case 3:if(wl(t,n),l&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{oy(t,e)}catch(a){Ft(n,n.return,a)}}break;case 27:e===null&&l&4&&rv(n);case 26:case 5:wl(t,n),e===null&&l&4&&lv(n),l&512&&Ta(n,n.return);break;case 12:wl(t,n);break;case 13:wl(t,n),l&4&&uv(t,n),l&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=QS.bind(null,n),ow(t,n))));break;case 22:if(l=n.memoizedState!==null||rl,!l){e=e!==null&&e.memoizedState!==null||ce,i=rl;var r=ce;rl=l,(ce=e)&&!r?Tl(t,n,(n.subtreeFlags&8772)!==0):wl(t,n),rl=i,ce=r}break;case 30:break;default:wl(t,n)}}function ov(t){var e=t.alternate;e!==null&&(t.alternate=null,ov(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&If(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var $t=null,ln=!1;function il(t,e,n){for(n=n.child;n!==null;)sv(t,e,n),n=n.sibling}function sv(t,e,n){if(pn&&typeof pn.onCommitFiberUnmount=="function")try{pn.onCommitFiberUnmount(Fa,n)}catch{}switch(n.tag){case 26:ce||Fn(n,e),il(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ce||Fn(n,e);var l=$t,i=ln;Xl(n.type)&&($t=n.stateNode,ln=!1),il(t,e,n),Na(n.stateNode),$t=l,ln=i;break;case 5:ce||Fn(n,e);case 6:if(l=$t,i=ln,$t=null,il(t,e,n),$t=l,ln=i,$t!==null)if(ln)try{($t.nodeType===9?$t.body:$t.nodeName==="HTML"?$t.ownerDocument.body:$t).removeChild(n.stateNode)}catch(r){Ft(n,e,r)}else try{$t.removeChild(n.stateNode)}catch(r){Ft(n,e,r)}break;case 18:$t!==null&&(ln?(t=$t,lg(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Ya(t)):lg($t,n.stateNode));break;case 4:l=$t,i=ln,$t=n.stateNode.containerInfo,ln=!0,il(t,e,n),$t=l,ln=i;break;case 0:case 11:case 14:case 15:ce||Fl(2,n,e),ce||Fl(4,n,e),il(t,e,n);break;case 1:ce||(Fn(n,e),l=n.stateNode,typeof l.componentWillUnmount=="function"&&nv(n,e,l)),il(t,e,n);break;case 21:il(t,e,n);break;case 22:ce=(l=ce)||n.memoizedState!==null,il(t,e,n),ce=l;break;default:il(t,e,n)}}function uv(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Ya(t)}catch(n){Ft(e,e.return,n)}}function BS(t){switch(t.tag){case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Vh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Vh),e;default:throw Error(_(435,t.tag))}}function Oc(t,e){var n=BS(t);e.forEach(function(l){var i=GS.bind(null,t,l);n.has(l)||(n.add(l),l.then(i,i))})}function cn(t,e){var n=e.deletions;if(n!==null)for(var l=0;l<n.length;l++){var i=n[l],r=t,a=e,o=a;t:for(;o!==null;){switch(o.tag){case 27:if(Xl(o.type)){$t=o.stateNode,ln=!1;break t}break;case 5:$t=o.stateNode,ln=!1;break t;case 3:case 4:$t=o.stateNode.containerInfo,ln=!0;break t}o=o.return}if($t===null)throw Error(_(160));sv(r,a,i),$t=null,ln=!1,r=i.alternate,r!==null&&(r.return=null),i.return=null}if(e.subtreeFlags&13878)for(e=e.child;e!==null;)cv(e,t),e=e.sibling}var Ln=null;function cv(t,e){var n=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:cn(e,t),fn(t),l&4&&(Fl(3,t,t.return),eo(3,t),Fl(5,t,t.return));break;case 1:cn(e,t),fn(t),l&512&&(ce||n===null||Fn(n,n.return)),l&64&&rl&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var i=Ln;if(cn(e,t),fn(t),l&512&&(ce||n===null||Fn(n,n.return)),l&4){var r=n!==null?n.memoizedState:null;if(l=t.memoizedState,n===null)if(l===null)if(t.stateNode===null){t:{l=t.type,n=t.memoizedProps,i=i.ownerDocument||i;e:switch(l){case"title":r=i.getElementsByTagName("title")[0],(!r||r[Xa]||r[je]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(l),i.head.insertBefore(r,i.querySelector("head > title"))),He(r,l,n),r[je]=t,Me(r),l=r;break t;case"link":var a=sg("link","href",i).get(l+(n.href||""));if(a){for(var o=0;o<a.length;o++)if(r=a[o],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(o,1);break e}}r=i.createElement(l),He(r,l,n),i.head.appendChild(r);break;case"meta":if(a=sg("meta","content",i).get(l+(n.content||""))){for(o=0;o<a.length;o++)if(r=a[o],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(o,1);break e}}r=i.createElement(l),He(r,l,n),i.head.appendChild(r);break;default:throw Error(_(468,l))}r[je]=t,Me(r),l=r}t.stateNode=l}else ug(i,t.type,t.stateNode);else t.stateNode=og(i,l,t.memoizedProps);else r!==l?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,l===null?ug(i,t.type,t.stateNode):og(i,l,t.memoizedProps)):l===null&&t.stateNode!==null&&Rc(t,t.memoizedProps,n.memoizedProps)}break;case 27:cn(e,t),fn(t),l&512&&(ce||n===null||Fn(n,n.return)),n!==null&&l&4&&Rc(t,t.memoizedProps,n.memoizedProps);break;case 5:if(cn(e,t),fn(t),l&512&&(ce||n===null||Fn(n,n.return)),t.flags&32){i=t.stateNode;try{Sr(i,"")}catch(d){Ft(t,t.return,d)}}l&4&&t.stateNode!=null&&(i=t.memoizedProps,Rc(t,i,n!==null?n.memoizedProps:i)),l&1024&&(Dc=!0);break;case 6:if(cn(e,t),fn(t),l&4){if(t.stateNode===null)throw Error(_(162));l=t.memoizedProps,n=t.stateNode;try{n.nodeValue=l}catch(d){Ft(t,t.return,d)}}break;case 3:if(as=null,i=Ln,Ln=_s(e.containerInfo),cn(e,t),Ln=i,fn(t),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ya(e.containerInfo)}catch(d){Ft(t,t.return,d)}Dc&&(Dc=!1,fv(t));break;case 4:l=Ln,Ln=_s(t.stateNode.containerInfo),cn(e,t),fn(t),Ln=l;break;case 12:cn(e,t),fn(t);break;case 13:cn(e,t),fn(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(bd=Gn()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Oc(t,l)));break;case 22:i=t.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,u=rl,f=ce;if(rl=u||i,ce=f||s,cn(e,t),ce=f,rl=u,fn(t),l&8192)t:for(e=t.stateNode,e._visibility=i?e._visibility&-2:e._visibility|1,i&&(n===null||s||rl||ce||ci(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){s=n=e;try{if(r=s.stateNode,i)a=r.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{o=s.stateNode;var c=s.memoizedProps.style,m=c!=null&&c.hasOwnProperty("display")?c.display:null;o.style.display=m==null||typeof m=="boolean"?"":(""+m).trim()}}catch(d){Ft(s,s.return,d)}}}else if(e.tag===6){if(n===null){s=e;try{s.stateNode.nodeValue=i?"":s.memoizedProps}catch(d){Ft(s,s.return,d)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}l&4&&(l=t.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Oc(t,n))));break;case 19:cn(e,t),fn(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Oc(t,l)));break;case 30:break;case 21:break;default:cn(e,t),fn(t)}}function fn(t){var e=t.flags;if(e&2){try{for(var n,l=t.return;l!==null;){if(iv(l)){n=l;break}l=l.return}if(n==null)throw Error(_(160));switch(n.tag){case 27:var i=n.stateNode,r=Mc(t);Cs(t,r,i);break;case 5:var a=n.stateNode;n.flags&32&&(Sr(a,""),n.flags&=-33);var o=Mc(t);Cs(t,o,a);break;case 3:case 4:var s=n.stateNode.containerInfo,u=Mc(t);vf(t,u,s);break;default:throw Error(_(161))}}catch(f){Ft(t,t.return,f)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function fv(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;fv(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function wl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)av(t,e.alternate,e),e=e.sibling}function ci(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Fl(4,e,e.return),ci(e);break;case 1:Fn(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&nv(e,e.return,n),ci(e);break;case 27:Na(e.stateNode);case 26:case 5:Fn(e,e.return),ci(e);break;case 22:e.memoizedState===null&&ci(e);break;case 30:ci(e);break;default:ci(e)}t=t.sibling}}function Tl(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var l=e.alternate,i=t,r=e,a=r.flags;switch(r.tag){case 0:case 11:case 15:Tl(i,r,n),eo(4,r);break;case 1:if(Tl(i,r,n),l=r,i=l.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){Ft(l,l.return,u)}if(l=r,i=l.updateQueue,i!==null){var o=l.stateNode;try{var s=i.shared.hiddenCallbacks;if(s!==null)for(i.shared.hiddenCallbacks=null,i=0;i<s.length;i++)ay(s[i],o)}catch(u){Ft(l,l.return,u)}}n&&a&64&&ev(r),Ta(r,r.return);break;case 27:rv(r);case 26:case 5:Tl(i,r,n),n&&l===null&&a&4&&lv(r),Ta(r,r.return);break;case 12:Tl(i,r,n);break;case 13:Tl(i,r,n),n&&a&4&&uv(i,r);break;case 22:r.memoizedState===null&&Tl(i,r,n),Ta(r,r.return);break;case 30:break;default:Tl(i,r,n)}e=e.sibling}}function hd(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&Ja(n))}function gd(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Ja(t))}function Yn(t,e,n,l){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)dv(t,e,n,l),e=e.sibling}function dv(t,e,n,l){var i=e.flags;switch(e.tag){case 0:case 11:case 15:Yn(t,e,n,l),i&2048&&eo(9,e);break;case 1:Yn(t,e,n,l);break;case 3:Yn(t,e,n,l),i&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&Ja(t)));break;case 12:if(i&2048){Yn(t,e,n,l),t=e.stateNode;try{var r=e.memoizedProps,a=r.id,o=r.onPostCommit;typeof o=="function"&&o(a,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(s){Ft(e,e.return,s)}}else Yn(t,e,n,l);break;case 13:Yn(t,e,n,l);break;case 23:break;case 22:r=e.stateNode,a=e.alternate,e.memoizedState!==null?r._visibility&2?Yn(t,e,n,l):Ea(t,e):r._visibility&2?Yn(t,e,n,l):(r._visibility|=2,$i(t,e,n,l,(e.subtreeFlags&10256)!==0)),i&2048&&hd(a,e);break;case 24:Yn(t,e,n,l),i&2048&&gd(e.alternate,e);break;default:Yn(t,e,n,l)}}function $i(t,e,n,l,i){for(i=i&&(e.subtreeFlags&10256)!==0,e=e.child;e!==null;){var r=t,a=e,o=n,s=l,u=a.flags;switch(a.tag){case 0:case 11:case 15:$i(r,a,o,s,i),eo(8,a);break;case 23:break;case 22:var f=a.stateNode;a.memoizedState!==null?f._visibility&2?$i(r,a,o,s,i):Ea(r,a):(f._visibility|=2,$i(r,a,o,s,i)),i&&u&2048&&hd(a.alternate,a);break;case 24:$i(r,a,o,s,i),i&&u&2048&&gd(a.alternate,a);break;default:$i(r,a,o,s,i)}e=e.sibling}}function Ea(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,l=e,i=l.flags;switch(l.tag){case 22:Ea(n,l),i&2048&&hd(l.alternate,l);break;case 24:Ea(n,l),i&2048&&gd(l.alternate,l);break;default:Ea(n,l)}e=e.sibling}}var pa=8192;function Zi(t){if(t.subtreeFlags&pa)for(t=t.child;t!==null;)mv(t),t=t.sibling}function mv(t){switch(t.tag){case 26:Zi(t),t.flags&pa&&t.memoizedState!==null&&xw(Ln,t.memoizedState,t.memoizedProps);break;case 5:Zi(t);break;case 3:case 4:var e=Ln;Ln=_s(t.stateNode.containerInfo),Zi(t),Ln=e;break;case 22:t.memoizedState===null&&(e=t.alternate,e!==null&&e.memoizedState!==null?(e=pa,pa=16777216,Zi(t),pa=e):Zi(t));break;default:Zi(t)}}function pv(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function sa(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];Re=l,gv(l,t)}pv(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hv(t),t=t.sibling}function hv(t){switch(t.tag){case 0:case 11:case 15:sa(t),t.flags&2048&&Fl(9,t,t.return);break;case 3:sa(t);break;case 12:sa(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,is(t)):sa(t);break;default:sa(t)}}function is(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];Re=l,gv(l,t)}pv(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Fl(8,e,e.return),is(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,is(e));break;default:is(e)}t=t.sibling}}function gv(t,e){for(;Re!==null;){var n=Re;switch(n.tag){case 0:case 11:case 15:Fl(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Ja(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Re=l;else t:for(n=t;Re!==null;){l=Re;var i=l.sibling,r=l.return;if(ov(l),l===n){Re=null;break t}if(i!==null){i.return=r,Re=i;break t}Re=r}}}var HS={getCacheForType:function(t){var e=Ye(xe),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n}},qS=typeof WeakMap=="function"?WeakMap:Map,Ht=0,Xt=null,bt=null,At=0,Bt=0,dn=null,_l=!1,zr=!1,yd=!1,gl=0,re=0,Ql=0,gi=0,vd=0,Rn=0,Ar=0,Ca=null,rn=null,bf=!1,bd=0,As=1/0,Ns=null,Hl=null,Be=0,ql=null,Nr=null,br=0,xf=0,kf=null,yv=null,Aa=0,Sf=null;function gn(){if((Ht&2)!==0&&At!==0)return At&-At;if(at.T!==null){var t=wr;return t!==0?t:kd()}return Ng()}function vv(){Rn===0&&(Rn=(At&536870912)===0||zt?Tg():536870912);var t=Mn.current;return t!==null&&(t.flags|=32),Rn}function yn(t,e,n){(t===Xt&&(Bt===2||Bt===9)||t.cancelPendingCommit!==null)&&(Rr(t,0),zl(t,At,Rn,!1)),Ga(t,n),((Ht&2)===0||t!==Xt)&&(t===Xt&&((Ht&2)===0&&(gi|=n),re===4&&zl(t,At,Rn,!1)),Zn(t))}function bv(t,e,n){if((Ht&6)!==0)throw Error(_(327));var l=!n&&(e&124)===0&&(e&t.expiredLanes)===0||Qa(t,e),i=l?YS(t,e):_c(t,e,!0),r=l;do{if(i===0){zr&&!l&&zl(t,e,0,!1);break}else{if(n=t.current.alternate,r&&!IS(n)){i=_c(t,e,!1),r=!1;continue}if(i===2){if(r=e,t.errorRecoveryDisabledLanes&r)var a=0;else a=t.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){e=a;t:{var o=t;i=Ca;var s=o.current.memoizedState.isDehydrated;if(s&&(Rr(o,a).flags|=256),a=_c(o,a,!1),a!==2){if(yd&&!s){o.errorRecoveryDisabledLanes|=r,gi|=r,i=4;break t}r=rn,rn=i,r!==null&&(rn===null?rn=r:rn.push.apply(rn,r))}i=a}if(r=!1,i!==2)continue}}if(i===1){Rr(t,0),zl(t,e,0,!0);break}t:{switch(l=t,r=i,r){case 0:case 1:throw Error(_(345));case 4:if((e&4194048)!==e)break;case 6:zl(l,e,Rn,!_l);break t;case 2:rn=null;break;case 3:case 5:break;default:throw Error(_(329))}if((e&62914560)===e&&(i=bd+300-Gn(),10<i)){if(zl(l,e,Rn,!_l),Hs(l,0,!0)!==0)break t;l.timeoutHandle=Hv(Fh.bind(null,l,n,rn,Ns,bf,e,Rn,gi,Ar,_l,r,2,-0,0),i);break t}Fh(l,n,rn,Ns,bf,e,Rn,gi,Ar,_l,r,0,-0,0)}}break}while(!0);Zn(t)}function Fh(t,e,n,l,i,r,a,o,s,u,f,c,m,d){if(t.timeoutHandle=-1,c=e.subtreeFlags,(c&8192||(c&16785408)===16785408)&&(Ha={stylesheets:null,count:0,unsuspend:bw},mv(e),c=kw(),c!==null)){t.cancelPendingCommit=c(Gh.bind(null,t,e,r,n,l,i,a,o,s,f,1,m,d)),zl(t,r,a,!u);return}Gh(t,e,r,n,l,i,a,o,s)}function IS(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var i=n[l],r=i.getSnapshot;i=i.value;try{if(!vn(r(),i))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function zl(t,e,n,l){e&=~vd,e&=~gi,t.suspendedLanes|=e,t.pingedLanes&=~e,l&&(t.warmLanes|=e),l=t.expirationTimes;for(var i=e;0<i;){var r=31-hn(i),a=1<<r;l[r]=-1,i&=~a}n!==0&&Cg(t,n,e)}function Ps(){return(Ht&6)===0?(no(0,!1),!1):!0}function xd(){if(bt!==null){if(Bt===0)var t=bt.return;else t=bt,ul=Ei=null,ad(t),vr=null,La=0,t=bt;for(;t!==null;)tv(t.alternate,t),t=t.return;bt=null}}function Rr(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,nw(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),xd(),Xt=t,bt=n=fl(t.current,null),At=e,Bt=0,dn=null,_l=!1,zr=Qa(t,e),yd=!1,Ar=Rn=vd=gi=Ql=re=0,rn=Ca=null,bf=!1,(e&8)!==0&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var i=31-hn(l),r=1<<i;e|=t[i],l&=~r}return gl=e,Ys(),n}function xv(t,e){pt=null,at.H=ks,e===$a||e===Fs?(e=Sh(),Bt=3):e===iy?(e=Sh(),Bt=4):Bt=e===Py?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,dn=e,bt===null&&(re=1,Ts(t,Nn(e,t.current)))}function kv(){var t=at.H;return at.H=ks,t===null?ks:t}function Sv(){var t=at.A;return at.A=HS,t}function wf(){re=4,_l||(At&4194048)!==At&&Mn.current!==null||(zr=!0),(Ql&134217727)===0&&(gi&134217727)===0||Xt===null||zl(Xt,At,Rn,!1)}function _c(t,e,n){var l=Ht;Ht|=2;var i=kv(),r=Sv();(Xt!==t||At!==e)&&(Ns=null,Rr(t,e)),e=!1;var a=re;t:do try{if(Bt!==0&&bt!==null){var o=bt,s=dn;switch(Bt){case 8:xd(),a=6;break t;case 3:case 2:case 9:case 6:Mn.current===null&&(e=!0);var u=Bt;if(Bt=0,dn=null,fr(t,o,s,u),n&&zr){a=0;break t}break;default:u=Bt,Bt=0,dn=null,fr(t,o,s,u)}}jS(),a=re;break}catch(f){xv(t,f)}while(!0);return e&&t.shellSuspendCounter++,ul=Ei=null,Ht=l,at.H=i,at.A=r,bt===null&&(Xt=null,At=0,Ys()),a}function jS(){for(;bt!==null;)wv(bt)}function YS(t,e){var n=Ht;Ht|=2;var l=kv(),i=Sv();Xt!==t||At!==e?(Ns=null,As=Gn()+500,Rr(t,e)):zr=Qa(t,e);t:do try{if(Bt!==0&&bt!==null){e=bt;var r=dn;e:switch(Bt){case 1:Bt=0,dn=null,fr(t,e,r,1);break;case 2:case 9:if(kh(r)){Bt=0,dn=null,Qh(e);break}e=function(){Bt!==2&&Bt!==9||Xt!==t||(Bt=7),Zn(t)},r.then(e,e);break t;case 3:Bt=7;break t;case 4:Bt=5;break t;case 7:kh(r)?(Bt=0,dn=null,Qh(e)):(Bt=0,dn=null,fr(t,e,r,7));break;case 5:var a=null;switch(bt.tag){case 26:a=bt.memoizedState;case 5:case 27:var o=bt;if(!a||Yv(a)){Bt=0,dn=null;var s=o.sibling;if(s!==null)bt=s;else{var u=o.return;u!==null?(bt=u,Zs(u)):bt=null}break e}}Bt=0,dn=null,fr(t,e,r,5);break;case 6:Bt=0,dn=null,fr(t,e,r,6);break;case 8:xd(),re=6;break t;default:throw Error(_(462))}}VS();break}catch(f){xv(t,f)}while(!0);return ul=Ei=null,at.H=l,at.A=i,Ht=n,bt!==null?0:(Xt=null,At=0,Ys(),re)}function VS(){for(;bt!==null&&!fk();)wv(bt)}function wv(t){var e=Wy(t.alternate,t,gl);t.memoizedProps=t.pendingProps,e===null?Zs(t):bt=e}function Qh(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Hh(n,e,e.pendingProps,e.type,void 0,At);break;case 11:e=Hh(n,e,e.pendingProps,e.type.render,e.ref,At);break;case 5:ad(e);default:tv(n,e),e=bt=ty(e,gl),e=Wy(n,e,gl)}t.memoizedProps=t.pendingProps,e===null?Zs(t):bt=e}function fr(t,e,n,l){ul=Ei=null,ad(e),vr=null,La=0;var i=e.return;try{if(OS(t,i,e,n,At)){re=1,Ts(t,Nn(n,t.current)),bt=null;return}}catch(r){if(i!==null)throw bt=i,r;re=1,Ts(t,Nn(n,t.current)),bt=null;return}e.flags&32768?(zt||l===1?t=!0:zr||(At&536870912)!==0?t=!1:(_l=t=!0,(l===2||l===9||l===3||l===6)&&(l=Mn.current,l!==null&&l.tag===13&&(l.flags|=16384))),Tv(e,t)):Zs(e)}function Zs(t){var e=t;do{if((e.flags&32768)!==0){Tv(e,_l);return}t=e.return;var n=zS(e.alternate,e,gl);if(n!==null){bt=n;return}if(e=e.sibling,e!==null){bt=e;return}bt=e=t}while(e!==null);re===0&&(re=5)}function Tv(t,e){do{var n=LS(t.alternate,t);if(n!==null){n.flags&=32767,bt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){bt=t;return}bt=t=n}while(t!==null);re=6,bt=null}function Gh(t,e,n,l,i,r,a,o,s){t.cancelPendingCommit=null;do Ks();while(Be!==0);if((Ht&6)!==0)throw Error(_(327));if(e!==null){if(e===t.current)throw Error(_(177));if(r=e.lanes|e.childLanes,r|=Xf,kk(t,n,r,a,o,s),t===Xt&&(bt=Xt=null,At=0),Nr=e,ql=t,br=n,xf=r,kf=i,yv=l,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,XS(fs,function(){return Rv(!0),null})):(t.callbackNode=null,t.callbackPriority=0),l=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||l){l=at.T,at.T=null,i=Lt.p,Lt.p=2,a=Ht,Ht|=4;try{US(t,e,n)}finally{Ht=a,Lt.p=i,at.T=l}}Be=1,Ev(),Cv(),Av()}}function Ev(){if(Be===1){Be=0;var t=ql,e=Nr,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=at.T,at.T=null;var l=Lt.p;Lt.p=2;var i=Ht;Ht|=4;try{cv(e,t);var r=Af,a=Gg(t.containerInfo),o=r.focusedElem,s=r.selectionRange;if(a!==o&&o&&o.ownerDocument&&Qg(o.ownerDocument.documentElement,o)){if(s!==null&&Gf(o)){var u=s.start,f=s.end;if(f===void 0&&(f=u),"selectionStart"in o)o.selectionStart=u,o.selectionEnd=Math.min(f,o.value.length);else{var c=o.ownerDocument||document,m=c&&c.defaultView||window;if(m.getSelection){var d=m.getSelection(),g=o.textContent.length,x=Math.min(s.start,g),C=s.end===void 0?x:Math.min(s.end,g);!d.extend&&x>C&&(a=C,C=x,x=a);var h=mh(o,x),p=mh(o,C);if(h&&p&&(d.rangeCount!==1||d.anchorNode!==h.node||d.anchorOffset!==h.offset||d.focusNode!==p.node||d.focusOffset!==p.offset)){var y=c.createRange();y.setStart(h.node,h.offset),d.removeAllRanges(),x>C?(d.addRange(y),d.extend(p.node,p.offset)):(y.setEnd(p.node,p.offset),d.addRange(y))}}}}for(c=[],d=o;d=d.parentNode;)d.nodeType===1&&c.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o<c.length;o++){var T=c[o];T.element.scrollLeft=T.left,T.element.scrollTop=T.top}}Us=!!Cf,Af=Cf=null}finally{Ht=i,Lt.p=l,at.T=n}}t.current=e,Be=2}}function Cv(){if(Be===2){Be=0;var t=ql,e=Nr,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=at.T,at.T=null;var l=Lt.p;Lt.p=2;var i=Ht;Ht|=4;try{av(t,e.alternate,e)}finally{Ht=i,Lt.p=l,at.T=n}}Be=3}}function Av(){if(Be===4||Be===3){Be=0,dk();var t=ql,e=Nr,n=br,l=yv;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?Be=5:(Be=0,Nr=ql=null,Nv(t,t.pendingLanes));var i=t.pendingLanes;if(i===0&&(Hl=null),qf(n),e=e.stateNode,pn&&typeof pn.onCommitFiberRoot=="function")try{pn.onCommitFiberRoot(Fa,e,void 0,(e.current.flags&128)===128)}catch{}if(l!==null){e=at.T,i=Lt.p,Lt.p=2,at.T=null;try{for(var r=t.onRecoverableError,a=0;a<l.length;a++){var o=l[a];r(o.value,{componentStack:o.stack})}}finally{at.T=e,Lt.p=i}}(br&3)!==0&&Ks(),Zn(t),i=t.pendingLanes,(n&4194090)!==0&&(i&42)!==0?t===Sf?Aa++:(Aa=0,Sf=t):Aa=0,no(0,!1)}}function Nv(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,Ja(e)))}function Ks(t){return Ev(),Cv(),Av(),Rv(t)}function Rv(){if(Be!==5)return!1;var t=ql,e=xf;xf=0;var n=qf(br),l=at.T,i=Lt.p;try{Lt.p=32>n?32:n,at.T=null,n=kf,kf=null;var r=ql,a=br;if(Be=0,Nr=ql=null,br=0,(Ht&6)!==0)throw Error(_(331));var o=Ht;if(Ht|=4,hv(r.current),dv(r,r.current,a,n),Ht=o,no(0,!1),pn&&typeof pn.onPostCommitFiberRoot=="function")try{pn.onPostCommitFiberRoot(Fa,r)}catch{}return!0}finally{Lt.p=i,at.T=l,Nv(t,e)}}function Xh(t,e,n){e=Nn(n,e),e=hf(t.stateNode,e,2),t=Bl(t,e,2),t!==null&&(Ga(t,2),Zn(t))}function Ft(t,e,n){if(t.tag===3)Xh(t,t,n);else for(;e!==null;){if(e.tag===3){Xh(e,t,n);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Hl===null||!Hl.has(l))){t=Nn(n,t),n=Gy(2),l=Bl(e,n,2),l!==null&&(Xy(n,l,e,t),Ga(l,2),Zn(l));break}}e=e.return}}function zc(t,e,n){var l=t.pingCache;if(l===null){l=t.pingCache=new qS;var i=new Set;l.set(e,i)}else i=l.get(e),i===void 0&&(i=new Set,l.set(e,i));i.has(n)||(yd=!0,i.add(n),t=FS.bind(null,t,e,n),e.then(t,t))}function FS(t,e,n){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Xt===t&&(At&n)===n&&(re===4||re===3&&(At&62914560)===At&&300>Gn()-bd?(Ht&2)===0&&Rr(t,0):vd|=n,Ar===At&&(Ar=0)),Zn(t)}function Mv(t,e){e===0&&(e=Eg()),t=_r(t,e),t!==null&&(Ga(t,e),Zn(t))}function QS(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Mv(t,n)}function GS(t,e){var n=0;switch(t.tag){case 13:var l=t.stateNode,i=t.memoizedState;i!==null&&(n=i.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(_(314))}l!==null&&l.delete(e),Mv(t,n)}function XS(t,e){return Bf(t,e)}var Rs=null,Wi=null,Tf=!1,Ms=!1,Lc=!1,yi=0;function Zn(t){t!==Wi&&t.next===null&&(Wi===null?Rs=Wi=t:Wi=Wi.next=t),Ms=!0,Tf||(Tf=!0,ZS())}function no(t,e){if(!Lc&&Ms){Lc=!0;do for(var n=!1,l=Rs;l!==null;){if(!e)if(t!==0){var i=l.pendingLanes;if(i===0)var r=0;else{var a=l.suspendedLanes,o=l.pingedLanes;r=(1<<31-hn(42|t)+1)-1,r&=i&~(a&~o),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Ph(l,r))}else r=At,r=Hs(l,l===Xt?r:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(r&3)===0||Qa(l,r)||(n=!0,Ph(l,r));l=l.next}while(n);Lc=!1}}function PS(){Dv()}function Dv(){Ms=Tf=!1;var t=0;yi!==0&&(ew()&&(t=yi),yi=0);for(var e=Gn(),n=null,l=Rs;l!==null;){var i=l.next,r=Ov(l,e);r===0?(l.next=null,n===null?Rs=i:n.next=i,i===null&&(Wi=n)):(n=l,(t!==0||(r&3)!==0)&&(Ms=!0)),l=i}no(t,!1)}function Ov(t,e){for(var n=t.suspendedLanes,l=t.pingedLanes,i=t.expirationTimes,r=t.pendingLanes&-62914561;0<r;){var a=31-hn(r),o=1<<a,s=i[a];s===-1?((o&n)===0||(o&l)!==0)&&(i[a]=xk(o,e)):s<=e&&(t.expiredLanes|=o),r&=~o}if(e=Xt,n=At,n=Hs(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,n===0||t===e&&(Bt===2||Bt===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&sc(l),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||Qa(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(l!==null&&sc(l),qf(n)){case 2:case 8:n=Sg;break;case 32:n=fs;break;case 268435456:n=wg;break;default:n=fs}return l=_v.bind(null,t),n=Bf(n,l),t.callbackPriority=e,t.callbackNode=n,e}return l!==null&&l!==null&&sc(l),t.callbackPriority=2,t.callbackNode=null,2}function _v(t,e){if(Be!==0&&Be!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Ks(!0)&&t.callbackNode!==n)return null;var l=At;return l=Hs(t,t===Xt?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(bv(t,l,e),Ov(t,Gn()),t.callbackNode!=null&&t.callbackNode===n?_v.bind(null,t):null)}function Ph(t,e){if(Ks())return null;bv(t,e,!0)}function ZS(){lw(function(){(Ht&6)!==0?Bf(kg,PS):Dv()})}function kd(){return yi===0&&(yi=Tg()),yi}function Zh(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Ko(""+t)}function Kh(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function KS(t,e,n,l,i){if(e==="submit"&&n&&n.stateNode===i){var r=Zh((i[an]||null).action),a=l.submitter;a&&(e=(e=a[an]||null)?Zh(e.formAction):a.getAttribute("formAction"),e!==null&&(r=e,a=null));var o=new qs("action","action",null,l,i);t.push({event:o,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(yi!==0){var s=a?Kh(i,a):new FormData(i);mf(n,{pending:!0,data:s,method:i.method,action:r},null,s)}}else typeof r=="function"&&(o.preventDefault(),s=a?Kh(i,a):new FormData(i),mf(n,{pending:!0,data:s,method:i.method,action:r},r,s))},currentTarget:i}]})}}for(Fo=0;Fo<tf.length;Fo++)Qo=tf[Fo],Jh=Qo.toLowerCase(),$h=Qo[0].toUpperCase()+Qo.slice(1),Bn(Jh,"on"+$h);var Qo,Jh,$h,Fo;Bn(Pg,"onAnimationEnd");Bn(Zg,"onAnimationIteration");Bn(Kg,"onAnimationStart");Bn("dblclick","onDoubleClick");Bn("focusin","onFocus");Bn("focusout","onBlur");Bn(hS,"onTransitionRun");Bn(gS,"onTransitionStart");Bn(yS,"onTransitionCancel");Bn(Jg,"onTransitionEnd");kr("onMouseEnter",["mouseout","mouseover"]);kr("onMouseLeave",["mouseout","mouseover"]);kr("onPointerEnter",["pointerout","pointerover"]);kr("onPointerLeave",["pointerout","pointerover"]);Si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Si("onBeforeInput",["compositionend","keypress","textInput","paste"]);Si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ua="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(" "),JS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ua));function zv(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var l=t[n],i=l.event;l=l.listeners;t:{var r=void 0;if(e)for(var a=l.length-1;0<=a;a--){var o=l[a],s=o.instance,u=o.currentTarget;if(o=o.listener,s!==r&&i.isPropagationStopped())break t;r=o,i.currentTarget=u;try{r(i)}catch(f){ws(f)}i.currentTarget=null,r=s}else for(a=0;a<l.length;a++){if(o=l[a],s=o.instance,u=o.currentTarget,o=o.listener,s!==r&&i.isPropagationStopped())break t;r=o,i.currentTarget=u;try{r(i)}catch(f){ws(f)}i.currentTarget=null,r=s}}}}function vt(t,e){var n=e[Xc];n===void 0&&(n=e[Xc]=new Set);var l=t+"__bubble";n.has(l)||(Lv(e,t,2,!1),n.add(l))}function Uc(t,e,n){var l=0;e&&(l|=4),Lv(n,t,l,e)}var Go="_reactListening"+Math.random().toString(36).slice(2);function Sd(t){if(!t[Go]){t[Go]=!0,Rg.forEach(function(n){n!=="selectionchange"&&(JS.has(n)||Uc(n,!1,t),Uc(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Go]||(e[Go]=!0,Uc("selectionchange",!1,e))}}function Lv(t,e,n,l){switch(Xv(e)){case 2:var i=Tw;break;case 8:i=Ew;break;default:i=Cd}n=i.bind(null,e,n,t),i=void 0,!Jc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(i=!0),l?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function Bc(t,e,n,l,i){var r=l;if((e&1)===0&&(e&2)===0&&l!==null)t:for(;;){if(l===null)return;var a=l.tag;if(a===3||a===4){var o=l.stateNode.containerInfo;if(o===i)break;if(a===4)for(a=l.return;a!==null;){var s=a.tag;if((s===3||s===4)&&a.stateNode.containerInfo===i)return;a=a.return}for(;o!==null;){if(a=nr(o),a===null)return;if(s=a.tag,s===5||s===6||s===26||s===27){l=r=a;continue t}o=o.parentNode}}l=l.return}Bg(function(){var u=r,f=Yf(n),c=[];t:{var m=$g.get(t);if(m!==void 0){var d=qs,g=t;switch(t){case"keypress":if($o(n)===0)break t;case"keydown":case"keyup":d=Xk;break;case"focusin":g="focus",d=gc;break;case"focusout":g="blur",d=gc;break;case"beforeblur":case"afterblur":d=gc;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":d=ih;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=Lk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Kk;break;case Pg:case Zg:case Kg:d=Hk;break;case Jg:d=$k;break;case"scroll":case"scrollend":d=_k;break;case"wheel":d=tS;break;case"copy":case"cut":case"paste":d=Ik;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=ah;break;case"toggle":case"beforetoggle":d=nS}var x=(e&4)!==0,C=!x&&(t==="scroll"||t==="scrollend"),h=x?m!==null?m+"Capture":null:m;x=[];for(var p=u,y;p!==null;){var T=p;if(y=T.stateNode,T=T.tag,T!==5&&T!==26&&T!==27||y===null||h===null||(T=Ma(p,h),T!=null&&x.push(Ba(p,T,y))),C)break;p=p.return}0<x.length&&(m=new d(m,g,null,n,f),c.push({event:m,listeners:x}))}}if((e&7)===0){t:{if(m=t==="mouseover"||t==="pointerover",d=t==="mouseout"||t==="pointerout",m&&n!==Kc&&(g=n.relatedTarget||n.fromElement)&&(nr(g)||g[Dr]))break t;if((d||m)&&(m=f.window===f?f:(m=f.ownerDocument)?m.defaultView||m.parentWindow:window,d?(g=n.relatedTarget||n.toElement,d=u,g=g?nr(g):null,g!==null&&(C=Va(g),x=g.tag,g!==C||x!==5&&x!==27&&x!==6)&&(g=null)):(d=null,g=u),d!==g)){if(x=ih,T="onMouseLeave",h="onMouseEnter",p="mouse",(t==="pointerout"||t==="pointerover")&&(x=ah,T="onPointerLeave",h="onPointerEnter",p="pointer"),C=d==null?m:ma(d),y=g==null?m:ma(g),m=new x(T,p+"leave",d,n,f),m.target=C,m.relatedTarget=y,T=null,nr(f)===u&&(x=new x(h,p+"enter",g,n,f),x.target=y,x.relatedTarget=C,T=x),C=T,d&&g)e:{for(x=d,h=g,p=0,y=x;y;y=Ki(y))p++;for(y=0,T=h;T;T=Ki(T))y++;for(;0<p-y;)x=Ki(x),p--;for(;0<y-p;)h=Ki(h),y--;for(;p--;){if(x===h||h!==null&&x===h.alternate)break e;x=Ki(x),h=Ki(h)}x=null}else x=null;d!==null&&Wh(c,m,d,x,!1),g!==null&&C!==null&&Wh(c,C,g,x,!0)}}t:{if(m=u?ma(u):window,d=m.nodeName&&m.nodeName.toLowerCase(),d==="select"||d==="input"&&m.type==="file")var N=ch;else if(uh(m))if(Vg)N=dS;else{N=cS;var E=uS}else d=m.nodeName,!d||d.toLowerCase()!=="input"||m.type!=="checkbox"&&m.type!=="radio"?u&&jf(u.elementType)&&(N=ch):N=fS;if(N&&(N=N(t,u))){Yg(c,N,n,f);break t}E&&E(t,m,u),t==="focusout"&&u&&m.type==="number"&&u.memoizedProps.value!=null&&Zc(m,"number",m.value)}switch(E=u?ma(u):window,t){case"focusin":(uh(E)||E.contentEditable==="true")&&(rr=E,$c=u,ya=null);break;case"focusout":ya=$c=rr=null;break;case"mousedown":Wc=!0;break;case"contextmenu":case"mouseup":case"dragend":Wc=!1,ph(c,n,f);break;case"selectionchange":if(pS)break;case"keydown":case"keyup":ph(c,n,f)}var M;if(Qf)t:{switch(t){case"compositionstart":var z="onCompositionStart";break t;case"compositionend":z="onCompositionEnd";break t;case"compositionupdate":z="onCompositionUpdate";break t}z=void 0}else ir?Ig(t,n)&&(z="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(qg&&n.locale!=="ko"&&(ir||z!=="onCompositionStart"?z==="onCompositionEnd"&&ir&&(M=Hg()):(Ol=f,Vf="value"in Ol?Ol.value:Ol.textContent,ir=!0)),E=Ds(u,z),0<E.length&&(z=new rh(z,t,null,n,f),c.push({event:z,listeners:E}),M?z.data=M:(M=jg(n),M!==null&&(z.data=M)))),(M=iS?rS(t,n):aS(t,n))&&(z=Ds(u,"onBeforeInput"),0<z.length&&(E=new rh("onBeforeInput","beforeinput",null,n,f),c.push({event:E,listeners:z}),E.data=M)),KS(c,t,u,n,f)}zv(c,e)})}function Ba(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Ds(t,e){for(var n=e+"Capture",l=[];t!==null;){var i=t,r=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||r===null||(i=Ma(t,n),i!=null&&l.unshift(Ba(t,i,r)),i=Ma(t,e),i!=null&&l.push(Ba(t,i,r))),t.tag===3)return l;t=t.return}return[]}function Ki(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Wh(t,e,n,l,i){for(var r=e._reactName,a=[];n!==null&&n!==l;){var o=n,s=o.alternate,u=o.stateNode;if(o=o.tag,s!==null&&s===l)break;o!==5&&o!==26&&o!==27||u===null||(s=u,i?(u=Ma(n,r),u!=null&&a.unshift(Ba(n,u,s))):i||(u=Ma(n,r),u!=null&&a.push(Ba(n,u,s)))),n=n.return}a.length!==0&&t.push({event:e,listeners:a})}var $S=/\r\n?/g,WS=/\u0000|\uFFFD/g;function tg(t){return(typeof t=="string"?t:""+t).replace($S,`
9
+ `).replace(WS,"")}function Uv(t,e){return e=tg(e),tg(t)===e}function Js(){}function jt(t,e,n,l,i,r){switch(n){case"children":typeof l=="string"?e==="body"||e==="textarea"&&l===""||Sr(t,l):(typeof l=="number"||typeof l=="bigint")&&e!=="body"&&Sr(t,""+l);break;case"className":Lo(t,"class",l);break;case"tabIndex":Lo(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Lo(t,n,l);break;case"style":Ug(t,l,r);break;case"data":if(e!=="object"){Lo(t,"data",l);break}case"src":case"href":if(l===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(n);break}l=Ko(""+l),t.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(n,"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 r=="function"&&(n==="formAction"?(e!=="input"&&jt(t,e,"name",i.name,i,null),jt(t,e,"formEncType",i.formEncType,i,null),jt(t,e,"formMethod",i.formMethod,i,null),jt(t,e,"formTarget",i.formTarget,i,null)):(jt(t,e,"encType",i.encType,i,null),jt(t,e,"method",i.method,i,null),jt(t,e,"target",i.target,i,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(n);break}l=Ko(""+l),t.setAttribute(n,l);break;case"onClick":l!=null&&(t.onclick=Js);break;case"onScroll":l!=null&&vt("scroll",t);break;case"onScrollEnd":l!=null&&vt("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(_(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(_(60));t.innerHTML=n}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}n=Ko(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,""+l):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":l===!0?t.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,l):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(n,l):t.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(n):t.setAttribute(n,l);break;case"popover":vt("beforetoggle",t),vt("toggle",t),Zo(t,"popover",l);break;case"xlinkActuate":nl(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":nl(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":nl(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":nl(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":nl(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":nl(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":nl(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":nl(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":nl(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Zo(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Dk.get(n)||n,Zo(t,n,l))}}function Ef(t,e,n,l,i,r){switch(n){case"style":Ug(t,l,r);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(_(61));if(n=l.__html,n!=null){if(i.children!=null)throw Error(_(60));t.innerHTML=n}}break;case"children":typeof l=="string"?Sr(t,l):(typeof l=="number"||typeof l=="bigint")&&Sr(t,""+l);break;case"onScroll":l!=null&&vt("scroll",t);break;case"onScrollEnd":l!=null&&vt("scrollend",t);break;case"onClick":l!=null&&(t.onclick=Js);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mg.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),e=n.slice(2,i?n.length-7:void 0),r=t[an]||null,r=r!=null?r[n]:null,typeof r=="function"&&t.removeEventListener(e,r,i),typeof l=="function")){typeof r!="function"&&r!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,l,i);break t}n in t?t[n]=l:l===!0?t.setAttribute(n,""):Zo(t,n,l)}}}function He(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":vt("error",t),vt("load",t);var l=!1,i=!1,r;for(r in n)if(n.hasOwnProperty(r)){var a=n[r];if(a!=null)switch(r){case"src":l=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(_(137,e));default:jt(t,e,r,a,n,null)}}i&&jt(t,e,"srcSet",n.srcSet,n,null),l&&jt(t,e,"src",n.src,n,null);return;case"input":vt("invalid",t);var o=r=a=i=null,s=null,u=null;for(l in n)if(n.hasOwnProperty(l)){var f=n[l];if(f!=null)switch(l){case"name":i=f;break;case"type":a=f;break;case"checked":s=f;break;case"defaultChecked":u=f;break;case"value":r=f;break;case"defaultValue":o=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(_(137,e));break;default:jt(t,e,l,f,n,null)}}_g(t,r,o,s,u,a,i,!1),ds(t);return;case"select":vt("invalid",t),l=a=r=null;for(i in n)if(n.hasOwnProperty(i)&&(o=n[i],o!=null))switch(i){case"value":r=o;break;case"defaultValue":a=o;break;case"multiple":l=o;default:jt(t,e,i,o,n,null)}e=r,n=a,t.multiple=!!l,e!=null?mr(t,!!l,e,!1):n!=null&&mr(t,!!l,n,!0);return;case"textarea":vt("invalid",t),r=i=l=null;for(a in n)if(n.hasOwnProperty(a)&&(o=n[a],o!=null))switch(a){case"value":l=o;break;case"defaultValue":i=o;break;case"children":r=o;break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(_(91));break;default:jt(t,e,a,o,n,null)}Lg(t,l,i,r),ds(t);return;case"option":for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:jt(t,e,s,l,n,null)}return;case"dialog":vt("beforetoggle",t),vt("toggle",t),vt("cancel",t),vt("close",t);break;case"iframe":case"object":vt("load",t);break;case"video":case"audio":for(l=0;l<Ua.length;l++)vt(Ua[l],t);break;case"image":vt("error",t),vt("load",t);break;case"details":vt("toggle",t);break;case"embed":case"source":case"link":vt("error",t),vt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(l=n[u],l!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(_(137,e));default:jt(t,e,u,l,n,null)}return;default:if(jf(e)){for(f in n)n.hasOwnProperty(f)&&(l=n[f],l!==void 0&&Ef(t,e,f,l,n,void 0));return}}for(o in n)n.hasOwnProperty(o)&&(l=n[o],l!=null&&jt(t,e,o,l,n,null))}function tw(t,e,n,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,r=null,a=null,o=null,s=null,u=null,f=null;for(d in n){var c=n[d];if(n.hasOwnProperty(d)&&c!=null)switch(d){case"checked":break;case"value":break;case"defaultValue":s=c;default:l.hasOwnProperty(d)||jt(t,e,d,null,l,c)}}for(var m in l){var d=l[m];if(c=n[m],l.hasOwnProperty(m)&&(d!=null||c!=null))switch(m){case"type":r=d;break;case"name":i=d;break;case"checked":u=d;break;case"defaultChecked":f=d;break;case"value":a=d;break;case"defaultValue":o=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(_(137,e));break;default:d!==c&&jt(t,e,m,d,l,c)}}Pc(t,a,o,s,u,f,r,i);return;case"select":d=a=o=m=null;for(r in n)if(s=n[r],n.hasOwnProperty(r)&&s!=null)switch(r){case"value":break;case"multiple":d=s;default:l.hasOwnProperty(r)||jt(t,e,r,null,l,s)}for(i in l)if(r=l[i],s=n[i],l.hasOwnProperty(i)&&(r!=null||s!=null))switch(i){case"value":m=r;break;case"defaultValue":o=r;break;case"multiple":a=r;default:r!==s&&jt(t,e,i,r,l,s)}e=o,n=a,l=d,m!=null?mr(t,!!n,m,!1):!!l!=!!n&&(e!=null?mr(t,!!n,e,!0):mr(t,!!n,n?[]:"",!1));return;case"textarea":d=m=null;for(o in n)if(i=n[o],n.hasOwnProperty(o)&&i!=null&&!l.hasOwnProperty(o))switch(o){case"value":break;case"children":break;default:jt(t,e,o,null,l,i)}for(a in l)if(i=l[a],r=n[a],l.hasOwnProperty(a)&&(i!=null||r!=null))switch(a){case"value":m=i;break;case"defaultValue":d=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(_(91));break;default:i!==r&&jt(t,e,a,i,l,r)}zg(t,m,d);return;case"option":for(var g in n)if(m=n[g],n.hasOwnProperty(g)&&m!=null&&!l.hasOwnProperty(g))switch(g){case"selected":t.selected=!1;break;default:jt(t,e,g,null,l,m)}for(s in l)if(m=l[s],d=n[s],l.hasOwnProperty(s)&&m!==d&&(m!=null||d!=null))switch(s){case"selected":t.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:jt(t,e,s,m,l,d)}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 x in n)m=n[x],n.hasOwnProperty(x)&&m!=null&&!l.hasOwnProperty(x)&&jt(t,e,x,null,l,m);for(u in l)if(m=l[u],d=n[u],l.hasOwnProperty(u)&&m!==d&&(m!=null||d!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(_(137,e));break;default:jt(t,e,u,m,l,d)}return;default:if(jf(e)){for(var C in n)m=n[C],n.hasOwnProperty(C)&&m!==void 0&&!l.hasOwnProperty(C)&&Ef(t,e,C,void 0,l,m);for(f in l)m=l[f],d=n[f],!l.hasOwnProperty(f)||m===d||m===void 0&&d===void 0||Ef(t,e,f,m,l,d);return}}for(var h in n)m=n[h],n.hasOwnProperty(h)&&m!=null&&!l.hasOwnProperty(h)&&jt(t,e,h,null,l,m);for(c in l)m=l[c],d=n[c],!l.hasOwnProperty(c)||m===d||m==null&&d==null||jt(t,e,c,m,l,d)}var Cf=null,Af=null;function Os(t){return t.nodeType===9?t:t.ownerDocument}function eg(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Bv(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Nf(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Hc=null;function ew(){var t=window.event;return t&&t.type==="popstate"?t===Hc?!1:(Hc=t,!0):(Hc=null,!1)}var Hv=typeof setTimeout=="function"?setTimeout:void 0,nw=typeof clearTimeout=="function"?clearTimeout:void 0,ng=typeof Promise=="function"?Promise:void 0,lw=typeof queueMicrotask=="function"?queueMicrotask:typeof ng<"u"?function(t){return ng.resolve(null).then(t).catch(iw)}:Hv;function iw(t){setTimeout(function(){throw t})}function Xl(t){return t==="head"}function lg(t,e){var n=e,l=0,i=0;do{var r=n.nextSibling;if(t.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(0<l&&8>l){n=l;var a=t.ownerDocument;if(n&1&&Na(a.documentElement),n&2&&Na(a.body),n&4)for(n=a.head,Na(n),a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Xa]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&a.rel.toLowerCase()==="stylesheet"||n.removeChild(a),a=o}}if(i===0){t.removeChild(r),Ya(e);return}i--}else n==="$"||n==="$?"||n==="$!"?i++:l=n.charCodeAt(0)-48;else l=0;n=r}while(n);Ya(e)}function Rf(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Rf(n),If(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function rw(t,e,n,l){for(;t.nodeType===1;){var i=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[Xa])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(r=t.getAttribute("rel"),r==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(r!==i.rel||t.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||t.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||t.getAttribute("title")!==(i.title==null?null:i.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(r=t.getAttribute("src"),(r!==(i.src==null?null:i.src)||t.getAttribute("type")!==(i.type==null?null:i.type)||t.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&r&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var r=i.name==null?null:""+i.name;if(i.type==="hidden"&&t.getAttribute("name")===r)return t}else return t;if(t=Un(t.nextSibling),t===null)break}return null}function aw(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=Un(t.nextSibling),t===null))return null;return t}function Mf(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState==="complete"}function ow(t,e){var n=t.ownerDocument;if(t.data!=="$?"||n.readyState==="complete")e();else{var l=function(){e(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function Un(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="F!"||e==="F")break;if(e==="/$")return null}}return t}var Df=null;function ig(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"){if(e===0)return t;e--}else n==="/$"&&e++}t=t.previousSibling}return null}function qv(t,e,n){switch(e=Os(n),t){case"html":if(t=e.documentElement,!t)throw Error(_(452));return t;case"head":if(t=e.head,!t)throw Error(_(453));return t;case"body":if(t=e.body,!t)throw Error(_(454));return t;default:throw Error(_(451))}}function Na(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);If(t)}var Dn=new Map,rg=new Set;function _s(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var yl=Lt.d;Lt.d={f:sw,r:uw,D:cw,C:fw,L:dw,m:mw,X:hw,S:pw,M:gw};function sw(){var t=yl.f(),e=Ps();return t||e}function uw(t){var e=Or(t);e!==null&&e.tag===5&&e.type==="form"?Oy(e):yl.r(t)}var Lr=typeof document>"u"?null:document;function Iv(t,e,n){var l=Lr;if(l&&typeof e=="string"&&e){var i=An(e);i='link[rel="'+t+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),rg.has(i)||(rg.add(i),t={rel:t,crossOrigin:n,href:e},l.querySelector(i)===null&&(e=l.createElement("link"),He(e,"link",t),Me(e),l.head.appendChild(e)))}}function cw(t){yl.D(t),Iv("dns-prefetch",t,null)}function fw(t,e){yl.C(t,e),Iv("preconnect",t,e)}function dw(t,e,n){yl.L(t,e,n);var l=Lr;if(l&&t&&e){var i='link[rel="preload"][as="'+An(e)+'"]';e==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+An(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+An(n.imageSizes)+'"]')):i+='[href="'+An(t)+'"]';var r=i;switch(e){case"style":r=Mr(t);break;case"script":r=Ur(t)}Dn.has(r)||(t=Zt({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Dn.set(r,t),l.querySelector(i)!==null||e==="style"&&l.querySelector(lo(r))||e==="script"&&l.querySelector(io(r))||(e=l.createElement("link"),He(e,"link",t),Me(e),l.head.appendChild(e)))}}function mw(t,e){yl.m(t,e);var n=Lr;if(n&&t){var l=e&&typeof e.as=="string"?e.as:"script",i='link[rel="modulepreload"][as="'+An(l)+'"][href="'+An(t)+'"]',r=i;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Ur(t)}if(!Dn.has(r)&&(t=Zt({rel:"modulepreload",href:t},e),Dn.set(r,t),n.querySelector(i)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(io(r)))return}l=n.createElement("link"),He(l,"link",t),Me(l),n.head.appendChild(l)}}}function pw(t,e,n){yl.S(t,e,n);var l=Lr;if(l&&t){var i=dr(l).hoistableStyles,r=Mr(t);e=e||"default";var a=i.get(r);if(!a){var o={loading:0,preload:null};if(a=l.querySelector(lo(r)))o.loading=5;else{t=Zt({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Dn.get(r))&&wd(t,n);var s=a=l.createElement("link");Me(s),He(s,"link",t),s._p=new Promise(function(u,f){s.onload=u,s.onerror=f}),s.addEventListener("load",function(){o.loading|=1}),s.addEventListener("error",function(){o.loading|=2}),o.loading|=4,rs(a,e,l)}a={type:"stylesheet",instance:a,count:1,state:o},i.set(r,a)}}}function hw(t,e){yl.X(t,e);var n=Lr;if(n&&t){var l=dr(n).hoistableScripts,i=Ur(t),r=l.get(i);r||(r=n.querySelector(io(i)),r||(t=Zt({src:t,async:!0},e),(e=Dn.get(i))&&Td(t,e),r=n.createElement("script"),Me(r),He(r,"link",t),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function gw(t,e){yl.M(t,e);var n=Lr;if(n&&t){var l=dr(n).hoistableScripts,i=Ur(t),r=l.get(i);r||(r=n.querySelector(io(i)),r||(t=Zt({src:t,async:!0,type:"module"},e),(e=Dn.get(i))&&Td(t,e),r=n.createElement("script"),Me(r),He(r,"link",t),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},l.set(i,r))}}function ag(t,e,n,l){var i=(i=Ll.current)?_s(i):null;if(!i)throw Error(_(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Mr(n.href),n=dr(i).hoistableStyles,l=n.get(e),l||(l={type:"style",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Mr(n.href);var r=dr(i).hoistableStyles,a=r.get(t);if(a||(i=i.ownerDocument||i,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(t,a),(r=i.querySelector(lo(t)))&&!r._p&&(a.instance=r,a.state.loading=5),Dn.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Dn.set(t,n),r||yw(i,t,n,a.state))),e&&l===null)throw Error(_(528,""));return a}if(e&&l!==null)throw Error(_(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Ur(n),n=dr(i).hoistableScripts,l=n.get(e),l||(l={type:"script",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(_(444,t))}}function Mr(t){return'href="'+An(t)+'"'}function lo(t){return'link[rel="stylesheet"]['+t+"]"}function jv(t){return Zt({},t,{"data-precedence":t.precedence,precedence:null})}function yw(t,e,n,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),He(e,"link",n),Me(e),t.head.appendChild(e))}function Ur(t){return'[src="'+An(t)+'"]'}function io(t){return"script[async]"+t}function og(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+An(n.href)+'"]');if(l)return e.instance=l,Me(l),l;var i=Zt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Me(l),He(l,"style",i),rs(l,n.precedence,t),e.instance=l;case"stylesheet":i=Mr(n.href);var r=t.querySelector(lo(i));if(r)return e.state.loading|=4,e.instance=r,Me(r),r;l=jv(n),(i=Dn.get(i))&&wd(l,i),r=(t.ownerDocument||t).createElement("link"),Me(r);var a=r;return a._p=new Promise(function(o,s){a.onload=o,a.onerror=s}),He(r,"link",l),e.state.loading|=4,rs(r,n.precedence,t),e.instance=r;case"script":return r=Ur(n.src),(i=t.querySelector(io(r)))?(e.instance=i,Me(i),i):(l=n,(i=Dn.get(r))&&(l=Zt({},n),Td(l,i)),t=t.ownerDocument||t,i=t.createElement("script"),Me(i),He(i,"link",l),t.head.appendChild(i),e.instance=i);case"void":return null;default:throw Error(_(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(l=e.instance,e.state.loading|=4,rs(l,n.precedence,t));return e.instance}function rs(t,e,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=l.length?l[l.length-1]:null,r=i,a=0;a<l.length;a++){var o=l[a];if(o.dataset.precedence===e)r=o;else if(r!==i)break}r?r.parentNode.insertBefore(t,r.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function wd(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function Td(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var as=null;function sg(t,e,n){if(as===null){var l=new Map,i=as=new Map;i.set(n,l)}else i=as,l=i.get(n),l||(l=new Map,i.set(n,l));if(l.has(t))return l;for(l.set(t,null),n=n.getElementsByTagName(t),i=0;i<n.length;i++){var r=n[i];if(!(r[Xa]||r[je]||t==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var a=r.getAttribute(e)||"";a=t+a;var o=l.get(a);o?o.push(r):l.set(a,[r])}}return l}function ug(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function vw(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Yv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}var Ha=null;function bw(){}function xw(t,e,n){if(Ha===null)throw Error(_(475));var l=Ha;if(e.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(e.state.loading&4)===0){if(e.instance===null){var i=Mr(n.href),r=t.querySelector(lo(i));if(r){t=r._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(l.count++,l=zs.bind(l),t.then(l,l)),e.state.loading|=4,e.instance=r,Me(r);return}r=t.ownerDocument||t,n=jv(n),(i=Dn.get(i))&&wd(n,i),r=r.createElement("link"),Me(r);var a=r;a._p=new Promise(function(o,s){a.onload=o,a.onerror=s}),He(r,"link",n),e.instance=r}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(e,t),(t=e.state.preload)&&(e.state.loading&3)===0&&(l.count++,e=zs.bind(l),t.addEventListener("load",e),t.addEventListener("error",e))}}function kw(){if(Ha===null)throw Error(_(475));var t=Ha;return t.stylesheets&&t.count===0&&Of(t,t.stylesheets),0<t.count?function(e){var n=setTimeout(function(){if(t.stylesheets&&Of(t,t.stylesheets),t.unsuspend){var l=t.unsuspend;t.unsuspend=null,l()}},6e4);return t.unsuspend=e,function(){t.unsuspend=null,clearTimeout(n)}}:null}function zs(){if(this.count--,this.count===0){if(this.stylesheets)Of(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var Ls=null;function Of(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Ls=new Map,e.forEach(Sw,t),Ls=null,zs.call(t))}function Sw(t,e){if(!(e.state.loading&4)){var n=Ls.get(t);if(n)var l=n.get(null);else{n=new Map,Ls.set(t,n);for(var i=t.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<i.length;r++){var a=i[r];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),l=a)}l&&n.set(null,l)}i=e.instance,a=i.getAttribute("data-precedence"),r=n.get(a)||l,r===l&&n.set(null,i),n.set(a,i),this.count++,l=zs.bind(this),i.addEventListener("load",l),i.addEventListener("error",l),r?r.parentNode.insertBefore(i,r.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(i,t.firstChild)),e.state.loading|=4}}var qa={$$typeof:al,Provider:null,Consumer:null,_currentValue:fi,_currentValue2:fi,_threadCount:0};function ww(t,e,n,l,i,r,a,o){this.tag=1,this.containerInfo=t,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=uc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=uc(0),this.hiddenUpdates=uc(null),this.identifierPrefix=l,this.onUncaughtError=i,this.onCaughtError=r,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=o,this.incompleteTransitions=new Map}function Vv(t,e,n,l,i,r,a,o,s,u,f,c){return t=new ww(t,e,n,a,o,s,u,c),e=1,r===!0&&(e|=24),r=mn(3,null,null,e),t.current=r,r.stateNode=t,e=$f(),e.refCount++,t.pooledCache=e,e.refCount++,r.memoizedState={element:l,isDehydrated:n,cache:e},td(r),t}function Fv(t){return t?(t=sr,t):sr}function Qv(t,e,n,l,i,r){i=Fv(i),l.context===null?l.context=i:l.pendingContext=i,l=Ul(e),l.payload={element:n},r=r===void 0?null:r,r!==null&&(l.callback=r),n=Bl(t,l,e),n!==null&&(yn(n,t,e),xa(n,t,e))}function cg(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function Ed(t,e){cg(t,e),(t=t.alternate)&&cg(t,e)}function Gv(t){if(t.tag===13){var e=_r(t,67108864);e!==null&&yn(e,t,67108864),Ed(t,67108864)}}var Us=!0;function Tw(t,e,n,l){var i=at.T;at.T=null;var r=Lt.p;try{Lt.p=2,Cd(t,e,n,l)}finally{Lt.p=r,at.T=i}}function Ew(t,e,n,l){var i=at.T;at.T=null;var r=Lt.p;try{Lt.p=8,Cd(t,e,n,l)}finally{Lt.p=r,at.T=i}}function Cd(t,e,n,l){if(Us){var i=_f(l);if(i===null)Bc(t,e,l,Bs,n),fg(t,l);else if(Aw(i,t,e,n,l))l.stopPropagation();else if(fg(t,l),e&4&&-1<Cw.indexOf(t)){for(;i!==null;){var r=Or(i);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var a=si(r.pendingLanes);if(a!==0){var o=r;for(o.pendingLanes|=2,o.entangledLanes|=2;a;){var s=1<<31-hn(a);o.entanglements[1]|=s,a&=~s}Zn(r),(Ht&6)===0&&(As=Gn()+500,no(0,!1))}}break;case 13:o=_r(r,2),o!==null&&yn(o,r,2),Ps(),Ed(r,2)}if(r=_f(l),r===null&&Bc(t,e,l,Bs,n),r===i)break;i=r}i!==null&&l.stopPropagation()}else Bc(t,e,l,null,n)}}function _f(t){return t=Yf(t),Ad(t)}var Bs=null;function Ad(t){if(Bs=null,t=nr(t),t!==null){var e=Va(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=yg(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Bs=t,null}function Xv(t){switch(t){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(mk()){case kg:return 2;case Sg:return 8;case fs:case pk:return 32;case wg:return 268435456;default:return 32}default:return 32}}var zf=!1,Il=null,jl=null,Yl=null,Ia=new Map,ja=new Map,Ml=[],Cw="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 fg(t,e){switch(t){case"focusin":case"focusout":Il=null;break;case"dragenter":case"dragleave":jl=null;break;case"mouseover":case"mouseout":Yl=null;break;case"pointerover":case"pointerout":Ia.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ja.delete(e.pointerId)}}function ua(t,e,n,l,i,r){return t===null||t.nativeEvent!==r?(t={blockedOn:e,domEventName:n,eventSystemFlags:l,nativeEvent:r,targetContainers:[i]},e!==null&&(e=Or(e),e!==null&&Gv(e)),t):(t.eventSystemFlags|=l,e=t.targetContainers,i!==null&&e.indexOf(i)===-1&&e.push(i),t)}function Aw(t,e,n,l,i){switch(e){case"focusin":return Il=ua(Il,t,e,n,l,i),!0;case"dragenter":return jl=ua(jl,t,e,n,l,i),!0;case"mouseover":return Yl=ua(Yl,t,e,n,l,i),!0;case"pointerover":var r=i.pointerId;return Ia.set(r,ua(Ia.get(r)||null,t,e,n,l,i)),!0;case"gotpointercapture":return r=i.pointerId,ja.set(r,ua(ja.get(r)||null,t,e,n,l,i)),!0}return!1}function Pv(t){var e=nr(t.target);if(e!==null){var n=Va(e);if(n!==null){if(e=n.tag,e===13){if(e=yg(n),e!==null){t.blockedOn=e,Sk(t.priority,function(){if(n.tag===13){var l=gn();l=Hf(l);var i=_r(n,l);i!==null&&yn(i,n,l),Ed(n,l)}});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function os(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=_f(t.nativeEvent);if(n===null){n=t.nativeEvent;var l=new n.constructor(n.type,n);Kc=l,n.target.dispatchEvent(l),Kc=null}else return e=Or(n),e!==null&&Gv(e),t.blockedOn=n,!1;e.shift()}return!0}function dg(t,e,n){os(t)&&n.delete(e)}function Nw(){zf=!1,Il!==null&&os(Il)&&(Il=null),jl!==null&&os(jl)&&(jl=null),Yl!==null&&os(Yl)&&(Yl=null),Ia.forEach(dg),ja.forEach(dg)}function Xo(t,e){t.blockedOn===e&&(t.blockedOn=null,zf||(zf=!0,Se.unstable_scheduleCallback(Se.unstable_NormalPriority,Nw)))}var Po=null;function mg(t){Po!==t&&(Po=t,Se.unstable_scheduleCallback(Se.unstable_NormalPriority,function(){Po===t&&(Po=null);for(var e=0;e<t.length;e+=3){var n=t[e],l=t[e+1],i=t[e+2];if(typeof l!="function"){if(Ad(l||n)===null)continue;break}var r=Or(n);r!==null&&(t.splice(e,3),e-=3,mf(r,{pending:!0,data:i,method:n.method,action:l},l,i))}}))}function Ya(t){function e(s){return Xo(s,t)}Il!==null&&Xo(Il,t),jl!==null&&Xo(jl,t),Yl!==null&&Xo(Yl,t),Ia.forEach(e),ja.forEach(e);for(var n=0;n<Ml.length;n++){var l=Ml[n];l.blockedOn===t&&(l.blockedOn=null)}for(;0<Ml.length&&(n=Ml[0],n.blockedOn===null);)Pv(n),n.blockedOn===null&&Ml.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var i=n[l],r=n[l+1],a=i[an]||null;if(typeof r=="function")a||mg(n);else if(a){var o=null;if(r&&r.hasAttribute("formAction")){if(i=r,a=r[an]||null)o=a.formAction;else if(Ad(i)!==null)continue}else o=a.action;typeof o=="function"?n[l+1]=o:(n.splice(l,3),l-=3),mg(n)}}}function Nd(t){this._internalRoot=t}$s.prototype.render=Nd.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(_(409));var n=e.current,l=gn();Qv(n,l,t,e,null,null)};$s.prototype.unmount=Nd.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Qv(t.current,2,null,t,null,null),Ps(),e[Dr]=null}};function $s(t){this._internalRoot=t}$s.prototype.unstable_scheduleHydration=function(t){if(t){var e=Ng();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Ml.length&&e!==0&&e<Ml[n].priority;n++);Ml.splice(n,0,t),n===0&&Pv(t)}};var pg=hg.version;if(pg!=="19.1.1")throw Error(_(527,pg,"19.1.1"));Lt.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(_(188)):(t=Object.keys(t).join(","),Error(_(268,t)));return t=ak(e),t=t!==null?vg(t):null,t=t===null?null:t.stateNode,t};var Rw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:at,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(ca=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ca.isDisabled&&ca.supportsFiber))try{Fa=ca.inject(Rw),pn=ca}catch{}var ca;Ws.createRoot=function(t,e){if(!gg(t))throw Error(_(299));var n=!1,l="",i=Vy,r=Fy,a=Qy,o=null;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(l=e.identifierPrefix),e.onUncaughtError!==void 0&&(i=e.onUncaughtError),e.onCaughtError!==void 0&&(r=e.onCaughtError),e.onRecoverableError!==void 0&&(a=e.onRecoverableError),e.unstable_transitionCallbacks!==void 0&&(o=e.unstable_transitionCallbacks)),e=Vv(t,1,!1,null,null,n,l,i,r,a,o,null),t[Dr]=e.current,Sd(t),new Nd(e)};Ws.hydrateRoot=function(t,e,n){if(!gg(t))throw Error(_(299));var l=!1,i="",r=Vy,a=Fy,o=Qy,s=null,u=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(o=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(s=n.unstable_transitionCallbacks),n.formState!==void 0&&(u=n.formState)),e=Vv(t,1,!0,e,n??null,l,i,r,a,o,s,u),e.context=Fv(null),n=e.current,l=gn(),l=Hf(l),i=Ul(l),i.callback=null,Bl(n,i,l),n=l,e.current.lanes=n,Ga(e,n),Zn(e),t[Dr]=e.current,Sd(t),new $s(e)};Ws.version="19.1.1"});var $v=Ze((lR,Jv)=>{"use strict";function Kv(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Kv)}catch(t){console.error(t)}}Kv(),Jv.exports=Zv()});var pb=Ze((s2,mb)=>{"use strict";var ub=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Iw=/\n/g,jw=/^\s*/,Yw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Vw=/^:\s*/,Fw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Qw=/^[;\s]*/,Gw=/^\s+|\s+$/g,Xw=`
10
+ `,cb="/",fb="*",Ni="",Pw="comment",Zw="declaration";function Kw(t,e){if(typeof t!="string")throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,l=1;function i(g){var x=g.match(Iw);x&&(n+=x.length);var C=g.lastIndexOf(Xw);l=~C?g.length-C:l+g.length}function r(){var g={line:n,column:l};return function(x){return x.position=new a(g),u(),x}}function a(g){this.start=g,this.end={line:n,column:l},this.source=e.source}a.prototype.content=t;function o(g){var x=new Error(e.source+":"+n+":"+l+": "+g);if(x.reason=g,x.filename=e.source,x.line=n,x.column=l,x.source=t,!e.silent)throw x}function s(g){var x=g.exec(t);if(x){var C=x[0];return i(C),t=t.slice(C.length),x}}function u(){s(jw)}function f(g){var x;for(g=g||[];x=c();)x!==!1&&g.push(x);return g}function c(){var g=r();if(!(cb!=t.charAt(0)||fb!=t.charAt(1))){for(var x=2;Ni!=t.charAt(x)&&(fb!=t.charAt(x)||cb!=t.charAt(x+1));)++x;if(x+=2,Ni===t.charAt(x-1))return o("End of comment missing");var C=t.slice(2,x-2);return l+=2,i(C),t=t.slice(x),l+=2,g({type:Pw,comment:C})}}function m(){var g=r(),x=s(Yw);if(x){if(c(),!s(Vw))return o("property missing ':'");var C=s(Fw),h=g({type:Zw,property:db(x[0].replace(ub,Ni)),value:C?db(C[0].replace(ub,Ni)):Ni});return s(Qw),h}}function d(){var g=[];f(g);for(var x;x=m();)x!==!1&&(g.push(x),f(g));return g}return u(),d()}function db(t){return t?t.replace(Gw,Ni):Ni}mb.exports=Kw});var hb=Ze(oo=>{"use strict";var Jw=oo&&oo.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(oo,"__esModule",{value:!0});oo.default=Ww;var $w=Jw(pb());function Ww(t,e){let n=null;if(!t||typeof t!="string")return n;let l=(0,$w.default)(t),i=typeof e=="function";return l.forEach(r=>{if(r.type!=="declaration")return;let{property:a,value:o}=r;i?e(a,o,r):o&&(n=n||{},n[a]=o)}),n}});var yb=Ze(au=>{"use strict";Object.defineProperty(au,"__esModule",{value:!0});au.camelCase=void 0;var tT=/^--[a-zA-Z0-9_-]+$/,eT=/-([a-z])/g,nT=/^[^-]+$/,lT=/^-(webkit|moz|ms|o|khtml)-/,iT=/^-(ms)-/,rT=function(t){return!t||nT.test(t)||tT.test(t)},aT=function(t,e){return e.toUpperCase()},gb=function(t,e){return"".concat(e,"-")},oT=function(t,e){return e===void 0&&(e={}),rT(t)?t:(t=t.toLowerCase(),e.reactCompat?t=t.replace(iT,gb):t=t.replace(lT,gb),t.replace(eT,aT))};au.camelCase=oT});var bb=Ze((Id,vb)=>{"use strict";var sT=Id&&Id.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},uT=sT(hb()),cT=yb();function qd(t,e){var n={};return!t||typeof t!="string"||(0,uT.default)(t,function(l,i){l&&i&&(n[(0,cT.camelCase)(l,e)]=i)}),n}qd.default=qd;vb.exports=qd});var Rb=Ze(su=>{"use strict";var MT=Symbol.for("react.transitional.element"),DT=Symbol.for("react.fragment");function Nb(t,e,n){var l=null;if(n!==void 0&&(l=""+n),e.key!==void 0&&(l=""+e.key),"key"in e){n={};for(var i in e)i!=="key"&&(n[i]=e[i])}else n=e;return e=n.ref,{$$typeof:MT,type:t,key:l,ref:e!==void 0?e:null,props:n}}su.Fragment=DT;su.jsx=Nb;su.jsxs=Nb});var it=Ze((L2,Mb)=>{"use strict";Mb.exports=Rb()});var G0=Ze((Iz,Q0)=>{"use strict";var Du=Object.prototype.hasOwnProperty,F0=Object.prototype.toString,H0=Object.defineProperty,q0=Object.getOwnPropertyDescriptor,I0=function(e){return typeof Array.isArray=="function"?Array.isArray(e):F0.call(e)==="[object Array]"},j0=function(e){if(!e||F0.call(e)!=="[object Object]")return!1;var n=Du.call(e,"constructor"),l=e.constructor&&e.constructor.prototype&&Du.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!n&&!l)return!1;var i;for(i in e);return typeof i>"u"||Du.call(e,i)},Y0=function(e,n){H0&&n.name==="__proto__"?H0(e,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):e[n.name]=n.newValue},V0=function(e,n){if(n==="__proto__")if(Du.call(e,n)){if(q0)return q0(e,n).value}else return;return e[n]};Q0.exports=function t(){var e,n,l,i,r,a,o=arguments[0],s=1,u=arguments.length,f=!1;for(typeof o=="boolean"&&(f=o,o=arguments[1]||{},s=2),(o==null||typeof o!="object"&&typeof o!="function")&&(o={});s<u;++s)if(e=arguments[s],e!=null)for(n in e)l=V0(o,n),i=V0(e,n),o!==i&&(f&&i&&(j0(i)||(r=I0(i)))?(r?(r=!1,a=l&&I0(l)?l:[]):a=l&&j0(l)?l:{},Y0(o,{name:n,newValue:t(f,a,i)})):typeof i<"u"&&Y0(o,{name:n,newValue:i}));return o}});var Dx=G(le(),1),Ox=G($v(),1);var Ot=G(le(),1);function Wv(){return window.__CODELY__??{}}function Rd(t){return t.mode??"chat"}function tu(t){return t.controlPlaneApiBase??"/__codely__/control-plane"}function Mw(t){return t.resumeSessionId?t.resumeSessionId:window.location.pathname.match(/^\/resume-session\/([^/]+)$/)?.[1]}function tb(t){let e=Mw(t);if(e)return window.location.pathname!==`/resume-session/${e}`&&window.history.replaceState({},"",`/resume-session/${e}`),e;if(window.location.pathname!=="/")return;let n=globalThis.crypto?.randomUUID?.();if(n)return window.history.replaceState({},"",`/resume-session/${n}`),n}var Q1=G(le(),1);function eb(t,e){let n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Dw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ow=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,_w={};function eu(t,e){return((e||_w).jsx?Ow:Dw).test(t)}var zw=/[ \t\n\f\r]/g;function Md(t){return typeof t=="object"?t.type==="text"?nb(t.value):!1:nb(t)}function nb(t){return t.replace(zw,"")===""}var vl=class{constructor(e,n,l){this.normal=n,this.property=e,l&&(this.space=l)}};vl.prototype.normal={};vl.prototype.property={};vl.prototype.space=void 0;function Dd(t,e){let n={},l={};for(let i of t)Object.assign(n,i.property),Object.assign(l,i.normal);return new vl(n,l,e)}function ro(t){return t.toLowerCase()}var _e=class{constructor(e,n){this.attribute=n,this.property=e}};_e.prototype.attribute="";_e.prototype.booleanish=!1;_e.prototype.boolean=!1;_e.prototype.commaOrSpaceSeparated=!1;_e.prototype.commaSeparated=!1;_e.prototype.defined=!1;_e.prototype.mustUseProperty=!1;_e.prototype.number=!1;_e.prototype.overloadedBoolean=!1;_e.prototype.property="";_e.prototype.spaceSeparated=!1;_e.prototype.space=void 0;var ao={};vp(ao,{boolean:()=>ut,booleanish:()=>ae,commaOrSpaceSeparated:()=>sn,commaSeparated:()=>Pl,number:()=>U,overloadedBoolean:()=>nu,spaceSeparated:()=>qt});var Lw=0,ut=Ci(),ae=Ci(),nu=Ci(),U=Ci(),qt=Ci(),Pl=Ci(),sn=Ci();function Ci(){return 2**++Lw}var Od=Object.keys(ao),Ai=class extends _e{constructor(e,n,l,i){let r=-1;if(super(e,n),lb(this,"space",i),typeof l=="number")for(;++r<Od.length;){let a=Od[r];lb(this,Od[r],(l&ao[a])===ao[a])}}};Ai.prototype.defined=!0;function lb(t,e,n){n&&(t[e]=n)}function On(t){let e={},n={};for(let[l,i]of Object.entries(t.properties)){let r=new Ai(l,t.transform(t.attributes||{},l),i,t.space);t.mustUseProperty&&t.mustUseProperty.includes(l)&&(r.mustUseProperty=!0),e[l]=r,n[ro(l)]=l,n[ro(r.attribute)]=l}return new vl(e,n,t.space)}var _d=On({properties:{ariaActiveDescendant:null,ariaAtomic:ae,ariaAutoComplete:null,ariaBusy:ae,ariaChecked:ae,ariaColCount:U,ariaColIndex:U,ariaColSpan:U,ariaControls:qt,ariaCurrent:null,ariaDescribedBy:qt,ariaDetails:null,ariaDisabled:ae,ariaDropEffect:qt,ariaErrorMessage:null,ariaExpanded:ae,ariaFlowTo:qt,ariaGrabbed:ae,ariaHasPopup:null,ariaHidden:ae,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:qt,ariaLevel:U,ariaLive:null,ariaModal:ae,ariaMultiLine:ae,ariaMultiSelectable:ae,ariaOrientation:null,ariaOwns:qt,ariaPlaceholder:null,ariaPosInSet:U,ariaPressed:ae,ariaReadOnly:ae,ariaRelevant:null,ariaRequired:ae,ariaRoleDescription:qt,ariaRowCount:U,ariaRowIndex:U,ariaRowSpan:U,ariaSelected:ae,ariaSetSize:U,ariaSort:null,ariaValueMax:U,ariaValueMin:U,ariaValueNow:U,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function lu(t,e){return e in t?t[e]:e}function iu(t,e){return lu(t,e.toLowerCase())}var ib=On({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Pl,acceptCharset:qt,accessKey:qt,action:null,allow:null,allowFullScreen:ut,allowPaymentRequest:ut,allowUserMedia:ut,alt:null,as:null,async:ut,autoCapitalize:null,autoComplete:qt,autoFocus:ut,autoPlay:ut,blocking:qt,capture:null,charSet:null,checked:ut,cite:null,className:qt,cols:U,colSpan:null,content:null,contentEditable:ae,controls:ut,controlsList:qt,coords:U|Pl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ut,defer:ut,dir:null,dirName:null,disabled:ut,download:nu,draggable:ae,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ut,formTarget:null,headers:qt,height:U,hidden:nu,high:U,href:null,hrefLang:null,htmlFor:qt,httpEquiv:qt,id:null,imageSizes:null,imageSrcSet:null,inert:ut,inputMode:null,integrity:null,is:null,isMap:ut,itemId:null,itemProp:qt,itemRef:qt,itemScope:ut,itemType:qt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ut,low:U,manifest:null,max:null,maxLength:U,media:null,method:null,min:null,minLength:U,multiple:ut,muted:ut,name:null,nonce:null,noModule:ut,noValidate:ut,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:ut,optimum:U,pattern:null,ping:qt,placeholder:null,playsInline:ut,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ut,referrerPolicy:null,rel:qt,required:ut,reversed:ut,rows:U,rowSpan:U,sandbox:qt,scope:null,scoped:ut,seamless:ut,selected:ut,shadowRootClonable:ut,shadowRootDelegatesFocus:ut,shadowRootMode:null,shape:null,size:U,sizes:null,slot:null,span:U,spellCheck:ae,src:null,srcDoc:null,srcLang:null,srcSet:null,start:U,step:null,style:null,tabIndex:U,target:null,title:null,translate:null,type:null,typeMustMatch:ut,useMap:null,value:ae,width:U,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:qt,axis:null,background:null,bgColor:null,border:U,borderColor:null,bottomMargin:U,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ut,declare:ut,event:null,face:null,frame:null,frameBorder:null,hSpace:U,leftMargin:U,link:null,longDesc:null,lowSrc:null,marginHeight:U,marginWidth:U,noResize:ut,noHref:ut,noShade:ut,noWrap:ut,object:null,profile:null,prompt:null,rev:null,rightMargin:U,rules:null,scheme:null,scrolling:ae,standby:null,summary:null,text:null,topMargin:U,valueType:null,version:null,vAlign:null,vLink:null,vSpace:U,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:ut,disableRemotePlayback:ut,prefix:null,property:null,results:U,security:null,unselectable:null},space:"html",transform:iu});var rb=On({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:sn,accentHeight:U,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:U,amplitude:U,arabicForm:null,ascent:U,attributeName:null,attributeType:null,azimuth:U,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:U,by:null,calcMode:null,capHeight:U,className:qt,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:U,diffuseConstant:U,direction:null,display:null,dur:null,divisor:U,dominantBaseline:null,download:ut,dx:null,dy:null,edgeMode:null,editable:null,elevation:U,enableBackground:null,end:null,event:null,exponent:U,externalResourcesRequired:null,fill:null,fillOpacity:U,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:Pl,g2:Pl,glyphName:Pl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:U,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:U,horizOriginX:U,horizOriginY:U,id:null,ideographic:U,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:U,k:U,k1:U,k2:U,k3:U,k4:U,kernelMatrix:sn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:U,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:U,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:U,overlineThickness:U,paintOrder:null,panose1:null,path:null,pathLength:U,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:qt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:U,pointsAtY:U,pointsAtZ:U,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:sn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:sn,rev:sn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:sn,requiredFeatures:sn,requiredFonts:sn,requiredFormats:sn,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:U,specularExponent:U,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:U,strikethroughThickness:U,string:null,stroke:null,strokeDashArray:sn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:U,strokeOpacity:U,strokeWidth:null,style:null,surfaceScale:U,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:sn,tabIndex:U,tableValues:null,target:null,targetX:U,targetY:U,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:sn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:U,underlineThickness:U,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:U,values:null,vAlphabetic:U,vMathematical:U,vectorEffect:null,vHanging:U,vIdeographic:U,version:null,vertAdvY:U,vertOriginX:U,vertOriginY:U,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:U,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:lu});var zd=On({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}});var Ld=On({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:iu});var Ud=On({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}});var Bd={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"};var Uw=/[A-Z]/g,ab=/-[a-z]/g,Bw=/^data[-\w.:]+$/i;function Hd(t,e){let n=ro(e),l=e,i=_e;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Bw.test(e)){if(e.charAt(4)==="-"){let r=e.slice(5).replace(ab,qw);l="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{let r=e.slice(4);if(!ab.test(r)){let a=r.replace(Uw,Hw);a.charAt(0)!=="-"&&(a="-"+a),e="data"+a}}i=Ai}return new i(l,e)}function Hw(t){return"-"+t.toLowerCase()}function qw(t){return t.charAt(1).toUpperCase()}var ob=Dd([_d,ib,zd,Ld,Ud],"html"),ru=Dd([_d,rb,zd,Ld,Ud],"svg");function sb(t){return t.join(" ").trim()}var wb=G(bb(),1);var ou=xb("end"),Br=xb("start");function xb(t){return e;function e(n){let l=n&&n.position&&n.position[t]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function jd(t){let e=Br(t),n=ou(t);if(e&&n)return{start:e,end:n}}function Zl(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?kb(t.position):"start"in t||"end"in t?kb(t):"line"in t||"column"in t?Yd(t):""}function Yd(t){return Sb(t&&t.line)+":"+Sb(t&&t.column)}function kb(t){return Yd(t&&t.start)+"-"+Yd(t&&t.end)}function Sb(t){return t&&typeof t=="number"?t:1}var fe=class extends Error{constructor(e,n,l){super(),typeof n=="string"&&(l=n,n=void 0);let i="",r={},a=!1;if(n&&("line"in n&&"column"in n?r={place:n}:"start"in n&&"end"in n?r={place:n}:"type"in n?r={ancestors:[n],place:n.position}:r={...n}),typeof e=="string"?i=e:!r.cause&&e&&(a=!0,i=e.message,r.cause=e),!r.ruleId&&!r.source&&typeof l=="string"){let s=l.indexOf(":");s===-1?r.ruleId=l:(r.source=l.slice(0,s),r.ruleId=l.slice(s+1))}if(!r.place&&r.ancestors&&r.ancestors){let s=r.ancestors[r.ancestors.length-1];s&&(r.place=s.position)}let o=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=o?o.line:void 0,this.name=Zl(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=a&&r.cause&&typeof r.cause.stack=="string"?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};fe.prototype.file="";fe.prototype.name="";fe.prototype.reason="";fe.prototype.message="";fe.prototype.stack="";fe.prototype.column=void 0;fe.prototype.line=void 0;fe.prototype.ancestors=void 0;fe.prototype.cause=void 0;fe.prototype.fatal=void 0;fe.prototype.place=void 0;fe.prototype.ruleId=void 0;fe.prototype.source=void 0;var Vd={}.hasOwnProperty,fT=new Map,dT=/[A-Z]/g,mT=new Set(["table","tbody","thead","tfoot","tr"]),pT=new Set(["td","th"]),Tb="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fd(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let n=e.filePath||void 0,l;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=ST(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=kT(n,e.jsx,e.jsxs)}let i={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:l,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?ru:ob,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},r=Eb(i,t,void 0);return r&&typeof r!="string"?r:i.create(t,i.Fragment,{children:r||void 0},void 0)}function Eb(t,e,n){if(e.type==="element")return hT(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return gT(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return vT(t,e,n);if(e.type==="mdxjsEsm")return yT(t,e);if(e.type==="root")return bT(t,e,n);if(e.type==="text")return xT(t,e)}function hT(t,e,n){let l=t.schema,i=l;e.tagName.toLowerCase()==="svg"&&l.space==="html"&&(i=ru,t.schema=i),t.ancestors.push(e);let r=Ab(t,e.tagName,!1),a=wT(t,e),o=Gd(t,e);return mT.has(e.tagName)&&(o=o.filter(function(s){return typeof s=="string"?!Md(s):!0})),Cb(t,a,r,e),Qd(a,o),t.ancestors.pop(),t.schema=l,t.create(e,r,a,n)}function gT(t,e){if(e.data&&e.data.estree&&t.evaluater){let l=e.data.estree.body[0];return l.type,t.evaluater.evaluateExpression(l.expression)}so(t,e.position)}function yT(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);so(t,e.position)}function vT(t,e,n){let l=t.schema,i=l;e.name==="svg"&&l.space==="html"&&(i=ru,t.schema=i),t.ancestors.push(e);let r=e.name===null?t.Fragment:Ab(t,e.name,!0),a=TT(t,e),o=Gd(t,e);return Cb(t,a,r,e),Qd(a,o),t.ancestors.pop(),t.schema=l,t.create(e,r,a,n)}function bT(t,e,n){let l={};return Qd(l,Gd(t,e)),t.create(e,t.Fragment,l,n)}function xT(t,e){return e.value}function Cb(t,e,n,l){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=l)}function Qd(t,e){if(e.length>0){let n=e.length>1?e:e[0];n&&(t.children=n)}}function kT(t,e,n){return l;function l(i,r,a,o){let u=Array.isArray(a.children)?n:e;return o?u(r,a,o):u(r,a)}}function ST(t,e){return n;function n(l,i,r,a){let o=Array.isArray(r.children),s=Br(l);return e(i,r,a,o,{columnNumber:s?s.column-1:void 0,fileName:t,lineNumber:s?s.line:void 0},void 0)}}function wT(t,e){let n={},l,i;for(i in e.properties)if(i!=="children"&&Vd.call(e.properties,i)){let r=ET(t,i,e.properties[i]);if(r){let[a,o]=r;t.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&pT.has(e.tagName)?l=o:n[a]=o}}if(l){let r=n.style||(n.style={});r[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return n}function TT(t,e){let n={};for(let l of e.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&t.evaluater){let r=l.data.estree.body[0];r.type;let a=r.expression;a.type;let o=a.properties[0];o.type,Object.assign(n,t.evaluater.evaluateExpression(o.argument))}else so(t,e.position);else{let i=l.name,r;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&t.evaluater){let o=l.value.data.estree.body[0];o.type,r=t.evaluater.evaluateExpression(o.expression)}else so(t,e.position);else r=l.value===null?!0:l.value;n[i]=r}return n}function Gd(t,e){let n=[],l=-1,i=t.passKeys?new Map:fT;for(;++l<e.children.length;){let r=e.children[l],a;if(t.passKeys){let s=r.type==="element"?r.tagName:r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement"?r.name:void 0;if(s){let u=i.get(s)||0;a=s+"-"+u,i.set(s,u+1)}}let o=Eb(t,r,a);o!==void 0&&n.push(o)}return n}function ET(t,e,n){let l=Hd(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=l.commaSeparated?eb(n):sb(n)),l.property==="style"){let i=typeof n=="object"?n:CT(t,String(n));return t.stylePropertyNameCase==="css"&&(i=AT(i)),["style",i]}return[t.elementAttributeNameCase==="react"&&l.space?Bd[l.property]||l.property:l.attribute,n]}}function CT(t,e){try{return(0,wb.default)(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};let l=n,i=new fe("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=t.filePath||void 0,i.url=Tb+"#cannot-parse-style-attribute",i}}function Ab(t,e,n){let l;if(!n)l={type:"Literal",value:e};else if(e.includes(".")){let i=e.split("."),r=-1,a;for(;++r<i.length;){let o=eu(i[r])?{type:"Identifier",name:i[r]}:{type:"Literal",value:i[r]};a=a?{type:"MemberExpression",object:a,property:o,computed:!!(r&&o.type==="Literal"),optional:!1}:o}l=a}else l=eu(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(l.type==="Literal"){let i=l.value;return Vd.call(t.components,i)?t.components[i]:i}if(t.evaluater)return t.evaluater.evaluateExpression(l);so(t)}function so(t,e){let n=new fe("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=Tb+"#cannot-handle-mdx-estrees-without-createevaluater",n}function AT(t){let e={},n;for(n in t)Vd.call(t,n)&&(e[NT(n)]=t[n]);return e}function NT(t){let e=t.replace(dT,RT);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function RT(t){return"-"+t.toLowerCase()}var uo={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"]};var Yr=G(it(),1),n1=G(le(),1);var OT={};function Ri(t,e){let n=e||OT,l=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return Ob(t,l,i)}function Ob(t,e,n){if(_T(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return Db(t.children,e,n)}return Array.isArray(t)?Db(t,e,n):""}function Db(t,e,n){let l=[],i=-1;for(;++i<t.length;)l[i]=Ob(t[i],e,n);return l.join("")}function _T(t){return!!(t&&typeof t=="object")}var _b=document.createElement("i");function Hr(t){let e="&"+t+";";_b.innerHTML=e;let n=_b.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function de(t,e,n,l){let i=t.length,r=0,a;if(e<0?e=-e>i?0:i+e:e=e>i?i:e,n=n>0?n:0,l.length<1e4)a=Array.from(l),a.unshift(e,n),t.splice(...a);else for(n&&t.splice(e,n);r<l.length;)a=l.slice(r,r+1e4),a.unshift(e,0),t.splice(...a),r+=1e4,e+=1e4}function We(t,e){return t.length>0?(de(t,t.length,0,e),t):e}var zb={}.hasOwnProperty;function uu(t){let e={},n=-1;for(;++n<t.length;)zT(e,t[n]);return e}function zT(t,e){let n;for(n in e){let i=(zb.call(t,n)?t[n]:void 0)||(t[n]={}),r=e[n],a;if(r)for(a in r){zb.call(i,a)||(i[a]=[]);let o=r[a];LT(i[a],Array.isArray(o)?o:o?[o]:[])}}}function LT(t,e){let n=-1,l=[];for(;++n<e.length;)(e[n].add==="after"?t:l).push(e[n]);de(t,0,0,l)}function cu(t,e){let n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}function Ve(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var we=Kl(/[A-Za-z]/),oe=Kl(/[\dA-Za-z]/),Lb=Kl(/[#-'*+\--9=?A-Z^-~]/);function Mi(t){return t!==null&&(t<32||t===127)}var co=Kl(/\d/),Ub=Kl(/[\dA-Fa-f]/),Bb=Kl(/[!-/:-@[-`{-~]/);function V(t){return t!==null&&t<-2}function gt(t){return t!==null&&(t<0||t===32)}function nt(t){return t===-2||t===-1||t===32}var Di=Kl(/\p{P}|\p{S}/u),Kn=Kl(/\s/);function Kl(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function _n(t){let e=[],n=-1,l=0,i=0;for(;++n<t.length;){let r=t.charCodeAt(n),a="";if(r===37&&oe(t.charCodeAt(n+1))&&oe(t.charCodeAt(n+2)))i=2;else if(r<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(r))||(a=String.fromCharCode(r));else if(r>55295&&r<57344){let o=t.charCodeAt(n+1);r<56320&&o>56319&&o<57344?(a=String.fromCharCode(r,o),i=1):a="\uFFFD"}else a=String.fromCharCode(r);a&&(e.push(t.slice(l,n),encodeURIComponent(a)),l=n+i+1,a=""),i&&(n+=i,i=0)}return e.join("")+t.slice(l)}function tt(t,e,n,l){let i=l?l-1:Number.POSITIVE_INFINITY,r=0;return a;function a(s){return nt(s)?(t.enter(n),o(s)):e(s)}function o(s){return nt(s)&&r++<i?(t.consume(s),o):(t.exit(n),e(s))}}var Hb={tokenize:UT};function UT(t){let e=t.attempt(this.parser.constructs.contentInitial,l,i),n;return e;function l(o){if(o===null){t.consume(o);return}return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),tt(t,e,"linePrefix")}function i(o){return t.enter("paragraph"),r(o)}function r(o){let s=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=s),n=s,a(o)}function a(o){if(o===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(o);return}return V(o)?(t.consume(o),t.exit("chunkText"),r):(t.consume(o),a)}}var Ib={tokenize:BT},qb={tokenize:HT};function BT(t){let e=this,n=[],l=0,i,r,a;return o;function o(y){if(l<n.length){let T=n[l];return e.containerState=T[1],t.attempt(T[0].continuation,s,u)(y)}return u(y)}function s(y){if(l++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,i&&p();let T=e.events.length,N=T,E;for(;N--;)if(e.events[N][0]==="exit"&&e.events[N][1].type==="chunkFlow"){E=e.events[N][1].end;break}h(l);let M=T;for(;M<e.events.length;)e.events[M][1].end={...E},M++;return de(e.events,N+1,0,e.events.slice(T)),e.events.length=M,u(y)}return o(y)}function u(y){if(l===n.length){if(!i)return m(y);if(i.currentConstruct&&i.currentConstruct.concrete)return g(y);e.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(qb,f,c)(y)}function f(y){return i&&p(),h(l),m(y)}function c(y){return e.parser.lazy[e.now().line]=l!==n.length,a=e.now().offset,g(y)}function m(y){return e.containerState={},t.attempt(qb,d,g)(y)}function d(y){return l++,n.push([e.currentConstruct,e.containerState]),m(y)}function g(y){if(y===null){i&&p(),h(0),t.consume(y);return}return i=i||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:r}),x(y)}function x(y){if(y===null){C(t.exit("chunkFlow"),!0),h(0),t.consume(y);return}return V(y)?(t.consume(y),C(t.exit("chunkFlow")),l=0,e.interrupt=void 0,o):(t.consume(y),x)}function C(y,T){let N=e.sliceStream(y);if(T&&N.push(null),y.previous=r,r&&(r.next=y),r=y,i.defineSkip(y.start),i.write(N),e.parser.lazy[y.start.line]){let E=i.events.length;for(;E--;)if(i.events[E][1].start.offset<a&&(!i.events[E][1].end||i.events[E][1].end.offset>a))return;let M=e.events.length,z=M,Y,w;for(;z--;)if(e.events[z][0]==="exit"&&e.events[z][1].type==="chunkFlow"){if(Y){w=e.events[z][1].end;break}Y=!0}for(h(l),E=M;E<e.events.length;)e.events[E][1].end={...w},E++;de(e.events,z+1,0,e.events.slice(M)),e.events.length=E}}function h(y){let T=n.length;for(;T-- >y;){let N=n[T];e.containerState=N[1],N[0].exit.call(e,t)}n.length=y}function p(){i.write([null]),r=void 0,i=void 0,e.containerState._closeFlow=void 0}}function HT(t,e,n){return tt(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function bl(t){if(t===null||gt(t)||Kn(t))return 1;if(Di(t))return 2}function Jl(t,e,n){let l=[],i=-1;for(;++i<t.length;){let r=t[i].resolveAll;r&&!l.includes(r)&&(e=r(e,n),l.push(r))}return e}var fo={name:"attention",resolveAll:qT,tokenize:IT};function qT(t,e){let n=-1,l,i,r,a,o,s,u,f;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(l=n;l--;)if(t[l][0]==="exit"&&t[l][1].type==="attentionSequence"&&t[l][1]._open&&e.sliceSerialize(t[l][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[l][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[l][1].end.offset-t[l][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;s=t[l][1].end.offset-t[l][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;let c={...t[l][1].end},m={...t[n][1].start};jb(c,-s),jb(m,s),a={type:s>1?"strongSequence":"emphasisSequence",start:c,end:{...t[l][1].end}},o={type:s>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:m},r={type:s>1?"strongText":"emphasisText",start:{...t[l][1].end},end:{...t[n][1].start}},i={type:s>1?"strong":"emphasis",start:{...a.start},end:{...o.end}},t[l][1].end={...a.start},t[n][1].start={...o.end},u=[],t[l][1].end.offset-t[l][1].start.offset&&(u=We(u,[["enter",t[l][1],e],["exit",t[l][1],e]])),u=We(u,[["enter",i,e],["enter",a,e],["exit",a,e],["enter",r,e]]),u=We(u,Jl(e.parser.constructs.insideSpan.null,t.slice(l+1,n),e)),u=We(u,[["exit",r,e],["enter",o,e],["exit",o,e],["exit",i,e]]),t[n][1].end.offset-t[n][1].start.offset?(f=2,u=We(u,[["enter",t[n][1],e],["exit",t[n][1],e]])):f=0,de(t,l-1,n-l+3,u),n=l+u.length-f-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function IT(t,e){let n=this.parser.constructs.attentionMarkers.null,l=this.previous,i=bl(l),r;return a;function a(s){return r=s,t.enter("attentionSequence"),o(s)}function o(s){if(s===r)return t.consume(s),o;let u=t.exit("attentionSequence"),f=bl(s),c=!f||f===2&&i||n.includes(s),m=!i||i===2&&f||n.includes(l);return u._open=!!(r===42?c:c&&(i||!m)),u._close=!!(r===42?m:m&&(f||!c)),e(s)}}function jb(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}var Xd={name:"autolink",tokenize:jT};function jT(t,e,n){let l=0;return i;function i(d){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),r}function r(d){return we(d)?(t.consume(d),a):d===64?n(d):u(d)}function a(d){return d===43||d===45||d===46||oe(d)?(l=1,o(d)):u(d)}function o(d){return d===58?(t.consume(d),l=0,s):(d===43||d===45||d===46||oe(d))&&l++<32?(t.consume(d),o):(l=0,u(d))}function s(d){return d===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):d===null||d===32||d===60||Mi(d)?n(d):(t.consume(d),s)}function u(d){return d===64?(t.consume(d),f):Lb(d)?(t.consume(d),u):n(d)}function f(d){return oe(d)?c(d):n(d)}function c(d){return d===46?(t.consume(d),l=0,f):d===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(d),t.exit("autolinkMarker"),t.exit("autolink"),e):m(d)}function m(d){if((d===45||oe(d))&&l++<63){let g=d===45?m:c;return t.consume(d),g}return n(d)}}var Jn={partial:!0,tokenize:YT};function YT(t,e,n){return l;function l(r){return nt(r)?tt(t,i,"linePrefix")(r):i(r)}function i(r){return r===null||V(r)?e(r):n(r)}}var fu={continuation:{tokenize:FT},exit:QT,name:"blockQuote",tokenize:VT};function VT(t,e,n){let l=this;return i;function i(a){if(a===62){let o=l.containerState;return o.open||(t.enter("blockQuote",{_container:!0}),o.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(a),t.exit("blockQuoteMarker"),r}return n(a)}function r(a){return nt(a)?(t.enter("blockQuotePrefixWhitespace"),t.consume(a),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(a))}}function FT(t,e,n){let l=this;return i;function i(a){return nt(a)?tt(t,r,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):r(a)}function r(a){return t.attempt(fu,e,n)(a)}}function QT(t){t.exit("blockQuote")}var du={name:"characterEscape",tokenize:GT};function GT(t,e,n){return l;function l(r){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(r),t.exit("escapeMarker"),i}function i(r){return Bb(r)?(t.enter("characterEscapeValue"),t.consume(r),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(r)}}var mu={name:"characterReference",tokenize:XT};function XT(t,e,n){let l=this,i=0,r,a;return o;function o(c){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(c),t.exit("characterReferenceMarker"),s}function s(c){return c===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(c),t.exit("characterReferenceMarkerNumeric"),u):(t.enter("characterReferenceValue"),r=31,a=oe,f(c))}function u(c){return c===88||c===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(c),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),r=6,a=Ub,f):(t.enter("characterReferenceValue"),r=7,a=co,f(c))}function f(c){if(c===59&&i){let m=t.exit("characterReferenceValue");return a===oe&&!Hr(l.sliceSerialize(m))?n(c):(t.enter("characterReferenceMarker"),t.consume(c),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return a(c)&&i++<r?(t.consume(c),f):n(c)}}var Yb={partial:!0,tokenize:ZT},pu={concrete:!0,name:"codeFenced",tokenize:PT};function PT(t,e,n){let l=this,i={partial:!0,tokenize:N},r=0,a=0,o;return s;function s(E){return u(E)}function u(E){let M=l.events[l.events.length-1];return r=M&&M[1].type==="linePrefix"?M[2].sliceSerialize(M[1],!0).length:0,o=E,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),f(E)}function f(E){return E===o?(a++,t.consume(E),f):a<3?n(E):(t.exit("codeFencedFenceSequence"),nt(E)?tt(t,c,"whitespace")(E):c(E))}function c(E){return E===null||V(E)?(t.exit("codeFencedFence"),l.interrupt?e(E):t.check(Yb,x,T)(E)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),m(E))}function m(E){return E===null||V(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),c(E)):nt(E)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),tt(t,d,"whitespace")(E)):E===96&&E===o?n(E):(t.consume(E),m)}function d(E){return E===null||V(E)?c(E):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),g(E))}function g(E){return E===null||V(E)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),c(E)):E===96&&E===o?n(E):(t.consume(E),g)}function x(E){return t.attempt(i,T,C)(E)}function C(E){return t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),h}function h(E){return r>0&&nt(E)?tt(t,p,"linePrefix",r+1)(E):p(E)}function p(E){return E===null||V(E)?t.check(Yb,x,T)(E):(t.enter("codeFlowValue"),y(E))}function y(E){return E===null||V(E)?(t.exit("codeFlowValue"),p(E)):(t.consume(E),y)}function T(E){return t.exit("codeFenced"),e(E)}function N(E,M,z){let Y=0;return w;function w(K){return E.enter("lineEnding"),E.consume(K),E.exit("lineEnding"),P}function P(K){return E.enter("codeFencedFence"),nt(K)?tt(E,q,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(K):q(K)}function q(K){return K===o?(E.enter("codeFencedFenceSequence"),B(K)):z(K)}function B(K){return K===o?(Y++,E.consume(K),B):Y>=a?(E.exit("codeFencedFenceSequence"),nt(K)?tt(E,X,"whitespace")(K):X(K)):z(K)}function X(K){return K===null||V(K)?(E.exit("codeFencedFence"),M(K)):z(K)}}}function ZT(t,e,n){let l=this;return i;function i(a){return a===null?n(a):(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r)}function r(a){return l.parser.lazy[l.now().line]?n(a):e(a)}}var mo={name:"codeIndented",tokenize:JT},KT={partial:!0,tokenize:$T};function JT(t,e,n){let l=this;return i;function i(u){return t.enter("codeIndented"),tt(t,r,"linePrefix",5)(u)}function r(u){let f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?a(u):n(u)}function a(u){return u===null?s(u):V(u)?t.attempt(KT,a,s)(u):(t.enter("codeFlowValue"),o(u))}function o(u){return u===null||V(u)?(t.exit("codeFlowValue"),a(u)):(t.consume(u),o)}function s(u){return t.exit("codeIndented"),e(u)}}function $T(t,e,n){let l=this;return i;function i(a){return l.parser.lazy[l.now().line]?n(a):V(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),i):tt(t,r,"linePrefix",5)(a)}function r(a){let o=l.events[l.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):V(a)?i(a):n(a)}}var Pd={name:"codeText",previous:tE,resolve:WT,tokenize:eE};function WT(t){let e=t.length-4,n=3,l,i;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(l=n;++l<e;)if(t[l][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(l=n-1,e++;++l<=e;)i===void 0?l!==e&&t[l][1].type!=="lineEnding"&&(i=l):(l===e||t[l][1].type==="lineEnding")&&(t[i][1].type="codeTextData",l!==i+2&&(t[i][1].end=t[l-1][1].end,t.splice(i+2,l-i-2),e-=l-i-2,l=i+2),i=void 0);return t}function tE(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function eE(t,e,n){let l=this,i=0,r,a;return o;function o(m){return t.enter("codeText"),t.enter("codeTextSequence"),s(m)}function s(m){return m===96?(t.consume(m),i++,s):(t.exit("codeTextSequence"),u(m))}function u(m){return m===null?n(m):m===32?(t.enter("space"),t.consume(m),t.exit("space"),u):m===96?(a=t.enter("codeTextSequence"),r=0,c(m)):V(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),u):(t.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||V(m)?(t.exit("codeTextData"),u(m)):(t.consume(m),f)}function c(m){return m===96?(t.consume(m),r++,c):r===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(m)):(a.type="codeTextData",f(m))}}var hu=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){let l=n??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(e,l):e>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(e,n,l){let i=n||0;this.setCursor(Math.trunc(e));let r=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return l&&po(this.left,l),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),po(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),po(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let n=this.left.splice(e,Number.POSITIVE_INFINITY);po(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);po(this.left,n.reverse())}}};function po(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function gu(t){let e={},n=-1,l,i,r,a,o,s,u,f=new hu(t);for(;++n<f.length;){for(;n in e;)n=e[n];if(l=f.get(n),n&&l[1].type==="chunkFlow"&&f.get(n-1)[1].type==="listItemPrefix"&&(s=l[1]._tokenizer.events,r=0,r<s.length&&s[r][1].type==="lineEndingBlank"&&(r+=2),r<s.length&&s[r][1].type==="content"))for(;++r<s.length&&s[r][1].type!=="content";)s[r][1].type==="chunkText"&&(s[r][1]._isInFirstContentOfListItem=!0,r++);if(l[0]==="enter")l[1].contentType&&(Object.assign(e,nE(f,n)),n=e[n],u=!0);else if(l[1]._container){for(r=n,i=void 0;r--;)if(a=f.get(r),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(f.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=r);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(l[1].end={...f.get(i)[1].start},o=f.slice(i,n),o.unshift(l),f.splice(i,n-i+1,o))}}return de(t,0,Number.POSITIVE_INFINITY,f.slice(0)),!u}function nE(t,e){let n=t.get(e)[1],l=t.get(e)[2],i=e-1,r=[],a=n._tokenizer;a||(a=l.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));let o=a.events,s=[],u={},f,c,m=-1,d=n,g=0,x=0,C=[x];for(;d;){for(;t.get(++i)[1]!==d;);r.push(i),d._tokenizer||(f=l.sliceStream(d),d.next||f.push(null),c&&a.defineSkip(d.start),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(f),d._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),c=d,d=d.next}for(d=n;++m<o.length;)o[m][0]==="exit"&&o[m-1][0]==="enter"&&o[m][1].type===o[m-1][1].type&&o[m][1].start.line!==o[m][1].end.line&&(x=m+1,C.push(x),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(a.events=[],d?(d._tokenizer=void 0,d.previous=void 0):C.pop(),m=C.length;m--;){let h=o.slice(C[m],C[m+1]),p=r.pop();s.push([p,p+h.length-1]),t.splice(p,2,h)}for(s.reverse(),m=-1;++m<s.length;)u[g+s[m][0]]=g+s[m][1],g+=s[m][1]-s[m][0]-1;return u}var Zd={resolve:iE,tokenize:rE},lE={partial:!0,tokenize:aE};function iE(t){return gu(t),t}function rE(t,e){let n;return l;function l(o){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),i(o)}function i(o){return o===null?r(o):V(o)?t.check(lE,a,r)(o):(t.consume(o),i)}function r(o){return t.exit("chunkContent"),t.exit("content"),e(o)}function a(o){return t.consume(o),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function aE(t,e,n){let l=this;return i;function i(a){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),tt(t,r,"linePrefix")}function r(a){if(a===null||V(a))return n(a);let o=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?e(a):t.interrupt(l.parser.constructs.flow,n,e)(a)}}function yu(t,e,n,l,i,r,a,o,s){let u=s||Number.POSITIVE_INFINITY,f=0;return c;function c(h){return h===60?(t.enter(l),t.enter(i),t.enter(r),t.consume(h),t.exit(r),m):h===null||h===32||h===41||Mi(h)?n(h):(t.enter(l),t.enter(a),t.enter(o),t.enter("chunkString",{contentType:"string"}),x(h))}function m(h){return h===62?(t.enter(r),t.consume(h),t.exit(r),t.exit(i),t.exit(l),e):(t.enter(o),t.enter("chunkString",{contentType:"string"}),d(h))}function d(h){return h===62?(t.exit("chunkString"),t.exit(o),m(h)):h===null||h===60||V(h)?n(h):(t.consume(h),h===92?g:d)}function g(h){return h===60||h===62||h===92?(t.consume(h),d):d(h)}function x(h){return!f&&(h===null||h===41||gt(h))?(t.exit("chunkString"),t.exit(o),t.exit(a),t.exit(l),e(h)):f<u&&h===40?(t.consume(h),f++,x):h===41?(t.consume(h),f--,x):h===null||h===32||h===40||Mi(h)?n(h):(t.consume(h),h===92?C:x)}function C(h){return h===40||h===41||h===92?(t.consume(h),x):x(h)}}function vu(t,e,n,l,i,r){let a=this,o=0,s;return u;function u(d){return t.enter(l),t.enter(i),t.consume(d),t.exit(i),t.enter(r),f}function f(d){return o>999||d===null||d===91||d===93&&!s||d===94&&!o&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):d===93?(t.exit(r),t.enter(i),t.consume(d),t.exit(i),t.exit(l),e):V(d)?(t.enter("lineEnding"),t.consume(d),t.exit("lineEnding"),f):(t.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===null||d===91||d===93||V(d)||o++>999?(t.exit("chunkString"),f(d)):(t.consume(d),s||(s=!nt(d)),d===92?m:c)}function m(d){return d===91||d===92||d===93?(t.consume(d),o++,c):c(d)}}function bu(t,e,n,l,i,r){let a;return o;function o(m){return m===34||m===39||m===40?(t.enter(l),t.enter(i),t.consume(m),t.exit(i),a=m===40?41:m,s):n(m)}function s(m){return m===a?(t.enter(i),t.consume(m),t.exit(i),t.exit(l),e):(t.enter(r),u(m))}function u(m){return m===a?(t.exit(r),s(a)):m===null?n(m):V(m)?(t.enter("lineEnding"),t.consume(m),t.exit("lineEnding"),tt(t,u,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===a||m===null||V(m)?(t.exit("chunkString"),u(m)):(t.consume(m),m===92?c:f)}function c(m){return m===a||m===92?(t.consume(m),f):f(m)}}function Oi(t,e){let n;return l;function l(i){return V(i)?(t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),n=!0,l):nt(i)?tt(t,l,n?"linePrefix":"lineSuffix")(i):e(i)}}var Kd={name:"definition",tokenize:sE},oE={partial:!0,tokenize:uE};function sE(t,e,n){let l=this,i;return r;function r(d){return t.enter("definition"),a(d)}function a(d){return vu.call(l,t,o,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function o(d){return i=Ve(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),d===58?(t.enter("definitionMarker"),t.consume(d),t.exit("definitionMarker"),s):n(d)}function s(d){return gt(d)?Oi(t,u)(d):u(d)}function u(d){return yu(t,f,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function f(d){return t.attempt(oE,c,c)(d)}function c(d){return nt(d)?tt(t,m,"whitespace")(d):m(d)}function m(d){return d===null||V(d)?(t.exit("definition"),l.parser.defined.push(i),e(d)):n(d)}}function uE(t,e,n){return l;function l(o){return gt(o)?Oi(t,i)(o):n(o)}function i(o){return bu(t,r,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function r(o){return nt(o)?tt(t,a,"whitespace")(o):a(o)}function a(o){return o===null||V(o)?e(o):n(o)}}var Jd={name:"hardBreakEscape",tokenize:cE};function cE(t,e,n){return l;function l(r){return t.enter("hardBreakEscape"),t.consume(r),i}function i(r){return V(r)?(t.exit("hardBreakEscape"),e(r)):n(r)}}var $d={name:"headingAtx",resolve:fE,tokenize:dE};function fE(t,e){let n=t.length-2,l=3,i,r;return t[l][1].type==="whitespace"&&(l+=2),n-2>l&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(l===n-1||n-4>l&&t[n-2][1].type==="whitespace")&&(n-=l+1===n?2:4),n>l&&(i={type:"atxHeadingText",start:t[l][1].start,end:t[n][1].end},r={type:"chunkText",start:t[l][1].start,end:t[n][1].end,contentType:"text"},de(t,l,n-l+1,[["enter",i,e],["enter",r,e],["exit",r,e],["exit",i,e]])),t}function dE(t,e,n){let l=0;return i;function i(f){return t.enter("atxHeading"),r(f)}function r(f){return t.enter("atxHeadingSequence"),a(f)}function a(f){return f===35&&l++<6?(t.consume(f),a):f===null||gt(f)?(t.exit("atxHeadingSequence"),o(f)):n(f)}function o(f){return f===35?(t.enter("atxHeadingSequence"),s(f)):f===null||V(f)?(t.exit("atxHeading"),e(f)):nt(f)?tt(t,o,"whitespace")(f):(t.enter("atxHeadingText"),u(f))}function s(f){return f===35?(t.consume(f),s):(t.exit("atxHeadingSequence"),o(f))}function u(f){return f===null||f===35||gt(f)?(t.exit("atxHeadingText"),o(f)):(t.consume(f),u)}}var Vb=["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"],Wd=["pre","script","style","textarea"];var tm={concrete:!0,name:"htmlFlow",resolveTo:hE,tokenize:gE},mE={partial:!0,tokenize:vE},pE={partial:!0,tokenize:yE};function hE(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function gE(t,e,n){let l=this,i,r,a,o,s;return u;function u(S){return f(S)}function f(S){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(S),c}function c(S){return S===33?(t.consume(S),m):S===47?(t.consume(S),r=!0,x):S===63?(t.consume(S),i=3,l.interrupt?e:k):we(S)?(t.consume(S),a=String.fromCharCode(S),C):n(S)}function m(S){return S===45?(t.consume(S),i=2,d):S===91?(t.consume(S),i=5,o=0,g):we(S)?(t.consume(S),i=4,l.interrupt?e:k):n(S)}function d(S){return S===45?(t.consume(S),l.interrupt?e:k):n(S)}function g(S){let ot="CDATA[";return S===ot.charCodeAt(o++)?(t.consume(S),o===ot.length?l.interrupt?e:q:g):n(S)}function x(S){return we(S)?(t.consume(S),a=String.fromCharCode(S),C):n(S)}function C(S){if(S===null||S===47||S===62||gt(S)){let ot=S===47,pe=a.toLowerCase();return!ot&&!r&&Wd.includes(pe)?(i=1,l.interrupt?e(S):q(S)):Vb.includes(a.toLowerCase())?(i=6,ot?(t.consume(S),h):l.interrupt?e(S):q(S)):(i=7,l.interrupt&&!l.parser.lazy[l.now().line]?n(S):r?p(S):y(S))}return S===45||oe(S)?(t.consume(S),a+=String.fromCharCode(S),C):n(S)}function h(S){return S===62?(t.consume(S),l.interrupt?e:q):n(S)}function p(S){return nt(S)?(t.consume(S),p):w(S)}function y(S){return S===47?(t.consume(S),w):S===58||S===95||we(S)?(t.consume(S),T):nt(S)?(t.consume(S),y):w(S)}function T(S){return S===45||S===46||S===58||S===95||oe(S)?(t.consume(S),T):N(S)}function N(S){return S===61?(t.consume(S),E):nt(S)?(t.consume(S),N):y(S)}function E(S){return S===null||S===60||S===61||S===62||S===96?n(S):S===34||S===39?(t.consume(S),s=S,M):nt(S)?(t.consume(S),E):z(S)}function M(S){return S===s?(t.consume(S),s=null,Y):S===null||V(S)?n(S):(t.consume(S),M)}function z(S){return S===null||S===34||S===39||S===47||S===60||S===61||S===62||S===96||gt(S)?N(S):(t.consume(S),z)}function Y(S){return S===47||S===62||nt(S)?y(S):n(S)}function w(S){return S===62?(t.consume(S),P):n(S)}function P(S){return S===null||V(S)?q(S):nt(S)?(t.consume(S),P):n(S)}function q(S){return S===45&&i===2?(t.consume(S),dt):S===60&&i===1?(t.consume(S),kt):S===62&&i===4?(t.consume(S),Tt):S===63&&i===3?(t.consume(S),k):S===93&&i===5?(t.consume(S),L):V(S)&&(i===6||i===7)?(t.exit("htmlFlowData"),t.check(mE,Mt,B)(S)):S===null||V(S)?(t.exit("htmlFlowData"),B(S)):(t.consume(S),q)}function B(S){return t.check(pE,X,Mt)(S)}function X(S){return t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),K}function K(S){return S===null||V(S)?B(S):(t.enter("htmlFlowData"),q(S))}function dt(S){return S===45?(t.consume(S),k):q(S)}function kt(S){return S===47?(t.consume(S),a="",Qt):q(S)}function Qt(S){if(S===62){let ot=a.toLowerCase();return Wd.includes(ot)?(t.consume(S),Tt):q(S)}return we(S)&&a.length<8?(t.consume(S),a+=String.fromCharCode(S),Qt):q(S)}function L(S){return S===93?(t.consume(S),k):q(S)}function k(S){return S===62?(t.consume(S),Tt):S===45&&i===2?(t.consume(S),k):q(S)}function Tt(S){return S===null||V(S)?(t.exit("htmlFlowData"),Mt(S)):(t.consume(S),Tt)}function Mt(S){return t.exit("htmlFlow"),e(S)}}function yE(t,e,n){let l=this;return i;function i(a){return V(a)?(t.enter("lineEnding"),t.consume(a),t.exit("lineEnding"),r):n(a)}function r(a){return l.parser.lazy[l.now().line]?n(a):e(a)}}function vE(t,e,n){return l;function l(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),t.attempt(Jn,e,n)}}var em={name:"htmlText",tokenize:bE};function bE(t,e,n){let l=this,i,r,a;return o;function o(k){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(k),s}function s(k){return k===33?(t.consume(k),u):k===47?(t.consume(k),N):k===63?(t.consume(k),y):we(k)?(t.consume(k),z):n(k)}function u(k){return k===45?(t.consume(k),f):k===91?(t.consume(k),r=0,g):we(k)?(t.consume(k),p):n(k)}function f(k){return k===45?(t.consume(k),d):n(k)}function c(k){return k===null?n(k):k===45?(t.consume(k),m):V(k)?(a=c,kt(k)):(t.consume(k),c)}function m(k){return k===45?(t.consume(k),d):c(k)}function d(k){return k===62?dt(k):k===45?m(k):c(k)}function g(k){let Tt="CDATA[";return k===Tt.charCodeAt(r++)?(t.consume(k),r===Tt.length?x:g):n(k)}function x(k){return k===null?n(k):k===93?(t.consume(k),C):V(k)?(a=x,kt(k)):(t.consume(k),x)}function C(k){return k===93?(t.consume(k),h):x(k)}function h(k){return k===62?dt(k):k===93?(t.consume(k),h):x(k)}function p(k){return k===null||k===62?dt(k):V(k)?(a=p,kt(k)):(t.consume(k),p)}function y(k){return k===null?n(k):k===63?(t.consume(k),T):V(k)?(a=y,kt(k)):(t.consume(k),y)}function T(k){return k===62?dt(k):y(k)}function N(k){return we(k)?(t.consume(k),E):n(k)}function E(k){return k===45||oe(k)?(t.consume(k),E):M(k)}function M(k){return V(k)?(a=M,kt(k)):nt(k)?(t.consume(k),M):dt(k)}function z(k){return k===45||oe(k)?(t.consume(k),z):k===47||k===62||gt(k)?Y(k):n(k)}function Y(k){return k===47?(t.consume(k),dt):k===58||k===95||we(k)?(t.consume(k),w):V(k)?(a=Y,kt(k)):nt(k)?(t.consume(k),Y):dt(k)}function w(k){return k===45||k===46||k===58||k===95||oe(k)?(t.consume(k),w):P(k)}function P(k){return k===61?(t.consume(k),q):V(k)?(a=P,kt(k)):nt(k)?(t.consume(k),P):Y(k)}function q(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(t.consume(k),i=k,B):V(k)?(a=q,kt(k)):nt(k)?(t.consume(k),q):(t.consume(k),X)}function B(k){return k===i?(t.consume(k),i=void 0,K):k===null?n(k):V(k)?(a=B,kt(k)):(t.consume(k),B)}function X(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||gt(k)?Y(k):(t.consume(k),X)}function K(k){return k===47||k===62||gt(k)?Y(k):n(k)}function dt(k){return k===62?(t.consume(k),t.exit("htmlTextData"),t.exit("htmlText"),e):n(k)}function kt(k){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(k),t.exit("lineEnding"),Qt}function Qt(k){return nt(k)?tt(t,L,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):L(k)}function L(k){return t.enter("htmlTextData"),a(k)}}var _i={name:"labelEnd",resolveAll:wE,resolveTo:TE,tokenize:EE},xE={tokenize:CE},kE={tokenize:AE},SE={tokenize:NE};function wE(t){let e=-1,n=[];for(;++e<t.length;){let l=t[e][1];if(n.push(t[e]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){let i=l.type==="labelImage"?4:2;l.type="data",e+=i}}return t.length!==n.length&&de(t,0,t.length,n),t}function TE(t,e){let n=t.length,l=0,i,r,a,o;for(;n--;)if(i=t[n][1],r){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;t[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(t[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(r=n,i.type!=="labelLink")){l=2;break}}else i.type==="labelEnd"&&(a=n);let s={type:t[r][1].type==="labelLink"?"link":"image",start:{...t[r][1].start},end:{...t[t.length-1][1].end}},u={type:"label",start:{...t[r][1].start},end:{...t[a][1].end}},f={type:"labelText",start:{...t[r+l+2][1].end},end:{...t[a-2][1].start}};return o=[["enter",s,e],["enter",u,e]],o=We(o,t.slice(r+1,r+l+3)),o=We(o,[["enter",f,e]]),o=We(o,Jl(e.parser.constructs.insideSpan.null,t.slice(r+l+4,a-3),e)),o=We(o,[["exit",f,e],t[a-2],t[a-1],["exit",u,e]]),o=We(o,t.slice(a+1)),o=We(o,[["exit",s,e]]),de(t,r,t.length,o),t}function EE(t,e,n){let l=this,i=l.events.length,r,a;for(;i--;)if((l.events[i][1].type==="labelImage"||l.events[i][1].type==="labelLink")&&!l.events[i][1]._balanced){r=l.events[i][1];break}return o;function o(m){return r?r._inactive?c(m):(a=l.parser.defined.includes(Ve(l.sliceSerialize({start:r.end,end:l.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(m),t.exit("labelMarker"),t.exit("labelEnd"),s):n(m)}function s(m){return m===40?t.attempt(xE,f,a?f:c)(m):m===91?t.attempt(kE,f,a?u:c)(m):a?f(m):c(m)}function u(m){return t.attempt(SE,f,c)(m)}function f(m){return e(m)}function c(m){return r._balanced=!0,n(m)}}function CE(t,e,n){return l;function l(c){return t.enter("resource"),t.enter("resourceMarker"),t.consume(c),t.exit("resourceMarker"),i}function i(c){return gt(c)?Oi(t,r)(c):r(c)}function r(c){return c===41?f(c):yu(t,a,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(c)}function a(c){return gt(c)?Oi(t,s)(c):f(c)}function o(c){return n(c)}function s(c){return c===34||c===39||c===40?bu(t,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(c):f(c)}function u(c){return gt(c)?Oi(t,f)(c):f(c)}function f(c){return c===41?(t.enter("resourceMarker"),t.consume(c),t.exit("resourceMarker"),t.exit("resource"),e):n(c)}}function AE(t,e,n){let l=this;return i;function i(o){return vu.call(l,t,r,a,"reference","referenceMarker","referenceString")(o)}function r(o){return l.parser.defined.includes(Ve(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?e(o):n(o)}function a(o){return n(o)}}function NE(t,e,n){return l;function l(r){return t.enter("reference"),t.enter("referenceMarker"),t.consume(r),t.exit("referenceMarker"),i}function i(r){return r===93?(t.enter("referenceMarker"),t.consume(r),t.exit("referenceMarker"),t.exit("reference"),e):n(r)}}var nm={name:"labelStartImage",resolveAll:_i.resolveAll,tokenize:RE};function RE(t,e,n){let l=this;return i;function i(o){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(o),t.exit("labelImageMarker"),r}function r(o){return o===91?(t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelImage"),a):n(o)}function a(o){return o===94&&"_hiddenFootnoteSupport"in l.parser.constructs?n(o):e(o)}}var lm={name:"labelStartLink",resolveAll:_i.resolveAll,tokenize:ME};function ME(t,e,n){let l=this;return i;function i(a){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(a),t.exit("labelMarker"),t.exit("labelLink"),r}function r(a){return a===94&&"_hiddenFootnoteSupport"in l.parser.constructs?n(a):e(a)}}var ho={name:"lineEnding",tokenize:DE};function DE(t,e){return n;function n(l){return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),tt(t,e,"linePrefix")}}var zi={name:"thematicBreak",tokenize:OE};function OE(t,e,n){let l=0,i;return r;function r(u){return t.enter("thematicBreak"),a(u)}function a(u){return i=u,o(u)}function o(u){return u===i?(t.enter("thematicBreakSequence"),s(u)):l>=3&&(u===null||V(u))?(t.exit("thematicBreak"),e(u)):n(u)}function s(u){return u===i?(t.consume(u),l++,s):(t.exit("thematicBreakSequence"),nt(u)?tt(t,o,"whitespace")(u):o(u))}}var Fe={continuation:{tokenize:UE},exit:HE,name:"list",tokenize:LE},_E={partial:!0,tokenize:qE},zE={partial:!0,tokenize:BE};function LE(t,e,n){let l=this,i=l.events[l.events.length-1],r=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return o;function o(d){let g=l.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(g==="listUnordered"?!l.containerState.marker||d===l.containerState.marker:co(d)){if(l.containerState.type||(l.containerState.type=g,t.enter(g,{_container:!0})),g==="listUnordered")return t.enter("listItemPrefix"),d===42||d===45?t.check(zi,n,u)(d):u(d);if(!l.interrupt||d===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),s(d)}return n(d)}function s(d){return co(d)&&++a<10?(t.consume(d),s):(!l.interrupt||a<2)&&(l.containerState.marker?d===l.containerState.marker:d===41||d===46)?(t.exit("listItemValue"),u(d)):n(d)}function u(d){return t.enter("listItemMarker"),t.consume(d),t.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||d,t.check(Jn,l.interrupt?n:f,t.attempt(_E,m,c))}function f(d){return l.containerState.initialBlankLine=!0,r++,m(d)}function c(d){return nt(d)?(t.enter("listItemPrefixWhitespace"),t.consume(d),t.exit("listItemPrefixWhitespace"),m):n(d)}function m(d){return l.containerState.size=r+l.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(d)}}function UE(t,e,n){let l=this;return l.containerState._closeFlow=void 0,t.check(Jn,i,r);function i(o){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,tt(t,e,"listItemIndent",l.containerState.size+1)(o)}function r(o){return l.containerState.furtherBlankLines||!nt(o)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,a(o)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,t.attempt(zE,e,a)(o))}function a(o){return l.containerState._closeFlow=!0,l.interrupt=void 0,tt(t,t.attempt(Fe,e,n),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function BE(t,e,n){let l=this;return tt(t,i,"listItemIndent",l.containerState.size+1);function i(r){let a=l.events[l.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===l.containerState.size?e(r):n(r)}}function HE(t){t.exit(this.containerState.type)}function qE(t,e,n){let l=this;return tt(t,i,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(r){let a=l.events[l.events.length-1];return!nt(r)&&a&&a[1].type==="listItemPrefixWhitespace"?e(r):n(r)}}var xu={name:"setextUnderline",resolveTo:IE,tokenize:jE};function IE(t,e){let n=t.length,l,i,r;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){l=n;break}t[n][1].type==="paragraph"&&(i=n)}else t[n][1].type==="content"&&t.splice(n,1),!r&&t[n][1].type==="definition"&&(r=n);let a={type:"setextHeading",start:{...t[l][1].start},end:{...t[t.length-1][1].end}};return t[i][1].type="setextHeadingText",r?(t.splice(i,0,["enter",a,e]),t.splice(r+1,0,["exit",t[l][1],e]),t[l][1].end={...t[r][1].end}):t[l][1]=a,t.push(["exit",a,e]),t}function jE(t,e,n){let l=this,i;return r;function r(u){let f=l.events.length,c;for(;f--;)if(l.events[f][1].type!=="lineEnding"&&l.events[f][1].type!=="linePrefix"&&l.events[f][1].type!=="content"){c=l.events[f][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||c)?(t.enter("setextHeadingLine"),i=u,a(u)):n(u)}function a(u){return t.enter("setextHeadingLineSequence"),o(u)}function o(u){return u===i?(t.consume(u),o):(t.exit("setextHeadingLineSequence"),nt(u)?tt(t,s,"lineSuffix")(u):s(u))}function s(u){return u===null||V(u)?(t.exit("setextHeadingLine"),e(u)):n(u)}}var Fb={tokenize:YE};function YE(t){let e=this,n=t.attempt(Jn,l,t.attempt(this.parser.constructs.flowInitial,i,tt(t,t.attempt(this.parser.constructs.flow,i,t.attempt(Zd,i)),"linePrefix")));return n;function l(r){if(r===null){t.consume(r);return}return t.enter("lineEndingBlank"),t.consume(r),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function i(r){if(r===null){t.consume(r);return}return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),e.currentConstruct=void 0,n}}var Qb={resolveAll:Zb()},Gb=Pb("string"),Xb=Pb("text");function Pb(t){return{resolveAll:Zb(t==="text"?VE:void 0),tokenize:e};function e(n){let l=this,i=this.parser.constructs[t],r=n.attempt(i,a,o);return a;function a(f){return u(f)?r(f):o(f)}function o(f){if(f===null){n.consume(f);return}return n.enter("data"),n.consume(f),s}function s(f){return u(f)?(n.exit("data"),r(f)):(n.consume(f),s)}function u(f){if(f===null)return!0;let c=i[f],m=-1;if(c)for(;++m<c.length;){let d=c[m];if(!d.previous||d.previous.call(l,l.previous))return!0}return!1}}}function Zb(t){return e;function e(n,l){let i=-1,r;for(;++i<=n.length;)r===void 0?n[i]&&n[i][1].type==="data"&&(r=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==r+2&&(n[r][1].end=n[i-1][1].end,n.splice(r+2,i-r-2),i=r+2),r=void 0);return t?t(n,l):n}}function VE(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){let l=t[n-1][1],i=e.sliceStream(l),r=i.length,a=-1,o=0,s;for(;r--;){let u=i[r];if(typeof u=="string"){for(a=u.length;u.charCodeAt(a-1)===32;)o++,a--;if(a)break;a=-1}else if(u===-2)s=!0,o++;else if(u!==-1){r++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(o=0),o){let u={type:n===t.length||s||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:r?a:l.start._bufferIndex+a,_index:l.start._index+r,line:l.end.line,column:l.end.column-o,offset:l.end.offset-o},end:{...l.end}};l.end={...u.start},l.start.offset===l.end.offset?Object.assign(l,u):(t.splice(n,0,["enter",u,e],["exit",u,e]),n+=2)}n++}return t}var im={};vp(im,{attentionMarkers:()=>JE,contentInitial:()=>QE,disable:()=>$E,document:()=>FE,flow:()=>XE,flowInitial:()=>GE,insideSpan:()=>KE,string:()=>PE,text:()=>ZE});var FE={42:Fe,43:Fe,45:Fe,48:Fe,49:Fe,50:Fe,51:Fe,52:Fe,53:Fe,54:Fe,55:Fe,56:Fe,57:Fe,62:fu},QE={91:Kd},GE={[-2]:mo,[-1]:mo,32:mo},XE={35:$d,42:zi,45:[xu,zi],60:tm,61:xu,95:zi,96:pu,126:pu},PE={38:mu,92:du},ZE={[-5]:ho,[-4]:ho,[-3]:ho,33:nm,38:mu,42:fo,60:[Xd,em],91:lm,92:[Jd,du],93:_i,95:fo,96:Pd},KE={null:[fo,Qb]},JE={null:[42,95]},$E={null:[]};function Kb(t,e,n){let l={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},r=[],a=[],o=[],s=!0,u={attempt:Y(M),check:Y(z),consume:T,enter:N,exit:E,interrupt:Y(z,{interrupt:!0})},f={code:null,containerState:{},defineSkip:h,events:[],now:C,parser:t,previous:null,sliceSerialize:g,sliceStream:x,write:d},c=e.tokenize.call(f,u),m;return e.resolveAll&&r.push(e),f;function d(B){return a=We(a,B),p(),a[a.length-1]!==null?[]:(w(e,0),f.events=Jl(r,f.events,f),f.events)}function g(B,X){return tC(x(B),X)}function x(B){return WE(a,B)}function C(){let{_bufferIndex:B,_index:X,line:K,column:dt,offset:kt}=l;return{_bufferIndex:B,_index:X,line:K,column:dt,offset:kt}}function h(B){i[B.line]=B.column,q()}function p(){let B;for(;l._index<a.length;){let X=a[l._index];if(typeof X=="string")for(B=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===B&&l._bufferIndex<X.length;)y(X.charCodeAt(l._bufferIndex));else y(X)}}function y(B){s=void 0,m=B,c=c(B)}function T(B){V(B)?(l.line++,l.column=1,l.offset+=B===-3?2:1,q()):B!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===a[l._index].length&&(l._bufferIndex=-1,l._index++)),f.previous=B,s=!0}function N(B,X){let K=X||{};return K.type=B,K.start=C(),f.events.push(["enter",K,f]),o.push(K),K}function E(B){let X=o.pop();return X.end=C(),f.events.push(["exit",X,f]),X}function M(B,X){w(B,X.from)}function z(B,X){X.restore()}function Y(B,X){return K;function K(dt,kt,Qt){let L,k,Tt,Mt;return Array.isArray(dt)?ot(dt):"tokenize"in dt?ot([dt]):S(dt);function S(ht){return se;function se(Pt){let ge=Pt!==null&&ht[Pt],j=Pt!==null&&ht.null,F=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(j)?j:j?[j]:[]];return ot(F)(Pt)}}function ot(ht){return L=ht,k=0,ht.length===0?Qt:pe(ht[k])}function pe(ht){return se;function se(Pt){return Mt=P(),Tt=ht,ht.partial||(f.currentConstruct=ht),ht.name&&f.parser.constructs.disable.null.includes(ht.name)?Ae(Pt):ht.tokenize.call(X?Object.assign(Object.create(f),X):f,u,he,Ae)(Pt)}}function he(ht){return s=!0,B(Tt,Mt),kt}function Ae(ht){return s=!0,Mt.restore(),++k<L.length?pe(L[k]):Qt}}}function w(B,X){B.resolveAll&&!r.includes(B)&&r.push(B),B.resolve&&de(f.events,X,f.events.length-X,B.resolve(f.events.slice(X),f)),B.resolveTo&&(f.events=B.resolveTo(f.events,f))}function P(){let B=C(),X=f.previous,K=f.currentConstruct,dt=f.events.length,kt=Array.from(o);return{from:dt,restore:Qt};function Qt(){l=B,f.previous=X,f.currentConstruct=K,f.events.length=dt,o=kt,q()}}function q(){l.line in i&&l.column<2&&(l.column=i[l.line],l.offset+=i[l.line]-1)}}function WE(t,e){let n=e.start._index,l=e.start._bufferIndex,i=e.end._index,r=e.end._bufferIndex,a;if(n===i)a=[t[n].slice(l,r)];else{if(a=t.slice(n,i),l>-1){let o=a[0];typeof o=="string"?a[0]=o.slice(l):a.shift()}r>0&&a.push(t[i].slice(0,r))}return a}function tC(t,e){let n=-1,l=[],i;for(;++n<t.length;){let r=t[n],a;if(typeof r=="string")a=r;else switch(r){case-5:{a="\r";break}case-4:{a=`
11
11
  `;break}case-3:{a=`\r
12
- `;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(r)}i=r===-2,l.push(a)}return l.join("")}function em(t){let l={constructs:as([tm,...(t||{}).extensions||[]]),content:i(Db),defined:[],document:i(Ob),flow:i(Bb),lazy:{},string:i(qb),text:i(Ib)};return l;function i(r){return a;function a(o){return Vb(l,r,o)}}}function nm(t){for(;!ms(t););return t}var Fb=/[\0\t\n\r]/g;function lm(){let t=1,e="",n=!0,l;return i;function i(r,a,o){let u=[],s,f,c,m,d;for(r=e+(typeof r=="string"?r.toString():new TextDecoder(a||void 0).decode(r)),c=0,e="",n&&(r.charCodeAt(0)===65279&&c++,n=void 0);c<r.length;){if(Fb.lastIndex=c,s=Fb.exec(r),m=s&&s.index!==void 0?s.index:r.length,d=r.charCodeAt(m),!s){e=r.slice(c);break}if(d===10&&c===m&&l)u.push(-3),l=void 0;else switch(l&&(u.push(-5),l=void 0),c<m&&(u.push(r.slice(c,m)),t+=m-c),d){case 0:{u.push(65533),t++;break}case 9:{for(f=Math.ceil(t/4)*4,u.push(-2);t++<f;)u.push(-1);break}case 10:{u.push(-4),t=1;break}default:l=!0,t=1}c=m+1}return o&&(l&&u.push(-5),e&&u.push(e),u.push(null)),u}}var qE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Qb(t){return t.replace(qE,IE)}function IE(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),r=i===120||i===88;return os(n.slice(r?2:1),r?16:10)}return Lr(n)||t}var Xb={}.hasOwnProperty;function im(t,e,n){return typeof e!="string"&&(n=e,e=void 0),jE(n)(nm(em(n).document().write(lm()(t,e,!0))))}function jE(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(Ke),autolinkProtocol:I,autolinkEmail:I,atxHeading:r(Jt),blockQuote:r(j),characterEscape:I,characterReference:I,codeFenced:r(V),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:r(V,a),codeText:r(W,a),codeTextData:I,data:I,codeFlowValue:I,definition:r(kt),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:r(Re),hardBreakEscape:r(Ze),hardBreakTrailing:r(Ze),htmlFlow:r(ce,a),htmlFlowData:I,htmlText:r(ce,a),htmlTextData:I,image:r(Ye),label:a,link:r(Ke),listItem:r(Me),listItemValue:m,listOrdered:r(Qt,c),listUnordered:r(Qt),paragraph:r(yn),reference:k,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:r(Jt),strong:r(De),thematicBreak:r(_e)},exit:{atxHeading:u(),atxHeadingSequence:A,autolink:u(),autolinkEmail:Z,autolinkProtocol:B,blockQuote:u(),characterEscapeValue:T,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:me,characterReference:pe,codeFenced:u(N),codeFencedFence:b,codeFencedFenceInfo:d,codeFencedFenceMeta:g,codeFlowValue:T,codeIndented:u(p),codeText:u(tt),codeTextData:T,data:T,definition:u(),definitionDestinationString:w,definitionLabelString:h,definitionTitleString:y,emphasis:u(),hardBreakEscape:u(K),hardBreakTrailing:u(K),htmlFlow:u(G),htmlFlowData:T,htmlText:u(P),htmlTextData:T,image:u(gt),label:H,labelText:Ot,lineEnding:lt,link:u(ot),listItem:u(),listOrdered:u(),listUnordered:u(),paragraph:u(),referenceString:ct,resourceDestinationString:x,resourceTitleString:Nt,resource:At,setextHeading:u(L),setextHeadingLineSequence:D,setextHeadingText:E,strong:u(),thematicBreak:u()}};Pb(e,(t||{}).mdastExtensions||[]);let n={};return l;function l(M){let q={type:"root",children:[]},et={stack:[q],tokenStack:[],config:e,enter:o,exit:s,buffer:a,resume:f,data:n},at=[],R=-1;for(;++R<M.length;)if(M[R][1].type==="listOrdered"||M[R][1].type==="listUnordered")if(M[R][0]==="enter")at.push(R);else{let F=at.pop();R=i(M,F,R)}for(R=-1;++R<M.length;){let F=e[M[R][0]];Xb.call(F,M[R][1].type)&&F[M[R][1].type].call(Object.assign({sliceSerialize:M[R][2].sliceSerialize},et),M[R][1])}if(et.tokenStack.length>0){let F=et.tokenStack[et.tokenStack.length-1];(F[1]||Gb).call(et,void 0,F[0])}for(q.position={start:Zl(M.length>0?M[0][1].start:{line:1,column:1,offset:0}),end:Zl(M.length>0?M[M.length-2][1].end:{line:1,column:1,offset:0})},R=-1;++R<e.transforms.length;)q=e.transforms[R](q)||q;return q}function i(M,q,et){let at=q-1,R=-1,F=!1,S,z,X,mt;for(;++at<=et;){let ft=M[at];switch(ft[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ft[0]==="enter"?R++:R--,mt=void 0;break}case"lineEndingBlank":{ft[0]==="enter"&&(S&&!mt&&!R&&!X&&(X=at),mt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mt=void 0}if(!R&&ft[0]==="enter"&&ft[1].type==="listItemPrefix"||R===-1&&ft[0]==="exit"&&(ft[1].type==="listUnordered"||ft[1].type==="listOrdered")){if(S){let zt=at;for(z=void 0;zt--;){let jt=M[zt];if(jt[1].type==="lineEnding"||jt[1].type==="lineEndingBlank"){if(jt[0]==="exit")continue;z&&(M[z][1].type="lineEndingBlank",F=!0),jt[1].type="lineEnding",z=zt}else if(!(jt[1].type==="linePrefix"||jt[1].type==="blockQuotePrefix"||jt[1].type==="blockQuotePrefixWhitespace"||jt[1].type==="blockQuoteMarker"||jt[1].type==="listItemIndent"))break}X&&(!z||X<z)&&(S._spread=!0),S.end=Object.assign({},z?M[z][1].start:ft[1].end),M.splice(z||at,0,["exit",S,ft[2]]),at++,et++}if(ft[1].type==="listItemPrefix"){let zt={type:"listItem",_spread:!1,start:Object.assign({},ft[1].start),end:void 0};S=zt,M.splice(at,0,["enter",zt,ft[2]]),at++,et++,X=void 0,mt=!0}}}return M[q][1]._spread=F,et}function r(M,q){return et;function et(at){o.call(this,M(at),at),q&&q.call(this,at)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(M,q,et){this.stack[this.stack.length-1].children.push(M),this.stack.push(M),this.tokenStack.push([q,et||void 0]),M.position={start:Zl(q.start),end:void 0}}function u(M){return q;function q(et){M&&M.call(this,et),s.call(this,et)}}function s(M,q){let et=this.stack.pop(),at=this.tokenStack.pop();if(at)at[0].type!==M.type&&(q?q.call(this,M,at[0]):(at[1]||Gb).call(this,M,at[0]));else throw new Error("Cannot close `"+M.type+"` ("+Gl({start:M.start,end:M.end})+"): it\u2019s not open");et.position.end=Zl(M.end)}function f(){return Ci(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function m(M){if(this.data.expectingFirstListItemValue){let q=this.stack[this.stack.length-2];q.start=Number.parseInt(this.sliceSerialize(M),10),this.data.expectingFirstListItemValue=void 0}}function d(){let M=this.resume(),q=this.stack[this.stack.length-1];q.lang=M}function g(){let M=this.resume(),q=this.stack[this.stack.length-1];q.meta=M}function b(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){let M=this.resume(),q=this.stack[this.stack.length-1];q.value=M.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function p(){let M=this.resume(),q=this.stack[this.stack.length-1];q.value=M.replace(/(\r?\n|\r)$/g,"")}function h(M){let q=this.resume(),et=this.stack[this.stack.length-1];et.label=q,et.identifier=Ue(this.sliceSerialize(M)).toLowerCase()}function y(){let M=this.resume(),q=this.stack[this.stack.length-1];q.title=M}function w(){let M=this.resume(),q=this.stack[this.stack.length-1];q.url=M}function A(M){let q=this.stack[this.stack.length-1];if(!q.depth){let et=this.sliceSerialize(M).length;q.depth=et}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function D(M){let q=this.stack[this.stack.length-1];q.depth=this.sliceSerialize(M).codePointAt(0)===61?1:2}function L(){this.data.setextHeadingSlurpLineEnding=void 0}function I(M){let et=this.stack[this.stack.length-1].children,at=et[et.length-1];(!at||at.type!=="text")&&(at=Je(),at.position={start:Zl(M.start),end:void 0},et.push(at)),this.stack.push(at)}function T(M){let q=this.stack.pop();q.value+=this.sliceSerialize(M),q.position.end=Zl(M.end)}function lt(M){let q=this.stack[this.stack.length-1];if(this.data.atHardBreak){let et=q.children[q.children.length-1];et.position.end=Zl(M.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(q.type)&&(I.call(this,M),T.call(this,M))}function K(){this.data.atHardBreak=!0}function G(){let M=this.resume(),q=this.stack[this.stack.length-1];q.value=M}function P(){let M=this.resume(),q=this.stack[this.stack.length-1];q.value=M}function tt(){let M=this.resume(),q=this.stack[this.stack.length-1];q.value=M}function ot(){let M=this.stack[this.stack.length-1];if(this.data.inReference){let q=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=q,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function gt(){let M=this.stack[this.stack.length-1];if(this.data.inReference){let q=this.data.referenceType||"shortcut";M.type+="Reference",M.referenceType=q,delete M.url,delete M.title}else delete M.identifier,delete M.label;this.data.referenceType=void 0}function Ot(M){let q=this.sliceSerialize(M),et=this.stack[this.stack.length-2];et.label=Qb(q),et.identifier=Ue(q).toLowerCase()}function H(){let M=this.stack[this.stack.length-1],q=this.resume(),et=this.stack[this.stack.length-1];if(this.data.inReference=!0,et.type==="link"){let at=M.children;et.children=at}else et.alt=q}function x(){let M=this.resume(),q=this.stack[this.stack.length-1];q.url=M}function Nt(){let M=this.resume(),q=this.stack[this.stack.length-1];q.title=M}function At(){this.data.inReference=void 0}function k(){this.data.referenceType="collapsed"}function ct(M){let q=this.resume(),et=this.stack[this.stack.length-1];et.label=q,et.identifier=Ue(this.sliceSerialize(M)).toLowerCase(),this.data.referenceType="full"}function be(M){this.data.characterReferenceType=M.type}function me(M){let q=this.sliceSerialize(M),et=this.data.characterReferenceType,at;et?(at=os(q,et==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):at=Lr(q);let R=this.stack[this.stack.length-1];R.value+=at}function pe(M){let q=this.stack.pop();q.position.end=Zl(M.end)}function B(M){T.call(this,M);let q=this.stack[this.stack.length-1];q.url=this.sliceSerialize(M)}function Z(M){T.call(this,M);let q=this.stack[this.stack.length-1];q.url="mailto:"+this.sliceSerialize(M)}function j(){return{type:"blockquote",children:[]}}function V(){return{type:"code",lang:null,meta:null,value:""}}function W(){return{type:"inlineCode",value:""}}function kt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Re(){return{type:"emphasis",children:[]}}function Jt(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function ce(){return{type:"html",value:""}}function Ye(){return{type:"image",title:null,url:"",alt:null}}function Ke(){return{type:"link",title:null,url:"",children:[]}}function Qt(M){return{type:"list",ordered:M.type==="listOrdered",start:null,spread:M._spread,children:[]}}function Me(M){return{type:"listItem",spread:M._spread,checked:null,children:[]}}function yn(){return{type:"paragraph",children:[]}}function De(){return{type:"strong",children:[]}}function Je(){return{type:"text",value:""}}function _e(){return{type:"thematicBreak"}}}function Zl(t){return{line:t.line,column:t.column,offset:t.offset}}function Pb(t,e){let n=-1;for(;++n<e.length;){let l=e[n];Array.isArray(l)?Pb(t,l):YE(t,l)}}function YE(t,e){let n;for(n in e)if(Xb.call(e,n))switch(n){case"canContainEols":{let l=e[n];l&&t[n].push(...l);break}case"transforms":{let l=e[n];l&&t[n].push(...l);break}case"enter":case"exit":{let l=e[n];l&&Object.assign(t[n],l);break}}}function Gb(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Gl({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Gl({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Gl({start:e.start,end:e.end})+") is still open")}function vs(t){let e=this;e.parser=n;function n(l){return im(l,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function Zb(t,e){let n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function Kb(t,e){let n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
13
- `}]}function Jb(t,e){let n=e.value?e.value+`
14
- `:"",l={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(l.className=["language-"+i[0]]);let r={type:"element",tagName:"code",properties:l,children:[{type:"text",value:n}]};return e.meta&&(r.data={meta:e.meta}),t.patch(e,r),r=t.applyData(e,r),r={type:"element",tagName:"pre",properties:{},children:[r]},t.patch(e,r),r}function $b(t,e){let n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Wb(t,e){let n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function t0(t,e){let n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",l=String(e.identifier).toUpperCase(),i=Mn(l.toLowerCase()),r=t.footnoteOrder.indexOf(l),a,o=t.footnoteCounts.get(l);o===void 0?(o=0,t.footnoteOrder.push(l),a=t.footnoteOrder.length):a=r+1,o+=1,t.footnoteCounts.set(l,o);let u={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,u);let s={type:"element",tagName:"sup",properties:{},children:[u]};return t.patch(e,s),t.applyData(e,s)}function e0(t,e){let n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function n0(t,e){if(t.options.allowDangerousHtml){let n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function bs(t,e){let n=e.referenceType,l="]";if(n==="collapsed"?l+="[]":n==="full"&&(l+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+l}];let i=t.all(e),r=i[0];r&&r.type==="text"?r.value="["+r.value:i.unshift({type:"text",value:"["});let a=i[i.length-1];return a&&a.type==="text"?a.value+=l:i.push({type:"text",value:l}),i}function l0(t,e){let n=String(e.identifier).toUpperCase(),l=t.definitionById.get(n);if(!l)return bs(t,e);let i={src:Mn(l.url||""),alt:e.alt};l.title!==null&&l.title!==void 0&&(i.title=l.title);let r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,r),t.applyData(e,r)}function i0(t,e){let n={src:Mn(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);let l={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,l),t.applyData(e,l)}function r0(t,e){let n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);let l={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,l),t.applyData(e,l)}function a0(t,e){let n=String(e.identifier).toUpperCase(),l=t.definitionById.get(n);if(!l)return bs(t,e);let i={href:Mn(l.url||"")};l.title!==null&&l.title!==void 0&&(i.title=l.title);let r={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function o0(t,e){let n={href:Mn(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);let l={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,l),t.applyData(e,l)}function u0(t,e,n){let l=t.all(e),i=n?VE(n):s0(e),r={},a=[];if(typeof e.checked=="boolean"){let f=l[0],c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},l.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let o=-1;for(;++o<l.length;){let f=l[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
15
- `}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}let u=l[l.length-1];u&&(i||u.type!=="element"||u.tagName!=="p")&&a.push({type:"text",value:`
16
- `});let s={type:"element",tagName:"li",properties:r,children:a};return t.patch(e,s),t.applyData(e,s)}function VE(t){let e=!1;if(t.type==="list"){e=t.spread||!1;let n=t.children,l=-1;for(;!e&&++l<n.length;)e=s0(n[l])}return e}function s0(t){let e=t.spread;return e??t.children.length>1}function c0(t,e){let n={},l=t.all(e),i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i<l.length;){let a=l[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let r={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(l,!0)};return t.patch(e,r),t.applyData(e,r)}function f0(t,e){let n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function d0(t,e){let n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function m0(t,e){let n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function p0(t,e){let n=t.all(e),l=n.shift(),i=[];if(l){let a={type:"element",tagName:"thead",properties:{},children:t.wrap([l],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){let a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},o=zr(e.children[1]),u=is(e.children[e.children.length-1]);o&&u&&(a.position={start:o,end:u}),i.push(a)}let r={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,r),t.applyData(e,r)}function h0(t,e,n){let l=n?n.children:void 0,r=(l?l.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:e.children.length,u=-1,s=[];for(;++u<o;){let c=e.children[u],m={},d=a?a[u]:void 0;d&&(m.align=d);let g={type:"element",tagName:r,properties:m,children:[]};c&&(g.children=t.all(c),t.patch(c,g),g=t.applyData(c,g)),s.push(g)}let f={type:"element",tagName:"tr",properties:{},children:t.wrap(s,!0)};return t.patch(e,f),t.applyData(e,f)}function g0(t,e){let n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function v0(t){let e=String(t),n=/\r?\n|\r/g,l=n.exec(e),i=0,r=[];for(;l;)r.push(y0(e.slice(i,l.index),i>0,!0),l[0]),i=l.index+l[0].length,l=n.exec(e);return r.push(y0(e.slice(i),i>0,!1)),r.join("")}function y0(t,e,n){let l=0,i=t.length;if(e){let r=t.codePointAt(l);for(;r===9||r===32;)l++,r=t.codePointAt(l)}if(n){let r=t.codePointAt(i-1);for(;r===9||r===32;)i--,r=t.codePointAt(i-1)}return i>l?t.slice(l,i):""}function b0(t,e){let n={type:"text",value:v0(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function x0(t,e){let n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}var k0={blockquote:Zb,break:Kb,code:Jb,delete:$b,emphasis:Wb,footnoteReference:t0,heading:e0,html:n0,imageReference:l0,image:i0,inlineCode:r0,linkReference:a0,link:o0,listItem:u0,list:c0,paragraph:f0,root:d0,strong:m0,table:p0,tableCell:g0,tableRow:h0,text:b0,thematicBreak:x0,toml:xs,yaml:xs,definition:xs,footnoteDefinition:xs};function xs(){}var S0=typeof self=="object"?self:globalThis,XE=(t,e)=>{let n=(i,r)=>(t.set(r,i),i),l=i=>{if(t.has(i))return t.get(i);let[r,a]=e[i];switch(r){case 0:case-1:return n(a,i);case 1:{let o=n([],i);for(let u of a)o.push(l(u));return o}case 2:{let o=n({},i);for(let[u,s]of a)o[l(u)]=l(s);return o}case 3:return n(new Date(a),i);case 4:{let{source:o,flags:u}=a;return n(new RegExp(o,u),i)}case 5:{let o=n(new Map,i);for(let[u,s]of a)o.set(l(u),l(s));return o}case 6:{let o=n(new Set,i);for(let u of a)o.add(l(u));return o}case 7:{let{name:o,message:u}=a;return n(new S0[o](u),i)}case 8:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new S0[r](a),i)};return l},om=t=>XE(new Map,t)(0);var Ur="",{toString:PE}={},{keys:ZE}=Object,mo=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let n=PE.call(t).slice(8,-1);switch(n){case"Array":return[1,Ur];case"Object":return[2,Ur];case"Date":return[3,Ur];case"RegExp":return[4,Ur];case"Map":return[5,Ur];case"Set":return[6,Ur];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Ss=([t,e])=>t===0&&(e==="function"||e==="symbol"),KE=(t,e,n,l)=>{let i=(a,o)=>{let u=l.push(a)-1;return n.set(o,u),u},r=a=>{if(n.has(a))return n.get(a);let[o,u]=mo(a);switch(o){case 0:{let f=a;switch(u){case"bigint":o=8,f=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+u);f=null;break;case"undefined":return i([-1],a)}return i([o,f],a)}case 1:{if(u){let m=a;return u==="DataView"?m=new Uint8Array(a.buffer):u==="ArrayBuffer"&&(m=new Uint8Array(a)),i([u,[...m]],a)}let f=[],c=i([o,f],a);for(let m of a)f.push(r(m));return c}case 2:{if(u)switch(u){case"BigInt":return i([u,a.toString()],a);case"Boolean":case"Number":case"String":return i([u,a.valueOf()],a)}if(e&&"toJSON"in a)return r(a.toJSON());let f=[],c=i([o,f],a);for(let m of ZE(a))(t||!Ss(mo(a[m])))&&f.push([r(m),r(a[m])]);return c}case 3:return i([o,a.toISOString()],a);case 4:{let{source:f,flags:c}=a;return i([o,{source:f,flags:c}],a)}case 5:{let f=[],c=i([o,f],a);for(let[m,d]of a)(t||!(Ss(mo(m))||Ss(mo(d))))&&f.push([r(m),r(d)]);return c}case 6:{let f=[],c=i([o,f],a);for(let m of a)(t||!Ss(mo(m)))&&f.push(r(m));return c}}let{message:s}=a;return i([o,{name:u,message:s}],a)};return r},um=(t,{json:e,lossy:n}={})=>{let l=[];return KE(!(e||n),!!e,new Map,l)(t),l};var Br=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?om(um(t,e)):structuredClone(t):(t,e)=>om(um(t,e));function JE(t,e){let n=[{type:"text",value:"\u21A9"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function $E(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function N0(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||JE,l=t.options.footnoteBackLabel||$E,i=t.options.footnoteLabel||"Footnotes",r=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},o=[],u=-1;for(;++u<t.footnoteOrder.length;){let s=t.footnoteById.get(t.footnoteOrder[u]);if(!s)continue;let f=t.all(s),c=String(s.identifier).toUpperCase(),m=Mn(c.toLowerCase()),d=0,g=[],b=t.footnoteCounts.get(c);for(;b!==void 0&&++d<=b;){g.length>0&&g.push({type:"text",value:" "});let h=typeof n=="string"?n:n(u,d);typeof h=="string"&&(h={type:"text",value:h}),g.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+m+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(u,d),className:["data-footnote-backref"]},children:Array.isArray(h)?h:[h]})}let N=f[f.length-1];if(N&&N.type==="element"&&N.tagName==="p"){let h=N.children[N.children.length-1];h&&h.type==="text"?h.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...g)}else f.push(...g);let p={type:"element",tagName:"li",properties:{id:e+"fn-"+m},children:t.wrap(f,!0)};t.patch(s,p),o.push(p)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...Br(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
12
+ `;break}case-2:{a=e?" ":" ";break}case-1:{if(!e&&i)continue;a=" ";break}default:a=String.fromCharCode(r)}i=r===-2,l.push(a)}return l.join("")}function rm(t){let l={constructs:uu([im,...(t||{}).extensions||[]]),content:i(Hb),defined:[],document:i(Ib),flow:i(Fb),lazy:{},string:i(Gb),text:i(Xb)};return l;function i(r){return a;function a(o){return Kb(l,r,o)}}}function am(t){for(;!gu(t););return t}var Jb=/[\0\t\n\r]/g;function om(){let t=1,e="",n=!0,l;return i;function i(r,a,o){let s=[],u,f,c,m,d;for(r=e+(typeof r=="string"?r.toString():new TextDecoder(a||void 0).decode(r)),c=0,e="",n&&(r.charCodeAt(0)===65279&&c++,n=void 0);c<r.length;){if(Jb.lastIndex=c,u=Jb.exec(r),m=u&&u.index!==void 0?u.index:r.length,d=r.charCodeAt(m),!u){e=r.slice(c);break}if(d===10&&c===m&&l)s.push(-3),l=void 0;else switch(l&&(s.push(-5),l=void 0),c<m&&(s.push(r.slice(c,m)),t+=m-c),d){case 0:{s.push(65533),t++;break}case 9:{for(f=Math.ceil(t/4)*4,s.push(-2);t++<f;)s.push(-1);break}case 10:{s.push(-4),t=1;break}default:l=!0,t=1}c=m+1}return o&&(l&&s.push(-5),e&&s.push(e),s.push(null)),s}}var eC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function $b(t){return t.replace(eC,nC)}function nC(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),r=i===120||i===88;return cu(n.slice(r?2:1),r?16:10)}return Hr(n)||t}var t0={}.hasOwnProperty;function sm(t,e,n){return typeof e!="string"&&(n=e,e=void 0),lC(n)(am(rm(n).document().write(om()(t,e,!0))))}function lC(t){let e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(Ne),autolinkProtocol:Y,autolinkEmail:Y,atxHeading:r(W),blockQuote:r(Pt),characterEscape:Y,characterReference:Y,codeFenced:r(ge),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:r(ge,a),codeText:r(j,a),codeTextData:Y,data:Y,codeFlowValue:Y,definition:r(F),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:r(Z),hardBreakEscape:r(lt),hardBreakTrailing:r(lt),htmlFlow:r(st,a),htmlFlowData:Y,htmlText:r(st,a),htmlTextData:Y,image:r(Dt),label:a,link:r(Ne),listItem:r(It),listItemValue:m,listOrdered:r(Vt,c),listUnordered:r(Vt),paragraph:r(Xe),reference:S,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:r(W),strong:r(Le),thematicBreak:r(Pe)},exit:{atxHeading:s(),atxHeadingSequence:N,autolink:s(),autolinkEmail:se,autolinkProtocol:ht,blockQuote:s(),characterEscapeValue:w,characterReferenceMarkerHexadecimal:pe,characterReferenceMarkerNumeric:pe,characterReferenceValue:he,characterReference:Ae,codeFenced:s(C),codeFencedFence:x,codeFencedFenceInfo:d,codeFencedFenceMeta:g,codeFlowValue:w,codeIndented:s(h),codeText:s(K),codeTextData:w,data:w,definition:s(),definitionDestinationString:T,definitionLabelString:p,definitionTitleString:y,emphasis:s(),hardBreakEscape:s(q),hardBreakTrailing:s(q),htmlFlow:s(B),htmlFlowData:w,htmlText:s(X),htmlTextData:w,image:s(kt),label:L,labelText:Qt,lineEnding:P,link:s(dt),listItem:s(),listOrdered:s(),listUnordered:s(),paragraph:s(),referenceString:ot,resourceDestinationString:k,resourceTitleString:Tt,resource:Mt,setextHeading:s(z),setextHeadingLineSequence:M,setextHeadingText:E,strong:s(),thematicBreak:s()}};e0(e,(t||{}).mdastExtensions||[]);let n={};return l;function l(R){let H={type:"root",children:[]},et={stack:[H],tokenStack:[],config:e,enter:o,exit:u,buffer:a,resume:f,data:n},rt=[],Et=-1;for(;++Et<R.length;)if(R[Et][1].type==="listOrdered"||R[Et][1].type==="listUnordered")if(R[Et][0]==="enter")rt.push(Et);else{let be=rt.pop();Et=i(R,be,Et)}for(Et=-1;++Et<R.length;){let be=e[R[Et][0]];t0.call(be,R[Et][1].type)&&be[R[Et][1].type].call(Object.assign({sliceSerialize:R[Et][2].sliceSerialize},et),R[Et][1])}if(et.tokenStack.length>0){let be=et.tokenStack[et.tokenStack.length-1];(be[1]||Wb).call(et,void 0,be[0])}for(H.position={start:$l(R.length>0?R[0][1].start:{line:1,column:1,offset:0}),end:$l(R.length>0?R[R.length-2][1].end:{line:1,column:1,offset:0})},Et=-1;++Et<e.transforms.length;)H=e.transforms[Et](H)||H;return H}function i(R,H,et){let rt=H-1,Et=-1,be=!1,v,O,I,Q;for(;++rt<=et;){let J=R[rt];switch(J[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{J[0]==="enter"?Et++:Et--,Q=void 0;break}case"lineEndingBlank":{J[0]==="enter"&&(v&&!Q&&!Et&&!I&&(I=rt),Q=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Q=void 0}if(!Et&&J[0]==="enter"&&J[1].type==="listItemPrefix"||Et===-1&&J[0]==="exit"&&(J[1].type==="listUnordered"||J[1].type==="listOrdered")){if(v){let Gt=rt;for(O=void 0;Gt--;){let Ct=R[Gt];if(Ct[1].type==="lineEnding"||Ct[1].type==="lineEndingBlank"){if(Ct[0]==="exit")continue;O&&(R[O][1].type="lineEndingBlank",be=!0),Ct[1].type="lineEnding",O=Gt}else if(!(Ct[1].type==="linePrefix"||Ct[1].type==="blockQuotePrefix"||Ct[1].type==="blockQuotePrefixWhitespace"||Ct[1].type==="blockQuoteMarker"||Ct[1].type==="listItemIndent"))break}I&&(!O||I<O)&&(v._spread=!0),v.end=Object.assign({},O?R[O][1].start:J[1].end),R.splice(O||rt,0,["exit",v,J[2]]),rt++,et++}if(J[1].type==="listItemPrefix"){let Gt={type:"listItem",_spread:!1,start:Object.assign({},J[1].start),end:void 0};v=Gt,R.splice(rt,0,["enter",Gt,J[2]]),rt++,et++,I=void 0,Q=!0}}}return R[H][1]._spread=be,et}function r(R,H){return et;function et(rt){o.call(this,R(rt),rt),H&&H.call(this,rt)}}function a(){this.stack.push({type:"fragment",children:[]})}function o(R,H,et){this.stack[this.stack.length-1].children.push(R),this.stack.push(R),this.tokenStack.push([H,et||void 0]),R.position={start:$l(H.start),end:void 0}}function s(R){return H;function H(et){R&&R.call(this,et),u.call(this,et)}}function u(R,H){let et=this.stack.pop(),rt=this.tokenStack.pop();if(rt)rt[0].type!==R.type&&(H?H.call(this,R,rt[0]):(rt[1]||Wb).call(this,R,rt[0]));else throw new Error("Cannot close `"+R.type+"` ("+Zl({start:R.start,end:R.end})+"): it\u2019s not open");et.position.end=$l(R.end)}function f(){return Ri(this.stack.pop())}function c(){this.data.expectingFirstListItemValue=!0}function m(R){if(this.data.expectingFirstListItemValue){let H=this.stack[this.stack.length-2];H.start=Number.parseInt(this.sliceSerialize(R),10),this.data.expectingFirstListItemValue=void 0}}function d(){let R=this.resume(),H=this.stack[this.stack.length-1];H.lang=R}function g(){let R=this.resume(),H=this.stack[this.stack.length-1];H.meta=R}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){let R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function h(){let R=this.resume(),H=this.stack[this.stack.length-1];H.value=R.replace(/(\r?\n|\r)$/g,"")}function p(R){let H=this.resume(),et=this.stack[this.stack.length-1];et.label=H,et.identifier=Ve(this.sliceSerialize(R)).toLowerCase()}function y(){let R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function T(){let R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function N(R){let H=this.stack[this.stack.length-1];if(!H.depth){let et=this.sliceSerialize(R).length;H.depth=et}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function M(R){let H=this.stack[this.stack.length-1];H.depth=this.sliceSerialize(R).codePointAt(0)===61?1:2}function z(){this.data.setextHeadingSlurpLineEnding=void 0}function Y(R){let et=this.stack[this.stack.length-1].children,rt=et[et.length-1];(!rt||rt.type!=="text")&&(rt=en(),rt.position={start:$l(R.start),end:void 0},et.push(rt)),this.stack.push(rt)}function w(R){let H=this.stack.pop();H.value+=this.sliceSerialize(R),H.position.end=$l(R.end)}function P(R){let H=this.stack[this.stack.length-1];if(this.data.atHardBreak){let et=H.children[H.children.length-1];et.position.end=$l(R.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(H.type)&&(Y.call(this,R),w.call(this,R))}function q(){this.data.atHardBreak=!0}function B(){let R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function X(){let R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function K(){let R=this.resume(),H=this.stack[this.stack.length-1];H.value=R}function dt(){let R=this.stack[this.stack.length-1];if(this.data.inReference){let H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function kt(){let R=this.stack[this.stack.length-1];if(this.data.inReference){let H=this.data.referenceType||"shortcut";R.type+="Reference",R.referenceType=H,delete R.url,delete R.title}else delete R.identifier,delete R.label;this.data.referenceType=void 0}function Qt(R){let H=this.sliceSerialize(R),et=this.stack[this.stack.length-2];et.label=$b(H),et.identifier=Ve(H).toLowerCase()}function L(){let R=this.stack[this.stack.length-1],H=this.resume(),et=this.stack[this.stack.length-1];if(this.data.inReference=!0,et.type==="link"){let rt=R.children;et.children=rt}else et.alt=H}function k(){let R=this.resume(),H=this.stack[this.stack.length-1];H.url=R}function Tt(){let R=this.resume(),H=this.stack[this.stack.length-1];H.title=R}function Mt(){this.data.inReference=void 0}function S(){this.data.referenceType="collapsed"}function ot(R){let H=this.resume(),et=this.stack[this.stack.length-1];et.label=H,et.identifier=Ve(this.sliceSerialize(R)).toLowerCase(),this.data.referenceType="full"}function pe(R){this.data.characterReferenceType=R.type}function he(R){let H=this.sliceSerialize(R),et=this.data.characterReferenceType,rt;et?(rt=cu(H,et==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):rt=Hr(H);let Et=this.stack[this.stack.length-1];Et.value+=rt}function Ae(R){let H=this.stack.pop();H.position.end=$l(R.end)}function ht(R){w.call(this,R);let H=this.stack[this.stack.length-1];H.url=this.sliceSerialize(R)}function se(R){w.call(this,R);let H=this.stack[this.stack.length-1];H.url="mailto:"+this.sliceSerialize(R)}function Pt(){return{type:"blockquote",children:[]}}function ge(){return{type:"code",lang:null,meta:null,value:""}}function j(){return{type:"inlineCode",value:""}}function F(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Z(){return{type:"emphasis",children:[]}}function W(){return{type:"heading",depth:0,children:[]}}function lt(){return{type:"break"}}function st(){return{type:"html",value:""}}function Dt(){return{type:"image",title:null,url:"",alt:null}}function Ne(){return{type:"link",title:null,url:"",children:[]}}function Vt(R){return{type:"list",ordered:R.type==="listOrdered",start:null,spread:R._spread,children:[]}}function It(R){return{type:"listItem",spread:R._spread,checked:null,children:[]}}function Xe(){return{type:"paragraph",children:[]}}function Le(){return{type:"strong",children:[]}}function en(){return{type:"text",value:""}}function Pe(){return{type:"thematicBreak"}}}function $l(t){return{line:t.line,column:t.column,offset:t.offset}}function e0(t,e){let n=-1;for(;++n<e.length;){let l=e[n];Array.isArray(l)?e0(t,l):iC(t,l)}}function iC(t,e){let n;for(n in e)if(t0.call(e,n))switch(n){case"canContainEols":{let l=e[n];l&&t[n].push(...l);break}case"transforms":{let l=e[n];l&&t[n].push(...l);break}case"enter":case"exit":{let l=e[n];l&&Object.assign(t[n],l);break}}}function Wb(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+Zl({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+Zl({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+Zl({start:e.start,end:e.end})+") is still open")}function ku(t){let e=this;e.parser=n;function n(l){return sm(l,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function n0(t,e){let n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function l0(t,e){let n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
13
+ `}]}function i0(t,e){let n=e.value?e.value+`
14
+ `:"",l={},i=e.lang?e.lang.split(/\s+/):[];i.length>0&&(l.className=["language-"+i[0]]);let r={type:"element",tagName:"code",properties:l,children:[{type:"text",value:n}]};return e.meta&&(r.data={meta:e.meta}),t.patch(e,r),r=t.applyData(e,r),r={type:"element",tagName:"pre",properties:{},children:[r]},t.patch(e,r),r}function r0(t,e){let n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function a0(t,e){let n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function o0(t,e){let n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",l=String(e.identifier).toUpperCase(),i=_n(l.toLowerCase()),r=t.footnoteOrder.indexOf(l),a,o=t.footnoteCounts.get(l);o===void 0?(o=0,t.footnoteOrder.push(l),a=t.footnoteOrder.length):a=r+1,o+=1,t.footnoteCounts.set(l,o);let s={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};t.patch(e,s);let u={type:"element",tagName:"sup",properties:{},children:[s]};return t.patch(e,u),t.applyData(e,u)}function s0(t,e){let n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function u0(t,e){if(t.options.allowDangerousHtml){let n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function Su(t,e){let n=e.referenceType,l="]";if(n==="collapsed"?l+="[]":n==="full"&&(l+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+l}];let i=t.all(e),r=i[0];r&&r.type==="text"?r.value="["+r.value:i.unshift({type:"text",value:"["});let a=i[i.length-1];return a&&a.type==="text"?a.value+=l:i.push({type:"text",value:l}),i}function c0(t,e){let n=String(e.identifier).toUpperCase(),l=t.definitionById.get(n);if(!l)return Su(t,e);let i={src:_n(l.url||""),alt:e.alt};l.title!==null&&l.title!==void 0&&(i.title=l.title);let r={type:"element",tagName:"img",properties:i,children:[]};return t.patch(e,r),t.applyData(e,r)}function f0(t,e){let n={src:_n(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);let l={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,l),t.applyData(e,l)}function d0(t,e){let n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);let l={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,l),t.applyData(e,l)}function m0(t,e){let n=String(e.identifier).toUpperCase(),l=t.definitionById.get(n);if(!l)return Su(t,e);let i={href:_n(l.url||"")};l.title!==null&&l.title!==void 0&&(i.title=l.title);let r={type:"element",tagName:"a",properties:i,children:t.all(e)};return t.patch(e,r),t.applyData(e,r)}function p0(t,e){let n={href:_n(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);let l={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,l),t.applyData(e,l)}function h0(t,e,n){let l=t.all(e),i=n?rC(n):g0(e),r={},a=[];if(typeof e.checked=="boolean"){let f=l[0],c;f&&f.type==="element"&&f.tagName==="p"?c=f:(c={type:"element",tagName:"p",properties:{},children:[]},l.unshift(c)),c.children.length>0&&c.children.unshift({type:"text",value:" "}),c.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let o=-1;for(;++o<l.length;){let f=l[o];(i||o!==0||f.type!=="element"||f.tagName!=="p")&&a.push({type:"text",value:`
15
+ `}),f.type==="element"&&f.tagName==="p"&&!i?a.push(...f.children):a.push(f)}let s=l[l.length-1];s&&(i||s.type!=="element"||s.tagName!=="p")&&a.push({type:"text",value:`
16
+ `});let u={type:"element",tagName:"li",properties:r,children:a};return t.patch(e,u),t.applyData(e,u)}function rC(t){let e=!1;if(t.type==="list"){e=t.spread||!1;let n=t.children,l=-1;for(;!e&&++l<n.length;)e=g0(n[l])}return e}function g0(t){let e=t.spread;return e??t.children.length>1}function y0(t,e){let n={},l=t.all(e),i=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++i<l.length;){let a=l[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let r={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(l,!0)};return t.patch(e,r),t.applyData(e,r)}function v0(t,e){let n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function b0(t,e){let n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function x0(t,e){let n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function k0(t,e){let n=t.all(e),l=n.shift(),i=[];if(l){let a={type:"element",tagName:"thead",properties:{},children:t.wrap([l],!0)};t.patch(e.children[0],a),i.push(a)}if(n.length>0){let a={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},o=Br(e.children[1]),s=ou(e.children[e.children.length-1]);o&&s&&(a.position={start:o,end:s}),i.push(a)}let r={type:"element",tagName:"table",properties:{},children:t.wrap(i,!0)};return t.patch(e,r),t.applyData(e,r)}function S0(t,e,n){let l=n?n.children:void 0,r=(l?l.indexOf(e):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,o=a?a.length:e.children.length,s=-1,u=[];for(;++s<o;){let c=e.children[s],m={},d=a?a[s]:void 0;d&&(m.align=d);let g={type:"element",tagName:r,properties:m,children:[]};c&&(g.children=t.all(c),t.patch(c,g),g=t.applyData(c,g)),u.push(g)}let f={type:"element",tagName:"tr",properties:{},children:t.wrap(u,!0)};return t.patch(e,f),t.applyData(e,f)}function w0(t,e){let n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function E0(t){let e=String(t),n=/\r?\n|\r/g,l=n.exec(e),i=0,r=[];for(;l;)r.push(T0(e.slice(i,l.index),i>0,!0),l[0]),i=l.index+l[0].length,l=n.exec(e);return r.push(T0(e.slice(i),i>0,!1)),r.join("")}function T0(t,e,n){let l=0,i=t.length;if(e){let r=t.codePointAt(l);for(;r===9||r===32;)l++,r=t.codePointAt(l)}if(n){let r=t.codePointAt(i-1);for(;r===9||r===32;)i--,r=t.codePointAt(i-1)}return i>l?t.slice(l,i):""}function C0(t,e){let n={type:"text",value:E0(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function A0(t,e){let n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}var N0={blockquote:n0,break:l0,code:i0,delete:r0,emphasis:a0,footnoteReference:o0,heading:s0,html:u0,imageReference:c0,image:f0,inlineCode:d0,linkReference:m0,link:p0,listItem:h0,list:y0,paragraph:v0,root:b0,strong:x0,table:k0,tableCell:w0,tableRow:S0,text:C0,thematicBreak:A0,toml:wu,yaml:wu,definition:wu,footnoteDefinition:wu};function wu(){}var R0=typeof self=="object"?self:globalThis,uC=(t,e)=>{let n=(i,r)=>(t.set(r,i),i),l=i=>{if(t.has(i))return t.get(i);let[r,a]=e[i];switch(r){case 0:case-1:return n(a,i);case 1:{let o=n([],i);for(let s of a)o.push(l(s));return o}case 2:{let o=n({},i);for(let[s,u]of a)o[l(s)]=l(u);return o}case 3:return n(new Date(a),i);case 4:{let{source:o,flags:s}=a;return n(new RegExp(o,s),i)}case 5:{let o=n(new Map,i);for(let[s,u]of a)o.set(l(s),l(u));return o}case 6:{let o=n(new Set,i);for(let s of a)o.add(l(s));return o}case 7:{let{name:o,message:s}=a;return n(new R0[o](s),i)}case 8:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{let{buffer:o}=new Uint8Array(a);return n(new DataView(o),a)}}return n(new R0[r](a),i)};return l},fm=t=>uC(new Map,t)(0);var qr="",{toString:cC}={},{keys:fC}=Object,go=t=>{let e=typeof t;if(e!=="object"||!t)return[0,e];let n=cC.call(t).slice(8,-1);switch(n){case"Array":return[1,qr];case"Object":return[2,qr];case"Date":return[3,qr];case"RegExp":return[4,qr];case"Map":return[5,qr];case"Set":return[6,qr];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Eu=([t,e])=>t===0&&(e==="function"||e==="symbol"),dC=(t,e,n,l)=>{let i=(a,o)=>{let s=l.push(a)-1;return n.set(o,s),s},r=a=>{if(n.has(a))return n.get(a);let[o,s]=go(a);switch(o){case 0:{let f=a;switch(s){case"bigint":o=8,f=a.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+s);f=null;break;case"undefined":return i([-1],a)}return i([o,f],a)}case 1:{if(s){let m=a;return s==="DataView"?m=new Uint8Array(a.buffer):s==="ArrayBuffer"&&(m=new Uint8Array(a)),i([s,[...m]],a)}let f=[],c=i([o,f],a);for(let m of a)f.push(r(m));return c}case 2:{if(s)switch(s){case"BigInt":return i([s,a.toString()],a);case"Boolean":case"Number":case"String":return i([s,a.valueOf()],a)}if(e&&"toJSON"in a)return r(a.toJSON());let f=[],c=i([o,f],a);for(let m of fC(a))(t||!Eu(go(a[m])))&&f.push([r(m),r(a[m])]);return c}case 3:return i([o,a.toISOString()],a);case 4:{let{source:f,flags:c}=a;return i([o,{source:f,flags:c}],a)}case 5:{let f=[],c=i([o,f],a);for(let[m,d]of a)(t||!(Eu(go(m))||Eu(go(d))))&&f.push([r(m),r(d)]);return c}case 6:{let f=[],c=i([o,f],a);for(let m of a)(t||!Eu(go(m)))&&f.push(r(m));return c}}let{message:u}=a;return i([o,{name:s,message:u}],a)};return r},dm=(t,{json:e,lossy:n}={})=>{let l=[];return dC(!(e||n),!!e,new Map,l)(t),l};var Ir=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?fm(dm(t,e)):structuredClone(t):(t,e)=>fm(dm(t,e));function mC(t,e){let n=[{type:"text",value:"\u21A9"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function pC(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function z0(t){let e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||mC,l=t.options.footnoteBackLabel||pC,i=t.options.footnoteLabel||"Footnotes",r=t.options.footnoteLabelTagName||"h2",a=t.options.footnoteLabelProperties||{className:["sr-only"]},o=[],s=-1;for(;++s<t.footnoteOrder.length;){let u=t.footnoteById.get(t.footnoteOrder[s]);if(!u)continue;let f=t.all(u),c=String(u.identifier).toUpperCase(),m=_n(c.toLowerCase()),d=0,g=[],x=t.footnoteCounts.get(c);for(;x!==void 0&&++d<=x;){g.length>0&&g.push({type:"text",value:" "});let p=typeof n=="string"?n:n(s,d);typeof p=="string"&&(p={type:"text",value:p}),g.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+m+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(s,d),className:["data-footnote-backref"]},children:Array.isArray(p)?p:[p]})}let C=f[f.length-1];if(C&&C.type==="element"&&C.tagName==="p"){let p=C.children[C.children.length-1];p&&p.type==="text"?p.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(...g)}else f.push(...g);let h={type:"element",tagName:"li",properties:{id:e+"fn-"+m},children:t.wrap(f,!0)};t.patch(u,h),o.push(h)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:{...Ir(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
17
17
  `},{type:"element",tagName:"ol",properties:{},children:t.wrap(o,!0)},{type:"text",value:`
18
- `}]}}var Kl=(function(t){if(t==null)return nC;if(typeof t=="function")return Ts(t);if(typeof t=="object")return Array.isArray(t)?WE(t):tC(t);if(typeof t=="string")return eC(t);throw new Error("Expected function, string, or object as test")});function WE(t){let e=[],n=-1;for(;++n<t.length;)e[n]=Kl(t[n]);return Ts(l);function l(...i){let r=-1;for(;++r<e.length;)if(e[r].apply(this,i))return!0;return!1}}function tC(t){let e=t;return Ts(n);function n(l){let i=l,r;for(r in t)if(i[r]!==e[r])return!1;return!0}}function eC(t){return Ts(e);function e(n){return n&&n.type===t}}function Ts(t){return e;function e(n,l,i){return!!(lC(n)&&t.call(this,n,typeof l=="number"?l:void 0,i||void 0))}}function nC(){return!0}function lC(t){return t!==null&&typeof t=="object"&&"type"in t}var A0=[],ws=!0,_i=!1,Es="skip";function po(t,e,n,l){let i;typeof e=="function"&&typeof n!="function"?(l=n,n=e):i=e;let r=Kl(i),a=l?-1:1;o(t,void 0,[])();function o(u,s,f){let c=u&&typeof u=="object"?u:{};if(typeof c.type=="string"){let d=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(u.type+(d?"<"+d+">":""))+")"})}return m;function m(){let d=A0,g,b,N;if((!e||r(u,s,f[f.length-1]||void 0))&&(d=iC(n(u,f)),d[0]===_i))return d;if("children"in u&&u.children){let p=u;if(p.children&&d[0]!==Es)for(b=(l?p.children.length:-1)+a,N=f.concat(p);b>-1&&b<p.children.length;){let h=p.children[b];if(g=o(h,b,N)(),g[0]===_i)return g;b=typeof g[1]=="number"?g[1]:b+a}}return d}}}function iC(t){return Array.isArray(t)?t:typeof t=="number"?[ws,t]:t==null?A0:[t]}function Oi(t,e,n,l){let i,r,a;typeof e=="function"&&typeof n!="function"?(r=void 0,a=e,i=n):(r=e,a=n,i=l),po(t,r,o,i);function o(u,s){let f=s[s.length-1],c=f?f.children.indexOf(u):void 0;return a(u,c,f)}}var sm={}.hasOwnProperty,rC={};function M0(t,e){let n=e||rC,l=new Map,i=new Map,r=new Map,a={...k0,...n.handlers},o={all:s,applyData:oC,definitionById:l,footnoteById:i,footnoteCounts:r,footnoteOrder:[],handlers:a,one:u,options:n,patch:aC,wrap:sC};return Oi(t,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){let c=f.type==="definition"?l:i,m=String(f.identifier).toUpperCase();c.has(m)||c.set(m,f)}}),o;function u(f,c){let m=f.type,d=o.handlers[m];if(sm.call(o.handlers,m)&&d)return d(o,f,c);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in f){let{children:b,...N}=f,p=Br(N);return p.children=o.all(f),p}return Br(f)}return(o.options.unknownHandler||uC)(o,f,c)}function s(f){let c=[];if("children"in f){let m=f.children,d=-1;for(;++d<m.length;){let g=o.one(m[d],f);if(g){if(d&&m[d-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=R0(g.value)),!Array.isArray(g)&&g.type==="element")){let b=g.children[0];b&&b.type==="text"&&(b.value=R0(b.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function aC(t,e){t.position&&(e.position=Bd(t))}function oC(t,e){let n=e;if(t&&t.data){let l=t.data.hName,i=t.data.hChildren,r=t.data.hProperties;if(typeof l=="string")if(n.type==="element")n.tagName=l;else{let a="children"in n?n.children:[n];n={type:"element",tagName:l,properties:{},children:a}}n.type==="element"&&r&&Object.assign(n.properties,Br(r)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function uC(t,e){let n=e.data||{},l="value"in e&&!(sm.call(n,"hProperties")||sm.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,l),t.applyData(e,l)}function sC(t,e){let n=[],l=-1;for(e&&n.push({type:"text",value:`
18
+ `}]}}var Wl=(function(t){if(t==null)return vC;if(typeof t=="function")return Cu(t);if(typeof t=="object")return Array.isArray(t)?hC(t):gC(t);if(typeof t=="string")return yC(t);throw new Error("Expected function, string, or object as test")});function hC(t){let e=[],n=-1;for(;++n<t.length;)e[n]=Wl(t[n]);return Cu(l);function l(...i){let r=-1;for(;++r<e.length;)if(e[r].apply(this,i))return!0;return!1}}function gC(t){let e=t;return Cu(n);function n(l){let i=l,r;for(r in t)if(i[r]!==e[r])return!1;return!0}}function yC(t){return Cu(e);function e(n){return n&&n.type===t}}function Cu(t){return e;function e(n,l,i){return!!(bC(n)&&t.call(this,n,typeof l=="number"?l:void 0,i||void 0))}}function vC(){return!0}function bC(t){return t!==null&&typeof t=="object"&&"type"in t}var L0=[],Au=!0,Li=!1,Nu="skip";function yo(t,e,n,l){let i;typeof e=="function"&&typeof n!="function"?(l=n,n=e):i=e;let r=Wl(i),a=l?-1:1;o(t,void 0,[])();function o(s,u,f){let c=s&&typeof s=="object"?s:{};if(typeof c.type=="string"){let d=typeof c.tagName=="string"?c.tagName:typeof c.name=="string"?c.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(s.type+(d?"<"+d+">":""))+")"})}return m;function m(){let d=L0,g,x,C;if((!e||r(s,u,f[f.length-1]||void 0))&&(d=xC(n(s,f)),d[0]===Li))return d;if("children"in s&&s.children){let h=s;if(h.children&&d[0]!==Nu)for(x=(l?h.children.length:-1)+a,C=f.concat(h);x>-1&&x<h.children.length;){let p=h.children[x];if(g=o(p,x,C)(),g[0]===Li)return g;x=typeof g[1]=="number"?g[1]:x+a}}return d}}}function xC(t){return Array.isArray(t)?t:typeof t=="number"?[Au,t]:t==null?L0:[t]}function Ui(t,e,n,l){let i,r,a;typeof e=="function"&&typeof n!="function"?(r=void 0,a=e,i=n):(r=e,a=n,i=l),yo(t,r,o,i);function o(s,u){let f=u[u.length-1],c=f?f.children.indexOf(s):void 0;return a(s,c,f)}}var mm={}.hasOwnProperty,kC={};function B0(t,e){let n=e||kC,l=new Map,i=new Map,r=new Map,a={...N0,...n.handlers},o={all:u,applyData:wC,definitionById:l,footnoteById:i,footnoteCounts:r,footnoteOrder:[],handlers:a,one:s,options:n,patch:SC,wrap:EC};return Ui(t,function(f){if(f.type==="definition"||f.type==="footnoteDefinition"){let c=f.type==="definition"?l:i,m=String(f.identifier).toUpperCase();c.has(m)||c.set(m,f)}}),o;function s(f,c){let m=f.type,d=o.handlers[m];if(mm.call(o.handlers,m)&&d)return d(o,f,c);if(o.options.passThrough&&o.options.passThrough.includes(m)){if("children"in f){let{children:x,...C}=f,h=Ir(C);return h.children=o.all(f),h}return Ir(f)}return(o.options.unknownHandler||TC)(o,f,c)}function u(f){let c=[];if("children"in f){let m=f.children,d=-1;for(;++d<m.length;){let g=o.one(m[d],f);if(g){if(d&&m[d-1].type==="break"&&(!Array.isArray(g)&&g.type==="text"&&(g.value=U0(g.value)),!Array.isArray(g)&&g.type==="element")){let x=g.children[0];x&&x.type==="text"&&(x.value=U0(x.value))}Array.isArray(g)?c.push(...g):c.push(g)}}}return c}}function SC(t,e){t.position&&(e.position=jd(t))}function wC(t,e){let n=e;if(t&&t.data){let l=t.data.hName,i=t.data.hChildren,r=t.data.hProperties;if(typeof l=="string")if(n.type==="element")n.tagName=l;else{let a="children"in n?n.children:[n];n={type:"element",tagName:l,properties:{},children:a}}n.type==="element"&&r&&Object.assign(n.properties,Ir(r)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function TC(t,e){let n=e.data||{},l="value"in e&&!(mm.call(n,"hProperties")||mm.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,l),t.applyData(e,l)}function EC(t,e){let n=[],l=-1;for(e&&n.push({type:"text",value:`
19
19
  `});++l<t.length;)l&&n.push({type:"text",value:`
20
20
  `}),n.push(t[l]);return e&&t.length>0&&n.push({type:"text",value:`
21
- `}),n}function R0(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function Cs(t,e){let n=M0(t,e),l=n.one(t,void 0),i=N0(n),r=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return i&&("children"in r,r.children.push({type:"text",value:`
22
- `},i)),r}function Ns(t,e){return t&&"run"in t?async function(n,l){let i=Cs(n,{file:l,...e});await t.run(i,l)}:function(n,l){return Cs(n,{file:l,...t||e})}}function cm(t){if(t)throw t}var Ms=Q(q0(),1);function ho(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function fm(){let t=[],e={run:n,use:l};return e;function n(...i){let r=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(u,...s){let f=t[++r],c=-1;if(u){a(u);return}for(;++c<i.length;)(s[c]===null||s[c]===void 0)&&(s[c]=i[c]);i=s,f?I0(f,o)(...s):a(null,...s)}}function l(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function I0(t,e){let n;return l;function l(...a){let o=t.length>a.length,u;o&&a.push(i);try{u=t.apply(this,a)}catch(s){let f=s;if(o&&n)throw f;return i(f)}o||(u&&u.then&&typeof u.then=="function"?u.then(r,i):u instanceof Error?i(u):r(u))}function i(a,...o){n||(n=!0,e(a,...o))}function r(a){i(null,a)}}var Ln={basename:cC,dirname:fC,extname:dC,join:mC,sep:"/"};function cC(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');go(t);let n=0,l=-1,i=t.length,r;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(r){n=i+1;break}}else l<0&&(r=!0,l=i+1);return l<0?"":t.slice(n,l)}if(e===t)return"";let a=-1,o=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(r){n=i+1;break}}else a<0&&(r=!0,a=i+1),o>-1&&(t.codePointAt(i)===e.codePointAt(o--)?o<0&&(l=i):(o=-1,l=a));return n===l?l=a:l<0&&(l=t.length),t.slice(n,l)}function fC(t){if(go(t),t.length===0)return".";let e=-1,n=t.length,l;for(;--n;)if(t.codePointAt(n)===47){if(l){e=n;break}}else l||(l=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function dC(t){go(t);let e=t.length,n=-1,l=0,i=-1,r=0,a;for(;e--;){let o=t.codePointAt(e);if(o===47){if(a){l=e+1;break}continue}n<0&&(a=!0,n=e+1),o===46?i<0?i=e:r!==1&&(r=1):i>-1&&(r=-1)}return i<0||n<0||r===0||r===1&&i===n-1&&i===l+1?"":t.slice(i,n)}function mC(...t){let e=-1,n;for(;++e<t.length;)go(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":pC(n)}function pC(t){go(t);let e=t.codePointAt(0)===47,n=hC(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function hC(t,e){let n="",l=0,i=-1,r=0,a=-1,o,u;for(;++a<=t.length;){if(a<t.length)o=t.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||r===1))if(i!==a-1&&r===2){if(n.length<2||l!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(u=n.lastIndexOf("/"),u!==n.length-1){u<0?(n="",l=0):(n=n.slice(0,u),l=n.length-1-n.lastIndexOf("/")),i=a,r=0;continue}}else if(n.length>0){n="",l=0,i=a,r=0;continue}}e&&(n=n.length>0?n+"/..":"..",l=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),l=a-i-1;i=a,r=0}else o===46&&r>-1?r++:r=-1}return n}function go(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var j0={cwd:gC};function gC(){return"/"}function Hr(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Y0(t){if(typeof t=="string")t=new URL(t);else if(!Hr(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return yC(t)}function yC(t){if(t.hostname!==""){let l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}let e=t.pathname,n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){let l=e.codePointAt(n+2);if(l===70||l===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}var dm=["history","path","basename","stem","extname","dirname"],zi=class{constructor(e){let n;e?Hr(e)?n={path:e}:typeof e=="string"||vC(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":j0.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<dm.length;){let r=dm[l];r in n&&n[r]!==void 0&&n[r]!==null&&(this[r]=r==="history"?[...n[r]]:n[r])}let i;for(i in n)dm.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ln.basename(this.path):void 0}set basename(e){pm(e,"basename"),mm(e,"basename"),this.path=Ln.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Ln.dirname(this.path):void 0}set dirname(e){V0(this.basename,"dirname"),this.path=Ln.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Ln.extname(this.path):void 0}set extname(e){if(mm(e,"extname"),V0(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ln.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Hr(e)&&(e=Y0(e)),pm(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Ln.basename(this.path,this.extname):void 0}set stem(e){pm(e,"stem"),mm(e,"stem"),this.path=Ln.join(this.dirname||"",e+(this.extname||""))}fail(e,n,l){let i=this.message(e,n,l);throw i.fatal=!0,i}info(e,n,l){let i=this.message(e,n,l);return i.fatal=void 0,i}message(e,n,l){let i=new oe(e,n,l);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function mm(t,e){if(t&&t.includes(Ln.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Ln.sep+"`")}function pm(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function V0(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function vC(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var F0=(function(t){let l=this.constructor.prototype,i=l[t],r=function(){return i.apply(r,arguments)};return Object.setPrototypeOf(r,l),r});var bC={}.hasOwnProperty,vm=class t extends F0{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=fm()}copy(){let e=new t,n=-1;for(;++n<this.attachers.length;){let l=this.attachers[n];e.use(...l)}return e.data((0,Ms.default)(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(ym("data",this.frozen),this.namespace[e]=n,this):bC.call(this.namespace,e)&&this.namespace[e]||void 0:e?(ym("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);let i=n.call(e,...l);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let n=Rs(e),l=this.parser||this.Parser;return hm("parse",l),l(String(n),n)}process(e,n){let l=this;return this.freeze(),hm("process",this.parser||this.Parser),gm("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(r,a){let o=Rs(e),u=l.parse(o);l.run(u,o,function(f,c,m){if(f||!c||!m)return s(f);let d=c,g=l.stringify(d,m);kC(g)?m.value=g:m.result=g,s(f,m)});function s(f,c){f||!c?a(f):r?r(c):n(void 0,c)}}}processSync(e){let n=!1,l;return this.freeze(),hm("processSync",this.parser||this.Parser),gm("processSync",this.compiler||this.Compiler),this.process(e,i),G0("processSync","process",n),l;function i(r,a){n=!0,cm(r),l=a}}run(e,n,l){Q0(e),this.freeze();let i=this.transformers;return!l&&typeof n=="function"&&(l=n,n=void 0),l?r(void 0,l):new Promise(r);function r(a,o){let u=Rs(n);i.run(e,u,s);function s(f,c,m){let d=c||e;f?o(f):a?a(d):l(void 0,d,m)}}}runSync(e,n){let l=!1,i;return this.run(e,n,r),G0("runSync","run",l),i;function r(a,o){cm(a),i=o,l=!0}}stringify(e,n){this.freeze();let l=Rs(n),i=this.compiler||this.Compiler;return gm("stringify",i),Q0(e),i(e,l)}use(e,...n){let l=this.attachers,i=this.namespace;if(ym("use",this.frozen),e!=null)if(typeof e=="function")u(e,n);else if(typeof e=="object")Array.isArray(e)?o(e):a(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function r(s){if(typeof s=="function")u(s,[]);else if(typeof s=="object")if(Array.isArray(s)){let[f,...c]=s;u(f,c)}else a(s);else throw new TypeError("Expected usable value, not `"+s+"`")}function a(s){if(!("plugins"in s)&&!("settings"in s))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");o(s.plugins),s.settings&&(i.settings=(0,Ms.default)(!0,i.settings,s.settings))}function o(s){let f=-1;if(s!=null)if(Array.isArray(s))for(;++f<s.length;){let c=s[f];r(c)}else throw new TypeError("Expected a list of plugins, not `"+s+"`")}function u(s,f){let c=-1,m=-1;for(;++c<l.length;)if(l[c][0]===s){m=c;break}if(m===-1)l.push([s,...f]);else if(f.length>0){let[d,...g]=f,b=l[m][1];ho(b)&&ho(d)&&(d=(0,Ms.default)(!0,b,d)),l[m]=[s,d,...g]}}}},bm=new vm().freeze();function hm(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function gm(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function ym(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Q0(t){if(!ho(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function G0(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Rs(t){return xC(t)?t:new zi(t)}function xC(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function kC(t){return typeof t=="string"||SC(t)}function SC(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var TC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",X0=[],P0={allowDangerousHtml:!0},wC=/^(https?|ircs?|mailto|xmpp)$/i,EC=[{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 yo(t){let e=CC(t),n=NC(t);return AC(e.runSync(e.parse(n),n),t)}function CC(t){let e=t.rehypePlugins||X0,n=t.remarkPlugins||X0,l=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...P0}:P0;return bm().use(vs).use(n).use(Ns,l).use(e)}function NC(t){let e=t.children||"",n=new zi;return typeof e=="string"?n.value=e:(""+e,void 0),n}function AC(t,e){let n=e.allowedElements,l=e.allowElement,i=e.components,r=e.disallowedElements,a=e.skipHtml,o=e.unwrapDisallowed,u=e.urlTransform||K0;for(let f of EC)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+TC+f.id,void 0);return n&&r&&void 0,Oi(t,s),Id(t,{Fragment:qr.Fragment,components:i,ignoreInvalidStyle:!0,jsx:qr.jsx,jsxs:qr.jsxs,passKeys:!0,passNode:!0});function s(f,c,m){if(f.type==="raw"&&m&&typeof c=="number")return a?m.children.splice(c,1):m.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let d;for(d in ao)if(Object.hasOwn(ao,d)&&Object.hasOwn(f.properties,d)){let g=f.properties[d],b=ao[d];(b===null||b.includes(f.tagName))&&(f.properties[d]=u(String(g||""),d,f))}}if(f.type==="element"){let d=n?!n.includes(f.tagName):r?r.includes(f.tagName):!1;if(!d&&l&&typeof c=="number"&&(d=!l(f,c,m)),d&&m&&typeof c=="number")return o&&f.children?m.children.splice(c,1,...f.children):m.children.splice(c,1),c}}}function K0(t){let e=t.indexOf(":"),n=t.indexOf("?"),l=t.indexOf("#"),i=t.indexOf("/");return e===-1||i!==-1&&e>i||n!==-1&&e>n||l!==-1&&e>l||wC.test(t.slice(0,e))?t:""}function xm(t,e){let n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let l=0,i=n.indexOf(e);for(;i!==-1;)l++,i=n.indexOf(e,i+e.length);return l}function km(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Sm(t,e,n){let i=Kl((n||{}).ignore||[]),r=RC(e),a=-1;for(;++a<r.length;)po(t,"text",o);function o(s,f){let c=-1,m;for(;++c<f.length;){let d=f[c],g=m?m.children:void 0;if(i(d,g?g.indexOf(d):void 0,m))return;m=d}if(m)return u(s,f)}function u(s,f){let c=f[f.length-1],m=r[a][0],d=r[a][1],g=0,N=c.children.indexOf(s),p=!1,h=[];m.lastIndex=0;let y=m.exec(s.value);for(;y;){let w=y.index,A={index:y.index,input:y.input,stack:[...f,s]},E=d(...y,A);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?m.lastIndex=w+1:(g!==w&&h.push({type:"text",value:s.value.slice(g,w)}),Array.isArray(E)?h.push(...E):E&&h.push(E),g=w+y[0].length,p=!0),!m.global)break;y=m.exec(s.value)}return p?(g<s.value.length&&h.push({type:"text",value:s.value.slice(g)}),c.children.splice(N,1,...h)):h=[s],N+h.length}}function RC(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let n=!t[0]||Array.isArray(t[0])?t:[t],l=-1;for(;++l<n.length;){let i=n[l];e.push([MC(i[0]),DC(i[1])])}return e}function MC(t){return typeof t=="string"?new RegExp(km(t),"g"):t}function DC(t){return typeof t=="function"?t:function(){return t}}var Tm="phrasing",wm=["autolink","link","image","label"];function Cm(){return{transforms:[BC],enter:{literalAutolink:_C,literalAutolinkEmail:Em,literalAutolinkHttp:Em,literalAutolinkWww:Em},exit:{literalAutolink:UC,literalAutolinkEmail:LC,literalAutolinkHttp:OC,literalAutolinkWww:zC}}}function Nm(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Tm,notInConstruct:wm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Tm,notInConstruct:wm},{character:":",before:"[ps]",after:"\\/",inConstruct:Tm,notInConstruct:wm}]}}function _C(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Em(t){this.config.enter.autolinkProtocol.call(this,t)}function OC(t){this.config.exit.autolinkProtocol.call(this,t)}function zC(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function LC(t){this.config.exit.autolinkEmail.call(this,t)}function UC(t){this.exit(t)}function BC(t){Sm(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,HC],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,qC]],{ignore:["link","linkReference"]})}function HC(t,e,n,l,i){let r="";if(!J0(i)||(/^w/i.test(e)&&(n=e+n,e="",r="http://"),!IC(n)))return!1;let a=jC(n+l);if(!a[0])return!1;let o={type:"link",title:null,url:r+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function qC(t,e,n,l){return!J0(l,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function IC(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function jC(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],l=n.indexOf(")"),i=xm(t,"("),r=xm(t,")");for(;l!==-1&&i>r;)t+=n.slice(0,l+1),n=n.slice(l+1),l=n.indexOf(")"),r++;return[t,n]}function J0(t,e){let n=t.input.charCodeAt(t.index-1);return(t.index===0||Xn(n)||Ai(n))&&(!e||n!==47)}$0.peek=KC;function YC(){this.buffer()}function VC(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function FC(){this.buffer()}function QC(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function GC(t){let e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ue(this.sliceSerialize(t)).toLowerCase(),n.label=e}function XC(t){this.exit(t)}function PC(t){let e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ue(this.sliceSerialize(t)).toLowerCase(),n.label=e}function ZC(t){this.exit(t)}function KC(){return"["}function $0(t,e,n,l){let i=n.createTracker(l),r=i.move("[^"),a=n.enter("footnoteReference"),o=n.enter("reference");return r+=i.move(n.safe(n.associationId(t),{after:"]",before:r})),o(),a(),r+=i.move("]"),r}function Am(){return{enter:{gfmFootnoteCallString:YC,gfmFootnoteCall:VC,gfmFootnoteDefinitionLabelString:FC,gfmFootnoteDefinition:QC},exit:{gfmFootnoteCallString:GC,gfmFootnoteCall:XC,gfmFootnoteDefinitionLabelString:PC,gfmFootnoteDefinition:ZC}}}function Rm(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:$0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(l,i,r,a){let o=r.createTracker(a),u=o.move("[^"),s=r.enter("footnoteDefinition"),f=r.enter("label");return u+=o.move(r.safe(r.associationId(l),{before:u,after:"]"})),f(),u+=o.move("]:"),l.children&&l.children.length>0&&(o.shift(4),u+=o.move((e?`
23
- `:" ")+r.indentLines(r.containerFlow(l,o.current()),e?W0:JC))),s(),u}}function JC(t,e,n){return e===0?t:W0(t,e,n)}function W0(t,e,n){return(n?"":" ")+t}var $C=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];t1.peek=eN;function Mm(){return{canContainEols:["delete"],enter:{strikethrough:WC},exit:{strikethrough:tN}}}function Dm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$C}],handlers:{delete:t1}}}function WC(t){this.enter({type:"delete",children:[]},t)}function tN(t){this.exit(t)}function t1(t,e,n,l){let i=n.createTracker(l),r=n.enter("strikethrough"),a=i.move("~~");return a+=n.containerPhrasing(t,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),r(),a}function eN(){return"~"}function nN(t){return t.length}function n1(t,e){let n=e||{},l=(n.align||[]).concat(),i=n.stringLength||nN,r=[],a=[],o=[],u=[],s=0,f=-1;for(;++f<t.length;){let b=[],N=[],p=-1;for(t[f].length>s&&(s=t[f].length);++p<t[f].length;){let h=lN(t[f][p]);if(n.alignDelimiters!==!1){let y=i(h);N[p]=y,(u[p]===void 0||y>u[p])&&(u[p]=y)}b.push(h)}a[f]=b,o[f]=N}let c=-1;if(typeof l=="object"&&"length"in l)for(;++c<s;)r[c]=e1(l[c]);else{let b=e1(l);for(;++c<s;)r[c]=b}c=-1;let m=[],d=[];for(;++c<s;){let b=r[c],N="",p="";b===99?(N=":",p=":"):b===108?N=":":b===114&&(p=":");let h=n.alignDelimiters===!1?1:Math.max(1,u[c]-N.length-p.length),y=N+"-".repeat(h)+p;n.alignDelimiters!==!1&&(h=N.length+h+p.length,h>u[c]&&(u[c]=h),d[c]=h),m[c]=y}a.splice(1,0,m),o.splice(1,0,d),f=-1;let g=[];for(;++f<a.length;){let b=a[f],N=o[f];c=-1;let p=[];for(;++c<s;){let h=b[c]||"",y="",w="";if(n.alignDelimiters!==!1){let A=u[c]-(N[c]||0),E=r[c];E===114?y=" ".repeat(A):E===99?A%2?(y=" ".repeat(A/2+.5),w=" ".repeat(A/2-.5)):(y=" ".repeat(A/2),w=y):w=" ".repeat(A)}n.delimiterStart!==!1&&!c&&p.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&h==="")&&(n.delimiterStart!==!1||c)&&p.push(" "),n.alignDelimiters!==!1&&p.push(y),p.push(h),n.alignDelimiters!==!1&&p.push(w),n.padding!==!1&&p.push(" "),(n.delimiterEnd!==!1||c!==s-1)&&p.push("|")}g.push(n.delimiterEnd===!1?p.join("").replace(/ +$/,""):p.join(""))}return g.join(`
24
- `)}function lN(t){return t==null?"":String(t)}function e1(t){let e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function l1(t,e,n,l){let i=n.enter("blockquote"),r=n.createTracker(l);r.move("> "),r.shift(2);let a=n.indentLines(n.containerFlow(t,r.current()),iN);return i(),a}function iN(t,e,n){return">"+(n?"":" ")+t}function r1(t,e){return i1(t,e.inConstruct,!0)&&!i1(t,e.notInConstruct,!1)}function i1(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let l=-1;for(;++l<e.length;)if(t.includes(e[l]))return!0;return!1}function _m(t,e,n,l){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
25
- `&&r1(n.stack,n.unsafe[i]))return/[ \t]/.test(l.before)?"":" ";return`\\
26
- `}function a1(t,e){let n=String(t),l=n.indexOf(e),i=l,r=0,a=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===i?++r>a&&(a=r):r=1,i=l+e.length,l=n.indexOf(e,i);return a}function o1(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function u1(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function s1(t,e,n,l){let i=u1(n),r=t.value||"",a=i==="`"?"GraveAccent":"Tilde";if(o1(t,n)){let c=n.enter("codeIndented"),m=n.indentLines(r,rN);return c(),m}let o=n.createTracker(l),u=i.repeat(Math.max(a1(r,i)+1,3)),s=n.enter("codeFenced"),f=o.move(u);if(t.lang){let c=n.enter(`codeFencedLang${a}`);f+=o.move(n.safe(t.lang,{before:f,after:" ",encode:["`"],...o.current()})),c()}if(t.lang&&t.meta){let c=n.enter(`codeFencedMeta${a}`);f+=o.move(" "),f+=o.move(n.safe(t.meta,{before:f,after:`
21
+ `}),n}function U0(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function Ru(t,e){let n=B0(t,e),l=n.one(t,void 0),i=z0(n),r=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return i&&("children"in r,r.children.push({type:"text",value:`
22
+ `},i)),r}function Mu(t,e){return t&&"run"in t?async function(n,l){let i=Ru(n,{file:l,...e});await t.run(i,l)}:function(n,l){return Ru(n,{file:l,...t||e})}}function pm(t){if(t)throw t}var _u=G(G0(),1);function vo(t){if(typeof t!="object"||t===null)return!1;let e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function hm(){let t=[],e={run:n,use:l};return e;function n(...i){let r=-1,a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);o(null,...i);function o(s,...u){let f=t[++r],c=-1;if(s){a(s);return}for(;++c<i.length;)(u[c]===null||u[c]===void 0)&&(u[c]=i[c]);i=u,f?X0(f,o)(...u):a(null,...u)}}function l(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return t.push(i),e}}function X0(t,e){let n;return l;function l(...a){let o=t.length>a.length,s;o&&a.push(i);try{s=t.apply(this,a)}catch(u){let f=u;if(o&&n)throw f;return i(f)}o||(s&&s.then&&typeof s.then=="function"?s.then(r,i):s instanceof Error?i(s):r(s))}function i(a,...o){n||(n=!0,e(a,...o))}function r(a){i(null,a)}}var Hn={basename:CC,dirname:AC,extname:NC,join:RC,sep:"/"};function CC(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');bo(t);let n=0,l=-1,i=t.length,r;if(e===void 0||e.length===0||e.length>t.length){for(;i--;)if(t.codePointAt(i)===47){if(r){n=i+1;break}}else l<0&&(r=!0,l=i+1);return l<0?"":t.slice(n,l)}if(e===t)return"";let a=-1,o=e.length-1;for(;i--;)if(t.codePointAt(i)===47){if(r){n=i+1;break}}else a<0&&(r=!0,a=i+1),o>-1&&(t.codePointAt(i)===e.codePointAt(o--)?o<0&&(l=i):(o=-1,l=a));return n===l?l=a:l<0&&(l=t.length),t.slice(n,l)}function AC(t){if(bo(t),t.length===0)return".";let e=-1,n=t.length,l;for(;--n;)if(t.codePointAt(n)===47){if(l){e=n;break}}else l||(l=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function NC(t){bo(t);let e=t.length,n=-1,l=0,i=-1,r=0,a;for(;e--;){let o=t.codePointAt(e);if(o===47){if(a){l=e+1;break}continue}n<0&&(a=!0,n=e+1),o===46?i<0?i=e:r!==1&&(r=1):i>-1&&(r=-1)}return i<0||n<0||r===0||r===1&&i===n-1&&i===l+1?"":t.slice(i,n)}function RC(...t){let e=-1,n;for(;++e<t.length;)bo(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":MC(n)}function MC(t){bo(t);let e=t.codePointAt(0)===47,n=DC(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function DC(t,e){let n="",l=0,i=-1,r=0,a=-1,o,s;for(;++a<=t.length;){if(a<t.length)o=t.codePointAt(a);else{if(o===47)break;o=47}if(o===47){if(!(i===a-1||r===1))if(i!==a-1&&r===2){if(n.length<2||l!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(s=n.lastIndexOf("/"),s!==n.length-1){s<0?(n="",l=0):(n=n.slice(0,s),l=n.length-1-n.lastIndexOf("/")),i=a,r=0;continue}}else if(n.length>0){n="",l=0,i=a,r=0;continue}}e&&(n=n.length>0?n+"/..":"..",l=2)}else n.length>0?n+="/"+t.slice(i+1,a):n=t.slice(i+1,a),l=a-i-1;i=a,r=0}else o===46&&r>-1?r++:r=-1}return n}function bo(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}var P0={cwd:OC};function OC(){return"/"}function jr(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Z0(t){if(typeof t=="string")t=new URL(t);else if(!jr(t)){let e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){let e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return _C(t)}function _C(t){if(t.hostname!==""){let l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}let e=t.pathname,n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){let l=e.codePointAt(n+2);if(l===70||l===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(e)}var gm=["history","path","basename","stem","extname","dirname"],Bi=class{constructor(e){let n;e?jr(e)?n={path:e}:typeof e=="string"||zC(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":P0.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<gm.length;){let r=gm[l];r in n&&n[r]!==void 0&&n[r]!==null&&(this[r]=r==="history"?[...n[r]]:n[r])}let i;for(i in n)gm.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Hn.basename(this.path):void 0}set basename(e){vm(e,"basename"),ym(e,"basename"),this.path=Hn.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Hn.dirname(this.path):void 0}set dirname(e){K0(this.basename,"dirname"),this.path=Hn.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Hn.extname(this.path):void 0}set extname(e){if(ym(e,"extname"),K0(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Hn.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){jr(e)&&(e=Z0(e)),vm(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Hn.basename(this.path,this.extname):void 0}set stem(e){vm(e,"stem"),ym(e,"stem"),this.path=Hn.join(this.dirname||"",e+(this.extname||""))}fail(e,n,l){let i=this.message(e,n,l);throw i.fatal=!0,i}info(e,n,l){let i=this.message(e,n,l);return i.fatal=void 0,i}message(e,n,l){let i=new fe(e,n,l);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}};function ym(t,e){if(t&&t.includes(Hn.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Hn.sep+"`")}function vm(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function K0(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function zC(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var J0=(function(t){let l=this.constructor.prototype,i=l[t],r=function(){return i.apply(r,arguments)};return Object.setPrototypeOf(r,l),r});var LC={}.hasOwnProperty,Sm=class t extends J0{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=hm()}copy(){let e=new t,n=-1;for(;++n<this.attachers.length;){let l=this.attachers[n];e.use(...l)}return e.data((0,_u.default)(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(km("data",this.frozen),this.namespace[e]=n,this):LC.call(this.namespace,e)&&this.namespace[e]||void 0:e?(km("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);let i=n.call(e,...l);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();let n=Ou(e),l=this.parser||this.Parser;return bm("parse",l),l(String(n),n)}process(e,n){let l=this;return this.freeze(),bm("process",this.parser||this.Parser),xm("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(r,a){let o=Ou(e),s=l.parse(o);l.run(s,o,function(f,c,m){if(f||!c||!m)return u(f);let d=c,g=l.stringify(d,m);BC(g)?m.value=g:m.result=g,u(f,m)});function u(f,c){f||!c?a(f):r?r(c):n(void 0,c)}}}processSync(e){let n=!1,l;return this.freeze(),bm("processSync",this.parser||this.Parser),xm("processSync",this.compiler||this.Compiler),this.process(e,i),W0("processSync","process",n),l;function i(r,a){n=!0,pm(r),l=a}}run(e,n,l){$0(e),this.freeze();let i=this.transformers;return!l&&typeof n=="function"&&(l=n,n=void 0),l?r(void 0,l):new Promise(r);function r(a,o){let s=Ou(n);i.run(e,s,u);function u(f,c,m){let d=c||e;f?o(f):a?a(d):l(void 0,d,m)}}}runSync(e,n){let l=!1,i;return this.run(e,n,r),W0("runSync","run",l),i;function r(a,o){pm(a),i=o,l=!0}}stringify(e,n){this.freeze();let l=Ou(n),i=this.compiler||this.Compiler;return xm("stringify",i),$0(e),i(e,l)}use(e,...n){let l=this.attachers,i=this.namespace;if(km("use",this.frozen),e!=null)if(typeof e=="function")s(e,n);else if(typeof e=="object")Array.isArray(e)?o(e):a(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function r(u){if(typeof u=="function")s(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[f,...c]=u;s(f,c)}else a(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function a(u){if(!("plugins"in u)&&!("settings"in u))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");o(u.plugins),u.settings&&(i.settings=(0,_u.default)(!0,i.settings,u.settings))}function o(u){let f=-1;if(u!=null)if(Array.isArray(u))for(;++f<u.length;){let c=u[f];r(c)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function s(u,f){let c=-1,m=-1;for(;++c<l.length;)if(l[c][0]===u){m=c;break}if(m===-1)l.push([u,...f]);else if(f.length>0){let[d,...g]=f,x=l[m][1];vo(x)&&vo(d)&&(d=(0,_u.default)(!0,x,d)),l[m]=[u,d,...g]}}}},wm=new Sm().freeze();function bm(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function xm(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function km(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function $0(t){if(!vo(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function W0(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Ou(t){return UC(t)?t:new Bi(t)}function UC(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function BC(t){return typeof t=="string"||HC(t)}function HC(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}var qC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",t1=[],e1={allowDangerousHtml:!0},IC=/^(https?|ircs?|mailto|xmpp)$/i,jC=[{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 xo(t){let e=YC(t),n=VC(t);return FC(e.runSync(e.parse(n),n),t)}function YC(t){let e=t.rehypePlugins||t1,n=t.remarkPlugins||t1,l=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...e1}:e1;return wm().use(ku).use(n).use(Mu,l).use(e)}function VC(t){let e=t.children||"",n=new Bi;return typeof e=="string"?n.value=e:(""+e,void 0),n}function FC(t,e){let n=e.allowedElements,l=e.allowElement,i=e.components,r=e.disallowedElements,a=e.skipHtml,o=e.unwrapDisallowed,s=e.urlTransform||l1;for(let f of jC)Object.hasOwn(e,f.from)&&(""+f.from+(f.to?"use `"+f.to+"` instead":"remove it")+qC+f.id,void 0);return n&&r&&void 0,Ui(t,u),Fd(t,{Fragment:Yr.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Yr.jsx,jsxs:Yr.jsxs,passKeys:!0,passNode:!0});function u(f,c,m){if(f.type==="raw"&&m&&typeof c=="number")return a?m.children.splice(c,1):m.children[c]={type:"text",value:f.value},c;if(f.type==="element"){let d;for(d in uo)if(Object.hasOwn(uo,d)&&Object.hasOwn(f.properties,d)){let g=f.properties[d],x=uo[d];(x===null||x.includes(f.tagName))&&(f.properties[d]=s(String(g||""),d,f))}}if(f.type==="element"){let d=n?!n.includes(f.tagName):r?r.includes(f.tagName):!1;if(!d&&l&&typeof c=="number"&&(d=!l(f,c,m)),d&&m&&typeof c=="number")return o&&f.children?m.children.splice(c,1,...f.children):m.children.splice(c,1),c}}}function l1(t){let e=t.indexOf(":"),n=t.indexOf("?"),l=t.indexOf("#"),i=t.indexOf("/");return e===-1||i!==-1&&e>i||n!==-1&&e>n||l!==-1&&e>l||IC.test(t.slice(0,e))?t:""}function Tm(t,e){let n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let l=0,i=n.indexOf(e);for(;i!==-1;)l++,i=n.indexOf(e,i+e.length);return l}function Em(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Cm(t,e,n){let i=Wl((n||{}).ignore||[]),r=QC(e),a=-1;for(;++a<r.length;)yo(t,"text",o);function o(u,f){let c=-1,m;for(;++c<f.length;){let d=f[c],g=m?m.children:void 0;if(i(d,g?g.indexOf(d):void 0,m))return;m=d}if(m)return s(u,f)}function s(u,f){let c=f[f.length-1],m=r[a][0],d=r[a][1],g=0,C=c.children.indexOf(u),h=!1,p=[];m.lastIndex=0;let y=m.exec(u.value);for(;y;){let T=y.index,N={index:y.index,input:y.input,stack:[...f,u]},E=d(...y,N);if(typeof E=="string"&&(E=E.length>0?{type:"text",value:E}:void 0),E===!1?m.lastIndex=T+1:(g!==T&&p.push({type:"text",value:u.value.slice(g,T)}),Array.isArray(E)?p.push(...E):E&&p.push(E),g=T+y[0].length,h=!0),!m.global)break;y=m.exec(u.value)}return h?(g<u.value.length&&p.push({type:"text",value:u.value.slice(g)}),c.children.splice(C,1,...p)):p=[u],C+p.length}}function QC(t){let e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");let n=!t[0]||Array.isArray(t[0])?t:[t],l=-1;for(;++l<n.length;){let i=n[l];e.push([GC(i[0]),XC(i[1])])}return e}function GC(t){return typeof t=="string"?new RegExp(Em(t),"g"):t}function XC(t){return typeof t=="function"?t:function(){return t}}var Am="phrasing",Nm=["autolink","link","image","label"];function Mm(){return{transforms:[WC],enter:{literalAutolink:PC,literalAutolinkEmail:Rm,literalAutolinkHttp:Rm,literalAutolinkWww:Rm},exit:{literalAutolink:$C,literalAutolinkEmail:JC,literalAutolinkHttp:ZC,literalAutolinkWww:KC}}}function Dm(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Am,notInConstruct:Nm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Am,notInConstruct:Nm},{character:":",before:"[ps]",after:"\\/",inConstruct:Am,notInConstruct:Nm}]}}function PC(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Rm(t){this.config.enter.autolinkProtocol.call(this,t)}function ZC(t){this.config.exit.autolinkProtocol.call(this,t)}function KC(t){this.config.exit.data.call(this,t);let e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function JC(t){this.config.exit.autolinkEmail.call(this,t)}function $C(t){this.exit(t)}function WC(t){Cm(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,tA],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,eA]],{ignore:["link","linkReference"]})}function tA(t,e,n,l,i){let r="";if(!i1(i)||(/^w/i.test(e)&&(n=e+n,e="",r="http://"),!nA(n)))return!1;let a=lA(n+l);if(!a[0])return!1;let o={type:"link",title:null,url:r+e+a[0],children:[{type:"text",value:e+a[0]}]};return a[1]?[o,{type:"text",value:a[1]}]:o}function eA(t,e,n,l){return!i1(l,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function nA(t){let e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function lA(t){let e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],l=n.indexOf(")"),i=Tm(t,"("),r=Tm(t,")");for(;l!==-1&&i>r;)t+=n.slice(0,l+1),n=n.slice(l+1),l=n.indexOf(")"),r++;return[t,n]}function i1(t,e){let n=t.input.charCodeAt(t.index-1);return(t.index===0||Kn(n)||Di(n))&&(!e||n!==47)}r1.peek=dA;function iA(){this.buffer()}function rA(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function aA(){this.buffer()}function oA(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function sA(t){let e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ve(this.sliceSerialize(t)).toLowerCase(),n.label=e}function uA(t){this.exit(t)}function cA(t){let e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ve(this.sliceSerialize(t)).toLowerCase(),n.label=e}function fA(t){this.exit(t)}function dA(){return"["}function r1(t,e,n,l){let i=n.createTracker(l),r=i.move("[^"),a=n.enter("footnoteReference"),o=n.enter("reference");return r+=i.move(n.safe(n.associationId(t),{after:"]",before:r})),o(),a(),r+=i.move("]"),r}function Om(){return{enter:{gfmFootnoteCallString:iA,gfmFootnoteCall:rA,gfmFootnoteDefinitionLabelString:aA,gfmFootnoteDefinition:oA},exit:{gfmFootnoteCallString:sA,gfmFootnoteCall:uA,gfmFootnoteDefinitionLabelString:cA,gfmFootnoteDefinition:fA}}}function _m(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:r1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(l,i,r,a){let o=r.createTracker(a),s=o.move("[^"),u=r.enter("footnoteDefinition"),f=r.enter("label");return s+=o.move(r.safe(r.associationId(l),{before:s,after:"]"})),f(),s+=o.move("]:"),l.children&&l.children.length>0&&(o.shift(4),s+=o.move((e?`
23
+ `:" ")+r.indentLines(r.containerFlow(l,o.current()),e?a1:mA))),u(),s}}function mA(t,e,n){return e===0?t:a1(t,e,n)}function a1(t,e,n){return(n?"":" ")+t}var pA=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];o1.peek=yA;function zm(){return{canContainEols:["delete"],enter:{strikethrough:hA},exit:{strikethrough:gA}}}function Lm(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:pA}],handlers:{delete:o1}}}function hA(t){this.enter({type:"delete",children:[]},t)}function gA(t){this.exit(t)}function o1(t,e,n,l){let i=n.createTracker(l),r=n.enter("strikethrough"),a=i.move("~~");return a+=n.containerPhrasing(t,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),r(),a}function yA(){return"~"}function vA(t){return t.length}function u1(t,e){let n=e||{},l=(n.align||[]).concat(),i=n.stringLength||vA,r=[],a=[],o=[],s=[],u=0,f=-1;for(;++f<t.length;){let x=[],C=[],h=-1;for(t[f].length>u&&(u=t[f].length);++h<t[f].length;){let p=bA(t[f][h]);if(n.alignDelimiters!==!1){let y=i(p);C[h]=y,(s[h]===void 0||y>s[h])&&(s[h]=y)}x.push(p)}a[f]=x,o[f]=C}let c=-1;if(typeof l=="object"&&"length"in l)for(;++c<u;)r[c]=s1(l[c]);else{let x=s1(l);for(;++c<u;)r[c]=x}c=-1;let m=[],d=[];for(;++c<u;){let x=r[c],C="",h="";x===99?(C=":",h=":"):x===108?C=":":x===114&&(h=":");let p=n.alignDelimiters===!1?1:Math.max(1,s[c]-C.length-h.length),y=C+"-".repeat(p)+h;n.alignDelimiters!==!1&&(p=C.length+p+h.length,p>s[c]&&(s[c]=p),d[c]=p),m[c]=y}a.splice(1,0,m),o.splice(1,0,d),f=-1;let g=[];for(;++f<a.length;){let x=a[f],C=o[f];c=-1;let h=[];for(;++c<u;){let p=x[c]||"",y="",T="";if(n.alignDelimiters!==!1){let N=s[c]-(C[c]||0),E=r[c];E===114?y=" ".repeat(N):E===99?N%2?(y=" ".repeat(N/2+.5),T=" ".repeat(N/2-.5)):(y=" ".repeat(N/2),T=y):T=" ".repeat(N)}n.delimiterStart!==!1&&!c&&h.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&p==="")&&(n.delimiterStart!==!1||c)&&h.push(" "),n.alignDelimiters!==!1&&h.push(y),h.push(p),n.alignDelimiters!==!1&&h.push(T),n.padding!==!1&&h.push(" "),(n.delimiterEnd!==!1||c!==u-1)&&h.push("|")}g.push(n.delimiterEnd===!1?h.join("").replace(/ +$/,""):h.join(""))}return g.join(`
24
+ `)}function bA(t){return t==null?"":String(t)}function s1(t){let e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}function c1(t,e,n,l){let i=n.enter("blockquote"),r=n.createTracker(l);r.move("> "),r.shift(2);let a=n.indentLines(n.containerFlow(t,r.current()),xA);return i(),a}function xA(t,e,n){return">"+(n?"":" ")+t}function d1(t,e){return f1(t,e.inConstruct,!0)&&!f1(t,e.notInConstruct,!1)}function f1(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let l=-1;for(;++l<e.length;)if(t.includes(e[l]))return!0;return!1}function Um(t,e,n,l){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
25
+ `&&d1(n.stack,n.unsafe[i]))return/[ \t]/.test(l.before)?"":" ";return`\\
26
+ `}function m1(t,e){let n=String(t),l=n.indexOf(e),i=l,r=0,a=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===i?++r>a&&(a=r):r=1,i=l+e.length,l=n.indexOf(e,i);return a}function p1(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function h1(t){let e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function g1(t,e,n,l){let i=h1(n),r=t.value||"",a=i==="`"?"GraveAccent":"Tilde";if(p1(t,n)){let c=n.enter("codeIndented"),m=n.indentLines(r,kA);return c(),m}let o=n.createTracker(l),s=i.repeat(Math.max(m1(r,i)+1,3)),u=n.enter("codeFenced"),f=o.move(s);if(t.lang){let c=n.enter(`codeFencedLang${a}`);f+=o.move(n.safe(t.lang,{before:f,after:" ",encode:["`"],...o.current()})),c()}if(t.lang&&t.meta){let c=n.enter(`codeFencedMeta${a}`);f+=o.move(" "),f+=o.move(n.safe(t.meta,{before:f,after:`
27
27
  `,encode:["`"],...o.current()})),c()}return f+=o.move(`
28
28
  `),r&&(f+=o.move(r+`
29
- `)),f+=o.move(u),s(),f}function rN(t,e,n){return(n?"":" ")+t}function Ir(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function c1(t,e,n,l){let i=Ir(n),r=i==='"'?"Quote":"Apostrophe",a=n.enter("definition"),o=n.enter("label"),u=n.createTracker(l),s=u.move("[");return s+=u.move(n.safe(n.associationId(t),{before:s,after:"]",...u.current()})),s+=u.move("]: "),o(),!t.url||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(t.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(o=n.enter("destinationRaw"),s+=u.move(n.safe(t.url,{before:s,after:t.title?" ":`
30
- `,...u.current()}))),o(),t.title&&(o=n.enter(`title${r}`),s+=u.move(" "+i),s+=u.move(n.safe(t.title,{before:s,after:i,...u.current()})),s+=u.move(i),o()),a(),s}function f1(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function Jl(t){return"&#x"+t.toString(16).toUpperCase()+";"}function jr(t,e,n){let l=gl(t),i=gl(e);return l===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Om.peek=aN;function Om(t,e,n,l){let i=f1(n),r=n.enter("emphasis"),a=n.createTracker(l),o=a.move(i),u=a.move(n.containerPhrasing(t,{after:i,before:o,...a.current()})),s=u.charCodeAt(0),f=jr(l.before.charCodeAt(l.before.length-1),s,i);f.inside&&(u=Jl(s)+u.slice(1));let c=u.charCodeAt(u.length-1),m=jr(l.after.charCodeAt(0),c,i);m.inside&&(u=u.slice(0,-1)+Jl(c));let d=a.move(i);return r(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},o+u+d}function aN(t,e,n){return n.options.emphasis||"*"}function d1(t,e){let n=!1;return Oi(t,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return n=!0,_i}),!!((!t.depth||t.depth<3)&&Ci(t)&&(e.options.setext||n))}function m1(t,e,n,l){let i=Math.max(Math.min(6,t.depth||1),1),r=n.createTracker(l);if(d1(t,n)){let f=n.enter("headingSetext"),c=n.enter("phrasing"),m=n.containerPhrasing(t,{...r.current(),before:`
29
+ `)),f+=o.move(s),u(),f}function kA(t,e,n){return(n?"":" ")+t}function Vr(t){let e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function y1(t,e,n,l){let i=Vr(n),r=i==='"'?"Quote":"Apostrophe",a=n.enter("definition"),o=n.enter("label"),s=n.createTracker(l),u=s.move("[");return u+=s.move(n.safe(n.associationId(t),{before:u,after:"]",...s.current()})),u+=s.move("]: "),o(),!t.url||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(t.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(o=n.enter("destinationRaw"),u+=s.move(n.safe(t.url,{before:u,after:t.title?" ":`
30
+ `,...s.current()}))),o(),t.title&&(o=n.enter(`title${r}`),u+=s.move(" "+i),u+=s.move(n.safe(t.title,{before:u,after:i,...s.current()})),u+=s.move(i),o()),a(),u}function v1(t){let e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function ti(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Fr(t,e,n){let l=bl(t),i=bl(e);return l===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}Bm.peek=SA;function Bm(t,e,n,l){let i=v1(n),r=n.enter("emphasis"),a=n.createTracker(l),o=a.move(i),s=a.move(n.containerPhrasing(t,{after:i,before:o,...a.current()})),u=s.charCodeAt(0),f=Fr(l.before.charCodeAt(l.before.length-1),u,i);f.inside&&(s=ti(u)+s.slice(1));let c=s.charCodeAt(s.length-1),m=Fr(l.after.charCodeAt(0),c,i);m.inside&&(s=s.slice(0,-1)+ti(c));let d=a.move(i);return r(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},o+s+d}function SA(t,e,n){return n.options.emphasis||"*"}function b1(t,e){let n=!1;return Ui(t,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return n=!0,Li}),!!((!t.depth||t.depth<3)&&Ri(t)&&(e.options.setext||n))}function x1(t,e,n,l){let i=Math.max(Math.min(6,t.depth||1),1),r=n.createTracker(l);if(b1(t,n)){let f=n.enter("headingSetext"),c=n.enter("phrasing"),m=n.containerPhrasing(t,{...r.current(),before:`
31
31
  `,after:`
32
32
  `});return c(),f(),m+`
33
33
  `+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
34
- `))+1))}let a="#".repeat(i),o=n.enter("headingAtx"),u=n.enter("phrasing");r.move(a+" ");let s=n.containerPhrasing(t,{before:"# ",after:`
35
- `,...r.current()});return/^[\t ]/.test(s)&&(s=Jl(s.charCodeAt(0))+s.slice(1)),s=s?a+" "+s:a,n.options.closeAtx&&(s+=" "+a),u(),o(),s}zm.peek=oN;function zm(t){return t.value||""}function oN(){return"<"}Lm.peek=uN;function Lm(t,e,n,l){let i=Ir(n),r=i==='"'?"Quote":"Apostrophe",a=n.enter("image"),o=n.enter("label"),u=n.createTracker(l),s=u.move("![");return s+=u.move(n.safe(t.alt,{before:s,after:"]",...u.current()})),s+=u.move("]("),o(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),s+=u.move("<"),s+=u.move(n.safe(t.url,{before:s,after:">",...u.current()})),s+=u.move(">")):(o=n.enter("destinationRaw"),s+=u.move(n.safe(t.url,{before:s,after:t.title?" ":")",...u.current()}))),o(),t.title&&(o=n.enter(`title${r}`),s+=u.move(" "+i),s+=u.move(n.safe(t.title,{before:s,after:i,...u.current()})),s+=u.move(i),o()),s+=u.move(")"),a(),s}function uN(){return"!"}Um.peek=sN;function Um(t,e,n,l){let i=t.referenceType,r=n.enter("imageReference"),a=n.enter("label"),o=n.createTracker(l),u=o.move("!["),s=n.safe(t.alt,{before:u,after:"]",...o.current()});u+=o.move(s+"]["),a();let f=n.stack;n.stack=[],a=n.enter("reference");let c=n.safe(n.associationId(t),{before:u,after:"]",...o.current()});return a(),n.stack=f,r(),i==="full"||!s||s!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function sN(){return"!"}Bm.peek=cN;function Bm(t,e,n){let l=t.value||"",i="`",r=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(l);)i+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++r<n.unsafe.length;){let a=n.unsafe[r],o=n.compilePattern(a),u;if(a.atBreak)for(;u=o.exec(l);){let s=u.index;l.charCodeAt(s)===10&&l.charCodeAt(s-1)===13&&s--,l=l.slice(0,s)+" "+l.slice(u.index+1)}}return i+l+i}function cN(){return"`"}function Hm(t,e){let n=Ci(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}qm.peek=fN;function qm(t,e,n,l){let i=Ir(n),r=i==='"'?"Quote":"Apostrophe",a=n.createTracker(l),o,u;if(Hm(t,n)){let f=n.stack;n.stack=[],o=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(t,{before:c,after:">",...a.current()})),c+=a.move(">"),o(),n.stack=f,c}o=n.enter("link"),u=n.enter("label");let s=a.move("[");return s+=a.move(n.containerPhrasing(t,{before:s,after:"](",...a.current()})),s+=a.move("]("),u(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(u=n.enter("destinationLiteral"),s+=a.move("<"),s+=a.move(n.safe(t.url,{before:s,after:">",...a.current()})),s+=a.move(">")):(u=n.enter("destinationRaw"),s+=a.move(n.safe(t.url,{before:s,after:t.title?" ":")",...a.current()}))),u(),t.title&&(u=n.enter(`title${r}`),s+=a.move(" "+i),s+=a.move(n.safe(t.title,{before:s,after:i,...a.current()})),s+=a.move(i),u()),s+=a.move(")"),o(),s}function fN(t,e,n){return Hm(t,n)?"<":"["}Im.peek=dN;function Im(t,e,n,l){let i=t.referenceType,r=n.enter("linkReference"),a=n.enter("label"),o=n.createTracker(l),u=o.move("["),s=n.containerPhrasing(t,{before:u,after:"]",...o.current()});u+=o.move(s+"]["),a();let f=n.stack;n.stack=[],a=n.enter("reference");let c=n.safe(n.associationId(t),{before:u,after:"]",...o.current()});return a(),n.stack=f,r(),i==="full"||!s||s!==c?u+=o.move(c+"]"):i==="shortcut"?u=u.slice(0,-1):u+=o.move("]"),u}function dN(){return"["}function Yr(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function p1(t){let e=Yr(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function h1(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function Ds(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function g1(t,e,n,l){let i=n.enter("list"),r=n.bulletCurrent,a=t.ordered?h1(n):Yr(n),o=t.ordered?a==="."?")":".":p1(n),u=e&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!t.ordered){let f=t.children?t.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(u=!0),Ds(n)===a&&f){let c=-1;for(;++c<t.children.length;){let m=t.children[c];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){u=!0;break}}}}u&&(a=o),n.bulletCurrent=a;let s=n.containerFlow(t,l);return n.bulletLastUsed=a,n.bulletCurrent=r,i(),s}function y1(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function v1(t,e,n,l){let i=y1(n),r=n.bulletCurrent||Yr(n);e&&e.type==="list"&&e.ordered&&(r=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+r);let a=r.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(a=Math.ceil(a/4)*4);let o=n.createTracker(l);o.move(r+" ".repeat(a-r.length)),o.shift(a);let u=n.enter("listItem"),s=n.indentLines(n.containerFlow(t,o.current()),f);return u(),s;function f(c,m,d){return m?(d?"":" ".repeat(a))+c:(d?r:r+" ".repeat(a-r.length))+c}}function b1(t,e,n,l){let i=n.enter("paragraph"),r=n.enter("phrasing"),a=n.containerPhrasing(t,l);return r(),i(),a}var jm=Kl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function x1(t,e,n,l){return(t.children.some(function(a){return jm(a)})?n.containerPhrasing:n.containerFlow).call(n,t,l)}function k1(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Ym.peek=mN;function Ym(t,e,n,l){let i=k1(n),r=n.enter("strong"),a=n.createTracker(l),o=a.move(i+i),u=a.move(n.containerPhrasing(t,{after:i,before:o,...a.current()})),s=u.charCodeAt(0),f=jr(l.before.charCodeAt(l.before.length-1),s,i);f.inside&&(u=Jl(s)+u.slice(1));let c=u.charCodeAt(u.length-1),m=jr(l.after.charCodeAt(0),c,i);m.inside&&(u=u.slice(0,-1)+Jl(c));let d=a.move(i+i);return r(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},o+u+d}function mN(t,e,n){return n.options.strong||"*"}function S1(t,e,n,l){return n.safe(t.value,l)}function T1(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function w1(t,e,n){let l=(Ds(n)+(n.options.ruleSpaces?" ":"")).repeat(T1(n));return n.options.ruleSpaces?l.slice(0,-1):l}var vo={blockquote:l1,break:_m,code:s1,definition:c1,emphasis:Om,hardBreak:_m,heading:m1,html:zm,image:Lm,imageReference:Um,inlineCode:Bm,link:qm,linkReference:Im,list:g1,listItem:v1,paragraph:b1,root:x1,strong:Ym,text:S1,thematicBreak:w1};function Fm(){return{enter:{table:pN,tableData:E1,tableHeader:E1,tableRow:gN},exit:{codeText:yN,table:hN,tableData:Vm,tableHeader:Vm,tableRow:Vm}}}function pN(t){let e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function hN(t){this.exit(t),this.data.inTable=void 0}function gN(t){this.enter({type:"tableRow",children:[]},t)}function Vm(t){this.exit(t)}function E1(t){this.enter({type:"tableCell",children:[]},t)}function yN(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,vN));let n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function vN(t,e){return e==="|"?e:t}function Qm(t){let e=t||{},n=e.tableCellPadding,l=e.tablePipeAlign,i=e.stringLength,r=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
36
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:u,tableRow:o}};function a(d,g,b,N){return s(f(d,b,N),d.align)}function o(d,g,b,N){let p=c(d,b,N),h=s([p]);return h.slice(0,h.indexOf(`
37
- `))}function u(d,g,b,N){let p=b.enter("tableCell"),h=b.enter("phrasing"),y=b.containerPhrasing(d,{...N,before:r,after:r});return h(),p(),y}function s(d,g){return n1(d,{align:g,alignDelimiters:l,padding:n,stringLength:i})}function f(d,g,b){let N=d.children,p=-1,h=[],y=g.enter("table");for(;++p<N.length;)h[p]=c(N[p],g,b);return y(),h}function c(d,g,b){let N=d.children,p=-1,h=[],y=g.enter("tableRow");for(;++p<N.length;)h[p]=u(N[p],d,g,b);return y(),h}function m(d,g,b){let N=vo.inlineCode(d,g,b);return b.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function Gm(){return{exit:{taskListCheckValueChecked:C1,taskListCheckValueUnchecked:C1,paragraph:bN}}}function Xm(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xN}}}function C1(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function bN(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let n=this.stack[this.stack.length-1];n.type;let l=n.children[0];if(l&&l.type==="text"){let i=e.children,r=-1,a;for(;++r<i.length;){let o=i[r];if(o.type==="paragraph"){a=o;break}}a===n&&(l.value=l.value.slice(1),l.value.length===0?n.children.shift():n.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,n.position.start=Object.assign({},l.position.start)))}}this.exit(t)}function xN(t,e,n,l){let i=t.children[0],r=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",o=n.createTracker(l);r&&o.move(a);let u=vo.listItem(t,e,n,{...l,...o.current()});return r&&(u=u.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,s)),u;function s(f){return f+a}}function Pm(){return[Cm(),Am(),Mm(),Fm(),Gm()]}function Zm(t){return{extensions:[Nm(),Rm(t),Dm(),Qm(t),Xm()]}}var kN={tokenize:CN,partial:!0},N1={tokenize:NN,partial:!0},A1={tokenize:AN,partial:!0},R1={tokenize:RN,partial:!0},SN={tokenize:MN,partial:!0},M1={name:"wwwAutolink",tokenize:wN,previous:_1},D1={name:"protocolAutolink",tokenize:EN,previous:O1},yl={name:"emailAutolink",tokenize:TN,previous:z1},Zn={};function Jm(){return{text:Zn}}var Li=48;for(;Li<123;)Zn[Li]=yl,Li++,Li===58?Li=65:Li===91&&(Li=97);Zn[43]=yl;Zn[45]=yl;Zn[46]=yl;Zn[95]=yl;Zn[72]=[yl,D1];Zn[104]=[yl,D1];Zn[87]=[yl,M1];Zn[119]=[yl,M1];function TN(t,e,n){let l=this,i,r;return a;function a(c){return!Km(c)||!z1.call(l,l.previous)||$m(l.events)?n(c):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(c))}function o(c){return Km(c)?(t.consume(c),o):c===64?(t.consume(c),u):n(c)}function u(c){return c===46?t.check(SN,f,s)(c):c===45||c===95||ne(c)?(r=!0,t.consume(c),u):f(c)}function s(c){return t.consume(c),i=!0,u}function f(c){return r&&i&&ve(l.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(c)):n(c)}}function wN(t,e,n){let l=this;return i;function i(a){return a!==87&&a!==119||!_1.call(l,l.previous)||$m(l.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(kN,t.attempt(N1,t.attempt(A1,r),n),n)(a))}function r(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function EN(t,e,n){let l=this,i="",r=!1;return a;function a(c){return(c===72||c===104)&&O1.call(l,l.previous)&&!$m(l.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),t.consume(c),o):n(c)}function o(c){if(ve(c)&&i.length<5)return i+=String.fromCodePoint(c),t.consume(c),o;if(c===58){let m=i.toLowerCase();if(m==="http"||m==="https")return t.consume(c),u}return n(c)}function u(c){return c===47?(t.consume(c),r?s:(r=!0,u)):n(c)}function s(c){return c===null||Ni(c)||ht(c)||Xn(c)||Ai(c)?n(c):t.attempt(N1,t.attempt(A1,f),n)(c)}function f(c){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(c)}}function CN(t,e,n){let l=0;return i;function i(a){return(a===87||a===119)&&l<3?(l++,t.consume(a),i):a===46&&l===3?(t.consume(a),r):n(a)}function r(a){return a===null?n(a):e(a)}}function NN(t,e,n){let l,i,r;return a;function a(s){return s===46||s===95?t.check(R1,u,o)(s):s===null||ht(s)||Xn(s)||s!==45&&Ai(s)?u(s):(r=!0,t.consume(s),a)}function o(s){return s===95?l=!0:(i=l,l=void 0),t.consume(s),a}function u(s){return i||l||!r?n(s):e(s)}}function AN(t,e){let n=0,l=0;return i;function i(a){return a===40?(n++,t.consume(a),i):a===41&&l<n?r(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(R1,e,r)(a):a===null||ht(a)||Xn(a)?e(a):(t.consume(a),i)}function r(a){return a===41&&l++,t.consume(a),i}}function RN(t,e,n){return l;function l(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(t.consume(o),l):o===38?(t.consume(o),r):o===93?(t.consume(o),i):o===60||o===null||ht(o)||Xn(o)?e(o):n(o)}function i(o){return o===null||o===40||o===91||ht(o)||Xn(o)?e(o):l(o)}function r(o){return ve(o)?a(o):n(o)}function a(o){return o===59?(t.consume(o),l):ve(o)?(t.consume(o),a):n(o)}}function MN(t,e,n){return l;function l(r){return t.consume(r),i}function i(r){return ne(r)?n(r):e(r)}}function _1(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||ht(t)}function O1(t){return!ve(t)}function z1(t){return!(t===47||Km(t))}function Km(t){return t===43||t===45||t===46||t===95||ne(t)}function $m(t){let e=t.length,n=!1;for(;e--;){let l=t[e][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){n=!0;break}if(l._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var DN={tokenize:HN,partial:!0};function Wm(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:LN,continuation:{tokenize:UN},exit:BN}},text:{91:{name:"gfmFootnoteCall",tokenize:zN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:_N,resolveTo:ON}}}}function _N(t,e,n){let l=this,i=l.events.length,r=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),a;for(;i--;){let u=l.events[i][1];if(u.type==="labelImage"){a=u;break}if(u.type==="gfmFootnoteCall"||u.type==="labelLink"||u.type==="label"||u.type==="image"||u.type==="link")break}return o;function o(u){if(!a||!a._balanced)return n(u);let s=Ue(l.sliceSerialize({start:a.end,end:l.now()}));return s.codePointAt(0)!==94||!r.includes(s.slice(1))?n(u):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(u),t.exit("gfmFootnoteCallLabelMarker"),e(u))}}function ON(t,e){let n=t.length,l;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){l=t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},u=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",r,e],["exit",r,e],["enter",a,e],["enter",o,e],["exit",o,e],["exit",a,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...u),t}function zN(t,e,n){let l=this,i=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),r=0,a;return o;function o(c){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),u}function u(c){return c!==94?n(c):(t.enter("gfmFootnoteCallMarker"),t.consume(c),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",s)}function s(c){if(r>999||c===93&&!a||c===null||c===91||ht(c))return n(c);if(c===93){t.exit("chunkString");let m=t.exit("gfmFootnoteCallString");return i.includes(Ue(l.sliceSerialize(m)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(c)}return ht(c)||(a=!0),r++,t.consume(c),c===92?f:s}function f(c){return c===91||c===92||c===93?(t.consume(c),r++,s):s(c)}}function LN(t,e,n){let l=this,i=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),r,a=0,o;return u;function u(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),s}function s(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",f):n(g)}function f(g){if(a>999||g===93&&!o||g===null||g===91||ht(g))return n(g);if(g===93){t.exit("chunkString");let b=t.exit("gfmFootnoteDefinitionLabelString");return r=Ue(l.sliceSerialize(b)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),m}return ht(g)||(o=!0),a++,t.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(t.consume(g),a++,f):f(g)}function m(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),i.includes(r)||i.push(r),$(t,d,"gfmFootnoteDefinitionWhitespace")):n(g)}function d(g){return e(g)}}function UN(t,e,n){return t.check(Pn,e,t.attempt(DN,e,n))}function BN(t){t.exit("gfmFootnoteDefinition")}function HN(t,e,n){let l=this;return $(t,i,"gfmFootnoteDefinitionIndent",5);function i(r){let a=l.events[l.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(r):n(r)}}function tp(t){let n=(t||{}).singleTilde,l={name:"strikethrough",tokenize:r,resolveAll:i};return n==null&&(n=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function i(a,o){let u=-1;for(;++u<a.length;)if(a[u][0]==="enter"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._close){let s=u;for(;s--;)if(a[s][0]==="exit"&&a[s][1].type==="strikethroughSequenceTemporary"&&a[s][1]._open&&a[u][1].end.offset-a[u][1].start.offset===a[s][1].end.offset-a[s][1].start.offset){a[u][1].type="strikethroughSequence",a[s][1].type="strikethroughSequence";let f={type:"strikethrough",start:Object.assign({},a[s][1].start),end:Object.assign({},a[u][1].end)},c={type:"strikethroughText",start:Object.assign({},a[s][1].end),end:Object.assign({},a[u][1].start)},m=[["enter",f,o],["enter",a[s][1],o],["exit",a[s][1],o],["enter",c,o]],d=o.parser.constructs.insideSpan.null;d&&ue(m,m.length,0,Pl(d,a.slice(s+1,u),o)),ue(m,m.length,0,[["exit",c,o],["enter",a[u][1],o],["exit",a[u][1],o],["exit",f,o]]),ue(a,s-1,u-s+3,m),u=s+m.length-2;break}}for(u=-1;++u<a.length;)a[u][1].type==="strikethroughSequenceTemporary"&&(a[u][1].type="data");return a}function r(a,o,u){let s=this.previous,f=this.events,c=0;return m;function m(g){return s===126&&f[f.length-1][1].type!=="characterEscape"?u(g):(a.enter("strikethroughSequenceTemporary"),d(g))}function d(g){let b=gl(s);if(g===126)return c>1?u(g):(a.consume(g),c++,d);if(c<2&&!n)return u(g);let N=a.exit("strikethroughSequenceTemporary"),p=gl(g);return N._open=!p||p===2&&!!b,N._close=!b||b===2&&!!p,o(g)}}}var _s=class{constructor(){this.map=[]}add(e,n,l){qN(this,e,n,l)}consume(e){if(this.map.sort(function(r,a){return r[0]-a[0]}),this.map.length===0)return;let n=this.map.length,l=[];for(;n>0;)n-=1,l.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];l.push(e.slice()),e.length=0;let i=l.pop();for(;i;){for(let r of i)e.push(r);i=l.pop()}this.map.length=0}};function qN(t,e,n,l){let i=0;if(!(n===0&&l.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...l);return}i+=1}t.map.push([e,n,l])}}function L1(t,e){let n=!1,l=[];for(;e<t.length;){let i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&l.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let r=l.length-1;l[r]=l[r]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return l}function ep(){return{flow:{null:{name:"table",tokenize:IN,resolveAll:jN}}}}function IN(t,e,n){let l=this,i=0,r=0,a;return o;function o(T){let lt=l.events.length-1;for(;lt>-1;){let P=l.events[lt][1].type;if(P==="lineEnding"||P==="linePrefix")lt--;else break}let K=lt>-1?l.events[lt][1].type:null,G=K==="tableHead"||K==="tableRow"?E:u;return G===E&&l.parser.lazy[l.now().line]?n(T):G(T)}function u(T){return t.enter("tableHead"),t.enter("tableRow"),s(T)}function s(T){return T===124||(a=!0,r+=1),f(T)}function f(T){return T===null?n(T):Y(T)?r>1?(r=0,l.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(T),t.exit("lineEnding"),d):n(T):nt(T)?$(t,f,"whitespace")(T):(r+=1,a&&(a=!1,i+=1),T===124?(t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),a=!0,f):(t.enter("data"),c(T)))}function c(T){return T===null||T===124||ht(T)?(t.exit("data"),f(T)):(t.consume(T),T===92?m:c)}function m(T){return T===92||T===124?(t.consume(T),c):c(T)}function d(T){return l.interrupt=!1,l.parser.lazy[l.now().line]?n(T):(t.enter("tableDelimiterRow"),a=!1,nt(T)?$(t,g,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):g(T))}function g(T){return T===45||T===58?N(T):T===124?(a=!0,t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),b):A(T)}function b(T){return nt(T)?$(t,N,"whitespace")(T):N(T)}function N(T){return T===58?(r+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(T),t.exit("tableDelimiterMarker"),p):T===45?(r+=1,p(T)):T===null||Y(T)?w(T):A(T)}function p(T){return T===45?(t.enter("tableDelimiterFiller"),h(T)):A(T)}function h(T){return T===45?(t.consume(T),h):T===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(T),t.exit("tableDelimiterMarker"),y):(t.exit("tableDelimiterFiller"),y(T))}function y(T){return nt(T)?$(t,w,"whitespace")(T):w(T)}function w(T){return T===124?g(T):T===null||Y(T)?!a||i!==r?A(T):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(T)):A(T)}function A(T){return n(T)}function E(T){return t.enter("tableRow"),D(T)}function D(T){return T===124?(t.enter("tableCellDivider"),t.consume(T),t.exit("tableCellDivider"),D):T===null||Y(T)?(t.exit("tableRow"),e(T)):nt(T)?$(t,D,"whitespace")(T):(t.enter("data"),L(T))}function L(T){return T===null||T===124||ht(T)?(t.exit("data"),D(T)):(t.consume(T),T===92?I:L)}function I(T){return T===92||T===124?(t.consume(T),L):L(T)}}function jN(t,e){let n=-1,l=!0,i=0,r=[0,0,0,0],a=[0,0,0,0],o=!1,u=0,s,f,c,m=new _s;for(;++n<t.length;){let d=t[n],g=d[1];d[0]==="enter"?g.type==="tableHead"?(o=!1,u!==0&&(U1(m,e,u,s,f),f=void 0,u=0),s={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",s,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=!0,c=void 0,r=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",f,e]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(l=!1,a[2]===0&&(r[1]!==0&&(a[0]=a[1],c=Os(m,e,r,i,void 0,c),r=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(l?l=!1:(r[1]!==0&&(a[0]=a[1],c=Os(m,e,r,i,void 0,c)),r=a,a=[r[1],n,0,0])):g.type==="tableHead"?(o=!0,u=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(u=n,r[1]!==0?(a[0]=a[1],c=Os(m,e,r,i,n,c)):a[1]!==0&&(c=Os(m,e,a,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(u!==0&&U1(m,e,u,s,f),m.consume(e.events),n=-1;++n<e.events.length;){let d=e.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=L1(e.events,n))}return t}function Os(t,e,n,l,i,r){let a=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(r.end=Object.assign({},Vr(e.events,n[0])),t.add(n[0],0,[["exit",r,e]]));let u=Vr(e.events,n[1]);if(r={type:a,start:Object.assign({},u),end:Object.assign({},u)},t.add(n[1],0,[["enter",r,e]]),n[2]!==0){let s=Vr(e.events,n[2]),f=Vr(e.events,n[3]),c={type:o,start:Object.assign({},s),end:Object.assign({},f)};if(t.add(n[2],0,[["enter",c,e]]),l!==2){let m=e.events[n[2]],d=e.events[n[3]];if(m[1].end=Object.assign({},d[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){let g=n[2]+1,b=n[3]-n[2]-1;t.add(g,b,[])}}t.add(n[3]+1,0,[["exit",c,e]])}return i!==void 0&&(r.end=Object.assign({},Vr(e.events,i)),t.add(i,0,[["exit",r,e]]),r=void 0),r}function U1(t,e,n,l,i){let r=[],a=Vr(e.events,n);i&&(i.end=Object.assign({},a),r.push(["exit",i,e])),l.end=Object.assign({},a),r.push(["exit",l,e]),t.add(n+1,0,r)}function Vr(t,e){let n=t[e],l=n[0]==="enter"?"start":"end";return n[1][l]}var YN={name:"tasklistCheck",tokenize:VN};function np(){return{text:{91:YN}}}function VN(t,e,n){let l=this;return i;function i(u){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?n(u):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),r)}function r(u){return ht(u)?(t.enter("taskListCheckValueUnchecked"),t.consume(u),t.exit("taskListCheckValueUnchecked"),a):u===88||u===120?(t.enter("taskListCheckValueChecked"),t.consume(u),t.exit("taskListCheckValueChecked"),a):n(u)}function a(u){return u===93?(t.enter("taskListCheckMarker"),t.consume(u),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),o):n(u)}function o(u){return Y(u)?e(u):nt(u)?t.check({tokenize:FN},e,n)(u):n(u)}}function FN(t,e,n){return $(t,l,"whitespace");function l(i){return i===null?n(i):e(i)}}function B1(t){return as([Jm(),Wm(),tp(t),ep(),np()])}var QN={};function Fr(t){let e=this,n=t||QN,l=e.data(),i=l.micromarkExtensions||(l.micromarkExtensions=[]),r=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),a=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);i.push(B1(n)),r.push(Pm()),a.push(Zm(n))}function lp(t){if(!t)return t;let e=t.toLowerCase(),n=e.indexOf("<think>"),l=e.indexOf("<thinking>"),i=-1,r=0;if(n!==-1&&(l===-1||n<l)?(i=n,r=7):l!==-1&&(i=l,r=10),i===-1)return t.replace(/\n\n+/g,`
34
+ `))+1))}let a="#".repeat(i),o=n.enter("headingAtx"),s=n.enter("phrasing");r.move(a+" ");let u=n.containerPhrasing(t,{before:"# ",after:`
35
+ `,...r.current()});return/^[\t ]/.test(u)&&(u=ti(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,n.options.closeAtx&&(u+=" "+a),s(),o(),u}Hm.peek=wA;function Hm(t){return t.value||""}function wA(){return"<"}qm.peek=TA;function qm(t,e,n,l){let i=Vr(n),r=i==='"'?"Quote":"Apostrophe",a=n.enter("image"),o=n.enter("label"),s=n.createTracker(l),u=s.move("![");return u+=s.move(n.safe(t.alt,{before:u,after:"]",...s.current()})),u+=s.move("]("),o(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(o=n.enter("destinationLiteral"),u+=s.move("<"),u+=s.move(n.safe(t.url,{before:u,after:">",...s.current()})),u+=s.move(">")):(o=n.enter("destinationRaw"),u+=s.move(n.safe(t.url,{before:u,after:t.title?" ":")",...s.current()}))),o(),t.title&&(o=n.enter(`title${r}`),u+=s.move(" "+i),u+=s.move(n.safe(t.title,{before:u,after:i,...s.current()})),u+=s.move(i),o()),u+=s.move(")"),a(),u}function TA(){return"!"}Im.peek=EA;function Im(t,e,n,l){let i=t.referenceType,r=n.enter("imageReference"),a=n.enter("label"),o=n.createTracker(l),s=o.move("!["),u=n.safe(t.alt,{before:s,after:"]",...o.current()});s+=o.move(u+"]["),a();let f=n.stack;n.stack=[],a=n.enter("reference");let c=n.safe(n.associationId(t),{before:s,after:"]",...o.current()});return a(),n.stack=f,r(),i==="full"||!u||u!==c?s+=o.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=o.move("]"),s}function EA(){return"!"}jm.peek=CA;function jm(t,e,n){let l=t.value||"",i="`",r=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(l);)i+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++r<n.unsafe.length;){let a=n.unsafe[r],o=n.compilePattern(a),s;if(a.atBreak)for(;s=o.exec(l);){let u=s.index;l.charCodeAt(u)===10&&l.charCodeAt(u-1)===13&&u--,l=l.slice(0,u)+" "+l.slice(s.index+1)}}return i+l+i}function CA(){return"`"}function Ym(t,e){let n=Ri(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}Vm.peek=AA;function Vm(t,e,n,l){let i=Vr(n),r=i==='"'?"Quote":"Apostrophe",a=n.createTracker(l),o,s;if(Ym(t,n)){let f=n.stack;n.stack=[],o=n.enter("autolink");let c=a.move("<");return c+=a.move(n.containerPhrasing(t,{before:c,after:">",...a.current()})),c+=a.move(">"),o(),n.stack=f,c}o=n.enter("link"),s=n.enter("label");let u=a.move("[");return u+=a.move(n.containerPhrasing(t,{before:u,after:"](",...a.current()})),u+=a.move("]("),s(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(s=n.enter("destinationLiteral"),u+=a.move("<"),u+=a.move(n.safe(t.url,{before:u,after:">",...a.current()})),u+=a.move(">")):(s=n.enter("destinationRaw"),u+=a.move(n.safe(t.url,{before:u,after:t.title?" ":")",...a.current()}))),s(),t.title&&(s=n.enter(`title${r}`),u+=a.move(" "+i),u+=a.move(n.safe(t.title,{before:u,after:i,...a.current()})),u+=a.move(i),s()),u+=a.move(")"),o(),u}function AA(t,e,n){return Ym(t,n)?"<":"["}Fm.peek=NA;function Fm(t,e,n,l){let i=t.referenceType,r=n.enter("linkReference"),a=n.enter("label"),o=n.createTracker(l),s=o.move("["),u=n.containerPhrasing(t,{before:s,after:"]",...o.current()});s+=o.move(u+"]["),a();let f=n.stack;n.stack=[],a=n.enter("reference");let c=n.safe(n.associationId(t),{before:s,after:"]",...o.current()});return a(),n.stack=f,r(),i==="full"||!u||u!==c?s+=o.move(c+"]"):i==="shortcut"?s=s.slice(0,-1):s+=o.move("]"),s}function NA(){return"["}function Qr(t){let e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function k1(t){let e=Qr(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function S1(t){let e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function zu(t){let e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function w1(t,e,n,l){let i=n.enter("list"),r=n.bulletCurrent,a=t.ordered?S1(n):Qr(n),o=t.ordered?a==="."?")":".":k1(n),s=e&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!t.ordered){let f=t.children?t.children[0]:void 0;if((a==="*"||a==="-")&&f&&(!f.children||!f.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(s=!0),zu(n)===a&&f){let c=-1;for(;++c<t.children.length;){let m=t.children[c];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){s=!0;break}}}}s&&(a=o),n.bulletCurrent=a;let u=n.containerFlow(t,l);return n.bulletLastUsed=a,n.bulletCurrent=r,i(),u}function T1(t){let e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function E1(t,e,n,l){let i=T1(n),r=n.bulletCurrent||Qr(n);e&&e.type==="list"&&e.ordered&&(r=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+r);let a=r.length+1;(i==="tab"||i==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(a=Math.ceil(a/4)*4);let o=n.createTracker(l);o.move(r+" ".repeat(a-r.length)),o.shift(a);let s=n.enter("listItem"),u=n.indentLines(n.containerFlow(t,o.current()),f);return s(),u;function f(c,m,d){return m?(d?"":" ".repeat(a))+c:(d?r:r+" ".repeat(a-r.length))+c}}function C1(t,e,n,l){let i=n.enter("paragraph"),r=n.enter("phrasing"),a=n.containerPhrasing(t,l);return r(),i(),a}var Qm=Wl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function A1(t,e,n,l){return(t.children.some(function(a){return Qm(a)})?n.containerPhrasing:n.containerFlow).call(n,t,l)}function N1(t){let e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}Gm.peek=RA;function Gm(t,e,n,l){let i=N1(n),r=n.enter("strong"),a=n.createTracker(l),o=a.move(i+i),s=a.move(n.containerPhrasing(t,{after:i,before:o,...a.current()})),u=s.charCodeAt(0),f=Fr(l.before.charCodeAt(l.before.length-1),u,i);f.inside&&(s=ti(u)+s.slice(1));let c=s.charCodeAt(s.length-1),m=Fr(l.after.charCodeAt(0),c,i);m.inside&&(s=s.slice(0,-1)+ti(c));let d=a.move(i+i);return r(),n.attentionEncodeSurroundingInfo={after:m.outside,before:f.outside},o+s+d}function RA(t,e,n){return n.options.strong||"*"}function R1(t,e,n,l){return n.safe(t.value,l)}function M1(t){let e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function D1(t,e,n){let l=(zu(n)+(n.options.ruleSpaces?" ":"")).repeat(M1(n));return n.options.ruleSpaces?l.slice(0,-1):l}var ko={blockquote:c1,break:Um,code:g1,definition:y1,emphasis:Bm,hardBreak:Um,heading:x1,html:Hm,image:qm,imageReference:Im,inlineCode:jm,link:Vm,linkReference:Fm,list:w1,listItem:E1,paragraph:C1,root:A1,strong:Gm,text:R1,thematicBreak:D1};function Pm(){return{enter:{table:MA,tableData:O1,tableHeader:O1,tableRow:OA},exit:{codeText:_A,table:DA,tableData:Xm,tableHeader:Xm,tableRow:Xm}}}function MA(t){let e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function DA(t){this.exit(t),this.data.inTable=void 0}function OA(t){this.enter({type:"tableRow",children:[]},t)}function Xm(t){this.exit(t)}function O1(t){this.enter({type:"tableCell",children:[]},t)}function _A(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,zA));let n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function zA(t,e){return e==="|"?e:t}function Zm(t){let e=t||{},n=e.tableCellPadding,l=e.tablePipeAlign,i=e.stringLength,r=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
36
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:s,tableRow:o}};function a(d,g,x,C){return u(f(d,x,C),d.align)}function o(d,g,x,C){let h=c(d,x,C),p=u([h]);return p.slice(0,p.indexOf(`
37
+ `))}function s(d,g,x,C){let h=x.enter("tableCell"),p=x.enter("phrasing"),y=x.containerPhrasing(d,{...C,before:r,after:r});return p(),h(),y}function u(d,g){return u1(d,{align:g,alignDelimiters:l,padding:n,stringLength:i})}function f(d,g,x){let C=d.children,h=-1,p=[],y=g.enter("table");for(;++h<C.length;)p[h]=c(C[h],g,x);return y(),p}function c(d,g,x){let C=d.children,h=-1,p=[],y=g.enter("tableRow");for(;++h<C.length;)p[h]=s(C[h],d,g,x);return y(),p}function m(d,g,x){let C=ko.inlineCode(d,g,x);return x.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function Km(){return{exit:{taskListCheckValueChecked:_1,taskListCheckValueUnchecked:_1,paragraph:LA}}}function Jm(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UA}}}function _1(t){let e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function LA(t){let e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){let n=this.stack[this.stack.length-1];n.type;let l=n.children[0];if(l&&l.type==="text"){let i=e.children,r=-1,a;for(;++r<i.length;){let o=i[r];if(o.type==="paragraph"){a=o;break}}a===n&&(l.value=l.value.slice(1),l.value.length===0?n.children.shift():n.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,n.position.start=Object.assign({},l.position.start)))}}this.exit(t)}function UA(t,e,n,l){let i=t.children[0],r=typeof t.checked=="boolean"&&i&&i.type==="paragraph",a="["+(t.checked?"x":" ")+"] ",o=n.createTracker(l);r&&o.move(a);let s=ko.listItem(t,e,n,{...l,...o.current()});return r&&(s=s.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,u)),s;function u(f){return f+a}}function $m(){return[Mm(),Om(),zm(),Pm(),Km()]}function Wm(t){return{extensions:[Dm(),_m(t),Lm(),Zm(t),Jm()]}}var BA={tokenize:YA,partial:!0},z1={tokenize:VA,partial:!0},L1={tokenize:FA,partial:!0},U1={tokenize:QA,partial:!0},HA={tokenize:GA,partial:!0},B1={name:"wwwAutolink",tokenize:IA,previous:q1},H1={name:"protocolAutolink",tokenize:jA,previous:I1},xl={name:"emailAutolink",tokenize:qA,previous:j1},$n={};function ep(){return{text:$n}}var Hi=48;for(;Hi<123;)$n[Hi]=xl,Hi++,Hi===58?Hi=65:Hi===91&&(Hi=97);$n[43]=xl;$n[45]=xl;$n[46]=xl;$n[95]=xl;$n[72]=[xl,H1];$n[104]=[xl,H1];$n[87]=[xl,B1];$n[119]=[xl,B1];function qA(t,e,n){let l=this,i,r;return a;function a(c){return!tp(c)||!j1.call(l,l.previous)||np(l.events)?n(c):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),o(c))}function o(c){return tp(c)?(t.consume(c),o):c===64?(t.consume(c),s):n(c)}function s(c){return c===46?t.check(HA,f,u)(c):c===45||c===95||oe(c)?(r=!0,t.consume(c),s):f(c)}function u(c){return t.consume(c),i=!0,s}function f(c){return r&&i&&we(l.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(c)):n(c)}}function IA(t,e,n){let l=this;return i;function i(a){return a!==87&&a!==119||!q1.call(l,l.previous)||np(l.events)?n(a):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(BA,t.attempt(z1,t.attempt(L1,r),n),n)(a))}function r(a){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(a)}}function jA(t,e,n){let l=this,i="",r=!1;return a;function a(c){return(c===72||c===104)&&I1.call(l,l.previous)&&!np(l.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),i+=String.fromCodePoint(c),t.consume(c),o):n(c)}function o(c){if(we(c)&&i.length<5)return i+=String.fromCodePoint(c),t.consume(c),o;if(c===58){let m=i.toLowerCase();if(m==="http"||m==="https")return t.consume(c),s}return n(c)}function s(c){return c===47?(t.consume(c),r?u:(r=!0,s)):n(c)}function u(c){return c===null||Mi(c)||gt(c)||Kn(c)||Di(c)?n(c):t.attempt(z1,t.attempt(L1,f),n)(c)}function f(c){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(c)}}function YA(t,e,n){let l=0;return i;function i(a){return(a===87||a===119)&&l<3?(l++,t.consume(a),i):a===46&&l===3?(t.consume(a),r):n(a)}function r(a){return a===null?n(a):e(a)}}function VA(t,e,n){let l,i,r;return a;function a(u){return u===46||u===95?t.check(U1,s,o)(u):u===null||gt(u)||Kn(u)||u!==45&&Di(u)?s(u):(r=!0,t.consume(u),a)}function o(u){return u===95?l=!0:(i=l,l=void 0),t.consume(u),a}function s(u){return i||l||!r?n(u):e(u)}}function FA(t,e){let n=0,l=0;return i;function i(a){return a===40?(n++,t.consume(a),i):a===41&&l<n?r(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?t.check(U1,e,r)(a):a===null||gt(a)||Kn(a)?e(a):(t.consume(a),i)}function r(a){return a===41&&l++,t.consume(a),i}}function QA(t,e,n){return l;function l(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(t.consume(o),l):o===38?(t.consume(o),r):o===93?(t.consume(o),i):o===60||o===null||gt(o)||Kn(o)?e(o):n(o)}function i(o){return o===null||o===40||o===91||gt(o)||Kn(o)?e(o):l(o)}function r(o){return we(o)?a(o):n(o)}function a(o){return o===59?(t.consume(o),l):we(o)?(t.consume(o),a):n(o)}}function GA(t,e,n){return l;function l(r){return t.consume(r),i}function i(r){return oe(r)?n(r):e(r)}}function q1(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||gt(t)}function I1(t){return!we(t)}function j1(t){return!(t===47||tp(t))}function tp(t){return t===43||t===45||t===46||t===95||oe(t)}function np(t){let e=t.length,n=!1;for(;e--;){let l=t[e][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){n=!0;break}if(l._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var XA={tokenize:tN,partial:!0};function lp(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JA,continuation:{tokenize:$A},exit:WA}},text:{91:{name:"gfmFootnoteCall",tokenize:KA},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:PA,resolveTo:ZA}}}}function PA(t,e,n){let l=this,i=l.events.length,r=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),a;for(;i--;){let s=l.events[i][1];if(s.type==="labelImage"){a=s;break}if(s.type==="gfmFootnoteCall"||s.type==="labelLink"||s.type==="label"||s.type==="image"||s.type==="link")break}return o;function o(s){if(!a||!a._balanced)return n(s);let u=Ve(l.sliceSerialize({start:a.end,end:l.now()}));return u.codePointAt(0)!==94||!r.includes(u.slice(1))?n(s):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(s),t.exit("gfmFootnoteCallLabelMarker"),e(s))}}function ZA(t,e){let n=t.length,l;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){l=t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";let i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;let a={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",r,e],["exit",r,e],["enter",a,e],["enter",o,e],["exit",o,e],["exit",a,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...s),t}function KA(t,e,n){let l=this,i=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),r=0,a;return o;function o(c){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),s}function s(c){return c!==94?n(c):(t.enter("gfmFootnoteCallMarker"),t.consume(c),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",u)}function u(c){if(r>999||c===93&&!a||c===null||c===91||gt(c))return n(c);if(c===93){t.exit("chunkString");let m=t.exit("gfmFootnoteCallString");return i.includes(Ve(l.sliceSerialize(m)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(c)}return gt(c)||(a=!0),r++,t.consume(c),c===92?f:u}function f(c){return c===91||c===92||c===93?(t.consume(c),r++,u):u(c)}}function JA(t,e,n){let l=this,i=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]),r,a=0,o;return s;function s(g){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),u}function u(g){return g===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",f):n(g)}function f(g){if(a>999||g===93&&!o||g===null||g===91||gt(g))return n(g);if(g===93){t.exit("chunkString");let x=t.exit("gfmFootnoteDefinitionLabelString");return r=Ve(l.sliceSerialize(x)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(g),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),m}return gt(g)||(o=!0),a++,t.consume(g),g===92?c:f}function c(g){return g===91||g===92||g===93?(t.consume(g),a++,f):f(g)}function m(g){return g===58?(t.enter("definitionMarker"),t.consume(g),t.exit("definitionMarker"),i.includes(r)||i.push(r),tt(t,d,"gfmFootnoteDefinitionWhitespace")):n(g)}function d(g){return e(g)}}function $A(t,e,n){return t.check(Jn,e,t.attempt(XA,e,n))}function WA(t){t.exit("gfmFootnoteDefinition")}function tN(t,e,n){let l=this;return tt(t,i,"gfmFootnoteDefinitionIndent",5);function i(r){let a=l.events[l.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?e(r):n(r)}}function ip(t){let n=(t||{}).singleTilde,l={name:"strikethrough",tokenize:r,resolveAll:i};return n==null&&(n=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function i(a,o){let s=-1;for(;++s<a.length;)if(a[s][0]==="enter"&&a[s][1].type==="strikethroughSequenceTemporary"&&a[s][1]._close){let u=s;for(;u--;)if(a[u][0]==="exit"&&a[u][1].type==="strikethroughSequenceTemporary"&&a[u][1]._open&&a[s][1].end.offset-a[s][1].start.offset===a[u][1].end.offset-a[u][1].start.offset){a[s][1].type="strikethroughSequence",a[u][1].type="strikethroughSequence";let f={type:"strikethrough",start:Object.assign({},a[u][1].start),end:Object.assign({},a[s][1].end)},c={type:"strikethroughText",start:Object.assign({},a[u][1].end),end:Object.assign({},a[s][1].start)},m=[["enter",f,o],["enter",a[u][1],o],["exit",a[u][1],o],["enter",c,o]],d=o.parser.constructs.insideSpan.null;d&&de(m,m.length,0,Jl(d,a.slice(u+1,s),o)),de(m,m.length,0,[["exit",c,o],["enter",a[s][1],o],["exit",a[s][1],o],["exit",f,o]]),de(a,u-1,s-u+3,m),s=u+m.length-2;break}}for(s=-1;++s<a.length;)a[s][1].type==="strikethroughSequenceTemporary"&&(a[s][1].type="data");return a}function r(a,o,s){let u=this.previous,f=this.events,c=0;return m;function m(g){return u===126&&f[f.length-1][1].type!=="characterEscape"?s(g):(a.enter("strikethroughSequenceTemporary"),d(g))}function d(g){let x=bl(u);if(g===126)return c>1?s(g):(a.consume(g),c++,d);if(c<2&&!n)return s(g);let C=a.exit("strikethroughSequenceTemporary"),h=bl(g);return C._open=!h||h===2&&!!x,C._close=!x||x===2&&!!h,o(g)}}}var Lu=class{constructor(){this.map=[]}add(e,n,l){eN(this,e,n,l)}consume(e){if(this.map.sort(function(r,a){return r[0]-a[0]}),this.map.length===0)return;let n=this.map.length,l=[];for(;n>0;)n-=1,l.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];l.push(e.slice()),e.length=0;let i=l.pop();for(;i;){for(let r of i)e.push(r);i=l.pop()}this.map.length=0}};function eN(t,e,n,l){let i=0;if(!(n===0&&l.length===0)){for(;i<t.map.length;){if(t.map[i][0]===e){t.map[i][1]+=n,t.map[i][2].push(...l);return}i+=1}t.map.push([e,n,l])}}function Y1(t,e){let n=!1,l=[];for(;e<t.length;){let i=t[e];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&l.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){let r=l.length-1;l[r]=l[r]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return l}function rp(){return{flow:{null:{name:"table",tokenize:nN,resolveAll:lN}}}}function nN(t,e,n){let l=this,i=0,r=0,a;return o;function o(w){let P=l.events.length-1;for(;P>-1;){let X=l.events[P][1].type;if(X==="lineEnding"||X==="linePrefix")P--;else break}let q=P>-1?l.events[P][1].type:null,B=q==="tableHead"||q==="tableRow"?E:s;return B===E&&l.parser.lazy[l.now().line]?n(w):B(w)}function s(w){return t.enter("tableHead"),t.enter("tableRow"),u(w)}function u(w){return w===124||(a=!0,r+=1),f(w)}function f(w){return w===null?n(w):V(w)?r>1?(r=0,l.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),d):n(w):nt(w)?tt(t,f,"whitespace")(w):(r+=1,a&&(a=!1,i+=1),w===124?(t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),a=!0,f):(t.enter("data"),c(w)))}function c(w){return w===null||w===124||gt(w)?(t.exit("data"),f(w)):(t.consume(w),w===92?m:c)}function m(w){return w===92||w===124?(t.consume(w),c):c(w)}function d(w){return l.interrupt=!1,l.parser.lazy[l.now().line]?n(w):(t.enter("tableDelimiterRow"),a=!1,nt(w)?tt(t,g,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):g(w))}function g(w){return w===45||w===58?C(w):w===124?(a=!0,t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),x):N(w)}function x(w){return nt(w)?tt(t,C,"whitespace")(w):C(w)}function C(w){return w===58?(r+=1,a=!0,t.enter("tableDelimiterMarker"),t.consume(w),t.exit("tableDelimiterMarker"),h):w===45?(r+=1,h(w)):w===null||V(w)?T(w):N(w)}function h(w){return w===45?(t.enter("tableDelimiterFiller"),p(w)):N(w)}function p(w){return w===45?(t.consume(w),p):w===58?(a=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(w),t.exit("tableDelimiterMarker"),y):(t.exit("tableDelimiterFiller"),y(w))}function y(w){return nt(w)?tt(t,T,"whitespace")(w):T(w)}function T(w){return w===124?g(w):w===null||V(w)?!a||i!==r?N(w):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(w)):N(w)}function N(w){return n(w)}function E(w){return t.enter("tableRow"),M(w)}function M(w){return w===124?(t.enter("tableCellDivider"),t.consume(w),t.exit("tableCellDivider"),M):w===null||V(w)?(t.exit("tableRow"),e(w)):nt(w)?tt(t,M,"whitespace")(w):(t.enter("data"),z(w))}function z(w){return w===null||w===124||gt(w)?(t.exit("data"),M(w)):(t.consume(w),w===92?Y:z)}function Y(w){return w===92||w===124?(t.consume(w),z):z(w)}}function lN(t,e){let n=-1,l=!0,i=0,r=[0,0,0,0],a=[0,0,0,0],o=!1,s=0,u,f,c,m=new Lu;for(;++n<t.length;){let d=t[n],g=d[1];d[0]==="enter"?g.type==="tableHead"?(o=!1,s!==0&&(V1(m,e,s,u,f),f=void 0,s=0),u={type:"table",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",u,e]])):g.type==="tableRow"||g.type==="tableDelimiterRow"?(l=!0,c=void 0,r=[0,0,0,0],a=[0,n+1,0,0],o&&(o=!1,f={type:"tableBody",start:Object.assign({},g.start),end:Object.assign({},g.end)},m.add(n,0,[["enter",f,e]])),i=g.type==="tableDelimiterRow"?2:f?3:1):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")?(l=!1,a[2]===0&&(r[1]!==0&&(a[0]=a[1],c=Uu(m,e,r,i,void 0,c),r=[0,0,0,0]),a[2]=n)):g.type==="tableCellDivider"&&(l?l=!1:(r[1]!==0&&(a[0]=a[1],c=Uu(m,e,r,i,void 0,c)),r=a,a=[r[1],n,0,0])):g.type==="tableHead"?(o=!0,s=n):g.type==="tableRow"||g.type==="tableDelimiterRow"?(s=n,r[1]!==0?(a[0]=a[1],c=Uu(m,e,r,i,n,c)):a[1]!==0&&(c=Uu(m,e,a,i,n,c)),i=0):i&&(g.type==="data"||g.type==="tableDelimiterMarker"||g.type==="tableDelimiterFiller")&&(a[3]=n)}for(s!==0&&V1(m,e,s,u,f),m.consume(e.events),n=-1;++n<e.events.length;){let d=e.events[n];d[0]==="enter"&&d[1].type==="table"&&(d[1]._align=Y1(e.events,n))}return t}function Uu(t,e,n,l,i,r){let a=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",o="tableContent";n[0]!==0&&(r.end=Object.assign({},Gr(e.events,n[0])),t.add(n[0],0,[["exit",r,e]]));let s=Gr(e.events,n[1]);if(r={type:a,start:Object.assign({},s),end:Object.assign({},s)},t.add(n[1],0,[["enter",r,e]]),n[2]!==0){let u=Gr(e.events,n[2]),f=Gr(e.events,n[3]),c={type:o,start:Object.assign({},u),end:Object.assign({},f)};if(t.add(n[2],0,[["enter",c,e]]),l!==2){let m=e.events[n[2]],d=e.events[n[3]];if(m[1].end=Object.assign({},d[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){let g=n[2]+1,x=n[3]-n[2]-1;t.add(g,x,[])}}t.add(n[3]+1,0,[["exit",c,e]])}return i!==void 0&&(r.end=Object.assign({},Gr(e.events,i)),t.add(i,0,[["exit",r,e]]),r=void 0),r}function V1(t,e,n,l,i){let r=[],a=Gr(e.events,n);i&&(i.end=Object.assign({},a),r.push(["exit",i,e])),l.end=Object.assign({},a),r.push(["exit",l,e]),t.add(n+1,0,r)}function Gr(t,e){let n=t[e],l=n[0]==="enter"?"start":"end";return n[1][l]}var iN={name:"tasklistCheck",tokenize:rN};function ap(){return{text:{91:iN}}}function rN(t,e,n){let l=this;return i;function i(s){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?n(s):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(s),t.exit("taskListCheckMarker"),r)}function r(s){return gt(s)?(t.enter("taskListCheckValueUnchecked"),t.consume(s),t.exit("taskListCheckValueUnchecked"),a):s===88||s===120?(t.enter("taskListCheckValueChecked"),t.consume(s),t.exit("taskListCheckValueChecked"),a):n(s)}function a(s){return s===93?(t.enter("taskListCheckMarker"),t.consume(s),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),o):n(s)}function o(s){return V(s)?e(s):nt(s)?t.check({tokenize:aN},e,n)(s):n(s)}}function aN(t,e,n){return tt(t,l,"whitespace");function l(i){return i===null?n(i):e(i)}}function F1(t){return uu([ep(),lp(),ip(t),rp(),ap()])}var oN={};function Xr(t){let e=this,n=t||oN,l=e.data(),i=l.micromarkExtensions||(l.micromarkExtensions=[]),r=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),a=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);i.push(F1(n)),r.push($m()),a.push(Wm(n))}function op(t){if(!t)return t;let e=t.toLowerCase(),n=e.indexOf("<think>"),l=e.indexOf("<thinking>"),i=-1,r=0;if(n!==-1&&(l===-1||n<l)?(i=n,r=7):l!==-1&&(i=l,r=10),i===-1)return t.replace(/\n\n+/g,`
38
38
 
39
- `);let a=t.slice(0,i),o=t.slice(i+r),u=o.toLowerCase(),s=u.indexOf("</think>"),f=u.indexOf("</thinking>"),c=-1,m=0;if(s!==-1&&(f===-1||s<f)?(c=s,m=8):f!==-1&&(c=f,m=11),c===-1)return(a+`
39
+ `);let a=t.slice(0,i),o=t.slice(i+r),s=o.toLowerCase(),u=s.indexOf("</think>"),f=s.indexOf("</thinking>"),c=-1,m=0;if(u!==-1&&(f===-1||u<f)?(c=u,m=8):f!==-1&&(c=f,m=11),c===-1)return(a+`
40
40
  __THINK_START__
41
41
  `+o).replace(/\n\n+/g,`
42
42
 
@@ -44,33 +44,33 @@ __THINK_START__
44
44
  __THINK_START__
45
45
  `+d+`
46
46
  __THINK_END__
47
- `+lp(g)).replace(/\n\n+/g,`
47
+ `+op(g)).replace(/\n\n+/g,`
48
48
 
49
- `)}var hn=Q(rt(),1),bo=({text:t,enableThinkTags:e=!0})=>{let n=e?lp(t):t;if(e&&n.includes("__THINK_START__")){let l=n.split(/__(?:THINK_START|THINK_END)__/),i=l[0]||"",r=l[1]||"",a=l[2]||"",o=!n.includes("__THINK_END__");return(0,hn.jsxs)("div",{className:"md",children:[i.trim()&&(0,hn.jsx)(yo,{remarkPlugins:[Fr],children:i}),o?(0,hn.jsxs)("div",{className:"think active",children:[(0,hn.jsx)("div",{className:"think-header",children:"Thinking\u2026"}),(0,hn.jsx)("pre",{className:"think-content",children:r.split(`
49
+ `)}var bn=G(it(),1),So=({text:t,enableThinkTags:e=!0})=>{let n=e?op(t):t;if(e&&n.includes("__THINK_START__")){let l=n.split(/__(?:THINK_START|THINK_END)__/),i=l[0]||"",r=l[1]||"",a=l[2]||"",o=!n.includes("__THINK_END__");return(0,bn.jsxs)("div",{className:"md",children:[i.trim()&&(0,bn.jsx)(xo,{remarkPlugins:[Xr],children:i}),o?(0,bn.jsxs)("div",{className:"think active",children:[(0,bn.jsx)("div",{className:"think-header",children:"Thinking\u2026"}),(0,bn.jsx)("pre",{className:"think-content",children:r.split(`
50
50
  `).slice(-3).join(`
51
- `)})]}):(0,hn.jsxs)("details",{className:"think",children:[(0,hn.jsx)("summary",{children:"Thought"}),(0,hn.jsx)("pre",{className:"think-content",children:r})]}),a.trim()&&(0,hn.jsx)(yo,{remarkPlugins:[Fr],children:a})]})}return(0,hn.jsx)("div",{className:"md",children:(0,hn.jsx)(yo,{remarkPlugins:[Fr],children:n})})};var Un=Q(rt(),1);function zs({message:t}){let e=(0,H1.useMemo)(()=>t.completed||t.type!=="thought"?t.text:t.text.split(`
51
+ `)})]}):(0,bn.jsxs)("details",{className:"think",children:[(0,bn.jsx)("summary",{children:"Thought"}),(0,bn.jsx)("pre",{className:"think-content",children:r})]}),a.trim()&&(0,bn.jsx)(xo,{remarkPlugins:[Xr],children:a})]})}return(0,bn.jsx)("div",{className:"md",children:(0,bn.jsx)(xo,{remarkPlugins:[Xr],children:n})})};var qn=G(it(),1);function Bu({message:t}){let e=(0,Q1.useMemo)(()=>t.completed||t.type!=="thought"?t.text:t.text.split(`
52
52
  `).slice(-3).join(`
53
- `),[t.completed,t.text,t.type]);return(0,Un.jsx)(Un.Fragment,{children:t.type==="thought"?(0,Un.jsxs)("details",{className:`think${t.completed?"":" active"}`,open:!t.completed,children:[(0,Un.jsx)("summary",{children:"Thinking"}),(0,Un.jsx)("div",{className:"think-body",children:(0,Un.jsx)("pre",{className:"think-content",children:t.completed?t.text:e})})]}):(0,Un.jsx)("div",{className:t.role==="user"?"user-message":"assistant-message",children:(0,Un.jsx)(bo,{text:t.text,enableThinkTags:!0})})})}var xo=Q(rt(),1);function GN(t){return t.startsWith("+")?"add":t.startsWith("-")?"del":t.startsWith("@@")?"hunk":t.startsWith("---")||t.startsWith("+++")?"meta":""}function Ls({oldText:t,newText:e,maxLines:n=80}){let l=t?String(t).split(`
53
+ `),[t.completed,t.text,t.type]);return(0,qn.jsx)(qn.Fragment,{children:t.type==="thought"?(0,qn.jsxs)("details",{className:`think${t.completed?"":" active"}`,open:!t.completed,children:[(0,qn.jsx)("summary",{children:"Thinking"}),(0,qn.jsx)("div",{className:"think-body",children:(0,qn.jsx)("pre",{className:"think-content",children:t.completed?t.text:e})})]}):(0,qn.jsx)("div",{className:t.role==="user"?"user-message":"assistant-message",children:(0,qn.jsx)(So,{text:t.text,enableThinkTags:!0})})})}var wo=G(it(),1);function sN(t){return t.startsWith("+")?"add":t.startsWith("-")?"del":t.startsWith("@@")?"hunk":t.startsWith("---")||t.startsWith("+++")?"meta":""}function Hu({oldText:t,newText:e,maxLines:n=80}){let l=t?String(t).split(`
54
54
  `):[],i=e?String(e).split(`
55
- `):[],r=Math.min(Math.max(l.length,i.length),n);if(r===0)return null;let a=[];a.push("--- old"),a.push("+++ new");for(let o=0;o<r;o++){let u=l[o]??"",s=i[o]??"";u===s?a.push(` ${u}`):(u!==""&&a.push(`-${u}`),s!==""&&a.push(`+${s}`))}return(0,xo.jsx)("div",{className:"diff",children:(0,xo.jsx)("pre",{children:a.slice(0,n).map((o,u)=>(0,xo.jsxs)("span",{className:GN(o),children:[o,`
56
- `]},u))})})}var bt=Q(rt(),1);function XN(t){if(!t)return null;for(let e of t)if(e&&e.type==="diff")return e;return null}function PN(t){return typeof t=="object"&&t!==null}function ZN(t){return typeof t.title=="string"&&t.title.startsWith("Execute Unity ")}function KN(t){let e=t.rawInput;return PN(e)?typeof e.agent_name=="string"&&typeof e.task=="string":!1}function q1(t){if(!t)return!1;for(let e of t)if(e){if(e.type==="diff")return!0;if(e.type==="content"&&e.content?.type==="text"){let n=(e.content.text??"").trim();if(n.length>0){if(n.startsWith("Listed ")&&n.includes("item(s)"))continue;return!0}}}return!1}function JN({raw:t}){let e=Object.entries(t).filter(([n])=>n!=="agent_name"&&n!=="task").map(([n,l])=>typeof l=="string"&&l.length>100?`${n}: ${l.slice(0,100)}...`:`${n}: ${JSON.stringify(l)}`);return e.length===0?null:(0,bt.jsx)("div",{className:"subagent-params",children:e.map((n,l)=>(0,bt.jsx)("div",{className:"subagent-param",children:n},l))})}function Us({tool:t,onOpenDiff:e}){let n=XN(t.content),l=KN(t);if(!q1(t.content)&&!ZN(t)&&!l)return(0,bt.jsxs)("div",{className:"tool-compact",children:[(0,bt.jsx)("span",{className:"tool-compact-arrow",children:"\u2192"}),(0,bt.jsx)("span",{className:"tool-compact-kind",children:t.kind??"other"}),(0,bt.jsx)("span",{className:"tool-compact-title",children:t.title||"Tool call"}),(0,bt.jsx)("span",{className:"tool-compact-status",children:t.status??"pending"})]});if(l){let r=t.rawInput,a=r.agent_name||"agent",o=r.task||"",u=t.status==="pending"||t.status==="in_progress";return(0,bt.jsxs)("div",{className:"tool-card subagent-card",children:[(0,bt.jsxs)("div",{className:`subagent-header ${u?"running":""}`,children:[(0,bt.jsxs)("div",{className:"subagent-title",children:[(0,bt.jsx)("span",{className:"subagent-label",children:"subagent"}),(0,bt.jsx)("span",{className:"subagent-name",children:a})]}),(0,bt.jsxs)("div",{className:"subagent-status-wrap",children:[u&&(0,bt.jsx)("div",{className:"subagent-spinner"}),(0,bt.jsx)("span",{className:"subagent-status",children:t.status??"pending"})]})]}),(0,bt.jsxs)("div",{className:"subagent-task",children:[(0,bt.jsx)("div",{className:"subagent-task-label",children:"Task:"}),(0,bt.jsx)("div",{className:"subagent-task-text",children:o})]}),r&&(0,bt.jsx)(JN,{raw:r}),q1(t.content)&&(0,bt.jsx)("div",{className:"subagent-result",children:(t.content??[]).map((s,f)=>s&&s.type==="content"&&s.content?.type==="text"?(0,bt.jsx)(bo,{text:s.content.text??"",enableThinkTags:!0},f):null)})]})}return(0,bt.jsxs)("div",{className:"tool-card",children:[(0,bt.jsxs)("div",{className:"tool-card-header",children:[(0,bt.jsxs)("div",{className:"tool-card-title",children:[(0,bt.jsx)("span",{className:"tool-kind",children:t.kind??"other"}),(0,bt.jsx)("span",{children:t.title||"Tool call"})]}),(0,bt.jsx)("span",{className:"tool-status",children:t.status??"pending"})]}),(0,bt.jsxs)("div",{className:"tool-card-body",children:[(t.content??[]).map((r,a)=>r?r.type==="content"&&r.content?.type==="text"?(0,bt.jsx)(bo,{text:r.content.text??"",enableThinkTags:!0},a):r.type==="diff"?(0,bt.jsxs)("div",{children:[(0,bt.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:8},children:[(0,bt.jsx)("div",{className:"pill",children:(0,bt.jsx)("span",{children:`Diff: ${r.path}`})}),(0,bt.jsx)("button",{className:"btn",onClick:()=>e({title:r.path,oldText:r.oldText??"",newText:r.newText??""}),children:"Open diff"})]}),(0,bt.jsx)(Ls,{oldText:r.oldText??"",newText:r.newText})]},a):null:null),null]})]})}var $l=Q(rt(),1);function ip({items:t,activeIndex:e,onPick:n,onHover:l}){return!t||t.length===0?null:(0,$l.jsxs)("div",{className:"autocomplete",children:[(0,$l.jsx)("div",{className:"ac-header",children:"Commands"}),t.map((i,r)=>(0,$l.jsxs)("div",{className:`ac-item${r===e?" active":""}`,onMouseEnter:()=>l(r),onMouseDown:a=>{a.preventDefault(),n(r)},children:[(0,$l.jsx)("div",{className:"ac-name",children:(0,$l.jsx)("code",{children:`/${i.name}`})}),(0,$l.jsx)("div",{className:"ac-desc",children:i.description})]},i.name))]})}var Ui=Q(rt(),1);function I1({items:t,activeIndex:e,onPick:n,onHover:l}){return!t||t.length===0?null:(0,Ui.jsxs)("div",{className:"autocomplete",children:[(0,Ui.jsx)("div",{className:"ac-header",children:"Paths"}),t.map((i,r)=>(0,Ui.jsx)("div",{className:`ac-item${r===e?" active":""}`,onMouseEnter:()=>l(r),onMouseDown:a=>{a.preventDefault(),n(r)},children:(0,Ui.jsx)("div",{className:"ac-name",children:(0,Ui.jsx)("code",{children:`@${i}`})})},`${i}_${r}`))]})}var Bn=Q(rt(),1);var Wl=({textareaRef:t,value:e,placeholder:n,onChange:l,onKeyDown:i,onSubmit:r,onCancel:a,isBusy:o=!1,textareaClassName:u,submitClassName:s="composer-submit",submitDisabled:f=!1,submitLabel:c,busyLabel:m})=>(0,Bn.jsxs)(Bn.Fragment,{children:[(0,Bn.jsx)("textarea",{ref:t,className:u,value:e,placeholder:n,onChange:l,onKeyDown:i}),(0,Bn.jsx)("button",{type:"button",className:`${s}${o?" busy":""}`,onClick:()=>{if(o){a?.();return}r()},title:o?"Stop":"Send",disabled:f,children:o?m??(0,Bn.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,Bn.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}):c||(0,Bn.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,Bn.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})})})]});var Bs=Q(ie(),1);var j1=Q(lc(),1),ti=Q(rt(),1);function He({children:t,onClose:e}){return(0,j1.createPortal)((0,ti.jsx)("div",{className:"modal-backdrop",role:"presentation",onMouseDown:l=>{l.target===l.currentTarget&&e()},children:t}),document.body)}function qe({title:t,onClose:e,children:n,footer:l}){return(0,ti.jsxs)("div",{className:"modal",role:"dialog","aria-modal":"true",children:[(0,ti.jsxs)("div",{className:"modal-header",children:[(0,ti.jsx)("h2",{children:t}),(0,ti.jsx)("button",{className:"btn",onClick:e,children:"Close"})]}),n,l?(0,ti.jsx)("div",{className:"modal-footer",children:l}):null]})}var Ie=Q(rt(),1);function Qr({title:t,oldText:e,newText:n,onClose:l,onConfirm:i}){let[r,a]=(0,Bs.useState)(n),o=(0,Bs.useMemo)(()=>typeof i=="function",[i]);return(0,Ie.jsx)(He,{onClose:l,children:(0,Ie.jsx)(qe,{title:t?`Review change \xB7 ${t}`:"Review change",onClose:l,footer:(0,Ie.jsxs)(Ie.Fragment,{children:[(0,Ie.jsx)("button",{className:"btn",onClick:l,children:"Cancel"}),o?(0,Ie.jsx)("button",{className:"btn primary",onClick:()=>i?.(r),children:"Use this version"}):null]}),children:(0,Ie.jsxs)("div",{className:"modal-body",children:[(0,Ie.jsxs)("div",{className:"modal-pane",children:[(0,Ie.jsx)("div",{className:"pane-title",children:"Current (read-only)"}),(0,Ie.jsx)("textarea",{readOnly:!0,value:e})]}),(0,Ie.jsxs)("div",{className:"modal-pane",children:[(0,Ie.jsx)("div",{className:"pane-title",children:"Proposed (editable)"}),(0,Ie.jsx)("textarea",{value:r,onChange:u=>a(u.target.value)})]})]})})})}var ko=Q(ie(),1);var Et=Q(rt(),1);function $N(t){if(typeof t!="object"||t===null)return!1;let e=t;return e.hookTrust===!0&&Array.isArray(e.hooks)}function WN({hooks:t}){return(0,Et.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[(0,Et.jsx)("div",{className:"pill",style:{background:"var(--warning-bg, #332b00)",padding:"6px 10px"},children:"This workspace has project hooks that are not yet trusted."}),(0,Et.jsx)("div",{className:"section-title",children:"Blocked hooks"}),(0,Et.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:t.map(e=>(0,Et.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--surface-alt, #1e1e1e)",fontSize:13},children:[(0,Et.jsx)("strong",{children:e.name}),(0,Et.jsx)("div",{style:{opacity:.8,marginTop:2},children:(0,Et.jsx)("code",{children:e.command})}),(0,Et.jsxs)("div",{style:{opacity:.7,marginTop:2},children:["events: ",e.eventNames.join(", ")]})]},e.key))})]})}function tA(t){return t.kind==="allow_once"||t.kind==="allow_always"}function eA(t){return t.kind==="reject_once"||t.kind==="reject_always"}function Y1({req:t,onSelect:e}){let[n,l]=(0,ko.useState)(()=>{let o=t.toolCall?.content??[];for(let u of o)if(u&&u.type==="diff")return{title:u.path,oldText:u.oldText??"",newText:u.newText??""};return null}),[i,r]=(0,ko.useState)(!1),a=(0,ko.useMemo)(()=>n?{codely:{toolConfirmationPayload:{newContent:n.newText}}}:null,[n]);return(0,Et.jsxs)(Et.Fragment,{children:[(0,Et.jsx)(He,{onClose:()=>{e({outcome:"cancelled"})},children:(0,Et.jsx)(qe,{title:`Approval required \xB7 ${t.toolCall?.title??"Tool call"}`,onClose:()=>e({outcome:"cancelled"}),footer:(0,Et.jsx)("button",{className:"btn",onClick:()=>e({outcome:"cancelled"}),children:"Cancel"}),children:(0,Et.jsx)("div",{className:"modal-body",style:{gridTemplateColumns:"1fr"},children:(0,Et.jsxs)("div",{className:"modal-pane",children:[(0,Et.jsx)("div",{className:"pane-title",children:"Details"}),(0,Et.jsxs)("div",{style:{padding:"10px 12px",display:"flex",flexDirection:"column",gap:10},children:[(0,Et.jsxs)("div",{className:"pill",children:[(0,Et.jsx)("span",{children:`Kind: ${t.toolCall?.kind??"other"}`}),(0,Et.jsx)("span",{style:{marginLeft:10},children:`Status: ${t.toolCall?.status??"pending"}`})]}),$N(t.toolCall?.rawInput)?(0,Et.jsx)(WN,{hooks:t.toolCall.rawInput.hooks}):null,n?(0,Et.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[(0,Et.jsx)("div",{className:"pill",children:(0,Et.jsx)("span",{children:`File: ${n.title}`})}),(0,Et.jsx)("button",{className:"btn",onClick:()=>r(!0),children:"Edit diff\u2026"})]}):null,n?(0,Et.jsx)(Ls,{oldText:n.oldText,newText:n.newText}):null,(0,Et.jsx)("div",{className:"section-title",children:"Options"}),(0,Et.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:10},children:(t.options??[]).map(o=>(0,Et.jsx)("button",{className:eA(o)?"btn danger":o.kind==="allow_always"?"btn primary":"btn",onClick:()=>{e({outcome:"selected",optionId:o.optionId,meta:tA(o)?a??void 0:void 0})},children:o.name||o.optionId},o.optionId))})]})]})})})}),i&&n?(0,Et.jsx)(Qr,{title:n.title,oldText:n.oldText,newText:n.newText,onClose:()=>r(!1),onConfirm:o=>{l({...n,newText:o}),r(!1)}}):null]})}var V1=Q(ie(),1);var gn=Q(rt(),1);function F1({params:t,onDone:e}){let[n,l]=(0,V1.useState)(t.defaultValue??"");return(0,gn.jsx)(He,{onClose:()=>e({outcome:"cancelled"}),children:(0,gn.jsx)(qe,{title:t.title||"Input required",onClose:()=>e({outcome:"cancelled"}),footer:(0,gn.jsxs)(gn.Fragment,{children:[(0,gn.jsx)("button",{className:"btn",onClick:()=>e({outcome:"cancelled"}),children:"Cancel"}),(0,gn.jsx)("button",{className:"btn primary",onClick:()=>e({outcome:"submitted",text:n}),children:"Submit"})]}),children:(0,gn.jsx)("div",{className:"modal-body",style:{gridTemplateColumns:"1fr"},children:(0,gn.jsxs)("div",{className:"modal-pane",children:[(0,gn.jsx)("div",{className:"pane-title",children:t.prompt||"Please provide input:"}),(0,gn.jsx)("textarea",{value:n,onChange:i=>l(i.target.value),style:{minHeight:140}})]})})})})}var Kn=Q(rt(),1);function Q1({methods:t,onPick:e,onClose:n}){return(0,Kn.jsx)(He,{onClose:n,children:(0,Kn.jsx)(qe,{title:"Authenticate",onClose:n,footer:(0,Kn.jsx)("button",{className:"btn",onClick:n,children:"Cancel"}),children:(0,Kn.jsx)("div",{className:"modal-body",style:{gridTemplateColumns:"1fr"},children:(0,Kn.jsxs)("div",{className:"modal-pane",children:[(0,Kn.jsx)("div",{className:"pane-title",children:"Choose an auth method (stored by the CLI)"}),(0,Kn.jsx)("div",{style:{padding:"10px 12px",display:"flex",flexDirection:"column",gap:10},children:t.map(l=>(0,Kn.jsx)("button",{className:"btn primary",onClick:()=>e(l),children:l.name||l.id},l.id))})]})})})})}var G1=Q(ie(),1);function X1(t,e=[]){(0,G1.useLayoutEffect)(()=>{let n=t.current;n&&(n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,180)}px`)},[t,...e])}var St=Q(ie(),1);var nA=new Set(["extensions","commands","skills","agents"]);function lA(t){return typeof t=="object"&&t!==null}function iA(t){return!lA(t)||typeof t.active!="boolean"||typeof t.key!="string"||t.key.length===0||typeof t.title!="string"||t.title.length===0||!Array.isArray(t.kinds)||!t.kinds.every(e=>typeof e=="string"&&nA.has(e))||t.message!=null&&(typeof t.message!="string"||t.message.length===0)||t.timestamp!=null&&(typeof t.timestamp!="string"||t.timestamp.length===0)?null:{active:t.active,key:t.key,kinds:t.kinds,title:t.title,...typeof t.message=="string"?{message:t.message}:{},...typeof t.timestamp=="string"?{timestamp:t.timestamp}:{}}}function Hs(t){let e=iA(t);if(!e||!e.active)return null;let n=e.message?.trim();if(n)return n;let l=e.title.trim();return l.length>0?l:null}var Gr=class{constructor(e){this.ws=e}nextId=0;pending=new Map;handlers=new Map;on(e,n){this.handlers.set(e,n)}request(e,n){let l=this.nextId++,i={jsonrpc:"2.0",id:l,method:e,params:n};return this.ws.send(JSON.stringify(i)),new Promise((r,a)=>{let o=s=>r(s),u=s=>a(s);this.pending.set(l,{resolve:o,reject:u})})}notify(e,n){let l={jsonrpc:"2.0",method:e,params:n};this.ws.send(JSON.stringify(l))}handleMessage(e){if(!e||typeof e!="object")return;let n=e,l="id"in n,i="method"in n;if(l&&!i){let r=n.id;if(typeof r!="number")return;let a=this.pending.get(r);if(!a)return;this.pending.delete(r),"result"in n?a.resolve(n.result):a.reject(n.error);return}if(l&&i){let r=n.id,a=n.method;if(typeof r!="number"||typeof a!="string")return;let o=this.handlers.get(a);if(!o){this.respondError(r,{code:-32601,message:`Method not found: ${a}`});return}Promise.resolve().then(()=>o(n.params)).then(u=>this.respond(r,u??null)).catch(u=>this.respondError(r,{code:-32603,message:u instanceof Error?u.message:String(u)}));return}if(i){let r=n.method;if(typeof r!="string")return;let a=this.handlers.get(r);a&&Promise.resolve(a(n.params))}}respond(e,n){let l={jsonrpc:"2.0",id:e,result:n};this.ws.send(JSON.stringify(l))}respondError(e,n){let l={jsonrpc:"2.0",id:e,error:n};this.ws.send(JSON.stringify(l))}};function Dn(){try{return new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}function Bi(t){return typeof t=="object"&&t!==null}function rA(t){let e=t.toolCall?.rawInput;return typeof e=="object"&&e!==null&&e.hookTrust===!0}function aA(t){let e=t.options.find(n=>n.kind==="allow_always")??t.options.find(n=>n.kind==="allow_once")??t.options[0];return e?{outcome:{outcome:"selected",optionId:e.optionId}}:{outcome:{outcome:"cancelled"}}}function P1(t){if(!Bi(t))return!1;let e=t.code,n=t.message;return!!(e===-32002||typeof n=="string"&&n.toLowerCase().includes("auth"))}function oA(t){if(!Bi(t))return!1;let e=t.kind;if(e==="message"){let n=t.message;return Z1(n)}return e==="tool"?typeof t.toolCallId=="string"&&t.toolCallId.length>0:!1}function uA(t){return Bi(t)?typeof t.toolCallId=="string"&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.kind=="string":!1}function Z1(t){if(!Bi(t))return!1;let e=t.role,n=t.type,l=t.text;return(e==="user"||e==="assistant")&&n==="text"&&typeof l=="string"}function sA(t){let e=t?._meta;if(!Bi(e))return null;let n=e.codely;if(!Bi(n))return null;let l=n.ui;if(!Bi(l)||l.action!=="replace_history")return null;let i={},r=l.feed;Array.isArray(r)&&(i.feed=r.filter(oA));let a=l.tools;Array.isArray(a)&&(i.tools=a.filter(uA));let o=l.messages;return Array.isArray(o)&&(i.messages=o.filter(Z1)),!i.feed&&!i.tools&&!i.messages?null:i}function K1(t){let[e,n]=(0,St.useState)("connecting"),[l,i]=(0,St.useState)(null),[r,a]=(0,St.useState)({open:!1,methods:[]}),[o,u]=(0,St.useState)([]),[s,f]=(0,St.useState)([]),[c,m]=(0,St.useState)([]),[d,g]=(0,St.useState)([]),[b,N]=(0,St.useState)(null),[p,h]=(0,St.useState)(null),[y,w]=(0,St.useState)(null),A=(0,St.useRef)(null),[E,D]=(0,St.useState)(null),L=(0,St.useRef)(null),[I,T]=(0,St.useState)(!1),lt=(0,St.useRef)(null),K=(0,St.useRef)(null),G=(0,St.useRef)(0),P=(0,St.useRef)(null),tt=e==="connected"?p??b:b??p,ot=(0,St.useCallback)(B=>{m(Z=>[...Z,B])},[]),gt=(0,St.useCallback)(B=>{let{role:Z,type:j,chunk:V}=B;if(!V)return;let W=Z==="assistant"?P.current??void 0:void 0;m(kt=>{let Re=kt.map(ce=>ce.kind==="message"&&!ce.message.completed&&(ce.message.role!==Z||ce.message.type!==j)?{...ce,message:{...ce.message,completed:!0}}:ce),Jt=Re[Re.length-1];if(Jt&&Jt.kind==="message"&&Jt.message.role===Z&&Jt.message.type===j&&!Jt.message.completed){let ce={kind:"message",message:{...Jt.message,text:(Jt.message.text??"")+V}};return[...Re.slice(0,-1),ce]}let Ze={kind:"message",message:{id:`${Z}_${j}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:Z,type:j,time:Dn(),text:V,completed:Z==="user",...W!==void 0?{turnId:W}:{}}};return[...Re,Ze]})},[]),Ot=(0,St.useCallback)(()=>{let B=P.current;B!==null&&(m(Z=>Z.map(j=>j.kind!=="message"||j.message.role!=="assistant"||j.message.turnId!==B||j.message.completed?j:{...j,message:{...j.message,completed:!0}})),P.current=null,T(!1))},[]),H=(0,St.useCallback)(B=>{let Z=sA(B);if(Z){Z.tools?g(Z.tools):g([]),Z.feed?m(Z.feed.map(j=>{if(j.kind==="tool")return{kind:"tool",toolCallId:j.toolCallId,time:Dn()};let V=j.message;return{kind:"message",message:{id:`rehydrate_${V.role}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:V.role,type:"text",time:Dn(),text:V.text,completed:!0}}})):Z.messages?m(Z.messages.map(j=>({kind:"message",message:{id:`rehydrate_${j.role}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:j.role,type:"text",time:Dn(),text:j.text,completed:!0}}))):m([]),f([]),N(null),P.current=null,T(!1);return}if(B.sessionUpdate==="available_commands_update"){u(B.availableCommands??[]);return}if(B.sessionUpdate==="plan"){f(B.entries??[]);return}if(B.sessionUpdate==="agent_message_chunk"){B.content?.type==="text"&&gt({role:"assistant",type:"text",chunk:B.content.text??""});return}if(B.sessionUpdate==="agent_thought_chunk"){B.content?.type==="text"&&gt({role:"assistant",type:"thought",chunk:B.content.text??""});return}if(B.sessionUpdate==="tool_call"){let j={toolCallId:B.toolCallId,title:B.title,status:B.status,kind:B.kind,content:B.content,rawInput:B.rawInput,locations:B.locations};g(V=>[...V,j]),m(V=>V.map(W=>W.kind==="message"&&!W.message.completed?{...W,message:{...W.message,completed:!0}}:W)),ot({kind:"tool",toolCallId:j.toolCallId,time:Dn()});return}if(B.sessionUpdate==="tool_call_update"){g(j=>j.map(V=>V.toolCallId===B.toolCallId?{...V,...B.title?{title:B.title}:{},...B.status?{status:B.status}:{},...B.kind?{kind:B.kind}:{},...B.content?{content:B.content}:{}}:V));return}},[ot,gt]),x=(0,St.useCallback)(async()=>{try{lt.current?.close()}catch{}lt.current=null,K.current=null,P.current=null,n("connecting"),i(null),N(null),h(null);let B=`${location.protocol==="https:"?"wss:":"ws:"}//${location.host}${t.wsPath||"/ws"}`,Z=new WebSocket(B);lt.current=Z,Z.addEventListener("open",async()=>{n("connected");let j=new Gr(Z);K.current=j,j.on("session/update",V=>{let W=V;return W&&W.update&&H(W.update),null}),j.on("codely/external_load_diagnostics",V=>(h(Hs(V)),null)),j.on("session/request_permission",V=>{let W=V;return t.yolo&&!rA(W)?aA(W):new Promise(kt=>{A.current=kt,w(W)})}),j.on("_session/request_input",V=>{let W=V;return new Promise(kt=>{L.current=kt,D(W)})}),Z.addEventListener("message",V=>{try{let W=JSON.parse(String(V.data));j.handleMessage(W)}catch{}});try{let W=(await j.request("initialize",{protocolVersion:1,clientCapabilities:{fs:{readTextFile:!1,writeTextFile:!1},terminal:!1},clientInfo:{name:"codely-web-ui",version:"0.0.0",title:"Codely Web UI"}}))?.authMethods??[];a({open:!1,methods:W});try{let kt=await j.request("session/new",{cwd:t.cwd||"",mcpServers:[]});i(kt.sessionId),N(null),h(null)}catch(kt){P1(kt)?(a({open:!0,methods:W}),N("Authentication required.")):N(`Failed to create session: ${String(kt?.message??kt)}`)}}catch(V){N(`Failed to initialize ACP: ${String(V?.message??V)}`)}}),Z.addEventListener("close",j=>{let V=j,W=[];V&&typeof V.code=="number"&&W.push(`code=${V.code}`),V&&typeof V.reason=="string"&&V.reason.trim()!==""&&W.push(`reason=${V.reason}`),V&&typeof V.wasClean=="boolean"&&W.push(`clean=${V.wasClean}`),n("disconnected"),i(null),N(W.length>0?`Disconnected (${W.join(" ")})`:"Disconnected.")}),Z.addEventListener("error",()=>{n("disconnected"),i(null),N("Connection error.")})},[t.cwd,t.wsPath,t.yolo,H]),Nt=(0,St.useCallback)(async B=>{let Z=K.current;if(Z)try{await Z.request("authenticate",{methodId:B.id});let j=await Z.request("session/new",{cwd:t.cwd||"",mcpServers:[]});i(j.sessionId),a(V=>({...V,open:!1})),N(null),h(null)}catch(j){N(`Authentication failed: ${String(j?.message??j)}`)}},[t.cwd]),At=(0,St.useCallback)(async B=>{let Z=K.current;if(!Z||!l){N("Not connected.");return}let{displayText:j,prompt:V}=typeof B=="string"?{displayText:B,prompt:[{type:"text",text:B}]}:B;gt({role:"user",type:"text",chunk:j}),G.current+=1,P.current=G.current,T(!0);try{let W=await Z.request("session/prompt",{sessionId:l,prompt:V});Ot(),W?.stopReason==="cancelled"&&N("Cancelled.")}catch(W){if(Ot(),P1(W)){i(null),a(kt=>({...kt,open:!0})),N("Authentication required.");return}N(`Request failed: ${String(W?.message??W)}`)}},[gt,Ot,l]),k=(0,St.useCallback)(()=>{let B=K.current;if(!(!B||!l))try{B.notify("session/cancel",{sessionId:l})}catch{}},[l]),ct=(0,St.useCallback)(async(B,Z=10)=>{let j=K.current;if(!j||!l)return[];try{let V=await j.request("_workspace/suggest_paths",{sessionId:l,pattern:B,maxResults:Z});return Array.isArray(V?.paths)?V.paths:[]}catch{return[]}},[l]),be=(0,St.useCallback)(async(B,Z=10)=>{let j=K.current;if(!j||!l)return[];try{let V=await j.request("_slash/complete",{sessionId:l,line:B,maxResults:Z});return Array.isArray(V?.items)?V.items:[]}catch{return[]}},[l]),me=(0,St.useCallback)(B=>{let Z=A.current;A.current=null,w(null),Z&&Z(B)},[]),pe=(0,St.useCallback)(B=>{let Z=L.current;L.current=null,D(null),Z&&Z(B)},[]);return(0,St.useEffect)(()=>{x()},[]),{connection:e,sessionId:l,statusText:tt,auth:r,availableCommands:o,planEntries:s,feed:c,tools:d,connect:x,sendPrompt:At,cancel:k,suggestPaths:ct,completeSlashCommand:be,authenticate:Nt,permissionReq:y,resolvePermission:me,inputReq:E,resolveInput:pe,isBusy:I}}var st=Q(ie(),1);function cA(t){return t?t.endsWith("/")?t.slice(0,-1):t:"/__codely__/control-plane"}async function ei(t,e){let n=await fetch(t,{...e,headers:{"content-type":"application/json",...e?.headers??{}}}),l=await n.text(),i=l?JSON.parse(l):null;if(!n.ok){let r=typeof i?.error=="string"?i.error:`${n.status} ${n.statusText}`;throw new Error(r)}return i}function J1(t){let e=cA(t);return{list:async()=>(await ei(`${e}/registry`)).endpoints,getById:async n=>(await ei(`${e}/registry/${encodeURIComponent(n)}`)).endpoint,create:async n=>(await ei(`${e}/registry`,{method:"POST",body:JSON.stringify(n)})).endpoint,update:async(n,l)=>(await ei(`${e}/registry/${encodeURIComponent(n)}`,{method:"PUT",body:JSON.stringify(l)})).endpoint,remove:async n=>{await ei(`${e}/registry/${encodeURIComponent(n)}`,{method:"DELETE"})},health:async n=>ei(`${e}/health?endpointId=${encodeURIComponent(n)}`),getRawRegistryJson:async()=>(await ei(`${e}/registry/raw`)).json,saveRawRegistryJson:async n=>{await ei(`${e}/registry/raw`,{method:"PUT",body:JSON.stringify({json:n})})}}}var ni=Q(ie(),1);var Pe=Q(rt(),1);function fA(t){return t.trim()?t.split(",").map(e=>e.trim()).filter(e=>e.length>0):[]}var $1=({open:t,endpoint:e,onClose:n,onSave:l})=>{let[i,r]=(0,ni.useState)(""),[a,o]=(0,ni.useState)(""),[u,s]=(0,ni.useState)(""),[f,c]=(0,ni.useState)(null),[m,d]=(0,ni.useState)(!1);if((0,ni.useEffect)(()=>{t&&(r(e?.name??""),o(e?.baseUrl??""),s((e?.tags??[]).join(", ")),c(null),d(!1))},[e,t]),!t)return null;let g=async()=>{if(!i.trim()||!a.trim()){c("Name and base URL are required.");return}d(!0),c(null);try{await l({name:i.trim(),baseUrl:a.trim(),tags:fA(u)}),n()}catch(b){c(b instanceof Error?b.message:"Save failed")}finally{d(!1)}};return(0,Pe.jsx)(He,{onClose:n,children:(0,Pe.jsx)(qe,{title:e?"Edit endpoint":"Add endpoint",onClose:n,footer:(0,Pe.jsxs)("div",{className:"cp-modal-actions",children:[(0,Pe.jsx)("button",{className:"btn",onClick:n,disabled:m,children:"Cancel"}),(0,Pe.jsx)("button",{className:"btn primary",onClick:()=>void g(),disabled:m,children:m?"Saving\u2026":"Save"})]}),children:(0,Pe.jsxs)("div",{className:"cp-modal-body",children:[(0,Pe.jsxs)("label",{className:"cp-label",children:["Name",(0,Pe.jsx)("input",{className:"cp-input",value:i,onChange:b=>r(b.target.value),placeholder:"e.g. Mac Mini - local"})]}),(0,Pe.jsxs)("label",{className:"cp-label",children:["Base URL",(0,Pe.jsx)("input",{className:"cp-input",value:a,onChange:b=>o(b.target.value),placeholder:"http://127.0.0.1:3939"})]}),(0,Pe.jsxs)("label",{className:"cp-label",children:["Tags (comma-separated)",(0,Pe.jsx)("input",{className:"cp-input",value:u,onChange:b=>s(b.target.value),placeholder:"local, gpu, staging"})]}),f?(0,Pe.jsx)("div",{className:"cp-error",children:f}):null]})})})};var li=Q(ie(),1);var Ee=Q(rt(),1);function W1(t){let e=t.split(/\r?\n/),n=[],l=[];for(let i=0;i<e.length;i+=1){let r=e[i]?.trim()??"";if(!r)continue;let a=r.split(",").map(f=>f.trim());if(a.length>3){l.push(`Line ${i+1}: expected "url[, name[, tag]]"`);continue}let o=a[0]??"";if(!o){l.push(`Line ${i+1}: missing endpoint url`);continue}let u=a[1]?.trim()||o,s=a[2]?.trim()||o;n.push({name:u,baseUrl:o,tags:s?[s]:[]})}return l.length>0?{ok:!1,error:l.join(`
57
- `)}:n.length===0?{ok:!1,error:"No endpoints found."}:{ok:!0,inputs:n}}var tx=({open:t,onClose:e,onSubmit:n})=>{let[l,i]=(0,li.useState)(""),[r,a]=(0,li.useState)(null),[o,u]=(0,li.useState)(!1);(0,li.useEffect)(()=>{t&&(i(""),a(null),u(!1))},[t]);let s=(0,li.useMemo)(()=>W1(l),[l]);if(!t)return null;let f=async()=>{let c=W1(l);if(!c.ok){a(c.error);return}u(!0),a(null);try{await n(c.inputs),e()}catch(m){a(m instanceof Error?m.message:"Batch add failed")}finally{u(!1)}};return(0,Ee.jsx)(He,{onClose:e,children:(0,Ee.jsx)(qe,{title:"Batch add endpoints",onClose:e,footer:(0,Ee.jsxs)("div",{className:"cp-modal-actions",children:[(0,Ee.jsx)("button",{className:"btn",onClick:e,disabled:o,children:"Cancel"}),(0,Ee.jsx)("button",{className:"btn primary",onClick:()=>void f(),disabled:o,children:o?"Adding\u2026":"Add"})]}),children:(0,Ee.jsxs)("div",{className:"cp-modal-body",children:[(0,Ee.jsxs)("div",{className:"cp-muted",style:{marginBottom:8},children:["One entry per line (empty lines allowed):",(0,Ee.jsx)("br",{}),(0,Ee.jsx)("code",{children:"url[, name[, tag]]"}),(0,Ee.jsx)("br",{}),"If only ",(0,Ee.jsx)("code",{children:"url"})," is provided, ",(0,Ee.jsx)("code",{children:"name"})," and"," ",(0,Ee.jsx)("code",{children:"tag"})," default to the same url."]}),(0,Ee.jsx)("textarea",{className:"cp-textarea",placeholder:`http://127.0.0.1:3939, Local, local
58
- http://127.0.0.1:3940`,value:l,onChange:c=>i(c.target.value),rows:8}),s.ok?(0,Ee.jsxs)("div",{className:"cp-muted",style:{marginTop:8},children:["Parsed ",s.inputs.length," endpoint(s)"]}):null,r?(0,Ee.jsx)("div",{className:"cp-error",style:{whiteSpace:"pre-wrap"},children:r}):null]})})})};var Kt=Q(rt(),1);function dA(t){return t===void 0?(0,Kt.jsx)("span",{className:"cp-health unknown",children:"Unknown"}):t===null?(0,Kt.jsx)("span",{className:"cp-health pending",children:"Checking\u2026"}):t.ok?(0,Kt.jsxs)("span",{className:"cp-health ok",children:["Healthy ",(0,Kt.jsxs)("span",{className:"cp-health-ms",children:[t.durationMs,"ms"]})]}):(0,Kt.jsxs)("span",{className:"cp-health err",children:["Unhealthy ",t.error?`\xB7 ${t.error}`:""]})}var rp=({endpoints:t,healthById:e,onEdit:n,onDelete:l,onRefreshHealth:i,selectedIds:r,onToggleSelect:a})=>t.length===0?(0,Kt.jsx)("div",{className:"cp-empty",children:"No endpoints registered yet."}):(0,Kt.jsx)("div",{className:"cp-list",children:t.map(o=>(0,Kt.jsxs)("div",{className:"cp-row",children:[(0,Kt.jsx)("div",{className:"cp-select-box",children:(0,Kt.jsx)("input",{type:"checkbox",checked:r?.has(o.id)??!1,onChange:u=>a?.(o.id,u.target.checked)})}),(0,Kt.jsxs)("div",{className:"cp-row-main",children:[(0,Kt.jsxs)("div",{className:"cp-row-title",children:[(0,Kt.jsx)("span",{className:"cp-name",children:o.name}),(0,Kt.jsx)("span",{className:"cp-url",children:o.baseUrl})]}),(0,Kt.jsxs)("div",{className:"cp-row-meta",children:[dA(e[o.id]),(0,Kt.jsx)("div",{className:"cp-tags",children:o.tags.length===0?(0,Kt.jsx)("span",{className:"cp-tag muted",children:"no tags"}):o.tags.map(u=>(0,Kt.jsx)("span",{className:"cp-tag",children:u},u))})]})]}),(0,Kt.jsxs)("div",{className:"cp-actions",children:[(0,Kt.jsx)("button",{className:"btn",onClick:()=>i(o),children:"Health"}),(0,Kt.jsx)("button",{className:"btn",onClick:()=>n(o),children:"Edit"}),(0,Kt.jsx)("button",{className:"btn danger",onClick:()=>l(o),children:"Delete"})]})]},o.id))});var ex=Q(ie(),1);var Xr=Q(ie(),1);var Hi=Q(rt(),1);var Pr=({feed:t,tools:e,onOpenDiff:n})=>{let l=(0,Xr.useRef)(null),i=(0,Xr.useMemo)(()=>{let r=new Map;for(let a of e)r.set(a.toolCallId,a);return r},[e]);return(0,Xr.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[t]),(0,Hi.jsx)("div",{className:"cp-task-body",ref:l,children:t.length===0?(0,Hi.jsx)("div",{className:"cp-empty",children:"No activity yet."}):t.map(r=>{if(r.kind==="message")return(0,Hi.jsx)("div",{className:"cp-task-message",children:(0,Hi.jsx)(zs,{message:r.message})},r.message.id);let a=i.get(r.toolCallId);return a?(0,Hi.jsx)("div",{className:"cp-task-tool",children:(0,Hi.jsx)(Us,{tool:a,onOpenDiff:o=>n({title:o.title,oldText:o.oldText,newText:o.newText})})},r.toolCallId):null})})};var Ct=Q(rt(),1);var ap=({state:t,selected:e,onSelect:n,onClick:l,onForceCancel:i,onForceRefresh:r,onRetry:a,onSendPrompt:o,onOpenDiff:u,compact:s=!1,hideInput:f=!1})=>{let[c,m]=(0,ex.useState)(""),d=t.connection==="connected"?t.isBusy?"busy":"idle":"disconnected",g=t.connection==="disconnected"||t.lastError!==null,b=()=>{if(t.connection!=="connected")return;let h=c.trim();h&&(o(t.endpoint.id,h),m(""))},N=h=>{h.key==="Enter"&&h.ctrlKey&&(h.preventDefault(),b())};if(s){let h="";if(t.connection==="connected"&&t.statusText)h=t.statusText;else{let y=t.feed[t.feed.length-1];y&&(y.kind==="message"?h=y.message.text:h=`Tool: ${y.toolCallId}`)}return(0,Ct.jsxs)("div",{className:`cp-task-card-compact${g?" error":""}`,onClick:()=>l(t.endpoint.id),children:[(0,Ct.jsxs)("div",{className:"cp-task-card-compact-body",children:[(0,Ct.jsxs)("div",{className:"cp-task-card-compact-top",children:[(0,Ct.jsx)("span",{className:"cp-task-card-compact-name",children:t.endpoint.name}),(0,Ct.jsx)("span",{className:`cp-conn ${t.connection}`,children:d})]}),(0,Ct.jsxs)("div",{className:"cp-task-card-compact-meta",children:[t.queuedCount>0&&(0,Ct.jsxs)("span",{children:["queue ",t.queuedCount]}),t.lastActivityAt&&(0,Ct.jsx)("span",{children:new Date(t.lastActivityAt).toLocaleTimeString()})]}),h&&(0,Ct.jsx)("div",{className:"cp-task-card-compact-preview",children:h})]}),(0,Ct.jsx)("span",{className:"cp-task-card-compact-chevron",children:"\u203A"})]})}let p=["cp-task-card",e?"selected":"",g?"error":""].filter(Boolean).join(" ");return(0,Ct.jsxs)("div",{className:p,onClick:()=>l(t.endpoint.id),children:[(0,Ct.jsxs)("div",{className:"cp-task-header",children:[(0,Ct.jsx)("div",{className:"cp-task-header-top",children:(0,Ct.jsxs)("div",{className:"cp-task-header-left",children:[(0,Ct.jsx)("input",{type:"checkbox",checked:e,onClick:h=>h.stopPropagation(),onChange:h=>n(t.endpoint.id,h.target.checked),style:{width:16,height:16,cursor:"pointer"}}),(0,Ct.jsxs)("div",{className:"cp-task-header-info",children:[(0,Ct.jsx)("div",{className:"cp-task-name",children:t.endpoint.name}),(0,Ct.jsx)("a",{className:"cp-task-url",href:t.endpoint.baseUrl,target:"_blank",rel:"noreferrer noopener",title:"Open in new tab",onClick:h=>h.stopPropagation(),children:t.endpoint.baseUrl})]})]})}),(0,Ct.jsxs)("div",{className:"cp-task-actions-row",children:[(0,Ct.jsxs)("div",{className:"cp-task-actions",children:[(0,Ct.jsx)("button",{className:"btn danger",onClick:h=>{h.stopPropagation(),i(t.endpoint.id)},children:"Cancel"}),(0,Ct.jsx)("button",{className:"btn",onClick:h=>{h.stopPropagation(),r(t.endpoint.id)},children:"Refresh"}),t.lastFailed?(0,Ct.jsx)("button",{className:"btn",onClick:h=>{h.stopPropagation(),a(t.endpoint.id)},children:"Retry"}):null]}),(0,Ct.jsxs)("div",{className:"cp-task-meta",children:[(0,Ct.jsx)("span",{className:`cp-conn ${t.connection}`,children:d}),(0,Ct.jsxs)("span",{className:"cp-queue",children:["queue ",t.queuedCount]}),t.lastActivityAt?(0,Ct.jsx)("span",{className:"cp-activity",children:new Date(t.lastActivityAt).toLocaleTimeString()}):null]})]})]}),t.connection==="connected"&&t.statusText?(0,Ct.jsx)("div",{className:"cp-task-notice",children:t.statusText}):null,t.lastError?(0,Ct.jsxs)("div",{className:"cp-task-error",children:["Last error: ",t.lastError]}):null,(0,Ct.jsx)(Pr,{feed:t.feed,tools:t.tools,onOpenDiff:u}),!f&&(0,Ct.jsx)("div",{className:"cp-task-input",onClick:h=>h.stopPropagation(),children:(0,Ct.jsx)(Wl,{value:c,textareaClassName:"cp-task-textarea",placeholder:"Send prompt...",onChange:h=>m(h.target.value),onKeyDown:N,onSubmit:b,submitClassName:"btn primary",submitDisabled:!c.trim()||t.connection!=="connected",submitLabel:"Send"})})]})};var qi=Q(ie(),1);var Jn=Q(rt(),1);var nx=({open:t,onClose:e,onLoad:n,onSave:l})=>{let[i,r]=(0,qi.useState)(""),[a,o]=(0,qi.useState)(!1),[u,s]=(0,qi.useState)(!1),[f,c]=(0,qi.useState)(null);if((0,qi.useEffect)(()=>{t&&(o(!0),s(!1),c(null),(async()=>{try{let d=await n();r(d)}catch(d){c(d instanceof Error?d.message:"Failed to load JSON")}finally{o(!1)}})())},[n,t]),!t)return null;let m=async()=>{s(!0),c(null);try{await l(i),e()}catch(d){c(d instanceof Error?d.message:"Save failed")}finally{s(!1)}};return(0,Jn.jsx)(He,{onClose:e,children:(0,Jn.jsx)(qe,{title:"Edit registry JSON",onClose:e,footer:(0,Jn.jsxs)("div",{className:"cp-modal-actions",children:[(0,Jn.jsx)("button",{className:"btn",onClick:e,disabled:u||a,children:"Cancel"}),(0,Jn.jsx)("button",{className:"btn primary",onClick:()=>void m(),disabled:u||a,children:u?"Saving\u2026":"Save"})]}),children:(0,Jn.jsxs)("div",{className:"cp-modal-body",children:[(0,Jn.jsx)("textarea",{className:"cp-textarea",value:i,onChange:d=>r(d.target.value),rows:12,placeholder:a?"Loading\u2026":"",disabled:a}),f?(0,Jn.jsx)("div",{className:"cp-error",style:{whiteSpace:"pre-wrap"},children:f}):null]})})})};var je=Q(ie(),1);function Zr(t){return typeof t=="object"&&t!==null}function mA(t){return Zr(t)?typeof t.toolCallId=="string"&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.kind=="string":!1}function lx(t){if(!Zr(t))return!1;let e=t.role,n=t.type,l=t.text;return(e==="user"||e==="assistant")&&n==="text"&&typeof l=="string"}function pA(t){if(!Zr(t))return!1;let e=t.kind;if(e==="message"){let n=t.message;return lx(n)}return e==="tool"?typeof t.toolCallId=="string"&&t.toolCallId.length>0:!1}function hA(t){let e=t?._meta;if(!Zr(e))return null;let n=e.codely;if(!Zr(n))return null;let l=n.ui;if(!Zr(l)||l.action!=="replace_history")return null;let i={},r=l.feed;Array.isArray(r)&&(i.feed=r.filter(pA));let a=l.tools;Array.isArray(a)&&(i.tools=a.filter(mA));let o=l.messages;return Array.isArray(o)&&(i.messages=o.filter(lx)),!i.feed&&!i.tools&&!i.messages?null:i}function gA(t){let e=t.toolCall?.rawInput;return typeof e=="object"&&e!==null&&e.hookTrust===!0}function yA(t){if(gA(t))return{outcome:{outcome:"cancelled"}};let e=t.options.find(n=>n.kind==="allow_always")??t.options.find(n=>n.kind==="allow_once")??t.options[0];return e?{outcome:{outcome:"selected",optionId:e.optionId}}:{outcome:{outcome:"cancelled"}}}var qs=class{constructor(e,n){this.wsUrl=e;this.onStateChange=n}ws=null;rpc=null;sessionId=null;reconnectTimer=null;reconnectAttempts=0;disposed=!1;currentTurnId=0;activeTurnId=null;sessionReadyPromise=null;sessionReadyResolve=null;sessionReadyReject=null;baseStatusText=null;externalStatusText=null;state={connection:"disconnected",sessionId:null,statusText:null,feed:[],tools:[],isBusy:!1,lastActivityAt:null};connect(){if(this.disposed||this.ws&&this.ws.readyState<=WebSocket.OPEN)return;this.clearReconnect(),this.resetSessionReadyPromise(),this.externalStatusText=null,this.updateState({connection:"connecting",sessionId:null,statusText:null});let e=new WebSocket(this.wsUrl);this.ws=e,e.addEventListener("open",()=>{if(this.ws!==e||this.disposed)return;this.reconnectAttempts=0,this.updateState({connection:"connected"});let n=new Gr(e);this.rpc=n,n.on("session/update",l=>{let i=l;return i?.update&&this.onSessionUpdate(i.update),null}),n.on("codely/external_load_diagnostics",l=>(this.setExternalStatusText(Hs(l)),null)),n.on("session/request_permission",l=>yA(l)),n.on("_session/request_input",()=>({outcome:"cancelled"})),e.addEventListener("message",l=>{if(!(this.ws!==e||this.disposed))try{let i=JSON.parse(String(l.data));n.handleMessage(i)}catch{}}),this.bootstrap(n)}),e.addEventListener("close",()=>{this.ws===e&&(this.rpc=null,this.sessionId=null,this.activeTurnId=null,this.ws=null,this.sessionReadyReject?.(new Error("Disconnected")),this.clearSessionReadyHandlers(),this.updateState({connection:"disconnected",sessionId:null,statusText:"Disconnected.",isBusy:!1}),this.scheduleReconnect())}),e.addEventListener("error",()=>{this.ws===e&&(this.rpc=null,this.sessionId=null,this.activeTurnId=null,this.ws=null,this.sessionReadyReject?.(new Error("Connection error")),this.clearSessionReadyHandlers(),this.updateState({connection:"disconnected",sessionId:null,statusText:"Connection error.",isBusy:!1}),this.scheduleReconnect())})}dispose(){this.disposed=!0,this.clearReconnect(),this.closeWs("dispose")}forceClose(){this.closeWs("force")}forceRefresh(){if(this.disposed)return;this.clearReconnect(),this.externalStatusText=null,this.currentTurnId=0,this.activeTurnId=null,this.updateState({feed:[],tools:[],isBusy:!1,lastActivityAt:null,statusText:"Refreshing\u2026"});let e=this.ws;if(this.ws=null,this.rpc=null,this.sessionId=null,this.sessionReadyReject?.(new Error("Refreshed")),this.clearSessionReadyHandlers(),e)try{e.close()}catch{}this.connect()}cancel(){let e=this.rpc;if(!(!e||!this.sessionId))try{e.notify("session/cancel",{sessionId:this.sessionId})}catch{}}async sendPrompt(e){(!this.rpc||!this.ws||!this.sessionId)&&(this.connect(),await this.waitForSessionReady(3e4));let n=this.rpc;if(!n||!this.ws||!this.sessionId)throw this.updateState({statusText:"Not connected."}),new Error("Not connected");if(this.state.isBusy)throw this.updateState({statusText:"Session busy."}),new Error("Session busy");let l=this.ws;this.appendChunkToFeed({role:"user",type:"text",chunk:e}),this.currentTurnId+=1,this.activeTurnId=this.currentTurnId,this.updateState({isBusy:!0}),this.touchActivity();let i=null,r=new Promise((a,o)=>{i=()=>o(new Error("Connection closed")),l.addEventListener("close",i),l.addEventListener("error",i)});try{let a=await Promise.race([n.request("session/prompt",{sessionId:this.sessionId,prompt:[{type:"text",text:e}]}),r]);this.markAssistantCompleted(),a?.stopReason==="cancelled"&&this.updateState({statusText:"Cancelled."})}catch(a){throw this.markAssistantCompleted(),this.updateState({statusText:`Request failed: ${String(a?.message??a)}`}),a}finally{i&&(l.removeEventListener("close",i),l.removeEventListener("error",i))}}getState(){return this.state}async bootstrap(e){try{((await e.request("initialize",{protocolVersion:1,clientCapabilities:{fs:{readTextFile:!1,writeTextFile:!1},terminal:!1},clientInfo:{name:"codely-control-plane",version:"0.0.0",title:"Codely Control Plane"}}))?.authMethods??[]).length>0&&this.updateState({statusText:"Authentication required (unsupported)."});let i=await e.request("session/new",{cwd:"",mcpServers:[]});this.sessionId=i.sessionId,this.updateState({sessionId:i.sessionId,statusText:null}),this.touchActivity(),this.sessionReadyResolve?.(),this.clearSessionReadyHandlers()}catch(n){this.updateState({statusText:`Failed to initialize ACP: ${String(n?.message??n)}`}),this.sessionReadyReject?.(n instanceof Error?n:new Error(String(n))),this.clearSessionReadyHandlers(),this.closeWs("bootstrap failed")}}closeWs(e){if(this.ws)try{this.ws.readyState<=WebSocket.OPEN&&this.ws.close()}catch{}this.ws=null,this.rpc=null,this.sessionId=null,this.sessionReadyReject?.(new Error(e??"closed")),this.clearSessionReadyHandlers(),e&&this.updateState({connection:"disconnected",sessionId:null,statusText:e==="force"?"Force cancelled.":this.state.statusText,isBusy:!1})}resetSessionReadyPromise(){this.sessionReadyReject?.(new Error("Replaced by new connection")),this.clearSessionReadyHandlers(),this.sessionReadyPromise=new Promise((e,n)=>{this.sessionReadyResolve=e,this.sessionReadyReject=n})}clearSessionReadyHandlers(){this.sessionReadyResolve=null,this.sessionReadyReject=null}async waitForSessionReady(e){let n=this.sessionReadyPromise;if(!n)throw new Error("Not connected");let l=null,i=new Promise((r,a)=>{l=window.setTimeout(()=>{a(new Error("Session not ready"))},e)});try{await Promise.race([n,i])}finally{l!==null&&clearTimeout(l)}}scheduleReconnect(){if(this.disposed||this.reconnectTimer!==null)return;let e=Math.min(1e3*2**this.reconnectAttempts,5e3);this.reconnectAttempts+=1,this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}clearReconnect(){this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}updateState(e){Object.hasOwn(e,"statusText")&&(this.baseStatusText=e.statusText??null);let n=e.connection??this.state.connection;this.state={...this.state,...e,statusText:this.resolveVisibleStatusText(n)},this.onStateChange?.(this.state)}setExternalStatusText(e){this.externalStatusText=e,this.updateState({})}resolveVisibleStatusText(e){return e==="connected"?this.externalStatusText??this.baseStatusText:this.baseStatusText??this.externalStatusText}touchActivity(){this.updateState({lastActivityAt:Date.now()})}appendFeed(e){this.updateState({feed:[...this.state.feed,e]})}appendChunkToFeed(e){let{role:n,type:l,chunk:i}=e;if(!i)return;let r=n==="assistant"?this.activeTurnId??void 0:void 0,a=this.state.feed.map(s=>s.kind==="message"&&!s.message.completed&&(s.message.role!==n||s.message.type!==l)?{...s,message:{...s.message,completed:!0}}:s),o=a[a.length-1];if(o&&o.kind==="message"&&o.message.role===n&&o.message.type===l&&!o.message.completed){let s={kind:"message",message:{...o.message,text:(o.message.text??"")+i}};this.updateState({feed:[...a.slice(0,-1),s]});return}let u={kind:"message",message:{id:`${n}_${l}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:n,type:l,time:Dn(),text:i,completed:n==="user",...r!==void 0?{turnId:r}:{}}};this.updateState({feed:[...a,u]})}markAssistantCompleted(){let e=this.activeTurnId;if(e===null)return;let n=this.state.feed.map(l=>l.kind!=="message"||l.message.role!=="assistant"||l.message.turnId!==e||l.message.completed?l:{...l,message:{...l.message,completed:!0}});this.activeTurnId=null,this.updateState({feed:n,isBusy:!1})}onSessionUpdate(e){this.touchActivity();let n=hA(e);if(n){if(n.tools?this.updateState({tools:n.tools}):this.updateState({tools:[]}),n.feed){let l=n.feed.map(i=>{if(i.kind==="tool")return{kind:"tool",toolCallId:i.toolCallId,time:Dn()};let r=i.message;return{kind:"message",message:{id:`rehydrate_${r.role}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:r.role,type:"text",time:Dn(),text:r.text,completed:!0}}});this.updateState({feed:l})}else if(n.messages){let l=n.messages.map(i=>({kind:"message",message:{id:`rehydrate_${i.role}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:i.role,type:"text",time:Dn(),text:i.text,completed:!0}}));this.updateState({feed:l})}else this.updateState({feed:[]});this.activeTurnId=null,this.updateState({isBusy:!1});return}if(e.sessionUpdate==="agent_message_chunk"){e.content?.type==="text"&&this.appendChunkToFeed({role:"assistant",type:"text",chunk:e.content.text??""});return}if(e.sessionUpdate==="agent_thought_chunk"){e.content?.type==="text"&&this.appendChunkToFeed({role:"assistant",type:"thought",chunk:e.content.text??""});return}if(e.sessionUpdate==="tool_call"){let l={toolCallId:e.toolCallId,title:e.title,status:e.status,kind:e.kind,content:e.content,rawInput:e.rawInput,locations:e.locations};this.updateState({tools:[...this.state.tools,l]});let i=this.state.feed.map(r=>r.kind==="message"&&!r.message.completed?{...r,message:{...r.message,completed:!0}}:r);this.updateState({feed:i}),this.appendFeed({kind:"tool",toolCallId:l.toolCallId,time:Dn()});return}if(e.sessionUpdate==="tool_call_update"){let l=this.state.tools.map(i=>i.toolCallId===e.toolCallId?{...i,...e.title?{title:e.title}:{},...e.status?{status:e.status}:{},...e.kind?{kind:e.kind}:{},...e.content?{content:e.content}:{}}:i);this.updateState({tools:l});return}}};function vA(){return{maxRetries:3,backoffMs:1e3}}var Is=class{constructor(e,n){this.handler=e;this.retryPolicy=n?.retryPolicy??vA(),this.onChange=n?.onChange}queue=[];running=null;lastError=null;lastFailed=null;retryTimer=null;retryPolicy;onChange;enqueue(e){let n={id:`${Date.now()}_${Math.random().toString(16).slice(2)}`,prompt:e,attempts:0};return this.queue.push(n),this.emit(),this.runNext(),n}clear(){this.queue=[],this.lastError=null,this.lastFailed=null,this.retryTimer!==null&&(clearTimeout(this.retryTimer),this.retryTimer=null),this.emit()}retryLastFailed(){if(!this.lastFailed)return;let e={...this.lastFailed,attempts:0};this.lastFailed=null,this.queue.unshift(e),this.emit(),this.runNext()}getSnapshot(){return{queuedCount:this.queue.length,running:!!this.running,lastError:this.lastError,lastFailed:this.lastFailed}}emit(){this.onChange?.(this.getSnapshot())}async runNext(){if(this.running||this.retryTimer!==null)return;let e=this.queue.shift();if(!e){this.emit();return}this.running=e,this.emit();try{await this.handler(e.prompt),this.running=null,this.lastError=null,this.emit(),this.runNext()}catch(n){if(this.running=null,this.lastError=n instanceof Error?n.message:String(n),e.attempts+=1,e.attempts<=this.retryPolicy.maxRetries){this.retryTimer=window.setTimeout(()=>{this.retryTimer=null,this.queue.unshift(e),this.emit(),this.runNext()},this.retryPolicy.backoffMs),this.emit();return}this.lastFailed={...e},this.emit()}}};function bA(t){let e=t.startsWith("http")?t:`${window.location.protocol}//${window.location.host}${t}`,n=new URL(e);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.pathname=n.pathname.replace(/\/$/,""),n.hash="",n.search="",n.toString()}function xA(t,e){return`${t}/ws/${encodeURIComponent(e)}`}function ix(t,e){let n=(0,je.useMemo)(()=>bA(e),[e]),l=(0,je.useRef)(new Map),[i,r]=(0,je.useState)({}),a=(0,je.useCallback)(d=>{let g={endpoint:d.endpoint,connection:d.clientState.connection,statusText:d.clientState.statusText,feed:d.clientState.feed,tools:d.clientState.tools,isBusy:d.clientState.isBusy,queuedCount:d.schedulerState.queuedCount,lastError:d.schedulerState.lastError,lastFailed:d.schedulerState.lastFailed?{prompt:d.schedulerState.lastFailed.prompt,attempts:d.schedulerState.lastFailed.attempts}:null,lastActivityAt:d.clientState.lastActivityAt};r(b=>({...b,[d.endpoint.id]:g}))},[]);(0,je.useEffect)(()=>{let d=l.current,g=new Set(t.map(b=>b.id));for(let b of t){let N=d.get(b.id);if(N){N.endpoint=b,a(N);continue}let p=xA(n,b.id),h=new qs(p,E=>{let D=d.get(b.id);D&&(D.clientState=E,a(D))}),y=new Is(async E=>h.sendPrompt(E),{retryPolicy:{maxRetries:3,backoffMs:1e3},onChange:E=>{let D=d.get(b.id);D&&(D.schedulerState=E,a(D))}}),w=h.getState(),A={endpoint:b,client:h,scheduler:y,clientState:w,schedulerState:y.getSnapshot()};d.set(b.id,A),h.connect(),a(A)}for(let[b,N]of d.entries())g.has(b)||(N.client.dispose(),d.delete(b),r(p=>{let h={...p};return delete h[b],h}))},[t,a,n]);let o=(0,je.useCallback)((d,g)=>{let b=g.length>0?g:t.map(N=>N.id);for(let N of b){let p=l.current.get(N);p&&p.scheduler.enqueue(d)}},[t]),u=(0,je.useCallback)(d=>{let g=l.current.get(d);g&&(g.scheduler.clear(),g.client.cancel(),a(g))},[a]),s=(0,je.useCallback)(d=>{let g=l.current.get(d);g&&(g.scheduler.clear(),g.client.cancel(),g.client.forceRefresh(),a(g))},[a]),f=(0,je.useCallback)(d=>{let g=l.current.get(d);g&&(g.scheduler.retryLastFailed(),a(g))},[a]),c=(0,je.useCallback)((d,g)=>{let b=l.current.get(d);b&&b.scheduler.enqueue(g)},[]),m=(0,je.useMemo)(()=>t.map(d=>i[d.id]).filter(Boolean),[t,i]);return{stateById:i,ordered:m,broadcastPrompt:o,forceCancel:u,forceRefresh:s,retryEndpoint:f,sendToEndpoint:c}}var rx=Q(ie(),1);var se=Q(rt(),1);var ax=({open:t,onClose:e,state:n,onSendPrompt:l,onForceCancel:i,onForceRefresh:r,onRetry:a,onOpenDiff:o})=>{let[u,s]=(0,rx.useState)("");if(!t)return null;let f=()=>{if(n.connection!=="connected")return;let d=u.trim();d&&(l(n.endpoint.id,d),s(""))},c=d=>{d.key==="Enter"&&d.ctrlKey&&(d.preventDefault(),f())},m=n.connection==="connected"?n.isBusy?"busy":"idle":"disconnected";return(0,se.jsx)(He,{onClose:e,children:(0,se.jsx)(qe,{title:n.endpoint.name,onClose:e,footer:null,children:(0,se.jsxs)("div",{className:"cp-modal-body",style:{height:"80vh",display:"flex",flexDirection:"column",padding:0},children:[(0,se.jsxs)("div",{className:"cp-task-header",style:{borderBottom:"1px solid var(--border)",padding:"12px"},children:[(0,se.jsxs)("div",{children:[(0,se.jsx)("div",{className:"cp-task-url",children:n.endpoint.baseUrl}),(0,se.jsxs)("div",{className:"cp-task-meta",style:{flexDirection:"row",gap:12,marginTop:4},children:[(0,se.jsx)("span",{className:`cp-conn ${n.connection}`,children:m}),(0,se.jsxs)("span",{className:"cp-queue",children:["queue ",n.queuedCount]})]})]}),(0,se.jsxs)("div",{className:"cp-task-actions",style:{flexDirection:"row"},children:[(0,se.jsx)("button",{className:"btn danger",onClick:()=>i(n.endpoint.id),children:"Cancel"}),(0,se.jsx)("button",{className:"btn",onClick:()=>r(n.endpoint.id),children:"Refresh"}),n.lastFailed&&(0,se.jsx)("button",{className:"btn",onClick:()=>a(n.endpoint.id),children:"Retry"})]})]}),n.connection==="connected"&&n.statusText&&(0,se.jsx)("div",{className:"cp-task-notice",children:n.statusText}),n.lastError&&(0,se.jsxs)("div",{className:"cp-task-error",children:["Last error: ",n.lastError]}),(0,se.jsx)("div",{style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,se.jsx)(Pr,{feed:n.feed,tools:n.tools,onOpenDiff:o})}),(0,se.jsx)("div",{className:"cp-task-input",children:(0,se.jsx)(Wl,{value:u,textareaClassName:"cp-task-textarea",placeholder:"Send prompt...",onChange:d=>s(d.target.value),onKeyDown:c,onSubmit:f,submitClassName:"btn primary",submitDisabled:!u.trim()||n.connection!=="connected",submitLabel:"Send"})})]})})})};var C=Q(rt(),1);var op=8,kA=({open:t,onClose:e,endpoints:n,selectedIds:l,onToggle:i,onSelectAll:r,onClearAll:a,onSend:o})=>{let[u,s]=(0,st.useState)("");if((0,st.useEffect)(()=>{t||s("")},[t]),!t)return null;let f=l.size>0?l.size:n.length;return(0,C.jsx)("div",{className:"cp-broadcast-modal-backdrop",onClick:e,children:(0,C.jsxs)("div",{className:"cp-broadcast-modal",onClick:c=>c.stopPropagation(),children:[(0,C.jsxs)("div",{className:"cp-broadcast-modal-header",children:[(0,C.jsx)("div",{className:"cp-broadcast-modal-title",children:"Broadcast Prompt"}),(0,C.jsx)("button",{className:"cp-broadcast-modal-close",onClick:e,children:"\u2715"})]}),(0,C.jsxs)("div",{className:"cp-broadcast-modal-body",children:[(0,C.jsxs)("div",{className:"cp-broadcast-modal-left",children:[(0,C.jsx)("div",{className:"cp-broadcast-modal-label",children:"Prompt"}),(0,C.jsx)("textarea",{className:"cp-broadcast-modal-textarea",placeholder:"Type a prompt to broadcast to selected workers...",value:u,onChange:c=>s(c.target.value),onKeyDown:c=>{c.key==="Enter"&&c.ctrlKey&&(c.preventDefault(),u.trim()&&n.length>0&&(o(u.trim()),e()))},autoFocus:!0}),(0,C.jsxs)("div",{className:"cp-broadcast-modal-footer",children:[(0,C.jsxs)("span",{className:"cp-broadcast-modal-target",children:["\u2192 ",f," worker",f!==1?"s":""]}),(0,C.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,C.jsx)("button",{className:"btn",onClick:e,children:"Cancel"}),(0,C.jsx)("button",{className:"btn primary",disabled:!u.trim()||n.length===0,onClick:()=>{o(u.trim()),e()},children:"Broadcast"})]})]})]}),(0,C.jsxs)("div",{className:"cp-broadcast-modal-right",children:[(0,C.jsxs)("div",{className:"cp-broadcast-modal-label",children:["Target Workers",(0,C.jsxs)("div",{className:"cp-broadcast-modal-node-actions",children:[(0,C.jsx)("button",{className:"btn",onClick:r,children:"All"}),(0,C.jsx)("button",{className:"btn",onClick:a,children:"None"})]})]}),(0,C.jsx)("div",{className:"cp-broadcast-modal-node-list",children:n.map(c=>(0,C.jsxs)("label",{className:"cp-broadcast-modal-node-item",children:[(0,C.jsx)("input",{type:"checkbox",checked:l.has(c.id),onChange:m=>i(c.id,m.target.checked)}),(0,C.jsxs)("div",{className:"cp-broadcast-modal-node-info",children:[(0,C.jsx)("span",{className:"cp-broadcast-modal-node-name",children:c.name}),(0,C.jsx)("span",{className:"cp-broadcast-modal-node-url",children:c.baseUrl}),c.tags.length>0&&(0,C.jsx)("span",{className:"cp-broadcast-modal-node-tags",children:c.tags.join(", ")})]})]},c.id))})]})]})]})})},ox=({config:t})=>{let e=Ju(t),n=(0,st.useMemo)(()=>J1(e),[e]),[l,i]=(0,st.useState)([]),[r,a]=(0,st.useState)({}),[o,u]=(0,st.useState)(!1),[s,f]=(0,st.useState)(null),[c,m]=(0,st.useState)(""),[d,g]=(0,st.useState)("all"),[b,N]=(0,st.useState)(1),[p,h]=(0,st.useState)(!1),[y,w]=(0,st.useState)(null),[A,E]=(0,st.useState)(new Set),[D,L]=(0,st.useState)(null),[I,T]=(0,st.useState)(!1),[lt,K]=(0,st.useState)(!1),[G,P]=(0,st.useState)(!1),[tt,ot]=(0,st.useState)(!0),[gt,Ot]=(0,st.useState)(!1),[H,x]=(0,st.useState)(null),[Nt,At]=(0,st.useState)(!1);(0,st.useEffect)(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let _=window.matchMedia("(max-width: 768px)"),xt=Ht=>At(Ht.matches);return _.addEventListener("change",xt),At(_.matches),()=>_.removeEventListener("change",xt)},[]);let[k,ct]=(0,st.useState)("workers"),[be,me]=(0,st.useState)("list"),[pe,B]=(0,st.useState)(null),[Z,j]=(0,st.useState)(""),[V,W]=(0,st.useState)(""),{ordered:kt,broadcastPrompt:Re,forceCancel:Jt,forceRefresh:Ze,retryEndpoint:ce,sendToEndpoint:Ye}=ix(l,e),Ke=(0,st.useMemo)(()=>H?kt.find(_=>_.endpoint.id===H):null,[H,kt]),Qt=(0,st.useMemo)(()=>pe?kt.find(_=>_.endpoint.id===pe):null,[pe,kt]),Me=(0,st.useCallback)(async()=>{u(!0),f(null);try{let _=await n.list();i(_)}catch(_){f(_ instanceof Error?_.message:"Failed to load endpoints")}finally{u(!1)}},[n]);(0,st.useEffect)(()=>{Me()},[Me]);let yn=(0,st.useMemo)(()=>{let _=c.trim().toLowerCase();return l.filter(xt=>{if(_&&!`${xt.name} ${xt.baseUrl} ${xt.tags.join(" ")}`.toLowerCase().includes(_))return!1;if(d==="all")return!0;let Ht=r[xt.id];return Ht?d==="healthy"?Ht.ok:!Ht.ok:!1})},[l,c,d,r]),De=Math.max(1,Math.ceil(yn.length/op));(0,st.useEffect)(()=>{b>De&&N(De)},[b,De]),(0,st.useEffect)(()=>{E(_=>{let xt=new Set;for(let Ht of _)l.some(le=>le.id===Ht)&&xt.add(Ht);return xt})},[l]);let Je=(0,st.useMemo)(()=>{let _=(b-1)*op;return yn.slice(_,_+op)},[yn,b]),_e=_=>{w(_),h(!0)},M=async _=>{if(y){let Ht=await n.update(y.id,_);i(le=>le.map(fp=>fp.id===Ht.id?Ht:fp)),w(Ht);return}let xt=await n.create(_);i(Ht=>[...Ht,xt])},q=async _=>{window.confirm(`Delete endpoint "${_.name}"?`)&&(await n.remove(_.id),i(Ht=>Ht.filter(le=>le.id!==_.id)),a(Ht=>{let le={...Ht};return delete le[_.id],le}))},et=async _=>{a(xt=>({...xt,[_.id]:null}));try{let xt=await n.health(_.id);a(Ht=>({...Ht,[_.id]:xt}))}catch(xt){a(Ht=>({...Ht,[_.id]:{ok:!1,error:xt instanceof Error?xt.message:"Health check failed",durationMs:0}}))}},at=(_,xt)=>{E(Ht=>{let le=new Set(Ht);return xt?le.add(_):le.delete(_),le})},R=()=>E(new Set(l.map(_=>_.id))),F=()=>E(new Set),S=_=>{let xt=A.size>0?Array.from(A):[];Re(_,xt)},z=()=>{let _=V.trim();if(!_)return;let xt=A.size>0?Array.from(A):[];Re(_,xt),W("")},X=async _=>{for(let xt of _)await n.create(xt);await Me()},mt=(0,st.useCallback)(async()=>await n.getRawRegistryJson(),[n]),ft=(0,st.useCallback)(async _=>{await n.saveRawRegistryJson(_),await Me()},[n,Me]),zt=(0,st.useCallback)((_,xt)=>{E(Ht=>{let le=new Set(Ht);return xt?le.add(_):le.delete(_),le})},[]),jt=_=>{B(_),j(""),me("detail")},Mt=()=>{me("list"),B(null)},vn=()=>{if(!Qt||Qt.connection!=="connected")return;let _=Z.trim();_&&(Ye(Qt.endpoint.id,_),j(""))},js=A.size>0?`${A.size} of ${l.length} selected`:`All ${l.length} workers`;return(0,C.jsxs)("div",{className:"app control-plane",children:[(0,C.jsx)(kA,{open:gt,onClose:()=>Ot(!1),endpoints:l,selectedIds:A,onToggle:at,onSelectAll:R,onClearAll:F,onSend:S}),!Nt&&(0,C.jsxs)("div",{className:"cp-header cp-header-pc",children:[(0,C.jsxs)("div",{children:[(0,C.jsx)("h1",{children:"Control Plane"}),(0,C.jsxs)("div",{className:"cp-subtitle",children:[l.length," endpoints registered"]})]}),(0,C.jsx)("div",{className:"cp-header-actions",children:(0,C.jsxs)("button",{className:"btn",onClick:()=>T(!I),children:[I?"Hide":"Show"," Endpoints"]})})]}),Nt&&(0,C.jsx)("div",{className:"cp-header cp-header-mobile",children:be==="detail"&&Qt?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("button",{className:"cp-mobile-back-btn",onClick:Mt,children:"\u2039 Back"}),(0,C.jsx)("span",{className:"cp-mobile-detail-title",style:{flex:1,minWidth:0},children:Qt.endpoint.name}),(0,C.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,C.jsx)("button",{className:"btn danger",onClick:()=>Jt(Qt.endpoint.id),children:"Cancel"}),(0,C.jsx)("button",{className:"btn",onClick:()=>Ze(Qt.endpoint.id),children:"Refresh"})]})]}):(0,C.jsxs)("div",{children:[(0,C.jsx)("div",{className:"cp-mobile-header-title",children:k==="broadcast"?"Broadcast":k==="endpoints"?"Endpoints":"Control Plane"}),(0,C.jsx)("div",{className:"cp-subtitle",children:k==="broadcast"?A.size>0?`${A.size} of ${l.length} selected`:`${l.length} workers`:`${l.length} workers`})]})}),(0,C.jsxs)("div",{className:"cp-body",children:[(0,C.jsxs)("div",{className:"cp-sidebar",children:[(0,C.jsxs)("div",{className:"cp-sidebar-broadcast-section",children:[(0,C.jsx)("div",{className:"cp-sidebar-section-label",children:"Broadcast"}),(0,C.jsx)("div",{className:"cp-sidebar-broadcast-target",children:js}),(0,C.jsx)("button",{className:"btn primary cp-sidebar-broadcast-btn",onClick:()=>Ot(!0),disabled:l.length===0,children:"Broadcast\u2026"})]}),(0,C.jsxs)("div",{className:"cp-sidebar-section-label cp-sidebar-workers-label",children:["Workers",(0,C.jsx)("span",{className:"cp-sidebar-workers-count",children:kt.length})]}),(0,C.jsx)("div",{className:"cp-sidebar-workers",children:kt.length===0?(0,C.jsx)("div",{className:"cp-empty",style:{padding:"8px 12px"},children:"No workers yet."}):kt.map(_=>{let xt=_.connection==="connected"?_.isBusy?"busy":"idle":"disc",Ht=H===_.endpoint.id;return(0,C.jsxs)("div",{className:`cp-sidebar-worker-item${Ht?" active":""}`,onClick:()=>x(_.endpoint.id),children:[(0,C.jsx)("input",{type:"checkbox","aria-hidden":"true",tabIndex:-1,checked:A.has(_.endpoint.id),onClick:le=>le.stopPropagation(),onChange:le=>zt(_.endpoint.id,le.target.checked)}),(0,C.jsxs)("div",{className:"cp-sidebar-worker-info",children:[(0,C.jsx)("span",{className:"cp-sidebar-worker-name",children:_.endpoint.name}),(0,C.jsx)("span",{className:"cp-sidebar-worker-url",children:_.endpoint.baseUrl}),_.endpoint.tags.length>0&&(0,C.jsx)("span",{className:"cp-sidebar-worker-tags",children:_.endpoint.tags.join(" \xB7 ")})]}),(0,C.jsx)("span",{className:`cp-conn ${_.connection} cp-sidebar-worker-status`,children:xt})]},_.endpoint.id)})})]}),(0,C.jsx)("div",{className:"cp-main",children:(0,C.jsxs)("div",{className:"cp-workers",children:[(0,C.jsxs)("div",{className:"cp-workers-header",children:[(0,C.jsx)("span",{children:"Workers"}),(0,C.jsx)("button",{className:"btn",onClick:()=>ot(_=>!_),title:tt?"Show input boxes":"Hide input boxes",children:tt?"Expand":"Compact"})]}),kt.length===0?(0,C.jsx)("div",{className:"cp-empty",style:{padding:"12px 16px"},children:"No workers yet. Add endpoints from the Endpoints panel."}):(0,C.jsx)("div",{className:"cp-worker-grid",children:kt.map(_=>(0,C.jsx)(ap,{state:_,selected:A.has(_.endpoint.id),onSelect:zt,onClick:x,onForceCancel:Jt,onForceRefresh:Ze,onRetry:ce,onSendPrompt:Ye,onOpenDiff:L,hideInput:tt},_.endpoint.id))})]})}),k==="workers"&&be==="list"&&(0,C.jsx)("div",{className:"cp-mobile-list",children:kt.length===0?(0,C.jsx)("div",{className:"cp-empty",children:"No workers yet."}):kt.map(_=>(0,C.jsx)(ap,{state:_,selected:A.has(_.endpoint.id),onSelect:zt,onClick:jt,onForceCancel:Jt,onForceRefresh:Ze,onRetry:ce,onSendPrompt:Ye,onOpenDiff:L,compact:!0},_.endpoint.id))}),k==="workers"&&be==="detail"&&Qt&&(0,C.jsxs)("div",{className:"cp-mobile-detail",children:[Qt.lastError&&(0,C.jsxs)("div",{className:"cp-task-error",children:["Last error: ",Qt.lastError]}),(0,C.jsx)("div",{className:"cp-mobile-detail-feed",children:(0,C.jsx)(Pr,{feed:Qt.feed,tools:Qt.tools,onOpenDiff:L})}),(0,C.jsx)("div",{className:"cp-mobile-detail-input",children:(0,C.jsx)(Wl,{value:Z,textareaClassName:"cp-mobile-detail-textarea",placeholder:"Send a prompt...",onChange:_=>j(_.target.value),onKeyDown:_=>{_.key==="Enter"&&_.ctrlKey&&(_.preventDefault(),vn())},onSubmit:vn,submitClassName:"btn primary cp-mobile-detail-send",submitDisabled:!Z.trim()||Qt.connection!=="connected",submitLabel:"Send"})})]}),k==="broadcast"&&(0,C.jsxs)("div",{className:"cp-mobile-broadcast-tab",children:[(0,C.jsxs)("div",{className:"cp-broadcast-sheet-nodes",children:[(0,C.jsxs)("div",{className:"cp-broadcast-sheet-nodes-header",children:[(0,C.jsx)("span",{className:"cp-broadcast-sheet-subtitle",children:A.size>0?`${A.size} of ${l.length} selected`:`All ${l.length} workers`}),(0,C.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,C.jsx)("button",{className:"btn",onClick:R,children:"All"}),(0,C.jsx)("button",{className:"btn",onClick:F,children:"None"})]})]}),(0,C.jsx)("div",{className:"cp-broadcast-sheet-node-list",children:l.map(_=>(0,C.jsxs)("label",{className:"cp-broadcast-sheet-node-item",children:[(0,C.jsx)("input",{type:"checkbox",checked:A.has(_.id),onChange:xt=>at(_.id,xt.target.checked)}),(0,C.jsxs)("div",{className:"cp-broadcast-sheet-node-info",children:[(0,C.jsx)("span",{className:"cp-broadcast-sheet-node-name",children:_.name}),(0,C.jsx)("span",{className:"cp-broadcast-sheet-node-url",children:_.baseUrl})]})]},_.id))})]}),(0,C.jsxs)("div",{className:"cp-broadcast-sheet-compose",children:[(0,C.jsx)("textarea",{className:"cp-broadcast-sheet-textarea",placeholder:"Type a prompt...",value:V,onChange:_=>W(_.target.value),onKeyDown:_=>{_.key==="Enter"&&_.ctrlKey&&(_.preventDefault(),z())}}),(0,C.jsx)("div",{className:"cp-broadcast-sheet-footer",children:(0,C.jsx)("button",{className:"btn primary",onClick:z,disabled:!V.trim()||l.length===0,children:"Send"})})]})]}),k==="endpoints"&&(0,C.jsxs)("div",{className:"cp-mobile-endpoints-tab",children:[(0,C.jsxs)("div",{className:"cp-mobile-endpoints-toolbar",children:[(0,C.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,C.jsx)("button",{className:"btn",onClick:()=>K(!0),children:"Batch add"}),(0,C.jsx)("button",{className:"btn",onClick:()=>P(!0),children:"Edit JSON"}),(0,C.jsx)("button",{className:"btn primary",onClick:()=>_e(null),children:"Add"})]}),(0,C.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,C.jsx)("input",{className:"cp-input",placeholder:"Search...",value:c,onChange:_=>m(_.target.value),style:{flex:1}}),(0,C.jsx)("button",{className:"btn",onClick:()=>void Me(),children:"Refresh"})]})]}),s&&(0,C.jsx)("div",{className:"cp-error",style:{padding:"0 14px"},children:s}),o&&(0,C.jsx)("div",{className:"cp-loading",style:{padding:"0 14px"},children:"Loading..."}),(0,C.jsx)("div",{style:{flex:1,overflow:"auto",padding:"8px 14px"},children:(0,C.jsx)(rp,{endpoints:Je,healthById:r,onEdit:_e,onDelete:q,onRefreshHealth:et,selectedIds:A,onToggleSelect:at})}),(0,C.jsxs)("div",{className:"cp-pagination",children:[(0,C.jsxs)("div",{className:"cp-page-info",children:[Je.length," / ",yn.length]}),(0,C.jsxs)("div",{className:"cp-page-controls",children:[(0,C.jsx)("button",{className:"btn",onClick:()=>N(_=>Math.max(1,_-1)),disabled:b<=1,children:"Prev"}),(0,C.jsxs)("span",{className:"cp-page-number",children:[b," / ",De]}),(0,C.jsx)("button",{className:"btn",onClick:()=>N(_=>Math.min(De,_+1)),disabled:b>=De,children:"Next"})]})]})]})]}),(0,C.jsxs)("nav",{className:"cp-mobile-tab-bar",children:[(0,C.jsxs)("button",{className:`cp-mobile-tab${k==="workers"?" active":""}`,onClick:()=>{ct("workers"),me("list")},children:[(0,C.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,C.jsx)("path",{d:"M8 21h8M12 17v4"})]}),(0,C.jsx)("span",{children:"Workers"})]}),(0,C.jsxs)("button",{className:`cp-mobile-tab${k==="broadcast"?" active":""}`,onClick:()=>{ct("broadcast"),me("list")},children:[(0,C.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,C.jsx)("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.62 1h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.69a16 16 0 0 0 6 6l.96-.96a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"})}),(0,C.jsx)("span",{children:"Broadcast"}),A.size>0&&(0,C.jsx)("span",{className:"cp-mobile-tab-badge",children:A.size})]}),(0,C.jsxs)("button",{className:`cp-mobile-tab${k==="endpoints"?" active":""}`,onClick:()=>{ct("endpoints"),me("list")},children:[(0,C.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,C.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,C.jsx)("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14M4.93 4.93a10 10 0 0 0 0 14.14"})]}),(0,C.jsx)("span",{children:"Endpoints"})]})]}),I&&(0,C.jsx)("div",{className:"cp-drawer-backdrop",onClick:()=>T(!1)}),(0,C.jsxs)("div",{className:`cp-drawer ${I?"open":""}`,children:[(0,C.jsxs)("div",{className:"cp-drawer-header",children:[(0,C.jsx)("h2",{children:"Endpoints"}),(0,C.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,C.jsx)("button",{className:"btn",onClick:()=>T(!1),children:"Close"}),(0,C.jsx)("button",{className:"btn",onClick:()=>K(!0),children:"Batch add"}),(0,C.jsx)("button",{className:"btn",onClick:()=>P(!0),children:"Edit JSON"}),(0,C.jsx)("button",{className:"btn primary",onClick:()=>_e(null),children:"Add"})]})]}),(0,C.jsxs)("div",{className:"cp-drawer-toolbar",children:[(0,C.jsx)("input",{className:"cp-input",placeholder:"Search...",value:c,onChange:_=>m(_.target.value)}),(0,C.jsxs)("select",{className:"cp-select",value:d,onChange:_=>g(_.target.value),children:[(0,C.jsx)("option",{value:"all",children:"All"}),(0,C.jsx)("option",{value:"healthy",children:"Healthy"}),(0,C.jsx)("option",{value:"unhealthy",children:"Unhealthy"})]}),(0,C.jsx)("button",{className:"btn",onClick:()=>void Me(),children:"Refresh"})]}),s&&(0,C.jsx)("div",{className:"cp-error",children:s}),o&&(0,C.jsx)("div",{className:"cp-loading",children:"Loading..."}),(0,C.jsx)("div",{className:"cp-drawer-content",children:(0,C.jsx)(rp,{endpoints:Je,healthById:r,onEdit:_e,onDelete:q,onRefreshHealth:et,selectedIds:A,onToggleSelect:at})}),(0,C.jsxs)("div",{className:"cp-pagination",children:[(0,C.jsxs)("div",{className:"cp-page-info",children:[Je.length," / ",yn.length]}),(0,C.jsxs)("div",{className:"cp-page-controls",children:[(0,C.jsx)("button",{className:"btn",onClick:()=>N(_=>Math.max(1,_-1)),disabled:b<=1,children:"Prev"}),(0,C.jsxs)("span",{className:"cp-page-number",children:[b," / ",De]}),(0,C.jsx)("button",{className:"btn",onClick:()=>N(_=>Math.min(De,_+1)),disabled:b>=De,children:"Next"})]})]})]}),(0,C.jsx)($1,{open:p,endpoint:y,onClose:()=>h(!1),onSave:M}),(0,C.jsx)(tx,{open:lt,onClose:()=>K(!1),onSubmit:X}),(0,C.jsx)(nx,{open:G,onClose:()=>P(!1),onLoad:mt,onSave:ft}),Ke&&(0,C.jsx)(ax,{open:!!Ke,onClose:()=>x(null),state:Ke,onSendPrompt:Ye,onForceCancel:Jt,onForceRefresh:Ze,onRetry:ce,onOpenDiff:L}),D&&(0,C.jsx)(Qr,{title:D.title,oldText:D.oldText,newText:D.newText,onClose:()=>L(null)})]})};var J=Q(ie(),1),v=Q(rt(),1);var So="unity-cn-registry.cn-shanghai.cr.aliyuncs.com/codesearch/unity2022",Ii=[{label:"1080p (1920\xD71080)",value:"1920x1080x24",image:`${So}:batch-20260303`},{label:"2K (2560\xD71440)",value:"2560x1440x24",image:`${So}:batch-20260303-2k`},{label:"4K (3840\xD72160)",value:"3840x2160x24",image:`${So}:batch-20260303-4k`}],mx=["gpt-5.2","gpt-4.1","claude-sonnet-4-20250514","o3","gemini-2.5-pro"],ux={prompts:["\u6784\u5EFA\u4E00\u4E2Aflappy bird\u6E38\u620F\u5E76\u622A\u56FE\u9A8C\u8BC1"],model:"gpt-5.2",tags:[],image:`${So}:batch-20260303`,timeout:900,env:{}};function To(t,e){return`${t}/rollout${e}`}async function rn(t,e,n="GET",l){let i=To(t,e),r={method:n,headers:{"Content-Type":"application/json"}};l!==void 0&&(r.body=JSON.stringify(l));let a=await fetch(i,r),o=await a.text();if(!o)throw new Error(`Empty response (${a.status})`);try{return JSON.parse(o)}catch{throw new Error(`Invalid JSON (${a.status}): ${o.slice(0,200)}`)}}async function sx(t,e){let n=To(t,e),l=await fetch(n);if((l.headers.get("content-type")??"").includes("json")){let r=await l.json();return typeof r=="string"?r:JSON.stringify(r,null,2)}return l.text()}function cx(t,e){if(!t)return"";let n=Math.round(((e?new Date(e).getTime():Date.now())-new Date(t).getTime())/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}var SA="\x1B",TA=new RegExp(`${SA}\\[[0-9;]*m`,"g");function wA(t){return t.replace(TA,"")}function up(t){return t?Ii.find(n=>n.image===t)?.value??Ii[0].value:Ii[0].value}function fx(t){return Ii.find(n=>n.value===t)?.image??Ii[0].image}function sp(t){let e={};for(let n of t.split(`
59
- `)){let l=n.indexOf("=");l>0&&(e[n.slice(0,l).trim()]=n.slice(l+1).trim())}return e}function dx(t){return Object.entries(t).map(([e,n])=>`${e}=${n}`).join(`
60
- `)}var EA=({open:t,mode:e,config:n,onClose:l,onSubmit:i})=>{let[r,a]=(0,J.useState)(e),[o,u]=(0,J.useState)(""),[s,f]=(0,J.useState)(n.model),[c,m]=(0,J.useState)(""),[d,g]=(0,J.useState)(up(n.image)),[b,N]=(0,J.useState)(String(n.timeout)),[p,h]=(0,J.useState)(""),[y,w]=(0,J.useState)(!1),[A,E]=(0,J.useState)(""),[D,L]=(0,J.useState)(""),[I,T]=(0,J.useState)(!1),[lt,K]=(0,J.useState)(""),[G,P]=(0,J.useState)("");(0,J.useEffect)(()=>{a(e)},[e]),(0,J.useEffect)(()=>{if(!t)return;u(""),f(n.model),m(""),g(up(n.image)),N(String(n.timeout)),h(""),w(!1),E(""),L(""),T(!1),P("");let H={...ux,model:n.model,image:n.image,timeout:n.timeout};K(JSON.stringify(H,null,2))},[t,n]);let tt=(0,J.useCallback)(()=>{let H=o.split(`
61
- `).map(ct=>ct.trim()).filter(ct=>ct&&!ct.startsWith("#")),x=c.split(",").map(ct=>ct.trim()).filter(Boolean),Nt=y&&p?p:fx(d),At=sp(A),k={prompts:H.length>0?H:[""],model:s,command:I&&D?D:void 0,tags:x.length>0?x:void 0,image:Nt,timeout:parseInt(b,10)||void 0,env:Object.keys(At).length>0?At:void 0};K(JSON.stringify(k,null,2)),P("")},[o,s,c,d,b,p,y,A,D,I]),ot=H=>{H==="json"&&r==="form"&&tt(),a(H)},gt=()=>{let H=o.split(`
62
- `).map(k=>k.trim()).filter(k=>k&&!k.startsWith("#"));if(H.length===0)return;let x=c.split(",").map(k=>k.trim()).filter(Boolean),Nt=y&&p?p:fx(d),At=sp(A);i({prompts:H,model:s,command:I&&D?D:void 0,tags:x.length>0?x:void 0,image:Nt,timeout:parseInt(b,10)||void 0,env:Object.keys(At).length>0?At:void 0})},Ot=()=>{try{let H=JSON.parse(lt);if(!H.prompt&&(!H.prompts||H.prompts.length===0)){P('Must have "prompt" or "prompts"');return}P(""),i(H)}catch(H){P(`Invalid JSON: ${H instanceof Error?H.message:H}`)}};return t?(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{className:"rollout-log-backdrop",onClick:l}),(0,v.jsxs)("div",{className:"rollout-dialog",children:[(0,v.jsxs)("div",{className:"rollout-dialog-header",children:[(0,v.jsx)("h3",{children:"New Tasks"}),(0,v.jsxs)("div",{className:"rollout-row",style:{gap:"4px"},children:[(0,v.jsx)("button",{className:`rollout-detail-tab ${r==="form"?"active":""}`,onClick:()=>ot("form"),children:"Form"}),(0,v.jsx)("button",{className:`rollout-detail-tab ${r==="json"?"active":""}`,onClick:()=>ot("json"),children:"JSON"}),(0,v.jsx)("button",{className:"btn",onClick:l,style:{marginLeft:8},children:"\u2715"})]})]}),r==="form"?(0,v.jsxs)("div",{className:"rollout-dialog-body",children:[(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsxs)("label",{className:"rollout-label",children:["Prompts"," ",(0,v.jsx)("span",{style:{color:"var(--muted)",fontWeight:400},children:"(one per line)"})]}),(0,v.jsx)("textarea",{className:"rollout-textarea",rows:6,placeholder:`\u6784\u5EFA\u4E00\u4E2Aflappy bird\u6E38\u620F\u5E76\u622A\u56FE\u9A8C\u8BC1
55
+ `):[],r=Math.min(Math.max(l.length,i.length),n);if(r===0)return null;let a=[];a.push("--- old"),a.push("+++ new");for(let o=0;o<r;o++){let s=l[o]??"",u=i[o]??"";s===u?a.push(` ${s}`):(s!==""&&a.push(`-${s}`),u!==""&&a.push(`+${u}`))}return(0,wo.jsx)("div",{className:"diff",children:(0,wo.jsx)("pre",{children:a.slice(0,n).map((o,s)=>(0,wo.jsxs)("span",{className:sN(o),children:[o,`
56
+ `]},s))})})}var xt=G(it(),1);function uN(t){if(!t)return null;for(let e of t)if(e&&e.type==="diff")return e;return null}function cN(t){return typeof t=="object"&&t!==null}function fN(t){return typeof t.title=="string"&&t.title.startsWith("Execute Unity ")}function dN(t){let e=t.rawInput;return cN(e)?typeof e.agent_name=="string"&&typeof e.task=="string":!1}function G1(t){if(!t)return!1;for(let e of t)if(e){if(e.type==="diff")return!0;if(e.type==="content"&&e.content?.type==="text"){let n=(e.content.text??"").trim();if(n.length>0){if(n.startsWith("Listed ")&&n.includes("item(s)"))continue;return!0}}}return!1}function mN({raw:t}){let e=Object.entries(t).filter(([n])=>n!=="agent_name"&&n!=="task").map(([n,l])=>typeof l=="string"&&l.length>100?`${n}: ${l.slice(0,100)}...`:`${n}: ${JSON.stringify(l)}`);return e.length===0?null:(0,xt.jsx)("div",{className:"subagent-params",children:e.map((n,l)=>(0,xt.jsx)("div",{className:"subagent-param",children:n},l))})}function qu({tool:t,onOpenDiff:e}){let n=uN(t.content),l=dN(t);if(!G1(t.content)&&!fN(t)&&!l)return(0,xt.jsxs)("div",{className:"tool-compact",children:[(0,xt.jsx)("span",{className:"tool-compact-arrow",children:"\u2192"}),(0,xt.jsx)("span",{className:"tool-compact-kind",children:t.kind??"other"}),(0,xt.jsx)("span",{className:"tool-compact-title",children:t.title||"Tool call"}),(0,xt.jsx)("span",{className:"tool-compact-status",children:t.status??"pending"})]});if(l){let r=t.rawInput,a=r.agent_name||"agent",o=r.task||"",s=t.status==="pending"||t.status==="in_progress";return(0,xt.jsxs)("div",{className:"tool-card subagent-card",children:[(0,xt.jsxs)("div",{className:`subagent-header ${s?"running":""}`,children:[(0,xt.jsxs)("div",{className:"subagent-title",children:[(0,xt.jsx)("span",{className:"subagent-label",children:"subagent"}),(0,xt.jsx)("span",{className:"subagent-name",children:a})]}),(0,xt.jsxs)("div",{className:"subagent-status-wrap",children:[s&&(0,xt.jsx)("div",{className:"subagent-spinner"}),(0,xt.jsx)("span",{className:"subagent-status",children:t.status??"pending"})]})]}),(0,xt.jsxs)("div",{className:"subagent-task",children:[(0,xt.jsx)("div",{className:"subagent-task-label",children:"Task:"}),(0,xt.jsx)("div",{className:"subagent-task-text",children:o})]}),r&&(0,xt.jsx)(mN,{raw:r}),G1(t.content)&&(0,xt.jsx)("div",{className:"subagent-result",children:(t.content??[]).map((u,f)=>u&&u.type==="content"&&u.content?.type==="text"?(0,xt.jsx)(So,{text:u.content.text??"",enableThinkTags:!0},f):null)})]})}return(0,xt.jsxs)("div",{className:"tool-card",children:[(0,xt.jsxs)("div",{className:"tool-card-header",children:[(0,xt.jsxs)("div",{className:"tool-card-title",children:[(0,xt.jsx)("span",{className:"tool-kind",children:t.kind??"other"}),(0,xt.jsx)("span",{children:t.title||"Tool call"})]}),(0,xt.jsx)("span",{className:"tool-status",children:t.status??"pending"})]}),(0,xt.jsxs)("div",{className:"tool-card-body",children:[(t.content??[]).map((r,a)=>r?r.type==="content"&&r.content?.type==="text"?(0,xt.jsx)(So,{text:r.content.text??"",enableThinkTags:!0},a):r.type==="diff"?(0,xt.jsxs)("div",{children:[(0,xt.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",flexWrap:"wrap",marginBottom:8},children:[(0,xt.jsx)("div",{className:"pill",children:(0,xt.jsx)("span",{children:`Diff: ${r.path}`})}),(0,xt.jsx)("button",{className:"btn",onClick:()=>e({title:r.path,oldText:r.oldText??"",newText:r.newText??""}),children:"Open diff"})]}),(0,xt.jsx)(Hu,{oldText:r.oldText??"",newText:r.newText})]},a):null:null),null]})]})}var ei=G(it(),1);function sp({items:t,activeIndex:e,onPick:n,onHover:l}){return!t||t.length===0?null:(0,ei.jsxs)("div",{className:"autocomplete",children:[(0,ei.jsx)("div",{className:"ac-header",children:"Commands"}),t.map((i,r)=>(0,ei.jsxs)("div",{className:`ac-item${r===e?" active":""}`,onMouseEnter:()=>l(r),onMouseDown:a=>{a.preventDefault(),n(r)},children:[(0,ei.jsx)("div",{className:"ac-name",children:(0,ei.jsx)("code",{children:`/${i.name}`})}),(0,ei.jsx)("div",{className:"ac-desc",children:i.description})]},i.name))]})}var qi=G(it(),1);function X1({items:t,activeIndex:e,onPick:n,onHover:l}){return!t||t.length===0?null:(0,qi.jsxs)("div",{className:"autocomplete",children:[(0,qi.jsx)("div",{className:"ac-header",children:"Paths"}),t.map((i,r)=>(0,qi.jsx)("div",{className:`ac-item${r===e?" active":""}`,onMouseEnter:()=>l(r),onMouseDown:a=>{a.preventDefault(),n(r)},children:(0,qi.jsx)("div",{className:"ac-name",children:(0,qi.jsx)("code",{children:`@${i}`})})},`${i}_${r}`))]})}var In=G(it(),1);var ni=({textareaRef:t,value:e,placeholder:n,onChange:l,onKeyDown:i,onSubmit:r,onCancel:a,isBusy:o=!1,disabled:s=!1,textareaClassName:u,submitClassName:f="composer-submit",submitDisabled:c=!1,submitLabel:m,busyLabel:d})=>(0,In.jsxs)(In.Fragment,{children:[(0,In.jsx)("textarea",{ref:t,className:u,value:e,placeholder:n,onChange:l,onKeyDown:i,disabled:s}),(0,In.jsx)("button",{type:"button",className:`${f}${o?" busy":""}`,onClick:()=>{if(o){a?.();return}r()},title:o?"Stop":"Send",disabled:s||c,children:o?d??(0,In.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"currentColor",children:(0,In.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}):m||(0,In.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,In.jsx)("path",{d:"M12 19V5M5 12l7-7 7 7"})})})]});var Iu=G(le(),1);var P1=G(oc(),1),li=G(it(),1);function Te({children:t,onClose:e}){return(0,P1.createPortal)((0,li.jsx)("div",{className:"modal-backdrop",role:"presentation",onMouseDown:l=>{l.target===l.currentTarget&&e()},children:t}),document.body)}function Ee({title:t,onClose:e,children:n,footer:l}){return(0,li.jsxs)("div",{className:"modal",role:"dialog","aria-modal":"true",children:[(0,li.jsxs)("div",{className:"modal-header",children:[(0,li.jsx)("h2",{children:t}),(0,li.jsx)("button",{className:"btn",onClick:e,children:"Close"})]}),n,l?(0,li.jsx)("div",{className:"modal-footer",children:l}):null]})}var Qe=G(it(),1);function Pr({title:t,oldText:e,newText:n,onClose:l,onConfirm:i}){let[r,a]=(0,Iu.useState)(n),o=(0,Iu.useMemo)(()=>typeof i=="function",[i]);return(0,Qe.jsx)(Te,{onClose:l,children:(0,Qe.jsx)(Ee,{title:t?`Review change \xB7 ${t}`:"Review change",onClose:l,footer:(0,Qe.jsxs)(Qe.Fragment,{children:[(0,Qe.jsx)("button",{className:"btn",onClick:l,children:"Cancel"}),o?(0,Qe.jsx)("button",{className:"btn primary",onClick:()=>i?.(r),children:"Use this version"}):null]}),children:(0,Qe.jsxs)("div",{className:"modal-body",children:[(0,Qe.jsxs)("div",{className:"modal-pane",children:[(0,Qe.jsx)("div",{className:"pane-title",children:"Current (read-only)"}),(0,Qe.jsx)("textarea",{readOnly:!0,value:e})]}),(0,Qe.jsxs)("div",{className:"modal-pane",children:[(0,Qe.jsx)("div",{className:"pane-title",children:"Proposed (editable)"}),(0,Qe.jsx)("textarea",{value:r,onChange:s=>a(s.target.value)})]})]})})})}var To=G(le(),1);var Nt=G(it(),1);function pN(t){if(typeof t!="object"||t===null)return!1;let e=t;return e.hookTrust===!0&&Array.isArray(e.hooks)}function hN({hooks:t}){return(0,Nt.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[(0,Nt.jsx)("div",{className:"pill",style:{background:"var(--warning-bg, #332b00)",padding:"6px 10px"},children:"This workspace has project hooks that are not yet trusted."}),(0,Nt.jsx)("div",{className:"section-title",children:"Blocked hooks"}),(0,Nt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:t.map(e=>(0,Nt.jsxs)("div",{style:{padding:"6px 10px",borderRadius:6,background:"var(--surface-alt, #1e1e1e)",fontSize:13},children:[(0,Nt.jsx)("strong",{children:e.name}),(0,Nt.jsx)("div",{style:{opacity:.8,marginTop:2},children:(0,Nt.jsx)("code",{children:e.command})}),(0,Nt.jsxs)("div",{style:{opacity:.7,marginTop:2},children:["events: ",e.eventNames.join(", ")]})]},e.key))})]})}function gN(t){return t.kind==="allow_once"||t.kind==="allow_always"}function yN(t){return t.kind==="reject_once"||t.kind==="reject_always"}function Z1({req:t,onSelect:e}){let[n,l]=(0,To.useState)(()=>{let o=t.toolCall?.content??[];for(let s of o)if(s&&s.type==="diff")return{title:s.path,oldText:s.oldText??"",newText:s.newText??""};return null}),[i,r]=(0,To.useState)(!1),a=(0,To.useMemo)(()=>n?{codely:{toolConfirmationPayload:{newContent:n.newText}}}:null,[n]);return(0,Nt.jsxs)(Nt.Fragment,{children:[(0,Nt.jsx)(Te,{onClose:()=>{e({outcome:"cancelled"})},children:(0,Nt.jsx)(Ee,{title:`Approval required \xB7 ${t.toolCall?.title??"Tool call"}`,onClose:()=>e({outcome:"cancelled"}),footer:(0,Nt.jsx)("button",{className:"btn",onClick:()=>e({outcome:"cancelled"}),children:"Cancel"}),children:(0,Nt.jsx)("div",{className:"modal-body",style:{gridTemplateColumns:"1fr"},children:(0,Nt.jsxs)("div",{className:"modal-pane",children:[(0,Nt.jsx)("div",{className:"pane-title",children:"Details"}),(0,Nt.jsxs)("div",{style:{padding:"10px 12px",display:"flex",flexDirection:"column",gap:10},children:[(0,Nt.jsxs)("div",{className:"pill",children:[(0,Nt.jsx)("span",{children:`Kind: ${t.toolCall?.kind??"other"}`}),(0,Nt.jsx)("span",{style:{marginLeft:10},children:`Status: ${t.toolCall?.status??"pending"}`})]}),pN(t.toolCall?.rawInput)?(0,Nt.jsx)(hN,{hooks:t.toolCall.rawInput.hooks}):null,n?(0,Nt.jsxs)("div",{style:{display:"flex",gap:10,flexWrap:"wrap",alignItems:"center"},children:[(0,Nt.jsx)("div",{className:"pill",children:(0,Nt.jsx)("span",{children:`File: ${n.title}`})}),(0,Nt.jsx)("button",{className:"btn",onClick:()=>r(!0),children:"Edit diff\u2026"})]}):null,n?(0,Nt.jsx)(Hu,{oldText:n.oldText,newText:n.newText}):null,(0,Nt.jsx)("div",{className:"section-title",children:"Options"}),(0,Nt.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:10},children:(t.options??[]).map(o=>(0,Nt.jsx)("button",{className:yN(o)?"btn danger":o.kind==="allow_always"?"btn primary":"btn",onClick:()=>{e({outcome:"selected",optionId:o.optionId,meta:gN(o)?a??void 0:void 0})},children:o.name||o.optionId},o.optionId))})]})]})})})}),i&&n?(0,Nt.jsx)(Pr,{title:n.title,oldText:n.oldText,newText:n.newText,onClose:()=>r(!1),onConfirm:o=>{l({...n,newText:o}),r(!1)}}):null]})}var Ce=G(le(),1);function ju(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function K1(t){let e=t?.toolCall?.rawInput;if(!ju(e))return null;let n=e.questions;return Array.isArray(n)?n:null}function J1(t){if(!ju(t))return!1;let e=t.header,n=t.question;return typeof e=="string"&&e.trim().length>0&&typeof n=="string"&&n.trim().length>0}function Yu(t){let e=K1(t);return!e||e.length===0?!1:J1(e[0])}function vN(t){return t==="text"||t==="yesno"||t==="choice"?t:"choice"}function bN(t){if(!Array.isArray(t))return;let e=[];for(let n of t){if(!ju(n))continue;let l=n.label;if(typeof l!="string"||!l.trim())continue;let i=n.description;e.push({label:l,description:typeof i=="string"?i:void 0})}return e.length>0?e:void 0}function $1(t){let e=K1(t);if(!e)return[];let n=[];for(let l of e){if(!J1(l))continue;let i=l,r=i.placeholder;n.push({header:String(i.header),question:String(i.question),type:vN(i.type),options:bN(i.options),multiSelect:i.multiSelect===!0,placeholder:typeof r=="string"?r:void 0})}return n}function W1(t){let e=t?.toolCall?.rawInput;if(!ju(e))return null;let n=e.autoContinueAtMs,l=e.autoContinueMessage;return typeof n!="number"||!Number.isFinite(n)||typeof l!="string"||l.trim().length===0?null:{autoContinueAtMs:n,autoContinueMessage:l}}function tx(t){return{codely:{toolConfirmationPayload:{answers:{...t}}}}}var ct=G(it(),1);var xN=[{label:"Yes"},{label:"No"}];function kN(t,e,n){if(t===void 0||!e)return null;let l=Math.max(0,Math.ceil((t-n)/1e3));return{message:e,remainingSeconds:l}}function SN(t){if(t.type==="yesno")return new Set(["Yes"]);if(t.type!=="choice")return new Set;let e=t.options??[];if(t.multiSelect)return new Set(e.map(l=>l.label));let n=e[0]?.label;return n?new Set([n]):new Set}function ex({req:t,onSubmit:e,onCancel:n}){let l=(0,Ce.useMemo)(()=>$1(t),[t]),i=(0,Ce.useMemo)(()=>W1(t),[t]),[r,a]=(0,Ce.useState)(()=>Date.now()),[o,s]=(0,Ce.useState)(0),[u,f]=(0,Ce.useState)({}),[c,m]=(0,Ce.useState)(""),[d,g]=(0,Ce.useState)(new Set),x=l.length,C=l[o],h=(0,Ce.useMemo)(()=>kN(i?.autoContinueAtMs,i?.autoContinueMessage,r),[i,r]),p=(0,Ce.useMemo)(()=>C?SN(C):new Set,[C]);(0,Ce.useEffect)(()=>{if(i?.autoContinueAtMs===void 0)return;a(Date.now());let P=setInterval(()=>{a(Date.now())},1e3);return()=>{clearInterval(P)}},[i?.autoContinueAtMs,i?.autoContinueMessage]);let y=(0,Ce.useCallback)(P=>{let q={...u},B=P.trim();if(B.length>0&&(q[String(o)]=B),f(q),o+1>=x){e(q);return}s(o+1),m(""),g(new Set)},[u,e,o,x]),T=(0,Ce.useCallback)(P=>{y(P)},[y]),N=(0,Ce.useCallback)(P=>{g(q=>{let B=new Set(q);return B.has(P)?B.delete(P):B.add(P),B})},[]),E=(0,Ce.useCallback)(()=>{if(!C||C.type!=="choice")return;let P=(C.options??[]).map(q=>q.label).filter(q=>d.has(q));y(P.join(", "))},[y,C,d]),M=(0,Ce.useCallback)(()=>{y(c)},[y,c]);if(x===0)return(0,ct.jsx)(Te,{onClose:n,children:(0,ct.jsx)(Ee,{title:"Ask User",onClose:n,footer:(0,ct.jsx)("button",{className:"btn",onClick:n,children:"Cancel"}),children:(0,ct.jsx)("div",{className:"modal-body",style:{gridTemplateColumns:"1fr"},children:(0,ct.jsx)("div",{className:"modal-pane",children:(0,ct.jsx)("div",{className:"pane-title",children:"No questions provided."})})})})});if(!C)return null;let z=P=>p.has(P)?(0,ct.jsx)("span",{className:"ask-user-default-badge","aria-hidden":"true",children:"Default"}):null,Y=()=>{if(C.type==="yesno")return(0,ct.jsx)("div",{style:{display:"flex",gap:10},children:xN.map(q=>(0,ct.jsxs)("button",{className:`btn ask-user-option${p.has(q.label)?" ask-user-option-default":""}`,onClick:()=>T(q.label),children:[(0,ct.jsx)("span",{children:q.label}),z(q.label)]},q.label))});if(C.type==="text")return(0,ct.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:(0,ct.jsx)("textarea",{value:c,placeholder:C.placeholder??"",onChange:q=>m(q.target.value),style:{minHeight:120}})});let P=C.options??[];return C.multiSelect?(0,ct.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:8},children:P.map(q=>{let B=p.has(q.label);return(0,ct.jsxs)("label",{className:`ask-user-option ask-user-option-checkbox${B?" ask-user-option-default":""}`,children:[(0,ct.jsx)("input",{type:"checkbox","aria-label":q.label,checked:d.has(q.label),onChange:()=>N(q.label)}),(0,ct.jsxs)("span",{children:[(0,ct.jsx)("strong",{children:q.label}),q.description?(0,ct.jsx)("span",{style:{marginLeft:6,opacity:.75},children:q.description}):null]}),z(q.label)]},q.label)})}):(0,ct.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8},children:P.map(q=>(0,ct.jsxs)("button",{className:`btn ask-user-option${p.has(q.label)?" ask-user-option-default":""}`,onClick:()=>T(q.label),children:[(0,ct.jsx)("span",{children:q.label}),z(q.label)]},q.label))})},w=(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)("button",{className:"btn",onClick:n,children:"Cancel"}),C.type==="text"?(0,ct.jsx)("button",{className:"btn primary",onClick:M,children:"Submit"}):null,C.type==="choice"&&C.multiSelect?(0,ct.jsx)("button",{className:"btn primary",onClick:E,children:"Done"}):null]});return(0,ct.jsx)(Te,{onClose:n,children:(0,ct.jsx)(Ee,{title:`Ask User \xB7 ${C.header}`,onClose:n,footer:w,children:(0,ct.jsx)("div",{className:"modal-body",style:{gridTemplateColumns:"1fr"},children:(0,ct.jsxs)("div",{className:"modal-pane",children:[(0,ct.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",padding:"10px 12px"},children:[(0,ct.jsx)("span",{className:"pill",children:(0,ct.jsx)("strong",{children:C.header})}),(0,ct.jsxs)("span",{style:{opacity:.7,fontSize:12},children:[o+1," / ",x]})]}),(0,ct.jsxs)("div",{style:{padding:"0 12px 12px",display:"flex",flexDirection:"column",gap:12},children:[(0,ct.jsx)("div",{className:"pane-title",children:C.question}),h?(0,ct.jsxs)("div",{className:"ask-user-countdown",role:"status","aria-label":"YOLO auto-continue countdown",children:[(0,ct.jsx)("div",{className:"ask-user-countdown-label",children:"Auto-selects defaults in"}),(0,ct.jsxs)("div",{className:"ask-user-countdown-time",children:[h.remainingSeconds,"s"]}),(0,ct.jsx)("div",{className:"ask-user-countdown-message",children:h.message})]}):null,Y()]})]})})})})}var nx=G(le(),1);var xn=G(it(),1);function lx({params:t,onDone:e}){let[n,l]=(0,nx.useState)(t.defaultValue??"");return(0,xn.jsx)(Te,{onClose:()=>e({outcome:"cancelled"}),children:(0,xn.jsx)(Ee,{title:t.title||"Input required",onClose:()=>e({outcome:"cancelled"}),footer:(0,xn.jsxs)(xn.Fragment,{children:[(0,xn.jsx)("button",{className:"btn",onClick:()=>e({outcome:"cancelled"}),children:"Cancel"}),(0,xn.jsx)("button",{className:"btn primary",onClick:()=>e({outcome:"submitted",text:n}),children:"Submit"})]}),children:(0,xn.jsx)("div",{className:"modal-body",style:{gridTemplateColumns:"1fr"},children:(0,xn.jsxs)("div",{className:"modal-pane",children:[(0,xn.jsx)("div",{className:"pane-title",children:t.prompt||"Please provide input:"}),(0,xn.jsx)("textarea",{value:n,onChange:i=>l(i.target.value),style:{minHeight:140}})]})})})})}var Wn=G(it(),1);function ix({methods:t,onPick:e,onClose:n}){return(0,Wn.jsx)(Te,{onClose:n,children:(0,Wn.jsx)(Ee,{title:"Authenticate",onClose:n,footer:(0,Wn.jsx)("button",{className:"btn",onClick:n,children:"Cancel"}),children:(0,Wn.jsx)("div",{className:"modal-body",style:{gridTemplateColumns:"1fr"},children:(0,Wn.jsxs)("div",{className:"modal-pane",children:[(0,Wn.jsx)("div",{className:"pane-title",children:"Choose an auth method (stored by the CLI)"}),(0,Wn.jsx)("div",{style:{padding:"10px 12px",display:"flex",flexDirection:"column",gap:10},children:t.map(l=>(0,Wn.jsx)("button",{className:"btn primary",onClick:()=>e(l),children:l.name||l.id},l.id))})]})})})})}var rx=G(le(),1);function ax(t,e=[]){(0,rx.useLayoutEffect)(()=>{let n=t.current;n&&(n.style.height="auto",n.style.height=`${Math.min(n.scrollHeight,180)}px`)},[t,...e])}var yt=G(le(),1);var wN=new Set(["extensions","commands","skills","agents"]);function TN(t){return typeof t=="object"&&t!==null}function EN(t){return!TN(t)||typeof t.active!="boolean"||typeof t.key!="string"||t.key.length===0||typeof t.title!="string"||t.title.length===0||!Array.isArray(t.kinds)||!t.kinds.every(e=>typeof e=="string"&&wN.has(e))||t.message!=null&&(typeof t.message!="string"||t.message.length===0)||t.timestamp!=null&&(typeof t.timestamp!="string"||t.timestamp.length===0)?null:{active:t.active,key:t.key,kinds:t.kinds,title:t.title,...typeof t.message=="string"?{message:t.message}:{},...typeof t.timestamp=="string"?{timestamp:t.timestamp}:{}}}function Vu(t){let e=EN(t);if(!e||!e.active)return null;let n=e.message?.trim();if(n)return n;let l=e.title.trim();return l.length>0?l:null}var Zr=class{constructor(e){this.ws=e}nextId=0;pending=new Map;handlers=new Map;on(e,n){this.handlers.set(e,n)}request(e,n){let l=this.nextId++,i={jsonrpc:"2.0",id:l,method:e,params:n};return this.ws.send(JSON.stringify(i)),new Promise((r,a)=>{let o=u=>r(u),s=u=>a(u);this.pending.set(l,{resolve:o,reject:s})})}notify(e,n){let l={jsonrpc:"2.0",method:e,params:n};this.ws.send(JSON.stringify(l))}handleMessage(e){if(!e||typeof e!="object")return;let n=e,l="id"in n,i="method"in n;if(l&&!i){let r=n.id;if(typeof r!="number")return;let a=this.pending.get(r);if(!a)return;this.pending.delete(r),"result"in n?a.resolve(n.result):a.reject(n.error);return}if(l&&i){let r=n.id,a=n.method;if(typeof r!="number"||typeof a!="string")return;let o=this.handlers.get(a);if(!o){this.respondError(r,{code:-32601,message:`Method not found: ${a}`});return}Promise.resolve().then(()=>o(n.params)).then(s=>this.respond(r,s??null)).catch(s=>this.respondError(r,{code:-32603,message:s instanceof Error?s.message:String(s)}));return}if(i){let r=n.method;if(typeof r!="string")return;let a=this.handlers.get(r);a&&Promise.resolve(a(n.params))}}respond(e,n){let l={jsonrpc:"2.0",id:e,result:n};this.ws.send(JSON.stringify(l))}respondError(e,n){let l={jsonrpc:"2.0",id:e,error:n};this.ws.send(JSON.stringify(l))}};function zn(){try{return new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}catch{return""}}function Ii(t){return typeof t=="object"&&t!==null}function CN(t){let e=t.toolCall?.rawInput;return typeof e=="object"&&e!==null&&e.hookTrust===!0}function AN(t){return CN(t)||Yu(t)}function NN(t){let e=t.options.find(n=>n.kind==="allow_always")??t.options.find(n=>n.kind==="allow_once")??t.options[0];return e?{outcome:{outcome:"selected",optionId:e.optionId}}:{outcome:{outcome:"cancelled"}}}function ox(t){if(!Ii(t))return!1;let e=t.code,n=t.message;return!!(e===-32002||typeof n=="string"&&n.toLowerCase().includes("auth"))}function sx(t){if(!Ii(t))return!1;let e=t.kind;if(e==="message"){let n=t.message;return up(n)}return e==="tool"?typeof t.toolCallId=="string"&&t.toolCallId.length>0:!1}function ux(t){return Ii(t)?typeof t.toolCallId=="string"&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.kind=="string":!1}function up(t){if(!Ii(t))return!1;let e=t.role,n=t.type,l=t.text;return(e==="user"||e==="assistant")&&n==="text"&&typeof l=="string"}function RN(t){let e={};if(t.sessionUpdate==="replace_history"&&(Array.isArray(t.feed)&&(e.feed=t.feed.filter(sx)),Array.isArray(t.tools)&&(e.tools=t.tools.filter(ux)),Array.isArray(t.messages)&&(e.messages=t.messages.filter(up)),e.feed||e.tools||e.messages))return e;let n=t?._meta;if(!Ii(n))return null;let l=n.codely;if(!Ii(l))return null;let i=l.ui;if(!Ii(i)||i.action!=="replace_history")return null;let r=i.feed;Array.isArray(r)&&(e.feed=r.filter(sx));let a=i.tools;Array.isArray(a)&&(e.tools=a.filter(ux));let o=i.messages;return Array.isArray(o)&&(e.messages=o.filter(up)),!e.feed&&!e.tools&&!e.messages?null:e}function cx(t){let[e,n]=(0,yt.useState)("connecting"),[l,i]=(0,yt.useState)(null),[r,a]=(0,yt.useState)("idle"),[o,s]=(0,yt.useState)({open:!1,methods:[]}),[u,f]=(0,yt.useState)([]),[c,m]=(0,yt.useState)([]),[d,g]=(0,yt.useState)([]),[x,C]=(0,yt.useState)([]),[h,p]=(0,yt.useState)(null),[y,T]=(0,yt.useState)(null),[N,E]=(0,yt.useState)(null),M=(0,yt.useRef)(null),[z,Y]=(0,yt.useState)(null),w=(0,yt.useRef)(null),[P,q]=(0,yt.useState)(!1),B=(0,yt.useRef)(null),X=(0,yt.useRef)(null),K=(0,yt.useRef)(!0),dt=(0,yt.useRef)(0),kt=(0,yt.useRef)(null),Qt=e==="connected"?y??h:h??y,L=(0,yt.useCallback)((j,F)=>{let Z=B.current;if(B.current=null,X.current=null,!!Z)try{Z.close(j,F)}catch{try{Z.close()}catch{}}},[]),k=(0,yt.useCallback)(j=>{g(F=>[...F,j])},[]),Tt=(0,yt.useCallback)(j=>{let{role:F,type:Z,chunk:W}=j;if(!W)return;let lt=F==="assistant"?kt.current??void 0:void 0;g(st=>{let Dt=st.map(It=>It.kind==="message"&&!It.message.completed&&(It.message.role!==F||It.message.type!==Z)?{...It,message:{...It.message,completed:!0}}:It),Ne=Dt[Dt.length-1];if(Ne&&Ne.kind==="message"&&Ne.message.role===F&&Ne.message.type===Z&&!Ne.message.completed){let It={kind:"message",message:{...Ne.message,text:(Ne.message.text??"")+W}};return[...Dt.slice(0,-1),It]}let Vt={kind:"message",message:{id:`${F}_${Z}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:F,type:Z,time:zn(),text:W,completed:F==="user",...lt!==void 0?{turnId:lt}:{}}};return[...Dt,Vt]})},[]),Mt=(0,yt.useCallback)(()=>{let j=kt.current;j!==null&&(g(F=>F.map(Z=>Z.kind!=="message"||Z.message.role!=="assistant"||Z.message.turnId!==j||Z.message.completed?Z:{...Z,message:{...Z.message,completed:!0}})),kt.current=null,q(!1))},[]),S=(0,yt.useCallback)(j=>{let F=RN(j);if(F){F.tools?C(F.tools):C([]),F.feed?g(F.feed.map(Z=>{if(Z.kind==="tool")return{kind:"tool",toolCallId:Z.toolCallId,time:zn()};let W=Z.message;return{kind:"message",message:{id:`rehydrate_${W.role}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:W.role,type:"text",time:zn(),text:W.text,completed:!0}}})):F.messages?g(F.messages.map(Z=>({kind:"message",message:{id:`rehydrate_${Z.role}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:Z.role,type:"text",time:zn(),text:Z.text,completed:!0}}))):g([]),m([]),p(null),kt.current=null,q(!1);return}if(j.sessionUpdate==="available_commands_update"){f(j.availableCommands??[]);return}if(j.sessionUpdate==="plan"){m(j.entries??[]);return}if(j.sessionUpdate==="agent_message_chunk"){j.content?.type==="text"&&Tt({role:"assistant",type:"text",chunk:j.content.text??""});return}if(j.sessionUpdate==="agent_thought_chunk"){j.content?.type==="text"&&Tt({role:"assistant",type:"thought",chunk:j.content.text??""});return}if(j.sessionUpdate==="tool_call"){let Z={toolCallId:j.toolCallId,title:j.title,status:j.status,kind:j.kind,content:j.content,rawInput:j.rawInput,locations:j.locations};C(W=>[...W,Z]),g(W=>W.map(lt=>lt.kind==="message"&&!lt.message.completed?{...lt,message:{...lt.message,completed:!0}}:lt)),k({kind:"tool",toolCallId:Z.toolCallId,time:zn()});return}if(j.sessionUpdate==="tool_call_update"){C(Z=>Z.map(W=>W.toolCallId===j.toolCallId?{...W,...j.title?{title:j.title}:{},...j.status?{status:j.status}:{},...j.kind?{kind:j.kind}:{},...j.content?{content:j.content}:{}}:W));return}},[k,Tt]),ot=(0,yt.useCallback)(async()=>{if(!K.current)return;L(1e3,"reconnect"),kt.current=null,n("connecting"),i(null),a(t.resumeSessionId?"resuming":"idle"),p(null),T(null);let j=(()=>{let W=location.protocol==="https:"?"wss:":"ws:",lt=new URL(`${W}//${location.host}${t.wsPath||"/ws"}`);return t.resumeSessionId&&lt.searchParams.set("resumeSession",t.resumeSessionId),lt.toString()})(),F=new WebSocket(j);B.current=F;let Z=()=>K.current&&B.current===F;F.addEventListener("open",async()=>{if(!Z()){try{F.close(1e3,"stale connection")}catch{}return}n("connected");let W=new Zr(F);if(!Z()){try{F.close(1e3,"stale connection")}catch{}return}X.current=W,W.on("session/update",lt=>{let st=lt;return st&&st.update&&S(st.update),null}),W.on("codely/external_load_diagnostics",lt=>(T(Vu(lt)),null)),W.on("session/request_permission",lt=>{let st=lt;return t.yolo&&!AN(st)?NN(st):new Promise(Dt=>{M.current=Dt,E(st)})}),W.on("_session/request_input",lt=>{let st=lt;return new Promise(Dt=>{w.current=Dt,Y(st)})}),F.addEventListener("message",lt=>{if(Z())try{let st=JSON.parse(String(lt.data));W.handleMessage(st)}catch{}});try{let lt=await W.request("initialize",{protocolVersion:1,clientCapabilities:{fs:{readTextFile:!1,writeTextFile:!1},terminal:!1},clientInfo:{name:"codely-web-ui",version:"0.0.0",title:"Codely Web UI"}});if(!Z())return;let st=lt?.authMethods??[];s({open:!1,methods:st});try{let Dt=await W.request("session/new",{cwd:t.cwd||"",mcpServers:[],...t.resumeSessionId?{_meta:{codely:{resumeSessionId:t.resumeSessionId}}}:{}});if(!Z())return;i(Dt.sessionId),a("ready"),p(null),T(null)}catch(Dt){if(!Z())return;ox(Dt)?(s({open:!0,methods:st}),p("Authentication required.")):p(`Failed to create session: ${String(Dt?.message??Dt)}`)}}catch(lt){if(!Z())return;p(`Failed to initialize ACP: ${String(lt?.message??lt)}`)}}),F.addEventListener("close",W=>{let lt=B.current===F;if(lt&&(B.current=null,X.current=null),!lt||!K.current)return;let st=W,Dt=[];st&&typeof st.code=="number"&&Dt.push(`code=${st.code}`),st&&typeof st.reason=="string"&&st.reason.trim()!==""&&Dt.push(`reason=${st.reason}`),st&&typeof st.wasClean=="boolean"&&Dt.push(`clean=${st.wasClean}`),n("disconnected"),i(null),a("idle"),p(Dt.length>0?`Disconnected (${Dt.join(" ")})`:"Disconnected.")}),F.addEventListener("error",()=>{let W=B.current===F;W&&(B.current=null,X.current=null),!(!W||!K.current)&&(n("disconnected"),i(null),a("idle"),p("Connection error."))})},[L,t.cwd,t.resumeSessionId,t.wsPath,t.yolo,S]),pe=(0,yt.useCallback)(async j=>{let F=X.current;if(F)try{await F.request("authenticate",{methodId:j.id});let Z=await F.request("session/new",{cwd:t.cwd||"",mcpServers:[]});if(!K.current)return;i(Z.sessionId),s(W=>({...W,open:!1})),p(null),T(null)}catch(Z){if(!K.current)return;p(`Authentication failed: ${String(Z?.message??Z)}`)}},[t.cwd]),he=(0,yt.useCallback)(async j=>{let F=X.current;if(!F||!l){p("Not connected.");return}let{displayText:Z,prompt:W}=typeof j=="string"?{displayText:j,prompt:[{type:"text",text:j}]}:j;Tt({role:"user",type:"text",chunk:Z}),dt.current+=1,kt.current=dt.current,q(!0);try{let lt=await F.request("session/prompt",{sessionId:l,prompt:W});Mt(),lt?.stopReason==="cancelled"&&p("Cancelled.")}catch(lt){if(Mt(),ox(lt)){i(null),s(st=>({...st,open:!0})),p("Authentication required.");return}p(`Request failed: ${String(lt?.message??lt)}`)}},[Tt,Mt,l]),Ae=(0,yt.useCallback)(()=>{let j=X.current;if(!(!j||!l))try{j.notify("session/cancel",{sessionId:l})}catch{}},[l]),ht=(0,yt.useCallback)(async(j,F=10)=>{let Z=X.current;if(!Z||!l)return[];try{let W=await Z.request("_workspace/suggest_paths",{sessionId:l,pattern:j,maxResults:F});return Array.isArray(W?.paths)?W.paths:[]}catch{return[]}},[l]),se=(0,yt.useCallback)(async(j,F=10)=>{let Z=X.current;if(!Z||!l)return[];try{let W=await Z.request("_slash/complete",{sessionId:l,line:j,maxResults:F});return Array.isArray(W?.items)?W.items:[]}catch{return[]}},[l]),Pt=(0,yt.useCallback)(j=>{let F=M.current;M.current=null,E(null),F&&F(j)},[]),ge=(0,yt.useCallback)(j=>{let F=w.current;w.current=null,Y(null),F&&F(j)},[]);return(0,yt.useEffect)(()=>{K.current=!0,(t.autoConnect??!0)&&ot();let j=()=>{K.current=!1,L(1001,"page unload")};return window.addEventListener("pagehide",j),window.addEventListener("beforeunload",j),()=>{K.current=!1,window.removeEventListener("pagehide",j),window.removeEventListener("beforeunload",j),L(1001,"component unmount")}},[]),{connection:e,sessionId:l,sessionPhase:r,statusText:Qt,auth:o,availableCommands:u,planEntries:c,feed:d,tools:x,connect:ot,sendPrompt:he,cancel:Ae,suggestPaths:ht,completeSlashCommand:se,authenticate:pe,permissionReq:N,resolvePermission:Pt,inputReq:z,resolveInput:ge,isBusy:P}}var ft=G(le(),1);function MN(t){return t?t.endsWith("/")?t.slice(0,-1):t:"/__codely__/control-plane"}async function ii(t,e){let n=await fetch(t,{...e,headers:{"content-type":"application/json",...e?.headers??{}}}),l=await n.text(),i=l?JSON.parse(l):null;if(!n.ok){let r=typeof i?.error=="string"?i.error:`${n.status} ${n.statusText}`;throw new Error(r)}return i}function fx(t){let e=MN(t);return{list:async()=>(await ii(`${e}/registry`)).endpoints,getById:async n=>(await ii(`${e}/registry/${encodeURIComponent(n)}`)).endpoint,create:async n=>(await ii(`${e}/registry`,{method:"POST",body:JSON.stringify(n)})).endpoint,update:async(n,l)=>(await ii(`${e}/registry/${encodeURIComponent(n)}`,{method:"PUT",body:JSON.stringify(l)})).endpoint,remove:async n=>{await ii(`${e}/registry/${encodeURIComponent(n)}`,{method:"DELETE"})},health:async n=>ii(`${e}/health?endpointId=${encodeURIComponent(n)}`),getRawRegistryJson:async()=>(await ii(`${e}/registry/raw`)).json,saveRawRegistryJson:async n=>{await ii(`${e}/registry/raw`,{method:"PUT",body:JSON.stringify({json:n})})}}}var ri=G(le(),1);var tn=G(it(),1);function DN(t){return t.trim()?t.split(",").map(e=>e.trim()).filter(e=>e.length>0):[]}var dx=({open:t,endpoint:e,onClose:n,onSave:l})=>{let[i,r]=(0,ri.useState)(""),[a,o]=(0,ri.useState)(""),[s,u]=(0,ri.useState)(""),[f,c]=(0,ri.useState)(null),[m,d]=(0,ri.useState)(!1);if((0,ri.useEffect)(()=>{t&&(r(e?.name??""),o(e?.baseUrl??""),u((e?.tags??[]).join(", ")),c(null),d(!1))},[e,t]),!t)return null;let g=async()=>{if(!i.trim()||!a.trim()){c("Name and base URL are required.");return}d(!0),c(null);try{await l({name:i.trim(),baseUrl:a.trim(),tags:DN(s)}),n()}catch(x){c(x instanceof Error?x.message:"Save failed")}finally{d(!1)}};return(0,tn.jsx)(Te,{onClose:n,children:(0,tn.jsx)(Ee,{title:e?"Edit endpoint":"Add endpoint",onClose:n,footer:(0,tn.jsxs)("div",{className:"cp-modal-actions",children:[(0,tn.jsx)("button",{className:"btn",onClick:n,disabled:m,children:"Cancel"}),(0,tn.jsx)("button",{className:"btn primary",onClick:()=>void g(),disabled:m,children:m?"Saving\u2026":"Save"})]}),children:(0,tn.jsxs)("div",{className:"cp-modal-body",children:[(0,tn.jsxs)("label",{className:"cp-label",children:["Name",(0,tn.jsx)("input",{className:"cp-input",value:i,onChange:x=>r(x.target.value),placeholder:"e.g. Mac Mini - local"})]}),(0,tn.jsxs)("label",{className:"cp-label",children:["Base URL",(0,tn.jsx)("input",{className:"cp-input",value:a,onChange:x=>o(x.target.value),placeholder:"http://127.0.0.1:3939"})]}),(0,tn.jsxs)("label",{className:"cp-label",children:["Tags (comma-separated)",(0,tn.jsx)("input",{className:"cp-input",value:s,onChange:x=>u(x.target.value),placeholder:"local, gpu, staging"})]}),f?(0,tn.jsx)("div",{className:"cp-error",children:f}):null]})})})};var ai=G(le(),1);var ze=G(it(),1);function mx(t){let e=t.split(/\r?\n/),n=[],l=[];for(let i=0;i<e.length;i+=1){let r=e[i]?.trim()??"";if(!r)continue;let a=r.split(",").map(f=>f.trim());if(a.length>3){l.push(`Line ${i+1}: expected "url[, name[, tag]]"`);continue}let o=a[0]??"";if(!o){l.push(`Line ${i+1}: missing endpoint url`);continue}let s=a[1]?.trim()||o,u=a[2]?.trim()||o;n.push({name:s,baseUrl:o,tags:u?[u]:[]})}return l.length>0?{ok:!1,error:l.join(`
57
+ `)}:n.length===0?{ok:!1,error:"No endpoints found."}:{ok:!0,inputs:n}}var px=({open:t,onClose:e,onSubmit:n})=>{let[l,i]=(0,ai.useState)(""),[r,a]=(0,ai.useState)(null),[o,s]=(0,ai.useState)(!1);(0,ai.useEffect)(()=>{t&&(i(""),a(null),s(!1))},[t]);let u=(0,ai.useMemo)(()=>mx(l),[l]);if(!t)return null;let f=async()=>{let c=mx(l);if(!c.ok){a(c.error);return}s(!0),a(null);try{await n(c.inputs),e()}catch(m){a(m instanceof Error?m.message:"Batch add failed")}finally{s(!1)}};return(0,ze.jsx)(Te,{onClose:e,children:(0,ze.jsx)(Ee,{title:"Batch add endpoints",onClose:e,footer:(0,ze.jsxs)("div",{className:"cp-modal-actions",children:[(0,ze.jsx)("button",{className:"btn",onClick:e,disabled:o,children:"Cancel"}),(0,ze.jsx)("button",{className:"btn primary",onClick:()=>void f(),disabled:o,children:o?"Adding\u2026":"Add"})]}),children:(0,ze.jsxs)("div",{className:"cp-modal-body",children:[(0,ze.jsxs)("div",{className:"cp-muted",style:{marginBottom:8},children:["One entry per line (empty lines allowed):",(0,ze.jsx)("br",{}),(0,ze.jsx)("code",{children:"url[, name[, tag]]"}),(0,ze.jsx)("br",{}),"If only ",(0,ze.jsx)("code",{children:"url"})," is provided, ",(0,ze.jsx)("code",{children:"name"})," and"," ",(0,ze.jsx)("code",{children:"tag"})," default to the same url."]}),(0,ze.jsx)("textarea",{className:"cp-textarea",placeholder:`http://127.0.0.1:3939, Local, local
58
+ http://127.0.0.1:3940`,value:l,onChange:c=>i(c.target.value),rows:8}),u.ok?(0,ze.jsxs)("div",{className:"cp-muted",style:{marginTop:8},children:["Parsed ",u.inputs.length," endpoint(s)"]}):null,r?(0,ze.jsx)("div",{className:"cp-error",style:{whiteSpace:"pre-wrap"},children:r}):null]})})})};var te=G(it(),1);function ON(t){return t===void 0?(0,te.jsx)("span",{className:"cp-health unknown",children:"Unknown"}):t===null?(0,te.jsx)("span",{className:"cp-health pending",children:"Checking\u2026"}):t.ok?(0,te.jsxs)("span",{className:"cp-health ok",children:["Healthy ",(0,te.jsxs)("span",{className:"cp-health-ms",children:[t.durationMs,"ms"]})]}):(0,te.jsxs)("span",{className:"cp-health err",children:["Unhealthy ",t.error?`\xB7 ${t.error}`:""]})}var cp=({endpoints:t,healthById:e,onEdit:n,onDelete:l,onRefreshHealth:i,selectedIds:r,onToggleSelect:a})=>t.length===0?(0,te.jsx)("div",{className:"cp-empty",children:"No endpoints registered yet."}):(0,te.jsx)("div",{className:"cp-list",children:t.map(o=>(0,te.jsxs)("div",{className:"cp-row",children:[(0,te.jsx)("div",{className:"cp-select-box",children:(0,te.jsx)("input",{type:"checkbox",checked:r?.has(o.id)??!1,onChange:s=>a?.(o.id,s.target.checked)})}),(0,te.jsxs)("div",{className:"cp-row-main",children:[(0,te.jsxs)("div",{className:"cp-row-title",children:[(0,te.jsx)("span",{className:"cp-name",children:o.name}),(0,te.jsx)("span",{className:"cp-url",children:o.baseUrl})]}),(0,te.jsxs)("div",{className:"cp-row-meta",children:[ON(e[o.id]),(0,te.jsx)("div",{className:"cp-tags",children:o.tags.length===0?(0,te.jsx)("span",{className:"cp-tag muted",children:"no tags"}):o.tags.map(s=>(0,te.jsx)("span",{className:"cp-tag",children:s},s))})]})]}),(0,te.jsxs)("div",{className:"cp-actions",children:[(0,te.jsx)("button",{className:"btn",onClick:()=>i(o),children:"Health"}),(0,te.jsx)("button",{className:"btn",onClick:()=>n(o),children:"Edit"}),(0,te.jsx)("button",{className:"btn danger",onClick:()=>l(o),children:"Delete"})]})]},o.id))});var hx=G(le(),1);var Kr=G(le(),1);var ji=G(it(),1);var Jr=({feed:t,tools:e,onOpenDiff:n})=>{let l=(0,Kr.useRef)(null),i=(0,Kr.useMemo)(()=>{let r=new Map;for(let a of e)r.set(a.toolCallId,a);return r},[e]);return(0,Kr.useEffect)(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[t]),(0,ji.jsx)("div",{className:"cp-task-body",ref:l,children:t.length===0?(0,ji.jsx)("div",{className:"cp-empty",children:"No activity yet."}):t.map(r=>{if(r.kind==="message")return(0,ji.jsx)("div",{className:"cp-task-message",children:(0,ji.jsx)(Bu,{message:r.message})},r.message.id);let a=i.get(r.toolCallId);return a?(0,ji.jsx)("div",{className:"cp-task-tool",children:(0,ji.jsx)(qu,{tool:a,onOpenDiff:o=>n({title:o.title,oldText:o.oldText,newText:o.newText})})},r.toolCallId):null})})};var Rt=G(it(),1);var fp=({state:t,selected:e,onSelect:n,onClick:l,onForceCancel:i,onForceRefresh:r,onRetry:a,onSendPrompt:o,onOpenDiff:s,compact:u=!1,hideInput:f=!1})=>{let[c,m]=(0,hx.useState)(""),d=t.connection==="connected"?t.isBusy?"busy":"idle":"disconnected",g=t.connection==="disconnected"||t.lastError!==null,x=()=>{if(t.connection!=="connected")return;let p=c.trim();p&&(o(t.endpoint.id,p),m(""))},C=p=>{p.key==="Enter"&&p.ctrlKey&&(p.preventDefault(),x())};if(u){let p="";if(t.connection==="connected"&&t.statusText)p=t.statusText;else{let y=t.feed[t.feed.length-1];y&&(y.kind==="message"?p=y.message.text:p=`Tool: ${y.toolCallId}`)}return(0,Rt.jsxs)("div",{className:`cp-task-card-compact${g?" error":""}`,onClick:()=>l(t.endpoint.id),children:[(0,Rt.jsxs)("div",{className:"cp-task-card-compact-body",children:[(0,Rt.jsxs)("div",{className:"cp-task-card-compact-top",children:[(0,Rt.jsx)("span",{className:"cp-task-card-compact-name",children:t.endpoint.name}),(0,Rt.jsx)("span",{className:`cp-conn ${t.connection}`,children:d})]}),(0,Rt.jsxs)("div",{className:"cp-task-card-compact-meta",children:[t.queuedCount>0&&(0,Rt.jsxs)("span",{children:["queue ",t.queuedCount]}),t.lastActivityAt&&(0,Rt.jsx)("span",{children:new Date(t.lastActivityAt).toLocaleTimeString()})]}),p&&(0,Rt.jsx)("div",{className:"cp-task-card-compact-preview",children:p})]}),(0,Rt.jsx)("span",{className:"cp-task-card-compact-chevron",children:"\u203A"})]})}let h=["cp-task-card",e?"selected":"",g?"error":""].filter(Boolean).join(" ");return(0,Rt.jsxs)("div",{className:h,onClick:()=>l(t.endpoint.id),children:[(0,Rt.jsxs)("div",{className:"cp-task-header",children:[(0,Rt.jsx)("div",{className:"cp-task-header-top",children:(0,Rt.jsxs)("div",{className:"cp-task-header-left",children:[(0,Rt.jsx)("input",{type:"checkbox",checked:e,onClick:p=>p.stopPropagation(),onChange:p=>n(t.endpoint.id,p.target.checked),style:{width:16,height:16,cursor:"pointer"}}),(0,Rt.jsxs)("div",{className:"cp-task-header-info",children:[(0,Rt.jsx)("div",{className:"cp-task-name",children:t.endpoint.name}),(0,Rt.jsx)("a",{className:"cp-task-url",href:t.endpoint.baseUrl,target:"_blank",rel:"noreferrer noopener",title:"Open in new tab",onClick:p=>p.stopPropagation(),children:t.endpoint.baseUrl})]})]})}),(0,Rt.jsxs)("div",{className:"cp-task-actions-row",children:[(0,Rt.jsxs)("div",{className:"cp-task-actions",children:[(0,Rt.jsx)("button",{className:"btn danger",onClick:p=>{p.stopPropagation(),i(t.endpoint.id)},children:"Cancel"}),(0,Rt.jsx)("button",{className:"btn",onClick:p=>{p.stopPropagation(),r(t.endpoint.id)},children:"Refresh"}),t.lastFailed?(0,Rt.jsx)("button",{className:"btn",onClick:p=>{p.stopPropagation(),a(t.endpoint.id)},children:"Retry"}):null]}),(0,Rt.jsxs)("div",{className:"cp-task-meta",children:[(0,Rt.jsx)("span",{className:`cp-conn ${t.connection}`,children:d}),(0,Rt.jsxs)("span",{className:"cp-queue",children:["queue ",t.queuedCount]}),t.lastActivityAt?(0,Rt.jsx)("span",{className:"cp-activity",children:new Date(t.lastActivityAt).toLocaleTimeString()}):null]})]})]}),t.connection==="connected"&&t.statusText?(0,Rt.jsx)("div",{className:"cp-task-notice",children:t.statusText}):null,t.lastError?(0,Rt.jsxs)("div",{className:"cp-task-error",children:["Last error: ",t.lastError]}):null,(0,Rt.jsx)(Jr,{feed:t.feed,tools:t.tools,onOpenDiff:s}),!f&&(0,Rt.jsx)("div",{className:"cp-task-input",onClick:p=>p.stopPropagation(),children:(0,Rt.jsx)(ni,{value:c,textareaClassName:"cp-task-textarea",placeholder:"Send prompt...",onChange:p=>m(p.target.value),onKeyDown:C,onSubmit:x,submitClassName:"btn primary",submitDisabled:!c.trim()||t.connection!=="connected",submitLabel:"Send"})})]})};var Yi=G(le(),1);var tl=G(it(),1);var gx=({open:t,onClose:e,onLoad:n,onSave:l})=>{let[i,r]=(0,Yi.useState)(""),[a,o]=(0,Yi.useState)(!1),[s,u]=(0,Yi.useState)(!1),[f,c]=(0,Yi.useState)(null);if((0,Yi.useEffect)(()=>{t&&(o(!0),u(!1),c(null),(async()=>{try{let d=await n();r(d)}catch(d){c(d instanceof Error?d.message:"Failed to load JSON")}finally{o(!1)}})())},[n,t]),!t)return null;let m=async()=>{u(!0),c(null);try{await l(i),e()}catch(d){c(d instanceof Error?d.message:"Save failed")}finally{u(!1)}};return(0,tl.jsx)(Te,{onClose:e,children:(0,tl.jsx)(Ee,{title:"Edit registry JSON",onClose:e,footer:(0,tl.jsxs)("div",{className:"cp-modal-actions",children:[(0,tl.jsx)("button",{className:"btn",onClick:e,disabled:s||a,children:"Cancel"}),(0,tl.jsx)("button",{className:"btn primary",onClick:()=>void m(),disabled:s||a,children:s?"Saving\u2026":"Save"})]}),children:(0,tl.jsxs)("div",{className:"cp-modal-body",children:[(0,tl.jsx)("textarea",{className:"cp-textarea",value:i,onChange:d=>r(d.target.value),rows:12,placeholder:a?"Loading\u2026":"",disabled:a}),f?(0,tl.jsx)("div",{className:"cp-error",style:{whiteSpace:"pre-wrap"},children:f}):null]})})})};var Ge=G(le(),1);function $r(t){return typeof t=="object"&&t!==null}function yx(t){return $r(t)?typeof t.toolCallId=="string"&&typeof t.title=="string"&&typeof t.status=="string"&&typeof t.kind=="string":!1}function dp(t){if(!$r(t))return!1;let e=t.role,n=t.type,l=t.text;return(e==="user"||e==="assistant")&&n==="text"&&typeof l=="string"}function vx(t){if(!$r(t))return!1;let e=t.kind;if(e==="message"){let n=t.message;return dp(n)}return e==="tool"?typeof t.toolCallId=="string"&&t.toolCallId.length>0:!1}function _N(t){let e={};if(t.sessionUpdate==="replace_history"&&(Array.isArray(t.feed)&&(e.feed=t.feed.filter(vx)),Array.isArray(t.tools)&&(e.tools=t.tools.filter(yx)),Array.isArray(t.messages)&&(e.messages=t.messages.filter(dp)),e.feed||e.tools||e.messages))return e;let n=t?._meta;if(!$r(n))return null;let l=n.codely;if(!$r(l))return null;let i=l.ui;if(!$r(i)||i.action!=="replace_history")return null;let r=i.feed;Array.isArray(r)&&(e.feed=r.filter(vx));let a=i.tools;Array.isArray(a)&&(e.tools=a.filter(yx));let o=i.messages;return Array.isArray(o)&&(e.messages=o.filter(dp)),!e.feed&&!e.tools&&!e.messages?null:e}function zN(t){let e=t.toolCall?.rawInput;return typeof e=="object"&&e!==null&&e.hookTrust===!0}function LN(t){if(zN(t))return{outcome:{outcome:"cancelled"}};let e=t.options.find(n=>n.kind==="allow_always")??t.options.find(n=>n.kind==="allow_once")??t.options[0];return e?{outcome:{outcome:"selected",optionId:e.optionId}}:{outcome:{outcome:"cancelled"}}}var Fu=class{constructor(e,n){this.wsUrl=e;this.onStateChange=n}ws=null;rpc=null;sessionId=null;reconnectTimer=null;reconnectAttempts=0;disposed=!1;currentTurnId=0;activeTurnId=null;sessionReadyPromise=null;sessionReadyResolve=null;sessionReadyReject=null;baseStatusText=null;externalStatusText=null;state={connection:"disconnected",sessionId:null,statusText:null,feed:[],tools:[],isBusy:!1,lastActivityAt:null};connect(){if(this.disposed||this.ws&&this.ws.readyState<=WebSocket.OPEN)return;this.clearReconnect(),this.resetSessionReadyPromise(),this.externalStatusText=null,this.updateState({connection:"connecting",sessionId:null,statusText:null});let e=new WebSocket(this.wsUrl);this.ws=e,e.addEventListener("open",()=>{if(this.ws!==e||this.disposed)return;this.reconnectAttempts=0,this.updateState({connection:"connected"});let n=new Zr(e);this.rpc=n,n.on("session/update",l=>{let i=l;return i?.update&&this.onSessionUpdate(i.update),null}),n.on("codely/external_load_diagnostics",l=>(this.setExternalStatusText(Vu(l)),null)),n.on("session/request_permission",l=>LN(l)),n.on("_session/request_input",()=>({outcome:"cancelled"})),e.addEventListener("message",l=>{if(!(this.ws!==e||this.disposed))try{let i=JSON.parse(String(l.data));n.handleMessage(i)}catch{}}),this.bootstrap(n)}),e.addEventListener("close",()=>{this.ws===e&&(this.rpc=null,this.sessionId=null,this.activeTurnId=null,this.ws=null,this.sessionReadyReject?.(new Error("Disconnected")),this.clearSessionReadyHandlers(),this.updateState({connection:"disconnected",sessionId:null,statusText:"Disconnected.",isBusy:!1}),this.scheduleReconnect())}),e.addEventListener("error",()=>{this.ws===e&&(this.rpc=null,this.sessionId=null,this.activeTurnId=null,this.ws=null,this.sessionReadyReject?.(new Error("Connection error")),this.clearSessionReadyHandlers(),this.updateState({connection:"disconnected",sessionId:null,statusText:"Connection error.",isBusy:!1}),this.scheduleReconnect())})}dispose(){this.disposed=!0,this.clearReconnect(),this.closeWs("dispose")}forceClose(){this.closeWs("force")}forceRefresh(){if(this.disposed)return;this.clearReconnect(),this.externalStatusText=null,this.currentTurnId=0,this.activeTurnId=null,this.updateState({feed:[],tools:[],isBusy:!1,lastActivityAt:null,statusText:"Refreshing\u2026"});let e=this.ws;if(this.ws=null,this.rpc=null,this.sessionId=null,this.sessionReadyReject?.(new Error("Refreshed")),this.clearSessionReadyHandlers(),e)try{e.close()}catch{}this.connect()}cancel(){let e=this.rpc;if(!(!e||!this.sessionId))try{e.notify("session/cancel",{sessionId:this.sessionId})}catch{}}async sendPrompt(e){(!this.rpc||!this.ws||!this.sessionId)&&(this.connect(),await this.waitForSessionReady(3e4));let n=this.rpc;if(!n||!this.ws||!this.sessionId)throw this.updateState({statusText:"Not connected."}),new Error("Not connected");if(this.state.isBusy)throw this.updateState({statusText:"Session busy."}),new Error("Session busy");let l=this.ws;this.appendChunkToFeed({role:"user",type:"text",chunk:e}),this.currentTurnId+=1,this.activeTurnId=this.currentTurnId,this.updateState({isBusy:!0}),this.touchActivity();let i=null,r=new Promise((a,o)=>{i=()=>o(new Error("Connection closed")),l.addEventListener("close",i),l.addEventListener("error",i)});try{let a=await Promise.race([n.request("session/prompt",{sessionId:this.sessionId,prompt:[{type:"text",text:e}]}),r]);this.markAssistantCompleted(),a?.stopReason==="cancelled"&&this.updateState({statusText:"Cancelled."})}catch(a){throw this.markAssistantCompleted(),this.updateState({statusText:`Request failed: ${String(a?.message??a)}`}),a}finally{i&&(l.removeEventListener("close",i),l.removeEventListener("error",i))}}getState(){return this.state}async bootstrap(e){try{((await e.request("initialize",{protocolVersion:1,clientCapabilities:{fs:{readTextFile:!1,writeTextFile:!1},terminal:!1},clientInfo:{name:"codely-control-plane",version:"0.0.0",title:"Codely Control Plane"}}))?.authMethods??[]).length>0&&this.updateState({statusText:"Authentication required (unsupported)."});let i=await e.request("session/new",{cwd:"",mcpServers:[]});this.sessionId=i.sessionId,this.updateState({sessionId:i.sessionId,statusText:null}),this.touchActivity(),this.sessionReadyResolve?.(),this.clearSessionReadyHandlers()}catch(n){this.updateState({statusText:`Failed to initialize ACP: ${String(n?.message??n)}`}),this.sessionReadyReject?.(n instanceof Error?n:new Error(String(n))),this.clearSessionReadyHandlers(),this.closeWs("bootstrap failed")}}closeWs(e){if(this.ws)try{this.ws.readyState<=WebSocket.OPEN&&this.ws.close()}catch{}this.ws=null,this.rpc=null,this.sessionId=null,this.sessionReadyReject?.(new Error(e??"closed")),this.clearSessionReadyHandlers(),e&&this.updateState({connection:"disconnected",sessionId:null,statusText:e==="force"?"Force cancelled.":this.state.statusText,isBusy:!1})}resetSessionReadyPromise(){this.sessionReadyReject?.(new Error("Replaced by new connection")),this.clearSessionReadyHandlers(),this.sessionReadyPromise=new Promise((e,n)=>{this.sessionReadyResolve=e,this.sessionReadyReject=n})}clearSessionReadyHandlers(){this.sessionReadyResolve=null,this.sessionReadyReject=null}async waitForSessionReady(e){let n=this.sessionReadyPromise;if(!n)throw new Error("Not connected");let l=null,i=new Promise((r,a)=>{l=window.setTimeout(()=>{a(new Error("Session not ready"))},e)});try{await Promise.race([n,i])}finally{l!==null&&clearTimeout(l)}}scheduleReconnect(){if(this.disposed||this.reconnectTimer!==null)return;let e=Math.min(1e3*2**this.reconnectAttempts,5e3);this.reconnectAttempts+=1,this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.connect()},e)}clearReconnect(){this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}updateState(e){Object.hasOwn(e,"statusText")&&(this.baseStatusText=e.statusText??null);let n=e.connection??this.state.connection;this.state={...this.state,...e,statusText:this.resolveVisibleStatusText(n)},this.onStateChange?.(this.state)}setExternalStatusText(e){this.externalStatusText=e,this.updateState({})}resolveVisibleStatusText(e){return e==="connected"?this.externalStatusText??this.baseStatusText:this.baseStatusText??this.externalStatusText}touchActivity(){this.updateState({lastActivityAt:Date.now()})}appendFeed(e){this.updateState({feed:[...this.state.feed,e]})}appendChunkToFeed(e){let{role:n,type:l,chunk:i}=e;if(!i)return;let r=n==="assistant"?this.activeTurnId??void 0:void 0,a=this.state.feed.map(u=>u.kind==="message"&&!u.message.completed&&(u.message.role!==n||u.message.type!==l)?{...u,message:{...u.message,completed:!0}}:u),o=a[a.length-1];if(o&&o.kind==="message"&&o.message.role===n&&o.message.type===l&&!o.message.completed){let u={kind:"message",message:{...o.message,text:(o.message.text??"")+i}};this.updateState({feed:[...a.slice(0,-1),u]});return}let s={kind:"message",message:{id:`${n}_${l}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:n,type:l,time:zn(),text:i,completed:n==="user",...r!==void 0?{turnId:r}:{}}};this.updateState({feed:[...a,s]})}markAssistantCompleted(){let e=this.activeTurnId;if(e===null)return;let n=this.state.feed.map(l=>l.kind!=="message"||l.message.role!=="assistant"||l.message.turnId!==e||l.message.completed?l:{...l,message:{...l.message,completed:!0}});this.activeTurnId=null,this.updateState({feed:n,isBusy:!1})}onSessionUpdate(e){this.touchActivity();let n=_N(e);if(n){if(n.tools?this.updateState({tools:n.tools}):this.updateState({tools:[]}),n.feed){let l=n.feed.map(i=>{if(i.kind==="tool")return{kind:"tool",toolCallId:i.toolCallId,time:zn()};let r=i.message;return{kind:"message",message:{id:`rehydrate_${r.role}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:r.role,type:"text",time:zn(),text:r.text,completed:!0}}});this.updateState({feed:l})}else if(n.messages){let l=n.messages.map(i=>({kind:"message",message:{id:`rehydrate_${i.role}_${Date.now()}_${Math.random().toString(16).slice(2)}`,role:i.role,type:"text",time:zn(),text:i.text,completed:!0}}));this.updateState({feed:l})}else this.updateState({feed:[]});this.activeTurnId=null,this.updateState({isBusy:!1});return}if(e.sessionUpdate==="agent_message_chunk"){e.content?.type==="text"&&this.appendChunkToFeed({role:"assistant",type:"text",chunk:e.content.text??""});return}if(e.sessionUpdate==="agent_thought_chunk"){e.content?.type==="text"&&this.appendChunkToFeed({role:"assistant",type:"thought",chunk:e.content.text??""});return}if(e.sessionUpdate==="tool_call"){let l={toolCallId:e.toolCallId,title:e.title,status:e.status,kind:e.kind,content:e.content,rawInput:e.rawInput,locations:e.locations};this.updateState({tools:[...this.state.tools,l]});let i=this.state.feed.map(r=>r.kind==="message"&&!r.message.completed?{...r,message:{...r.message,completed:!0}}:r);this.updateState({feed:i}),this.appendFeed({kind:"tool",toolCallId:l.toolCallId,time:zn()});return}if(e.sessionUpdate==="tool_call_update"){let l=this.state.tools.map(i=>i.toolCallId===e.toolCallId?{...i,...e.title?{title:e.title}:{},...e.status?{status:e.status}:{},...e.kind?{kind:e.kind}:{},...e.content?{content:e.content}:{}}:i);this.updateState({tools:l});return}}};function UN(){return{maxRetries:3,backoffMs:1e3}}var Qu=class{constructor(e,n){this.handler=e;this.retryPolicy=n?.retryPolicy??UN(),this.onChange=n?.onChange}queue=[];running=null;lastError=null;lastFailed=null;retryTimer=null;retryPolicy;onChange;enqueue(e){let n={id:`${Date.now()}_${Math.random().toString(16).slice(2)}`,prompt:e,attempts:0};return this.queue.push(n),this.emit(),this.runNext(),n}clear(){this.queue=[],this.lastError=null,this.lastFailed=null,this.retryTimer!==null&&(clearTimeout(this.retryTimer),this.retryTimer=null),this.emit()}retryLastFailed(){if(!this.lastFailed)return;let e={...this.lastFailed,attempts:0};this.lastFailed=null,this.queue.unshift(e),this.emit(),this.runNext()}getSnapshot(){return{queuedCount:this.queue.length,running:!!this.running,lastError:this.lastError,lastFailed:this.lastFailed}}emit(){this.onChange?.(this.getSnapshot())}async runNext(){if(this.running||this.retryTimer!==null)return;let e=this.queue.shift();if(!e){this.emit();return}this.running=e,this.emit();try{await this.handler(e.prompt),this.running=null,this.lastError=null,this.emit(),this.runNext()}catch(n){if(this.running=null,this.lastError=n instanceof Error?n.message:String(n),e.attempts+=1,e.attempts<=this.retryPolicy.maxRetries){this.retryTimer=window.setTimeout(()=>{this.retryTimer=null,this.queue.unshift(e),this.emit(),this.runNext()},this.retryPolicy.backoffMs),this.emit();return}this.lastFailed={...e},this.emit()}}};function BN(t){let e=t.startsWith("http")?t:`${window.location.protocol}//${window.location.host}${t}`,n=new URL(e);return n.protocol=n.protocol==="https:"?"wss:":"ws:",n.pathname=n.pathname.replace(/\/$/,""),n.hash="",n.search="",n.toString()}function HN(t,e){return`${t}/ws/${encodeURIComponent(e)}`}function bx(t,e){let n=(0,Ge.useMemo)(()=>BN(e),[e]),l=(0,Ge.useRef)(new Map),[i,r]=(0,Ge.useState)({}),a=(0,Ge.useCallback)(d=>{let g={endpoint:d.endpoint,connection:d.clientState.connection,statusText:d.clientState.statusText,feed:d.clientState.feed,tools:d.clientState.tools,isBusy:d.clientState.isBusy,queuedCount:d.schedulerState.queuedCount,lastError:d.schedulerState.lastError,lastFailed:d.schedulerState.lastFailed?{prompt:d.schedulerState.lastFailed.prompt,attempts:d.schedulerState.lastFailed.attempts}:null,lastActivityAt:d.clientState.lastActivityAt};r(x=>({...x,[d.endpoint.id]:g}))},[]);(0,Ge.useEffect)(()=>{let d=l.current,g=new Set(t.map(x=>x.id));for(let x of t){let C=d.get(x.id);if(C){C.endpoint=x,a(C);continue}let h=HN(n,x.id),p=new Fu(h,E=>{let M=d.get(x.id);M&&(M.clientState=E,a(M))}),y=new Qu(async E=>p.sendPrompt(E),{retryPolicy:{maxRetries:3,backoffMs:1e3},onChange:E=>{let M=d.get(x.id);M&&(M.schedulerState=E,a(M))}}),T=p.getState(),N={endpoint:x,client:p,scheduler:y,clientState:T,schedulerState:y.getSnapshot()};d.set(x.id,N),p.connect(),a(N)}for(let[x,C]of d.entries())g.has(x)||(C.client.dispose(),d.delete(x),r(h=>{let p={...h};return delete p[x],p}))},[t,a,n]);let o=(0,Ge.useCallback)((d,g)=>{let x=g.length>0?g:t.map(C=>C.id);for(let C of x){let h=l.current.get(C);h&&h.scheduler.enqueue(d)}},[t]),s=(0,Ge.useCallback)(d=>{let g=l.current.get(d);g&&(g.scheduler.clear(),g.client.cancel(),a(g))},[a]),u=(0,Ge.useCallback)(d=>{let g=l.current.get(d);g&&(g.scheduler.clear(),g.client.cancel(),g.client.forceRefresh(),a(g))},[a]),f=(0,Ge.useCallback)(d=>{let g=l.current.get(d);g&&(g.scheduler.retryLastFailed(),a(g))},[a]),c=(0,Ge.useCallback)((d,g)=>{let x=l.current.get(d);x&&x.scheduler.enqueue(g)},[]),m=(0,Ge.useMemo)(()=>t.map(d=>i[d.id]).filter(Boolean),[t,i]);return{stateById:i,ordered:m,broadcastPrompt:o,forceCancel:s,forceRefresh:u,retryEndpoint:f,sendToEndpoint:c}}var xx=G(le(),1);var me=G(it(),1);var kx=({open:t,onClose:e,state:n,onSendPrompt:l,onForceCancel:i,onForceRefresh:r,onRetry:a,onOpenDiff:o})=>{let[s,u]=(0,xx.useState)("");if(!t)return null;let f=()=>{if(n.connection!=="connected")return;let d=s.trim();d&&(l(n.endpoint.id,d),u(""))},c=d=>{d.key==="Enter"&&d.ctrlKey&&(d.preventDefault(),f())},m=n.connection==="connected"?n.isBusy?"busy":"idle":"disconnected";return(0,me.jsx)(Te,{onClose:e,children:(0,me.jsx)(Ee,{title:n.endpoint.name,onClose:e,footer:null,children:(0,me.jsxs)("div",{className:"cp-modal-body",style:{height:"80vh",display:"flex",flexDirection:"column",padding:0},children:[(0,me.jsxs)("div",{className:"cp-task-header",style:{borderBottom:"1px solid var(--border)",padding:"12px"},children:[(0,me.jsxs)("div",{children:[(0,me.jsx)("div",{className:"cp-task-url",children:n.endpoint.baseUrl}),(0,me.jsxs)("div",{className:"cp-task-meta",style:{flexDirection:"row",gap:12,marginTop:4},children:[(0,me.jsx)("span",{className:`cp-conn ${n.connection}`,children:m}),(0,me.jsxs)("span",{className:"cp-queue",children:["queue ",n.queuedCount]})]})]}),(0,me.jsxs)("div",{className:"cp-task-actions",style:{flexDirection:"row"},children:[(0,me.jsx)("button",{className:"btn danger",onClick:()=>i(n.endpoint.id),children:"Cancel"}),(0,me.jsx)("button",{className:"btn",onClick:()=>r(n.endpoint.id),children:"Refresh"}),n.lastFailed&&(0,me.jsx)("button",{className:"btn",onClick:()=>a(n.endpoint.id),children:"Retry"})]})]}),n.connection==="connected"&&n.statusText&&(0,me.jsx)("div",{className:"cp-task-notice",children:n.statusText}),n.lastError&&(0,me.jsxs)("div",{className:"cp-task-error",children:["Last error: ",n.lastError]}),(0,me.jsx)("div",{style:{flex:1,overflow:"hidden",display:"flex",flexDirection:"column"},children:(0,me.jsx)(Jr,{feed:n.feed,tools:n.tools,onOpenDiff:o})}),(0,me.jsx)("div",{className:"cp-task-input",children:(0,me.jsx)(ni,{value:s,textareaClassName:"cp-task-textarea",placeholder:"Send prompt...",onChange:d=>u(d.target.value),onKeyDown:c,onSubmit:f,submitClassName:"btn primary",submitDisabled:!s.trim()||n.connection!=="connected",submitLabel:"Send"})})]})})})};var A=G(it(),1);var mp=8,qN=({open:t,onClose:e,endpoints:n,selectedIds:l,onToggle:i,onSelectAll:r,onClearAll:a,onSend:o})=>{let[s,u]=(0,ft.useState)("");if((0,ft.useEffect)(()=>{t||u("")},[t]),!t)return null;let f=l.size>0?l.size:n.length;return(0,A.jsx)("div",{className:"cp-broadcast-modal-backdrop",onClick:e,children:(0,A.jsxs)("div",{className:"cp-broadcast-modal",onClick:c=>c.stopPropagation(),children:[(0,A.jsxs)("div",{className:"cp-broadcast-modal-header",children:[(0,A.jsx)("div",{className:"cp-broadcast-modal-title",children:"Broadcast Prompt"}),(0,A.jsx)("button",{className:"cp-broadcast-modal-close",onClick:e,children:"\u2715"})]}),(0,A.jsxs)("div",{className:"cp-broadcast-modal-body",children:[(0,A.jsxs)("div",{className:"cp-broadcast-modal-left",children:[(0,A.jsx)("div",{className:"cp-broadcast-modal-label",children:"Prompt"}),(0,A.jsx)("textarea",{className:"cp-broadcast-modal-textarea",placeholder:"Type a prompt to broadcast to selected workers...",value:s,onChange:c=>u(c.target.value),onKeyDown:c=>{c.key==="Enter"&&c.ctrlKey&&(c.preventDefault(),s.trim()&&n.length>0&&(o(s.trim()),e()))},autoFocus:!0}),(0,A.jsxs)("div",{className:"cp-broadcast-modal-footer",children:[(0,A.jsxs)("span",{className:"cp-broadcast-modal-target",children:["\u2192 ",f," worker",f!==1?"s":""]}),(0,A.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,A.jsx)("button",{className:"btn",onClick:e,children:"Cancel"}),(0,A.jsx)("button",{className:"btn primary",disabled:!s.trim()||n.length===0,onClick:()=>{o(s.trim()),e()},children:"Broadcast"})]})]})]}),(0,A.jsxs)("div",{className:"cp-broadcast-modal-right",children:[(0,A.jsxs)("div",{className:"cp-broadcast-modal-label",children:["Target Workers",(0,A.jsxs)("div",{className:"cp-broadcast-modal-node-actions",children:[(0,A.jsx)("button",{className:"btn",onClick:r,children:"All"}),(0,A.jsx)("button",{className:"btn",onClick:a,children:"None"})]})]}),(0,A.jsx)("div",{className:"cp-broadcast-modal-node-list",children:n.map(c=>(0,A.jsxs)("label",{className:"cp-broadcast-modal-node-item",children:[(0,A.jsx)("input",{type:"checkbox",checked:l.has(c.id),onChange:m=>i(c.id,m.target.checked)}),(0,A.jsxs)("div",{className:"cp-broadcast-modal-node-info",children:[(0,A.jsx)("span",{className:"cp-broadcast-modal-node-name",children:c.name}),(0,A.jsx)("span",{className:"cp-broadcast-modal-node-url",children:c.baseUrl}),c.tags.length>0&&(0,A.jsx)("span",{className:"cp-broadcast-modal-node-tags",children:c.tags.join(", ")})]})]},c.id))})]})]})]})})},Sx=({config:t})=>{let e=tu(t),n=(0,ft.useMemo)(()=>fx(e),[e]),[l,i]=(0,ft.useState)([]),[r,a]=(0,ft.useState)({}),[o,s]=(0,ft.useState)(!1),[u,f]=(0,ft.useState)(null),[c,m]=(0,ft.useState)(""),[d,g]=(0,ft.useState)("all"),[x,C]=(0,ft.useState)(1),[h,p]=(0,ft.useState)(!1),[y,T]=(0,ft.useState)(null),[N,E]=(0,ft.useState)(new Set),[M,z]=(0,ft.useState)(null),[Y,w]=(0,ft.useState)(!1),[P,q]=(0,ft.useState)(!1),[B,X]=(0,ft.useState)(!1),[K,dt]=(0,ft.useState)(!0),[kt,Qt]=(0,ft.useState)(!1),[L,k]=(0,ft.useState)(null),[Tt,Mt]=(0,ft.useState)(!1);(0,ft.useEffect)(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;let D=window.matchMedia("(max-width: 768px)"),St=_t=>Mt(_t.matches);return D.addEventListener("change",St),Mt(D.matches),()=>D.removeEventListener("change",St)},[]);let[S,ot]=(0,ft.useState)("workers"),[pe,he]=(0,ft.useState)("list"),[Ae,ht]=(0,ft.useState)(null),[se,Pt]=(0,ft.useState)(""),[ge,j]=(0,ft.useState)(""),{ordered:F,broadcastPrompt:Z,forceCancel:W,forceRefresh:lt,retryEndpoint:st,sendToEndpoint:Dt}=bx(l,e),Ne=(0,ft.useMemo)(()=>L?F.find(D=>D.endpoint.id===L):null,[L,F]),Vt=(0,ft.useMemo)(()=>Ae?F.find(D=>D.endpoint.id===Ae):null,[Ae,F]),It=(0,ft.useCallback)(async()=>{s(!0),f(null);try{let D=await n.list();i(D)}catch(D){f(D instanceof Error?D.message:"Failed to load endpoints")}finally{s(!1)}},[n]);(0,ft.useEffect)(()=>{It()},[It]);let Xe=(0,ft.useMemo)(()=>{let D=c.trim().toLowerCase();return l.filter(St=>{if(D&&!`${St.name} ${St.baseUrl} ${St.tags.join(" ")}`.toLowerCase().includes(D))return!1;if(d==="all")return!0;let _t=r[St.id];return _t?d==="healthy"?_t.ok:!_t.ok:!1})},[l,c,d,r]),Le=Math.max(1,Math.ceil(Xe.length/mp));(0,ft.useEffect)(()=>{x>Le&&C(Le)},[x,Le]),(0,ft.useEffect)(()=>{E(D=>{let St=new Set;for(let _t of D)l.some(ee=>ee.id===_t)&&St.add(_t);return St})},[l]);let en=(0,ft.useMemo)(()=>{let D=(x-1)*mp;return Xe.slice(D,D+mp)},[Xe,x]),Pe=D=>{T(D),p(!0)},R=async D=>{if(y){let _t=await n.update(y.id,D);i(ee=>ee.map(yp=>yp.id===_t.id?_t:yp)),T(_t);return}let St=await n.create(D);i(_t=>[..._t,St])},H=async D=>{window.confirm(`Delete endpoint "${D.name}"?`)&&(await n.remove(D.id),i(_t=>_t.filter(ee=>ee.id!==D.id)),a(_t=>{let ee={..._t};return delete ee[D.id],ee}))},et=async D=>{a(St=>({...St,[D.id]:null}));try{let St=await n.health(D.id);a(_t=>({..._t,[D.id]:St}))}catch(St){a(_t=>({..._t,[D.id]:{ok:!1,error:St instanceof Error?St.message:"Health check failed",durationMs:0}}))}},rt=(D,St)=>{E(_t=>{let ee=new Set(_t);return St?ee.add(D):ee.delete(D),ee})},Et=()=>E(new Set(l.map(D=>D.id))),be=()=>E(new Set),v=D=>{let St=N.size>0?Array.from(N):[];Z(D,St)},O=()=>{let D=ge.trim();if(!D)return;let St=N.size>0?Array.from(N):[];Z(D,St),j("")},I=async D=>{for(let St of D)await n.create(St);await It()},Q=(0,ft.useCallback)(async()=>await n.getRawRegistryJson(),[n]),J=(0,ft.useCallback)(async D=>{await n.saveRawRegistryJson(D),await It()},[n,It]),Gt=(0,ft.useCallback)((D,St)=>{E(_t=>{let ee=new Set(_t);return St?ee.add(D):ee.delete(D),ee})},[]),Ct=D=>{ht(D),Pt(""),he("detail")},Ut=()=>{he("list"),ht(null)},kn=()=>{if(!Vt||Vt.connection!=="connected")return;let D=se.trim();D&&(Dt(Vt.endpoint.id,D),Pt(""))},qe=N.size>0?`${N.size} of ${l.length} selected`:`All ${l.length} workers`;return(0,A.jsxs)("div",{className:"app control-plane",children:[(0,A.jsx)(qN,{open:kt,onClose:()=>Qt(!1),endpoints:l,selectedIds:N,onToggle:rt,onSelectAll:Et,onClearAll:be,onSend:v}),!Tt&&(0,A.jsxs)("div",{className:"cp-header cp-header-pc",children:[(0,A.jsxs)("div",{children:[(0,A.jsx)("h1",{children:"Control Plane"}),(0,A.jsxs)("div",{className:"cp-subtitle",children:[l.length," endpoints registered"]})]}),(0,A.jsx)("div",{className:"cp-header-actions",children:(0,A.jsxs)("button",{className:"btn",onClick:()=>w(!Y),children:[Y?"Hide":"Show"," Endpoints"]})})]}),Tt&&(0,A.jsx)("div",{className:"cp-header cp-header-mobile",children:pe==="detail"&&Vt?(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)("button",{className:"cp-mobile-back-btn",onClick:Ut,children:"\u2039 Back"}),(0,A.jsx)("span",{className:"cp-mobile-detail-title",style:{flex:1,minWidth:0},children:Vt.endpoint.name}),(0,A.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,A.jsx)("button",{className:"btn danger",onClick:()=>W(Vt.endpoint.id),children:"Cancel"}),(0,A.jsx)("button",{className:"btn",onClick:()=>lt(Vt.endpoint.id),children:"Refresh"})]})]}):(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:"cp-mobile-header-title",children:S==="broadcast"?"Broadcast":S==="endpoints"?"Endpoints":"Control Plane"}),(0,A.jsx)("div",{className:"cp-subtitle",children:S==="broadcast"?N.size>0?`${N.size} of ${l.length} selected`:`${l.length} workers`:`${l.length} workers`})]})}),(0,A.jsxs)("div",{className:"cp-body",children:[(0,A.jsxs)("div",{className:"cp-sidebar",children:[(0,A.jsxs)("div",{className:"cp-sidebar-broadcast-section",children:[(0,A.jsx)("div",{className:"cp-sidebar-section-label",children:"Broadcast"}),(0,A.jsx)("div",{className:"cp-sidebar-broadcast-target",children:qe}),(0,A.jsx)("button",{className:"btn primary cp-sidebar-broadcast-btn",onClick:()=>Qt(!0),disabled:l.length===0,children:"Broadcast\u2026"})]}),(0,A.jsxs)("div",{className:"cp-sidebar-section-label cp-sidebar-workers-label",children:["Workers",(0,A.jsx)("span",{className:"cp-sidebar-workers-count",children:F.length})]}),(0,A.jsx)("div",{className:"cp-sidebar-workers",children:F.length===0?(0,A.jsx)("div",{className:"cp-empty",style:{padding:"8px 12px"},children:"No workers yet."}):F.map(D=>{let St=D.connection==="connected"?D.isBusy?"busy":"idle":"disc",_t=L===D.endpoint.id;return(0,A.jsxs)("div",{className:`cp-sidebar-worker-item${_t?" active":""}`,onClick:()=>k(D.endpoint.id),children:[(0,A.jsx)("input",{type:"checkbox","aria-hidden":"true",tabIndex:-1,checked:N.has(D.endpoint.id),onClick:ee=>ee.stopPropagation(),onChange:ee=>Gt(D.endpoint.id,ee.target.checked)}),(0,A.jsxs)("div",{className:"cp-sidebar-worker-info",children:[(0,A.jsx)("span",{className:"cp-sidebar-worker-name",children:D.endpoint.name}),(0,A.jsx)("span",{className:"cp-sidebar-worker-url",children:D.endpoint.baseUrl}),D.endpoint.tags.length>0&&(0,A.jsx)("span",{className:"cp-sidebar-worker-tags",children:D.endpoint.tags.join(" \xB7 ")})]}),(0,A.jsx)("span",{className:`cp-conn ${D.connection} cp-sidebar-worker-status`,children:St})]},D.endpoint.id)})})]}),(0,A.jsx)("div",{className:"cp-main",children:(0,A.jsxs)("div",{className:"cp-workers",children:[(0,A.jsxs)("div",{className:"cp-workers-header",children:[(0,A.jsx)("span",{children:"Workers"}),(0,A.jsx)("button",{className:"btn",onClick:()=>dt(D=>!D),title:K?"Show input boxes":"Hide input boxes",children:K?"Expand":"Compact"})]}),F.length===0?(0,A.jsx)("div",{className:"cp-empty",style:{padding:"12px 16px"},children:"No workers yet. Add endpoints from the Endpoints panel."}):(0,A.jsx)("div",{className:"cp-worker-grid",children:F.map(D=>(0,A.jsx)(fp,{state:D,selected:N.has(D.endpoint.id),onSelect:Gt,onClick:k,onForceCancel:W,onForceRefresh:lt,onRetry:st,onSendPrompt:Dt,onOpenDiff:z,hideInput:K},D.endpoint.id))})]})}),S==="workers"&&pe==="list"&&(0,A.jsx)("div",{className:"cp-mobile-list",children:F.length===0?(0,A.jsx)("div",{className:"cp-empty",children:"No workers yet."}):F.map(D=>(0,A.jsx)(fp,{state:D,selected:N.has(D.endpoint.id),onSelect:Gt,onClick:Ct,onForceCancel:W,onForceRefresh:lt,onRetry:st,onSendPrompt:Dt,onOpenDiff:z,compact:!0},D.endpoint.id))}),S==="workers"&&pe==="detail"&&Vt&&(0,A.jsxs)("div",{className:"cp-mobile-detail",children:[Vt.lastError&&(0,A.jsxs)("div",{className:"cp-task-error",children:["Last error: ",Vt.lastError]}),(0,A.jsx)("div",{className:"cp-mobile-detail-feed",children:(0,A.jsx)(Jr,{feed:Vt.feed,tools:Vt.tools,onOpenDiff:z})}),(0,A.jsx)("div",{className:"cp-mobile-detail-input",children:(0,A.jsx)(ni,{value:se,textareaClassName:"cp-mobile-detail-textarea",placeholder:"Send a prompt...",onChange:D=>Pt(D.target.value),onKeyDown:D=>{D.key==="Enter"&&D.ctrlKey&&(D.preventDefault(),kn())},onSubmit:kn,submitClassName:"btn primary cp-mobile-detail-send",submitDisabled:!se.trim()||Vt.connection!=="connected",submitLabel:"Send"})})]}),S==="broadcast"&&(0,A.jsxs)("div",{className:"cp-mobile-broadcast-tab",children:[(0,A.jsxs)("div",{className:"cp-broadcast-sheet-nodes",children:[(0,A.jsxs)("div",{className:"cp-broadcast-sheet-nodes-header",children:[(0,A.jsx)("span",{className:"cp-broadcast-sheet-subtitle",children:N.size>0?`${N.size} of ${l.length} selected`:`All ${l.length} workers`}),(0,A.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,A.jsx)("button",{className:"btn",onClick:Et,children:"All"}),(0,A.jsx)("button",{className:"btn",onClick:be,children:"None"})]})]}),(0,A.jsx)("div",{className:"cp-broadcast-sheet-node-list",children:l.map(D=>(0,A.jsxs)("label",{className:"cp-broadcast-sheet-node-item",children:[(0,A.jsx)("input",{type:"checkbox",checked:N.has(D.id),onChange:St=>rt(D.id,St.target.checked)}),(0,A.jsxs)("div",{className:"cp-broadcast-sheet-node-info",children:[(0,A.jsx)("span",{className:"cp-broadcast-sheet-node-name",children:D.name}),(0,A.jsx)("span",{className:"cp-broadcast-sheet-node-url",children:D.baseUrl})]})]},D.id))})]}),(0,A.jsxs)("div",{className:"cp-broadcast-sheet-compose",children:[(0,A.jsx)("textarea",{className:"cp-broadcast-sheet-textarea",placeholder:"Type a prompt...",value:ge,onChange:D=>j(D.target.value),onKeyDown:D=>{D.key==="Enter"&&D.ctrlKey&&(D.preventDefault(),O())}}),(0,A.jsx)("div",{className:"cp-broadcast-sheet-footer",children:(0,A.jsx)("button",{className:"btn primary",onClick:O,disabled:!ge.trim()||l.length===0,children:"Send"})})]})]}),S==="endpoints"&&(0,A.jsxs)("div",{className:"cp-mobile-endpoints-tab",children:[(0,A.jsxs)("div",{className:"cp-mobile-endpoints-toolbar",children:[(0,A.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,A.jsx)("button",{className:"btn",onClick:()=>q(!0),children:"Batch add"}),(0,A.jsx)("button",{className:"btn",onClick:()=>X(!0),children:"Edit JSON"}),(0,A.jsx)("button",{className:"btn primary",onClick:()=>Pe(null),children:"Add"})]}),(0,A.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,A.jsx)("input",{className:"cp-input",placeholder:"Search...",value:c,onChange:D=>m(D.target.value),style:{flex:1}}),(0,A.jsx)("button",{className:"btn",onClick:()=>void It(),children:"Refresh"})]})]}),u&&(0,A.jsx)("div",{className:"cp-error",style:{padding:"0 14px"},children:u}),o&&(0,A.jsx)("div",{className:"cp-loading",style:{padding:"0 14px"},children:"Loading..."}),(0,A.jsx)("div",{style:{flex:1,overflow:"auto",padding:"8px 14px"},children:(0,A.jsx)(cp,{endpoints:en,healthById:r,onEdit:Pe,onDelete:H,onRefreshHealth:et,selectedIds:N,onToggleSelect:rt})}),(0,A.jsxs)("div",{className:"cp-pagination",children:[(0,A.jsxs)("div",{className:"cp-page-info",children:[en.length," / ",Xe.length]}),(0,A.jsxs)("div",{className:"cp-page-controls",children:[(0,A.jsx)("button",{className:"btn",onClick:()=>C(D=>Math.max(1,D-1)),disabled:x<=1,children:"Prev"}),(0,A.jsxs)("span",{className:"cp-page-number",children:[x," / ",Le]}),(0,A.jsx)("button",{className:"btn",onClick:()=>C(D=>Math.min(Le,D+1)),disabled:x>=Le,children:"Next"})]})]})]})]}),(0,A.jsxs)("nav",{className:"cp-mobile-tab-bar",children:[(0,A.jsxs)("button",{className:`cp-mobile-tab${S==="workers"?" active":""}`,onClick:()=>{ot("workers"),he("list")},children:[(0,A.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,A.jsx)("rect",{x:"2",y:"3",width:"20",height:"14",rx:"2"}),(0,A.jsx)("path",{d:"M8 21h8M12 17v4"})]}),(0,A.jsx)("span",{children:"Workers"})]}),(0,A.jsxs)("button",{className:`cp-mobile-tab${S==="broadcast"?" active":""}`,onClick:()=>{ot("broadcast"),he("list")},children:[(0,A.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,A.jsx)("path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07A19.5 19.5 0 0 1 4.69 12a19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 3.62 1h3a2 2 0 0 1 2 1.72c.127.96.361 1.903.7 2.81a2 2 0 0 1-.45 2.11L7.91 8.69a16 16 0 0 0 6 6l.96-.96a2 2 0 0 1 2.11-.45c.907.339 1.85.573 2.81.7A2 2 0 0 1 22 16.92z"})}),(0,A.jsx)("span",{children:"Broadcast"}),N.size>0&&(0,A.jsx)("span",{className:"cp-mobile-tab-badge",children:N.size})]}),(0,A.jsxs)("button",{className:`cp-mobile-tab${S==="endpoints"?" active":""}`,onClick:()=>{ot("endpoints"),he("list")},children:[(0,A.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,A.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,A.jsx)("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14M4.93 4.93a10 10 0 0 0 0 14.14"})]}),(0,A.jsx)("span",{children:"Endpoints"})]})]}),Y&&(0,A.jsx)("div",{className:"cp-drawer-backdrop",onClick:()=>w(!1)}),(0,A.jsxs)("div",{className:`cp-drawer ${Y?"open":""}`,children:[(0,A.jsxs)("div",{className:"cp-drawer-header",children:[(0,A.jsx)("h2",{children:"Endpoints"}),(0,A.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,A.jsx)("button",{className:"btn",onClick:()=>w(!1),children:"Close"}),(0,A.jsx)("button",{className:"btn",onClick:()=>q(!0),children:"Batch add"}),(0,A.jsx)("button",{className:"btn",onClick:()=>X(!0),children:"Edit JSON"}),(0,A.jsx)("button",{className:"btn primary",onClick:()=>Pe(null),children:"Add"})]})]}),(0,A.jsxs)("div",{className:"cp-drawer-toolbar",children:[(0,A.jsx)("input",{className:"cp-input",placeholder:"Search...",value:c,onChange:D=>m(D.target.value)}),(0,A.jsxs)("select",{className:"cp-select",value:d,onChange:D=>g(D.target.value),children:[(0,A.jsx)("option",{value:"all",children:"All"}),(0,A.jsx)("option",{value:"healthy",children:"Healthy"}),(0,A.jsx)("option",{value:"unhealthy",children:"Unhealthy"})]}),(0,A.jsx)("button",{className:"btn",onClick:()=>void It(),children:"Refresh"})]}),u&&(0,A.jsx)("div",{className:"cp-error",children:u}),o&&(0,A.jsx)("div",{className:"cp-loading",children:"Loading..."}),(0,A.jsx)("div",{className:"cp-drawer-content",children:(0,A.jsx)(cp,{endpoints:en,healthById:r,onEdit:Pe,onDelete:H,onRefreshHealth:et,selectedIds:N,onToggleSelect:rt})}),(0,A.jsxs)("div",{className:"cp-pagination",children:[(0,A.jsxs)("div",{className:"cp-page-info",children:[en.length," / ",Xe.length]}),(0,A.jsxs)("div",{className:"cp-page-controls",children:[(0,A.jsx)("button",{className:"btn",onClick:()=>C(D=>Math.max(1,D-1)),disabled:x<=1,children:"Prev"}),(0,A.jsxs)("span",{className:"cp-page-number",children:[x," / ",Le]}),(0,A.jsx)("button",{className:"btn",onClick:()=>C(D=>Math.min(Le,D+1)),disabled:x>=Le,children:"Next"})]})]})]}),(0,A.jsx)(dx,{open:h,endpoint:y,onClose:()=>p(!1),onSave:R}),(0,A.jsx)(px,{open:P,onClose:()=>q(!1),onSubmit:I}),(0,A.jsx)(gx,{open:B,onClose:()=>X(!1),onLoad:Q,onSave:J}),Ne&&(0,A.jsx)(kx,{open:!!Ne,onClose:()=>k(null),state:Ne,onSendPrompt:Dt,onForceCancel:W,onForceRefresh:lt,onRetry:st,onOpenDiff:z}),M&&(0,A.jsx)(Pr,{title:M.title,oldText:M.oldText,newText:M.newText,onClose:()=>z(null)})]})};var $=G(le(),1),b=G(it(),1);var Eo="unity-cn-registry.cn-shanghai.cr.aliyuncs.com/codesearch/unity2022",Vi=[{label:"1080p (1920\xD71080)",value:"1920x1080x24",image:`${Eo}:batch-20260303`},{label:"2K (2560\xD71440)",value:"2560x1440x24",image:`${Eo}:batch-20260303-2k`},{label:"4K (3840\xD72160)",value:"3840x2160x24",image:`${Eo}:batch-20260303-4k`}],Nx=["gpt-5.2","gpt-4.1","claude-sonnet-4-20250514","o3","gemini-2.5-pro"],wx={prompts:["\u6784\u5EFA\u4E00\u4E2Aflappy bird\u6E38\u620F\u5E76\u622A\u56FE\u9A8C\u8BC1"],model:"gpt-5.2",tags:[],image:`${Eo}:batch-20260303`,timeout:900,env:{}};function Co(t,e){return`${t}/rollout${e}`}async function un(t,e,n="GET",l){let i=Co(t,e),r={method:n,headers:{"Content-Type":"application/json"}};l!==void 0&&(r.body=JSON.stringify(l));let a=await fetch(i,r),o=await a.text();if(!o)throw new Error(`Empty response (${a.status})`);try{return JSON.parse(o)}catch{throw new Error(`Invalid JSON (${a.status}): ${o.slice(0,200)}`)}}async function Tx(t,e){let n=Co(t,e),l=await fetch(n);if((l.headers.get("content-type")??"").includes("json")){let r=await l.json();return typeof r=="string"?r:JSON.stringify(r,null,2)}return l.text()}function Ex(t,e){if(!t)return"";let n=Math.round(((e?new Date(e).getTime():Date.now())-new Date(t).getTime())/1e3);return n<60?`${n}s`:`${Math.floor(n/60)}m ${n%60}s`}var IN="\x1B",jN=new RegExp(`${IN}\\[[0-9;]*m`,"g");function YN(t){return t.replace(jN,"")}function pp(t){return t?Vi.find(n=>n.image===t)?.value??Vi[0].value:Vi[0].value}function Cx(t){return Vi.find(n=>n.value===t)?.image??Vi[0].image}function hp(t){let e={};for(let n of t.split(`
59
+ `)){let l=n.indexOf("=");l>0&&(e[n.slice(0,l).trim()]=n.slice(l+1).trim())}return e}function Ax(t){return Object.entries(t).map(([e,n])=>`${e}=${n}`).join(`
60
+ `)}var VN=({open:t,mode:e,config:n,onClose:l,onSubmit:i})=>{let[r,a]=(0,$.useState)(e),[o,s]=(0,$.useState)(""),[u,f]=(0,$.useState)(n.model),[c,m]=(0,$.useState)(""),[d,g]=(0,$.useState)(pp(n.image)),[x,C]=(0,$.useState)(String(n.timeout)),[h,p]=(0,$.useState)(""),[y,T]=(0,$.useState)(!1),[N,E]=(0,$.useState)(""),[M,z]=(0,$.useState)(""),[Y,w]=(0,$.useState)(!1),[P,q]=(0,$.useState)(""),[B,X]=(0,$.useState)("");(0,$.useEffect)(()=>{a(e)},[e]),(0,$.useEffect)(()=>{if(!t)return;s(""),f(n.model),m(""),g(pp(n.image)),C(String(n.timeout)),p(""),T(!1),E(""),z(""),w(!1),X("");let L={...wx,model:n.model,image:n.image,timeout:n.timeout};q(JSON.stringify(L,null,2))},[t,n]);let K=(0,$.useCallback)(()=>{let L=o.split(`
61
+ `).map(ot=>ot.trim()).filter(ot=>ot&&!ot.startsWith("#")),k=c.split(",").map(ot=>ot.trim()).filter(Boolean),Tt=y&&h?h:Cx(d),Mt=hp(N),S={prompts:L.length>0?L:[""],model:u,command:Y&&M?M:void 0,tags:k.length>0?k:void 0,image:Tt,timeout:parseInt(x,10)||void 0,env:Object.keys(Mt).length>0?Mt:void 0};q(JSON.stringify(S,null,2)),X("")},[o,u,c,d,x,h,y,N,M,Y]),dt=L=>{L==="json"&&r==="form"&&K(),a(L)},kt=()=>{let L=o.split(`
62
+ `).map(S=>S.trim()).filter(S=>S&&!S.startsWith("#"));if(L.length===0)return;let k=c.split(",").map(S=>S.trim()).filter(Boolean),Tt=y&&h?h:Cx(d),Mt=hp(N);i({prompts:L,model:u,command:Y&&M?M:void 0,tags:k.length>0?k:void 0,image:Tt,timeout:parseInt(x,10)||void 0,env:Object.keys(Mt).length>0?Mt:void 0})},Qt=()=>{try{let L=JSON.parse(P);if(!L.prompt&&(!L.prompts||L.prompts.length===0)){X('Must have "prompt" or "prompts"');return}X(""),i(L)}catch(L){X(`Invalid JSON: ${L instanceof Error?L.message:L}`)}};return t?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"rollout-log-backdrop",onClick:l}),(0,b.jsxs)("div",{className:"rollout-dialog",children:[(0,b.jsxs)("div",{className:"rollout-dialog-header",children:[(0,b.jsx)("h3",{children:"New Tasks"}),(0,b.jsxs)("div",{className:"rollout-row",style:{gap:"4px"},children:[(0,b.jsx)("button",{className:`rollout-detail-tab ${r==="form"?"active":""}`,onClick:()=>dt("form"),children:"Form"}),(0,b.jsx)("button",{className:`rollout-detail-tab ${r==="json"?"active":""}`,onClick:()=>dt("json"),children:"JSON"}),(0,b.jsx)("button",{className:"btn",onClick:l,style:{marginLeft:8},children:"\u2715"})]})]}),r==="form"?(0,b.jsxs)("div",{className:"rollout-dialog-body",children:[(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsxs)("label",{className:"rollout-label",children:["Prompts"," ",(0,b.jsx)("span",{style:{color:"var(--muted)",fontWeight:400},children:"(one per line)"})]}),(0,b.jsx)("textarea",{className:"rollout-textarea",rows:6,placeholder:`\u6784\u5EFA\u4E00\u4E2Aflappy bird\u6E38\u620F\u5E76\u622A\u56FE\u9A8C\u8BC1
63
63
  \u521B\u5EFA\u4E00\u4E2A\u6253\u7816\u5757\u6E38\u620F
64
- # Lines starting with # are ignored`,value:o,onChange:H=>u(H.target.value)})]}),(0,v.jsxs)("div",{className:"rollout-form-row",children:[(0,v.jsxs)("div",{className:"rollout-form-group",style:{flex:1},children:[(0,v.jsx)("label",{className:"rollout-label",children:"Model"}),(0,v.jsx)("input",{type:"text",className:"rollout-input",list:"rollout-model-suggestions",placeholder:"e.g. gpt-5.2",value:s,onChange:H=>f(H.target.value)}),(0,v.jsx)("datalist",{id:"rollout-model-suggestions",children:mx.map(H=>(0,v.jsx)("option",{value:H},H))})]}),(0,v.jsxs)("div",{className:"rollout-form-group",style:{flex:1},children:[(0,v.jsx)("label",{className:"rollout-label",children:"Resolution"}),(0,v.jsxs)("select",{className:"rollout-select",value:y?"__custom__":d,onChange:H=>{H.target.value==="__custom__"?w(!0):(w(!1),g(H.target.value))},children:[Ii.map(H=>(0,v.jsx)("option",{value:H.value,children:H.label},H.value)),(0,v.jsx)("option",{value:"__custom__",children:"Custom image..."})]})]}),(0,v.jsxs)("div",{className:"rollout-form-group",style:{flex:1},children:[(0,v.jsx)("label",{className:"rollout-label",children:"Timeout (s)"}),(0,v.jsx)("input",{type:"number",className:"rollout-input",min:60,max:7200,value:b,onChange:H=>N(H.target.value)})]})]}),y&&(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Custom Docker Image"}),(0,v.jsx)("input",{type:"text",className:"rollout-input",placeholder:`${So}:my-tag`,value:p,onChange:H=>h(H.target.value)})]}),(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsxs)("label",{className:"rollout-label",children:["Tags"," ",(0,v.jsx)("span",{style:{color:"var(--muted)",fontWeight:400},children:"(comma-separated)"})]}),(0,v.jsx)("input",{type:"text",className:"rollout-input",placeholder:"experiment-001, batch-1",value:c,onChange:H=>m(H.target.value)})]}),(0,v.jsxs)("details",{className:"rollout-form-details",children:[(0,v.jsx)("summary",{className:"rollout-label",style:{cursor:"pointer"},children:"Advanced"}),(0,v.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10,marginTop:8},children:[(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--muted)"},children:[(0,v.jsx)("input",{type:"checkbox",checked:I,onChange:H=>T(H.target.checked)}),"Override command (replaces default"," ",(0,v.jsx)("code",{children:"codely -m ... -y -p ..."}),")"]}),I&&(0,v.jsx)("input",{type:"text",className:"rollout-input",placeholder:"e.g. codex --model o3 $PROMPT or claude -p $PROMPT",value:D,onChange:H=>L(H.target.value),style:{fontFamily:"var(--mono)",fontSize:12,marginTop:4}}),!I&&(0,v.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:2},children:["Default:"," ",(0,v.jsxs)("code",{style:{fontSize:11},children:["codely -m ",s," -y -p '...'"]})]})]}),(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsx)("label",{className:"rollout-label",style:{fontSize:12},children:"Environment Variables"}),(0,v.jsx)("textarea",{className:"rollout-textarea",rows:3,placeholder:`KEY=VALUE
65
- ANOTHER_KEY=value`,value:A,onChange:H=>E(H.target.value)})]})]})]}),(0,v.jsxs)("div",{className:"rollout-dialog-footer",children:[(0,v.jsxs)("span",{style:{color:"var(--muted)",fontSize:12},children:[o.split(`
66
- `).filter(H=>H.trim()&&!H.trim().startsWith("#")).length," ","task(s) will be created"]}),(0,v.jsxs)("div",{className:"rollout-row",children:[(0,v.jsx)("button",{className:"btn",onClick:l,children:"Cancel"}),(0,v.jsx)("button",{className:"btn primary",onClick:gt,disabled:!o.split(`
67
- `).some(H=>H.trim()&&!H.trim().startsWith("#")),children:"Submit"})]})]})]}):(0,v.jsxs)("div",{className:"rollout-dialog-body",children:[(0,v.jsxs)("div",{className:"rollout-form-group",style:{flex:1,display:"flex",flexDirection:"column"},children:[(0,v.jsxs)("label",{className:"rollout-label",children:["Request JSON",(0,v.jsx)("span",{style:{color:"var(--muted)",fontWeight:400,marginLeft:8},children:"POST /__codely__/control-plane/rollout/tasks"})]}),(0,v.jsx)("textarea",{className:"rollout-textarea rollout-json-editor",value:lt,onChange:H=>{K(H.target.value),P("")},spellCheck:!1}),G&&(0,v.jsx)("div",{className:"rollout-json-error",children:G})]}),(0,v.jsxs)("div",{className:"rollout-dialog-footer",children:[(0,v.jsx)("button",{className:"btn",onClick:()=>{let H={...ux,model:n.model,image:n.image,timeout:n.timeout};K(JSON.stringify(H,null,2)),P("")},children:"Reset Template"}),(0,v.jsxs)("div",{className:"rollout-row",children:[(0,v.jsx)("button",{className:"btn",onClick:l,children:"Cancel"}),(0,v.jsx)("button",{className:"btn primary",onClick:Ot,children:"Submit"})]})]})]})]})]}):null},px=({apiBase:t})=>{let[e,n]=(0,J.useState)([]),[l,i]=(0,J.useState)(null),[r,a]=(0,J.useState)("20"),[o,u]=(0,J.useState)("active"),[s,f]=(0,J.useState)("all"),[c,m]=(0,J.useState)(null),[d,g]=(0,J.useState)("16"),[b,N]=(0,J.useState)(!1),[p,h]=(0,J.useState)("form"),[y,w]=(0,J.useState)(""),[A,E]=(0,J.useState)(""),[D,L]=(0,J.useState)(""),[I,T]=(0,J.useState)(""),[lt,K]=(0,J.useState)(""),[G,P]=(0,J.useState)(!1),[tt,ot]=(0,J.useState)(""),[gt,Ot]=(0,J.useState)(""),[H,x]=(0,J.useState)(null),[Nt,At]=(0,J.useState)("container"),[k,ct]=(0,J.useState)(""),[be,me]=(0,J.useState)(!1),pe=(0,J.useRef)(null);(0,J.useEffect)(()=>{let S=To(t,"/events"),z=new EventSource(S);return z.onmessage=X=>{try{let mt=JSON.parse(X.data);(mt.type==="task_added"||mt.type==="task_updated")&&(n(ft=>{let zt=ft.findIndex(jt=>jt.id===mt.task.id);if(zt>=0){let jt=[...ft];return jt[zt]=mt.task,jt}return[mt.task,...ft]}),mt.task.id===H?.id&&x(mt.task)),mt.type==="workers_updated"&&(a(String(mt.desiredWorkers)),i(ft=>ft&&{...ft,desiredWorkers:mt.desiredWorkers})),mt.type==="pool_updated"&&m(mt.pool)}catch{}},()=>z.close()},[t,H?.id]);let B=(0,J.useCallback)(async()=>{let[S,z,X]=await Promise.all([rn(t,"/status"),rn(t,"/tasks"),rn(t,"/pool")]);i(S),n(z),a(String(S.desiredWorkers)),m(X),X.desired>0&&g(String(X.desired))},[t]);(0,J.useEffect)(()=>{B()},[B]),(0,J.useEffect)(()=>{l&&(w(l.config.image),E(l.config.model),L(String(l.config.timeout)),T(l.config.resultsDir),K(dx(l.config.defaultEnv)),ot(""))},[l]);let Z=(0,J.useMemo)(()=>{let S={total:e.length,running:0,queued:0,completed:0,failed:0};for(let z of e)z.status==="running"?S.running++:z.status==="queued"?S.queued++:z.status==="completed"?S.completed++:S.failed++;return S},[e]),j=(0,J.useMemo)(()=>e.filter(S=>S.status==="running"||S.status==="queued"),[e]),V=(0,J.useMemo)(()=>{let S=e.filter(z=>!["running","queued"].includes(z.status));return s==="all"?S:S.filter(z=>z.status===s)},[e,s]),W=()=>{l&&(w(l.config.image),E(l.config.model),L(String(l.config.timeout)),T(l.config.resultsDir),K(dx(l.config.defaultEnv)),ot(""))},kt=async()=>{let S=parseInt(D,10);if(!y.trim()){ot("Image is required.");return}if(!A.trim()){ot("Model is required.");return}if(!I.trim()){ot("Results directory is required.");return}if(isNaN(S)||S<=0){ot("Timeout must be a positive number.");return}P(!0),ot("");try{await rn(t,"/config","PUT",{image:y.trim(),model:A.trim(),timeout:S,resultsDir:I.trim(),defaultEnv:sp(lt)}),await B()}catch(z){ot(z instanceof Error?z.message:"Failed to update config.")}finally{P(!1)}},Re=async()=>{let S=parseInt(r,10);isNaN(S)||S<0||await rn(t,"/workers","POST",{count:S})},Jt=async S=>{await rn(t,"/tasks","POST",S),N(!1),await B()},Ze=async()=>{let S=gt.split(`
68
- `).map(z=>z.trim()).filter(z=>z&&!z.startsWith("#"));S.length!==0&&(await rn(t,"/tasks","POST",{prompts:S,model:l?.config.model??"gpt-5.2"}),Ot(""),await B())},ce=async S=>{await rn(t,`/tasks/${S}/stop`,"POST"),await B()},Ye=async S=>{await rn(t,`/tasks/${S}/retry`,"POST"),await B()},Ke=async()=>{await rn(t,"/tasks/stop-all","POST"),await B()},Qt=async()=>{await rn(t,"/tasks/clear","POST"),await B()},Me=async S=>{let z=S??parseInt(d,10);isNaN(z)||z<0||await rn(t,"/pool/warm","POST",{count:z})},yn=async()=>{await rn(t,"/pool/drain","POST")},De=async()=>{await rn(t,"/pool/destroy","POST")},Je=()=>{pe.current&&(clearInterval(pe.current),pe.current=null)},_e=(0,J.useCallback)(async(S,z)=>{let X=await sx(t,`/tasks/${S}/logs/${z}`);return wA(X)},[t]),M=(0,J.useCallback)(async(S,z)=>{me(!0);try{if(z==="container"){let X=await _e(S.id,"container.log");ct(X||"(no container log yet)")}else if(z==="unity"){let X=await _e(S.id,"unity.log");ct(X||"(no unity log yet)")}else if(z==="autosave"){let X=S.artifacts.find(mt=>mt.endsWith(".md")&&mt.startsWith("autosaves/"));if(X){let mt=await sx(t,`/tasks/${S.id}/artifacts/${X}`);ct(mt)}else ct("(no autosave MD found)")}else if(z==="artifacts"){let X=S.artifacts;ct(X.length>0?X.join(`
69
- `):"(no artifacts)")}}catch(X){ct(`Error: ${X}`)}me(!1)},[t,_e]),q=(0,J.useCallback)((S,z)=>{if(S.status!=="running"||z!=="container"&&z!=="unity")return;let X=z==="container"?"container.log":"unity.log";pe.current=setInterval(async()=>{try{let mt=await _e(S.id,X);ct(mt||"(waiting for output...)")}catch{}},2e3)},[_e]),et=(0,J.useCallback)(async(S,z="container")=>{Je(),x(S),At(z),await M(S,z),q(S,z)},[M,q]),at=(0,J.useCallback)(async S=>{Je(),At(S),H&&(await M(H,S),q(H,S))},[H,M,q]),R=()=>{Je(),x(null),ct("")};(0,J.useEffect)(()=>()=>Je(),[]);let F=S=>{let z=S.status==="running",X=["completed","failed","stopped","cancelled"].includes(S.status),mt=S.artifacts?.some(Mt=>Mt.endsWith(".md")&&Mt.startsWith("autosaves/")),ft=S.artifacts?.some(Mt=>Mt.endsWith(".json")&&Mt.startsWith("autosaves/")),zt=(()=>{let Mt=Ii.find(vn=>vn.image===S.image);return Mt?Mt.label.split(" ")[0]:null})(),jt=(()=>{let Mt=S.command?.match(/-m\s+(\S+)/);return Mt?Mt[1]:S.model&&S.model!=="custom"?S.model:null})();return(0,v.jsxs)("div",{className:`rollout-task-card ${z?"is-running":""}`,children:[(0,v.jsxs)("div",{className:"rollout-task-card-header",children:[(0,v.jsxs)("div",{className:"rollout-task-card-left",children:[(0,v.jsx)("span",{className:"rollout-task-id",children:S.id}),jt&&(0,v.jsx)("span",{className:"rollout-task-model",children:jt}),zt&&(0,v.jsx)("span",{className:"rollout-task-resolution",children:zt}),S.tags.length>0&&(0,v.jsx)("span",{className:"rollout-task-tags",children:S.tags.join(", ")})]}),(0,v.jsx)("span",{className:`rollout-task-status ${S.status}`,children:S.status})]}),(0,v.jsx)("div",{className:"rollout-task-prompt",children:S.prompt}),(0,v.jsx)("div",{className:"rollout-task-command",children:S.command}),(0,v.jsxs)("div",{className:"rollout-task-meta",children:[S.startTime&&(0,v.jsxs)("span",{children:["\u23F1 ",cx(S.startTime,z?null:S.endTime)]}),S.exitCode!==null&&(0,v.jsxs)("span",{children:["exit: ",S.exitCode]}),S.containerName&&(0,v.jsxs)("span",{children:["\u{1F4E6} ",S.containerName]}),S.artifacts?.length>0&&(0,v.jsxs)("span",{children:["\u{1F4CE} ",S.artifacts.length," files"]})]}),(0,v.jsxs)("div",{className:"rollout-task-actions",children:[(0,v.jsx)("button",{className:"btn rollout-btn-sm",onClick:()=>et(S,"container"),children:z?"Live Log":"Log"}),mt&&(0,v.jsx)("button",{className:"btn rollout-btn-sm",onClick:()=>et(S,"autosave"),children:"Autosave"}),X&&S.artifacts?.length>0&&(0,v.jsx)("button",{className:"btn rollout-btn-sm",onClick:()=>et(S,"artifacts"),children:"Artifacts"}),ft&&(0,v.jsx)("a",{className:"btn rollout-btn-sm",href:To(t,`/tasks/${S.id}/artifacts/${S.artifacts.find(Mt=>Mt.endsWith(".json")&&Mt.startsWith("autosaves/"))}`),target:"_blank",rel:"noreferrer",children:"JSON \u2197"}),z&&(0,v.jsx)("button",{className:"btn danger rollout-btn-sm",onClick:()=>ce(S.id),children:"Stop"}),X&&(0,v.jsx)("button",{className:"btn rollout-btn-sm",onClick:()=>Ye(S.id),children:"Retry"})]})]},S.id)};return(0,v.jsxs)("div",{className:"rollout-app",children:[(0,v.jsxs)("div",{className:"rollout-stats",children:[(0,v.jsxs)("div",{className:"rollout-stat",onClick:()=>u("active"),style:{cursor:"pointer"},children:[(0,v.jsx)("div",{className:"rollout-stat-value rollout-running",children:Z.running}),(0,v.jsx)("div",{className:"rollout-stat-label",children:"Running"})]}),(0,v.jsxs)("div",{className:"rollout-stat",onClick:()=>u("active"),style:{cursor:"pointer"},children:[(0,v.jsx)("div",{className:"rollout-stat-value rollout-queued",children:Z.queued}),(0,v.jsx)("div",{className:"rollout-stat-label",children:"Queued"})]}),(0,v.jsxs)("div",{className:"rollout-stat",onClick:()=>{u("history"),f("completed")},style:{cursor:"pointer"},children:[(0,v.jsx)("div",{className:"rollout-stat-value rollout-completed",children:Z.completed}),(0,v.jsx)("div",{className:"rollout-stat-label",children:"Completed"})]}),(0,v.jsxs)("div",{className:"rollout-stat",onClick:()=>{u("history"),f("failed")},style:{cursor:"pointer"},children:[(0,v.jsx)("div",{className:"rollout-stat-value rollout-failed",children:Z.failed}),(0,v.jsx)("div",{className:"rollout-stat-label",children:"Failed"})]}),(0,v.jsxs)("div",{className:"rollout-stat",children:[(0,v.jsx)("div",{className:"rollout-stat-value",children:Z.total}),(0,v.jsx)("div",{className:"rollout-stat-label",children:"Total"})]})]}),(0,v.jsxs)("div",{className:"rollout-tabs",children:[(0,v.jsxs)("button",{className:`rollout-tab ${o==="active"?"active":""}`,onClick:()=>u("active"),children:["Active (",j.length,")"]}),(0,v.jsxs)("button",{className:`rollout-tab ${o==="history"?"active":""}`,onClick:()=>u("history"),children:["History (",V.length,")"]}),(0,v.jsxs)("button",{className:`rollout-tab ${o==="pool"?"active":""}`,onClick:()=>u("pool"),children:["Pool (",c?.containers.length??0,")"]}),(0,v.jsx)("div",{style:{flex:1}}),(0,v.jsx)("button",{className:"btn rollout-btn-sm",style:{marginRight:6},onClick:()=>{h("form"),N(!0)},children:"+ New Tasks"}),(0,v.jsx)("button",{className:"btn rollout-btn-sm",style:{marginRight:6},onClick:()=>{h("json"),N(!0)},children:"{ } JSON"}),(0,v.jsx)("button",{className:"btn rollout-btn-sm",onClick:B,children:"Refresh"})]}),(0,v.jsxs)("div",{className:"rollout-body",children:[(0,v.jsxs)("div",{className:"rollout-sidebar",children:[(0,v.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Workers"}),(0,v.jsxs)("div",{className:"rollout-row",children:[(0,v.jsx)("input",{type:"number",className:"rollout-input rollout-input-sm",min:0,max:200,value:r,onChange:S=>a(S.target.value)}),(0,v.jsx)("button",{className:"btn",onClick:Re,children:"Apply"})]})]}),(0,v.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Container Pool"}),c&&c.containers.length>0?(0,v.jsxs)("div",{className:"rollout-pool-status",children:[(0,v.jsxs)("div",{className:"rollout-pool-counts",style:{display:"flex",gap:"8px",fontSize:"13px",marginBottom:"6px"},children:[(0,v.jsxs)("span",{style:{color:"#4caf50"},children:[c.idle," idle"]}),(0,v.jsxs)("span",{style:{color:"#ff9800"},children:[c.busy," busy"]}),(0,v.jsxs)("span",{style:{color:"#2196f3"},children:[c.starting," starting"]}),c.dead>0&&(0,v.jsxs)("span",{style:{color:"#f44336"},children:[c.dead," dead"]})]}),(0,v.jsxs)("div",{className:"rollout-row",children:[(0,v.jsx)("input",{type:"number",className:"rollout-input rollout-input-sm",min:0,max:50,value:d,onChange:S=>g(S.target.value)}),(0,v.jsx)("button",{className:"btn",onClick:()=>Me(),children:"Warm"}),(0,v.jsx)("button",{className:"btn danger",onClick:yn,children:"Drain"})]})]}):(0,v.jsxs)("div",{className:"rollout-row",children:[(0,v.jsx)("input",{type:"number",className:"rollout-input rollout-input-sm",min:0,max:50,value:d,onChange:S=>g(S.target.value)}),(0,v.jsx)("button",{className:"btn",onClick:()=>Me(),children:"Start Pool"})]})]}),(0,v.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Quick Add"}),(0,v.jsx)("textarea",{className:"rollout-textarea",rows:3,placeholder:`One prompt per line...
70
- Uses default model + image`,value:gt,onChange:S=>Ot(S.target.value)}),(0,v.jsxs)("div",{className:"rollout-row",style:{marginTop:4},children:[(0,v.jsx)("button",{className:"btn primary",style:{flex:1},onClick:Ze,disabled:!gt.trim(),children:"Add"}),(0,v.jsx)("button",{className:"btn",onClick:()=>{h("form"),N(!0)},children:"+ Advanced"})]})]}),(0,v.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Bulk Actions"}),(0,v.jsxs)("div",{className:"rollout-row",children:[(0,v.jsx)("button",{className:"btn danger",onClick:Ke,children:"Stop All"}),(0,v.jsx)("button",{className:"btn",onClick:Qt,children:"Clear Done"})]})]}),l&&(0,v.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Current Config"}),(0,v.jsxs)("div",{className:"rollout-config-info",children:[(0,v.jsxs)("div",{children:["Image: ",(0,v.jsx)("code",{children:l.config.image.split("/").pop()})]}),(0,v.jsxs)("div",{children:["Model: ",(0,v.jsx)("code",{children:l.config.model})]}),(0,v.jsxs)("div",{children:["Timeout: ",(0,v.jsxs)("code",{children:[l.config.timeout,"s"]})]}),(0,v.jsxs)("div",{children:["Resolution:"," ",(0,v.jsx)("code",{children:up(l.config.image).replace("x24","")})]})]}),(0,v.jsxs)("details",{className:"rollout-form-details",style:{marginTop:12},children:[(0,v.jsx)("summary",{className:"rollout-label",style:{cursor:"pointer"},children:"Edit Server Defaults"}),(0,v.jsxs)("div",{className:"rollout-add-form",style:{marginTop:8},children:[(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Docker Image"}),(0,v.jsx)("input",{type:"text",className:"rollout-input",value:y,onChange:S=>w(S.target.value)})]}),(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Model"}),(0,v.jsx)("input",{type:"text",className:"rollout-input",list:"rollout-server-model-suggestions",value:A,onChange:S=>E(S.target.value)}),(0,v.jsx)("datalist",{id:"rollout-server-model-suggestions",children:mx.map(S=>(0,v.jsx)("option",{value:S},S))})]}),(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Timeout (s)"}),(0,v.jsx)("input",{type:"number",min:1,className:"rollout-input",value:D,onChange:S=>L(S.target.value)})]}),(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Results Directory"}),(0,v.jsx)("input",{type:"text",className:"rollout-input",value:I,onChange:S=>T(S.target.value)})]}),(0,v.jsxs)("div",{className:"rollout-form-group",children:[(0,v.jsx)("label",{className:"rollout-label",children:"Default Environment"}),(0,v.jsx)("textarea",{className:"rollout-textarea",rows:3,placeholder:`KEY=VALUE
71
- ANOTHER_KEY=value`,value:lt,onChange:S=>K(S.target.value)})]}),tt&&(0,v.jsx)("div",{className:"rollout-json-error",children:tt}),(0,v.jsxs)("div",{className:"rollout-row",children:[(0,v.jsx)("button",{className:"btn",onClick:W,children:"Reset"}),(0,v.jsx)("button",{className:"btn primary",onClick:kt,disabled:G,children:G?"Saving...":"Save Defaults"})]})]})]})]})]}),(0,v.jsxs)("div",{className:"rollout-main",children:[o==="active"&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{className:"rollout-main-header",children:(0,v.jsxs)("div",{className:"rollout-main-title",children:["Active Tasks",j.length===0&&(0,v.jsxs)("span",{className:"rollout-hint",children:[" ","\u2014 no running or queued tasks"]})]})}),(0,v.jsx)("div",{className:"rollout-task-list",children:j.length===0?(0,v.jsxs)("div",{className:"rollout-empty",children:["No active tasks. Use ",(0,v.jsx)("strong",{children:"+ New Tasks"})," or the sidebar to add prompts."]}):j.map(F)})]}),o==="history"&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"rollout-main-header",children:[(0,v.jsx)("div",{className:"rollout-main-title",children:"History"}),(0,v.jsx)("div",{className:"rollout-main-controls",children:(0,v.jsxs)("select",{className:"rollout-select",value:s,onChange:S=>f(S.target.value),children:[(0,v.jsx)("option",{value:"all",children:"All"}),(0,v.jsx)("option",{value:"completed",children:"Completed"}),(0,v.jsx)("option",{value:"failed",children:"Failed"}),(0,v.jsx)("option",{value:"stopped",children:"Stopped"})]})})]}),(0,v.jsx)("div",{className:"rollout-task-list",children:V.length===0?(0,v.jsx)("div",{className:"rollout-empty",children:"No history tasks."}):V.map(F)})]}),o==="pool"&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)("div",{className:"rollout-main-header",children:[(0,v.jsxs)("div",{className:"rollout-main-title",children:["Container Pool",c&&(0,v.jsxs)("span",{className:"rollout-hint",children:[" ","\u2014 ",c.containers.length," containers (",c.enabled?"enabled":"disabled",")"]})]}),(0,v.jsx)("div",{className:"rollout-main-controls",children:(0,v.jsx)("button",{className:"btn danger",onClick:De,children:"Destroy All"})})]}),(0,v.jsx)("div",{className:"rollout-task-list",children:!c||c.containers.length===0?(0,v.jsx)("div",{className:"rollout-empty",children:"No pool containers. Use the sidebar to start a pool."}):c.containers.map(S=>(0,v.jsxs)("div",{className:`rollout-task-card ${S.state==="busy"?"is-running":""}`,children:[(0,v.jsxs)("div",{className:"rollout-task-card-header",children:[(0,v.jsxs)("div",{className:"rollout-task-card-left",children:[(0,v.jsx)("span",{className:"rollout-task-id",children:S.name}),(0,v.jsxs)("span",{className:"rollout-task-model",children:["port:",S.mcpPort]})]}),(0,v.jsx)("span",{className:`rollout-task-status ${S.state==="idle"?"completed":S.state==="busy"?"running":S.state==="dead"?"failed":"queued"}`,children:S.state})]}),(0,v.jsxs)("div",{className:"rollout-task-meta",children:[(0,v.jsxs)("span",{children:["Started: ",new Date(S.startedAt).toLocaleTimeString()]}),(0,v.jsxs)("span",{children:["Uptime: ",cx(S.startedAt,null)]}),(0,v.jsxs)("span",{children:["Tasks done: ",S.tasksCompleted]}),S.currentTaskId&&(0,v.jsxs)("span",{children:["Current: ",S.currentTaskId]}),S.lastHealthCheck&&(0,v.jsxs)("span",{children:["Last check:"," ",new Date(S.lastHealthCheck).toLocaleTimeString()]})]})]},S.name))})]})]})]}),l&&(0,v.jsx)(EA,{open:b,mode:p,config:l.config,onClose:()=>N(!1),onSubmit:Jt}),H&&(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)("div",{className:"rollout-log-backdrop",onClick:R}),(0,v.jsxs)("div",{className:"rollout-log-panel",children:[(0,v.jsxs)("div",{className:"rollout-log-header",children:[(0,v.jsxs)("h3",{children:[H.id," \u2014 ",H.prompt.slice(0,50),H.prompt.length>50?"...":""]}),(0,v.jsxs)("div",{className:"rollout-row",children:[H.status==="running"&&(Nt==="container"||Nt==="unity")&&(0,v.jsx)("span",{className:"rollout-live-dot",children:"\u25CF LIVE"}),(0,v.jsx)("button",{className:"btn",onClick:R,children:"Close"})]})]}),(0,v.jsxs)("div",{className:"rollout-detail-tabs",children:[(0,v.jsx)("button",{className:`rollout-detail-tab ${Nt==="container"?"active":""}`,onClick:()=>at("container"),children:H.status==="running"?"\u25CF Codely Log":"Codely Log"}),(0,v.jsx)("button",{className:`rollout-detail-tab ${Nt==="unity"?"active":""}`,onClick:()=>at("unity"),children:"Unity Log"}),(0,v.jsx)("button",{className:`rollout-detail-tab ${Nt==="autosave"?"active":""}`,onClick:()=>at("autosave"),children:"Autosave"}),(0,v.jsxs)("button",{className:`rollout-detail-tab ${Nt==="artifacts"?"active":""}`,onClick:()=>at("artifacts"),children:["Artifacts (",H.artifacts?.length??0,")"]})]}),Nt==="artifacts"?(0,v.jsx)("div",{className:"rollout-artifact-list",children:(H.artifacts??[]).map(S=>(0,v.jsxs)("a",{className:"rollout-artifact-item",href:To(t,`/tasks/${H.id}/artifacts/${S}`),target:"_blank",rel:"noreferrer",children:[(0,v.jsx)("span",{className:"rollout-artifact-icon",children:S.endsWith(".json")?"\u{1F4C4}":S.endsWith(".md")?"\u{1F4DD}":S.endsWith(".png")?"\u{1F5BC}\uFE0F":S.endsWith(".log")||S.endsWith(".txt")?"\u{1F4CB}":"\u{1F4CE}"}),S]},S))}):(0,v.jsx)("pre",{className:`rollout-log-content ${be?"loading":""}`,children:k})]})]})]})};var Tt=Q(rt(),1);function CA(t){return t?t.split("|").map(e=>e.trim()).filter(e=>e.length>0):[]}function NA(t){let e=[],n=/(^|\s)@([^\s]+)/g,l;for(;(l=n.exec(t))!==null;){let r=(l[2]??"").replace(/[),.;:!?]+$/g,"");r.length>0&&e.push(r)}return Array.from(new Set(e))}function AA(t){return t.kind==="tool"}function RA(t){return t.kind==="message"}var MA=({config:t})=>{let{connection:e,auth:n,availableCommands:l,planEntries:i,feed:r,tools:a,connect:o,sendPrompt:u,suggestPaths:s,completeSlashCommand:f,authenticate:c,statusText:m,permissionReq:d,resolvePermission:g,inputReq:b,resolveInput:N,isBusy:p,cancel:h}=K1({cwd:t.cwd??"",wsPath:t.wsPath??"/ws",yolo:!!t.yolo}),[y,w]=(0,Rt.useState)(!1),A=(0,Rt.useRef)(null);Rt.default.useEffect(()=>(A.current&&clearTimeout(A.current),p?(w(!1),A.current=setTimeout(()=>{w(!0)},500)):w(!1),()=>{A.current&&clearTimeout(A.current)}),[p,r,a]);let[E,D]=(0,Rt.useState)(null),L=(0,Rt.useRef)(null),[I,T]=(0,Rt.useState)("");X1(L,[I]);let[lt,K]=(0,Rt.useState)([]),G=R=>{R.preventDefault();let F=R.dataTransfer;if(F.files&&F.files.length>0){let z=Array.from(F.files).map(X=>({id:`file-${Date.now()}-${Math.random().toString(36).slice(2)}`,type:"file",label:X.name,uri:X.name}));K(X=>[...X,...z]);return}let S=F.getData("text");if(S){let z=/^https?:\/\//.test(S);K(X=>[...X,{id:`ref-${Date.now()}-${Math.random().toString(36).slice(2)}`,type:z?"link":"default",label:S.length>30?S.slice(0,30)+"...":S,uri:S}])}},P=R=>{K(F=>F.filter(S=>S.id!==R))},[tt,ot]=(0,Rt.useState)(!1),[gt,Ot]=(0,Rt.useState)(0),[H,x]=(0,Rt.useState)(!1),[Nt,At]=(0,Rt.useState)(0),[k,ct]=(0,Rt.useState)([]),be=(0,Rt.useRef)(0),me=(0,Rt.useMemo)(()=>{let R=I.trimStart();if(!R.startsWith("/"))return[];let F=R.slice(1),S=/\s$/.test(F),z=F.split(/\s+/).filter(ft=>ft.length>0),X=z,mt="";if(!S&&z.length>0&&(mt=z[z.length-1]??"",X=z.slice(0,-1)),X.length===0){let ft=mt;return(l??[]).filter(zt=>zt&&zt.name&&zt.name.startsWith(ft)).slice(0,10)}if(X.length===1){let ft=X[0]??"",zt=(l??[]).find(vn=>vn.name===ft),jt=CA(zt?.input?.hint??null);if(jt.length===0)return[];let Mt=mt;return jt.filter(vn=>vn.startsWith(Mt)).slice(0,10).map(vn=>({name:`${ft} ${vn}`,description:zt?.description??""}))}return[]},[l,I]),[pe,B]=(0,Rt.useState)(!1),[Z,j]=(0,Rt.useState)(0),[V,W]=(0,Rt.useState)([]),[kt,Re]=(0,Rt.useState)(null),Jt=(0,Rt.useRef)(null),Ze=(0,Rt.useRef)(0),ce=(R,F)=>{let S=R.slice(0,F),z=S.lastIndexOf("@");if(z<0||z>0&&!/\s/.test(S[z-1]??""))return null;let X=S.slice(z+1);return/\s/.test(X)?null:{start:z,end:F,query:X}},Ye=pe&&V.length>0,Ke=H&&k.length>0&&!Ye,Qt=tt&&me.length>0&&!Ye&&!Ke;Rt.default.useEffect(()=>{let R=I.trimStart();if(!R.startsWith("/")){x(!1),ct(Mt=>Mt.length===0?Mt:[]),At(0);return}let F=R.slice(1),S=/\s$/.test(F),z=F.split(/\s+/).filter(Mt=>Mt.length>0);if(z.length<2){x(!1),ct(Mt=>Mt.length===0?Mt:[]),At(0);return}let X=z.slice(2),mt=X.length===0&&S,ft=X.length===1&&!S;if(!mt&&!ft){x(!1),ct(Mt=>Mt.length===0?Mt:[]),At(0);return}let zt=++be.current,jt=setTimeout(()=>{(async()=>{let Mt=await f(R,10);if(zt!==be.current)return;let vn=S?X:X.slice(0,-1),js=[...z.slice(0,2),...vn].join(" ").trim(),_=Mt.map(xt=>({name:`${js} ${xt}`.trim(),description:""}));ct(_),At(0),x(_.length>0)})()},120);return()=>clearTimeout(jt)},[f,I]),Rt.default.useEffect(()=>{if(!pe||kt===null)return;let R=++Ze.current,F=setTimeout(()=>{(async()=>{let S=await s(kt,10);R===Ze.current&&(W(S),j(0))})()},120);return()=>clearTimeout(F)},[kt,pe,s]);let Me=R=>{let F=me[R];if(!F)return;let S=I.match(/^\s*/)?.[0]??"";T(`${S}/${F.name} `),ot(!1),Ot(0),setTimeout(()=>L.current?.focus(),0)},yn=R=>{let F=k[R];if(!F)return;let S=I.match(/^\s*/)?.[0]??"";T(`${S}/${F.name} `),x(!1),At(0),setTimeout(()=>L.current?.focus(),0)},De=R=>{let F=V[R],S=Jt.current;if(!F||!S)return;let z=I.slice(0,S.start),X=I.slice(S.end),mt=`@${F} `,ft=`${z}${mt}${X}`;T(ft),B(!1),W([]),j(0),Re(null),Jt.current=null,setTimeout(()=>{let zt=L.current;if(!zt)return;zt.focus();let jt=z.length+mt.length;zt.setSelectionRange(jt,jt)},0)},Je=async()=>{let R=I.trim();if(!R&&lt.length===0)return;let F=[],z=R||(lt.length>0?"Attached references.":"");if(lt.length>0){let X=lt.map(ft=>`[${ft.label}](${ft.uri})`).join(" ");lt.some(ft=>ft.type!=="file")&&(z=`${z}
64
+ # Lines starting with # are ignored`,value:o,onChange:L=>s(L.target.value)})]}),(0,b.jsxs)("div",{className:"rollout-form-row",children:[(0,b.jsxs)("div",{className:"rollout-form-group",style:{flex:1},children:[(0,b.jsx)("label",{className:"rollout-label",children:"Model"}),(0,b.jsx)("input",{type:"text",className:"rollout-input",list:"rollout-model-suggestions",placeholder:"e.g. gpt-5.2",value:u,onChange:L=>f(L.target.value)}),(0,b.jsx)("datalist",{id:"rollout-model-suggestions",children:Nx.map(L=>(0,b.jsx)("option",{value:L},L))})]}),(0,b.jsxs)("div",{className:"rollout-form-group",style:{flex:1},children:[(0,b.jsx)("label",{className:"rollout-label",children:"Resolution"}),(0,b.jsxs)("select",{className:"rollout-select",value:y?"__custom__":d,onChange:L=>{L.target.value==="__custom__"?T(!0):(T(!1),g(L.target.value))},children:[Vi.map(L=>(0,b.jsx)("option",{value:L.value,children:L.label},L.value)),(0,b.jsx)("option",{value:"__custom__",children:"Custom image..."})]})]}),(0,b.jsxs)("div",{className:"rollout-form-group",style:{flex:1},children:[(0,b.jsx)("label",{className:"rollout-label",children:"Timeout (s)"}),(0,b.jsx)("input",{type:"number",className:"rollout-input",min:60,max:7200,value:x,onChange:L=>C(L.target.value)})]})]}),y&&(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Custom Docker Image"}),(0,b.jsx)("input",{type:"text",className:"rollout-input",placeholder:`${Eo}:my-tag`,value:h,onChange:L=>p(L.target.value)})]}),(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsxs)("label",{className:"rollout-label",children:["Tags"," ",(0,b.jsx)("span",{style:{color:"var(--muted)",fontWeight:400},children:"(comma-separated)"})]}),(0,b.jsx)("input",{type:"text",className:"rollout-input",placeholder:"experiment-001, batch-1",value:c,onChange:L=>m(L.target.value)})]}),(0,b.jsxs)("details",{className:"rollout-form-details",children:[(0,b.jsx)("summary",{className:"rollout-label",style:{cursor:"pointer"},children:"Advanced"}),(0,b.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10,marginTop:8},children:[(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:"var(--muted)"},children:[(0,b.jsx)("input",{type:"checkbox",checked:Y,onChange:L=>w(L.target.checked)}),"Override command (replaces default"," ",(0,b.jsx)("code",{children:"codely -m ... -y -p ..."}),")"]}),Y&&(0,b.jsx)("input",{type:"text",className:"rollout-input",placeholder:"e.g. codex --model o3 $PROMPT or claude -p $PROMPT",value:M,onChange:L=>z(L.target.value),style:{fontFamily:"var(--mono)",fontSize:12,marginTop:4}}),!Y&&(0,b.jsxs)("div",{style:{fontSize:11,color:"var(--muted)",marginTop:2},children:["Default:"," ",(0,b.jsxs)("code",{style:{fontSize:11},children:["codely -m ",u," -y -p '...'"]})]})]}),(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsx)("label",{className:"rollout-label",style:{fontSize:12},children:"Environment Variables"}),(0,b.jsx)("textarea",{className:"rollout-textarea",rows:3,placeholder:`KEY=VALUE
65
+ ANOTHER_KEY=value`,value:N,onChange:L=>E(L.target.value)})]})]})]}),(0,b.jsxs)("div",{className:"rollout-dialog-footer",children:[(0,b.jsxs)("span",{style:{color:"var(--muted)",fontSize:12},children:[o.split(`
66
+ `).filter(L=>L.trim()&&!L.trim().startsWith("#")).length," ","task(s) will be created"]}),(0,b.jsxs)("div",{className:"rollout-row",children:[(0,b.jsx)("button",{className:"btn",onClick:l,children:"Cancel"}),(0,b.jsx)("button",{className:"btn primary",onClick:kt,disabled:!o.split(`
67
+ `).some(L=>L.trim()&&!L.trim().startsWith("#")),children:"Submit"})]})]})]}):(0,b.jsxs)("div",{className:"rollout-dialog-body",children:[(0,b.jsxs)("div",{className:"rollout-form-group",style:{flex:1,display:"flex",flexDirection:"column"},children:[(0,b.jsxs)("label",{className:"rollout-label",children:["Request JSON",(0,b.jsx)("span",{style:{color:"var(--muted)",fontWeight:400,marginLeft:8},children:"POST /__codely__/control-plane/rollout/tasks"})]}),(0,b.jsx)("textarea",{className:"rollout-textarea rollout-json-editor",value:P,onChange:L=>{q(L.target.value),X("")},spellCheck:!1}),B&&(0,b.jsx)("div",{className:"rollout-json-error",children:B})]}),(0,b.jsxs)("div",{className:"rollout-dialog-footer",children:[(0,b.jsx)("button",{className:"btn",onClick:()=>{let L={...wx,model:n.model,image:n.image,timeout:n.timeout};q(JSON.stringify(L,null,2)),X("")},children:"Reset Template"}),(0,b.jsxs)("div",{className:"rollout-row",children:[(0,b.jsx)("button",{className:"btn",onClick:l,children:"Cancel"}),(0,b.jsx)("button",{className:"btn primary",onClick:Qt,children:"Submit"})]})]})]})]})]}):null},Rx=({apiBase:t})=>{let[e,n]=(0,$.useState)([]),[l,i]=(0,$.useState)(null),[r,a]=(0,$.useState)("20"),[o,s]=(0,$.useState)("active"),[u,f]=(0,$.useState)("all"),[c,m]=(0,$.useState)(null),[d,g]=(0,$.useState)("16"),[x,C]=(0,$.useState)(!1),[h,p]=(0,$.useState)("form"),[y,T]=(0,$.useState)(""),[N,E]=(0,$.useState)(""),[M,z]=(0,$.useState)(""),[Y,w]=(0,$.useState)(""),[P,q]=(0,$.useState)(""),[B,X]=(0,$.useState)(!1),[K,dt]=(0,$.useState)(""),[kt,Qt]=(0,$.useState)(""),[L,k]=(0,$.useState)(null),[Tt,Mt]=(0,$.useState)("container"),[S,ot]=(0,$.useState)(""),[pe,he]=(0,$.useState)(!1),Ae=(0,$.useRef)(null);(0,$.useEffect)(()=>{let v=Co(t,"/events"),O=new EventSource(v);return O.onmessage=I=>{try{let Q=JSON.parse(I.data);(Q.type==="task_added"||Q.type==="task_updated")&&(n(J=>{let Gt=J.findIndex(Ct=>Ct.id===Q.task.id);if(Gt>=0){let Ct=[...J];return Ct[Gt]=Q.task,Ct}return[Q.task,...J]}),Q.task.id===L?.id&&k(Q.task)),Q.type==="workers_updated"&&(a(String(Q.desiredWorkers)),i(J=>J&&{...J,desiredWorkers:Q.desiredWorkers})),Q.type==="pool_updated"&&m(Q.pool)}catch{}},()=>O.close()},[t,L?.id]);let ht=(0,$.useCallback)(async()=>{let[v,O,I]=await Promise.all([un(t,"/status"),un(t,"/tasks"),un(t,"/pool")]);i(v),n(O),a(String(v.desiredWorkers)),m(I),I.desired>0&&g(String(I.desired))},[t]);(0,$.useEffect)(()=>{ht()},[ht]),(0,$.useEffect)(()=>{l&&(T(l.config.image),E(l.config.model),z(String(l.config.timeout)),w(l.config.resultsDir),q(Ax(l.config.defaultEnv)),dt(""))},[l]);let se=(0,$.useMemo)(()=>{let v={total:e.length,running:0,queued:0,completed:0,failed:0};for(let O of e)O.status==="running"?v.running++:O.status==="queued"?v.queued++:O.status==="completed"?v.completed++:v.failed++;return v},[e]),Pt=(0,$.useMemo)(()=>e.filter(v=>v.status==="running"||v.status==="queued"),[e]),ge=(0,$.useMemo)(()=>{let v=e.filter(O=>!["running","queued"].includes(O.status));return u==="all"?v:v.filter(O=>O.status===u)},[e,u]),j=()=>{l&&(T(l.config.image),E(l.config.model),z(String(l.config.timeout)),w(l.config.resultsDir),q(Ax(l.config.defaultEnv)),dt(""))},F=async()=>{let v=parseInt(M,10);if(!y.trim()){dt("Image is required.");return}if(!N.trim()){dt("Model is required.");return}if(!Y.trim()){dt("Results directory is required.");return}if(isNaN(v)||v<=0){dt("Timeout must be a positive number.");return}X(!0),dt("");try{await un(t,"/config","PUT",{image:y.trim(),model:N.trim(),timeout:v,resultsDir:Y.trim(),defaultEnv:hp(P)}),await ht()}catch(O){dt(O instanceof Error?O.message:"Failed to update config.")}finally{X(!1)}},Z=async()=>{let v=parseInt(r,10);isNaN(v)||v<0||await un(t,"/workers","POST",{count:v})},W=async v=>{await un(t,"/tasks","POST",v),C(!1),await ht()},lt=async()=>{let v=kt.split(`
68
+ `).map(O=>O.trim()).filter(O=>O&&!O.startsWith("#"));v.length!==0&&(await un(t,"/tasks","POST",{prompts:v,model:l?.config.model??"gpt-5.2"}),Qt(""),await ht())},st=async v=>{await un(t,`/tasks/${v}/stop`,"POST"),await ht()},Dt=async v=>{await un(t,`/tasks/${v}/retry`,"POST"),await ht()},Ne=async()=>{await un(t,"/tasks/stop-all","POST"),await ht()},Vt=async()=>{await un(t,"/tasks/clear","POST"),await ht()},It=async v=>{let O=v??parseInt(d,10);isNaN(O)||O<0||await un(t,"/pool/warm","POST",{count:O})},Xe=async()=>{await un(t,"/pool/drain","POST")},Le=async()=>{await un(t,"/pool/destroy","POST")},en=()=>{Ae.current&&(clearInterval(Ae.current),Ae.current=null)},Pe=(0,$.useCallback)(async(v,O)=>{let I=await Tx(t,`/tasks/${v}/logs/${O}`);return YN(I)},[t]),R=(0,$.useCallback)(async(v,O)=>{he(!0);try{if(O==="container"){let I=await Pe(v.id,"container.log");ot(I||"(no container log yet)")}else if(O==="unity"){let I=await Pe(v.id,"unity.log");ot(I||"(no unity log yet)")}else if(O==="autosave"){let I=v.artifacts.find(Q=>Q.endsWith(".md")&&Q.startsWith("autosaves/"));if(I){let Q=await Tx(t,`/tasks/${v.id}/artifacts/${I}`);ot(Q)}else ot("(no autosave MD found)")}else if(O==="artifacts"){let I=v.artifacts;ot(I.length>0?I.join(`
69
+ `):"(no artifacts)")}}catch(I){ot(`Error: ${I}`)}he(!1)},[t,Pe]),H=(0,$.useCallback)((v,O)=>{if(v.status!=="running"||O!=="container"&&O!=="unity")return;let I=O==="container"?"container.log":"unity.log";Ae.current=setInterval(async()=>{try{let Q=await Pe(v.id,I);ot(Q||"(waiting for output...)")}catch{}},2e3)},[Pe]),et=(0,$.useCallback)(async(v,O="container")=>{en(),k(v),Mt(O),await R(v,O),H(v,O)},[R,H]),rt=(0,$.useCallback)(async v=>{en(),Mt(v),L&&(await R(L,v),H(L,v))},[L,R,H]),Et=()=>{en(),k(null),ot("")};(0,$.useEffect)(()=>()=>en(),[]);let be=v=>{let O=v.status==="running",I=["completed","failed","stopped","cancelled"].includes(v.status),Q=v.artifacts?.some(Ut=>Ut.endsWith(".md")&&Ut.startsWith("autosaves/")),J=v.artifacts?.some(Ut=>Ut.endsWith(".json")&&Ut.startsWith("autosaves/")),Gt=(()=>{let Ut=Vi.find(kn=>kn.image===v.image);return Ut?Ut.label.split(" ")[0]:null})(),Ct=(()=>{let Ut=v.command?.match(/-m\s+(\S+)/);return Ut?Ut[1]:v.model&&v.model!=="custom"?v.model:null})();return(0,b.jsxs)("div",{className:`rollout-task-card ${O?"is-running":""}`,children:[(0,b.jsxs)("div",{className:"rollout-task-card-header",children:[(0,b.jsxs)("div",{className:"rollout-task-card-left",children:[(0,b.jsx)("span",{className:"rollout-task-id",children:v.id}),Ct&&(0,b.jsx)("span",{className:"rollout-task-model",children:Ct}),Gt&&(0,b.jsx)("span",{className:"rollout-task-resolution",children:Gt}),v.tags.length>0&&(0,b.jsx)("span",{className:"rollout-task-tags",children:v.tags.join(", ")})]}),(0,b.jsx)("span",{className:`rollout-task-status ${v.status}`,children:v.status})]}),(0,b.jsx)("div",{className:"rollout-task-prompt",children:v.prompt}),(0,b.jsx)("div",{className:"rollout-task-command",children:v.command}),(0,b.jsxs)("div",{className:"rollout-task-meta",children:[v.startTime&&(0,b.jsxs)("span",{children:["\u23F1 ",Ex(v.startTime,O?null:v.endTime)]}),v.exitCode!==null&&(0,b.jsxs)("span",{children:["exit: ",v.exitCode]}),v.containerName&&(0,b.jsxs)("span",{children:["\u{1F4E6} ",v.containerName]}),v.artifacts?.length>0&&(0,b.jsxs)("span",{children:["\u{1F4CE} ",v.artifacts.length," files"]})]}),(0,b.jsxs)("div",{className:"rollout-task-actions",children:[(0,b.jsx)("button",{className:"btn rollout-btn-sm",onClick:()=>et(v,"container"),children:O?"Live Log":"Log"}),Q&&(0,b.jsx)("button",{className:"btn rollout-btn-sm",onClick:()=>et(v,"autosave"),children:"Autosave"}),I&&v.artifacts?.length>0&&(0,b.jsx)("button",{className:"btn rollout-btn-sm",onClick:()=>et(v,"artifacts"),children:"Artifacts"}),J&&(0,b.jsx)("a",{className:"btn rollout-btn-sm",href:Co(t,`/tasks/${v.id}/artifacts/${v.artifacts.find(Ut=>Ut.endsWith(".json")&&Ut.startsWith("autosaves/"))}`),target:"_blank",rel:"noreferrer",children:"JSON \u2197"}),O&&(0,b.jsx)("button",{className:"btn danger rollout-btn-sm",onClick:()=>st(v.id),children:"Stop"}),I&&(0,b.jsx)("button",{className:"btn rollout-btn-sm",onClick:()=>Dt(v.id),children:"Retry"})]})]},v.id)};return(0,b.jsxs)("div",{className:"rollout-app",children:[(0,b.jsxs)("div",{className:"rollout-stats",children:[(0,b.jsxs)("div",{className:"rollout-stat",onClick:()=>s("active"),style:{cursor:"pointer"},children:[(0,b.jsx)("div",{className:"rollout-stat-value rollout-running",children:se.running}),(0,b.jsx)("div",{className:"rollout-stat-label",children:"Running"})]}),(0,b.jsxs)("div",{className:"rollout-stat",onClick:()=>s("active"),style:{cursor:"pointer"},children:[(0,b.jsx)("div",{className:"rollout-stat-value rollout-queued",children:se.queued}),(0,b.jsx)("div",{className:"rollout-stat-label",children:"Queued"})]}),(0,b.jsxs)("div",{className:"rollout-stat",onClick:()=>{s("history"),f("completed")},style:{cursor:"pointer"},children:[(0,b.jsx)("div",{className:"rollout-stat-value rollout-completed",children:se.completed}),(0,b.jsx)("div",{className:"rollout-stat-label",children:"Completed"})]}),(0,b.jsxs)("div",{className:"rollout-stat",onClick:()=>{s("history"),f("failed")},style:{cursor:"pointer"},children:[(0,b.jsx)("div",{className:"rollout-stat-value rollout-failed",children:se.failed}),(0,b.jsx)("div",{className:"rollout-stat-label",children:"Failed"})]}),(0,b.jsxs)("div",{className:"rollout-stat",children:[(0,b.jsx)("div",{className:"rollout-stat-value",children:se.total}),(0,b.jsx)("div",{className:"rollout-stat-label",children:"Total"})]})]}),(0,b.jsxs)("div",{className:"rollout-tabs",children:[(0,b.jsxs)("button",{className:`rollout-tab ${o==="active"?"active":""}`,onClick:()=>s("active"),children:["Active (",Pt.length,")"]}),(0,b.jsxs)("button",{className:`rollout-tab ${o==="history"?"active":""}`,onClick:()=>s("history"),children:["History (",ge.length,")"]}),(0,b.jsxs)("button",{className:`rollout-tab ${o==="pool"?"active":""}`,onClick:()=>s("pool"),children:["Pool (",c?.containers.length??0,")"]}),(0,b.jsx)("div",{style:{flex:1}}),(0,b.jsx)("button",{className:"btn rollout-btn-sm",style:{marginRight:6},onClick:()=>{p("form"),C(!0)},children:"+ New Tasks"}),(0,b.jsx)("button",{className:"btn rollout-btn-sm",style:{marginRight:6},onClick:()=>{p("json"),C(!0)},children:"{ } JSON"}),(0,b.jsx)("button",{className:"btn rollout-btn-sm",onClick:ht,children:"Refresh"})]}),(0,b.jsxs)("div",{className:"rollout-body",children:[(0,b.jsxs)("div",{className:"rollout-sidebar",children:[(0,b.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Workers"}),(0,b.jsxs)("div",{className:"rollout-row",children:[(0,b.jsx)("input",{type:"number",className:"rollout-input rollout-input-sm",min:0,max:200,value:r,onChange:v=>a(v.target.value)}),(0,b.jsx)("button",{className:"btn",onClick:Z,children:"Apply"})]})]}),(0,b.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Container Pool"}),c&&c.containers.length>0?(0,b.jsxs)("div",{className:"rollout-pool-status",children:[(0,b.jsxs)("div",{className:"rollout-pool-counts",style:{display:"flex",gap:"8px",fontSize:"13px",marginBottom:"6px"},children:[(0,b.jsxs)("span",{style:{color:"#4caf50"},children:[c.idle," idle"]}),(0,b.jsxs)("span",{style:{color:"#ff9800"},children:[c.busy," busy"]}),(0,b.jsxs)("span",{style:{color:"#2196f3"},children:[c.starting," starting"]}),c.dead>0&&(0,b.jsxs)("span",{style:{color:"#f44336"},children:[c.dead," dead"]})]}),(0,b.jsxs)("div",{className:"rollout-row",children:[(0,b.jsx)("input",{type:"number",className:"rollout-input rollout-input-sm",min:0,max:50,value:d,onChange:v=>g(v.target.value)}),(0,b.jsx)("button",{className:"btn",onClick:()=>It(),children:"Warm"}),(0,b.jsx)("button",{className:"btn danger",onClick:Xe,children:"Drain"})]})]}):(0,b.jsxs)("div",{className:"rollout-row",children:[(0,b.jsx)("input",{type:"number",className:"rollout-input rollout-input-sm",min:0,max:50,value:d,onChange:v=>g(v.target.value)}),(0,b.jsx)("button",{className:"btn",onClick:()=>It(),children:"Start Pool"})]})]}),(0,b.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Quick Add"}),(0,b.jsx)("textarea",{className:"rollout-textarea",rows:3,placeholder:`One prompt per line...
70
+ Uses default model + image`,value:kt,onChange:v=>Qt(v.target.value)}),(0,b.jsxs)("div",{className:"rollout-row",style:{marginTop:4},children:[(0,b.jsx)("button",{className:"btn primary",style:{flex:1},onClick:lt,disabled:!kt.trim(),children:"Add"}),(0,b.jsx)("button",{className:"btn",onClick:()=>{p("form"),C(!0)},children:"+ Advanced"})]})]}),(0,b.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Bulk Actions"}),(0,b.jsxs)("div",{className:"rollout-row",children:[(0,b.jsx)("button",{className:"btn danger",onClick:Ne,children:"Stop All"}),(0,b.jsx)("button",{className:"btn",onClick:Vt,children:"Clear Done"})]})]}),l&&(0,b.jsxs)("div",{className:"rollout-sidebar-section",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Current Config"}),(0,b.jsxs)("div",{className:"rollout-config-info",children:[(0,b.jsxs)("div",{children:["Image: ",(0,b.jsx)("code",{children:l.config.image.split("/").pop()})]}),(0,b.jsxs)("div",{children:["Model: ",(0,b.jsx)("code",{children:l.config.model})]}),(0,b.jsxs)("div",{children:["Timeout: ",(0,b.jsxs)("code",{children:[l.config.timeout,"s"]})]}),(0,b.jsxs)("div",{children:["Resolution:"," ",(0,b.jsx)("code",{children:pp(l.config.image).replace("x24","")})]})]}),(0,b.jsxs)("details",{className:"rollout-form-details",style:{marginTop:12},children:[(0,b.jsx)("summary",{className:"rollout-label",style:{cursor:"pointer"},children:"Edit Server Defaults"}),(0,b.jsxs)("div",{className:"rollout-add-form",style:{marginTop:8},children:[(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Docker Image"}),(0,b.jsx)("input",{type:"text",className:"rollout-input",value:y,onChange:v=>T(v.target.value)})]}),(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Model"}),(0,b.jsx)("input",{type:"text",className:"rollout-input",list:"rollout-server-model-suggestions",value:N,onChange:v=>E(v.target.value)}),(0,b.jsx)("datalist",{id:"rollout-server-model-suggestions",children:Nx.map(v=>(0,b.jsx)("option",{value:v},v))})]}),(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Timeout (s)"}),(0,b.jsx)("input",{type:"number",min:1,className:"rollout-input",value:M,onChange:v=>z(v.target.value)})]}),(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Results Directory"}),(0,b.jsx)("input",{type:"text",className:"rollout-input",value:Y,onChange:v=>w(v.target.value)})]}),(0,b.jsxs)("div",{className:"rollout-form-group",children:[(0,b.jsx)("label",{className:"rollout-label",children:"Default Environment"}),(0,b.jsx)("textarea",{className:"rollout-textarea",rows:3,placeholder:`KEY=VALUE
71
+ ANOTHER_KEY=value`,value:P,onChange:v=>q(v.target.value)})]}),K&&(0,b.jsx)("div",{className:"rollout-json-error",children:K}),(0,b.jsxs)("div",{className:"rollout-row",children:[(0,b.jsx)("button",{className:"btn",onClick:j,children:"Reset"}),(0,b.jsx)("button",{className:"btn primary",onClick:F,disabled:B,children:B?"Saving...":"Save Defaults"})]})]})]})]})]}),(0,b.jsxs)("div",{className:"rollout-main",children:[o==="active"&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"rollout-main-header",children:(0,b.jsxs)("div",{className:"rollout-main-title",children:["Active Tasks",Pt.length===0&&(0,b.jsxs)("span",{className:"rollout-hint",children:[" ","\u2014 no running or queued tasks"]})]})}),(0,b.jsx)("div",{className:"rollout-task-list",children:Pt.length===0?(0,b.jsxs)("div",{className:"rollout-empty",children:["No active tasks. Use ",(0,b.jsx)("strong",{children:"+ New Tasks"})," or the sidebar to add prompts."]}):Pt.map(be)})]}),o==="history"&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"rollout-main-header",children:[(0,b.jsx)("div",{className:"rollout-main-title",children:"History"}),(0,b.jsx)("div",{className:"rollout-main-controls",children:(0,b.jsxs)("select",{className:"rollout-select",value:u,onChange:v=>f(v.target.value),children:[(0,b.jsx)("option",{value:"all",children:"All"}),(0,b.jsx)("option",{value:"completed",children:"Completed"}),(0,b.jsx)("option",{value:"failed",children:"Failed"}),(0,b.jsx)("option",{value:"stopped",children:"Stopped"})]})})]}),(0,b.jsx)("div",{className:"rollout-task-list",children:ge.length===0?(0,b.jsx)("div",{className:"rollout-empty",children:"No history tasks."}):ge.map(be)})]}),o==="pool"&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"rollout-main-header",children:[(0,b.jsxs)("div",{className:"rollout-main-title",children:["Container Pool",c&&(0,b.jsxs)("span",{className:"rollout-hint",children:[" ","\u2014 ",c.containers.length," containers (",c.enabled?"enabled":"disabled",")"]})]}),(0,b.jsx)("div",{className:"rollout-main-controls",children:(0,b.jsx)("button",{className:"btn danger",onClick:Le,children:"Destroy All"})})]}),(0,b.jsx)("div",{className:"rollout-task-list",children:!c||c.containers.length===0?(0,b.jsx)("div",{className:"rollout-empty",children:"No pool containers. Use the sidebar to start a pool."}):c.containers.map(v=>(0,b.jsxs)("div",{className:`rollout-task-card ${v.state==="busy"?"is-running":""}`,children:[(0,b.jsxs)("div",{className:"rollout-task-card-header",children:[(0,b.jsxs)("div",{className:"rollout-task-card-left",children:[(0,b.jsx)("span",{className:"rollout-task-id",children:v.name}),(0,b.jsxs)("span",{className:"rollout-task-model",children:["port:",v.mcpPort]})]}),(0,b.jsx)("span",{className:`rollout-task-status ${v.state==="idle"?"completed":v.state==="busy"?"running":v.state==="dead"?"failed":"queued"}`,children:v.state})]}),(0,b.jsxs)("div",{className:"rollout-task-meta",children:[(0,b.jsxs)("span",{children:["Started: ",new Date(v.startedAt).toLocaleTimeString()]}),(0,b.jsxs)("span",{children:["Uptime: ",Ex(v.startedAt,null)]}),(0,b.jsxs)("span",{children:["Tasks done: ",v.tasksCompleted]}),v.currentTaskId&&(0,b.jsxs)("span",{children:["Current: ",v.currentTaskId]}),v.lastHealthCheck&&(0,b.jsxs)("span",{children:["Last check:"," ",new Date(v.lastHealthCheck).toLocaleTimeString()]})]})]},v.name))})]})]})]}),l&&(0,b.jsx)(VN,{open:x,mode:h,config:l.config,onClose:()=>C(!1),onSubmit:W}),L&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("div",{className:"rollout-log-backdrop",onClick:Et}),(0,b.jsxs)("div",{className:"rollout-log-panel",children:[(0,b.jsxs)("div",{className:"rollout-log-header",children:[(0,b.jsxs)("h3",{children:[L.id," \u2014 ",L.prompt.slice(0,50),L.prompt.length>50?"...":""]}),(0,b.jsxs)("div",{className:"rollout-row",children:[L.status==="running"&&(Tt==="container"||Tt==="unity")&&(0,b.jsx)("span",{className:"rollout-live-dot",children:"\u25CF LIVE"}),(0,b.jsx)("button",{className:"btn",onClick:Et,children:"Close"})]})]}),(0,b.jsxs)("div",{className:"rollout-detail-tabs",children:[(0,b.jsx)("button",{className:`rollout-detail-tab ${Tt==="container"?"active":""}`,onClick:()=>rt("container"),children:L.status==="running"?"\u25CF Codely Log":"Codely Log"}),(0,b.jsx)("button",{className:`rollout-detail-tab ${Tt==="unity"?"active":""}`,onClick:()=>rt("unity"),children:"Unity Log"}),(0,b.jsx)("button",{className:`rollout-detail-tab ${Tt==="autosave"?"active":""}`,onClick:()=>rt("autosave"),children:"Autosave"}),(0,b.jsxs)("button",{className:`rollout-detail-tab ${Tt==="artifacts"?"active":""}`,onClick:()=>rt("artifacts"),children:["Artifacts (",L.artifacts?.length??0,")"]})]}),Tt==="artifacts"?(0,b.jsx)("div",{className:"rollout-artifact-list",children:(L.artifacts??[]).map(v=>(0,b.jsxs)("a",{className:"rollout-artifact-item",href:Co(t,`/tasks/${L.id}/artifacts/${v}`),target:"_blank",rel:"noreferrer",children:[(0,b.jsx)("span",{className:"rollout-artifact-icon",children:v.endsWith(".json")?"\u{1F4C4}":v.endsWith(".md")?"\u{1F4DD}":v.endsWith(".png")?"\u{1F5BC}\uFE0F":v.endsWith(".log")||v.endsWith(".txt")?"\u{1F4CB}":"\u{1F4CE}"}),v]},v))}):(0,b.jsx)("pre",{className:`rollout-log-content ${pe?"loading":""}`,children:S})]})]})]})};var wt=G(it(),1);function FN(t){return t?t.split("|").map(e=>e.trim()).filter(e=>e.length>0):[]}function QN(t){let e=[],n=/(^|\s)@([^\s]+)/g,l;for(;(l=n.exec(t))!==null;){let r=(l[2]??"").replace(/[),.;:!?]+$/g,"");r.length>0&&e.push(r)}return Array.from(new Set(e))}function GN(t){return t.kind==="tool"}function XN(t){return t.kind==="message"}var PN=({config:t})=>{let e=tb(t),{connection:n,sessionPhase:l,auth:i,availableCommands:r,planEntries:a,feed:o,tools:s,connect:u,sendPrompt:f,suggestPaths:c,completeSlashCommand:m,authenticate:d,statusText:g,permissionReq:x,resolvePermission:C,inputReq:h,resolveInput:p,isBusy:y,cancel:T}=cx({cwd:t.cwd??"",wsPath:t.wsPath??"/ws",yolo:!!t.yolo,resumeSessionId:e,autoConnect:e!==void 0}),[N,E]=(0,Ot.useState)(!1),M=(0,Ot.useRef)(null);Ot.default.useEffect(()=>(M.current&&clearTimeout(M.current),y?(E(!1),M.current=setTimeout(()=>{E(!0)},500)):E(!1),()=>{M.current&&clearTimeout(M.current)}),[y,o,s]);let[z,Y]=(0,Ot.useState)(null),w=(0,Ot.useRef)(null),[P,q]=(0,Ot.useState)("");ax(w,[P]);let[B,X]=(0,Ot.useState)([]),K=v=>{v.preventDefault();let O=v.dataTransfer;if(O.files&&O.files.length>0){let Q=Array.from(O.files).map(J=>({id:`file-${Date.now()}-${Math.random().toString(36).slice(2)}`,type:"file",label:J.name,uri:J.name}));X(J=>[...J,...Q]);return}let I=O.getData("text");if(I){let Q=/^https?:\/\//.test(I);X(J=>[...J,{id:`ref-${Date.now()}-${Math.random().toString(36).slice(2)}`,type:Q?"link":"default",label:I.length>30?I.slice(0,30)+"...":I,uri:I}])}},dt=v=>{X(O=>O.filter(I=>I.id!==v))},[kt,Qt]=(0,Ot.useState)(!1),[L,k]=(0,Ot.useState)(0),[Tt,Mt]=(0,Ot.useState)(!1),[S,ot]=(0,Ot.useState)(0),[pe,he]=(0,Ot.useState)([]),Ae=(0,Ot.useRef)(0),ht=(0,Ot.useMemo)(()=>{let v=P.trimStart();if(!v.startsWith("/"))return[];let O=v.slice(1),I=/\s$/.test(O),Q=O.split(/\s+/).filter(Ct=>Ct.length>0),J=Q,Gt="";if(!I&&Q.length>0&&(Gt=Q[Q.length-1]??"",J=Q.slice(0,-1)),J.length===0){let Ct=Gt;return(r??[]).filter(Ut=>Ut&&Ut.name&&Ut.name.startsWith(Ct)).slice(0,10)}if(J.length===1){let Ct=J[0]??"",Ut=(r??[]).find(D=>D.name===Ct),kn=FN(Ut?.input?.hint??null);if(kn.length===0)return[];let qe=Gt;return kn.filter(D=>D.startsWith(qe)).slice(0,10).map(D=>({name:`${Ct} ${D}`,description:Ut?.description??""}))}return[]},[r,P]),[se,Pt]=(0,Ot.useState)(!1),[ge,j]=(0,Ot.useState)(0),[F,Z]=(0,Ot.useState)([]),[W,lt]=(0,Ot.useState)(null),st=(0,Ot.useRef)(null),Dt=(0,Ot.useRef)(0),Ne=(v,O)=>{let I=v.slice(0,O),Q=I.lastIndexOf("@");if(Q<0||Q>0&&!/\s/.test(I[Q-1]??""))return null;let J=I.slice(Q+1);return/\s/.test(J)?null:{start:Q,end:O,query:J}},Vt=se&&F.length>0,It=Tt&&pe.length>0&&!Vt,Xe=kt&&ht.length>0&&!Vt&&!It;Ot.default.useEffect(()=>{let v=P.trimStart();if(!v.startsWith("/")){Mt(!1),he(qe=>qe.length===0?qe:[]),ot(0);return}let O=v.slice(1),I=/\s$/.test(O),Q=O.split(/\s+/).filter(qe=>qe.length>0);if(Q.length<2){Mt(!1),he(qe=>qe.length===0?qe:[]),ot(0);return}let J=Q.slice(2),Gt=J.length===0&&I,Ct=J.length===1&&!I;if(!Gt&&!Ct){Mt(!1),he(qe=>qe.length===0?qe:[]),ot(0);return}let Ut=++Ae.current,kn=setTimeout(()=>{(async()=>{let qe=await m(v,10);if(Ut!==Ae.current)return;let D=I?J:J.slice(0,-1),St=[...Q.slice(0,2),...D].join(" ").trim(),_t=qe.map(ee=>({name:`${St} ${ee}`.trim(),description:""}));he(_t),ot(0),Mt(_t.length>0)})()},120);return()=>clearTimeout(kn)},[m,P]),Ot.default.useEffect(()=>{if(!se||W===null)return;let v=++Dt.current,O=setTimeout(()=>{(async()=>{let I=await c(W,10);v===Dt.current&&(Z(I),j(0))})()},120);return()=>clearTimeout(O)},[W,se,c]);let Le=v=>{let O=ht[v];if(!O)return;let I=P.match(/^\s*/)?.[0]??"";q(`${I}/${O.name} `),Qt(!1),k(0),setTimeout(()=>w.current?.focus(),0)},en=v=>{let O=pe[v];if(!O)return;let I=P.match(/^\s*/)?.[0]??"";q(`${I}/${O.name} `),Mt(!1),ot(0),setTimeout(()=>w.current?.focus(),0)},Pe=v=>{let O=F[v],I=st.current;if(!O||!I)return;let Q=P.slice(0,I.start),J=P.slice(I.end),Gt=`@${O} `,Ct=`${Q}${Gt}${J}`;q(Ct),Pt(!1),Z([]),j(0),lt(null),st.current=null,setTimeout(()=>{let Ut=w.current;if(!Ut)return;Ut.focus();let kn=Q.length+Gt.length;Ut.setSelectionRange(kn,kn)},0)},R=async()=>{let v=P.trim();if(!v&&B.length===0)return;let O=[],Q=v||(B.length>0?"Attached references.":"");if(B.length>0){let J=B.map(Ct=>`[${Ct.label}](${Ct.uri})`).join(" ");B.some(Ct=>Ct.type!=="file")&&(Q=`${Q}
72
72
 
73
- References: ${X}`.trim())}T(""),K([]),ot(!1),Ot(0),B(!1),W([]),j(0),Re(null),Jt.current=null,F.push({type:"text",text:z});for(let X of NA(z))F.push({type:"resource_link",uri:`file://${X}`,name:X});for(let X of lt)X.type==="file"&&F.push({type:"resource_link",uri:`file://${X.uri}`,name:X.label||X.uri});await u({displayText:z,prompt:F})},_e=(0,Rt.useRef)(null),M=(0,Rt.useRef)(null),q=(0,Rt.useRef)(!0),et=()=>{_e.current&&_e.current.scrollIntoView({behavior:"auto",block:"end"})},at=(R,F=100)=>{let{scrollTop:S,scrollHeight:z,clientHeight:X}=R;return z-S-X<F};return Rt.default.useEffect(()=>{let R=M.current;if(!R)return;let F=()=>{q.current=at(R)};return R.addEventListener("scroll",F,{passive:!0}),()=>R.removeEventListener("scroll",F)},[]),Rt.default.useLayoutEffect(()=>{q.current&&et()},[r,a]),Rt.default.useEffect(()=>{if(e!=="disconnected")return;let R=setTimeout(()=>{o()},3e3);return()=>clearTimeout(R)},[e,o]),(0,Tt.jsxs)("div",{className:"app",children:[(0,Tt.jsxs)("div",{className:"main",children:[(0,Tt.jsxs)("div",{className:"content",ref:M,children:[e==="connected"&&m?(0,Tt.jsx)("div",{className:"session-notice",role:"status","aria-live":"polite",children:m}):null,r.map(R=>{if(RA(R)){let F=R.message;return(0,Tt.jsx)(zs,{message:F},F.id)}if(AA(R)){let F=a.find(S=>S.toolCallId===R.toolCallId);return F?(0,Tt.jsx)(Us,{tool:F,onOpenDiff:S=>D(S)},`tool_${R.toolCallId}`):null}return null}),y&&(0,Tt.jsx)("div",{className:"planning-indicator",children:i.find(R=>R.status==="in_progress")?.content||i.find(R=>R.status==="pending")?.content||"Planning next moves\u2026"}),(0,Tt.jsx)("div",{ref:_e,style:{height:20}})]}),(0,Tt.jsx)("div",{className:"composer",children:(0,Tt.jsxs)("div",{className:"composer-inner",children:[(0,Tt.jsxs)("div",{className:"input-wrap",onDragOver:R=>R.preventDefault(),onDrop:G,children:[lt.length>0&&(0,Tt.jsx)("div",{className:"composer-references",children:lt.map(R=>(0,Tt.jsxs)("div",{className:`ref-chip ${R.type}`,children:[(0,Tt.jsx)("span",{className:"ref-label",children:R.label}),(0,Tt.jsx)("button",{className:"ref-remove",onClick:()=>P(R.id),children:"\xD7"})]},R.id))}),Ye?(0,Tt.jsx)(I1,{items:V,activeIndex:Z,onPick:De,onHover:R=>j(R)}):null,Ke?(0,Tt.jsx)(ip,{items:k,activeIndex:Nt,onPick:yn,onHover:R=>At(R)}):null,Qt?(0,Tt.jsx)(ip,{items:me,activeIndex:gt,onPick:Me,onHover:R=>Ot(R)}):null,(0,Tt.jsx)(Wl,{textareaRef:L,value:I,placeholder:"Type a message\u2026 (use / for commands, @ for paths)",onChange:R=>{let F=R.target.value;T(F),ot(!0);let S=R.target.selectionStart??F.length,z=ce(F,S);Jt.current=z,Re(z?z.query:null),B(!!z),z||(W([]),j(0))},onKeyDown:R=>{if(Ye&&(R.key==="ArrowDown"||R.key==="ArrowUp")){R.preventDefault();let F=R.key==="ArrowDown"?1:-1,S=V.length;S>0&&j(z=>(z+F+S)%S);return}if(Ye&&(R.key==="Tab"||R.key==="Enter"&&!R.shiftKey)){R.preventDefault(),De(Z);return}if(Ke&&(R.key==="ArrowDown"||R.key==="ArrowUp")){R.preventDefault();let F=R.key==="ArrowDown"?1:-1,S=k.length;S>0&&At(z=>(z+F+S)%S);return}if(Ke&&(R.key==="Tab"||R.key==="Enter"&&!R.shiftKey)){R.preventDefault(),yn(Nt);return}if(Qt&&(R.key==="ArrowDown"||R.key==="ArrowUp")){R.preventDefault();let F=R.key==="ArrowDown"?1:-1,S=me.length;S>0&&Ot(z=>(z+F+S)%S);return}if(Qt&&R.key==="Tab"){R.preventDefault(),Me(gt);return}if(Qt&&R.key==="Enter"&&!R.shiftKey){R.preventDefault(),Me(gt);return}if(R.key==="Escape"){Ye?(B(!1),W([]),j(0),Re(null),Jt.current=null):Qt?(ot(!1),Ot(0)):Ke?(x(!1),ct([]),At(0)):p&&h();return}R.key==="Enter"&&!R.shiftKey&&(R.preventDefault(),Je())},isBusy:p,onSubmit:()=>void Je(),onCancel:h})]}),(0,Tt.jsxs)("div",{className:"composer-footer",children:[(0,Tt.jsxs)("div",{className:"workspace-info",title:t.cwd,children:["Workspace: ",t.cwd||"(unknown)"]}),(0,Tt.jsxs)("div",{className:"composer-footer-right",children:[(0,Tt.jsx)("div",{className:"hint",children:"Enter to send \xB7 Shift+Enter for newline \xB7 \u2191/\u2193 to pick command"}),(0,Tt.jsxs)("div",{className:"status-bar",onClick:()=>void o(),children:[e==="disconnected"&&(0,Tt.jsx)("span",{className:"status-text",children:m||"Disconnected"}),(0,Tt.jsx)("div",{className:`status-dot ${e}`,title:m||e})]})]})]})]})})]}),E?(0,Tt.jsx)(Qr,{title:E.title,oldText:E.oldText,newText:E.newText,onClose:()=>D(null)}):null,d?(0,Tt.jsx)(Y1,{req:d,onSelect:R=>{if(R.outcome==="cancelled"){g({outcome:{outcome:"cancelled"}});return}g({outcome:{outcome:"selected",optionId:R.optionId},...R.meta?{_meta:R.meta}:{}})}}):null,b?(0,Tt.jsx)(F1,{params:b,onDone:R=>{N(R)}}):null,n.open?(0,Tt.jsx)(Q1,{methods:n.methods,onPick:R=>void c(R),onClose:()=>{console.warn("Auth dialog closed by user")}}):null]})},hx=()=>{let t=Xv();if(Ed(t)==="control-plane"&&typeof window<"u"&&window.location.pathname.startsWith("/rollout")){let e=Ju(t);return(0,Tt.jsx)(px,{apiBase:e})}return Ed(t)==="control-plane"?(0,Tt.jsx)(ox,{config:t}):(0,Tt.jsx)(MA,{config:t})};var cp=Q(rt(),1);var vx=document.getElementById("app");if(!vx)throw new Error("Missing #app container");(0,yx.createRoot)(vx).render((0,cp.jsx)(gx.default.StrictMode,{children:(0,cp.jsx)(hx,{})}));
73
+ References: ${J}`.trim())}q(""),X([]),Qt(!1),k(0),Pt(!1),Z([]),j(0),lt(null),st.current=null,O.push({type:"text",text:Q});for(let J of QN(Q))O.push({type:"resource_link",uri:`file://${J}`,name:J});for(let J of B)J.type==="file"&&O.push({type:"resource_link",uri:`file://${J.uri}`,name:J.label||J.uri});await f({displayText:Q,prompt:O})},H=(0,Ot.useRef)(null),et=(0,Ot.useRef)(null),rt=(0,Ot.useRef)(!0),Et=()=>{H.current&&H.current.scrollIntoView({behavior:"auto",block:"end"})},be=(v,O=100)=>{let{scrollTop:I,scrollHeight:Q,clientHeight:J}=v;return Q-I-J<O};return Ot.default.useEffect(()=>{let v=et.current;if(!v)return;let O=()=>{rt.current=be(v)};return v.addEventListener("scroll",O,{passive:!0}),()=>v.removeEventListener("scroll",O)},[]),Ot.default.useLayoutEffect(()=>{rt.current&&Et()},[o,s]),Ot.default.useEffect(()=>{if(n!=="disconnected")return;let v=setTimeout(()=>{u()},3e3);return()=>clearTimeout(v)},[n,u]),(0,wt.jsxs)("div",{className:"app",children:[(0,wt.jsxs)("div",{className:"main",children:[(0,wt.jsxs)("div",{className:"content",ref:et,children:[n==="connected"&&g?(0,wt.jsx)("div",{className:"session-notice",role:"status","aria-live":"polite",children:g}):null,o.map(v=>{if(XN(v)){let O=v.message;return(0,wt.jsx)(Bu,{message:O},O.id)}if(GN(v)){let O=s.find(I=>I.toolCallId===v.toolCallId);return O?(0,wt.jsx)(qu,{tool:O,onOpenDiff:I=>Y(I)},`tool_${v.toolCallId}`):null}return null}),N&&(0,wt.jsx)("div",{className:"planning-indicator",children:a.find(v=>v.status==="in_progress")?.content||a.find(v=>v.status==="pending")?.content||"Planning next moves\u2026"}),(0,wt.jsx)("div",{ref:H,style:{height:20}})]}),(0,wt.jsx)("div",{className:"composer",children:(0,wt.jsxs)("div",{className:"composer-inner",children:[(0,wt.jsxs)("div",{className:"input-wrap",onDragOver:v=>v.preventDefault(),onDrop:K,children:[B.length>0&&(0,wt.jsx)("div",{className:"composer-references",children:B.map(v=>(0,wt.jsxs)("div",{className:`ref-chip ${v.type}`,children:[(0,wt.jsx)("span",{className:"ref-label",children:v.label}),(0,wt.jsx)("button",{className:"ref-remove",onClick:()=>dt(v.id),children:"\xD7"})]},v.id))}),Vt?(0,wt.jsx)(X1,{items:F,activeIndex:ge,onPick:Pe,onHover:v=>j(v)}):null,It?(0,wt.jsx)(sp,{items:pe,activeIndex:S,onPick:en,onHover:v=>ot(v)}):null,Xe?(0,wt.jsx)(sp,{items:ht,activeIndex:L,onPick:Le,onHover:v=>k(v)}):null,(0,wt.jsx)(ni,{textareaRef:w,value:P,placeholder:l==="resuming"?"Restoring previous session, please wait\u2026":"Type a message\u2026 (use / for commands, @ for paths)",disabled:l==="resuming",onChange:v=>{let O=v.target.value;q(O),Qt(!0);let I=v.target.selectionStart??O.length,Q=Ne(O,I);st.current=Q,lt(Q?Q.query:null),Pt(!!Q),Q||(Z([]),j(0))},onKeyDown:v=>{if(Vt&&(v.key==="ArrowDown"||v.key==="ArrowUp")){v.preventDefault();let O=v.key==="ArrowDown"?1:-1,I=F.length;I>0&&j(Q=>(Q+O+I)%I);return}if(Vt&&(v.key==="Tab"||v.key==="Enter"&&!v.shiftKey)){v.preventDefault(),Pe(ge);return}if(It&&(v.key==="ArrowDown"||v.key==="ArrowUp")){v.preventDefault();let O=v.key==="ArrowDown"?1:-1,I=pe.length;I>0&&ot(Q=>(Q+O+I)%I);return}if(It&&(v.key==="Tab"||v.key==="Enter"&&!v.shiftKey)){v.preventDefault(),en(S);return}if(Xe&&(v.key==="ArrowDown"||v.key==="ArrowUp")){v.preventDefault();let O=v.key==="ArrowDown"?1:-1,I=ht.length;I>0&&k(Q=>(Q+O+I)%I);return}if(Xe&&v.key==="Tab"){v.preventDefault(),Le(L);return}if(Xe&&v.key==="Enter"&&!v.shiftKey){v.preventDefault(),Le(L);return}if(v.key==="Escape"){Vt?(Pt(!1),Z([]),j(0),lt(null),st.current=null):Xe?(Qt(!1),k(0)):It?(Mt(!1),he([]),ot(0)):y&&T();return}v.key==="Enter"&&!v.shiftKey&&(v.metaKey||v.ctrlKey)&&(v.preventDefault(),R())},isBusy:y,onSubmit:()=>void R(),onCancel:T})]}),(0,wt.jsxs)("div",{className:"composer-footer",children:[(0,wt.jsxs)("div",{className:"workspace-info",title:t.cwd,children:["Workspace: ",t.cwd||"(unknown)"]}),(0,wt.jsxs)("div",{className:"composer-footer-right",children:[(0,wt.jsx)("div",{className:"hint",children:"Cmd/Ctrl+Enter to send \xB7 Enter for newline \xB7 \u2191/\u2193 to pick command"}),(0,wt.jsxs)("div",{className:"status-bar",onClick:()=>void u(),children:[n==="disconnected"&&(0,wt.jsx)("span",{className:"status-text",children:g||"Disconnected"}),(0,wt.jsx)("div",{className:`status-dot ${n}`,title:g||n})]})]})]})]})})]}),z?(0,wt.jsx)(Pr,{title:z.title,oldText:z.oldText,newText:z.newText,onClose:()=>Y(null)}):null,x?Yu(x)?(0,wt.jsx)(ex,{req:x,onSubmit:v=>{let O=x.options.find(I=>I.kind==="allow_once")??x.options[0];if(!O){C({outcome:{outcome:"cancelled"}});return}C({outcome:{outcome:"selected",optionId:O.optionId},_meta:tx(v)})},onCancel:()=>C({outcome:{outcome:"cancelled"}})}):(0,wt.jsx)(Z1,{req:x,onSelect:v=>{if(v.outcome==="cancelled"){C({outcome:{outcome:"cancelled"}});return}C({outcome:{outcome:"selected",optionId:v.optionId},...v.meta?{_meta:v.meta}:{}})}}):null,h?(0,wt.jsx)(lx,{params:h,onDone:v=>{p(v)}}):null,i.open?(0,wt.jsx)(ix,{methods:i.methods,onPick:v=>void d(v),onClose:()=>{console.warn("Auth dialog closed by user")}}):null]})},Mx=()=>{let t=Wv();if(Rd(t)==="control-plane"&&typeof window<"u"&&window.location.pathname.startsWith("/rollout")){let e=tu(t);return(0,wt.jsx)(Rx,{apiBase:e})}return Rd(t)==="control-plane"?(0,wt.jsx)(Sx,{config:t}):(0,wt.jsx)(PN,{config:t})};var gp=G(it(),1);var _x=document.getElementById("app");if(!_x)throw new Error("Missing #app container");(0,Ox.createRoot)(_x).render((0,gp.jsx)(Dx.default.StrictMode,{children:(0,gp.jsx)(Mx,{})}));
74
74
  /**
75
75
  * @license
76
76
  * Copyright 2025 Codely