@fengye404/termpilot 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
(function(){const ue=document.createElement("link").relList;if(ue&&ue.supports&&ue.supports("modulepreload"))return;for(const ce of document.querySelectorAll('link[rel="modulepreload"]'))G(ce);new MutationObserver(ce=>{for(const ve of ce)if(ve.type==="childList")for(const P of ve.addedNodes)P.tagName==="LINK"&&P.rel==="modulepreload"&&G(P)}).observe(document,{childList:!0,subtree:!0});function ye(ce){const ve={};return ce.integrity&&(ve.integrity=ce.integrity),ce.referrerPolicy&&(ve.referrerPolicy=ce.referrerPolicy),ce.crossOrigin==="use-credentials"?ve.credentials="include":ce.crossOrigin==="anonymous"?ve.credentials="omit":ve.credentials="same-origin",ve}function G(ce){if(ce.ep)return;ce.ep=!0;const ve=ye(ce);fetch(ce.href,ve)}})();function Wf(H){return H&&H.__esModule&&Object.prototype.hasOwnProperty.call(H,"default")?H.default:H}var Bo={exports:{}},sn={};var Bf;function cv(){if(Bf)return sn;Bf=1;var H=Symbol.for("react.transitional.element"),ue=Symbol.for("react.fragment");function ye(G,ce,ve){var P=null;if(ve!==void 0&&(P=""+ve),ce.key!==void 0&&(P=""+ce.key),"key"in ce){ve={};for(var u in ce)u!=="key"&&(ve[u]=ce[u])}else ve=ce;return ce=ve.ref,{$$typeof:H,type:G,key:P,ref:ce!==void 0?ce:null,props:ve}}return sn.Fragment=ue,sn.jsx=ye,sn.jsxs=ye,sn}var Of;function uv(){return Of||(Of=1,Bo.exports=cv()),Bo.exports}var I=uv(),Oo={exports:{}},be={};var kf;function hv(){if(kf)return be;kf=1;var H=Symbol.for("react.transitional.element"),ue=Symbol.for("react.portal"),ye=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),ce=Symbol.for("react.profiler"),ve=Symbol.for("react.consumer"),P=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),p=Symbol.iterator;function C(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(){}},S=Object.assign,l={};function o(w,j,W){this.props=w,this.context=j,this.refs=l,this.updater=W||D}o.prototype.isReactComponent={},o.prototype.setState=function(w,j){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,j,"setState")},o.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function a(){}a.prototype=o.prototype;function c(w,j,W){this.props=w,this.context=j,this.refs=l,this.updater=W||D}var _=c.prototype=new a;_.constructor=c,S(_,o.prototype),_.isPureReactComponent=!0;var g=Array.isArray;function b(){}var x={H:null,A:null,T:null,S:null},v=Object.prototype.hasOwnProperty;function E(w,j,W){var te=W.ref;return{$$typeof:H,type:w,key:j,ref:te!==void 0?te:null,props:W}}function B(w,j){return E(w.type,j,w.props)}function U(w){return typeof w=="object"&&w!==null&&w.$$typeof===H}function L(w){var j={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(W){return j[W]})}var k=/\/+/g;function Z(w,j){return typeof w=="object"&&w!==null&&w.key!=null?L(""+w.key):j.toString(36)}function ee(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(b,b):(w.status="pending",w.then(function(j){w.status==="pending"&&(w.status="fulfilled",w.value=j)},function(j){w.status==="pending"&&(w.status="rejected",w.reason=j)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function N(w,j,W,te,le){var fe=typeof w;(fe==="undefined"||fe==="boolean")&&(w=null);var T=!1;if(w===null)T=!0;else switch(fe){case"bigint":case"string":case"number":T=!0;break;case"object":switch(w.$$typeof){case H:case ue:T=!0;break;case y:return T=w._init,N(T(w._payload),j,W,te,le)}}if(T)return le=le(w),T=te===""?"."+Z(w,0):te,g(le)?(W="",T!=null&&(W=T.replace(k,"$&/")+"/"),N(le,j,W,"",function(se){return se})):le!=null&&(U(le)&&(le=B(le,W+(le.key==null||w&&w.key===le.key?"":(""+le.key).replace(k,"$&/")+"/")+T)),j.push(le)),1;T=0;var X=te===""?".":te+":";if(g(w))for(var $=0;$<w.length;$++)te=w[$],fe=X+Z(te,$),T+=N(te,j,W,fe,le);else if($=C(w),typeof $=="function")for(w=$.call(w),$=0;!(te=w.next()).done;)te=te.value,fe=X+Z(te,$++),T+=N(te,j,W,fe,le);else if(fe==="object"){if(typeof w.then=="function")return N(ee(w),j,W,te,le);throw j=String(w),Error("Objects are not valid as a React child (found: "+(j==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":j)+"). If you meant to render a collection of children, use an array instead.")}return T}function K(w,j,W){if(w==null)return w;var te=[],le=0;return N(w,te,"","",function(fe){return j.call(W,fe,le++)}),te}function A(w){if(w._status===-1){var j=w._result;j=j(),j.then(function(W){(w._status===0||w._status===-1)&&(w._status=1,w._result=W)},function(W){(w._status===0||w._status===-1)&&(w._status=2,w._result=W)}),w._status===-1&&(w._status=0,w._result=j)}if(w._status===1)return w._result.default;throw w._result}var M=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var j=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(j))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},O={map:K,forEach:function(w,j,W){K(w,function(){j.apply(this,arguments)},W)},count:function(w){var j=0;return K(w,function(){j++}),j},toArray:function(w){return K(w,function(j){return j})||[]},only:function(w){if(!U(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return be.Activity=h,be.Children=O,be.Component=o,be.Fragment=ye,be.Profiler=ce,be.PureComponent=c,be.StrictMode=G,be.Suspense=f,be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=x,be.__COMPILER_RUNTIME={__proto__:null,c:function(w){return x.H.useMemoCache(w)}},be.cache=function(w){return function(){return w.apply(null,arguments)}},be.cacheSignal=function(){return null},be.cloneElement=function(w,j,W){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var te=S({},w.props),le=w.key;if(j!=null)for(fe in j.key!==void 0&&(le=""+j.key),j)!v.call(j,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&j.ref===void 0||(te[fe]=j[fe]);var fe=arguments.length-2;if(fe===1)te.children=W;else if(1<fe){for(var T=Array(fe),X=0;X<fe;X++)T[X]=arguments[X+2];te.children=T}return E(w.type,le,te)},be.createContext=function(w){return w={$$typeof:P,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:ve,_context:w},w},be.createElement=function(w,j,W){var te,le={},fe=null;if(j!=null)for(te in j.key!==void 0&&(fe=""+j.key),j)v.call(j,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(le[te]=j[te]);var T=arguments.length-2;if(T===1)le.children=W;else if(1<T){for(var X=Array(T),$=0;$<T;$++)X[$]=arguments[$+2];le.children=X}if(w&&w.defaultProps)for(te in T=w.defaultProps,T)le[te]===void 0&&(le[te]=T[te]);return E(w,fe,le)},be.createRef=function(){return{current:null}},be.forwardRef=function(w){return{$$typeof:u,render:w}},be.isValidElement=U,be.lazy=function(w){return{$$typeof:y,_payload:{_status:-1,_result:w},_init:A}},be.memo=function(w,j){return{$$typeof:d,type:w,compare:j===void 0?null:j}},be.startTransition=function(w){var j=x.T,W={};x.T=W;try{var te=w(),le=x.S;le!==null&&le(W,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(b,M)}catch(fe){M(fe)}finally{j!==null&&W.types!==null&&(j.types=W.types),x.T=j}},be.unstable_useCacheRefresh=function(){return x.H.useCacheRefresh()},be.use=function(w){return x.H.use(w)},be.useActionState=function(w,j,W){return x.H.useActionState(w,j,W)},be.useCallback=function(w,j){return x.H.useCallback(w,j)},be.useContext=function(w){return x.H.useContext(w)},be.useDebugValue=function(){},be.useDeferredValue=function(w,j){return x.H.useDeferredValue(w,j)},be.useEffect=function(w,j){return x.H.useEffect(w,j)},be.useEffectEvent=function(w){return x.H.useEffectEvent(w)},be.useId=function(){return x.H.useId()},be.useImperativeHandle=function(w,j,W){return x.H.useImperativeHandle(w,j,W)},be.useInsertionEffect=function(w,j){return x.H.useInsertionEffect(w,j)},be.useLayoutEffect=function(w,j){return x.H.useLayoutEffect(w,j)},be.useMemo=function(w,j){return x.H.useMemo(w,j)},be.useOptimistic=function(w,j){return x.H.useOptimistic(w,j)},be.useReducer=function(w,j,W){return x.H.useReducer(w,j,W)},be.useRef=function(w){return x.H.useRef(w)},be.useState=function(w){return x.H.useState(w)},be.useSyncExternalStore=function(w,j,W){return x.H.useSyncExternalStore(w,j,W)},be.useTransition=function(){return x.H.useTransition()},be.version="19.2.4",be}var Hf;function qo(){return Hf||(Hf=1,Oo.exports=hv()),Oo.exports}var ge=qo();const fv=Wf(ge);var ko={exports:{}},rn={},Ho={exports:{}},zo={};var zf;function dv(){return zf||(zf=1,(function(H){function ue(N,K){var A=N.length;N.push(K);e:for(;0<A;){var M=A-1>>>1,O=N[M];if(0<ce(O,K))N[M]=K,N[A]=O,A=M;else break e}}function ye(N){return N.length===0?null:N[0]}function G(N){if(N.length===0)return null;var K=N[0],A=N.pop();if(A!==K){N[0]=A;e:for(var M=0,O=N.length,w=O>>>1;M<w;){var j=2*(M+1)-1,W=N[j],te=j+1,le=N[te];if(0>ce(W,A))te<O&&0>ce(le,W)?(N[M]=le,N[te]=A,M=te):(N[M]=W,N[j]=A,M=j);else if(te<O&&0>ce(le,A))N[M]=le,N[te]=A,M=te;else break e}}return K}function ce(N,K){var A=N.sortIndex-K.sortIndex;return A!==0?A:N.id-K.id}if(H.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ve=performance;H.unstable_now=function(){return ve.now()}}else{var P=Date,u=P.now();H.unstable_now=function(){return P.now()-u}}var f=[],d=[],y=1,h=null,p=3,C=!1,D=!1,S=!1,l=!1,o=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;function _(N){for(var K=ye(d);K!==null;){if(K.callback===null)G(d);else if(K.startTime<=N)G(d),K.sortIndex=K.expirationTime,ue(f,K);else break;K=ye(d)}}function g(N){if(S=!1,_(N),!D)if(ye(f)!==null)D=!0,b||(b=!0,L());else{var K=ye(d);K!==null&&ee(g,K.startTime-N)}}var b=!1,x=-1,v=5,E=-1;function B(){return l?!0:!(H.unstable_now()-E<v)}function U(){if(l=!1,b){var N=H.unstable_now();E=N;var K=!0;try{e:{D=!1,S&&(S=!1,a(x),x=-1),C=!0;var A=p;try{t:{for(_(N),h=ye(f);h!==null&&!(h.expirationTime>N&&B());){var M=h.callback;if(typeof M=="function"){h.callback=null,p=h.priorityLevel;var O=M(h.expirationTime<=N);if(N=H.unstable_now(),typeof O=="function"){h.callback=O,_(N),K=!0;break t}h===ye(f)&&G(f),_(N)}else G(f);h=ye(f)}if(h!==null)K=!0;else{var w=ye(d);w!==null&&ee(g,w.startTime-N),K=!1}}break e}finally{h=null,p=A,C=!1}K=void 0}}finally{K?L():b=!1}}}var L;if(typeof c=="function")L=function(){c(U)};else if(typeof MessageChannel<"u"){var k=new MessageChannel,Z=k.port2;k.port1.onmessage=U,L=function(){Z.postMessage(null)}}else L=function(){o(U,0)};function ee(N,K){x=o(function(){N(H.unstable_now())},K)}H.unstable_IdlePriority=5,H.unstable_ImmediatePriority=1,H.unstable_LowPriority=4,H.unstable_NormalPriority=3,H.unstable_Profiling=null,H.unstable_UserBlockingPriority=2,H.unstable_cancelCallback=function(N){N.callback=null},H.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):v=0<N?Math.floor(1e3/N):5},H.unstable_getCurrentPriorityLevel=function(){return p},H.unstable_next=function(N){switch(p){case 1:case 2:case 3:var K=3;break;default:K=p}var A=p;p=K;try{return N()}finally{p=A}},H.unstable_requestPaint=function(){l=!0},H.unstable_runWithPriority=function(N,K){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var A=p;p=N;try{return K()}finally{p=A}},H.unstable_scheduleCallback=function(N,K,A){var M=H.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?M+A:M):A=M,N){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=A+O,N={id:y++,callback:K,priorityLevel:N,startTime:A,expirationTime:O,sortIndex:-1},A>M?(N.sortIndex=A,ue(d,N),ye(f)===null&&N===ye(d)&&(S?(a(x),x=-1):S=!0,ee(g,A-M))):(N.sortIndex=O,ue(f,N),D||C||(D=!0,b||(b=!0,L()))),N},H.unstable_shouldYield=B,H.unstable_wrapCallback=function(N){var K=p;return function(){var A=p;p=K;try{return N.apply(this,arguments)}finally{p=A}}}})(zo)),zo}var Nf;function _v(){return Nf||(Nf=1,Ho.exports=dv()),Ho.exports}var No={exports:{}},Ct={};var Uf;function vv(){if(Uf)return Ct;Uf=1;var H=qo();function ue(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)d+="&args[]="+encodeURIComponent(arguments[y])}return"Minified React error #"+f+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function ye(){}var G={d:{f:ye,r:function(){throw Error(ue(522))},D:ye,C:ye,L:ye,m:ye,X:ye,S:ye,M:ye},p:0,findDOMNode:null},ce=Symbol.for("react.portal");function ve(f,d,y){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ce,key:h==null?null:""+h,children:f,containerInfo:d,implementation:y}}var P=H.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(f,d){if(f==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return Ct.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Ct.createPortal=function(f,d){var y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(ue(299));return ve(f,d,null,y)},Ct.flushSync=function(f){var d=P.T,y=G.p;try{if(P.T=null,G.p=2,f)return f()}finally{P.T=d,G.p=y,G.d.f()}},Ct.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,G.d.C(f,d))},Ct.prefetchDNS=function(f){typeof f=="string"&&G.d.D(f)},Ct.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var y=d.as,h=u(y,d.crossOrigin),p=typeof d.integrity=="string"?d.integrity:void 0,C=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;y==="style"?G.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:p,fetchPriority:C}):y==="script"&&G.d.X(f,{crossOrigin:h,integrity:p,fetchPriority:C,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},Ct.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var y=u(d.as,d.crossOrigin);G.d.M(f,{crossOrigin:y,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&G.d.M(f)},Ct.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var y=d.as,h=u(y,d.crossOrigin);G.d.L(f,y,{crossOrigin:h,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})}},Ct.preloadModule=function(f,d){if(typeof f=="string")if(d){var y=u(d.as,d.crossOrigin);G.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:y,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else G.d.m(f)},Ct.requestFormReset=function(f){G.d.r(f)},Ct.unstable_batchedUpdates=function(f,d){return f(d)},Ct.useFormState=function(f,d,y){return P.H.useFormState(f,d,y)},Ct.useFormStatus=function(){return P.H.useHostTransitionStatus()},Ct.version="19.2.4",Ct}var jf;function mv(){if(jf)return No.exports;jf=1;function H(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H)}catch(ue){console.error(ue)}}return H(),No.exports=vv(),No.exports}var qf;function gv(){if(qf)return rn;qf=1;var H=_v(),ue=qo(),ye=mv();function G(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 ce(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ve(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 P(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 u(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 f(e){if(ve(e)!==e)throw Error(G(188))}function d(e){var t=e.alternate;if(!t){if(t=ve(e),t===null)throw Error(G(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 f(r),e;if(n===s)return f(r),t;n=n.sibling}throw Error(G(188))}if(i.return!==s.return)i=r,s=n;else{for(var m=!1,R=r.child;R;){if(R===i){m=!0,i=r,s=n;break}if(R===s){m=!0,s=r,i=n;break}R=R.sibling}if(!m){for(R=n.child;R;){if(R===i){m=!0,i=n,s=r;break}if(R===s){m=!0,s=n,i=r;break}R=R.sibling}if(!m)throw Error(G(189))}}if(i.alternate!==s)throw Error(G(190))}if(i.tag!==3)throw Error(G(188));return i.stateNode.current===i?e:t}function y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=y(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,p=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),c=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),x=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),E=Symbol.for("react.activity"),B=Symbol.for("react.memo_cache_sentinel"),U=Symbol.iterator;function L(e){return e===null||typeof e!="object"?null:(e=U&&e[U]||e["@@iterator"],typeof e=="function"?e:null)}var k=Symbol.for("react.client.reference");function Z(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===k?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case o:return"Profiler";case l:return"StrictMode";case g:return"Suspense";case b:return"SuspenseList";case E:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case D:return"Portal";case c: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 x: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 ee=Array.isArray,N=ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K=ye.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A={pending:!1,data:null,method:null,action:null},M=[],O=-1;function w(e){return{current:e}}function j(e){0>O||(e.current=M[O],M[O]=null,O--)}function W(e,t){O++,M[O]=e.current,e.current=t}var te=w(null),le=w(null),fe=w(null),T=w(null);function X(e,t){switch(W(fe,t),W(le,e),W(te,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ef(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ef(t),e=tf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(te),W(te,e)}function $(){j(te),j(le),j(fe)}function se(e){e.memoizedState!==null&&W(T,e);var t=te.current,i=tf(t,e.type);t!==i&&(W(le,e),W(te,i))}function pe(e){le.current===e&&(j(te),j(le)),T.current===e&&(j(T),Jr._currentValue=A)}var oe,xe;function Ne(e){if(oe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);oe=t&&t[1]||"",xe=-1<i.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+oe+e+xe}var $e=!1;function wt(e,t){if(!e||$e)return"";$e=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ne=function(){throw Error()};if(Object.defineProperty(ne.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ne,[])}catch(J){var Q=J}Reflect.construct(e,[],ne)}else{try{ne.call()}catch(J){Q=J}e.call(ne.prototype)}}else{try{throw Error()}catch(J){Q=J}(ne=e())&&typeof ne.catch=="function"&&ne.catch(function(){})}}catch(J){if(J&&Q&&typeof J.stack=="string")return[J.stack,Q.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],R=n[1];if(m&&R){var z=m.split(`
|
|
4
|
-
`),V=R.split(`
|
|
5
|
-
`);for(r=s=0;s<z.length&&!z[s].includes("DetermineComponentFrameRoot");)s++;for(;r<V.length&&!V[r].includes("DetermineComponentFrameRoot");)r++;if(s===z.length||r===V.length)for(s=z.length-1,r=V.length-1;1<=s&&0<=r&&z[s]!==V[r];)r--;for(;1<=s&&0<=r;s--,r--)if(z[s]!==V[r]){if(s!==1||r!==1)do if(s--,r--,0>r||z[s]!==V[r]){var ie=`
|
|
6
|
-
`+z[s].replace(" at new "," at ");return e.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",e.displayName)),ie}while(1<=s&&0<=r);break}}}finally{$e=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Ne(i):""}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return Ne(e.type);case 16:return Ne("Lazy");case 13:return e.child!==t&&t!==null?Ne("Suspense Fallback"):Ne("Suspense");case 19:return Ne("SuspenseList");case 0:case 15:return wt(e.type,!1);case 11:return wt(e.type.render,!1);case 1:return wt(e.type,!0);case 31:return Ne("Activity");default:return""}}function Zt(e){try{var t="",i=null;do t+=Ce(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
|
-
Error generating stack: `+s.message+`
|
|
8
|
-
`+s.stack}}var Jt=Object.prototype.hasOwnProperty,ii=H.unstable_scheduleCallback,ht=H.unstable_cancelCallback,fi=H.unstable_shouldYield,St=H.unstable_requestPaint,it=H.unstable_now,yt=H.unstable_getCurrentPriorityLevel,Bt=H.unstable_ImmediatePriority,Ot=H.unstable_UserBlockingPriority,Ve=H.unstable_NormalPriority,bt=H.unstable_LowPriority,xt=H.unstable_IdlePriority,si=H.log,qe=H.unstable_setDisableYieldValue,ri=null,Xe=null;function _t(e){if(typeof si=="function"&&qe(e),Xe&&typeof Xe.setStrictMode=="function")try{Xe.setStrictMode(ri,e)}catch{}}var ct=Math.clz32?Math.clz32:ln,ns=Math.log,Cl=Math.LN2;function ln(e){return e>>>=0,e===0?32:31-(ns(e)/Cl|0)|0}var Bi=256,ls=262144,as=4194304;function ni(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 li(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 R=s&134217727;return R!==0?(s=R&~n,s!==0?r=ni(s):(m&=R,m!==0?r=ni(m):i||(i=R&~e,i!==0&&(r=ni(i))))):(R=s&~n,R!==0?r=ni(R):m!==0?r=ni(m):i||(i=s&~e,i!==0&&(r=ni(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 di(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function an(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 hr(){var e=as;return as<<=1,(as&62914560)===0&&(as=4194304),e}function Ds(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function Oi(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function on(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 R=e.entanglements,z=e.expirationTimes,V=e.hiddenUpdates;for(i=m&~i;0<i;){var ie=31-ct(i),ne=1<<ie;R[ie]=0,z[ie]=-1;var Q=V[ie];if(Q!==null)for(V[ie]=null,ie=0;ie<Q.length;ie++){var J=Q[ie];J!==null&&(J.lane&=-536870913)}i&=~ne}s!==0&&cn(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(m&~t))}function cn(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-ct(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function ae(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-ct(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function de(e,t){var i=t&-t;return i=(i&42)!==0?1:Me(i),(i&(e.suspendedLanes|t))!==0?0:i}function Me(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 Ie(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ki(){var e=K.p;return e!==0?e:(e=window.event,e===void 0?32:xf(e.type))}function Ze(e,t){var i=K.p;try{return K.p=e,t()}finally{K.p=i}}var Oe=Math.random().toString(36).slice(2),Le="__reactFiber$"+Oe,Pe="__reactProps$"+Oe,ai="__reactContainer$"+Oe,fr="__reactEvents$"+Oe,Jf="__reactListeners$"+Oe,$f="__reactHandles$"+Oe,Io="__reactResources$"+Oe,dr="__reactMarker$"+Oe;function El(e){delete e[Le],delete e[Pe],delete e[fr],delete e[Jf],delete e[$f]}function As(e){var t=e[Le];if(t)return t;for(var i=e.parentNode;i;){if(t=i[ai]||i[Le]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=cf(e);e!==null;){if(i=e[Le])return i;e=cf(e)}return t}e=i,i=e.parentNode}return null}function Ts(e){if(e=e[Le]||e[ai]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function _r(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(G(33))}function Rs(e){var t=e[Io];return t||(t=e[Io]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[dr]=!0}var Ko=new Set,Yo={};function os(e,t){Ms(e,t),Ms(e+"Capture",t)}function Ms(e,t){for(Yo[e]=t,e=0;e<t.length;e++)Ko.add(t[e])}var ed=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]*$"),Go={},Xo={};function td(e){return Jt.call(Xo,e)?!0:Jt.call(Go,e)?!1:ed.test(e)?Xo[e]=!0:(Go[e]=!0,!1)}function un(e,t,i){if(td(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 hn(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 _i(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 It(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Fo(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function id(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 wl(e){if(!e._valueTracker){var t=Fo(e)?"checked":"value";e._valueTracker=id(e,t,""+e[t])}}function Vo(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Fo(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function fn(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 sd=/[\n"\\]/g;function Kt(e){return e.replace(sd,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function xl(e,t,i,s,r,n,m,R){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=""+It(t)):e.value!==""+It(t)&&(e.value=""+It(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?Dl(e,m,It(t)):i!=null?Dl(e,m,It(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?e.name=""+It(R):e.removeAttribute("name")}function Po(e,t,i,s,r,n,m,R){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)){wl(e);return}i=i!=null?""+It(i):"",t=t!=null?""+It(t):i,R||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=R?e.checked:!!s,e.defaultChecked=!!s,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(e.name=m),wl(e)}function Dl(e,t,i){t==="number"&&fn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ls(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=""+It(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 Qo(e,t,i){if(t!=null&&(t=""+It(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+It(i):""}function Wo(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(G(92));if(ee(s)){if(1<s.length)throw Error(G(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=It(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),wl(e)}function Bs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var rd=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 Zo(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||rd.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Jo(e,t,i){if(t!=null&&typeof t!="object")throw Error(G(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&&Zo(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&Zo(e,n,t[n])}function Al(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 nd=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"]]),ld=/^[\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 dn(e){return ld.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function vi(){}var Tl=null;function Rl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Os=null,ks=null;function $o(e){var t=Ts(e);if(t&&(e=t.stateNode)){var i=e[Pe]||null;e:switch(e=t.stateNode,t.type){case"input":if(xl(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="'+Kt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[Pe]||null;if(!r)throw Error(G(90));xl(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&&Vo(s)}break e;case"textarea":Qo(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ls(e,!!i.multiple,t,!1)}}}var Ml=!1;function ec(e,t,i){if(Ml)return e(t,i);Ml=!0;try{var s=e(t);return s}finally{if(Ml=!1,(Os!==null||ks!==null)&&(el(),Os&&(t=Os,e=ks,ks=Os=null,$o(t),e)))for(t=0;t<e.length;t++)$o(e[t])}}function vr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Pe]||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(G(231,t,typeof i));return i}var mi=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ll=!1;if(mi)try{var mr={};Object.defineProperty(mr,"passive",{get:function(){Ll=!0}}),window.addEventListener("test",mr,mr),window.removeEventListener("test",mr,mr)}catch{Ll=!1}var Hi=null,Bl=null,_n=null;function tc(){if(_n)return _n;var e,t=Bl,i=t.length,s,r="value"in Hi?Hi.value:Hi.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 _n=r.slice(e,1<s?1-s:void 0)}function vn(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 mn(){return!0}function ic(){return!1}function Dt(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 R in e)e.hasOwnProperty(R)&&(i=e[R],this[R]=i?i(n):n[R]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?mn:ic,this.isPropagationStopped=ic,this}return h(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=mn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=mn)},persist:function(){},isPersistent:mn}),t}var cs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gn=Dt(cs),gr=h({},cs,{view:0,detail:0}),ad=Dt(gr),Ol,kl,pr,pn=h({},gr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zl,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!==pr&&(pr&&e.type==="mousemove"?(Ol=e.screenX-pr.screenX,kl=e.screenY-pr.screenY):kl=Ol=0,pr=e),Ol)},movementY:function(e){return"movementY"in e?e.movementY:kl}}),sc=Dt(pn),od=h({},pn,{dataTransfer:0}),cd=Dt(od),ud=h({},gr,{relatedTarget:0}),Hl=Dt(ud),hd=h({},cs,{animationName:0,elapsedTime:0,pseudoElement:0}),fd=Dt(hd),dd=h({},cs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),_d=Dt(dd),vd=h({},cs,{data:0}),rc=Dt(vd),md={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gd={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"},pd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=pd[e])?!!t[e]:!1}function zl(){return Sd}var yd=h({},gr,{key:function(e){if(e.key){var t=md[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=vn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zl,charCode:function(e){return e.type==="keypress"?vn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?vn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),bd=Dt(yd),Cd=h({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),nc=Dt(Cd),Ed=h({},gr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zl}),wd=Dt(Ed),xd=h({},cs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Dd=Dt(xd),Ad=h({},pn,{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}),Td=Dt(Ad),Rd=h({},cs,{newState:0,oldState:0}),Md=Dt(Rd),Ld=[9,13,27,32],Nl=mi&&"CompositionEvent"in window,Sr=null;mi&&"documentMode"in document&&(Sr=document.documentMode);var Bd=mi&&"TextEvent"in window&&!Sr,lc=mi&&(!Nl||Sr&&8<Sr&&11>=Sr),ac=" ",oc=!1;function cc(e,t){switch(e){case"keyup":return Ld.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Hs=!1;function Od(e,t){switch(e){case"compositionend":return uc(t);case"keypress":return t.which!==32?null:(oc=!0,ac);case"textInput":return e=t.data,e===ac&&oc?null:e;default:return null}}function kd(e,t){if(Hs)return e==="compositionend"||!Nl&&cc(e,t)?(e=tc(),_n=Bl=Hi=null,Hs=!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 lc&&t.locale!=="ko"?null:t.data;default:return null}}var Hd={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 hc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Hd[e.type]:t==="textarea"}function fc(e,t,i,s){Os?ks?ks.push(s):ks=[s]:Os=s,t=al(t,"onChange"),0<t.length&&(i=new gn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var yr=null,br=null;function zd(e){Ph(e,0)}function Sn(e){var t=_r(e);if(Vo(t))return e}function dc(e,t){if(e==="change")return t}var _c=!1;if(mi){var Ul;if(mi){var jl="oninput"in document;if(!jl){var vc=document.createElement("div");vc.setAttribute("oninput","return;"),jl=typeof vc.oninput=="function"}Ul=jl}else Ul=!1;_c=Ul&&(!document.documentMode||9<document.documentMode)}function mc(){yr&&(yr.detachEvent("onpropertychange",gc),br=yr=null)}function gc(e){if(e.propertyName==="value"&&Sn(br)){var t=[];fc(t,br,e,Rl(e)),ec(zd,t)}}function Nd(e,t,i){e==="focusin"?(mc(),yr=t,br=i,yr.attachEvent("onpropertychange",gc)):e==="focusout"&&mc()}function Ud(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sn(br)}function jd(e,t){if(e==="click")return Sn(t)}function qd(e,t){if(e==="input"||e==="change")return Sn(t)}function Id(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:Id;function Cr(e,t){if(kt(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(!Jt.call(t,r)||!kt(e[r],t[r]))return!1}return!0}function pc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sc(e,t){var i=pc(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=pc(i)}}function yc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=fn(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=fn(e.document)}return t}function ql(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 Kd=mi&&"documentMode"in document&&11>=document.documentMode,zs=null,Il=null,Er=null,Kl=!1;function Cc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Kl||zs==null||zs!==fn(s)||(s=zs,"selectionStart"in s&&ql(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}),Er&&Cr(Er,s)||(Er=s,s=al(Il,"onSelect"),0<s.length&&(t=new gn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=zs)))}function us(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Ns={animationend:us("Animation","AnimationEnd"),animationiteration:us("Animation","AnimationIteration"),animationstart:us("Animation","AnimationStart"),transitionrun:us("Transition","TransitionRun"),transitionstart:us("Transition","TransitionStart"),transitioncancel:us("Transition","TransitionCancel"),transitionend:us("Transition","TransitionEnd")},Yl={},Ec={};mi&&(Ec=document.createElement("div").style,"AnimationEvent"in window||(delete Ns.animationend.animation,delete Ns.animationiteration.animation,delete Ns.animationstart.animation),"TransitionEvent"in window||delete Ns.transitionend.transition);function hs(e){if(Yl[e])return Yl[e];if(!Ns[e])return e;var t=Ns[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Ec)return Yl[e]=t[i];return e}var wc=hs("animationend"),xc=hs("animationiteration"),Dc=hs("animationstart"),Yd=hs("transitionrun"),Gd=hs("transitionstart"),Xd=hs("transitioncancel"),Ac=hs("transitionend"),Tc=new Map,Gl="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(" ");Gl.push("scrollEnd");function $t(e,t){Tc.set(e,t),os(t,[e])}var yn=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)},Yt=[],Us=0,Xl=0;function bn(){for(var e=Us,t=Xl=Us=0;t<e;){var i=Yt[t];Yt[t++]=null;var s=Yt[t];Yt[t++]=null;var r=Yt[t];Yt[t++]=null;var n=Yt[t];if(Yt[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&&Rc(i,r,n)}}function Cn(e,t,i,s){Yt[Us++]=e,Yt[Us++]=t,Yt[Us++]=i,Yt[Us++]=s,Xl|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Fl(e,t,i,s){return Cn(e,t,i,s),En(e)}function fs(e,t){return Cn(e,null,null,t),En(e)}function Rc(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-ct(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function En(e){if(50<Xr)throw Xr=0,to=null,Error(G(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var js={};function Fd(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 Ht(e,t,i,s){return new Fd(e,t,i,s)}function Vl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function gi(e,t){var i=e.alternate;return i===null?(i=Ht(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 Mc(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 wn(e,t,i,s,r,n){var m=0;if(s=e,typeof e=="function")Vl(e)&&(m=1);else if(typeof e=="string")m=Z_(e,i,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case E:return e=Ht(31,i,t,r),e.elementType=E,e.lanes=n,e;case S:return ds(i.children,r,n,t);case l:m=8,r|=24;break;case o:return e=Ht(12,i,t,r|2),e.elementType=o,e.lanes=n,e;case g:return e=Ht(13,i,t,r),e.elementType=g,e.lanes=n,e;case b:return e=Ht(19,i,t,r),e.elementType=b,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c:m=10;break e;case a:m=9;break e;case _:m=11;break e;case x:m=14;break e;case v:m=16,s=null;break e}m=29,i=Error(G(130,e===null?"null":typeof e,"")),s=null}return t=Ht(m,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function ds(e,t,i,s){return e=Ht(7,e,s,t),e.lanes=i,e}function Pl(e,t,i){return e=Ht(6,e,null,t),e.lanes=i,e}function Lc(e){var t=Ht(18,null,null,0);return t.stateNode=e,t}function Ql(e,t,i){return t=Ht(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Bc=new WeakMap;function Gt(e,t){if(typeof e=="object"&&e!==null){var i=Bc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Zt(t)},Bc.set(e,t),t)}return{value:e,source:t,stack:Zt(t)}}var qs=[],Is=0,xn=null,wr=0,Xt=[],Ft=0,zi=null,oi=1,ci="";function pi(e,t){qs[Is++]=wr,qs[Is++]=xn,xn=e,wr=t}function Oc(e,t,i){Xt[Ft++]=oi,Xt[Ft++]=ci,Xt[Ft++]=zi,zi=e;var s=oi;e=ci;var r=32-ct(s)-1;s&=~(1<<r),i+=1;var n=32-ct(t)+r;if(30<n){var m=r-r%5;n=(s&(1<<m)-1).toString(32),s>>=m,r-=m,oi=1<<32-ct(t)+r|i<<r|s,ci=n+e}else oi=1<<n|i<<r|s,ci=e}function Wl(e){e.return!==null&&(pi(e,1),Oc(e,1,0))}function Zl(e){for(;e===xn;)xn=qs[--Is],qs[Is]=null,wr=qs[--Is],qs[Is]=null;for(;e===zi;)zi=Xt[--Ft],Xt[Ft]=null,ci=Xt[--Ft],Xt[Ft]=null,oi=Xt[--Ft],Xt[Ft]=null}function kc(e,t){Xt[Ft++]=oi,Xt[Ft++]=ci,Xt[Ft++]=zi,oi=t.id,ci=t.overflow,zi=e}var vt=null,Qe=null,Be=!1,Ni=null,Vt=!1,Jl=Error(G(519));function Ui(e){var t=Error(G(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw xr(Gt(t,e)),Jl}function Hc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[Le]=e,t[Pe]=s,i){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(i=0;i<Vr.length;i++)Ae(Vr[i],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),Po(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Wo(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||Jh(t.textContent,i)?(s.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),s.onScroll!=null&&Ae("scroll",t),s.onScrollEnd!=null&&Ae("scrollend",t),s.onClick!=null&&(t.onclick=vi),t=!0):t=!1,t||Ui(e,!0)}function zc(e){for(vt=e.return;vt;)switch(vt.tag){case 5:case 31:case 13:Vt=!1;return;case 27:case 3:Vt=!0;return;default:vt=vt.return}}function Ks(e){if(e!==vt)return!1;if(!Be)return zc(e),Be=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||go(e.type,e.memoizedProps)),i=!i),i&&Qe&&Ui(e),zc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Qe=of(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(317));Qe=of(e)}else t===27?(t=Qe,Ji(e.type)?(e=Co,Co=null,Qe=e):Qe=t):Qe=vt?Qt(e.stateNode.nextSibling):null;return!0}function _s(){Qe=vt=null,Be=!1}function $l(){var e=Ni;return e!==null&&(Mt===null?Mt=e:Mt.push.apply(Mt,e),Ni=null),e}function xr(e){Ni===null?Ni=[e]:Ni.push(e)}var ea=w(null),vs=null,Si=null;function ji(e,t,i){W(ea,t._currentValue),t._currentValue=i}function yi(e){e._currentValue=ea.current,j(ea)}function ta(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 ia(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 R=n;n=r;for(var z=0;z<t.length;z++)if(R.context===t[z]){n.lanes|=i,R=n.alternate,R!==null&&(R.lanes|=i),ta(n.return,i,e),s||(m=null);break e}n=R.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error(G(341));m.lanes|=i,n=m.alternate,n!==null&&(n.lanes|=i),ta(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 Ys(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(G(387));if(m=m.memoizedProps,m!==null){var R=r.type;kt(r.pendingProps.value,m.value)||(e!==null?e.push(R):e=[R])}}else if(r===T.current){if(m=r.alternate,m===null)throw Error(G(387));m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Jr):e=[Jr])}r=r.return}e!==null&&ia(t,e,i,s),t.flags|=262144}function Dn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ms(e){vs=e,Si=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function mt(e){return Nc(vs,e)}function An(e,t){return vs===null&&ms(e),Nc(e,t)}function Nc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},Si===null){if(e===null)throw Error(G(308));Si=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Si=Si.next=t;return i}var Vd=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()})}},Pd=H.unstable_scheduleCallback,Qd=H.unstable_NormalPriority,nt={$$typeof:c,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function sa(){return{controller:new Vd,data:new Map,refCount:0}}function Dr(e){e.refCount--,e.refCount===0&&Pd(Qd,function(){e.controller.abort()})}var Ar=null,ra=0,Gs=0,Xs=null;function Wd(e,t){if(Ar===null){var i=Ar=[];ra=0,Gs=ao(),Xs={status:"pending",value:void 0,then:function(s){i.push(s)}}}return ra++,t.then(Uc,Uc),t}function Uc(){if(--ra===0&&Ar!==null){Xs!==null&&(Xs.status="fulfilled");var e=Ar;Ar=null,Gs=0,Xs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Zd(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 jc=N.S;N.S=function(e,t){Ch=it(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Wd(e,t),jc!==null&&jc(e,t)};var gs=w(null);function na(){var e=gs.current;return e!==null?e:Fe.pooledCache}function Tn(e,t){t===null?W(gs,gs.current):W(gs,t.pool)}function qc(){var e=na();return e===null?null:{parent:nt._currentValue,pool:e}}var Fs=Error(G(460)),la=Error(G(474)),Rn=Error(G(542)),Mn={then:function(){}};function Ic(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Kc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(vi,vi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Gc(e),e;default:if(typeof t.status=="string")t.then(vi,vi);else{if(e=Fe,e!==null&&100<e.shellSuspendCounter)throw Error(G(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,Gc(e),e}throw Ss=t,Fs}}function ps(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ss=i,Fs):i}}var Ss=null;function Yc(){if(Ss===null)throw Error(G(459));var e=Ss;return Ss=null,e}function Gc(e){if(e===Fs||e===Rn)throw Error(G(483))}var Vs=null,Tr=0;function Ln(e){var t=Tr;return Tr+=1,Vs===null&&(Vs=[]),Kc(Vs,e,t)}function Rr(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Bn(e,t){throw t.$$typeof===p?Error(G(525)):(e=Object.prototype.toString.call(t),Error(G(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xc(e){function t(Y,q){if(e){var F=Y.deletions;F===null?(Y.deletions=[q],Y.flags|=16):F.push(q)}}function i(Y,q){if(!e)return null;for(;q!==null;)t(Y,q),q=q.sibling;return null}function s(Y){for(var q=new Map;Y!==null;)Y.key!==null?q.set(Y.key,Y):q.set(Y.index,Y),Y=Y.sibling;return q}function r(Y,q){return Y=gi(Y,q),Y.index=0,Y.sibling=null,Y}function n(Y,q,F){return Y.index=F,e?(F=Y.alternate,F!==null?(F=F.index,F<q?(Y.flags|=67108866,q):F):(Y.flags|=67108866,q)):(Y.flags|=1048576,q)}function m(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function R(Y,q,F,re){return q===null||q.tag!==6?(q=Pl(F,Y.mode,re),q.return=Y,q):(q=r(q,F),q.return=Y,q)}function z(Y,q,F,re){var me=F.type;return me===S?ie(Y,q,F.props.children,re,F.key):q!==null&&(q.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===v&&ps(me)===q.type)?(q=r(q,F.props),Rr(q,F),q.return=Y,q):(q=wn(F.type,F.key,F.props,null,Y.mode,re),Rr(q,F),q.return=Y,q)}function V(Y,q,F,re){return q===null||q.tag!==4||q.stateNode.containerInfo!==F.containerInfo||q.stateNode.implementation!==F.implementation?(q=Ql(F,Y.mode,re),q.return=Y,q):(q=r(q,F.children||[]),q.return=Y,q)}function ie(Y,q,F,re,me){return q===null||q.tag!==7?(q=ds(F,Y.mode,re,me),q.return=Y,q):(q=r(q,F),q.return=Y,q)}function ne(Y,q,F){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=Pl(""+q,Y.mode,F),q.return=Y,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case C:return F=wn(q.type,q.key,q.props,null,Y.mode,F),Rr(F,q),F.return=Y,F;case D:return q=Ql(q,Y.mode,F),q.return=Y,q;case v:return q=ps(q),ne(Y,q,F)}if(ee(q)||L(q))return q=ds(q,Y.mode,F,null),q.return=Y,q;if(typeof q.then=="function")return ne(Y,Ln(q),F);if(q.$$typeof===c)return ne(Y,An(Y,q),F);Bn(Y,q)}return null}function Q(Y,q,F,re){var me=q!==null?q.key:null;if(typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint")return me!==null?null:R(Y,q,""+F,re);if(typeof F=="object"&&F!==null){switch(F.$$typeof){case C:return F.key===me?z(Y,q,F,re):null;case D:return F.key===me?V(Y,q,F,re):null;case v:return F=ps(F),Q(Y,q,F,re)}if(ee(F)||L(F))return me!==null?null:ie(Y,q,F,re,null);if(typeof F.then=="function")return Q(Y,q,Ln(F),re);if(F.$$typeof===c)return Q(Y,q,An(Y,F),re);Bn(Y,F)}return null}function J(Y,q,F,re,me){if(typeof re=="string"&&re!==""||typeof re=="number"||typeof re=="bigint")return Y=Y.get(F)||null,R(q,Y,""+re,me);if(typeof re=="object"&&re!==null){switch(re.$$typeof){case C:return Y=Y.get(re.key===null?F:re.key)||null,z(q,Y,re,me);case D:return Y=Y.get(re.key===null?F:re.key)||null,V(q,Y,re,me);case v:return re=ps(re),J(Y,q,F,re,me)}if(ee(re)||L(re))return Y=Y.get(F)||null,ie(q,Y,re,me,null);if(typeof re.then=="function")return J(Y,q,F,Ln(re),me);if(re.$$typeof===c)return J(Y,q,F,An(q,re),me);Bn(q,re)}return null}function he(Y,q,F,re){for(var me=null,ke=null,_e=q,we=q=0,Re=null;_e!==null&&we<F.length;we++){_e.index>we?(Re=_e,_e=null):Re=_e.sibling;var He=Q(Y,_e,F[we],re);if(He===null){_e===null&&(_e=Re);break}e&&_e&&He.alternate===null&&t(Y,_e),q=n(He,q,we),ke===null?me=He:ke.sibling=He,ke=He,_e=Re}if(we===F.length)return i(Y,_e),Be&&pi(Y,we),me;if(_e===null){for(;we<F.length;we++)_e=ne(Y,F[we],re),_e!==null&&(q=n(_e,q,we),ke===null?me=_e:ke.sibling=_e,ke=_e);return Be&&pi(Y,we),me}for(_e=s(_e);we<F.length;we++)Re=J(_e,Y,we,F[we],re),Re!==null&&(e&&Re.alternate!==null&&_e.delete(Re.key===null?we:Re.key),q=n(Re,q,we),ke===null?me=Re:ke.sibling=Re,ke=Re);return e&&_e.forEach(function(ss){return t(Y,ss)}),Be&&pi(Y,we),me}function Se(Y,q,F,re){if(F==null)throw Error(G(151));for(var me=null,ke=null,_e=q,we=q=0,Re=null,He=F.next();_e!==null&&!He.done;we++,He=F.next()){_e.index>we?(Re=_e,_e=null):Re=_e.sibling;var ss=Q(Y,_e,He.value,re);if(ss===null){_e===null&&(_e=Re);break}e&&_e&&ss.alternate===null&&t(Y,_e),q=n(ss,q,we),ke===null?me=ss:ke.sibling=ss,ke=ss,_e=Re}if(He.done)return i(Y,_e),Be&&pi(Y,we),me;if(_e===null){for(;!He.done;we++,He=F.next())He=ne(Y,He.value,re),He!==null&&(q=n(He,q,we),ke===null?me=He:ke.sibling=He,ke=He);return Be&&pi(Y,we),me}for(_e=s(_e);!He.done;we++,He=F.next())He=J(_e,Y,we,He.value,re),He!==null&&(e&&He.alternate!==null&&_e.delete(He.key===null?we:He.key),q=n(He,q,we),ke===null?me=He:ke.sibling=He,ke=He);return e&&_e.forEach(function(ov){return t(Y,ov)}),Be&&pi(Y,we),me}function Ge(Y,q,F,re){if(typeof F=="object"&&F!==null&&F.type===S&&F.key===null&&(F=F.props.children),typeof F=="object"&&F!==null){switch(F.$$typeof){case C:e:{for(var me=F.key;q!==null;){if(q.key===me){if(me=F.type,me===S){if(q.tag===7){i(Y,q.sibling),re=r(q,F.props.children),re.return=Y,Y=re;break e}}else if(q.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===v&&ps(me)===q.type){i(Y,q.sibling),re=r(q,F.props),Rr(re,F),re.return=Y,Y=re;break e}i(Y,q);break}else t(Y,q);q=q.sibling}F.type===S?(re=ds(F.props.children,Y.mode,re,F.key),re.return=Y,Y=re):(re=wn(F.type,F.key,F.props,null,Y.mode,re),Rr(re,F),re.return=Y,Y=re)}return m(Y);case D:e:{for(me=F.key;q!==null;){if(q.key===me)if(q.tag===4&&q.stateNode.containerInfo===F.containerInfo&&q.stateNode.implementation===F.implementation){i(Y,q.sibling),re=r(q,F.children||[]),re.return=Y,Y=re;break e}else{i(Y,q);break}else t(Y,q);q=q.sibling}re=Ql(F,Y.mode,re),re.return=Y,Y=re}return m(Y);case v:return F=ps(F),Ge(Y,q,F,re)}if(ee(F))return he(Y,q,F,re);if(L(F)){if(me=L(F),typeof me!="function")throw Error(G(150));return F=me.call(F),Se(Y,q,F,re)}if(typeof F.then=="function")return Ge(Y,q,Ln(F),re);if(F.$$typeof===c)return Ge(Y,q,An(Y,F),re);Bn(Y,F)}return typeof F=="string"&&F!==""||typeof F=="number"||typeof F=="bigint"?(F=""+F,q!==null&&q.tag===6?(i(Y,q.sibling),re=r(q,F),re.return=Y,Y=re):(i(Y,q),re=Pl(F,Y.mode,re),re.return=Y,Y=re),m(Y)):i(Y,q)}return function(Y,q,F,re){try{Tr=0;var me=Ge(Y,q,F,re);return Vs=null,me}catch(_e){if(_e===Fs||_e===Rn)throw _e;var ke=Ht(29,_e,null,Y.mode);return ke.lanes=re,ke.return=Y,ke}}}var ys=Xc(!0),Fc=Xc(!1),qi=!1;function aa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function oa(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 Ii(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ki(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(ze&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=En(e),Rc(e,null,i),t}return Cn(e,s,t,i),En(e)}function Mr(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,ae(e,i)}}function ca(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 ua=!1;function Lr(){if(ua){var e=Xs;if(e!==null)throw e}}function Br(e,t,i,s){ua=!1;var r=e.updateQueue;qi=!1;var n=r.firstBaseUpdate,m=r.lastBaseUpdate,R=r.shared.pending;if(R!==null){r.shared.pending=null;var z=R,V=z.next;z.next=null,m===null?n=V:m.next=V,m=z;var ie=e.alternate;ie!==null&&(ie=ie.updateQueue,R=ie.lastBaseUpdate,R!==m&&(R===null?ie.firstBaseUpdate=V:R.next=V,ie.lastBaseUpdate=z))}if(n!==null){var ne=r.baseState;m=0,ie=V=z=null,R=n;do{var Q=R.lane&-536870913,J=Q!==R.lane;if(J?(Te&Q)===Q:(s&Q)===Q){Q!==0&&Q===Gs&&(ua=!0),ie!==null&&(ie=ie.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var he=e,Se=R;Q=t;var Ge=i;switch(Se.tag){case 1:if(he=Se.payload,typeof he=="function"){ne=he.call(Ge,ne,Q);break e}ne=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=Se.payload,Q=typeof he=="function"?he.call(Ge,ne,Q):he,Q==null)break e;ne=h({},ne,Q);break e;case 2:qi=!0}}Q=R.callback,Q!==null&&(e.flags|=64,J&&(e.flags|=8192),J=r.callbacks,J===null?r.callbacks=[Q]:J.push(Q))}else J={lane:Q,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ie===null?(V=ie=J,z=ne):ie=ie.next=J,m|=Q;if(R=R.next,R===null){if(R=r.shared.pending,R===null)break;J=R,R=J.next,J.next=null,r.lastBaseUpdate=J,r.shared.pending=null}}while(!0);ie===null&&(z=ne),r.baseState=z,r.firstBaseUpdate=V,r.lastBaseUpdate=ie,n===null&&(r.shared.lanes=0),Vi|=m,e.lanes=m,e.memoizedState=ne}}function Vc(e,t){if(typeof e!="function")throw Error(G(191,e));e.call(t)}function Pc(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Vc(i[e],t)}var Ps=w(null),On=w(0);function Qc(e,t){e=Ri,W(On,e),W(Ps,t),Ri=e|t.baseLanes}function ha(){W(On,Ri),W(Ps,Ps.current)}function fa(){Ri=On.current,j(Ps),j(On)}var zt=w(null),Pt=null;function Yi(e){var t=e.alternate;W(st,st.current&1),W(zt,e),Pt===null&&(t===null||Ps.current!==null||t.memoizedState!==null)&&(Pt=e)}function da(e){W(st,st.current),W(zt,e),Pt===null&&(Pt=e)}function Wc(e){e.tag===22?(W(st,st.current),W(zt,e),Pt===null&&(Pt=e)):Gi()}function Gi(){W(st,st.current),W(zt,zt.current)}function Nt(e){j(zt),Pt===e&&(Pt=null),j(st)}var st=w(0);function kn(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||yo(i)||bo(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 bi=0,Ee=null,Ke=null,lt=null,Hn=!1,Qs=!1,bs=!1,zn=0,Or=0,Ws=null,Jd=0;function et(){throw Error(G(321))}function _a(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function va(e,t,i,s,r,n){return bi=n,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?Ou:Ma,bs=!1,n=i(s,r),bs=!1,Qs&&(n=Jc(t,i,s,r)),Zc(e),n}function Zc(e){N.H=zr;var t=Ke!==null&&Ke.next!==null;if(bi=0,lt=Ke=Ee=null,Hn=!1,Or=0,Ws=null,t)throw Error(G(300));e===null||at||(e=e.dependencies,e!==null&&Dn(e)&&(at=!0))}function Jc(e,t,i,s){Ee=e;var r=0;do{if(Qs&&(Ws=null),Or=0,Qs=!1,25<=r)throw Error(G(301));if(r+=1,lt=Ke=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}N.H=ku,n=t(i,s)}while(Qs);return n}function $d(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?kr(t):t,e=e.useState()[0],(Ke!==null?Ke.memoizedState:null)!==e&&(Ee.flags|=1024),t}function ma(){var e=zn!==0;return zn=0,e}function ga(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function pa(e){if(Hn){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Hn=!1}bi=0,lt=Ke=Ee=null,Qs=!1,Or=zn=0,Ws=null}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ee.memoizedState=lt=e:lt=lt.next=e,lt}function rt(){if(Ke===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ke.next;var t=lt===null?Ee.memoizedState:lt.next;if(t!==null)lt=t,Ke=e;else{if(e===null)throw Ee.alternate===null?Error(G(467)):Error(G(310));Ke=e,e={memoizedState:Ke.memoizedState,baseState:Ke.baseState,baseQueue:Ke.baseQueue,queue:Ke.queue,next:null},lt===null?Ee.memoizedState=lt=e:lt=lt.next=e}return lt}function Nn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(e){var t=Or;return Or+=1,Ws===null&&(Ws=[]),e=Kc(Ws,e,t),t=Ee,(lt===null?t.memoizedState:lt.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?Ou:Ma),e}function Un(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kr(e);if(e.$$typeof===c)return mt(e)}throw Error(G(438,String(e)))}function Sa(e){var t=null,i=Ee.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ee.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=Nn(),Ee.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]=B;return t.index++,i}function Ci(e,t){return typeof t=="function"?t(e):t}function jn(e){var t=rt();return ya(t,Ke,e)}function ya(e,t,i){var s=e.queue;if(s===null)throw Error(G(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 R=m=null,z=null,V=t,ie=!1;do{var ne=V.lane&-536870913;if(ne!==V.lane?(Te&ne)===ne:(bi&ne)===ne){var Q=V.revertLane;if(Q===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),ne===Gs&&(ie=!0);else if((bi&Q)===Q){V=V.next,Q===Gs&&(ie=!0);continue}else ne={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},z===null?(R=z=ne,m=n):z=z.next=ne,Ee.lanes|=Q,Vi|=Q;ne=V.action,bs&&i(n,ne),n=V.hasEagerState?V.eagerState:i(n,ne)}else Q={lane:ne,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},z===null?(R=z=Q,m=n):z=z.next=Q,Ee.lanes|=ne,Vi|=ne;V=V.next}while(V!==null&&V!==t);if(z===null?m=n:z.next=R,!kt(n,e.memoizedState)&&(at=!0,ie&&(i=Xs,i!==null)))throw i;e.memoizedState=n,e.baseState=m,e.baseQueue=z,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function ba(e){var t=rt(),i=t.queue;if(i===null)throw Error(G(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);kt(n,t.memoizedState)||(at=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function $c(e,t,i){var s=Ee,r=rt(),n=Be;if(n){if(i===void 0)throw Error(G(407));i=i()}else i=t();var m=!kt((Ke||r).memoizedState,i);if(m&&(r.memoizedState=i,at=!0),r=r.queue,wa(iu.bind(null,s,r,e),[e]),r.getSnapshot!==t||m||lt!==null&<.memoizedState.tag&1){if(s.flags|=2048,Zs(9,{destroy:void 0},tu.bind(null,s,r,i,t),null),Fe===null)throw Error(G(349));n||(bi&127)!==0||eu(s,t,i)}return i}function eu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ee.updateQueue,t===null?(t=Nn(),Ee.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function tu(e,t,i,s){t.value=i,t.getSnapshot=s,su(t)&&ru(e)}function iu(e,t,i){return i(function(){su(t)&&ru(e)})}function su(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function ru(e){var t=fs(e,2);t!==null&&Lt(t,e,2)}function Ca(e){var t=Et();if(typeof e=="function"){var i=e;if(e=i(),bs){_t(!0);try{i()}finally{_t(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:e},t}function nu(e,t,i,s){return e.baseState=i,ya(e,Ke,typeof s=="function"?s:Ci)}function e_(e,t,i,s,r){if(Kn(e))throw Error(G(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)}};N.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,lu(t,n)):(n.next=i.next,t.pending=i.next=n)}}function lu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=N.T,m={};N.T=m;try{var R=i(r,s),z=N.S;z!==null&&z(m,R),au(e,t,R)}catch(V){Ea(e,t,V)}finally{n!==null&&m.types!==null&&(n.types=m.types),N.T=n}}else try{n=i(r,s),au(e,t,n)}catch(V){Ea(e,t,V)}}function au(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){ou(e,t,s)},function(s){return Ea(e,t,s)}):ou(e,t,i)}function ou(e,t,i){t.status="fulfilled",t.value=i,cu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,lu(e,i)))}function Ea(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,cu(t),t=t.next;while(t!==s)}e.action=null}function cu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function uu(e,t){return t}function hu(e,t){if(Be){var i=Fe.formState;if(i!==null){e:{var s=Ee;if(Be){if(Qe){t:{for(var r=Qe,n=Vt;r.nodeType!==8;){if(!n){r=null;break t}if(r=Qt(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){Qe=Qt(r.nextSibling),s=r.data==="F!";break e}}Ui(s)}s=!1}s&&(t=i[0])}}return i=Et(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:uu,lastRenderedState:t},i.queue=s,i=Mu.bind(null,Ee,s),s.dispatch=i,s=Ca(!1),n=Ra.bind(null,Ee,!1,s.queue),s=Et(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=e_.bind(null,Ee,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function fu(e){var t=rt();return du(t,Ke,e)}function du(e,t,i){if(t=ya(e,t,uu)[0],e=jn(Ci)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=kr(t)}catch(m){throw m===Fs?Rn:m}else s=t;t=rt();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Ee.flags|=2048,Zs(9,{destroy:void 0},t_.bind(null,r,i),null)),[s,n,e]}function t_(e,t){e.action=t}function _u(e){var t=rt(),i=Ke;if(i!==null)return du(t,i,e);rt(),t=t.memoizedState,i=rt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Zs(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Nn(),Ee.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 vu(){return rt().memoizedState}function qn(e,t,i,s){var r=Et();Ee.flags|=e,r.memoizedState=Zs(1|t,{destroy:void 0},i,s===void 0?null:s)}function In(e,t,i,s){var r=rt();s=s===void 0?null:s;var n=r.memoizedState.inst;Ke!==null&&s!==null&&_a(s,Ke.memoizedState.deps)?r.memoizedState=Zs(t,n,i,s):(Ee.flags|=e,r.memoizedState=Zs(1|t,n,i,s))}function mu(e,t){qn(8390656,8,e,t)}function wa(e,t){In(2048,8,e,t)}function i_(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Nn(),Ee.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function gu(e){var t=rt().memoizedState;return i_({ref:t,nextImpl:e}),function(){if((ze&2)!==0)throw Error(G(440));return t.impl.apply(void 0,arguments)}}function pu(e,t){return In(4,2,e,t)}function Su(e,t){return In(4,4,e,t)}function yu(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 bu(e,t,i){i=i!=null?i.concat([e]):null,In(4,4,yu.bind(null,t,e),i)}function xa(){}function Cu(e,t){var i=rt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&_a(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Eu(e,t){var i=rt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&_a(t,s[1]))return s[0];if(s=e(),bs){_t(!0);try{e()}finally{_t(!1)}}return i.memoizedState=[s,t],s}function Da(e,t,i){return i===void 0||(bi&1073741824)!==0&&(Te&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=wh(),Ee.lanes|=e,Vi|=e,i)}function wu(e,t,i,s){return kt(i,t)?i:Ps.current!==null?(e=Da(e,i,s),kt(e,t)||(at=!0),e):(bi&42)===0||(bi&1073741824)!==0&&(Te&261930)===0?(at=!0,e.memoizedState=i):(e=wh(),Ee.lanes|=e,Vi|=e,t)}function xu(e,t,i,s,r){var n=K.p;K.p=n!==0&&8>n?n:8;var m=N.T,R={};N.T=R,Ra(e,!1,t,i);try{var z=r(),V=N.S;if(V!==null&&V(R,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ie=Zd(z,s);Hr(e,t,ie,qt(e))}else Hr(e,t,s,qt(e))}catch(ne){Hr(e,t,{then:function(){},status:"rejected",reason:ne},qt())}finally{K.p=n,m!==null&&R.types!==null&&(m.types=R.types),N.T=m}}function s_(){}function Aa(e,t,i,s){if(e.tag!==5)throw Error(G(476));var r=Du(e).queue;xu(e,r,t,A,i===null?s_:function(){return Au(e),i(s)})}function Du(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:A,baseState:A,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:A},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ci,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Au(e){var t=Du(e);t.next===null&&(t=e.alternate.memoizedState),Hr(e,t.next.queue,{},qt())}function Ta(){return mt(Jr)}function Tu(){return rt().memoizedState}function Ru(){return rt().memoizedState}function r_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=qt();e=Ii(i);var s=Ki(t,e,i);s!==null&&(Lt(s,t,i),Mr(s,t,i)),t={cache:sa()},e.payload=t;return}t=t.return}}function n_(e,t,i){var s=qt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Kn(e)?Lu(t,i):(i=Fl(e,t,i,s),i!==null&&(Lt(i,e,s),Bu(i,t,s)))}function Mu(e,t,i){var s=qt();Hr(e,t,i,s)}function Hr(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Kn(e))Lu(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,R=n(m,i);if(r.hasEagerState=!0,r.eagerState=R,kt(R,m))return Cn(e,t,r,0),Fe===null&&bn(),!1}catch{}if(i=Fl(e,t,r,s),i!==null)return Lt(i,e,s),Bu(i,t,s),!0}return!1}function Ra(e,t,i,s){if(s={lane:2,revertLane:ao(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},Kn(e)){if(t)throw Error(G(479))}else t=Fl(e,i,s,2),t!==null&&Lt(t,e,2)}function Kn(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Lu(e,t){Qs=Hn=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Bu(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,ae(e,i)}}var zr={readContext:mt,use:Un,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};zr.useEffectEvent=et;var Ou={readContext:mt,use:Un,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:mu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,qn(4194308,4,yu.bind(null,t,e),i)},useLayoutEffect:function(e,t){return qn(4194308,4,e,t)},useInsertionEffect:function(e,t){qn(4,2,e,t)},useMemo:function(e,t){var i=Et();t=t===void 0?null:t;var s=e();if(bs){_t(!0);try{e()}finally{_t(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=Et();if(i!==void 0){var r=i(t);if(bs){_t(!0);try{i(t)}finally{_t(!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=n_.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:function(e){e=Ca(e);var t=e.queue,i=Mu.bind(null,Ee,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:xa,useDeferredValue:function(e,t){var i=Et();return Da(i,e,t)},useTransition:function(){var e=Ca(!1);return e=xu.bind(null,Ee,e.queue,!0,!1),Et().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ee,r=Et();if(Be){if(i===void 0)throw Error(G(407));i=i()}else{if(i=t(),Fe===null)throw Error(G(349));(Te&127)!==0||eu(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,mu(iu.bind(null,s,n,e),[e]),s.flags|=2048,Zs(9,{destroy:void 0},tu.bind(null,s,n,i,t),null),i},useId:function(){var e=Et(),t=Fe.identifierPrefix;if(Be){var i=ci,s=oi;i=(s&~(1<<32-ct(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=zn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=Jd++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ta,useFormState:hu,useActionState:hu,useOptimistic:function(e){var t=Et();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ra.bind(null,Ee,!0,i),i.dispatch=t,[e,t]},useMemoCache:Sa,useCacheRefresh:function(){return Et().memoizedState=r_.bind(null,Ee)},useEffectEvent:function(e){var t=Et(),i={impl:e};return t.memoizedState=i,function(){if((ze&2)!==0)throw Error(G(440));return i.impl.apply(void 0,arguments)}}},Ma={readContext:mt,use:Un,useCallback:Cu,useContext:mt,useEffect:wa,useImperativeHandle:bu,useInsertionEffect:pu,useLayoutEffect:Su,useMemo:Eu,useReducer:jn,useRef:vu,useState:function(){return jn(Ci)},useDebugValue:xa,useDeferredValue:function(e,t){var i=rt();return wu(i,Ke.memoizedState,e,t)},useTransition:function(){var e=jn(Ci)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:kr(e),t]},useSyncExternalStore:$c,useId:Tu,useHostTransitionStatus:Ta,useFormState:fu,useActionState:fu,useOptimistic:function(e,t){var i=rt();return nu(i,Ke,e,t)},useMemoCache:Sa,useCacheRefresh:Ru};Ma.useEffectEvent=gu;var ku={readContext:mt,use:Un,useCallback:Cu,useContext:mt,useEffect:wa,useImperativeHandle:bu,useInsertionEffect:pu,useLayoutEffect:Su,useMemo:Eu,useReducer:ba,useRef:vu,useState:function(){return ba(Ci)},useDebugValue:xa,useDeferredValue:function(e,t){var i=rt();return Ke===null?Da(i,e,t):wu(i,Ke.memoizedState,e,t)},useTransition:function(){var e=ba(Ci)[0],t=rt().memoizedState;return[typeof e=="boolean"?e:kr(e),t]},useSyncExternalStore:$c,useId:Tu,useHostTransitionStatus:Ta,useFormState:_u,useActionState:_u,useOptimistic:function(e,t){var i=rt();return Ke!==null?nu(i,Ke,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Sa,useCacheRefresh:Ru};ku.useEffectEvent=gu;function La(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:h({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Ba={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=qt(),r=Ii(s);r.payload=t,i!=null&&(r.callback=i),t=Ki(e,r,s),t!==null&&(Lt(t,e,s),Mr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=qt(),r=Ii(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=Ki(e,r,s),t!==null&&(Lt(t,e,s),Mr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=qt(),s=Ii(i);s.tag=2,t!=null&&(s.callback=t),t=Ki(e,s,i),t!==null&&(Lt(t,e,i),Mr(t,e,i))}};function Hu(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?!Cr(i,s)||!Cr(r,n):!0}function zu(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&&Ba.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=h({},i));for(var r in e)i[r]===void 0&&(i[r]=e[r])}return i}function Nu(e){yn(e)}function Uu(e){console.error(e)}function ju(e){yn(e)}function Yn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function qu(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 Oa(e,t,i){return i=Ii(i),i.tag=3,i.payload={element:null},i.callback=function(){Yn(e,t)},i}function Iu(e){return e=Ii(e),e.tag=3,e}function Ku(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(){qu(t,i,s)}}var m=i.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){qu(t,i,s),typeof r!="function"&&(Pi===null?Pi=new Set([this]):Pi.add(this));var R=s.stack;this.componentDidCatch(s.value,{componentStack:R!==null?R:""})})}function l_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Ys(t,i,r,!0),i=zt.current,i!==null){switch(i.tag){case 31:case 13:return Pt===null?tl():i.alternate===null&&tt===0&&(tt=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===Mn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),ro(e,s,r)),!1;case 22:return i.flags|=65536,s===Mn?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)),ro(e,s,r)),!1}throw Error(G(435,i.tag))}return ro(e,s,r),tl(),!1}if(Be)return t=zt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Jl&&(e=Error(G(422),{cause:s}),xr(Gt(e,i)))):(s!==Jl&&(t=Error(G(423),{cause:s}),xr(Gt(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=Gt(s,i),r=Oa(e.stateNode,s,r),ca(e,r),tt!==4&&(tt=2)),!1;var n=Error(G(520),{cause:s});if(n=Gt(n,i),Gr===null?Gr=[n]:Gr.push(n),tt!==4&&(tt=2),t===null)return!0;s=Gt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=Oa(i.stateNode,s,e),ca(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"&&(Pi===null||!Pi.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=Iu(r),Ku(r,e,i,s),ca(i,r),!1}i=i.return}while(i!==null);return!1}var ka=Error(G(461)),at=!1;function gt(e,t,i,s){t.child=e===null?Fc(t,null,i,s):ys(t,e.child,i,s)}function Yu(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var m={};for(var R in s)R!=="ref"&&(m[R]=s[R])}else m=s;return ms(t),s=va(e,t,i,m,n,r),R=ma(),e!==null&&!at?(ga(e,t,r),Ei(e,t,r)):(Be&&R&&Wl(t),t.flags|=1,gt(e,t,s,r),t.child)}function Gu(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!Vl(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,Xu(e,t,n,s,r)):(e=wn(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!Ka(e,r)){var m=n.memoizedProps;if(i=i.compare,i=i!==null?i:Cr,i(m,s)&&e.ref===t.ref)return Ei(e,t,r)}return t.flags|=1,e=gi(n,s),e.ref=t.ref,e.return=t,t.child=e}function Xu(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(Cr(n,s)&&e.ref===t.ref)if(at=!1,t.pendingProps=s=n,Ka(e,r))(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Ei(e,t,r)}return Ha(e,t,i,s,r)}function Fu(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 Vu(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Tn(t,n!==null?n.cachePool:null),n!==null?Qc(t,n):ha(),Wc(t);else return s=t.lanes=536870912,Vu(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(Tn(t,n.cachePool),Qc(t,n),Gi(),t.memoizedState=null):(e!==null&&Tn(t,null),ha(),Gi());return gt(e,t,r,i),t.child}function Nr(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Vu(e,t,i,s,r){var n=na();return n=n===null?null:{parent:nt._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&Tn(t,null),ha(),Wc(t),e!==null&&Ys(e,t,s,!0),t.childLanes=r,null}function Gn(e,t){return t=Fn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Pu(e,t,i){return ys(t,e.child,null,i),e=Gn(t,t.pendingProps),e.flags|=2,Nt(t),t.memoizedState=null,e}function a_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Be){if(s.mode==="hidden")return e=Gn(t,s),t.lanes=536870912,Nr(null,e);if(da(t),(e=Qe)?(e=af(e,Vt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi!==null?{id:oi,overflow:ci}:null,retryLane:536870912,hydrationErrors:null},i=Lc(e),i.return=t,t.child=i,vt=t,Qe=null)):e=null,e===null)throw Ui(t);return t.lanes=536870912,null}return Gn(t,s)}var n=e.memoizedState;if(n!==null){var m=n.dehydrated;if(da(t),r)if(t.flags&256)t.flags&=-257,t=Pu(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(G(558));else if(at||Ys(e,t,i,!1),r=(i&e.childLanes)!==0,at||r){if(s=Fe,s!==null&&(m=de(s,i),m!==0&&m!==n.retryLane))throw n.retryLane=m,fs(e,m),Lt(s,e,m),ka;tl(),t=Pu(e,t,i)}else e=n.treeContext,Qe=Qt(m.nextSibling),vt=t,Be=!0,Ni=null,Vt=!1,e!==null&&kc(t,e),t=Gn(t,s),t.flags|=4096;return t}return e=gi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xn(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(G(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Ha(e,t,i,s,r){return ms(t),i=va(e,t,i,s,void 0,r),s=ma(),e!==null&&!at?(ga(e,t,r),Ei(e,t,r)):(Be&&s&&Wl(t),t.flags|=1,gt(e,t,i,r),t.child)}function Qu(e,t,i,s,r,n){return ms(t),t.updateQueue=null,i=Jc(t,s,i,r),Zc(e),s=ma(),e!==null&&!at?(ga(e,t,n),Ei(e,t,n)):(Be&&s&&Wl(t),t.flags|=1,gt(e,t,i,n),t.child)}function Wu(e,t,i,s,r){if(ms(t),t.stateNode===null){var n=js,m=i.contextType;typeof m=="object"&&m!==null&&(n=mt(m)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=Ba,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},aa(t),m=i.contextType,n.context=typeof m=="object"&&m!==null?mt(m):js,n.state=t.memoizedState,m=i.getDerivedStateFromProps,typeof m=="function"&&(La(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&&Ba.enqueueReplaceState(n,n.state,null),Br(t,s,n,r),Lr(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var R=t.memoizedProps,z=Cs(i,R);n.props=z;var V=n.context,ie=i.contextType;m=js,typeof ie=="object"&&ie!==null&&(m=mt(ie));var ne=i.getDerivedStateFromProps;ie=typeof ne=="function"||typeof n.getSnapshotBeforeUpdate=="function",R=t.pendingProps!==R,ie||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(R||V!==m)&&zu(t,n,s,m),qi=!1;var Q=t.memoizedState;n.state=Q,Br(t,s,n,r),Lr(),V=t.memoizedState,R||Q!==V||qi?(typeof ne=="function"&&(La(t,i,ne,s),V=t.memoizedState),(z=qi||Hu(t,i,z,s,Q,V,m))?(ie||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=z):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,oa(e,t),m=t.memoizedProps,ie=Cs(i,m),n.props=ie,ne=t.pendingProps,Q=n.context,V=i.contextType,z=js,typeof V=="object"&&V!==null&&(z=mt(V)),R=i.getDerivedStateFromProps,(V=typeof R=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(m!==ne||Q!==z)&&zu(t,n,s,z),qi=!1,Q=t.memoizedState,n.state=Q,Br(t,s,n,r),Lr();var J=t.memoizedState;m!==ne||Q!==J||qi||e!==null&&e.dependencies!==null&&Dn(e.dependencies)?(typeof R=="function"&&(La(t,i,R,s),J=t.memoizedState),(ie=qi||Hu(t,i,ie,s,Q,J,z)||e!==null&&e.dependencies!==null&&Dn(e.dependencies))?(V||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,J,z),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,J,z)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||m===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=J),n.props=s,n.state=J,n.context=z,s=ie):(typeof n.componentDidUpdate!="function"||m===e.memoizedProps&&Q===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&Q===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,Xn(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=ys(t,e.child,null,r),t.child=ys(t,null,i,r)):gt(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Ei(e,t,r),e}function Zu(e,t,i,s){return _s(),t.flags|=256,gt(e,t,i,s),t.child}var za={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Na(e){return{baseLanes:e,cachePool:qc()}}function Ua(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=jt),e}function Ju(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:(st.current&2)!==0),m&&(r=!0,t.flags&=-129),m=(t.flags&32)!==0,t.flags&=-33,e===null){if(Be){if(r?Yi(t):Gi(),(e=Qe)?(e=af(e,Vt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:zi!==null?{id:oi,overflow:ci}:null,retryLane:536870912,hydrationErrors:null},i=Lc(e),i.return=t,t.child=i,vt=t,Qe=null)):e=null,e===null)throw Ui(t);return bo(e)?t.lanes=32:t.lanes=536870912,null}var R=s.children;return s=s.fallback,r?(Gi(),r=t.mode,R=Fn({mode:"hidden",children:R},r),s=ds(s,r,i,null),R.return=t,s.return=t,R.sibling=s,t.child=R,s=t.child,s.memoizedState=Na(i),s.childLanes=Ua(e,m,i),t.memoizedState=za,Nr(null,s)):(Yi(t),ja(t,R))}var z=e.memoizedState;if(z!==null&&(R=z.dehydrated,R!==null)){if(n)t.flags&256?(Yi(t),t.flags&=-257,t=qa(e,t,i)):t.memoizedState!==null?(Gi(),t.child=e.child,t.flags|=128,t=null):(Gi(),R=s.fallback,r=t.mode,s=Fn({mode:"visible",children:s.children},r),R=ds(R,r,i,null),R.flags|=2,s.return=t,R.return=t,s.sibling=R,t.child=s,ys(t,e.child,null,i),s=t.child,s.memoizedState=Na(i),s.childLanes=Ua(e,m,i),t.memoizedState=za,t=Nr(null,s));else if(Yi(t),bo(R)){if(m=R.nextSibling&&R.nextSibling.dataset,m)var V=m.dgst;m=V,s=Error(G(419)),s.stack="",s.digest=m,xr({value:s,source:null,stack:null}),t=qa(e,t,i)}else if(at||Ys(e,t,i,!1),m=(i&e.childLanes)!==0,at||m){if(m=Fe,m!==null&&(s=de(m,i),s!==0&&s!==z.retryLane))throw z.retryLane=s,fs(e,s),Lt(m,e,s),ka;yo(R)||tl(),t=qa(e,t,i)}else yo(R)?(t.flags|=192,t.child=e.child,t=null):(e=z.treeContext,Qe=Qt(R.nextSibling),vt=t,Be=!0,Ni=null,Vt=!1,e!==null&&kc(t,e),t=ja(t,s.children),t.flags|=4096);return t}return r?(Gi(),R=s.fallback,r=t.mode,z=e.child,V=z.sibling,s=gi(z,{mode:"hidden",children:s.children}),s.subtreeFlags=z.subtreeFlags&65011712,V!==null?R=gi(V,R):(R=ds(R,r,i,null),R.flags|=2),R.return=t,s.return=t,s.sibling=R,t.child=s,Nr(null,s),s=t.child,R=e.child.memoizedState,R===null?R=Na(i):(r=R.cachePool,r!==null?(z=nt._currentValue,r=r.parent!==z?{parent:z,pool:z}:r):r=qc(),R={baseLanes:R.baseLanes|i,cachePool:r}),s.memoizedState=R,s.childLanes=Ua(e,m,i),t.memoizedState=za,Nr(e.child,s)):(Yi(t),i=e.child,e=i.sibling,i=gi(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 ja(e,t){return t=Fn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Fn(e,t){return e=Ht(22,e,null,t),e.lanes=0,e}function qa(e,t,i){return ys(t,e.child,null,i),e=ja(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $u(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),ta(e.return,t,i)}function Ia(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 eh(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var m=st.current,R=(m&2)!==0;if(R?(m=m&1|2,t.flags|=128):m&=1,W(st,m),gt(e,t,s,i),s=Be?wr:0,!R&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$u(e,i,t);else if(e.tag===19)$u(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&&kn(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),Ia(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&&kn(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}Ia(t,!0,i,null,n,s);break;case"together":Ia(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ei(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Vi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Ys(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(G(153));if(t.child!==null){for(e=t.child,i=gi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=gi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ka(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Dn(e)))}function o_(e,t,i){switch(t.tag){case 3:X(t,t.stateNode.containerInfo),ji(t,nt,e.memoizedState.cache),_s();break;case 27:case 5:se(t);break;case 4:X(t,t.stateNode.containerInfo);break;case 10:ji(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,da(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(Yi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Ju(e,t,i):(Yi(t),e=Ei(e,t,i),e!==null?e.sibling:null);Yi(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Ys(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return eh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),W(st,st.current),s)break;return null;case 22:return t.lanes=0,Fu(e,t,i,t.pendingProps);case 24:ji(t,nt,e.memoizedState.cache)}return Ei(e,t,i)}function th(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)at=!0;else{if(!Ka(e,i)&&(t.flags&128)===0)return at=!1,o_(e,t,i);at=(e.flags&131072)!==0}else at=!1,Be&&(t.flags&1048576)!==0&&Oc(t,wr,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=ps(t.elementType),t.type=e,typeof e=="function")Vl(e)?(s=Cs(e,s),t.tag=1,t=Wu(null,t,e,s,i)):(t.tag=0,t=Ha(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Yu(null,t,e,s,i);break e}else if(r===x){t.tag=14,t=Gu(null,t,e,s,i);break e}}throw t=Z(e)||e,Error(G(306,t,""))}}return t;case 0:return Ha(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Cs(s,t.pendingProps),Wu(e,t,s,r,i);case 3:e:{if(X(t,t.stateNode.containerInfo),e===null)throw Error(G(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,oa(e,t),Br(t,s,null,i);var m=t.memoizedState;if(s=m.cache,ji(t,nt,s),s!==n.cache&&ia(t,[nt],i,!0),Lr(),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=Zu(e,t,s,i);break e}else if(s!==r){r=Gt(Error(G(424)),t),xr(r),t=Zu(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,Qe=Qt(e.firstChild),vt=t,Be=!0,Ni=null,Vt=!0,i=Fc(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(_s(),s===r){t=Ei(e,t,i);break e}gt(e,t,s,i)}t=t.child}return t;case 26:return Xn(e,t),e===null?(i=df(t.type,null,t.pendingProps,null))?t.memoizedState=i:Be||(i=t.type,e=t.pendingProps,s=ol(fe.current).createElement(i),s[Le]=t,s[Pe]=e,pt(s,i,e),ft(s),t.stateNode=s):t.memoizedState=df(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return se(t),e===null&&Be&&(s=t.stateNode=uf(t.type,t.pendingProps,fe.current),vt=t,Vt=!0,r=Qe,Ji(t.type)?(Co=r,Qe=Qt(s.firstChild)):Qe=r),gt(e,t,t.pendingProps.children,i),Xn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Be&&((r=s=Qe)&&(s=U_(s,t.type,t.pendingProps,Vt),s!==null?(t.stateNode=s,vt=t,Qe=Qt(s.firstChild),Vt=!1,r=!0):r=!1),r||Ui(t)),se(t),r=t.type,n=t.pendingProps,m=e!==null?e.memoizedProps:null,s=n.children,go(r,n)?s=null:m!==null&&go(r,m)&&(t.flags|=32),t.memoizedState!==null&&(r=va(e,t,$d,null,null,i),Jr._currentValue=r),Xn(e,t),gt(e,t,s,i),t.child;case 6:return e===null&&Be&&((e=i=Qe)&&(i=j_(i,t.pendingProps,Vt),i!==null?(t.stateNode=i,vt=t,Qe=null,e=!0):e=!1),e||Ui(t)),null;case 13:return Ju(e,t,i);case 4:return X(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=ys(t,null,s,i):gt(e,t,s,i),t.child;case 11:return Yu(e,t,t.type,t.pendingProps,i);case 7:return gt(e,t,t.pendingProps,i),t.child;case 8:return gt(e,t,t.pendingProps.children,i),t.child;case 12:return gt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,ji(t,t.type,s.value),gt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,ms(t),r=mt(r),s=s(r),t.flags|=1,gt(e,t,s,i),t.child;case 14:return Gu(e,t,t.type,t.pendingProps,i);case 15:return Xu(e,t,t.type,t.pendingProps,i);case 19:return eh(e,t,i);case 31:return a_(e,t,i);case 22:return Fu(e,t,i,t.pendingProps);case 24:return ms(t),s=mt(nt),e===null?(r=na(),r===null&&(r=Fe,n=sa(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},aa(t),ji(t,nt,r)):((e.lanes&i)!==0&&(oa(e,t),Br(t,null,null,i),Lr()),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),ji(t,nt,s)):(s=n.cache,ji(t,nt,s),s!==r.cache&&ia(t,[nt],i,!0))),gt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(G(156,t.tag))}function wi(e){e.flags|=4}function Ya(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(Th())e.flags|=8192;else throw Ss=Mn,la}else e.flags&=-16777217}function ih(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!pf(t))if(Th())e.flags|=8192;else throw Ss=Mn,la}function Vn(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?hr():536870912,e.lanes|=t,tr|=t)}function Ur(e,t){if(!Be)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 We(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 c_(e,t,i){var s=t.pendingProps;switch(Zl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return We(t),null;case 1:return We(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),yi(nt),$(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Ks(t)?wi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,$l())),We(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(wi(t),n!==null?(We(t),ih(t,n)):(We(t),Ya(t,r,null,s,i))):n?n!==e.memoizedState?(wi(t),We(t),ih(t,n)):(We(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&wi(t),We(t),Ya(t,r,e,s,i)),null;case 27:if(pe(t),i=fe.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return We(t),null}e=te.current,Ks(t)?Hc(t):(e=uf(r,s,i),t.stateNode=e,wi(t))}return We(t),null;case 5:if(pe(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&wi(t);else{if(!s){if(t.stateNode===null)throw Error(G(166));return We(t),null}if(n=te.current,Ks(t))Hc(t);else{var m=ol(fe.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[Le]=t,n[Pe]=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(pt(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&&wi(t)}}return We(t),Ya(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&wi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(G(166));if(e=fe.current,Ks(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=vt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[Le]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Jh(e.nodeValue,i)),e||Ui(t,!0)}else e=ol(e).createTextNode(s),e[Le]=t,t.stateNode=e}return We(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=Ks(t),i!==null){if(e===null){if(!s)throw Error(G(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(G(557));e[Le]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),e=!1}else i=$l(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Nt(t),t):(Nt(t),null);if((t.flags&128)!==0)throw Error(G(558))}return We(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=Ks(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(G(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(G(317));r[Le]=t}else _s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;We(t),r=!1}else r=$l(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Nt(t),t):(Nt(t),null)}return Nt(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),Vn(t,t.updateQueue),We(t),null);case 4:return $(),e===null&&ho(t.stateNode.containerInfo),We(t),null;case 10:return yi(t.type),We(t),null;case 19:if(j(st),s=t.memoizedState,s===null)return We(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)Ur(s,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=kn(e),n!==null){for(t.flags|=128,Ur(s,!1),e=n.updateQueue,t.updateQueue=e,Vn(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Mc(i,e),i=i.sibling;return W(st,st.current&1|2),Be&&pi(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&it()>Jn&&(t.flags|=128,r=!0,Ur(s,!1),t.lanes=4194304)}else{if(!r)if(e=kn(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,Vn(t,e),Ur(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Be)return We(t),null}else 2*it()-s.renderingStartTime>Jn&&i!==536870912&&(t.flags|=128,r=!0,Ur(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=it(),e.sibling=null,i=st.current,W(st,r?i&1|2:i&1),Be&&pi(t,s.treeForkCount),e):(We(t),null);case 22:case 23:return Nt(t),fa(),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&&(We(t),t.subtreeFlags&6&&(t.flags|=8192)):We(t),i=t.updateQueue,i!==null&&Vn(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&&j(gs),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),yi(nt),We(t),null;case 25:return null;case 30:return null}throw Error(G(156,t.tag))}function u_(e,t){switch(Zl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return yi(nt),$(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return pe(t),null;case 31:if(t.memoizedState!==null){if(Nt(t),t.alternate===null)throw Error(G(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Nt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(G(340));_s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return j(st),null;case 4:return $(),null;case 10:return yi(t.type),null;case 22:case 23:return Nt(t),fa(),e!==null&&j(gs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return yi(nt),null;case 25:return null;default:return null}}function sh(e,t){switch(Zl(t),t.tag){case 3:yi(nt),$();break;case 26:case 27:case 5:pe(t);break;case 4:$();break;case 31:t.memoizedState!==null&&Nt(t);break;case 13:Nt(t);break;case 19:j(st);break;case 10:yi(t.type);break;case 22:case 23:Nt(t),fa(),e!==null&&j(gs);break;case 24:yi(nt)}}function jr(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(R){je(t,t.return,R)}}function Xi(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,R=m.destroy;if(R!==void 0){m.destroy=void 0,r=t;var z=i,V=R;try{V()}catch(ie){je(r,z,ie)}}}s=s.next}while(s!==n)}}catch(ie){je(t,t.return,ie)}}function rh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Pc(t,i)}catch(s){je(e,e.return,s)}}}function nh(e,t,i){i.props=Cs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){je(e,t,s)}}function qr(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){je(e,t,r)}}function ui(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){je(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){je(e,t,r)}else i.current=null}function lh(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){je(e,e.return,r)}}function Ga(e,t,i){try{var s=e.stateNode;B_(s,e.type,i,t),s[Pe]=t}catch(r){je(e,e.return,r)}}function ah(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ji(e.type)||e.tag===4}function Xa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ah(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&&Ji(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 Fa(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=vi));else if(s!==4&&(s===27&&Ji(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Fa(e,t,i),e=e.sibling;e!==null;)Fa(e,t,i),e=e.sibling}function Pn(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&&Ji(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Pn(e,t,i),e=e.sibling;e!==null;)Pn(e,t,i),e=e.sibling}function oh(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);pt(t,s,i),t[Le]=e,t[Pe]=i}catch(n){je(e,e.return,n)}}var xi=!1,ot=!1,Va=!1,ch=typeof WeakSet=="function"?WeakSet:Set,dt=null;function h_(e,t){if(e=e.containerInfo,vo=vl,e=bc(e),ql(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,R=-1,z=-1,V=0,ie=0,ne=e,Q=null;t:for(;;){for(var J;ne!==i||r!==0&&ne.nodeType!==3||(R=m+r),ne!==n||s!==0&&ne.nodeType!==3||(z=m+s),ne.nodeType===3&&(m+=ne.nodeValue.length),(J=ne.firstChild)!==null;)Q=ne,ne=J;for(;;){if(ne===e)break t;if(Q===i&&++V===r&&(R=m),Q===n&&++ie===s&&(z=m),(J=ne.nextSibling)!==null)break;ne=Q,Q=ne.parentNode}ne=J}i=R===-1||z===-1?null:{start:R,end:z}}else i=null}i=i||{start:0,end:0}}else i=null;for(mo={focusedElem:e,selectionRange:i},vl=!1,dt=t;dt!==null;)if(t=dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,dt=e;else for(;dt!==null;){switch(t=dt,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 he=Cs(i.type,r);e=s.getSnapshotBeforeUpdate(he,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(Se){je(i,i.return,Se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)So(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":So(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(G(163))}if(e=t.sibling,e!==null){e.return=t.return,dt=e;break}dt=t.return}}function uh(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Ai(e,i),s&4&&jr(5,i);break;case 1:if(Ai(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(m){je(i,i.return,m)}else{var r=Cs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(m){je(i,i.return,m)}}s&64&&rh(i),s&512&&qr(i,i.return);break;case 3:if(Ai(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{Pc(e,t)}catch(m){je(i,i.return,m)}}break;case 27:t===null&&s&4&&oh(i);case 26:case 5:Ai(e,i),t===null&&s&4&&lh(i),s&512&&qr(i,i.return);break;case 12:Ai(e,i);break;case 31:Ai(e,i),s&4&&dh(e,i);break;case 13:Ai(e,i),s&4&&_h(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=y_.bind(null,i),q_(e,i))));break;case 22:if(s=i.memoizedState!==null||xi,!s){t=t!==null&&t.memoizedState!==null||ot,r=xi;var n=ot;xi=s,(ot=t)&&!n?Ti(e,i,(i.subtreeFlags&8772)!==0):Ai(e,i),xi=r,ot=n}break;case 30:break;default:Ai(e,i)}}function hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&El(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 Je=null,At=!1;function Di(e,t,i){for(i=i.child;i!==null;)fh(e,t,i),i=i.sibling}function fh(e,t,i){if(Xe&&typeof Xe.onCommitFiberUnmount=="function")try{Xe.onCommitFiberUnmount(ri,i)}catch{}switch(i.tag){case 26:ot||ui(i,t),Di(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ot||ui(i,t);var s=Je,r=At;Ji(i.type)&&(Je=i.stateNode,At=!1),Di(e,t,i),Qr(i.stateNode),Je=s,At=r;break;case 5:ot||ui(i,t);case 6:if(s=Je,r=At,Je=null,Di(e,t,i),Je=s,At=r,Je!==null)if(At)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(i.stateNode)}catch(n){je(i,t,n)}else try{Je.removeChild(i.stateNode)}catch(n){je(i,t,n)}break;case 18:Je!==null&&(At?(e=Je,nf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),cr(e)):nf(Je,i.stateNode));break;case 4:s=Je,r=At,Je=i.stateNode.containerInfo,At=!0,Di(e,t,i),Je=s,At=r;break;case 0:case 11:case 14:case 15:Xi(2,i,t),ot||Xi(4,i,t),Di(e,t,i);break;case 1:ot||(ui(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&nh(i,t,s)),Di(e,t,i);break;case 21:Di(e,t,i);break;case 22:ot=(s=ot)||i.memoizedState!==null,Di(e,t,i),ot=s;break;default:Di(e,t,i)}}function dh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{cr(e)}catch(i){je(t,t.return,i)}}}function _h(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{cr(e)}catch(i){je(t,t.return,i)}}function f_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ch),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ch),t;default:throw Error(G(435,e.tag))}}function Qn(e,t){var i=f_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=b_.bind(null,e,s);s.then(r,r)}})}function Tt(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,R=m;e:for(;R!==null;){switch(R.tag){case 27:if(Ji(R.type)){Je=R.stateNode,At=!1;break e}break;case 5:Je=R.stateNode,At=!1;break e;case 3:case 4:Je=R.stateNode.containerInfo,At=!0;break e}R=R.return}if(Je===null)throw Error(G(160));fh(n,m,r),Je=null,At=!1,n=r.alternate,n!==null&&(n.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)vh(t,e),t=t.sibling}var ei=null;function vh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Tt(t,e),Rt(e),s&4&&(Xi(3,e,e.return),jr(3,e),Xi(5,e,e.return));break;case 1:Tt(t,e),Rt(e),s&512&&(ot||i===null||ui(i,i.return)),s&64&&xi&&(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=ei;if(Tt(t,e),Rt(e),s&512&&(ot||i===null||ui(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[dr]||n[Le]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),pt(n,s,i),n[Le]=e,ft(n),s=n;break e;case"link":var m=mf("link","href",r).get(s+(i.href||""));if(m){for(var R=0;R<m.length;R++)if(n=m[R],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(R,1);break t}}n=r.createElement(s),pt(n,s,i),r.head.appendChild(n);break;case"meta":if(m=mf("meta","content",r).get(s+(i.content||""))){for(R=0;R<m.length;R++)if(n=m[R],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(R,1);break t}}n=r.createElement(s),pt(n,s,i),r.head.appendChild(n);break;default:throw Error(G(468,s))}n[Le]=e,ft(n),s=n}e.stateNode=s}else gf(r,e.type,e.stateNode);else e.stateNode=vf(r,s,e.memoizedProps);else n!==s?(n===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):n.count--,s===null?gf(r,e.type,e.stateNode):vf(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Ga(e,e.memoizedProps,i.memoizedProps)}break;case 27:Tt(t,e),Rt(e),s&512&&(ot||i===null||ui(i,i.return)),i!==null&&s&4&&Ga(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Tt(t,e),Rt(e),s&512&&(ot||i===null||ui(i,i.return)),e.flags&32){r=e.stateNode;try{Bs(r,"")}catch(he){je(e,e.return,he)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Ga(e,r,i!==null?i.memoizedProps:r)),s&1024&&(Va=!0);break;case 6:if(Tt(t,e),Rt(e),s&4){if(e.stateNode===null)throw Error(G(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(he){je(e,e.return,he)}}break;case 3:if(hl=null,r=ei,ei=cl(t.containerInfo),Tt(t,e),ei=r,Rt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{cr(t.containerInfo)}catch(he){je(e,e.return,he)}Va&&(Va=!1,mh(e));break;case 4:s=ei,ei=cl(e.stateNode.containerInfo),Tt(t,e),Rt(e),ei=s;break;case 12:Tt(t,e),Rt(e);break;case 31:Tt(t,e),Rt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qn(e,s)));break;case 13:Tt(t,e),Rt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Zn=it()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qn(e,s)));break;case 22:r=e.memoizedState!==null;var z=i!==null&&i.memoizedState!==null,V=xi,ie=ot;if(xi=V||r,ot=ie||z,Tt(t,e),ot=ie,xi=V,Rt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||z||xi||ot||Es(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){z=i=t;try{if(n=z.stateNode,r)m=n.style,typeof m.setProperty=="function"?m.setProperty("display","none","important"):m.display="none";else{R=z.stateNode;var ne=z.memoizedProps.style,Q=ne!=null&&ne.hasOwnProperty("display")?ne.display:null;R.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(he){je(z,z.return,he)}}}else if(t.tag===6){if(i===null){z=t;try{z.stateNode.nodeValue=r?"":z.memoizedProps}catch(he){je(z,z.return,he)}}}else if(t.tag===18){if(i===null){z=t;try{var J=z.stateNode;r?lf(J,!0):lf(z.stateNode,!1)}catch(he){je(z,z.return,he)}}}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,Qn(e,i))));break;case 19:Tt(t,e),Rt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Qn(e,s)));break;case 30:break;case 21:break;default:Tt(t,e),Rt(e)}}function Rt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(ah(s)){i=s;break}s=s.return}if(i==null)throw Error(G(160));switch(i.tag){case 27:var r=i.stateNode,n=Xa(e);Pn(e,n,r);break;case 5:var m=i.stateNode;i.flags&32&&(Bs(m,""),i.flags&=-33);var R=Xa(e);Pn(e,R,m);break;case 3:case 4:var z=i.stateNode.containerInfo,V=Xa(e);Fa(e,V,z);break;default:throw Error(G(161))}}catch(ie){je(e,e.return,ie)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function mh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;mh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ai(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)uh(e,t.alternate,t),t=t.sibling}function Es(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Xi(4,t,t.return),Es(t);break;case 1:ui(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&nh(t,t.return,i),Es(t);break;case 27:Qr(t.stateNode);case 26:case 5:ui(t,t.return),Es(t);break;case 22:t.memoizedState===null&&Es(t);break;case 30:Es(t);break;default:Es(t)}e=e.sibling}}function Ti(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:Ti(r,n,i),jr(4,n);break;case 1:if(Ti(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(V){je(s,s.return,V)}if(s=n,r=s.updateQueue,r!==null){var R=s.stateNode;try{var z=r.shared.hiddenCallbacks;if(z!==null)for(r.shared.hiddenCallbacks=null,r=0;r<z.length;r++)Vc(z[r],R)}catch(V){je(s,s.return,V)}}i&&m&64&&rh(n),qr(n,n.return);break;case 27:oh(n);case 26:case 5:Ti(r,n,i),i&&s===null&&m&4&&lh(n),qr(n,n.return);break;case 12:Ti(r,n,i);break;case 31:Ti(r,n,i),i&&m&4&&dh(r,n);break;case 13:Ti(r,n,i),i&&m&4&&_h(r,n);break;case 22:n.memoizedState===null&&Ti(r,n,i),qr(n,n.return);break;case 30:break;default:Ti(r,n,i)}t=t.sibling}}function Pa(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&&Dr(i))}function Qa(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Dr(e))}function ti(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)gh(e,t,i,s),t=t.sibling}function gh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:ti(e,t,i,s),r&2048&&jr(9,t);break;case 1:ti(e,t,i,s);break;case 3:ti(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&&Dr(e)));break;case 12:if(r&2048){ti(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,m=n.id,R=n.onPostCommit;typeof R=="function"&&R(m,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(z){je(t,t.return,z)}}else ti(e,t,i,s);break;case 31:ti(e,t,i,s);break;case 13:ti(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,m=t.alternate,t.memoizedState!==null?n._visibility&2?ti(e,t,i,s):Ir(e,t):n._visibility&2?ti(e,t,i,s):(n._visibility|=2,Js(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Pa(m,t);break;case 24:ti(e,t,i,s),r&2048&&Qa(t.alternate,t);break;default:ti(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,R=i,z=s,V=m.flags;switch(m.tag){case 0:case 11:case 15:Js(n,m,R,z,r),jr(8,m);break;case 23:break;case 22:var ie=m.stateNode;m.memoizedState!==null?ie._visibility&2?Js(n,m,R,z,r):Ir(n,m):(ie._visibility|=2,Js(n,m,R,z,r)),r&&V&2048&&Pa(m.alternate,m);break;case 24:Js(n,m,R,z,r),r&&V&2048&&Qa(m.alternate,m);break;default:Js(n,m,R,z,r)}t=t.sibling}}function Ir(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:Ir(i,s),r&2048&&Pa(s.alternate,s);break;case 24:Ir(i,s),r&2048&&Qa(s.alternate,s);break;default:Ir(i,s)}t=t.sibling}}var Kr=8192;function $s(e,t,i){if(e.subtreeFlags&Kr)for(e=e.child;e!==null;)ph(e,t,i),e=e.sibling}function ph(e,t,i){switch(e.tag){case 26:$s(e,t,i),e.flags&Kr&&e.memoizedState!==null&&J_(i,ei,e.memoizedState,e.memoizedProps);break;case 5:$s(e,t,i);break;case 3:case 4:var s=ei;ei=cl(e.stateNode.containerInfo),$s(e,t,i),ei=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Kr,Kr=16777216,$s(e,t,i),Kr=s):$s(e,t,i));break;default:$s(e,t,i)}}function Sh(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 Yr(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];dt=s,bh(s,e)}Sh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)yh(e),e=e.sibling}function yh(e){switch(e.tag){case 0:case 11:case 15:Yr(e),e.flags&2048&&Xi(9,e,e.return);break;case 3:Yr(e);break;case 12:Yr(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wn(e)):Yr(e);break;default:Yr(e)}}function Wn(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];dt=s,bh(s,e)}Sh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Xi(8,t,t.return),Wn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Wn(t));break;default:Wn(t)}e=e.sibling}}function bh(e,t){for(;dt!==null;){var i=dt;switch(i.tag){case 0:case 11:case 15:Xi(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:Dr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,dt=s;else e:for(i=e;dt!==null;){s=dt;var r=s.sibling,n=s.return;if(hh(s),s===i){dt=null;break e}if(r!==null){r.return=n,dt=r;break e}dt=n}}}var d_={getCacheForType:function(e){var t=mt(nt),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return mt(nt).controller.signal}},__=typeof WeakMap=="function"?WeakMap:Map,ze=0,Fe=null,De=null,Te=0,Ue=0,Ut=null,Fi=!1,er=!1,Wa=!1,Ri=0,tt=0,Vi=0,ws=0,Za=0,jt=0,tr=0,Gr=null,Mt=null,Ja=!1,Zn=0,Ch=0,Jn=1/0,$n=null,Pi=null,ut=0,Qi=null,ir=null,Mi=0,$a=0,eo=null,Eh=null,Xr=0,to=null;function qt(){return(ze&2)!==0&&Te!==0?Te&-Te:N.T!==null?ao():ki()}function wh(){if(jt===0)if((Te&536870912)===0||Be){var e=ls;ls<<=1,(ls&3932160)===0&&(ls=262144),jt=e}else jt=536870912;return e=zt.current,e!==null&&(e.flags|=32),jt}function Lt(e,t,i){(e===Fe&&(Ue===2||Ue===9)||e.cancelPendingCommit!==null)&&(sr(e,0),Wi(e,Te,jt,!1)),Oi(e,i),((ze&2)===0||e!==Fe)&&(e===Fe&&((ze&2)===0&&(ws|=i),tt===4&&Wi(e,Te,jt,!1)),hi(e))}function xh(e,t,i){if((ze&6)!==0)throw Error(G(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||di(e,t),r=s?g_(e,t):so(e,t,!0),n=s;do{if(r===0){er&&!s&&Wi(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!v_(i)){r=so(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 R=e;r=Gr;var z=R.current.memoizedState.isDehydrated;if(z&&(sr(R,m).flags|=256),m=so(R,m,!1),m!==2){if(Wa&&!z){R.errorRecoveryDisabledLanes|=n,ws|=n,r=4;break e}n=Mt,Mt=r,n!==null&&(Mt===null?Mt=n:Mt.push.apply(Mt,n))}r=m}if(n=!1,r!==2)continue}}if(r===1){sr(e,0),Wi(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(G(345));case 4:if((t&4194048)!==t)break;case 6:Wi(s,t,jt,!Fi);break e;case 2:Mt=null;break;case 3:case 5:break;default:throw Error(G(329))}if((t&62914560)===t&&(r=Zn+300-it(),10<r)){if(Wi(s,t,jt,!Fi),li(s,0,!0)!==0)break e;Mi=t,s.timeoutHandle=sf(Dh.bind(null,s,i,Mt,$n,Ja,t,jt,ws,tr,Fi,n,"Throttled",-0,0),r);break e}Dh(s,i,Mt,$n,Ja,t,jt,ws,tr,Fi,n,null,-0,0)}}break}while(!0);hi(e)}function Dh(e,t,i,s,r,n,m,R,z,V,ie,ne,Q,J){if(e.timeoutHandle=-1,ne=t.subtreeFlags,ne&8192||(ne&16785408)===16785408){ne={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vi},ph(t,n,ne);var he=(n&62914560)===n?Zn-it():(n&4194048)===n?Ch-it():0;if(he=$_(ne,he),he!==null){Mi=n,e.cancelPendingCommit=he(kh.bind(null,e,t,n,i,s,r,m,R,z,ie,ne,null,Q,J)),Wi(e,n,m,!V);return}}kh(e,t,n,i,s,r,m,R,z)}function v_(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(!kt(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 Wi(e,t,i,s){t&=~Za,t&=~ws,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-ct(r),m=1<<n;s[n]=-1,r&=~m}i!==0&&cn(e,i,t)}function el(){return(ze&6)===0?(Fr(0),!1):!0}function io(){if(De!==null){if(Ue===0)var e=De.return;else e=De,Si=vs=null,pa(e),Vs=null,Tr=0,e=De;for(;e!==null;)sh(e.alternate,e),e=e.return;De=null}}function sr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,H_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Mi=0,io(),Fe=e,De=i=gi(e.current,null),Te=t,Ue=0,Ut=null,Fi=!1,er=di(e,t),Wa=!1,tr=jt=Za=ws=Vi=tt=0,Mt=Gr=null,Ja=!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-ct(s),n=1<<r;t|=e[r],s&=~n}return Ri=t,bn(),i}function Ah(e,t){Ee=null,N.H=zr,t===Fs||t===Rn?(t=Yc(),Ue=3):t===la?(t=Yc(),Ue=4):Ue=t===ka?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Ut=t,De===null&&(tt=1,Yn(e,Gt(t,e.current)))}function Th(){var e=zt.current;return e===null?!0:(Te&4194048)===Te?Pt===null:(Te&62914560)===Te||(Te&536870912)!==0?e===Pt:!1}function Rh(){var e=N.H;return N.H=zr,e===null?zr:e}function Mh(){var e=N.A;return N.A=d_,e}function tl(){tt=4,Fi||(Te&4194048)!==Te&&zt.current!==null||(er=!0),(Vi&134217727)===0&&(ws&134217727)===0||Fe===null||Wi(Fe,Te,jt,!1)}function so(e,t,i){var s=ze;ze|=2;var r=Rh(),n=Mh();(Fe!==e||Te!==t)&&($n=null,sr(e,t)),t=!1;var m=tt;e:do try{if(Ue!==0&&De!==null){var R=De,z=Ut;switch(Ue){case 8:io(),m=6;break e;case 3:case 2:case 9:case 6:zt.current===null&&(t=!0);var V=Ue;if(Ue=0,Ut=null,rr(e,R,z,V),i&&er){m=0;break e}break;default:V=Ue,Ue=0,Ut=null,rr(e,R,z,V)}}m_(),m=tt;break}catch(ie){Ah(e,ie)}while(!0);return t&&e.shellSuspendCounter++,Si=vs=null,ze=s,N.H=r,N.A=n,De===null&&(Fe=null,Te=0,bn()),m}function m_(){for(;De!==null;)Lh(De)}function g_(e,t){var i=ze;ze|=2;var s=Rh(),r=Mh();Fe!==e||Te!==t?($n=null,Jn=it()+500,sr(e,t)):er=di(e,t);e:do try{if(Ue!==0&&De!==null){t=De;var n=Ut;t:switch(Ue){case 1:Ue=0,Ut=null,rr(e,t,n,1);break;case 2:case 9:if(Ic(n)){Ue=0,Ut=null,Bh(t);break}t=function(){Ue!==2&&Ue!==9||Fe!==e||(Ue=7),hi(e)},n.then(t,t);break e;case 3:Ue=7;break e;case 4:Ue=5;break e;case 7:Ic(n)?(Ue=0,Ut=null,Bh(t)):(Ue=0,Ut=null,rr(e,t,n,7));break;case 5:var m=null;switch(De.tag){case 26:m=De.memoizedState;case 5:case 27:var R=De;if(m?pf(m):R.stateNode.complete){Ue=0,Ut=null;var z=R.sibling;if(z!==null)De=z;else{var V=R.return;V!==null?(De=V,il(V)):De=null}break t}}Ue=0,Ut=null,rr(e,t,n,5);break;case 6:Ue=0,Ut=null,rr(e,t,n,6);break;case 8:io(),tt=6;break e;default:throw Error(G(462))}}p_();break}catch(ie){Ah(e,ie)}while(!0);return Si=vs=null,N.H=s,N.A=r,ze=i,De!==null?0:(Fe=null,Te=0,bn(),tt)}function p_(){for(;De!==null&&!fi();)Lh(De)}function Lh(e){var t=th(e.alternate,e,Ri);e.memoizedProps=e.pendingProps,t===null?il(e):De=t}function Bh(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Qu(i,t,t.pendingProps,t.type,void 0,Te);break;case 11:t=Qu(i,t,t.pendingProps,t.type.render,t.ref,Te);break;case 5:pa(t);default:sh(i,t),t=De=Mc(t,Ri),t=th(i,t,Ri)}e.memoizedProps=e.pendingProps,t===null?il(e):De=t}function rr(e,t,i,s){Si=vs=null,pa(t),Vs=null,Tr=0;var r=t.return;try{if(l_(e,r,t,i,Te)){tt=1,Yn(e,Gt(i,e.current)),De=null;return}}catch(n){if(r!==null)throw De=r,n;tt=1,Yn(e,Gt(i,e.current)),De=null;return}t.flags&32768?(Be||s===1?e=!0:er||(Te&536870912)!==0?e=!1:(Fi=e=!0,(s===2||s===9||s===3||s===6)&&(s=zt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Oh(t,e)):il(t)}function il(e){var t=e;do{if((t.flags&32768)!==0){Oh(t,Fi);return}e=t.return;var i=c_(t.alternate,t,Ri);if(i!==null){De=i;return}if(t=t.sibling,t!==null){De=t;return}De=t=e}while(t!==null);tt===0&&(tt=5)}function Oh(e,t){do{var i=u_(e.alternate,e);if(i!==null){i.flags&=32767,De=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){De=e;return}De=e=i}while(e!==null);tt=6,De=null}function kh(e,t,i,s,r,n,m,R,z){e.cancelPendingCommit=null;do sl();while(ut!==0);if((ze&6)!==0)throw Error(G(327));if(t!==null){if(t===e.current)throw Error(G(177));if(n=t.lanes|t.childLanes,n|=Xl,on(e,i,n,m,R,z),e===Fe&&(De=Fe=null,Te=0),ir=t,Qi=e,Mi=i,$a=n,eo=r,Eh=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,C_(Ve,function(){return jh(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=N.T,N.T=null,r=K.p,K.p=2,m=ze,ze|=4;try{h_(e,t,i)}finally{ze=m,K.p=r,N.T=s}}ut=1,Hh(),zh(),Nh()}}function Hh(){if(ut===1){ut=0;var e=Qi,t=ir,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=N.T,N.T=null;var s=K.p;K.p=2;var r=ze;ze|=4;try{vh(t,e);var n=mo,m=bc(e.containerInfo),R=n.focusedElem,z=n.selectionRange;if(m!==R&&R&&R.ownerDocument&&yc(R.ownerDocument.documentElement,R)){if(z!==null&&ql(R)){var V=z.start,ie=z.end;if(ie===void 0&&(ie=V),"selectionStart"in R)R.selectionStart=V,R.selectionEnd=Math.min(ie,R.value.length);else{var ne=R.ownerDocument||document,Q=ne&&ne.defaultView||window;if(Q.getSelection){var J=Q.getSelection(),he=R.textContent.length,Se=Math.min(z.start,he),Ge=z.end===void 0?Se:Math.min(z.end,he);!J.extend&&Se>Ge&&(m=Ge,Ge=Se,Se=m);var Y=Sc(R,Se),q=Sc(R,Ge);if(Y&&q&&(J.rangeCount!==1||J.anchorNode!==Y.node||J.anchorOffset!==Y.offset||J.focusNode!==q.node||J.focusOffset!==q.offset)){var F=ne.createRange();F.setStart(Y.node,Y.offset),J.removeAllRanges(),Se>Ge?(J.addRange(F),J.extend(q.node,q.offset)):(F.setEnd(q.node,q.offset),J.addRange(F))}}}}for(ne=[],J=R;J=J.parentNode;)J.nodeType===1&&ne.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<ne.length;R++){var re=ne[R];re.element.scrollLeft=re.left,re.element.scrollTop=re.top}}vl=!!vo,mo=vo=null}finally{ze=r,K.p=s,N.T=i}}e.current=t,ut=2}}function zh(){if(ut===2){ut=0;var e=Qi,t=ir,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=N.T,N.T=null;var s=K.p;K.p=2;var r=ze;ze|=4;try{uh(e,t.alternate,t)}finally{ze=r,K.p=s,N.T=i}}ut=3}}function Nh(){if(ut===4||ut===3){ut=0,St();var e=Qi,t=ir,i=Mi,s=Eh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,ir=Qi=null,Uh(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(Pi=null),Ie(i),t=t.stateNode,Xe&&typeof Xe.onCommitFiberRoot=="function")try{Xe.onCommitFiberRoot(ri,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=N.T,r=K.p,K.p=2,N.T=null;try{for(var n=e.onRecoverableError,m=0;m<s.length;m++){var R=s[m];n(R.value,{componentStack:R.stack})}}finally{N.T=t,K.p=r}}(Mi&3)!==0&&sl(),hi(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===to?Xr++:(Xr=0,to=e):Xr=0,Fr(0)}}function Uh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Dr(t)))}function sl(){return Hh(),zh(),Nh(),jh()}function jh(){if(ut!==5)return!1;var e=Qi,t=$a;$a=0;var i=Ie(Mi),s=N.T,r=K.p;try{K.p=32>i?32:i,N.T=null,i=eo,eo=null;var n=Qi,m=Mi;if(ut=0,ir=Qi=null,Mi=0,(ze&6)!==0)throw Error(G(331));var R=ze;if(ze|=4,yh(n.current),gh(n,n.current,m,i),ze=R,Fr(0,!1),Xe&&typeof Xe.onPostCommitFiberRoot=="function")try{Xe.onPostCommitFiberRoot(ri,n)}catch{}return!0}finally{K.p=r,N.T=s,Uh(e,t)}}function qh(e,t,i){t=Gt(i,t),t=Oa(e.stateNode,t,2),e=Ki(e,t,2),e!==null&&(Oi(e,2),hi(e))}function je(e,t,i){if(e.tag===3)qh(e,e,i);else for(;t!==null;){if(t.tag===3){qh(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(Pi===null||!Pi.has(s))){e=Gt(i,e),i=Iu(2),s=Ki(t,i,2),s!==null&&(Ku(i,s,t,e),Oi(s,2),hi(s));break}}t=t.return}}function ro(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new __;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)||(Wa=!0,r.add(i),e=S_.bind(null,e,t,i),t.then(e,e))}function S_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Fe===e&&(Te&i)===i&&(tt===4||tt===3&&(Te&62914560)===Te&&300>it()-Zn?(ze&2)===0&&sr(e,0):Za|=i,tr===Te&&(tr=0)),hi(e)}function Ih(e,t){t===0&&(t=hr()),e=fs(e,t),e!==null&&(Oi(e,t),hi(e))}function y_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ih(e,i)}function b_(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(G(314))}s!==null&&s.delete(t),Ih(e,i)}function C_(e,t){return ii(e,t)}var rl=null,nr=null,no=!1,nl=!1,lo=!1,Zi=0;function hi(e){e!==nr&&e.next===null&&(nr===null?rl=nr=e:nr=nr.next=e),nl=!0,no||(no=!0,w_())}function Fr(e,t){if(!lo&&nl){lo=!0;do for(var i=!1,s=rl;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var m=s.suspendedLanes,R=s.pingedLanes;n=(1<<31-ct(42|e)+1)-1,n&=r&~(m&~R),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,Xh(s,n))}else n=Te,n=li(s,s===Fe?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||di(s,n)||(i=!0,Xh(s,n));s=s.next}while(i);lo=!1}}function E_(){Kh()}function Kh(){nl=no=!1;var e=0;Zi!==0&&k_()&&(e=Zi);for(var t=it(),i=null,s=rl;s!==null;){var r=s.next,n=Yh(s,t);n===0?(s.next=null,i===null?rl=r:i.next=r,r===null&&(nr=i)):(i=s,(e!==0||(n&3)!==0)&&(nl=!0)),s=r}ut!==0&&ut!==5||Fr(e),Zi!==0&&(Zi=0)}function Yh(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var m=31-ct(n),R=1<<m,z=r[m];z===-1?((R&i)===0||(R&s)!==0)&&(r[m]=an(R,t)):z<=t&&(e.expiredLanes|=R),n&=~R}if(t=Fe,i=Te,i=li(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&&ht(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||di(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&ht(s),Ie(i)){case 2:case 8:i=Ot;break;case 32:i=Ve;break;case 268435456:i=xt;break;default:i=Ve}return s=Gh.bind(null,e),i=ii(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&ht(s),e.callbackPriority=2,e.callbackNode=null,2}function Gh(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(sl()&&e.callbackNode!==i)return null;var s=Te;return s=li(e,e===Fe?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(xh(e,s,t),Yh(e,it()),e.callbackNode!=null&&e.callbackNode===i?Gh.bind(null,e):null)}function Xh(e,t){if(sl())return null;xh(e,t,!0)}function w_(){z_(function(){(ze&6)!==0?ii(Bt,E_):Kh()})}function ao(){if(Zi===0){var e=Gs;e===0&&(e=Bi,Bi<<=1,(Bi&261888)===0&&(Bi=256)),Zi=e}return Zi}function Fh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:dn(""+e)}function Vh(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 x_(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Fh((r[Pe]||null).action),m=s.submitter;m&&(t=(t=m[Pe]||null)?Fh(t.formAction):m.getAttribute("formAction"),t!==null&&(n=t,m=null));var R=new gn("action","action",null,s,r);e.push({event:R,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Zi!==0){var z=m?Vh(r,m):new FormData(r);Aa(i,{pending:!0,data:z,method:r.method,action:n},null,z)}}else typeof n=="function"&&(R.preventDefault(),z=m?Vh(r,m):new FormData(r),Aa(i,{pending:!0,data:z,method:r.method,action:n},n,z))},currentTarget:r}]})}}for(var oo=0;oo<Gl.length;oo++){var co=Gl[oo],D_=co.toLowerCase(),A_=co[0].toUpperCase()+co.slice(1);$t(D_,"on"+A_)}$t(wc,"onAnimationEnd"),$t(xc,"onAnimationIteration"),$t(Dc,"onAnimationStart"),$t("dblclick","onDoubleClick"),$t("focusin","onFocus"),$t("focusout","onBlur"),$t(Yd,"onTransitionRun"),$t(Gd,"onTransitionStart"),$t(Xd,"onTransitionCancel"),$t(Ac,"onTransitionEnd"),Ms("onMouseEnter",["mouseout","mouseover"]),Ms("onMouseLeave",["mouseout","mouseover"]),Ms("onPointerEnter",["pointerout","pointerover"]),Ms("onPointerLeave",["pointerout","pointerover"]),os("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),os("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),os("onBeforeInput",["compositionend","keypress","textInput","paste"]),os("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),os("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vr="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(" "),T_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vr));function Ph(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 R=s[m],z=R.instance,V=R.currentTarget;if(R=R.listener,z!==n&&r.isPropagationStopped())break e;n=R,r.currentTarget=V;try{n(r)}catch(ie){yn(ie)}r.currentTarget=null,n=z}else for(m=0;m<s.length;m++){if(R=s[m],z=R.instance,V=R.currentTarget,R=R.listener,z!==n&&r.isPropagationStopped())break e;n=R,r.currentTarget=V;try{n(r)}catch(ie){yn(ie)}r.currentTarget=null,n=z}}}}function Ae(e,t){var i=t[fr];i===void 0&&(i=t[fr]=new Set);var s=e+"__bubble";i.has(s)||(Qh(t,e,2,!1),i.add(s))}function uo(e,t,i){var s=0;t&&(s|=4),Qh(i,e,s,t)}var ll="_reactListening"+Math.random().toString(36).slice(2);function ho(e){if(!e[ll]){e[ll]=!0,Ko.forEach(function(i){i!=="selectionchange"&&(T_.has(i)||uo(i,!1,e),uo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ll]||(t[ll]=!0,uo("selectionchange",!1,t))}}function Qh(e,t,i,s){switch(xf(t)){case 2:var r=iv;break;case 8:r=sv;break;default:r=Ao}i=r.bind(null,t,i,e),r=void 0,!Ll||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 fo(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 R=s.stateNode.containerInfo;if(R===r)break;if(m===4)for(m=s.return;m!==null;){var z=m.tag;if((z===3||z===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;R!==null;){if(m=As(R),m===null)return;if(z=m.tag,z===5||z===6||z===26||z===27){s=n=m;continue e}R=R.parentNode}}s=s.return}ec(function(){var V=n,ie=Rl(i),ne=[];e:{var Q=Tc.get(e);if(Q!==void 0){var J=gn,he=e;switch(e){case"keypress":if(vn(i)===0)break e;case"keydown":case"keyup":J=bd;break;case"focusin":he="focus",J=Hl;break;case"focusout":he="blur",J=Hl;break;case"beforeblur":case"afterblur":J=Hl;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=sc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=cd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=wd;break;case wc:case xc:case Dc:J=fd;break;case Ac:J=Dd;break;case"scroll":case"scrollend":J=ad;break;case"wheel":J=Td;break;case"copy":case"cut":case"paste":J=_d;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=nc;break;case"toggle":case"beforetoggle":J=Md}var Se=(t&4)!==0,Ge=!Se&&(e==="scroll"||e==="scrollend"),Y=Se?Q!==null?Q+"Capture":null:Q;Se=[];for(var q=V,F;q!==null;){var re=q;if(F=re.stateNode,re=re.tag,re!==5&&re!==26&&re!==27||F===null||Y===null||(re=vr(q,Y),re!=null&&Se.push(Pr(q,re,F))),Ge)break;q=q.return}0<Se.length&&(Q=new J(Q,he,null,i,ie),ne.push({event:Q,listeners:Se}))}}if((t&7)===0){e:{if(Q=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",Q&&i!==Tl&&(he=i.relatedTarget||i.fromElement)&&(As(he)||he[ai]))break e;if((J||Q)&&(Q=ie.window===ie?ie:(Q=ie.ownerDocument)?Q.defaultView||Q.parentWindow:window,J?(he=i.relatedTarget||i.toElement,J=V,he=he?As(he):null,he!==null&&(Ge=ve(he),Se=he.tag,he!==Ge||Se!==5&&Se!==27&&Se!==6)&&(he=null)):(J=null,he=V),J!==he)){if(Se=sc,re="onMouseLeave",Y="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(Se=nc,re="onPointerLeave",Y="onPointerEnter",q="pointer"),Ge=J==null?Q:_r(J),F=he==null?Q:_r(he),Q=new Se(re,q+"leave",J,i,ie),Q.target=Ge,Q.relatedTarget=F,re=null,As(ie)===V&&(Se=new Se(Y,q+"enter",he,i,ie),Se.target=F,Se.relatedTarget=Ge,re=Se),Ge=re,J&&he)t:{for(Se=R_,Y=J,q=he,F=0,re=Y;re;re=Se(re))F++;re=0;for(var me=q;me;me=Se(me))re++;for(;0<F-re;)Y=Se(Y),F--;for(;0<re-F;)q=Se(q),re--;for(;F--;){if(Y===q||q!==null&&Y===q.alternate){Se=Y;break t}Y=Se(Y),q=Se(q)}Se=null}else Se=null;J!==null&&Wh(ne,Q,J,Se,!1),he!==null&&Ge!==null&&Wh(ne,Ge,he,Se,!0)}}e:{if(Q=V?_r(V):window,J=Q.nodeName&&Q.nodeName.toLowerCase(),J==="select"||J==="input"&&Q.type==="file")var ke=dc;else if(hc(Q))if(_c)ke=qd;else{ke=Ud;var _e=Nd}else J=Q.nodeName,!J||J.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?V&&Al(V.elementType)&&(ke=dc):ke=jd;if(ke&&(ke=ke(e,V))){fc(ne,ke,i,ie);break e}_e&&_e(e,Q,V),e==="focusout"&&V&&Q.type==="number"&&V.memoizedProps.value!=null&&Dl(Q,"number",Q.value)}switch(_e=V?_r(V):window,e){case"focusin":(hc(_e)||_e.contentEditable==="true")&&(zs=_e,Il=V,Er=null);break;case"focusout":Er=Il=zs=null;break;case"mousedown":Kl=!0;break;case"contextmenu":case"mouseup":case"dragend":Kl=!1,Cc(ne,i,ie);break;case"selectionchange":if(Kd)break;case"keydown":case"keyup":Cc(ne,i,ie)}var we;if(Nl)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else Hs?cc(e,i)&&(Re="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Re="onCompositionStart");Re&&(lc&&i.locale!=="ko"&&(Hs||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&Hs&&(we=tc()):(Hi=ie,Bl="value"in Hi?Hi.value:Hi.textContent,Hs=!0)),_e=al(V,Re),0<_e.length&&(Re=new rc(Re,e,null,i,ie),ne.push({event:Re,listeners:_e}),we?Re.data=we:(we=uc(i),we!==null&&(Re.data=we)))),(we=Bd?Od(e,i):kd(e,i))&&(Re=al(V,"onBeforeInput"),0<Re.length&&(_e=new rc("onBeforeInput","beforeinput",null,i,ie),ne.push({event:_e,listeners:Re}),_e.data=we)),x_(ne,e,V,i,ie)}Ph(ne,t)})}function Pr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function al(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=vr(e,i),r!=null&&s.unshift(Pr(e,r,n)),r=vr(e,t),r!=null&&s.push(Pr(e,r,n))),e.tag===3)return s;e=e.return}return[]}function R_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wh(e,t,i,s,r){for(var n=t._reactName,m=[];i!==null&&i!==s;){var R=i,z=R.alternate,V=R.stateNode;if(R=R.tag,z!==null&&z===s)break;R!==5&&R!==26&&R!==27||V===null||(z=V,r?(V=vr(i,n),V!=null&&m.unshift(Pr(i,V,z))):r||(V=vr(i,n),V!=null&&m.push(Pr(i,V,z)))),i=i.return}m.length!==0&&e.push({event:t,listeners:m})}var M_=/\r\n?/g,L_=/\u0000|\uFFFD/g;function Zh(e){return(typeof e=="string"?e:""+e).replace(M_,`
|
|
9
|
-
`).replace(L_,"")}function Jh(e,t){return t=Zh(t),Zh(e)===t}function Ye(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Bs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Bs(e,""+s);break;case"className":hn(e,"class",s);break;case"tabIndex":hn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":hn(e,i,s);break;case"style":Jo(e,s,n);break;case"data":if(t!=="object"){hn(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=dn(""+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"&&Ye(e,t,"name",r.name,r,null),Ye(e,t,"formEncType",r.formEncType,r,null),Ye(e,t,"formMethod",r.formMethod,r,null),Ye(e,t,"formTarget",r.formTarget,r,null)):(Ye(e,t,"encType",r.encType,r,null),Ye(e,t,"method",r.method,r,null),Ye(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=dn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=vi);break;case"onScroll":s!=null&&Ae("scroll",e);break;case"onScrollEnd":s!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(G(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(G(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=dn(""+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":Ae("beforetoggle",e),Ae("toggle",e),un(e,"popover",s);break;case"xlinkActuate":_i(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":_i(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":_i(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":_i(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":_i(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":_i(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":_i(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":_i(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":_i(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":un(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=nd.get(i)||i,un(e,i,s))}}function _o(e,t,i,s,r,n){switch(i){case"style":Jo(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(G(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(G(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Bs(e,s):(typeof s=="number"||typeof s=="bigint")&&Bs(e,""+s);break;case"onScroll":s!=null&&Ae("scroll",e);break;case"onScrollEnd":s!=null&&Ae("scrollend",e);break;case"onClick":s!=null&&(e.onclick=vi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Yo.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[Pe]||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,""):un(e,i,s)}}}function pt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("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(G(137,t));default:Ye(e,t,n,m,i,null)}}r&&Ye(e,t,"srcSet",i.srcSet,i,null),s&&Ye(e,t,"src",i.src,i,null);return;case"input":Ae("invalid",e);var R=n=m=r=null,z=null,V=null;for(s in i)if(i.hasOwnProperty(s)){var ie=i[s];if(ie!=null)switch(s){case"name":r=ie;break;case"type":m=ie;break;case"checked":z=ie;break;case"defaultChecked":V=ie;break;case"value":n=ie;break;case"defaultValue":R=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(G(137,t));break;default:Ye(e,t,s,ie,i,null)}}Po(e,n,R,z,V,m,r,!1);return;case"select":Ae("invalid",e),s=m=n=null;for(r in i)if(i.hasOwnProperty(r)&&(R=i[r],R!=null))switch(r){case"value":n=R;break;case"defaultValue":m=R;break;case"multiple":s=R;default:Ye(e,t,r,R,i,null)}t=n,i=m,e.multiple=!!s,t!=null?Ls(e,!!s,t,!1):i!=null&&Ls(e,!!s,i,!0);return;case"textarea":Ae("invalid",e),n=r=s=null;for(m in i)if(i.hasOwnProperty(m)&&(R=i[m],R!=null))switch(m){case"value":s=R;break;case"defaultValue":r=R;break;case"children":n=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(G(91));break;default:Ye(e,t,m,R,i,null)}Wo(e,s,r,n);return;case"option":for(z in i)i.hasOwnProperty(z)&&(s=i[z],s!=null)&&(z==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Ye(e,t,z,s,i,null));return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(s=0;s<Vr.length;s++)Ae(Vr[s],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("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(G(137,t));default:Ye(e,t,V,s,i,null)}return;default:if(Al(t)){for(ie in i)i.hasOwnProperty(ie)&&(s=i[ie],s!==void 0&&_o(e,t,ie,s,i,void 0));return}}for(R in i)i.hasOwnProperty(R)&&(s=i[R],s!=null&&Ye(e,t,R,s,i,null))}function B_(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,R=null,z=null,V=null,ie=null;for(J in i){var ne=i[J];if(i.hasOwnProperty(J)&&ne!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":z=ne;default:s.hasOwnProperty(J)||Ye(e,t,J,null,s,ne)}}for(var Q in s){var J=s[Q];if(ne=i[Q],s.hasOwnProperty(Q)&&(J!=null||ne!=null))switch(Q){case"type":n=J;break;case"name":r=J;break;case"checked":V=J;break;case"defaultChecked":ie=J;break;case"value":m=J;break;case"defaultValue":R=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(G(137,t));break;default:J!==ne&&Ye(e,t,Q,J,s,ne)}}xl(e,m,R,z,V,ie,n,r);return;case"select":J=m=R=Q=null;for(n in i)if(z=i[n],i.hasOwnProperty(n)&&z!=null)switch(n){case"value":break;case"multiple":J=z;default:s.hasOwnProperty(n)||Ye(e,t,n,null,s,z)}for(r in s)if(n=s[r],z=i[r],s.hasOwnProperty(r)&&(n!=null||z!=null))switch(r){case"value":Q=n;break;case"defaultValue":R=n;break;case"multiple":m=n;default:n!==z&&Ye(e,t,r,n,s,z)}t=R,i=m,s=J,Q!=null?Ls(e,!!i,Q,!1):!!s!=!!i&&(t!=null?Ls(e,!!i,t,!0):Ls(e,!!i,i?[]:"",!1));return;case"textarea":J=Q=null;for(R in i)if(r=i[R],i.hasOwnProperty(R)&&r!=null&&!s.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:Ye(e,t,R,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":Q=r;break;case"defaultValue":J=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(G(91));break;default:r!==n&&Ye(e,t,m,r,s,n)}Qo(e,Q,J);return;case"option":for(var he in i)Q=i[he],i.hasOwnProperty(he)&&Q!=null&&!s.hasOwnProperty(he)&&(he==="selected"?e.selected=!1:Ye(e,t,he,null,s,Q));for(z in s)Q=s[z],J=i[z],s.hasOwnProperty(z)&&Q!==J&&(Q!=null||J!=null)&&(z==="selected"?e.selected=Q&&typeof Q!="function"&&typeof Q!="symbol":Ye(e,t,z,Q,s,J));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in i)Q=i[Se],i.hasOwnProperty(Se)&&Q!=null&&!s.hasOwnProperty(Se)&&Ye(e,t,Se,null,s,Q);for(V in s)if(Q=s[V],J=i[V],s.hasOwnProperty(V)&&Q!==J&&(Q!=null||J!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(G(137,t));break;default:Ye(e,t,V,Q,s,J)}return;default:if(Al(t)){for(var Ge in i)Q=i[Ge],i.hasOwnProperty(Ge)&&Q!==void 0&&!s.hasOwnProperty(Ge)&&_o(e,t,Ge,void 0,s,Q);for(ie in s)Q=s[ie],J=i[ie],!s.hasOwnProperty(ie)||Q===J||Q===void 0&&J===void 0||_o(e,t,ie,Q,s,J);return}}for(var Y in i)Q=i[Y],i.hasOwnProperty(Y)&&Q!=null&&!s.hasOwnProperty(Y)&&Ye(e,t,Y,null,s,Q);for(ne in s)Q=s[ne],J=i[ne],!s.hasOwnProperty(ne)||Q===J||Q==null&&J==null||Ye(e,t,ne,Q,s,J)}function $h(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function O_(){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,R=r.duration;if(n&&R&&$h(m)){for(m=0,R=r.responseEnd,s+=1;s<i.length;s++){var z=i[s],V=z.startTime;if(V>R)break;var ie=z.transferSize,ne=z.initiatorType;ie&&$h(ne)&&(z=z.responseEnd,m+=ie*(z<R?1:(R-V)/(z-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 vo=null,mo=null;function ol(e){return e.nodeType===9?e:e.ownerDocument}function ef(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 tf(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 go(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 po=null;function k_(){var e=window.event;return e&&e.type==="popstate"?e===po?!1:(po=e,!0):(po=null,!1)}var sf=typeof setTimeout=="function"?setTimeout:void 0,H_=typeof clearTimeout=="function"?clearTimeout:void 0,rf=typeof Promise=="function"?Promise:void 0,z_=typeof queueMicrotask=="function"?queueMicrotask:typeof rf<"u"?function(e){return rf.resolve(null).then(e).catch(N_)}:sf;function N_(e){setTimeout(function(){throw e})}function Ji(e){return e==="head"}function nf(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),cr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Qr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Qr(i);for(var n=i.firstChild;n;){var m=n.nextSibling,R=n.nodeName;n[dr]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=m}}else i==="body"&&Qr(e.ownerDocument.body);i=r}while(i);cr(t)}function lf(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 So(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":So(i),El(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function U_(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[dr])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=Qt(e.nextSibling),e===null)break}return null}function j_(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Qt(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qt(e.nextSibling),e===null))return null;return e}function yo(e){return e.data==="$?"||e.data==="$~"}function bo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function q_(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 Qt(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 Co=null;function of(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Qt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function cf(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 uf(e,t,i){switch(t=ol(i),e){case"html":if(e=t.documentElement,!e)throw Error(G(452));return e;case"head":if(e=t.head,!e)throw Error(G(453));return e;case"body":if(e=t.body,!e)throw Error(G(454));return e;default:throw Error(G(451))}}function Qr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);El(e)}var Wt=new Map,hf=new Set;function cl(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Li=K.d;K.d={f:I_,r:K_,D:Y_,C:G_,L:X_,m:F_,X:P_,S:V_,M:Q_};function I_(){var e=Li.f(),t=el();return e||t}function K_(e){var t=Ts(e);t!==null&&t.tag===5&&t.type==="form"?Au(t):Li.r(e)}var lr=typeof document>"u"?null:document;function ff(e,t,i){var s=lr;if(s&&typeof t=="string"&&t){var r=Kt(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),hf.has(r)||(hf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),pt(t,"link",e),ft(t),s.head.appendChild(t)))}}function Y_(e){Li.D(e),ff("dns-prefetch",e,null)}function G_(e,t){Li.C(e,t),ff("preconnect",e,t)}function X_(e,t,i){Li.L(e,t,i);var s=lr;if(s&&e&&t){var r='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+Kt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+Kt(i.imageSizes)+'"]')):r+='[href="'+Kt(e)+'"]';var n=r;switch(t){case"style":n=ar(e);break;case"script":n=or(e)}Wt.has(n)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Wt.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Wr(n))||t==="script"&&s.querySelector(Zr(n))||(t=s.createElement("link"),pt(t,"link",e),ft(t),s.head.appendChild(t)))}}function F_(e,t){Li.m(e,t);var i=lr;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+Kt(s)+'"][href="'+Kt(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=or(e)}if(!Wt.has(n)&&(e=h({rel:"modulepreload",href:e},t),Wt.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"),pt(s,"link",e),ft(s),i.head.appendChild(s)}}}function V_(e,t,i){Li.S(e,t,i);var s=lr;if(s&&e){var r=Rs(s).hoistableStyles,n=ar(e);t=t||"default";var m=r.get(n);if(!m){var R={loading:0,preload:null};if(m=s.querySelector(Wr(n)))R.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Wt.get(n))&&Eo(e,i);var z=m=s.createElement("link");ft(z),pt(z,"link",e),z._p=new Promise(function(V,ie){z.onload=V,z.onerror=ie}),z.addEventListener("load",function(){R.loading|=1}),z.addEventListener("error",function(){R.loading|=2}),R.loading|=4,ul(m,t,s)}m={type:"stylesheet",instance:m,count:1,state:R},r.set(n,m)}}}function P_(e,t){Li.X(e,t);var i=lr;if(i&&e){var s=Rs(i).hoistableScripts,r=or(e),n=s.get(r);n||(n=i.querySelector(Zr(r)),n||(e=h({src:e,async:!0},t),(t=Wt.get(r))&&wo(e,t),n=i.createElement("script"),ft(n),pt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Q_(e,t){Li.M(e,t);var i=lr;if(i&&e){var s=Rs(i).hoistableScripts,r=or(e),n=s.get(r);n||(n=i.querySelector(Zr(r)),n||(e=h({src:e,async:!0,type:"module"},t),(t=Wt.get(r))&&wo(e,t),n=i.createElement("script"),ft(n),pt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function df(e,t,i,s){var r=(r=fe.current)?cl(r):null;if(!r)throw Error(G(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=ar(i.href),i=Rs(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=ar(i.href);var n=Rs(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(Wr(e)))&&!n._p&&(m.instance=n,m.state.loading=5),Wt.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},Wt.set(e,i),n||W_(r,e,i,m.state))),t&&s===null)throw Error(G(528,""));return m}if(t&&s!==null)throw Error(G(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=or(i),i=Rs(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(G(444,e))}}function ar(e){return'href="'+Kt(e)+'"'}function Wr(e){return'link[rel="stylesheet"]['+e+"]"}function _f(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function W_(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}),pt(t,"link",i),ft(t),e.head.appendChild(t))}function or(e){return'[src="'+Kt(e)+'"]'}function Zr(e){return"script[async]"+e}function vf(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Kt(i.href)+'"]');if(s)return t.instance=s,ft(s),s;var r=h({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ft(s),pt(s,"style",r),ul(s,i.precedence,e),t.instance=s;case"stylesheet":r=ar(i.href);var n=e.querySelector(Wr(r));if(n)return t.state.loading|=4,t.instance=n,ft(n),n;s=_f(i),(r=Wt.get(r))&&Eo(s,r),n=(e.ownerDocument||e).createElement("link"),ft(n);var m=n;return m._p=new Promise(function(R,z){m.onload=R,m.onerror=z}),pt(n,"link",s),t.state.loading|=4,ul(n,i.precedence,e),t.instance=n;case"script":return n=or(i.src),(r=e.querySelector(Zr(n)))?(t.instance=r,ft(r),r):(s=i,(r=Wt.get(n))&&(s=h({},i),wo(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),ft(r),pt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(G(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ul(s,i.precedence,e));return t.instance}function ul(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 R=s[m];if(R.dataset.precedence===t)n=R;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 Eo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function wo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hl=null;function mf(e,t,i){if(hl===null){var s=new Map,r=hl=new Map;r.set(i,s)}else r=hl,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[dr]||n[Le]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var m=n.getAttribute(t)||"";m=e+m;var R=s.get(m);R?R.push(n):s.set(m,[n])}}return s}function gf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function Z_(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 pf(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function J_(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=ar(s.href),n=t.querySelector(Wr(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=fl.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,ft(n);return}n=t.ownerDocument||t,s=_f(s),(r=Wt.get(r))&&Eo(s,r),n=n.createElement("link"),ft(n);var m=n;m._p=new Promise(function(R,z){m.onload=R,m.onerror=z}),pt(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=fl.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var xo=0;function $_(e,t){return e.stylesheets&&e.count===0&&_l(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&_l(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&xo===0&&(xo=62500*O_());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&_l(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>xo?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function fl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)_l(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var dl=null;function _l(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,dl=new Map,t.forEach(ev,e),dl=null,fl.call(e))}function ev(e,t){if(!(t.state.loading&4)){var i=dl.get(e);if(i)var s=i.get(null);else{i=new Map,dl.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=fl.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 Jr={$$typeof:c,Provider:null,Consumer:null,_currentValue:A,_currentValue2:A,_threadCount:0};function tv(e,t,i,s,r,n,m,R,z){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=Ds(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ds(0),this.hiddenUpdates=Ds(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function Sf(e,t,i,s,r,n,m,R,z,V,ie,ne){return e=new tv(e,t,i,m,z,V,ie,ne,R),t=1,n===!0&&(t|=24),n=Ht(3,null,null,t),e.current=n,n.stateNode=e,t=sa(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},aa(n),e}function yf(e){return e?(e=js,e):js}function bf(e,t,i,s,r,n){r=yf(r),s.context===null?s.context=r:s.pendingContext=r,s=Ii(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=Ki(e,s,t),i!==null&&(Lt(i,e,t),Mr(i,e,t))}function Cf(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Do(e,t){Cf(e,t),(e=e.alternate)&&Cf(e,t)}function Ef(e){if(e.tag===13||e.tag===31){var t=fs(e,67108864);t!==null&&Lt(t,e,67108864),Do(e,67108864)}}function wf(e){if(e.tag===13||e.tag===31){var t=qt();t=Me(t);var i=fs(e,t);i!==null&&Lt(i,e,t),Do(e,t)}}var vl=!0;function iv(e,t,i,s){var r=N.T;N.T=null;var n=K.p;try{K.p=2,Ao(e,t,i,s)}finally{K.p=n,N.T=r}}function sv(e,t,i,s){var r=N.T;N.T=null;var n=K.p;try{K.p=8,Ao(e,t,i,s)}finally{K.p=n,N.T=r}}function Ao(e,t,i,s){if(vl){var r=To(s);if(r===null)fo(e,t,s,ml,i),Df(e,s);else if(nv(r,e,t,i,s))s.stopPropagation();else if(Df(e,s),t&4&&-1<rv.indexOf(e)){for(;r!==null;){var n=Ts(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var m=ni(n.pendingLanes);if(m!==0){var R=n;for(R.pendingLanes|=2,R.entangledLanes|=2;m;){var z=1<<31-ct(m);R.entanglements[1]|=z,m&=~z}hi(n),(ze&6)===0&&(Jn=it()+500,Fr(0))}}break;case 31:case 13:R=fs(n,2),R!==null&&Lt(R,n,2),el(),Do(n,2)}if(n=To(s),n===null&&fo(e,t,s,ml,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else fo(e,t,s,null,i)}}function To(e){return e=Rl(e),Ro(e)}var ml=null;function Ro(e){if(ml=null,e=As(e),e!==null){var t=ve(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=P(t),e!==null)return e;e=null}else if(i===31){if(e=u(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 ml=e,null}function xf(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(yt()){case Bt:return 2;case Ot:return 8;case Ve:case bt:return 32;case xt:return 268435456;default:return 32}default:return 32}}var Mo=!1,$i=null,es=null,ts=null,$r=new Map,en=new Map,is=[],rv="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 Df(e,t){switch(e){case"focusin":case"focusout":$i=null;break;case"dragenter":case"dragleave":es=null;break;case"mouseover":case"mouseout":ts=null;break;case"pointerover":case"pointerout":$r.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":en.delete(t.pointerId)}}function tn(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=Ts(t),t!==null&&Ef(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function nv(e,t,i,s,r){switch(t){case"focusin":return $i=tn($i,e,t,i,s,r),!0;case"dragenter":return es=tn(es,e,t,i,s,r),!0;case"mouseover":return ts=tn(ts,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return $r.set(n,tn($r.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,en.set(n,tn(en.get(n)||null,e,t,i,s,r)),!0}return!1}function Af(e){var t=As(e.target);if(t!==null){var i=ve(t);if(i!==null){if(t=i.tag,t===13){if(t=P(i),t!==null){e.blockedOn=t,Ze(e.priority,function(){wf(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,Ze(e.priority,function(){wf(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 gl(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=To(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Tl=s,i.target.dispatchEvent(s),Tl=null}else return t=Ts(i),t!==null&&Ef(t),e.blockedOn=i,!1;t.shift()}return!0}function Tf(e,t,i){gl(e)&&i.delete(t)}function lv(){Mo=!1,$i!==null&&gl($i)&&($i=null),es!==null&&gl(es)&&(es=null),ts!==null&&gl(ts)&&(ts=null),$r.forEach(Tf),en.forEach(Tf)}function pl(e,t){e.blockedOn===t&&(e.blockedOn=null,Mo||(Mo=!0,H.unstable_scheduleCallback(H.unstable_NormalPriority,lv)))}var Sl=null;function Rf(e){Sl!==e&&(Sl=e,H.unstable_scheduleCallback(H.unstable_NormalPriority,function(){Sl===e&&(Sl=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(Ro(s||i)===null)continue;break}var n=Ts(i);n!==null&&(e.splice(t,3),t-=3,Aa(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function cr(e){function t(z){return pl(z,e)}$i!==null&&pl($i,e),es!==null&&pl(es,e),ts!==null&&pl(ts,e),$r.forEach(t),en.forEach(t);for(var i=0;i<is.length;i++){var s=is[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<is.length&&(i=is[0],i.blockedOn===null);)Af(i),i.blockedOn===null&&is.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[Pe]||null;if(typeof n=="function")m||Rf(i);else if(m){var R=null;if(n&&n.hasAttribute("formAction")){if(r=n,m=n[Pe]||null)R=m.formAction;else if(Ro(r)!==null)continue}else R=m.action;typeof R=="function"?i[s+1]=R:(i.splice(s,3),s-=3),Rf(i)}}}function Mf(){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 Lo(e){this._internalRoot=e}yl.prototype.render=Lo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(G(409));var i=t.current,s=qt();bf(i,s,e,t,null,null)},yl.prototype.unmount=Lo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bf(e.current,2,null,e,null,null),el(),t[ai]=null}};function yl(e){this._internalRoot=e}yl.prototype.unstable_scheduleHydration=function(e){if(e){var t=ki();e={blockedOn:null,target:e,priority:t};for(var i=0;i<is.length&&t!==0&&t<is[i].priority;i++);is.splice(i,0,e),i===0&&Af(e)}};var Lf=ue.version;if(Lf!=="19.2.4")throw Error(G(527,Lf,"19.2.4"));K.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(G(188)):(e=Object.keys(e).join(","),Error(G(268,e)));return e=d(t),e=e!==null?y(e):null,e=e===null?null:e.stateNode,e};var av={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bl.isDisabled&&bl.supportsFiber)try{ri=bl.inject(av),Xe=bl}catch{}}return rn.createRoot=function(e,t){if(!ce(e))throw Error(G(299));var i=!1,s="",r=Nu,n=Uu,m=ju;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=Sf(e,1,!1,null,null,i,s,null,r,n,m,Mf),e[ai]=t.current,ho(e),new Lo(t)},rn.hydrateRoot=function(e,t,i){if(!ce(e))throw Error(G(299));var s=!1,r="",n=Nu,m=Uu,R=ju,z=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&&(R=i.onRecoverableError),i.formState!==void 0&&(z=i.formState)),t=Sf(e,1,!0,t,i??null,s,r,z,n,m,R,Mf),t.context=yf(null),i=t.current,s=qt(),s=Me(s),r=Ii(s),r.callback=null,Ki(i,r,s),i=s,t.current.lanes=i,Oi(t,i),hi(t),e[ai]=t.current,ho(e),new yl(t)},rn.version="19.2.4",rn}var If;function pv(){if(If)return ko.exports;If=1;function H(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(H)}catch(ue){console.error(ue)}}return H(),ko.exports=gv(),ko.exports}var Sv=pv();const yv=Wf(Sv);var Uo={exports:{}},Kf;function bv(){return Kf||(Kf=1,(function(H,ue){(function(ye,G){H.exports=G()})(self,(()=>(()=>{var ye={};return(()=>{var G=ye;Object.defineProperty(G,"__esModule",{value:!0}),G.FitAddon=void 0,G.FitAddon=class{activate(ce){this._terminal=ce}dispose(){}fit(){const ce=this.proposeDimensions();if(!ce||!this._terminal||isNaN(ce.cols)||isNaN(ce.rows))return;const ve=this._terminal._core;this._terminal.rows===ce.rows&&this._terminal.cols===ce.cols||(ve._renderService.clear(),this._terminal.resize(ce.cols,ce.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const ce=this._terminal._core,ve=ce._renderService.dimensions;if(ve.css.cell.width===0||ve.css.cell.height===0)return;const P=this._terminal.options.scrollback===0?0:ce.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),f=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),y=window.getComputedStyle(this._terminal.element),h=f-(parseInt(y.getPropertyValue("padding-top"))+parseInt(y.getPropertyValue("padding-bottom"))),p=d-(parseInt(y.getPropertyValue("padding-right"))+parseInt(y.getPropertyValue("padding-left")))-P;return{cols:Math.max(2,Math.floor(p/ve.css.cell.width)),rows:Math.max(1,Math.floor(h/ve.css.cell.height))}}}})(),ye})()))})(Uo)),Uo.exports}var Cv=bv(),jo={exports:{}},Yf;function Ev(){return Yf||(Yf=1,(function(H,ue){(function(ye,G){H.exports=G()})(self,(()=>(()=>{var ye={4567:function(P,u,f){var d=this&&this.__decorate||function(c,_,g,b){var x,v=arguments.length,E=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,_,g,b);else for(var B=c.length-1;B>=0;B--)(x=c[B])&&(E=(v<3?x(E):v>3?x(_,g,E):x(_,g))||E);return v>3&&E&&Object.defineProperty(_,g,E),E},y=this&&this.__param||function(c,_){return function(g,b){_(g,b,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=f(9042),p=f(6114),C=f(9924),D=f(844),S=f(5596),l=f(4725),o=f(3656);let a=u.AccessibilityManager=class extends D.Disposable{constructor(c,_){super(),this._terminal=c,this._renderService=_,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=document.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=document.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let g=0;g<this._terminal.rows;g++)this._rowElements[g]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[g]);if(this._topBoundaryFocusListener=g=>this._handleBoundaryFocus(g,0),this._bottomBoundaryFocusListener=g=>this._handleBoundaryFocus(g,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=document.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new C.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((g=>this._handleResize(g.rows)))),this.register(this._terminal.onRender((g=>this._refreshRows(g.start,g.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((g=>this._handleChar(g)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
10
|
-
`)))),this.register(this._terminal.onA11yTab((g=>this._handleTab(g)))),this.register(this._terminal.onKey((g=>this._handleKey(g.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this._screenDprMonitor=new S.ScreenDprMonitor(window),this.register(this._screenDprMonitor),this._screenDprMonitor.setListener((()=>this._refreshRowsDimensions())),this.register((0,o.addDisposableDomListener)(window,"resize",(()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,D.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(c){for(let _=0;_<c;_++)this._handleChar(" ")}_handleChar(c){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==c&&(this._charsToAnnounce+=c):this._charsToAnnounce+=c,c===`
|
|
11
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)),p.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout((()=>{this._accessibilityContainer.appendChild(this._liveRegion)}),0))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0,p.isMac&&this._liveRegion.remove()}_handleKey(c){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(c)||this._charsToConsume.push(c)}_refreshRows(c,_){this._liveRegionDebouncer.refresh(c,_,this._terminal.rows)}_renderRows(c,_){const g=this._terminal.buffer,b=g.lines.length.toString();for(let x=c;x<=_;x++){const v=g.translateBufferLineToString(g.ydisp+x,!0),E=(g.ydisp+x+1).toString(),B=this._rowElements[x];B&&(v.length===0?B.innerText=" ":B.textContent=v,B.setAttribute("aria-posinset",E),B.setAttribute("aria-setsize",b))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(c,_){const g=c.target,b=this._rowElements[_===0?1:this._rowElements.length-2];if(g.getAttribute("aria-posinset")===(_===0?"1":`${this._terminal.buffer.lines.length}`)||c.relatedTarget!==b)return;let x,v;if(_===0?(x=g,v=this._rowElements.pop(),this._rowContainer.removeChild(v)):(x=this._rowElements.shift(),v=g,this._rowContainer.removeChild(x)),x.removeEventListener("focus",this._topBoundaryFocusListener),v.removeEventListener("focus",this._bottomBoundaryFocusListener),_===0){const E=this._createAccessibilityTreeNode();this._rowElements.unshift(E),this._rowContainer.insertAdjacentElement("afterbegin",E)}else{const E=this._createAccessibilityTreeNode();this._rowElements.push(E),this._rowContainer.appendChild(E)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(_===0?-1:1),this._rowElements[_===0?1:this._rowElements.length-2].focus(),c.preventDefault(),c.stopImmediatePropagation()}_handleResize(c){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let _=this._rowContainer.children.length;_<this._terminal.rows;_++)this._rowElements[_]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[_]);for(;this._rowElements.length>c;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const c=document.createElement("div");return c.setAttribute("role","listitem"),c.tabIndex=-1,this._refreshRowDimensions(c),c}_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 c=0;c<this._terminal.rows;c++)this._refreshRowDimensions(this._rowElements[c])}}_refreshRowDimensions(c){c.style.height=`${this._renderService.dimensions.css.cell.height}px`}};u.AccessibilityManager=a=d([y(1,l.IRenderService)],a)},3614:(P,u)=>{function f(p){return p.replace(/\r?\n/g,"\r")}function d(p,C){return C?"\x1B[200~"+p+"\x1B[201~":p}function y(p,C,D,S){p=d(p=f(p),D.decPrivateModes.bracketedPasteMode&&S.rawOptions.ignoreBracketedPasteMode!==!0),D.triggerDataEvent(p,!0),C.value=""}function h(p,C,D){const S=D.getBoundingClientRect(),l=p.clientX-S.left-10,o=p.clientY-S.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${l}px`,C.style.top=`${o}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(u,"__esModule",{value:!0}),u.rightClickHandler=u.moveTextAreaUnderMouseCursor=u.paste=u.handlePasteEvent=u.copyHandler=u.bracketTextForPaste=u.prepareTextForTerminal=void 0,u.prepareTextForTerminal=f,u.bracketTextForPaste=d,u.copyHandler=function(p,C){p.clipboardData&&p.clipboardData.setData("text/plain",C.selectionText),p.preventDefault()},u.handlePasteEvent=function(p,C,D,S){p.stopPropagation(),p.clipboardData&&y(p.clipboardData.getData("text/plain"),C,D,S)},u.paste=y,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(p,C,D,S,l){h(p,C,D),l&&S.rightClickSelect(p),C.value=S.selectionText,C.select()}},7239:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorContrastCache=void 0;const d=f(1505);u.ColorContrastCache=class{constructor(){this._color=new d.TwoKeyMap,this._css=new d.TwoKeyMap}setCss(y,h,p){this._css.set(y,h,p)}getCss(y,h){return this._css.get(y,h)}setColor(y,h,p){this._color.set(y,h,p)}getColor(y,h){return this._color.get(y,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(f,d,y,h){f.addEventListener(d,y,h);let p=!1;return{dispose:()=>{p||(p=!0,f.removeEventListener(d,y,h))}}}},6465:function(P,u,f){var d=this&&this.__decorate||function(l,o,a,c){var _,g=arguments.length,b=g<3?o:c===null?c=Object.getOwnPropertyDescriptor(o,a):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,o,a,c);else for(var x=l.length-1;x>=0;x--)(_=l[x])&&(b=(g<3?_(b):g>3?_(o,a,b):_(o,a))||b);return g>3&&b&&Object.defineProperty(o,a,b),b},y=this&&this.__param||function(l,o){return function(a,c){o(a,c,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier2=void 0;const h=f(3656),p=f(8460),C=f(844),D=f(2585);let S=u.Linkifier2=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(l){super(),this._bufferService=l,this._linkProviders=[],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,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{this._lastMouseEvent=void 0}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0})))}registerLinkProvider(l){return this._linkProviders.push(l),{dispose:()=>{const o=this._linkProviders.indexOf(l);o!==-1&&this._linkProviders.splice(o,1)}}}attachToDom(l,o,a){this._element=l,this._mouseService=o,this._renderService=a,this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(l){if(this._lastMouseEvent=l,!this._element||!this._mouseService)return;const o=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const a=l.composedPath();for(let c=0;c<a.length;c++){const _=a[c];if(_.classList.contains("xterm"))break;if(_.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,o){var a,c;this._activeProviderReplies&&o||((a=this._activeProviderReplies)===null||a===void 0||a.forEach((g=>{g?.forEach((b=>{b.link.dispose&&b.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=l.y);let _=!1;for(const[g,b]of this._linkProviders.entries())o?!((c=this._activeProviderReplies)===null||c===void 0)&&c.get(g)&&(_=this._checkLinkProviderResult(g,l,_)):b.provideLinks(l.y,(x=>{var v,E;if(this._isMouseOut)return;const B=x?.map((U=>({link:U})));(v=this._activeProviderReplies)===null||v===void 0||v.set(g,B),_=this._checkLinkProviderResult(g,l,_),((E=this._activeProviderReplies)===null||E===void 0?void 0:E.size)===this._linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)}))}_removeIntersectingLinks(l,o){const a=new Set;for(let c=0;c<o.size;c++){const _=o.get(c);if(_)for(let g=0;g<_.length;g++){const b=_[g],x=b.link.range.start.y<l?0:b.link.range.start.x,v=b.link.range.end.y>l?this._bufferService.cols:b.link.range.end.x;for(let E=x;E<=v;E++){if(a.has(E)){_.splice(g--,1);break}a.add(E)}}}}_checkLinkProviderResult(l,o,a){var c;if(!this._activeProviderReplies)return a;const _=this._activeProviderReplies.get(l);let g=!1;for(let b=0;b<l;b++)this._activeProviderReplies.has(b)&&!this._activeProviderReplies.get(b)||(g=!0);if(!g&&_){const b=_.find((x=>this._linkAtPosition(x.link,o)));b&&(a=!0,this._handleNewLink(b))}if(this._activeProviderReplies.size===this._linkProviders.length&&!a)for(let b=0;b<this._activeProviderReplies.size;b++){const x=(c=this._activeProviderReplies.get(b))===null||c===void 0?void 0:c.find((v=>this._linkAtPosition(v.link,o)));if(x){a=!0,this._handleNewLink(x);break}}return a}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._element||!this._mouseService||!this._currentLink)return;const o=this._positionFromMouseEvent(l,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,o){this._element&&this._currentLink&&this._lastMouseEvent&&(!l||!o||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._element||!this._lastMouseEvent||!this._mouseService)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(l.link,o)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var a,c;return(c=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||c===void 0?void 0:c.decorations.pointerCursor},set:a=>{var c,_;!((c=this._currentLink)===null||c===void 0)&&c.state&&this._currentLink.state.decorations.pointerCursor!==a&&(this._currentLink.state.decorations.pointerCursor=a,this._currentLink.state.isHovered&&((_=this._element)===null||_===void 0||_.classList.toggle("xterm-cursor-pointer",a)))}},underline:{get:()=>{var a,c;return(c=(a=this._currentLink)===null||a===void 0?void 0:a.state)===null||c===void 0?void 0:c.decorations.underline},set:a=>{var c,_,g;!((c=this._currentLink)===null||c===void 0)&&c.state&&((g=(_=this._currentLink)===null||_===void 0?void 0:_.state)===null||g===void 0?void 0:g.decorations.underline)!==a&&(this._currentLink.state.decorations.underline=a,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,a))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((a=>{if(!this._currentLink)return;const c=a.start===0?0:a.start+1+this._bufferService.buffer.ydisp,_=this._bufferService.buffer.ydisp+1+a.end;if(this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=_&&(this._clearCurrentLink(c,_),this._lastMouseEvent&&this._element)){const g=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);g&&this._askForLink(g,!1)}}))))}_linkHover(l,o,a){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&l.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(a,o.text)}_fireUnderlineEvent(l,o){const a=l.range,c=this._bufferService.buffer.ydisp,_=this._createLinkUnderlineEvent(a.start.x-1,a.start.y-c-1,a.end.x,a.end.y-c-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(_)}_linkLeave(l,o,a){var c;!((c=this._currentLink)===null||c===void 0)&&c.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&l.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(a,o.text)}_linkAtPosition(l,o){const a=l.range.start.y*this._bufferService.cols+l.range.start.x,c=l.range.end.y*this._bufferService.cols+l.range.end.x,_=o.y*this._bufferService.cols+o.x;return a<=_&&_<=c}_positionFromMouseEvent(l,o,a){const c=a.getCoords(l,o,this._bufferService.cols,this._bufferService.rows);if(c)return{x:c[0],y:c[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,o,a,c,_){return{x1:l,y1:o,x2:a,y2:c,cols:this._bufferService.cols,fg:_}}};u.Linkifier2=S=d([y(0,D.IBufferService)],S)},9042:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.tooMuchOutput=u.promptLabel=void 0,u.promptLabel="Terminal input",u.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(P,u,f){var d=this&&this.__decorate||function(S,l,o,a){var c,_=arguments.length,g=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,o):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(S,l,o,a);else for(var b=S.length-1;b>=0;b--)(c=S[b])&&(g=(_<3?c(g):_>3?c(l,o,g):c(l,o))||g);return _>3&&g&&Object.defineProperty(l,o,g),g},y=this&&this.__param||function(S,l){return function(o,a){l(o,a,S)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=f(511),p=f(2585);let C=u.OscLinkProvider=class{constructor(S,l,o){this._bufferService=S,this._optionsService=l,this._oscLinkService=o}provideLinks(S,l){var o;const a=this._bufferService.buffer.lines.get(S-1);if(!a)return void l(void 0);const c=[],_=this._optionsService.rawOptions.linkHandler,g=new h.CellData,b=a.getTrimmedLength();let x=-1,v=-1,E=!1;for(let B=0;B<b;B++)if(v!==-1||a.hasContent(B)){if(a.loadCell(B,g),g.hasExtendedAttrs()&&g.extended.urlId){if(v===-1){v=B,x=g.extended.urlId;continue}E=g.extended.urlId!==x}else v!==-1&&(E=!0);if(E||v!==-1&&B===b-1){const U=(o=this._oscLinkService.getLinkData(x))===null||o===void 0?void 0:o.uri;if(U){const L={start:{x:v+1,y:S},end:{x:B+(E||B!==b-1?0:1),y:S}};let k=!1;if(!_?.allowNonHttpProtocols)try{const Z=new URL(U);["http:","https:"].includes(Z.protocol)||(k=!0)}catch{k=!0}k||c.push({text:U,range:L,activate:(Z,ee)=>_?_.activate(Z,ee,L):D(0,ee),hover:(Z,ee)=>{var N;return(N=_?.hover)===null||N===void 0?void 0:N.call(_,Z,ee,L)},leave:(Z,ee)=>{var N;return(N=_?.leave)===null||N===void 0?void 0:N.call(_,Z,ee,L)}})}E=!1,g.hasExtendedAttrs()&&g.extended.urlId?(v=B,x=g.extended.urlId):(v=-1,x=-1)}}l(c)}};function D(S,l){if(confirm(`Do you want to navigate to ${l}?
|
|
12
|
-
|
|
13
|
-
WARNING: This link could potentially be dangerous`)){const o=window.open();if(o){try{o.opener=null}catch{}o.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=C=d([y(0,p.IBufferService),y(1,p.IOptionsService),y(2,p.IOscLinkService)],C)},6193:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(f,d){this._parentWindow=f,this._renderCallback=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._parentWindow.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(f){return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=this._parentWindow.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(f,d,y){this._rowCount=y,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d,this._animationFrame||(this._animationFrame=this._parentWindow.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 f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const f of this._refreshCallbacks)f(0);this._refreshCallbacks=[]}}},5596:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ScreenDprMonitor=void 0;const d=f(844);class y extends d.Disposable{constructor(p){super(),this._parentWindow=p,this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this.register((0,d.toDisposable)((()=>{this.clearListener()})))}setListener(p){this._listener&&this.clearListener(),this._listener=p,this._outerListener=()=>{this._listener&&(this._listener(this._parentWindow.devicePixelRatio,this._currentDevicePixelRatio),this._updateDpr())},this._updateDpr()}_updateDpr(){var p;this._outerListener&&((p=this._resolutionMediaMatchList)===null||p===void 0||p.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._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)}}u.ScreenDprMonitor=y},3236:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=f(3614),y=f(3656),h=f(6465),p=f(9042),C=f(3730),D=f(1680),S=f(3107),l=f(5744),o=f(2950),a=f(1296),c=f(428),_=f(4269),g=f(5114),b=f(8934),x=f(3230),v=f(9312),E=f(4725),B=f(6731),U=f(8055),L=f(8969),k=f(8460),Z=f(844),ee=f(6114),N=f(8437),K=f(2584),A=f(7399),M=f(5941),O=f(9074),w=f(2585),j=f(5435),W=f(4567),te=typeof window<"u"?window.document:null;class le extends L.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(T={}){super(T),this.browser=ee,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Z.MutableDisposable),this._onCursorMove=this.register(new k.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new k.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new k.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new k.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new k.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new k.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new k.EventEmitter),this._onBlur=this.register(new k.EventEmitter),this._onA11yCharEmitter=this.register(new k.EventEmitter),this._onA11yTabEmitter=this.register(new k.EventEmitter),this._onWillOpen=this.register(new k.EventEmitter),this._setup(),this.linkifier2=this.register(this._instantiationService.createInstance(h.Linkifier2)),this.linkifier2.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this._decorationService=this._instantiationService.createInstance(O.DecorationService),this._instantiationService.setService(w.IDecorationService,this._decorationService),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((X,$)=>this.refresh(X,$)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((X=>this._reportWindowsOptions(X)))),this.register(this._inputHandler.onColor((X=>this._handleColorEvent(X)))),this.register((0,k.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,k.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,k.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,k.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((X=>this._afterResize(X.cols,X.rows)))),this.register((0,Z.toDisposable)((()=>{var X,$;this._customKeyEventHandler=void 0,($=(X=this.element)===null||X===void 0?void 0:X.parentNode)===null||$===void 0||$.removeChild(this.element)})))}_handleColorEvent(T){if(this._themeService)for(const X of T){let $,se="";switch(X.index){case 256:$="foreground",se="10";break;case 257:$="background",se="11";break;case 258:$="cursor",se="12";break;default:$="ansi",se="4;"+X.index}switch(X.type){case 0:const pe=U.color.toColorRGB($==="ansi"?this._themeService.colors.ansi[X.index]:this._themeService.colors[$]);this.coreService.triggerDataEvent(`${K.C0.ESC}]${se};${(0,M.toRgbString)(pe)}${K.C1_ESCAPED.ST}`);break;case 1:if($==="ansi")this._themeService.modifyColors((oe=>oe.ansi[X.index]=U.rgba.toColor(...X.color)));else{const oe=$;this._themeService.modifyColors((xe=>xe[oe]=U.rgba.toColor(...X.color)))}break;case 2:this._themeService.restoreColor(X.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(T){T?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(W.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(T){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.C0.ESC+"[I"),this.updateCursorStyle(T),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var T;return(T=this.textarea)===null||T===void 0?void 0:T.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(K.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 T=this.buffer.ybase+this.buffer.y,X=this.buffer.lines.get(T);if(!X)return;const $=Math.min(this.buffer.x,this.cols-1),se=this._renderService.dimensions.css.cell.height,pe=X.getWidth($),oe=this._renderService.dimensions.css.cell.width*pe,xe=this.buffer.y*this._renderService.dimensions.css.cell.height,Ne=$*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Ne+"px",this.textarea.style.top=xe+"px",this.textarea.style.width=oe+"px",this.textarea.style.height=se+"px",this.textarea.style.lineHeight=se+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,y.addDisposableDomListener)(this.element,"copy",(X=>{this.hasSelection()&&(0,d.copyHandler)(X,this._selectionService)})));const T=X=>(0,d.handlePasteEvent)(X,this.textarea,this.coreService,this.optionsService);this.register((0,y.addDisposableDomListener)(this.textarea,"paste",T)),this.register((0,y.addDisposableDomListener)(this.element,"paste",T)),ee.isFirefox?this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(X=>{X.button===2&&(0,d.rightClickHandler)(X,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,y.addDisposableDomListener)(this.element,"contextmenu",(X=>{(0,d.rightClickHandler)(X,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ee.isLinux&&this.register((0,y.addDisposableDomListener)(this.element,"auxclick",(X=>{X.button===1&&(0,d.moveTextAreaUnderMouseCursor)(X,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,y.addDisposableDomListener)(this.textarea,"keyup",(T=>this._keyUp(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keydown",(T=>this._keyDown(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"keypress",(T=>this._keyPress(T)),!0)),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionupdate",(T=>this._compositionHelper.compositionupdate(T)))),this.register((0,y.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,y.addDisposableDomListener)(this.textarea,"input",(T=>this._inputEvent(T)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(T){var X;if(!T)throw new Error("Terminal requires a parent element.");T.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=T.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),T.appendChild(this.element);const $=te.createDocumentFragment();this._viewportElement=te.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),$.appendChild(this._viewportElement),this._viewportScrollArea=te.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=te.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=te.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),$.appendChild(this.screenElement),this.textarea=te.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),ee.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._instantiationService.createInstance(g.CoreBrowserService,this.textarea,(X=this._document.defaultView)!==null&&X!==void 0?X:window),this._instantiationService.setService(E.ICoreBrowserService,this._coreBrowserService),this.register((0,y.addDisposableDomListener)(this.textarea,"focus",(se=>this._handleTextAreaFocus(se)))),this.register((0,y.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(E.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(B.ThemeService),this._instantiationService.setService(E.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(E.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(x.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(E.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((se=>this._onRender.fire(se)))),this.onResize((se=>this._renderService.resize(se.cols,se.rows))),this._compositionView=te.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(o.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild($);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this._mouseService=this._instantiationService.createInstance(b.MouseService),this._instantiationService.setService(E.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(D.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((se=>this.scrollLines(se.amount,se.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.linkifier2)),this._instantiationService.setService(E.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((se=>this.scrollLines(se.amount,se.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((se=>this._renderService.handleSelectionChanged(se.start,se.end,se.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((se=>{this.textarea.value=se,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((se=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,y.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.linkifier2.attachToDom(this.screenElement,this._mouseService,this._renderService),this.register(this._instantiationService.createInstance(S.BufferDecorationRenderer,this.screenElement)),this.register((0,y.addDisposableDomListener)(this.element,"mousedown",(se=>this._selectionService.handleMouseDown(se)))),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(W.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(se=>this._handleScreenReaderModeOptionChange(se)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(se=>{!this._overviewRulerRenderer&&se&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(l.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.element,this.screenElement,this._viewportElement,this.linkifier2)}bindMouse(){const T=this,X=this.element;function $(oe){const xe=T._mouseService.getMouseReportCoords(oe,T.screenElement);if(!xe)return!1;let Ne,$e;switch(oe.overrideType||oe.type){case"mousemove":$e=32,oe.buttons===void 0?(Ne=3,oe.button!==void 0&&(Ne=oe.button<3?oe.button:3)):Ne=1&oe.buttons?0:4&oe.buttons?1:2&oe.buttons?2:3;break;case"mouseup":$e=0,Ne=oe.button<3?oe.button:3;break;case"mousedown":$e=1,Ne=oe.button<3?oe.button:3;break;case"wheel":if(T.viewport.getLinesScrolled(oe)===0)return!1;$e=oe.deltaY<0?0:1,Ne=4;break;default:return!1}return!($e===void 0||Ne===void 0||Ne>4)&&T.coreMouseService.triggerMouseEvent({col:xe.col,row:xe.row,x:xe.x,y:xe.y,button:Ne,action:$e,ctrl:oe.ctrlKey,alt:oe.altKey,shift:oe.shiftKey})}const se={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe={mouseup:oe=>($(oe),oe.buttons||(this._document.removeEventListener("mouseup",se.mouseup),se.mousedrag&&this._document.removeEventListener("mousemove",se.mousedrag)),this.cancel(oe)),wheel:oe=>($(oe),this.cancel(oe,!0)),mousedrag:oe=>{oe.buttons&&$(oe)},mousemove:oe=>{oe.buttons||$(oe)}};this.register(this.coreMouseService.onProtocolChange((oe=>{oe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(oe)),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&oe?se.mousemove||(X.addEventListener("mousemove",pe.mousemove),se.mousemove=pe.mousemove):(X.removeEventListener("mousemove",se.mousemove),se.mousemove=null),16&oe?se.wheel||(X.addEventListener("wheel",pe.wheel,{passive:!1}),se.wheel=pe.wheel):(X.removeEventListener("wheel",se.wheel),se.wheel=null),2&oe?se.mouseup||(X.addEventListener("mouseup",pe.mouseup),se.mouseup=pe.mouseup):(this._document.removeEventListener("mouseup",se.mouseup),X.removeEventListener("mouseup",se.mouseup),se.mouseup=null),4&oe?se.mousedrag||(se.mousedrag=pe.mousedrag):(this._document.removeEventListener("mousemove",se.mousedrag),se.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,y.addDisposableDomListener)(X,"mousedown",(oe=>{if(oe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(oe))return $(oe),se.mouseup&&this._document.addEventListener("mouseup",se.mouseup),se.mousedrag&&this._document.addEventListener("mousemove",se.mousedrag),this.cancel(oe)}))),this.register((0,y.addDisposableDomListener)(X,"wheel",(oe=>{if(!se.wheel){if(!this.buffer.hasScrollback){const xe=this.viewport.getLinesScrolled(oe);if(xe===0)return;const Ne=K.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(oe.deltaY<0?"A":"B");let $e="";for(let wt=0;wt<Math.abs(xe);wt++)$e+=Ne;return this.coreService.triggerDataEvent($e,!0),this.cancel(oe,!0)}return this.viewport.handleWheel(oe)?this.cancel(oe):void 0}}),{passive:!1})),this.register((0,y.addDisposableDomListener)(X,"touchstart",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(oe),this.cancel(oe)}),{passive:!0})),this.register((0,y.addDisposableDomListener)(X,"touchmove",(oe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(oe)?void 0:this.cancel(oe)}),{passive:!1}))}refresh(T,X){var $;($=this._renderService)===null||$===void 0||$.refreshRows(T,X)}updateCursorStyle(T){var X;!((X=this._selectionService)===null||X===void 0)&&X.shouldColumnSelect(T)?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(T,X,$=0){var se;$===1?(super.scrollLines(T,X,$),this.refresh(0,this.rows-1)):(se=this.viewport)===null||se===void 0||se.scrollLines(T)}paste(T){(0,d.paste)(T,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(T){this._customKeyEventHandler=T}registerLinkProvider(T){return this.linkifier2.registerLinkProvider(T)}registerCharacterJoiner(T){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const X=this._characterJoinerService.register(T);return this.refresh(0,this.rows-1),X}deregisterCharacterJoiner(T){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(T)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(T){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+T)}registerDecoration(T){return this._decorationService.registerDecoration(T)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(T,X,$){this._selectionService.setSelection(T,X,$)}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(){var T;(T=this._selectionService)===null||T===void 0||T.clearSelection()}selectAll(){var T;(T=this._selectionService)===null||T===void 0||T.selectAll()}selectLines(T,X){var $;($=this._selectionService)===null||$===void 0||$.selectLines(T,X)}_keyDown(T){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1)return!1;const X=this.browser.isMac&&this.options.macOptionIsMeta&&T.altKey;if(!X&&!this._compositionHelper.keydown(T))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;X||T.key!=="Dead"&&T.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const $=(0,A.evaluateKeyboardEvent)(T,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(T),$.type===3||$.type===2){const se=this.rows-1;return this.scrollLines($.type===2?-se:se),this.cancel(T,!0)}return $.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,T)||($.cancel&&this.cancel(T,!0),!$.key||!!(T.key&&!T.ctrlKey&&!T.altKey&&!T.metaKey&&T.key.length===1&&T.key.charCodeAt(0)>=65&&T.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):($.key!==K.C0.ETX&&$.key!==K.C0.CR||(this.textarea.value=""),this._onKey.fire({key:$.key,domEvent:T}),this._showCursor(),this.coreService.triggerDataEvent($.key,!0),!this.optionsService.rawOptions.screenReaderMode||T.altKey||T.ctrlKey?this.cancel(T,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(T,X){const $=T.isMac&&!this.options.macOptionIsMeta&&X.altKey&&!X.ctrlKey&&!X.metaKey||T.isWindows&&X.altKey&&X.ctrlKey&&!X.metaKey||T.isWindows&&X.getModifierState("AltGraph");return X.type==="keypress"?$:$&&(!X.keyCode||X.keyCode>47)}_keyUp(T){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1||((function(X){return X.keyCode===16||X.keyCode===17||X.keyCode===18})(T)||this.focus(),this.updateCursorStyle(T),this._keyPressHandled=!1)}_keyPress(T){let X;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(T)===!1)return!1;if(this.cancel(T),T.charCode)X=T.charCode;else if(T.which===null||T.which===void 0)X=T.keyCode;else{if(T.which===0||T.charCode===0)return!1;X=T.which}return!(!X||(T.altKey||T.ctrlKey||T.metaKey)&&!this._isThirdLevelShift(this.browser,T)||(X=String.fromCharCode(X),this._onKey.fire({key:X,domEvent:T}),this._showCursor(),this.coreService.triggerDataEvent(X,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(T){if(T.data&&T.inputType==="insertText"&&(!T.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const X=T.data;return this.coreService.triggerDataEvent(X,!0),this.cancel(T),!0}return!1}resize(T,X){T!==this.cols||X!==this.rows?super.resize(T,X):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(T,X){var $,se;($=this._charSizeService)===null||$===void 0||$.measure(),(se=this.viewport)===null||se===void 0||se.syncScrollArea(!0)}clear(){var T;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 X=1;X<this.rows;X++)this.buffer.lines.push(this.buffer.getBlankLine(N.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(T=this.viewport)===null||T===void 0||T.reset(),this.refresh(0,this.rows-1)}}reset(){var T,X;this.options.rows=this.rows,this.options.cols=this.cols;const $=this._customKeyEventHandler;this._setup(),super.reset(),(T=this._selectionService)===null||T===void 0||T.reset(),this._decorationService.reset(),(X=this.viewport)===null||X===void 0||X.reset(),this._customKeyEventHandler=$,this.refresh(0,this.rows-1)}clearTextureAtlas(){var T;(T=this._renderService)===null||T===void 0||T.clearTextureAtlas()}_reportFocus(){var T;!((T=this.element)===null||T===void 0)&&T.classList.contains("focus")?this.coreService.triggerDataEvent(K.C0.ESC+"[I"):this.coreService.triggerDataEvent(K.C0.ESC+"[O")}_reportWindowsOptions(T){if(this._renderService)switch(T){case j.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const X=this._renderService.dimensions.css.canvas.width.toFixed(0),$=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[4;${$};${X}t`);break;case j.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const se=this._renderService.dimensions.css.cell.width.toFixed(0),pe=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${K.C0.ESC}[6;${pe};${se}t`)}}cancel(T,X){if(this.options.cancelEvents||X)return T.preventDefault(),T.stopPropagation(),!1}}u.Terminal=le},9924:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TimeBasedDebouncer=void 0,u.TimeBasedDebouncer=class{constructor(f,d=1e3){this._renderCallback=f,this._debounceThresholdMS=d,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(f,d,y){this._rowCount=y,f=f!==void 0?f:0,d=d!==void 0?d:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,f):f,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,d):d;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=h-this._lastRefreshMs,C=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),C)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const f=Math.max(this._rowStart,0),d=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,d)}}},1680:function(P,u,f){var d=this&&this.__decorate||function(o,a,c,_){var g,b=arguments.length,x=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,c):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(o,a,c,_);else for(var v=o.length-1;v>=0;v--)(g=o[v])&&(x=(b<3?g(x):b>3?g(a,c,x):g(a,c))||x);return b>3&&x&&Object.defineProperty(a,c,x),x},y=this&&this.__param||function(o,a){return function(c,_){a(c,_,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=f(3656),p=f(4725),C=f(8460),D=f(844),S=f(2585);let l=u.Viewport=class extends D.Disposable{constructor(o,a,c,_,g,b,x,v){super(),this._viewportElement=o,this._scrollArea=a,this._bufferService=c,this._optionsService=_,this._charSizeService=g,this._renderService=b,this._coreBrowserService=x,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 C.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((E=>this._activeBuffer=E.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((E=>this._renderDimensions=E))),this._handleThemeChange(v.colors),this.register(v.onChangeColors((E=>this._handleThemeChange(E)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(o){this._viewportElement.style.backgroundColor=o.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(o){if(o)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._renderService.dimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderService.dimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const o=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==o&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=o),this._refreshAnimationFrame=null}syncScrollArea(o=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(o);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(o)}_handleScroll(o){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 o=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(o*(this._smoothScrollState.target-this._smoothScrollState.origin)),o<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(o,a){const c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&c<this._lastRecordedBufferHeight)||(o.cancelable&&o.preventDefault(),!1)}handleWheel(o){const a=this._getPixelsScrolled(o);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(o,a))}scrollLines(o){if(o!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=o*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:o,suppressScrollEvent:!1})}_getPixelsScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let a=this._applyScrollModifier(o.deltaY,o);return o.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(o,a){var c;let _,g="";const b=[],x=a??this._bufferService.buffer.lines.length,v=this._bufferService.buffer.lines;for(let E=o;E<x;E++){const B=v.get(E);if(!B)continue;const U=(c=v.get(E+1))===null||c===void 0?void 0:c.isWrapped;if(g+=B.translateToString(!U),!U||E===v.length-1){const L=document.createElement("div");L.textContent=g,b.push(L),g.length>0&&(_=L),g=""}}return{bufferElements:b,cursorElement:_}}getLinesScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let a=this._applyScrollModifier(o.deltaY,o);return o.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):o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(o,a){const c=this._optionsService.rawOptions.fastScrollModifier;return c==="alt"&&a.altKey||c==="ctrl"&&a.ctrlKey||c==="shift"&&a.shiftKey?o*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:o*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(o){this._lastTouchY=o.touches[0].pageY}handleTouchMove(o){const a=this._lastTouchY-o.touches[0].pageY;return this._lastTouchY=o.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(o,a))}};u.Viewport=l=d([y(2,S.IBufferService),y(3,S.IOptionsService),y(4,p.ICharSizeService),y(5,p.IRenderService),y(6,p.ICoreBrowserService),y(7,p.IThemeService)],l)},3107:function(P,u,f){var d=this&&this.__decorate||function(l,o,a,c){var _,g=arguments.length,b=g<3?o:c===null?c=Object.getOwnPropertyDescriptor(o,a):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,o,a,c);else for(var x=l.length-1;x>=0;x--)(_=l[x])&&(b=(g<3?_(b):g>3?_(o,a,b):_(o,a))||b);return g>3&&b&&Object.defineProperty(o,a,b),b},y=this&&this.__param||function(l,o){return function(a,c){o(a,c,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=f(3656),p=f(4725),C=f(844),D=f(2585);let S=u.BufferDecorationRenderer=class extends C.Disposable{constructor(l,o,a,c){super(),this._screenElement=l,this._bufferService=o,this._decorationService=a,this._renderService=c,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((0,h.addDisposableDomListener)(window,"resize",(()=>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,C.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 l of this._decorationService.decorations)this._renderDecoration(l);this._dimensionsChanged=!1}_renderDecoration(l){this._refreshStyle(l),this._dimensionsChanged&&this._refreshXPosition(l)}_createElement(l){var o,a;const c=document.createElement("div");c.classList.add("xterm-decoration"),c.classList.toggle("xterm-decoration-top-layer",((o=l?.options)===null||o===void 0?void 0:o.layer)==="top"),c.style.width=`${Math.round((l.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,c.style.height=(l.options.height||1)*this._renderService.dimensions.css.cell.height+"px",c.style.top=(l.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",c.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const _=(a=l.options.x)!==null&&a!==void 0?a:0;return _&&_>this._bufferService.cols&&(c.style.display="none"),this._refreshXPosition(l,c),c}_refreshStyle(l){const o=l.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)l.element&&(l.element.style.display="none",l.onRenderEmitter.fire(l.element));else{let a=this._decorationElements.get(l);a||(a=this._createElement(l),l.element=a,this._decorationElements.set(l,a),this._container.appendChild(a),l.onDispose((()=>{this._decorationElements.delete(l),a.remove()}))),a.style.top=o*this._renderService.dimensions.css.cell.height+"px",a.style.display=this._altBufferIsActive?"none":"block",l.onRenderEmitter.fire(a)}}_refreshXPosition(l,o=l.element){var a;if(!o)return;const c=(a=l.options.x)!==null&&a!==void 0?a:0;(l.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(l){var o;(o=this._decorationElements.get(l))===null||o===void 0||o.remove(),this._decorationElements.delete(l),l.dispose()}};u.BufferDecorationRenderer=S=d([y(1,D.IBufferService),y(2,D.IDecorationService),y(3,p.IRenderService)],S)},5871:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ColorZoneStore=void 0,u.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(f){if(f.options.overviewRulerOptions){for(const d of this._zones)if(d.color===f.options.overviewRulerOptions.color&&d.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(d,f.marker.line))return;if(this._lineAdjacentToZone(d,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(d,f.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=f.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=f.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=f.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=f.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:f.options.overviewRulerOptions.color,position:f.options.overviewRulerOptions.position,startBufferLine:f.marker.line,endBufferLine:f.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(f){this._linePadding=f}_lineIntersectsZone(f,d){return d>=f.startBufferLine&&d<=f.endBufferLine}_lineAdjacentToZone(f,d,y){return d>=f.startBufferLine-this._linePadding[y||"full"]&&d<=f.endBufferLine+this._linePadding[y||"full"]}_addLineToZone(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)}}},5744:function(P,u,f){var d=this&&this.__decorate||function(_,g,b,x){var v,E=arguments.length,B=E<3?g:x===null?x=Object.getOwnPropertyDescriptor(g,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(_,g,b,x);else for(var U=_.length-1;U>=0;U--)(v=_[U])&&(B=(E<3?v(B):E>3?v(g,b,B):v(g,b))||B);return E>3&&B&&Object.defineProperty(g,b,B),B},y=this&&this.__param||function(_,g){return function(b,x){g(b,x,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=f(5871),p=f(3656),C=f(4725),D=f(844),S=f(2585),l={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},a={full:0,left:0,center:0,right:0};let c=u.OverviewRulerRenderer=class extends D.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(_,g,b,x,v,E,B){var U;super(),this._viewportElement=_,this._screenElement=g,this._bufferService=b,this._decorationService=x,this._renderService=v,this._optionsService=E,this._coreBrowseService=B,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(U=this._viewportElement.parentElement)===null||U===void 0||U.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,D.toDisposable)((()=>{var k;(k=this._canvas)===null||k===void 0||k.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((0,p.addDisposableDomListener)(this._coreBrowseService.window,"resize",(()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const _=Math.floor(this._canvas.width/3),g=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=_,o.center=g,o.right=_,this._refreshDrawHeightConstants(),a.full=0,a.left=0,a.center=o.left,a.right=o.left+o.center}_refreshDrawHeightConstants(){l.full=Math.round(2*this._coreBrowseService.dpr);const _=this._canvas.height/this._bufferService.buffer.lines.length,g=Math.round(Math.max(Math.min(_,12),6)*this._coreBrowseService.dpr);l.left=g,l.center=g,l.right=g}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*l.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._coreBrowseService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowseService.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 g of this._decorationService.decorations)this._colorZoneStore.addDecoration(g);this._ctx.lineWidth=1;const _=this._colorZoneStore.zones;for(const g of _)g.position!=="full"&&this._renderColorZone(g);for(const g of _)g.position==="full"&&this._renderColorZone(g);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(_){this._ctx.fillStyle=_.color,this._ctx.fillRect(a[_.position||"full"],Math.round((this._canvas.height-1)*(_.startBufferLine/this._bufferService.buffers.active.lines.length)-l[_.position||"full"]/2),o[_.position||"full"],Math.round((this._canvas.height-1)*((_.endBufferLine-_.startBufferLine)/this._bufferService.buffers.active.lines.length)+l[_.position||"full"]))}_queueRefresh(_,g){this._shouldUpdateDimensions=_||this._shouldUpdateDimensions,this._shouldUpdateAnchor=g||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowseService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=c=d([y(2,S.IBufferService),y(3,S.IDecorationService),y(4,C.IRenderService),y(5,S.IOptionsService),y(6,C.ICoreBrowserService)],c)},2950:function(P,u,f){var d=this&&this.__decorate||function(S,l,o,a){var c,_=arguments.length,g=_<3?l:a===null?a=Object.getOwnPropertyDescriptor(l,o):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(S,l,o,a);else for(var b=S.length-1;b>=0;b--)(c=S[b])&&(g=(_<3?c(g):_>3?c(l,o,g):c(l,o))||g);return _>3&&g&&Object.defineProperty(l,o,g),g},y=this&&this.__param||function(S,l){return function(o,a){l(o,a,S)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=f(4725),p=f(2585),C=f(2584);let D=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(S,l,o,a,c,_){this._textarea=S,this._compositionView=l,this._bufferService=o,this._optionsService=a,this._coreService=c,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(S){this._compositionView.textContent=S.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(S){if(this._isComposing||this._isSendingComposition){if(S.keyCode===229||S.keyCode===16||S.keyCode===17||S.keyCode===18)return!1;this._finalizeComposition(!1)}return S.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(S){if(this._compositionView.classList.remove("active"),this._isComposing=!1,S){const l={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let o;this._isSendingComposition=!1,l.start+=this._dataAlreadySent.length,o=this._isComposing?this._textarea.value.substring(l.start,l.end):this._textarea.value.substring(l.start),o.length>0&&this._coreService.triggerDataEvent(o,!0)}}),0)}else{this._isSendingComposition=!1;const l=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(l,!0)}}_handleAnyTextareaChanges(){const S=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const l=this._textarea.value,o=l.replace(S,"");this._dataAlreadySent=o,l.length>S.length?this._coreService.triggerDataEvent(o,!0):l.length<S.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):l.length===S.length&&l!==S&&this._coreService.triggerDataEvent(l,!0)}}),0)}updateCompositionElements(S){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const l=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),o=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,c=l*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=a+"px",this._compositionView.style.height=o+"px",this._compositionView.style.lineHeight=o+"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=c+"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"}S||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=D=d([y(2,p.IBufferService),y(3,p.IOptionsService),y(4,p.ICoreService),y(5,h.IRenderService)],D)},9806:(P,u)=>{function f(d,y,h){const p=h.getBoundingClientRect(),C=d.getComputedStyle(h),D=parseInt(C.getPropertyValue("padding-left")),S=parseInt(C.getPropertyValue("padding-top"));return[y.clientX-p.left-D,y.clientY-p.top-S]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=f,u.getCoords=function(d,y,h,p,C,D,S,l,o){if(!D)return;const a=f(d,y,h);return a?(a[0]=Math.ceil((a[0]+(o?S/2:0))/S),a[1]=Math.ceil(a[1]/l),a[0]=Math.min(Math.max(a[0],1),p+(o?1:0)),a[1]=Math.min(Math.max(a[1],1),C),a):void 0}},9504:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=f(2584);function y(l,o,a,c){const _=l-h(l,a),g=o-h(o,a),b=Math.abs(_-g)-(function(x,v,E){let B=0;const U=x-h(x,E),L=v-h(v,E);for(let k=0;k<Math.abs(U-L);k++){const Z=p(x,v)==="A"?-1:1,ee=E.buffer.lines.get(U+Z*k);ee?.isWrapped&&B++}return B})(l,o,a);return S(b,D(p(l,o),c))}function h(l,o){let a=0,c=o.buffer.lines.get(l),_=c?.isWrapped;for(;_&&l>=0&&l<o.rows;)a++,c=o.buffer.lines.get(--l),_=c?.isWrapped;return a}function p(l,o){return l>o?"A":"B"}function C(l,o,a,c,_,g){let b=l,x=o,v="";for(;b!==a||x!==c;)b+=_?1:-1,_&&b>g.cols-1?(v+=g.buffer.translateBufferLineToString(x,!1,l,b),b=0,l=0,x++):!_&&b<0&&(v+=g.buffer.translateBufferLineToString(x,!1,0,l+1),b=g.cols-1,l=b,x--);return v+g.buffer.translateBufferLineToString(x,!1,l,b)}function D(l,o){const a=o?"O":"[";return d.C0.ESC+a+l}function S(l,o){l=Math.floor(l);let a="";for(let c=0;c<l;c++)a+=o;return a}u.moveToCellSequence=function(l,o,a,c){const _=a.buffer.x,g=a.buffer.y;if(!a.buffer.hasScrollback)return(function(v,E,B,U,L,k){return y(E,U,L,k).length===0?"":S(C(v,E,v,E-h(E,L),!1,L).length,D("D",k))})(_,g,0,o,a,c)+y(g,o,a,c)+(function(v,E,B,U,L,k){let Z;Z=y(E,U,L,k).length>0?U-h(U,L):E;const ee=U,N=(function(K,A,M,O,w,j){let W;return W=y(M,O,w,j).length>0?O-h(O,w):A,K<M&&W<=O||K>=M&&W<O?"C":"D"})(v,E,B,U,L,k);return S(C(v,Z,B,ee,N==="C",L).length,D(N,k))})(_,g,l,o,a,c);let b;if(g===o)return b=_>l?"D":"C",S(Math.abs(_-l),D(b,c));b=g>o?"D":"C";const x=Math.abs(g-o);return S((function(v,E){return E.cols-v})(g>o?l:_,a)+(x-1)*a.cols+1+((g>o?_:l)-1),D(b,c))}},1296:function(P,u,f){var d=this&&this.__decorate||function(L,k,Z,ee){var N,K=arguments.length,A=K<3?k:ee===null?ee=Object.getOwnPropertyDescriptor(k,Z):ee;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(L,k,Z,ee);else for(var M=L.length-1;M>=0;M--)(N=L[M])&&(A=(K<3?N(A):K>3?N(k,Z,A):N(k,Z))||A);return K>3&&A&&Object.defineProperty(k,Z,A),A},y=this&&this.__param||function(L,k){return function(Z,ee){k(Z,ee,L)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=f(3787),p=f(2550),C=f(2223),D=f(6171),S=f(4725),l=f(8055),o=f(8460),a=f(844),c=f(2585),_="xterm-dom-renderer-owner-",g="xterm-rows",b="xterm-fg-",x="xterm-bg-",v="xterm-focus",E="xterm-selection";let B=1,U=u.DomRenderer=class extends a.Disposable{constructor(L,k,Z,ee,N,K,A,M,O,w){super(),this._element=L,this._screenElement=k,this._viewportElement=Z,this._linkifier2=ee,this._charSizeService=K,this._optionsService=A,this._bufferService=M,this._coreBrowserService=O,this._themeService=w,this._terminalClass=B++,this._rowElements=[],this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=document.createElement("div"),this._rowContainer.classList.add(g),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=document.createElement("div"),this._selectionContainer.classList.add(E),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((j=>this._injectCss(j)))),this._injectCss(this._themeService.colors),this._rowFactory=N.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(_+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((j=>this._handleLinkHover(j)))),this.register(this._linkifier2.onHideLinkUnderline((j=>this._handleLinkLeave(j)))),this.register((0,a.toDisposable)((()=>{this._element.classList.remove(_+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new p.WidthCache(document),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const L=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*L,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*L),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/L),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/L),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 Z of this._rowElements)Z.style.width=`${this.dimensions.css.canvas.width}px`,Z.style.height=`${this.dimensions.css.cell.height}px`,Z.style.lineHeight=`${this.dimensions.css.cell.height}px`,Z.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const k=`${this._terminalSelector} .${g} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=k,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(L){this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let k=`${this._terminalSelector} .${g} { color: ${L.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;k+=`${this._terminalSelector} .${g} .xterm-dim { color: ${l.color.multiplyOpacity(L.foreground,.5).css};}`,k+=`${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;}`,k+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { border-bottom-style: hidden; }}",k+="@keyframes blink_block_"+this._terminalClass+` { 0% { background-color: ${L.cursor.css}; color: ${L.cursorAccent.css}; } 50% { background-color: inherit; color: ${L.cursor.css}; }}`,k+=`${this._terminalSelector} .${g}.${v} .xterm-cursor.xterm-cursor-blink:not(.xterm-cursor-block) { animation: blink_box_shadow_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${g}.${v} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: blink_block_`+this._terminalClass+` 1s step-end infinite;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-block { background-color: ${L.cursor.css}; color: ${L.cursorAccent.css};}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${L.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${L.cursor.css} inset;}${this._terminalSelector} .${g} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${L.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,k+=`${this._terminalSelector} .${E} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${E} div { position: absolute; background-color: ${L.selectionBackgroundOpaque.css};}${this._terminalSelector} .${E} div { position: absolute; background-color: ${L.selectionInactiveBackgroundOpaque.css};}`;for(const[Z,ee]of L.ansi.entries())k+=`${this._terminalSelector} .${b}${Z} { color: ${ee.css}; }${this._terminalSelector} .${b}${Z}.xterm-dim { color: ${l.color.multiplyOpacity(ee,.5).css}; }${this._terminalSelector} .${x}${Z} { background-color: ${ee.css}; }`;k+=`${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(L.background).css}; }${this._terminalSelector} .${b}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(L.background),.5).css}; }${this._terminalSelector} .${x}${C.INVERTED_DEFAULT_COLOR} { background-color: ${L.foreground.css}; }`,this._themeStyleElement.textContent=k}_setDefaultSpacing(){const L=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${L}px`,this._rowFactory.defaultSpacing=L}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(L,k){for(let Z=this._rowElements.length;Z<=k;Z++){const ee=document.createElement("div");this._rowContainer.appendChild(ee),this._rowElements.push(ee)}for(;this._rowElements.length>k;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(L,k){this._refreshRowElements(L,k),this._updateDimensions()}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(v)}handleFocus(){this._rowContainer.classList.add(v),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(L,k,Z){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(L,k,Z),this.renderRows(0,this._bufferService.rows-1),!L||!k)return;const ee=L[1]-this._bufferService.buffer.ydisp,N=k[1]-this._bufferService.buffer.ydisp,K=Math.max(ee,0),A=Math.min(N,this._bufferService.rows-1);if(K>=this._bufferService.rows||A<0)return;const M=document.createDocumentFragment();if(Z){const O=L[0]>k[0];M.appendChild(this._createSelectionElement(K,O?k[0]:L[0],O?L[0]:k[0],A-K+1))}else{const O=ee===K?L[0]:0,w=K===N?k[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(K,O,w));const j=A-K-1;if(M.appendChild(this._createSelectionElement(K+1,0,this._bufferService.cols,j)),K!==A){const W=N===A?k[0]:this._bufferService.cols;M.appendChild(this._createSelectionElement(A,0,W))}}this._selectionContainer.appendChild(M)}_createSelectionElement(L,k,Z,ee=1){const N=document.createElement("div");return N.style.height=ee*this.dimensions.css.cell.height+"px",N.style.top=L*this.dimensions.css.cell.height+"px",N.style.left=k*this.dimensions.css.cell.width+"px",N.style.width=this.dimensions.css.cell.width*(Z-k)+"px",N}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 L of this._rowElements)L.replaceChildren()}renderRows(L,k){const Z=this._bufferService.buffer,ee=Z.ybase+Z.y,N=Math.min(Z.x,this._bufferService.cols-1),K=this._optionsService.rawOptions.cursorBlink,A=this._optionsService.rawOptions.cursorStyle,M=this._optionsService.rawOptions.cursorInactiveStyle;for(let O=L;O<=k;O++){const w=O+Z.ydisp,j=this._rowElements[O],W=Z.lines.get(w);if(!j||!W)break;j.replaceChildren(...this._rowFactory.createRow(W,w,w===ee,A,M,N,K,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${_}${this._terminalClass}`}_handleLinkHover(L){this._setCellUnderline(L.x1,L.x2,L.y1,L.y2,L.cols,!0)}_handleLinkLeave(L){this._setCellUnderline(L.x1,L.x2,L.y1,L.y2,L.cols,!1)}_setCellUnderline(L,k,Z,ee,N,K){Z<0&&(L=0),ee<0&&(k=0);const A=this._bufferService.rows-1;Z=Math.max(Math.min(Z,A),0),ee=Math.max(Math.min(ee,A),0),N=Math.min(N,this._bufferService.cols);const M=this._bufferService.buffer,O=M.ybase+M.y,w=Math.min(M.x,N-1),j=this._optionsService.rawOptions.cursorBlink,W=this._optionsService.rawOptions.cursorStyle,te=this._optionsService.rawOptions.cursorInactiveStyle;for(let le=Z;le<=ee;++le){const fe=le+M.ydisp,T=this._rowElements[le],X=M.lines.get(fe);if(!T||!X)break;T.replaceChildren(...this._rowFactory.createRow(X,fe,fe===O,W,te,w,j,this.dimensions.css.cell.width,this._widthCache,K?le===Z?L:0:-1,K?(le===ee?k:N)-1:-1))}}};u.DomRenderer=U=d([y(4,c.IInstantiationService),y(5,S.ICharSizeService),y(6,c.IOptionsService),y(7,c.IBufferService),y(8,S.ICoreBrowserService),y(9,S.IThemeService)],U)},3787:function(P,u,f){var d=this&&this.__decorate||function(b,x,v,E){var B,U=arguments.length,L=U<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,v):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(b,x,v,E);else for(var k=b.length-1;k>=0;k--)(B=b[k])&&(L=(U<3?B(L):U>3?B(x,v,L):B(x,v))||L);return U>3&&L&&Object.defineProperty(x,v,L),L},y=this&&this.__param||function(b,x){return function(v,E){x(v,E,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=f(2223),p=f(643),C=f(511),D=f(2585),S=f(8055),l=f(4725),o=f(4269),a=f(6171),c=f(3734);let _=u.DomRendererRowFactory=class{constructor(b,x,v,E,B,U,L){this._document=b,this._characterJoinerService=x,this._optionsService=v,this._coreBrowserService=E,this._coreService=B,this._decorationService=U,this._themeService=L,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(b,x,v){this._selectionStart=b,this._selectionEnd=x,this._columnSelectMode=v}createRow(b,x,v,E,B,U,L,k,Z,ee,N){const K=[],A=this._characterJoinerService.getJoinedCharacters(x),M=this._themeService.colors;let O,w=b.getNoBgTrimmedLength();v&&w<U+1&&(w=U+1);let j=0,W="",te=0,le=0,fe=0,T=!1,X=0,$=!1,se=0;const pe=[],oe=ee!==-1&&N!==-1;for(let xe=0;xe<w;xe++){b.loadCell(xe,this._workCell);let Ne=this._workCell.getWidth();if(Ne===0)continue;let $e=!1,wt=xe,Ce=this._workCell;if(A.length>0&&xe===A[0][0]){$e=!0;const qe=A.shift();Ce=new o.JoinedCellData(this._workCell,b.translateToString(!0,qe[0],qe[1]),qe[1]-qe[0]),wt=qe[1]-1,Ne=Ce.getWidth()}const Zt=this._isCellInSelection(xe,x),Jt=v&&xe===U,ii=oe&&xe>=ee&&xe<=N;let ht=!1;this._decorationService.forEachDecorationAtCell(xe,x,void 0,(qe=>{ht=!0}));let fi=Ce.getChars()||p.WHITESPACE_CELL_CHAR;if(fi===" "&&(Ce.isUnderline()||Ce.isOverline())&&(fi=" "),se=Ne*k-Z.get(fi,Ce.isBold(),Ce.isItalic()),O){if(j&&(Zt&&$||!Zt&&!$&&Ce.bg===te)&&(Zt&&$&&M.selectionForeground||Ce.fg===le)&&Ce.extended.ext===fe&&ii===T&&se===X&&!Jt&&!$e&&!ht){W+=fi,j++;continue}j&&(O.textContent=W),O=this._document.createElement("span"),j=0,W=""}else O=this._document.createElement("span");if(te=Ce.bg,le=Ce.fg,fe=Ce.extended.ext,T=ii,X=se,$=Zt,$e&&U>=xe&&U<=wt&&(U=xe),!this._coreService.isCursorHidden&&Jt){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)L&&pe.push("xterm-cursor-blink"),pe.push(E==="bar"?"xterm-cursor-bar":E==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(B)switch(B){case"outline":pe.push("xterm-cursor-outline");break;case"block":pe.push("xterm-cursor-block");break;case"bar":pe.push("xterm-cursor-bar");break;case"underline":pe.push("xterm-cursor-underline")}}if(Ce.isBold()&&pe.push("xterm-bold"),Ce.isItalic()&&pe.push("xterm-italic"),Ce.isDim()&&pe.push("xterm-dim"),W=Ce.isInvisible()?p.WHITESPACE_CELL_CHAR:Ce.getChars()||p.WHITESPACE_CELL_CHAR,Ce.isUnderline()&&(pe.push(`xterm-underline-${Ce.extended.underlineStyle}`),W===" "&&(W=" "),!Ce.isUnderlineColorDefault()))if(Ce.isUnderlineColorRGB())O.style.textDecorationColor=`rgb(${c.AttributeData.toColorRGB(Ce.getUnderlineColor()).join(",")})`;else{let qe=Ce.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ce.isBold()&&qe<8&&(qe+=8),O.style.textDecorationColor=M.ansi[qe].css}Ce.isOverline()&&(pe.push("xterm-overline"),W===" "&&(W=" ")),Ce.isStrikethrough()&&pe.push("xterm-strikethrough"),ii&&(O.style.textDecoration="underline");let St=Ce.getFgColor(),it=Ce.getFgColorMode(),yt=Ce.getBgColor(),Bt=Ce.getBgColorMode();const Ot=!!Ce.isInverse();if(Ot){const qe=St;St=yt,yt=qe;const ri=it;it=Bt,Bt=ri}let Ve,bt,xt,si=!1;switch(this._decorationService.forEachDecorationAtCell(xe,x,void 0,(qe=>{qe.options.layer!=="top"&&si||(qe.backgroundColorRGB&&(Bt=50331648,yt=qe.backgroundColorRGB.rgba>>8&16777215,Ve=qe.backgroundColorRGB),qe.foregroundColorRGB&&(it=50331648,St=qe.foregroundColorRGB.rgba>>8&16777215,bt=qe.foregroundColorRGB),si=qe.options.layer==="top")})),!si&&Zt&&(Ve=this._coreBrowserService.isFocused?M.selectionBackgroundOpaque:M.selectionInactiveBackgroundOpaque,yt=Ve.rgba>>8&16777215,Bt=50331648,si=!0,M.selectionForeground&&(it=50331648,St=M.selectionForeground.rgba>>8&16777215,bt=M.selectionForeground)),si&&pe.push("xterm-decoration-top"),Bt){case 16777216:case 33554432:xt=M.ansi[yt],pe.push(`xterm-bg-${yt}`);break;case 50331648:xt=S.rgba.toColor(yt>>16,yt>>8&255,255&yt),this._addStyle(O,`background-color:#${g((yt>>>0).toString(16),"0",6)}`);break;default:Ot?(xt=M.foreground,pe.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):xt=M.background}switch(Ve||Ce.isDim()&&(Ve=S.color.multiplyOpacity(xt,.5)),it){case 16777216:case 33554432:Ce.isBold()&&St<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(St+=8),this._applyMinimumContrast(O,xt,M.ansi[St],Ce,Ve,void 0)||pe.push(`xterm-fg-${St}`);break;case 50331648:const qe=S.rgba.toColor(St>>16&255,St>>8&255,255&St);this._applyMinimumContrast(O,xt,qe,Ce,Ve,bt)||this._addStyle(O,`color:#${g(St.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(O,xt,M.foreground,Ce,Ve,void 0)||Ot&&pe.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}pe.length&&(O.className=pe.join(" "),pe.length=0),Jt||$e||ht?O.textContent=W:j++,se!==this.defaultSpacing&&(O.style.letterSpacing=`${se}px`),K.push(O),xe=wt}return O&&j&&(O.textContent=W),K}_applyMinimumContrast(b,x,v,E,B,U){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.excludeFromContrastRatioDemands)(E.getCode()))return!1;const L=this._getContrastCache(E);let k;if(B||U||(k=L.getColor(x.rgba,v.rgba)),k===void 0){const Z=this._optionsService.rawOptions.minimumContrastRatio/(E.isDim()?2:1);k=S.color.ensureContrastRatio(B||x,U||v,Z),L.setColor((B||x).rgba,(U||v).rgba,k??null)}return!!k&&(this._addStyle(b,`color:${k.css}`),!0)}_getContrastCache(b){return b.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(b,x){b.setAttribute("style",`${b.getAttribute("style")||""}${x};`)}_isCellInSelection(b,x){const v=this._selectionStart,E=this._selectionEnd;return!(!v||!E)&&(this._columnSelectMode?v[0]<=E[0]?b>=v[0]&&x>=v[1]&&b<E[0]&&x<=E[1]:b<v[0]&&x>=v[1]&&b>=E[0]&&x<=E[1]:x>v[1]&&x<E[1]||v[1]===E[1]&&x===v[1]&&b>=v[0]&&b<E[0]||v[1]<E[1]&&x===E[1]&&b<E[0]||v[1]<E[1]&&x===v[1]&&b>=v[0])}};function g(b,x,v){for(;b.length<v;)b=x+b;return b}u.DomRendererRowFactory=_=d([y(1,l.ICharacterJoinerService),y(2,D.IOptionsService),y(3,l.ICoreBrowserService),y(4,D.ICoreService),y(5,D.IDecorationService),y(6,l.IThemeService)],_)},2550:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=f.createElement("div"),this._container.style.position="absolute",this._container.style.top="-50000px",this._container.style.width="50000px",this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const d=f.createElement("span"),y=f.createElement("span");y.style.fontWeight="bold";const h=f.createElement("span");h.style.fontStyle="italic";const p=f.createElement("span");p.style.fontWeight="bold",p.style.fontStyle="italic",this._measureElements=[d,y,h,p],this._container.appendChild(d),this._container.appendChild(y),this._container.appendChild(h),this._container.appendChild(p),f.body.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(f,d,y,h){f===this._font&&d===this._fontSize&&y===this._weight&&h===this._weightBold||(this._font=f,this._fontSize=d,this._weight=y,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${y}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${y}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(f,d,y){let h=0;if(!d&&!y&&f.length===1&&(h=f.charCodeAt(0))<256)return this._flat[h]!==-9999?this._flat[h]:this._flat[h]=this._measure(f,0);let p=f;d&&(p+="B"),y&&(p+="I");let C=this._holey.get(p);if(C===void 0){let D=0;d&&(D|=1),y&&(D|=2),C=this._measure(f,D),this._holey.set(p,C)}return C}_measure(f,d){const y=this._measureElements[d];return y.textContent=f.repeat(32),y.offsetWidth/32}}},2223:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.TEXT_BASELINE=u.DIM_OPACITY=u.INVERTED_DEFAULT_COLOR=void 0;const d=f(6114);u.INVERTED_DEFAULT_COLOR=257,u.DIM_OPACITY=.5,u.TEXT_BASELINE=d.isFirefox||d.isLegacyEdge?"bottom":"ideographic"},6171:(P,u)=>{function f(d){return 57508<=d&&d<=57558}Object.defineProperty(u,"__esModule",{value:!0}),u.createRenderDimensions=u.excludeFromContrastRatioDemands=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(d){if(!d)throw new Error("value must not be falsy");return d},u.isPowerlineGlyph=f,u.isRestrictedPowerlineGlyph=function(d){return 57520<=d&&d<=57527},u.excludeFromContrastRatioDemands=function(d){return f(d)||(function(y){return 9472<=y&&y<=9631})(d)},u.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}}}}},456:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionModel=void 0,u.SelectionModel=class{constructor(f){this._bufferService=f,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 f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?f%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)-1]:[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[f,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const f=this.selectionStart[0]+this.selectionStartLength;return f>this._bufferService.cols?[f%this._bufferService.cols,this.selectionStart[1]+Math.floor(f/this._bufferService.cols)]:[Math.max(f,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const f=this.selectionStart,d=this.selectionEnd;return!(!f||!d)&&(f[1]>d[1]||f[1]===d[1]&&f[0]>d[0])}handleTrim(f){return this.selectionStart&&(this.selectionStart[1]-=f),this.selectionEnd&&(this.selectionEnd[1]-=f),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(P,u,f){var d=this&&this.__decorate||function(l,o,a,c){var _,g=arguments.length,b=g<3?o:c===null?c=Object.getOwnPropertyDescriptor(o,a):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,o,a,c);else for(var x=l.length-1;x>=0;x--)(_=l[x])&&(b=(g<3?_(b):g>3?_(o,a,b):_(o,a))||b);return g>3&&b&&Object.defineProperty(o,a,b),b},y=this&&this.__param||function(l,o){return function(a,c){o(a,c,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=f(2585),p=f(8460),C=f(844);let D=u.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(l,o,a){super(),this._optionsService=a,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event,this._measureStrategy=new S(l,o,this._optionsService),this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const l=this._measureStrategy.measure();l.width===this.width&&l.height===this.height||(this.width=l.width,this.height=l.height,this._onCharSizeChange.fire())}};u.CharSizeService=D=d([y(2,h.IOptionsService)],D);class S{constructor(o,a,c){this._document=o,this._parentElement=a,this._optionsService=c,this._result={width:0,height:0},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(){this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`;const o={height:Number(this._measureElement.offsetHeight),width:Number(this._measureElement.offsetWidth)};return o.width!==0&&o.height!==0&&(this._result.width=o.width/32,this._result.height=Math.ceil(o.height)),this._result}}},4269:function(P,u,f){var d=this&&this.__decorate||function(o,a,c,_){var g,b=arguments.length,x=b<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,c):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(o,a,c,_);else for(var v=o.length-1;v>=0;v--)(g=o[v])&&(x=(b<3?g(x):b>3?g(a,c,x):g(a,c))||x);return b>3&&x&&Object.defineProperty(a,c,x),x},y=this&&this.__param||function(o,a){return function(c,_){a(c,_,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=f(3734),p=f(643),C=f(511),D=f(2585);class S extends h.AttributeData{constructor(a,c,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=c,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()]}}u.JoinedCellData=S;let l=u.CharacterJoinerService=class Zf{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(a){const c={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(c),c.id}deregister(a){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===a)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(a);if(!c||c.length===0)return[];const _=[],g=c.translateToString(!0);let b=0,x=0,v=0,E=c.getFg(0),B=c.getBg(0);for(let U=0;U<c.getTrimmedLength();U++)if(c.loadCell(U,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==E||this._workCell.bg!==B){if(U-b>1){const L=this._getJoinedRanges(g,v,x,c,b);for(let k=0;k<L.length;k++)_.push(L[k])}b=U,v=x,E=this._workCell.fg,B=this._workCell.bg}x+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-b>1){const U=this._getJoinedRanges(g,v,x,c,b);for(let L=0;L<U.length;L++)_.push(U[L])}return _}_getJoinedRanges(a,c,_,g,b){const x=a.substring(c,_);let v=[];try{v=this._characterJoiners[0].handler(x)}catch(E){console.error(E)}for(let E=1;E<this._characterJoiners.length;E++)try{const B=this._characterJoiners[E].handler(x);for(let U=0;U<B.length;U++)Zf._mergeRanges(v,B[U])}catch(B){console.error(B)}return this._stringRangesToCellRanges(v,g,b),v}_stringRangesToCellRanges(a,c,_){let g=0,b=!1,x=0,v=a[g];if(v){for(let E=_;E<this._bufferService.cols;E++){const B=c.getWidth(E),U=c.getString(E).length||p.WHITESPACE_CELL_CHAR.length;if(B!==0){if(!b&&v[0]<=x&&(v[0]=E,b=!0),v[1]<=x){if(v[1]=E,v=a[++g],!v)break;v[0]<=x?(v[0]=E,b=!0):b=!1}x+=U}}v&&(v[1]=this._bufferService.cols)}}static _mergeRanges(a,c){let _=!1;for(let g=0;g<a.length;g++){const b=a[g];if(_){if(c[1]<=b[0])return a[g-1][1]=c[1],a;if(c[1]<=b[1])return a[g-1][1]=Math.max(c[1],b[1]),a.splice(g,1),a;a.splice(g,1),g--}else{if(c[1]<=b[0])return a.splice(g,0,c),a;if(c[1]<=b[1])return b[0]=Math.min(c[0],b[0]),a;c[0]<b[1]&&(b[0]=Math.min(c[0],b[0]),_=!0)}}return _?a[a.length-1][1]=c[1]:a.push(c),a}};u.CharacterJoinerService=l=d([y(0,D.IBufferService)],l)},5114:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0,u.CoreBrowserService=class{constructor(f,d){this._textarea=f,this.window=d,this._isFocused=!1,this._cachedIsFocused=void 0,this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}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}}},8934:function(P,u,f){var d=this&&this.__decorate||function(D,S,l,o){var a,c=arguments.length,_=c<3?S:o===null?o=Object.getOwnPropertyDescriptor(S,l):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(D,S,l,o);else for(var g=D.length-1;g>=0;g--)(a=D[g])&&(_=(c<3?a(_):c>3?a(S,l,_):a(S,l))||_);return c>3&&_&&Object.defineProperty(S,l,_),_},y=this&&this.__param||function(D,S){return function(l,o){S(l,o,D)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=f(4725),p=f(9806);let C=u.MouseService=class{constructor(D,S){this._renderService=D,this._charSizeService=S}getCoords(D,S,l,o,a){return(0,p.getCoords)(window,D,S,l,o,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(D,S){const l=(0,p.getCoordsRelativeToElement)(window,D,S);if(this._charSizeService.hasValidSize)return l[0]=Math.min(Math.max(l[0],0),this._renderService.dimensions.css.canvas.width-1),l[1]=Math.min(Math.max(l[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(l[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(l[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(l[0]),y:Math.floor(l[1])}}};u.MouseService=C=d([y(0,h.IRenderService),y(1,h.ICharSizeService)],C)},3230:function(P,u,f){var d=this&&this.__decorate||function(_,g,b,x){var v,E=arguments.length,B=E<3?g:x===null?x=Object.getOwnPropertyDescriptor(g,b):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(_,g,b,x);else for(var U=_.length-1;U>=0;U--)(v=_[U])&&(B=(E<3?v(B):E>3?v(g,b,B):v(g,b))||B);return E>3&&B&&Object.defineProperty(g,b,B),B},y=this&&this.__param||function(_,g){return function(b,x){g(b,x,_)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=f(3656),p=f(6193),C=f(5596),D=f(4725),S=f(8460),l=f(844),o=f(7226),a=f(2585);let c=u.RenderService=class extends l.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(_,g,b,x,v,E,B,U){if(super(),this._rowCount=_,this._charSizeService=x,this._renderer=this.register(new l.MutableDisposable),this._pausedResizeTask=new o.DebouncedIdleTask,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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new p.RenderDebouncer(B.window,((L,k)=>this._renderRows(L,k))),this.register(this._renderDebouncer),this._screenDprMonitor=new C.ScreenDprMonitor(B.window),this._screenDprMonitor.setListener((()=>this.handleDevicePixelRatioChange())),this.register(this._screenDprMonitor),this.register(E.onResize((()=>this._fullRefresh()))),this.register(E.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)===null||L===void 0?void 0:L.clear()}))),this.register(b.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(v.onDecorationRegistered((()=>this._fullRefresh()))),this.register(v.onDecorationRemoved((()=>this._fullRefresh()))),this.register(b.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio"],(()=>{this.clear(),this.handleResize(E.cols,E.rows),this._fullRefresh()}))),this.register(b.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(E.buffer.y,E.buffer.y,!0)))),this.register((0,h.addDisposableDomListener)(B.window,"resize",(()=>this.handleDevicePixelRatioChange()))),this.register(U.onChangeColors((()=>this._fullRefresh()))),"IntersectionObserver"in B.window){const L=new B.window.IntersectionObserver((k=>this._handleIntersectionChange(k[k.length-1])),{threshold:0});L.observe(g),this.register({dispose:()=>L.disconnect()})}}_handleIntersectionChange(_){this._isPaused=_.isIntersecting===void 0?_.intersectionRatio===0:!_.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(_,g,b=!1){this._isPaused?this._needsFullRefresh=!0:(b||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(_,g,this._rowCount))}_renderRows(_,g){this._renderer.value&&(_=Math.min(_,this._rowCount-1),g=Math.min(g,this._rowCount-1),this._renderer.value.renderRows(_,g),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:_,end:g}),this._onRender.fire({start:_,end:g}),this._isNextRenderRedrawOnly=!0)}resize(_,g){this._rowCount=g,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(_){this._renderer.value=_,this._renderer.value.onRequestRedraw((g=>this.refreshRows(g.start,g.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh()}addRefreshCallback(_){return this._renderDebouncer.addRefreshCallback(_)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var _,g;this._renderer.value&&((g=(_=this._renderer.value).clearTextureAtlas)===null||g===void 0||g.call(_),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(_,g){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value.handleResize(_,g))):this._renderer.value.handleResize(_,g),this._fullRefresh())}handleCharSizeChanged(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCharSizeChanged()}handleBlur(){var _;(_=this._renderer.value)===null||_===void 0||_.handleBlur()}handleFocus(){var _;(_=this._renderer.value)===null||_===void 0||_.handleFocus()}handleSelectionChanged(_,g,b){var x;this._selectionState.start=_,this._selectionState.end=g,this._selectionState.columnSelectMode=b,(x=this._renderer.value)===null||x===void 0||x.handleSelectionChanged(_,g,b)}handleCursorMove(){var _;(_=this._renderer.value)===null||_===void 0||_.handleCursorMove()}clear(){var _;(_=this._renderer.value)===null||_===void 0||_.clear()}};u.RenderService=c=d([y(2,a.IOptionsService),y(3,D.ICharSizeService),y(4,a.IDecorationService),y(5,a.IBufferService),y(6,D.ICoreBrowserService),y(7,D.IThemeService)],c)},9312:function(P,u,f){var d=this&&this.__decorate||function(v,E,B,U){var L,k=arguments.length,Z=k<3?E:U===null?U=Object.getOwnPropertyDescriptor(E,B):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(v,E,B,U);else for(var ee=v.length-1;ee>=0;ee--)(L=v[ee])&&(Z=(k<3?L(Z):k>3?L(E,B,Z):L(E,B))||Z);return k>3&&Z&&Object.defineProperty(E,B,Z),Z},y=this&&this.__param||function(v,E){return function(B,U){E(B,U,v)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=f(9806),p=f(9504),C=f(456),D=f(4725),S=f(8460),l=f(844),o=f(6114),a=f(4841),c=f(511),_=f(2585),g=" ",b=new RegExp(g,"g");let x=u.SelectionService=class extends l.Disposable{constructor(v,E,B,U,L,k,Z,ee,N){super(),this._element=v,this._screenElement=E,this._linkifier=B,this._bufferService=U,this._coreService=L,this._mouseService=k,this._optionsService=Z,this._renderService=ee,this._coreBrowserService=N,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new c.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new S.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new S.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new S.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=K=>this._handleMouseMove(K),this._mouseUpListener=K=>this._handleMouseUp(K),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((K=>this._handleTrim(K))),this.register(this._bufferService.buffers.onBufferActivate((K=>this._handleBufferActivate(K)))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,l.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,E=this._model.finalSelectionEnd;return!(!v||!E||v[0]===E[0]&&v[1]===E[1])}get selectionText(){const v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd;if(!v||!E)return"";const B=this._bufferService.buffer,U=[];if(this._activeSelectionMode===3){if(v[0]===E[0])return"";const L=v[0]<E[0]?v[0]:E[0],k=v[0]<E[0]?E[0]:v[0];for(let Z=v[1];Z<=E[1];Z++){const ee=B.translateBufferLineToString(Z,!0,L,k);U.push(ee)}}else{const L=v[1]===E[1]?E[0]:void 0;U.push(B.translateBufferLineToString(v[1],!0,v[0],L));for(let k=v[1]+1;k<=E[1]-1;k++){const Z=B.lines.get(k),ee=B.translateBufferLineToString(k,!0);Z?.isWrapped?U[U.length-1]+=ee:U.push(ee)}if(v[1]!==E[1]){const k=B.lines.get(E[1]),Z=B.translateBufferLineToString(E[1],!0,0,E[0]);k&&k.isWrapped?U[U.length-1]+=Z:U.push(Z)}}return U.map((L=>L.replace(b," "))).join(o.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()))),o.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 E=this._getMouseBufferCoords(v),B=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!!(B&&U&&E)&&this._areCoordsInSelection(E,B,U)}isCellInSelection(v,E){const B=this._model.finalSelectionStart,U=this._model.finalSelectionEnd;return!(!B||!U)&&this._areCoordsInSelection([v,E],B,U)}_areCoordsInSelection(v,E,B){return v[1]>E[1]&&v[1]<B[1]||E[1]===B[1]&&v[1]===E[1]&&v[0]>=E[0]&&v[0]<B[0]||E[1]<B[1]&&v[1]===B[1]&&v[0]<B[0]||E[1]<B[1]&&v[1]===E[1]&&v[0]>=E[0]}_selectWordAtCursor(v,E){var B,U;const L=(U=(B=this._linkifier.currentLink)===null||B===void 0?void 0:B.link)===null||U===void 0?void 0:U.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const k=this._getMouseBufferCoords(v);return!!k&&(this._selectWordAt(k,E),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(v,E){this._model.clearSelection(),v=Math.max(v,0),E=Math.min(E,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,v],this._model.selectionEnd=[this._bufferService.cols,E],this.refresh(),this._onSelectionChange.fire()}_handleTrim(v){this._model.handleTrim(v)&&this.refresh()}_getMouseBufferCoords(v){const E=this._mouseService.getCoords(v,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(E)return E[0]--,E[1]--,E[1]+=this._bufferService.buffer.ydisp,E}_getMouseEventScrollAmount(v){let E=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,v,this._screenElement)[1];const B=this._renderService.dimensions.css.canvas.height;return E>=0&&E<=B?0:(E>B&&(E-=B),E=Math.min(Math.max(E,-50),50),E/=50,E/Math.abs(E)+Math.round(14*E))}shouldForceSelection(v){return o.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 E=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);E&&E.length!==this._model.selectionStart[0]&&E.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(v){this._selectWordAtCursor(v,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(v){const E=this._getMouseBufferCoords(v);E&&(this._activeSelectionMode=2,this._selectLineAt(E[1]))}shouldColumnSelect(v){return v.altKey&&!(o.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(v){if(v.stopImmediatePropagation(),!this._model.selectionStart)return;const E=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 B=this._bufferService.buffer;if(this._model.selectionEnd[1]<B.lines.length){const U=B.lines.get(this._model.selectionEnd[1]);U&&U.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}E&&E[0]===this._model.selectionEnd[0]&&E[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 E=v.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&E<500&&v.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const B=this._mouseService.getCoords(v,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(B&&B[0]!==void 0&&B[1]!==void 0){const U=(0,p.moveToCellSequence)(B[0]-1,B[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(U,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const v=this._model.finalSelectionStart,E=this._model.finalSelectionEnd,B=!(!v||!E||v[0]===E[0]&&v[1]===E[1]);B?v&&E&&(this._oldSelectionStart&&this._oldSelectionEnd&&v[0]===this._oldSelectionStart[0]&&v[1]===this._oldSelectionStart[1]&&E[0]===this._oldSelectionEnd[0]&&E[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(v,E,B)):this._oldHasSelection&&this._fireOnSelectionChange(v,E,B)}_fireOnSelectionChange(v,E,B){this._oldSelectionStart=v,this._oldSelectionEnd=E,this._oldHasSelection=B,this._onSelectionChange.fire()}_handleBufferActivate(v){this.clearSelection(),this._trimListener.dispose(),this._trimListener=v.activeBuffer.lines.onTrim((E=>this._handleTrim(E)))}_convertViewportColToCharacterIndex(v,E){let B=E;for(let U=0;E>=U;U++){const L=v.loadCell(U,this._workCell).getChars().length;this._workCell.getWidth()===0?B--:L>1&&E!==U&&(B+=L-1)}return B}setSelection(v,E,B){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[v,E],this._model.selectionStartLength=B,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(v){this._isClickInSelection(v)||(this._selectWordAtCursor(v,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(v,E,B=!0,U=!0){if(v[0]>=this._bufferService.cols)return;const L=this._bufferService.buffer,k=L.lines.get(v[1]);if(!k)return;const Z=L.translateBufferLineToString(v[1],!1);let ee=this._convertViewportColToCharacterIndex(k,v[0]),N=ee;const K=v[0]-ee;let A=0,M=0,O=0,w=0;if(Z.charAt(ee)===" "){for(;ee>0&&Z.charAt(ee-1)===" ";)ee--;for(;N<Z.length&&Z.charAt(N+1)===" ";)N++}else{let te=v[0],le=v[0];k.getWidth(te)===0&&(A++,te--),k.getWidth(le)===2&&(M++,le++);const fe=k.getString(le).length;for(fe>1&&(w+=fe-1,N+=fe-1);te>0&&ee>0&&!this._isCharWordSeparator(k.loadCell(te-1,this._workCell));){k.loadCell(te-1,this._workCell);const T=this._workCell.getChars().length;this._workCell.getWidth()===0?(A++,te--):T>1&&(O+=T-1,ee-=T-1),ee--,te--}for(;le<k.length&&N+1<Z.length&&!this._isCharWordSeparator(k.loadCell(le+1,this._workCell));){k.loadCell(le+1,this._workCell);const T=this._workCell.getChars().length;this._workCell.getWidth()===2?(M++,le++):T>1&&(w+=T-1,N+=T-1),N++,le++}}N++;let j=ee+K-A+O,W=Math.min(this._bufferService.cols,N-ee+A+M-O-w);if(E||Z.slice(ee,N).trim()!==""){if(B&&j===0&&k.getCodePoint(0)!==32){const te=L.lines.get(v[1]-1);if(te&&k.isWrapped&&te.getCodePoint(this._bufferService.cols-1)!==32){const le=this._getWordAt([this._bufferService.cols-1,v[1]-1],!1,!0,!1);if(le){const fe=this._bufferService.cols-le.start;j-=fe,W+=fe}}}if(U&&j+W===this._bufferService.cols&&k.getCodePoint(this._bufferService.cols-1)!==32){const te=L.lines.get(v[1]+1);if(te?.isWrapped&&te.getCodePoint(0)!==32){const le=this._getWordAt([0,v[1]+1],!1,!1,!0);le&&(W+=le.length)}}return{start:j,length:W}}}_selectWordAt(v,E){const B=this._getWordAt(v,E);if(B){for(;B.start<0;)B.start+=this._bufferService.cols,v[1]--;this._model.selectionStart=[B.start,v[1]],this._model.selectionStartLength=B.length}}_selectToWordAt(v){const E=this._getWordAt(v,!0);if(E){let B=v[1];for(;E.start<0;)E.start+=this._bufferService.cols,B--;if(!this._model.areSelectionValuesReversed())for(;E.start+E.length>this._bufferService.cols;)E.length-=this._bufferService.cols,B++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?E.start:E.start+E.length,B]}}_isCharWordSeparator(v){return v.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(v.getChars())>=0}_selectLineAt(v){const E=this._bufferService.buffer.getWrappedRangeForLine(v),B={start:{x:0,y:E.first},end:{x:this._bufferService.cols-1,y:E.last}};this._model.selectionStart=[0,E.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(B,this._bufferService.cols)}};u.SelectionService=x=d([y(3,_.IBufferService),y(4,_.ICoreService),y(5,D.IMouseService),y(6,_.IOptionsService),y(7,D.IRenderService),y(8,D.ICoreBrowserService)],x)},4725:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IThemeService=u.ICharacterJoinerService=u.ISelectionService=u.IRenderService=u.IMouseService=u.ICoreBrowserService=u.ICharSizeService=void 0;const d=f(8343);u.ICharSizeService=(0,d.createDecorator)("CharSizeService"),u.ICoreBrowserService=(0,d.createDecorator)("CoreBrowserService"),u.IMouseService=(0,d.createDecorator)("MouseService"),u.IRenderService=(0,d.createDecorator)("RenderService"),u.ISelectionService=(0,d.createDecorator)("SelectionService"),u.ICharacterJoinerService=(0,d.createDecorator)("CharacterJoinerService"),u.IThemeService=(0,d.createDecorator)("ThemeService")},6731:function(P,u,f){var d=this&&this.__decorate||function(x,v,E,B){var U,L=arguments.length,k=L<3?v:B===null?B=Object.getOwnPropertyDescriptor(v,E):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(x,v,E,B);else for(var Z=x.length-1;Z>=0;Z--)(U=x[Z])&&(k=(L<3?U(k):L>3?U(v,E,k):U(v,E))||k);return L>3&&k&&Object.defineProperty(v,E,k),k},y=this&&this.__param||function(x,v){return function(E,B){v(E,B,x)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=f(7239),p=f(8055),C=f(8460),D=f(844),S=f(2585),l=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),a=p.css.toColor("#ffffff"),c=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const x=[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 E=0;E<216;E++){const B=v[E/36%6|0],U=v[E/6%6|0],L=v[E%6];x.push({css:p.channels.toCss(B,U,L),rgba:p.channels.toRgba(B,U,L)})}for(let E=0;E<24;E++){const B=8+10*E;x.push({css:p.channels.toCss(B,B,B),rgba:p.channels.toRgba(B,B,B)})}return x})());let g=u.ThemeService=class extends D.Disposable{get colors(){return this._colors}constructor(x){super(),this._optionsService=x,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:l,background:o,cursor:a,cursorAccent:c,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(o,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(o,_),ansi:u.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(x={}){const v=this._colors;if(v.foreground=b(x.foreground,l),v.background=b(x.background,o),v.cursor=b(x.cursor,a),v.cursorAccent=b(x.cursorAccent,c),v.selectionBackgroundTransparent=b(x.selectionBackground,_),v.selectionBackgroundOpaque=p.color.blend(v.background,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundTransparent=b(x.selectionInactiveBackground,v.selectionBackgroundTransparent),v.selectionInactiveBackgroundOpaque=p.color.blend(v.background,v.selectionInactiveBackgroundTransparent),v.selectionForeground=x.selectionForeground?b(x.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=u.DEFAULT_ANSI_COLORS.slice(),v.ansi[0]=b(x.black,u.DEFAULT_ANSI_COLORS[0]),v.ansi[1]=b(x.red,u.DEFAULT_ANSI_COLORS[1]),v.ansi[2]=b(x.green,u.DEFAULT_ANSI_COLORS[2]),v.ansi[3]=b(x.yellow,u.DEFAULT_ANSI_COLORS[3]),v.ansi[4]=b(x.blue,u.DEFAULT_ANSI_COLORS[4]),v.ansi[5]=b(x.magenta,u.DEFAULT_ANSI_COLORS[5]),v.ansi[6]=b(x.cyan,u.DEFAULT_ANSI_COLORS[6]),v.ansi[7]=b(x.white,u.DEFAULT_ANSI_COLORS[7]),v.ansi[8]=b(x.brightBlack,u.DEFAULT_ANSI_COLORS[8]),v.ansi[9]=b(x.brightRed,u.DEFAULT_ANSI_COLORS[9]),v.ansi[10]=b(x.brightGreen,u.DEFAULT_ANSI_COLORS[10]),v.ansi[11]=b(x.brightYellow,u.DEFAULT_ANSI_COLORS[11]),v.ansi[12]=b(x.brightBlue,u.DEFAULT_ANSI_COLORS[12]),v.ansi[13]=b(x.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),v.ansi[14]=b(x.brightCyan,u.DEFAULT_ANSI_COLORS[14]),v.ansi[15]=b(x.brightWhite,u.DEFAULT_ANSI_COLORS[15]),x.extendedAnsi){const E=Math.min(v.ansi.length-16,x.extendedAnsi.length);for(let B=0;B<E;B++)v.ansi[B+16]=b(x.extendedAnsi[B],u.DEFAULT_ANSI_COLORS[B+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(x){this._restoreColor(x),this._onChangeColors.fire(this.colors)}_restoreColor(x){if(x!==void 0)switch(x){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[x]=this._restoreColors.ansi[x]}else for(let v=0;v<this._restoreColors.ansi.length;++v)this._colors.ansi[v]=this._restoreColors.ansi[v]}modifyColors(x){x(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 b(x,v){if(x!==void 0)try{return p.css.toColor(x)}catch{}return v}u.ThemeService=g=d([y(0,S.IOptionsService)],g)},6349:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=f(8460),y=f(844);class h extends y.Disposable{constructor(C){super(),this._maxLength=C,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(C){if(this._maxLength===C)return;const D=new Array(C);for(let S=0;S<Math.min(C,this.length);S++)D[S]=this._array[this._getCyclicIndex(S)];this._array=D,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let D=this._length;D<C;D++)this._array[D]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,D){this._array[this._getCyclicIndex(C)]=D}push(C){this._array[this._getCyclicIndex(this._length)]=C,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(C,D,...S){if(D){for(let l=C;l<this._length-D;l++)this._array[this._getCyclicIndex(l)]=this._array[this._getCyclicIndex(l+D)];this._length-=D,this.onDeleteEmitter.fire({index:C,amount:D})}for(let l=this._length-1;l>=C;l--)this._array[this._getCyclicIndex(l+S.length)]=this._array[this._getCyclicIndex(l)];for(let l=0;l<S.length;l++)this._array[this._getCyclicIndex(C+l)]=S[l];if(S.length&&this.onInsertEmitter.fire({index:C,amount:S.length}),this._length+S.length>this._maxLength){const l=this._length+S.length-this._maxLength;this._startIndex+=l,this._length=this._maxLength,this.onTrimEmitter.fire(l)}else this._length+=S.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,D,S){if(!(D<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+S<0)throw new Error("Cannot shift elements in list beyond index 0");if(S>0){for(let o=D-1;o>=0;o--)this.set(C+o+S,this.get(C+o));const l=C+D+S-this._length;if(l>0)for(this._length+=l;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let l=0;l<D;l++)this.set(C+l+S,this.get(C+l))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}u.CircularList=h},1439:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function f(d,y=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const p in d)h[p]=y<=1?d[p]:d[p]&&f(d[p],y-1);return h}},8055:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.contrastRatio=u.toPaddedHex=u.rgba=u.rgb=u.css=u.color=u.channels=u.NULL_COLOR=void 0;const d=f(6114);let y=0,h=0,p=0,C=0;var D,S,l,o,a;function c(g){const b=g.toString(16);return b.length<2?"0"+b:b}function _(g,b){return g<b?(b+.05)/(g+.05):(g+.05)/(b+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(g){g.toCss=function(b,x,v,E){return E!==void 0?`#${c(b)}${c(x)}${c(v)}${c(E)}`:`#${c(b)}${c(x)}${c(v)}`},g.toRgba=function(b,x,v,E=255){return(b<<24|x<<16|v<<8|E)>>>0}})(D||(u.channels=D={})),(function(g){function b(x,v){return C=Math.round(255*v),[y,h,p]=a.toChannels(x.rgba),{css:D.toCss(y,h,p,C),rgba:D.toRgba(y,h,p,C)}}g.blend=function(x,v){if(C=(255&v.rgba)/255,C===1)return{css:v.css,rgba:v.rgba};const E=v.rgba>>24&255,B=v.rgba>>16&255,U=v.rgba>>8&255,L=x.rgba>>24&255,k=x.rgba>>16&255,Z=x.rgba>>8&255;return y=L+Math.round((E-L)*C),h=k+Math.round((B-k)*C),p=Z+Math.round((U-Z)*C),{css:D.toCss(y,h,p),rgba:D.toRgba(y,h,p)}},g.isOpaque=function(x){return(255&x.rgba)==255},g.ensureContrastRatio=function(x,v,E){const B=a.ensureContrastRatio(x.rgba,v.rgba,E);if(B)return a.toColor(B>>24&255,B>>16&255,B>>8&255)},g.opaque=function(x){const v=(255|x.rgba)>>>0;return[y,h,p]=a.toChannels(v),{css:D.toCss(y,h,p),rgba:v}},g.opacity=b,g.multiplyOpacity=function(x,v){return C=255&x.rgba,b(x,C*v/255)},g.toColorRGB=function(x){return[x.rgba>>24&255,x.rgba>>16&255,x.rgba>>8&255]}})(S||(u.color=S={})),(function(g){let b,x;if(!d.isNode){const v=document.createElement("canvas");v.width=1,v.height=1;const E=v.getContext("2d",{willReadFrequently:!0});E&&(b=E,b.globalCompositeOperation="copy",x=b.createLinearGradient(0,0,1,1))}g.toColor=function(v){if(v.match(/#[\da-f]{3,8}/i))switch(v.length){case 4:return y=parseInt(v.slice(1,2).repeat(2),16),h=parseInt(v.slice(2,3).repeat(2),16),p=parseInt(v.slice(3,4).repeat(2),16),a.toColor(y,h,p);case 5:return y=parseInt(v.slice(1,2).repeat(2),16),h=parseInt(v.slice(2,3).repeat(2),16),p=parseInt(v.slice(3,4).repeat(2),16),C=parseInt(v.slice(4,5).repeat(2),16),a.toColor(y,h,p,C);case 7:return{css:v,rgba:(parseInt(v.slice(1),16)<<8|255)>>>0};case 9:return{css:v,rgba:parseInt(v.slice(1),16)>>>0}}const E=v.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 y=parseInt(E[1]),h=parseInt(E[2]),p=parseInt(E[3]),C=Math.round(255*(E[5]===void 0?1:parseFloat(E[5]))),a.toColor(y,h,p,C);if(!b||!x)throw new Error("css.toColor: Unsupported css format");if(b.fillStyle=x,b.fillStyle=v,typeof b.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(b.fillRect(0,0,1,1),[y,h,p,C]=b.getImageData(0,0,1,1).data,C!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:D.toRgba(y,h,p,C),css:v}}})(l||(u.css=l={})),(function(g){function b(x,v,E){const B=x/255,U=v/255,L=E/255;return .2126*(B<=.03928?B/12.92:Math.pow((B+.055)/1.055,2.4))+.7152*(U<=.03928?U/12.92:Math.pow((U+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}g.relativeLuminance=function(x){return b(x>>16&255,x>>8&255,255&x)},g.relativeLuminance2=b})(o||(u.rgb=o={})),(function(g){function b(v,E,B){const U=v>>24&255,L=v>>16&255,k=v>>8&255;let Z=E>>24&255,ee=E>>16&255,N=E>>8&255,K=_(o.relativeLuminance2(Z,ee,N),o.relativeLuminance2(U,L,k));for(;K<B&&(Z>0||ee>0||N>0);)Z-=Math.max(0,Math.ceil(.1*Z)),ee-=Math.max(0,Math.ceil(.1*ee)),N-=Math.max(0,Math.ceil(.1*N)),K=_(o.relativeLuminance2(Z,ee,N),o.relativeLuminance2(U,L,k));return(Z<<24|ee<<16|N<<8|255)>>>0}function x(v,E,B){const U=v>>24&255,L=v>>16&255,k=v>>8&255;let Z=E>>24&255,ee=E>>16&255,N=E>>8&255,K=_(o.relativeLuminance2(Z,ee,N),o.relativeLuminance2(U,L,k));for(;K<B&&(Z<255||ee<255||N<255);)Z=Math.min(255,Z+Math.ceil(.1*(255-Z))),ee=Math.min(255,ee+Math.ceil(.1*(255-ee))),N=Math.min(255,N+Math.ceil(.1*(255-N))),K=_(o.relativeLuminance2(Z,ee,N),o.relativeLuminance2(U,L,k));return(Z<<24|ee<<16|N<<8|255)>>>0}g.ensureContrastRatio=function(v,E,B){const U=o.relativeLuminance(v>>8),L=o.relativeLuminance(E>>8);if(_(U,L)<B){if(L<U){const ee=b(v,E,B),N=_(U,o.relativeLuminance(ee>>8));if(N<B){const K=x(v,E,B);return N>_(U,o.relativeLuminance(K>>8))?ee:K}return ee}const k=x(v,E,B),Z=_(U,o.relativeLuminance(k>>8));if(Z<B){const ee=b(v,E,B);return Z>_(U,o.relativeLuminance(ee>>8))?k:ee}return k}},g.reduceLuminance=b,g.increaseLuminance=x,g.toChannels=function(v){return[v>>24&255,v>>16&255,v>>8&255,255&v]},g.toColor=function(v,E,B,U){return{css:D.toCss(v,E,B,U),rgba:D.toRgba(v,E,B,U)}}})(a||(u.rgba=a={})),u.toPaddedHex=c,u.contrastRatio=_},8969:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=f(844),y=f(2585),h=f(4348),p=f(7866),C=f(744),D=f(7302),S=f(6975),l=f(8460),o=f(1753),a=f(1480),c=f(7994),_=f(9282),g=f(5435),b=f(5981),x=f(2660);let v=!1;class E extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new l.EventEmitter),this._onScroll.event((U=>{var L;(L=this._onScrollApi)===null||L===void 0||L.fire(U.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(U){for(const L in U)this.optionsService.options[L]=U[L]}constructor(U){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new l.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new l.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new l.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new l.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new D.OptionsService(U)),this._instantiationService.setService(y.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(y.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(y.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(S.CoreService)),this._instantiationService.setService(y.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(o.CoreMouseService)),this._instantiationService.setService(y.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(y.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(c.CharsetService),this._instantiationService.setService(y.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(x.OscLinkService),this._instantiationService.setService(y.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new g.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,l.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,l.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,l.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,l.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((L=>{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((L=>{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 b.WriteBuffer(((L,k)=>this._inputHandler.parse(L,k)))),this.register((0,l.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(U,L){this._writeBuffer.write(U,L)}writeSync(U,L){this._logService.logLevel<=y.LogLevelEnum.WARN&&!v&&(this._logService.warn("writeSync is unreliable and will be removed soon."),v=!0),this._writeBuffer.writeSync(U,L)}resize(U,L){isNaN(U)||isNaN(L)||(U=Math.max(U,C.MINIMUM_COLS),L=Math.max(L,C.MINIMUM_ROWS),this._bufferService.resize(U,L))}scroll(U,L=!1){this._bufferService.scroll(U,L)}scrollLines(U,L,k){this._bufferService.scrollLines(U,L,k)}scrollPages(U){this.scrollLines(U*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(U){const L=U-this._bufferService.buffer.ydisp;L!==0&&this.scrollLines(L)}registerEscHandler(U,L){return this._inputHandler.registerEscHandler(U,L)}registerDcsHandler(U,L){return this._inputHandler.registerDcsHandler(U,L)}registerCsiHandler(U,L){return this._inputHandler.registerCsiHandler(U,L)}registerOscHandler(U,L){return this._inputHandler.registerOscHandler(U,L)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let U=!1;const L=this.optionsService.rawOptions.windowsPty;L&&L.buildNumber!==void 0&&L.buildNumber!==void 0?U=L.backend==="conpty"&&L.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(U=!0),U?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const U=[];U.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),U.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const L of U)L.dispose()}))}}}u.CoreTerminal=E},8460:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.forwardEvent=u.EventEmitter=void 0,u.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=f=>(this._listeners.push(f),{dispose:()=>{if(!this._disposed){for(let d=0;d<this._listeners.length;d++)if(this._listeners[d]===f)return void this._listeners.splice(d,1)}}})),this._event}fire(f,d){const y=[];for(let h=0;h<this._listeners.length;h++)y.push(this._listeners[h]);for(let h=0;h<y.length;h++)y[h].call(void 0,f,d)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},u.forwardEvent=function(f,d){return f((y=>d.fire(y)))}},5435:function(P,u,f){var d=this&&this.__decorate||function(K,A,M,O){var w,j=arguments.length,W=j<3?A:O===null?O=Object.getOwnPropertyDescriptor(A,M):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")W=Reflect.decorate(K,A,M,O);else for(var te=K.length-1;te>=0;te--)(w=K[te])&&(W=(j<3?w(W):j>3?w(A,M,W):w(A,M))||W);return j>3&&W&&Object.defineProperty(A,M,W),W},y=this&&this.__param||function(K,A){return function(M,O){A(M,O,K)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=f(2584),p=f(7116),C=f(2015),D=f(844),S=f(482),l=f(8437),o=f(8460),a=f(643),c=f(511),_=f(3734),g=f(2585),b=f(6242),x=f(6351),v=f(5941),E={"(":0,")":1,"*":2,"+":3,"-":1,".":2},B=131072;function U(K,A){if(K>24)return A.setWinLines||!1;switch(K){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 L;(function(K){K[K.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",K[K.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(L||(u.WindowsOptionsReportType=L={}));let k=0;class Z extends D.Disposable{getAttrData(){return this._curAttrData}constructor(A,M,O,w,j,W,te,le,fe=new C.EscapeSequenceParser){super(),this._bufferService=A,this._charsetService=M,this._coreService=O,this._logService=w,this._optionsService=j,this._oscLinkService=W,this._coreMouseService=te,this._unicodeService=le,this._parser=fe,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new S.StringToUtf32,this._utf8Decoder=new S.Utf8ToUtf32,this._workCell=new c.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new o.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new o.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new o.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new o.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new o.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new o.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new o.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new o.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new o.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new o.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new o.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 ee(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((T=>this._activeBuffer=T.activeBuffer))),this._parser.setCsiHandlerFallback(((T,X)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(T),params:X.toArray()})})),this._parser.setEscHandlerFallback((T=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(T)})})),this._parser.setExecuteHandlerFallback((T=>{this._logService.debug("Unknown EXECUTE code: ",{code:T})})),this._parser.setOscHandlerFallback(((T,X,$)=>{this._logService.debug("Unknown OSC code: ",{identifier:T,action:X,data:$})})),this._parser.setDcsHandlerFallback(((T,X,$)=>{X==="HOOK"&&($=$.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(T),action:X,payload:$})})),this._parser.setPrintHandler(((T,X,$)=>this.print(T,X,$))),this._parser.registerCsiHandler({final:"@"},(T=>this.insertChars(T))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(T=>this.scrollLeft(T))),this._parser.registerCsiHandler({final:"A"},(T=>this.cursorUp(T))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(T=>this.scrollRight(T))),this._parser.registerCsiHandler({final:"B"},(T=>this.cursorDown(T))),this._parser.registerCsiHandler({final:"C"},(T=>this.cursorForward(T))),this._parser.registerCsiHandler({final:"D"},(T=>this.cursorBackward(T))),this._parser.registerCsiHandler({final:"E"},(T=>this.cursorNextLine(T))),this._parser.registerCsiHandler({final:"F"},(T=>this.cursorPrecedingLine(T))),this._parser.registerCsiHandler({final:"G"},(T=>this.cursorCharAbsolute(T))),this._parser.registerCsiHandler({final:"H"},(T=>this.cursorPosition(T))),this._parser.registerCsiHandler({final:"I"},(T=>this.cursorForwardTab(T))),this._parser.registerCsiHandler({final:"J"},(T=>this.eraseInDisplay(T,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(T=>this.eraseInDisplay(T,!0))),this._parser.registerCsiHandler({final:"K"},(T=>this.eraseInLine(T,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(T=>this.eraseInLine(T,!0))),this._parser.registerCsiHandler({final:"L"},(T=>this.insertLines(T))),this._parser.registerCsiHandler({final:"M"},(T=>this.deleteLines(T))),this._parser.registerCsiHandler({final:"P"},(T=>this.deleteChars(T))),this._parser.registerCsiHandler({final:"S"},(T=>this.scrollUp(T))),this._parser.registerCsiHandler({final:"T"},(T=>this.scrollDown(T))),this._parser.registerCsiHandler({final:"X"},(T=>this.eraseChars(T))),this._parser.registerCsiHandler({final:"Z"},(T=>this.cursorBackwardTab(T))),this._parser.registerCsiHandler({final:"`"},(T=>this.charPosAbsolute(T))),this._parser.registerCsiHandler({final:"a"},(T=>this.hPositionRelative(T))),this._parser.registerCsiHandler({final:"b"},(T=>this.repeatPrecedingCharacter(T))),this._parser.registerCsiHandler({final:"c"},(T=>this.sendDeviceAttributesPrimary(T))),this._parser.registerCsiHandler({prefix:">",final:"c"},(T=>this.sendDeviceAttributesSecondary(T))),this._parser.registerCsiHandler({final:"d"},(T=>this.linePosAbsolute(T))),this._parser.registerCsiHandler({final:"e"},(T=>this.vPositionRelative(T))),this._parser.registerCsiHandler({final:"f"},(T=>this.hVPosition(T))),this._parser.registerCsiHandler({final:"g"},(T=>this.tabClear(T))),this._parser.registerCsiHandler({final:"h"},(T=>this.setMode(T))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(T=>this.setModePrivate(T))),this._parser.registerCsiHandler({final:"l"},(T=>this.resetMode(T))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(T=>this.resetModePrivate(T))),this._parser.registerCsiHandler({final:"m"},(T=>this.charAttributes(T))),this._parser.registerCsiHandler({final:"n"},(T=>this.deviceStatus(T))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(T=>this.deviceStatusPrivate(T))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(T=>this.softReset(T))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(T=>this.setCursorStyle(T))),this._parser.registerCsiHandler({final:"r"},(T=>this.setScrollRegion(T))),this._parser.registerCsiHandler({final:"s"},(T=>this.saveCursor(T))),this._parser.registerCsiHandler({final:"t"},(T=>this.windowOptions(T))),this._parser.registerCsiHandler({final:"u"},(T=>this.restoreCursor(T))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(T=>this.insertColumns(T))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(T=>this.deleteColumns(T))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(T=>this.selectProtected(T))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(T=>this.requestMode(T,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(T=>this.requestMode(T,!1))),this._parser.setExecuteHandler(h.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(h.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(h.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(h.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(h.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(h.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(h.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(h.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(h.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(h.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new b.OscHandler((T=>(this.setTitle(T),this.setIconName(T),!0)))),this._parser.registerOscHandler(1,new b.OscHandler((T=>this.setIconName(T)))),this._parser.registerOscHandler(2,new b.OscHandler((T=>this.setTitle(T)))),this._parser.registerOscHandler(4,new b.OscHandler((T=>this.setOrReportIndexedColor(T)))),this._parser.registerOscHandler(8,new b.OscHandler((T=>this.setHyperlink(T)))),this._parser.registerOscHandler(10,new b.OscHandler((T=>this.setOrReportFgColor(T)))),this._parser.registerOscHandler(11,new b.OscHandler((T=>this.setOrReportBgColor(T)))),this._parser.registerOscHandler(12,new b.OscHandler((T=>this.setOrReportCursorColor(T)))),this._parser.registerOscHandler(104,new b.OscHandler((T=>this.restoreIndexedColor(T)))),this._parser.registerOscHandler(110,new b.OscHandler((T=>this.restoreFgColor(T)))),this._parser.registerOscHandler(111,new b.OscHandler((T=>this.restoreBgColor(T)))),this._parser.registerOscHandler(112,new b.OscHandler((T=>this.restoreCursorColor(T)))),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 T in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:T},(()=>this.selectCharset("("+T))),this._parser.registerEscHandler({intermediates:")",final:T},(()=>this.selectCharset(")"+T))),this._parser.registerEscHandler({intermediates:"*",final:T},(()=>this.selectCharset("*"+T))),this._parser.registerEscHandler({intermediates:"+",final:T},(()=>this.selectCharset("+"+T))),this._parser.registerEscHandler({intermediates:"-",final:T},(()=>this.selectCharset("-"+T))),this._parser.registerEscHandler({intermediates:".",final:T},(()=>this.selectCharset("."+T))),this._parser.registerEscHandler({intermediates:"/",final:T},(()=>this.selectCharset("/"+T)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((T=>(this._logService.error("Parsing error: ",T),T))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new x.DcsHandler(((T,X)=>this.requestStatusString(T,X))))}_preserveStack(A,M,O,w){this._parseStack.paused=!0,this._parseStack.cursorStartX=A,this._parseStack.cursorStartY=M,this._parseStack.decodedLength=O,this._parseStack.position=w}_logSlowResolvingAsync(A){this._logService.logLevel<=g.LogLevelEnum.WARN&&Promise.race([A,new Promise(((M,O)=>setTimeout((()=>O("#SLOW_TIMEOUT")),5e3)))]).catch((M=>{if(M!=="#SLOW_TIMEOUT")throw M;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(A,M){let O,w=this._activeBuffer.x,j=this._activeBuffer.y,W=0;const te=this._parseStack.paused;if(te){if(O=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,M))return this._logSlowResolvingAsync(O),O;w=this._parseStack.cursorStartX,j=this._parseStack.cursorStartY,this._parseStack.paused=!1,A.length>B&&(W=this._parseStack.position+B)}if(this._logService.logLevel<=g.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof A=="string"?` "${A}"`:` "${Array.prototype.map.call(A,(le=>String.fromCharCode(le))).join("")}"`),typeof A=="string"?A.split("").map((le=>le.charCodeAt(0))):A),this._parseBuffer.length<A.length&&this._parseBuffer.length<B&&(this._parseBuffer=new Uint32Array(Math.min(A.length,B))),te||this._dirtyRowTracker.clearRange(),A.length>B)for(let le=W;le<A.length;le+=B){const fe=le+B<A.length?le+B:A.length,T=typeof A=="string"?this._stringDecoder.decode(A.substring(le,fe),this._parseBuffer):this._utf8Decoder.decode(A.subarray(le,fe),this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,T))return this._preserveStack(w,j,T,le),this._logSlowResolvingAsync(O),O}else if(!te){const le=typeof A=="string"?this._stringDecoder.decode(A,this._parseBuffer):this._utf8Decoder.decode(A,this._parseBuffer);if(O=this._parser.parse(this._parseBuffer,le))return this._preserveStack(w,j,le,0),this._logSlowResolvingAsync(O),O}this._activeBuffer.x===w&&this._activeBuffer.y===j||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowTracker.start,this._dirtyRowTracker.end)}print(A,M,O){let w,j;const W=this._charsetService.charset,te=this._optionsService.rawOptions.screenReaderMode,le=this._bufferService.cols,fe=this._coreService.decPrivateModes.wraparound,T=this._coreService.modes.insertMode,X=this._curAttrData;let $=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&O-M>0&&$.getWidth(this._activeBuffer.x-1)===2&&$.setCellFromCodePoint(this._activeBuffer.x-1,0,1,X.fg,X.bg,X.extended);for(let se=M;se<O;++se){if(w=A[se],j=this._unicodeService.wcwidth(w),w<127&&W){const pe=W[String.fromCharCode(w)];pe&&(w=pe.charCodeAt(0))}if(te&&this._onA11yChar.fire((0,S.stringFromCodePoint)(w)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),j||!this._activeBuffer.x){if(this._activeBuffer.x+j-1>=le){if(fe){for(;this._activeBuffer.x<le;)$.setCellFromCodePoint(this._activeBuffer.x++,0,1,X.fg,X.bg,X.extended);this._activeBuffer.x=0,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),$=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)}else if(this._activeBuffer.x=le-1,j===2)continue}if(T&&($.insertCells(this._activeBuffer.x,j,this._activeBuffer.getNullCell(X),X),$.getWidth(le-1)===2&&$.setCellFromCodePoint(le-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,X.fg,X.bg,X.extended)),$.setCellFromCodePoint(this._activeBuffer.x++,w,j,X.fg,X.bg,X.extended),j>0)for(;--j;)$.setCellFromCodePoint(this._activeBuffer.x++,0,0,X.fg,X.bg,X.extended)}else $.getWidth(this._activeBuffer.x-1)?$.addCodepointToCell(this._activeBuffer.x-1,w):$.addCodepointToCell(this._activeBuffer.x-2,w)}O-M>0&&($.loadCell(this._activeBuffer.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),this._activeBuffer.x<le&&O-M>0&&$.getWidth(this._activeBuffer.x)===0&&!$.hasContent(this._activeBuffer.x)&&$.setCellFromCodePoint(this._activeBuffer.x,0,1,X.fg,X.bg,X.extended),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(A,M){return A.final!=="t"||A.prefix||A.intermediates?this._parser.registerCsiHandler(A,M):this._parser.registerCsiHandler(A,(O=>!U(O.params[0],this._optionsService.rawOptions.windowOptions)||M(O)))}registerDcsHandler(A,M){return this._parser.registerDcsHandler(A,new x.DcsHandler(M))}registerEscHandler(A,M){return this._parser.registerEscHandler(A,M)}registerOscHandler(A,M){return this._parser.registerOscHandler(A,new b.OscHandler(M))}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(){var A;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&&(!((A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))===null||A===void 0)&&A.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);M.hasWidth(this._activeBuffer.x)&&!M.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,M){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=A,this._activeBuffer.y=this._activeBuffer.scrollTop+M):(this._activeBuffer.x=A,this._activeBuffer.y=M),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(A,M){this._restrictCursor(),this._setCursor(this._activeBuffer.x+A,this._activeBuffer.y+M)}cursorUp(A){const M=this._activeBuffer.y-this._activeBuffer.scrollTop;return M>=0?this._moveCursor(0,-Math.min(M,A.params[0]||1)):this._moveCursor(0,-(A.params[0]||1)),!0}cursorDown(A){const M=this._activeBuffer.scrollBottom-this._activeBuffer.y;return M>=0?this._moveCursor(0,Math.min(M,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 M=A.params[0];return M===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:M===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=A.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let M=A.params[0]||1;for(;M--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(A){const M=A.params[0];return M===1&&(this._curAttrData.bg|=536870912),M!==2&&M!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(A,M,O,w=!1,j=!1){const W=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);W.replaceCells(M,O,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData(),j),w&&(W.isWrapped=!1)}_resetBufferLine(A,M=!1){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);O&&(O.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),M),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+A),O.isWrapped=!1)}eraseInDisplay(A,M=!1){let O;switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,M);O<this._bufferService.rows;O++)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(O);break;case 1:for(O=this._activeBuffer.y,this._dirtyRowTracker.markDirty(O),this._eraseInBufferLine(O,0,this._activeBuffer.x+1,!0,M),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(O+1).isWrapped=!1);O--;)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(0);break;case 2:for(O=this._bufferService.rows,this._dirtyRowTracker.markDirty(O-1);O--;)this._resetBufferLine(O,M);this._dirtyRowTracker.markDirty(0);break;case 3:const w=this._activeBuffer.lines.length-this._bufferService.rows;w>0&&(this._activeBuffer.lines.trimStart(w),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-w,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-w,0),this._onScroll.fire(0))}return!0}eraseInLine(A,M=!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,M);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,M);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,M)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(A){this._restrictCursor();let M=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y,w=this._bufferService.rows-1-this._activeBuffer.scrollBottom,j=this._bufferService.rows-1+this._activeBuffer.ybase-w+1;for(;M--;)this._activeBuffer.lines.splice(j-1,1),this._activeBuffer.lines.splice(O,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 M=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=this._activeBuffer.ybase+this._activeBuffer.y;let w;for(w=this._bufferService.rows-1-this._activeBuffer.scrollBottom,w=this._bufferService.rows-1+this._activeBuffer.ybase-w;M--;)this._activeBuffer.lines.splice(O,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}insertChars(A){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.insertCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(A){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.deleteCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(A){let M=A.params[0]||1;for(;M--;)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 M=A.params[0]||1;for(;M--;)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(l.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 M=A.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);w.deleteCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.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 M=A.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);w.insertCells(0,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.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 M=A.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);w.insertCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.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 M=A.params[0]||1;for(let O=this._activeBuffer.scrollTop;O<=this._activeBuffer.scrollBottom;++O){const w=this._activeBuffer.lines.get(this._activeBuffer.ybase+O);w.deleteCells(this._activeBuffer.x,M,this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),w.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(A){this._restrictCursor();const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return M&&(M.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(A.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(A){if(!this._parser.precedingCodepoint)return!0;const M=A.params[0]||1,O=new Uint32Array(M);for(let w=0;w<M;++w)O[w]=this._parser.precedingCodepoint;return this.print(O,0,O.length),!0}sendDeviceAttributesPrimary(A){return A.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(A){return A.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(A.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(A){return(this._optionsService.rawOptions.termName+"").indexOf(A)===0}setMode(A){for(let M=0;M<A.length;M++)switch(A.params[M]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(A){for(let M=0;M<A.length;M++)switch(A.params[M]){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 M=0;M<A.length;M++)switch(A.params[M]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(A){for(let M=0;M<A.length;M++)switch(A.params[M]){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[M]===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,M){const O=this._coreService.decPrivateModes,{activeProtocol:w,activeEncoding:j}=this._coreMouseService,W=this._coreService,{buffers:te,cols:le}=this._bufferService,{active:fe,alt:T}=te,X=this._optionsService.rawOptions,$=xe=>xe?1:2,se=A.params[0];return pe=se,oe=M?se===2?4:se===4?$(W.modes.insertMode):se===12?3:se===20?$(X.convertEol):0:se===1?$(O.applicationCursorKeys):se===3?X.windowOptions.setWinLines?le===80?2:le===132?1:0:0:se===6?$(O.origin):se===7?$(O.wraparound):se===8?3:se===9?$(w==="X10"):se===12?$(X.cursorBlink):se===25?$(!W.isCursorHidden):se===45?$(O.reverseWraparound):se===66?$(O.applicationKeypad):se===67?4:se===1e3?$(w==="VT200"):se===1002?$(w==="DRAG"):se===1003?$(w==="ANY"):se===1004?$(O.sendFocus):se===1005?4:se===1006?$(j==="SGR"):se===1015?4:se===1016?$(j==="SGR_PIXELS"):se===1048?1:se===47||se===1047||se===1049?$(fe===T):se===2004?$(O.bracketedPasteMode):0,W.triggerDataEvent(`${h.C0.ESC}[${M?"":"?"}${pe};${oe}$y`),!0;var pe,oe}_updateAttrColor(A,M,O,w,j){return M===2?(A|=50331648,A&=-16777216,A|=_.AttributeData.fromColorRGB([O,w,j])):M===5&&(A&=-50331904,A|=33554432|255&O),A}_extractColor(A,M,O){const w=[0,0,-1,0,0,0];let j=0,W=0;do{if(w[W+j]=A.params[M+W],A.hasSubParams(M+W)){const te=A.getSubParams(M+W);let le=0;do w[1]===5&&(j=1),w[W+le+1+j]=te[le];while(++le<te.length&&le+W+1+j<w.length);break}if(w[1]===5&&W+j>=2||w[1]===2&&W+j>=5)break;w[1]&&(j=1)}while(++W+M<A.length&&W+j<w.length);for(let te=2;te<w.length;++te)w[te]===-1&&(w[te]=0);switch(w[0]){case 38:O.fg=this._updateAttrColor(O.fg,w[1],w[3],w[4],w[5]);break;case 48:O.bg=this._updateAttrColor(O.bg,w[1],w[3],w[4],w[5]);break;case 58:O.extended=O.extended.clone(),O.extended.underlineColor=this._updateAttrColor(O.extended.underlineColor,w[1],w[3],w[4],w[5])}return W}_processUnderline(A,M){M.extended=M.extended.clone(),(!~A||A>5)&&(A=1),M.extended.underlineStyle=A,M.fg|=268435456,A===0&&(M.fg&=-268435457),M.updateExtended()}_processSGR0(A){A.fg=l.DEFAULT_ATTR_DATA.fg,A.bg=l.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 M=A.length;let O;const w=this._curAttrData;for(let j=0;j<M;j++)O=A.params[j],O>=30&&O<=37?(w.fg&=-50331904,w.fg|=16777216|O-30):O>=40&&O<=47?(w.bg&=-50331904,w.bg|=16777216|O-40):O>=90&&O<=97?(w.fg&=-50331904,w.fg|=16777224|O-90):O>=100&&O<=107?(w.bg&=-50331904,w.bg|=16777224|O-100):O===0?this._processSGR0(w):O===1?w.fg|=134217728:O===3?w.bg|=67108864:O===4?(w.fg|=268435456,this._processUnderline(A.hasSubParams(j)?A.getSubParams(j)[0]:1,w)):O===5?w.fg|=536870912:O===7?w.fg|=67108864:O===8?w.fg|=1073741824:O===9?w.fg|=2147483648:O===2?w.bg|=134217728:O===21?this._processUnderline(2,w):O===22?(w.fg&=-134217729,w.bg&=-134217729):O===23?w.bg&=-67108865:O===24?(w.fg&=-268435457,this._processUnderline(0,w)):O===25?w.fg&=-536870913:O===27?w.fg&=-67108865:O===28?w.fg&=-1073741825:O===29?w.fg&=2147483647:O===39?(w.fg&=-67108864,w.fg|=16777215&l.DEFAULT_ATTR_DATA.fg):O===49?(w.bg&=-67108864,w.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):O===38||O===48||O===58?j+=this._extractColor(A,j,w):O===53?w.bg|=1073741824:O===55?w.bg&=-1073741825:O===59?(w.extended=w.extended.clone(),w.extended.underlineColor=-1,w.updateExtended()):O===100?(w.fg&=-67108864,w.fg|=16777215&l.DEFAULT_ATTR_DATA.fg,w.bg&=-67108864,w.bg|=16777215&l.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",O);return!0}deviceStatus(A){switch(A.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const M=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${M};${O}R`)}return!0}deviceStatusPrivate(A){if(A.params[0]===6){const M=this._activeBuffer.y+1,O=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${M};${O}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=l.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 M=A.params[0]||1;switch(M){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 O=M%2==1;return this._optionsService.options.cursorBlink=O,!0}setScrollRegion(A){const M=A.params[0]||1;let O;return(A.length<2||(O=A.params[1])>this._bufferService.rows||O===0)&&(O=this._bufferService.rows),O>M&&(this._activeBuffer.scrollTop=M-1,this._activeBuffer.scrollBottom=O-1,this._setCursor(0,0)),!0}windowOptions(A){if(!U(A.params[0],this._optionsService.rawOptions.windowOptions))return!0;const M=A.length>1?A.params[1]:0;switch(A.params[0]){case 14:M!==2&&this._onRequestWindowsOptionsReport.fire(L.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(L.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:M!==0&&M!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),M!==0&&M!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:M!==0&&M!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),M!==0&&M!==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 M=[],O=A.split(";");for(;O.length>1;){const w=O.shift(),j=O.shift();if(/^\d+$/.exec(w)){const W=parseInt(w);if(N(W))if(j==="?")M.push({type:0,index:W});else{const te=(0,v.parseColor)(j);te&&M.push({type:1,index:W,color:te})}}}return M.length&&this._onColor.fire(M),!0}setHyperlink(A){const M=A.split(";");return!(M.length<2)&&(M[1]?this._createHyperlink(M[0],M[1]):!M[0]&&this._finishHyperlink())}_createHyperlink(A,M){this._getCurrentLinkId()&&this._finishHyperlink();const O=A.split(":");let w;const j=O.findIndex((W=>W.startsWith("id=")));return j!==-1&&(w=O[j].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:w,uri:M}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(A,M){const O=A.split(";");for(let w=0;w<O.length&&!(M>=this._specialColors.length);++w,++M)if(O[w]==="?")this._onColor.fire([{type:0,index:this._specialColors[M]}]);else{const j=(0,v.parseColor)(O[w]);j&&this._onColor.fire([{type:1,index:this._specialColors[M],color:j}])}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 M=[],O=A.split(";");for(let w=0;w<O.length;++w)if(/^\d+$/.exec(O[w])){const j=parseInt(O[w]);N(j)&&M.push({type:2,index:j})}return M.length&&this._onColor.fire(M),!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(E[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=l.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=l.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 c.CellData;A.content=4194373,A.fg=this._curAttrData.fg,A.bg=this._curAttrData.bg,this._setCursor(0,0);for(let M=0;M<this._bufferService.rows;++M){const O=this._activeBuffer.ybase+this._activeBuffer.y+M,w=this._activeBuffer.lines.get(O);w&&(w.fill(A),w.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(A,M){const O=this._bufferService.buffer,w=this._optionsService.rawOptions;return(j=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${j}${h.C0.ESC}\\`),!0))(A==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:A==='"p'?'P1$r61;1"p':A==="r"?`P1$r${O.scrollTop+1};${O.scrollBottom+1}r`:A==="m"?"P1$r0m":A===" q"?`P1$r${{block:2,underline:4,bar:6}[w.cursorStyle]-(w.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(A,M){this._dirtyRowTracker.markRangeDirty(A,M)}}u.InputHandler=Z;let ee=class{constructor(K){this._bufferService=K,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(K){K<this.start?this.start=K:K>this.end&&(this.end=K)}markRangeDirty(K,A){K>A&&(k=K,K=A,A=k),K<this.start&&(this.start=K),A>this.end&&(this.end=A)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function N(K){return 0<=K&&K<256}ee=d([y(0,g.IBufferService)],ee)},844:(P,u)=>{function f(d){for(const y of d)y.dispose();d.length=0}Object.defineProperty(u,"__esModule",{value:!0}),u.getDisposeArrayDisposable=u.disposeArray=u.toDisposable=u.MutableDisposable=u.Disposable=void 0,u.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 y=this._disposables.indexOf(d);y!==-1&&this._disposables.splice(y,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){var y;this._isDisposed||d===this._value||((y=this._value)===null||y===void 0||y.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){var d;this._isDisposed=!0,(d=this._value)===null||d===void 0||d.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=f,u.getDisposeArrayDisposable=function(d){return{dispose:()=>f(d)}}},1505:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(y,h,p){this._data[y]||(this._data[y]={}),this._data[y][h]=p}get(y,h){return this._data[y]?this._data[y][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=f,u.FourKeyMap=class{constructor(){this._data=new f}set(d,y,h,p,C){this._data.get(d,y)||this._data.set(d,y,new f),this._data.get(d,y).set(h,p,C)}get(d,y,h,p){var C;return(C=this._data.get(d,y))===null||C===void 0?void 0:C.get(h,p)}clear(){this._data.clear()}}},6114:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.isChromeOS=u.isLinux=u.isWindows=u.isIphone=u.isIpad=u.isMac=u.getSafariVersion=u.isSafari=u.isLegacyEdge=u.isFirefox=u.isNode=void 0,u.isNode=typeof navigator>"u";const f=u.isNode?"node":navigator.userAgent,d=u.isNode?"node":navigator.platform;u.isFirefox=f.includes("Firefox"),u.isLegacyEdge=f.includes("Edge"),u.isSafari=/^((?!chrome|android).)*safari/i.test(f),u.getSafariVersion=function(){if(!u.isSafari)return 0;const y=f.match(/Version\/(\d+)/);return y===null||y.length<2?0:parseInt(y[1])},u.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(d),u.isIpad=d==="iPad",u.isIphone=d==="iPhone",u.isWindows=["Windows","Win16","Win32","WinCE"].includes(d),u.isLinux=d.indexOf("Linux")>=0,u.isChromeOS=/\bCrOS\b/.test(f)},6106:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.SortedList=void 0;let f=0;u.SortedList=class{constructor(d){this._getKey=d,this._array=[]}clear(){this._array.length=0}insert(d){this._array.length!==0?(f=this._search(this._getKey(d)),this._array.splice(f,0,d)):this._array.push(d)}delete(d){if(this._array.length===0)return!1;const y=this._getKey(d);if(y===void 0||(f=this._search(y),f===-1)||this._getKey(this._array[f])!==y)return!1;do if(this._array[f]===d)return this._array.splice(f,1),!0;while(++f<this._array.length&&this._getKey(this._array[f])===y);return!1}*getKeyIterator(d){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do yield this._array[f];while(++f<this._array.length&&this._getKey(this._array[f])===d)}forEachByKey(d,y){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do y(this._array[f]);while(++f<this._array.length&&this._getKey(this._array[f])===d)}values(){return[...this._array].values()}_search(d){let y=0,h=this._array.length-1;for(;h>=y;){let p=y+h>>1;const C=this._getKey(this._array[p]);if(C>d)h=p-1;else{if(!(C<d)){for(;p>0&&this._getKey(this._array[p-1])===d;)p--;return p}y=p+1}}return y}}},7226:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=f(6114);class y{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),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(C){this._idleCallback=void 0;let D=0,S=0,l=C.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(D=Date.now(),this._tasks[this._i]()||this._i++,D=Math.max(1,Date.now()-D),S=Math.max(D,S),o=C.timeRemaining(),1.5*S>o)return l-D<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(l-D))}ms`),void this._start();l=o}this.clear()}}class h extends y{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const D=Date.now()+C;return{timeRemaining:()=>Math.max(0,D-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends y{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=f(643);u.updateWindowsModeWrappedState=function(y){const h=y.buffer.lines.get(y.buffer.ybase+y.buffer.y-1),p=h?.get(y.cols-1),C=y.buffer.lines.get(y.buffer.ybase+y.buffer.y);C&&p&&(C.isWrapped=p[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&p[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ExtendedAttrs=u.AttributeData=void 0;class f{constructor(){this.fg=0,this.bg=0,this.extended=new d}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new f;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}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}}u.AttributeData=f;class d{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}constructor(h=0,p=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=p}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=f(6349),y=f(7226),h=f(3734),p=f(8437),C=f(4634),D=f(511),S=f(643),l=f(4863),o=f(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(a,c,_){this._hasScrollback=a,this._optionsService=c,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=o.DEFAULT_CHARSET,this.markers=[],this._nullCell=D.CellData.fromCharData([0,S.NULL_CELL_CHAR,S.NULL_CELL_WIDTH,S.NULL_CELL_CODE]),this._whitespaceCell=D.CellData.fromCharData([0,S.WHITESPACE_CELL_CHAR,S.WHITESPACE_CELL_WIDTH,S.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new y.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 h.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 h.ExtendedAttrs),this._whitespaceCell}getBlankLine(a,c){return new p.BufferLine(this._bufferService.cols,this.getNullCell(a),c)}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 c=a+this._optionsService.rawOptions.scrollback;return c>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:c}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=p.DEFAULT_ATTR_DATA);let c=this._rows;for(;c--;)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,c){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let g=0;const b=this._getCorrectBufferLength(c);if(b>this.lines.maxLength&&(this.lines.maxLength=b),this.lines.length>0){if(this._cols<a)for(let v=0;v<this.lines.length;v++)g+=+this.lines.get(v).resize(a,_);let x=0;if(this._rows<c)for(let v=this._rows;v<c;v++)this.lines.length<c+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+x+1?(this.ybase--,x++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(a,_)));else for(let v=this._rows;v>c;v--)this.lines.length>c+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(b<this.lines.maxLength){const v=this.lines.length-b;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=b}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,c-1),x&&(this.y+=x),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=c-1,this._isReflowEnabled&&(this._reflow(a,c),this._cols>a))for(let x=0;x<this.lines.length;x++)g+=+this.lines.get(x).resize(a,_);this._cols=a,this._rows=c,this._memoryCleanupQueue.clear(),g>.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 c=0;for(;this._memoryCleanupPosition<this.lines.length;)if(c+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),c>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,c){this._cols!==a&&(a>this._cols?this._reflowLarger(a,c):this._reflowSmaller(a,c))}_reflowLarger(a,c){const _=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const g=(0,C.reflowLargerCreateNewLayout)(this.lines,_);(0,C.reflowLargerApplyNewLayout)(this.lines,g.layout),this._reflowLargerAdjustViewport(a,c,g.countRemoved)}}_reflowLargerAdjustViewport(a,c,_){const g=this.getNullCell(p.DEFAULT_ATTR_DATA);let b=_;for(;b-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<c&&this.lines.push(new p.BufferLine(a,g))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,c){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),g=[];let b=0;for(let x=this.lines.length-1;x>=0;x--){let v=this.lines.get(x);if(!v||!v.isWrapped&&v.getTrimmedLength()<=a)continue;const E=[v];for(;v.isWrapped&&x>0;)v=this.lines.get(--x),E.unshift(v);const B=this.ybase+this.y;if(B>=x&&B<x+E.length)continue;const U=E[E.length-1].getTrimmedLength(),L=(0,C.reflowSmallerGetNewLineLengths)(E,this._cols,a),k=L.length-E.length;let Z;Z=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+k):Math.max(0,this.lines.length-this.lines.maxLength+k);const ee=[];for(let w=0;w<k;w++){const j=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);ee.push(j)}ee.length>0&&(g.push({start:x+E.length+b,newLines:ee}),b+=ee.length),E.push(...ee);let N=L.length-1,K=L[N];K===0&&(N--,K=L[N]);let A=E.length-k-1,M=U;for(;A>=0;){const w=Math.min(M,K);if(E[N]===void 0)break;if(E[N].copyCellsFrom(E[A],M-w,K-w,w,!0),K-=w,K===0&&(N--,K=L[N]),M-=w,M===0){A--;const j=Math.max(A,0);M=(0,C.getWrappedLineTrimmedLength)(E,j,this._cols)}}for(let w=0;w<E.length;w++)L[w]<a&&E[w].setCell(L[w],_);let O=k-Z;for(;O-- >0;)this.ybase===0?this.y<c-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+b)-c&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+k,this.ybase+c-1)}if(g.length>0){const x=[],v=[];for(let N=0;N<this.lines.length;N++)v.push(this.lines.get(N));const E=this.lines.length;let B=E-1,U=0,L=g[U];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+b);let k=0;for(let N=Math.min(this.lines.maxLength-1,E+b-1);N>=0;N--)if(L&&L.start>B+k){for(let K=L.newLines.length-1;K>=0;K--)this.lines.set(N--,L.newLines[K]);N++,x.push({index:B+1,amount:L.newLines.length}),k+=L.newLines.length,L=g[++U]}else this.lines.set(N,v[B--]);let Z=0;for(let N=x.length-1;N>=0;N--)x[N].index+=Z,this.lines.onInsertEmitter.fire(x[N]),Z+=x[N].amount;const ee=Math.max(0,E+b-this.lines.maxLength);ee>0&&this.lines.onTrimEmitter.fire(ee)}}translateBufferLineToString(a,c,_=0,g){const b=this.lines.get(a);return b?b.translateToString(c,_,g):""}getWrappedRangeForLine(a){let c=a,_=a;for(;c>0&&this.lines.get(c).isWrapped;)c--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:c,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 c=0;c<this.markers.length;c++)this.markers[c].line===a&&(this.markers[c].dispose(),this.markers.splice(c--,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 c=new l.Marker(a);return this.markers.push(c),c.register(this.lines.onTrim((_=>{c.line-=_,c.line<0&&c.dispose()}))),c.register(this.lines.onInsert((_=>{c.line>=_.index&&(c.line+=_.amount)}))),c.register(this.lines.onDelete((_=>{c.line>=_.index&&c.line<_.index+_.amount&&c.dispose(),c.line>_.index&&(c.line-=_.amount)}))),c.register(c.onDispose((()=>this._removeMarker(c)))),c}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=f(3734),y=f(511),h=f(643),p=f(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let C=0;class D{constructor(l,o,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*l);const c=o||y.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<l;++_)this.setCell(_,c);this.length=l}get(l){const o=this._data[3*l+0],a=2097151&o;return[this._data[3*l+1],2097152&o?this._combined[l]:a?(0,p.stringFromCodePoint)(a):"",o>>22,2097152&o?this._combined[l].charCodeAt(this._combined[l].length-1):a]}set(l,o){this._data[3*l+1]=o[h.CHAR_DATA_ATTR_INDEX],o[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[l]=o[1],this._data[3*l+0]=2097152|l|o[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*l+0]=o[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(l){return this._data[3*l+0]>>22}hasWidth(l){return 12582912&this._data[3*l+0]}getFg(l){return this._data[3*l+1]}getBg(l){return this._data[3*l+2]}hasContent(l){return 4194303&this._data[3*l+0]}getCodePoint(l){const o=this._data[3*l+0];return 2097152&o?this._combined[l].charCodeAt(this._combined[l].length-1):2097151&o}isCombined(l){return 2097152&this._data[3*l+0]}getString(l){const o=this._data[3*l+0];return 2097152&o?this._combined[l]:2097151&o?(0,p.stringFromCodePoint)(2097151&o):""}isProtected(l){return 536870912&this._data[3*l+2]}loadCell(l,o){return C=3*l,o.content=this._data[C+0],o.fg=this._data[C+1],o.bg=this._data[C+2],2097152&o.content&&(o.combinedData=this._combined[l]),268435456&o.bg&&(o.extended=this._extendedAttrs[l]),o}setCell(l,o){2097152&o.content&&(this._combined[l]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[l]=o.extended),this._data[3*l+0]=o.content,this._data[3*l+1]=o.fg,this._data[3*l+2]=o.bg}setCellFromCodePoint(l,o,a,c,_,g){268435456&_&&(this._extendedAttrs[l]=g),this._data[3*l+0]=o|a<<22,this._data[3*l+1]=c,this._data[3*l+2]=_}addCodepointToCell(l,o){let a=this._data[3*l+0];2097152&a?this._combined[l]+=(0,p.stringFromCodePoint)(o):(2097151&a?(this._combined[l]=(0,p.stringFromCodePoint)(2097151&a)+(0,p.stringFromCodePoint)(o),a&=-2097152,a|=2097152):a=o|4194304,this._data[3*l+0]=a)}insertCells(l,o,a,c){if((l%=this.length)&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,c?.fg||0,c?.bg||0,c?.extended||new d.ExtendedAttrs),o<this.length-l){const _=new y.CellData;for(let g=this.length-l-o-1;g>=0;--g)this.setCell(l+o+g,this.loadCell(l+g,_));for(let g=0;g<o;++g)this.setCell(l+g,a)}else for(let _=l;_<this.length;++_)this.setCell(_,a);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,c?.fg||0,c?.bg||0,c?.extended||new d.ExtendedAttrs)}deleteCells(l,o,a,c){if(l%=this.length,o<this.length-l){const _=new y.CellData;for(let g=0;g<this.length-l-o;++g)this.setCell(l+g,this.loadCell(l+o+g,_));for(let g=this.length-o;g<this.length;++g)this.setCell(g,a)}else for(let _=l;_<this.length;++_)this.setCell(_,a);l&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,c?.fg||0,c?.bg||0,c?.extended||new d.ExtendedAttrs),this.getWidth(l)!==0||this.hasContent(l)||this.setCellFromCodePoint(l,0,1,c?.fg||0,c?.bg||0,c?.extended||new d.ExtendedAttrs)}replaceCells(l,o,a,c,_=!1){if(_)for(l&&this.getWidth(l-1)===2&&!this.isProtected(l-1)&&this.setCellFromCodePoint(l-1,0,1,c?.fg||0,c?.bg||0,c?.extended||new d.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&!this.isProtected(o)&&this.setCellFromCodePoint(o,0,1,c?.fg||0,c?.bg||0,c?.extended||new d.ExtendedAttrs);l<o&&l<this.length;)this.isProtected(l)||this.setCell(l,a),l++;else for(l&&this.getWidth(l-1)===2&&this.setCellFromCodePoint(l-1,0,1,c?.fg||0,c?.bg||0,c?.extended||new d.ExtendedAttrs),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodePoint(o,0,1,c?.fg||0,c?.bg||0,c?.extended||new d.ExtendedAttrs);l<o&&l<this.length;)this.setCell(l++,a)}resize(l,o){if(l===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*l;if(l>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const c=new Uint32Array(a);c.set(this._data),this._data=c}for(let c=this.length;c<l;++c)this.setCell(c,o)}else{this._data=this._data.subarray(0,a);const c=Object.keys(this._combined);for(let g=0;g<c.length;g++){const b=parseInt(c[g],10);b>=l&&delete this._combined[b]}const _=Object.keys(this._extendedAttrs);for(let g=0;g<_.length;g++){const b=parseInt(_[g],10);b>=l&&delete this._extendedAttrs[b]}}return this.length=l,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const l=new Uint32Array(this._data.length);return l.set(this._data),this._data=l,1}return 0}fill(l,o=!1){if(o)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,l);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,l)}}copyFrom(l){this.length!==l.length?this._data=new Uint32Array(l._data):this._data.set(l._data),this.length=l.length,this._combined={};for(const o in l._combined)this._combined[o]=l._combined[o];this._extendedAttrs={};for(const o in l._extendedAttrs)this._extendedAttrs[o]=l._extendedAttrs[o];this.isWrapped=l.isWrapped}clone(){const l=new D(0);l._data=new Uint32Array(this._data),l.length=this.length;for(const o in this._combined)l._combined[o]=this._combined[o];for(const o in this._extendedAttrs)l._extendedAttrs[o]=this._extendedAttrs[o];return l.isWrapped=this.isWrapped,l}getTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0])return l+(this._data[3*l+0]>>22);return 0}getNoBgTrimmedLength(){for(let l=this.length-1;l>=0;--l)if(4194303&this._data[3*l+0]||50331648&this._data[3*l+2])return l+(this._data[3*l+0]>>22);return 0}copyCellsFrom(l,o,a,c,_){const g=l._data;if(_)for(let x=c-1;x>=0;x--){for(let v=0;v<3;v++)this._data[3*(a+x)+v]=g[3*(o+x)+v];268435456&g[3*(o+x)+2]&&(this._extendedAttrs[a+x]=l._extendedAttrs[o+x])}else for(let x=0;x<c;x++){for(let v=0;v<3;v++)this._data[3*(a+x)+v]=g[3*(o+x)+v];268435456&g[3*(o+x)+2]&&(this._extendedAttrs[a+x]=l._extendedAttrs[o+x])}const b=Object.keys(l._combined);for(let x=0;x<b.length;x++){const v=parseInt(b[x],10);v>=o&&(this._combined[v-o+a]=l._combined[v])}}translateToString(l=!1,o=0,a=this.length){l&&(a=Math.min(a,this.getTrimmedLength()));let c="";for(;o<a;){const _=this._data[3*o+0],g=2097151&_;c+=2097152&_?this._combined[o]:g?(0,p.stringFromCodePoint)(g):h.WHITESPACE_CELL_CHAR,o+=_>>22||1}return c}}u.BufferLine=D},4841:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.getRangeLength=void 0,u.getRangeLength=function(f,d){if(f.start.y>f.end.y)throw new Error(`Buffer range end (${f.end.x}, ${f.end.y}) cannot be before start (${f.start.x}, ${f.start.y})`);return d*(f.end.y-f.start.y)+(f.end.x-f.start.x+1)}},4634:(P,u)=>{function f(d,y,h){if(y===d.length-1)return d[y].getTrimmedLength();const p=!d[y].hasContent(h-1)&&d[y].getWidth(h-1)===1,C=d[y+1].getWidth(0)===2;return p&&C?h-1:h}Object.defineProperty(u,"__esModule",{value:!0}),u.getWrappedLineTrimmedLength=u.reflowSmallerGetNewLineLengths=u.reflowLargerApplyNewLayout=u.reflowLargerCreateNewLayout=u.reflowLargerGetLinesToRemove=void 0,u.reflowLargerGetLinesToRemove=function(d,y,h,p,C){const D=[];for(let S=0;S<d.length-1;S++){let l=S,o=d.get(++l);if(!o.isWrapped)continue;const a=[d.get(S)];for(;l<d.length&&o.isWrapped;)a.push(o),o=d.get(++l);if(p>=S&&p<l){S+=a.length-1;continue}let c=0,_=f(a,c,y),g=1,b=0;for(;g<a.length;){const v=f(a,g,y),E=v-b,B=h-_,U=Math.min(E,B);a[c].copyCellsFrom(a[g],b,_,U,!1),_+=U,_===h&&(c++,_=0),b+=U,b===v&&(g++,b=0),_===0&&c!==0&&a[c-1].getWidth(h-1)===2&&(a[c].copyCellsFrom(a[c-1],h-1,_++,1,!1),a[c-1].setCell(h-1,C))}a[c].replaceCells(_,h,C);let x=0;for(let v=a.length-1;v>0&&(v>c||a[v].getTrimmedLength()===0);v--)x++;x>0&&(D.push(S+a.length-x),D.push(x)),S+=a.length-1}return D},u.reflowLargerCreateNewLayout=function(d,y){const h=[];let p=0,C=y[p],D=0;for(let S=0;S<d.length;S++)if(C===S){const l=y[++p];d.onDeleteEmitter.fire({index:S-D,amount:l}),S+=l-1,D+=l,C=y[++p]}else h.push(S);return{layout:h,countRemoved:D}},u.reflowLargerApplyNewLayout=function(d,y){const h=[];for(let p=0;p<y.length;p++)h.push(d.get(y[p]));for(let p=0;p<h.length;p++)d.set(p,h[p]);d.length=y.length},u.reflowSmallerGetNewLineLengths=function(d,y,h){const p=[],C=d.map(((o,a)=>f(d,a,y))).reduce(((o,a)=>o+a));let D=0,S=0,l=0;for(;l<C;){if(C-l<h){p.push(C-l);break}D+=h;const o=f(d,S,y);D>o&&(D-=o,S++);const a=d[S].getWidth(D-1)===2;a&&D--;const c=a?h-1:h;p.push(c),l+=c}return p},u.getWrappedLineTrimmedLength=f},5295:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=f(8460),y=f(844),h=f(9092);class p extends y.Disposable{constructor(D,S){super(),this._optionsService=D,this._bufferService=S,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 h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.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,S){this._normal.resize(D,S),this._alt.resize(D,S),this.setupTabStops(D)}setupTabStops(D){this._normal.setupTabStops(D),this._alt.setupTabStops(D)}}u.BufferSet=p},511:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=f(482),y=f(643),h=f(3734);class p extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(D){const S=new p;return S.setFromCharData(D),S}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[y.CHAR_DATA_ATTR_INDEX],this.bg=0;let S=!1;if(D[y.CHAR_DATA_CHAR_INDEX].length>2)S=!0;else if(D[y.CHAR_DATA_CHAR_INDEX].length===2){const l=D[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=l&&l<=56319){const o=D[y.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(l-55296)+o-56320+65536|D[y.CHAR_DATA_WIDTH_INDEX]<<22:S=!0}else S=!0}else this.content=D[y.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|D[y.CHAR_DATA_WIDTH_INDEX]<<22;S&&(this.combinedData=D[y.CHAR_DATA_CHAR_INDEX],this.content=2097152|D[y.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=p},643:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WHITESPACE_CELL_CODE=u.WHITESPACE_CELL_WIDTH=u.WHITESPACE_CELL_CHAR=u.NULL_CELL_CODE=u.NULL_CELL_WIDTH=u.NULL_CELL_CHAR=u.CHAR_DATA_CODE_INDEX=u.CHAR_DATA_WIDTH_INDEX=u.CHAR_DATA_CHAR_INDEX=u.CHAR_DATA_ATTR_INDEX=u.DEFAULT_EXT=u.DEFAULT_ATTR=u.DEFAULT_COLOR=void 0,u.DEFAULT_COLOR=0,u.DEFAULT_ATTR=256|u.DEFAULT_COLOR<<9,u.DEFAULT_EXT=0,u.CHAR_DATA_ATTR_INDEX=0,u.CHAR_DATA_CHAR_INDEX=1,u.CHAR_DATA_WIDTH_INDEX=2,u.CHAR_DATA_CODE_INDEX=3,u.NULL_CELL_CHAR="",u.NULL_CELL_WIDTH=1,u.NULL_CELL_CODE=0,u.WHITESPACE_CELL_CHAR=" ",u.WHITESPACE_CELL_WIDTH=1,u.WHITESPACE_CELL_CODE=32},4863:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=f(8460),y=f(844);class h{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=h._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,y.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}u.Marker=h,h._nextId=1},7116:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DEFAULT_CHARSET=u.CHARSETS=void 0,u.CHARSETS={},u.DEFAULT_CHARSET=u.CHARSETS.B,u.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:"≥","{":"π","|":"≠","}":"£","~":"·"},u.CHARSETS.A={"#":"£"},u.CHARSETS.B=void 0,u.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},u.CHARSETS.C=u.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},u.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},u.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},u.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},u.CHARSETS.E=u.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},u.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},u.CHARSETS.H=u.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},u.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(P,u)=>{var f,d,y;Object.defineProperty(u,"__esModule",{value:!0}),u.C1_ESCAPED=u.C1=u.C0=void 0,(function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
16
|
-
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""})(f||(u.C0=f={})),(function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""})(d||(u.C1=d={})),(function(h){h.ST=`${f.ESC}\\`})(y||(u.C1_ESCAPED=y={}))},7399:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=f(2584),y={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:["'",'"']};u.evaluateKeyboardEvent=function(h,p,C,D){const S={type:0,cancel:!1,key:void 0},l=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?S.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?S.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?S.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(S.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:if(h.altKey){S.key=d.C0.ESC+d.C0.DEL;break}S.key=d.C0.DEL;break;case 9:if(h.shiftKey){S.key=d.C0.ESC+"[Z";break}S.key=d.C0.HT,S.cancel=!0;break;case 13:S.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,S.cancel=!0;break;case 27:S.key=d.C0.ESC,h.altKey&&(S.key=d.C0.ESC+d.C0.ESC),S.cancel=!0;break;case 37:if(h.metaKey)break;l?(S.key=d.C0.ESC+"[1;"+(l+1)+"D",S.key===d.C0.ESC+"[1;3D"&&(S.key=d.C0.ESC+(C?"b":"[1;5D"))):S.key=p?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;l?(S.key=d.C0.ESC+"[1;"+(l+1)+"C",S.key===d.C0.ESC+"[1;3C"&&(S.key=d.C0.ESC+(C?"f":"[1;5C"))):S.key=p?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;l?(S.key=d.C0.ESC+"[1;"+(l+1)+"A",C||S.key!==d.C0.ESC+"[1;3A"||(S.key=d.C0.ESC+"[1;5A")):S.key=p?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;l?(S.key=d.C0.ESC+"[1;"+(l+1)+"B",C||S.key!==d.C0.ESC+"[1;3B"||(S.key=d.C0.ESC+"[1;5B")):S.key=p?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(S.key=d.C0.ESC+"[2~");break;case 46:S.key=l?d.C0.ESC+"[3;"+(l+1)+"~":d.C0.ESC+"[3~";break;case 36:S.key=l?d.C0.ESC+"[1;"+(l+1)+"H":p?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:S.key=l?d.C0.ESC+"[1;"+(l+1)+"F":p?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?S.type=2:h.ctrlKey?S.key=d.C0.ESC+"[5;"+(l+1)+"~":S.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?S.type=3:h.ctrlKey?S.key=d.C0.ESC+"[6;"+(l+1)+"~":S.key=d.C0.ESC+"[6~";break;case 112:S.key=l?d.C0.ESC+"[1;"+(l+1)+"P":d.C0.ESC+"OP";break;case 113:S.key=l?d.C0.ESC+"[1;"+(l+1)+"Q":d.C0.ESC+"OQ";break;case 114:S.key=l?d.C0.ESC+"[1;"+(l+1)+"R":d.C0.ESC+"OR";break;case 115:S.key=l?d.C0.ESC+"[1;"+(l+1)+"S":d.C0.ESC+"OS";break;case 116:S.key=l?d.C0.ESC+"[15;"+(l+1)+"~":d.C0.ESC+"[15~";break;case 117:S.key=l?d.C0.ESC+"[17;"+(l+1)+"~":d.C0.ESC+"[17~";break;case 118:S.key=l?d.C0.ESC+"[18;"+(l+1)+"~":d.C0.ESC+"[18~";break;case 119:S.key=l?d.C0.ESC+"[19;"+(l+1)+"~":d.C0.ESC+"[19~";break;case 120:S.key=l?d.C0.ESC+"[20;"+(l+1)+"~":d.C0.ESC+"[20~";break;case 121:S.key=l?d.C0.ESC+"[21;"+(l+1)+"~":d.C0.ESC+"[21~";break;case 122:S.key=l?d.C0.ESC+"[23;"+(l+1)+"~":d.C0.ESC+"[23~";break;case 123:S.key=l?d.C0.ESC+"[24;"+(l+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(C&&!D||!h.altKey||h.metaKey)!C||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?S.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(S.key=d.C0.US),h.key==="@"&&(S.key=d.C0.NUL)):h.keyCode===65&&(S.type=1);else{const o=y[h.keyCode],a=o?.[h.shiftKey?1:0];if(a)S.key=d.C0.ESC+a;else if(h.keyCode>=65&&h.keyCode<=90){const c=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(c);h.shiftKey&&(_=_.toUpperCase()),S.key=d.C0.ESC+_}else if(h.keyCode===32)S.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let c=h.code.slice(3,4);h.shiftKey||(c=c.toLowerCase()),S.key=d.C0.ESC+c,S.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?S.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?S.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?S.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?S.key=d.C0.DEL:h.keyCode===219?S.key=d.C0.ESC:h.keyCode===220?S.key=d.C0.FS:h.keyCode===221&&(S.key=d.C0.GS)}return S}},482:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Utf8ToUtf32=u.StringToUtf32=u.utf32ToString=u.stringFromCodePoint=void 0,u.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},u.utf32ToString=function(f,d=0,y=f.length){let h="";for(let p=d;p<y;++p){let C=f[p];C>65535?(C-=65536,h+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):h+=String.fromCharCode(C)}return h},u.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(f,d){const y=f.length;if(!y)return 0;let h=0,p=0;if(this._interim){const C=f.charCodeAt(p++);56320<=C&&C<=57343?d[h++]=1024*(this._interim-55296)+C-56320+65536:(d[h++]=this._interim,d[h++]=C),this._interim=0}for(let C=p;C<y;++C){const D=f.charCodeAt(C);if(55296<=D&&D<=56319){if(++C>=y)return this._interim=D,h;const S=f.charCodeAt(C);56320<=S&&S<=57343?d[h++]=1024*(D-55296)+S-56320+65536:(d[h++]=D,d[h++]=S)}else D!==65279&&(d[h++]=D)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,d){const y=f.length;if(!y)return 0;let h,p,C,D,S=0,l=0,o=0;if(this.interim[0]){let _=!1,g=this.interim[0];g&=(224&g)==192?31:(240&g)==224?15:7;let b,x=0;for(;(b=63&this.interim[++x])&&x<4;)g<<=6,g|=b;const v=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,E=v-x;for(;o<E;){if(o>=y)return 0;if(b=f[o++],(192&b)!=128){o--,_=!0;break}this.interim[x++]=b,g<<=6,g|=63&b}_||(v===2?g<128?o--:d[S++]=g:v===3?g<2048||g>=55296&&g<=57343||g===65279||(d[S++]=g):g<65536||g>1114111||(d[S++]=g)),this.interim.fill(0)}const a=y-4;let c=o;for(;c<y;){for(;!(!(c<a)||128&(h=f[c])||128&(p=f[c+1])||128&(C=f[c+2])||128&(D=f[c+3]));)d[S++]=h,d[S++]=p,d[S++]=C,d[S++]=D,c+=4;if(h=f[c++],h<128)d[S++]=h;else if((224&h)==192){if(c>=y)return this.interim[0]=h,S;if(p=f[c++],(192&p)!=128){c--;continue}if(l=(31&h)<<6|63&p,l<128){c--;continue}d[S++]=l}else if((240&h)==224){if(c>=y)return this.interim[0]=h,S;if(p=f[c++],(192&p)!=128){c--;continue}if(c>=y)return this.interim[0]=h,this.interim[1]=p,S;if(C=f[c++],(192&C)!=128){c--;continue}if(l=(15&h)<<12|(63&p)<<6|63&C,l<2048||l>=55296&&l<=57343||l===65279)continue;d[S++]=l}else if((248&h)==240){if(c>=y)return this.interim[0]=h,S;if(p=f[c++],(192&p)!=128){c--;continue}if(c>=y)return this.interim[0]=h,this.interim[1]=p,S;if(C=f[c++],(192&C)!=128){c--;continue}if(c>=y)return this.interim[0]=h,this.interim[1]=p,this.interim[2]=C,S;if(D=f[c++],(192&D)!=128){c--;continue}if(l=(7&h)<<18|(63&p)<<12|(63&C)<<6|63&D,l<65536||l>1114111)continue;d[S++]=l}}return S}}},225:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const f=[[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]],d=[[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 y;u.UnicodeV6=class{constructor(){if(this.version="6",!y){y=new Uint8Array(65536),y.fill(1),y[0]=0,y.fill(0,1,32),y.fill(0,127,160),y.fill(2,4352,4448),y[9001]=2,y[9002]=2,y.fill(2,11904,42192),y[12351]=1,y.fill(2,44032,55204),y.fill(2,63744,64256),y.fill(2,65040,65050),y.fill(2,65072,65136),y.fill(2,65280,65377),y.fill(2,65504,65511);for(let h=0;h<f.length;++h)y.fill(0,f[h][0],f[h][1]+1)}}wcwidth(h){return h<32?0:h<127?1:h<65536?y[h]:(function(p,C){let D,S=0,l=C.length-1;if(p<C[0][0]||p>C[l][1])return!1;for(;l>=S;)if(D=S+l>>1,p>C[D][1])S=D+1;else{if(!(p<C[D][0]))return!0;l=D-1}return!1})(h,d)?0:h>=131072&&h<=196605||h>=196608&&h<=262141?2:1}}},5981:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=f(8460),y=f(844);class h extends y.Disposable{constructor(C){super(),this._action=C,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(C,D){if(D!==void 0&&this._syncCalls>D)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let S;for(this._isSyncWriting=!0;S=this._writeBuffer.shift();){this._action(S);const l=this._callbacks.shift();l&&l()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,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+=C.length,this._writeBuffer.push(C),this._callbacks.push(D),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(D)}_innerWrite(C=0,D=!0){const S=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const l=this._writeBuffer[this._bufferOffset],o=this._action(l,D);if(o){const c=_=>Date.now()-S>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(S,_);return void o.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(c)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=l.length,Date.now()-S>=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()}}u.WriteBuffer=h},5941:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.toRgbString=u.parseColor=void 0;const f=/^([\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 y(h,p){const C=h.toString(16),D=C.length<2?"0"+C:C;switch(p){case 4:return C[0];case 8:return D;case 12:return(D+D).slice(0,3);default:return D+D}}u.parseColor=function(h){if(!h)return;let p=h.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const C=f.exec(p);if(C){const D=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/D*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/D*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/D*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),d.exec(p)&&[3,6,9,12].includes(p.length))){const C=p.length/3,D=[0,0,0];for(let S=0;S<3;++S){const l=parseInt(p.slice(C*S,C*S+C),16);D[S]=C===1?l<<4:C===2?l:C===3?l>>4:l>>8}return D}},u.toRgbString=function(h,p=16){const[C,D,S]=h;return`rgb:${y(C,p)}/${y(D,p)}/${y(S,p)}`}},5770:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=f(482),y=f(8742),h=f(5770),p=[];u.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,S){this._handlers[D]===void 0&&(this._handlers[D]=[]);const l=this._handlers[D];return l.push(S),{dispose:()=>{const o=l.indexOf(S);o!==-1&&l.splice(o,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,S){if(this.reset(),this._ident=D,this._active=this._handlers[D]||p,this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].hook(S);else this._handlerFb(this._ident,"HOOK",S)}put(D,S,l){if(this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].put(D,S,l);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(D,S,l))}unhook(D,S=!0){if(this._active.length){let l=!1,o=this._active.length-1,a=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,l=S,a=this._stack.fallThrough,this._stack.paused=!1),!a&&l===!1){for(;o>=0&&(l=this._active[o].unhook(D),l!==!0);o--)if(l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,l;o--}for(;o>=0;o--)if(l=this._active[o].unhook(!1),l instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,l}else this._handlerFb(this._ident,"UNHOOK",D);this._active=p,this._ident=0}};const C=new y.Params;C.addParam(0),u.DcsHandler=class{constructor(D){this._handler=D,this._data="",this._params=C,this._hitLimit=!1}hook(D){this._params=D.length>1||D.params[0]?D.clone():C,this._data="",this._hitLimit=!1}put(D,S,l){this._hitLimit||(this._data+=(0,d.utf32ToString)(D,S,l),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(D){let S=!1;if(this._hitLimit)S=!1;else if(D&&(S=this._handler(this._data,this._params),S instanceof Promise))return S.then((l=>(this._params=C,this._data="",this._hitLimit=!1,l)));return this._params=C,this._data="",this._hitLimit=!1,S}}},2015:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=f(844),y=f(8742),h=f(6242),p=f(6351);class C{constructor(o){this.table=new Uint8Array(o)}setDefault(o,a){this.table.fill(o<<4|a)}add(o,a,c,_){this.table[a<<8|o]=c<<4|_}addMany(o,a,c,_){for(let g=0;g<o.length;g++)this.table[a<<8|o[g]]=c<<4|_}}u.TransitionTable=C;const D=160;u.VT500_TRANSITION_TABLE=(function(){const l=new C(4095),o=Array.apply(null,Array(256)).map(((x,v)=>v)),a=(x,v)=>o.slice(x,v),c=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const g=a(0,14);let b;for(b in l.setDefault(1,0),l.addMany(c,0,2,0),g)l.addMany([24,26,153,154],b,3,0),l.addMany(a(128,144),b,3,0),l.addMany(a(144,152),b,3,0),l.add(156,b,0,0),l.add(27,b,11,1),l.add(157,b,4,8),l.addMany([152,158,159],b,0,7),l.add(155,b,11,3),l.add(144,b,11,9);return l.addMany(_,0,3,0),l.addMany(_,1,3,1),l.add(127,1,0,1),l.addMany(_,8,0,8),l.addMany(_,3,3,3),l.add(127,3,0,3),l.addMany(_,4,3,4),l.add(127,4,0,4),l.addMany(_,6,3,6),l.addMany(_,5,3,5),l.add(127,5,0,5),l.addMany(_,2,3,2),l.add(127,2,0,2),l.add(93,1,4,8),l.addMany(c,8,5,8),l.add(127,8,5,8),l.addMany([156,27,24,26,7],8,6,0),l.addMany(a(28,32),8,0,8),l.addMany([88,94,95],1,0,7),l.addMany(c,7,0,7),l.addMany(_,7,0,7),l.add(156,7,0,0),l.add(127,7,0,7),l.add(91,1,11,3),l.addMany(a(64,127),3,7,0),l.addMany(a(48,60),3,8,4),l.addMany([60,61,62,63],3,9,4),l.addMany(a(48,60),4,8,4),l.addMany(a(64,127),4,7,0),l.addMany([60,61,62,63],4,0,6),l.addMany(a(32,64),6,0,6),l.add(127,6,0,6),l.addMany(a(64,127),6,0,0),l.addMany(a(32,48),3,9,5),l.addMany(a(32,48),5,9,5),l.addMany(a(48,64),5,0,6),l.addMany(a(64,127),5,7,0),l.addMany(a(32,48),4,9,5),l.addMany(a(32,48),1,9,2),l.addMany(a(32,48),2,9,2),l.addMany(a(48,127),2,10,0),l.addMany(a(48,80),1,10,0),l.addMany(a(81,88),1,10,0),l.addMany([89,90,92],1,10,0),l.addMany(a(96,127),1,10,0),l.add(80,1,11,9),l.addMany(_,9,0,9),l.add(127,9,0,9),l.addMany(a(28,32),9,0,9),l.addMany(a(32,48),9,9,12),l.addMany(a(48,60),9,8,10),l.addMany([60,61,62,63],9,9,10),l.addMany(_,11,0,11),l.addMany(a(32,128),11,0,11),l.addMany(a(28,32),11,0,11),l.addMany(_,10,0,10),l.add(127,10,0,10),l.addMany(a(28,32),10,0,10),l.addMany(a(48,60),10,8,10),l.addMany([60,61,62,63],10,0,11),l.addMany(a(32,48),10,9,12),l.addMany(_,12,0,12),l.add(127,12,0,12),l.addMany(a(28,32),12,0,12),l.addMany(a(32,48),12,9,12),l.addMany(a(48,64),12,0,11),l.addMany(a(64,127),12,12,13),l.addMany(a(64,127),10,12,13),l.addMany(a(64,127),9,12,13),l.addMany(_,13,13,13),l.addMany(c,13,13,13),l.add(127,13,0,13),l.addMany([27,156,24,26],13,14,0),l.add(D,0,2,0),l.add(D,8,5,8),l.add(D,6,0,6),l.add(D,11,0,11),l.add(D,13,13,13),l})();class S extends d.Disposable{constructor(o=u.VT500_TRANSITION_TABLE){super(),this._transitions=o,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new y.Params,this._params.addParam(0),this._collect=0,this.precedingCodepoint=0,this._printHandlerFb=(a,c,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,c)=>{},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 h.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(o,a=[64,126]){let c=0;if(o.prefix){if(o.prefix.length>1)throw new Error("only one byte as prefix supported");if(c=o.prefix.charCodeAt(0),c&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(o.intermediates){if(o.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let g=0;g<o.intermediates.length;++g){const b=o.intermediates.charCodeAt(g);if(32>b||b>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=b}}if(o.final.length!==1)throw new Error("final must be a single byte");const _=o.final.charCodeAt(0);if(a[0]>_||_>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return c<<=8,c|=_,c}identToString(o){const a=[];for(;o;)a.push(String.fromCharCode(255&o)),o>>=8;return a.reverse().join("")}setPrintHandler(o){this._printHandler=o}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(o,a){const c=this._identifier(o,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);const _=this._escHandlers[c];return _.push(a),{dispose:()=>{const g=_.indexOf(a);g!==-1&&_.splice(g,1)}}}clearEscHandler(o){this._escHandlers[this._identifier(o,[48,126])]&&delete this._escHandlers[this._identifier(o,[48,126])]}setEscHandlerFallback(o){this._escHandlerFb=o}setExecuteHandler(o,a){this._executeHandlers[o.charCodeAt(0)]=a}clearExecuteHandler(o){this._executeHandlers[o.charCodeAt(0)]&&delete this._executeHandlers[o.charCodeAt(0)]}setExecuteHandlerFallback(o){this._executeHandlerFb=o}registerCsiHandler(o,a){const c=this._identifier(o);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);const _=this._csiHandlers[c];return _.push(a),{dispose:()=>{const g=_.indexOf(a);g!==-1&&_.splice(g,1)}}}clearCsiHandler(o){this._csiHandlers[this._identifier(o)]&&delete this._csiHandlers[this._identifier(o)]}setCsiHandlerFallback(o){this._csiHandlerFb=o}registerDcsHandler(o,a){return this._dcsParser.registerHandler(this._identifier(o),a)}clearDcsHandler(o){this._dcsParser.clearHandler(this._identifier(o))}setDcsHandlerFallback(o){this._dcsParser.setHandlerFallback(o)}registerOscHandler(o,a){return this._oscParser.registerHandler(o,a)}clearOscHandler(o){this._oscParser.clearHandler(o)}setOscHandlerFallback(o){this._oscParser.setHandlerFallback(o)}setErrorHandler(o){this._errorHandler=o}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.precedingCodepoint=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(o,a,c,_,g){this._parseStack.state=o,this._parseStack.handlers=a,this._parseStack.handlerPos=c,this._parseStack.transition=_,this._parseStack.chunkPos=g}parse(o,a,c){let _,g=0,b=0,x=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,x=this._parseStack.chunkPos+1;else{if(c===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 E=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(c===!1&&E>-1){for(;E>=0&&(_=v[E](this._params),_!==!0);E--)if(_ instanceof Promise)return this._parseStack.handlerPos=E,_}this._parseStack.handlers=[];break;case 4:if(c===!1&&E>-1){for(;E>=0&&(_=v[E](),_!==!0);E--)if(_ instanceof Promise)return this._parseStack.handlerPos=E,_}this._parseStack.handlers=[];break;case 6:if(g=o[this._parseStack.chunkPos],_=this._dcsParser.unhook(g!==24&&g!==26,c),_)return _;g===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(g=o[this._parseStack.chunkPos],_=this._oscParser.end(g!==24&&g!==26,c),_)return _;g===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,x=this._parseStack.chunkPos+1,this.precedingCodepoint=0,this.currentState=15&this._parseStack.transition}for(let v=x;v<a;++v){switch(g=o[v],b=this._transitions.table[this.currentState<<8|(g<160?g:D)],b>>4){case 2:for(let k=v+1;;++k){if(k>=a||(g=o[k])<32||g>126&&g<D){this._printHandler(o,v,k),v=k-1;break}if(++k>=a||(g=o[k])<32||g>126&&g<D){this._printHandler(o,v,k),v=k-1;break}if(++k>=a||(g=o[k])<32||g>126&&g<D){this._printHandler(o,v,k),v=k-1;break}if(++k>=a||(g=o[k])<32||g>126&&g<D){this._printHandler(o,v,k),v=k-1;break}}break;case 3:this._executeHandlers[g]?this._executeHandlers[g]():this._executeHandlerFb(g),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:v,code:g,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const E=this._csiHandlers[this._collect<<8|g];let B=E?E.length-1:-1;for(;B>=0&&(_=E[B](this._params),_!==!0);B--)if(_ instanceof Promise)return this._preserveStack(3,E,B,b,v),_;B<0&&this._csiHandlerFb(this._collect<<8|g,this._params),this.precedingCodepoint=0;break;case 8:do switch(g){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(g-48)}while(++v<a&&(g=o[v])>47&&g<60);v--;break;case 9:this._collect<<=8,this._collect|=g;break;case 10:const U=this._escHandlers[this._collect<<8|g];let L=U?U.length-1:-1;for(;L>=0&&(_=U[L](),_!==!0);L--)if(_ instanceof Promise)return this._preserveStack(4,U,L,b,v),_;L<0&&this._escHandlerFb(this._collect<<8|g),this.precedingCodepoint=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|g,this._params);break;case 13:for(let k=v+1;;++k)if(k>=a||(g=o[k])===24||g===26||g===27||g>127&&g<D){this._dcsParser.put(o,v,k),v=k-1;break}break;case 14:if(_=this._dcsParser.unhook(g!==24&&g!==26),_)return this._preserveStack(6,[],0,b,v),_;g===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0;break;case 4:this._oscParser.start();break;case 5:for(let k=v+1;;k++)if(k>=a||(g=o[k])<32||g>127&&g<D){this._oscParser.put(o,v,k),v=k-1;break}break;case 6:if(_=this._oscParser.end(g!==24&&g!==26),_)return this._preserveStack(5,[],0,b,v),_;g===27&&(b|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0}this.currentState=15&b}}}u.EscapeSequenceParser=S},6242:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=f(5770),y=f(482),h=[];u.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,C){this._handlers[p]===void 0&&(this._handlers[p]=[]);const D=this._handlers[p];return D.push(C),{dispose:()=>{const S=D.indexOf(C);S!==-1&&D.splice(S,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=h}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=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,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,C,D){if(this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].put(p,C,D);else this._handlerFb(this._id,"PUT",(0,y.utf32ToString)(p,C,D))}start(){this.reset(),this._state=1}put(p,C,D){if(this._state!==3){if(this._state===1)for(;C<D;){const S=p[C++];if(S===59){this._state=2,this._start();break}if(S<48||57<S)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+S-48}this._state===2&&D-C>0&&this._put(p,C,D)}}end(p,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let D=!1,S=this._active.length-1,l=!1;if(this._stack.paused&&(S=this._stack.loopPosition-1,D=C,l=this._stack.fallThrough,this._stack.paused=!1),!l&&D===!1){for(;S>=0&&(D=this._active[S].end(p),D!==!0);S--)if(D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!1,D;S--}for(;S>=0;S--)if(D=this._active[S].end(!1),D instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=S,this._stack.fallThrough=!0,D}else this._handlerFb(this._id,"END",p);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,C,D){this._hitLimit||(this._data+=(0,y.utf32ToString)(p,C,D),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let C=!1;if(this._hitLimit)C=!1;else if(p&&(C=this._handler(this._data),C instanceof Promise))return C.then((D=>(this._data="",this._hitLimit=!1,D)));return this._data="",this._hitLimit=!1,C}}},8742:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const f=2147483647;class d{static fromArray(h){const p=new d;if(!h.length)return p;for(let C=Array.isArray(h[0])?1:0;C<h.length;++C){const D=h[C];if(Array.isArray(D))for(let S=0;S<D.length;++S)p.addSubParam(D[S]);else p.addParam(D)}return p}constructor(h=32,p=32){if(this.maxLength=h,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new d(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let p=0;p<this.length;++p){h.push(this.params[p]);const C=this._subParamsIdx[p]>>8,D=255&this._subParamsIdx[p];D-C>0&&h.push(Array.prototype.slice.call(this._subParams,C,D))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>f?f:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>f?f:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const p=this._subParamsIdx[h]>>8,C=255&this._subParamsIdx[h];return C-p>0?this._subParams.subarray(p,C):null}getSubParamsAll(){const h={};for(let p=0;p<this.length;++p){const C=this._subParamsIdx[p]>>8,D=255&this._subParamsIdx[p];D-C>0&&(h[p]=this._subParams.slice(C,D))}return h}addDigit(h){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,D=C[p-1];C[p-1]=~D?Math.min(10*D+h,f):h}}u.Params=d},5741:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.AddonManager=void 0,u.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let f=this._addons.length-1;f>=0;f--)this._addons[f].instance.dispose()}loadAddon(f,d){const y={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(y),d.dispose=()=>this._wrappedAddonDispose(y),d.activate(f)}_wrappedAddonDispose(f){if(f.isDisposed)return;let d=-1;for(let y=0;y<this._addons.length;y++)if(this._addons[y]===f){d=y;break}if(d===-1)throw new Error("Could not dispose an addon that has not been loaded");f.isDisposed=!0,f.dispose.apply(f.instance),this._addons.splice(d,1)}}},8771:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=f(3785),y=f(511);u.BufferApiView=class{constructor(h,p){this._buffer=h,this.type=p}init(h){return this._buffer=h,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(h){const p=this._buffer.lines.get(h);if(p)return new d.BufferLineApiView(p)}getNullCell(){return new y.CellData}}},3785:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=f(511);u.BufferLineApiView=class{constructor(y){this._line=y}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(y,h){if(!(y<0||y>=this._line.length))return h?(this._line.loadCell(y,h),h):this._line.loadCell(y,new d.CellData)}translateToString(y,h,p){return this._line.translateToString(y,h,p)}}},8285:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=f(8771),y=f(8460),h=f(844);class p extends h.Disposable{constructor(D){super(),this._core=D,this._onBufferChange=this.register(new y.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)}}u.BufferNamespaceApi=p},7975:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ParserApi=void 0,u.ParserApi=class{constructor(f){this._core=f}registerCsiHandler(f,d){return this._core.registerCsiHandler(f,(y=>d(y.toArray())))}addCsiHandler(f,d){return this.registerCsiHandler(f,d)}registerDcsHandler(f,d){return this._core.registerDcsHandler(f,((y,h)=>d(y,h.toArray())))}addDcsHandler(f,d){return this.registerDcsHandler(f,d)}registerEscHandler(f,d){return this._core.registerEscHandler(f,d)}addEscHandler(f,d){return this.registerEscHandler(f,d)}registerOscHandler(f,d){return this._core.registerOscHandler(f,d)}addOscHandler(f,d){return this.registerOscHandler(f,d)}}},7090:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeApi=void 0,u.UnicodeApi=class{constructor(f){this._core=f}register(f){this._core.unicodeService.register(f)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(f){this._core.unicodeService.activeVersion=f}}},744:function(P,u,f){var d=this&&this.__decorate||function(l,o,a,c){var _,g=arguments.length,b=g<3?o:c===null?c=Object.getOwnPropertyDescriptor(o,a):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,o,a,c);else for(var x=l.length-1;x>=0;x--)(_=l[x])&&(b=(g<3?_(b):g>3?_(o,a,b):_(o,a))||b);return g>3&&b&&Object.defineProperty(o,a,b),b},y=this&&this.__param||function(l,o){return function(a,c){o(a,c,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=f(8460),p=f(844),C=f(5295),D=f(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let S=u.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(l){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(l.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(l.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(l,this))}resize(l,o){this.cols=l,this.rows=o,this.buffers.resize(l,o),this._onResize.fire({cols:l,rows:o})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(l,o=!1){const a=this.buffer;let c;c=this._cachedBlankLine,c&&c.length===this.cols&&c.getFg(0)===l.fg&&c.getBg(0)===l.bg||(c=a.getBlankLine(l,o),this._cachedBlankLine=c),c.isWrapped=o;const _=a.ybase+a.scrollTop,g=a.ybase+a.scrollBottom;if(a.scrollTop===0){const b=a.lines.isFull;g===a.lines.length-1?b?a.lines.recycle().copyFrom(c):a.lines.push(c.clone()):a.lines.splice(g+1,0,c.clone()),b?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const b=g-_+1;a.lines.shiftElements(_+1,b-1,-1),a.lines.set(g,c.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(l,o,a){const c=this.buffer;if(l<0){if(c.ydisp===0)return;this.isUserScrolling=!0}else l+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);const _=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+l,c.ybase),0),_!==c.ydisp&&(o||this._onScroll.fire(c.ydisp))}};u.BufferService=S=d([y(0,D.IOptionsService)],S)},7994:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CharsetService=void 0,u.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(f){this.glevel=f,this.charset=this._charsets[f]}setgCharset(f,d){this._charsets[f]=d,this.glevel===f&&(this.charset=d)}}},1753:function(P,u,f){var d=this&&this.__decorate||function(c,_,g,b){var x,v=arguments.length,E=v<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,g):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(c,_,g,b);else for(var B=c.length-1;B>=0;B--)(x=c[B])&&(E=(v<3?x(E):v>3?x(_,g,E):x(_,g))||E);return v>3&&E&&Object.defineProperty(_,g,E),E},y=this&&this.__param||function(c,_){return function(g,b){_(g,b,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=f(2585),p=f(8460),C=f(844),D={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:c=>c.button!==4&&c.action===1&&(c.ctrl=!1,c.alt=!1,c.shift=!1,!0)},VT200:{events:19,restrict:c=>c.action!==32},DRAG:{events:23,restrict:c=>c.action!==32||c.button!==3},ANY:{events:31,restrict:c=>!0}};function S(c,_){let g=(c.ctrl?16:0)|(c.shift?4:0)|(c.alt?8:0);return c.button===4?(g|=64,g|=c.action):(g|=3&c.button,4&c.button&&(g|=64),8&c.button&&(g|=128),c.action===32?g|=32:c.action!==0||_||(g|=3)),g}const l=String.fromCharCode,o={DEFAULT:c=>{const _=[S(c,!1)+32,c.col+32,c.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${l(_[0])}${l(_[1])}${l(_[2])}`},SGR:c=>{const _=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${S(c,!0)};${c.col};${c.row}${_}`},SGR_PIXELS:c=>{const _=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${S(c,!0)};${c.x};${c.y}${_}`}};let a=u.CoreMouseService=class extends C.Disposable{constructor(c,_){super(),this._bufferService=c,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 g of Object.keys(D))this.addProtocol(g,D[g]);for(const g of Object.keys(o))this.addEncoding(g,o[g]);this.reset()}addProtocol(c,_){this._protocols[c]=_}addEncoding(c,_){this._encodings[c]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(c){if(!this._protocols[c])throw new Error(`unknown protocol "${c}"`);this._activeProtocol=c,this._onProtocolChange.fire(this._protocols[c].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(c){if(!this._encodings[c])throw new Error(`unknown encoding "${c}"`);this._activeEncoding=c}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(c){if(c.col<0||c.col>=this._bufferService.cols||c.row<0||c.row>=this._bufferService.rows||c.button===4&&c.action===32||c.button===3&&c.action!==32||c.button!==4&&(c.action===2||c.action===3)||(c.col++,c.row++,c.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,c,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(c))return!1;const _=this._encodings[this._activeEncoding](c);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=c,!0}explainEvents(c){return{down:!!(1&c),up:!!(2&c),drag:!!(4&c),move:!!(8&c),wheel:!!(16&c)}}_equalEvents(c,_,g){if(g){if(c.x!==_.x||c.y!==_.y)return!1}else if(c.col!==_.col||c.row!==_.row)return!1;return c.button===_.button&&c.action===_.action&&c.ctrl===_.ctrl&&c.alt===_.alt&&c.shift===_.shift}};u.CoreMouseService=a=d([y(0,h.IBufferService),y(1,h.ICoreService)],a)},6975:function(P,u,f){var d=this&&this.__decorate||function(a,c,_,g){var b,x=arguments.length,v=x<3?c:g===null?g=Object.getOwnPropertyDescriptor(c,_):g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(a,c,_,g);else for(var E=a.length-1;E>=0;E--)(b=a[E])&&(v=(x<3?b(v):x>3?b(c,_,v):b(c,_))||v);return x>3&&v&&Object.defineProperty(c,_,v),v},y=this&&this.__param||function(a,c){return function(_,g){c(_,g,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=f(1439),p=f(8460),C=f(844),D=f(2585),S=Object.freeze({insertMode:!1}),l=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let o=u.CoreService=class extends C.Disposable{constructor(a,c,_){super(),this._bufferService=a,this._logService=c,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,h.clone)(S),this.decPrivateModes=(0,h.clone)(l)}reset(){this.modes=(0,h.clone)(S),this.decPrivateModes=(0,h.clone)(l)}triggerDataEvent(a,c=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;c&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),c&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((g=>g.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((c=>c.charCodeAt(0))))),this._onBinary.fire(a))}};u.CoreService=o=d([y(0,D.IBufferService),y(1,D.ILogService),y(2,D.IOptionsService)],o)},9074:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=f(8055),y=f(8460),h=f(844),p=f(6106);let C=0,D=0;class S extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList((a=>a?.marker.line)),this._onDecorationRegistered=this.register(new y.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new y.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const c=new l(a);if(c){const _=c.marker.onDispose((()=>c.dispose()));c.onDispose((()=>{c&&(this._decorations.delete(c)&&this._onDecorationRemoved.fire(c),_.dispose())})),this._decorations.insert(c),this._onDecorationRegistered.fire(c)}return c}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,c,_){var g,b,x;let v=0,E=0;for(const B of this._decorations.getKeyIterator(c))v=(g=B.options.x)!==null&&g!==void 0?g:0,E=v+((b=B.options.width)!==null&&b!==void 0?b:1),a>=v&&a<E&&(!_||((x=B.options.layer)!==null&&x!==void 0?x:"bottom")===_)&&(yield B)}forEachDecorationAtCell(a,c,_,g){this._decorations.forEachByKey(c,(b=>{var x,v,E;C=(x=b.options.x)!==null&&x!==void 0?x:0,D=C+((v=b.options.width)!==null&&v!==void 0?v:1),a>=C&&a<D&&(!_||((E=b.options.layer)!==null&&E!==void 0?E:"bottom")===_)&&g(b)}))}}u.DecorationService=S;class l extends h.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 y.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new y.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:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=f(2585),y=f(8343);class h{constructor(...C){this._entries=new Map;for(const[D,S]of C)this.set(D,S)}set(C,D){const S=this._entries.get(C);return this._entries.set(C,D),S}forEach(C){for(const[D,S]of this._entries.entries())C(D,S)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}u.ServiceCollection=h,u.InstantiationService=class{constructor(){this._services=new h,this._services.set(d.IInstantiationService,this)}setService(p,C){this._services.set(p,C)}getService(p){return this._services.get(p)}createInstance(p,...C){const D=(0,y.getServiceDependencies)(p).sort(((o,a)=>o.index-a.index)),S=[];for(const o of D){const a=this._services.get(o.id);if(!a)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${o.id}.`);S.push(a)}const l=D.length>0?D[0].index:C.length;if(C.length!==l)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${l+1} conflicts with ${C.length} static arguments`);return new p(...C,...S)}}},7866:function(P,u,f){var d=this&&this.__decorate||function(l,o,a,c){var _,g=arguments.length,b=g<3?o:c===null?c=Object.getOwnPropertyDescriptor(o,a):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,o,a,c);else for(var x=l.length-1;x>=0;x--)(_=l[x])&&(b=(g<3?_(b):g>3?_(o,a,b):_(o,a))||b);return g>3&&b&&Object.defineProperty(o,a,b),b},y=this&&this.__param||function(l,o){return function(a,c){o(a,c,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=f(844),p=f(2585),C={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,S=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(l){super(),this._optionsService=l,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),D=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(l){for(let o=0;o<l.length;o++)typeof l[o]=="function"&&(l[o]=l[o]())}_log(l,o,a){this._evalLazyOptionalParams(a),l.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+o,...a)}trace(l,...o){var a,c;this._logLevel<=p.LogLevelEnum.TRACE&&this._log((c=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.trace.bind(this._optionsService.options.logger))!==null&&c!==void 0?c:console.log,l,o)}debug(l,...o){var a,c;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log((c=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.debug.bind(this._optionsService.options.logger))!==null&&c!==void 0?c:console.log,l,o)}info(l,...o){var a,c;this._logLevel<=p.LogLevelEnum.INFO&&this._log((c=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.info.bind(this._optionsService.options.logger))!==null&&c!==void 0?c:console.info,l,o)}warn(l,...o){var a,c;this._logLevel<=p.LogLevelEnum.WARN&&this._log((c=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.warn.bind(this._optionsService.options.logger))!==null&&c!==void 0?c:console.warn,l,o)}error(l,...o){var a,c;this._logLevel<=p.LogLevelEnum.ERROR&&this._log((c=(a=this._optionsService.options.logger)===null||a===void 0?void 0:a.error.bind(this._optionsService.options.logger))!==null&&c!==void 0?c:console.error,l,o)}};u.LogService=S=d([y(0,p.IOptionsService)],S),u.setTraceLogger=function(l){D=l},u.traceCall=function(l,o,a){if(typeof a.value!="function")throw new Error("not supported");const c=a.value;a.value=function(..._){if(D.logLevel!==p.LogLevelEnum.TRACE)return c.apply(this,_);D.trace(`GlyphRenderer#${c.name}(${_.map((b=>JSON.stringify(b))).join(", ")})`);const g=c.apply(this,_);return D.trace(`GlyphRenderer#${c.name} return`,g),g}}},7302:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=f(8460),y=f(844),h=f(6114);u.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,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:{},rightClickSelectsWord:h.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 C extends y.Disposable{constructor(S){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const l=Object.assign({},u.DEFAULT_OPTIONS);for(const o in S)if(o in l)try{const a=S[o];l[o]=this._sanitizeAndValidateOption(o,a)}catch(a){console.error(a)}this.rawOptions=l,this.options=Object.assign({},l),this._setupOptions()}onSpecificOptionChange(S,l){return this.onOptionChange((o=>{o===S&&l(this.rawOptions[S])}))}onMultipleOptionChange(S,l){return this.onOptionChange((o=>{S.indexOf(o)!==-1&&l()}))}_setupOptions(){const S=o=>{if(!(o in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);return this.rawOptions[o]},l=(o,a)=>{if(!(o in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);a=this._sanitizeAndValidateOption(o,a),this.rawOptions[o]!==a&&(this.rawOptions[o]=a,this._onOptionChange.fire(o))};for(const o in this.rawOptions){const a={get:S.bind(this,o),set:l.bind(this,o)};Object.defineProperty(this.options,o,a)}}_sanitizeAndValidateOption(S,l){switch(S){case"cursorStyle":if(l||(l=u.DEFAULT_OPTIONS[S]),!(function(o){return o==="block"||o==="underline"||o==="bar"})(l))throw new Error(`"${l}" is not a valid value for ${S}`);break;case"wordSeparator":l||(l=u.DEFAULT_OPTIONS[S]);break;case"fontWeight":case"fontWeightBold":if(typeof l=="number"&&1<=l&&l<=1e3)break;l=p.includes(l)?l:u.DEFAULT_OPTIONS[S];break;case"cursorWidth":l=Math.floor(l);case"lineHeight":case"tabStopWidth":if(l<1)throw new Error(`${S} cannot be less than 1, value: ${l}`);break;case"minimumContrastRatio":l=Math.max(1,Math.min(21,Math.round(10*l)/10));break;case"scrollback":if((l=Math.min(l,4294967295))<0)throw new Error(`${S} cannot be less than 0, value: ${l}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(l<=0)throw new Error(`${S} cannot be less than or equal to 0, value: ${l}`);break;case"rows":case"cols":if(!l&&l!==0)throw new Error(`${S} must be numeric, value: ${l}`);break;case"windowsPty":l=l??{}}return l}}u.OptionsService=C},2660:function(P,u,f){var d=this&&this.__decorate||function(C,D,S,l){var o,a=arguments.length,c=a<3?D:l===null?l=Object.getOwnPropertyDescriptor(D,S):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(C,D,S,l);else for(var _=C.length-1;_>=0;_--)(o=C[_])&&(c=(a<3?o(c):a>3?o(D,S,c):o(D,S))||c);return a>3&&c&&Object.defineProperty(D,S,c),c},y=this&&this.__param||function(C,D){return function(S,l){D(S,l,C)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=f(2585);let p=u.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const D=this._bufferService.buffer;if(C.id===void 0){const _=D.addMarker(D.ybase+D.y),g={data:C,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(g,_))),this._dataByLinkId.set(g.id,g),g.id}const S=C,l=this._getEntryIdKey(S),o=this._entriesWithId.get(l);if(o)return this.addLineToLink(o.id,D.ybase+D.y),o.id;const a=D.addMarker(D.ybase+D.y),c={id:this._nextId++,key:this._getEntryIdKey(S),data:S,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(c,a))),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.id}addLineToLink(C,D){const S=this._dataByLinkId.get(C);if(S&&S.lines.every((l=>l.line!==D))){const l=this._bufferService.buffer.addMarker(D);S.lines.push(l),l.onDispose((()=>this._removeMarkerFromLink(S,l)))}}getLinkData(C){var D;return(D=this._dataByLinkId.get(C))===null||D===void 0?void 0:D.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,D){const S=C.lines.indexOf(D);S!==-1&&(C.lines.splice(S,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};u.OscLinkService=p=d([y(0,h.IBufferService)],p)},8343:(P,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createDecorator=u.getServiceDependencies=u.serviceRegistry=void 0;const f="di$target",d="di$dependencies";u.serviceRegistry=new Map,u.getServiceDependencies=function(y){return y[d]||[]},u.createDecorator=function(y){if(u.serviceRegistry.has(y))return u.serviceRegistry.get(y);const h=function(p,C,D){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(S,l,o){l[f]===l?l[d].push({id:S,index:o}):(l[d]=[{id:S,index:o}],l[f]=l)})(h,p,D)};return h.toString=()=>y,u.serviceRegistry.set(y,h),h}},2585:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.IDecorationService=u.IUnicodeService=u.IOscLinkService=u.IOptionsService=u.ILogService=u.LogLevelEnum=u.IInstantiationService=u.ICharsetService=u.ICoreService=u.ICoreMouseService=u.IBufferService=void 0;const d=f(8343);var y;u.IBufferService=(0,d.createDecorator)("BufferService"),u.ICoreMouseService=(0,d.createDecorator)("CoreMouseService"),u.ICoreService=(0,d.createDecorator)("CoreService"),u.ICharsetService=(0,d.createDecorator)("CharsetService"),u.IInstantiationService=(0,d.createDecorator)("InstantiationService"),(function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"})(y||(u.LogLevelEnum=y={})),u.ILogService=(0,d.createDecorator)("LogService"),u.IOptionsService=(0,d.createDecorator)("OptionsService"),u.IOscLinkService=(0,d.createDecorator)("OscLinkService"),u.IUnicodeService=(0,d.createDecorator)("UnicodeService"),u.IDecorationService=(0,d.createDecorator)("DecorationService")},1480:(P,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=f(8460),y=f(225);u.UnicodeService=class{constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const h=new y.UnicodeV6;this.register(h),this._active=h.version,this._activeProvider=h}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(h){if(!this._providers[h])throw new Error(`unknown Unicode version "${h}"`);this._active=h,this._activeProvider=this._providers[h],this._onChange.fire(h)}register(h){this._providers[h.version]=h}wcwidth(h){return this._activeProvider.wcwidth(h)}getStringCellWidth(h){let p=0;const C=h.length;for(let D=0;D<C;++D){let S=h.charCodeAt(D);if(55296<=S&&S<=56319){if(++D>=C)return p+this.wcwidth(S);const l=h.charCodeAt(D);56320<=l&&l<=57343?S=1024*(S-55296)+l-56320+65536:p+=this.wcwidth(l)}p+=this.wcwidth(S)}return p}}}},G={};function ce(P){var u=G[P];if(u!==void 0)return u.exports;var f=G[P]={exports:{}};return ye[P].call(f.exports,f,f.exports,ce),f.exports}var ve={};return(()=>{var P=ve;Object.defineProperty(P,"__esModule",{value:!0}),P.Terminal=void 0;const u=ce(9042),f=ce(3236),d=ce(844),y=ce(5741),h=ce(8285),p=ce(7975),C=ce(7090),D=["cols","rows"];class S extends d.Disposable{constructor(o){super(),this._core=this.register(new f.Terminal(o)),this._addonManager=this.register(new y.AddonManager),this._publicOptions=Object.assign({},this._core.options);const a=_=>this._core.options[_],c=(_,g)=>{this._checkReadonlyOptions(_),this._core.options[_]=g};for(const _ in this._core.options){const g={get:a.bind(this,_),set:c.bind(this,_)};Object.defineProperty(this._publicOptions,_,g)}}_checkReadonlyOptions(o){if(D.includes(o))throw new Error(`Option "${o}" 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 C.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 h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const o=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:o.applicationCursorKeys,applicationKeypadMode:o.applicationKeypad,bracketedPasteMode:o.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:o.origin,reverseWraparoundMode:o.reverseWraparound,sendFocusMode:o.sendFocus,wraparoundMode:o.wraparound}}get options(){return this._publicOptions}set options(o){for(const a in o)this._publicOptions[a]=o[a]}blur(){this._core.blur()}focus(){this._core.focus()}resize(o,a){this._verifyIntegers(o,a),this._core.resize(o,a)}open(o){this._core.open(o)}attachCustomKeyEventHandler(o){this._core.attachCustomKeyEventHandler(o)}registerLinkProvider(o){return this._core.registerLinkProvider(o)}registerCharacterJoiner(o){return this._checkProposedApi(),this._core.registerCharacterJoiner(o)}deregisterCharacterJoiner(o){this._checkProposedApi(),this._core.deregisterCharacterJoiner(o)}registerMarker(o=0){return this._verifyIntegers(o),this._core.registerMarker(o)}registerDecoration(o){var a,c,_;return this._checkProposedApi(),this._verifyPositiveIntegers((a=o.x)!==null&&a!==void 0?a:0,(c=o.width)!==null&&c!==void 0?c:0,(_=o.height)!==null&&_!==void 0?_:0),this._core.registerDecoration(o)}hasSelection(){return this._core.hasSelection()}select(o,a,c){this._verifyIntegers(o,a,c),this._core.select(o,a,c)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(o,a){this._verifyIntegers(o,a),this._core.selectLines(o,a)}dispose(){super.dispose()}scrollLines(o){this._verifyIntegers(o),this._core.scrollLines(o)}scrollPages(o){this._verifyIntegers(o),this._core.scrollPages(o)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(o){this._verifyIntegers(o),this._core.scrollToLine(o)}clear(){this._core.clear()}write(o,a){this._core.write(o,a)}writeln(o,a){this._core.write(o),this._core.write(`\r
|
|
17
|
-
`,a)}paste(o){this._core.paste(o)}refresh(o,a){this._verifyIntegers(o,a),this._core.refresh(o,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(o){this._addonManager.loadAddon(this,o)}static get strings(){return u}_verifyIntegers(...o){for(const a of o)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...o){for(const a of o)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}P.Terminal=S})(),ve})()))})(jo)),jo.exports}var wv=Ev();function rs(H="req"){return`${H}_${Math.random().toString(36).slice(2,10)}`}function nn(H){return I.jsxs("section",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[I.jsx("div",{className:"mb-4 flex items-center justify-between gap-3",children:I.jsx("h2",{className:"text-lg font-semibold text-white",children:H.title})}),H.children]})}function ur(H){return I.jsxs("label",{className:"block",children:[I.jsx("span",{className:"mb-2 block text-sm text-slate-400",children:H.label}),I.jsx("input",{className:"w-full rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-[16px] outline-none placeholder:text-slate-500 disabled:opacity-50",value:H.value,onChange:ue=>H.onChange(ue.target.value),placeholder:H.placeholder,disabled:H.disabled})]})}function xv(H){const ue=H.kind==="error"?"border-rose-500/40 bg-rose-500/10 text-rose-100":H.kind==="success"?"border-emerald-500/40 bg-emerald-500/10 text-emerald-100":"border-sky-500/40 bg-sky-500/10 text-sky-100";return I.jsxs("div",{className:`flex items-start justify-between gap-3 rounded-2xl border px-4 py-3 text-sm ${ue}`,children:[I.jsx("p",{children:H.text}),I.jsx("button",{className:"rounded-full border border-current/30 px-3 py-1 text-xs",type:"button",onClick:H.onDismiss,children:"关闭"})]})}function Gf(H){const ue=H.connectionPhase==="connected",ye=H.showConnectionFields??!0,G=H.showPairingSection??!0,ce=H.showActions??!0;return I.jsx(nn,{title:H.title??"连接",children:I.jsxs("div",{className:"space-y-3",children:[ye?I.jsxs(I.Fragment,{children:[I.jsx(ur,{label:"WebSocket 地址",value:H.wsUrl,onChange:H.onWsUrlChange}),I.jsx(ur,{label:"访问令牌",value:H.clientToken,onChange:H.onClientTokenChange,placeholder:"首次配对后会自动写入"}),I.jsx(ur,{label:"设备 ID",value:H.deviceId,onChange:H.onDeviceIdChange,disabled:!H.deviceIdEditable})]}):null,G?I.jsxs("div",{className:"rounded-2xl border border-slate-800 bg-slate-950/40 p-3",children:[I.jsx("p",{className:"text-sm font-medium text-white",children:"设备配对"}),I.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"电脑上执行 `termpilot agent --relay 你的 relay 地址`。命令会直接启动后台 agent 并打印一次性配对码。"}),I.jsxs("div",{className:"mt-3 flex gap-3",children:[I.jsx("input",{className:"flex-1 rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-[16px] uppercase outline-none placeholder:text-slate-500",value:H.pairingCode,onChange:ve=>H.onPairingCodeChange(ve.target.value),placeholder:"ABC-234"}),I.jsx("button",{className:"rounded-full bg-emerald-400 px-4 py-3 text-sm font-medium text-slate-950 disabled:opacity-60",type:"button",disabled:H.pairingPending||!H.wsUrlValid,onClick:H.onRedeemPairingCode,children:H.pairingPending?"配对中":"配对"})]}),H.pairingMessage?I.jsx("p",{className:"mt-2 text-xs text-slate-400",children:H.pairingMessage}):null]}):null,ce?I.jsxs(I.Fragment,{children:[I.jsxs("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[minmax(0,1fr)_auto_auto]",children:[I.jsx("button",{className:"w-full rounded-full bg-sky-500 px-4 py-2.5 text-sm font-medium text-slate-950 disabled:opacity-60",disabled:H.connectionPhase==="connecting"||!H.wsUrlValid,onClick:H.onConnect,children:ue?"重新连接":H.connectionPhase==="connecting"?"连接中":"连接"}),I.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200 disabled:opacity-40",disabled:!ue,onClick:H.onRefresh,children:"刷新"}),I.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200 disabled:opacity-40",disabled:H.connectionPhase==="idle",onClick:H.onDisconnect,children:"断开"})]}),I.jsx("button",{className:"w-full rounded-full border border-rose-500/40 px-4 py-2.5 text-sm text-rose-200",type:"button",onClick:H.onClearBinding,children:"清除本机绑定"}),I.jsx("button",{className:"w-full rounded-full border border-slate-700 px-4 py-2.5 text-sm text-slate-200",type:"button",onClick:H.onToggleNotifications,children:H.notificationsEnabled?"关闭浏览器提醒":"开启浏览器提醒"}),I.jsx("p",{className:"text-xs text-slate-500",children:"断线后会自动重连。连接参数、访问令牌和最近查看的会话会保存在本机浏览器里。"})]}):null]})})}function Xf(H){return I.jsx(nn,{title:"创建会话",children:I.jsxs("form",{className:"space-y-3",onSubmit:H.onSubmit,children:[I.jsx(ur,{label:"名称",value:H.createName,onChange:H.onCreateNameChange,placeholder:"claude-main",disabled:!H.canControl}),I.jsx(ur,{label:"工作目录",value:H.createCwd,onChange:H.onCreateCwdChange,placeholder:"/Users/...",disabled:!H.canControl}),I.jsx(ur,{label:"Shell",value:H.createShell,onChange:H.onCreateShellChange,placeholder:"/bin/zsh",disabled:!H.canControl}),I.jsx("button",{className:"w-full rounded-full bg-emerald-400 px-4 py-2.5 text-sm font-medium text-slate-950 disabled:opacity-60",type:"submit",disabled:!H.canControl,children:"创建"})]})})}const Dv=[{value:"all",label:"全部"},{value:"running",label:"运行中"},{value:"exited",label:"已退出"}];function Ff(H){return I.jsx(nn,{title:"会话列表",children:I.jsxs("div",{className:"space-y-3",children:[I.jsx("input",{className:"w-full rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-[16px] outline-none placeholder:text-slate-500",value:H.sessionQuery,onChange:ue=>H.onSessionQueryChange(ue.target.value),placeholder:"搜索会话名称或目录"}),I.jsx("div",{className:"flex flex-wrap gap-2",children:Dv.map(ue=>I.jsx("button",{className:`min-h-11 rounded-full px-3 py-2 text-sm ${H.statusFilter===ue.value?"bg-sky-500 text-slate-950":"border border-slate-700 text-slate-200"}`,type:"button",onClick:()=>H.onStatusFilterChange(ue.value),children:ue.label},ue.value))}),I.jsxs("p",{className:"text-xs text-slate-500",children:["当前显示 ",H.filteredSessions.length," / ",H.sessions.length," 个会话。置顶会话会始终排在最前面。"]}),H.filteredSessions.length===0?I.jsx("p",{className:"text-sm text-slate-400",children:H.sessions.length===0?"当前没有会话。":"没有匹配当前搜索或筛选条件的会话。"}):H.filteredSessions.map(ue=>I.jsxs("div",{"data-session-name":ue.name,className:`w-full rounded-2xl border px-4 py-3 text-left transition ${ue.sid===H.activeSid?"border-sky-400/70 bg-sky-500/10":"border-slate-800 bg-slate-950/40"}`,children:[I.jsxs("div",{className:"flex items-start justify-between gap-3",children:[I.jsxs("div",{children:[I.jsx("p",{className:"font-medium text-white",children:ue.name}),I.jsx("p",{className:"mt-1 text-xs text-slate-400",children:ue.cwd})]}),I.jsx("span",{className:`rounded-full px-2.5 py-1 text-[11px] ${ue.status==="running"?"bg-emerald-500/15 text-emerald-300":"bg-slate-700 text-slate-300"}`,children:ue.status==="running"?"运行中":"已退出"})]}),I.jsxs("div",{className:"mt-3 flex gap-2",children:[I.jsx("button",{className:`rounded-full border px-3 py-1.5 text-xs ${H.pinnedSids.includes(ue.sid)?"border-amber-400/50 text-amber-200":"border-slate-700 text-slate-200"}`,type:"button",onClick:()=>H.onTogglePinnedSession(ue.sid),children:H.pinnedSids.includes(ue.sid)?"取消置顶":"置顶"}),I.jsx("button",{className:"rounded-full border border-slate-700 px-3 py-1.5 text-xs text-slate-200",type:"button",onClick:()=>H.onSelectSession(ue.sid),children:"查看"}),I.jsx("button",{className:"rounded-full border border-rose-500/40 px-3 py-1.5 text-xs text-rose-200 disabled:opacity-40",type:"button",disabled:ue.status!=="running"||!H.canControl,onClick:()=>H.onKillSession(ue.sid),children:"关闭"})]})]},ue.sid))]})})}function Vf(H){const ue=!!H.onBack,ye=H.shortcutKeys.filter(P=>["enter","ctrl_c","ctrl_d"].includes(P.key)),G=H.shortcutKeys.filter(P=>!["enter","ctrl_c","ctrl_d"].includes(P.key)),ce=G.filter(P=>!P.key.startsWith("arrow_")),ve=P=>{const u=P.tone==="primary"?"border-sky-400/40 bg-sky-500/10 text-sky-100":P.tone==="danger"?"border-rose-400/40 bg-rose-500/10 text-rose-100":"border-slate-700/80 bg-slate-950/60 text-slate-100";return I.jsxs("button",{className:`flex min-h-14 items-center gap-3 rounded-2xl border px-3 py-3 text-left transition disabled:opacity-40 ${u}`,disabled:!H.activeSid||!H.canControl,onClick:()=>H.onSendKey(P.key),children:[I.jsx("span",{className:"inline-flex min-w-11 items-center justify-center rounded-xl border border-white/10 bg-slate-950/80 px-2 py-2 font-mono text-[13px] text-white",children:P.chip}),I.jsxs("span",{className:"min-w-0",children:[I.jsx("span",{className:"block truncate text-sm font-medium",children:P.label}),I.jsx("span",{className:"mt-0.5 block text-xs text-slate-400",children:P.description})]})]},P.key)};return I.jsx(nn,{title:H.activeSession?`${H.activeSession.name} · ${H.activeSession.status==="running"?"运行中":"已退出"}`:"当前未选择会话",children:H.activeSession?I.jsxs("div",{className:"flex h-full min-h-[68vh] flex-col gap-4",children:[H.onBack?I.jsx("button",{className:"inline-flex min-h-11 w-fit items-center rounded-full border border-slate-700 px-4 py-2 text-sm text-slate-200",type:"button",onClick:H.onBack,children:"返回会话列表"}):null,ue?I.jsxs("div",{className:"space-y-4",children:[I.jsxs("div",{className:"rounded-[28px] border border-slate-800 bg-slate-950/90 p-3 shadow-[0_24px_80px_rgba(2,6,23,0.45)]",children:[I.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3 px-1",children:[I.jsxs("div",{children:[I.jsx("p",{className:"text-sm font-medium text-white",children:"终端输出"}),I.jsx("p",{className:"text-xs text-slate-500",children:"和电脑看的是同一个 tmux 会话。"})]}),I.jsx("span",{className:"rounded-full border border-emerald-500/30 bg-emerald-500/10 px-3 py-1 text-[11px] font-medium text-emerald-200",children:H.activeSession.status==="running"?"实时同步":"已结束"})]}),I.jsx("div",{className:"h-[56svh] min-h-[460px] overflow-hidden rounded-[22px] border border-slate-800 bg-[#020617] p-3",children:I.jsx("div",{ref:H.terminalHostRef,className:"h-full min-h-full w-full overflow-hidden"})})]}),I.jsxs("form",{className:"rounded-[28px] border border-slate-800 bg-slate-900/80 p-4 shadow-xl shadow-slate-950/25",onSubmit:H.onSubmitCommand,children:[I.jsxs("div",{className:"flex items-center justify-between gap-3",children:[I.jsxs("div",{children:[I.jsx("p",{className:"text-sm font-medium text-white",children:"快速输入"}),I.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"补一条命令最方便,发送时会自动回车。"})]}),I.jsx("button",{className:"min-h-10 rounded-full bg-sky-500 px-4 py-2 text-sm font-medium text-slate-950 disabled:opacity-60",type:"submit",disabled:!H.activeSid||!H.canControl,children:"发送"})]}),I.jsx("input",{className:"mt-4 min-h-14 w-full rounded-2xl border border-slate-700 bg-slate-950/70 px-4 py-3 text-[16px] outline-none ring-0 placeholder:text-slate-500 disabled:opacity-50",value:H.command,onChange:P=>H.onCommandChange(P.target.value),placeholder:"例如:claude code / git status / npm test",disabled:!H.activeSid||!H.canControl})]}),I.jsxs("div",{className:"rounded-[28px] border border-slate-800 bg-slate-900/72 p-4",children:[I.jsxs("div",{className:"mb-3",children:[I.jsx("p",{className:"text-sm font-medium text-white",children:"快捷操作"}),I.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"常用控制优先平铺,方向键做成更像终端遥控器的布局。"})]}),I.jsx("div",{className:"grid grid-cols-3 gap-3",children:ye.map(P=>I.jsxs("button",{className:`min-h-14 rounded-2xl border px-3 py-3 text-center text-sm font-medium disabled:opacity-40 ${P.tone==="primary"?"border-sky-400/40 bg-sky-500/10 text-sky-100":P.tone==="danger"?"border-rose-400/40 bg-rose-500/10 text-rose-100":"border-slate-700/80 bg-slate-950/60 text-slate-100"}`,disabled:!H.activeSid||!H.canControl,onClick:()=>H.onSendKey(P.key),children:[I.jsx("span",{className:"block font-mono text-[13px] opacity-80",children:P.chip}),I.jsx("span",{className:"mt-1 block",children:P.label})]},P.key))}),I.jsxs("div",{className:"mt-4 grid grid-cols-[1fr_auto_1fr] items-center gap-3",children:[I.jsx("div",{className:"flex justify-end",children:I.jsx("button",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border border-slate-700 bg-slate-950/60 text-xl text-slate-100 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl,onClick:()=>H.onSendKey("arrow_left"),children:"←"})}),I.jsxs("div",{className:"grid gap-3",children:[I.jsx("button",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border border-slate-700 bg-slate-950/60 text-xl text-slate-100 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl,onClick:()=>H.onSendKey("arrow_up"),children:"↑"}),I.jsx("button",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border border-amber-400/30 bg-amber-500/10 text-sm font-medium text-amber-100 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl,onClick:()=>H.onSendKey("escape"),children:"Esc"}),I.jsx("button",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border border-slate-700 bg-slate-950/60 text-xl text-slate-100 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl,onClick:()=>H.onSendKey("arrow_down"),children:"↓"})]}),I.jsx("div",{className:"flex justify-start",children:I.jsx("button",{className:"flex h-14 w-14 items-center justify-center rounded-2xl border border-slate-700 bg-slate-950/60 text-xl text-slate-100 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl,onClick:()=>H.onSendKey("arrow_right"),children:"→"})})]}),I.jsx("div",{className:"mt-4 grid grid-cols-2 gap-3",children:ce.map(P=>I.jsxs("button",{className:"min-h-12 rounded-2xl border border-slate-700 bg-slate-950/60 px-3 py-3 text-sm text-slate-100 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl,onClick:()=>H.onSendKey(P.key),children:[I.jsx("span",{className:"block font-mono text-[13px] opacity-80",children:P.chip}),I.jsx("span",{className:"mt-1 block",children:P.label})]},P.key))})]}),I.jsxs("details",{className:"rounded-[28px] border border-slate-800 bg-slate-900/72 p-4",children:[I.jsxs("summary",{className:"cursor-pointer list-none text-sm font-medium text-white",children:["多行粘贴",I.jsx("span",{className:"ml-2 text-xs font-normal text-slate-500",children:"脚本、长 prompt、多行命令放这里"})]}),I.jsx("textarea",{className:"mt-4 min-h-36 w-full rounded-2xl border border-slate-700 bg-slate-950/70 px-4 py-3 text-[16px] outline-none placeholder:text-slate-500 disabled:opacity-50",value:H.pasteBuffer,onChange:P=>H.onPasteBufferChange(P.target.value),placeholder:"在这里粘贴多行内容。原样发送不会自动补回车;发送并回车会在末尾补一个回车。",disabled:!H.activeSid||!H.canControl}),I.jsxs("div",{className:"mt-3 flex flex-col gap-3 sm:flex-row",children:[I.jsx("button",{className:"min-h-12 flex-1 rounded-2xl border border-slate-700 px-4 py-3 text-sm text-slate-200 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl||!H.pasteBuffer,onClick:()=>H.onSendPaste("raw"),children:"原样发送"}),I.jsx("button",{className:"min-h-12 flex-1 rounded-2xl bg-emerald-400 px-4 py-3 text-sm font-medium text-slate-950 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl||!H.pasteBuffer,onClick:()=>H.onSendPaste("line"),children:"发送并回车"})]})]})]}):I.jsxs("div",{className:"grid gap-4 xl:grid-cols-[minmax(0,1fr)_312px]",children:[I.jsxs("div",{className:"space-y-4",children:[I.jsxs("div",{className:"rounded-[28px] border border-slate-800 bg-slate-950/90 p-3 shadow-[0_24px_80px_rgba(2,6,23,0.45)]",children:[I.jsxs("div",{className:"mb-3 flex items-center justify-between gap-3 px-1",children:[I.jsxs("div",{children:[I.jsx("p",{className:"text-sm font-medium text-white",children:"终端输出"}),I.jsx("p",{className:"text-xs text-slate-500",children:"这里显示同一个 tmux 会话的实时快照输出。"})]}),I.jsx("span",{className:"rounded-full border border-emerald-500/30 bg-emerald-500/10 px-3 py-1 text-[11px] font-medium text-emerald-200",children:H.activeSession.status==="running"?"实时同步":"已结束"})]}),I.jsx("div",{className:"h-[52svh] min-h-[440px] max-h-[720px] overflow-hidden rounded-[22px] border border-slate-800 bg-[#020617] p-3",children:I.jsx("div",{ref:H.terminalHostRef,className:"h-full min-h-full w-full overflow-hidden"})})]}),I.jsxs("div",{className:"rounded-[28px] border border-slate-800 bg-slate-900/72 p-4",children:[I.jsxs("div",{className:"flex items-center justify-between gap-3",children:[I.jsxs("div",{children:[I.jsx("p",{className:"text-sm font-medium text-white",children:"快速输入"}),I.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"适合补一条命令、确认一步操作,发送时会自动追加回车。"})]}),I.jsx("span",{className:"rounded-full border border-slate-700 px-3 py-1 text-[11px] text-slate-400",children:"当前会话"})]}),I.jsxs("form",{className:"mt-4 flex flex-col gap-3 md:flex-row",onSubmit:H.onSubmitCommand,children:[I.jsx("input",{className:"min-h-14 flex-1 rounded-2xl border border-slate-700 bg-slate-950/70 px-4 py-3 text-[16px] outline-none ring-0 placeholder:text-slate-500 disabled:opacity-50",value:H.command,onChange:P=>H.onCommandChange(P.target.value),placeholder:"例如:claude code / git status / npm test",disabled:!H.activeSid||!H.canControl}),I.jsx("button",{className:"min-h-14 rounded-2xl bg-sky-500 px-5 py-3 text-sm font-medium text-slate-950 disabled:opacity-60",type:"submit",disabled:!H.activeSid||!H.canControl,children:"发送命令"})]})]}),I.jsxs("details",{className:"rounded-[28px] border border-slate-800 bg-slate-900/72 p-4",children:[I.jsxs("summary",{className:"cursor-pointer list-none text-sm font-medium text-white",children:["多行粘贴",I.jsx("span",{className:"ml-2 text-xs font-normal text-slate-500",children:"脚本、长 prompt、多行命令放这里"})]}),I.jsx("textarea",{className:"mt-4 min-h-36 w-full rounded-2xl border border-slate-700 bg-slate-950/70 px-4 py-3 text-[16px] outline-none placeholder:text-slate-500 disabled:opacity-50",value:H.pasteBuffer,onChange:P=>H.onPasteBufferChange(P.target.value),placeholder:"在这里粘贴多行内容。原样发送不会自动补回车;发送并回车会在末尾补一个回车。",disabled:!H.activeSid||!H.canControl}),I.jsxs("div",{className:"mt-3 flex flex-col gap-3 sm:flex-row",children:[I.jsx("button",{className:"min-h-12 flex-1 rounded-2xl border border-slate-700 px-4 py-3 text-sm text-slate-200 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl||!H.pasteBuffer,onClick:()=>H.onSendPaste("raw"),children:"原样发送"}),I.jsx("button",{className:"min-h-12 flex-1 rounded-2xl bg-emerald-400 px-4 py-3 text-sm font-medium text-slate-950 disabled:opacity-40",type:"button",disabled:!H.activeSid||!H.canControl||!H.pasteBuffer,onClick:()=>H.onSendPaste("line"),children:"发送并回车"})]})]})]}),I.jsxs("aside",{className:"space-y-4",children:[I.jsxs("div",{className:"rounded-[28px] border border-slate-800 bg-slate-900/72 p-4",children:[I.jsxs("div",{className:"mb-3",children:[I.jsx("p",{className:"text-sm font-medium text-white",children:"执行操作"}),I.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"把最常用的几类控制集中到右侧,不再散成一排丑按钮。"})]}),I.jsx("div",{className:"grid gap-3",children:ye.map(ve)})]}),I.jsxs("div",{className:"rounded-[28px] border border-slate-800 bg-slate-900/72 p-4",children:[I.jsxs("div",{className:"mb-3",children:[I.jsx("p",{className:"text-sm font-medium text-white",children:"移动与补全"}),I.jsx("p",{className:"mt-1 text-xs text-slate-500",children:"参考 WeTTY / ttyd 这类网页终端的做法,用紧凑的快捷控制代替原来那种裸文本按钮。"})]}),I.jsx("div",{className:"grid gap-3 sm:grid-cols-2 xl:grid-cols-1",children:G.map(ve)})]})]})]}),I.jsx("p",{className:"text-xs text-slate-500",children:"当前模式是浏览器直开 PWA。适合查看流式输出、补命令和关闭会话,不适合重度长文本输入。"})]}):I.jsxs("div",{className:"flex min-h-[56vh] flex-col items-center justify-center rounded-3xl border border-dashed border-slate-700 bg-slate-950/35 px-6 py-12 text-center",children:[I.jsx("p",{className:"text-sm font-semibold text-white",children:"先选择一个会话"}),I.jsx("p",{className:"mt-2 max-w-md text-sm text-slate-400",children:"你可以在左侧查看已有会话,或者先创建一个新的 tmux 会话。选中之后这里才会显示终端输出和输入控件。"})]})})}const Pf=[{key:"enter",label:"发送回车",chip:"↵",description:"执行当前命令",tone:"primary"},{key:"ctrl_c",label:"中断",chip:"^C",description:"停止当前任务",tone:"danger"},{key:"ctrl_d",label:"结束输入",chip:"^D",description:"发送 EOF",tone:"neutral"},{key:"tab",label:"补全",chip:"⇥",description:"触发 shell 补全",tone:"neutral"},{key:"escape",label:"返回",chip:"Esc",description:"退出当前模式",tone:"neutral"},{key:"arrow_up",label:"上一条",chip:"↑",description:"查看历史命令",tone:"neutral"},{key:"arrow_down",label:"下一条",chip:"↓",description:"回到较新的命令",tone:"neutral"},{key:"arrow_left",label:"左移",chip:"←",description:"移动光标到左侧",tone:"neutral"},{key:"arrow_right",label:"右移",chip:"→",description:"移动光标到右侧",tone:"neutral"}],Av="ws://127.0.0.1:8787/ws",Tv="",xs="pc-main",Qf="termpilot-app-state";function Rv(){if(typeof window>"u")return Av;const H=window.location.protocol==="https:"?"wss:":"ws:";return window.location.port==="5173"?`${H}//${window.location.hostname}:8787/ws`:`${H}//${window.location.host}/ws`}function Mv(H){const ue=new URL(H);return ue.protocol=ue.protocol==="wss:"?"https:":"http:",ue.pathname="",ue.search="",ue.hash="",ue.toString().replace(/\/$/,"")}function Lv(H){try{return new URL(H)}catch{return null}}function Bv(){const H=ge.useRef(null),ue=ge.useRef(null),ye=ge.useRef(null),G=ge.useRef(null),ce=ge.useRef(null),ve=ge.useRef(null),P=ge.useRef(!1),u=ge.useRef(0),f=ge.useRef(xs),d=ge.useRef(xs),y=ge.useRef(!1),h=ge.useRef({}),p=ge.useRef(!1),[C,D]=ge.useState(Rv),[S,l]=ge.useState(Tv),[o,a]=ge.useState(xs),[c,_]=ge.useState(!1),[g,b]=ge.useState("idle"),[x,v]=ge.useState(!1),[E,B]=ge.useState([]),[U,L]=ge.useState({}),[k,Z]=ge.useState(null),[ee,N]=ge.useState([]),[K,A]=ge.useState(""),[M,O]=ge.useState("all"),[w,j]=ge.useState(""),[W,te]=ge.useState(""),[le,fe]=ge.useState(!1),[T,X]=ge.useState(!1),[$,se]=ge.useState(null),[pe,oe]=ge.useState(""),[xe,Ne]=ge.useState(""),[$e,wt]=ge.useState(""),[Ce,Zt]=ge.useState(""),[Jt,ii]=ge.useState(""),[ht,fi]=ge.useState(null),[St,it]=ge.useState(()=>typeof window<"u"&&window.innerWidth>=1024),yt=ge.useMemo(()=>E.find(ae=>ae.sid===k)??null,[k,E]),Bt=S.trim().length>0,Ot=g==="connected",Ve=Ot&&x,bt=ge.useMemo(()=>Lv(C),[C]),xt=ge.useMemo(()=>bt?Mv(bt.toString()):null,[bt]),si=ge.useMemo(()=>{const ae=K.trim().toLowerCase();return E.filter(de=>M!=="all"&&de.status!==M?!1:ae?de.name.toLowerCase().includes(ae)||de.cwd.toLowerCase().includes(ae):!0).sort((de,Me)=>{const Ie=ee.includes(de.sid),ki=ee.includes(Me.sid);return Ie!==ki?Ie?-1:1:Me.startedAt.localeCompare(de.startedAt)})},[ee,K,E,M]);ge.useEffect(()=>{f.current=o},[o]),ge.useEffect(()=>{if(typeof window>"u")return;const ae=()=>{it(window.innerWidth>=1024)};return window.addEventListener("resize",ae),()=>{window.removeEventListener("resize",ae)}},[]),ge.useEffect(()=>{const ae=o.trim()||xs;if(!Ot){d.current=ae;return}if(d.current===ae)return;d.current=ae,v(!1),B([]),L({}),Z(null);const de=window.setTimeout(()=>{ct(ae)},200);return()=>{window.clearTimeout(de)}},[Ot,o]),ge.useEffect(()=>{try{const ae=window.localStorage.getItem(Qf);if(!ae)return;const de=JSON.parse(ae);de.wsUrl&&D(de.wsUrl),de.clientToken&&l(de.clientToken),typeof de.deviceId=="string"&&de.deviceId.trim()&&a(de.deviceId.trim()),(typeof de.activeSid=="string"||de.activeSid===null)&&Z(de.activeSid??null),Array.isArray(de.pinnedSids)&&N(de.pinnedSids.filter(Me=>typeof Me=="string")),typeof de.notificationsEnabled=="boolean"&&X(de.notificationsEnabled)}catch{}},[]),ge.useEffect(()=>{const ae={wsUrl:C,clientToken:S,deviceId:o,activeSid:k,pinnedSids:ee,notificationsEnabled:T};window.localStorage.setItem(Qf,JSON.stringify(ae))},[k,S,o,T,ee,C]);function qe(ae=ue.current){if(!ae||!k)return;const de=U[k]??"";ae.clear(),de&&ae.write(de.replace(/\n/g,`\r
|
|
18
|
-
`))}ge.useEffect(()=>{if(!ht)return;const ae=new wv.Terminal({convertEol:!0,cursorBlink:!0,fontFamily:'"SF Mono", "JetBrains Mono", Menlo, monospace',fontSize:13,theme:{background:"#020617",foreground:"#e2e8f0",cursor:"#38bdf8",black:"#0f172a",brightBlack:"#334155"}}),de=new Cv.FitAddon;let Me=0,Ie=!1;return ae.loadAddon(de),ae.open(ht),ue.current=ae,ye.current=de,Me=window.requestAnimationFrame(()=>{Ie||(ri(),qe(ae))}),()=>{Ie=!0,window.cancelAnimationFrame(Me),ue.current=null,ye.current=null,ae.dispose()}},[ht]),ge.useEffect(()=>{if(!ht||!ye.current)return;const ae=()=>{!ue.current||!ri()||!Ve||!k||ue.current.cols===0||ue.current.rows===0||_t({type:"session.resize",reqId:rs("resize"),deviceId:o,sid:k,payload:{cols:ue.current.cols,rows:ue.current.rows}})},de=new ResizeObserver(()=>ae());return de.observe(ht),ae(),()=>{de.disconnect()}},[k,Ve,o,ht]),ge.useEffect(()=>{qe()},[k,U,ht]),ge.useEffect(()=>()=>{ce.current!==null&&window.clearTimeout(ce.current),ve.current!==null&&window.clearTimeout(ve.current),G.current?.close()},[]),ge.useEffect(()=>{Ot&&(ct(f.current),k&&ns(k,f.current))},[k,Ot]),ge.useEffect(()=>{!S.trim()||bt===null||G.current||g!=="idle"||P.current||li(!1)},[S,g,bt]),ge.useEffect(()=>{const ae=new Set(E.map(de=>de.sid));N(de=>de.filter(Me=>ae.has(Me)))},[E]),ge.useEffect(()=>{const ae=y.current,de=h.current,Me=Object.fromEntries(E.map(Ie=>[Ie.sid,Ie.status]));if(p.current&&T&&typeof window<"u"&&"Notification"in window&&Notification.permission==="granted"&&document.hidden){ae&&!x&&new Notification("TermPilot",{body:`设备 ${o} 已离线`});for(const Ie of E)de[Ie.sid]==="running"&&Ie.status==="exited"&&new Notification("会话已退出",{body:`${Ie.name} 已结束`})}y.current=x,h.current=Me,p.current=!0},[o,x,T,E]);function ri(){if(!ye.current||!ue.current||!ht||ht.clientWidth===0||ht.clientHeight===0)return!1;try{return ye.current.fit(),!0}catch{return!1}}function Xe(ae,de){se({kind:ae,text:de}),ve.current!==null&&window.clearTimeout(ve.current),ve.current=window.setTimeout(()=>{se(null),ve.current=null},4e3)}function _t(ae){const de=G.current;!de||de.readyState!==WebSocket.OPEN||de.send(JSON.stringify(ae))}function ct(ae){_t({type:"session.list",reqId:rs("list"),deviceId:ae??f.current})}function ns(ae,de){_t({type:"session.replay",reqId:rs("replay"),deviceId:de??f.current,sid:ae,payload:{afterSeq:-1}})}function Cl(){if(P.current)return;const ae=u.current+1;u.current=ae;const de=Math.min(1e3*2**Math.min(ae,4),12e3);b("reconnecting"),ce.current=window.setTimeout(()=>{ce.current=null,li(!1)},de)}function ln(){P.current=!0,u.current=0,ce.current!==null&&(window.clearTimeout(ce.current),ce.current=null)}function Bi(){ln(),G.current?.close(),G.current=null,b("idle"),v(!1)}function ls(){Bi(),l(""),a(xs),_(!1),Z(null),B([]),L({}),te("已清除本机保存的访问令牌,请重新配对。"),Xe("info","已清除本机绑定。"),y.current=!1,h.current={},p.current=!1}function as(ae){N(de=>de.includes(ae)?de.filter(Me=>Me!==ae):[ae,...de])}async function ni(){if(T){X(!1),Xe("info","已关闭浏览器提醒。");return}if(typeof window>"u"||!("Notification"in window)){Xe("error","当前浏览器不支持通知。");return}if(await Notification.requestPermission()==="granted"){X(!0),Xe("success","已开启浏览器提醒。页面在后台时,会在会话退出或设备离线时提醒。");return}X(!1),Xe("error","通知权限未开启。")}function li(ae=!0,de){if(!bt){te("WebSocket 地址无效,请先输入完整地址。"),b("idle");return}ae&&(P.current=!1,u.current=0),ce.current!==null&&(window.clearTimeout(ce.current),ce.current=null),G.current?.close(),b(ae?"connecting":"reconnecting"),te("");const Me=new URL(bt.toString());Me.searchParams.set("role","client"),Me.searchParams.set("token",de??S);const Ie=new WebSocket(Me);G.current=Ie,Ie.addEventListener("open",()=>{G.current===Ie&&(u.current=0,b("connected"))}),Ie.addEventListener("close",()=>{G.current===Ie&&(G.current=null),!(G.current!==null&&G.current!==Ie)&&(b(ki=>P.current?"idle":ki),v(!1),P.current||Cl())}),Ie.addEventListener("message",ki=>{if(G.current!==Ie)return;const Ze=JSON.parse(ki.data);switch(Ze.type){case"auth.ok":{const Oe=Ze.payload.deviceId??(f.current.trim()||xs),Le=f.current,Pe=!!Ze.payload.deviceId||!Le.trim();te(""),_(!!Ze.payload.deviceId),f.current=Oe,Oe!==Le&&(B([]),L({}),Z(null)),Pe&&a(Oe),ct(Oe),k&&ns(k,Oe)}return;case"relay.state":v(Ze.payload.agents.some(Oe=>Oe.deviceId===f.current&&Oe.online));return;case"session.list.result":if(Ze.deviceId!==f.current)return;B(Ze.payload.sessions),L(Oe=>{const Le={};for(const Pe of Ze.payload.sessions)Oe[Pe.sid]&&(Le[Pe.sid]=Oe[Pe.sid]);return Le}),Z(Oe=>{const Le=Oe&&Ze.payload.sessions.some(Pe=>Pe.sid===Oe)?Oe:null;return Le&&ns(Le,f.current),Le});return;case"session.created":case"session.state":{const Oe=Ze.payload.session;if(Oe.deviceId!==f.current)return;B(Le=>{const Pe=Le.filter(ai=>ai.sid!==Oe.sid);return Pe.push(Oe),Pe.sort((ai,fr)=>fr.startedAt.localeCompare(ai.startedAt)),Pe}),Z(Le=>Le??Oe.sid);return}case"session.output":if(Ze.deviceId!==f.current)return;L(Oe=>({...Oe,[Ze.sid]:Ze.payload.data}));return;case"session.exit":if(Ze.deviceId!==f.current)return;B(Oe=>Oe.map(Le=>Le.sid===Ze.sid?{...Le,status:"exited"}:Le));return;case"error":if(Ze.code==="AUTH_FAILED"||Ze.code==="AUTH_REVOKED"){ln(),b("idle"),v(!1),Ze.code==="AUTH_REVOKED"&&l(""),te(Ze.message),Xe("error",Ze.message),Ie.close();return}Xe("error",Ze.message)}})}async function di(){if(!xt){te("WebSocket 地址无效,请先输入完整地址。");return}const ae=w.trim().toUpperCase();if(!ae){te("请先输入配对码。");return}fe(!0),te("");try{const de=await fetch(`${xt}/api/pairings/redeem`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({pairingCode:ae})}),Me=await de.json().catch(()=>null);if(!de.ok||!Me||!("accessToken"in Me)){const Ie=Me&&"message"in Me&&Me.message?Me.message:"配对失败";throw new Error(Ie)}B([]),L({}),Z(null),a(Me.deviceId),l(Me.accessToken),j(""),te(""),Xe("success",`已绑定设备 ${Me.deviceId}。`),li(!0,Me.accessToken)}catch(de){const Me=de instanceof Error?de.message:"配对失败";te(Me),Xe("error",Me)}finally{fe(!1)}}function an(ae){if(ae.preventDefault(),!Ve){Xe("error",x?"当前未连接 relay,无法创建会话。":`设备 ${o||xs} 当前离线,无法创建会话。`);return}_t({type:"session.create",reqId:rs("create"),deviceId:o,payload:{name:$e||void 0,cwd:Ce||void 0,shell:Jt||void 0}}),wt(""),Xe("success","已发送创建会话请求。")}function hr(ae){ae.preventDefault(),!(!k||!pe.trim()||!Ve)&&(_t({type:"session.input",reqId:rs("input"),deviceId:o,sid:k,payload:{text:`${pe}
|
|
19
|
-
`}}),oe(""))}function Ds(ae){!k||!xe||!Ve||(_t({type:"session.input",reqId:rs("paste"),deviceId:o,sid:k,payload:{text:ae==="line"?`${xe}
|
|
20
|
-
`:xe}}),Ne(""),Xe("success",ae==="line"?"已发送多行内容并追加回车。":"已原样发送多行内容。"))}function Oi(ae){!k||!Ve||_t({type:"session.input",reqId:rs("key"),deviceId:o,sid:k,payload:{key:ae}})}function on(ae){_t({type:"session.kill",reqId:rs("kill"),deviceId:o,sid:ae}),Xe("info","已发送关闭会话请求。")}function cn(){if(!H.current||typeof window>"u"||window.innerWidth>=1024)return;const ae=H.current;window.requestAnimationFrame(()=>{ae.scrollIntoView({block:"start",inline:"nearest"})})}return I.jsxs("main",{className:"mx-auto flex min-h-screen w-full max-w-7xl flex-col gap-5 px-4 py-5 text-slate-100 sm:px-6 lg:px-8",children:[I.jsxs("header",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/70 p-5 shadow-2xl shadow-slate-950/40 backdrop-blur",children:[I.jsx("p",{className:"text-xs font-semibold uppercase tracking-[0.25em] text-sky-300",children:"TermPilot"}),I.jsx("h1",{className:"mt-2 text-3xl font-semibold text-white",children:Bt?"会话列表":"先绑定你的电脑"}),I.jsx("p",{className:"mt-2 max-w-2xl text-sm text-slate-400",children:Bt?"先选一个会话,再进入查看输出和补命令。":"在电脑上执行 termpilot agent --relay 你的 relay 地址。命令会直接启动后台 agent 并打印一次性配对码。"}),Bt?I.jsxs("p",{className:"mt-3 text-xs text-slate-500",children:[o," · ",x?"设备在线":"设备离线"," · ",Ot?"已连上 relay":g==="reconnecting"?"正在重连 relay":"relay 未连接"]}):null]}),$?I.jsx(xv,{kind:$.kind,text:$.text,onDismiss:()=>{se(null),ve.current!==null&&(window.clearTimeout(ve.current),ve.current=null)}}):null,Bt?I.jsxs(I.Fragment,{children:[St?I.jsxs("section",{className:"grid gap-5 lg:grid-cols-[360px_minmax(0,1fr)]",children:[I.jsxs("div",{className:"space-y-5",children:[I.jsx(Xf,{canControl:Ve,createName:$e,createCwd:Ce,createShell:Jt,onCreateNameChange:wt,onCreateCwdChange:Zt,onCreateShellChange:ii,onSubmit:an}),I.jsx(Ff,{canControl:Ve,sessions:E,filteredSessions:si,activeSid:k,pinnedSids:ee,sessionQuery:K,statusFilter:M,onSessionQueryChange:A,onStatusFilterChange:O,onTogglePinnedSession:as,onSelectSession:ae=>{Z(ae),ns(ae,f.current)},onKillSession:on})]}),I.jsx("div",{"data-testid":"desktop-terminal-workspace",children:I.jsx(Vf,{activeSession:yt,activeSid:k,canControl:Ve,command:pe,pasteBuffer:xe,shortcutKeys:Pf,terminalHostRef:fi,onCommandChange:oe,onSubmitCommand:hr,onPasteBufferChange:Ne,onSendPaste:Ds,onSendKey:Oi})})]}):I.jsx("section",{className:"space-y-4",children:yt?I.jsx("div",{ref:H,"data-testid":"terminal-workspace",children:I.jsx(Vf,{activeSession:yt,activeSid:k,canControl:Ve,command:pe,pasteBuffer:xe,shortcutKeys:Pf,terminalHostRef:fi,onBack:()=>Z(null),onCommandChange:oe,onSubmitCommand:hr,onPasteBufferChange:Ne,onSendPaste:Ds,onSendKey:Oi})}):I.jsxs(I.Fragment,{children:[I.jsx(Ff,{canControl:Ve,sessions:E,filteredSessions:si,activeSid:k,pinnedSids:ee,sessionQuery:K,statusFilter:M,onSessionQueryChange:A,onStatusFilterChange:O,onTogglePinnedSession:as,onSelectSession:ae=>{Z(ae),ns(ae,f.current),cn()},onKillSession:on}),I.jsxs("details",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[I.jsx("summary",{className:"cursor-pointer list-none text-sm font-medium text-slate-200",children:"新建会话"}),I.jsx("div",{className:"mt-4",children:I.jsx(Xf,{canControl:Ve,createName:$e,createCwd:Ce,createShell:Jt,onCreateNameChange:wt,onCreateCwdChange:Zt,onCreateShellChange:ii,onSubmit:an})})]})]})}),I.jsxs("details",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[I.jsx("summary",{className:"cursor-pointer list-none text-sm font-medium text-slate-200",children:"连接与设备设置"}),I.jsx("p",{className:"mt-3 text-xs text-slate-500",children:"这里放不常用的信息和管理项。日常使用时,你主要只需要看会话列表和终端输出。"}),I.jsx("div",{className:"mt-4",children:I.jsx(Gf,{title:"连接与设备设置",wsUrl:C,wsUrlValid:bt!==null,clientToken:S,deviceId:o,deviceIdEditable:!c,pairingCode:w,pairingMessage:W,pairingPending:le,connectionPhase:g,notificationsEnabled:T,onWsUrlChange:D,onClientTokenChange:l,onDeviceIdChange:a,onPairingCodeChange:j,onRedeemPairingCode:()=>{di()},onConnect:()=>li(!0),onRefresh:()=>ct(f.current),onDisconnect:Bi,onClearBinding:ls,onToggleNotifications:()=>{ni()},showPairingSection:!1})})]})]}):I.jsxs("section",{className:"mx-auto flex w-full max-w-md flex-col gap-4",children:[I.jsxs(nn,{title:"输入配对码",children:[I.jsx("p",{className:"text-sm text-slate-400",children:"电脑上执行 `termpilot agent --relay 你的 relay 地址`,然后把命令输出的配对码填到这里。"}),I.jsxs("div",{className:"mt-4 flex gap-3",children:[I.jsx("input",{className:"flex-1 rounded-2xl border border-slate-700 bg-slate-950/60 px-4 py-3 text-base uppercase outline-none placeholder:text-slate-500 md:text-sm",value:w,onChange:ae=>j(ae.target.value),placeholder:"ABC-234"}),I.jsx("button",{className:"rounded-full bg-emerald-400 px-5 py-3 text-sm font-medium text-slate-950 disabled:opacity-60",type:"button",disabled:le||bt===null,onClick:()=>{di()},children:le?"配对中":"配对"})]}),W?I.jsx("p",{className:"mt-3 text-sm text-slate-400",children:W}):null]}),I.jsxs("details",{className:"rounded-3xl border border-slate-800/80 bg-slate-900/72 p-5 shadow-2xl shadow-slate-950/30 backdrop-blur",children:[I.jsx("summary",{className:"cursor-pointer list-none text-sm font-medium text-slate-200",children:"高级设置"}),I.jsx("div",{className:"mt-4",children:I.jsx(Gf,{title:"连接与设备设置",wsUrl:C,wsUrlValid:bt!==null,clientToken:S,deviceId:o,deviceIdEditable:!c,pairingCode:w,pairingMessage:W,pairingPending:le,connectionPhase:g,notificationsEnabled:T,onWsUrlChange:D,onClientTokenChange:l,onDeviceIdChange:a,onPairingCodeChange:j,onRedeemPairingCode:()=>{di()},onConnect:()=>li(!0),onRefresh:()=>ct(f.current),onDisconnect:Bi,onClearBinding:ls,onToggleNotifications:()=>{ni()},showPairingSection:!1})})]})]})]})}yv.createRoot(document.getElementById("root")).render(I.jsx(fv.StrictMode,{children:I.jsx(Bv,{})}));
|