zerogterm 0.2.0-alpha.1 → 0.2.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/main/main/main.js +42 -3
- package/dist/main/main/preload.cjs +7 -0
- package/dist/main/main/session-history.js +105 -0
- package/dist/main/main/session-service.js +82 -29
- package/dist/main/main/ssh-inventory.js +116 -0
- package/dist/renderer/assets/index-5pgRaxBt.css +1 -0
- package/dist/renderer/assets/index-BWVjX0UX.js +17 -0
- package/dist/renderer/index.html +2 -2
- package/package.json +2 -2
- package/dist/renderer/assets/index-BbPop_gF.js +0 -17
- package/dist/renderer/assets/index-CJwVZjfo.css +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
(function(){const ge=document.createElement("link").relList;if(ge&&ge.supports&&ge.supports("modulepreload"))return;for(const ue of document.querySelectorAll('link[rel="modulepreload"]'))Y(ue);new MutationObserver(ue=>{for(const Se of ue)if(Se.type==="childList")for(const J of Se.addedNodes)J.tagName==="LINK"&&J.rel==="modulepreload"&&Y(J)}).observe(document,{childList:!0,subtree:!0});function ce(ue){const Se={};return ue.integrity&&(Se.integrity=ue.integrity),ue.referrerPolicy&&(Se.referrerPolicy=ue.referrerPolicy),ue.crossOrigin==="use-credentials"?Se.credentials="include":ue.crossOrigin==="anonymous"?Se.credentials="omit":Se.credentials="same-origin",Se}function Y(ue){if(ue.ep)return;ue.ep=!0;const Se=ce(ue);fetch(ue.href,Se)}})();var So={exports:{}},Ir={};var xf;function nv(){if(xf)return Ir;xf=1;var re=Symbol.for("react.transitional.element"),ge=Symbol.for("react.fragment");function ce(Y,ue,Se){var J=null;if(Se!==void 0&&(J=""+Se),ue.key!==void 0&&(J=""+ue.key),"key"in ue){Se={};for(var f in ue)f!=="key"&&(Se[f]=ue[f])}else Se=ue;return ue=Se.ref,{$$typeof:re,type:Y,key:J,ref:ue!==void 0?ue:null,props:Se}}return Ir.Fragment=ge,Ir.jsx=ce,Ir.jsxs=ce,Ir}var Tf;function av(){return Tf||(Tf=1,So.exports=nv()),So.exports}var B=av(),yo={exports:{}},Ee={};var Rf;function lv(){if(Rf)return Ee;Rf=1;var re=Symbol.for("react.transitional.element"),ge=Symbol.for("react.portal"),ce=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),ue=Symbol.for("react.profiler"),Se=Symbol.for("react.consumer"),J=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),p=Symbol.iterator;function b(w){return w===null||typeof w!="object"?null:(w=p&&w[p]||w["@@iterator"],typeof w=="function"?w:null)}var D={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,o={};function c(w,M,G){this.props=w,this.context=M,this.refs=o,this.updater=G||D}c.prototype.isReactComponent={},c.prototype.setState=function(w,M){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,M,"setState")},c.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function a(){}a.prototype=c.prototype;function l(w,M,G){this.props=w,this.context=M,this.refs=o,this.updater=G||D}var _=l.prototype=new a;_.constructor=l,g(_,c.prototype),_.isPureReactComponent=!0;var C=Array.isArray;function y(){}var E={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function x(w,M,G){var W=G.ref;return{$$typeof:re,type:w,key:M,ref:W!==void 0?W:null,props:G}}function N(w,M){return x(w.type,M,w.props)}function H(w){return typeof w=="object"&&w!==null&&w.$$typeof===re}function q(w){var M={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(G){return M[G]})}var O=/\/+/g;function Z(w,M){return typeof w=="object"&&w!==null&&w.key!=null?q(""+w.key):M.toString(36)}function ne(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(y,y):(w.status="pending",w.then(function(M){w.status==="pending"&&(w.status="fulfilled",w.value=M)},function(M){w.status==="pending"&&(w.status="rejected",w.reason=M)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function U(w,M,G,W,le){var oe=typeof w;(oe==="undefined"||oe==="boolean")&&(w=null);var z=!1;if(w===null)z=!0;else switch(oe){case"bigint":case"string":case"number":z=!0;break;case"object":switch(w.$$typeof){case re:case ge:z=!0;break;case S:return z=w._init,U(z(w._payload),M,G,W,le)}}if(z)return le=le(w),z=W===""?"."+Z(w,0):W,C(le)?(G="",z!=null&&(G=z.replace(O,"$&/")+"/"),U(le,M,G,"",function(ae){return ae})):le!=null&&(H(le)&&(le=N(le,G+(le.key==null||w&&w.key===le.key?"":(""+le.key).replace(O,"$&/")+"/")+z)),M.push(le)),1;z=0;var R=W===""?".":W+":";if(C(w))for(var $=0;$<w.length;$++)W=w[$],oe=R+Z(W,$),z+=U(W,M,G,oe,le);else if($=b(w),typeof $=="function")for(w=$.call(w),$=0;!(W=w.next()).done;)W=W.value,oe=R+Z(W,$++),z+=U(W,M,G,oe,le);else if(oe==="object"){if(typeof w.then=="function")return U(ne(w),M,G,W,le);throw M=String(w),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return z}function F(w,M,G){if(w==null)return w;var W=[],le=0;return U(w,W,"","",function(oe){return M.call(G,oe,le++)}),W}function Q(w){if(w._status===-1){var M=w._result;M=M(),M.then(function(G){(w._status===0||w._status===-1)&&(w._status=1,w._result=G)},function(G){(w._status===0||w._status===-1)&&(w._status=2,w._result=G)}),w._status===-1&&(w._status=0,w._result=M)}if(w._status===1)return w._result.default;throw w._result}var A=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},L={map:F,forEach:function(w,M,G){F(w,function(){M.apply(this,arguments)},G)},count:function(w){var M=0;return F(w,function(){M++}),M},toArray:function(w){return F(w,function(M){return M})||[]},only:function(w){if(!H(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return Ee.Activity=u,Ee.Children=L,Ee.Component=c,Ee.Fragment=ce,Ee.Profiler=ue,Ee.PureComponent=l,Ee.StrictMode=Y,Ee.Suspense=h,Ee.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=E,Ee.__COMPILER_RUNTIME={__proto__:null,c:function(w){return E.H.useMemoCache(w)}},Ee.cache=function(w){return function(){return w.apply(null,arguments)}},Ee.cacheSignal=function(){return null},Ee.cloneElement=function(w,M,G){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var W=g({},w.props),le=w.key;if(M!=null)for(oe in M.key!==void 0&&(le=""+M.key),M)!v.call(M,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&M.ref===void 0||(W[oe]=M[oe]);var oe=arguments.length-2;if(oe===1)W.children=G;else if(1<oe){for(var z=Array(oe),R=0;R<oe;R++)z[R]=arguments[R+2];W.children=z}return x(w.type,le,W)},Ee.createContext=function(w){return w={$$typeof:J,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:Se,_context:w},w},Ee.createElement=function(w,M,G){var W,le={},oe=null;if(M!=null)for(W in M.key!==void 0&&(oe=""+M.key),M)v.call(M,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(le[W]=M[W]);var z=arguments.length-2;if(z===1)le.children=G;else if(1<z){for(var R=Array(z),$=0;$<z;$++)R[$]=arguments[$+2];le.children=R}if(w&&w.defaultProps)for(W in z=w.defaultProps,z)le[W]===void 0&&(le[W]=z[W]);return x(w,oe,le)},Ee.createRef=function(){return{current:null}},Ee.forwardRef=function(w){return{$$typeof:f,render:w}},Ee.isValidElement=H,Ee.lazy=function(w){return{$$typeof:S,_payload:{_status:-1,_result:w},_init:Q}},Ee.memo=function(w,M){return{$$typeof:d,type:w,compare:M===void 0?null:M}},Ee.startTransition=function(w){var M=E.T,G={};E.T=G;try{var W=w(),le=E.S;le!==null&&le(G,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(y,A)}catch(oe){A(oe)}finally{M!==null&&G.types!==null&&(M.types=G.types),E.T=M}},Ee.unstable_useCacheRefresh=function(){return E.H.useCacheRefresh()},Ee.use=function(w){return E.H.use(w)},Ee.useActionState=function(w,M,G){return E.H.useActionState(w,M,G)},Ee.useCallback=function(w,M){return E.H.useCallback(w,M)},Ee.useContext=function(w){return E.H.useContext(w)},Ee.useDebugValue=function(){},Ee.useDeferredValue=function(w,M){return E.H.useDeferredValue(w,M)},Ee.useEffect=function(w,M){return E.H.useEffect(w,M)},Ee.useEffectEvent=function(w){return E.H.useEffectEvent(w)},Ee.useId=function(){return E.H.useId()},Ee.useImperativeHandle=function(w,M,G){return E.H.useImperativeHandle(w,M,G)},Ee.useInsertionEffect=function(w,M){return E.H.useInsertionEffect(w,M)},Ee.useLayoutEffect=function(w,M){return E.H.useLayoutEffect(w,M)},Ee.useMemo=function(w,M){return E.H.useMemo(w,M)},Ee.useOptimistic=function(w,M){return E.H.useOptimistic(w,M)},Ee.useReducer=function(w,M,G){return E.H.useReducer(w,M,G)},Ee.useRef=function(w){return E.H.useRef(w)},Ee.useState=function(w){return E.H.useState(w)},Ee.useSyncExternalStore=function(w,M,G){return E.H.useSyncExternalStore(w,M,G)},Ee.useTransition=function(){return E.H.useTransition()},Ee.version="19.2.8",Ee}var Mf;function Ro(){return Mf||(Mf=1,yo.exports=lv()),yo.exports}var Oe=Ro(),bo={exports:{}},Gr={},Co={exports:{}},Eo={};var Lf;function ov(){return Lf||(Lf=1,(function(re){function ge(U,F){var Q=U.length;U.push(F);e:for(;0<Q;){var A=Q-1>>>1,L=U[A];if(0<ue(L,F))U[A]=F,U[Q]=L,Q=A;else break e}}function ce(U){return U.length===0?null:U[0]}function Y(U){if(U.length===0)return null;var F=U[0],Q=U.pop();if(Q!==F){U[0]=Q;e:for(var A=0,L=U.length,w=L>>>1;A<w;){var M=2*(A+1)-1,G=U[M],W=M+1,le=U[W];if(0>ue(G,Q))W<L&&0>ue(le,G)?(U[A]=le,U[W]=Q,A=W):(U[A]=G,U[M]=Q,A=M);else if(W<L&&0>ue(le,Q))U[A]=le,U[W]=Q,A=W;else break e}}return F}function ue(U,F){var Q=U.sortIndex-F.sortIndex;return Q!==0?Q:U.id-F.id}if(re.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var Se=performance;re.unstable_now=function(){return Se.now()}}else{var J=Date,f=J.now();re.unstable_now=function(){return J.now()-f}}var h=[],d=[],S=1,u=null,p=3,b=!1,D=!1,g=!1,o=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function _(U){for(var F=ce(d);F!==null;){if(F.callback===null)Y(d);else if(F.startTime<=U)Y(d),F.sortIndex=F.expirationTime,ge(h,F);else break;F=ce(d)}}function C(U){if(g=!1,_(U),!D)if(ce(h)!==null)D=!0,y||(y=!0,q());else{var F=ce(d);F!==null&&ne(C,F.startTime-U)}}var y=!1,E=-1,v=5,x=-1;function N(){return o?!0:!(re.unstable_now()-x<v)}function H(){if(o=!1,y){var U=re.unstable_now();x=U;var F=!0;try{e:{D=!1,g&&(g=!1,a(E),E=-1),b=!0;var Q=p;try{t:{for(_(U),u=ce(h);u!==null&&!(u.expirationTime>U&&N());){var A=u.callback;if(typeof A=="function"){u.callback=null,p=u.priorityLevel;var L=A(u.expirationTime<=U);if(U=re.unstable_now(),typeof L=="function"){u.callback=L,_(U),F=!0;break t}u===ce(h)&&Y(h),_(U)}else Y(h);u=ce(h)}if(u!==null)F=!0;else{var w=ce(d);w!==null&&ne(C,w.startTime-U),F=!1}}break e}finally{u=null,p=Q,b=!1}F=void 0}}finally{F?q():y=!1}}}var q;if(typeof l=="function")q=function(){l(H)};else if(typeof MessageChannel<"u"){var O=new MessageChannel,Z=O.port2;O.port1.onmessage=H,q=function(){Z.postMessage(null)}}else q=function(){c(H,0)};function ne(U,F){E=c(function(){U(re.unstable_now())},F)}re.unstable_IdlePriority=5,re.unstable_ImmediatePriority=1,re.unstable_LowPriority=4,re.unstable_NormalPriority=3,re.unstable_Profiling=null,re.unstable_UserBlockingPriority=2,re.unstable_cancelCallback=function(U){U.callback=null},re.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<U?Math.floor(1e3/U):5},re.unstable_getCurrentPriorityLevel=function(){return p},re.unstable_next=function(U){switch(p){case 1:case 2:case 3:var F=3;break;default:F=p}var Q=p;p=F;try{return U()}finally{p=Q}},re.unstable_requestPaint=function(){o=!0},re.unstable_runWithPriority=function(U,F){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var Q=p;p=U;try{return F()}finally{p=Q}},re.unstable_scheduleCallback=function(U,F,Q){var A=re.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0<Q?A+Q:A):Q=A,U){case 1:var L=-1;break;case 2:L=250;break;case 5:L=1073741823;break;case 4:L=1e4;break;default:L=5e3}return L=Q+L,U={id:S++,callback:F,priorityLevel:U,startTime:Q,expirationTime:L,sortIndex:-1},Q>A?(U.sortIndex=Q,ge(d,U),ce(h)===null&&U===ce(d)&&(g?(a(E),E=-1):g=!0,ne(C,Q-A))):(U.sortIndex=L,ge(h,U),D||b||(D=!0,y||(y=!0,q()))),U},re.unstable_shouldYield=N,re.unstable_wrapCallback=function(U){var F=p;return function(){var Q=p;p=F;try{return U.apply(this,arguments)}finally{p=Q}}}})(Eo)),Eo}var Of;function cv(){return Of||(Of=1,Co.exports=ov()),Co.exports}var wo={exports:{}},vt={};var Bf;function uv(){if(Bf)return vt;Bf=1;var re=Ro();function ge(h){var d="https://react.dev/errors/"+h;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var S=2;S<arguments.length;S++)d+="&args[]="+encodeURIComponent(arguments[S])}return"Minified React error #"+h+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ce(){}var Y={d:{f:ce,r:function(){throw Error(ge(522))},D:ce,C:ce,L:ce,m:ce,X:ce,S:ce,M:ce},p:0,findDOMNode:null},ue=Symbol.for("react.portal");function Se(h,d,S){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ue,key:u==null?null:""+u,children:h,containerInfo:d,implementation:S}}var J=re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,d){if(h==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return vt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,vt.createPortal=function(h,d){var S=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(ge(299));return Se(h,d,null,S)},vt.flushSync=function(h){var d=J.T,S=Y.p;try{if(J.T=null,Y.p=2,h)return h()}finally{J.T=d,Y.p=S,Y.d.f()}},vt.preconnect=function(h,d){typeof h=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,Y.d.C(h,d))},vt.prefetchDNS=function(h){typeof h=="string"&&Y.d.D(h)},vt.preinit=function(h,d){if(typeof h=="string"&&d&&typeof d.as=="string"){var S=d.as,u=f(S,d.crossOrigin),p=typeof d.integrity=="string"?d.integrity:void 0,b=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;S==="style"?Y.d.S(h,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:u,integrity:p,fetchPriority:b}):S==="script"&&Y.d.X(h,{crossOrigin:u,integrity:p,fetchPriority:b,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},vt.preinitModule=function(h,d){if(typeof h=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var S=f(d.as,d.crossOrigin);Y.d.M(h,{crossOrigin:S,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&Y.d.M(h)},vt.preload=function(h,d){if(typeof h=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var S=d.as,u=f(S,d.crossOrigin);Y.d.L(h,S,{crossOrigin:u,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},vt.preloadModule=function(h,d){if(typeof h=="string")if(d){var S=f(d.as,d.crossOrigin);Y.d.m(h,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:S,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else Y.d.m(h)},vt.requestFormReset=function(h){Y.d.r(h)},vt.unstable_batchedUpdates=function(h,d){return h(d)},vt.useFormState=function(h,d,S){return J.H.useFormState(h,d,S)},vt.useFormStatus=function(){return J.H.useHostTransitionStatus()},vt.version="19.2.8",vt}var kf;function hv(){if(kf)return wo.exports;kf=1;function re(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(re)}catch(ge){console.error(ge)}}return re(),wo.exports=uv(),wo.exports}var Hf;function fv(){if(Hf)return Gr;Hf=1;var re=cv(),ge=Ro(),ce=hv();function Y(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ue(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Se(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function J(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function h(e){if(Se(e)!==e)throw Error(Y(188))}function d(e){var t=e.alternate;if(!t){if(t=Se(e),t===null)throw Error(Y(188));return t!==e?null:e}for(var i=e,s=t;;){var r=i.return;if(r===null)break;var n=r.alternate;if(n===null){if(s=r.return,s!==null){i=s;continue}break}if(r.child===n.child){for(n=r.child;n;){if(n===i)return h(r),e;if(n===s)return h(r),t;n=n.sibling}throw Error(Y(188))}if(i.return!==s.return)i=r,s=n;else{for(var m=!1,T=r.child;T;){if(T===i){m=!0,i=r,s=n;break}if(T===s){m=!0,s=r,i=n;break}T=T.sibling}if(!m){for(T=n.child;T;){if(T===i){m=!0,i=n,s=r;break}if(T===s){m=!0,s=n,i=r;break}T=T.sibling}if(!m)throw Error(Y(189))}}if(i.alternate!==s)throw Error(Y(190))}if(i.tag!==3)throw Error(Y(188));return i.stateNode.current===i?e:t}function S(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=S(e),t!==null)return t;e=e.sibling}return null}var u=Object.assign,p=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),g=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),N=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function q(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var O=Symbol.for("react.client.reference");function Z(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===O?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case g:return"Fragment";case c:return"Profiler";case o:return"StrictMode";case C:return"Suspense";case y:return"SuspenseList";case x:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case l:return e.displayName||"Context";case a:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case E:return t=e.displayName||null,t!==null?t:Z(e.type)||"Memo";case v:t=e._payload,e=e._init;try{return Z(e(t))}catch{}}return null}var ne=Array.isArray,U=ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=ce.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},A=[],L=-1;function w(e){return{current:e}}function M(e){0>L||(e.current=A[L],A[L]=null,L--)}function G(e,t){L++,A[L]=e.current,e.current=t}var W=w(null),le=w(null),oe=w(null),z=w(null);function R(e,t){switch(G(oe,t),G(le,e),G(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ph(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ph(t),e=Zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(W),G(W,e)}function $(){M(W),M(le),M(oe)}function ae(e){e.memoizedState!==null&&G(z,e);var t=W.current,i=Zh(t,e.type);t!==i&&(G(le,e),G(W,i))}function de(e){le.current===e&&(M(W),M(le)),z.current===e&&(M(z),Nr._currentValue=Q)}var fe,Ae;function ke(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",Ae=-1<i.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+fe+e+Ae}var Ne=!1;function et(e,t){if(!e||Ne)return"";Ne=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var se=function(){throw Error()};if(Object.defineProperty(se.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(se,[])}catch(P){var X=P}Reflect.construct(e,[],se)}else{try{se.call()}catch(P){X=P}e.call(se.prototype)}}else{try{throw Error()}catch(P){X=P}(se=e())&&typeof se.catch=="function"&&se.catch(function(){})}}catch(P){if(P&&X&&typeof P.stack=="string")return[P.stack,X.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var n=s.DetermineComponentFrameRoot(),m=n[0],T=n[1];if(m&&T){var k=m.split(`
|
|
4
|
-
`),V=T.split(`
|
|
5
|
-
`);for(r=s=0;s<k.length&&!k[s].includes("DetermineComponentFrameRoot");)s++;for(;r<V.length&&!V[r].includes("DetermineComponentFrameRoot");)r++;if(s===k.length||r===V.length)for(s=k.length-1,r=V.length-1;1<=s&&0<=r&&k[s]!==V[r];)r--;for(;1<=s&&0<=r;s--,r--)if(k[s]!==V[r]){if(s!==1||r!==1)do if(s--,r--,0>r||k[s]!==V[r]){var ee=`
|
|
6
|
-
`+k[s].replace(" at new "," at ");return e.displayName&&ee.includes("<anonymous>")&&(ee=ee.replace("<anonymous>",e.displayName)),ee}while(1<=s&&0<=r);break}}}finally{Ne=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?ke(i):""}function be(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke("Lazy");case 13:return e.child!==t&&t!==null?ke("Suspense Fallback"):ke("Suspense");case 19:return ke("SuspenseList");case 0:case 15:return et(e.type,!1);case 11:return et(e.type.render,!1);case 1:return et(e.type,!0);case 31:return ke("Activity");default:return""}}function Kt(e){try{var t="",i=null;do t+=be(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
|
-
Error generating stack: `+s.message+`
|
|
8
|
-
`+s.stack}}var ei=Object.prototype.hasOwnProperty,ti=re.unstable_scheduleCallback,Wt=re.unstable_cancelCallback,yi=re.unstable_shouldYield,ct=re.unstable_requestPaint,Pe=re.unstable_now,mt=re.unstable_getCurrentPriorityLevel,Pt=re.unstable_ImmediatePriority,te=re.unstable_UserBlockingPriority,_e=re.unstable_NormalPriority,he=re.unstable_LowPriority,pe=re.unstable_IdlePriority,nt=re.log,Be=re.unstable_setDisableYieldValue,Fi=null,Dt=null;function bi(e){if(typeof nt=="function"&&Be(e),Dt&&typeof Dt.setStrictMode=="function")try{Dt.setStrictMode(Fi,e)}catch{}}var At=Math.clz32?Math.clz32:Vf,Yf=Math.log,Kf=Math.LN2;function Vf(e){return e>>>=0,e===0?32:31-(Yf(e)/Kf|0)|0}var Yr=256,Kr=262144,Vr=4194304;function Wi(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xr(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var T=s&134217727;return T!==0?(s=T&~n,s!==0?r=Wi(s):(m&=T,m!==0?r=Wi(m):i||(i=T&~e,i!==0&&(r=Wi(i))))):(T=s&~n,T!==0?r=Wi(T):m!==0?r=Wi(m):i||(i=s&~e,i!==0&&(r=Wi(i)))),r===0?0:t!==0&&t!==r&&(t&n)===0&&(n=r&-r,i=t&-t,n>=i||n===32&&(i&4194048)!==0)?t:r}function Zs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xf(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Mo(){var e=Vr;return Vr<<=1,(Vr&62914560)===0&&(Vr=4194304),e}function aa(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Qs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ff(e,t,i,s,r,n){var m=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var T=e.entanglements,k=e.expirationTimes,V=e.hiddenUpdates;for(i=m&~i;0<i;){var ee=31-At(i),se=1<<ee;T[ee]=0,k[ee]=-1;var X=V[ee];if(X!==null)for(V[ee]=null,ee=0;ee<X.length;ee++){var P=X[ee];P!==null&&(P.lane&=-536870913)}i&=~se}s!==0&&Lo(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(m&~t))}function Lo(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-At(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Oo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-At(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function Bo(e,t){var i=t&-t;return i=(i&42)!==0?1:la(i),(i&(e.suspendedLanes|t))!==0?0:i}function la(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function oa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ko(){var e=F.p;return e!==0?e:(e=window.event,e===void 0?32:yf(e.type))}function Ho(e,t){var i=F.p;try{return F.p=e,t()}finally{F.p=i}}var Ci=Math.random().toString(36).slice(2),ut="__reactFiber$"+Ci,pt="__reactProps$"+Ci,fs="__reactContainer$"+Ci,ca="__reactEvents$"+Ci,Wf="__reactListeners$"+Ci,Pf="__reactHandles$"+Ci,zo="__reactResources$"+Ci,$s="__reactMarker$"+Ci;function ua(e){delete e[ut],delete e[pt],delete e[ca],delete e[Wf],delete e[Pf]}function ds(e){var t=e[ut];if(t)return t;for(var i=e.parentNode;i;){if(t=i[fs]||i[ut]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=rf(e);e!==null;){if(i=e[ut])return i;e=rf(e)}return t}e=i,i=e.parentNode}return null}function _s(e){if(e=e[ut]||e[fs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Js(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(Y(33))}function vs(e){var t=e[zo];return t||(t=e[zo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function lt(e){e[$s]=!0}var No=new Set,jo={};function Pi(e,t){gs(e,t),gs(e+"Capture",t)}function gs(e,t){for(jo[e]=t,e=0;e<t.length;e++)No.add(t[e])}var Zf=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]*$"),Uo={},qo={};function Qf(e){return ei.call(qo,e)?!0:ei.call(Uo,e)?!1:Zf.test(e)?qo[e]=!0:(Uo[e]=!0,!1)}function Fr(e,t,i){if(Qf(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function Wr(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function ii(e,t,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+s)}}function kt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Io(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function $f(e,t,i){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,n=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(m){i=""+m,n.call(this,m)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(m){i=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ha(e){if(!e._valueTracker){var t=Io(e)?"checked":"value";e._valueTracker=$f(e,t,""+e[t])}}function Go(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Io(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function Pr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Jf=/[\n"\\]/g;function Ht(e){return e.replace(Jf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function fa(e,t,i,s,r,n,m,T){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.type=m:e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kt(t)):e.value!==""+kt(t)&&(e.value=""+kt(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?da(e,m,kt(t)):i!=null?da(e,m,kt(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?e.name=""+kt(T):e.removeAttribute("name")}function Yo(e,t,i,s,r,n,m,T){if(n!=null&&typeof n!="function"&&typeof n!="symbol"&&typeof n!="boolean"&&(e.type=n),t!=null||i!=null){if(!(n!=="submit"&&n!=="reset"||t!=null)){ha(e);return}i=i!=null?""+kt(i):"",t=t!=null?""+kt(t):i,T||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=T?e.checked:!!s,e.defaultChecked=!!s,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),ha(e)}function da(e,t,i){t==="number"&&Pr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ms(e,t,i,s){if(e=e.options,t){t={};for(var r=0;r<i.length;r++)t["$"+i[r]]=!0;for(i=0;i<e.length;i++)r=t.hasOwnProperty("$"+e[i].value),e[i].selected!==r&&(e[i].selected=r),r&&s&&(e[i].defaultSelected=!0)}else{for(i=""+kt(i),t=null,r=0;r<e.length;r++){if(e[r].value===i){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Ko(e,t,i){if(t!=null&&(t=""+kt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+kt(i):""}function Vo(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(Y(92));if(ne(s)){if(1<s.length)throw Error(Y(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=kt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),ha(e)}function ps(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var ed=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 Xo(e,t,i){var s=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,i):typeof i!="number"||i===0||ed.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Fo(e,t,i){if(t!=null&&typeof t!="object")throw Error(Y(62));if(e=e.style,i!=null){for(var s in i)!i.hasOwnProperty(s)||t!=null&&t.hasOwnProperty(s)||(s.indexOf("--")===0?e.setProperty(s,""):s==="float"?e.cssFloat="":e[s]="");for(var r in t)s=t[r],t.hasOwnProperty(r)&&i[r]!==s&&Xo(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&Xo(e,n,t[n])}function _a(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var td=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"]]),id=/^[\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 Zr(e){return id.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function si(){}var va=null;function ga(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ss=null,ys=null;function Wo(e){var t=_s(e);if(t&&(e=t.stateNode)){var i=e[pt]||null;e:switch(e=t.stateNode,t.type){case"input":if(fa(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Ht(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[pt]||null;if(!r)throw Error(Y(90));fa(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&Go(s)}break e;case"textarea":Ko(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&ms(e,!!i.multiple,t,!1)}}}var ma=!1;function Po(e,t,i){if(ma)return e(t,i);ma=!0;try{var s=e(t);return s}finally{if(ma=!1,(Ss!==null||ys!==null)&&(jn(),Ss&&(t=Ss,e=ys,ys=Ss=null,Wo(t),e)))for(t=0;t<e.length;t++)Wo(e[t])}}function er(e,t){var i=e.stateNode;if(i===null)return null;var s=i[pt]||null;if(s===null)return null;i=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(Y(231,t,typeof i));return i}var ri=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pa=!1;if(ri)try{var tr={};Object.defineProperty(tr,"passive",{get:function(){pa=!0}}),window.addEventListener("test",tr,tr),window.removeEventListener("test",tr,tr)}catch{pa=!1}var Ei=null,Sa=null,Qr=null;function Zo(){if(Qr)return Qr;var e,t=Sa,i=t.length,s,r="value"in Ei?Ei.value:Ei.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var m=i-e;for(s=1;s<=m&&t[i-s]===r[n-s];s++);return Qr=r.slice(e,1<s?1-s:void 0)}function $r(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Jr(){return!0}function Qo(){return!1}function St(e){function t(i,s,r,n,m){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=m,this.currentTarget=null;for(var T in e)e.hasOwnProperty(T)&&(i=e[T],this[T]=i?i(n):n[T]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?Jr:Qo,this.isPropagationStopped=Qo,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Jr)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Jr)},persist:function(){},isPersistent:Jr}),t}var Zi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},en=St(Zi),ir=u({},Zi,{view:0,detail:0}),sd=St(ir),ya,ba,sr,tn=u({},ir,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ea,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==sr&&(sr&&e.type==="mousemove"?(ya=e.screenX-sr.screenX,ba=e.screenY-sr.screenY):ba=ya=0,sr=e),ya)},movementY:function(e){return"movementY"in e?e.movementY:ba}}),$o=St(tn),rd=u({},tn,{dataTransfer:0}),nd=St(rd),ad=u({},ir,{relatedTarget:0}),Ca=St(ad),ld=u({},Zi,{animationName:0,elapsedTime:0,pseudoElement:0}),od=St(ld),cd=u({},Zi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ud=St(cd),hd=u({},Zi,{data:0}),Jo=St(hd),fd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dd={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"},_d={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_d[e])?!!t[e]:!1}function Ea(){return vd}var gd=u({},ir,{key:function(e){if(e.key){var t=fd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=$r(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ea,charCode:function(e){return e.type==="keypress"?$r(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?$r(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),md=St(gd),pd=u({},tn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ec=St(pd),Sd=u({},ir,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ea}),yd=St(Sd),bd=u({},Zi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Cd=St(bd),Ed=u({},tn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),wd=St(Ed),Dd=u({},Zi,{newState:0,oldState:0}),Ad=St(Dd),xd=[9,13,27,32],wa=ri&&"CompositionEvent"in window,rr=null;ri&&"documentMode"in document&&(rr=document.documentMode);var Td=ri&&"TextEvent"in window&&!rr,tc=ri&&(!wa||rr&&8<rr&&11>=rr),ic=" ",sc=!1;function rc(e,t){switch(e){case"keyup":return xd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bs=!1;function Rd(e,t){switch(e){case"compositionend":return nc(t);case"keypress":return t.which!==32?null:(sc=!0,ic);case"textInput":return e=t.data,e===ic&&sc?null:e;default:return null}}function Md(e,t){if(bs)return e==="compositionend"||!wa&&rc(e,t)?(e=Zo(),Qr=Sa=Ei=null,bs=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return tc&&t.locale!=="ko"?null:t.data;default:return null}}var Ld={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 ac(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ld[e.type]:t==="textarea"}function lc(e,t,i,s){Ss?ys?ys.push(s):ys=[s]:Ss=s,t=Vn(t,"onChange"),0<t.length&&(i=new en("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var nr=null,ar=null;function Od(e){Yh(e,0)}function sn(e){var t=Js(e);if(Go(t))return e}function oc(e,t){if(e==="change")return t}var cc=!1;if(ri){var Da;if(ri){var Aa="oninput"in document;if(!Aa){var uc=document.createElement("div");uc.setAttribute("oninput","return;"),Aa=typeof uc.oninput=="function"}Da=Aa}else Da=!1;cc=Da&&(!document.documentMode||9<document.documentMode)}function hc(){nr&&(nr.detachEvent("onpropertychange",fc),ar=nr=null)}function fc(e){if(e.propertyName==="value"&&sn(ar)){var t=[];lc(t,ar,e,ga(e)),Po(Od,t)}}function Bd(e,t,i){e==="focusin"?(hc(),nr=t,ar=i,nr.attachEvent("onpropertychange",fc)):e==="focusout"&&hc()}function kd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sn(ar)}function Hd(e,t){if(e==="click")return sn(t)}function zd(e,t){if(e==="input"||e==="change")return sn(t)}function Nd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:Nd;function lr(e,t){if(xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var r=i[s];if(!ei.call(t,r)||!xt(e[r],t[r]))return!1}return!0}function dc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _c(e,t){var i=dc(e);e=0;for(var s;i;){if(i.nodeType===3){if(s=e+i.textContent.length,e<=t&&s>=t)return{node:i,offset:t-e};e=s}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=dc(i)}}function vc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function gc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Pr(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=Pr(e.document)}return t}function xa(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var jd=ri&&"documentMode"in document&&11>=document.documentMode,Cs=null,Ta=null,or=null,Ra=!1;function mc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ra||Cs==null||Cs!==Pr(s)||(s=Cs,"selectionStart"in s&&xa(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),or&&lr(or,s)||(or=s,s=Vn(Ta,"onSelect"),0<s.length&&(t=new en("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Cs)))}function Qi(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Es={animationend:Qi("Animation","AnimationEnd"),animationiteration:Qi("Animation","AnimationIteration"),animationstart:Qi("Animation","AnimationStart"),transitionrun:Qi("Transition","TransitionRun"),transitionstart:Qi("Transition","TransitionStart"),transitioncancel:Qi("Transition","TransitionCancel"),transitionend:Qi("Transition","TransitionEnd")},Ma={},pc={};ri&&(pc=document.createElement("div").style,"AnimationEvent"in window||(delete Es.animationend.animation,delete Es.animationiteration.animation,delete Es.animationstart.animation),"TransitionEvent"in window||delete Es.transitionend.transition);function $i(e){if(Ma[e])return Ma[e];if(!Es[e])return e;var t=Es[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in pc)return Ma[e]=t[i];return e}var Sc=$i("animationend"),yc=$i("animationiteration"),bc=$i("animationstart"),Ud=$i("transitionrun"),qd=$i("transitionstart"),Id=$i("transitioncancel"),Cc=$i("transitionend"),Ec=new Map,La="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(" ");La.push("scrollEnd");function Vt(e,t){Ec.set(e,t),Pi(t,[e])}var rn=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},zt=[],ws=0,Oa=0;function nn(){for(var e=ws,t=Oa=ws=0;t<e;){var i=zt[t];zt[t++]=null;var s=zt[t];zt[t++]=null;var r=zt[t];zt[t++]=null;var n=zt[t];if(zt[t++]=null,s!==null&&r!==null){var m=s.pending;m===null?r.next=r:(r.next=m.next,m.next=r),s.pending=r}n!==0&&wc(i,r,n)}}function an(e,t,i,s){zt[ws++]=e,zt[ws++]=t,zt[ws++]=i,zt[ws++]=s,Oa|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Ba(e,t,i,s){return an(e,t,i,s),ln(e)}function Ji(e,t){return an(e,null,null,t),ln(e)}function wc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var r=!1,n=e.return;n!==null;)n.childLanes|=i,s=n.alternate,s!==null&&(s.childLanes|=i),n.tag===22&&(e=n.stateNode,e===null||e._visibility&1||(r=!0)),e=n,n=n.return;return e.tag===3?(n=e.stateNode,r&&t!==null&&(r=31-At(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function ln(e){if(50<Mr)throw Mr=0,Gl=null,Error(Y(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ds={};function Gd(e,t,i,s){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tt(e,t,i,s){return new Gd(e,t,i,s)}function ka(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ni(e,t){var i=e.alternate;return i===null?(i=Tt(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function Dc(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function on(e,t,i,s,r,n){var m=0;if(s=e,typeof e=="function")ka(e)&&(m=1);else if(typeof e=="string")m=F_(e,i,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case x:return e=Tt(31,i,t,r),e.elementType=x,e.lanes=n,e;case g:return es(i.children,r,n,t);case o:m=8,r|=24;break;case c:return e=Tt(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case C:return e=Tt(13,i,t,r),e.elementType=C,e.lanes=n,e;case y:return e=Tt(19,i,t,r),e.elementType=y,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:m=10;break e;case a:m=9;break e;case _:m=11;break e;case E:m=14;break e;case v:m=16,s=null;break e}m=29,i=Error(Y(130,e===null?"null":typeof e,"")),s=null}return t=Tt(m,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function es(e,t,i,s){return e=Tt(7,e,s,t),e.lanes=i,e}function Ha(e,t,i){return e=Tt(6,e,null,t),e.lanes=i,e}function Ac(e){var t=Tt(18,null,null,0);return t.stateNode=e,t}function za(e,t,i){return t=Tt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var xc=new WeakMap;function Nt(e,t){if(typeof e=="object"&&e!==null){var i=xc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Kt(t)},xc.set(e,t),t)}return{value:e,source:t,stack:Kt(t)}}var As=[],xs=0,cn=null,cr=0,jt=[],Ut=0,wi=null,Zt=1,Qt="";function ai(e,t){As[xs++]=cr,As[xs++]=cn,cn=e,cr=t}function Tc(e,t,i){jt[Ut++]=Zt,jt[Ut++]=Qt,jt[Ut++]=wi,wi=e;var s=Zt;e=Qt;var r=32-At(s)-1;s&=~(1<<r),i+=1;var n=32-At(t)+r;if(30<n){var m=r-r%5;n=(s&(1<<m)-1).toString(32),s>>=m,r-=m,Zt=1<<32-At(t)+r|i<<r|s,Qt=n+e}else Zt=1<<n|i<<r|s,Qt=e}function Na(e){e.return!==null&&(ai(e,1),Tc(e,1,0))}function ja(e){for(;e===cn;)cn=As[--xs],As[xs]=null,cr=As[--xs],As[xs]=null;for(;e===wi;)wi=jt[--Ut],jt[Ut]=null,Qt=jt[--Ut],jt[Ut]=null,Zt=jt[--Ut],jt[Ut]=null}function Rc(e,t){jt[Ut++]=Zt,jt[Ut++]=Qt,jt[Ut++]=wi,Zt=t.id,Qt=t.overflow,wi=e}var ht=null,Ve=null,Le=!1,Di=null,qt=!1,Ua=Error(Y(519));function Ai(e){var t=Error(Y(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ur(Nt(t,e)),Ua}function Mc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[ut]=e,t[pt]=s,i){case"dialog":Te("cancel",t),Te("close",t);break;case"iframe":case"object":case"embed":Te("load",t);break;case"video":case"audio":for(i=0;i<Or.length;i++)Te(Or[i],t);break;case"source":Te("error",t);break;case"img":case"image":case"link":Te("error",t),Te("load",t);break;case"details":Te("toggle",t);break;case"input":Te("invalid",t),Yo(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Te("invalid",t);break;case"textarea":Te("invalid",t),Vo(t,s.value,s.defaultValue,s.children)}i=s.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||s.suppressHydrationWarning===!0||Fh(t.textContent,i)?(s.popover!=null&&(Te("beforetoggle",t),Te("toggle",t)),s.onScroll!=null&&Te("scroll",t),s.onScrollEnd!=null&&Te("scrollend",t),s.onClick!=null&&(t.onclick=si),t=!0):t=!1,t||Ai(e,!0)}function Lc(e){for(ht=e.return;ht;)switch(ht.tag){case 5:case 31:case 13:qt=!1;return;case 27:case 3:qt=!0;return;default:ht=ht.return}}function Ts(e){if(e!==ht)return!1;if(!Le)return Lc(e),Le=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||so(e.type,e.memoizedProps)),i=!i),i&&Ve&&Ai(e),Lc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Y(317));Ve=sf(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Y(317));Ve=sf(e)}else t===27?(t=Ve,qi(e.type)?(e=oo,oo=null,Ve=e):Ve=t):Ve=ht?Gt(e.stateNode.nextSibling):null;return!0}function ts(){Ve=ht=null,Le=!1}function qa(){var e=Di;return e!==null&&(Et===null?Et=e:Et.push.apply(Et,e),Di=null),e}function ur(e){Di===null?Di=[e]:Di.push(e)}var Ia=w(null),is=null,li=null;function xi(e,t,i){G(Ia,t._currentValue),t._currentValue=i}function oi(e){e._currentValue=Ia.current,M(Ia)}function Ga(e,t,i){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===i)break;e=e.return}}function Ya(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var m=r.child;n=n.firstContext;e:for(;n!==null;){var T=n;n=r;for(var k=0;k<t.length;k++)if(T.context===t[k]){n.lanes|=i,T=n.alternate,T!==null&&(T.lanes|=i),Ga(n.return,i,e),s||(m=null);break e}n=T.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(Y(341));m.lanes|=i,n=m.alternate,n!==null&&(n.lanes|=i),Ga(m,i,e),m=null}else m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===e){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function Rs(e,t,i,s){e=null;for(var r=t,n=!1;r!==null;){if(!n){if((r.flags&524288)!==0)n=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error(Y(387));if(m=m.memoizedProps,m!==null){var T=r.type;xt(r.pendingProps.value,m.value)||(e!==null?e.push(T):e=[T])}}else if(r===z.current){if(m=r.alternate,m===null)throw Error(Y(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Nr):e=[Nr])}r=r.return}e!==null&&Ya(t,e,i,s),t.flags|=262144}function un(e){for(e=e.firstContext;e!==null;){if(!xt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ss(e){is=e,li=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ft(e){return Oc(is,e)}function hn(e,t){return is===null&&ss(e),Oc(e,t)}function Oc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},li===null){if(e===null)throw Error(Y(308));li=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else li=li.next=t;return i}var Yd=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},Kd=re.unstable_scheduleCallback,Vd=re.unstable_NormalPriority,tt={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ka(){return{controller:new Yd,data:new Map,refCount:0}}function hr(e){e.refCount--,e.refCount===0&&Kd(Vd,function(){e.controller.abort()})}var fr=null,Va=0,Ms=0,Ls=null;function Xd(e,t){if(fr===null){var i=fr=[];Va=0,Ms=Wl(),Ls={status:"pending",value:void 0,then:function(s){i.push(s)}}}return Va++,t.then(Bc,Bc),t}function Bc(){if(--Va===0&&fr!==null){Ls!==null&&(Ls.status="fulfilled");var e=fr;fr=null,Ms=0,Ls=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Fd(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(r){i.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<i.length;r++)(0,i[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<i.length;r++)(0,i[r])(void 0)}),s}var kc=U.S;U.S=function(e,t){mh=Pe(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Xd(e,t),kc!==null&&kc(e,t)};var rs=w(null);function Xa(){var e=rs.current;return e!==null?e:Ke.pooledCache}function fn(e,t){t===null?G(rs,rs.current):G(rs,t.pool)}function Hc(){var e=Xa();return e===null?null:{parent:tt._currentValue,pool:e}}var Os=Error(Y(460)),Fa=Error(Y(474)),dn=Error(Y(542)),_n={then:function(){}};function zc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Nc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(si,si),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uc(e),e;default:if(typeof t.status=="string")t.then(si,si);else{if(e=Ke,e!==null&&100<e.shellSuspendCounter)throw Error(Y(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=s}},function(s){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uc(e),e}throw as=t,Os}}function ns(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(as=i,Os):i}}var as=null;function jc(){if(as===null)throw Error(Y(459));var e=as;return as=null,e}function Uc(e){if(e===Os||e===dn)throw Error(Y(483))}var Bs=null,dr=0;function vn(e){var t=dr;return dr+=1,Bs===null&&(Bs=[]),Nc(Bs,e,t)}function _r(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function gn(e,t){throw t.$$typeof===p?Error(Y(525)):(e=Object.prototype.toString.call(t),Error(Y(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function qc(e){function t(I,j){if(e){var K=I.deletions;K===null?(I.deletions=[j],I.flags|=16):K.push(j)}}function i(I,j){if(!e)return null;for(;j!==null;)t(I,j),j=j.sibling;return null}function s(I){for(var j=new Map;I!==null;)I.key!==null?j.set(I.key,I):j.set(I.index,I),I=I.sibling;return j}function r(I,j){return I=ni(I,j),I.index=0,I.sibling=null,I}function n(I,j,K){return I.index=K,e?(K=I.alternate,K!==null?(K=K.index,K<j?(I.flags|=67108866,j):K):(I.flags|=67108866,j)):(I.flags|=1048576,j)}function m(I){return e&&I.alternate===null&&(I.flags|=67108866),I}function T(I,j,K,ie){return j===null||j.tag!==6?(j=Ha(K,I.mode,ie),j.return=I,j):(j=r(j,K),j.return=I,j)}function k(I,j,K,ie){var ye=K.type;return ye===g?ee(I,j,K.props.children,ie,K.key):j!==null&&(j.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===v&&ns(ye)===j.type)?(j=r(j,K.props),_r(j,K),j.return=I,j):(j=on(K.type,K.key,K.props,null,I.mode,ie),_r(j,K),j.return=I,j)}function V(I,j,K,ie){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=za(K,I.mode,ie),j.return=I,j):(j=r(j,K.children||[]),j.return=I,j)}function ee(I,j,K,ie,ye){return j===null||j.tag!==7?(j=es(K,I.mode,ie,ye),j.return=I,j):(j=r(j,K),j.return=I,j)}function se(I,j,K){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=Ha(""+j,I.mode,K),j.return=I,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case b:return K=on(j.type,j.key,j.props,null,I.mode,K),_r(K,j),K.return=I,K;case D:return j=za(j,I.mode,K),j.return=I,j;case v:return j=ns(j),se(I,j,K)}if(ne(j)||q(j))return j=es(j,I.mode,K,null),j.return=I,j;if(typeof j.then=="function")return se(I,vn(j),K);if(j.$$typeof===l)return se(I,hn(I,j),K);gn(I,j)}return null}function X(I,j,K,ie){var ye=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return ye!==null?null:T(I,j,""+K,ie);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case b:return K.key===ye?k(I,j,K,ie):null;case D:return K.key===ye?V(I,j,K,ie):null;case v:return K=ns(K),X(I,j,K,ie)}if(ne(K)||q(K))return ye!==null?null:ee(I,j,K,ie,null);if(typeof K.then=="function")return X(I,j,vn(K),ie);if(K.$$typeof===l)return X(I,j,hn(I,K),ie);gn(I,K)}return null}function P(I,j,K,ie,ye){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return I=I.get(K)||null,T(j,I,""+ie,ye);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:return I=I.get(ie.key===null?K:ie.key)||null,k(j,I,ie,ye);case D:return I=I.get(ie.key===null?K:ie.key)||null,V(j,I,ie,ye);case v:return ie=ns(ie),P(I,j,K,ie,ye)}if(ne(ie)||q(ie))return I=I.get(K)||null,ee(j,I,ie,ye,null);if(typeof ie.then=="function")return P(I,j,K,vn(ie),ye);if(ie.$$typeof===l)return P(I,j,K,hn(j,ie),ye);gn(j,ie)}return null}function ve(I,j,K,ie){for(var ye=null,He=null,me=j,De=j=0,Me=null;me!==null&&De<K.length;De++){me.index>De?(Me=me,me=null):Me=me.sibling;var ze=X(I,me,K[De],ie);if(ze===null){me===null&&(me=Me);break}e&&me&&ze.alternate===null&&t(I,me),j=n(ze,j,De),He===null?ye=ze:He.sibling=ze,He=ze,me=Me}if(De===K.length)return i(I,me),Le&&ai(I,De),ye;if(me===null){for(;De<K.length;De++)me=se(I,K[De],ie),me!==null&&(j=n(me,j,De),He===null?ye=me:He.sibling=me,He=me);return Le&&ai(I,De),ye}for(me=s(me);De<K.length;De++)Me=P(me,I,De,K[De],ie),Me!==null&&(e&&Me.alternate!==null&&me.delete(Me.key===null?De:Me.key),j=n(Me,j,De),He===null?ye=Me:He.sibling=Me,He=Me);return e&&me.forEach(function(Vi){return t(I,Vi)}),Le&&ai(I,De),ye}function Ce(I,j,K,ie){if(K==null)throw Error(Y(151));for(var ye=null,He=null,me=j,De=j=0,Me=null,ze=K.next();me!==null&&!ze.done;De++,ze=K.next()){me.index>De?(Me=me,me=null):Me=me.sibling;var Vi=X(I,me,ze.value,ie);if(Vi===null){me===null&&(me=Me);break}e&&me&&Vi.alternate===null&&t(I,me),j=n(Vi,j,De),He===null?ye=Vi:He.sibling=Vi,He=Vi,me=Me}if(ze.done)return i(I,me),Le&&ai(I,De),ye;if(me===null){for(;!ze.done;De++,ze=K.next())ze=se(I,ze.value,ie),ze!==null&&(j=n(ze,j,De),He===null?ye=ze:He.sibling=ze,He=ze);return Le&&ai(I,De),ye}for(me=s(me);!ze.done;De++,ze=K.next())ze=P(me,I,De,ze.value,ie),ze!==null&&(e&&ze.alternate!==null&&me.delete(ze.key===null?De:ze.key),j=n(ze,j,De),He===null?ye=ze:He.sibling=ze,He=ze);return e&&me.forEach(function(rv){return t(I,rv)}),Le&&ai(I,De),ye}function Ye(I,j,K,ie){if(typeof K=="object"&&K!==null&&K.type===g&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case b:e:{for(var ye=K.key;j!==null;){if(j.key===ye){if(ye=K.type,ye===g){if(j.tag===7){i(I,j.sibling),ie=r(j,K.props.children),ie.return=I,I=ie;break e}}else if(j.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===v&&ns(ye)===j.type){i(I,j.sibling),ie=r(j,K.props),_r(ie,K),ie.return=I,I=ie;break e}i(I,j);break}else t(I,j);j=j.sibling}K.type===g?(ie=es(K.props.children,I.mode,ie,K.key),ie.return=I,I=ie):(ie=on(K.type,K.key,K.props,null,I.mode,ie),_r(ie,K),ie.return=I,I=ie)}return m(I);case D:e:{for(ye=K.key;j!==null;){if(j.key===ye)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){i(I,j.sibling),ie=r(j,K.children||[]),ie.return=I,I=ie;break e}else{i(I,j);break}else t(I,j);j=j.sibling}ie=za(K,I.mode,ie),ie.return=I,I=ie}return m(I);case v:return K=ns(K),Ye(I,j,K,ie)}if(ne(K))return ve(I,j,K,ie);if(q(K)){if(ye=q(K),typeof ye!="function")throw Error(Y(150));return K=ye.call(K),Ce(I,j,K,ie)}if(typeof K.then=="function")return Ye(I,j,vn(K),ie);if(K.$$typeof===l)return Ye(I,j,hn(I,K),ie);gn(I,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,j!==null&&j.tag===6?(i(I,j.sibling),ie=r(j,K),ie.return=I,I=ie):(i(I,j),ie=Ha(K,I.mode,ie),ie.return=I,I=ie),m(I)):i(I,j)}return function(I,j,K,ie){try{dr=0;var ye=Ye(I,j,K,ie);return Bs=null,ye}catch(me){if(me===Os||me===dn)throw me;var He=Tt(29,me,null,I.mode);return He.lanes=ie,He.return=I,He}}}var ls=qc(!0),Ic=qc(!1),Ti=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Pa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ri(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Mi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(je&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=ln(e),wc(e,null,i),t}return an(e,s,t,i),ln(e)}function vr(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Oo(e,i)}}function Za(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var r=null,n=null;if(i=i.firstBaseUpdate,i!==null){do{var m={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=m:n=n.next=m,i=i.next}while(i!==null);n===null?r=n=t:n=n.next=t}else r=n=t;i={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:n,shared:s.shared,callbacks:s.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var Qa=!1;function gr(){if(Qa){var e=Ls;if(e!==null)throw e}}function mr(e,t,i,s){Qa=!1;var r=e.updateQueue;Ti=!1;var n=r.firstBaseUpdate,m=r.lastBaseUpdate,T=r.shared.pending;if(T!==null){r.shared.pending=null;var k=T,V=k.next;k.next=null,m===null?n=V:m.next=V,m=k;var ee=e.alternate;ee!==null&&(ee=ee.updateQueue,T=ee.lastBaseUpdate,T!==m&&(T===null?ee.firstBaseUpdate=V:T.next=V,ee.lastBaseUpdate=k))}if(n!==null){var se=r.baseState;m=0,ee=V=k=null,T=n;do{var X=T.lane&-536870913,P=X!==T.lane;if(P?(Re&X)===X:(s&X)===X){X!==0&&X===Ms&&(Qa=!0),ee!==null&&(ee=ee.next={lane:0,tag:T.tag,payload:T.payload,callback:null,next:null});e:{var ve=e,Ce=T;X=t;var Ye=i;switch(Ce.tag){case 1:if(ve=Ce.payload,typeof ve=="function"){se=ve.call(Ye,se,X);break e}se=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ce.payload,X=typeof ve=="function"?ve.call(Ye,se,X):ve,X==null)break e;se=u({},se,X);break e;case 2:Ti=!0}}X=T.callback,X!==null&&(e.flags|=64,P&&(e.flags|=8192),P=r.callbacks,P===null?r.callbacks=[X]:P.push(X))}else P={lane:X,tag:T.tag,payload:T.payload,callback:T.callback,next:null},ee===null?(V=ee=P,k=se):ee=ee.next=P,m|=X;if(T=T.next,T===null){if(T=r.shared.pending,T===null)break;P=T,T=P.next,P.next=null,r.lastBaseUpdate=P,r.shared.pending=null}}while(!0);ee===null&&(k=se),r.baseState=k,r.firstBaseUpdate=V,r.lastBaseUpdate=ee,n===null&&(r.shared.lanes=0),Hi|=m,e.lanes=m,e.memoizedState=se}}function Gc(e,t){if(typeof e!="function")throw Error(Y(191,e));e.call(t)}function Yc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Gc(i[e],t)}var ks=w(null),mn=w(0);function Kc(e,t){e=mi,G(mn,e),G(ks,t),mi=e|t.baseLanes}function $a(){G(mn,mi),G(ks,ks.current)}function Ja(){mi=mn.current,M(ks),M(mn)}var Rt=w(null),It=null;function Li(e){var t=e.alternate;G($e,$e.current&1),G(Rt,e),It===null&&(t===null||ks.current!==null||t.memoizedState!==null)&&(It=e)}function el(e){G($e,$e.current),G(Rt,e),It===null&&(It=e)}function Vc(e){e.tag===22?(G($e,$e.current),G(Rt,e),It===null&&(It=e)):Oi()}function Oi(){G($e,$e.current),G(Rt,Rt.current)}function Mt(e){M(Rt),It===e&&(It=null),M($e)}var $e=w(0);function pn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||ao(i)||lo(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ci=0,we=null,Ie=null,it=null,Sn=!1,Hs=!1,os=!1,yn=0,pr=0,zs=null,Wd=0;function Ze(){throw Error(Y(321))}function tl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!xt(e[i],t[i]))return!1;return!0}function il(e,t,i,s,r,n){return ci=n,we=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,U.H=e===null||e.memoizedState===null?Tu:ml,os=!1,n=i(s,r),os=!1,Hs&&(n=Fc(t,i,s,r)),Xc(e),n}function Xc(e){U.H=br;var t=Ie!==null&&Ie.next!==null;if(ci=0,it=Ie=we=null,Sn=!1,pr=0,zs=null,t)throw Error(Y(300));e===null||st||(e=e.dependencies,e!==null&&un(e)&&(st=!0))}function Fc(e,t,i,s){we=e;var r=0;do{if(Hs&&(zs=null),pr=0,Hs=!1,25<=r)throw Error(Y(301));if(r+=1,it=Ie=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}U.H=Ru,n=t(i,s)}while(Hs);return n}function Pd(){var e=U.H,t=e.useState()[0];return t=typeof t.then=="function"?Sr(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(we.flags|=1024),t}function sl(){var e=yn!==0;return yn=0,e}function rl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function nl(e){if(Sn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Sn=!1}ci=0,it=Ie=we=null,Hs=!1,pr=yn=0,zs=null}function gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?we.memoizedState=it=e:it=it.next=e,it}function Je(){if(Ie===null){var e=we.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=it===null?we.memoizedState:it.next;if(t!==null)it=t,Ie=e;else{if(e===null)throw we.alternate===null?Error(Y(467)):Error(Y(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},it===null?we.memoizedState=it=e:it=it.next=e}return it}function bn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Sr(e){var t=pr;return pr+=1,zs===null&&(zs=[]),e=Nc(zs,e,t),t=we,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,U.H=t===null||t.memoizedState===null?Tu:ml),e}function Cn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Sr(e);if(e.$$typeof===l)return ft(e)}throw Error(Y(438,String(e)))}function al(e){var t=null,i=we.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=we.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=bn(),we.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=N;return t.index++,i}function ui(e,t){return typeof t=="function"?t(e):t}function En(e){var t=Je();return ll(t,Ie,e)}function ll(e,t,i){var s=e.queue;if(s===null)throw Error(Y(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var m=r.next;r.next=n.next,n.next=m}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var T=m=null,k=null,V=t,ee=!1;do{var se=V.lane&-536870913;if(se!==V.lane?(Re&se)===se:(ci&se)===se){var X=V.revertLane;if(X===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),se===Ms&&(ee=!0);else if((ci&X)===X){V=V.next,X===Ms&&(ee=!0);continue}else se={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},k===null?(T=k=se,m=n):k=k.next=se,we.lanes|=X,Hi|=X;se=V.action,os&&i(n,se),n=V.hasEagerState?V.eagerState:i(n,se)}else X={lane:se,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},k===null?(T=k=X,m=n):k=k.next=X,we.lanes|=se,Hi|=se;V=V.next}while(V!==null&&V!==t);if(k===null?m=n:k.next=T,!xt(n,e.memoizedState)&&(st=!0,ee&&(i=Ls,i!==null)))throw i;e.memoizedState=n,e.baseState=m,e.baseQueue=k,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ol(e){var t=Je(),i=t.queue;if(i===null)throw Error(Y(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var m=r=r.next;do n=e(n,m.action),m=m.next;while(m!==r);xt(n,t.memoizedState)||(st=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function Wc(e,t,i){var s=we,r=Je(),n=Le;if(n){if(i===void 0)throw Error(Y(407));i=i()}else i=t();var m=!xt((Ie||r).memoizedState,i);if(m&&(r.memoizedState=i,st=!0),r=r.queue,hl(Qc.bind(null,s,r,e),[e]),r.getSnapshot!==t||m||it!==null&&it.memoizedState.tag&1){if(s.flags|=2048,Ns(9,{destroy:void 0},Zc.bind(null,s,r,i,t),null),Ke===null)throw Error(Y(349));n||(ci&127)!==0||Pc(s,t,i)}return i}function Pc(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=we.updateQueue,t===null?(t=bn(),we.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Zc(e,t,i,s){t.value=i,t.getSnapshot=s,$c(t)&&Jc(e)}function Qc(e,t,i){return i(function(){$c(t)&&Jc(e)})}function $c(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!xt(e,i)}catch{return!0}}function Jc(e){var t=Ji(e,2);t!==null&&wt(t,e,2)}function cl(e){var t=gt();if(typeof e=="function"){var i=e;if(e=i(),os){bi(!0);try{i()}finally{bi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:e},t}function eu(e,t,i,s){return e.baseState=i,ll(e,Ie,typeof s=="function"?s:ui)}function Zd(e,t,i,s,r){if(An(e))throw Error(Y(485));if(e=t.action,e!==null){var n={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){n.listeners.push(m)}};U.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,tu(t,n)):(n.next=i.next,t.pending=i.next=n)}}function tu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=U.T,m={};U.T=m;try{var T=i(r,s),k=U.S;k!==null&&k(m,T),iu(e,t,T)}catch(V){ul(e,t,V)}finally{n!==null&&m.types!==null&&(n.types=m.types),U.T=n}}else try{n=i(r,s),iu(e,t,n)}catch(V){ul(e,t,V)}}function iu(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){su(e,t,s)},function(s){return ul(e,t,s)}):su(e,t,i)}function su(e,t,i){t.status="fulfilled",t.value=i,ru(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,tu(e,i)))}function ul(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,ru(t),t=t.next;while(t!==s)}e.action=null}function ru(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function nu(e,t){return t}function au(e,t){if(Le){var i=Ke.formState;if(i!==null){e:{var s=we;if(Le){if(Ve){t:{for(var r=Ve,n=qt;r.nodeType!==8;){if(!n){r=null;break t}if(r=Gt(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){Ve=Gt(r.nextSibling),s=r.data==="F!";break e}}Ai(s)}s=!1}s&&(t=i[0])}}return i=gt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nu,lastRenderedState:t},i.queue=s,i=Du.bind(null,we,s),s.dispatch=i,s=cl(!1),n=gl.bind(null,we,!1,s.queue),s=gt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=Zd.bind(null,we,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function lu(e){var t=Je();return ou(t,Ie,e)}function ou(e,t,i){if(t=ll(e,t,nu)[0],e=En(ui)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Sr(t)}catch(m){throw m===Os?dn:m}else s=t;t=Je();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(we.flags|=2048,Ns(9,{destroy:void 0},Qd.bind(null,r,i),null)),[s,n,e]}function Qd(e,t){e.action=t}function cu(e){var t=Je(),i=Ie;if(i!==null)return ou(t,i,e);Je(),t=t.memoizedState,i=Je();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ns(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=we.updateQueue,t===null&&(t=bn(),we.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function uu(){return Je().memoizedState}function wn(e,t,i,s){var r=gt();we.flags|=e,r.memoizedState=Ns(1|t,{destroy:void 0},i,s===void 0?null:s)}function Dn(e,t,i,s){var r=Je();s=s===void 0?null:s;var n=r.memoizedState.inst;Ie!==null&&s!==null&&tl(s,Ie.memoizedState.deps)?r.memoizedState=Ns(t,n,i,s):(we.flags|=e,r.memoizedState=Ns(1|t,n,i,s))}function hu(e,t){wn(8390656,8,e,t)}function hl(e,t){Dn(2048,8,e,t)}function $d(e){we.flags|=4;var t=we.updateQueue;if(t===null)t=bn(),we.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function fu(e){var t=Je().memoizedState;return $d({ref:t,nextImpl:e}),function(){if((je&2)!==0)throw Error(Y(440));return t.impl.apply(void 0,arguments)}}function du(e,t){return Dn(4,2,e,t)}function _u(e,t){return Dn(4,4,e,t)}function vu(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function gu(e,t,i){i=i!=null?i.concat([e]):null,Dn(4,4,vu.bind(null,t,e),i)}function fl(){}function mu(e,t){var i=Je();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&tl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function pu(e,t){var i=Je();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&tl(t,s[1]))return s[0];if(s=e(),os){bi(!0);try{e()}finally{bi(!1)}}return i.memoizedState=[s,t],s}function dl(e,t,i){return i===void 0||(ci&1073741824)!==0&&(Re&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Sh(),we.lanes|=e,Hi|=e,i)}function Su(e,t,i,s){return xt(i,t)?i:ks.current!==null?(e=dl(e,i,s),xt(e,t)||(st=!0),e):(ci&42)===0||(ci&1073741824)!==0&&(Re&261930)===0?(st=!0,e.memoizedState=i):(e=Sh(),we.lanes|=e,Hi|=e,t)}function yu(e,t,i,s,r){var n=F.p;F.p=n!==0&&8>n?n:8;var m=U.T,T={};U.T=T,gl(e,!1,t,i);try{var k=r(),V=U.S;if(V!==null&&V(T,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var ee=Fd(k,s);yr(e,t,ee,Bt(e))}else yr(e,t,s,Bt(e))}catch(se){yr(e,t,{then:function(){},status:"rejected",reason:se},Bt())}finally{F.p=n,m!==null&&T.types!==null&&(m.types=T.types),U.T=m}}function Jd(){}function _l(e,t,i,s){if(e.tag!==5)throw Error(Y(476));var r=bu(e).queue;yu(e,r,t,Q,i===null?Jd:function(){return Cu(e),i(s)})}function bu(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:Q},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ui,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cu(e){var t=bu(e);t.next===null&&(t=e.alternate.memoizedState),yr(e,t.next.queue,{},Bt())}function vl(){return ft(Nr)}function Eu(){return Je().memoizedState}function wu(){return Je().memoizedState}function e_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Bt();e=Ri(i);var s=Mi(t,e,i);s!==null&&(wt(s,t,i),vr(s,t,i)),t={cache:Ka()},e.payload=t;return}t=t.return}}function t_(e,t,i){var s=Bt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},An(e)?Au(t,i):(i=Ba(e,t,i,s),i!==null&&(wt(i,e,s),xu(i,t,s)))}function Du(e,t,i){var s=Bt();yr(e,t,i,s)}function yr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(An(e))Au(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var m=t.lastRenderedState,T=n(m,i);if(r.hasEagerState=!0,r.eagerState=T,xt(T,m))return an(e,t,r,0),Ke===null&&nn(),!1}catch{}if(i=Ba(e,t,r,s),i!==null)return wt(i,e,s),xu(i,t,s),!0}return!1}function gl(e,t,i,s){if(s={lane:2,revertLane:Wl(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},An(e)){if(t)throw Error(Y(479))}else t=Ba(e,i,s,2),t!==null&&wt(t,e,2)}function An(e){var t=e.alternate;return e===we||t!==null&&t===we}function Au(e,t){Hs=Sn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function xu(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Oo(e,i)}}var br={readContext:ft,use:Cn,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useLayoutEffect:Ze,useInsertionEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useSyncExternalStore:Ze,useId:Ze,useHostTransitionStatus:Ze,useFormState:Ze,useActionState:Ze,useOptimistic:Ze,useMemoCache:Ze,useCacheRefresh:Ze};br.useEffectEvent=Ze;var Tu={readContext:ft,use:Cn,useCallback:function(e,t){return gt().memoizedState=[e,t===void 0?null:t],e},useContext:ft,useEffect:hu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,wn(4194308,4,vu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return wn(4194308,4,e,t)},useInsertionEffect:function(e,t){wn(4,2,e,t)},useMemo:function(e,t){var i=gt();t=t===void 0?null:t;var s=e();if(os){bi(!0);try{e()}finally{bi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=gt();if(i!==void 0){var r=i(t);if(os){bi(!0);try{i(t)}finally{bi(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=t_.bind(null,we,e),[s.memoizedState,e]},useRef:function(e){var t=gt();return e={current:e},t.memoizedState=e},useState:function(e){e=cl(e);var t=e.queue,i=Du.bind(null,we,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:fl,useDeferredValue:function(e,t){var i=gt();return dl(i,e,t)},useTransition:function(){var e=cl(!1);return e=yu.bind(null,we,e.queue,!0,!1),gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=we,r=gt();if(Le){if(i===void 0)throw Error(Y(407));i=i()}else{if(i=t(),Ke===null)throw Error(Y(349));(Re&127)!==0||Pc(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,hu(Qc.bind(null,s,n,e),[e]),s.flags|=2048,Ns(9,{destroy:void 0},Zc.bind(null,s,n,i,t),null),i},useId:function(){var e=gt(),t=Ke.identifierPrefix;if(Le){var i=Qt,s=Zt;i=(s&~(1<<32-At(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=yn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Wd++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:vl,useFormState:au,useActionState:au,useOptimistic:function(e){var t=gt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=gl.bind(null,we,!0,i),i.dispatch=t,[e,t]},useMemoCache:al,useCacheRefresh:function(){return gt().memoizedState=e_.bind(null,we)},useEffectEvent:function(e){var t=gt(),i={impl:e};return t.memoizedState=i,function(){if((je&2)!==0)throw Error(Y(440));return i.impl.apply(void 0,arguments)}}},ml={readContext:ft,use:Cn,useCallback:mu,useContext:ft,useEffect:hl,useImperativeHandle:gu,useInsertionEffect:du,useLayoutEffect:_u,useMemo:pu,useReducer:En,useRef:uu,useState:function(){return En(ui)},useDebugValue:fl,useDeferredValue:function(e,t){var i=Je();return Su(i,Ie.memoizedState,e,t)},useTransition:function(){var e=En(ui)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:Sr(e),t]},useSyncExternalStore:Wc,useId:Eu,useHostTransitionStatus:vl,useFormState:lu,useActionState:lu,useOptimistic:function(e,t){var i=Je();return eu(i,Ie,e,t)},useMemoCache:al,useCacheRefresh:wu};ml.useEffectEvent=fu;var Ru={readContext:ft,use:Cn,useCallback:mu,useContext:ft,useEffect:hl,useImperativeHandle:gu,useInsertionEffect:du,useLayoutEffect:_u,useMemo:pu,useReducer:ol,useRef:uu,useState:function(){return ol(ui)},useDebugValue:fl,useDeferredValue:function(e,t){var i=Je();return Ie===null?dl(i,e,t):Su(i,Ie.memoizedState,e,t)},useTransition:function(){var e=ol(ui)[0],t=Je().memoizedState;return[typeof e=="boolean"?e:Sr(e),t]},useSyncExternalStore:Wc,useId:Eu,useHostTransitionStatus:vl,useFormState:cu,useActionState:cu,useOptimistic:function(e,t){var i=Je();return Ie!==null?eu(i,Ie,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:al,useCacheRefresh:wu};Ru.useEffectEvent=fu;function pl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Sl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Bt(),r=Ri(s);r.payload=t,i!=null&&(r.callback=i),t=Mi(e,r,s),t!==null&&(wt(t,e,s),vr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Bt(),r=Ri(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Mi(e,r,s),t!==null&&(wt(t,e,s),vr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Bt(),s=Ri(i);s.tag=2,t!=null&&(s.callback=t),t=Mi(e,s,i),t!==null&&(wt(t,e,i),vr(t,e,i))}};function Mu(e,t,i,s,r,n,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,m):t.prototype&&t.prototype.isPureReactComponent?!lr(i,s)||!lr(r,n):!0}function Lu(e,t,i,s){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,s),t.state!==e&&Sl.enqueueReplaceState(t,t.state,null)}function cs(e,t){var i=t;if("ref"in t){i={};for(var s in t)s!=="ref"&&(i[s]=t[s])}if(e=e.defaultProps){i===t&&(i=u({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Ou(e){rn(e)}function Bu(e){console.error(e)}function ku(e){rn(e)}function xn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Hu(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function yl(e,t,i){return i=Ri(i),i.tag=3,i.payload={element:null},i.callback=function(){xn(e,t)},i}function zu(e){return e=Ri(e),e.tag=3,e}function Nu(e,t,i,s){var r=i.type.getDerivedStateFromError;if(typeof r=="function"){var n=s.value;e.payload=function(){return r(n)},e.callback=function(){Hu(t,i,s)}}var m=i.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){Hu(t,i,s),typeof r!="function"&&(zi===null?zi=new Set([this]):zi.add(this));var T=s.stack;this.componentDidCatch(s.value,{componentStack:T!==null?T:""})})}function i_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Rs(t,i,r,!0),i=Rt.current,i!==null){switch(i.tag){case 31:case 13:return It===null?Un():i.alternate===null&&Qe===0&&(Qe=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===_n?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Vl(e,s,r)),!1;case 22:return i.flags|=65536,s===_n?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([s]):i.add(s)),Vl(e,s,r)),!1}throw Error(Y(435,i.tag))}return Vl(e,s,r),Un(),!1}if(Le)return t=Rt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Ua&&(e=Error(Y(422),{cause:s}),ur(Nt(e,i)))):(s!==Ua&&(t=Error(Y(423),{cause:s}),ur(Nt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Nt(s,i),r=yl(e.stateNode,s,r),Za(e,r),Qe!==4&&(Qe=2)),!1;var n=Error(Y(520),{cause:s});if(n=Nt(n,i),Rr===null?Rr=[n]:Rr.push(n),Qe!==4&&(Qe=2),t===null)return!0;s=Nt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=yl(i.stateNode,s,e),Za(i,e),!1;case 1:if(t=i.type,n=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(zi===null||!zi.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=zu(r),Nu(r,e,i,s),Za(i,r),!1}i=i.return}while(i!==null);return!1}var bl=Error(Y(461)),st=!1;function dt(e,t,i,s){t.child=e===null?Ic(t,null,i,s):ls(t,e.child,i,s)}function ju(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var m={};for(var T in s)T!=="ref"&&(m[T]=s[T])}else m=s;return ss(t),s=il(e,t,i,m,n,r),T=sl(),e!==null&&!st?(rl(e,t,r),hi(e,t,r)):(Le&&T&&Na(t),t.flags|=1,dt(e,t,s,r),t.child)}function Uu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!ka(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,qu(e,t,n,s,r)):(e=on(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Rl(e,r)){var m=n.memoizedProps;if(i=i.compare,i=i!==null?i:lr,i(m,s)&&e.ref===t.ref)return hi(e,t,r)}return t.flags|=1,e=ni(n,s),e.ref=t.ref,e.return=t,t.child=e}function qu(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(lr(n,s)&&e.ref===t.ref)if(st=!1,t.pendingProps=s=n,Rl(e,r))(e.flags&131072)!==0&&(st=!0);else return t.lanes=e.lanes,hi(e,t,r)}return Cl(e,t,i,s,r)}function Iu(e,t,i,s){var r=s.children,n=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(n=n!==null?n.baseLanes|i:i,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~n}else s=0,t.child=null;return Gu(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&fn(t,n!==null?n.cachePool:null),n!==null?Kc(t,n):$a(),Vc(t);else return s=t.lanes=536870912,Gu(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(fn(t,n.cachePool),Kc(t,n),Oi(),t.memoizedState=null):(e!==null&&fn(t,null),$a(),Oi());return dt(e,t,r,i),t.child}function Cr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Gu(e,t,i,s,r){var n=Xa();return n=n===null?null:{parent:tt._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&fn(t,null),$a(),Vc(t),e!==null&&Rs(e,t,s,!0),t.childLanes=r,null}function Tn(e,t){return t=Mn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Yu(e,t,i){return ls(t,e.child,null,i),e=Tn(t,t.pendingProps),e.flags|=2,Mt(t),t.memoizedState=null,e}function s_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(s.mode==="hidden")return e=Tn(t,s),t.lanes=536870912,Cr(null,e);if(el(t),(e=Ve)?(e=tf(e,qt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi!==null?{id:Zt,overflow:Qt}:null,retryLane:536870912,hydrationErrors:null},i=Ac(e),i.return=t,t.child=i,ht=t,Ve=null)):e=null,e===null)throw Ai(t);return t.lanes=536870912,null}return Tn(t,s)}var n=e.memoizedState;if(n!==null){var m=n.dehydrated;if(el(t),r)if(t.flags&256)t.flags&=-257,t=Yu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(Y(558));else if(st||Rs(e,t,i,!1),r=(i&e.childLanes)!==0,st||r){if(s=Ke,s!==null&&(m=Bo(s,i),m!==0&&m!==n.retryLane))throw n.retryLane=m,Ji(e,m),wt(s,e,m),bl;Un(),t=Yu(e,t,i)}else e=n.treeContext,Ve=Gt(m.nextSibling),ht=t,Le=!0,Di=null,qt=!1,e!==null&&Rc(t,e),t=Tn(t,s),t.flags|=4096;return t}return e=ni(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Rn(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(Y(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Cl(e,t,i,s,r){return ss(t),i=il(e,t,i,s,void 0,r),s=sl(),e!==null&&!st?(rl(e,t,r),hi(e,t,r)):(Le&&s&&Na(t),t.flags|=1,dt(e,t,i,r),t.child)}function Ku(e,t,i,s,r,n){return ss(t),t.updateQueue=null,i=Fc(t,s,i,r),Xc(e),s=sl(),e!==null&&!st?(rl(e,t,n),hi(e,t,n)):(Le&&s&&Na(t),t.flags|=1,dt(e,t,i,n),t.child)}function Vu(e,t,i,s,r){if(ss(t),t.stateNode===null){var n=Ds,m=i.contextType;typeof m=="object"&&m!==null&&(n=ft(m)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Sl,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},Wa(t),m=i.contextType,n.context=typeof m=="object"&&m!==null?ft(m):Ds,n.state=t.memoizedState,m=i.getDerivedStateFromProps,typeof m=="function"&&(pl(t,i,m,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(m=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),m!==n.state&&Sl.enqueueReplaceState(n,n.state,null),mr(t,s,n,r),gr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var T=t.memoizedProps,k=cs(i,T);n.props=k;var V=n.context,ee=i.contextType;m=Ds,typeof ee=="object"&&ee!==null&&(m=ft(ee));var se=i.getDerivedStateFromProps;ee=typeof se=="function"||typeof n.getSnapshotBeforeUpdate=="function",T=t.pendingProps!==T,ee||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(T||V!==m)&&Lu(t,n,s,m),Ti=!1;var X=t.memoizedState;n.state=X,mr(t,s,n,r),gr(),V=t.memoizedState,T||X!==V||Ti?(typeof se=="function"&&(pl(t,i,se,s),V=t.memoizedState),(k=Ti||Mu(t,i,k,s,X,V,m))?(ee||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount()),typeof n.componentDidMount=="function"&&(t.flags|=4194308)):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=V),n.props=s,n.state=V,n.context=m,s=k):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,Pa(e,t),m=t.memoizedProps,ee=cs(i,m),n.props=ee,se=t.pendingProps,X=n.context,V=i.contextType,k=Ds,typeof V=="object"&&V!==null&&(k=ft(V)),T=i.getDerivedStateFromProps,(V=typeof T=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(m!==se||X!==k)&&Lu(t,n,s,k),Ti=!1,X=t.memoizedState,n.state=X,mr(t,s,n,r),gr();var P=t.memoizedState;m!==se||X!==P||Ti||e!==null&&e.dependencies!==null&&un(e.dependencies)?(typeof T=="function"&&(pl(t,i,T,s),P=t.memoizedState),(ee=Ti||Mu(t,i,ee,s,X,P,k)||e!==null&&e.dependencies!==null&&un(e.dependencies))?(V||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,P,k),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,P,k)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||m===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=P),n.props=s,n.state=P,n.context=k,s=ee):(typeof n.componentDidUpdate!="function"||m===e.memoizedProps&&X===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&X===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,Rn(e,t),s=(t.flags&128)!==0,n||s?(n=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:n.render(),t.flags|=1,e!==null&&s?(t.child=ls(t,e.child,null,r),t.child=ls(t,null,i,r)):dt(e,t,i,r),t.memoizedState=n.state,e=t.child):e=hi(e,t,r),e}function Xu(e,t,i,s){return ts(),t.flags|=256,dt(e,t,i,s),t.child}var El={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function wl(e){return{baseLanes:e,cachePool:Hc()}}function Dl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Ot),e}function Fu(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,m;if((m=n)||(m=e!==null&&e.memoizedState===null?!1:($e.current&2)!==0),m&&(r=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(r?Li(t):Oi(),(e=Ve)?(e=tf(e,qt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:wi!==null?{id:Zt,overflow:Qt}:null,retryLane:536870912,hydrationErrors:null},i=Ac(e),i.return=t,t.child=i,ht=t,Ve=null)):e=null,e===null)throw Ai(t);return lo(e)?t.lanes=32:t.lanes=536870912,null}var T=s.children;return s=s.fallback,r?(Oi(),r=t.mode,T=Mn({mode:"hidden",children:T},r),s=es(s,r,i,null),T.return=t,s.return=t,T.sibling=s,t.child=T,s=t.child,s.memoizedState=wl(i),s.childLanes=Dl(e,m,i),t.memoizedState=El,Cr(null,s)):(Li(t),Al(t,T))}var k=e.memoizedState;if(k!==null&&(T=k.dehydrated,T!==null)){if(n)t.flags&256?(Li(t),t.flags&=-257,t=xl(e,t,i)):t.memoizedState!==null?(Oi(),t.child=e.child,t.flags|=128,t=null):(Oi(),T=s.fallback,r=t.mode,s=Mn({mode:"visible",children:s.children},r),T=es(T,r,i,null),T.flags|=2,s.return=t,T.return=t,s.sibling=T,t.child=s,ls(t,e.child,null,i),s=t.child,s.memoizedState=wl(i),s.childLanes=Dl(e,m,i),t.memoizedState=El,t=Cr(null,s));else if(Li(t),lo(T)){if(m=T.nextSibling&&T.nextSibling.dataset,m)var V=m.dgst;m=V,s=Error(Y(419)),s.stack="",s.digest=m,ur({value:s,source:null,stack:null}),t=xl(e,t,i)}else if(st||Rs(e,t,i,!1),m=(i&e.childLanes)!==0,st||m){if(m=Ke,m!==null&&(s=Bo(m,i),s!==0&&s!==k.retryLane))throw k.retryLane=s,Ji(e,s),wt(m,e,s),bl;ao(T)||Un(),t=xl(e,t,i)}else ao(T)?(t.flags|=192,t.child=e.child,t=null):(e=k.treeContext,Ve=Gt(T.nextSibling),ht=t,Le=!0,Di=null,qt=!1,e!==null&&Rc(t,e),t=Al(t,s.children),t.flags|=4096);return t}return r?(Oi(),T=s.fallback,r=t.mode,k=e.child,V=k.sibling,s=ni(k,{mode:"hidden",children:s.children}),s.subtreeFlags=k.subtreeFlags&65011712,V!==null?T=ni(V,T):(T=es(T,r,i,null),T.flags|=2),T.return=t,s.return=t,s.sibling=T,t.child=s,Cr(null,s),s=t.child,T=e.child.memoizedState,T===null?T=wl(i):(r=T.cachePool,r!==null?(k=tt._currentValue,r=r.parent!==k?{parent:k,pool:k}:r):r=Hc(),T={baseLanes:T.baseLanes|i,cachePool:r}),s.memoizedState=T,s.childLanes=Dl(e,m,i),t.memoizedState=El,Cr(e.child,s)):(Li(t),i=e.child,e=i.sibling,i=ni(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(m=t.deletions,m===null?(t.deletions=[e],t.flags|=16):m.push(e)),t.child=i,t.memoizedState=null,i)}function Al(e,t){return t=Mn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Mn(e,t){return e=Tt(22,e,null,t),e.lanes=0,e}function xl(e,t,i){return ls(t,e.child,null,i),e=Al(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Ga(e.return,t,i)}function Tl(e,t,i,s,r,n){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=i,m.tailMode=r,m.treeForkCount=n)}function Pu(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var m=$e.current,T=(m&2)!==0;if(T?(m=m&1|2,t.flags|=128):m&=1,G($e,m),dt(e,t,s,i),s=Le?cr:0,!T&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wu(e,i,t);else if(e.tag===19)Wu(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(i=t.child,r=null;i!==null;)e=i.alternate,e!==null&&pn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Tl(t,!1,r,i,n,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&pn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Tl(t,!0,i,null,n,s);break;case"together":Tl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function hi(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Hi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Rs(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(Y(153));if(t.child!==null){for(e=t.child,i=ni(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=ni(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Rl(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&un(e)))}function r_(e,t,i){switch(t.tag){case 3:R(t,t.stateNode.containerInfo),xi(t,tt,e.memoizedState.cache),ts();break;case 27:case 5:ae(t);break;case 4:R(t,t.stateNode.containerInfo);break;case 10:xi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,el(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Li(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Fu(e,t,i):(Li(t),e=hi(e,t,i),e!==null?e.sibling:null);Li(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Rs(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return Pu(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),G($e,$e.current),s)break;return null;case 22:return t.lanes=0,Iu(e,t,i,t.pendingProps);case 24:xi(t,tt,e.memoizedState.cache)}return hi(e,t,i)}function Zu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)st=!0;else{if(!Rl(e,i)&&(t.flags&128)===0)return st=!1,r_(e,t,i);st=(e.flags&131072)!==0}else st=!1,Le&&(t.flags&1048576)!==0&&Tc(t,cr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ns(t.elementType),t.type=e,typeof e=="function")ka(e)?(s=cs(e,s),t.tag=1,t=Vu(null,t,e,s,i)):(t.tag=0,t=Cl(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=ju(null,t,e,s,i);break e}else if(r===E){t.tag=14,t=Uu(null,t,e,s,i);break e}}throw t=Z(e)||e,Error(Y(306,t,""))}}return t;case 0:return Cl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=cs(s,t.pendingProps),Vu(e,t,s,r,i);case 3:e:{if(R(t,t.stateNode.containerInfo),e===null)throw Error(Y(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,Pa(e,t),mr(t,s,null,i);var m=t.memoizedState;if(s=m.cache,xi(t,tt,s),s!==n.cache&&Ya(t,[tt],i,!0),gr(),s=m.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=Xu(e,t,s,i);break e}else if(s!==r){r=Nt(Error(Y(424)),t),ur(r),t=Xu(e,t,s,i);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ve=Gt(e.firstChild),ht=t,Le=!0,Di=null,qt=!0,i=Ic(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(ts(),s===r){t=hi(e,t,i);break e}dt(e,t,s,i)}t=t.child}return t;case 26:return Rn(e,t),e===null?(i=of(t.type,null,t.pendingProps,null))?t.memoizedState=i:Le||(i=t.type,e=t.pendingProps,s=Xn(oe.current).createElement(i),s[ut]=t,s[pt]=e,_t(s,i,e),lt(s),t.stateNode=s):t.memoizedState=of(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&Le&&(s=t.stateNode=nf(t.type,t.pendingProps,oe.current),ht=t,qt=!0,r=Ve,qi(t.type)?(oo=r,Ve=Gt(s.firstChild)):Ve=r),dt(e,t,t.pendingProps.children,i),Rn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((r=s=Ve)&&(s=k_(s,t.type,t.pendingProps,qt),s!==null?(t.stateNode=s,ht=t,Ve=Gt(s.firstChild),qt=!1,r=!0):r=!1),r||Ai(t)),ae(t),r=t.type,n=t.pendingProps,m=e!==null?e.memoizedProps:null,s=n.children,so(r,n)?s=null:m!==null&&so(r,m)&&(t.flags|=32),t.memoizedState!==null&&(r=il(e,t,Pd,null,null,i),Nr._currentValue=r),Rn(e,t),dt(e,t,s,i),t.child;case 6:return e===null&&Le&&((e=i=Ve)&&(i=H_(i,t.pendingProps,qt),i!==null?(t.stateNode=i,ht=t,Ve=null,e=!0):e=!1),e||Ai(t)),null;case 13:return Fu(e,t,i);case 4:return R(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ls(t,null,s,i):dt(e,t,s,i),t.child;case 11:return ju(e,t,t.type,t.pendingProps,i);case 7:return dt(e,t,t.pendingProps,i),t.child;case 8:return dt(e,t,t.pendingProps.children,i),t.child;case 12:return dt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,xi(t,t.type,s.value),dt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,ss(t),r=ft(r),s=s(r),t.flags|=1,dt(e,t,s,i),t.child;case 14:return Uu(e,t,t.type,t.pendingProps,i);case 15:return qu(e,t,t.type,t.pendingProps,i);case 19:return Pu(e,t,i);case 31:return s_(e,t,i);case 22:return Iu(e,t,i,t.pendingProps);case 24:return ss(t),s=ft(tt),e===null?(r=Xa(),r===null&&(r=Ke,n=Ka(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},Wa(t),xi(t,tt,r)):((e.lanes&i)!==0&&(Pa(e,t),mr(t,null,null,i),gr()),r=e.memoizedState,n=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),xi(t,tt,s)):(s=n.cache,xi(t,tt,s),s!==r.cache&&Ya(t,[tt],i,!0))),dt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(Y(156,t.tag))}function fi(e){e.flags|=4}function Ml(e,t,i,s,r){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(Eh())e.flags|=8192;else throw as=_n,Fa}else e.flags&=-16777217}function Qu(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!df(t))if(Eh())e.flags|=8192;else throw as=_n,Fa}function Ln(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Mo():536870912,e.lanes|=t,Is|=t)}function Er(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Xe(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)i|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function n_(e,t,i){var s=t.pendingProps;switch(ja(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Xe(t),null;case 1:return Xe(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),oi(tt),$(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ts(t)?fi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,qa())),Xe(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(fi(t),n!==null?(Xe(t),Qu(t,n)):(Xe(t),Ml(t,r,null,s,i))):n?n!==e.memoizedState?(fi(t),Xe(t),Qu(t,n)):(Xe(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&fi(t),Xe(t),Ml(t,r,e,s,i)),null;case 27:if(de(t),i=oe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&fi(t);else{if(!s){if(t.stateNode===null)throw Error(Y(166));return Xe(t),null}e=W.current,Ts(t)?Mc(t):(e=nf(r,s,i),t.stateNode=e,fi(t))}return Xe(t),null;case 5:if(de(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&fi(t);else{if(!s){if(t.stateNode===null)throw Error(Y(166));return Xe(t),null}if(n=W.current,Ts(t))Mc(t);else{var m=Xn(oe.current);switch(n){case 1:n=m.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=m.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=m.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=m.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?m.createElement("select",{is:s.is}):m.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?m.createElement(r,{is:s.is}):m.createElement(r)}}n[ut]=t,n[pt]=s;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)n.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=n;e:switch(_t(n,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&fi(t)}}return Xe(t),Ml(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&fi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(Y(166));if(e=oe.current,Ts(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=ht,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[ut]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Fh(e.nodeValue,i)),e||Ai(t,!0)}else e=Xn(e).createTextNode(s),e[ut]=t,t.stateNode=e}return Xe(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ts(t),i!==null){if(e===null){if(!s)throw Error(Y(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Y(557));e[ut]=t}else ts(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),e=!1}else i=qa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Mt(t),t):(Mt(t),null);if((t.flags&128)!==0)throw Error(Y(558))}return Xe(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ts(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(Y(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(Y(317));r[ut]=t}else ts(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Xe(t),r=!1}else r=qa(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Mt(t),t):(Mt(t),null)}return Mt(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),n=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(n=s.memoizedState.cachePool.pool),n!==r&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Ln(t,t.updateQueue),Xe(t),null);case 4:return $(),e===null&&$l(t.stateNode.containerInfo),Xe(t),null;case 10:return oi(t.type),Xe(t),null;case 19:if(M($e),s=t.memoizedState,s===null)return Xe(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)Er(s,!1);else{if(Qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=pn(e),n!==null){for(t.flags|=128,Er(s,!1),e=n.updateQueue,t.updateQueue=e,Ln(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Dc(i,e),i=i.sibling;return G($e,$e.current&1|2),Le&&ai(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Pe()>zn&&(t.flags|=128,r=!0,Er(s,!1),t.lanes=4194304)}else{if(!r)if(e=pn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Ln(t,e),Er(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Le)return Xe(t),null}else 2*Pe()-s.renderingStartTime>zn&&i!==536870912&&(t.flags|=128,r=!0,Er(s,!1),t.lanes=4194304);s.isBackwards?(n.sibling=t.child,t.child=n):(e=s.last,e!==null?e.sibling=n:t.child=n,s.last=n)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Pe(),e.sibling=null,i=$e.current,G($e,r?i&1|2:i&1),Le&&ai(t,s.treeForkCount),e):(Xe(t),null);case 22:case 23:return Mt(t),Ja(),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(i&536870912)!==0&&(t.flags&128)===0&&(Xe(t),t.subtreeFlags&6&&(t.flags|=8192)):Xe(t),i=t.updateQueue,i!==null&&Ln(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==i&&(t.flags|=2048),e!==null&&M(rs),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),oi(tt),Xe(t),null;case 25:return null;case 30:return null}throw Error(Y(156,t.tag))}function a_(e,t){switch(ja(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oi(tt),$(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(Mt(t),t.alternate===null)throw Error(Y(340));ts()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Y(340));ts()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M($e),null;case 4:return $(),null;case 10:return oi(t.type),null;case 22:case 23:return Mt(t),Ja(),e!==null&&M(rs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oi(tt),null;case 25:return null;default:return null}}function $u(e,t){switch(ja(t),t.tag){case 3:oi(tt),$();break;case 26:case 27:case 5:de(t);break;case 4:$();break;case 31:t.memoizedState!==null&&Mt(t);break;case 13:Mt(t);break;case 19:M($e);break;case 10:oi(t.type);break;case 22:case 23:Mt(t),Ja(),e!==null&&M(rs);break;case 24:oi(tt)}}function wr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var r=s.next;i=r;do{if((i.tag&e)===e){s=void 0;var n=i.create,m=i.inst;s=n(),m.destroy=s}i=i.next}while(i!==r)}}catch(T){qe(t,t.return,T)}}function Bi(e,t,i){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var n=r.next;s=n;do{if((s.tag&e)===e){var m=s.inst,T=m.destroy;if(T!==void 0){m.destroy=void 0,r=t;var k=i,V=T;try{V()}catch(ee){qe(r,k,ee)}}}s=s.next}while(s!==n)}}catch(ee){qe(t,t.return,ee)}}function Ju(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Yc(t,i)}catch(s){qe(e,e.return,s)}}}function eh(e,t,i){i.props=cs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){qe(e,t,s)}}function Dr(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var s=e.stateNode;break;case 30:s=e.stateNode;break;default:s=e.stateNode}typeof i=="function"?e.refCleanup=i(s):i.current=s}}catch(r){qe(e,t,r)}}function $t(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){qe(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(r){qe(e,t,r)}else i.current=null}function th(e){var t=e.type,i=e.memoizedProps,s=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&s.focus();break e;case"img":i.src?s.src=i.src:i.srcSet&&(s.srcset=i.srcSet)}}catch(r){qe(e,e.return,r)}}function Ll(e,t,i){try{var s=e.stateNode;T_(s,e.type,i,t),s[pt]=t}catch(r){qe(e,e.return,r)}}function ih(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&qi(e.type)||e.tag===4}function Ol(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ih(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&qi(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Bl(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=si));else if(s!==4&&(s===27&&qi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Bl(e,t,i),e=e.sibling;e!==null;)Bl(e,t,i),e=e.sibling}function On(e,t,i){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(s!==4&&(s===27&&qi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(On(e,t,i),e=e.sibling;e!==null;)On(e,t,i),e=e.sibling}function sh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);_t(t,s,i),t[ut]=e,t[pt]=i}catch(n){qe(e,e.return,n)}}var di=!1,rt=!1,kl=!1,rh=typeof WeakSet=="function"?WeakSet:Set,ot=null;function l_(e,t){if(e=e.containerInfo,to=Jn,e=gc(e),xa(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var s=i.getSelection&&i.getSelection();if(s&&s.rangeCount!==0){i=s.anchorNode;var r=s.anchorOffset,n=s.focusNode;s=s.focusOffset;try{i.nodeType,n.nodeType}catch{i=null;break e}var m=0,T=-1,k=-1,V=0,ee=0,se=e,X=null;t:for(;;){for(var P;se!==i||r!==0&&se.nodeType!==3||(T=m+r),se!==n||s!==0&&se.nodeType!==3||(k=m+s),se.nodeType===3&&(m+=se.nodeValue.length),(P=se.firstChild)!==null;)X=se,se=P;for(;;){if(se===e)break t;if(X===i&&++V===r&&(T=m),X===n&&++ee===s&&(k=m),(P=se.nextSibling)!==null)break;se=X,X=se.parentNode}se=P}i=T===-1||k===-1?null:{start:T,end:k}}else i=null}i=i||{start:0,end:0}}else i=null;for(io={focusedElem:e,selectionRange:i},Jn=!1,ot=t;ot!==null;)if(t=ot,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ot=e;else for(;ot!==null;){switch(t=ot,n=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)r=e[i],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&n!==null){e=void 0,i=t,r=n.memoizedProps,n=n.memoizedState,s=i.stateNode;try{var ve=cs(i.type,r);e=s.getSnapshotBeforeUpdate(ve,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){qe(i,i.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)no(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":no(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(Y(163))}if(e=t.sibling,e!==null){e.return=t.return,ot=e;break}ot=t.return}}function nh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:vi(e,i),s&4&&wr(5,i);break;case 1:if(vi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(m){qe(i,i.return,m)}else{var r=cs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){qe(i,i.return,m)}}s&64&&Ju(i),s&512&&Dr(i,i.return);break;case 3:if(vi(e,i),s&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Yc(e,t)}catch(m){qe(i,i.return,m)}}break;case 27:t===null&&s&4&&sh(i);case 26:case 5:vi(e,i),t===null&&s&4&&th(i),s&512&&Dr(i,i.return);break;case 12:vi(e,i);break;case 31:vi(e,i),s&4&&oh(e,i);break;case 13:vi(e,i),s&4&&ch(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=g_.bind(null,i),z_(e,i))));break;case 22:if(s=i.memoizedState!==null||di,!s){t=t!==null&&t.memoizedState!==null||rt,r=di;var n=rt;di=s,(rt=t)&&!n?gi(e,i,(i.subtreeFlags&8772)!==0):vi(e,i),di=r,rt=n}break;case 30:break;default:vi(e,i)}}function ah(e){var t=e.alternate;t!==null&&(e.alternate=null,ah(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ua(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Fe=null,yt=!1;function _i(e,t,i){for(i=i.child;i!==null;)lh(e,t,i),i=i.sibling}function lh(e,t,i){if(Dt&&typeof Dt.onCommitFiberUnmount=="function")try{Dt.onCommitFiberUnmount(Fi,i)}catch{}switch(i.tag){case 26:rt||$t(i,t),_i(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:rt||$t(i,t);var s=Fe,r=yt;qi(i.type)&&(Fe=i.stateNode,yt=!1),_i(e,t,i),kr(i.stateNode),Fe=s,yt=r;break;case 5:rt||$t(i,t);case 6:if(s=Fe,r=yt,Fe=null,_i(e,t,i),Fe=s,yt=r,Fe!==null)if(yt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(i.stateNode)}catch(n){qe(i,t,n)}else try{Fe.removeChild(i.stateNode)}catch(n){qe(i,t,n)}break;case 18:Fe!==null&&(yt?(e=Fe,Jh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Ps(e)):Jh(Fe,i.stateNode));break;case 4:s=Fe,r=yt,Fe=i.stateNode.containerInfo,yt=!0,_i(e,t,i),Fe=s,yt=r;break;case 0:case 11:case 14:case 15:Bi(2,i,t),rt||Bi(4,i,t),_i(e,t,i);break;case 1:rt||($t(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&eh(i,t,s)),_i(e,t,i);break;case 21:_i(e,t,i);break;case 22:rt=(s=rt)||i.memoizedState!==null,_i(e,t,i),rt=s;break;default:_i(e,t,i)}}function oh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ps(e)}catch(i){qe(t,t.return,i)}}}function ch(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ps(e)}catch(i){qe(t,t.return,i)}}function o_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new rh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new rh),t;default:throw Error(Y(435,e.tag))}}function Bn(e,t){var i=o_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=m_.bind(null,e,s);s.then(r,r)}})}function bt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,m=t,T=m;e:for(;T!==null;){switch(T.tag){case 27:if(qi(T.type)){Fe=T.stateNode,yt=!1;break e}break;case 5:Fe=T.stateNode,yt=!1;break e;case 3:case 4:Fe=T.stateNode.containerInfo,yt=!0;break e}T=T.return}if(Fe===null)throw Error(Y(160));lh(n,m,r),Fe=null,yt=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)uh(t,e),t=t.sibling}var Xt=null;function uh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bt(t,e),Ct(e),s&4&&(Bi(3,e,e.return),wr(3,e),Bi(5,e,e.return));break;case 1:bt(t,e),Ct(e),s&512&&(rt||i===null||$t(i,i.return)),s&64&&di&&(e=e.updateQueue,e!==null&&(s=e.callbacks,s!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?s:i.concat(s))));break;case 26:var r=Xt;if(bt(t,e),Ct(e),s&512&&(rt||i===null||$t(i,i.return)),s&4){var n=i!==null?i.memoizedState:null;if(s=e.memoizedState,i===null)if(s===null)if(e.stateNode===null){e:{s=e.type,i=e.memoizedProps,r=r.ownerDocument||r;t:switch(s){case"title":n=r.getElementsByTagName("title")[0],(!n||n[$s]||n[ut]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),_t(n,s,i),n[ut]=e,lt(n),s=n;break e;case"link":var m=hf("link","href",r).get(s+(i.href||""));if(m){for(var T=0;T<m.length;T++)if(n=m[T],n.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&n.getAttribute("rel")===(i.rel==null?null:i.rel)&&n.getAttribute("title")===(i.title==null?null:i.title)&&n.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){m.splice(T,1);break t}}n=r.createElement(s),_t(n,s,i),r.head.appendChild(n);break;case"meta":if(m=hf("meta","content",r).get(s+(i.content||""))){for(T=0;T<m.length;T++)if(n=m[T],n.getAttribute("content")===(i.content==null?null:""+i.content)&&n.getAttribute("name")===(i.name==null?null:i.name)&&n.getAttribute("property")===(i.property==null?null:i.property)&&n.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&n.getAttribute("charset")===(i.charSet==null?null:i.charSet)){m.splice(T,1);break t}}n=r.createElement(s),_t(n,s,i),r.head.appendChild(n);break;default:throw Error(Y(468,s))}n[ut]=e,lt(n),s=n}e.stateNode=s}else ff(r,e.type,e.stateNode);else e.stateNode=uf(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?ff(r,e.type,e.stateNode):uf(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ll(e,e.memoizedProps,i.memoizedProps)}break;case 27:bt(t,e),Ct(e),s&512&&(rt||i===null||$t(i,i.return)),i!==null&&s&4&&Ll(e,e.memoizedProps,i.memoizedProps);break;case 5:if(bt(t,e),Ct(e),s&512&&(rt||i===null||$t(i,i.return)),e.flags&32){r=e.stateNode;try{ps(r,"")}catch(ve){qe(e,e.return,ve)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Ll(e,r,i!==null?i.memoizedProps:r)),s&1024&&(kl=!0);break;case 6:if(bt(t,e),Ct(e),s&4){if(e.stateNode===null)throw Error(Y(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ve){qe(e,e.return,ve)}}break;case 3:if(Pn=null,r=Xt,Xt=Fn(t.containerInfo),bt(t,e),Xt=r,Ct(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Ps(t.containerInfo)}catch(ve){qe(e,e.return,ve)}kl&&(kl=!1,hh(e));break;case 4:s=Xt,Xt=Fn(e.stateNode.containerInfo),bt(t,e),Ct(e),Xt=s;break;case 12:bt(t,e),Ct(e);break;case 31:bt(t,e),Ct(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bn(e,s)));break;case 13:bt(t,e),Ct(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Hn=Pe()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bn(e,s)));break;case 22:r=e.memoizedState!==null;var k=i!==null&&i.memoizedState!==null,V=di,ee=rt;if(di=V||r,rt=ee||k,bt(t,e),rt=ee,di=V,Ct(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||k||di||rt||us(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){k=i=t;try{if(n=k.stateNode,r)m=n.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{T=k.stateNode;var se=k.memoizedProps.style,X=se!=null&&se.hasOwnProperty("display")?se.display:null;T.style.display=X==null||typeof X=="boolean"?"":(""+X).trim()}}catch(ve){qe(k,k.return,ve)}}}else if(t.tag===6){if(i===null){k=t;try{k.stateNode.nodeValue=r?"":k.memoizedProps}catch(ve){qe(k,k.return,ve)}}}else if(t.tag===18){if(i===null){k=t;try{var P=k.stateNode;r?ef(P,!0):ef(k.stateNode,!1)}catch(ve){qe(k,k.return,ve)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(i=s.retryQueue,i!==null&&(s.retryQueue=null,Bn(e,i))));break;case 19:bt(t,e),Ct(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Bn(e,s)));break;case 30:break;case 21:break;default:bt(t,e),Ct(e)}}function Ct(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(ih(s)){i=s;break}s=s.return}if(i==null)throw Error(Y(160));switch(i.tag){case 27:var r=i.stateNode,n=Ol(e);On(e,n,r);break;case 5:var m=i.stateNode;i.flags&32&&(ps(m,""),i.flags&=-33);var T=Ol(e);On(e,T,m);break;case 3:case 4:var k=i.stateNode.containerInfo,V=Ol(e);Bl(e,V,k);break;default:throw Error(Y(161))}}catch(ee){qe(e,e.return,ee)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function hh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;hh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)nh(e,t.alternate,t),t=t.sibling}function us(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Bi(4,t,t.return),us(t);break;case 1:$t(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&eh(t,t.return,i),us(t);break;case 27:kr(t.stateNode);case 26:case 5:$t(t,t.return),us(t);break;case 22:t.memoizedState===null&&us(t);break;case 30:us(t);break;default:us(t)}e=e.sibling}}function gi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,m=n.flags;switch(n.tag){case 0:case 11:case 15:gi(r,n,i),wr(4,n);break;case 1:if(gi(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(V){qe(s,s.return,V)}if(s=n,r=s.updateQueue,r!==null){var T=s.stateNode;try{var k=r.shared.hiddenCallbacks;if(k!==null)for(r.shared.hiddenCallbacks=null,r=0;r<k.length;r++)Gc(k[r],T)}catch(V){qe(s,s.return,V)}}i&&m&64&&Ju(n),Dr(n,n.return);break;case 27:sh(n);case 26:case 5:gi(r,n,i),i&&s===null&&m&4&&th(n),Dr(n,n.return);break;case 12:gi(r,n,i);break;case 31:gi(r,n,i),i&&m&4&&oh(r,n);break;case 13:gi(r,n,i),i&&m&4&&ch(r,n);break;case 22:n.memoizedState===null&&gi(r,n,i),Dr(n,n.return);break;case 30:break;default:gi(r,n,i)}t=t.sibling}}function Hl(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&hr(i))}function zl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hr(e))}function Ft(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)fh(e,t,i,s),t=t.sibling}function fh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Ft(e,t,i,s),r&2048&&wr(9,t);break;case 1:Ft(e,t,i,s);break;case 3:Ft(e,t,i,s),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&hr(e)));break;case 12:if(r&2048){Ft(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,m=n.id,T=n.onPostCommit;typeof T=="function"&&T(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){qe(t,t.return,k)}}else Ft(e,t,i,s);break;case 31:Ft(e,t,i,s);break;case 13:Ft(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,m=t.alternate,t.memoizedState!==null?n._visibility&2?Ft(e,t,i,s):Ar(e,t):n._visibility&2?Ft(e,t,i,s):(n._visibility|=2,js(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Hl(m,t);break;case 24:Ft(e,t,i,s),r&2048&&zl(t.alternate,t);break;default:Ft(e,t,i,s)}}function js(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,m=t,T=i,k=s,V=m.flags;switch(m.tag){case 0:case 11:case 15:js(n,m,T,k,r),wr(8,m);break;case 23:break;case 22:var ee=m.stateNode;m.memoizedState!==null?ee._visibility&2?js(n,m,T,k,r):Ar(n,m):(ee._visibility|=2,js(n,m,T,k,r)),r&&V&2048&&Hl(m.alternate,m);break;case 24:js(n,m,T,k,r),r&&V&2048&&zl(m.alternate,m);break;default:js(n,m,T,k,r)}t=t.sibling}}function Ar(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,r=s.flags;switch(s.tag){case 22:Ar(i,s),r&2048&&Hl(s.alternate,s);break;case 24:Ar(i,s),r&2048&&zl(s.alternate,s);break;default:Ar(i,s)}t=t.sibling}}var xr=8192;function Us(e,t,i){if(e.subtreeFlags&xr)for(e=e.child;e!==null;)dh(e,t,i),e=e.sibling}function dh(e,t,i){switch(e.tag){case 26:Us(e,t,i),e.flags&xr&&e.memoizedState!==null&&W_(i,Xt,e.memoizedState,e.memoizedProps);break;case 5:Us(e,t,i);break;case 3:case 4:var s=Xt;Xt=Fn(e.stateNode.containerInfo),Us(e,t,i),Xt=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=xr,xr=16777216,Us(e,t,i),xr=s):Us(e,t,i));break;default:Us(e,t,i)}}function _h(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Tr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ot=s,gh(s,e)}_h(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)vh(e),e=e.sibling}function vh(e){switch(e.tag){case 0:case 11:case 15:Tr(e),e.flags&2048&&Bi(9,e,e.return);break;case 3:Tr(e);break;case 12:Tr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,kn(e)):Tr(e);break;default:Tr(e)}}function kn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var s=t[i];ot=s,gh(s,e)}_h(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Bi(8,t,t.return),kn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,kn(t));break;default:kn(t)}e=e.sibling}}function gh(e,t){for(;ot!==null;){var i=ot;switch(i.tag){case 0:case 11:case 15:Bi(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var s=i.memoizedState.cachePool.pool;s!=null&&s.refCount++}break;case 24:hr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,ot=s;else e:for(i=e;ot!==null;){s=ot;var r=s.sibling,n=s.return;if(ah(s),s===i){ot=null;break e}if(r!==null){r.return=n,ot=r;break e}ot=n}}}var c_={getCacheForType:function(e){var t=ft(tt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return ft(tt).controller.signal}},u_=typeof WeakMap=="function"?WeakMap:Map,je=0,Ke=null,xe=null,Re=0,Ue=0,Lt=null,ki=!1,qs=!1,Nl=!1,mi=0,Qe=0,Hi=0,hs=0,jl=0,Ot=0,Is=0,Rr=null,Et=null,Ul=!1,Hn=0,mh=0,zn=1/0,Nn=null,zi=null,at=0,Ni=null,Gs=null,pi=0,ql=0,Il=null,ph=null,Mr=0,Gl=null;function Bt(){return(je&2)!==0&&Re!==0?Re&-Re:U.T!==null?Wl():ko()}function Sh(){if(Ot===0)if((Re&536870912)===0||Le){var e=Kr;Kr<<=1,(Kr&3932160)===0&&(Kr=262144),Ot=e}else Ot=536870912;return e=Rt.current,e!==null&&(e.flags|=32),Ot}function wt(e,t,i){(e===Ke&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(Ys(e,0),ji(e,Re,Ot,!1)),Qs(e,i),((je&2)===0||e!==Ke)&&(e===Ke&&((je&2)===0&&(hs|=i),Qe===4&&ji(e,Re,Ot,!1)),Jt(e))}function yh(e,t,i){if((je&6)!==0)throw Error(Y(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Zs(e,t),r=s?d_(e,t):Kl(e,t,!0),n=s;do{if(r===0){qs&&!s&&ji(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!h_(i)){r=Kl(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var m=0;else m=e.pendingLanes&-536870913,m=m!==0?m:m&536870912?536870912:0;if(m!==0){t=m;e:{var T=e;r=Rr;var k=T.current.memoizedState.isDehydrated;if(k&&(Ys(T,m).flags|=256),m=Kl(T,m,!1),m!==2){if(Nl&&!k){T.errorRecoveryDisabledLanes|=n,hs|=n,r=4;break e}n=Et,Et=r,n!==null&&(Et===null?Et=n:Et.push.apply(Et,n))}r=m}if(n=!1,r!==2)continue}}if(r===1){Ys(e,0),ji(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(Y(345));case 4:if((t&4194048)!==t)break;case 6:ji(s,t,Ot,!ki);break e;case 2:Et=null;break;case 3:case 5:break;default:throw Error(Y(329))}if((t&62914560)===t&&(r=Hn+300-Pe(),10<r)){if(ji(s,t,Ot,!ki),Xr(s,0,!0)!==0)break e;pi=t,s.timeoutHandle=Qh(bh.bind(null,s,i,Et,Nn,Ul,t,Ot,hs,Is,ki,n,"Throttled",-0,0),r);break e}bh(s,i,Et,Nn,Ul,t,Ot,hs,Is,ki,n,null,-0,0)}}break}while(!0);Jt(e)}function bh(e,t,i,s,r,n,m,T,k,V,ee,se,X,P){if(e.timeoutHandle=-1,se=t.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:si},dh(t,n,se);var ve=(n&62914560)===n?Hn-Pe():(n&4194048)===n?mh-Pe():0;if(ve=P_(se,ve),ve!==null){pi=n,e.cancelPendingCommit=ve(Rh.bind(null,e,t,n,i,s,r,m,T,k,ee,se,null,X,P)),ji(e,n,m,!V);return}}Rh(e,t,n,i,s,r,m,T,k)}function h_(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var s=0;s<i.length;s++){var r=i[s],n=r.getSnapshot;r=r.value;try{if(!xt(n(),r))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function ji(e,t,i,s){t&=~jl,t&=~hs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-At(r),m=1<<n;s[n]=-1,r&=~m}i!==0&&Lo(e,i,t)}function jn(){return(je&6)===0?(Lr(0),!1):!0}function Yl(){if(xe!==null){if(Ue===0)var e=xe.return;else e=xe,li=is=null,nl(e),Bs=null,dr=0,e=xe;for(;e!==null;)$u(e.alternate,e),e=e.return;xe=null}}function Ys(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,L_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),pi=0,Yl(),Ke=e,xe=i=ni(e.current,null),Re=t,Ue=0,Lt=null,ki=!1,qs=Zs(e,t),Nl=!1,Is=Ot=jl=hs=Hi=Qe=0,Et=Rr=null,Ul=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var r=31-At(s),n=1<<r;t|=e[r],s&=~n}return mi=t,nn(),i}function Ch(e,t){we=null,U.H=br,t===Os||t===dn?(t=jc(),Ue=3):t===Fa?(t=jc(),Ue=4):Ue=t===bl?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Lt=t,xe===null&&(Qe=1,xn(e,Nt(t,e.current)))}function Eh(){var e=Rt.current;return e===null?!0:(Re&4194048)===Re?It===null:(Re&62914560)===Re||(Re&536870912)!==0?e===It:!1}function wh(){var e=U.H;return U.H=br,e===null?br:e}function Dh(){var e=U.A;return U.A=c_,e}function Un(){Qe=4,ki||(Re&4194048)!==Re&&Rt.current!==null||(qs=!0),(Hi&134217727)===0&&(hs&134217727)===0||Ke===null||ji(Ke,Re,Ot,!1)}function Kl(e,t,i){var s=je;je|=2;var r=wh(),n=Dh();(Ke!==e||Re!==t)&&(Nn=null,Ys(e,t)),t=!1;var m=Qe;e:do try{if(Ue!==0&&xe!==null){var T=xe,k=Lt;switch(Ue){case 8:Yl(),m=6;break e;case 3:case 2:case 9:case 6:Rt.current===null&&(t=!0);var V=Ue;if(Ue=0,Lt=null,Ks(e,T,k,V),i&&qs){m=0;break e}break;default:V=Ue,Ue=0,Lt=null,Ks(e,T,k,V)}}f_(),m=Qe;break}catch(ee){Ch(e,ee)}while(!0);return t&&e.shellSuspendCounter++,li=is=null,je=s,U.H=r,U.A=n,xe===null&&(Ke=null,Re=0,nn()),m}function f_(){for(;xe!==null;)Ah(xe)}function d_(e,t){var i=je;je|=2;var s=wh(),r=Dh();Ke!==e||Re!==t?(Nn=null,zn=Pe()+500,Ys(e,t)):qs=Zs(e,t);e:do try{if(Ue!==0&&xe!==null){t=xe;var n=Lt;t:switch(Ue){case 1:Ue=0,Lt=null,Ks(e,t,n,1);break;case 2:case 9:if(zc(n)){Ue=0,Lt=null,xh(t);break}t=function(){Ue!==2&&Ue!==9||Ke!==e||(Ue=7),Jt(e)},n.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:zc(n)?(Ue=0,Lt=null,xh(t)):(Ue=0,Lt=null,Ks(e,t,n,7));break;case 5:var m=null;switch(xe.tag){case 26:m=xe.memoizedState;case 5:case 27:var T=xe;if(m?df(m):T.stateNode.complete){Ue=0,Lt=null;var k=T.sibling;if(k!==null)xe=k;else{var V=T.return;V!==null?(xe=V,qn(V)):xe=null}break t}}Ue=0,Lt=null,Ks(e,t,n,5);break;case 6:Ue=0,Lt=null,Ks(e,t,n,6);break;case 8:Yl(),Qe=6;break e;default:throw Error(Y(462))}}__();break}catch(ee){Ch(e,ee)}while(!0);return li=is=null,U.H=s,U.A=r,je=i,xe!==null?0:(Ke=null,Re=0,nn(),Qe)}function __(){for(;xe!==null&&!yi();)Ah(xe)}function Ah(e){var t=Zu(e.alternate,e,mi);e.memoizedProps=e.pendingProps,t===null?qn(e):xe=t}function xh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Ku(i,t,t.pendingProps,t.type,void 0,Re);break;case 11:t=Ku(i,t,t.pendingProps,t.type.render,t.ref,Re);break;case 5:nl(t);default:$u(i,t),t=xe=Dc(t,mi),t=Zu(i,t,mi)}e.memoizedProps=e.pendingProps,t===null?qn(e):xe=t}function Ks(e,t,i,s){li=is=null,nl(t),Bs=null,dr=0;var r=t.return;try{if(i_(e,r,t,i,Re)){Qe=1,xn(e,Nt(i,e.current)),xe=null;return}}catch(n){if(r!==null)throw xe=r,n;Qe=1,xn(e,Nt(i,e.current)),xe=null;return}t.flags&32768?(Le||s===1?e=!0:qs||(Re&536870912)!==0?e=!1:(ki=e=!0,(s===2||s===9||s===3||s===6)&&(s=Rt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Th(t,e)):qn(t)}function qn(e){var t=e;do{if((t.flags&32768)!==0){Th(t,ki);return}e=t.return;var i=n_(t.alternate,t,mi);if(i!==null){xe=i;return}if(t=t.sibling,t!==null){xe=t;return}xe=t=e}while(t!==null);Qe===0&&(Qe=5)}function Th(e,t){do{var i=a_(e.alternate,e);if(i!==null){i.flags&=32767,xe=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){xe=e;return}xe=e=i}while(e!==null);Qe=6,xe=null}function Rh(e,t,i,s,r,n,m,T,k){e.cancelPendingCommit=null;do In();while(at!==0);if((je&6)!==0)throw Error(Y(327));if(t!==null){if(t===e.current)throw Error(Y(177));if(n=t.lanes|t.childLanes,n|=Oa,Ff(e,i,n,m,T,k),e===Ke&&(xe=Ke=null,Re=0),Gs=t,Ni=e,pi=i,ql=n,Il=r,ph=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,p_(_e,function(){return kh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=U.T,U.T=null,r=F.p,F.p=2,m=je,je|=4;try{l_(e,t,i)}finally{je=m,F.p=r,U.T=s}}at=1,Mh(),Lh(),Oh()}}function Mh(){if(at===1){at=0;var e=Ni,t=Gs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=U.T,U.T=null;var s=F.p;F.p=2;var r=je;je|=4;try{uh(t,e);var n=io,m=gc(e.containerInfo),T=n.focusedElem,k=n.selectionRange;if(m!==T&&T&&T.ownerDocument&&vc(T.ownerDocument.documentElement,T)){if(k!==null&&xa(T)){var V=k.start,ee=k.end;if(ee===void 0&&(ee=V),"selectionStart"in T)T.selectionStart=V,T.selectionEnd=Math.min(ee,T.value.length);else{var se=T.ownerDocument||document,X=se&&se.defaultView||window;if(X.getSelection){var P=X.getSelection(),ve=T.textContent.length,Ce=Math.min(k.start,ve),Ye=k.end===void 0?Ce:Math.min(k.end,ve);!P.extend&&Ce>Ye&&(m=Ye,Ye=Ce,Ce=m);var I=_c(T,Ce),j=_c(T,Ye);if(I&&j&&(P.rangeCount!==1||P.anchorNode!==I.node||P.anchorOffset!==I.offset||P.focusNode!==j.node||P.focusOffset!==j.offset)){var K=se.createRange();K.setStart(I.node,I.offset),P.removeAllRanges(),Ce>Ye?(P.addRange(K),P.extend(j.node,j.offset)):(K.setEnd(j.node,j.offset),P.addRange(K))}}}}for(se=[],P=T;P=P.parentNode;)P.nodeType===1&&se.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof T.focus=="function"&&T.focus(),T=0;T<se.length;T++){var ie=se[T];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Jn=!!to,io=to=null}finally{je=r,F.p=s,U.T=i}}e.current=t,at=2}}function Lh(){if(at===2){at=0;var e=Ni,t=Gs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=U.T,U.T=null;var s=F.p;F.p=2;var r=je;je|=4;try{nh(e,t.alternate,t)}finally{je=r,F.p=s,U.T=i}}at=3}}function Oh(){if(at===4||at===3){at=0,ct();var e=Ni,t=Gs,i=pi,s=ph;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?at=5:(at=0,Gs=Ni=null,Bh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(zi=null),oa(i),t=t.stateNode,Dt&&typeof Dt.onCommitFiberRoot=="function")try{Dt.onCommitFiberRoot(Fi,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=U.T,r=F.p,F.p=2,U.T=null;try{for(var n=e.onRecoverableError,m=0;m<s.length;m++){var T=s[m];n(T.value,{componentStack:T.stack})}}finally{U.T=t,F.p=r}}(pi&3)!==0&&In(),Jt(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===Gl?Mr++:(Mr=0,Gl=e):Mr=0,Lr(0)}}function Bh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,hr(t)))}function In(){return Mh(),Lh(),Oh(),kh()}function kh(){if(at!==5)return!1;var e=Ni,t=ql;ql=0;var i=oa(pi),s=U.T,r=F.p;try{F.p=32>i?32:i,U.T=null,i=Il,Il=null;var n=Ni,m=pi;if(at=0,Gs=Ni=null,pi=0,(je&6)!==0)throw Error(Y(331));var T=je;if(je|=4,vh(n.current),fh(n,n.current,m,i),je=T,Lr(0,!1),Dt&&typeof Dt.onPostCommitFiberRoot=="function")try{Dt.onPostCommitFiberRoot(Fi,n)}catch{}return!0}finally{F.p=r,U.T=s,Bh(e,t)}}function Hh(e,t,i){t=Nt(i,t),t=yl(e.stateNode,t,2),e=Mi(e,t,2),e!==null&&(Qs(e,2),Jt(e))}function qe(e,t,i){if(e.tag===3)Hh(e,e,i);else for(;t!==null;){if(t.tag===3){Hh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(zi===null||!zi.has(s))){e=Nt(i,e),i=zu(2),s=Mi(t,i,2),s!==null&&(Nu(i,s,t,e),Qs(s,2),Jt(s));break}}t=t.return}}function Vl(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new u_;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(i)||(Nl=!0,r.add(i),e=v_.bind(null,e,t,i),t.then(e,e))}function v_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ke===e&&(Re&i)===i&&(Qe===4||Qe===3&&(Re&62914560)===Re&&300>Pe()-Hn?(je&2)===0&&Ys(e,0):jl|=i,Is===Re&&(Is=0)),Jt(e)}function zh(e,t){t===0&&(t=Mo()),e=Ji(e,t),e!==null&&(Qs(e,t),Jt(e))}function g_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),zh(e,i)}function m_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(i=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(Y(314))}s!==null&&s.delete(t),zh(e,i)}function p_(e,t){return ti(e,t)}var Gn=null,Vs=null,Xl=!1,Yn=!1,Fl=!1,Ui=0;function Jt(e){e!==Vs&&e.next===null&&(Vs===null?Gn=Vs=e:Vs=Vs.next=e),Yn=!0,Xl||(Xl=!0,y_())}function Lr(e,t){if(!Fl&&Yn){Fl=!0;do for(var i=!1,s=Gn;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var m=s.suspendedLanes,T=s.pingedLanes;n=(1<<31-At(42|e)+1)-1,n&=r&~(m&~T),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,qh(s,n))}else n=Re,n=Xr(s,s===Ke?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||Zs(s,n)||(i=!0,qh(s,n));s=s.next}while(i);Fl=!1}}function S_(){Nh()}function Nh(){Yn=Xl=!1;var e=0;Ui!==0&&M_()&&(e=Ui);for(var t=Pe(),i=null,s=Gn;s!==null;){var r=s.next,n=jh(s,t);n===0?(s.next=null,i===null?Gn=r:i.next=r,r===null&&(Vs=i)):(i=s,(e!==0||(n&3)!==0)&&(Yn=!0)),s=r}at!==0&&at!==5||Lr(e),Ui!==0&&(Ui=0)}function jh(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var m=31-At(n),T=1<<m,k=r[m];k===-1?((T&i)===0||(T&s)!==0)&&(r[m]=Xf(T,t)):k<=t&&(e.expiredLanes|=T),n&=~T}if(t=Ke,i=Re,i=Xr(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Wt(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Zs(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Wt(s),oa(i)){case 2:case 8:i=te;break;case 32:i=_e;break;case 268435456:i=pe;break;default:i=_e}return s=Uh.bind(null,e),i=ti(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Wt(s),e.callbackPriority=2,e.callbackNode=null,2}function Uh(e,t){if(at!==0&&at!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(In()&&e.callbackNode!==i)return null;var s=Re;return s=Xr(e,e===Ke?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(yh(e,s,t),jh(e,Pe()),e.callbackNode!=null&&e.callbackNode===i?Uh.bind(null,e):null)}function qh(e,t){if(In())return null;yh(e,t,!0)}function y_(){O_(function(){(je&6)!==0?ti(Pt,S_):Nh()})}function Wl(){if(Ui===0){var e=Ms;e===0&&(e=Yr,Yr<<=1,(Yr&261888)===0&&(Yr=256)),Ui=e}return Ui}function Ih(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Zr(""+e)}function Gh(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function b_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Ih((r[pt]||null).action),m=s.submitter;m&&(t=(t=m[pt]||null)?Ih(t.formAction):m.getAttribute("formAction"),t!==null&&(n=t,m=null));var T=new en("action","action",null,s,r);e.push({event:T,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Ui!==0){var k=m?Gh(r,m):new FormData(r);_l(i,{pending:!0,data:k,method:r.method,action:n},null,k)}}else typeof n=="function"&&(T.preventDefault(),k=m?Gh(r,m):new FormData(r),_l(i,{pending:!0,data:k,method:r.method,action:n},n,k))},currentTarget:r}]})}}for(var Pl=0;Pl<La.length;Pl++){var Zl=La[Pl],C_=Zl.toLowerCase(),E_=Zl[0].toUpperCase()+Zl.slice(1);Vt(C_,"on"+E_)}Vt(Sc,"onAnimationEnd"),Vt(yc,"onAnimationIteration"),Vt(bc,"onAnimationStart"),Vt("dblclick","onDoubleClick"),Vt("focusin","onFocus"),Vt("focusout","onBlur"),Vt(Ud,"onTransitionRun"),Vt(qd,"onTransitionStart"),Vt(Id,"onTransitionCancel"),Vt(Cc,"onTransitionEnd"),gs("onMouseEnter",["mouseout","mouseover"]),gs("onMouseLeave",["mouseout","mouseover"]),gs("onPointerEnter",["pointerout","pointerover"]),gs("onPointerLeave",["pointerout","pointerover"]),Pi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Pi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Pi("onBeforeInput",["compositionend","keypress","textInput","paste"]),Pi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Pi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Pi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="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(" "),w_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Or));function Yh(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],r=s.event;s=s.listeners;e:{var n=void 0;if(t)for(var m=s.length-1;0<=m;m--){var T=s[m],k=T.instance,V=T.currentTarget;if(T=T.listener,k!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=V;try{n(r)}catch(ee){rn(ee)}r.currentTarget=null,n=k}else for(m=0;m<s.length;m++){if(T=s[m],k=T.instance,V=T.currentTarget,T=T.listener,k!==n&&r.isPropagationStopped())break e;n=T,r.currentTarget=V;try{n(r)}catch(ee){rn(ee)}r.currentTarget=null,n=k}}}}function Te(e,t){var i=t[ca];i===void 0&&(i=t[ca]=new Set);var s=e+"__bubble";i.has(s)||(Kh(t,e,2,!1),i.add(s))}function Ql(e,t,i){var s=0;t&&(s|=4),Kh(i,e,s,t)}var Kn="_reactListening"+Math.random().toString(36).slice(2);function $l(e){if(!e[Kn]){e[Kn]=!0,No.forEach(function(i){i!=="selectionchange"&&(w_.has(i)||Ql(i,!1,e),Ql(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kn]||(t[Kn]=!0,Ql("selectionchange",!1,t))}}function Kh(e,t,i,s){switch(yf(t)){case 2:var r=$_;break;case 8:r=J_;break;default:r=_o}i=r.bind(null,t,i,e),r=void 0,!pa||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,i,{capture:!0,passive:r}):e.addEventListener(t,i,!0):r!==void 0?e.addEventListener(t,i,{passive:r}):e.addEventListener(t,i,!1)}function Jl(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var T=s.stateNode.containerInfo;if(T===r)break;if(m===4)for(m=s.return;m!==null;){var k=m.tag;if((k===3||k===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;T!==null;){if(m=ds(T),m===null)return;if(k=m.tag,k===5||k===6||k===26||k===27){s=n=m;continue e}T=T.parentNode}}s=s.return}Po(function(){var V=n,ee=ga(i),se=[];e:{var X=Ec.get(e);if(X!==void 0){var P=en,ve=e;switch(e){case"keypress":if($r(i)===0)break e;case"keydown":case"keyup":P=md;break;case"focusin":ve="focus",P=Ca;break;case"focusout":ve="blur",P=Ca;break;case"beforeblur":case"afterblur":P=Ca;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=$o;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=nd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=yd;break;case Sc:case yc:case bc:P=od;break;case Cc:P=Cd;break;case"scroll":case"scrollend":P=sd;break;case"wheel":P=wd;break;case"copy":case"cut":case"paste":P=ud;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=ec;break;case"toggle":case"beforetoggle":P=Ad}var Ce=(t&4)!==0,Ye=!Ce&&(e==="scroll"||e==="scrollend"),I=Ce?X!==null?X+"Capture":null:X;Ce=[];for(var j=V,K;j!==null;){var ie=j;if(K=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||K===null||I===null||(ie=er(j,I),ie!=null&&Ce.push(Br(j,ie,K))),Ye)break;j=j.return}0<Ce.length&&(X=new P(X,ve,null,i,ee),se.push({event:X,listeners:Ce}))}}if((t&7)===0){e:{if(X=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",X&&i!==va&&(ve=i.relatedTarget||i.fromElement)&&(ds(ve)||ve[fs]))break e;if((P||X)&&(X=ee.window===ee?ee:(X=ee.ownerDocument)?X.defaultView||X.parentWindow:window,P?(ve=i.relatedTarget||i.toElement,P=V,ve=ve?ds(ve):null,ve!==null&&(Ye=Se(ve),Ce=ve.tag,ve!==Ye||Ce!==5&&Ce!==27&&Ce!==6)&&(ve=null)):(P=null,ve=V),P!==ve)){if(Ce=$o,ie="onMouseLeave",I="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=ec,ie="onPointerLeave",I="onPointerEnter",j="pointer"),Ye=P==null?X:Js(P),K=ve==null?X:Js(ve),X=new Ce(ie,j+"leave",P,i,ee),X.target=Ye,X.relatedTarget=K,ie=null,ds(ee)===V&&(Ce=new Ce(I,j+"enter",ve,i,ee),Ce.target=K,Ce.relatedTarget=Ye,ie=Ce),Ye=ie,P&&ve)t:{for(Ce=D_,I=P,j=ve,K=0,ie=I;ie;ie=Ce(ie))K++;ie=0;for(var ye=j;ye;ye=Ce(ye))ie++;for(;0<K-ie;)I=Ce(I),K--;for(;0<ie-K;)j=Ce(j),ie--;for(;K--;){if(I===j||j!==null&&I===j.alternate){Ce=I;break t}I=Ce(I),j=Ce(j)}Ce=null}else Ce=null;P!==null&&Vh(se,X,P,Ce,!1),ve!==null&&Ye!==null&&Vh(se,Ye,ve,Ce,!0)}}e:{if(X=V?Js(V):window,P=X.nodeName&&X.nodeName.toLowerCase(),P==="select"||P==="input"&&X.type==="file")var He=oc;else if(ac(X))if(cc)He=zd;else{He=kd;var me=Bd}else P=X.nodeName,!P||P.toLowerCase()!=="input"||X.type!=="checkbox"&&X.type!=="radio"?V&&_a(V.elementType)&&(He=oc):He=Hd;if(He&&(He=He(e,V))){lc(se,He,i,ee);break e}me&&me(e,X,V),e==="focusout"&&V&&X.type==="number"&&V.memoizedProps.value!=null&&da(X,"number",X.value)}switch(me=V?Js(V):window,e){case"focusin":(ac(me)||me.contentEditable==="true")&&(Cs=me,Ta=V,or=null);break;case"focusout":or=Ta=Cs=null;break;case"mousedown":Ra=!0;break;case"contextmenu":case"mouseup":case"dragend":Ra=!1,mc(se,i,ee);break;case"selectionchange":if(jd)break;case"keydown":case"keyup":mc(se,i,ee)}var De;if(wa)e:{switch(e){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else bs?rc(e,i)&&(Me="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Me="onCompositionStart");Me&&(tc&&i.locale!=="ko"&&(bs||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&bs&&(De=Zo()):(Ei=ee,Sa="value"in Ei?Ei.value:Ei.textContent,bs=!0)),me=Vn(V,Me),0<me.length&&(Me=new Jo(Me,e,null,i,ee),se.push({event:Me,listeners:me}),De?Me.data=De:(De=nc(i),De!==null&&(Me.data=De)))),(De=Td?Rd(e,i):Md(e,i))&&(Me=Vn(V,"onBeforeInput"),0<Me.length&&(me=new Jo("onBeforeInput","beforeinput",null,i,ee),se.push({event:me,listeners:Me}),me.data=De)),b_(se,e,V,i,ee)}Yh(se,t)})}function Br(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Vn(e,t){for(var i=t+"Capture",s=[];e!==null;){var r=e,n=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||n===null||(r=er(e,i),r!=null&&s.unshift(Br(e,r,n)),r=er(e,t),r!=null&&s.push(Br(e,r,n))),e.tag===3)return s;e=e.return}return[]}function D_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vh(e,t,i,s,r){for(var n=t._reactName,m=[];i!==null&&i!==s;){var T=i,k=T.alternate,V=T.stateNode;if(T=T.tag,k!==null&&k===s)break;T!==5&&T!==26&&T!==27||V===null||(k=V,r?(V=er(i,n),V!=null&&m.unshift(Br(i,V,k))):r||(V=er(i,n),V!=null&&m.push(Br(i,V,k)))),i=i.return}m.length!==0&&e.push({event:t,listeners:m})}var A_=/\r\n?/g,x_=/\u0000|\uFFFD/g;function Xh(e){return(typeof e=="string"?e:""+e).replace(A_,`
|
|
9
|
-
`).replace(x_,"")}function Fh(e,t){return t=Xh(t),Xh(e)===t}function Ge(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ps(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ps(e,""+s);break;case"className":Wr(e,"class",s);break;case"tabIndex":Wr(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Wr(e,i,s);break;case"style":Fo(e,s,n);break;case"data":if(t!=="object"){Wr(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Zr(""+s),e.setAttribute(i,s);break;case"action":case"formAction":if(typeof s=="function"){e.setAttribute(i,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof n=="function"&&(i==="formAction"?(t!=="input"&&Ge(e,t,"name",r.name,r,null),Ge(e,t,"formEncType",r.formEncType,r,null),Ge(e,t,"formMethod",r.formMethod,r,null),Ge(e,t,"formTarget",r.formTarget,r,null)):(Ge(e,t,"encType",r.encType,r,null),Ge(e,t,"method",r.method,r,null),Ge(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=Zr(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=si);break;case"onScroll":s!=null&&Te("scroll",e);break;case"onScrollEnd":s!=null&&Te("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(Y(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(Y(60));e.innerHTML=i}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}i=Zr(""+s),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""+s):e.removeAttribute(i);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":s===!0?e.setAttribute(i,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(i,s):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?e.setAttribute(i,s):e.removeAttribute(i);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(i):e.setAttribute(i,s);break;case"popover":Te("beforetoggle",e),Te("toggle",e),Fr(e,"popover",s);break;case"xlinkActuate":ii(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ii(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ii(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ii(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ii(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ii(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ii(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ii(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ii(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":Fr(e,"is",s);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=td.get(i)||i,Fr(e,i,s))}}function eo(e,t,i,s,r,n){switch(i){case"style":Fo(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(Y(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(Y(60));e.innerHTML=i}}break;case"children":typeof s=="string"?ps(e,s):(typeof s=="number"||typeof s=="bigint")&&ps(e,""+s);break;case"onScroll":s!=null&&Te("scroll",e);break;case"onScrollEnd":s!=null&&Te("scrollend",e);break;case"onClick":s!=null&&(e.onclick=si);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!jo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(r=i.endsWith("Capture"),t=i.slice(2,r?i.length-7:void 0),n=e[pt]||null,n=n!=null?n[i]:null,typeof n=="function"&&e.removeEventListener(t,n,r),typeof s=="function")){typeof n!="function"&&n!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,r);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):Fr(e,i,s)}}}function _t(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Te("error",e),Te("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var m=i[n];if(m!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(Y(137,t));default:Ge(e,t,n,m,i,null)}}r&&Ge(e,t,"srcSet",i.srcSet,i,null),s&&Ge(e,t,"src",i.src,i,null);return;case"input":Te("invalid",e);var T=n=m=r=null,k=null,V=null;for(s in i)if(i.hasOwnProperty(s)){var ee=i[s];if(ee!=null)switch(s){case"name":r=ee;break;case"type":m=ee;break;case"checked":k=ee;break;case"defaultChecked":V=ee;break;case"value":n=ee;break;case"defaultValue":T=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(Y(137,t));break;default:Ge(e,t,s,ee,i,null)}}Yo(e,n,T,k,V,m,r,!1);return;case"select":Te("invalid",e),s=m=n=null;for(r in i)if(i.hasOwnProperty(r)&&(T=i[r],T!=null))switch(r){case"value":n=T;break;case"defaultValue":m=T;break;case"multiple":s=T;default:Ge(e,t,r,T,i,null)}t=n,i=m,e.multiple=!!s,t!=null?ms(e,!!s,t,!1):i!=null&&ms(e,!!s,i,!0);return;case"textarea":Te("invalid",e),n=r=s=null;for(m in i)if(i.hasOwnProperty(m)&&(T=i[m],T!=null))switch(m){case"value":s=T;break;case"defaultValue":r=T;break;case"children":n=T;break;case"dangerouslySetInnerHTML":if(T!=null)throw Error(Y(91));break;default:Ge(e,t,m,T,i,null)}Vo(e,s,r,n);return;case"option":for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null)&&(k==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Ge(e,t,k,s,i,null));return;case"dialog":Te("beforetoggle",e),Te("toggle",e),Te("cancel",e),Te("close",e);break;case"iframe":case"object":Te("load",e);break;case"video":case"audio":for(s=0;s<Or.length;s++)Te(Or[s],e);break;case"image":Te("error",e),Te("load",e);break;case"details":Te("toggle",e);break;case"embed":case"source":case"link":Te("error",e),Te("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in i)if(i.hasOwnProperty(V)&&(s=i[V],s!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(Y(137,t));default:Ge(e,t,V,s,i,null)}return;default:if(_a(t)){for(ee in i)i.hasOwnProperty(ee)&&(s=i[ee],s!==void 0&&eo(e,t,ee,s,i,void 0));return}}for(T in i)i.hasOwnProperty(T)&&(s=i[T],s!=null&&Ge(e,t,T,s,i,null))}function T_(e,t,i,s){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,n=null,m=null,T=null,k=null,V=null,ee=null;for(P in i){var se=i[P];if(i.hasOwnProperty(P)&&se!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":k=se;default:s.hasOwnProperty(P)||Ge(e,t,P,null,s,se)}}for(var X in s){var P=s[X];if(se=i[X],s.hasOwnProperty(X)&&(P!=null||se!=null))switch(X){case"type":n=P;break;case"name":r=P;break;case"checked":V=P;break;case"defaultChecked":ee=P;break;case"value":m=P;break;case"defaultValue":T=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(Y(137,t));break;default:P!==se&&Ge(e,t,X,P,s,se)}}fa(e,m,T,k,V,ee,n,r);return;case"select":P=m=T=X=null;for(n in i)if(k=i[n],i.hasOwnProperty(n)&&k!=null)switch(n){case"value":break;case"multiple":P=k;default:s.hasOwnProperty(n)||Ge(e,t,n,null,s,k)}for(r in s)if(n=s[r],k=i[r],s.hasOwnProperty(r)&&(n!=null||k!=null))switch(r){case"value":X=n;break;case"defaultValue":T=n;break;case"multiple":m=n;default:n!==k&&Ge(e,t,r,n,s,k)}t=T,i=m,s=P,X!=null?ms(e,!!i,X,!1):!!s!=!!i&&(t!=null?ms(e,!!i,t,!0):ms(e,!!i,i?[]:"",!1));return;case"textarea":P=X=null;for(T in i)if(r=i[T],i.hasOwnProperty(T)&&r!=null&&!s.hasOwnProperty(T))switch(T){case"value":break;case"children":break;default:Ge(e,t,T,null,s,r)}for(m in s)if(r=s[m],n=i[m],s.hasOwnProperty(m)&&(r!=null||n!=null))switch(m){case"value":X=r;break;case"defaultValue":P=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(Y(91));break;default:r!==n&&Ge(e,t,m,r,s,n)}Ko(e,X,P);return;case"option":for(var ve in i)X=i[ve],i.hasOwnProperty(ve)&&X!=null&&!s.hasOwnProperty(ve)&&(ve==="selected"?e.selected=!1:Ge(e,t,ve,null,s,X));for(k in s)X=s[k],P=i[k],s.hasOwnProperty(k)&&X!==P&&(X!=null||P!=null)&&(k==="selected"?e.selected=X&&typeof X!="function"&&typeof X!="symbol":Ge(e,t,k,X,s,P));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 Ce in i)X=i[Ce],i.hasOwnProperty(Ce)&&X!=null&&!s.hasOwnProperty(Ce)&&Ge(e,t,Ce,null,s,X);for(V in s)if(X=s[V],P=i[V],s.hasOwnProperty(V)&&X!==P&&(X!=null||P!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(Y(137,t));break;default:Ge(e,t,V,X,s,P)}return;default:if(_a(t)){for(var Ye in i)X=i[Ye],i.hasOwnProperty(Ye)&&X!==void 0&&!s.hasOwnProperty(Ye)&&eo(e,t,Ye,void 0,s,X);for(ee in s)X=s[ee],P=i[ee],!s.hasOwnProperty(ee)||X===P||X===void 0&&P===void 0||eo(e,t,ee,X,s,P);return}}for(var I in i)X=i[I],i.hasOwnProperty(I)&&X!=null&&!s.hasOwnProperty(I)&&Ge(e,t,I,null,s,X);for(se in s)X=s[se],P=i[se],!s.hasOwnProperty(se)||X===P||X==null&&P==null||Ge(e,t,se,X,s,P)}function Wh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function R_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var r=i[s],n=r.transferSize,m=r.initiatorType,T=r.duration;if(n&&T&&Wh(m)){for(m=0,T=r.responseEnd,s+=1;s<i.length;s++){var k=i[s],V=k.startTime;if(V>T)break;var ee=k.transferSize,se=k.initiatorType;ee&&Wh(se)&&(k=k.responseEnd,m+=ee*(k<T?1:(T-V)/(k-V)))}if(--s,t+=8*(n+m)/(r.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var to=null,io=null;function Xn(e){return e.nodeType===9?e:e.ownerDocument}function Ph(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Zh(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function so(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var ro=null;function M_(){var e=window.event;return e&&e.type==="popstate"?e===ro?!1:(ro=e,!0):(ro=null,!1)}var Qh=typeof setTimeout=="function"?setTimeout:void 0,L_=typeof clearTimeout=="function"?clearTimeout:void 0,$h=typeof Promise=="function"?Promise:void 0,O_=typeof queueMicrotask=="function"?queueMicrotask:typeof $h<"u"?function(e){return $h.resolve(null).then(e).catch(B_)}:Qh;function B_(e){setTimeout(function(){throw e})}function qi(e){return e==="head"}function Jh(e,t){var i=t,s=0;do{var r=i.nextSibling;if(e.removeChild(i),r&&r.nodeType===8)if(i=r.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(r),Ps(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")kr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,kr(i);for(var n=i.firstChild;n;){var m=n.nextSibling,T=n.nodeName;n[$s]||T==="SCRIPT"||T==="STYLE"||T==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=m}}else i==="body"&&kr(e.ownerDocument.body);i=r}while(i);Ps(t)}function ef(e,t){var i=e;e=0;do{var s=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),s&&s.nodeType===8)if(i=s.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=s}while(i)}function no(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":no(i),ua(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function k_(e,t,i,s){for(;e.nodeType===1;){var r=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[$s])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(n=e.getAttribute("rel"),n==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(n!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(n=e.getAttribute("src"),(n!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&n&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var n=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===n)return e}else return e;if(e=Gt(e.nextSibling),e===null)break}return null}function H_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Gt(e.nextSibling),e===null))return null;return e}function tf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Gt(e.nextSibling),e===null))return null;return e}function ao(e){return e.data==="$?"||e.data==="$~"}function lo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function z_(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Gt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var oo=null;function sf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Gt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function rf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function nf(e,t,i){switch(t=Xn(i),e){case"html":if(e=t.documentElement,!e)throw Error(Y(452));return e;case"head":if(e=t.head,!e)throw Error(Y(453));return e;case"body":if(e=t.body,!e)throw Error(Y(454));return e;default:throw Error(Y(451))}}function kr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ua(e)}var Yt=new Map,af=new Set;function Fn(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Si=F.d;F.d={f:N_,r:j_,D:U_,C:q_,L:I_,m:G_,X:K_,S:Y_,M:V_};function N_(){var e=Si.f(),t=jn();return e||t}function j_(e){var t=_s(e);t!==null&&t.tag===5&&t.type==="form"?Cu(t):Si.r(e)}var Xs=typeof document>"u"?null:document;function lf(e,t,i){var s=Xs;if(s&&typeof t=="string"&&t){var r=Ht(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),af.has(r)||(af.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),_t(t,"link",e),lt(t),s.head.appendChild(t)))}}function U_(e){Si.D(e),lf("dns-prefetch",e,null)}function q_(e,t){Si.C(e,t),lf("preconnect",e,t)}function I_(e,t,i){Si.L(e,t,i);var s=Xs;if(s&&e&&t){var r='link[rel="preload"][as="'+Ht(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Ht(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Ht(i.imageSizes)+'"]')):r+='[href="'+Ht(e)+'"]';var n=r;switch(t){case"style":n=Fs(e);break;case"script":n=Ws(e)}Yt.has(n)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Yt.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Hr(n))||t==="script"&&s.querySelector(zr(n))||(t=s.createElement("link"),_t(t,"link",e),lt(t),s.head.appendChild(t)))}}function G_(e,t){Si.m(e,t);var i=Xs;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Ht(s)+'"][href="'+Ht(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=Ws(e)}if(!Yt.has(n)&&(e=u({rel:"modulepreload",href:e},t),Yt.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(zr(n)))return}s=i.createElement("link"),_t(s,"link",e),lt(s),i.head.appendChild(s)}}}function Y_(e,t,i){Si.S(e,t,i);var s=Xs;if(s&&e){var r=vs(s).hoistableStyles,n=Fs(e);t=t||"default";var m=r.get(n);if(!m){var T={loading:0,preload:null};if(m=s.querySelector(Hr(n)))T.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Yt.get(n))&&co(e,i);var k=m=s.createElement("link");lt(k),_t(k,"link",e),k._p=new Promise(function(V,ee){k.onload=V,k.onerror=ee}),k.addEventListener("load",function(){T.loading|=1}),k.addEventListener("error",function(){T.loading|=2}),T.loading|=4,Wn(m,t,s)}m={type:"stylesheet",instance:m,count:1,state:T},r.set(n,m)}}}function K_(e,t){Si.X(e,t);var i=Xs;if(i&&e){var s=vs(i).hoistableScripts,r=Ws(e),n=s.get(r);n||(n=i.querySelector(zr(r)),n||(e=u({src:e,async:!0},t),(t=Yt.get(r))&&uo(e,t),n=i.createElement("script"),lt(n),_t(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function V_(e,t){Si.M(e,t);var i=Xs;if(i&&e){var s=vs(i).hoistableScripts,r=Ws(e),n=s.get(r);n||(n=i.querySelector(zr(r)),n||(e=u({src:e,async:!0,type:"module"},t),(t=Yt.get(r))&&uo(e,t),n=i.createElement("script"),lt(n),_t(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function of(e,t,i,s){var r=(r=oe.current)?Fn(r):null;if(!r)throw Error(Y(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Fs(i.href),i=vs(r).hoistableStyles,s=i.get(t),s||(s={type:"style",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Fs(i.href);var n=vs(r).hoistableStyles,m=n.get(e);if(m||(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,m),(n=r.querySelector(Hr(e)))&&!n._p&&(m.instance=n,m.state.loading=5),Yt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Yt.set(e,i),n||X_(r,e,i,m.state))),t&&s===null)throw Error(Y(528,""));return m}if(t&&s!==null)throw Error(Y(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ws(i),i=vs(r).hoistableScripts,s=i.get(t),s||(s={type:"script",instance:null,count:0,state:null},i.set(t,s)),s):{type:"void",instance:null,count:0,state:null};default:throw Error(Y(444,e))}}function Fs(e){return'href="'+Ht(e)+'"'}function Hr(e){return'link[rel="stylesheet"]['+e+"]"}function cf(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function X_(e,t,i,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=1:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=1}),t.addEventListener("error",function(){return s.loading|=2}),_t(t,"link",i),lt(t),e.head.appendChild(t))}function Ws(e){return'[src="'+Ht(e)+'"]'}function zr(e){return"script[async]"+e}function uf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Ht(i.href)+'"]');if(s)return t.instance=s,lt(s),s;var r=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),lt(s),_t(s,"style",r),Wn(s,i.precedence,e),t.instance=s;case"stylesheet":r=Fs(i.href);var n=e.querySelector(Hr(r));if(n)return t.state.loading|=4,t.instance=n,lt(n),n;s=cf(i),(r=Yt.get(r))&&co(s,r),n=(e.ownerDocument||e).createElement("link"),lt(n);var m=n;return m._p=new Promise(function(T,k){m.onload=T,m.onerror=k}),_t(n,"link",s),t.state.loading|=4,Wn(n,i.precedence,e),t.instance=n;case"script":return n=Ws(i.src),(r=e.querySelector(zr(n)))?(t.instance=r,lt(r),r):(s=i,(r=Yt.get(n))&&(s=u({},i),uo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),lt(r),_t(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(Y(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,Wn(s,i.precedence,e));return t.instance}function Wn(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,n=r,m=0;m<s.length;m++){var T=s[m];if(T.dataset.precedence===t)n=T;else if(n!==r)break}n?n.parentNode.insertBefore(e,n.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function co(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function uo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Pn=null;function hf(e,t,i){if(Pn===null){var s=new Map,r=Pn=new Map;r.set(i,s)}else r=Pn,s=r.get(i),s||(s=new Map,r.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),r=0;r<i.length;r++){var n=i[r];if(!(n[$s]||n[ut]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var m=n.getAttribute(t)||"";m=e+m;var T=s.get(m);T?T.push(n):s.set(m,[n])}}return s}function ff(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function F_(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function df(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function W_(e,t,i,s){if(i.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var r=Fs(s.href),n=t.querySelector(Hr(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Zn.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,lt(n);return}n=t.ownerDocument||t,s=cf(s),(r=Yt.get(r))&&co(s,r),n=n.createElement("link"),lt(n);var m=n;m._p=new Promise(function(T,k){m.onload=T,m.onerror=k}),_t(n,"link",s),i.instance=n}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=Zn.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var ho=0;function P_(e,t){return e.stylesheets&&e.count===0&&$n(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&$n(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&ho===0&&(ho=62500*R_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&$n(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>ho?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Zn(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$n(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Qn=null;function $n(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Qn=new Map,t.forEach(Z_,e),Qn=null,Zn.call(e))}function Z_(e,t){if(!(t.state.loading&4)){var i=Qn.get(e);if(i)var s=i.get(null);else{i=new Map,Qn.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var m=r[n];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(i.set(m.dataset.precedence,m),s=m)}s&&i.set(null,s)}r=t.instance,m=r.getAttribute("data-precedence"),n=i.get(m)||s,n===s&&i.set(null,r),i.set(m,r),this.count++,s=Zn.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),n?n.parentNode.insertBefore(r,n.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Nr={$$typeof:l,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function Q_(e,t,i,s,r,n,m,T,k){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=aa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=aa(0),this.hiddenUpdates=aa(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function _f(e,t,i,s,r,n,m,T,k,V,ee,se){return e=new Q_(e,t,i,m,k,V,ee,se,T),t=1,n===!0&&(t|=24),n=Tt(3,null,null,t),e.current=n,n.stateNode=e,t=Ka(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},Wa(n),e}function vf(e){return e?(e=Ds,e):Ds}function gf(e,t,i,s,r,n){r=vf(r),s.context===null?s.context=r:s.pendingContext=r,s=Ri(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=Mi(e,s,t),i!==null&&(wt(i,e,t),vr(i,e,t))}function mf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function fo(e,t){mf(e,t),(e=e.alternate)&&mf(e,t)}function pf(e){if(e.tag===13||e.tag===31){var t=Ji(e,67108864);t!==null&&wt(t,e,67108864),fo(e,67108864)}}function Sf(e){if(e.tag===13||e.tag===31){var t=Bt();t=la(t);var i=Ji(e,t);i!==null&&wt(i,e,t),fo(e,t)}}var Jn=!0;function $_(e,t,i,s){var r=U.T;U.T=null;var n=F.p;try{F.p=2,_o(e,t,i,s)}finally{F.p=n,U.T=r}}function J_(e,t,i,s){var r=U.T;U.T=null;var n=F.p;try{F.p=8,_o(e,t,i,s)}finally{F.p=n,U.T=r}}function _o(e,t,i,s){if(Jn){var r=vo(s);if(r===null)Jl(e,t,s,ea,i),bf(e,s);else if(tv(r,e,t,i,s))s.stopPropagation();else if(bf(e,s),t&4&&-1<ev.indexOf(e)){for(;r!==null;){var n=_s(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var m=Wi(n.pendingLanes);if(m!==0){var T=n;for(T.pendingLanes|=2,T.entangledLanes|=2;m;){var k=1<<31-At(m);T.entanglements[1]|=k,m&=~k}Jt(n),(je&6)===0&&(zn=Pe()+500,Lr(0))}}break;case 31:case 13:T=Ji(n,2),T!==null&&wt(T,n,2),jn(),fo(n,2)}if(n=vo(s),n===null&&Jl(e,t,s,ea,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else Jl(e,t,s,null,i)}}function vo(e){return e=ga(e),go(e)}var ea=null;function go(e){if(ea=null,e=ds(e),e!==null){var t=Se(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=J(t),e!==null)return e;e=null}else if(i===31){if(e=f(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ea=e,null}function yf(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(mt()){case Pt:return 2;case te:return 8;case _e:case he:return 32;case pe:return 268435456;default:return 32}default:return 32}}var mo=!1,Ii=null,Gi=null,Yi=null,jr=new Map,Ur=new Map,Ki=[],ev="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 bf(e,t){switch(e){case"focusin":case"focusout":Ii=null;break;case"dragenter":case"dragleave":Gi=null;break;case"mouseover":case"mouseout":Yi=null;break;case"pointerover":case"pointerout":jr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ur.delete(t.pointerId)}}function qr(e,t,i,s,r,n){return e===null||e.nativeEvent!==n?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:n,targetContainers:[r]},t!==null&&(t=_s(t),t!==null&&pf(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function tv(e,t,i,s,r){switch(t){case"focusin":return Ii=qr(Ii,e,t,i,s,r),!0;case"dragenter":return Gi=qr(Gi,e,t,i,s,r),!0;case"mouseover":return Yi=qr(Yi,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return jr.set(n,qr(jr.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,Ur.set(n,qr(Ur.get(n)||null,e,t,i,s,r)),!0}return!1}function Cf(e){var t=ds(e.target);if(t!==null){var i=Se(t);if(i!==null){if(t=i.tag,t===13){if(t=J(i),t!==null){e.blockedOn=t,Ho(e.priority,function(){Sf(i)});return}}else if(t===31){if(t=f(i),t!==null){e.blockedOn=t,Ho(e.priority,function(){Sf(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ta(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=vo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);va=s,i.target.dispatchEvent(s),va=null}else return t=_s(i),t!==null&&pf(t),e.blockedOn=i,!1;t.shift()}return!0}function Ef(e,t,i){ta(e)&&i.delete(t)}function iv(){mo=!1,Ii!==null&&ta(Ii)&&(Ii=null),Gi!==null&&ta(Gi)&&(Gi=null),Yi!==null&&ta(Yi)&&(Yi=null),jr.forEach(Ef),Ur.forEach(Ef)}function ia(e,t){e.blockedOn===t&&(e.blockedOn=null,mo||(mo=!0,re.unstable_scheduleCallback(re.unstable_NormalPriority,iv)))}var sa=null;function wf(e){sa!==e&&(sa=e,re.unstable_scheduleCallback(re.unstable_NormalPriority,function(){sa===e&&(sa=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(go(s||i)===null)continue;break}var n=_s(i);n!==null&&(e.splice(t,3),t-=3,_l(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Ps(e){function t(k){return ia(k,e)}Ii!==null&&ia(Ii,e),Gi!==null&&ia(Gi,e),Yi!==null&&ia(Yi,e),jr.forEach(t),Ur.forEach(t);for(var i=0;i<Ki.length;i++){var s=Ki[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Ki.length&&(i=Ki[0],i.blockedOn===null);)Cf(i),i.blockedOn===null&&Ki.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var r=i[s],n=i[s+1],m=r[pt]||null;if(typeof n=="function")m||wf(i);else if(m){var T=null;if(n&&n.hasAttribute("formAction")){if(r=n,m=n[pt]||null)T=m.formAction;else if(go(r)!==null)continue}else T=m.action;typeof T=="function"?i[s+1]=T:(i.splice(s,3),s-=3),wf(i)}}}function Df(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var n=navigation.currentEntry;n&&n.url!=null&&navigation.navigate(n.url,{state:n.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function po(e){this._internalRoot=e}ra.prototype.render=po.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Y(409));var i=t.current,s=Bt();gf(i,s,e,t,null,null)},ra.prototype.unmount=po.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;gf(e.current,2,null,e,null,null),jn(),t[fs]=null}};function ra(e){this._internalRoot=e}ra.prototype.unstable_scheduleHydration=function(e){if(e){var t=ko();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Ki.length&&t!==0&&t<Ki[i].priority;i++);Ki.splice(i,0,e),i===0&&Cf(e)}};var Af=ge.version;if(Af!=="19.2.8")throw Error(Y(527,Af,"19.2.8"));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Y(188)):(e=Object.keys(e).join(","),Error(Y(268,e)));return e=d(t),e=e!==null?S(e):null,e=e===null?null:e.stateNode,e};var sv={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var na=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!na.isDisabled&&na.supportsFiber)try{Fi=na.inject(sv),Dt=na}catch{}}return Gr.createRoot=function(e,t){if(!ue(e))throw Error(Y(299));var i=!1,s="",r=Ou,n=Bu,m=ku;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(n=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=_f(e,1,!1,null,null,i,s,null,r,n,m,Df),e[fs]=t.current,$l(e),new po(t)},Gr.hydrateRoot=function(e,t,i){if(!ue(e))throw Error(Y(299));var s=!1,r="",n=Ou,m=Bu,T=ku,k=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(n=i.onUncaughtError),i.onCaughtError!==void 0&&(m=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError),i.formState!==void 0&&(k=i.formState)),t=_f(e,1,!0,t,i??null,s,r,k,n,m,T,Df),t.context=vf(null),i=t.current,s=Bt(),s=la(s),r=Ri(s),r.callback=null,Mi(i,r,s),i=s,t.current.lanes=i,Qs(t,i),Jt(t),e[fs]=t.current,$l(e),new ra(t)},Gr.version="19.2.8",Gr}var zf;function dv(){if(zf)return bo.exports;zf=1;function re(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(re)}catch(ge){console.error(ge)}}return re(),bo.exports=fv(),bo.exports}var _v=dv(),Do={exports:{}},Nf;function vv(){return Nf||(Nf=1,(function(re,ge){(function(ce,Y){re.exports=Y()})(globalThis,(()=>(()=>{var ce={4567:function(J,f,h){var d=this&&this.__decorate||function(a,l,_,C){var y,E=arguments.length,v=E<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,l,_,C);else for(var x=a.length-1;x>=0;x--)(y=a[x])&&(v=(E<3?y(v):E>3?y(l,_,v):y(l,_))||v);return E>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(f,"__esModule",{value:!0}),f.AccessibilityManager=void 0;const u=h(9042),p=h(9924),b=h(844),D=h(4725),g=h(2585),o=h(3656);let c=f.AccessibilityManager=class extends b.Disposable{constructor(a,l,_,C){super(),this._terminal=a,this._coreBrowserService=_,this._renderService=C,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let y=0;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);if(this._topBoundaryFocusListener=y=>this._handleBoundaryFocus(y,0),this._bottomBoundaryFocusListener=y=>this._handleBoundaryFocus(y,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((y=>this._handleResize(y.rows)))),this.register(this._terminal.onRender((y=>this._refreshRows(y.start,y.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((y=>this._handleChar(y)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
10
|
-
`)))),this.register(this._terminal.onA11yTab((y=>this._handleTab(y)))),this.register(this._terminal.onKey((y=>this._handleKey(y.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,o.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,b.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(a){for(let l=0;l<a;l++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
|
|
11
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(a){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(a)||this._charsToConsume.push(a)}_refreshRows(a,l){this._liveRegionDebouncer.refresh(a,l,this._terminal.rows)}_renderRows(a,l){const _=this._terminal.buffer,C=_.lines.length.toString();for(let y=a;y<=l;y++){const E=_.lines.get(_.ydisp+y),v=[],x=E?.translateToString(!0,void 0,void 0,v)||"",N=(_.ydisp+y+1).toString(),H=this._rowElements[y];H&&(x.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=x,this._rowColumns.set(H,v)),H.setAttribute("aria-posinset",N),H.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(a,l){const _=a.target,C=this._rowElements[l===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||a.relatedTarget!==C)return;let y,E;if(l===0?(y=_,E=this._rowElements.pop(),this._rowContainer.removeChild(E)):(y=this._rowElements.shift(),E=_,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),E.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const v=this._createAccessibilityTreeNode();this._rowElements.unshift(v),this._rowContainer.insertAdjacentElement("afterbegin",v)}else{const v=this._createAccessibilityTreeNode();this._rowElements.push(v),this._rowContainer.appendChild(v)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),a.preventDefault(),a.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const a=document.getSelection();if(!a)return;if(a.isCollapsed)return void(this._rowContainer.contains(a.anchorNode)&&this._terminal.clearSelection());if(!a.anchorNode||!a.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:a.anchorNode,offset:a.anchorOffset},_={node:a.focusNode,offset:a.focusOffset};if((l.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===_.node&&l.offset>_.offset)&&([l,_]=[_,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const C=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:C,offset:C.textContent?.length??0}),!this._rowContainer.contains(_.node))return;const y=({node:x,offset:N})=>{const H=x instanceof Text?x.parentNode:x;let q=parseInt(H?.getAttribute("aria-posinset"),10)-1;if(isNaN(q))return console.warn("row is invalid. Race condition?"),null;const O=this._rowColumns.get(H);if(!O)return console.warn("columns is null. Race condition?"),null;let Z=N<O.length?O[N]:O.slice(-1)[0]+1;return Z>=this._terminal.cols&&(++q,Z=0),{row:q,column:Z}},E=y(l),v=y(_);if(E&&v){if(E.row>v.row||E.row===v.row&&E.column>=v.column)throw new Error("invalid range");this._terminal.select(E.column,E.row,(v.row-E.row)*this._terminal.cols-E.column+v.column)}}_handleResize(a){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const a=this._coreBrowserService.mainDocument.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}};f.AccessibilityManager=c=d([S(1,g.IInstantiationService),S(2,D.ICoreBrowserService),S(3,D.IRenderService)],c)},3614:(J,f)=>{function h(p){return p.replace(/\r?\n/g,"\r")}function d(p,b){return b?"\x1B[200~"+p+"\x1B[201~":p}function S(p,b,D,g){p=d(p=h(p),D.decPrivateModes.bracketedPasteMode&&g.rawOptions.ignoreBracketedPasteMode!==!0),D.triggerDataEvent(p,!0),b.value=""}function u(p,b,D){const g=D.getBoundingClientRect(),o=p.clientX-g.left-10,c=p.clientY-g.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${o}px`,b.style.top=`${c}px`,b.style.zIndex="1000",b.focus()}Object.defineProperty(f,"__esModule",{value:!0}),f.rightClickHandler=f.moveTextAreaUnderMouseCursor=f.paste=f.handlePasteEvent=f.copyHandler=f.bracketTextForPaste=f.prepareTextForTerminal=void 0,f.prepareTextForTerminal=h,f.bracketTextForPaste=d,f.copyHandler=function(p,b){p.clipboardData&&p.clipboardData.setData("text/plain",b.selectionText),p.preventDefault()},f.handlePasteEvent=function(p,b,D,g){p.stopPropagation(),p.clipboardData&&S(p.clipboardData.getData("text/plain"),b,D,g)},f.paste=S,f.moveTextAreaUnderMouseCursor=u,f.rightClickHandler=function(p,b,D,g,o){u(p,b,D),o&&g.rightClickSelect(p),b.value=g.selectionText,b.select()}},7239:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ColorContrastCache=void 0;const d=h(1505);f.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(S,u,p){this._css.set(S,u,p)}getCss(S,u){return this._css.get(S,u)}setColor(S,u,p){this._color.set(S,u,p)}getColor(S,u){return this._color.get(S,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.addDisposableDomListener=void 0,f.addDisposableDomListener=function(h,d,S,u){h.addEventListener(d,S,u);let p=!1;return{dispose:()=>{p||(p=!0,h.removeEventListener(d,S,u))}}}},3551:function(J,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,y=arguments.length,E=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,l,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(y<3?C(E):y>3?C(a,l,E):C(a,l))||E);return y>3&&E&&Object.defineProperty(a,l,E),E},S=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Linkifier=void 0;const u=h(3656),p=h(8460),b=h(844),D=h(2585),g=h(4725);let o=f.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(c,a,l,_,C){super(),this._element=c,this._mouseService=a,this._renderService=l,this._bufferService=_,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(c){this._lastMouseEvent=c;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!a)return;this._isMouseOut=!1;const l=c.composedPath();for(let _=0;_<l.length;_++){const C=l[_];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._handleHover(a),this._lastBufferCell=a)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,a){this._activeProviderReplies&&a||(this._activeProviderReplies?.forEach((_=>{_?.forEach((C=>{C.link.dispose&&C.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let l=!1;for(const[_,C]of this._linkProviderService.linkProviders.entries())a?this._activeProviderReplies?.get(_)&&(l=this._checkLinkProviderResult(_,c,l)):C.provideLinks(c.y,(y=>{if(this._isMouseOut)return;const E=y?.map((v=>({link:v})));this._activeProviderReplies?.set(_,E),l=this._checkLinkProviderResult(_,c,l),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,a){const l=new Set;for(let _=0;_<a.size;_++){const C=a.get(_);if(C)for(let y=0;y<C.length;y++){const E=C[y],v=E.link.range.start.y<c?0:E.link.range.start.x,x=E.link.range.end.y>c?this._bufferService.cols:E.link.range.end.x;for(let N=v;N<=x;N++){if(l.has(N)){C.splice(y--,1);break}l.add(N)}}}}_checkLinkProviderResult(c,a,l){if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(c);let C=!1;for(let y=0;y<c;y++)this._activeProviderReplies.has(y)&&!this._activeProviderReplies.get(y)||(C=!0);if(!C&&_){const y=_.find((E=>this._linkAtPosition(E.link,a)));y&&(l=!0,this._handleNewLink(y))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let y=0;y<this._activeProviderReplies.size;y++){const E=this._activeProviderReplies.get(y)?.find((v=>this._linkAtPosition(v.link,a)));if(E){l=!0,this._handleNewLink(E);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);a&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,a){this._currentLink&&this._lastMouseEvent&&(!c||!a||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,b.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(c.link,a)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:l=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:l=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const _=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(_,C),this._lastMouseEvent)){const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._askForLink(y,!1)}}))))}_linkHover(c,a,l){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(l,a.text)}_fireUnderlineEvent(c,a){const l=c.range,_=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-_-1,l.end.x,l.end.y-_-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(c,a,l){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(l,a.text)}_linkAtPosition(c,a){const l=c.range.start.y*this._bufferService.cols+c.range.start.x,_=c.range.end.y*this._bufferService.cols+c.range.end.x,C=a.y*this._bufferService.cols+a.x;return l<=C&&C<=_}_positionFromMouseEvent(c,a,l){const _=l.getCoords(c,a,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,a,l,_,C){return{x1:c,y1:a,x2:l,y2:_,cols:this._bufferService.cols,fg:C}}};f.Linkifier=o=d([S(1,g.IMouseService),S(2,g.IRenderService),S(3,D.IBufferService),S(4,g.ILinkProviderService)],o)},9042:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.tooMuchOutput=f.promptLabel=void 0,f.promptLabel="Terminal input",f.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(J,f,h){var d=this&&this.__decorate||function(g,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,o,c,a);else for(var y=g.length-1;y>=0;y--)(l=g[y])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},S=this&&this.__param||function(g,o){return function(c,a){o(c,a,g)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OscLinkProvider=void 0;const u=h(511),p=h(2585);let b=f.OscLinkProvider=class{constructor(g,o,c){this._bufferService=g,this._optionsService=o,this._oscLinkService=c}provideLinks(g,o){const c=this._bufferService.buffer.lines.get(g-1);if(!c)return void o(void 0);const a=[],l=this._optionsService.rawOptions.linkHandler,_=new u.CellData,C=c.getTrimmedLength();let y=-1,E=-1,v=!1;for(let x=0;x<C;x++)if(E!==-1||c.hasContent(x)){if(c.loadCell(x,_),_.hasExtendedAttrs()&&_.extended.urlId){if(E===-1){E=x,y=_.extended.urlId;continue}v=_.extended.urlId!==y}else E!==-1&&(v=!0);if(v||E!==-1&&x===C-1){const N=this._oscLinkService.getLinkData(y)?.uri;if(N){const H={start:{x:E+1,y:g},end:{x:x+(v||x!==C-1?0:1),y:g}};let q=!1;if(!l?.allowNonHttpProtocols)try{const O=new URL(N);["http:","https:"].includes(O.protocol)||(q=!0)}catch{q=!0}q||a.push({text:N,range:H,activate:(O,Z)=>l?l.activate(O,Z,H):D(0,Z),hover:(O,Z)=>l?.hover?.(O,Z,H),leave:(O,Z)=>l?.leave?.(O,Z,H)})}v=!1,_.hasExtendedAttrs()&&_.extended.urlId?(E=x,y=_.extended.urlId):(E=-1,y=-1)}}o(a)}};function D(g,o){if(confirm(`Do you want to navigate to ${o}?
|
|
12
|
-
|
|
13
|
-
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}}f.OscLinkProvider=b=d([S(0,p.IBufferService),S(1,p.IOptionsService),S(2,p.IOscLinkService)],b)},6193:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.RenderDebouncer=void 0,f.RenderDebouncer=class{constructor(h,d){this._renderCallback=h,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(h){return this._refreshCallbacks.push(h),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(h,d,S){this._rowCount=S,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const h of this._refreshCallbacks)h(0);this._refreshCallbacks=[]}}},3236:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const d=h(3614),S=h(3656),u=h(3551),p=h(9042),b=h(3730),D=h(1680),g=h(3107),o=h(5744),c=h(2950),a=h(1296),l=h(428),_=h(4269),C=h(5114),y=h(8934),E=h(3230),v=h(9312),x=h(4725),N=h(6731),H=h(8055),q=h(8969),O=h(8460),Z=h(844),ne=h(6114),U=h(8437),F=h(2584),Q=h(7399),A=h(5941),L=h(9074),w=h(2585),M=h(5435),G=h(4567),W=h(779);class le extends q.CoreTerminal{get onFocus(){return this._onFocus.event}get onBlur(){return this._onBlur.event}get onA11yChar(){return this._onA11yCharEmitter.event}get onA11yTab(){return this._onA11yTabEmitter.event}get onWillOpen(){return this._onWillOpen.event}constructor(z={}){super(z),this.browser=ne,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Z.MutableDisposable),this._onCursorMove=this.register(new O.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new O.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new O.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new O.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new O.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new O.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new O.EventEmitter),this._onBlur=this.register(new O.EventEmitter),this._onA11yCharEmitter=this.register(new O.EventEmitter),this._onA11yTabEmitter=this.register(new O.EventEmitter),this._onWillOpen=this.register(new O.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(w.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(W.LinkProviderService),this._instantiationService.setService(x.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(b.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((R,$)=>this.refresh(R,$)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((R=>this._reportWindowsOptions(R)))),this.register(this._inputHandler.onColor((R=>this._handleColorEvent(R)))),this.register((0,O.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,O.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,O.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,O.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((R=>this._afterResize(R.cols,R.rows)))),this.register((0,Z.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(z){if(this._themeService)for(const R of z){let $,ae="";switch(R.index){case 256:$="foreground",ae="10";break;case 257:$="background",ae="11";break;case 258:$="cursor",ae="12";break;default:$="ansi",ae="4;"+R.index}switch(R.type){case 0:const de=H.color.toColorRGB($==="ansi"?this._themeService.colors.ansi[R.index]:this._themeService.colors[$]);this.coreService.triggerDataEvent(`${F.C0.ESC}]${ae};${(0,A.toRgbString)(de)}${F.C1_ESCAPED.ST}`);break;case 1:if($==="ansi")this._themeService.modifyColors((fe=>fe.ansi[R.index]=H.channels.toColor(...R.color)));else{const fe=$;this._themeService.modifyColors((Ae=>Ae[fe]=H.channels.toColor(...R.color)))}break;case 2:this._themeService.restoreColor(R.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(z){z?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(z){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(F.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(F.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()}_syncTextArea(){if(!this.textarea||!this.buffer.isCursorInViewport||this._compositionHelper.isComposing||!this._renderService)return;const z=this.buffer.ybase+this.buffer.y,R=this.buffer.lines.get(z);if(!R)return;const $=Math.min(this.buffer.x,this.cols-1),ae=this._renderService.dimensions.css.cell.height,de=R.getWidth($),fe=this._renderService.dimensions.css.cell.width*de,Ae=this.buffer.y*this._renderService.dimensions.css.cell.height,ke=$*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ke+"px",this.textarea.style.top=Ae+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=ae+"px",this.textarea.style.lineHeight=ae+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,S.addDisposableDomListener)(this.element,"copy",(R=>{this.hasSelection()&&(0,d.copyHandler)(R,this._selectionService)})));const z=R=>(0,d.handlePasteEvent)(R,this.textarea,this.coreService,this.optionsService);this.register((0,S.addDisposableDomListener)(this.textarea,"paste",z)),this.register((0,S.addDisposableDomListener)(this.element,"paste",z)),ne.isFirefox?this.register((0,S.addDisposableDomListener)(this.element,"mousedown",(R=>{R.button===2&&(0,d.rightClickHandler)(R,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,S.addDisposableDomListener)(this.element,"contextmenu",(R=>{(0,d.rightClickHandler)(R,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ne.isLinux&&this.register((0,S.addDisposableDomListener)(this.element,"auxclick",(R=>{R.button===1&&(0,d.moveTextAreaUnderMouseCursor)(R,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,S.addDisposableDomListener)(this.textarea,"keyup",(z=>this._keyUp(z)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keydown",(z=>this._keyDown(z)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"keypress",(z=>this._keyPress(z)),!0)),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionupdate",(z=>this._compositionHelper.compositionupdate(z)))),this.register((0,S.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,S.addDisposableDomListener)(this.textarea,"input",(z=>this._inputEvent(z)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(z){if(!z)throw new Error("Terminal requires a parent element.");if(z.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=z.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),z.appendChild(this.element);const R=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),R.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,S.addDisposableDomListener)(this.screenElement,"mousemove",($=>this.updateCursorStyle($)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),R.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),ne.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(C.CoreBrowserService,this.textarea,z.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(x.ICoreBrowserService,this._coreBrowserService),this.register((0,S.addDisposableDomListener)(this.textarea,"focus",($=>this._handleTextAreaFocus($)))),this.register((0,S.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(N.ThemeService),this._instantiationService.setService(x.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(E.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(($=>this._onRender.fire($)))),this.onResize(($=>this._renderService.resize($.cols,$.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(y.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(u.Linkifier,this.screenElement)),this.element.appendChild(R);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(D.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(($=>this.scrollLines($.amount,$.suppressScrollEvent,1))),this.register(this._inputHandler.onRequestSyncScrollBar((()=>this.viewport.syncScrollArea()))),this.register(this.viewport),this.register(this.onCursorMove((()=>{this._renderService.handleCursorMove(),this._syncTextArea()}))),this.register(this.onResize((()=>this._renderService.handleResize(this.cols,this.rows)))),this.register(this.onBlur((()=>this._renderService.handleBlur()))),this.register(this.onFocus((()=>this._renderService.handleFocus()))),this.register(this._renderService.onDimensionsChange((()=>this.viewport.syncScrollArea()))),this._selectionService=this.register(this._instantiationService.createInstance(v.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(($=>this.scrollLines($.amount,$.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw(($=>this._renderService.handleSelectionChanged($.start,$.end,$.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection(($=>{this.textarea.value=$,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event(($=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,S.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(g.BufferDecorationRenderer,this.screenElement)),this.register((0,S.addDisposableDomListener)(this.element,"mousedown",($=>this._selectionService.handleMouseDown($)))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(G.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",($=>this._handleScreenReaderModeOptionChange($)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",($=>{!this._overviewRulerRenderer&&$&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(a.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const z=this,R=this.element;function $(fe){const Ae=z._mouseService.getMouseReportCoords(fe,z.screenElement);if(!Ae)return!1;let ke,Ne;switch(fe.overrideType||fe.type){case"mousemove":Ne=32,fe.buttons===void 0?(ke=3,fe.button!==void 0&&(ke=fe.button<3?fe.button:3)):ke=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Ne=0,ke=fe.button<3?fe.button:3;break;case"mousedown":Ne=1,ke=fe.button<3?fe.button:3;break;case"wheel":if(z._customWheelEventHandler&&z._customWheelEventHandler(fe)===!1||z.viewport.getLinesScrolled(fe)===0)return!1;Ne=fe.deltaY<0?0:1,ke=4;break;default:return!1}return!(Ne===void 0||ke===void 0||ke>4)&&z.coreMouseService.triggerMouseEvent({col:Ae.col,row:Ae.row,x:Ae.x,y:Ae.y,button:ke,action:Ne,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const ae={mouseup:null,wheel:null,mousedrag:null,mousemove:null},de={mouseup:fe=>($(fe),fe.buttons||(this._document.removeEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.removeEventListener("mousemove",ae.mousedrag)),this.cancel(fe)),wheel:fe=>($(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&$(fe)},mousemove:fe=>{fe.buttons||$(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&fe?ae.mousemove||(R.addEventListener("mousemove",de.mousemove),ae.mousemove=de.mousemove):(R.removeEventListener("mousemove",ae.mousemove),ae.mousemove=null),16&fe?ae.wheel||(R.addEventListener("wheel",de.wheel,{passive:!1}),ae.wheel=de.wheel):(R.removeEventListener("wheel",ae.wheel),ae.wheel=null),2&fe?ae.mouseup||(ae.mouseup=de.mouseup):(this._document.removeEventListener("mouseup",ae.mouseup),ae.mouseup=null),4&fe?ae.mousedrag||(ae.mousedrag=de.mousedrag):(this._document.removeEventListener("mousemove",ae.mousedrag),ae.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,S.addDisposableDomListener)(R,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return $(fe),ae.mouseup&&this._document.addEventListener("mouseup",ae.mouseup),ae.mousedrag&&this._document.addEventListener("mousemove",ae.mousedrag),this.cancel(fe)}))),this.register((0,S.addDisposableDomListener)(R,"wheel",(fe=>{if(!ae.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const Ae=this.viewport.getLinesScrolled(fe);if(Ae===0)return;const ke=F.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Ne="";for(let et=0;et<Math.abs(Ae);et++)Ne+=ke;return this.coreService.triggerDataEvent(Ne,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,S.addDisposableDomListener)(R,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,S.addDisposableDomListener)(R,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(z,R){this._renderService?.refreshRows(z,R)}updateCursorStyle(z){this._selectionService?.shouldColumnSelect(z)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")}_showCursor(){this.coreService.isCursorInitialized||(this.coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))}scrollLines(z,R,$=0){$===1?(super.scrollLines(z,R,$),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(z)}paste(z){(0,d.paste)(z,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(z){this._customKeyEventHandler=z}attachCustomWheelEventHandler(z){this._customWheelEventHandler=z}registerLinkProvider(z){return this._linkProviderService.registerLinkProvider(z)}registerCharacterJoiner(z){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const R=this._characterJoinerService.register(z);return this.refresh(0,this.rows-1),R}deregisterCharacterJoiner(z){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(z)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(z){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+z)}registerDecoration(z){return this._decorationService.registerDecoration(z)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(z,R,$){this._selectionService.setSelection(z,R,$)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(z,R){this._selectionService?.selectLines(z,R)}_keyDown(z){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(z)===!1)return!1;const R=this.browser.isMac&&this.options.macOptionIsMeta&&z.altKey;if(!R&&!this._compositionHelper.keydown(z))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;R||z.key!=="Dead"&&z.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const $=(0,Q.evaluateKeyboardEvent)(z,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(z),$.type===3||$.type===2){const ae=this.rows-1;return this.scrollLines($.type===2?-ae:ae),this.cancel(z,!0)}return $.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,z)||($.cancel&&this.cancel(z,!0),!$.key||!!(z.key&&!z.ctrlKey&&!z.altKey&&!z.metaKey&&z.key.length===1&&z.key.charCodeAt(0)>=65&&z.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):($.key!==F.C0.ETX&&$.key!==F.C0.CR||(this.textarea.value=""),this._onKey.fire({key:$.key,domEvent:z}),this._showCursor(),this.coreService.triggerDataEvent($.key,!0),!this.optionsService.rawOptions.screenReaderMode||z.altKey||z.ctrlKey?this.cancel(z,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(z,R){const $=z.isMac&&!this.options.macOptionIsMeta&&R.altKey&&!R.ctrlKey&&!R.metaKey||z.isWindows&&R.altKey&&R.ctrlKey&&!R.metaKey||z.isWindows&&R.getModifierState("AltGraph");return R.type==="keypress"?$:$&&(!R.keyCode||R.keyCode>47)}_keyUp(z){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(z)===!1||((function(R){return R.keyCode===16||R.keyCode===17||R.keyCode===18})(z)||this.focus(),this.updateCursorStyle(z),this._keyPressHandled=!1)}_keyPress(z){let R;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(z)===!1)return!1;if(this.cancel(z),z.charCode)R=z.charCode;else if(z.which===null||z.which===void 0)R=z.keyCode;else{if(z.which===0||z.charCode===0)return!1;R=z.which}return!(!R||(z.altKey||z.ctrlKey||z.metaKey)&&!this._isThirdLevelShift(this.browser,z)||(R=String.fromCharCode(R),this._onKey.fire({key:R,domEvent:z}),this._showCursor(),this.coreService.triggerDataEvent(R,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(z){if(z.data&&z.inputType==="insertText"&&(!z.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const R=z.data;return this.coreService.triggerDataEvent(R,!0),this.cancel(z),!0}return!1}resize(z,R){z!==this.cols||R!==this.rows?super.resize(z,R):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(z,R){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let z=1;z<this.rows;z++)this.buffer.lines.push(this.buffer.getBlankLine(U.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const z=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=z,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(F.C0.ESC+"[I"):this.coreService.triggerDataEvent(F.C0.ESC+"[O")}_reportWindowsOptions(z){if(this._renderService)switch(z){case M.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const R=this._renderService.dimensions.css.canvas.width.toFixed(0),$=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${F.C0.ESC}[4;${$};${R}t`);break;case M.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const ae=this._renderService.dimensions.css.cell.width.toFixed(0),de=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${F.C0.ESC}[6;${de};${ae}t`)}}cancel(z,R){if(this.options.cancelEvents||R)return z.preventDefault(),z.stopPropagation(),!1}}f.Terminal=le},9924:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.TimeBasedDebouncer=void 0,f.TimeBasedDebouncer=class{constructor(h,d=1e3){this._renderCallback=h,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(h,d,S){this._rowCount=S,h=h!==void 0?h:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,h):h,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const u=Date.now();if(u-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=u,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=u-this._lastRefreshMs,b=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const h=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(h,d)}}},1680:function(J,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,y=arguments.length,E=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,l,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(y<3?C(E):y>3?C(a,l,E):C(a,l))||E);return y>3&&E&&Object.defineProperty(a,l,E),E},S=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.Viewport=void 0;const u=h(3656),p=h(4725),b=h(8460),D=h(844),g=h(2585);let o=f.Viewport=class extends D.Disposable{constructor(c,a,l,_,C,y,E,v){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=l,this._optionsService=_,this._charSizeService=C,this._renderService=y,this._coreBrowserService=E,this.scrollBarWidth=0,this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._wheelPartialScroll=0,this._refreshAnimationFrame=null,this._ignoreNextScrollEvent=!1,this._smoothScrollState={startTime:0,origin:-1,target:-1},this._onRequestScrollLines=this.register(new b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,u.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((x=>this._activeBuffer=x.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((x=>this._renderDimensions=x))),this._handleThemeChange(v.colors),this.register(v.onChangeColors((x=>this._handleThemeChange(x)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(c){if(c)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:a,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(c,a){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&l<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const a=this._getPixelsScrolled(c);return a!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+a:this._smoothScrollState.target+=a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(c,a){let l,_="";const C=[],y=a??this._bufferService.buffer.lines.length,E=this._bufferService.buffer.lines;for(let v=c;v<y;v++){const x=E.get(v);if(!x)continue;const N=E.get(v+1)?.isWrapped;if(_+=x.translateToString(!N),!N||v===E.length-1){const H=document.createElement("div");H.textContent=_,C.push(H),_.length>0&&(l=H),_=""}}return{bufferElements:C,cursorElement:l}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(c,a){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&a.altKey||l==="ctrl"&&a.ctrlKey||l==="shift"&&a.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const a=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}};f.Viewport=o=d([S(2,g.IBufferService),S(3,g.IOptionsService),S(4,p.ICharSizeService),S(5,p.IRenderService),S(6,p.ICoreBrowserService),S(7,p.IThemeService)],o)},3107:function(J,f,h){var d=this&&this.__decorate||function(g,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,o,c,a);else for(var y=g.length-1;y>=0;y--)(l=g[y])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},S=this&&this.__param||function(g,o){return function(c,a){o(c,a,g)}};Object.defineProperty(f,"__esModule",{value:!0}),f.BufferDecorationRenderer=void 0;const u=h(4725),p=h(844),b=h(2585);let D=f.BufferDecorationRenderer=class extends p.Disposable{constructor(g,o,c,a,l){super(),this._screenElement=g,this._bufferService=o,this._coreBrowserService=c,this._decorationService=a,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((_=>this._removeDecoration(_)))),this.register((0,p.toDisposable)((()=>{this._container.remove(),this._decorationElements.clear()})))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback((()=>{this._doRefreshDecorations(),this._animationFrame=void 0})))}_doRefreshDecorations(){for(const g of this._decorationService.decorations)this._renderDecoration(g);this._dimensionsChanged=!1}_renderDecoration(g){this._refreshStyle(g),this._dimensionsChanged&&this._refreshXPosition(g)}_createElement(g){const o=this._coreBrowserService.mainDocument.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",g?.options?.layer==="top"),o.style.width=`${Math.round((g.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(g.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(g.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",o.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const c=g.options.x??0;return c&&c>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(g,o),o}_refreshStyle(g){const o=g.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)g.element&&(g.element.style.display="none",g.onRenderEmitter.fire(g.element));else{let c=this._decorationElements.get(g);c||(c=this._createElement(g),g.element=c,this._decorationElements.set(g,c),this._container.appendChild(c),g.onDispose((()=>{this._decorationElements.delete(g),c.remove()}))),c.style.top=o*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",g.onRenderEmitter.fire(c)}}_refreshXPosition(g,o=g.element){if(!o)return;const c=g.options.x??0;(g.options.anchor||"left")==="right"?o.style.right=c?c*this._renderService.dimensions.css.cell.width+"px":"":o.style.left=c?c*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(g){this._decorationElements.get(g)?.remove(),this._decorationElements.delete(g),g.dispose()}};f.BufferDecorationRenderer=D=d([S(1,b.IBufferService),S(2,u.ICoreBrowserService),S(3,b.IDecorationService),S(4,u.IRenderService)],D)},5871:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ColorZoneStore=void 0,f.ColorZoneStore=class{constructor(){this._zones=[],this._zonePool=[],this._zonePoolIndex=0,this._linePadding={full:0,left:0,center:0,right:0}}get zones(){return this._zonePool.length=Math.min(this._zonePool.length,this._zones.length),this._zones}clear(){this._zones.length=0,this._zonePoolIndex=0}addDecoration(h){if(h.options.overviewRulerOptions){for(const d of this._zones)if(d.color===h.options.overviewRulerOptions.color&&d.position===h.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,h.marker.line))return;if(this._lineAdjacentToZone(d,h.marker.line,h.options.overviewRulerOptions.position))return void this._addLineToZone(d,h.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=h.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=h.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=h.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=h.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:h.options.overviewRulerOptions.color,position:h.options.overviewRulerOptions.position,startBufferLine:h.marker.line,endBufferLine:h.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(h){this._linePadding=h}_lineIntersectsZone(h,d){return d>=h.startBufferLine&&d<=h.endBufferLine}_lineAdjacentToZone(h,d,S){return d>=h.startBufferLine-this._linePadding[S||"full"]&&d<=h.endBufferLine+this._linePadding[S||"full"]}_addLineToZone(h,d){h.startBufferLine=Math.min(h.startBufferLine,d),h.endBufferLine=Math.max(h.endBufferLine,d)}}},5744:function(J,f,h){var d=this&&this.__decorate||function(l,_,C,y){var E,v=arguments.length,x=v<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(l,_,C,y);else for(var N=l.length-1;N>=0;N--)(E=l[N])&&(x=(v<3?E(x):v>3?E(_,C,x):E(_,C))||x);return v>3&&x&&Object.defineProperty(_,C,x),x},S=this&&this.__param||function(l,_){return function(C,y){_(C,y,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OverviewRulerRenderer=void 0;const u=h(5871),p=h(4725),b=h(844),D=h(2585),g={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let a=f.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,C,y,E,v,x){super(),this._viewportElement=l,this._screenElement=_,this._bufferService=C,this._decorationService=y,this._renderService=E,this._optionsService=v,this._coreBrowserService=x,this._colorZoneStore=new u.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const N=this._canvas.getContext("2d");if(!N)throw new Error("Ctx cannot be null");this._ctx=N,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,b.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const l=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=l,o.center=_,o.right=l,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=o.left,c.right=o.left+o.center}_refreshDrawHeightConstants(){g.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);g.left=_,g.center=_,g.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*g.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const _ of l)_.position!=="full"&&this._renderColorZone(_);for(const _ of l)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(c[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-g[l.position||"full"]/2),o[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+g[l.position||"full"]))}_queueRefresh(l,_){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};f.OverviewRulerRenderer=a=d([S(2,D.IBufferService),S(3,D.IDecorationService),S(4,p.IRenderService),S(5,D.IOptionsService),S(6,p.ICoreBrowserService)],a)},2950:function(J,f,h){var d=this&&this.__decorate||function(g,o,c,a){var l,_=arguments.length,C=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(g,o,c,a);else for(var y=g.length-1;y>=0;y--)(l=g[y])&&(C=(_<3?l(C):_>3?l(o,c,C):l(o,c))||C);return _>3&&C&&Object.defineProperty(o,c,C),C},S=this&&this.__param||function(g,o){return function(c,a){o(c,a,g)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CompositionHelper=void 0;const u=h(4725),p=h(2585),b=h(2584);let D=f.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(g,o,c,a,l,_){this._textarea=g,this._compositionView=o,this._bufferService=c,this._optionsService=a,this._coreService=l,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(g){this._compositionView.textContent=g.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(g){if(this._isComposing||this._isSendingComposition){if(g.keyCode===229||g.keyCode===16||g.keyCode===17||g.keyCode===18)return!1;this._finalizeComposition(!1)}return g.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(g){if(this._compositionView.classList.remove("active"),this._isComposing=!1,g){const o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,o.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(o.start,o.end):this._textarea.value.substring(o.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const o=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(o,!0)}}_handleAnyTextareaChanges(){const g=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const o=this._textarea.value,c=o.replace(g,"");this._dataAlreadySent=c,o.length>g.length?this._coreService.triggerDataEvent(c,!0):o.length<g.length?this._coreService.triggerDataEvent(`${b.C0.DEL}`,!0):o.length===g.length&&o!==g&&this._coreService.triggerDataEvent(o,!0)}}),0)}updateCompositionElements(g){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=o*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=a+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=a+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}g||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};f.CompositionHelper=D=d([S(2,p.IBufferService),S(3,p.IOptionsService),S(4,p.ICoreService),S(5,u.IRenderService)],D)},9806:(J,f)=>{function h(d,S,u){const p=u.getBoundingClientRect(),b=d.getComputedStyle(u),D=parseInt(b.getPropertyValue("padding-left")),g=parseInt(b.getPropertyValue("padding-top"));return[S.clientX-p.left-D,S.clientY-p.top-g]}Object.defineProperty(f,"__esModule",{value:!0}),f.getCoords=f.getCoordsRelativeToElement=void 0,f.getCoordsRelativeToElement=h,f.getCoords=function(d,S,u,p,b,D,g,o,c){if(!D)return;const a=h(d,S,u);return a?(a[0]=Math.ceil((a[0]+(c?g/2:0))/g),a[1]=Math.ceil(a[1]/o),a[0]=Math.min(Math.max(a[0],1),p+(c?1:0)),a[1]=Math.min(Math.max(a[1],1),b),a):void 0}},9504:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.moveToCellSequence=void 0;const d=h(2584);function S(o,c,a,l){const _=o-u(o,a),C=c-u(c,a),y=Math.abs(_-C)-(function(E,v,x){let N=0;const H=E-u(E,x),q=v-u(v,x);for(let O=0;O<Math.abs(H-q);O++){const Z=p(E,v)==="A"?-1:1;x.buffer.lines.get(H+Z*O)?.isWrapped&&N++}return N})(o,c,a);return g(y,D(p(o,c),l))}function u(o,c){let a=0,l=c.buffer.lines.get(o),_=l?.isWrapped;for(;_&&o>=0&&o<c.rows;)a++,l=c.buffer.lines.get(--o),_=l?.isWrapped;return a}function p(o,c){return o>c?"A":"B"}function b(o,c,a,l,_,C){let y=o,E=c,v="";for(;y!==a||E!==l;)y+=_?1:-1,_&&y>C.cols-1?(v+=C.buffer.translateBufferLineToString(E,!1,o,y),y=0,o=0,E++):!_&&y<0&&(v+=C.buffer.translateBufferLineToString(E,!1,0,o+1),y=C.cols-1,o=y,E--);return v+C.buffer.translateBufferLineToString(E,!1,o,y)}function D(o,c){const a=c?"O":"[";return d.C0.ESC+a+o}function g(o,c){o=Math.floor(o);let a="";for(let l=0;l<o;l++)a+=c;return a}f.moveToCellSequence=function(o,c,a,l){const _=a.buffer.x,C=a.buffer.y;if(!a.buffer.hasScrollback)return(function(v,x,N,H,q,O){return S(x,H,q,O).length===0?"":g(b(v,x,v,x-u(x,q),!1,q).length,D("D",O))})(_,C,0,c,a,l)+S(C,c,a,l)+(function(v,x,N,H,q,O){let Z;Z=S(x,H,q,O).length>0?H-u(H,q):x;const ne=H,U=(function(F,Q,A,L,w,M){let G;return G=S(A,L,w,M).length>0?L-u(L,w):Q,F<A&&G<=L||F>=A&&G<L?"C":"D"})(v,x,N,H,q,O);return g(b(v,Z,N,ne,U==="C",q).length,D(U,O))})(_,C,o,c,a,l);let y;if(C===c)return y=_>o?"D":"C",g(Math.abs(_-o),D(y,l));y=C>c?"D":"C";const E=Math.abs(C-c);return g((function(v,x){return x.cols-v})(C>c?o:_,a)+(E-1)*a.cols+1+((C>c?_:o)-1),D(y,l))}},1296:function(J,f,h){var d=this&&this.__decorate||function(O,Z,ne,U){var F,Q=arguments.length,A=Q<3?Z:U===null?U=Object.getOwnPropertyDescriptor(Z,ne):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(O,Z,ne,U);else for(var L=O.length-1;L>=0;L--)(F=O[L])&&(A=(Q<3?F(A):Q>3?F(Z,ne,A):F(Z,ne))||A);return Q>3&&A&&Object.defineProperty(Z,ne,A),A},S=this&&this.__param||function(O,Z){return function(ne,U){Z(ne,U,O)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRenderer=void 0;const u=h(3787),p=h(2550),b=h(2223),D=h(6171),g=h(6052),o=h(4725),c=h(8055),a=h(8460),l=h(844),_=h(2585),C="xterm-dom-renderer-owner-",y="xterm-rows",E="xterm-fg-",v="xterm-bg-",x="xterm-focus",N="xterm-selection";let H=1,q=f.DomRenderer=class extends l.Disposable{constructor(O,Z,ne,U,F,Q,A,L,w,M,G,W,le){super(),this._terminal=O,this._document=Z,this._element=ne,this._screenElement=U,this._viewportElement=F,this._helperContainer=Q,this._linkifier2=A,this._charSizeService=w,this._optionsService=M,this._bufferService=G,this._coreBrowserService=W,this._themeService=le,this._terminalClass=H++,this._rowElements=[],this._selectionRenderModel=(0,g.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new a.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(y),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(N),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,D.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((oe=>this._injectCss(oe)))),this._injectCss(this._themeService.colors),this._rowFactory=L.createInstance(u.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((oe=>this._handleLinkHover(oe)))),this.register(this._linkifier2.onHideLinkUnderline((oe=>this._handleLinkLeave(oe)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const O=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*O,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*O),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.left=0,this.dimensions.device.char.top=0,this.dimensions.device.canvas.width=this.dimensions.device.cell.width*this._bufferService.cols,this.dimensions.device.canvas.height=this.dimensions.device.cell.height*this._bufferService.rows,this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/O),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/O),this.dimensions.css.cell.width=this.dimensions.css.canvas.width/this._bufferService.cols,this.dimensions.css.cell.height=this.dimensions.css.canvas.height/this._bufferService.rows;for(const ne of this._rowElements)ne.style.width=`${this.dimensions.css.canvas.width}px`,ne.style.height=`${this.dimensions.css.cell.height}px`,ne.style.lineHeight=`${this.dimensions.css.cell.height}px`,ne.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Z=`${this._terminalSelector} .${y} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Z,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._screenElement.style.height=`${this.dimensions.css.canvas.height}px`}_injectCss(O){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Z=`${this._terminalSelector} .${y} { color: ${O.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Z+=`${this._terminalSelector} .${y} .xterm-dim { color: ${c.color.multiplyOpacity(O.foreground,.5).css};}`,Z+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const ne=`blink_underline_${this._terminalClass}`,U=`blink_bar_${this._terminalClass}`,F=`blink_block_${this._terminalClass}`;Z+=`@keyframes ${ne} { 50% { border-bottom-style: hidden; }}`,Z+=`@keyframes ${U} { 50% { box-shadow: none; }}`,Z+=`@keyframes ${F} { 0% { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css}; } 50% { background-color: inherit; color: ${O.cursor.css}; }}`,Z+=`${this._terminalSelector} .${y}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ne} 1s step-end infinite;}${this._terminalSelector} .${y}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${y}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${F} 1s step-end infinite;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block { background-color: ${O.cursor.css}; color: ${O.cursorAccent.css};}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${O.cursor.css} !important; color: ${O.cursorAccent.css} !important;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${O.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${O.cursor.css} inset;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${O.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Z+=`${this._terminalSelector} .${N} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${N} div { position: absolute; background-color: ${O.selectionBackgroundOpaque.css};}${this._terminalSelector} .${N} div { position: absolute; background-color: ${O.selectionInactiveBackgroundOpaque.css};}`;for(const[Q,A]of O.ansi.entries())Z+=`${this._terminalSelector} .${E}${Q} { color: ${A.css}; }${this._terminalSelector} .${E}${Q}.xterm-dim { color: ${c.color.multiplyOpacity(A,.5).css}; }${this._terminalSelector} .${v}${Q} { background-color: ${A.css}; }`;Z+=`${this._terminalSelector} .${E}${b.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(O.background).css}; }${this._terminalSelector} .${E}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(O.background),.5).css}; }${this._terminalSelector} .${v}${b.INVERTED_DEFAULT_COLOR} { background-color: ${O.foreground.css}; }`,this._themeStyleElement.textContent=Z}_setDefaultSpacing(){const O=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${O}px`,this._rowFactory.defaultSpacing=O}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(O,Z){for(let ne=this._rowElements.length;ne<=Z;ne++){const U=this._document.createElement("div");this._rowContainer.appendChild(U),this._rowElements.push(U)}for(;this._rowElements.length>Z;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(O,Z){this._refreshRowElements(O,Z),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(x),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(x),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(O,Z,ne){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(O,Z,ne),this.renderRows(0,this._bufferService.rows-1),!O||!Z)return;this._selectionRenderModel.update(this._terminal,O,Z,ne);const U=this._selectionRenderModel.viewportStartRow,F=this._selectionRenderModel.viewportEndRow,Q=this._selectionRenderModel.viewportCappedStartRow,A=this._selectionRenderModel.viewportCappedEndRow;if(Q>=this._bufferService.rows||A<0)return;const L=this._document.createDocumentFragment();if(ne){const w=O[0]>Z[0];L.appendChild(this._createSelectionElement(Q,w?Z[0]:O[0],w?O[0]:Z[0],A-Q+1))}else{const w=U===Q?O[0]:0,M=Q===F?Z[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(Q,w,M));const G=A-Q-1;if(L.appendChild(this._createSelectionElement(Q+1,0,this._bufferService.cols,G)),Q!==A){const W=F===A?Z[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(A,0,W))}}this._selectionContainer.appendChild(L)}_createSelectionElement(O,Z,ne,U=1){const F=this._document.createElement("div"),Q=Z*this.dimensions.css.cell.width;let A=this.dimensions.css.cell.width*(ne-Z);return Q+A>this.dimensions.css.canvas.width&&(A=this.dimensions.css.canvas.width-Q),F.style.height=U*this.dimensions.css.cell.height+"px",F.style.top=O*this.dimensions.css.cell.height+"px",F.style.left=`${Q}px`,F.style.width=`${A}px`,F}handleCursorMove(){}_handleOptionsChanged(){this._updateDimensions(),this._injectCss(this._themeService.colors),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}clear(){for(const O of this._rowElements)O.replaceChildren()}renderRows(O,Z){const ne=this._bufferService.buffer,U=ne.ybase+ne.y,F=Math.min(ne.x,this._bufferService.cols-1),Q=this._optionsService.rawOptions.cursorBlink,A=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let w=O;w<=Z;w++){const M=w+ne.ydisp,G=this._rowElements[w],W=ne.lines.get(M);if(!G||!W)break;G.replaceChildren(...this._rowFactory.createRow(W,M,M===U,A,L,F,Q,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!0)}_handleLinkLeave(O){this._setCellUnderline(O.x1,O.x2,O.y1,O.y2,O.cols,!1)}_setCellUnderline(O,Z,ne,U,F,Q){ne<0&&(O=0),U<0&&(Z=0);const A=this._bufferService.rows-1;ne=Math.max(Math.min(ne,A),0),U=Math.max(Math.min(U,A),0),F=Math.min(F,this._bufferService.cols);const L=this._bufferService.buffer,w=L.ybase+L.y,M=Math.min(L.x,F-1),G=this._optionsService.rawOptions.cursorBlink,W=this._optionsService.rawOptions.cursorStyle,le=this._optionsService.rawOptions.cursorInactiveStyle;for(let oe=ne;oe<=U;++oe){const z=oe+L.ydisp,R=this._rowElements[oe],$=L.lines.get(z);if(!R||!$)break;R.replaceChildren(...this._rowFactory.createRow($,z,z===w,W,le,M,G,this.dimensions.css.cell.width,this._widthCache,Q?oe===ne?O:0:-1,Q?(oe===U?Z:F)-1:-1))}}};f.DomRenderer=q=d([S(7,_.IInstantiationService),S(8,o.ICharSizeService),S(9,_.IOptionsService),S(10,_.IBufferService),S(11,o.ICoreBrowserService),S(12,o.IThemeService)],q)},3787:function(J,f,h){var d=this&&this.__decorate||function(y,E,v,x){var N,H=arguments.length,q=H<3?E:x===null?x=Object.getOwnPropertyDescriptor(E,v):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(y,E,v,x);else for(var O=y.length-1;O>=0;O--)(N=y[O])&&(q=(H<3?N(q):H>3?N(E,v,q):N(E,v))||q);return H>3&&q&&Object.defineProperty(E,v,q),q},S=this&&this.__param||function(y,E){return function(v,x){E(v,x,y)}};Object.defineProperty(f,"__esModule",{value:!0}),f.DomRendererRowFactory=void 0;const u=h(2223),p=h(643),b=h(511),D=h(2585),g=h(8055),o=h(4725),c=h(4269),a=h(6171),l=h(3734);let _=f.DomRendererRowFactory=class{constructor(y,E,v,x,N,H,q){this._document=y,this._characterJoinerService=E,this._optionsService=v,this._coreBrowserService=x,this._coreService=N,this._decorationService=H,this._themeService=q,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(y,E,v){this._selectionStart=y,this._selectionEnd=E,this._columnSelectMode=v}createRow(y,E,v,x,N,H,q,O,Z,ne,U){const F=[],Q=this._characterJoinerService.getJoinedCharacters(E),A=this._themeService.colors;let L,w=y.getNoBgTrimmedLength();v&&w<H+1&&(w=H+1);let M=0,G="",W=0,le=0,oe=0,z=!1,R=0,$=!1,ae=0;const de=[],fe=ne!==-1&&U!==-1;for(let Ae=0;Ae<w;Ae++){y.loadCell(Ae,this._workCell);let ke=this._workCell.getWidth();if(ke===0)continue;let Ne=!1,et=Ae,be=this._workCell;if(Q.length>0&&Ae===Q[0][0]){Ne=!0;const Be=Q.shift();be=new c.JoinedCellData(this._workCell,y.translateToString(!0,Be[0],Be[1]),Be[1]-Be[0]),et=Be[1]-1,ke=be.getWidth()}const Kt=this._isCellInSelection(Ae,E),ei=v&&Ae===H,ti=fe&&Ae>=ne&&Ae<=U;let Wt=!1;this._decorationService.forEachDecorationAtCell(Ae,E,void 0,(Be=>{Wt=!0}));let yi=be.getChars()||p.WHITESPACE_CELL_CHAR;if(yi===" "&&(be.isUnderline()||be.isOverline())&&(yi=" "),ae=ke*O-Z.get(yi,be.isBold(),be.isItalic()),L){if(M&&(Kt&&$||!Kt&&!$&&be.bg===W)&&(Kt&&$&&A.selectionForeground||be.fg===le)&&be.extended.ext===oe&&ti===z&&ae===R&&!ei&&!Ne&&!Wt){be.isInvisible()?G+=p.WHITESPACE_CELL_CHAR:G+=yi,M++;continue}M&&(L.textContent=G),L=this._document.createElement("span"),M=0,G=""}else L=this._document.createElement("span");if(W=be.bg,le=be.fg,oe=be.extended.ext,z=ti,R=ae,$=Kt,Ne&&H>=Ae&&H<=et&&(H=Ae),!this._coreService.isCursorHidden&&ei&&this._coreService.isCursorInitialized){if(de.push("xterm-cursor"),this._coreBrowserService.isFocused)q&&de.push("xterm-cursor-blink"),de.push(x==="bar"?"xterm-cursor-bar":x==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(N)switch(N){case"outline":de.push("xterm-cursor-outline");break;case"block":de.push("xterm-cursor-block");break;case"bar":de.push("xterm-cursor-bar");break;case"underline":de.push("xterm-cursor-underline")}}if(be.isBold()&&de.push("xterm-bold"),be.isItalic()&&de.push("xterm-italic"),be.isDim()&&de.push("xterm-dim"),G=be.isInvisible()?p.WHITESPACE_CELL_CHAR:be.getChars()||p.WHITESPACE_CELL_CHAR,be.isUnderline()&&(de.push(`xterm-underline-${be.extended.underlineStyle}`),G===" "&&(G=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let Be=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&Be<8&&(Be+=8),L.style.textDecorationColor=A.ansi[Be].css}be.isOverline()&&(de.push("xterm-overline"),G===" "&&(G=" ")),be.isStrikethrough()&&de.push("xterm-strikethrough"),ti&&(L.style.textDecoration="underline");let ct=be.getFgColor(),Pe=be.getFgColorMode(),mt=be.getBgColor(),Pt=be.getBgColorMode();const te=!!be.isInverse();if(te){const Be=ct;ct=mt,mt=Be;const Fi=Pe;Pe=Pt,Pt=Fi}let _e,he,pe,nt=!1;switch(this._decorationService.forEachDecorationAtCell(Ae,E,void 0,(Be=>{Be.options.layer!=="top"&&nt||(Be.backgroundColorRGB&&(Pt=50331648,mt=Be.backgroundColorRGB.rgba>>8&16777215,_e=Be.backgroundColorRGB),Be.foregroundColorRGB&&(Pe=50331648,ct=Be.foregroundColorRGB.rgba>>8&16777215,he=Be.foregroundColorRGB),nt=Be.options.layer==="top")})),!nt&&Kt&&(_e=this._coreBrowserService.isFocused?A.selectionBackgroundOpaque:A.selectionInactiveBackgroundOpaque,mt=_e.rgba>>8&16777215,Pt=50331648,nt=!0,A.selectionForeground&&(Pe=50331648,ct=A.selectionForeground.rgba>>8&16777215,he=A.selectionForeground)),nt&&de.push("xterm-decoration-top"),Pt){case 16777216:case 33554432:pe=A.ansi[mt],de.push(`xterm-bg-${mt}`);break;case 50331648:pe=g.channels.toColor(mt>>16,mt>>8&255,255&mt),this._addStyle(L,`background-color:#${C((mt>>>0).toString(16),"0",6)}`);break;default:te?(pe=A.foreground,de.push(`xterm-bg-${u.INVERTED_DEFAULT_COLOR}`)):pe=A.background}switch(_e||be.isDim()&&(_e=g.color.multiplyOpacity(pe,.5)),Pe){case 16777216:case 33554432:be.isBold()&&ct<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ct+=8),this._applyMinimumContrast(L,pe,A.ansi[ct],be,_e,void 0)||de.push(`xterm-fg-${ct}`);break;case 50331648:const Be=g.channels.toColor(ct>>16&255,ct>>8&255,255&ct);this._applyMinimumContrast(L,pe,Be,be,_e,he)||this._addStyle(L,`color:#${C(ct.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,pe,A.foreground,be,_e,he)||te&&de.push(`xterm-fg-${u.INVERTED_DEFAULT_COLOR}`)}de.length&&(L.className=de.join(" "),de.length=0),ei||Ne||Wt?L.textContent=G:M++,ae!==this.defaultSpacing&&(L.style.letterSpacing=`${ae}px`),F.push(L),Ae=et}return L&&M&&(L.textContent=G),F}_applyMinimumContrast(y,E,v,x,N,H){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.treatGlyphAsBackgroundColor)(x.getCode()))return!1;const q=this._getContrastCache(x);let O;if(N||H||(O=q.getColor(E.rgba,v.rgba)),O===void 0){const Z=this._optionsService.rawOptions.minimumContrastRatio/(x.isDim()?2:1);O=g.color.ensureContrastRatio(N||E,H||v,Z),q.setColor((N||E).rgba,(H||v).rgba,O??null)}return!!O&&(this._addStyle(y,`color:${O.css}`),!0)}_getContrastCache(y){return y.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(y,E){y.setAttribute("style",`${y.getAttribute("style")||""}${E};`)}_isCellInSelection(y,E){const v=this._selectionStart,x=this._selectionEnd;return!(!v||!x)&&(this._columnSelectMode?v[0]<=x[0]?y>=v[0]&&E>=v[1]&&y<x[0]&&E<=x[1]:y<v[0]&&E>=v[1]&&y>=x[0]&&E<=x[1]:E>v[1]&&E<x[1]||v[1]===x[1]&&E===v[1]&&y>=v[0]&&y<x[0]||v[1]<x[1]&&E===x[1]&&y<x[0]||v[1]<x[1]&&E===v[1]&&y>=v[0])}};function C(y,E,v){for(;y.length<v;)y=E+y;return y}f.DomRendererRowFactory=_=d([S(1,o.ICharacterJoinerService),S(2,D.IOptionsService),S(3,o.ICoreBrowserService),S(4,D.ICoreService),S(5,D.IDecorationService),S(6,o.IThemeService)],_)},2550:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.WidthCache=void 0,f.WidthCache=class{constructor(h,d){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=h.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const S=h.createElement("span");S.classList.add("xterm-char-measure-element");const u=h.createElement("span");u.classList.add("xterm-char-measure-element"),u.style.fontWeight="bold";const p=h.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const b=h.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[S,u,p,b],this._container.appendChild(S),this._container.appendChild(u),this._container.appendChild(p),this._container.appendChild(b),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(h,d,S,u){h===this._font&&d===this._fontSize&&S===this._weight&&u===this._weightBold||(this._font=h,this._fontSize=d,this._weight=S,this._weightBold=u,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${S}`,this._measureElements[1].style.fontWeight=`${u}`,this._measureElements[2].style.fontWeight=`${S}`,this._measureElements[3].style.fontWeight=`${u}`,this.clear())}get(h,d,S){let u=0;if(!d&&!S&&h.length===1&&(u=h.charCodeAt(0))<256){if(this._flat[u]!==-9999)return this._flat[u];const D=this._measure(h,0);return D>0&&(this._flat[u]=D),D}let p=h;d&&(p+="B"),S&&(p+="I");let b=this._holey.get(p);if(b===void 0){let D=0;d&&(D|=1),S&&(D|=2),b=this._measure(h,D),b>0&&this._holey.set(p,b)}return b}_measure(h,d){const S=this._measureElements[d];return S.textContent=h.repeat(32),S.offsetWidth/32}}},2223:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.TEXT_BASELINE=f.DIM_OPACITY=f.INVERTED_DEFAULT_COLOR=void 0;const d=h(6114);f.INVERTED_DEFAULT_COLOR=257,f.DIM_OPACITY=.5,f.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(J,f)=>{function h(S){return 57508<=S&&S<=57558}function d(S){return S>=128512&&S<=128591||S>=127744&&S<=128511||S>=128640&&S<=128767||S>=9728&&S<=9983||S>=9984&&S<=10175||S>=65024&&S<=65039||S>=129280&&S<=129535||S>=127462&&S<=127487}Object.defineProperty(f,"__esModule",{value:!0}),f.computeNextVariantOffset=f.createRenderDimensions=f.treatGlyphAsBackgroundColor=f.allowRescaling=f.isEmoji=f.isRestrictedPowerlineGlyph=f.isPowerlineGlyph=f.throwIfFalsy=void 0,f.throwIfFalsy=function(S){if(!S)throw new Error("value must not be falsy");return S},f.isPowerlineGlyph=h,f.isRestrictedPowerlineGlyph=function(S){return 57520<=S&&S<=57527},f.isEmoji=d,f.allowRescaling=function(S,u,p,b){return u===1&&p>Math.ceil(1.5*b)&&S!==void 0&&S>255&&!d(S)&&!h(S)&&!(function(D){return 57344<=D&&D<=63743})(S)},f.treatGlyphAsBackgroundColor=function(S){return h(S)||(function(u){return 9472<=u&&u<=9631})(S)},f.createRenderDimensions=function(){return{css:{canvas:{width:0,height:0},cell:{width:0,height:0}},device:{canvas:{width:0,height:0},cell:{width:0,height:0},char:{width:0,height:0,left:0,top:0}}}},f.computeNextVariantOffset=function(S,u,p=0){return(S-(2*Math.round(u)-p))%(2*Math.round(u))}},6052:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.createSelectionRenderModel=void 0;class h{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(S,u,p,b=!1){if(this.selectionStart=u,this.selectionEnd=p,!u||!p||u[0]===p[0]&&u[1]===p[1])return void this.clear();const D=S.buffers.active.ydisp,g=u[1]-D,o=p[1]-D,c=Math.max(g,0),a=Math.min(o,S.rows-1);c>=S.rows||a<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=g,this.viewportEndRow=o,this.viewportCappedStartRow=c,this.viewportCappedEndRow=a,this.startCol=u[0],this.endCol=p[0])}isCellSelected(S,u,p){return!!this.hasSelection&&(p-=S.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?u>=this.startCol&&p>=this.viewportCappedStartRow&&u<this.endCol&&p<=this.viewportCappedEndRow:u<this.startCol&&p>=this.viewportCappedStartRow&&u>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&u<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&u>=this.startCol)}}f.createSelectionRenderModel=function(){return new h}},456:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionModel=void 0,f.SelectionModel=class{constructor(h){this._bufferService=h,this.isSelectAllActive=!1,this.selectionStartLength=0}clearSelection(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0}get finalSelectionStart(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart}get finalSelectionEnd(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?h%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)-1]:[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[h,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const h=this.selectionStart[0]+this.selectionStartLength;return h>this._bufferService.cols?[h%this._bufferService.cols,this.selectionStart[1]+Math.floor(h/this._bufferService.cols)]:[Math.max(h,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const h=this.selectionStart,d=this.selectionEnd;return!(!h||!d)&&(h[1]>d[1]||h[1]===d[1]&&h[0]>d[0])}handleTrim(h){return this.selectionStart&&(this.selectionStart[1]-=h),this.selectionEnd&&(this.selectionEnd[1]-=h),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(J,f,h){var d=this&&this.__decorate||function(a,l,_,C){var y,E=arguments.length,v=E<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,l,_,C);else for(var x=a.length-1;x>=0;x--)(y=a[x])&&(v=(E<3?y(v):E>3?y(l,_,v):y(l,_))||v);return E>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CharSizeService=void 0;const u=h(2585),p=h(8460),b=h(844);let D=f.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(a,l,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new c(this._optionsService))}catch{this._measureStrategy=this.register(new o(a,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};f.CharSizeService=D=d([S(2,u.IOptionsService)],D);class g extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,_){l!==void 0&&l>0&&_!==void 0&&_>0&&(this._result.width=l,this._result.height=_)}}class o extends g{constructor(l,_,C){super(),this._document=l,this._parentElement=_,this._optionsService=C,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class c extends g{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(J,f,h){var d=this&&this.__decorate||function(c,a,l,_){var C,y=arguments.length,E=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,a,l,_);else for(var v=c.length-1;v>=0;v--)(C=c[v])&&(E=(y<3?C(E):y>3?C(a,l,E):C(a,l))||E);return y>3&&E&&Object.defineProperty(a,l,E),E},S=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CharacterJoinerService=f.JoinedCellData=void 0;const u=h(3734),p=h(643),b=h(511),D=h(2585);class g extends u.AttributeData{constructor(a,l,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=l,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}f.JoinedCellData=g;let o=f.CharacterJoinerService=class Gf{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(a){const l={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(l),l.id}deregister(a){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===a)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(a);if(!l||l.length===0)return[];const _=[],C=l.translateToString(!0);let y=0,E=0,v=0,x=l.getFg(0),N=l.getBg(0);for(let H=0;H<l.getTrimmedLength();H++)if(l.loadCell(H,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==x||this._workCell.bg!==N){if(H-y>1){const q=this._getJoinedRanges(C,v,E,l,y);for(let O=0;O<q.length;O++)_.push(q[O])}y=H,v=E,x=this._workCell.fg,N=this._workCell.bg}E+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-y>1){const H=this._getJoinedRanges(C,v,E,l,y);for(let q=0;q<H.length;q++)_.push(H[q])}return _}_getJoinedRanges(a,l,_,C,y){const E=a.substring(l,_);let v=[];try{v=this._characterJoiners[0].handler(E)}catch(x){console.error(x)}for(let x=1;x<this._characterJoiners.length;x++)try{const N=this._characterJoiners[x].handler(E);for(let H=0;H<N.length;H++)Gf._mergeRanges(v,N[H])}catch(N){console.error(N)}return this._stringRangesToCellRanges(v,C,y),v}_stringRangesToCellRanges(a,l,_){let C=0,y=!1,E=0,v=a[C];if(v){for(let x=_;x<this._bufferService.cols;x++){const N=l.getWidth(x),H=l.getString(x).length||p.WHITESPACE_CELL_CHAR.length;if(N!==0){if(!y&&v[0]<=E&&(v[0]=x,y=!0),v[1]<=E){if(v[1]=x,v=a[++C],!v)break;v[0]<=E?(v[0]=x,y=!0):y=!1}E+=H}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(a,l){let _=!1;for(let C=0;C<a.length;C++){const y=a[C];if(_){if(l[1]<=y[0])return a[C-1][1]=l[1],a;if(l[1]<=y[1])return a[C-1][1]=Math.max(l[1],y[1]),a.splice(C,1),a;a.splice(C,1),C--}else{if(l[1]<=y[0])return a.splice(C,0,l),a;if(l[1]<=y[1])return y[0]=Math.min(l[0],y[0]),a;l[0]<y[1]&&(y[0]=Math.min(l[0],y[0]),_=!0)}}return _?a[a.length-1][1]=l[1]:a.push(l),a}};f.CharacterJoinerService=o=d([S(0,D.IBufferService)],o)},5114:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CoreBrowserService=void 0;const d=h(844),S=h(8460),u=h(3656);class p extends d.Disposable{constructor(g,o,c){super(),this._textarea=g,this._window=o,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new b(this._window),this._onDprChange=this.register(new S.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new S.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((a=>this._screenDprMonitor.setWindow(a)))),this.register((0,S.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(g){this._window!==g&&(this._window=g,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}f.CoreBrowserService=p;class b extends d.Disposable{constructor(g){super(),this._parentWindow=g,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new S.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(g){this._parentWindow=g,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,u.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.LinkProviderService=void 0;const d=h(844);class S extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const b=this.linkProviders.indexOf(p);b!==-1&&this.linkProviders.splice(b,1)}}}}f.LinkProviderService=S},8934:function(J,f,h){var d=this&&this.__decorate||function(D,g,o,c){var a,l=arguments.length,_=l<3?g:c===null?c=Object.getOwnPropertyDescriptor(g,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(D,g,o,c);else for(var C=D.length-1;C>=0;C--)(a=D[C])&&(_=(l<3?a(_):l>3?a(g,o,_):a(g,o))||_);return l>3&&_&&Object.defineProperty(g,o,_),_},S=this&&this.__param||function(D,g){return function(o,c){g(o,c,D)}};Object.defineProperty(f,"__esModule",{value:!0}),f.MouseService=void 0;const u=h(4725),p=h(9806);let b=f.MouseService=class{constructor(D,g){this._renderService=D,this._charSizeService=g}getCoords(D,g,o,c,a){return(0,p.getCoords)(window,D,g,o,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(D,g){const o=(0,p.getCoordsRelativeToElement)(window,D,g);if(this._charSizeService.hasValidSize)return o[0]=Math.min(Math.max(o[0],0),this._renderService.dimensions.css.canvas.width-1),o[1]=Math.min(Math.max(o[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(o[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(o[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(o[0]),y:Math.floor(o[1])}}};f.MouseService=b=d([S(0,u.IRenderService),S(1,u.ICharSizeService)],b)},3230:function(J,f,h){var d=this&&this.__decorate||function(a,l,_,C){var y,E=arguments.length,v=E<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,l,_,C);else for(var x=a.length-1;x>=0;x--)(y=a[x])&&(v=(E<3?y(v):E>3?y(l,_,v):y(l,_))||v);return E>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(f,"__esModule",{value:!0}),f.RenderService=void 0;const u=h(6193),p=h(4725),b=h(8460),D=h(844),g=h(7226),o=h(2585);let c=f.RenderService=class extends D.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(a,l,_,C,y,E,v,x){super(),this._rowCount=a,this._charSizeService=C,this._renderer=this.register(new D.MutableDisposable),this._pausedResizeTask=new g.DebouncedIdleTask,this._observerDisposable=this.register(new D.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new u.RenderDebouncer(((N,H)=>this._renderRows(N,H)),v),this.register(this._renderDebouncer),this.register(v.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(y.onDecorationRegistered((()=>this._fullRefresh()))),this.register(y.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register(x.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(v.window,l),this.register(v.onWindowChange((N=>this._registerIntersectionObserver(N,l))))}_registerIntersectionObserver(a,l){if("IntersectionObserver"in a){const _=new a.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});_.observe(l),this._observerDisposable.value=(0,D.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(a){this._isPaused=a.isIntersecting===void 0?a.intersectionRatio===0:!a.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(a,l,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(a,l,this._rowCount))}_renderRows(a,l){this._renderer.value&&(a=Math.min(a,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(a,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:a,end:l}),this._onRender.fire({start:a,end:l}),this._isNextRenderRedrawOnly=!0)}resize(a,l){this._rowCount=l,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(a){this._renderer.value=a,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(a){return this._renderDebouncer.addRefreshCallback(a)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(a,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(a,l))):this._renderer.value.handleResize(a,l),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(a,l,_){this._selectionState.start=a,this._selectionState.end=l,this._selectionState.columnSelectMode=_,this._renderer.value?.handleSelectionChanged(a,l,_)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};f.RenderService=c=d([S(2,o.IOptionsService),S(3,p.ICharSizeService),S(4,o.IDecorationService),S(5,o.IBufferService),S(6,p.ICoreBrowserService),S(7,p.IThemeService)],c)},9312:function(J,f,h){var d=this&&this.__decorate||function(v,x,N,H){var q,O=arguments.length,Z=O<3?x:H===null?H=Object.getOwnPropertyDescriptor(x,N):H;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(v,x,N,H);else for(var ne=v.length-1;ne>=0;ne--)(q=v[ne])&&(Z=(O<3?q(Z):O>3?q(x,N,Z):q(x,N))||Z);return O>3&&Z&&Object.defineProperty(x,N,Z),Z},S=this&&this.__param||function(v,x){return function(N,H){x(N,H,v)}};Object.defineProperty(f,"__esModule",{value:!0}),f.SelectionService=void 0;const u=h(9806),p=h(9504),b=h(456),D=h(4725),g=h(8460),o=h(844),c=h(6114),a=h(4841),l=h(511),_=h(2585),C=" ",y=new RegExp(C,"g");let E=f.SelectionService=class extends o.Disposable{constructor(v,x,N,H,q,O,Z,ne,U){super(),this._element=v,this._screenElement=x,this._linkifier=N,this._bufferService=H,this._coreService=q,this._mouseService=O,this._optionsService=Z,this._renderService=ne,this._coreBrowserService=U,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new g.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new g.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new g.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new g.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=F=>this._handleMouseMove(F),this._mouseUpListener=F=>this._handleMouseUp(F),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((F=>this._handleTrim(F))),this.register(this._bufferService.buffers.onBufferActivate((F=>this._handleBufferActivate(F)))),this.enable(),this._model=new b.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,o.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!v||!x||v[0]===x[0]&&v[1]===x[1])}get selectionText(){const v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!v||!x)return"";const N=this._bufferService.buffer,H=[];if(this._activeSelectionMode===3){if(v[0]===x[0])return"";const q=v[0]<x[0]?v[0]:x[0],O=v[0]<x[0]?x[0]:v[0];for(let Z=v[1];Z<=x[1];Z++){const ne=N.translateBufferLineToString(Z,!0,q,O);H.push(ne)}}else{const q=v[1]===x[1]?x[0]:void 0;H.push(N.translateBufferLineToString(v[1],!0,v[0],q));for(let O=v[1]+1;O<=x[1]-1;O++){const Z=N.lines.get(O),ne=N.translateBufferLineToString(O,!0);Z?.isWrapped?H[H.length-1]+=ne:H.push(ne)}if(v[1]!==x[1]){const O=N.lines.get(x[1]),Z=N.translateBufferLineToString(x[1],!0,0,x[0]);O&&O.isWrapped?H[H.length-1]+=Z:H.push(Z)}}return H.map((q=>q.replace(y," "))).join(c.isWindows?`\r
|
|
14
|
-
`:`
|
|
15
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(v){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&v&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(v){const x=this._getMouseBufferCoords(v),N=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(N&&H&&x)&&this._areCoordsInSelection(x,N,H)}isCellInSelection(v,x){const N=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!N||!H)&&this._areCoordsInSelection([v,x],N,H)}_areCoordsInSelection(v,x,N){return v[1]>x[1]&&v[1]<N[1]||x[1]===N[1]&&v[1]===x[1]&&v[0]>=x[0]&&v[0]<N[0]||x[1]<N[1]&&v[1]===N[1]&&v[0]<N[0]||x[1]<N[1]&&v[1]===x[1]&&v[0]>=x[0]}_selectWordAtCursor(v,x){const N=this._linkifier.currentLink?.link?.range;if(N)return this._model.selectionStart=[N.start.x-1,N.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(N,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(v);return!!H&&(this._selectWordAt(H,x),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(v,x){this._model.clearSelection(),v=Math.max(v,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()}_handleTrim(v){this._model.handleTrim(v)&&this.refresh()}_getMouseBufferCoords(v){const x=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x}_getMouseEventScrollAmount(v){let x=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,v,this._screenElement)[1];const N=this._renderService.dimensions.css.canvas.height;return x>=0&&x<=N?0:(x>N&&(x-=N),x=Math.min(Math.max(x,-50),50),x/=50,x/Math.abs(x)+Math.round(14*x))}shouldForceSelection(v){return c.isMac?v.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:v.shiftKey}handleMouseDown(v){if(this._mouseDownTimeStamp=v.timeStamp,(v.button!==2||!this.hasSelection)&&v.button===0){if(!this._enabled){if(!this.shouldForceSelection(v))return;v.stopPropagation()}v.preventDefault(),this._dragScrollAmount=0,this._enabled&&v.shiftKey?this._handleIncrementalClick(v):v.detail===1?this._handleSingleClick(v):v.detail===2?this._handleDoubleClick(v):v.detail===3&&this._handleTripleClick(v),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(v){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(v))}_handleSingleClick(v){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(v)?3:0,this._model.selectionStart=this._getMouseBufferCoords(v),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(v){this._selectWordAtCursor(v,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(v){const x=this._getMouseBufferCoords(v);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))}shouldColumnSelect(v){return v.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(v){if(v.stopImmediatePropagation(),!this._model.selectionStart)return;const x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(v),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(v),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const N=this._bufferService.buffer;if(this._model.selectionEnd[1]<N.lines.length){const H=N.lines.get(this._model.selectionEnd[1]);H&&H.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const v=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(v.ydisp+this._bufferService.rows,v.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=v.ydisp),this.refresh()}}_handleMouseUp(v){const x=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&v.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const N=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(N&&N[0]!==void 0&&N[1]!==void 0){const H=(0,p.moveToCellSequence)(N[0]-1,N[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,x=this._model.finalSelectionEnd,N=!(!v||!x||v[0]===x[0]&&v[1]===x[1]);N?v&&x&&(this._oldSelectionStart&&this._oldSelectionEnd&&v[0]===this._oldSelectionStart[0]&&v[1]===this._oldSelectionStart[1]&&x[0]===this._oldSelectionEnd[0]&&x[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(v,x,N)):this._oldHasSelection&&this._fireOnSelectionChange(v,x,N)}_fireOnSelectionChange(v,x,N){this._oldSelectionStart=v,this._oldSelectionEnd=x,this._oldHasSelection=N,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim((x=>this._handleTrim(x)))}_convertViewportColToCharacterIndex(v,x){let N=x;for(let H=0;x>=H;H++){const q=v.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?N--:q>1&&x!==H&&(N+=q-1)}return N}setSelection(v,x,N){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,x],this._model.selectionStartLength=N,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,x,N=!0,H=!0){if(v[0]>=this._bufferService.cols)return;const q=this._bufferService.buffer,O=q.lines.get(v[1]);if(!O)return;const Z=q.translateBufferLineToString(v[1],!1);let ne=this._convertViewportColToCharacterIndex(O,v[0]),U=ne;const F=v[0]-ne;let Q=0,A=0,L=0,w=0;if(Z.charAt(ne)===" "){for(;ne>0&&Z.charAt(ne-1)===" ";)ne--;for(;U<Z.length&&Z.charAt(U+1)===" ";)U++}else{let W=v[0],le=v[0];O.getWidth(W)===0&&(Q++,W--),O.getWidth(le)===2&&(A++,le++);const oe=O.getString(le).length;for(oe>1&&(w+=oe-1,U+=oe-1);W>0&&ne>0&&!this._isCharWordSeparator(O.loadCell(W-1,this._workCell));){O.loadCell(W-1,this._workCell);const z=this._workCell.getChars().length;this._workCell.getWidth()===0?(Q++,W--):z>1&&(L+=z-1,ne-=z-1),ne--,W--}for(;le<O.length&&U+1<Z.length&&!this._isCharWordSeparator(O.loadCell(le+1,this._workCell));){O.loadCell(le+1,this._workCell);const z=this._workCell.getChars().length;this._workCell.getWidth()===2?(A++,le++):z>1&&(w+=z-1,U+=z-1),U++,le++}}U++;let M=ne+F-Q+L,G=Math.min(this._bufferService.cols,U-ne+Q+A-L-w);if(x||Z.slice(ne,U).trim()!==""){if(N&&M===0&&O.getCodePoint(0)!==32){const W=q.lines.get(v[1]-1);if(W&&O.isWrapped&&W.getCodePoint(this._bufferService.cols-1)!==32){const le=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(le){const oe=this._bufferService.cols-le.start;M-=oe,G+=oe}}}if(H&&M+G===this._bufferService.cols&&O.getCodePoint(this._bufferService.cols-1)!==32){const W=q.lines.get(v[1]+1);if(W?.isWrapped&&W.getCodePoint(0)!==32){const le=this._getWordAt([0,v[1]+1],!1,!1,!0);le&&(G+=le.length)}}return{start:M,length:G}}}_selectWordAt(v,x){const N=this._getWordAt(v,x);if(N){for(;N.start<0;)N.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[N.start,v[1]],this._model.selectionStartLength=N.length}}_selectToWordAt(v){const x=this._getWordAt(v,!0);if(x){let N=v[1];for(;x.start<0;)x.start+=this._bufferService.cols,N--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,N++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,N]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const x=this._bufferService.buffer.getWrappedRangeForLine(v),N={start:{x:0,y:x.first},end:{x:this._bufferService.cols-1,y:x.last}};this._model.selectionStart=[0,x.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(N,this._bufferService.cols)}};f.SelectionService=E=d([S(3,_.IBufferService),S(4,_.ICoreService),S(5,D.IMouseService),S(6,_.IOptionsService),S(7,D.IRenderService),S(8,D.ICoreBrowserService)],E)},4725:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ILinkProviderService=f.IThemeService=f.ICharacterJoinerService=f.ISelectionService=f.IRenderService=f.IMouseService=f.ICoreBrowserService=f.ICharSizeService=void 0;const d=h(8343);f.ICharSizeService=(0,d.createDecorator)("CharSizeService"),f.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),f.IMouseService=(0,d.createDecorator)("MouseService"),f.IRenderService=(0,d.createDecorator)("RenderService"),f.ISelectionService=(0,d.createDecorator)("SelectionService"),f.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),f.IThemeService=(0,d.createDecorator)("ThemeService"),f.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function(J,f,h){var d=this&&this.__decorate||function(E,v,x,N){var H,q=arguments.length,O=q<3?v:N===null?N=Object.getOwnPropertyDescriptor(v,x):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(E,v,x,N);else for(var Z=E.length-1;Z>=0;Z--)(H=E[Z])&&(O=(q<3?H(O):q>3?H(v,x,O):H(v,x))||O);return q>3&&O&&Object.defineProperty(v,x,O),O},S=this&&this.__param||function(E,v){return function(x,N){v(x,N,E)}};Object.defineProperty(f,"__esModule",{value:!0}),f.ThemeService=f.DEFAULT_ANSI_COLORS=void 0;const u=h(7239),p=h(8055),b=h(8460),D=h(844),g=h(2585),o=p.css.toColor("#ffffff"),c=p.css.toColor("#000000"),a=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};f.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const E=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],v=[0,95,135,175,215,255];for(let x=0;x<216;x++){const N=v[x/36%6|0],H=v[x/6%6|0],q=v[x%6];E.push({css:p.channels.toCss(N,H,q),rgba:p.channels.toRgba(N,H,q)})}for(let x=0;x<24;x++){const N=8+10*x;E.push({css:p.channels.toCss(N,N,N),rgba:p.channels.toRgba(N,N,N)})}return E})());let C=f.ThemeService=class extends D.Disposable{get colors(){return this._colors}constructor(E){super(),this._optionsService=E,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:o,background:c,cursor:a,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(c,_),ansi:f.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(E={}){const v=this._colors;if(v.foreground=y(E.foreground,o),v.background=y(E.background,c),v.cursor=y(E.cursor,a),v.cursorAccent=y(E.cursorAccent,l),v.selectionBackgroundTransparent=y(E.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=y(E.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=E.selectionForeground?y(E.selectionForeground,p.NULL_COLOR):void 0,v.selectionForeground===p.NULL_COLOR&&(v.selectionForeground=void 0),p.color.isOpaque(v.selectionBackgroundTransparent)&&(v.selectionBackgroundTransparent=p.color.opacity(v.selectionBackgroundTransparent,.3)),p.color.isOpaque(v.selectionInactiveBackgroundTransparent)&&(v.selectionInactiveBackgroundTransparent=p.color.opacity(v.selectionInactiveBackgroundTransparent,.3)),v.ansi=f.DEFAULT_ANSI_COLORS.slice(),v.ansi[0]=y(E.black,f.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=y(E.red,f.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=y(E.green,f.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=y(E.yellow,f.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=y(E.blue,f.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=y(E.magenta,f.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=y(E.cyan,f.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=y(E.white,f.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=y(E.brightBlack,f.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=y(E.brightRed,f.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=y(E.brightGreen,f.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=y(E.brightYellow,f.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=y(E.brightBlue,f.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=y(E.brightMagenta,f.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=y(E.brightCyan,f.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=y(E.brightWhite,f.DEFAULT_ANSI_COLORS[15]),E.extendedAnsi){const x=Math.min(v.ansi.length-16,E.extendedAnsi.length);for(let N=0;N<x;N++)v.ansi[N+16]=y(E.extendedAnsi[N],f.DEFAULT_ANSI_COLORS[N+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(E){this._restoreColor(E),this._onChangeColors.fire(this.colors)}_restoreColor(E){if(E!==void 0)switch(E){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[E]=this._restoreColors.ansi[E]}else for(let v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}modifyColors(E){E(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function y(E,v){if(E!==void 0)try{return p.css.toColor(E)}catch{}return v}f.ThemeService=C=d([S(0,g.IOptionsService)],C)},6349:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CircularList=void 0;const d=h(8460),S=h(844);class u extends S.Disposable{constructor(b){super(),this._maxLength=b,this.onDeleteEmitter=this.register(new d.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new d.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new d.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(b){if(this._maxLength===b)return;const D=new Array(b);for(let g=0;g<Math.min(b,this.length);g++)D[g]=this._array[this._getCyclicIndex(g)];this._array=D,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let D=this._length;D<b;D++)this._array[D]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,D){this._array[this._getCyclicIndex(b)]=D}push(b){this._array[this._getCyclicIndex(this._length)]=b,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(b,D,...g){if(D){for(let o=b;o<this._length-D;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+D)];this._length-=D,this.onDeleteEmitter.fire({index:b,amount:D})}for(let o=this._length-1;o>=b;o--)this._array[this._getCyclicIndex(o+g.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<g.length;o++)this._array[this._getCyclicIndex(b+o)]=g[o];if(g.length&&this.onInsertEmitter.fire({index:b,amount:g.length}),this._length+g.length>this._maxLength){const o=this._length+g.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=g.length}trimStart(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,D,g){if(!(D<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+g<0)throw new Error("Cannot shift elements in list beyond index 0");if(g>0){for(let c=D-1;c>=0;c--)this.set(b+c+g,this.get(b+c));const o=b+D+g-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let o=0;o<D;o++)this.set(b+o+g,this.get(b+o))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}f.CircularList=u},1439:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.clone=void 0,f.clone=function h(d,S=5){if(typeof d!="object")return d;const u=Array.isArray(d)?[]:{};for(const p in d)u[p]=S<=1?d[p]:d[p]&&h(d[p],S-1);return u}},8055:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.contrastRatio=f.toPaddedHex=f.rgba=f.rgb=f.css=f.color=f.channels=f.NULL_COLOR=void 0;let h=0,d=0,S=0,u=0;var p,b,D,g,o;function c(l){const _=l.toString(16);return _.length<2?"0"+_:_}function a(l,_){return l<_?(_+.05)/(l+.05):(l+.05)/(_+.05)}f.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(_,C,y,E){return E!==void 0?`#${c(_)}${c(C)}${c(y)}${c(E)}`:`#${c(_)}${c(C)}${c(y)}`},l.toRgba=function(_,C,y,E=255){return(_<<24|C<<16|y<<8|E)>>>0},l.toColor=function(_,C,y,E){return{css:l.toCss(_,C,y,E),rgba:l.toRgba(_,C,y,E)}}})(p||(f.channels=p={})),(function(l){function _(C,y){return u=Math.round(255*y),[h,d,S]=o.toChannels(C.rgba),{css:p.toCss(h,d,S,u),rgba:p.toRgba(h,d,S,u)}}l.blend=function(C,y){if(u=(255&y.rgba)/255,u===1)return{css:y.css,rgba:y.rgba};const E=y.rgba>>24&255,v=y.rgba>>16&255,x=y.rgba>>8&255,N=C.rgba>>24&255,H=C.rgba>>16&255,q=C.rgba>>8&255;return h=N+Math.round((E-N)*u),d=H+Math.round((v-H)*u),S=q+Math.round((x-q)*u),{css:p.toCss(h,d,S),rgba:p.toRgba(h,d,S)}},l.isOpaque=function(C){return(255&C.rgba)==255},l.ensureContrastRatio=function(C,y,E){const v=o.ensureContrastRatio(C.rgba,y.rgba,E);if(v)return p.toColor(v>>24&255,v>>16&255,v>>8&255)},l.opaque=function(C){const y=(255|C.rgba)>>>0;return[h,d,S]=o.toChannels(y),{css:p.toCss(h,d,S),rgba:y}},l.opacity=_,l.multiplyOpacity=function(C,y){return u=255&C.rgba,_(C,u*y/255)},l.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(b||(f.color=b={})),(function(l){let _,C;try{const y=document.createElement("canvas");y.width=1,y.height=1;const E=y.getContext("2d",{willReadFrequently:!0});E&&(_=E,_.globalCompositeOperation="copy",C=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return h=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),S=parseInt(y.slice(3,4).repeat(2),16),p.toColor(h,d,S);case 5:return h=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),S=parseInt(y.slice(3,4).repeat(2),16),u=parseInt(y.slice(4,5).repeat(2),16),p.toColor(h,d,S,u);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const E=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(E)return h=parseInt(E[1]),d=parseInt(E[2]),S=parseInt(E[3]),u=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),p.toColor(h,d,S,u);if(!_||!C)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=C,_.fillStyle=y,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[h,d,S,u]=_.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(h,d,S,u),css:y}}})(D||(f.css=D={})),(function(l){function _(C,y,E){const v=C/255,x=y/255,N=E/255;return .2126*(v<=.03928?v/12.92:Math.pow((v+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(N<=.03928?N/12.92:Math.pow((N+.055)/1.055,2.4))}l.relativeLuminance=function(C){return _(C>>16&255,C>>8&255,255&C)},l.relativeLuminance2=_})(g||(f.rgb=g={})),(function(l){function _(y,E,v){const x=y>>24&255,N=y>>16&255,H=y>>8&255;let q=E>>24&255,O=E>>16&255,Z=E>>8&255,ne=a(g.relativeLuminance2(q,O,Z),g.relativeLuminance2(x,N,H));for(;ne<v&&(q>0||O>0||Z>0);)q-=Math.max(0,Math.ceil(.1*q)),O-=Math.max(0,Math.ceil(.1*O)),Z-=Math.max(0,Math.ceil(.1*Z)),ne=a(g.relativeLuminance2(q,O,Z),g.relativeLuminance2(x,N,H));return(q<<24|O<<16|Z<<8|255)>>>0}function C(y,E,v){const x=y>>24&255,N=y>>16&255,H=y>>8&255;let q=E>>24&255,O=E>>16&255,Z=E>>8&255,ne=a(g.relativeLuminance2(q,O,Z),g.relativeLuminance2(x,N,H));for(;ne<v&&(q<255||O<255||Z<255);)q=Math.min(255,q+Math.ceil(.1*(255-q))),O=Math.min(255,O+Math.ceil(.1*(255-O))),Z=Math.min(255,Z+Math.ceil(.1*(255-Z))),ne=a(g.relativeLuminance2(q,O,Z),g.relativeLuminance2(x,N,H));return(q<<24|O<<16|Z<<8|255)>>>0}l.blend=function(y,E){if(u=(255&E)/255,u===1)return E;const v=E>>24&255,x=E>>16&255,N=E>>8&255,H=y>>24&255,q=y>>16&255,O=y>>8&255;return h=H+Math.round((v-H)*u),d=q+Math.round((x-q)*u),S=O+Math.round((N-O)*u),p.toRgba(h,d,S)},l.ensureContrastRatio=function(y,E,v){const x=g.relativeLuminance(y>>8),N=g.relativeLuminance(E>>8);if(a(x,N)<v){if(N<x){const O=_(y,E,v),Z=a(x,g.relativeLuminance(O>>8));if(Z<v){const ne=C(y,E,v);return Z>a(x,g.relativeLuminance(ne>>8))?O:ne}return O}const H=C(y,E,v),q=a(x,g.relativeLuminance(H>>8));if(q<v){const O=_(y,E,v);return q>a(x,g.relativeLuminance(O>>8))?H:O}return H}},l.reduceLuminance=_,l.increaseLuminance=C,l.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}})(o||(f.rgba=o={})),f.toPaddedHex=c,f.contrastRatio=a},8969:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CoreTerminal=void 0;const d=h(844),S=h(2585),u=h(4348),p=h(7866),b=h(744),D=h(7302),g=h(6975),o=h(8460),c=h(1753),a=h(1480),l=h(7994),_=h(9282),C=h(5435),y=h(5981),E=h(2660);let v=!1;class x extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new o.EventEmitter),this._onScroll.event((H=>{this._onScrollApi?.fire(H.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(H){for(const q in H)this.optionsService.options[q]=H[q]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new o.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new o.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new o.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new o.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new D.OptionsService(H)),this._instantiationService.setService(S.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.BufferService)),this._instantiationService.setService(S.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(S.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(g.CoreService)),this._instantiationService.setService(S.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(S.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(S.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(S.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(E.OscLinkService),this._instantiationService.setService(S.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,o.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,o.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,o.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,o.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((q=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((q=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new y.WriteBuffer(((q,O)=>this._inputHandler.parse(q,O)))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,q){this._writeBuffer.write(H,q)}writeSync(H,q){this._logService.logLevel<=S.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(H,q)}input(H,q=!0){this.coreService.triggerDataEvent(H,q)}resize(H,q){isNaN(H)||isNaN(q)||(H=Math.max(H,b.MINIMUM_COLS),q=Math.max(q,b.MINIMUM_ROWS),this._bufferService.resize(H,q))}scroll(H,q=!1){this._bufferService.scroll(H,q)}scrollLines(H,q,O){this._bufferService.scrollLines(H,q,O)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const q=H-this._bufferService.buffer.ydisp;q!==0&&this.scrollLines(q)}registerEscHandler(H,q){return this._inputHandler.registerEscHandler(H,q)}registerDcsHandler(H,q){return this._inputHandler.registerDcsHandler(H,q)}registerCsiHandler(H,q){return this._inputHandler.registerCsiHandler(H,q)}registerOscHandler(H,q){return this._inputHandler.registerOscHandler(H,q)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const q=this.optionsService.rawOptions.windowsPty;q&&q.buildNumber!==void 0&&q.buildNumber!==void 0?H=q.backend==="conpty"&&q.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const q of H)q.dispose()}))}}}f.CoreTerminal=x},8460:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.runAndSubscribe=f.forwardEvent=f.EventEmitter=void 0,f.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=h=>(this._listeners.push(h),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===h)return void this._listeners.splice(d,1)}}})),this._event}fire(h,d){const S=[];for(let u=0;u<this._listeners.length;u++)S.push(this._listeners[u]);for(let u=0;u<S.length;u++)S[u].call(void 0,h,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},f.forwardEvent=function(h,d){return h((S=>d.fire(S)))},f.runAndSubscribe=function(h,d){return d(void 0),h((S=>d(S)))}},5435:function(J,f,h){var d=this&&this.__decorate||function(Q,A,L,w){var M,G=arguments.length,W=G<3?A:w===null?w=Object.getOwnPropertyDescriptor(A,L):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(Q,A,L,w);else for(var le=Q.length-1;le>=0;le--)(M=Q[le])&&(W=(G<3?M(W):G>3?M(A,L,W):M(A,L))||W);return G>3&&W&&Object.defineProperty(A,L,W),W},S=this&&this.__param||function(Q,A){return function(L,w){A(L,w,Q)}};Object.defineProperty(f,"__esModule",{value:!0}),f.InputHandler=f.WindowsOptionsReportType=void 0;const u=h(2584),p=h(7116),b=h(2015),D=h(844),g=h(482),o=h(8437),c=h(8460),a=h(643),l=h(511),_=h(3734),C=h(2585),y=h(1480),E=h(6242),v=h(6351),x=h(5941),N={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function q(Q,A){if(Q>24)return A.setWinLines||!1;switch(Q){case 1:return!!A.restoreWin;case 2:return!!A.minimizeWin;case 3:return!!A.setWinPosition;case 4:return!!A.setWinSizePixels;case 5:return!!A.raiseWin;case 6:return!!A.lowerWin;case 7:return!!A.refreshWin;case 8:return!!A.setWinSizeChars;case 9:return!!A.maximizeWin;case 10:return!!A.fullscreenWin;case 11:return!!A.getWinState;case 13:return!!A.getWinPosition;case 14:return!!A.getWinSizePixels;case 15:return!!A.getScreenSizePixels;case 16:return!!A.getCellSizePixels;case 18:return!!A.getWinSizeChars;case 19:return!!A.getScreenSizeChars;case 20:return!!A.getIconTitle;case 21:return!!A.getWinTitle;case 22:return!!A.pushTitle;case 23:return!!A.popTitle;case 24:return!!A.setWinLines}return!1}var O;(function(Q){Q[Q.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Q[Q.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(O||(f.WindowsOptionsReportType=O={}));let Z=0;class ne extends D.Disposable{getAttrData(){return this._curAttrData}constructor(A,L,w,M,G,W,le,oe,z=new b.EscapeSequenceParser){super(),this._bufferService=A,this._charsetService=L,this._coreService=w,this._logService=M,this._optionsService=G,this._oscLinkService=W,this._coreMouseService=le,this._unicodeService=oe,this._parser=z,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new g.StringToUtf32,this._utf8Decoder=new g.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new U(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((R=>this._activeBuffer=R.activeBuffer))),this._parser.setCsiHandlerFallback(((R,$)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(R),params:$.toArray()})})),this._parser.setEscHandlerFallback((R=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(R)})})),this._parser.setExecuteHandlerFallback((R=>{this._logService.debug("Unknown EXECUTE code: ",{code:R})})),this._parser.setOscHandlerFallback(((R,$,ae)=>{this._logService.debug("Unknown OSC code: ",{identifier:R,action:$,data:ae})})),this._parser.setDcsHandlerFallback(((R,$,ae)=>{$==="HOOK"&&(ae=ae.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(R),action:$,payload:ae})})),this._parser.setPrintHandler(((R,$,ae)=>this.print(R,$,ae))),this._parser.registerCsiHandler({final:"@"},(R=>this.insertChars(R))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(R=>this.scrollLeft(R))),this._parser.registerCsiHandler({final:"A"},(R=>this.cursorUp(R))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(R=>this.scrollRight(R))),this._parser.registerCsiHandler({final:"B"},(R=>this.cursorDown(R))),this._parser.registerCsiHandler({final:"C"},(R=>this.cursorForward(R))),this._parser.registerCsiHandler({final:"D"},(R=>this.cursorBackward(R))),this._parser.registerCsiHandler({final:"E"},(R=>this.cursorNextLine(R))),this._parser.registerCsiHandler({final:"F"},(R=>this.cursorPrecedingLine(R))),this._parser.registerCsiHandler({final:"G"},(R=>this.cursorCharAbsolute(R))),this._parser.registerCsiHandler({final:"H"},(R=>this.cursorPosition(R))),this._parser.registerCsiHandler({final:"I"},(R=>this.cursorForwardTab(R))),this._parser.registerCsiHandler({final:"J"},(R=>this.eraseInDisplay(R,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(R=>this.eraseInDisplay(R,!0))),this._parser.registerCsiHandler({final:"K"},(R=>this.eraseInLine(R,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(R=>this.eraseInLine(R,!0))),this._parser.registerCsiHandler({final:"L"},(R=>this.insertLines(R))),this._parser.registerCsiHandler({final:"M"},(R=>this.deleteLines(R))),this._parser.registerCsiHandler({final:"P"},(R=>this.deleteChars(R))),this._parser.registerCsiHandler({final:"S"},(R=>this.scrollUp(R))),this._parser.registerCsiHandler({final:"T"},(R=>this.scrollDown(R))),this._parser.registerCsiHandler({final:"X"},(R=>this.eraseChars(R))),this._parser.registerCsiHandler({final:"Z"},(R=>this.cursorBackwardTab(R))),this._parser.registerCsiHandler({final:"`"},(R=>this.charPosAbsolute(R))),this._parser.registerCsiHandler({final:"a"},(R=>this.hPositionRelative(R))),this._parser.registerCsiHandler({final:"b"},(R=>this.repeatPrecedingCharacter(R))),this._parser.registerCsiHandler({final:"c"},(R=>this.sendDeviceAttributesPrimary(R))),this._parser.registerCsiHandler({prefix:">",final:"c"},(R=>this.sendDeviceAttributesSecondary(R))),this._parser.registerCsiHandler({final:"d"},(R=>this.linePosAbsolute(R))),this._parser.registerCsiHandler({final:"e"},(R=>this.vPositionRelative(R))),this._parser.registerCsiHandler({final:"f"},(R=>this.hVPosition(R))),this._parser.registerCsiHandler({final:"g"},(R=>this.tabClear(R))),this._parser.registerCsiHandler({final:"h"},(R=>this.setMode(R))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(R=>this.setModePrivate(R))),this._parser.registerCsiHandler({final:"l"},(R=>this.resetMode(R))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(R=>this.resetModePrivate(R))),this._parser.registerCsiHandler({final:"m"},(R=>this.charAttributes(R))),this._parser.registerCsiHandler({final:"n"},(R=>this.deviceStatus(R))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(R=>this.deviceStatusPrivate(R))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(R=>this.softReset(R))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(R=>this.setCursorStyle(R))),this._parser.registerCsiHandler({final:"r"},(R=>this.setScrollRegion(R))),this._parser.registerCsiHandler({final:"s"},(R=>this.saveCursor(R))),this._parser.registerCsiHandler({final:"t"},(R=>this.windowOptions(R))),this._parser.registerCsiHandler({final:"u"},(R=>this.restoreCursor(R))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(R=>this.insertColumns(R))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(R=>this.deleteColumns(R))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(R=>this.selectProtected(R))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(R=>this.requestMode(R,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(R=>this.requestMode(R,!1))),this._parser.setExecuteHandler(u.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(u.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(u.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(u.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(u.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(u.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(u.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(u.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(u.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new E.OscHandler((R=>(this.setTitle(R),this.setIconName(R),!0)))),this._parser.registerOscHandler(1,new E.OscHandler((R=>this.setIconName(R)))),this._parser.registerOscHandler(2,new E.OscHandler((R=>this.setTitle(R)))),this._parser.registerOscHandler(4,new E.OscHandler((R=>this.setOrReportIndexedColor(R)))),this._parser.registerOscHandler(8,new E.OscHandler((R=>this.setHyperlink(R)))),this._parser.registerOscHandler(10,new E.OscHandler((R=>this.setOrReportFgColor(R)))),this._parser.registerOscHandler(11,new E.OscHandler((R=>this.setOrReportBgColor(R)))),this._parser.registerOscHandler(12,new E.OscHandler((R=>this.setOrReportCursorColor(R)))),this._parser.registerOscHandler(104,new E.OscHandler((R=>this.restoreIndexedColor(R)))),this._parser.registerOscHandler(110,new E.OscHandler((R=>this.restoreFgColor(R)))),this._parser.registerOscHandler(111,new E.OscHandler((R=>this.restoreBgColor(R)))),this._parser.registerOscHandler(112,new E.OscHandler((R=>this.restoreCursorColor(R)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const R in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:R},(()=>this.selectCharset("("+R))),this._parser.registerEscHandler({intermediates:")",final:R},(()=>this.selectCharset(")"+R))),this._parser.registerEscHandler({intermediates:"*",final:R},(()=>this.selectCharset("*"+R))),this._parser.registerEscHandler({intermediates:"+",final:R},(()=>this.selectCharset("+"+R))),this._parser.registerEscHandler({intermediates:"-",final:R},(()=>this.selectCharset("-"+R))),this._parser.registerEscHandler({intermediates:".",final:R},(()=>this.selectCharset("."+R))),this._parser.registerEscHandler({intermediates:"/",final:R},(()=>this.selectCharset("/"+R)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((R=>(this._logService.error("Parsing error: ",R),R))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new v.DcsHandler(((R,$)=>this.requestStatusString(R,$))))}_preserveStack(A,L,w,M){this._parseStack.paused=!0,this._parseStack.cursorStartX=A,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=w,this._parseStack.position=M}_logSlowResolvingAsync(A){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([A,new Promise(((L,w)=>setTimeout((()=>w("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(A,L){let w,M=this._activeBuffer.x,G=this._activeBuffer.y,W=0;const le=this._parseStack.paused;if(le){if(w=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(w),w;M=this._parseStack.cursorStartX,G=this._parseStack.cursorStartY,this._parseStack.paused=!1,A.length>H&&(W=this._parseStack.position+H)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof A=="string"?` "${A}"`:` "${Array.prototype.map.call(A,(R=>String.fromCharCode(R))).join("")}"`),typeof A=="string"?A.split("").map((R=>R.charCodeAt(0))):A),this._parseBuffer.length<A.length&&this._parseBuffer.length<H&&(this._parseBuffer=new Uint32Array(Math.min(A.length,H))),le||this._dirtyRowTracker.clearRange(),A.length>H)for(let R=W;R<A.length;R+=H){const $=R+H<A.length?R+H:A.length,ae=typeof A=="string"?this._stringDecoder.decode(A.substring(R,$),this._parseBuffer):this._utf8Decoder.decode(A.subarray(R,$),this._parseBuffer);if(w=this._parser.parse(this._parseBuffer,ae))return this._preserveStack(M,G,ae,R),this._logSlowResolvingAsync(w),w}else if(!le){const R=typeof A=="string"?this._stringDecoder.decode(A,this._parseBuffer):this._utf8Decoder.decode(A,this._parseBuffer);if(w=this._parser.parse(this._parseBuffer,R))return this._preserveStack(M,G,R,0),this._logSlowResolvingAsync(w),w}this._activeBuffer.x===M&&this._activeBuffer.y===G||this._onCursorMove.fire();const oe=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),z=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);z<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(z,this._bufferService.rows-1),Math.min(oe,this._bufferService.rows-1))}print(A,L,w){let M,G;const W=this._charsetService.charset,le=this._optionsService.rawOptions.screenReaderMode,oe=this._bufferService.cols,z=this._coreService.decPrivateModes.wraparound,R=this._coreService.modes.insertMode,$=this._curAttrData;let ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&w-L>0&&ae.getWidth(this._activeBuffer.x-1)===2&&ae.setCellFromCodepoint(this._activeBuffer.x-1,0,1,$);let de=this._parser.precedingJoinState;for(let fe=L;fe<w;++fe){if(M=A[fe],M<127&&W){const et=W[String.fromCharCode(M)];et&&(M=et.charCodeAt(0))}const Ae=this._unicodeService.charProperties(M,de);G=y.UnicodeService.extractWidth(Ae);const ke=y.UnicodeService.extractShouldJoin(Ae),Ne=ke?y.UnicodeService.extractWidth(de):0;if(de=Ae,le&&this._onA11yChar.fire((0,g.stringFromCodePoint)(M)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+G-Ne>oe){if(z){const et=ae;let be=this._activeBuffer.x-Ne;for(this._activeBuffer.x=Ne,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ne>0&&ae instanceof o.BufferLine&&ae.copyCellsFrom(et,be,0,Ne,!1);be<oe;)et.setCellFromCodepoint(be++,0,1,$)}else if(this._activeBuffer.x=oe-1,G===2)continue}if(ke&&this._activeBuffer.x){const et=ae.getWidth(this._activeBuffer.x-1)?1:2;ae.addCodepointToCell(this._activeBuffer.x-et,M,G);for(let be=G-Ne;--be>=0;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,$)}else if(R&&(ae.insertCells(this._activeBuffer.x,G-Ne,this._activeBuffer.getNullCell($)),ae.getWidth(oe-1)===2&&ae.setCellFromCodepoint(oe-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,$)),ae.setCellFromCodepoint(this._activeBuffer.x++,M,G,$),G>0)for(;--G;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,$)}this._parser.precedingJoinState=de,this._activeBuffer.x<oe&&w-L>0&&ae.getWidth(this._activeBuffer.x)===0&&!ae.hasContent(this._activeBuffer.x)&&ae.setCellFromCodepoint(this._activeBuffer.x,0,1,$),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(A,L){return A.final!=="t"||A.prefix||A.intermediates?this._parser.registerCsiHandler(A,L):this._parser.registerCsiHandler(A,(w=>!q(w.params[0],this._optionsService.rawOptions.windowOptions)||L(w)))}registerDcsHandler(A,L){return this._parser.registerDcsHandler(A,new v.DcsHandler(L))}registerEscHandler(A,L){return this._parser.registerEscHandler(A,L)}registerOscHandler(A,L){return this._parser.registerOscHandler(A,new E.OscHandler(L))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);A.hasWidth(this._activeBuffer.x)&&!A.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const A=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-A),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(A=this._bufferService.cols-1){this._activeBuffer.x=Math.min(A,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(A,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=A,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=A,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(A,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+A,this._activeBuffer.y+L)}cursorUp(A){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,A.params[0]||1)):this._moveCursor(0,-(A.params[0]||1)),!0}cursorDown(A){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,A.params[0]||1)):this._moveCursor(0,A.params[0]||1),!0}cursorForward(A){return this._moveCursor(A.params[0]||1,0),!0}cursorBackward(A){return this._moveCursor(-(A.params[0]||1),0),!0}cursorNextLine(A){return this.cursorDown(A),this._activeBuffer.x=0,!0}cursorPrecedingLine(A){return this.cursorUp(A),this._activeBuffer.x=0,!0}cursorCharAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(A){return this._setCursor(A.length>=2?(A.params[1]||1)-1:0,(A.params[0]||1)-1),!0}charPosAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(A){return this._moveCursor(A.params[0]||1,0),!0}linePosAbsolute(A){return this._setCursor(this._activeBuffer.x,(A.params[0]||1)-1),!0}vPositionRelative(A){return this._moveCursor(0,A.params[0]||1),!0}hVPosition(A){return this.cursorPosition(A),!0}tabClear(A){const L=A.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=A.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=A.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(A){const L=A.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(A,L,w,M=!1,G=!1){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);W.replaceCells(L,w,this._activeBuffer.getNullCell(this._eraseAttrData()),G),M&&(W.isWrapped=!1)}_resetBufferLine(A,L=!1){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);w&&(w.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+A),w.isWrapped=!1)}eraseInDisplay(A,L=!1){let w;switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:for(w=this._activeBuffer.y,this._dirtyRowTracker.markDirty(w),this._eraseInBufferLine(w++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);w<this._bufferService.rows;w++)this._resetBufferLine(w,L);this._dirtyRowTracker.markDirty(w);break;case 1:for(w=this._activeBuffer.y,this._dirtyRowTracker.markDirty(w),this._eraseInBufferLine(w,0,this._activeBuffer.x+1,!0,L),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(w+1).isWrapped=!1);w--;)this._resetBufferLine(w,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(w=this._bufferService.rows,this._dirtyRowTracker.markDirty(w-1);w--;)this._resetBufferLine(w,L);this._dirtyRowTracker.markDirty(0);break;case 3:const M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0}eraseInLine(A,L=!1){switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(A){this._restrictCursor();let L=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=this._activeBuffer.ybase+this._activeBuffer.y,M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,G=this._bufferService.rows-1+this._activeBuffer.ybase-M+1;for(;L--;)this._activeBuffer.lines.splice(G-1,1),this._activeBuffer.lines.splice(w,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(A){this._restrictCursor();let L=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const w=this._activeBuffer.ybase+this._activeBuffer.y;let M;for(M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,M=this._bufferService.rows-1+this._activeBuffer.ybase-M;L--;)this._activeBuffer.lines.splice(w,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(A){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.insertCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(A){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.deleteCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(A){let L=A.params[0]||1;for(;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(A){let L=A.params[0]||1;for(;L--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(o.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=A.params[0]||1;for(let w=this._activeBuffer.scrollTop;w<=this._activeBuffer.scrollBottom;++w){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+w);M.deleteCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=A.params[0]||1;for(let w=this._activeBuffer.scrollTop;w<=this._activeBuffer.scrollBottom;++w){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+w);M.insertCells(0,L,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=A.params[0]||1;for(let w=this._activeBuffer.scrollTop;w<=this._activeBuffer.scrollBottom;++w){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+w);M.insertCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const L=A.params[0]||1;for(let w=this._activeBuffer.scrollTop;w<=this._activeBuffer.scrollBottom;++w){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+w);M.deleteCells(this._activeBuffer.x,L,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(A){this._restrictCursor();const L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return L&&(L.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(A.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(A){const L=this._parser.precedingJoinState;if(!L)return!0;const w=A.params[0]||1,M=y.UnicodeService.extractWidth(L),G=this._activeBuffer.x-M,W=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(G),le=new Uint32Array(W.length*w);let oe=0;for(let R=0;R<W.length;){const $=W.codePointAt(R)||0;le[oe++]=$,R+=$>65535?2:1}let z=oe;for(let R=1;R<w;++R)le.copyWithin(z,0,oe),z+=oe;return this.print(le,0,z),!0}sendDeviceAttributesPrimary(A){return A.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(A){return A.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(A.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(A){return(this._optionsService.rawOptions.termName+"").indexOf(A)===0}setMode(A){for(let L=0;L<A.length;L++)switch(A.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(A){for(let L=0;L<A.length;L++)switch(A.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(A){for(let L=0;L<A.length;L++)switch(A.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(A){for(let L=0;L<A.length;L++)switch(A.params[L]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),A.params[L]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(A,L){const w=this._coreService.decPrivateModes,{activeProtocol:M,activeEncoding:G}=this._coreMouseService,W=this._coreService,{buffers:le,cols:oe}=this._bufferService,{active:z,alt:R}=le,$=this._optionsService.rawOptions,ae=ke=>ke?1:2,de=A.params[0];return fe=de,Ae=L?de===2?4:de===4?ae(W.modes.insertMode):de===12?3:de===20?ae($.convertEol):0:de===1?ae(w.applicationCursorKeys):de===3?$.windowOptions.setWinLines?oe===80?2:oe===132?1:0:0:de===6?ae(w.origin):de===7?ae(w.wraparound):de===8?3:de===9?ae(M==="X10"):de===12?ae($.cursorBlink):de===25?ae(!W.isCursorHidden):de===45?ae(w.reverseWraparound):de===66?ae(w.applicationKeypad):de===67?4:de===1e3?ae(M==="VT200"):de===1002?ae(M==="DRAG"):de===1003?ae(M==="ANY"):de===1004?ae(w.sendFocus):de===1005?4:de===1006?ae(G==="SGR"):de===1015?4:de===1016?ae(G==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?ae(z===R):de===2004?ae(w.bracketedPasteMode):0,W.triggerDataEvent(`${u.C0.ESC}[${L?"":"?"}${fe};${Ae}$y`),!0;var fe,Ae}_updateAttrColor(A,L,w,M,G){return L===2?(A|=50331648,A&=-16777216,A|=_.AttributeData.fromColorRGB([w,M,G])):L===5&&(A&=-50331904,A|=33554432|255&w),A}_extractColor(A,L,w){const M=[0,0,-1,0,0,0];let G=0,W=0;do{if(M[W+G]=A.params[L+W],A.hasSubParams(L+W)){const le=A.getSubParams(L+W);let oe=0;do M[1]===5&&(G=1),M[W+oe+1+G]=le[oe];while(++oe<le.length&&oe+W+1+G<M.length);break}if(M[1]===5&&W+G>=2||M[1]===2&&W+G>=5)break;M[1]&&(G=1)}while(++W+L<A.length&&W+G<M.length);for(let le=2;le<M.length;++le)M[le]===-1&&(M[le]=0);switch(M[0]){case 38:w.fg=this._updateAttrColor(w.fg,M[1],M[3],M[4],M[5]);break;case 48:w.bg=this._updateAttrColor(w.bg,M[1],M[3],M[4],M[5]);break;case 58:w.extended=w.extended.clone(),w.extended.underlineColor=this._updateAttrColor(w.extended.underlineColor,M[1],M[3],M[4],M[5])}return W}_processUnderline(A,L){L.extended=L.extended.clone(),(!~A||A>5)&&(A=1),L.extended.underlineStyle=A,L.fg|=268435456,A===0&&(L.fg&=-268435457),L.updateExtended()}_processSGR0(A){A.fg=o.DEFAULT_ATTR_DATA.fg,A.bg=o.DEFAULT_ATTR_DATA.bg,A.extended=A.extended.clone(),A.extended.underlineStyle=0,A.extended.underlineColor&=-67108864,A.updateExtended()}charAttributes(A){if(A.length===1&&A.params[0]===0)return this._processSGR0(this._curAttrData),!0;const L=A.length;let w;const M=this._curAttrData;for(let G=0;G<L;G++)w=A.params[G],w>=30&&w<=37?(M.fg&=-50331904,M.fg|=16777216|w-30):w>=40&&w<=47?(M.bg&=-50331904,M.bg|=16777216|w-40):w>=90&&w<=97?(M.fg&=-50331904,M.fg|=16777224|w-90):w>=100&&w<=107?(M.bg&=-50331904,M.bg|=16777224|w-100):w===0?this._processSGR0(M):w===1?M.fg|=134217728:w===3?M.bg|=67108864:w===4?(M.fg|=268435456,this._processUnderline(A.hasSubParams(G)?A.getSubParams(G)[0]:1,M)):w===5?M.fg|=536870912:w===7?M.fg|=67108864:w===8?M.fg|=1073741824:w===9?M.fg|=2147483648:w===2?M.bg|=134217728:w===21?this._processUnderline(2,M):w===22?(M.fg&=-134217729,M.bg&=-134217729):w===23?M.bg&=-67108865:w===24?(M.fg&=-268435457,this._processUnderline(0,M)):w===25?M.fg&=-536870913:w===27?M.fg&=-67108865:w===28?M.fg&=-1073741825:w===29?M.fg&=2147483647:w===39?(M.fg&=-67108864,M.fg|=16777215&o.DEFAULT_ATTR_DATA.fg):w===49?(M.bg&=-67108864,M.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):w===38||w===48||w===58?G+=this._extractColor(A,G,M):w===53?M.bg|=1073741824:w===55?M.bg&=-1073741825:w===59?(M.extended=M.extended.clone(),M.extended.underlineColor=-1,M.updateExtended()):w===100?(M.fg&=-67108864,M.fg|=16777215&o.DEFAULT_ATTR_DATA.fg,M.bg&=-67108864,M.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",w);return!0}deviceStatus(A){switch(A.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,w=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${L};${w}R`)}return!0}deviceStatusPrivate(A){if(A.params[0]===6){const L=this._activeBuffer.y+1,w=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${L};${w}R`)}return!0}softReset(A){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(A){const L=A.params[0]||1;switch(L){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const w=L%2==1;return this._optionsService.options.cursorBlink=w,!0}setScrollRegion(A){const L=A.params[0]||1;let w;return(A.length<2||(w=A.params[1])>this._bufferService.rows||w===0)&&(w=this._bufferService.rows),w>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=w-1,this._setCursor(0,0)),!0}windowOptions(A){if(!q(A.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=A.length>1?A.params[1]:0;switch(A.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(O.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(O.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(A){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(A){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(A){return this._windowTitle=A,this._onTitleChange.fire(A),!0}setIconName(A){return this._iconName=A,!0}setOrReportIndexedColor(A){const L=[],w=A.split(";");for(;w.length>1;){const M=w.shift(),G=w.shift();if(/^\d+$/.exec(M)){const W=parseInt(M);if(F(W))if(G==="?")L.push({type:0,index:W});else{const le=(0,x.parseColor)(G);le&&L.push({type:1,index:W,color:le})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink(A){const L=A.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink(A,L){this._getCurrentLinkId()&&this._finishHyperlink();const w=A.split(":");let M;const G=w.findIndex((W=>W.startsWith("id=")));return G!==-1&&(M=w[G].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:M,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(A,L){const w=A.split(";");for(let M=0;M<w.length&&!(L>=this._specialColors.length);++M,++L)if(w[M]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const G=(0,x.parseColor)(w[M]);G&&this._onColor.fire([{type:1,index:this._specialColors[L],color:G}])}return!0}setOrReportFgColor(A){return this._setOrReportSpecialColor(A,0)}setOrReportBgColor(A){return this._setOrReportSpecialColor(A,1)}setOrReportCursorColor(A){return this._setOrReportSpecialColor(A,2)}restoreIndexedColor(A){if(!A)return this._onColor.fire([{type:2}]),!0;const L=[],w=A.split(";");for(let M=0;M<w.length;++M)if(/^\d+$/.exec(w[M])){const G=parseInt(w[M]);F(G)&&L.push({type:2,index:G})}return L.length&&this._onColor.fire(L),!0}restoreFgColor(A){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(A){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(A){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(A){return A.length!==2?(this.selectDefaultCharset(),!0):(A[0]==="/"||this._charsetService.setgCharset(N[A[0]],p.CHARSETS[A[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const A=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,A,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(A){return this._charsetService.setgLevel(A),!0}screenAlignmentPattern(){const A=new l.CellData;A.content=4194373,A.fg=this._curAttrData.fg,A.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L<this._bufferService.rows;++L){const w=this._activeBuffer.ybase+this._activeBuffer.y+L,M=this._activeBuffer.lines.get(w);M&&(M.fill(A),M.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(A,L){const w=this._bufferService.buffer,M=this._optionsService.rawOptions;return(G=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${G}${u.C0.ESC}\\`),!0))(A==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:A==='"p'?'P1$r61;1"p':A==="r"?`P1$r${w.scrollTop+1};${w.scrollBottom+1}r`:A==="m"?"P1$r0m":A===" q"?`P1$r${{block:2,underline:4,bar:6}[M.cursorStyle]-(M.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(A,L){this._dirtyRowTracker.markRangeDirty(A,L)}}f.InputHandler=ne;let U=class{constructor(Q){this._bufferService=Q,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Q){Q<this.start?this.start=Q:Q>this.end&&(this.end=Q)}markRangeDirty(Q,A){Q>A&&(Z=Q,Q=A,A=Z),Q<this.start&&(this.start=Q),A>this.end&&(this.end=A)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function F(Q){return 0<=Q&&Q<256}U=d([S(0,C.IBufferService)],U)},844:(J,f)=>{function h(d){for(const S of d)S.dispose();d.length=0}Object.defineProperty(f,"__esModule",{value:!0}),f.getDisposeArrayDisposable=f.disposeArray=f.toDisposable=f.MutableDisposable=f.Disposable=void 0,f.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const d of this._disposables)d.dispose();this._disposables.length=0}register(d){return this._disposables.push(d),d}unregister(d){const S=this._disposables.indexOf(d);S!==-1&&this._disposables.splice(S,1)}},f.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){this._isDisposed||d===this._value||(this._value?.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},f.toDisposable=function(d){return{dispose:d}},f.disposeArray=h,f.getDisposeArrayDisposable=function(d){return{dispose:()=>h(d)}}},1505:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.FourKeyMap=f.TwoKeyMap=void 0;class h{constructor(){this._data={}}set(S,u,p){this._data[S]||(this._data[S]={}),this._data[S][u]=p}get(S,u){return this._data[S]?this._data[S][u]:void 0}clear(){this._data={}}}f.TwoKeyMap=h,f.FourKeyMap=class{constructor(){this._data=new h}set(d,S,u,p,b){this._data.get(d,S)||this._data.set(d,S,new h),this._data.get(d,S).set(u,p,b)}get(d,S,u,p){return this._data.get(d,S)?.get(u,p)}clear(){this._data.clear()}}},6114:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.isChromeOS=f.isLinux=f.isWindows=f.isIphone=f.isIpad=f.isMac=f.getSafariVersion=f.isSafari=f.isLegacyEdge=f.isFirefox=f.isNode=void 0,f.isNode=typeof process<"u"&&"title"in process;const h=f.isNode?"node":navigator.userAgent,d=f.isNode?"node":navigator.platform;f.isFirefox=h.includes("Firefox"),f.isLegacyEdge=h.includes("Edge"),f.isSafari=/^((?!chrome|android).)*safari/i.test(h),f.getSafariVersion=function(){if(!f.isSafari)return 0;const S=h.match(/Version\/(\d+)/);return S===null||S.length<2?0:parseInt(S[1])},f.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),f.isIpad=d==="iPad",f.isIphone=d==="iPhone",f.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),f.isLinux=d.indexOf("Linux")>=0,f.isChromeOS=/\bCrOS\b/.test(h)},6106:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.SortedList=void 0;let h=0;f.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(h=this._search(this._getKey(d)),this._array.splice(h,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const S=this._getKey(d);if(S===void 0||(h=this._search(S),h===-1)||this._getKey(this._array[h])!==S)return!1;do if(this._array[h]===d)return this._array.splice(h,1),!0;while(++h<this._array.length&&this._getKey(this._array[h])===S);return!1}*getKeyIterator(d){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do yield this._array[h];while(++h<this._array.length&&this._getKey(this._array[h])===d)}forEachByKey(d,S){if(this._array.length!==0&&(h=this._search(d),!(h<0||h>=this._array.length)&&this._getKey(this._array[h])===d))do S(this._array[h]);while(++h<this._array.length&&this._getKey(this._array[h])===d)}values(){return[...this._array].values()}_search(d){let S=0,u=this._array.length-1;for(;u>=S;){let p=S+u>>1;const b=this._getKey(this._array[p]);if(b>d)u=p-1;else{if(!(b<d)){for(;p>0&&this._getKey(this._array[p-1])===d;)p--;return p}S=p+1}}return S}}},7226:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DebouncedIdleTask=f.IdleTaskQueue=f.PriorityTaskQueue=void 0;const d=h(6114);class S{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let D=0,g=0,o=b.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(D=Date.now(),this._tasks[this._i]()||this._i++,D=Math.max(1,Date.now()-D),g=Math.max(D,g),c=b.timeRemaining(),1.5*g>c)return o-D<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-D))}ms`),void this._start();o=c}this.clear()}}class u extends S{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const D=Date.now()+b;return{timeRemaining:()=>Math.max(0,D-Date.now())}}}f.PriorityTaskQueue=u,f.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends S{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:u,f.DebouncedIdleTask=class{constructor(){this._queue=new f.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.updateWindowsModeWrappedState=void 0;const d=h(643);f.updateWindowsModeWrappedState=function(S){const u=S.buffer.lines.get(S.buffer.ybase+S.buffer.y-1),p=u?.get(S.cols-1),b=S.buffer.lines.get(S.buffer.ybase+S.buffer.y);b&&p&&(b.isWrapped=p[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&p[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ExtendedAttrs=f.AttributeData=void 0;class h{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new h;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}f.AttributeData=h;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,p=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}f.ExtendedAttrs=d},9092:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Buffer=f.MAX_BUFFER_SIZE=void 0;const d=h(6349),S=h(7226),u=h(3734),p=h(8437),b=h(4634),D=h(511),g=h(643),o=h(4863),c=h(7116);f.MAX_BUFFER_SIZE=4294967295,f.Buffer=class{constructor(a,l,_){this._hasScrollback=a,this._optionsService=l,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=D.CellData.fromCharData([0,g.NULL_CELL_CHAR,g.NULL_CELL_WIDTH,g.NULL_CELL_CODE]),this._whitespaceCell=D.CellData.fromCharData([0,g.WHITESPACE_CELL_CHAR,g.WHITESPACE_CELL_WIDTH,g.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new S.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(a){return a?(this._nullCell.fg=a.fg,this._nullCell.bg=a.bg,this._nullCell.extended=a.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(a){return a?(this._whitespaceCell.fg=a.fg,this._whitespaceCell.bg=a.bg,this._whitespaceCell.extended=a.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(a),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;const l=a+this._optionsService.rawOptions.scrollback;return l>f.MAX_BUFFER_SIZE?f.MAX_BUFFER_SIZE:l}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,l){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let C=0;const y=this._getCorrectBufferLength(l);if(y>this.lines.maxLength&&(this.lines.maxLength=y),this.lines.length>0){if(this._cols<a)for(let v=0;v<this.lines.length;v++)C+=+this.lines.get(v).resize(a,_);let E=0;if(this._rows<l)for(let v=this._rows;v<l;v++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(a,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+E+1?(this.ybase--,E++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(a,_)));else for(let v=this._rows;v>l;v--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(y<this.lines.maxLength){const v=this.lines.length-y;v>0&&(this.lines.trimStart(v),this.ybase=Math.max(this.ybase-v,0),this.ydisp=Math.max(this.ydisp-v,0),this.savedY=Math.max(this.savedY-v,0)),this.lines.maxLength=y}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,l-1),E&&(this.y+=E),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(a,l),this._cols>a))for(let E=0;E<this.lines.length;E++)C+=+this.lines.get(E).resize(a,_);this._cols=a,this._rows=l,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return a}get _isReflowEnabled(){const a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&a.backend==="conpty"&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,l){this._cols!==a&&(a>this._cols?this._reflowLarger(a,l):this._reflowSmaller(a,l))}_reflowLarger(a,l){const _=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const C=(0,b.reflowLargerCreateNewLayout)(this.lines,_);(0,b.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(a,l,C.countRemoved)}}_reflowLargerAdjustViewport(a,l,_){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let y=_;for(;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new p.BufferLine(a,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,l){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),C=[];let y=0;for(let E=this.lines.length-1;E>=0;E--){let v=this.lines.get(E);if(!v||!v.isWrapped&&v.getTrimmedLength()<=a)continue;const x=[v];for(;v.isWrapped&&E>0;)v=this.lines.get(--E),x.unshift(v);const N=this.ybase+this.y;if(N>=E&&N<E+x.length)continue;const H=x[x.length-1].getTrimmedLength(),q=(0,b.reflowSmallerGetNewLineLengths)(x,this._cols,a),O=q.length-x.length;let Z;Z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+O):Math.max(0,this.lines.length-this.lines.maxLength+O);const ne=[];for(let w=0;w<O;w++){const M=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);ne.push(M)}ne.length>0&&(C.push({start:E+x.length+y,newLines:ne}),y+=ne.length),x.push(...ne);let U=q.length-1,F=q[U];F===0&&(U--,F=q[U]);let Q=x.length-O-1,A=H;for(;Q>=0;){const w=Math.min(A,F);if(x[U]===void 0)break;if(x[U].copyCellsFrom(x[Q],A-w,F-w,w,!0),F-=w,F===0&&(U--,F=q[U]),A-=w,A===0){Q--;const M=Math.max(Q,0);A=(0,b.getWrappedLineTrimmedLength)(x,M,this._cols)}}for(let w=0;w<x.length;w++)q[w]<a&&x[w].setCell(q[w],_);let L=O-Z;for(;L-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+y)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+O,this.ybase+l-1)}if(C.length>0){const E=[],v=[];for(let U=0;U<this.lines.length;U++)v.push(this.lines.get(U));const x=this.lines.length;let N=x-1,H=0,q=C[H];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);let O=0;for(let U=Math.min(this.lines.maxLength-1,x+y-1);U>=0;U--)if(q&&q.start>N+O){for(let F=q.newLines.length-1;F>=0;F--)this.lines.set(U--,q.newLines[F]);U++,E.push({index:N+1,amount:q.newLines.length}),O+=q.newLines.length,q=C[++H]}else this.lines.set(U,v[N--]);let Z=0;for(let U=E.length-1;U>=0;U--)E[U].index+=Z,this.lines.onInsertEmitter.fire(E[U]),Z+=E[U].amount;const ne=Math.max(0,x+y-this.lines.maxLength);ne>0&&this.lines.onTrimEmitter.fire(ne)}}translateBufferLineToString(a,l,_=0,C){const y=this.lines.get(a);return y?y.translateToString(l,_,C):""}getWrappedRangeForLine(a){let l=a,_=a;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,last:_}}setupTabStops(a){for(a!=null?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(a==null&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(a==null&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===a&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose(),this.markers.splice(a--,1);this._isClearing=!1}addMarker(a){const l=new o.Marker(a);return this.markers.push(l),l.register(this.lines.onTrim((_=>{l.line-=_,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((_=>{l.line>=_.index&&(l.line+=_.amount)}))),l.register(this.lines.onDelete((_=>{l.line>=_.index&&l.line<_.index+_.amount&&l.dispose(),l.line>_.index&&(l.line-=_.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferLine=f.DEFAULT_ATTR_DATA=void 0;const d=h(3734),S=h(511),u=h(643),p=h(482);f.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let b=0;class D{constructor(o,c,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);const l=c||S.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let _=0;_<o;++_)this.setCell(_,l);this.length=o}get(o){const c=this._data[3*o+0],a=2097151&c;return[this._data[3*o+1],2097152&c?this._combined[o]:a?(0,p.stringFromCodePoint)(a):"",c>>22,2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):a]}set(o,c){this._data[3*o+1]=c[u.CHAR_DATA_ATTR_INDEX],c[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=c[1],this._data[3*o+0]=2097152|o|c[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=c[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(o){return this._data[3*o+0]>>22}hasWidth(o){return 12582912&this._data[3*o+0]}getFg(o){return this._data[3*o+1]}getBg(o){return this._data[3*o+2]}hasContent(o){return 4194303&this._data[3*o+0]}getCodePoint(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&c}isCombined(o){return 2097152&this._data[3*o+0]}getString(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o]:2097151&c?(0,p.stringFromCodePoint)(2097151&c):""}isProtected(o){return 536870912&this._data[3*o+2]}loadCell(o,c){return b=3*o,c.content=this._data[b+0],c.fg=this._data[b+1],c.bg=this._data[b+2],2097152&c.content&&(c.combinedData=this._combined[o]),268435456&c.bg&&(c.extended=this._extendedAttrs[o]),c}setCell(o,c){2097152&c.content&&(this._combined[o]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[o]=c.extended),this._data[3*o+0]=c.content,this._data[3*o+1]=c.fg,this._data[3*o+2]=c.bg}setCellFromCodepoint(o,c,a,l){268435456&l.bg&&(this._extendedAttrs[o]=l.extended),this._data[3*o+0]=c|a<<22,this._data[3*o+1]=l.fg,this._data[3*o+2]=l.bg}addCodepointToCell(o,c,a){let l=this._data[3*o+0];2097152&l?this._combined[o]+=(0,p.stringFromCodePoint)(c):2097151&l?(this._combined[o]=(0,p.stringFromCodePoint)(2097151&l)+(0,p.stringFromCodePoint)(c),l&=-2097152,l|=2097152):l=c|4194304,a&&(l&=-12582913,l|=a<<22),this._data[3*o+0]=l}insertCells(o,c,a){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length-o){const l=new S.CellData;for(let _=this.length-o-c-1;_>=0;--_)this.setCell(o+c+_,this.loadCell(o+_,l));for(let _=0;_<c;++_)this.setCell(o+_,a)}else for(let l=o;l<this.length;++l)this.setCell(l,a);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,a)}deleteCells(o,c,a){if(o%=this.length,c<this.length-o){const l=new S.CellData;for(let _=0;_<this.length-o-c;++_)this.setCell(o+_,this.loadCell(o+c+_,l));for(let _=this.length-c;_<this.length;++_)this.setCell(_,a)}else for(let l=o;l<this.length;++l)this.setCell(l,a);o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodepoint(o,0,1,a)}replaceCells(o,c,a,l=!1){if(l)for(o&&this.getWidth(o-1)===2&&!this.isProtected(o-1)&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,a);o<c&&o<this.length;)this.isProtected(o)||this.setCell(o,a),o++;else for(o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,a);o<c&&o<this.length;)this.setCell(o++,a)}resize(o,c){if(o===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*o;if(o>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const l=new Uint32Array(a);l.set(this._data),this._data=l}for(let l=this.length;l<o;++l)this.setCell(l,c)}else{this._data=this._data.subarray(0,a);const l=Object.keys(this._combined);for(let C=0;C<l.length;C++){const y=parseInt(l[C],10);y>=o&&delete this._combined[y]}const _=Object.keys(this._extendedAttrs);for(let C=0;C<_.length;C++){const y=parseInt(_[C],10);y>=o&&delete this._extendedAttrs[y]}}return this.length=o,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const o=new Uint32Array(this._data.length);return o.set(this._data),this._data=o,1}return 0}fill(o,c=!1){if(c)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,o);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,o)}}copyFrom(o){this.length!==o.length?this._data=new Uint32Array(o._data):this._data.set(o._data),this.length=o.length,this._combined={};for(const c in o._combined)this._combined[c]=o._combined[c];this._extendedAttrs={};for(const c in o._extendedAttrs)this._extendedAttrs[c]=o._extendedAttrs[c];this.isWrapped=o.isWrapped}clone(){const o=new D(0);o._data=new Uint32Array(this._data),o.length=this.length;for(const c in this._combined)o._combined[c]=this._combined[c];for(const c in this._extendedAttrs)o._extendedAttrs[c]=this._extendedAttrs[c];return o.isWrapped=this.isWrapped,o}getTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0])return o+(this._data[3*o+0]>>22);return 0}getNoBgTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0]||50331648&this._data[3*o+2])return o+(this._data[3*o+0]>>22);return 0}copyCellsFrom(o,c,a,l,_){const C=o._data;if(_)for(let E=l-1;E>=0;E--){for(let v=0;v<3;v++)this._data[3*(a+E)+v]=C[3*(c+E)+v];268435456&C[3*(c+E)+2]&&(this._extendedAttrs[a+E]=o._extendedAttrs[c+E])}else for(let E=0;E<l;E++){for(let v=0;v<3;v++)this._data[3*(a+E)+v]=C[3*(c+E)+v];268435456&C[3*(c+E)+2]&&(this._extendedAttrs[a+E]=o._extendedAttrs[c+E])}const y=Object.keys(o._combined);for(let E=0;E<y.length;E++){const v=parseInt(y[E],10);v>=c&&(this._combined[v-c+a]=o._combined[v])}}translateToString(o,c,a,l){c=c??0,a=a??this.length,o&&(a=Math.min(a,this.getTrimmedLength())),l&&(l.length=0);let _="";for(;c<a;){const C=this._data[3*c+0],y=2097151&C,E=2097152&C?this._combined[c]:y?(0,p.stringFromCodePoint)(y):u.WHITESPACE_CELL_CHAR;if(_+=E,l)for(let v=0;v<E.length;++v)l.push(c);c+=C>>22||1}return l&&l.push(c),_}}f.BufferLine=D},4841:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.getRangeLength=void 0,f.getRangeLength=function(h,d){if(h.start.y>h.end.y)throw new Error(`Buffer range end (${h.end.x}, ${h.end.y}) cannot be before start (${h.start.x}, ${h.start.y})`);return d*(h.end.y-h.start.y)+(h.end.x-h.start.x+1)}},4634:(J,f)=>{function h(d,S,u){if(S===d.length-1)return d[S].getTrimmedLength();const p=!d[S].hasContent(u-1)&&d[S].getWidth(u-1)===1,b=d[S+1].getWidth(0)===2;return p&&b?u-1:u}Object.defineProperty(f,"__esModule",{value:!0}),f.getWrappedLineTrimmedLength=f.reflowSmallerGetNewLineLengths=f.reflowLargerApplyNewLayout=f.reflowLargerCreateNewLayout=f.reflowLargerGetLinesToRemove=void 0,f.reflowLargerGetLinesToRemove=function(d,S,u,p,b){const D=[];for(let g=0;g<d.length-1;g++){let o=g,c=d.get(++o);if(!c.isWrapped)continue;const a=[d.get(g)];for(;o<d.length&&c.isWrapped;)a.push(c),c=d.get(++o);if(p>=g&&p<o){g+=a.length-1;continue}let l=0,_=h(a,l,S),C=1,y=0;for(;C<a.length;){const v=h(a,C,S),x=v-y,N=u-_,H=Math.min(x,N);a[l].copyCellsFrom(a[C],y,_,H,!1),_+=H,_===u&&(l++,_=0),y+=H,y===v&&(C++,y=0),_===0&&l!==0&&a[l-1].getWidth(u-1)===2&&(a[l].copyCellsFrom(a[l-1],u-1,_++,1,!1),a[l-1].setCell(u-1,b))}a[l].replaceCells(_,u,b);let E=0;for(let v=a.length-1;v>0&&(v>l||a[v].getTrimmedLength()===0);v--)E++;E>0&&(D.push(g+a.length-E),D.push(E)),g+=a.length-1}return D},f.reflowLargerCreateNewLayout=function(d,S){const u=[];let p=0,b=S[p],D=0;for(let g=0;g<d.length;g++)if(b===g){const o=S[++p];d.onDeleteEmitter.fire({index:g-D,amount:o}),g+=o-1,D+=o,b=S[++p]}else u.push(g);return{layout:u,countRemoved:D}},f.reflowLargerApplyNewLayout=function(d,S){const u=[];for(let p=0;p<S.length;p++)u.push(d.get(S[p]));for(let p=0;p<u.length;p++)d.set(p,u[p]);d.length=S.length},f.reflowSmallerGetNewLineLengths=function(d,S,u){const p=[],b=d.map(((c,a)=>h(d,a,S))).reduce(((c,a)=>c+a));let D=0,g=0,o=0;for(;o<b;){if(b-o<u){p.push(b-o);break}D+=u;const c=h(d,g,S);D>c&&(D-=c,g++);const a=d[g].getWidth(D-1)===2;a&&D--;const l=a?u-1:u;p.push(l),o+=l}return p},f.getWrappedLineTrimmedLength=h},5295:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferSet=void 0;const d=h(8460),S=h(844),u=h(9092);class p extends S.Disposable{constructor(D,g){super(),this._optionsService=D,this._bufferService=g,this._onBufferActivate=this.register(new d.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(D){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(D),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(D,g){this._normal.resize(D,g),this._alt.resize(D,g),this.setupTabStops(D)}setupTabStops(D){this._normal.setupTabStops(D),this._alt.setupTabStops(D)}}f.BufferSet=p},511:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CellData=void 0;const d=h(482),S=h(643),u=h(3734);class p extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(D){const g=new p;return g.setFromCharData(D),g}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,d.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(D){this.fg=D[S.CHAR_DATA_ATTR_INDEX],this.bg=0;let g=!1;if(D[S.CHAR_DATA_CHAR_INDEX].length>2)g=!0;else if(D[S.CHAR_DATA_CHAR_INDEX].length===2){const o=D[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const c=D[S.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(o-55296)+c-56320+65536|D[S.CHAR_DATA_WIDTH_INDEX]<<22:g=!0}else g=!0}else this.content=D[S.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|D[S.CHAR_DATA_WIDTH_INDEX]<<22;g&&(this.combinedData=D[S.CHAR_DATA_CHAR_INDEX],this.content=2097152|D[S.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}f.CellData=p},643:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.WHITESPACE_CELL_CODE=f.WHITESPACE_CELL_WIDTH=f.WHITESPACE_CELL_CHAR=f.NULL_CELL_CODE=f.NULL_CELL_WIDTH=f.NULL_CELL_CHAR=f.CHAR_DATA_CODE_INDEX=f.CHAR_DATA_WIDTH_INDEX=f.CHAR_DATA_CHAR_INDEX=f.CHAR_DATA_ATTR_INDEX=f.DEFAULT_EXT=f.DEFAULT_ATTR=f.DEFAULT_COLOR=void 0,f.DEFAULT_COLOR=0,f.DEFAULT_ATTR=256|f.DEFAULT_COLOR<<9,f.DEFAULT_EXT=0,f.CHAR_DATA_ATTR_INDEX=0,f.CHAR_DATA_CHAR_INDEX=1,f.CHAR_DATA_WIDTH_INDEX=2,f.CHAR_DATA_CODE_INDEX=3,f.NULL_CELL_CHAR="",f.NULL_CELL_WIDTH=1,f.NULL_CELL_CODE=0,f.WHITESPACE_CELL_CHAR=" ",f.WHITESPACE_CELL_WIDTH=1,f.WHITESPACE_CELL_CODE=32},4863:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Marker=void 0;const d=h(8460),S=h(844);class u{get id(){return this._id}constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new d.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,S.disposeArray)(this._disposables),this._disposables.length=0)}register(b){return this._disposables.push(b),b}}f.Marker=u,u._nextId=1},7116:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DEFAULT_CHARSET=f.CHARSETS=void 0,f.CHARSETS={},f.DEFAULT_CHARSET=f.CHARSETS.B,f.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},f.CHARSETS.A={"#":"£"},f.CHARSETS.B=void 0,f.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},f.CHARSETS.C=f.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},f.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},f.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},f.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},f.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},f.CHARSETS.E=f.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},f.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},f.CHARSETS.H=f.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},f.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(J,f)=>{var h,d,S;Object.defineProperty(f,"__esModule",{value:!0}),f.C1_ESCAPED=f.C1=f.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
16
|
-
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""})(h||(f.C0=h={})),(function(u){u.PAD="",u.HOP="",u.BPH="",u.NBH="",u.IND="",u.NEL="
",u.SSA="",u.ESA="",u.HTS="",u.HTJ="",u.VTS="",u.PLD="",u.PLU="",u.RI="",u.SS2="",u.SS3="",u.DCS="",u.PU1="",u.PU2="",u.STS="",u.CCH="",u.MW="",u.SPA="",u.EPA="",u.SOS="",u.SGCI="",u.SCI="",u.CSI="",u.ST="",u.OSC="",u.PM="",u.APC=""})(d||(f.C1=d={})),(function(u){u.ST=`${h.ESC}\\`})(S||(f.C1_ESCAPED=S={}))},7399:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.evaluateKeyboardEvent=void 0;const d=h(2584),S={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};f.evaluateKeyboardEvent=function(u,p,b,D){const g={type:0,cancel:!1,key:void 0},o=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?g.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?g.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?g.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(g.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:g.key=u.ctrlKey?"\b":d.C0.DEL,u.altKey&&(g.key=d.C0.ESC+g.key);break;case 9:if(u.shiftKey){g.key=d.C0.ESC+"[Z";break}g.key=d.C0.HT,g.cancel=!0;break;case 13:g.key=u.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,g.cancel=!0;break;case 27:g.key=d.C0.ESC,u.altKey&&(g.key=d.C0.ESC+d.C0.ESC),g.cancel=!0;break;case 37:if(u.metaKey)break;o?(g.key=d.C0.ESC+"[1;"+(o+1)+"D",g.key===d.C0.ESC+"[1;3D"&&(g.key=d.C0.ESC+(b?"b":"[1;5D"))):g.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(u.metaKey)break;o?(g.key=d.C0.ESC+"[1;"+(o+1)+"C",g.key===d.C0.ESC+"[1;3C"&&(g.key=d.C0.ESC+(b?"f":"[1;5C"))):g.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(u.metaKey)break;o?(g.key=d.C0.ESC+"[1;"+(o+1)+"A",b||g.key!==d.C0.ESC+"[1;3A"||(g.key=d.C0.ESC+"[1;5A")):g.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(u.metaKey)break;o?(g.key=d.C0.ESC+"[1;"+(o+1)+"B",b||g.key!==d.C0.ESC+"[1;3B"||(g.key=d.C0.ESC+"[1;5B")):g.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(g.key=d.C0.ESC+"[2~");break;case 46:g.key=o?d.C0.ESC+"[3;"+(o+1)+"~":d.C0.ESC+"[3~";break;case 36:g.key=o?d.C0.ESC+"[1;"+(o+1)+"H":p?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:g.key=o?d.C0.ESC+"[1;"+(o+1)+"F":p?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:u.shiftKey?g.type=2:u.ctrlKey?g.key=d.C0.ESC+"[5;"+(o+1)+"~":g.key=d.C0.ESC+"[5~";break;case 34:u.shiftKey?g.type=3:u.ctrlKey?g.key=d.C0.ESC+"[6;"+(o+1)+"~":g.key=d.C0.ESC+"[6~";break;case 112:g.key=o?d.C0.ESC+"[1;"+(o+1)+"P":d.C0.ESC+"OP";break;case 113:g.key=o?d.C0.ESC+"[1;"+(o+1)+"Q":d.C0.ESC+"OQ";break;case 114:g.key=o?d.C0.ESC+"[1;"+(o+1)+"R":d.C0.ESC+"OR";break;case 115:g.key=o?d.C0.ESC+"[1;"+(o+1)+"S":d.C0.ESC+"OS";break;case 116:g.key=o?d.C0.ESC+"[15;"+(o+1)+"~":d.C0.ESC+"[15~";break;case 117:g.key=o?d.C0.ESC+"[17;"+(o+1)+"~":d.C0.ESC+"[17~";break;case 118:g.key=o?d.C0.ESC+"[18;"+(o+1)+"~":d.C0.ESC+"[18~";break;case 119:g.key=o?d.C0.ESC+"[19;"+(o+1)+"~":d.C0.ESC+"[19~";break;case 120:g.key=o?d.C0.ESC+"[20;"+(o+1)+"~":d.C0.ESC+"[20~";break;case 121:g.key=o?d.C0.ESC+"[21;"+(o+1)+"~":d.C0.ESC+"[21~";break;case 122:g.key=o?d.C0.ESC+"[23;"+(o+1)+"~":d.C0.ESC+"[23~";break;case 123:g.key=o?d.C0.ESC+"[24;"+(o+1)+"~":d.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(b&&!D||!u.altKey||u.metaKey)!b||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?g.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(g.key=d.C0.US),u.key==="@"&&(g.key=d.C0.NUL)):u.keyCode===65&&(g.type=1);else{const c=S[u.keyCode],a=c?.[u.shiftKey?1:0];if(a)g.key=d.C0.ESC+a;else if(u.keyCode>=65&&u.keyCode<=90){const l=u.ctrlKey?u.keyCode-64:u.keyCode+32;let _=String.fromCharCode(l);u.shiftKey&&(_=_.toUpperCase()),g.key=d.C0.ESC+_}else if(u.keyCode===32)g.key=d.C0.ESC+(u.ctrlKey?d.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let l=u.code.slice(3,4);u.shiftKey||(l=l.toLowerCase()),g.key=d.C0.ESC+l,g.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?g.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?g.key=d.C0.NUL:u.keyCode>=51&&u.keyCode<=55?g.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?g.key=d.C0.DEL:u.keyCode===219?g.key=d.C0.ESC:u.keyCode===220?g.key=d.C0.FS:u.keyCode===221&&(g.key=d.C0.GS)}return g}},482:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Utf8ToUtf32=f.StringToUtf32=f.utf32ToString=f.stringFromCodePoint=void 0,f.stringFromCodePoint=function(h){return h>65535?(h-=65536,String.fromCharCode(55296+(h>>10))+String.fromCharCode(h%1024+56320)):String.fromCharCode(h)},f.utf32ToString=function(h,d=0,S=h.length){let u="";for(let p=d;p<S;++p){let b=h[p];b>65535?(b-=65536,u+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):u+=String.fromCharCode(b)}return u},f.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(h,d){const S=h.length;if(!S)return 0;let u=0,p=0;if(this._interim){const b=h.charCodeAt(p++);56320<=b&&b<=57343?d[u++]=1024*(this._interim-55296)+b-56320+65536:(d[u++]=this._interim,d[u++]=b),this._interim=0}for(let b=p;b<S;++b){const D=h.charCodeAt(b);if(55296<=D&&D<=56319){if(++b>=S)return this._interim=D,u;const g=h.charCodeAt(b);56320<=g&&g<=57343?d[u++]=1024*(D-55296)+g-56320+65536:(d[u++]=D,d[u++]=g)}else D!==65279&&(d[u++]=D)}return u}},f.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(h,d){const S=h.length;if(!S)return 0;let u,p,b,D,g=0,o=0,c=0;if(this.interim[0]){let _=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let y,E=0;for(;(y=63&this.interim[++E])&&E<4;)C<<=6,C|=y;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=v-E;for(;c<x;){if(c>=S)return 0;if(y=h[c++],(192&y)!=128){c--,_=!0;break}this.interim[E++]=y,C<<=6,C|=63&y}_||(v===2?C<128?c--:d[g++]=C:v===3?C<2048||C>=55296&&C<=57343||C===65279||(d[g++]=C):C<65536||C>1114111||(d[g++]=C)),this.interim.fill(0)}const a=S-4;let l=c;for(;l<S;){for(;!(!(l<a)||128&(u=h[l])||128&(p=h[l+1])||128&(b=h[l+2])||128&(D=h[l+3]));)d[g++]=u,d[g++]=p,d[g++]=b,d[g++]=D,l+=4;if(u=h[l++],u<128)d[g++]=u;else if((224&u)==192){if(l>=S)return this.interim[0]=u,g;if(p=h[l++],(192&p)!=128){l--;continue}if(o=(31&u)<<6|63&p,o<128){l--;continue}d[g++]=o}else if((240&u)==224){if(l>=S)return this.interim[0]=u,g;if(p=h[l++],(192&p)!=128){l--;continue}if(l>=S)return this.interim[0]=u,this.interim[1]=p,g;if(b=h[l++],(192&b)!=128){l--;continue}if(o=(15&u)<<12|(63&p)<<6|63&b,o<2048||o>=55296&&o<=57343||o===65279)continue;d[g++]=o}else if((248&u)==240){if(l>=S)return this.interim[0]=u,g;if(p=h[l++],(192&p)!=128){l--;continue}if(l>=S)return this.interim[0]=u,this.interim[1]=p,g;if(b=h[l++],(192&b)!=128){l--;continue}if(l>=S)return this.interim[0]=u,this.interim[1]=p,this.interim[2]=b,g;if(D=h[l++],(192&D)!=128){l--;continue}if(o=(7&u)<<18|(63&p)<<12|(63&b)<<6|63&D,o<65536||o>1114111)continue;d[g++]=o}}return g}}},225:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeV6=void 0;const d=h(1480),S=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;f.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let b=0;b<S.length;++b)p.fill(0,S[b][0],S[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?p[b]:(function(D,g){let o,c=0,a=g.length-1;if(D<g[0][0]||D>g[a][1])return!1;for(;a>=c;)if(o=c+a>>1,D>g[o][1])c=o+1;else{if(!(D<g[o][0]))return!0;a=o-1}return!1})(b,u)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,D){let g=this.wcwidth(b),o=g===0&&D!==0;if(o){const c=d.UnicodeService.extractWidth(D);c===0?o=!1:c>g&&(g=c)}return d.UnicodeService.createPropertyValue(0,g,o)}}},5981:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.WriteBuffer=void 0;const d=h(8460),S=h(844);class u extends S.Disposable{constructor(b){super(),this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new d.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(b,D){if(D!==void 0&&this._syncCalls>D)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let g;for(this._isSyncWriting=!0;g=this._writeBuffer.shift();){this._action(g);const o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(b,D){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(D),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(D)}_innerWrite(b=0,D=!0){const g=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const o=this._writeBuffer[this._bufferOffset],c=this._action(o,D);if(c){const l=_=>Date.now()-g>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(g,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(l)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-g>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}f.WriteBuffer=u},5941:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.toRgbString=f.parseColor=void 0;const h=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,d=/^[\da-f]+$/;function S(u,p){const b=u.toString(16),D=b.length<2?"0"+b:b;switch(p){case 4:return b[0];case 8:return D;case 12:return(D+D).slice(0,3);default:return D+D}}f.parseColor=function(u){if(!u)return;let p=u.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const b=h.exec(p);if(b){const D=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/D*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/D*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/D*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),d.exec(p)&&[3,6,9,12].includes(p.length))){const b=p.length/3,D=[0,0,0];for(let g=0;g<3;++g){const o=parseInt(p.slice(b*g,b*g+b),16);D[g]=b===1?o<<4:b===2?o:b===3?o>>4:o>>8}return D}},f.toRgbString=function(u,p=16){const[b,D,g]=u;return`rgb:${S(b,p)}/${S(D,p)}/${S(g,p)}`}},5770:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.PAYLOAD_LIMIT=void 0,f.PAYLOAD_LIMIT=1e7},6351:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DcsHandler=f.DcsParser=void 0;const d=h(482),S=h(8742),u=h(5770),p=[];f.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(D,g){this._handlers[D]===void 0&&(this._handlers[D]=[]);const o=this._handlers[D];return o.push(g),{dispose:()=>{const c=o.indexOf(g);c!==-1&&o.splice(c,1)}}}clearHandler(D){this._handlers[D]&&delete this._handlers[D]}setHandlerFallback(D){this._handlerFb=D}reset(){if(this._active.length)for(let D=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;D>=0;--D)this._active[D].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(D,g){if(this.reset(),this._ident=D,this._active=this._handlers[D]||p,this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].hook(g);else this._handlerFb(this._ident,"HOOK",g)}put(D,g,o){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(D,g,o);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(D,g,o))}unhook(D,g=!0){if(this._active.length){let o=!1,c=this._active.length-1,a=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,o=g,a=this._stack.fallThrough,this._stack.paused=!1),!a&&o===!1){for(;c>=0&&(o=this._active[c].unhook(D),o!==!0);c--)if(o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,o;c--}for(;c>=0;c--)if(o=this._active[c].unhook(!1),o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,o}else this._handlerFb(this._ident,"UNHOOK",D);this._active=p,this._ident=0}};const b=new S.Params;b.addParam(0),f.DcsHandler=class{constructor(D){this._handler=D,this._data="",this._params=b,this._hitLimit=!1}hook(D){this._params=D.length>1||D.params[0]?D.clone():b,this._data="",this._hitLimit=!1}put(D,g,o){this._hitLimit||(this._data+=(0,d.utf32ToString)(D,g,o),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(D){let g=!1;if(this._hitLimit)g=!1;else if(D&&(g=this._handler(this._data,this._params),g instanceof Promise))return g.then((o=>(this._params=b,this._data="",this._hitLimit=!1,o)));return this._params=b,this._data="",this._hitLimit=!1,g}}},2015:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.EscapeSequenceParser=f.VT500_TRANSITION_TABLE=f.TransitionTable=void 0;const d=h(844),S=h(8742),u=h(6242),p=h(6351);class b{constructor(c){this.table=new Uint8Array(c)}setDefault(c,a){this.table.fill(c<<4|a)}add(c,a,l,_){this.table[a<<8|c]=l<<4|_}addMany(c,a,l,_){for(let C=0;C<c.length;C++)this.table[a<<8|c[C]]=l<<4|_}}f.TransitionTable=b;const D=160;f.VT500_TRANSITION_TABLE=(function(){const o=new b(4095),c=Array.apply(null,Array(256)).map(((E,v)=>v)),a=(E,v)=>c.slice(E,v),l=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const C=a(0,14);let y;for(y in o.setDefault(1,0),o.addMany(l,0,2,0),C)o.addMany([24,26,153,154],y,3,0),o.addMany(a(128,144),y,3,0),o.addMany(a(144,152),y,3,0),o.add(156,y,0,0),o.add(27,y,11,1),o.add(157,y,4,8),o.addMany([152,158,159],y,0,7),o.add(155,y,11,3),o.add(144,y,11,9);return o.addMany(_,0,3,0),o.addMany(_,1,3,1),o.add(127,1,0,1),o.addMany(_,8,0,8),o.addMany(_,3,3,3),o.add(127,3,0,3),o.addMany(_,4,3,4),o.add(127,4,0,4),o.addMany(_,6,3,6),o.addMany(_,5,3,5),o.add(127,5,0,5),o.addMany(_,2,3,2),o.add(127,2,0,2),o.add(93,1,4,8),o.addMany(l,8,5,8),o.add(127,8,5,8),o.addMany([156,27,24,26,7],8,6,0),o.addMany(a(28,32),8,0,8),o.addMany([88,94,95],1,0,7),o.addMany(l,7,0,7),o.addMany(_,7,0,7),o.add(156,7,0,0),o.add(127,7,0,7),o.add(91,1,11,3),o.addMany(a(64,127),3,7,0),o.addMany(a(48,60),3,8,4),o.addMany([60,61,62,63],3,9,4),o.addMany(a(48,60),4,8,4),o.addMany(a(64,127),4,7,0),o.addMany([60,61,62,63],4,0,6),o.addMany(a(32,64),6,0,6),o.add(127,6,0,6),o.addMany(a(64,127),6,0,0),o.addMany(a(32,48),3,9,5),o.addMany(a(32,48),5,9,5),o.addMany(a(48,64),5,0,6),o.addMany(a(64,127),5,7,0),o.addMany(a(32,48),4,9,5),o.addMany(a(32,48),1,9,2),o.addMany(a(32,48),2,9,2),o.addMany(a(48,127),2,10,0),o.addMany(a(48,80),1,10,0),o.addMany(a(81,88),1,10,0),o.addMany([89,90,92],1,10,0),o.addMany(a(96,127),1,10,0),o.add(80,1,11,9),o.addMany(_,9,0,9),o.add(127,9,0,9),o.addMany(a(28,32),9,0,9),o.addMany(a(32,48),9,9,12),o.addMany(a(48,60),9,8,10),o.addMany([60,61,62,63],9,9,10),o.addMany(_,11,0,11),o.addMany(a(32,128),11,0,11),o.addMany(a(28,32),11,0,11),o.addMany(_,10,0,10),o.add(127,10,0,10),o.addMany(a(28,32),10,0,10),o.addMany(a(48,60),10,8,10),o.addMany([60,61,62,63],10,0,11),o.addMany(a(32,48),10,9,12),o.addMany(_,12,0,12),o.add(127,12,0,12),o.addMany(a(28,32),12,0,12),o.addMany(a(32,48),12,9,12),o.addMany(a(48,64),12,0,11),o.addMany(a(64,127),12,12,13),o.addMany(a(64,127),10,12,13),o.addMany(a(64,127),9,12,13),o.addMany(_,13,13,13),o.addMany(l,13,13,13),o.add(127,13,0,13),o.addMany([27,156,24,26],13,14,0),o.add(D,0,2,0),o.add(D,8,5,8),o.add(D,6,0,6),o.add(D,11,0,11),o.add(D,13,13,13),o})();class g extends d.Disposable{constructor(c=f.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new S.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(a,l,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,l)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,a=[64,126]){let l=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=c.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<c.intermediates.length;++C){const y=c.intermediates.charCodeAt(C);if(32>y||y>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=y}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(a[0]>_||_>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return l<<=8,l|=_,l}identToString(c){const a=[];for(;c;)a.push(String.fromCharCode(255&c)),c>>=8;return a.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,a){const l=this._identifier(c,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(a),{dispose:()=>{const C=_.indexOf(a);C!==-1&&_.splice(C,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,a){this._executeHandlers[c.charCodeAt(0)]=a}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,a){const l=this._identifier(c);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(a),{dispose:()=>{const C=_.indexOf(a);C!==-1&&_.splice(C,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,a){return this._dcsParser.registerHandler(this._identifier(c),a)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,a){return this._oscParser.registerHandler(c,a)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(c,a,l,_,C){this._parseStack.state=c,this._parseStack.handlers=a,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=C}parse(c,a,l){let _,C=0,y=0,E=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,E=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const v=this._parseStack.handlers;let x=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&x>-1){for(;x>=0&&(_=v[x](this._params),_!==!0);x--)if(_ instanceof Promise)return this._parseStack.handlerPos=x,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&x>-1){for(;x>=0&&(_=v[x](),_!==!0);x--)if(_ instanceof Promise)return this._parseStack.handlerPos=x,_}this._parseStack.handlers=[];break;case 6:if(C=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(C!==24&&C!==26,l),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=c[this._parseStack.chunkPos],_=this._oscParser.end(C!==24&&C!==26,l),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,E=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let v=E;v<a;++v){switch(C=c[v],y=this._transitions.table[this.currentState<<8|(C<160?C:D)],y>>4){case 2:for(let O=v+1;;++O){if(O>=a||(C=c[O])<32||C>126&&C<D){this._printHandler(c,v,O),v=O-1;break}if(++O>=a||(C=c[O])<32||C>126&&C<D){this._printHandler(c,v,O),v=O-1;break}if(++O>=a||(C=c[O])<32||C>126&&C<D){this._printHandler(c,v,O),v=O-1;break}if(++O>=a||(C=c[O])<32||C>126&&C<D){this._printHandler(c,v,O),v=O-1;break}}break;case 3:this._executeHandlers[C]?this._executeHandlers[C]():this._executeHandlerFb(C),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const x=this._csiHandlers[this._collect<<8|C];let N=x?x.length-1:-1;for(;N>=0&&(_=x[N](this._params),_!==!0);N--)if(_ instanceof Promise)return this._preserveStack(3,x,N,y,v),_;N<0&&this._csiHandlerFb(this._collect<<8|C,this._params),this.precedingJoinState=0;break;case 8:do switch(C){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(C-48)}while(++v<a&&(C=c[v])>47&&C<60);v--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const H=this._escHandlers[this._collect<<8|C];let q=H?H.length-1:-1;for(;q>=0&&(_=H[q](),_!==!0);q--)if(_ instanceof Promise)return this._preserveStack(4,H,q,y,v),_;q<0&&this._escHandlerFb(this._collect<<8|C),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|C,this._params);break;case 13:for(let O=v+1;;++O)if(O>=a||(C=c[O])===24||C===26||C===27||C>127&&C<D){this._dcsParser.put(c,v,O),v=O-1;break}break;case 14:if(_=this._dcsParser.unhook(C!==24&&C!==26),_)return this._preserveStack(6,[],0,y,v),_;C===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let O=v+1;;O++)if(O>=a||(C=c[O])<32||C>127&&C<D){this._oscParser.put(c,v,O),v=O-1;break}break;case 6:if(_=this._oscParser.end(C!==24&&C!==26),_)return this._preserveStack(5,[],0,y,v),_;C===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&y}}}f.EscapeSequenceParser=g},6242:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.OscHandler=f.OscParser=void 0;const d=h(5770),S=h(482),u=[];f.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,b){this._handlers[p]===void 0&&(this._handlers[p]=[]);const D=this._handlers[p];return D.push(b),{dispose:()=>{const g=D.indexOf(b);g!==-1&&D.splice(g,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,b,D){if(this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].put(p,b,D);else this._handlerFb(this._id,"PUT",(0,S.utf32ToString)(p,b,D))}start(){this.reset(),this._state=1}put(p,b,D){if(this._state!==3){if(this._state===1)for(;b<D;){const g=p[b++];if(g===59){this._state=2,this._start();break}if(g<48||57<g)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+g-48}this._state===2&&D-b>0&&this._put(p,b,D)}}end(p,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let D=!1,g=this._active.length-1,o=!1;if(this._stack.paused&&(g=this._stack.loopPosition-1,D=b,o=this._stack.fallThrough,this._stack.paused=!1),!o&&D===!1){for(;g>=0&&(D=this._active[g].end(p),D!==!0);g--)if(D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!1,D;g--}for(;g>=0;g--)if(D=this._active[g].end(!1),D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=g,this._stack.fallThrough=!0,D}else this._handlerFb(this._id,"END",p);this._active=u,this._id=-1,this._state=0}}},f.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,b,D){this._hitLimit||(this._data+=(0,S.utf32ToString)(p,b,D),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let b=!1;if(this._hitLimit)b=!1;else if(p&&(b=this._handler(this._data),b instanceof Promise))return b.then((D=>(this._data="",this._hitLimit=!1,D)));return this._data="",this._hitLimit=!1,b}}},8742:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.Params=void 0;const h=2147483647;class d{static fromArray(u){const p=new d;if(!u.length)return p;for(let b=Array.isArray(u[0])?1:0;b<u.length;++b){const D=u[b];if(Array.isArray(D))for(let g=0;g<D.length;++g)p.addSubParam(D[g]);else p.addParam(D)}return p}constructor(u=32,p=32){if(this.maxLength=u,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new d(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let p=0;p<this.length;++p){u.push(this.params[p]);const b=this._subParamsIdx[p]>>8,D=255&this._subParamsIdx[p];D-b>0&&u.push(Array.prototype.slice.call(this._subParams,b,D))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>h?h:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>h?h:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const p=this._subParamsIdx[u]>>8,b=255&this._subParamsIdx[u];return b-p>0?this._subParams.subarray(p,b):null}getSubParamsAll(){const u={};for(let p=0;p<this.length;++p){const b=this._subParamsIdx[p]>>8,D=255&this._subParamsIdx[p];D-b>0&&(u[p]=this._subParams.slice(b,D))}return u}addDigit(u){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,D=b[p-1];b[p-1]=~D?Math.min(10*D+u,h):u}}f.Params=d},5741:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.AddonManager=void 0,f.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let h=this._addons.length-1;h>=0;h--)this._addons[h].instance.dispose()}loadAddon(h,d){const S={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(S),d.dispose=()=>this._wrappedAddonDispose(S),d.activate(h)}_wrappedAddonDispose(h){if(h.isDisposed)return;let d=-1;for(let S=0;S<this._addons.length;S++)if(this._addons[S]===h){d=S;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");h.isDisposed=!0,h.dispose.apply(h.instance),this._addons.splice(d,1)}}},8771:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferApiView=void 0;const d=h(3785),S=h(511);f.BufferApiView=class{constructor(u,p){this._buffer=u,this.type=p}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){const p=this._buffer.lines.get(u);if(p)return new d.BufferLineApiView(p)}getNullCell(){return new S.CellData}}},3785:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferLineApiView=void 0;const d=h(511);f.BufferLineApiView=class{constructor(S){this._line=S}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(S,u){if(!(S<0||S>=this._line.length))return u?(this._line.loadCell(S,u),u):this._line.loadCell(S,new d.CellData)}translateToString(S,u,p){return this._line.translateToString(S,u,p)}}},8285:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.BufferNamespaceApi=void 0;const d=h(8771),S=h(8460),u=h(844);class p extends u.Disposable{constructor(D){super(),this._core=D,this._onBufferChange=this.register(new S.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new d.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new d.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}f.BufferNamespaceApi=p},7975:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.ParserApi=void 0,f.ParserApi=class{constructor(h){this._core=h}registerCsiHandler(h,d){return this._core.registerCsiHandler(h,(S=>d(S.toArray())))}addCsiHandler(h,d){return this.registerCsiHandler(h,d)}registerDcsHandler(h,d){return this._core.registerDcsHandler(h,((S,u)=>d(S,u.toArray())))}addDcsHandler(h,d){return this.registerDcsHandler(h,d)}registerEscHandler(h,d){return this._core.registerEscHandler(h,d)}addEscHandler(h,d){return this.registerEscHandler(h,d)}registerOscHandler(h,d){return this._core.registerOscHandler(h,d)}addOscHandler(h,d){return this.registerOscHandler(h,d)}}},7090:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeApi=void 0,f.UnicodeApi=class{constructor(h){this._core=h}register(h){this._core.unicodeService.register(h)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(h){this._core.unicodeService.activeVersion=h}}},744:function(J,f,h){var d=this&&this.__decorate||function(o,c,a,l){var _,C=arguments.length,y=C<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,c,a,l);else for(var E=o.length-1;E>=0;E--)(_=o[E])&&(y=(C<3?_(y):C>3?_(c,a,y):_(c,a))||y);return C>3&&y&&Object.defineProperty(c,a,y),y},S=this&&this.__param||function(o,c){return function(a,l){c(a,l,o)}};Object.defineProperty(f,"__esModule",{value:!0}),f.BufferService=f.MINIMUM_ROWS=f.MINIMUM_COLS=void 0;const u=h(8460),p=h(844),b=h(5295),D=h(2585);f.MINIMUM_COLS=2,f.MINIMUM_ROWS=1;let g=f.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(o){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(o.rawOptions.cols||0,f.MINIMUM_COLS),this.rows=Math.max(o.rawOptions.rows||0,f.MINIMUM_ROWS),this.buffers=this.register(new b.BufferSet(o,this))}resize(o,c){this.cols=o,this.rows=c,this.buffers.resize(o,c),this._onResize.fire({cols:o,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(o,c=!1){const a=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===o.fg&&l.getBg(0)===o.bg||(l=a.getBlankLine(o,c),this._cachedBlankLine=l),l.isWrapped=c;const _=a.ybase+a.scrollTop,C=a.ybase+a.scrollBottom;if(a.scrollTop===0){const y=a.lines.isFull;C===a.lines.length-1?y?a.lines.recycle().copyFrom(l):a.lines.push(l.clone()):a.lines.splice(C+1,0,l.clone()),y?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const y=C-_+1;a.lines.shiftElements(_+1,y-1,-1),a.lines.set(C,l.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(o,c,a){const l=this.buffer;if(o<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else o+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const _=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+o,l.ybase),0),_!==l.ydisp&&(c||this._onScroll.fire(l.ydisp))}};f.BufferService=g=d([S(0,D.IOptionsService)],g)},7994:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.CharsetService=void 0,f.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(h){this.glevel=h,this.charset=this._charsets[h]}setgCharset(h,d){this._charsets[h]=d,this.glevel===h&&(this.charset=d)}}},1753:function(J,f,h){var d=this&&this.__decorate||function(l,_,C,y){var E,v=arguments.length,x=v<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,C):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(l,_,C,y);else for(var N=l.length-1;N>=0;N--)(E=l[N])&&(x=(v<3?E(x):v>3?E(_,C,x):E(_,C))||x);return v>3&&x&&Object.defineProperty(_,C,x),x},S=this&&this.__param||function(l,_){return function(C,y){_(C,y,l)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreMouseService=void 0;const u=h(2585),p=h(8460),b=h(844),D={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function g(l,_){let C=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(C|=64,C|=l.action):(C|=3&l.button,4&l.button&&(C|=64),8&l.button&&(C|=128),l.action===32?C|=32:l.action!==0||_||(C|=3)),C}const o=String.fromCharCode,c={DEFAULT:l=>{const _=[g(l,!1)+32,l.col+32,l.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${o(_[0])}${o(_[1])}${o(_[2])}`},SGR:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${g(l,!0)};${l.col};${l.row}${_}`},SGR_PIXELS:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${g(l,!0)};${l.x};${l.y}${_}`}};let a=f.CoreMouseService=class extends b.Disposable{constructor(l,_){super(),this._bufferService=l,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(D))this.addProtocol(C,D[C]);for(const C of Object.keys(c))this.addEncoding(C,c[C]);this.reset()}addProtocol(l,_){this._protocols[l]=_}addEncoding(l,_){this._encodings[l]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const _=this._encodings[this._activeEncoding](l);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,_,C){if(C){if(l.x!==_.x||l.y!==_.y)return!1}else if(l.col!==_.col||l.row!==_.row)return!1;return l.button===_.button&&l.action===_.action&&l.ctrl===_.ctrl&&l.alt===_.alt&&l.shift===_.shift}};f.CoreMouseService=a=d([S(0,u.IBufferService),S(1,u.ICoreService)],a)},6975:function(J,f,h){var d=this&&this.__decorate||function(a,l,_,C){var y,E=arguments.length,v=E<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,l,_,C);else for(var x=a.length-1;x>=0;x--)(y=a[x])&&(v=(E<3?y(v):E>3?y(l,_,v):y(l,_))||v);return E>3&&v&&Object.defineProperty(l,_,v),v},S=this&&this.__param||function(a,l){return function(_,C){l(_,C,a)}};Object.defineProperty(f,"__esModule",{value:!0}),f.CoreService=void 0;const u=h(1439),p=h(8460),b=h(844),D=h(2585),g=Object.freeze({insertMode:!1}),o=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=f.CoreService=class extends b.Disposable{constructor(a,l,_){super(),this._bufferService=a,this._logService=l,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(g),this.decPrivateModes=(0,u.clone)(o)}reset(){this.modes=(0,u.clone)(g),this.decPrivateModes=(0,u.clone)(o)}triggerDataEvent(a,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(a))}};f.CoreService=c=d([S(0,D.IBufferService),S(1,D.ILogService),S(2,D.IOptionsService)],c)},9074:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.DecorationService=void 0;const d=h(8055),S=h(8460),u=h(844),p=h(6106);let b=0,D=0;class g extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((a=>a?.marker.line)),this._onDecorationRegistered=this.register(new S.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new S.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const l=new o(a);if(l){const _=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),_.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,l,_){let C=0,y=0;for(const E of this._decorations.getKeyIterator(l))C=E.options.x??0,y=C+(E.options.width??1),a>=C&&a<y&&(!_||(E.options.layer??"bottom")===_)&&(yield E)}forEachDecorationAtCell(a,l,_,C){this._decorations.forEachByKey(l,(y=>{b=y.options.x??0,D=b+(y.options.width??1),a>=b&&a<D&&(!_||(y.options.layer??"bottom")===_)&&C(y)}))}}f.DecorationService=g;class o extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=d.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=d.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(a){super(),this.options=a,this.onRenderEmitter=this.register(new S.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new S.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=a.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.InstantiationService=f.ServiceCollection=void 0;const d=h(2585),S=h(8343);class u{constructor(...b){this._entries=new Map;for(const[D,g]of b)this.set(D,g)}set(b,D){const g=this._entries.get(b);return this._entries.set(b,D),g}forEach(b){for(const[D,g]of this._entries.entries())b(D,g)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}f.ServiceCollection=u,f.InstantiationService=class{constructor(){this._services=new u,this._services.set(d.IInstantiationService,this)}setService(p,b){this._services.set(p,b)}getService(p){return this._services.get(p)}createInstance(p,...b){const D=(0,S.getServiceDependencies)(p).sort(((c,a)=>c.index-a.index)),g=[];for(const c of D){const a=this._services.get(c.id);if(!a)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${c.id}.`);g.push(a)}const o=D.length>0?D[0].index:b.length;if(b.length!==o)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${o+1} conflicts with ${b.length} static arguments`);return new p(...b,...g)}}},7866:function(J,f,h){var d=this&&this.__decorate||function(o,c,a,l){var _,C=arguments.length,y=C<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,c,a,l);else for(var E=o.length-1;E>=0;E--)(_=o[E])&&(y=(C<3?_(y):C>3?_(c,a,y):_(c,a))||y);return C>3&&y&&Object.defineProperty(c,a,y),y},S=this&&this.__param||function(o,c){return function(a,l){c(a,l,o)}};Object.defineProperty(f,"__esModule",{value:!0}),f.traceCall=f.setTraceLogger=f.LogService=void 0;const u=h(844),p=h(2585),b={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let D,g=f.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),D=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let c=0;c<o.length;c++)typeof o[c]=="function"&&(o[c]=o[c]())}_log(o,c,a){this._evalLazyOptionalParams(a),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...a)}trace(o,...c){this._logLevel<=p.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,o,c)}debug(o,...c){this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,o,c)}info(o,...c){this._logLevel<=p.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,o,c)}warn(o,...c){this._logLevel<=p.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,o,c)}error(o,...c){this._logLevel<=p.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,o,c)}};f.LogService=g=d([S(0,p.IOptionsService)],g),f.setTraceLogger=function(o){D=o},f.traceCall=function(o,c,a){if(typeof a.value!="function")throw new Error("not supported");const l=a.value;a.value=function(..._){if(D.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,_);D.trace(`GlyphRenderer#${l.name}(${_.map((y=>JSON.stringify(y))).join(", ")})`);const C=l.apply(this,_);return D.trace(`GlyphRenderer#${l.name} return`,C),C}}},7302:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.OptionsService=f.DEFAULT_OPTIONS=void 0;const d=h(8460),S=h(844),u=h(6114);f.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class b extends S.Disposable{constructor(g){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const o={...f.DEFAULT_OPTIONS};for(const c in g)if(c in o)try{const a=g[c];o[c]=this._sanitizeAndValidateOption(c,a)}catch(a){console.error(a)}this.rawOptions=o,this.options={...o},this._setupOptions(),this.register((0,S.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(g,o){return this.onOptionChange((c=>{c===g&&o(this.rawOptions[g])}))}onMultipleOptionChange(g,o){return this.onOptionChange((c=>{g.indexOf(c)!==-1&&o()}))}_setupOptions(){const g=c=>{if(!(c in f.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},o=(c,a)=>{if(!(c in f.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);a=this._sanitizeAndValidateOption(c,a),this.rawOptions[c]!==a&&(this.rawOptions[c]=a,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const a={get:g.bind(this,c),set:o.bind(this,c)};Object.defineProperty(this.options,c,a)}}_sanitizeAndValidateOption(g,o){switch(g){case"cursorStyle":if(o||(o=f.DEFAULT_OPTIONS[g]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(o))throw new Error(`"${o}" is not a valid value for ${g}`);break;case"wordSeparator":o||(o=f.DEFAULT_OPTIONS[g]);break;case"fontWeight":case"fontWeightBold":if(typeof o=="number"&&1<=o&&o<=1e3)break;o=p.includes(o)?o:f.DEFAULT_OPTIONS[g];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(`${g} cannot be less than 1, value: ${o}`);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(`${g} cannot be less than 0, value: ${o}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(`${g} cannot be less than or equal to 0, value: ${o}`);break;case"rows":case"cols":if(!o&&o!==0)throw new Error(`${g} must be numeric, value: ${o}`);break;case"windowsPty":o=o??{}}return o}}f.OptionsService=b},2660:function(J,f,h){var d=this&&this.__decorate||function(b,D,g,o){var c,a=arguments.length,l=a<3?D:o===null?o=Object.getOwnPropertyDescriptor(D,g):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(b,D,g,o);else for(var _=b.length-1;_>=0;_--)(c=b[_])&&(l=(a<3?c(l):a>3?c(D,g,l):c(D,g))||l);return a>3&&l&&Object.defineProperty(D,g,l),l},S=this&&this.__param||function(b,D){return function(g,o){D(g,o,b)}};Object.defineProperty(f,"__esModule",{value:!0}),f.OscLinkService=void 0;const u=h(2585);let p=f.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const D=this._bufferService.buffer;if(b.id===void 0){const _=D.addMarker(D.ybase+D.y),C={data:b,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(C,_))),this._dataByLinkId.set(C.id,C),C.id}const g=b,o=this._getEntryIdKey(g),c=this._entriesWithId.get(o);if(c)return this.addLineToLink(c.id,D.ybase+D.y),c.id;const a=D.addMarker(D.ybase+D.y),l={id:this._nextId++,key:this._getEntryIdKey(g),data:g,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(l,a))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(b,D){const g=this._dataByLinkId.get(b);if(g&&g.lines.every((o=>o.line!==D))){const o=this._bufferService.buffer.addMarker(D);g.lines.push(o),o.onDispose((()=>this._removeMarkerFromLink(g,o)))}}getLinkData(b){return this._dataByLinkId.get(b)?.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,D){const g=b.lines.indexOf(D);g!==-1&&(b.lines.splice(g,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};f.OscLinkService=p=d([S(0,u.IBufferService)],p)},8343:(J,f)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.createDecorator=f.getServiceDependencies=f.serviceRegistry=void 0;const h="di$target",d="di$dependencies";f.serviceRegistry=new Map,f.getServiceDependencies=function(S){return S[d]||[]},f.createDecorator=function(S){if(f.serviceRegistry.has(S))return f.serviceRegistry.get(S);const u=function(p,b,D){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(g,o,c){o[h]===o?o[d].push({id:g,index:c}):(o[d]=[{id:g,index:c}],o[h]=o)})(u,p,D)};return u.toString=()=>S,f.serviceRegistry.set(S,u),u}},2585:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.IDecorationService=f.IUnicodeService=f.IOscLinkService=f.IOptionsService=f.ILogService=f.LogLevelEnum=f.IInstantiationService=f.ICharsetService=f.ICoreService=f.ICoreMouseService=f.IBufferService=void 0;const d=h(8343);var S;f.IBufferService=(0,d.createDecorator)("BufferService"),f.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),f.ICoreService=(0,d.createDecorator)("CoreService"),f.ICharsetService=(0,d.createDecorator)("CharsetService"),f.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(S||(f.LogLevelEnum=S={})),f.ILogService=(0,d.createDecorator)("LogService"),f.IOptionsService=(0,d.createDecorator)("OptionsService"),f.IOscLinkService=(0,d.createDecorator)("OscLinkService"),f.IUnicodeService=(0,d.createDecorator)("UnicodeService"),f.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(J,f,h)=>{Object.defineProperty(f,"__esModule",{value:!0}),f.UnicodeService=void 0;const d=h(8460),S=h(225);class u{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,D,g=!1){return(16777215&b)<<3|(3&D)<<1|(g?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const b=new S.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let D=0,g=0;const o=b.length;for(let c=0;c<o;++c){let a=b.charCodeAt(c);if(55296<=a&&a<=56319){if(++c>=o)return D+this.wcwidth(a);const C=b.charCodeAt(c);56320<=C&&C<=57343?a=1024*(a-55296)+C-56320+65536:D+=this.wcwidth(C)}const l=this.charProperties(a,g);let _=u.extractWidth(l);u.extractShouldJoin(l)&&(_-=u.extractWidth(g)),D+=_,g=l}return D}charProperties(b,D){return this._activeProvider.charProperties(b,D)}}f.UnicodeService=u}},Y={};function ue(J){var f=Y[J];if(f!==void 0)return f.exports;var h=Y[J]={exports:{}};return ce[J].call(h.exports,h,h.exports,ue),h.exports}var Se={};return(()=>{var J=Se;Object.defineProperty(J,"__esModule",{value:!0}),J.Terminal=void 0;const f=ue(9042),h=ue(3236),d=ue(844),S=ue(5741),u=ue(8285),p=ue(7975),b=ue(7090),D=["cols","rows"];class g extends d.Disposable{constructor(c){super(),this._core=this.register(new h.Terminal(c)),this._addonManager=this.register(new S.AddonManager),this._publicOptions={...this._core.options};const a=_=>this._core.options[_],l=(_,C)=>{this._checkReadonlyOptions(_),this._core.options[_]=C};for(const _ in this._core.options){const C={get:a.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,C)}}_checkReadonlyOptions(c){if(D.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new b.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const c=this._core.coreService.decPrivateModes;let a="none";switch(this._core.coreMouseService.activeProtocol){case"X10":a="x10";break;case"VT200":a="vt200";break;case"DRAG":a="drag";break;case"ANY":a="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const a in c)this._publicOptions[a]=c[a]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,a=!0){this._core.input(c,a)}resize(c,a){this._verifyIntegers(c,a),this._core.resize(c,a)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,a,l){this._verifyIntegers(c,a,l),this._core.select(c,a,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,a){this._verifyIntegers(c,a),this._core.selectLines(c,a)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,a){this._core.write(c,a)}writeln(c,a){this._core.write(c),this._core.write(`\r
|
|
17
|
-
`,a)}paste(c){this._core.paste(c)}refresh(c,a){this._verifyIntegers(c,a),this._core.refresh(c,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return f}_verifyIntegers(...c){for(const a of c)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const a of c)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}J.Terminal=g})(),Se})()))})(Do)),Do.exports}var gv=vv(),Ao={exports:{}},jf;function mv(){return jf||(jf=1,(function(re,ge){(function(ce,Y){re.exports=Y()})(self,(()=>(()=>{var ce={};return(()=>{var Y=ce;Object.defineProperty(Y,"__esModule",{value:!0}),Y.FitAddon=void 0,Y.FitAddon=class{activate(ue){this._terminal=ue}dispose(){}fit(){const ue=this.proposeDimensions();if(!ue||!this._terminal||isNaN(ue.cols)||isNaN(ue.rows))return;const Se=this._terminal._core;this._terminal.rows===ue.rows&&this._terminal.cols===ue.cols||(Se._renderService.clear(),this._terminal.resize(ue.cols,ue.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ue=this._terminal._core,Se=ue._renderService.dimensions;if(Se.css.cell.width===0||Se.css.cell.height===0)return;const J=this._terminal.options.scrollback===0?0:ue.viewport.scrollBarWidth,f=window.getComputedStyle(this._terminal.element.parentElement),h=parseInt(f.getPropertyValue("height")),d=Math.max(0,parseInt(f.getPropertyValue("width"))),S=window.getComputedStyle(this._terminal.element),u=h-(parseInt(S.getPropertyValue("padding-top"))+parseInt(S.getPropertyValue("padding-bottom"))),p=d-(parseInt(S.getPropertyValue("padding-right"))+parseInt(S.getPropertyValue("padding-left")))-J;return{cols:Math.max(2,Math.floor(p/Se.css.cell.width)),rows:Math.max(1,Math.floor(u/Se.css.cell.height))}}}})(),ce})()))})(Ao)),Ao.exports}var pv=mv();const Uf=16e3,Sv=30,yv=.004,bv=["audio/webm;codecs=opus","audio/webm","audio/mp4"];function Cv(re){if(!re.length)return 0;let ge=0;for(const ce of re)ge+=ce*ce;return Math.sqrt(ge/re.length)}function Ev(re){return Cv(re)<yv}async function wv(re){const ge=new AudioContext;try{const ce=await ge.decodeAudioData(await re.arrayBuffer()),Y=Math.max(1,Math.ceil(ce.duration*Uf)),ue=new OfflineAudioContext(1,Y,Uf),Se=ue.createBufferSource();return Se.buffer=ce,Se.connect(ue.destination),Se.start(),(await ue.startRendering()).getChannelData(0)}finally{ge.close()}}class Dv{constructor(){this.stream=null,this.recorder=null,this.chunks=[]}async start(){this.stream=await navigator.mediaDevices.getUserMedia({audio:!0});const ge=bv.find(ce=>MediaRecorder.isTypeSupported(ce));this.recorder=new MediaRecorder(this.stream,ge?{mimeType:ge}:void 0),this.chunks=[],this.recorder.ondataavailable=ce=>{ce.data.size&&this.chunks.push(ce.data)},this.recorder.start()}stop(){return new Promise(ge=>{const ce=this.recorder;if(!ce||ce.state==="inactive"){this.dispose(),ge(null);return}ce.onstop=()=>{const Y=new Blob(this.chunks,{type:ce.mimeType||"audio/webm"});if(this.dispose(),!Y.size){ge(null);return}wv(Y).then(ge,()=>ge(null))},ce.stop()})}cancel(){const ge=this.recorder;ge&&ge.state!=="inactive"&&(ge.onstop=null,ge.stop()),this.dispose()}dispose(){this.stream?.getTracks().forEach(ge=>ge.stop()),this.stream=null,this.recorder=null,this.chunks=[]}}const Xi=()=>window.zerog;function We({name:re,className:ge=""}){const ce={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:`icon-svg ${ge}`.trim(),"aria-hidden":!0};switch(re){case"plus":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M12 5v14M5 12h14"})});case"panel-left":return B.jsxs("svg",{...ce,children:[B.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),B.jsx("path",{d:"M9 4v16"})]});case"panel-left-open":return B.jsxs("svg",{...ce,children:[B.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),B.jsx("path",{d:"M9 4v16M6 9l2 3-2 3"})]});case"grid":return B.jsxs("svg",{...ce,children:[B.jsx("rect",{x:"4",y:"4",width:"7",height:"7",rx:"1"}),B.jsx("rect",{x:"13",y:"4",width:"7",height:"7",rx:"1"}),B.jsx("rect",{x:"4",y:"13",width:"7",height:"7",rx:"1"}),B.jsx("rect",{x:"13",y:"13",width:"7",height:"7",rx:"1"})]});case"sessions":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})});case"ssh":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M7 17l5-5-5-5M12 17h7"})});case"spark":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3z"})});case"settings":return B.jsxs("svg",{...ce,children:[B.jsx("circle",{cx:"12",cy:"12",r:"3"}),B.jsx("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9c.3.6.9 1 1.6 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]});case"sun":return B.jsxs("svg",{...ce,children:[B.jsx("circle",{cx:"12",cy:"12",r:"4"}),B.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]});case"moon":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M20.5 15.5A8.5 8.5 0 0 1 8.5 3.5 8.5 8.5 0 1 0 20.5 15.5z"})});case"stack":return B.jsx("svg",{...ce,children:B.jsx("rect",{x:"5",y:"5",width:"14",height:"14",rx:"1.5"})});case"maximize":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M8 4H4v4M16 4h4v4M4 16v4h4M20 16v4h-4"})});case"restore":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M8 8h12v12H8zM4 16V4h12"})});case"chevron-left":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M15 5l-7 7 7 7"})});case"chevron-right":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M9 5l7 7-7 7"})});case"split-v":return B.jsxs("svg",{...ce,children:[B.jsx("rect",{x:"4",y:"5",width:"7",height:"14",rx:"1"}),B.jsx("rect",{x:"13",y:"5",width:"7",height:"14",rx:"1"})]});case"split-h":return B.jsxs("svg",{...ce,children:[B.jsx("rect",{x:"4",y:"4",width:"16",height:"7",rx:"1"}),B.jsx("rect",{x:"4",y:"13",width:"16",height:"7",rx:"1"})]});case"x":return B.jsx("svg",{...ce,children:B.jsx("path",{d:"M6 6l12 12M18 6L6 18"})});case"mic":return B.jsxs("svg",{...ce,children:[B.jsx("rect",{x:"9",y:"2.5",width:"6",height:"12",rx:"3"}),B.jsx("path",{d:"M5 11.5a7 7 0 0 0 14 0"}),B.jsx("path",{d:"M12 18.5V21"})]});default:return B.jsx("span",{className:"icon","aria-hidden":"true",children:"•"})}}function Av({sessionId:re,focused:ge,onStatus:ce,theme:Y}){const ue=Oe.useRef(null),Se=Oe.useRef(null),J=Oe.useRef(ce);return J.current=ce,Oe.useEffect(()=>{if(!ue.current)return;const f=ue.current,h=new gv.Terminal({cursorBlink:!0,fontFamily:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',fontSize:13,lineHeight:1.2,letterSpacing:0,scrollback:1e4,theme:Rv(Y),convertEol:!0,allowProposedApi:!1}),d=new pv.FitAddon;h.loadAddon(d),h.open(f),Se.current=h;const S=Xi();let u=!1,p=0;const b=()=>{if(!(u||!f.isConnected)&&!(f.clientWidth<20||f.clientHeight<20)){try{d.fit()}catch{return}S&&h.cols>0&&h.rows>0&&re&&S.resize(re,h.cols,h.rows)}},D=()=>{cancelAnimationFrame(p),p=requestAnimationFrame(()=>{b(),p=requestAnimationFrame(b)})};if(!S)return D(),h.writeln("\x1B[90mZeroG Terminal\x1B[0m"),h.writeln("\x1B[31mPreload API unavailable. Rebuild the app.\x1B[0m"),J.current("Preload API unavailable"),()=>{u=!0,cancelAnimationFrame(p),Se.current=null,h.dispose()};const g=S.onData((l,_)=>{l===re&&h.write(_)}),o=S.onStatus((l,_)=>{l===re&&(J.current(_),D())}),c=h.onData(l=>{re&&S.write(re,l)});h.attachCustomKeyEventHandler(l=>{if(l.type!=="keydown")return!0;const _=l.key.toLowerCase();if(!(l.ctrlKey||l.metaKey)||!l.shiftKey)return!0;if(_==="c"){const y=h.getSelection();return y&&S.copyText(y).catch(E=>{J.current(E instanceof Error?E.message:String(E))}),!1}return _==="v"?(S.readText().then(y=>{y&&(typeof h.paste=="function"?h.paste(y):re&&S.write(re,y))}).catch(y=>{J.current(y instanceof Error?y.message:String(y))}),!1):!0});const a=new ResizeObserver(()=>D());return a.observe(f),window.addEventListener("resize",D),document.fonts?.ready?.then(()=>{u||D()}).catch(()=>{}),D(),re?S.attachSession(re).then(l=>{l.persistence==="process"?J.current(`${l.host} · ${l.name} · process only (install screen for persistence)`):J.current(`${l.host} · ${l.name}`),D()}).catch(l=>{J.current(l instanceof Error?l.message:String(l))}):(h.writeln("\x1B[90mZeroG Terminal\x1B[0m"),h.writeln("\x1B[90mSelect a session or create a local/SSH connection.\x1B[0m")),()=>{u=!0,cancelAnimationFrame(p),c.dispose(),g(),o(),a.disconnect(),window.removeEventListener("resize",D),Se.current=null,h.dispose()}},[Y]),Oe.useEffect(()=>{ge&&Se.current?.focus()},[ge]),B.jsx("div",{className:"terminal",ref:ue})}function xv({index:re,onCreate:ge}){return B.jsxs("article",{className:"pane empty-pane",children:[B.jsxs("div",{className:"pane-title",children:[B.jsxs("span",{children:["PANE ",re]}),B.jsx("span",{className:"pane-dim",children:"EMPTY"})]}),B.jsxs("div",{className:"empty-pane-body",children:[B.jsx("span",{className:"empty-glyph",children:"+"}),B.jsx("strong",{children:"Split ready"}),B.jsx("small",{children:"Open another terminal here"}),B.jsx("button",{type:"button",onClick:ge,children:"Choose session"})]})]})}function qf(re,ge=[]){return{id:`ws-${crypto.randomUUID()}`,name:re,sessionIds:ge}}function Tv(){const[re,ge]=Oe.useState(()=>{try{return window.localStorage.getItem("zerog-theme")==="light"?"light":"dark"}catch{return"dark"}}),[ce,Y]=Oe.useState([]),[ue,Se]=Oe.useState(()=>[qf("Workspace")]),[J,f]=Oe.useState(()=>ue[0]?.id??""),[h,d]=Oe.useState(null),[S,u]=Oe.useState("Ready"),[p,b]=Oe.useState(!1),[D,g]=Oe.useState(!1),[o,c]=Oe.useState(null),[a,l]=Oe.useState(!1),[_,C]=Oe.useState("stack"),[y,E]=Oe.useState(),[v,x]=Oe.useState(null),[N,H]=Oe.useState("Workspace"),[q,O]=Oe.useState("term"),[Z,ne]=Oe.useState(""),[U,F]=Oe.useState(""),[Q,A]=Oe.useState(null),[L,w]=Oe.useState({status:"idle",sessionId:null}),M=Oe.useRef(null),G=Oe.useRef(null),W=Oe.useRef(null),le=Oe.useRef(void 0);Oe.useEffect(()=>{document.documentElement.dataset.theme=re;try{window.localStorage.setItem("zerog-theme",re)}catch{}},[re]);const oe=Oe.useMemo(()=>ue.find(te=>te.id===J)??ue[0]??null,[ue,J]),z=Oe.useMemo(()=>{if(!oe)return ce;const te=new Set(oe.sessionIds),_e=ce.filter(he=>te.has(he.id));if(oe.id===ue[0]?.id){const he=new Set(ue.flatMap(Be=>Be.sessionIds)),pe=ce.filter(Be=>!he.has(Be.id));return[...new Map([..._e,...pe].map(Be=>[Be.id,Be])).values()]}return _e},[oe,ce,ue]),R=Oe.useCallback(async()=>{const te=Xi();if(!te){u("Preload API unavailable");return}try{const _e=await te.listSessions();Y(_e),u(_e.length?`${_e.length} session${_e.length===1?"":"s"}`:"No sessions")}catch(_e){u(_e instanceof Error?_e.message:String(_e))}},[]);Oe.useEffect(()=>{R()},[R]),Oe.useEffect(()=>{!h&&z.length&&d(z[0])},[h,z]),Oe.useEffect(()=>{const te=_e=>{if(_e.key==="Escape"){if(L.status==="listening"){_e.preventDefault(),ct(),u("Voice cancelled");return}if(a){_e.preventDefault(),l(!1);return}if(Q){_e.preventDefault(),A(null);return}if(o){_e.preventDefault(),c(null);return}}if(!(_e.ctrlKey||_e.metaKey)||!_e.shiftKey)return;const he=_e.key.toLowerCase();he==="o"&&(_e.preventDefault(),l(pe=>!pe)),he==="n"&&(_e.preventDefault(),H(xo(ue)),c("workspace")),he==="t"&&(_e.preventDefault(),O(If(oe?.name??"term",z)),c("local")),he==="l"&&(_e.preventDefault(),C(pe=>pe==="stack"?"split-v":"stack")),he==="b"&&(_e.preventDefault(),g(pe=>!pe))};return window.addEventListener("keydown",te),()=>window.removeEventListener("keydown",te)},[a,Q,o,L.status,ue,oe,z]);const $=async te=>{d(te),u(te.persistence==="process"?`${te.host} · ${te.name} · process only (install screen for persistence)`:`${te.host} · ${te.name}`),l(!1)},ae=(te,_e=J)=>{Se(he=>he.map(pe=>pe.id!==_e?{...pe,sessionIds:pe.sessionIds.filter(nt=>nt!==te.id)}:pe.sessionIds.includes(te.id)?pe:{...pe,sessionIds:[...pe.sessionIds,te.id]}))},de=async te=>{te.preventDefault();const _e=N.trim()||xo(ue),he=qf(_e);Se(pe=>[...pe,he]),f(he.id),d(null),c(null),u(`Workspace “${_e}” ready`)},fe=async te=>{te.preventDefault();const _e=Xi();if(_e){if(z.length>=4){u("This workspace supports up to 4 sessions."),c(null);return}b(!0);try{const he=await _e.createLocalSession({name:q});Y(pe=>[...pe.filter(nt=>nt.id!==he.id),he]),ae(he),E(he.id),x(null),C(To(z.length+1)),c(null),await $(he)}catch(he){u(he instanceof Error?he.message:String(he))}finally{b(!1)}}},Ae=async te=>{te.preventDefault();const _e=Xi();if(_e){if(z.length>=4){u("This workspace supports up to 4 sessions."),c(null);return}b(!0);try{const he=await _e.createSshSession({name:Z||void 0,target:U});Y(pe=>[...pe.filter(nt=>nt.id!==he.id),he]),ae(he),E(he.id),x(null),C(To(z.length+1)),c(null),await $(he)}catch(he){u(he instanceof Error?he.message:String(he))}finally{b(!1)}}},ke=()=>{H(xo(ue)),c("workspace")},Ne=()=>{O(If(oe?.name??"term",z)),c("local")},et=_==="split-v"?"pane-grid split-v":_==="split-h"?"pane-grid split-h":_==="grid"?"pane-grid grid":"pane-grid",be=_==="stack"?1:_==="grid"?4:2;_==="stack"?h||z.slice(0,1):z.slice(0,be);const Kt=z.slice(0,4),ei=Math.max(be,Kt.length),ti=te=>{E(te),x(_e=>_e===te?null:te)},Wt=te=>{if(!v||z.length<2)return;const he=(z.findIndex(nt=>nt.id===v)+te+z.length)%z.length,pe=z[he];E(pe.id),d(pe),x(pe.id)},yi=()=>{if(!G.current){const te=new Worker(new URL(""+new URL("voice-worker-Bde9NFkO.js",import.meta.url).href,import.meta.url),{type:"module"});te.onmessage=_e=>{const he=_e.data;if(he.type==="result"){const pe=W.current;W.current=null,w({status:"idle",sessionId:null}),he.text&&pe?(Xi()?.write(pe,he.text),u(`Voice: "${he.text}"`)):u("Voice: nothing transcribed")}else he.type==="error"?(W.current=null,w({status:"idle",sessionId:null}),u(`Voice error: ${he.message}`)):he.type==="loading"&&typeof he.progress=="number"&&u(`Loading speech model… ${Math.round(he.progress)}%`)},G.current=te}return G.current},ct=()=>{window.clearTimeout(le.current),M.current?.cancel(),M.current=null,W.current=null,w({status:"idle",sessionId:null})},Pe=async()=>{const te=M.current,_e=W.current;if(!te||!_e)return;window.clearTimeout(le.current),M.current=null,w({status:"transcribing",sessionId:_e}),u("Transcribing…");const he=await te.stop();if(!he||Ev(he)){W.current=null,w({status:"idle",sessionId:null}),u("Voice: no speech detected");return}yi().postMessage({type:"transcribe",audio:he},[he.buffer])},mt=async te=>{if(L.status==="listening"&&L.sessionId===te.id){await Pe();return}if(L.status!=="idle")return;const _e=new Dv;try{await _e.start()}catch(he){u(`Microphone unavailable: ${he instanceof Error?he.message:String(he)}`);return}M.current=_e,W.current=te.id,w({status:"listening",sessionId:te.id}),E(te.id),window.clearTimeout(le.current),le.current=window.setTimeout(()=>{Pe()},Sv*1e3),u(`Listening on ${te.name}… click the mic again or press Esc to finish`)},Pt=async te=>{L.sessionId===te.id&&ct();const _e=z.filter(pe=>pe.id!==te.id);Se(pe=>pe.map(nt=>({...nt,sessionIds:nt.sessionIds.filter(Be=>Be!==te.id)}))),h?.id===te.id&&d(_e[0]??null),y===te.id&&E(_e[0]?.id),v===te.id&&x(null),C(To(_e.length));const he=Xi();if(he)try{await he.closeSession(te.id)}catch(pe){u(pe instanceof Error?pe.message:String(pe));return}u(te.persistence==="screen"?`Closed ${te.name} · screen session survives`:te.kind==="ssh"?`Closed ${te.name} · SSH connection ended`:`Closed ${te.name} · process ended`),R()};return B.jsxs("main",{className:`app-shell ${D?"drawer-collapsed":""}`,children:[B.jsxs("header",{className:"window-bar",children:[B.jsxs("div",{className:"window-brand",children:[B.jsx("span",{className:"brand-mark",children:"ZG"}),B.jsx("span",{className:"brand-name",children:"ZeroG"})]}),B.jsx("div",{className:"workspace-tabs",children:ue.map(te=>B.jsxs("button",{type:"button",className:`workspace-tab ${te.id===oe?.id?"active":""}`,onClick:()=>{f(te.id);const _e=ce.find(he=>te.sessionIds.includes(he.id));d(_e??null)},children:[B.jsx("span",{className:"tab-dot"}),te.name,B.jsx("span",{className:"tab-meta",children:te.sessionIds.length||(te.id===ue[0]?.id?z.length:0)})]},te.id))}),B.jsxs("div",{className:"window-actions",children:[B.jsxs("button",{type:"button",className:"bar-button",onClick:()=>l(te=>!te),title:"Session overview (Ctrl+Shift+O)",children:[B.jsx(We,{name:"grid"}),B.jsx("span",{children:"Overview"})]}),B.jsxs("button",{type:"button",className:"bar-button",onClick:ke,title:"New workspace (Ctrl+Shift+N)",children:[B.jsx(We,{name:"plus"}),B.jsx("span",{children:"New"})]}),B.jsxs("button",{type:"button",className:"bar-button",onClick:async()=>{const te=Xi();te&&A(await te.requestAiCommand())},children:[B.jsx(We,{name:"spark"}),B.jsx("span",{children:"Suggest"})]}),B.jsx("button",{type:"button",className:"bar-button theme-button",onClick:()=>ge(te=>te==="dark"?"light":"dark"),title:`Switch to ${re==="dark"?"light":"dark"} theme`,"aria-label":`Switch to ${re==="dark"?"light":"dark"} theme`,"aria-pressed":re==="light",children:B.jsx(We,{name:re==="dark"?"sun":"moon"})}),B.jsx("button",{type:"button",className:"avatar",title:"Settings",children:"S"})]})]}),B.jsxs("div",{className:"body-shell",children:[B.jsxs("nav",{className:"rail","aria-label":"Workspace navigation",children:[B.jsx("button",{type:"button",className:"rail-button",title:D?"Show sessions sidebar (Ctrl+Shift+B)":"Hide sessions sidebar (Ctrl+Shift+B)",onClick:()=>g(te=>!te),children:B.jsx(We,{name:D?"panel-left-open":"panel-left"})}),B.jsx("button",{type:"button",className:`rail-button ${D?"":"active"}`,title:"Sessions",onClick:()=>g(!1),children:B.jsx(We,{name:"sessions"})}),B.jsx("button",{type:"button",className:"rail-button",onClick:()=>l(!0),title:"Overview",children:B.jsx(We,{name:"grid"})}),B.jsx("span",{className:"rail-spacer"}),B.jsx("button",{type:"button",className:"rail-button",onClick:()=>c("ssh"),title:"Connect SSH",children:B.jsx(We,{name:"ssh"})}),B.jsx("button",{type:"button",className:"rail-button",title:"Settings",children:B.jsx(We,{name:"settings"})})]}),!D&&B.jsxs("aside",{className:"session-drawer",children:[B.jsxs("div",{className:"drawer-head",children:[B.jsxs("div",{children:[B.jsx("span",{className:"eyebrow",children:"WORKSPACE"}),B.jsx("h1",{children:oe?.name??"Sessions"})]}),B.jsxs("div",{className:"drawer-head-actions",children:[B.jsx("button",{type:"button",className:"square-button",onClick:()=>g(!0),title:"Hide sessions sidebar",children:B.jsx(We,{name:"panel-left"})}),B.jsx("button",{type:"button",className:"square-button",onClick:Ne,title:"New local terminal",children:B.jsx(We,{name:"plus"})})]})]}),B.jsxs("div",{className:"drawer-tools",children:[B.jsxs("button",{type:"button",className:"drawer-tool active",children:["Terminals ",B.jsx("span",{children:z.length})]}),B.jsx("button",{type:"button",className:"drawer-tool",onClick:()=>c("ssh"),children:"Remote"})]}),B.jsx("div",{className:"session-list",children:z.length?z.map(te=>B.jsxs("button",{type:"button",className:`session-row ${h?.id===te.id?"active":""}`,onClick:()=>{$(te)},children:[B.jsx("span",{className:`status-dot ${te.status}`}),B.jsxs("span",{className:"session-copy",children:[B.jsx("b",{children:te.name}),B.jsx("small",{children:te.kind==="ssh"?`SSH · ${te.host}`:te.persistence==="process"?"local · process only":`local · ${te.cwd}`})]}),B.jsx("span",{className:"session-state",children:te.status==="connected"?"●":"○"})]},te.id)):B.jsxs("div",{className:"session-empty",children:[B.jsx("b",{children:"No terminals yet"}),B.jsx("small",{children:"Add a local terminal or SSH connection to this workspace."})]})}),B.jsxs("div",{className:"drawer-bottom",children:[B.jsxs("button",{type:"button",className:"drawer-action",onClick:Ne,children:[B.jsx(We,{name:"plus"})," Local terminal ",B.jsx("kbd",{children:"⌘⇧T"})]}),B.jsxs("button",{type:"button",className:"drawer-action",onClick:()=>c("ssh"),children:[B.jsx(We,{name:"ssh"})," Connect SSH"]}),B.jsxs("div",{className:"drawer-status",children:[B.jsx("span",{className:"status-dot connected"}),S]})]})]}),B.jsxs("section",{className:"workspace",children:[B.jsxs("div",{className:"workspace-head",children:[B.jsxs("div",{className:"location",children:[D&&B.jsx("button",{type:"button",className:"inline-restore",onClick:()=>g(!1),title:"Show sessions sidebar",children:B.jsx(We,{name:"panel-left-open"})}),B.jsx("span",{className:"connection-dot"}),B.jsx("span",{children:h?.host??"local"}),B.jsx("span",{className:"slash",children:"/"}),B.jsx("span",{children:h?.cwd??"~"}),B.jsx("span",{className:"slash",children:"/"}),B.jsx("span",{className:"muted-text",children:h?.name??oe?.name??"no session"})]}),B.jsxs("div",{className:"layout-controls",children:[B.jsx("span",{className:"control-label",children:"LAYOUT"}),B.jsx("button",{type:"button",className:_==="stack"||v?"layout-button active":"layout-button",onClick:()=>{if(v)x(null);else if(z.length>1){const te=y??h?.id??z[0]?.id;te&&x(te)}else C("stack")},title:v?"Restore panes":z.length>1?"Maximize focused pane":"Single pane",children:B.jsx(We,{name:"stack"})}),B.jsx("button",{type:"button",className:_==="split-v"&&!v?"layout-button active":"layout-button",onClick:()=>{x(null),C("split-v")},title:"Vertical split",children:B.jsx(We,{name:"split-v"})}),B.jsx("button",{type:"button",className:_==="split-h"&&!v?"layout-button active":"layout-button",onClick:()=>{x(null),C("split-h")},title:"Horizontal split",children:B.jsx(We,{name:"split-h"})}),B.jsx("button",{type:"button",className:_==="grid"&&!v?"layout-button active":"layout-button",onClick:()=>{x(null),C("grid")},title:"Four-pane grid",children:B.jsx(We,{name:"grid"})})]})]}),B.jsx("div",{className:`${et} ${v?"maximized-pane-grid":""}`,children:Array.from({length:ei},(te,_e)=>{const he=Kt[_e];if(!he)return B.jsx(xv,{index:_e+1,onCreate:Ne},_e);const pe=L.sessionId===he.id&&L.status!=="idle"?L.status:null;return B.jsxs("article",{className:`pane terminal-pane ${y===he.id?"focused":""} ${v===he.id?"maximized-pane":""} ${_e>=be?"overflow-pane":""}`,onMouseDown:()=>E(he.id),children:[B.jsxs("div",{className:"pane-title",children:[B.jsxs("span",{children:[B.jsx("span",{className:"pane-live"})," ",he.name]}),B.jsxs("span",{className:"pane-actions",children:[v&&B.jsxs(B.Fragment,{children:[B.jsx("button",{type:"button",className:"pane-nav",onClick:()=>Wt(-1),title:"Previous session",children:B.jsx(We,{name:"chevron-left"})}),B.jsx("button",{type:"button",className:"pane-nav",onClick:()=>Wt(1),title:"Next session",children:B.jsx(We,{name:"chevron-right"})})]}),p?"connecting…":pe?`${pe}…`:he.kind==="ssh"?"ssh":"bash",B.jsx("button",{type:"button",className:pe?`pane-mic ${pe}`:"pane-mic",onClick:()=>{mt(he)},disabled:L.status!=="idle"&&!pe,title:pe==="listening"?"Stop and transcribe":pe==="transcribing"?"Transcribing…":"Voice input","aria-label":pe==="listening"?`Stop recording ${he.name}`:`Voice input for ${he.name}`,children:B.jsx(We,{name:"mic"})}),B.jsx("button",{type:"button",className:"pane-maximize",onClick:()=>ti(he.id),title:v?"Restore pane":"Maximize pane",children:B.jsx(We,{name:v?"restore":"maximize"})}),B.jsx("button",{type:"button",className:"pane-close",onClick:()=>{Pt(he)},title:"Close pane","aria-label":`Close ${he.name}`,children:B.jsx(We,{name:"x"})})]})]}),B.jsx(Av,{sessionId:he.id,focused:y===he.id,onStatus:u,theme:re})]},he.id)})}),B.jsxs("footer",{className:"status-bar",children:[B.jsx("span",{children:"ZeroG"}),B.jsx("span",{className:"status-separator"}),B.jsx("span",{children:oe?.name??"Workspace"}),B.jsx("span",{className:"status-separator"}),B.jsx("span",{children:v?"maximized pane":_==="stack"?"1 pane":`${be} panes`}),B.jsx("span",{className:"status-separator"}),B.jsx("span",{children:"Esc closes overlays · ⌘⇧B sidebar"}),B.jsx("span",{className:"status-spacer"}),B.jsx("span",{children:h?`${h.kind==="ssh"?"SSH":h.persistence==="process"?"PROCESS":"SCREEN"} · ${h.persistence==="process"?"non-persistent":"persistent"}`:"no connection"})]})]})]}),a&&B.jsx("div",{className:"overview-layer",onClick:()=>l(!1),children:B.jsxs("section",{className:"overview",onClick:te=>te.stopPropagation(),children:[B.jsxs("div",{className:"overview-head",children:[B.jsxs("div",{children:[B.jsx("span",{className:"eyebrow",children:"WORKSPACE OVERVIEW"}),B.jsx("h2",{children:oe?.name??"Choose a session"})]}),B.jsx("button",{type:"button",className:"close-button",onClick:()=>l(!1),children:"Esc"})]}),B.jsx("div",{className:"thumbnail-grid",children:z.length?z.map(te=>B.jsxs("button",{type:"button",className:`thumbnail ${h?.id===te.id?"active":""}`,onClick:()=>{$(te)},children:[B.jsxs("div",{className:"thumbnail-preview",children:[B.jsx("span",{className:"thumbnail-line cyan"}),B.jsx("span",{className:"thumbnail-line short"}),B.jsx("span",{className:"thumbnail-line green"}),B.jsx("span",{className:"thumbnail-cursor"})]}),B.jsxs("div",{className:"thumbnail-label",children:[B.jsx("b",{children:te.name}),B.jsxs("small",{children:[te.kind==="ssh"?te.host:"local screen"," · ",te.status]})]})]},te.id)):B.jsxs("div",{className:"overview-empty",children:[B.jsx("span",{children:"▦"}),B.jsx("b",{children:"No terminals in this workspace"}),B.jsx("small",{children:"Create a local terminal or connect over SSH."})]})}),B.jsxs("div",{className:"overview-foot",children:[B.jsx("button",{type:"button",onClick:()=>{l(!1),Ne()},children:"+ Local terminal"}),B.jsx("button",{type:"button",onClick:()=>{l(!1),c("ssh")},children:"Connect SSH"}),B.jsx("button",{type:"button",onClick:()=>{l(!1),ke()},children:"+ Workspace"}),B.jsx("span",{className:"overview-hint",children:"Press Esc to close"})]})]})}),o&&B.jsx("div",{className:"modal-layer",onClick:()=>c(null),children:B.jsxs("form",{className:"modal-card",onClick:te=>te.stopPropagation(),onSubmit:o==="workspace"?de:o==="local"?fe:Ae,children:[B.jsxs("div",{className:"modal-head",children:[B.jsxs("div",{children:[B.jsx("span",{className:"eyebrow",children:o==="workspace"?"WORKSPACE":o==="local"?"LOCAL TERMINAL":"REMOTE SESSION"}),B.jsx("h2",{children:o==="workspace"?"New workspace":o==="local"?"New terminal":"Connect SSH"})]}),B.jsx("button",{type:"button",className:"close-button",onClick:()=>c(null),children:"Esc"})]}),o==="workspace"&&B.jsxs(B.Fragment,{children:[B.jsx("p",{children:"Create a separate workspace for a project or host group. Terminals stay scoped to the active workspace."}),B.jsxs("label",{children:["Workspace name",B.jsx("input",{autoFocus:!0,value:N,onChange:te=>H(te.target.value),pattern:"[A-Za-z0-9](?:[A-Za-z0-9_.]|-| ){0,48}",required:!0})]})]}),o==="local"&&B.jsxs(B.Fragment,{children:[B.jsxs("p",{children:["Start a persistent named screen session inside “",oe?.name??"this workspace","”."]}),B.jsxs("label",{children:["Terminal name",B.jsx("input",{autoFocus:!0,value:q,onChange:te=>O(te.target.value),pattern:"[A-Za-z0-9](?:[A-Za-z0-9_.]|-){0,48}",required:!0})]})]}),o==="ssh"&&B.jsxs(B.Fragment,{children:[B.jsxs("p",{children:["Connect a remote host into “",oe?.name??"this workspace","”."]}),B.jsxs("label",{children:["SSH target",B.jsx("input",{autoFocus:!0,value:U,onChange:te=>F(te.target.value),placeholder:"user@server:22",required:!0})]}),B.jsxs("label",{children:["Session label ",B.jsx("span",{className:"muted-text",children:"optional"}),B.jsx("input",{value:Z,onChange:te=>ne(te.target.value),placeholder:"server"})]})]}),B.jsxs("div",{className:"modal-actions",children:[B.jsx("button",{type:"button",onClick:()=>c(null),children:"Cancel"}),B.jsx("button",{className:"primary-button",disabled:p,type:"submit",children:p?"Working…":o==="workspace"?"Create workspace":o==="local"?"Open terminal":"Connect"})]})]})}),Q&&B.jsx("div",{className:"modal-layer",onClick:()=>A(null),children:B.jsxs("div",{className:"modal-card approval-card",onClick:te=>te.stopPropagation(),children:[B.jsxs("div",{className:"modal-head",children:[B.jsxs("div",{children:[B.jsx("span",{className:"eyebrow warning-text",children:"APPROVAL REQUIRED"}),B.jsx("h2",{children:"Run suggestion?"})]}),B.jsx("button",{type:"button",className:"close-button",onClick:()=>A(null),children:"Esc"})]}),B.jsx("p",{children:Q.explanation}),B.jsx("code",{children:Q.command}),B.jsxs("div",{className:"modal-actions",children:[B.jsx("button",{type:"button",onClick:()=>A(null),children:"Cancel"}),B.jsx("button",{type:"button",className:"primary-button",onClick:()=>{h&&Xi()?.write(h.id,`${Q.command}\r`),A(null)},children:"Approve & run"})]})]})})]})}function Rv(re){return re==="light"?{background:"#f7f9fc",foreground:"#253044",cursor:"#16803c",selectionBackground:"#cbdcf5",green:"#16803c",yellow:"#a15c00",red:"#c53030",blue:"#2459a6",cyan:"#087f8c"}:{background:"#0a0c10",foreground:"#d8dee9",cursor:"#9ece6a",selectionBackground:"#334155",green:"#9ece6a",yellow:"#e0af68",red:"#f7768e",blue:"#7aa2f7",cyan:"#7dcfff"}}function xo(re){let ge=re.length+1;const ce=new Set(re.map(Y=>Y.name.toLowerCase()));for(;ce.has(`workspace ${ge}`);)ge+=1;return`Workspace ${ge}`}function If(re,ge){const ce=re.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,24)||"term",Y=new Set(ge.map(Se=>Se.name.toLowerCase()));if(!Y.has(ce))return ce;let ue=2;for(;Y.has(`${ce}-${ue}`);)ue+=1;return`${ce}-${ue}`}function To(re){return re<=1?"stack":re===2?"split-v":"grid"}_v.createRoot(document.getElementById("root")).render(B.jsx(Tv,{}));
|