zerogterm 0.2.0-alpha.2 → 0.4.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -27
- package/dist/main/main/clipboard.js +30 -0
- package/dist/main/main/main.js +8 -2
- package/dist/main/main/session-service.js +32 -44
- package/dist/main/main/shell-catalog.js +193 -0
- package/dist/main/main/ssh-inventory.js +4 -1
- package/dist/renderer/assets/{index-5pgRaxBt.css → index-DSL4JtQn.css} +1 -1
- package/dist/renderer/assets/index-x_BAzbUO.js +17 -0
- package/dist/renderer/assets/voice-worker-DoNT0zEM.js +37 -0
- package/dist/renderer/index.html +3 -3
- package/package.json +6 -2
- package/dist/renderer/assets/index-BWVjX0UX.js +0 -17
- package/dist/renderer/assets/voice-worker-Bde9NFkO.js +0 -37
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
(function(){const N=document.createElement("link").relList;if(N&&N.supports&&N.supports("modulepreload"))return;for(const re of document.querySelectorAll('link[rel="modulepreload"]'))B(re);new MutationObserver(re=>{for(const ue of re)if(ue.type==="childList")for(const $ of ue.addedNodes)$.tagName==="LINK"&&$.rel==="modulepreload"&&B($)}).observe(document,{childList:!0,subtree:!0});function z(re){const ue={};return re.integrity&&(ue.integrity=re.integrity),re.referrerPolicy&&(ue.referrerPolicy=re.referrerPolicy),re.crossOrigin==="use-credentials"?ue.credentials="include":re.crossOrigin==="anonymous"?ue.credentials="omit":ue.credentials="same-origin",ue}function B(re){if(re.ep)return;re.ep=!0;const ue=z(re);fetch(re.href,ue)}})();var _c={exports:{}},Bn={};var hd;function Zv(){if(hd)return Bn;hd=1;var R=Symbol.for("react.transitional.element"),N=Symbol.for("react.fragment");function z(B,re,ue){var $=null;if(ue!==void 0&&($=""+ue),re.key!==void 0&&($=""+re.key),"key"in re){ue={};for(var u in re)u!=="key"&&(ue[u]=re[u])}else ue=re;return re=ue.ref,{$$typeof:R,type:B,key:$,ref:re!==void 0?re:null,props:ue}}return Bn.Fragment=N,Bn.jsx=z,Bn.jsxs=z,Bn}var fd;function $v(){return fd||(fd=1,_c.exports=Zv()),_c.exports}var A=$v(),vc={exports:{}},Te={};var dd;function Qv(){if(dd)return Te;dd=1;var R=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),B=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),$=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),h=Symbol.for("react.activity"),v=Symbol.iterator;function C(x){return x===null||typeof x!="object"?null:(x=v&&x[v]||x["@@iterator"],typeof x=="function"?x:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,o={};function c(x,O,F){this.props=x,this.context=O,this.refs=o,this.updater=F||S}c.prototype.isReactComponent={},c.prototype.setState=function(x,O){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,O,"setState")},c.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function a(){}a.prototype=c.prototype;function l(x,O,F){this.props=x,this.context=O,this.refs=o,this.updater=F||S}var _=l.prototype=new a;_.constructor=l,p(_,c.prototype),_.isPureReactComponent=!0;var E=Array.isArray;function y(){}var w={H:null,A:null,T:null,S:null},m=Object.prototype.hasOwnProperty;function D(x,O,F){var se=F.ref;return{$$typeof:R,type:x,key:O,ref:se!==void 0?se:null,props:F}}function q(x,O){return D(x.type,O,x.props)}function I(x){return typeof x=="object"&&x!==null&&x.$$typeof===R}function K(x){var O={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(F){return O[F]})}var H=/\/+/g;function Q(x,O){return typeof x=="object"&&x!==null&&x.key!=null?K(""+x.key):O.toString(36)}function ce(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(y,y):(x.status="pending",x.then(function(O){x.status==="pending"&&(x.status="fulfilled",x.value=O)},function(O){x.status==="pending"&&(x.status="rejected",x.reason=O)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function G(x,O,F,se,_e){var ve=typeof x;(ve==="undefined"||ve==="boolean")&&(x=null);var Y=!1;if(x===null)Y=!0;else switch(ve){case"bigint":case"string":case"number":Y=!0;break;case"object":switch(x.$$typeof){case R:case N:Y=!0;break;case b:return Y=x._init,G(Y(x._payload),O,F,se,_e)}}if(Y)return _e=_e(x),Y=se===""?"."+Q(x,0):se,E(_e)?(F="",Y!=null&&(F=Y.replace(H,"$&/")+"/"),G(_e,O,F,"",function(fe){return fe})):_e!=null&&(I(_e)&&(_e=q(_e,F+(_e.key==null||x&&x.key===_e.key?"":(""+_e.key).replace(H,"$&/")+"/")+Y)),O.push(_e)),1;Y=0;var L=se===""?".":se+":";if(E(x))for(var te=0;te<x.length;te++)se=x[te],ve=L+Q(se,te),Y+=G(se,O,F,ve,_e);else if(te=C(x),typeof te=="function")for(x=te.call(x),te=0;!(se=x.next()).done;)se=se.value,ve=L+Q(se,te++),Y+=G(se,O,F,ve,_e);else if(ve==="object"){if(typeof x.then=="function")return G(ce(x),O,F,se,_e);throw O=String(x),Error("Objects are not valid as a React child (found: "+(O==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":O)+"). If you meant to render a collection of children, use an array instead.")}return Y}function J(x,O,F){if(x==null)return x;var se=[],_e=0;return G(x,se,"","",function(ve){return O.call(F,ve,_e++)}),se}function ee(x){if(x._status===-1){var O=x._result;O=O(),O.then(function(F){(x._status===0||x._status===-1)&&(x._status=1,x._result=F)},function(F){(x._status===0||x._status===-1)&&(x._status=2,x._result=F)}),x._status===-1&&(x._status=0,x._result=O)}if(x._status===1)return x._result.default;throw x._result}var T=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var O=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(O))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},k={map:J,forEach:function(x,O,F){J(x,function(){O.apply(this,arguments)},F)},count:function(x){var O=0;return J(x,function(){O++}),O},toArray:function(x){return J(x,function(O){return O})||[]},only:function(x){if(!I(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Te.Activity=h,Te.Children=k,Te.Component=c,Te.Fragment=z,Te.Profiler=re,Te.PureComponent=l,Te.StrictMode=B,Te.Suspense=f,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,Te.__COMPILER_RUNTIME={__proto__:null,c:function(x){return w.H.useMemoCache(x)}},Te.cache=function(x){return function(){return x.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(x,O,F){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var se=p({},x.props),_e=x.key;if(O!=null)for(ve in O.key!==void 0&&(_e=""+O.key),O)!m.call(O,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&O.ref===void 0||(se[ve]=O[ve]);var ve=arguments.length-2;if(ve===1)se.children=F;else if(1<ve){for(var Y=Array(ve),L=0;L<ve;L++)Y[L]=arguments[L+2];se.children=Y}return D(x.type,_e,se)},Te.createContext=function(x){return x={$$typeof:$,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:ue,_context:x},x},Te.createElement=function(x,O,F){var se,_e={},ve=null;if(O!=null)for(se in O.key!==void 0&&(ve=""+O.key),O)m.call(O,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(_e[se]=O[se]);var Y=arguments.length-2;if(Y===1)_e.children=F;else if(1<Y){for(var L=Array(Y),te=0;te<Y;te++)L[te]=arguments[te+2];_e.children=L}if(x&&x.defaultProps)for(se in Y=x.defaultProps,Y)_e[se]===void 0&&(_e[se]=Y[se]);return D(x,ve,_e)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(x){return{$$typeof:u,render:x}},Te.isValidElement=I,Te.lazy=function(x){return{$$typeof:b,_payload:{_status:-1,_result:x},_init:ee}},Te.memo=function(x,O){return{$$typeof:d,type:x,compare:O===void 0?null:O}},Te.startTransition=function(x){var O=w.T,F={};w.T=F;try{var se=x(),_e=w.S;_e!==null&&_e(F,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(y,T)}catch(ve){T(ve)}finally{O!==null&&F.types!==null&&(O.types=F.types),w.T=O}},Te.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},Te.use=function(x){return w.H.use(x)},Te.useActionState=function(x,O,F){return w.H.useActionState(x,O,F)},Te.useCallback=function(x,O){return w.H.useCallback(x,O)},Te.useContext=function(x){return w.H.useContext(x)},Te.useDebugValue=function(){},Te.useDeferredValue=function(x,O){return w.H.useDeferredValue(x,O)},Te.useEffect=function(x,O){return w.H.useEffect(x,O)},Te.useEffectEvent=function(x){return w.H.useEffectEvent(x)},Te.useId=function(){return w.H.useId()},Te.useImperativeHandle=function(x,O,F){return w.H.useImperativeHandle(x,O,F)},Te.useInsertionEffect=function(x,O){return w.H.useInsertionEffect(x,O)},Te.useLayoutEffect=function(x,O){return w.H.useLayoutEffect(x,O)},Te.useMemo=function(x,O){return w.H.useMemo(x,O)},Te.useOptimistic=function(x,O){return w.H.useOptimistic(x,O)},Te.useReducer=function(x,O,F){return w.H.useReducer(x,O,F)},Te.useRef=function(x){return w.H.useRef(x)},Te.useState=function(x){return w.H.useState(x)},Te.useSyncExternalStore=function(x,O,F){return w.H.useSyncExternalStore(x,O,F)},Te.useTransition=function(){return w.H.useTransition()},Te.version="19.2.8",Te}var _d;function Tc(){return _d||(_d=1,vc.exports=Qv()),vc.exports}var ge=Tc(),mc={exports:{}},kn={},pc={exports:{}},gc={};var vd;function Jv(){return vd||(vd=1,(function(R){function N(G,J){var ee=G.length;G.push(J);e:for(;0<ee;){var T=ee-1>>>1,k=G[T];if(0<re(k,J))G[T]=J,G[ee]=k,ee=T;else break e}}function z(G){return G.length===0?null:G[0]}function B(G){if(G.length===0)return null;var J=G[0],ee=G.pop();if(ee!==J){G[0]=ee;e:for(var T=0,k=G.length,x=k>>>1;T<x;){var O=2*(T+1)-1,F=G[O],se=O+1,_e=G[se];if(0>re(F,ee))se<k&&0>re(_e,F)?(G[T]=_e,G[se]=ee,T=se):(G[T]=F,G[O]=ee,T=O);else if(se<k&&0>re(_e,ee))G[T]=_e,G[se]=ee,T=se;else break e}}return J}function re(G,J){var ee=G.sortIndex-J.sortIndex;return ee!==0?ee:G.id-J.id}if(R.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ue=performance;R.unstable_now=function(){return ue.now()}}else{var $=Date,u=$.now();R.unstable_now=function(){return $.now()-u}}var f=[],d=[],b=1,h=null,v=3,C=!1,S=!1,p=!1,o=!1,c=typeof setTimeout=="function"?setTimeout:null,a=typeof clearTimeout=="function"?clearTimeout:null,l=typeof setImmediate<"u"?setImmediate:null;function _(G){for(var J=z(d);J!==null;){if(J.callback===null)B(d);else if(J.startTime<=G)B(d),J.sortIndex=J.expirationTime,N(f,J);else break;J=z(d)}}function E(G){if(p=!1,_(G),!S)if(z(f)!==null)S=!0,y||(y=!0,K());else{var J=z(d);J!==null&&ce(E,J.startTime-G)}}var y=!1,w=-1,m=5,D=-1;function q(){return o?!0:!(R.unstable_now()-D<m)}function I(){if(o=!1,y){var G=R.unstable_now();D=G;var J=!0;try{e:{S=!1,p&&(p=!1,a(w),w=-1),C=!0;var ee=v;try{t:{for(_(G),h=z(f);h!==null&&!(h.expirationTime>G&&q());){var T=h.callback;if(typeof T=="function"){h.callback=null,v=h.priorityLevel;var k=T(h.expirationTime<=G);if(G=R.unstable_now(),typeof k=="function"){h.callback=k,_(G),J=!0;break t}h===z(f)&&B(f),_(G)}else B(f);h=z(f)}if(h!==null)J=!0;else{var x=z(d);x!==null&&ce(E,x.startTime-G),J=!1}}break e}finally{h=null,v=ee,C=!1}J=void 0}}finally{J?K():y=!1}}}var K;if(typeof l=="function")K=function(){l(I)};else if(typeof MessageChannel<"u"){var H=new MessageChannel,Q=H.port2;H.port1.onmessage=I,K=function(){Q.postMessage(null)}}else K=function(){c(I,0)};function ce(G,J){w=c(function(){G(R.unstable_now())},J)}R.unstable_IdlePriority=5,R.unstable_ImmediatePriority=1,R.unstable_LowPriority=4,R.unstable_NormalPriority=3,R.unstable_Profiling=null,R.unstable_UserBlockingPriority=2,R.unstable_cancelCallback=function(G){G.callback=null},R.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):m=0<G?Math.floor(1e3/G):5},R.unstable_getCurrentPriorityLevel=function(){return v},R.unstable_next=function(G){switch(v){case 1:case 2:case 3:var J=3;break;default:J=v}var ee=v;v=J;try{return G()}finally{v=ee}},R.unstable_requestPaint=function(){o=!0},R.unstable_runWithPriority=function(G,J){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var ee=v;v=G;try{return J()}finally{v=ee}},R.unstable_scheduleCallback=function(G,J,ee){var T=R.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?T+ee:T):ee=T,G){case 1:var k=-1;break;case 2:k=250;break;case 5:k=1073741823;break;case 4:k=1e4;break;default:k=5e3}return k=ee+k,G={id:b++,callback:J,priorityLevel:G,startTime:ee,expirationTime:k,sortIndex:-1},ee>T?(G.sortIndex=ee,N(d,G),z(f)===null&&G===z(d)&&(p?(a(w),w=-1):p=!0,ce(E,ee-T))):(G.sortIndex=k,N(f,G),S||C||(S=!0,y||(y=!0,K()))),G},R.unstable_shouldYield=q,R.unstable_wrapCallback=function(G){var J=v;return function(){var ee=v;v=J;try{return G.apply(this,arguments)}finally{v=ee}}}})(gc)),gc}var md;function em(){return md||(md=1,pc.exports=Jv()),pc.exports}var Sc={exports:{}},kt={};var pd;function tm(){if(pd)return kt;pd=1;var R=Tc();function N(f){var d="https://react.dev/errors/"+f;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)d+="&args[]="+encodeURIComponent(arguments[b])}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 z(){}var B={d:{f:z,r:function(){throw Error(N(522))},D:z,C:z,L:z,m:z,X:z,S:z,M:z},p:0,findDOMNode:null},re=Symbol.for("react.portal");function ue(f,d,b){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:re,key:h==null?null:""+h,children:f,containerInfo:d,implementation:b}}var $=R.__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 kt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=B,kt.createPortal=function(f,d){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(N(299));return ue(f,d,null,b)},kt.flushSync=function(f){var d=$.T,b=B.p;try{if($.T=null,B.p=2,f)return f()}finally{$.T=d,B.p=b,B.d.f()}},kt.preconnect=function(f,d){typeof f=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,B.d.C(f,d))},kt.prefetchDNS=function(f){typeof f=="string"&&B.d.D(f)},kt.preinit=function(f,d){if(typeof f=="string"&&d&&typeof d.as=="string"){var b=d.as,h=u(b,d.crossOrigin),v=typeof d.integrity=="string"?d.integrity:void 0,C=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;b==="style"?B.d.S(f,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:h,integrity:v,fetchPriority:C}):b==="script"&&B.d.X(f,{crossOrigin:h,integrity:v,fetchPriority:C,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},kt.preinitModule=function(f,d){if(typeof f=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var b=u(d.as,d.crossOrigin);B.d.M(f,{crossOrigin:b,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&B.d.M(f)},kt.preload=function(f,d){if(typeof f=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var b=d.as,h=u(b,d.crossOrigin);B.d.L(f,b,{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})}},kt.preloadModule=function(f,d){if(typeof f=="string")if(d){var b=u(d.as,d.crossOrigin);B.d.m(f,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:b,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else B.d.m(f)},kt.requestFormReset=function(f){B.d.r(f)},kt.unstable_batchedUpdates=function(f,d){return f(d)},kt.useFormState=function(f,d,b){return $.H.useFormState(f,d,b)},kt.useFormStatus=function(){return $.H.useHostTransitionStatus()},kt.version="19.2.8",kt}var gd;function im(){if(gd)return Sc.exports;gd=1;function R(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(R)}catch(N){console.error(N)}}return R(),Sc.exports=tm(),Sc.exports}var Sd;function sm(){if(Sd)return kn;Sd=1;var R=em(),N=Tc(),z=im();function B(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 re(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ue(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 $(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(ue(e)!==e)throw Error(B(188))}function d(e){var t=e.alternate;if(!t){if(t=ue(e),t===null)throw Error(B(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(B(188))}if(i.return!==s.return)i=r,s=n;else{for(var g=!1,M=r.child;M;){if(M===i){g=!0,i=r,s=n;break}if(M===s){g=!0,s=r,i=n;break}M=M.sibling}if(!g){for(M=n.child;M;){if(M===i){g=!0,i=n,s=r;break}if(M===s){g=!0,s=n,i=r;break}M=M.sibling}if(!g)throw Error(B(189))}}if(i.alternate!==s)throw Error(B(190))}if(i.tag!==3)throw Error(B(188));return i.stateNode.current===i?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,v=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),S=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),a=Symbol.for("react.consumer"),l=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),y=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function K(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var H=Symbol.for("react.client.reference");function Q(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===H?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case p:return"Fragment";case c:return"Profiler";case o:return"StrictMode";case E:return"Suspense";case y:return"SuspenseList";case D:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case S:return"Portal";case l:return e.displayName||"Context";case a:return(e._context.displayName||"Context")+".Consumer";case _:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case w:return t=e.displayName||null,t!==null?t:Q(e.type)||"Memo";case m:t=e._payload,e=e._init;try{return Q(e(t))}catch{}}return null}var ce=Array.isArray,G=N.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=z.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},T=[],k=-1;function x(e){return{current:e}}function O(e){0>k||(e.current=T[k],T[k]=null,k--)}function F(e,t){k++,T[k]=e.current,e.current=t}var se=x(null),_e=x(null),ve=x(null),Y=x(null);function L(e,t){switch(F(ve,t),F(_e,e),F(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kf(t),e=Hf(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}O(se),F(se,e)}function te(){O(se),O(_e),O(ve)}function fe(e){e.memoizedState!==null&&F(Y,e);var t=se.current,i=Hf(t,e.type);t!==i&&(F(_e,e),F(se,i))}function pe(e){_e.current===e&&(O(se),O(_e)),Y.current===e&&(O(Y),Rn._currentValue=ee)}var me,De;function je(e){if(me===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);me=t&&t[1]||"",De=-1<i.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+me+e+De}var ze=!1;function st(e,t){if(!e||ze)return"";ze=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ie){var Z=ie}Reflect.construct(e,[],he)}else{try{he.call()}catch(ie){Z=ie}e.call(he.prototype)}}else{try{throw Error()}catch(ie){Z=ie}(he=e())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ie){if(ie&&Z&&typeof ie.stack=="string")return[ie.stack,Z.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(),g=n[0],M=n[1];if(g&&M){var U=g.split(`
|
|
4
|
+
`),X=M.split(`
|
|
5
|
+
`);for(r=s=0;s<U.length&&!U[s].includes("DetermineComponentFrameRoot");)s++;for(;r<X.length&&!X[r].includes("DetermineComponentFrameRoot");)r++;if(s===U.length||r===X.length)for(s=U.length-1,r=X.length-1;1<=s&&0<=r&&U[s]!==X[r];)r--;for(;1<=s&&0<=r;s--,r--)if(U[s]!==X[r]){if(s!==1||r!==1)do if(s--,r--,0>r||U[s]!==X[r]){var ne=`
|
|
6
|
+
`+U[s].replace(" at new "," at ");return e.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",e.displayName)),ne}while(1<=s&&0<=r);break}}}finally{ze=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?je(i):""}function Ee(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je("Lazy");case 13:return e.child!==t&&t!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return st(e.type,!1);case 11:return st(e.type.render,!1);case 1:return st(e.type,!0);case 31:return je("Activity");default:return""}}function Ht(e){try{var t="",i=null;do t+=Ee(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
7
|
+
Error generating stack: `+s.message+`
|
|
8
|
+
`+s.stack}}var ti=Object.prototype.hasOwnProperty,Mt=R.unstable_scheduleCallback,ii=R.unstable_cancelCallback,_i=R.unstable_shouldYield,pt=R.unstable_requestPaint,at=R.unstable_now,gt=R.unstable_getCurrentPriorityLevel,vi=R.unstable_ImmediatePriority,Ti=R.unstable_UserBlockingPriority,Et=R.unstable_NormalPriority,Zi=R.unstable_LowPriority,Nt=R.unstable_IdlePriority,yi=R.log,Pe=R.unstable_setDisableYieldValue,Ut=null,Lt=null;function mi(e){if(typeof yi=="function"&&Pe(e),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(Ut,e)}catch{}}var wt=Math.clz32?Math.clz32:nl,Mc=Math.log,Nn=Math.LN2;function nl(e){return e>>>=0,e===0?32:31-(Mc(e)/Nn|0)|0}var Js=256,er=262144,tr=4194304;function Ri(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 ir(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var r=0,n=e.suspendedLanes,g=e.pingedLanes;e=e.warmLanes;var M=s&134217727;return M!==0?(s=M&~n,s!==0?r=Ri(s):(g&=M,g!==0?r=Ri(g):i||(i=M&~e,i!==0&&(r=Ri(i))))):(M=s&~n,M!==0?r=Ri(M):g!==0?r=Ri(g):i||(i=s&~e,i!==0&&(r=Ri(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 $i(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function al(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 Ot(){var e=tr;return tr<<=1,(tr&62914560)===0&&(tr=4194304),e}function Ue(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function si(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function sr(e,t,i,s,r,n){var g=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 M=e.entanglements,U=e.expirationTimes,X=e.hiddenUpdates;for(i=g&~i;0<i;){var ne=31-wt(i),he=1<<ne;M[ne]=0,U[ne]=-1;var Z=X[ne];if(Z!==null)for(X[ne]=null,ne=0;ne<Z.length;ne++){var ie=Z[ne];ie!==null&&(ie.lane&=-536870913)}i&=~he}s!==0&&Mi(e,s,0),n!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=n&~(g&~t))}function Mi(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-wt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function jn(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-wt(i),r=1<<s;r&t|e[s]&t&&(e[s]|=t),i&=~r}}function yt(e,t){var i=t&-t;return i=(i&42)!==0?1:qr(i),(i&(e.suspendedLanes|t))!==0?0:i}function qr(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 Ir(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function jt(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:rd(e.type))}function Wt(e,t){var i=J.p;try{return J.p=e,t()}finally{J.p=i}}var Ci=Math.random().toString(36).slice(2),St="__reactFiber$"+Ci,Bt="__reactProps$"+Ci,Li="__reactContainer$"+Ci,rr="__reactEvents$"+Ci,zn="__reactListeners$"+Ci,Qi="__reactHandles$"+Ci,Ls="__reactResources$"+Ci,Os="__reactMarker$"+Ci;function Gr(e){delete e[St],delete e[Bt],delete e[rr],delete e[zn],delete e[Qi]}function Ji(e){var t=e[St];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Li]||i[St]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=Gf(e);e!==null;){if(i=e[St])return i;e=Gf(e)}return t}e=i,i=e.parentNode}return null}function Oi(e){if(e=e[St]||e[Li]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function es(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(B(33))}function ts(e){var t=e[Ls];return t||(t=e[Ls]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ct(e){e[Os]=!0}var Pr=new Set,Un={};function Ei(e,t){is(e,t),is(e+"Capture",t)}function is(e,t){for(Un[e]=t,e=0;e<t.length;e++)Pr.add(t[e])}var ll=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]*$"),j={},ae={};function le(e){return ti.call(ae,e)?!0:ti.call(j,e)?!1:ll.test(e)?ae[e]=!0:(j[e]=!0,!1)}function de(e,t,i){if(le(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 we(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 ye(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 xe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Je(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ye(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(g){i=""+g,n.call(this,g)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(g){i=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function He(e){if(!e._valueTracker){var t=Je(e)?"checked":"value";e._valueTracker=Ye(e,t,""+e[t])}}function ri(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=Je(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function et(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 Bs=/[\n"\\]/g;function $e(e){return e.replace(Bs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ss(e,t,i,s,r,n,g,M){e.name="",g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"?e.type=g:e.removeAttribute("type"),t!=null?g==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xe(t)):e.value!==""+xe(t)&&(e.value=""+xe(t)):g!=="submit"&&g!=="reset"||e.removeAttribute("value"),t!=null?ns(e,g,xe(t)):i!=null?ns(e,g,xe(i)):s!=null&&e.removeAttribute("value"),r==null&&n!=null&&(e.defaultChecked=!!n),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),M!=null&&typeof M!="function"&&typeof M!="symbol"&&typeof M!="boolean"?e.name=""+xe(M):e.removeAttribute("name")}function rs(e,t,i,s,r,n,g,M){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)){He(e);return}i=i!=null?""+xe(i):"",t=t!=null?""+xe(t):i,M||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=M?e.checked:!!s,e.defaultChecked=!!s,g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.name=g),He(e)}function ns(e,t,i){t==="number"&&et(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function as(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=""+xe(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 ol(e,t,i){if(t!=null&&(t=""+xe(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+xe(i):""}function ni(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(B(92));if(ce(s)){if(1<s.length)throw Error(B(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=xe(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),He(e)}function ls(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Yr=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 ks(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||Yr.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function Lc(e,t,i){if(t!=null&&typeof t!="object")throw Error(B(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&&ks(e,r,s)}else for(var n in t)t.hasOwnProperty(n)&&ks(e,n,t[n])}function cl(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 Wd=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"]]),Fd=/^[\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 qn(e){return Fd.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Bi(){}var ul=null;function hl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nr=null,ar=null;function Oc(e){var t=Oi(e);if(t&&(e=t.stateNode)){var i=e[Bt]||null;e:switch(e=t.stateNode,t.type){case"input":if(ss(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="'+$e(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var r=s[Bt]||null;if(!r)throw Error(B(90));ss(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&&ri(s)}break e;case"textarea":ol(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&as(e,!!i.multiple,t,!1)}}}var fl=!1;function Bc(e,t,i){if(fl)return e(t,i);fl=!0;try{var s=e(t);return s}finally{if(fl=!1,(nr!==null||ar!==null)&&(Da(),nr&&(t=nr,e=ar,ar=nr=null,Oc(t),e)))for(t=0;t<e.length;t++)Oc(e[t])}}function Kr(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Bt]||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(B(231,t,typeof i));return i}var ki=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dl=!1;if(ki)try{var Wr={};Object.defineProperty(Wr,"passive",{get:function(){dl=!0}}),window.addEventListener("test",Wr,Wr),window.removeEventListener("test",Wr,Wr)}catch{dl=!1}var os=null,_l=null,In=null;function kc(){if(In)return In;var e,t=_l,i=t.length,s,r="value"in os?os.value:os.textContent,n=r.length;for(e=0;e<i&&t[e]===r[e];e++);var g=i-e;for(s=1;s<=g&&t[i-s]===r[n-s];s++);return In=r.slice(e,1<s?1-s:void 0)}function Gn(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 Pn(){return!0}function Hc(){return!1}function qt(e){function t(i,s,r,n,g){this._reactName=i,this._targetInst=r,this.type=s,this.nativeEvent=n,this.target=g,this.currentTarget=null;for(var M in e)e.hasOwnProperty(M)&&(i=e[M],this[M]=i?i(n):n[M]);return this.isDefaultPrevented=(n.defaultPrevented!=null?n.defaultPrevented:n.returnValue===!1)?Pn:Hc,this.isPropagationStopped=Hc,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=Pn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Hs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Yn=qt(Hs),Fr=h({},Hs,{view:0,detail:0}),Vd=qt(Fr),vl,ml,Vr,Kn=h({},Fr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gl,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!==Vr&&(Vr&&e.type==="mousemove"?(vl=e.screenX-Vr.screenX,ml=e.screenY-Vr.screenY):ml=vl=0,Vr=e),vl)},movementY:function(e){return"movementY"in e?e.movementY:ml}}),Nc=qt(Kn),Xd=h({},Kn,{dataTransfer:0}),Zd=qt(Xd),$d=h({},Fr,{relatedTarget:0}),pl=qt($d),Qd=h({},Hs,{animationName:0,elapsedTime:0,pseudoElement:0}),Jd=qt(Qd),e_=h({},Hs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),t_=qt(e_),i_=h({},Hs,{data:0}),jc=qt(i_),s_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r_={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"},n_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function a_(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=n_[e])?!!t[e]:!1}function gl(){return a_}var l_=h({},Fr,{key:function(e){if(e.key){var t=s_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Gn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gl,charCode:function(e){return e.type==="keypress"?Gn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Gn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),o_=qt(l_),c_=h({},Kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zc=qt(c_),u_=h({},Fr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gl}),h_=qt(u_),f_=h({},Hs,{propertyName:0,elapsedTime:0,pseudoElement:0}),d_=qt(f_),__=h({},Kn,{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}),v_=qt(__),m_=h({},Hs,{newState:0,oldState:0}),p_=qt(m_),g_=[9,13,27,32],Sl=ki&&"CompositionEvent"in window,Xr=null;ki&&"documentMode"in document&&(Xr=document.documentMode);var S_=ki&&"TextEvent"in window&&!Xr,Uc=ki&&(!Sl||Xr&&8<Xr&&11>=Xr),qc=" ",Ic=!1;function Gc(e,t){switch(e){case"keyup":return g_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Pc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var lr=!1;function b_(e,t){switch(e){case"compositionend":return Pc(t);case"keypress":return t.which!==32?null:(Ic=!0,qc);case"textInput":return e=t.data,e===qc&&Ic?null:e;default:return null}}function y_(e,t){if(lr)return e==="compositionend"||!Sl&&Gc(e,t)?(e=kc(),In=_l=os=null,lr=!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 Uc&&t.locale!=="ko"?null:t.data;default:return null}}var C_={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 Yc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!C_[e.type]:t==="textarea"}function Kc(e,t,i,s){nr?ar?ar.push(s):ar=[s]:nr=s,t=ka(t,"onChange"),0<t.length&&(i=new Yn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var Zr=null,$r=null;function E_(e){Tf(e,0)}function Wn(e){var t=es(e);if(ri(t))return e}function Wc(e,t){if(e==="change")return t}var Fc=!1;if(ki){var bl;if(ki){var yl="oninput"in document;if(!yl){var Vc=document.createElement("div");Vc.setAttribute("oninput","return;"),yl=typeof Vc.oninput=="function"}bl=yl}else bl=!1;Fc=bl&&(!document.documentMode||9<document.documentMode)}function Xc(){Zr&&(Zr.detachEvent("onpropertychange",Zc),$r=Zr=null)}function Zc(e){if(e.propertyName==="value"&&Wn($r)){var t=[];Kc(t,$r,e,hl(e)),Bc(E_,t)}}function w_(e,t,i){e==="focusin"?(Xc(),Zr=t,$r=i,Zr.attachEvent("onpropertychange",Zc)):e==="focusout"&&Xc()}function x_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wn($r)}function A_(e,t){if(e==="click")return Wn(t)}function D_(e,t){if(e==="input"||e==="change")return Wn(t)}function T_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ft=typeof Object.is=="function"?Object.is:T_;function Qr(e,t){if(Ft(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(!ti.call(t,r)||!Ft(e[r],t[r]))return!1}return!0}function $c(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qc(e,t){var i=$c(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=$c(i)}}function Jc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Jc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function eu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=et(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=et(e.document)}return t}function Cl(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 R_=ki&&"documentMode"in document&&11>=document.documentMode,or=null,El=null,Jr=null,wl=!1;function tu(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;wl||or==null||or!==et(s)||(s=or,"selectionStart"in s&&Cl(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}),Jr&&Qr(Jr,s)||(Jr=s,s=ka(El,"onSelect"),0<s.length&&(t=new Yn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=or)))}function Ns(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var cr={animationend:Ns("Animation","AnimationEnd"),animationiteration:Ns("Animation","AnimationIteration"),animationstart:Ns("Animation","AnimationStart"),transitionrun:Ns("Transition","TransitionRun"),transitionstart:Ns("Transition","TransitionStart"),transitioncancel:Ns("Transition","TransitionCancel"),transitionend:Ns("Transition","TransitionEnd")},xl={},iu={};ki&&(iu=document.createElement("div").style,"AnimationEvent"in window||(delete cr.animationend.animation,delete cr.animationiteration.animation,delete cr.animationstart.animation),"TransitionEvent"in window||delete cr.transitionend.transition);function js(e){if(xl[e])return xl[e];if(!cr[e])return e;var t=cr[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in iu)return xl[e]=t[i];return e}var su=js("animationend"),ru=js("animationiteration"),nu=js("animationstart"),M_=js("transitionrun"),L_=js("transitionstart"),O_=js("transitioncancel"),au=js("transitionend"),lu=new Map,Al="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(" ");Al.push("scrollEnd");function pi(e,t){lu.set(e,t),Ei(t,[e])}var Fn=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)},ai=[],ur=0,Dl=0;function Vn(){for(var e=ur,t=Dl=ur=0;t<e;){var i=ai[t];ai[t++]=null;var s=ai[t];ai[t++]=null;var r=ai[t];ai[t++]=null;var n=ai[t];if(ai[t++]=null,s!==null&&r!==null){var g=s.pending;g===null?r.next=r:(r.next=g.next,g.next=r),s.pending=r}n!==0&&ou(i,r,n)}}function Xn(e,t,i,s){ai[ur++]=e,ai[ur++]=t,ai[ur++]=i,ai[ur++]=s,Dl|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function Tl(e,t,i,s){return Xn(e,t,i,s),Zn(e)}function zs(e,t){return Xn(e,null,null,t),Zn(e)}function ou(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-wt(i),e=n.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=i|536870912),n):null}function Zn(e){if(50<Cn)throw Cn=0,zo=null,Error(B(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var hr={};function B_(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 Vt(e,t,i,s){return new B_(e,t,i,s)}function Rl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Hi(e,t){var i=e.alternate;return i===null?(i=Vt(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 cu(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 $n(e,t,i,s,r,n){var g=0;if(s=e,typeof e=="function")Rl(e)&&(g=1);else if(typeof e=="string")g=zv(e,i,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case D:return e=Vt(31,i,t,r),e.elementType=D,e.lanes=n,e;case p:return Us(i.children,r,n,t);case o:g=8,r|=24;break;case c:return e=Vt(12,i,t,r|2),e.elementType=c,e.lanes=n,e;case E:return e=Vt(13,i,t,r),e.elementType=E,e.lanes=n,e;case y:return e=Vt(19,i,t,r),e.elementType=y,e.lanes=n,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case l:g=10;break e;case a:g=9;break e;case _:g=11;break e;case w:g=14;break e;case m:g=16,s=null;break e}g=29,i=Error(B(130,e===null?"null":typeof e,"")),s=null}return t=Vt(g,i,t,r),t.elementType=e,t.type=s,t.lanes=n,t}function Us(e,t,i,s){return e=Vt(7,e,s,t),e.lanes=i,e}function Ml(e,t,i){return e=Vt(6,e,null,t),e.lanes=i,e}function uu(e){var t=Vt(18,null,null,0);return t.stateNode=e,t}function Ll(e,t,i){return t=Vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var hu=new WeakMap;function li(e,t){if(typeof e=="object"&&e!==null){var i=hu.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Ht(t)},hu.set(e,t),t)}return{value:e,source:t,stack:Ht(t)}}var fr=[],dr=0,Qn=null,en=0,oi=[],ci=0,cs=null,wi=1,xi="";function Ni(e,t){fr[dr++]=en,fr[dr++]=Qn,Qn=e,en=t}function fu(e,t,i){oi[ci++]=wi,oi[ci++]=xi,oi[ci++]=cs,cs=e;var s=wi;e=xi;var r=32-wt(s)-1;s&=~(1<<r),i+=1;var n=32-wt(t)+r;if(30<n){var g=r-r%5;n=(s&(1<<g)-1).toString(32),s>>=g,r-=g,wi=1<<32-wt(t)+r|i<<r|s,xi=n+e}else wi=1<<n|i<<r|s,xi=e}function Ol(e){e.return!==null&&(Ni(e,1),fu(e,1,0))}function Bl(e){for(;e===Qn;)Qn=fr[--dr],fr[dr]=null,en=fr[--dr],fr[dr]=null;for(;e===cs;)cs=oi[--ci],oi[ci]=null,xi=oi[--ci],oi[ci]=null,wi=oi[--ci],oi[ci]=null}function du(e,t){oi[ci++]=wi,oi[ci++]=xi,oi[ci++]=cs,wi=t.id,xi=t.overflow,cs=e}var xt=null,tt=null,Ne=!1,us=null,ui=!1,kl=Error(B(519));function hs(e){var t=Error(B(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw tn(li(t,e)),kl}function _u(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[St]=e,t[Bt]=s,i){case"dialog":Oe("cancel",t),Oe("close",t);break;case"iframe":case"object":case"embed":Oe("load",t);break;case"video":case"audio":for(i=0;i<wn.length;i++)Oe(wn[i],t);break;case"source":Oe("error",t);break;case"img":case"image":case"link":Oe("error",t),Oe("load",t);break;case"details":Oe("toggle",t);break;case"input":Oe("invalid",t),rs(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Oe("invalid",t);break;case"textarea":Oe("invalid",t),ni(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||Of(t.textContent,i)?(s.popover!=null&&(Oe("beforetoggle",t),Oe("toggle",t)),s.onScroll!=null&&Oe("scroll",t),s.onScrollEnd!=null&&Oe("scrollend",t),s.onClick!=null&&(t.onclick=Bi),t=!0):t=!1,t||hs(e,!0)}function vu(e){for(xt=e.return;xt;)switch(xt.tag){case 5:case 31:case 13:ui=!1;return;case 27:case 3:ui=!0;return;default:xt=xt.return}}function _r(e){if(e!==xt)return!1;if(!Ne)return vu(e),Ne=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Jo(e.type,e.memoizedProps)),i=!i),i&&tt&&hs(e),vu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));tt=If(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(317));tt=If(e)}else t===27?(t=tt,xs(e.type)?(e=rc,rc=null,tt=e):tt=t):tt=xt?fi(e.stateNode.nextSibling):null;return!0}function qs(){tt=xt=null,Ne=!1}function Hl(){var e=us;return e!==null&&(Yt===null?Yt=e:Yt.push.apply(Yt,e),us=null),e}function tn(e){us===null?us=[e]:us.push(e)}var Nl=x(null),Is=null,ji=null;function fs(e,t,i){F(Nl,t._currentValue),t._currentValue=i}function zi(e){e._currentValue=Nl.current,O(Nl)}function jl(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 zl(e,t,i,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var n=r.dependencies;if(n!==null){var g=r.child;n=n.firstContext;e:for(;n!==null;){var M=n;n=r;for(var U=0;U<t.length;U++)if(M.context===t[U]){n.lanes|=i,M=n.alternate,M!==null&&(M.lanes|=i),jl(n.return,i,e),s||(g=null);break e}n=M.next}}else if(r.tag===18){if(g=r.return,g===null)throw Error(B(341));g.lanes|=i,n=g.alternate,n!==null&&(n.lanes|=i),jl(g,i,e),g=null}else g=r.child;if(g!==null)g.return=r;else for(g=r;g!==null;){if(g===e){g=null;break}if(r=g.sibling,r!==null){r.return=g.return,g=r;break}g=g.return}r=g}}function vr(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 g=r.alternate;if(g===null)throw Error(B(387));if(g=g.memoizedProps,g!==null){var M=r.type;Ft(r.pendingProps.value,g.value)||(e!==null?e.push(M):e=[M])}}else if(r===Y.current){if(g=r.alternate,g===null)throw Error(B(387));g.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Rn):e=[Rn])}r=r.return}e!==null&&zl(t,e,i,s),t.flags|=262144}function Jn(e){for(e=e.firstContext;e!==null;){if(!Ft(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Gs(e){Is=e,ji=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return mu(Is,e)}function ea(e,t){return Is===null&&Gs(e),mu(e,t)}function mu(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},ji===null){if(e===null)throw Error(B(308));ji=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ji=ji.next=t;return i}var k_=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()})}},H_=R.unstable_scheduleCallback,N_=R.unstable_NormalPriority,ft={$$typeof:l,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ul(){return{controller:new k_,data:new Map,refCount:0}}function sn(e){e.refCount--,e.refCount===0&&H_(N_,function(){e.controller.abort()})}var rn=null,ql=0,mr=0,pr=null;function j_(e,t){if(rn===null){var i=rn=[];ql=0,mr=Yo(),pr={status:"pending",value:void 0,then:function(s){i.push(s)}}}return ql++,t.then(pu,pu),t}function pu(){if(--ql===0&&rn!==null){pr!==null&&(pr.status="fulfilled");var e=rn;rn=null,mr=0,pr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function z_(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 gu=G.S;G.S=function(e,t){tf=at(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&j_(e,t),gu!==null&&gu(e,t)};var Ps=x(null);function Il(){var e=Ps.current;return e!==null?e:Ze.pooledCache}function ta(e,t){t===null?F(Ps,Ps.current):F(Ps,t.pool)}function Su(){var e=Il();return e===null?null:{parent:ft._currentValue,pool:e}}var gr=Error(B(460)),Gl=Error(B(474)),ia=Error(B(542)),sa={then:function(){}};function bu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function yu(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Bi,Bi),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Eu(e),e;default:if(typeof t.status=="string")t.then(Bi,Bi);else{if(e=Ze,e!==null&&100<e.shellSuspendCounter)throw Error(B(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,Eu(e),e}throw Ks=t,gr}}function Ys(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Ks=i,gr):i}}var Ks=null;function Cu(){if(Ks===null)throw Error(B(459));var e=Ks;return Ks=null,e}function Eu(e){if(e===gr||e===ia)throw Error(B(483))}var Sr=null,nn=0;function ra(e){var t=nn;return nn+=1,Sr===null&&(Sr=[]),yu(Sr,e,t)}function an(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function na(e,t){throw t.$$typeof===v?Error(B(525)):(e=Object.prototype.toString.call(t),Error(B(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wu(e){function t(W,P){if(e){var V=W.deletions;V===null?(W.deletions=[P],W.flags|=16):V.push(P)}}function i(W,P){if(!e)return null;for(;P!==null;)t(W,P),P=P.sibling;return null}function s(W){for(var P=new Map;W!==null;)W.key!==null?P.set(W.key,W):P.set(W.index,W),W=W.sibling;return P}function r(W,P){return W=Hi(W,P),W.index=0,W.sibling=null,W}function n(W,P,V){return W.index=V,e?(V=W.alternate,V!==null?(V=V.index,V<P?(W.flags|=67108866,P):V):(W.flags|=67108866,P)):(W.flags|=1048576,P)}function g(W){return e&&W.alternate===null&&(W.flags|=67108866),W}function M(W,P,V,oe){return P===null||P.tag!==6?(P=Ml(V,W.mode,oe),P.return=W,P):(P=r(P,V),P.return=W,P)}function U(W,P,V,oe){var Ce=V.type;return Ce===p?ne(W,P,V.props.children,oe,V.key):P!==null&&(P.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===m&&Ys(Ce)===P.type)?(P=r(P,V.props),an(P,V),P.return=W,P):(P=$n(V.type,V.key,V.props,null,W.mode,oe),an(P,V),P.return=W,P)}function X(W,P,V,oe){return P===null||P.tag!==4||P.stateNode.containerInfo!==V.containerInfo||P.stateNode.implementation!==V.implementation?(P=Ll(V,W.mode,oe),P.return=W,P):(P=r(P,V.children||[]),P.return=W,P)}function ne(W,P,V,oe,Ce){return P===null||P.tag!==7?(P=Us(V,W.mode,oe,Ce),P.return=W,P):(P=r(P,V),P.return=W,P)}function he(W,P,V){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Ml(""+P,W.mode,V),P.return=W,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case C:return V=$n(P.type,P.key,P.props,null,W.mode,V),an(V,P),V.return=W,V;case S:return P=Ll(P,W.mode,V),P.return=W,P;case m:return P=Ys(P),he(W,P,V)}if(ce(P)||K(P))return P=Us(P,W.mode,V,null),P.return=W,P;if(typeof P.then=="function")return he(W,ra(P),V);if(P.$$typeof===l)return he(W,ea(W,P),V);na(W,P)}return null}function Z(W,P,V,oe){var Ce=P!==null?P.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Ce!==null?null:M(W,P,""+V,oe);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case C:return V.key===Ce?U(W,P,V,oe):null;case S:return V.key===Ce?X(W,P,V,oe):null;case m:return V=Ys(V),Z(W,P,V,oe)}if(ce(V)||K(V))return Ce!==null?null:ne(W,P,V,oe,null);if(typeof V.then=="function")return Z(W,P,ra(V),oe);if(V.$$typeof===l)return Z(W,P,ea(W,V),oe);na(W,V)}return null}function ie(W,P,V,oe,Ce){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return W=W.get(V)||null,M(P,W,""+oe,Ce);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case C:return W=W.get(oe.key===null?V:oe.key)||null,U(P,W,oe,Ce);case S:return W=W.get(oe.key===null?V:oe.key)||null,X(P,W,oe,Ce);case m:return oe=Ys(oe),ie(W,P,V,oe,Ce)}if(ce(oe)||K(oe))return W=W.get(V)||null,ne(P,W,oe,Ce,null);if(typeof oe.then=="function")return ie(W,P,V,ra(oe),Ce);if(oe.$$typeof===l)return ie(W,P,V,ea(P,oe),Ce);na(P,oe)}return null}function Se(W,P,V,oe){for(var Ce=null,qe=null,be=P,Me=P=0,ke=null;be!==null&&Me<V.length;Me++){be.index>Me?(ke=be,be=null):ke=be.sibling;var Ie=Z(W,be,V[Me],oe);if(Ie===null){be===null&&(be=ke);break}e&&be&&Ie.alternate===null&&t(W,be),P=n(Ie,P,Me),qe===null?Ce=Ie:qe.sibling=Ie,qe=Ie,be=ke}if(Me===V.length)return i(W,be),Ne&&Ni(W,Me),Ce;if(be===null){for(;Me<V.length;Me++)be=he(W,V[Me],oe),be!==null&&(P=n(be,P,Me),qe===null?Ce=be:qe.sibling=be,qe=be);return Ne&&Ni(W,Me),Ce}for(be=s(be);Me<V.length;Me++)ke=ie(be,W,Me,V[Me],oe),ke!==null&&(e&&ke.alternate!==null&&be.delete(ke.key===null?Me:ke.key),P=n(ke,P,Me),qe===null?Ce=ke:qe.sibling=ke,qe=ke);return e&&be.forEach(function(Ms){return t(W,Ms)}),Ne&&Ni(W,Me),Ce}function Ae(W,P,V,oe){if(V==null)throw Error(B(151));for(var Ce=null,qe=null,be=P,Me=P=0,ke=null,Ie=V.next();be!==null&&!Ie.done;Me++,Ie=V.next()){be.index>Me?(ke=be,be=null):ke=be.sibling;var Ms=Z(W,be,Ie.value,oe);if(Ms===null){be===null&&(be=ke);break}e&&be&&Ms.alternate===null&&t(W,be),P=n(Ms,P,Me),qe===null?Ce=Ms:qe.sibling=Ms,qe=Ms,be=ke}if(Ie.done)return i(W,be),Ne&&Ni(W,Me),Ce;if(be===null){for(;!Ie.done;Me++,Ie=V.next())Ie=he(W,Ie.value,oe),Ie!==null&&(P=n(Ie,P,Me),qe===null?Ce=Ie:qe.sibling=Ie,qe=Ie);return Ne&&Ni(W,Me),Ce}for(be=s(be);!Ie.done;Me++,Ie=V.next())Ie=ie(be,W,Me,Ie.value,oe),Ie!==null&&(e&&Ie.alternate!==null&&be.delete(Ie.key===null?Me:Ie.key),P=n(Ie,P,Me),qe===null?Ce=Ie:qe.sibling=Ie,qe=Ie);return e&&be.forEach(function(Xv){return t(W,Xv)}),Ne&&Ni(W,Me),Ce}function Xe(W,P,V,oe){if(typeof V=="object"&&V!==null&&V.type===p&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case C:e:{for(var Ce=V.key;P!==null;){if(P.key===Ce){if(Ce=V.type,Ce===p){if(P.tag===7){i(W,P.sibling),oe=r(P,V.props.children),oe.return=W,W=oe;break e}}else if(P.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===m&&Ys(Ce)===P.type){i(W,P.sibling),oe=r(P,V.props),an(oe,V),oe.return=W,W=oe;break e}i(W,P);break}else t(W,P);P=P.sibling}V.type===p?(oe=Us(V.props.children,W.mode,oe,V.key),oe.return=W,W=oe):(oe=$n(V.type,V.key,V.props,null,W.mode,oe),an(oe,V),oe.return=W,W=oe)}return g(W);case S:e:{for(Ce=V.key;P!==null;){if(P.key===Ce)if(P.tag===4&&P.stateNode.containerInfo===V.containerInfo&&P.stateNode.implementation===V.implementation){i(W,P.sibling),oe=r(P,V.children||[]),oe.return=W,W=oe;break e}else{i(W,P);break}else t(W,P);P=P.sibling}oe=Ll(V,W.mode,oe),oe.return=W,W=oe}return g(W);case m:return V=Ys(V),Xe(W,P,V,oe)}if(ce(V))return Se(W,P,V,oe);if(K(V)){if(Ce=K(V),typeof Ce!="function")throw Error(B(150));return V=Ce.call(V),Ae(W,P,V,oe)}if(typeof V.then=="function")return Xe(W,P,ra(V),oe);if(V.$$typeof===l)return Xe(W,P,ea(W,V),oe);na(W,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,P!==null&&P.tag===6?(i(W,P.sibling),oe=r(P,V),oe.return=W,W=oe):(i(W,P),oe=Ml(V,W.mode,oe),oe.return=W,W=oe),g(W)):i(W,P)}return function(W,P,V,oe){try{nn=0;var Ce=Xe(W,P,V,oe);return Sr=null,Ce}catch(be){if(be===gr||be===ia)throw be;var qe=Vt(29,be,null,W.mode);return qe.lanes=oe,qe.return=W,qe}}}var Ws=wu(!0),xu=wu(!1),ds=!1;function Pl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yl(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 _s(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function vs(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ge&2)!==0){var r=s.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Zn(e),ou(e,null,i),t}return Xn(e,s,t,i),Zn(e)}function ln(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,jn(e,i)}}function Kl(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 g={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};n===null?r=n=g:n=n.next=g,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 Wl=!1;function on(){if(Wl){var e=pr;if(e!==null)throw e}}function cn(e,t,i,s){Wl=!1;var r=e.updateQueue;ds=!1;var n=r.firstBaseUpdate,g=r.lastBaseUpdate,M=r.shared.pending;if(M!==null){r.shared.pending=null;var U=M,X=U.next;U.next=null,g===null?n=X:g.next=X,g=U;var ne=e.alternate;ne!==null&&(ne=ne.updateQueue,M=ne.lastBaseUpdate,M!==g&&(M===null?ne.firstBaseUpdate=X:M.next=X,ne.lastBaseUpdate=U))}if(n!==null){var he=r.baseState;g=0,ne=X=U=null,M=n;do{var Z=M.lane&-536870913,ie=Z!==M.lane;if(ie?(Be&Z)===Z:(s&Z)===Z){Z!==0&&Z===mr&&(Wl=!0),ne!==null&&(ne=ne.next={lane:0,tag:M.tag,payload:M.payload,callback:null,next:null});e:{var Se=e,Ae=M;Z=t;var Xe=i;switch(Ae.tag){case 1:if(Se=Ae.payload,typeof Se=="function"){he=Se.call(Xe,he,Z);break e}he=Se;break e;case 3:Se.flags=Se.flags&-65537|128;case 0:if(Se=Ae.payload,Z=typeof Se=="function"?Se.call(Xe,he,Z):Se,Z==null)break e;he=h({},he,Z);break e;case 2:ds=!0}}Z=M.callback,Z!==null&&(e.flags|=64,ie&&(e.flags|=8192),ie=r.callbacks,ie===null?r.callbacks=[Z]:ie.push(Z))}else ie={lane:Z,tag:M.tag,payload:M.payload,callback:M.callback,next:null},ne===null?(X=ne=ie,U=he):ne=ne.next=ie,g|=Z;if(M=M.next,M===null){if(M=r.shared.pending,M===null)break;ie=M,M=ie.next,ie.next=null,r.lastBaseUpdate=ie,r.shared.pending=null}}while(!0);ne===null&&(U=he),r.baseState=U,r.firstBaseUpdate=X,r.lastBaseUpdate=ne,n===null&&(r.shared.lanes=0),bs|=g,e.lanes=g,e.memoizedState=he}}function Au(e,t){if(typeof e!="function")throw Error(B(191,e));e.call(t)}function Du(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Au(i[e],t)}var br=x(null),aa=x(0);function Tu(e,t){e=Fi,F(aa,e),F(br,t),Fi=e|t.baseLanes}function Fl(){F(aa,Fi),F(br,br.current)}function Vl(){Fi=aa.current,O(br),O(aa)}var Xt=x(null),hi=null;function ms(e){var t=e.alternate;F(ut,ut.current&1),F(Xt,e),hi===null&&(t===null||br.current!==null||t.memoizedState!==null)&&(hi=e)}function Xl(e){F(ut,ut.current),F(Xt,e),hi===null&&(hi=e)}function Ru(e){e.tag===22?(F(ut,ut.current),F(Xt,e),hi===null&&(hi=e)):ps()}function ps(){F(ut,ut.current),F(Xt,Xt.current)}function Zt(e){O(Xt),hi===e&&(hi=null),O(ut)}var ut=x(0);function la(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||ic(i)||sc(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 Ui=0,Re=null,Fe=null,dt=null,oa=!1,yr=!1,Fs=!1,ca=0,un=0,Cr=null,U_=0;function lt(){throw Error(B(321))}function Zl(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!Ft(e[i],t[i]))return!1;return!0}function $l(e,t,i,s,r,n){return Ui=n,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?fh:fo,Fs=!1,n=i(s,r),Fs=!1,yr&&(n=Lu(t,i,s,r)),Mu(e),n}function Mu(e){G.H=dn;var t=Fe!==null&&Fe.next!==null;if(Ui=0,dt=Fe=Re=null,oa=!1,un=0,Cr=null,t)throw Error(B(300));e===null||_t||(e=e.dependencies,e!==null&&Jn(e)&&(_t=!0))}function Lu(e,t,i,s){Re=e;var r=0;do{if(yr&&(Cr=null),un=0,yr=!1,25<=r)throw Error(B(301));if(r+=1,dt=Fe=null,e.updateQueue!=null){var n=e.updateQueue;n.lastEffect=null,n.events=null,n.stores=null,n.memoCache!=null&&(n.memoCache.index=0)}G.H=dh,n=t(i,s)}while(yr);return n}function q_(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?hn(t):t,e=e.useState()[0],(Fe!==null?Fe.memoizedState:null)!==e&&(Re.flags|=1024),t}function Ql(){var e=ca!==0;return ca=0,e}function Jl(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function eo(e){if(oa){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}oa=!1}Ui=0,dt=Fe=Re=null,yr=!1,un=ca=0,Cr=null}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dt===null?Re.memoizedState=dt=e:dt=dt.next=e,dt}function ht(){if(Fe===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var t=dt===null?Re.memoizedState:dt.next;if(t!==null)dt=t,Fe=e;else{if(e===null)throw Re.alternate===null?Error(B(467)):Error(B(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},dt===null?Re.memoizedState=dt=e:dt=dt.next=e}return dt}function ua(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function hn(e){var t=un;return un+=1,Cr===null&&(Cr=[]),e=yu(Cr,e,t),t=Re,(dt===null?t.memoizedState:dt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?fh:fo),e}function ha(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return hn(e);if(e.$$typeof===l)return At(e)}throw Error(B(438,String(e)))}function to(e){var t=null,i=Re.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Re.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=ua(),Re.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]=q;return t.index++,i}function qi(e,t){return typeof t=="function"?t(e):t}function fa(e){var t=ht();return io(t,Fe,e)}function io(e,t,i){var s=e.queue;if(s===null)throw Error(B(311));s.lastRenderedReducer=i;var r=e.baseQueue,n=s.pending;if(n!==null){if(r!==null){var g=r.next;r.next=n.next,n.next=g}t.baseQueue=r=n,s.pending=null}if(n=e.baseState,r===null)e.memoizedState=n;else{t=r.next;var M=g=null,U=null,X=t,ne=!1;do{var he=X.lane&-536870913;if(he!==X.lane?(Be&he)===he:(Ui&he)===he){var Z=X.revertLane;if(Z===0)U!==null&&(U=U.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),he===mr&&(ne=!0);else if((Ui&Z)===Z){X=X.next,Z===mr&&(ne=!0);continue}else he={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},U===null?(M=U=he,g=n):U=U.next=he,Re.lanes|=Z,bs|=Z;he=X.action,Fs&&i(n,he),n=X.hasEagerState?X.eagerState:i(n,he)}else Z={lane:he,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},U===null?(M=U=Z,g=n):U=U.next=Z,Re.lanes|=he,bs|=he;X=X.next}while(X!==null&&X!==t);if(U===null?g=n:U.next=M,!Ft(n,e.memoizedState)&&(_t=!0,ne&&(i=pr,i!==null)))throw i;e.memoizedState=n,e.baseState=g,e.baseQueue=U,s.lastRenderedState=n}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function so(e){var t=ht(),i=t.queue;if(i===null)throw Error(B(311));i.lastRenderedReducer=e;var s=i.dispatch,r=i.pending,n=t.memoizedState;if(r!==null){i.pending=null;var g=r=r.next;do n=e(n,g.action),g=g.next;while(g!==r);Ft(n,t.memoizedState)||(_t=!0),t.memoizedState=n,t.baseQueue===null&&(t.baseState=n),i.lastRenderedState=n}return[n,s]}function Ou(e,t,i){var s=Re,r=ht(),n=Ne;if(n){if(i===void 0)throw Error(B(407));i=i()}else i=t();var g=!Ft((Fe||r).memoizedState,i);if(g&&(r.memoizedState=i,_t=!0),r=r.queue,ao(Hu.bind(null,s,r,e),[e]),r.getSnapshot!==t||g||dt!==null&&dt.memoizedState.tag&1){if(s.flags|=2048,Er(9,{destroy:void 0},ku.bind(null,s,r,i,t),null),Ze===null)throw Error(B(349));n||(Ui&127)!==0||Bu(s,t,i)}return i}function Bu(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Re.updateQueue,t===null?(t=ua(),Re.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function ku(e,t,i,s){t.value=i,t.getSnapshot=s,Nu(t)&&ju(e)}function Hu(e,t,i){return i(function(){Nu(t)&&ju(e)})}function Nu(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!Ft(e,i)}catch{return!0}}function ju(e){var t=zs(e,2);t!==null&&Kt(t,e,2)}function ro(e){var t=zt();if(typeof e=="function"){var i=e;if(e=i(),Fs){mi(!0);try{i()}finally{mi(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qi,lastRenderedState:e},t}function zu(e,t,i,s){return e.baseState=i,io(e,Fe,typeof s=="function"?s:qi)}function I_(e,t,i,s,r){if(va(e))throw Error(B(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(g){n.listeners.push(g)}};G.T!==null?i(!0):n.isTransition=!1,s(n),i=t.pending,i===null?(n.next=t.pending=n,Uu(t,n)):(n.next=i.next,t.pending=i.next=n)}}function Uu(e,t){var i=t.action,s=t.payload,r=e.state;if(t.isTransition){var n=G.T,g={};G.T=g;try{var M=i(r,s),U=G.S;U!==null&&U(g,M),qu(e,t,M)}catch(X){no(e,t,X)}finally{n!==null&&g.types!==null&&(n.types=g.types),G.T=n}}else try{n=i(r,s),qu(e,t,n)}catch(X){no(e,t,X)}}function qu(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){Iu(e,t,s)},function(s){return no(e,t,s)}):Iu(e,t,i)}function Iu(e,t,i){t.status="fulfilled",t.value=i,Gu(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,Uu(e,i)))}function no(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Gu(t),t=t.next;while(t!==s)}e.action=null}function Gu(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Pu(e,t){return t}function Yu(e,t){if(Ne){var i=Ze.formState;if(i!==null){e:{var s=Re;if(Ne){if(tt){t:{for(var r=tt,n=ui;r.nodeType!==8;){if(!n){r=null;break t}if(r=fi(r.nextSibling),r===null){r=null;break t}}n=r.data,r=n==="F!"||n==="F"?r:null}if(r){tt=fi(r.nextSibling),s=r.data==="F!";break e}}hs(s)}s=!1}s&&(t=i[0])}}return i=zt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pu,lastRenderedState:t},i.queue=s,i=ch.bind(null,Re,s),s.dispatch=i,s=ro(!1),n=ho.bind(null,Re,!1,s.queue),s=zt(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,i=I_.bind(null,Re,r,n,i),r.dispatch=i,s.memoizedState=e,[t,i,!1]}function Ku(e){var t=ht();return Wu(t,Fe,e)}function Wu(e,t,i){if(t=io(e,t,Pu)[0],e=fa(qi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=hn(t)}catch(g){throw g===gr?ia:g}else s=t;t=ht();var r=t.queue,n=r.dispatch;return i!==t.memoizedState&&(Re.flags|=2048,Er(9,{destroy:void 0},G_.bind(null,r,i),null)),[s,n,e]}function G_(e,t){e.action=t}function Fu(e){var t=ht(),i=Fe;if(i!==null)return Wu(t,i,e);ht(),t=t.memoizedState,i=ht();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Er(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Re.updateQueue,t===null&&(t=ua(),Re.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 ht().memoizedState}function da(e,t,i,s){var r=zt();Re.flags|=e,r.memoizedState=Er(1|t,{destroy:void 0},i,s===void 0?null:s)}function _a(e,t,i,s){var r=ht();s=s===void 0?null:s;var n=r.memoizedState.inst;Fe!==null&&s!==null&&Zl(s,Fe.memoizedState.deps)?r.memoizedState=Er(t,n,i,s):(Re.flags|=e,r.memoizedState=Er(1|t,n,i,s))}function Xu(e,t){da(8390656,8,e,t)}function ao(e,t){_a(2048,8,e,t)}function P_(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=ua(),Re.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Zu(e){var t=ht().memoizedState;return P_({ref:t,nextImpl:e}),function(){if((Ge&2)!==0)throw Error(B(440));return t.impl.apply(void 0,arguments)}}function $u(e,t){return _a(4,2,e,t)}function Qu(e,t){return _a(4,4,e,t)}function Ju(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 eh(e,t,i){i=i!=null?i.concat([e]):null,_a(4,4,Ju.bind(null,t,e),i)}function lo(){}function th(e,t){var i=ht();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&Zl(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function ih(e,t){var i=ht();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&Zl(t,s[1]))return s[0];if(s=e(),Fs){mi(!0);try{e()}finally{mi(!1)}}return i.memoizedState=[s,t],s}function oo(e,t,i){return i===void 0||(Ui&1073741824)!==0&&(Be&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=rf(),Re.lanes|=e,bs|=e,i)}function sh(e,t,i,s){return Ft(i,t)?i:br.current!==null?(e=oo(e,i,s),Ft(e,t)||(_t=!0),e):(Ui&42)===0||(Ui&1073741824)!==0&&(Be&261930)===0?(_t=!0,e.memoizedState=i):(e=rf(),Re.lanes|=e,bs|=e,t)}function rh(e,t,i,s,r){var n=J.p;J.p=n!==0&&8>n?n:8;var g=G.T,M={};G.T=M,ho(e,!1,t,i);try{var U=r(),X=G.S;if(X!==null&&X(M,U),U!==null&&typeof U=="object"&&typeof U.then=="function"){var ne=z_(U,s);fn(e,t,ne,Jt(e))}else fn(e,t,s,Jt(e))}catch(he){fn(e,t,{then:function(){},status:"rejected",reason:he},Jt())}finally{J.p=n,g!==null&&M.types!==null&&(g.types=M.types),G.T=g}}function Y_(){}function co(e,t,i,s){if(e.tag!==5)throw Error(B(476));var r=nh(e).queue;rh(e,r,t,ee,i===null?Y_:function(){return ah(e),i(s)})}function nh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qi,lastRenderedState:ee},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:qi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ah(e){var t=nh(e);t.next===null&&(t=e.alternate.memoizedState),fn(e,t.next.queue,{},Jt())}function uo(){return At(Rn)}function lh(){return ht().memoizedState}function oh(){return ht().memoizedState}function K_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Jt();e=_s(i);var s=vs(t,e,i);s!==null&&(Kt(s,t,i),ln(s,t,i)),t={cache:Ul()},e.payload=t;return}t=t.return}}function W_(e,t,i){var s=Jt();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},va(e)?uh(t,i):(i=Tl(e,t,i,s),i!==null&&(Kt(i,e,s),hh(i,t,s)))}function ch(e,t,i){var s=Jt();fn(e,t,i,s)}function fn(e,t,i,s){var r={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(va(e))uh(t,r);else{var n=e.alternate;if(e.lanes===0&&(n===null||n.lanes===0)&&(n=t.lastRenderedReducer,n!==null))try{var g=t.lastRenderedState,M=n(g,i);if(r.hasEagerState=!0,r.eagerState=M,Ft(M,g))return Xn(e,t,r,0),Ze===null&&Vn(),!1}catch{}if(i=Tl(e,t,r,s),i!==null)return Kt(i,e,s),hh(i,t,s),!0}return!1}function ho(e,t,i,s){if(s={lane:2,revertLane:Yo(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},va(e)){if(t)throw Error(B(479))}else t=Tl(e,i,s,2),t!==null&&Kt(t,e,2)}function va(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function uh(e,t){yr=oa=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function hh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,jn(e,i)}}var dn={readContext:At,use:ha,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};dn.useEffectEvent=lt;var fh={readContext:At,use:ha,useCallback:function(e,t){return zt().memoizedState=[e,t===void 0?null:t],e},useContext:At,useEffect:Xu,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,da(4194308,4,Ju.bind(null,t,e),i)},useLayoutEffect:function(e,t){return da(4194308,4,e,t)},useInsertionEffect:function(e,t){da(4,2,e,t)},useMemo:function(e,t){var i=zt();t=t===void 0?null:t;var s=e();if(Fs){mi(!0);try{e()}finally{mi(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=zt();if(i!==void 0){var r=i(t);if(Fs){mi(!0);try{i(t)}finally{mi(!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=W_.bind(null,Re,e),[s.memoizedState,e]},useRef:function(e){var t=zt();return e={current:e},t.memoizedState=e},useState:function(e){e=ro(e);var t=e.queue,i=ch.bind(null,Re,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:lo,useDeferredValue:function(e,t){var i=zt();return oo(i,e,t)},useTransition:function(){var e=ro(!1);return e=rh.bind(null,Re,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Re,r=zt();if(Ne){if(i===void 0)throw Error(B(407));i=i()}else{if(i=t(),Ze===null)throw Error(B(349));(Be&127)!==0||Bu(s,t,i)}r.memoizedState=i;var n={value:i,getSnapshot:t};return r.queue=n,Xu(Hu.bind(null,s,n,e),[e]),s.flags|=2048,Er(9,{destroy:void 0},ku.bind(null,s,n,i,t),null),i},useId:function(){var e=zt(),t=Ze.identifierPrefix;if(Ne){var i=xi,s=wi;i=(s&~(1<<32-wt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=ca++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=U_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:uo,useFormState:Yu,useActionState:Yu,useOptimistic:function(e){var t=zt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=ho.bind(null,Re,!0,i),i.dispatch=t,[e,t]},useMemoCache:to,useCacheRefresh:function(){return zt().memoizedState=K_.bind(null,Re)},useEffectEvent:function(e){var t=zt(),i={impl:e};return t.memoizedState=i,function(){if((Ge&2)!==0)throw Error(B(440));return i.impl.apply(void 0,arguments)}}},fo={readContext:At,use:ha,useCallback:th,useContext:At,useEffect:ao,useImperativeHandle:eh,useInsertionEffect:$u,useLayoutEffect:Qu,useMemo:ih,useReducer:fa,useRef:Vu,useState:function(){return fa(qi)},useDebugValue:lo,useDeferredValue:function(e,t){var i=ht();return sh(i,Fe.memoizedState,e,t)},useTransition:function(){var e=fa(qi)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:hn(e),t]},useSyncExternalStore:Ou,useId:lh,useHostTransitionStatus:uo,useFormState:Ku,useActionState:Ku,useOptimistic:function(e,t){var i=ht();return zu(i,Fe,e,t)},useMemoCache:to,useCacheRefresh:oh};fo.useEffectEvent=Zu;var dh={readContext:At,use:ha,useCallback:th,useContext:At,useEffect:ao,useImperativeHandle:eh,useInsertionEffect:$u,useLayoutEffect:Qu,useMemo:ih,useReducer:so,useRef:Vu,useState:function(){return so(qi)},useDebugValue:lo,useDeferredValue:function(e,t){var i=ht();return Fe===null?oo(i,e,t):sh(i,Fe.memoizedState,e,t)},useTransition:function(){var e=so(qi)[0],t=ht().memoizedState;return[typeof e=="boolean"?e:hn(e),t]},useSyncExternalStore:Ou,useId:lh,useHostTransitionStatus:uo,useFormState:Fu,useActionState:Fu,useOptimistic:function(e,t){var i=ht();return Fe!==null?zu(i,Fe,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:to,useCacheRefresh:oh};dh.useEffectEvent=Zu;function _o(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 vo={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=Jt(),r=_s(s);r.payload=t,i!=null&&(r.callback=i),t=vs(e,r,s),t!==null&&(Kt(t,e,s),ln(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=Jt(),r=_s(s);r.tag=1,r.payload=t,i!=null&&(r.callback=i),t=vs(e,r,s),t!==null&&(Kt(t,e,s),ln(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Jt(),s=_s(i);s.tag=2,t!=null&&(s.callback=t),t=vs(e,s,i),t!==null&&(Kt(t,e,i),ln(t,e,i))}};function _h(e,t,i,s,r,n,g){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,n,g):t.prototype&&t.prototype.isPureReactComponent?!Qr(i,s)||!Qr(r,n):!0}function vh(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&&vo.enqueueReplaceState(t,t.state,null)}function Vs(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 mh(e){Fn(e)}function ph(e){console.error(e)}function gh(e){Fn(e)}function ma(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Sh(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 mo(e,t,i){return i=_s(i),i.tag=3,i.payload={element:null},i.callback=function(){ma(e,t)},i}function bh(e){return e=_s(e),e.tag=3,e}function yh(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(){Sh(t,i,s)}}var g=i.stateNode;g!==null&&typeof g.componentDidCatch=="function"&&(e.callback=function(){Sh(t,i,s),typeof r!="function"&&(ys===null?ys=new Set([this]):ys.add(this));var M=s.stack;this.componentDidCatch(s.value,{componentStack:M!==null?M:""})})}function F_(e,t,i,s,r){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&vr(t,i,r,!0),i=Xt.current,i!==null){switch(i.tag){case 31:case 13:return hi===null?Ta():i.alternate===null&&ot===0&&(ot=3),i.flags&=-257,i.flags|=65536,i.lanes=r,s===sa?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),Io(e,s,r)),!1;case 22:return i.flags|=65536,s===sa?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)),Io(e,s,r)),!1}throw Error(B(435,i.tag))}return Io(e,s,r),Ta(),!1}if(Ne)return t=Xt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==kl&&(e=Error(B(422),{cause:s}),tn(li(e,i)))):(s!==kl&&(t=Error(B(423),{cause:s}),tn(li(t,i))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=li(s,i),r=mo(e.stateNode,s,r),Kl(e,r),ot!==4&&(ot=2)),!1;var n=Error(B(520),{cause:s});if(n=li(n,i),yn===null?yn=[n]:yn.push(n),ot!==4&&(ot=2),t===null)return!0;s=li(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=r&-r,i.lanes|=e,e=mo(i.stateNode,s,e),Kl(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"&&(ys===null||!ys.has(n))))return i.flags|=65536,r&=-r,i.lanes|=r,r=bh(r),yh(r,e,i,s),Kl(i,r),!1}i=i.return}while(i!==null);return!1}var po=Error(B(461)),_t=!1;function Dt(e,t,i,s){t.child=e===null?xu(t,null,i,s):Ws(t,e.child,i,s)}function Ch(e,t,i,s,r){i=i.render;var n=t.ref;if("ref"in s){var g={};for(var M in s)M!=="ref"&&(g[M]=s[M])}else g=s;return Gs(t),s=$l(e,t,i,g,n,r),M=Ql(),e!==null&&!_t?(Jl(e,t,r),Ii(e,t,r)):(Ne&&M&&Ol(t),t.flags|=1,Dt(e,t,s,r),t.child)}function Eh(e,t,i,s,r){if(e===null){var n=i.type;return typeof n=="function"&&!Rl(n)&&n.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=n,wh(e,t,n,s,r)):(e=$n(i.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(n=e.child,!xo(e,r)){var g=n.memoizedProps;if(i=i.compare,i=i!==null?i:Qr,i(g,s)&&e.ref===t.ref)return Ii(e,t,r)}return t.flags|=1,e=Hi(n,s),e.ref=t.ref,e.return=t,t.child=e}function wh(e,t,i,s,r){if(e!==null){var n=e.memoizedProps;if(Qr(n,s)&&e.ref===t.ref)if(_t=!1,t.pendingProps=s=n,xo(e,r))(e.flags&131072)!==0&&(_t=!0);else return t.lanes=e.lanes,Ii(e,t,r)}return go(e,t,i,s,r)}function xh(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 Ah(e,t,n,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ta(t,n!==null?n.cachePool:null),n!==null?Tu(t,n):Fl(),Ru(t);else return s=t.lanes=536870912,Ah(e,t,n!==null?n.baseLanes|i:i,i,s)}else n!==null?(ta(t,n.cachePool),Tu(t,n),ps(),t.memoizedState=null):(e!==null&&ta(t,null),Fl(),ps());return Dt(e,t,r,i),t.child}function _n(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ah(e,t,i,s,r){var n=Il();return n=n===null?null:{parent:ft._currentValue,pool:n},t.memoizedState={baseLanes:i,cachePool:n},e!==null&&ta(t,null),Fl(),Ru(t),e!==null&&vr(e,t,s,!0),t.childLanes=r,null}function pa(e,t){return t=Sa({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Dh(e,t,i){return Ws(t,e.child,null,i),e=pa(t,t.pendingProps),e.flags|=2,Zt(t),t.memoizedState=null,e}function V_(e,t,i){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(s.mode==="hidden")return e=pa(t,s),t.lanes=536870912,_n(null,e);if(Xl(t),(e=tt)?(e=qf(e,ui),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cs!==null?{id:wi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},i=uu(e),i.return=t,t.child=i,xt=t,tt=null)):e=null,e===null)throw hs(t);return t.lanes=536870912,null}return pa(t,s)}var n=e.memoizedState;if(n!==null){var g=n.dehydrated;if(Xl(t),r)if(t.flags&256)t.flags&=-257,t=Dh(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(B(558));else if(_t||vr(e,t,i,!1),r=(i&e.childLanes)!==0,_t||r){if(s=Ze,s!==null&&(g=yt(s,i),g!==0&&g!==n.retryLane))throw n.retryLane=g,zs(e,g),Kt(s,e,g),po;Ta(),t=Dh(e,t,i)}else e=n.treeContext,tt=fi(g.nextSibling),xt=t,Ne=!0,us=null,ui=!1,e!==null&&du(t,e),t=pa(t,s),t.flags|=4096;return t}return e=Hi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ga(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(B(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function go(e,t,i,s,r){return Gs(t),i=$l(e,t,i,s,void 0,r),s=Ql(),e!==null&&!_t?(Jl(e,t,r),Ii(e,t,r)):(Ne&&s&&Ol(t),t.flags|=1,Dt(e,t,i,r),t.child)}function Th(e,t,i,s,r,n){return Gs(t),t.updateQueue=null,i=Lu(t,s,i,r),Mu(e),s=Ql(),e!==null&&!_t?(Jl(e,t,n),Ii(e,t,n)):(Ne&&s&&Ol(t),t.flags|=1,Dt(e,t,i,n),t.child)}function Rh(e,t,i,s,r){if(Gs(t),t.stateNode===null){var n=hr,g=i.contextType;typeof g=="object"&&g!==null&&(n=At(g)),n=new i(s,n),t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,n.updater=vo,t.stateNode=n,n._reactInternals=t,n=t.stateNode,n.props=s,n.state=t.memoizedState,n.refs={},Pl(t),g=i.contextType,n.context=typeof g=="object"&&g!==null?At(g):hr,n.state=t.memoizedState,g=i.getDerivedStateFromProps,typeof g=="function"&&(_o(t,i,g,s),n.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(g=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),g!==n.state&&vo.enqueueReplaceState(n,n.state,null),cn(t,s,n,r),on(),n.state=t.memoizedState),typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){n=t.stateNode;var M=t.memoizedProps,U=Vs(i,M);n.props=U;var X=n.context,ne=i.contextType;g=hr,typeof ne=="object"&&ne!==null&&(g=At(ne));var he=i.getDerivedStateFromProps;ne=typeof he=="function"||typeof n.getSnapshotBeforeUpdate=="function",M=t.pendingProps!==M,ne||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(M||X!==g)&&vh(t,n,s,g),ds=!1;var Z=t.memoizedState;n.state=Z,cn(t,s,n,r),on(),X=t.memoizedState,M||Z!==X||ds?(typeof he=="function"&&(_o(t,i,he,s),X=t.memoizedState),(U=ds||_h(t,i,U,s,Z,X,g))?(ne||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=X),n.props=s,n.state=X,n.context=g,s=U):(typeof n.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{n=t.stateNode,Yl(e,t),g=t.memoizedProps,ne=Vs(i,g),n.props=ne,he=t.pendingProps,Z=n.context,X=i.contextType,U=hr,typeof X=="object"&&X!==null&&(U=At(X)),M=i.getDerivedStateFromProps,(X=typeof M=="function"||typeof n.getSnapshotBeforeUpdate=="function")||typeof n.UNSAFE_componentWillReceiveProps!="function"&&typeof n.componentWillReceiveProps!="function"||(g!==he||Z!==U)&&vh(t,n,s,U),ds=!1,Z=t.memoizedState,n.state=Z,cn(t,s,n,r),on();var ie=t.memoizedState;g!==he||Z!==ie||ds||e!==null&&e.dependencies!==null&&Jn(e.dependencies)?(typeof M=="function"&&(_o(t,i,M,s),ie=t.memoizedState),(ne=ds||_h(t,i,ne,s,Z,ie,U)||e!==null&&e.dependencies!==null&&Jn(e.dependencies))?(X||typeof n.UNSAFE_componentWillUpdate!="function"&&typeof n.componentWillUpdate!="function"||(typeof n.componentWillUpdate=="function"&&n.componentWillUpdate(s,ie,U),typeof n.UNSAFE_componentWillUpdate=="function"&&n.UNSAFE_componentWillUpdate(s,ie,U)),typeof n.componentDidUpdate=="function"&&(t.flags|=4),typeof n.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ie),n.props=s,n.state=ie,n.context=U,s=ne):(typeof n.componentDidUpdate!="function"||g===e.memoizedProps&&Z===e.memoizedState||(t.flags|=4),typeof n.getSnapshotBeforeUpdate!="function"||g===e.memoizedProps&&Z===e.memoizedState||(t.flags|=1024),s=!1)}return n=s,ga(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=Ws(t,e.child,null,r),t.child=Ws(t,null,i,r)):Dt(e,t,i,r),t.memoizedState=n.state,e=t.child):e=Ii(e,t,r),e}function Mh(e,t,i,s){return qs(),t.flags|=256,Dt(e,t,i,s),t.child}var So={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bo(e){return{baseLanes:e,cachePool:Su()}}function yo(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Qt),e}function Lh(e,t,i){var s=t.pendingProps,r=!1,n=(t.flags&128)!==0,g;if((g=n)||(g=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),g&&(r=!0,t.flags&=-129),g=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(r?ms(t):ps(),(e=tt)?(e=qf(e,ui),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:cs!==null?{id:wi,overflow:xi}:null,retryLane:536870912,hydrationErrors:null},i=uu(e),i.return=t,t.child=i,xt=t,tt=null)):e=null,e===null)throw hs(t);return sc(e)?t.lanes=32:t.lanes=536870912,null}var M=s.children;return s=s.fallback,r?(ps(),r=t.mode,M=Sa({mode:"hidden",children:M},r),s=Us(s,r,i,null),M.return=t,s.return=t,M.sibling=s,t.child=M,s=t.child,s.memoizedState=bo(i),s.childLanes=yo(e,g,i),t.memoizedState=So,_n(null,s)):(ms(t),Co(t,M))}var U=e.memoizedState;if(U!==null&&(M=U.dehydrated,M!==null)){if(n)t.flags&256?(ms(t),t.flags&=-257,t=Eo(e,t,i)):t.memoizedState!==null?(ps(),t.child=e.child,t.flags|=128,t=null):(ps(),M=s.fallback,r=t.mode,s=Sa({mode:"visible",children:s.children},r),M=Us(M,r,i,null),M.flags|=2,s.return=t,M.return=t,s.sibling=M,t.child=s,Ws(t,e.child,null,i),s=t.child,s.memoizedState=bo(i),s.childLanes=yo(e,g,i),t.memoizedState=So,t=_n(null,s));else if(ms(t),sc(M)){if(g=M.nextSibling&&M.nextSibling.dataset,g)var X=g.dgst;g=X,s=Error(B(419)),s.stack="",s.digest=g,tn({value:s,source:null,stack:null}),t=Eo(e,t,i)}else if(_t||vr(e,t,i,!1),g=(i&e.childLanes)!==0,_t||g){if(g=Ze,g!==null&&(s=yt(g,i),s!==0&&s!==U.retryLane))throw U.retryLane=s,zs(e,s),Kt(g,e,s),po;ic(M)||Ta(),t=Eo(e,t,i)}else ic(M)?(t.flags|=192,t.child=e.child,t=null):(e=U.treeContext,tt=fi(M.nextSibling),xt=t,Ne=!0,us=null,ui=!1,e!==null&&du(t,e),t=Co(t,s.children),t.flags|=4096);return t}return r?(ps(),M=s.fallback,r=t.mode,U=e.child,X=U.sibling,s=Hi(U,{mode:"hidden",children:s.children}),s.subtreeFlags=U.subtreeFlags&65011712,X!==null?M=Hi(X,M):(M=Us(M,r,i,null),M.flags|=2),M.return=t,s.return=t,s.sibling=M,t.child=s,_n(null,s),s=t.child,M=e.child.memoizedState,M===null?M=bo(i):(r=M.cachePool,r!==null?(U=ft._currentValue,r=r.parent!==U?{parent:U,pool:U}:r):r=Su(),M={baseLanes:M.baseLanes|i,cachePool:r}),s.memoizedState=M,s.childLanes=yo(e,g,i),t.memoizedState=So,_n(e.child,s)):(ms(t),i=e.child,e=i.sibling,i=Hi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(g=t.deletions,g===null?(t.deletions=[e],t.flags|=16):g.push(e)),t.child=i,t.memoizedState=null,i)}function Co(e,t){return t=Sa({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Sa(e,t){return e=Vt(22,e,null,t),e.lanes=0,e}function Eo(e,t,i){return Ws(t,e.child,null,i),e=Co(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Oh(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),jl(e.return,t,i)}function wo(e,t,i,s,r,n){var g=e.memoizedState;g===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:r,treeForkCount:n}:(g.isBackwards=t,g.rendering=null,g.renderingStartTime=0,g.last=s,g.tail=i,g.tailMode=r,g.treeForkCount=n)}function Bh(e,t,i){var s=t.pendingProps,r=s.revealOrder,n=s.tail;s=s.children;var g=ut.current,M=(g&2)!==0;if(M?(g=g&1|2,t.flags|=128):g&=1,F(ut,g),Dt(e,t,s,i),s=Ne?en:0,!M&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Oh(e,i,t);else if(e.tag===19)Oh(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&&la(e)===null&&(r=i),i=i.sibling;i=r,i===null?(r=t.child,t.child=null):(r=i.sibling,i.sibling=null),wo(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&&la(e)===null){t.child=r;break}e=r.sibling,r.sibling=i,i=r,r=e}wo(t,!0,i,null,n,s);break;case"together":wo(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Ii(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),bs|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(vr(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(B(153));if(t.child!==null){for(e=t.child,i=Hi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=Hi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function xo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Jn(e)))}function X_(e,t,i){switch(t.tag){case 3:L(t,t.stateNode.containerInfo),fs(t,ft,e.memoizedState.cache),qs();break;case 27:case 5:fe(t);break;case 4:L(t,t.stateNode.containerInfo);break;case 10:fs(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Xl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(ms(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Lh(e,t,i):(ms(t),e=Ii(e,t,i),e!==null?e.sibling:null);ms(t);break;case 19:var r=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(vr(e,t,i,!1),s=(i&t.childLanes)!==0),r){if(s)return Bh(e,t,i);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),F(ut,ut.current),s)break;return null;case 22:return t.lanes=0,xh(e,t,i,t.pendingProps);case 24:fs(t,ft,e.memoizedState.cache)}return Ii(e,t,i)}function kh(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)_t=!0;else{if(!xo(e,i)&&(t.flags&128)===0)return _t=!1,X_(e,t,i);_t=(e.flags&131072)!==0}else _t=!1,Ne&&(t.flags&1048576)!==0&&fu(t,en,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=Ys(t.elementType),t.type=e,typeof e=="function")Rl(e)?(s=Vs(e,s),t.tag=1,t=Rh(null,t,e,s,i)):(t.tag=0,t=go(null,t,e,s,i));else{if(e!=null){var r=e.$$typeof;if(r===_){t.tag=11,t=Ch(null,t,e,s,i);break e}else if(r===w){t.tag=14,t=Eh(null,t,e,s,i);break e}}throw t=Q(e)||e,Error(B(306,t,""))}}return t;case 0:return go(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,r=Vs(s,t.pendingProps),Rh(e,t,s,r,i);case 3:e:{if(L(t,t.stateNode.containerInfo),e===null)throw Error(B(387));s=t.pendingProps;var n=t.memoizedState;r=n.element,Yl(e,t),cn(t,s,null,i);var g=t.memoizedState;if(s=g.cache,fs(t,ft,s),s!==n.cache&&zl(t,[ft],i,!0),on(),s=g.element,n.isDehydrated)if(n={element:s,isDehydrated:!1,cache:g.cache},t.updateQueue.baseState=n,t.memoizedState=n,t.flags&256){t=Mh(e,t,s,i);break e}else if(s!==r){r=li(Error(B(424)),t),tn(r),t=Mh(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,tt=fi(e.firstChild),xt=t,Ne=!0,us=null,ui=!0,i=xu(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(qs(),s===r){t=Ii(e,t,i);break e}Dt(e,t,s,i)}t=t.child}return t;case 26:return ga(e,t),e===null?(i=Wf(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ne||(i=t.type,e=t.pendingProps,s=Ha(ve.current).createElement(i),s[St]=t,s[Bt]=e,Tt(s,i,e),ct(s),t.stateNode=s):t.memoizedState=Wf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return fe(t),e===null&&Ne&&(s=t.stateNode=Pf(t.type,t.pendingProps,ve.current),xt=t,ui=!0,r=tt,xs(t.type)?(rc=r,tt=fi(s.firstChild)):tt=r),Dt(e,t,t.pendingProps.children,i),ga(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((r=s=tt)&&(s=xv(s,t.type,t.pendingProps,ui),s!==null?(t.stateNode=s,xt=t,tt=fi(s.firstChild),ui=!1,r=!0):r=!1),r||hs(t)),fe(t),r=t.type,n=t.pendingProps,g=e!==null?e.memoizedProps:null,s=n.children,Jo(r,n)?s=null:g!==null&&Jo(r,g)&&(t.flags|=32),t.memoizedState!==null&&(r=$l(e,t,q_,null,null,i),Rn._currentValue=r),ga(e,t),Dt(e,t,s,i),t.child;case 6:return e===null&&Ne&&((e=i=tt)&&(i=Av(i,t.pendingProps,ui),i!==null?(t.stateNode=i,xt=t,tt=null,e=!0):e=!1),e||hs(t)),null;case 13:return Lh(e,t,i);case 4:return L(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Ws(t,null,s,i):Dt(e,t,s,i),t.child;case 11:return Ch(e,t,t.type,t.pendingProps,i);case 7:return Dt(e,t,t.pendingProps,i),t.child;case 8:return Dt(e,t,t.pendingProps.children,i),t.child;case 12:return Dt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,fs(t,t.type,s.value),Dt(e,t,s.children,i),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,Gs(t),r=At(r),s=s(r),t.flags|=1,Dt(e,t,s,i),t.child;case 14:return Eh(e,t,t.type,t.pendingProps,i);case 15:return wh(e,t,t.type,t.pendingProps,i);case 19:return Bh(e,t,i);case 31:return V_(e,t,i);case 22:return xh(e,t,i,t.pendingProps);case 24:return Gs(t),s=At(ft),e===null?(r=Il(),r===null&&(r=Ze,n=Ul(),r.pooledCache=n,n.refCount++,n!==null&&(r.pooledCacheLanes|=i),r=n),t.memoizedState={parent:s,cache:r},Pl(t),fs(t,ft,r)):((e.lanes&i)!==0&&(Yl(e,t),cn(t,null,null,i),on()),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),fs(t,ft,s)):(s=n.cache,fs(t,ft,s),s!==r.cache&&zl(t,[ft],i,!0))),Dt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(B(156,t.tag))}function Gi(e){e.flags|=4}function Ao(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(of())e.flags|=8192;else throw Ks=sa,Gl}else e.flags&=-16777217}function Hh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!$f(t))if(of())e.flags|=8192;else throw Ks=sa,Gl}function ba(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Ot():536870912,e.lanes|=t,Dr|=t)}function vn(e,t){if(!Ne)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 it(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 Z_(e,t,i){var s=t.pendingProps;switch(Bl(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),zi(ft),te(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(_r(t)?Gi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Hl())),it(t),null;case 26:var r=t.type,n=t.memoizedState;return e===null?(Gi(t),n!==null?(it(t),Hh(t,n)):(it(t),Ao(t,r,null,s,i))):n?n!==e.memoizedState?(Gi(t),it(t),Hh(t,n)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&Gi(t),it(t),Ao(t,r,e,s,i)),null;case 27:if(pe(t),i=ve.current,r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Gi(t);else{if(!s){if(t.stateNode===null)throw Error(B(166));return it(t),null}e=se.current,_r(t)?_u(t):(e=Pf(r,s,i),t.stateNode=e,Gi(t))}return it(t),null;case 5:if(pe(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&Gi(t);else{if(!s){if(t.stateNode===null)throw Error(B(166));return it(t),null}if(n=se.current,_r(t))_u(t);else{var g=Ha(ve.current);switch(n){case 1:n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case 2:n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;default:switch(r){case"svg":n=g.createElementNS("http://www.w3.org/2000/svg",r);break;case"math":n=g.createElementNS("http://www.w3.org/1998/Math/MathML",r);break;case"script":n=g.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild);break;case"select":n=typeof s.is=="string"?g.createElement("select",{is:s.is}):g.createElement("select"),s.multiple?n.multiple=!0:s.size&&(n.size=s.size);break;default:n=typeof s.is=="string"?g.createElement(r,{is:s.is}):g.createElement(r)}}n[St]=t,n[Bt]=s;e:for(g=t.child;g!==null;){if(g.tag===5||g.tag===6)n.appendChild(g.stateNode);else if(g.tag!==4&&g.tag!==27&&g.child!==null){g.child.return=g,g=g.child;continue}if(g===t)break e;for(;g.sibling===null;){if(g.return===null||g.return===t)break e;g=g.return}g.sibling.return=g.return,g=g.sibling}t.stateNode=n;e:switch(Tt(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&&Gi(t)}}return it(t),Ao(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&Gi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(B(166));if(e=ve.current,_r(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,r=xt,r!==null)switch(r.tag){case 27:case 5:s=r.memoizedProps}e[St]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||Of(e.nodeValue,i)),e||hs(t,!0)}else e=Ha(e).createTextNode(s),e[St]=t,t.stateNode=e}return it(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=_r(t),i!==null){if(e===null){if(!s)throw Error(B(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(B(557));e[St]=t}else qs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else i=Hl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Zt(t),t):(Zt(t),null);if((t.flags&128)!==0)throw Error(B(558))}return it(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=_r(t),s!==null&&s.dehydrated!==null){if(e===null){if(!r)throw Error(B(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(B(317));r[St]=t}else qs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),r=!1}else r=Hl(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(Zt(t),t):(Zt(t),null)}return Zt(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),ba(t,t.updateQueue),it(t),null);case 4:return te(),e===null&&Vo(t.stateNode.containerInfo),it(t),null;case 10:return zi(t.type),it(t),null;case 19:if(O(ut),s=t.memoizedState,s===null)return it(t),null;if(r=(t.flags&128)!==0,n=s.rendering,n===null)if(r)vn(s,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(n=la(e),n!==null){for(t.flags|=128,vn(s,!1),e=n.updateQueue,t.updateQueue=e,ba(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)cu(i,e),i=i.sibling;return F(ut,ut.current&1|2),Ne&&Ni(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&at()>xa&&(t.flags|=128,r=!0,vn(s,!1),t.lanes=4194304)}else{if(!r)if(e=la(n),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ba(t,e),vn(s,!0),s.tail===null&&s.tailMode==="hidden"&&!n.alternate&&!Ne)return it(t),null}else 2*at()-s.renderingStartTime>xa&&i!==536870912&&(t.flags|=128,r=!0,vn(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=at(),e.sibling=null,i=ut.current,F(ut,r?i&1|2:i&1),Ne&&Ni(t,s.treeForkCount),e):(it(t),null);case 22:case 23:return Zt(t),Vl(),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&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),i=t.updateQueue,i!==null&&ba(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&&O(Ps),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),zi(ft),it(t),null;case 25:return null;case 30:return null}throw Error(B(156,t.tag))}function $_(e,t){switch(Bl(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zi(ft),te(),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(Zt(t),t.alternate===null)throw Error(B(340));qs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Zt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(B(340));qs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return O(ut),null;case 4:return te(),null;case 10:return zi(t.type),null;case 22:case 23:return Zt(t),Vl(),e!==null&&O(Ps),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zi(ft),null;case 25:return null;default:return null}}function Nh(e,t){switch(Bl(t),t.tag){case 3:zi(ft),te();break;case 26:case 27:case 5:pe(t);break;case 4:te();break;case 31:t.memoizedState!==null&&Zt(t);break;case 13:Zt(t);break;case 19:O(ut);break;case 10:zi(t.type);break;case 22:case 23:Zt(t),Vl(),e!==null&&O(Ps);break;case 24:zi(ft)}}function mn(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,g=i.inst;s=n(),g.destroy=s}i=i.next}while(i!==r)}}catch(M){We(t,t.return,M)}}function gs(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 g=s.inst,M=g.destroy;if(M!==void 0){g.destroy=void 0,r=t;var U=i,X=M;try{X()}catch(ne){We(r,U,ne)}}}s=s.next}while(s!==n)}}catch(ne){We(t,t.return,ne)}}function jh(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Du(t,i)}catch(s){We(e,e.return,s)}}}function zh(e,t,i){i.props=Vs(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){We(e,t,s)}}function pn(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){We(e,t,r)}}function Ai(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(r){We(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){We(e,t,r)}else i.current=null}function Uh(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){We(e,e.return,r)}}function Do(e,t,i){try{var s=e.stateNode;Sv(s,e.type,i,t),s[Bt]=t}catch(r){We(e,e.return,r)}}function qh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&xs(e.type)||e.tag===4}function To(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qh(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&&xs(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 Ro(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=Bi));else if(s!==4&&(s===27&&xs(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Ro(e,t,i),e=e.sibling;e!==null;)Ro(e,t,i),e=e.sibling}function ya(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&&xs(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(ya(e,t,i),e=e.sibling;e!==null;)ya(e,t,i),e=e.sibling}function Ih(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Tt(t,s,i),t[St]=e,t[Bt]=i}catch(n){We(e,e.return,n)}}var Pi=!1,vt=!1,Mo=!1,Gh=typeof WeakSet=="function"?WeakSet:Set,Ct=null;function Q_(e,t){if(e=e.containerInfo,$o=Ga,e=eu(e),Cl(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 g=0,M=-1,U=-1,X=0,ne=0,he=e,Z=null;t:for(;;){for(var ie;he!==i||r!==0&&he.nodeType!==3||(M=g+r),he!==n||s!==0&&he.nodeType!==3||(U=g+s),he.nodeType===3&&(g+=he.nodeValue.length),(ie=he.firstChild)!==null;)Z=he,he=ie;for(;;){if(he===e)break t;if(Z===i&&++X===r&&(M=g),Z===n&&++ne===s&&(U=g),(ie=he.nextSibling)!==null)break;he=Z,Z=he.parentNode}he=ie}i=M===-1||U===-1?null:{start:M,end:U}}else i=null}i=i||{start:0,end:0}}else i=null;for(Qo={focusedElem:e,selectionRange:i},Ga=!1,Ct=t;Ct!==null;)if(t=Ct,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ct=e;else for(;Ct!==null;){switch(t=Ct,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 Se=Vs(i.type,r);e=s.getSnapshotBeforeUpdate(Se,n),s.__reactInternalSnapshotBeforeUpdate=e}catch(Ae){We(i,i.return,Ae)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)tc(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":tc(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(B(163))}if(e=t.sibling,e!==null){e.return=t.return,Ct=e;break}Ct=t.return}}function Ph(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:Ki(e,i),s&4&&mn(5,i);break;case 1:if(Ki(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(g){We(i,i.return,g)}else{var r=Vs(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(g){We(i,i.return,g)}}s&64&&jh(i),s&512&&pn(i,i.return);break;case 3:if(Ki(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{Du(e,t)}catch(g){We(i,i.return,g)}}break;case 27:t===null&&s&4&&Ih(i);case 26:case 5:Ki(e,i),t===null&&s&4&&Uh(i),s&512&&pn(i,i.return);break;case 12:Ki(e,i);break;case 31:Ki(e,i),s&4&&Wh(e,i);break;case 13:Ki(e,i),s&4&&Fh(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=lv.bind(null,i),Dv(e,i))));break;case 22:if(s=i.memoizedState!==null||Pi,!s){t=t!==null&&t.memoizedState!==null||vt,r=Pi;var n=vt;Pi=s,(vt=t)&&!n?Wi(e,i,(i.subtreeFlags&8772)!==0):Ki(e,i),Pi=r,vt=n}break;case 30:break;default:Ki(e,i)}}function Yh(e){var t=e.alternate;t!==null&&(e.alternate=null,Yh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Gr(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 rt=null,It=!1;function Yi(e,t,i){for(i=i.child;i!==null;)Kh(e,t,i),i=i.sibling}function Kh(e,t,i){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(Ut,i)}catch{}switch(i.tag){case 26:vt||Ai(i,t),Yi(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:vt||Ai(i,t);var s=rt,r=It;xs(i.type)&&(rt=i.stateNode,It=!1),Yi(e,t,i),An(i.stateNode),rt=s,It=r;break;case 5:vt||Ai(i,t);case 6:if(s=rt,r=It,rt=null,Yi(e,t,i),rt=s,It=r,rt!==null)if(It)try{(rt.nodeType===9?rt.body:rt.nodeName==="HTML"?rt.ownerDocument.body:rt).removeChild(i.stateNode)}catch(n){We(i,t,n)}else try{rt.removeChild(i.stateNode)}catch(n){We(i,t,n)}break;case 18:rt!==null&&(It?(e=rt,zf(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Hr(e)):zf(rt,i.stateNode));break;case 4:s=rt,r=It,rt=i.stateNode.containerInfo,It=!0,Yi(e,t,i),rt=s,It=r;break;case 0:case 11:case 14:case 15:gs(2,i,t),vt||gs(4,i,t),Yi(e,t,i);break;case 1:vt||(Ai(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&zh(i,t,s)),Yi(e,t,i);break;case 21:Yi(e,t,i);break;case 22:vt=(s=vt)||i.memoizedState!==null,Yi(e,t,i),vt=s;break;default:Yi(e,t,i)}}function Wh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hr(e)}catch(i){We(t,t.return,i)}}}function Fh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hr(e)}catch(i){We(t,t.return,i)}}function J_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Gh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Gh),t;default:throw Error(B(435,e.tag))}}function Ca(e,t){var i=J_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var r=ov.bind(null,e,s);s.then(r,r)}})}function Gt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var r=i[s],n=e,g=t,M=g;e:for(;M!==null;){switch(M.tag){case 27:if(xs(M.type)){rt=M.stateNode,It=!1;break e}break;case 5:rt=M.stateNode,It=!1;break e;case 3:case 4:rt=M.stateNode.containerInfo,It=!0;break e}M=M.return}if(rt===null)throw Error(B(160));Kh(n,g,r),rt=null,It=!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 gi=null;function Vh(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(t,e),Pt(e),s&4&&(gs(3,e,e.return),mn(3,e),gs(5,e,e.return));break;case 1:Gt(t,e),Pt(e),s&512&&(vt||i===null||Ai(i,i.return)),s&64&&Pi&&(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=gi;if(Gt(t,e),Pt(e),s&512&&(vt||i===null||Ai(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[Os]||n[St]||n.namespaceURI==="http://www.w3.org/2000/svg"||n.hasAttribute("itemprop"))&&(n=r.createElement(s),r.head.insertBefore(n,r.querySelector("head > title"))),Tt(n,s,i),n[St]=e,ct(n),s=n;break e;case"link":var g=Xf("link","href",r).get(s+(i.href||""));if(g){for(var M=0;M<g.length;M++)if(n=g[M],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)){g.splice(M,1);break t}}n=r.createElement(s),Tt(n,s,i),r.head.appendChild(n);break;case"meta":if(g=Xf("meta","content",r).get(s+(i.content||""))){for(M=0;M<g.length;M++)if(n=g[M],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)){g.splice(M,1);break t}}n=r.createElement(s),Tt(n,s,i),r.head.appendChild(n);break;default:throw Error(B(468,s))}n[St]=e,ct(n),s=n}e.stateNode=s}else Zf(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?Zf(r,e.type,e.stateNode):Vf(r,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Do(e,e.memoizedProps,i.memoizedProps)}break;case 27:Gt(t,e),Pt(e),s&512&&(vt||i===null||Ai(i,i.return)),i!==null&&s&4&&Do(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Gt(t,e),Pt(e),s&512&&(vt||i===null||Ai(i,i.return)),e.flags&32){r=e.stateNode;try{ls(r,"")}catch(Se){We(e,e.return,Se)}}s&4&&e.stateNode!=null&&(r=e.memoizedProps,Do(e,r,i!==null?i.memoizedProps:r)),s&1024&&(Mo=!0);break;case 6:if(Gt(t,e),Pt(e),s&4){if(e.stateNode===null)throw Error(B(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(Se){We(e,e.return,Se)}}break;case 3:if(za=null,r=gi,gi=Na(t.containerInfo),Gt(t,e),gi=r,Pt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{Hr(t.containerInfo)}catch(Se){We(e,e.return,Se)}Mo&&(Mo=!1,Xh(e));break;case 4:s=gi,gi=Na(e.stateNode.containerInfo),Gt(t,e),Pt(e),gi=s;break;case 12:Gt(t,e),Pt(e);break;case 31:Gt(t,e),Pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ca(e,s)));break;case 13:Gt(t,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(wa=at()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ca(e,s)));break;case 22:r=e.memoizedState!==null;var U=i!==null&&i.memoizedState!==null,X=Pi,ne=vt;if(Pi=X||r,vt=ne||U,Gt(t,e),vt=ne,Pi=X,Pt(e),s&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(i===null||U||Pi||vt||Xs(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){U=i=t;try{if(n=U.stateNode,r)g=n.style,typeof g.setProperty=="function"?g.setProperty("display","none","important"):g.display="none";else{M=U.stateNode;var he=U.memoizedProps.style,Z=he!=null&&he.hasOwnProperty("display")?he.display:null;M.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(Se){We(U,U.return,Se)}}}else if(t.tag===6){if(i===null){U=t;try{U.stateNode.nodeValue=r?"":U.memoizedProps}catch(Se){We(U,U.return,Se)}}}else if(t.tag===18){if(i===null){U=t;try{var ie=U.stateNode;r?Uf(ie,!0):Uf(U.stateNode,!1)}catch(Se){We(U,U.return,Se)}}}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,Ca(e,i))));break;case 19:Gt(t,e),Pt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Ca(e,s)));break;case 30:break;case 21:break;default:Gt(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(qh(s)){i=s;break}s=s.return}if(i==null)throw Error(B(160));switch(i.tag){case 27:var r=i.stateNode,n=To(e);ya(e,n,r);break;case 5:var g=i.stateNode;i.flags&32&&(ls(g,""),i.flags&=-33);var M=To(e);ya(e,M,g);break;case 3:case 4:var U=i.stateNode.containerInfo,X=To(e);Ro(e,X,U);break;default:throw Error(B(161))}}catch(ne){We(e,e.return,ne)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Xh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ki(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ph(e,t.alternate,t),t=t.sibling}function Xs(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:gs(4,t,t.return),Xs(t);break;case 1:Ai(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&zh(t,t.return,i),Xs(t);break;case 27:An(t.stateNode);case 26:case 5:Ai(t,t.return),Xs(t);break;case 22:t.memoizedState===null&&Xs(t);break;case 30:Xs(t);break;default:Xs(t)}e=e.sibling}}function Wi(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var s=t.alternate,r=e,n=t,g=n.flags;switch(n.tag){case 0:case 11:case 15:Wi(r,n,i),mn(4,n);break;case 1:if(Wi(r,n,i),s=n,r=s.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(X){We(s,s.return,X)}if(s=n,r=s.updateQueue,r!==null){var M=s.stateNode;try{var U=r.shared.hiddenCallbacks;if(U!==null)for(r.shared.hiddenCallbacks=null,r=0;r<U.length;r++)Au(U[r],M)}catch(X){We(s,s.return,X)}}i&&g&64&&jh(n),pn(n,n.return);break;case 27:Ih(n);case 26:case 5:Wi(r,n,i),i&&s===null&&g&4&&Uh(n),pn(n,n.return);break;case 12:Wi(r,n,i);break;case 31:Wi(r,n,i),i&&g&4&&Wh(r,n);break;case 13:Wi(r,n,i),i&&g&4&&Fh(r,n);break;case 22:n.memoizedState===null&&Wi(r,n,i),pn(n,n.return);break;case 30:break;default:Wi(r,n,i)}t=t.sibling}}function Lo(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&&sn(i))}function Oo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&sn(e))}function Si(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Zh(e,t,i,s),t=t.sibling}function Zh(e,t,i,s){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Si(e,t,i,s),r&2048&&mn(9,t);break;case 1:Si(e,t,i,s);break;case 3:Si(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&&sn(e)));break;case 12:if(r&2048){Si(e,t,i,s),e=t.stateNode;try{var n=t.memoizedProps,g=n.id,M=n.onPostCommit;typeof M=="function"&&M(g,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(U){We(t,t.return,U)}}else Si(e,t,i,s);break;case 31:Si(e,t,i,s);break;case 13:Si(e,t,i,s);break;case 23:break;case 22:n=t.stateNode,g=t.alternate,t.memoizedState!==null?n._visibility&2?Si(e,t,i,s):gn(e,t):n._visibility&2?Si(e,t,i,s):(n._visibility|=2,wr(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),r&2048&&Lo(g,t);break;case 24:Si(e,t,i,s),r&2048&&Oo(t.alternate,t);break;default:Si(e,t,i,s)}}function wr(e,t,i,s,r){for(r=r&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var n=e,g=t,M=i,U=s,X=g.flags;switch(g.tag){case 0:case 11:case 15:wr(n,g,M,U,r),mn(8,g);break;case 23:break;case 22:var ne=g.stateNode;g.memoizedState!==null?ne._visibility&2?wr(n,g,M,U,r):gn(n,g):(ne._visibility|=2,wr(n,g,M,U,r)),r&&X&2048&&Lo(g.alternate,g);break;case 24:wr(n,g,M,U,r),r&&X&2048&&Oo(g.alternate,g);break;default:wr(n,g,M,U,r)}t=t.sibling}}function gn(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:gn(i,s),r&2048&&Lo(s.alternate,s);break;case 24:gn(i,s),r&2048&&Oo(s.alternate,s);break;default:gn(i,s)}t=t.sibling}}var Sn=8192;function xr(e,t,i){if(e.subtreeFlags&Sn)for(e=e.child;e!==null;)$h(e,t,i),e=e.sibling}function $h(e,t,i){switch(e.tag){case 26:xr(e,t,i),e.flags&Sn&&e.memoizedState!==null&&Uv(i,gi,e.memoizedState,e.memoizedProps);break;case 5:xr(e,t,i);break;case 3:case 4:var s=gi;gi=Na(e.stateNode.containerInfo),xr(e,t,i),gi=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Sn,Sn=16777216,xr(e,t,i),Sn=s):xr(e,t,i));break;default:xr(e,t,i)}}function Qh(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 bn(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];Ct=s,ef(s,e)}Qh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Jh(e),e=e.sibling}function Jh(e){switch(e.tag){case 0:case 11:case 15:bn(e),e.flags&2048&&gs(9,e,e.return);break;case 3:bn(e);break;case 12:bn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ea(e)):bn(e);break;default:bn(e)}}function Ea(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];Ct=s,ef(s,e)}Qh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:gs(8,t,t.return),Ea(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Ea(t));break;default:Ea(t)}e=e.sibling}}function ef(e,t){for(;Ct!==null;){var i=Ct;switch(i.tag){case 0:case 11:case 15:gs(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:sn(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,Ct=s;else e:for(i=e;Ct!==null;){s=Ct;var r=s.sibling,n=s.return;if(Yh(s),s===i){Ct=null;break e}if(r!==null){r.return=n,Ct=r;break e}Ct=n}}}var ev={getCacheForType:function(e){var t=At(ft),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return At(ft).controller.signal}},tv=typeof WeakMap=="function"?WeakMap:Map,Ge=0,Ze=null,Le=null,Be=0,Ke=0,$t=null,Ss=!1,Ar=!1,Bo=!1,Fi=0,ot=0,bs=0,Zs=0,ko=0,Qt=0,Dr=0,yn=null,Yt=null,Ho=!1,wa=0,tf=0,xa=1/0,Aa=null,ys=null,bt=0,Cs=null,Tr=null,Vi=0,No=0,jo=null,sf=null,Cn=0,zo=null;function Jt(){return(Ge&2)!==0&&Be!==0?Be&-Be:G.T!==null?Yo():jt()}function rf(){if(Qt===0)if((Be&536870912)===0||Ne){var e=er;er<<=1,(er&3932160)===0&&(er=262144),Qt=e}else Qt=536870912;return e=Xt.current,e!==null&&(e.flags|=32),Qt}function Kt(e,t,i){(e===Ze&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(Rr(e,0),Es(e,Be,Qt,!1)),si(e,i),((Ge&2)===0||e!==Ze)&&(e===Ze&&((Ge&2)===0&&(Zs|=i),ot===4&&Es(e,Be,Qt,!1)),Di(e))}function nf(e,t,i){if((Ge&6)!==0)throw Error(B(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||$i(e,t),r=s?rv(e,t):qo(e,t,!0),n=s;do{if(r===0){Ar&&!s&&Es(e,t,0,!1);break}else{if(i=e.current.alternate,n&&!iv(i)){r=qo(e,t,!1),n=!1;continue}if(r===2){if(n=t,e.errorRecoveryDisabledLanes&n)var g=0;else g=e.pendingLanes&-536870913,g=g!==0?g:g&536870912?536870912:0;if(g!==0){t=g;e:{var M=e;r=yn;var U=M.current.memoizedState.isDehydrated;if(U&&(Rr(M,g).flags|=256),g=qo(M,g,!1),g!==2){if(Bo&&!U){M.errorRecoveryDisabledLanes|=n,Zs|=n,r=4;break e}n=Yt,Yt=r,n!==null&&(Yt===null?Yt=n:Yt.push.apply(Yt,n))}r=g}if(n=!1,r!==2)continue}}if(r===1){Rr(e,0),Es(e,t,0,!0);break}e:{switch(s=e,n=r,n){case 0:case 1:throw Error(B(345));case 4:if((t&4194048)!==t)break;case 6:Es(s,t,Qt,!Ss);break e;case 2:Yt=null;break;case 3:case 5:break;default:throw Error(B(329))}if((t&62914560)===t&&(r=wa+300-at(),10<r)){if(Es(s,t,Qt,!Ss),ir(s,0,!0)!==0)break e;Vi=t,s.timeoutHandle=Nf(af.bind(null,s,i,Yt,Aa,Ho,t,Qt,Zs,Dr,Ss,n,"Throttled",-0,0),r);break e}af(s,i,Yt,Aa,Ho,t,Qt,Zs,Dr,Ss,n,null,-0,0)}}break}while(!0);Di(e)}function af(e,t,i,s,r,n,g,M,U,X,ne,he,Z,ie){if(e.timeoutHandle=-1,he=t.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bi},$h(t,n,he);var Se=(n&62914560)===n?wa-at():(n&4194048)===n?tf-at():0;if(Se=qv(he,Se),Se!==null){Vi=n,e.cancelPendingCommit=Se(_f.bind(null,e,t,n,i,s,r,g,M,U,ne,he,null,Z,ie)),Es(e,n,g,!X);return}}_f(e,t,n,i,s,r,g,M,U)}function iv(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(!Ft(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 Es(e,t,i,s){t&=~ko,t&=~Zs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var n=31-wt(r),g=1<<n;s[n]=-1,r&=~g}i!==0&&Mi(e,i,t)}function Da(){return(Ge&6)===0?(En(0),!1):!0}function Uo(){if(Le!==null){if(Ke===0)var e=Le.return;else e=Le,ji=Is=null,eo(e),Sr=null,nn=0,e=Le;for(;e!==null;)Nh(e.alternate,e),e=e.return;Le=null}}function Rr(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,Cv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Vi=0,Uo(),Ze=e,Le=i=Hi(e.current,null),Be=t,Ke=0,$t=null,Ss=!1,Ar=$i(e,t),Bo=!1,Dr=Qt=ko=Zs=bs=ot=0,Yt=yn=null,Ho=!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-wt(s),n=1<<r;t|=e[r],s&=~n}return Fi=t,Vn(),i}function lf(e,t){Re=null,G.H=dn,t===gr||t===ia?(t=Cu(),Ke=3):t===Gl?(t=Cu(),Ke=4):Ke=t===po?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,$t=t,Le===null&&(ot=1,ma(e,li(t,e.current)))}function of(){var e=Xt.current;return e===null?!0:(Be&4194048)===Be?hi===null:(Be&62914560)===Be||(Be&536870912)!==0?e===hi:!1}function cf(){var e=G.H;return G.H=dn,e===null?dn:e}function uf(){var e=G.A;return G.A=ev,e}function Ta(){ot=4,Ss||(Be&4194048)!==Be&&Xt.current!==null||(Ar=!0),(bs&134217727)===0&&(Zs&134217727)===0||Ze===null||Es(Ze,Be,Qt,!1)}function qo(e,t,i){var s=Ge;Ge|=2;var r=cf(),n=uf();(Ze!==e||Be!==t)&&(Aa=null,Rr(e,t)),t=!1;var g=ot;e:do try{if(Ke!==0&&Le!==null){var M=Le,U=$t;switch(Ke){case 8:Uo(),g=6;break e;case 3:case 2:case 9:case 6:Xt.current===null&&(t=!0);var X=Ke;if(Ke=0,$t=null,Mr(e,M,U,X),i&&Ar){g=0;break e}break;default:X=Ke,Ke=0,$t=null,Mr(e,M,U,X)}}sv(),g=ot;break}catch(ne){lf(e,ne)}while(!0);return t&&e.shellSuspendCounter++,ji=Is=null,Ge=s,G.H=r,G.A=n,Le===null&&(Ze=null,Be=0,Vn()),g}function sv(){for(;Le!==null;)hf(Le)}function rv(e,t){var i=Ge;Ge|=2;var s=cf(),r=uf();Ze!==e||Be!==t?(Aa=null,xa=at()+500,Rr(e,t)):Ar=$i(e,t);e:do try{if(Ke!==0&&Le!==null){t=Le;var n=$t;t:switch(Ke){case 1:Ke=0,$t=null,Mr(e,t,n,1);break;case 2:case 9:if(bu(n)){Ke=0,$t=null,ff(t);break}t=function(){Ke!==2&&Ke!==9||Ze!==e||(Ke=7),Di(e)},n.then(t,t);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:bu(n)?(Ke=0,$t=null,ff(t)):(Ke=0,$t=null,Mr(e,t,n,7));break;case 5:var g=null;switch(Le.tag){case 26:g=Le.memoizedState;case 5:case 27:var M=Le;if(g?$f(g):M.stateNode.complete){Ke=0,$t=null;var U=M.sibling;if(U!==null)Le=U;else{var X=M.return;X!==null?(Le=X,Ra(X)):Le=null}break t}}Ke=0,$t=null,Mr(e,t,n,5);break;case 6:Ke=0,$t=null,Mr(e,t,n,6);break;case 8:Uo(),ot=6;break e;default:throw Error(B(462))}}nv();break}catch(ne){lf(e,ne)}while(!0);return ji=Is=null,G.H=s,G.A=r,Ge=i,Le!==null?0:(Ze=null,Be=0,Vn(),ot)}function nv(){for(;Le!==null&&!_i();)hf(Le)}function hf(e){var t=kh(e.alternate,e,Fi);e.memoizedProps=e.pendingProps,t===null?Ra(e):Le=t}function ff(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=Th(i,t,t.pendingProps,t.type,void 0,Be);break;case 11:t=Th(i,t,t.pendingProps,t.type.render,t.ref,Be);break;case 5:eo(t);default:Nh(i,t),t=Le=cu(t,Fi),t=kh(i,t,Fi)}e.memoizedProps=e.pendingProps,t===null?Ra(e):Le=t}function Mr(e,t,i,s){ji=Is=null,eo(t),Sr=null,nn=0;var r=t.return;try{if(F_(e,r,t,i,Be)){ot=1,ma(e,li(i,e.current)),Le=null;return}}catch(n){if(r!==null)throw Le=r,n;ot=1,ma(e,li(i,e.current)),Le=null;return}t.flags&32768?(Ne||s===1?e=!0:Ar||(Be&536870912)!==0?e=!1:(Ss=e=!0,(s===2||s===9||s===3||s===6)&&(s=Xt.current,s!==null&&s.tag===13&&(s.flags|=16384))),df(t,e)):Ra(t)}function Ra(e){var t=e;do{if((t.flags&32768)!==0){df(t,Ss);return}e=t.return;var i=Z_(t.alternate,t,Fi);if(i!==null){Le=i;return}if(t=t.sibling,t!==null){Le=t;return}Le=t=e}while(t!==null);ot===0&&(ot=5)}function df(e,t){do{var i=$_(e.alternate,e);if(i!==null){i.flags&=32767,Le=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Le=e;return}Le=e=i}while(e!==null);ot=6,Le=null}function _f(e,t,i,s,r,n,g,M,U){e.cancelPendingCommit=null;do Ma();while(bt!==0);if((Ge&6)!==0)throw Error(B(327));if(t!==null){if(t===e.current)throw Error(B(177));if(n=t.lanes|t.childLanes,n|=Dl,sr(e,i,n,g,M,U),e===Ze&&(Le=Ze=null,Be=0),Tr=t,Cs=e,Vi=i,No=n,jo=r,sf=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,cv(Et,function(){return Sf(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=G.T,G.T=null,r=J.p,J.p=2,g=Ge,Ge|=4;try{Q_(e,t,i)}finally{Ge=g,J.p=r,G.T=s}}bt=1,vf(),mf(),pf()}}function vf(){if(bt===1){bt=0;var e=Cs,t=Tr,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=G.T,G.T=null;var s=J.p;J.p=2;var r=Ge;Ge|=4;try{Vh(t,e);var n=Qo,g=eu(e.containerInfo),M=n.focusedElem,U=n.selectionRange;if(g!==M&&M&&M.ownerDocument&&Jc(M.ownerDocument.documentElement,M)){if(U!==null&&Cl(M)){var X=U.start,ne=U.end;if(ne===void 0&&(ne=X),"selectionStart"in M)M.selectionStart=X,M.selectionEnd=Math.min(ne,M.value.length);else{var he=M.ownerDocument||document,Z=he&&he.defaultView||window;if(Z.getSelection){var ie=Z.getSelection(),Se=M.textContent.length,Ae=Math.min(U.start,Se),Xe=U.end===void 0?Ae:Math.min(U.end,Se);!ie.extend&&Ae>Xe&&(g=Xe,Xe=Ae,Ae=g);var W=Qc(M,Ae),P=Qc(M,Xe);if(W&&P&&(ie.rangeCount!==1||ie.anchorNode!==W.node||ie.anchorOffset!==W.offset||ie.focusNode!==P.node||ie.focusOffset!==P.offset)){var V=he.createRange();V.setStart(W.node,W.offset),ie.removeAllRanges(),Ae>Xe?(ie.addRange(V),ie.extend(P.node,P.offset)):(V.setEnd(P.node,P.offset),ie.addRange(V))}}}}for(he=[],ie=M;ie=ie.parentNode;)ie.nodeType===1&&he.push({element:ie,left:ie.scrollLeft,top:ie.scrollTop});for(typeof M.focus=="function"&&M.focus(),M=0;M<he.length;M++){var oe=he[M];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}Ga=!!$o,Qo=$o=null}finally{Ge=r,J.p=s,G.T=i}}e.current=t,bt=2}}function mf(){if(bt===2){bt=0;var e=Cs,t=Tr,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=G.T,G.T=null;var s=J.p;J.p=2;var r=Ge;Ge|=4;try{Ph(e,t.alternate,t)}finally{Ge=r,J.p=s,G.T=i}}bt=3}}function pf(){if(bt===4||bt===3){bt=0,pt();var e=Cs,t=Tr,i=Vi,s=sf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?bt=5:(bt=0,Tr=Cs=null,gf(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(ys=null),Ir(i),t=t.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(Ut,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=G.T,r=J.p,J.p=2,G.T=null;try{for(var n=e.onRecoverableError,g=0;g<s.length;g++){var M=s[g];n(M.value,{componentStack:M.stack})}}finally{G.T=t,J.p=r}}(Vi&3)!==0&&Ma(),Di(e),r=e.pendingLanes,(i&261930)!==0&&(r&42)!==0?e===zo?Cn++:(Cn=0,zo=e):Cn=0,En(0)}}function gf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,sn(t)))}function Ma(){return vf(),mf(),pf(),Sf()}function Sf(){if(bt!==5)return!1;var e=Cs,t=No;No=0;var i=Ir(Vi),s=G.T,r=J.p;try{J.p=32>i?32:i,G.T=null,i=jo,jo=null;var n=Cs,g=Vi;if(bt=0,Tr=Cs=null,Vi=0,(Ge&6)!==0)throw Error(B(331));var M=Ge;if(Ge|=4,Jh(n.current),Zh(n,n.current,g,i),Ge=M,En(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(Ut,n)}catch{}return!0}finally{J.p=r,G.T=s,gf(e,t)}}function bf(e,t,i){t=li(i,t),t=mo(e.stateNode,t,2),e=vs(e,t,2),e!==null&&(si(e,2),Di(e))}function We(e,t,i){if(e.tag===3)bf(e,e,i);else for(;t!==null;){if(t.tag===3){bf(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(ys===null||!ys.has(s))){e=li(i,e),i=bh(2),s=vs(t,i,2),s!==null&&(yh(i,s,t,e),si(s,2),Di(s));break}}t=t.return}}function Io(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new tv;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)||(Bo=!0,r.add(i),e=av.bind(null,e,t,i),t.then(e,e))}function av(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ze===e&&(Be&i)===i&&(ot===4||ot===3&&(Be&62914560)===Be&&300>at()-wa?(Ge&2)===0&&Rr(e,0):ko|=i,Dr===Be&&(Dr=0)),Di(e)}function yf(e,t){t===0&&(t=Ot()),e=zs(e,t),e!==null&&(si(e,t),Di(e))}function lv(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),yf(e,i)}function ov(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(B(314))}s!==null&&s.delete(t),yf(e,i)}function cv(e,t){return Mt(e,t)}var La=null,Lr=null,Go=!1,Oa=!1,Po=!1,ws=0;function Di(e){e!==Lr&&e.next===null&&(Lr===null?La=Lr=e:Lr=Lr.next=e),Oa=!0,Go||(Go=!0,hv())}function En(e,t){if(!Po&&Oa){Po=!0;do for(var i=!1,s=La;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var n=0;else{var g=s.suspendedLanes,M=s.pingedLanes;n=(1<<31-wt(42|e)+1)-1,n&=r&~(g&~M),n=n&201326741?n&201326741|1:n?n|2:0}n!==0&&(i=!0,xf(s,n))}else n=Be,n=ir(s,s===Ze?n:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(n&3)===0||$i(s,n)||(i=!0,xf(s,n));s=s.next}while(i);Po=!1}}function uv(){Cf()}function Cf(){Oa=Go=!1;var e=0;ws!==0&&yv()&&(e=ws);for(var t=at(),i=null,s=La;s!==null;){var r=s.next,n=Ef(s,t);n===0?(s.next=null,i===null?La=r:i.next=r,r===null&&(Lr=i)):(i=s,(e!==0||(n&3)!==0)&&(Oa=!0)),s=r}bt!==0&&bt!==5||En(e),ws!==0&&(ws=0)}function Ef(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,n=e.pendingLanes&-62914561;0<n;){var g=31-wt(n),M=1<<g,U=r[g];U===-1?((M&i)===0||(M&s)!==0)&&(r[g]=al(M,t)):U<=t&&(e.expiredLanes|=M),n&=~M}if(t=Ze,i=Be,i=ir(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&ii(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||$i(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&ii(s),Ir(i)){case 2:case 8:i=Ti;break;case 32:i=Et;break;case 268435456:i=Nt;break;default:i=Et}return s=wf.bind(null,e),i=Mt(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&ii(s),e.callbackPriority=2,e.callbackNode=null,2}function wf(e,t){if(bt!==0&&bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Ma()&&e.callbackNode!==i)return null;var s=Be;return s=ir(e,e===Ze?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(nf(e,s,t),Ef(e,at()),e.callbackNode!=null&&e.callbackNode===i?wf.bind(null,e):null)}function xf(e,t){if(Ma())return null;nf(e,t,!0)}function hv(){Ev(function(){(Ge&6)!==0?Mt(vi,uv):Cf()})}function Yo(){if(ws===0){var e=mr;e===0&&(e=Js,Js<<=1,(Js&261888)===0&&(Js=256)),ws=e}return ws}function Af(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:qn(""+e)}function Df(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 fv(e,t,i,s,r){if(t==="submit"&&i&&i.stateNode===r){var n=Af((r[Bt]||null).action),g=s.submitter;g&&(t=(t=g[Bt]||null)?Af(t.formAction):g.getAttribute("formAction"),t!==null&&(n=t,g=null));var M=new Yn("action","action",null,s,r);e.push({event:M,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(ws!==0){var U=g?Df(r,g):new FormData(r);co(i,{pending:!0,data:U,method:r.method,action:n},null,U)}}else typeof n=="function"&&(M.preventDefault(),U=g?Df(r,g):new FormData(r),co(i,{pending:!0,data:U,method:r.method,action:n},n,U))},currentTarget:r}]})}}for(var Ko=0;Ko<Al.length;Ko++){var Wo=Al[Ko],dv=Wo.toLowerCase(),_v=Wo[0].toUpperCase()+Wo.slice(1);pi(dv,"on"+_v)}pi(su,"onAnimationEnd"),pi(ru,"onAnimationIteration"),pi(nu,"onAnimationStart"),pi("dblclick","onDoubleClick"),pi("focusin","onFocus"),pi("focusout","onBlur"),pi(M_,"onTransitionRun"),pi(L_,"onTransitionStart"),pi(O_,"onTransitionCancel"),pi(au,"onTransitionEnd"),is("onMouseEnter",["mouseout","mouseover"]),is("onMouseLeave",["mouseout","mouseover"]),is("onPointerEnter",["pointerout","pointerover"]),is("onPointerLeave",["pointerout","pointerover"]),Ei("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ei("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ei("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ei("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ei("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ei("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wn="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(" "),vv=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wn));function Tf(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 g=s.length-1;0<=g;g--){var M=s[g],U=M.instance,X=M.currentTarget;if(M=M.listener,U!==n&&r.isPropagationStopped())break e;n=M,r.currentTarget=X;try{n(r)}catch(ne){Fn(ne)}r.currentTarget=null,n=U}else for(g=0;g<s.length;g++){if(M=s[g],U=M.instance,X=M.currentTarget,M=M.listener,U!==n&&r.isPropagationStopped())break e;n=M,r.currentTarget=X;try{n(r)}catch(ne){Fn(ne)}r.currentTarget=null,n=U}}}}function Oe(e,t){var i=t[rr];i===void 0&&(i=t[rr]=new Set);var s=e+"__bubble";i.has(s)||(Rf(t,e,2,!1),i.add(s))}function Fo(e,t,i){var s=0;t&&(s|=4),Rf(i,e,s,t)}var Ba="_reactListening"+Math.random().toString(36).slice(2);function Vo(e){if(!e[Ba]){e[Ba]=!0,Pr.forEach(function(i){i!=="selectionchange"&&(vv.has(i)||Fo(i,!1,e),Fo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ba]||(t[Ba]=!0,Fo("selectionchange",!1,t))}}function Rf(e,t,i,s){switch(rd(t)){case 2:var r=Pv;break;case 8:r=Yv;break;default:r=cc}i=r.bind(null,t,i,e),r=void 0,!dl||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 Xo(e,t,i,s,r){var n=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var g=s.tag;if(g===3||g===4){var M=s.stateNode.containerInfo;if(M===r)break;if(g===4)for(g=s.return;g!==null;){var U=g.tag;if((U===3||U===4)&&g.stateNode.containerInfo===r)return;g=g.return}for(;M!==null;){if(g=Ji(M),g===null)return;if(U=g.tag,U===5||U===6||U===26||U===27){s=n=g;continue e}M=M.parentNode}}s=s.return}Bc(function(){var X=n,ne=hl(i),he=[];e:{var Z=lu.get(e);if(Z!==void 0){var ie=Yn,Se=e;switch(e){case"keypress":if(Gn(i)===0)break e;case"keydown":case"keyup":ie=o_;break;case"focusin":Se="focus",ie=pl;break;case"focusout":Se="blur",ie=pl;break;case"beforeblur":case"afterblur":ie=pl;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":ie=Nc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ie=Zd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ie=h_;break;case su:case ru:case nu:ie=Jd;break;case au:ie=d_;break;case"scroll":case"scrollend":ie=Vd;break;case"wheel":ie=v_;break;case"copy":case"cut":case"paste":ie=t_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ie=zc;break;case"toggle":case"beforetoggle":ie=p_}var Ae=(t&4)!==0,Xe=!Ae&&(e==="scroll"||e==="scrollend"),W=Ae?Z!==null?Z+"Capture":null:Z;Ae=[];for(var P=X,V;P!==null;){var oe=P;if(V=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||V===null||W===null||(oe=Kr(P,W),oe!=null&&Ae.push(xn(P,oe,V))),Xe)break;P=P.return}0<Ae.length&&(Z=new ie(Z,Se,null,i,ne),he.push({event:Z,listeners:Ae}))}}if((t&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",ie=e==="mouseout"||e==="pointerout",Z&&i!==ul&&(Se=i.relatedTarget||i.fromElement)&&(Ji(Se)||Se[Li]))break e;if((ie||Z)&&(Z=ne.window===ne?ne:(Z=ne.ownerDocument)?Z.defaultView||Z.parentWindow:window,ie?(Se=i.relatedTarget||i.toElement,ie=X,Se=Se?Ji(Se):null,Se!==null&&(Xe=ue(Se),Ae=Se.tag,Se!==Xe||Ae!==5&&Ae!==27&&Ae!==6)&&(Se=null)):(ie=null,Se=X),ie!==Se)){if(Ae=Nc,oe="onMouseLeave",W="onMouseEnter",P="mouse",(e==="pointerout"||e==="pointerover")&&(Ae=zc,oe="onPointerLeave",W="onPointerEnter",P="pointer"),Xe=ie==null?Z:es(ie),V=Se==null?Z:es(Se),Z=new Ae(oe,P+"leave",ie,i,ne),Z.target=Xe,Z.relatedTarget=V,oe=null,Ji(ne)===X&&(Ae=new Ae(W,P+"enter",Se,i,ne),Ae.target=V,Ae.relatedTarget=Xe,oe=Ae),Xe=oe,ie&&Se)t:{for(Ae=mv,W=ie,P=Se,V=0,oe=W;oe;oe=Ae(oe))V++;oe=0;for(var Ce=P;Ce;Ce=Ae(Ce))oe++;for(;0<V-oe;)W=Ae(W),V--;for(;0<oe-V;)P=Ae(P),oe--;for(;V--;){if(W===P||P!==null&&W===P.alternate){Ae=W;break t}W=Ae(W),P=Ae(P)}Ae=null}else Ae=null;ie!==null&&Mf(he,Z,ie,Ae,!1),Se!==null&&Xe!==null&&Mf(he,Xe,Se,Ae,!0)}}e:{if(Z=X?es(X):window,ie=Z.nodeName&&Z.nodeName.toLowerCase(),ie==="select"||ie==="input"&&Z.type==="file")var qe=Wc;else if(Yc(Z))if(Fc)qe=D_;else{qe=x_;var be=w_}else ie=Z.nodeName,!ie||ie.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?X&&cl(X.elementType)&&(qe=Wc):qe=A_;if(qe&&(qe=qe(e,X))){Kc(he,qe,i,ne);break e}be&&be(e,Z,X),e==="focusout"&&X&&Z.type==="number"&&X.memoizedProps.value!=null&&ns(Z,"number",Z.value)}switch(be=X?es(X):window,e){case"focusin":(Yc(be)||be.contentEditable==="true")&&(or=be,El=X,Jr=null);break;case"focusout":Jr=El=or=null;break;case"mousedown":wl=!0;break;case"contextmenu":case"mouseup":case"dragend":wl=!1,tu(he,i,ne);break;case"selectionchange":if(R_)break;case"keydown":case"keyup":tu(he,i,ne)}var Me;if(Sl)e:{switch(e){case"compositionstart":var ke="onCompositionStart";break e;case"compositionend":ke="onCompositionEnd";break e;case"compositionupdate":ke="onCompositionUpdate";break e}ke=void 0}else lr?Gc(e,i)&&(ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ke="onCompositionStart");ke&&(Uc&&i.locale!=="ko"&&(lr||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&lr&&(Me=kc()):(os=ne,_l="value"in os?os.value:os.textContent,lr=!0)),be=ka(X,ke),0<be.length&&(ke=new jc(ke,e,null,i,ne),he.push({event:ke,listeners:be}),Me?ke.data=Me:(Me=Pc(i),Me!==null&&(ke.data=Me)))),(Me=S_?b_(e,i):y_(e,i))&&(ke=ka(X,"onBeforeInput"),0<ke.length&&(be=new jc("onBeforeInput","beforeinput",null,i,ne),he.push({event:be,listeners:ke}),be.data=Me)),fv(he,e,X,i,ne)}Tf(he,t)})}function xn(e,t,i){return{instance:e,listener:t,currentTarget:i}}function ka(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=Kr(e,i),r!=null&&s.unshift(xn(e,r,n)),r=Kr(e,t),r!=null&&s.push(xn(e,r,n))),e.tag===3)return s;e=e.return}return[]}function mv(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Mf(e,t,i,s,r){for(var n=t._reactName,g=[];i!==null&&i!==s;){var M=i,U=M.alternate,X=M.stateNode;if(M=M.tag,U!==null&&U===s)break;M!==5&&M!==26&&M!==27||X===null||(U=X,r?(X=Kr(i,n),X!=null&&g.unshift(xn(i,X,U))):r||(X=Kr(i,n),X!=null&&g.push(xn(i,X,U)))),i=i.return}g.length!==0&&e.push({event:t,listeners:g})}var pv=/\r\n?/g,gv=/\u0000|\uFFFD/g;function Lf(e){return(typeof e=="string"?e:""+e).replace(pv,`
|
|
9
|
+
`).replace(gv,"")}function Of(e,t){return t=Lf(t),Lf(e)===t}function Ve(e,t,i,s,r,n){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||ls(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&ls(e,""+s);break;case"className":we(e,"class",s);break;case"tabIndex":we(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":we(e,i,s);break;case"style":Lc(e,s,n);break;case"data":if(t!=="object"){we(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=qn(""+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"&&Ve(e,t,"name",r.name,r,null),Ve(e,t,"formEncType",r.formEncType,r,null),Ve(e,t,"formMethod",r.formMethod,r,null),Ve(e,t,"formTarget",r.formTarget,r,null)):(Ve(e,t,"encType",r.encType,r,null),Ve(e,t,"method",r.method,r,null),Ve(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=qn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=Bi);break;case"onScroll":s!=null&&Oe("scroll",e);break;case"onScrollEnd":s!=null&&Oe("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(B(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(B(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=qn(""+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":Oe("beforetoggle",e),Oe("toggle",e),de(e,"popover",s);break;case"xlinkActuate":ye(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":ye(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":ye(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":ye(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":ye(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":ye(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":ye(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":ye(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":ye(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":de(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=Wd.get(i)||i,de(e,i,s))}}function Zo(e,t,i,s,r,n){switch(i){case"style":Lc(e,s,n);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(B(61));if(i=s.__html,i!=null){if(r.children!=null)throw Error(B(60));e.innerHTML=i}}break;case"children":typeof s=="string"?ls(e,s):(typeof s=="number"||typeof s=="bigint")&&ls(e,""+s);break;case"onScroll":s!=null&&Oe("scroll",e);break;case"onScrollEnd":s!=null&&Oe("scrollend",e);break;case"onClick":s!=null&&(e.onclick=Bi);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Un.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[Bt]||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,""):de(e,i,s)}}}function Tt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Oe("error",e),Oe("load",e);var s=!1,r=!1,n;for(n in i)if(i.hasOwnProperty(n)){var g=i[n];if(g!=null)switch(n){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(B(137,t));default:Ve(e,t,n,g,i,null)}}r&&Ve(e,t,"srcSet",i.srcSet,i,null),s&&Ve(e,t,"src",i.src,i,null);return;case"input":Oe("invalid",e);var M=n=g=r=null,U=null,X=null;for(s in i)if(i.hasOwnProperty(s)){var ne=i[s];if(ne!=null)switch(s){case"name":r=ne;break;case"type":g=ne;break;case"checked":U=ne;break;case"defaultChecked":X=ne;break;case"value":n=ne;break;case"defaultValue":M=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(B(137,t));break;default:Ve(e,t,s,ne,i,null)}}rs(e,n,M,U,X,g,r,!1);return;case"select":Oe("invalid",e),s=g=n=null;for(r in i)if(i.hasOwnProperty(r)&&(M=i[r],M!=null))switch(r){case"value":n=M;break;case"defaultValue":g=M;break;case"multiple":s=M;default:Ve(e,t,r,M,i,null)}t=n,i=g,e.multiple=!!s,t!=null?as(e,!!s,t,!1):i!=null&&as(e,!!s,i,!0);return;case"textarea":Oe("invalid",e),n=r=s=null;for(g in i)if(i.hasOwnProperty(g)&&(M=i[g],M!=null))switch(g){case"value":s=M;break;case"defaultValue":r=M;break;case"children":n=M;break;case"dangerouslySetInnerHTML":if(M!=null)throw Error(B(91));break;default:Ve(e,t,g,M,i,null)}ni(e,s,r,n);return;case"option":for(U in i)i.hasOwnProperty(U)&&(s=i[U],s!=null)&&(U==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":Ve(e,t,U,s,i,null));return;case"dialog":Oe("beforetoggle",e),Oe("toggle",e),Oe("cancel",e),Oe("close",e);break;case"iframe":case"object":Oe("load",e);break;case"video":case"audio":for(s=0;s<wn.length;s++)Oe(wn[s],e);break;case"image":Oe("error",e),Oe("load",e);break;case"details":Oe("toggle",e);break;case"embed":case"source":case"link":Oe("error",e),Oe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in i)if(i.hasOwnProperty(X)&&(s=i[X],s!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(B(137,t));default:Ve(e,t,X,s,i,null)}return;default:if(cl(t)){for(ne in i)i.hasOwnProperty(ne)&&(s=i[ne],s!==void 0&&Zo(e,t,ne,s,i,void 0));return}}for(M in i)i.hasOwnProperty(M)&&(s=i[M],s!=null&&Ve(e,t,M,s,i,null))}function Sv(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,g=null,M=null,U=null,X=null,ne=null;for(ie in i){var he=i[ie];if(i.hasOwnProperty(ie)&&he!=null)switch(ie){case"checked":break;case"value":break;case"defaultValue":U=he;default:s.hasOwnProperty(ie)||Ve(e,t,ie,null,s,he)}}for(var Z in s){var ie=s[Z];if(he=i[Z],s.hasOwnProperty(Z)&&(ie!=null||he!=null))switch(Z){case"type":n=ie;break;case"name":r=ie;break;case"checked":X=ie;break;case"defaultChecked":ne=ie;break;case"value":g=ie;break;case"defaultValue":M=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(B(137,t));break;default:ie!==he&&Ve(e,t,Z,ie,s,he)}}ss(e,g,M,U,X,ne,n,r);return;case"select":ie=g=M=Z=null;for(n in i)if(U=i[n],i.hasOwnProperty(n)&&U!=null)switch(n){case"value":break;case"multiple":ie=U;default:s.hasOwnProperty(n)||Ve(e,t,n,null,s,U)}for(r in s)if(n=s[r],U=i[r],s.hasOwnProperty(r)&&(n!=null||U!=null))switch(r){case"value":Z=n;break;case"defaultValue":M=n;break;case"multiple":g=n;default:n!==U&&Ve(e,t,r,n,s,U)}t=M,i=g,s=ie,Z!=null?as(e,!!i,Z,!1):!!s!=!!i&&(t!=null?as(e,!!i,t,!0):as(e,!!i,i?[]:"",!1));return;case"textarea":ie=Z=null;for(M in i)if(r=i[M],i.hasOwnProperty(M)&&r!=null&&!s.hasOwnProperty(M))switch(M){case"value":break;case"children":break;default:Ve(e,t,M,null,s,r)}for(g in s)if(r=s[g],n=i[g],s.hasOwnProperty(g)&&(r!=null||n!=null))switch(g){case"value":Z=r;break;case"defaultValue":ie=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(B(91));break;default:r!==n&&Ve(e,t,g,r,s,n)}ol(e,Z,ie);return;case"option":for(var Se in i)Z=i[Se],i.hasOwnProperty(Se)&&Z!=null&&!s.hasOwnProperty(Se)&&(Se==="selected"?e.selected=!1:Ve(e,t,Se,null,s,Z));for(U in s)Z=s[U],ie=i[U],s.hasOwnProperty(U)&&Z!==ie&&(Z!=null||ie!=null)&&(U==="selected"?e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":Ve(e,t,U,Z,s,ie));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 Ae in i)Z=i[Ae],i.hasOwnProperty(Ae)&&Z!=null&&!s.hasOwnProperty(Ae)&&Ve(e,t,Ae,null,s,Z);for(X in s)if(Z=s[X],ie=i[X],s.hasOwnProperty(X)&&Z!==ie&&(Z!=null||ie!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(B(137,t));break;default:Ve(e,t,X,Z,s,ie)}return;default:if(cl(t)){for(var Xe in i)Z=i[Xe],i.hasOwnProperty(Xe)&&Z!==void 0&&!s.hasOwnProperty(Xe)&&Zo(e,t,Xe,void 0,s,Z);for(ne in s)Z=s[ne],ie=i[ne],!s.hasOwnProperty(ne)||Z===ie||Z===void 0&&ie===void 0||Zo(e,t,ne,Z,s,ie);return}}for(var W in i)Z=i[W],i.hasOwnProperty(W)&&Z!=null&&!s.hasOwnProperty(W)&&Ve(e,t,W,null,s,Z);for(he in s)Z=s[he],ie=i[he],!s.hasOwnProperty(he)||Z===ie||Z==null&&ie==null||Ve(e,t,he,Z,s,ie)}function Bf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bv(){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,g=r.initiatorType,M=r.duration;if(n&&M&&Bf(g)){for(g=0,M=r.responseEnd,s+=1;s<i.length;s++){var U=i[s],X=U.startTime;if(X>M)break;var ne=U.transferSize,he=U.initiatorType;ne&&Bf(he)&&(U=U.responseEnd,g+=ne*(U<M?1:(M-X)/(U-X)))}if(--s,t+=8*(n+g)/(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 $o=null,Qo=null;function Ha(e){return e.nodeType===9?e:e.ownerDocument}function kf(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 Hf(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 Jo(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 ec=null;function yv(){var e=window.event;return e&&e.type==="popstate"?e===ec?!1:(ec=e,!0):(ec=null,!1)}var Nf=typeof setTimeout=="function"?setTimeout:void 0,Cv=typeof clearTimeout=="function"?clearTimeout:void 0,jf=typeof Promise=="function"?Promise:void 0,Ev=typeof queueMicrotask=="function"?queueMicrotask:typeof jf<"u"?function(e){return jf.resolve(null).then(e).catch(wv)}:Nf;function wv(e){setTimeout(function(){throw e})}function xs(e){return e==="head"}function zf(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),Hr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")An(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,An(i);for(var n=i.firstChild;n;){var g=n.nextSibling,M=n.nodeName;n[Os]||M==="SCRIPT"||M==="STYLE"||M==="LINK"&&n.rel.toLowerCase()==="stylesheet"||i.removeChild(n),n=g}}else i==="body"&&An(e.ownerDocument.body);i=r}while(i);Hr(t)}function Uf(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 tc(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":tc(i),Gr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function xv(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[Os])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=fi(e.nextSibling),e===null)break}return null}function Av(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=fi(e.nextSibling),e===null))return null;return e}function qf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=fi(e.nextSibling),e===null))return null;return e}function ic(e){return e.data==="$?"||e.data==="$~"}function sc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Dv(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 fi(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 rc=null;function If(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return fi(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function Gf(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 Pf(e,t,i){switch(t=Ha(i),e){case"html":if(e=t.documentElement,!e)throw Error(B(452));return e;case"head":if(e=t.head,!e)throw Error(B(453));return e;case"body":if(e=t.body,!e)throw Error(B(454));return e;default:throw Error(B(451))}}function An(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Gr(e)}var di=new Map,Yf=new Set;function Na(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Xi=J.d;J.d={f:Tv,r:Rv,D:Mv,C:Lv,L:Ov,m:Bv,X:Hv,S:kv,M:Nv};function Tv(){var e=Xi.f(),t=Da();return e||t}function Rv(e){var t=Oi(e);t!==null&&t.tag===5&&t.type==="form"?ah(t):Xi.r(e)}var Or=typeof document>"u"?null:document;function Kf(e,t,i){var s=Or;if(s&&typeof t=="string"&&t){var r=$e(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof i=="string"&&(r+='[crossorigin="'+i+'"]'),Yf.has(r)||(Yf.add(r),e={rel:e,crossOrigin:i,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Tt(t,"link",e),ct(t),s.head.appendChild(t)))}}function Mv(e){Xi.D(e),Kf("dns-prefetch",e,null)}function Lv(e,t){Xi.C(e,t),Kf("preconnect",e,t)}function Ov(e,t,i){Xi.L(e,t,i);var s=Or;if(s&&e&&t){var r='link[rel="preload"][as="'+$e(t)+'"]';t==="image"&&i&&i.imageSrcSet?(r+='[imagesrcset="'+$e(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(r+='[imagesizes="'+$e(i.imageSizes)+'"]')):r+='[href="'+$e(e)+'"]';var n=r;switch(t){case"style":n=Br(e);break;case"script":n=kr(e)}di.has(n)||(e=h({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),di.set(n,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(Dn(n))||t==="script"&&s.querySelector(Tn(n))||(t=s.createElement("link"),Tt(t,"link",e),ct(t),s.head.appendChild(t)))}}function Bv(e,t){Xi.m(e,t);var i=Or;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+$e(s)+'"][href="'+$e(e)+'"]',n=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":n=kr(e)}if(!di.has(n)&&(e=h({rel:"modulepreload",href:e},t),di.set(n,e),i.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Tn(n)))return}s=i.createElement("link"),Tt(s,"link",e),ct(s),i.head.appendChild(s)}}}function kv(e,t,i){Xi.S(e,t,i);var s=Or;if(s&&e){var r=ts(s).hoistableStyles,n=Br(e);t=t||"default";var g=r.get(n);if(!g){var M={loading:0,preload:null};if(g=s.querySelector(Dn(n)))M.loading=5;else{e=h({rel:"stylesheet",href:e,"data-precedence":t},i),(i=di.get(n))&&nc(e,i);var U=g=s.createElement("link");ct(U),Tt(U,"link",e),U._p=new Promise(function(X,ne){U.onload=X,U.onerror=ne}),U.addEventListener("load",function(){M.loading|=1}),U.addEventListener("error",function(){M.loading|=2}),M.loading|=4,ja(g,t,s)}g={type:"stylesheet",instance:g,count:1,state:M},r.set(n,g)}}}function Hv(e,t){Xi.X(e,t);var i=Or;if(i&&e){var s=ts(i).hoistableScripts,r=kr(e),n=s.get(r);n||(n=i.querySelector(Tn(r)),n||(e=h({src:e,async:!0},t),(t=di.get(r))&&ac(e,t),n=i.createElement("script"),ct(n),Tt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Nv(e,t){Xi.M(e,t);var i=Or;if(i&&e){var s=ts(i).hoistableScripts,r=kr(e),n=s.get(r);n||(n=i.querySelector(Tn(r)),n||(e=h({src:e,async:!0,type:"module"},t),(t=di.get(r))&&ac(e,t),n=i.createElement("script"),ct(n),Tt(n,"link",e),i.head.appendChild(n)),n={type:"script",instance:n,count:1,state:null},s.set(r,n))}}function Wf(e,t,i,s){var r=(r=ve.current)?Na(r):null;if(!r)throw Error(B(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Br(i.href),i=ts(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=Br(i.href);var n=ts(r).hoistableStyles,g=n.get(e);if(g||(r=r.ownerDocument||r,g={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},n.set(e,g),(n=r.querySelector(Dn(e)))&&!n._p&&(g.instance=n,g.state.loading=5),di.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},di.set(e,i),n||jv(r,e,i,g.state))),t&&s===null)throw Error(B(528,""));return g}if(t&&s!==null)throw Error(B(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=kr(i),i=ts(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(B(444,e))}}function Br(e){return'href="'+$e(e)+'"'}function Dn(e){return'link[rel="stylesheet"]['+e+"]"}function Ff(e){return h({},e,{"data-precedence":e.precedence,precedence:null})}function jv(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}),Tt(t,"link",i),ct(t),e.head.appendChild(t))}function kr(e){return'[src="'+$e(e)+'"]'}function Tn(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~="'+$e(i.href)+'"]');if(s)return t.instance=s,ct(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"),ct(s),Tt(s,"style",r),ja(s,i.precedence,e),t.instance=s;case"stylesheet":r=Br(i.href);var n=e.querySelector(Dn(r));if(n)return t.state.loading|=4,t.instance=n,ct(n),n;s=Ff(i),(r=di.get(r))&&nc(s,r),n=(e.ownerDocument||e).createElement("link"),ct(n);var g=n;return g._p=new Promise(function(M,U){g.onload=M,g.onerror=U}),Tt(n,"link",s),t.state.loading|=4,ja(n,i.precedence,e),t.instance=n;case"script":return n=kr(i.src),(r=e.querySelector(Tn(n)))?(t.instance=r,ct(r),r):(s=i,(r=di.get(n))&&(s=h({},i),ac(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),ct(r),Tt(r,"link",s),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(B(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ja(s,i.precedence,e));return t.instance}function ja(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,g=0;g<s.length;g++){var M=s[g];if(M.dataset.precedence===t)n=M;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 nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function ac(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var za=null;function Xf(e,t,i){if(za===null){var s=new Map,r=za=new Map;r.set(i,s)}else r=za,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[Os]||n[St]||e==="link"&&n.getAttribute("rel")==="stylesheet")&&n.namespaceURI!=="http://www.w3.org/2000/svg"){var g=n.getAttribute(t)||"";g=e+g;var M=s.get(g);M?M.push(n):s.set(g,[n])}}return s}function Zf(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function zv(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 $f(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Uv(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=Br(s.href),n=t.querySelector(Dn(r));if(n){t=n._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Ua.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=n,ct(n);return}n=t.ownerDocument||t,s=Ff(s),(r=di.get(r))&&nc(s,r),n=n.createElement("link"),ct(n);var g=n;g._p=new Promise(function(M,U){g.onload=M,g.onerror=U}),Tt(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=Ua.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var lc=0;function qv(e,t){return e.stylesheets&&e.count===0&&Ia(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&Ia(e,e.stylesheets),e.unsuspend){var n=e.unsuspend;e.unsuspend=null,n()}},6e4+t);0<e.imgBytes&&lc===0&&(lc=62500*bv());var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ia(e,e.stylesheets),e.unsuspend)){var n=e.unsuspend;e.unsuspend=null,n()}},(e.imgBytes>lc?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function Ua(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ia(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var qa=null;function Ia(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,qa=new Map,t.forEach(Iv,e),qa=null,Ua.call(e))}function Iv(e,t){if(!(t.state.loading&4)){var i=qa.get(e);if(i)var s=i.get(null);else{i=new Map,qa.set(e,i);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),n=0;n<r.length;n++){var g=r[n];(g.nodeName==="LINK"||g.getAttribute("media")!=="not all")&&(i.set(g.dataset.precedence,g),s=g)}s&&i.set(null,s)}r=t.instance,g=r.getAttribute("data-precedence"),n=i.get(g)||s,n===s&&i.set(null,r),i.set(g,r),this.count++,s=Ua.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 Rn={$$typeof:l,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Gv(e,t,i,s,r,n,g,M,U){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=Ue(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ue(0),this.hiddenUpdates=Ue(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=n,this.onRecoverableError=g,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=U,this.incompleteTransitions=new Map}function Qf(e,t,i,s,r,n,g,M,U,X,ne,he){return e=new Gv(e,t,i,g,U,X,ne,he,M),t=1,n===!0&&(t|=24),n=Vt(3,null,null,t),e.current=n,n.stateNode=e,t=Ul(),t.refCount++,e.pooledCache=t,t.refCount++,n.memoizedState={element:s,isDehydrated:i,cache:t},Pl(n),e}function Jf(e){return e?(e=hr,e):hr}function ed(e,t,i,s,r,n){r=Jf(r),s.context===null?s.context=r:s.pendingContext=r,s=_s(t),s.payload={element:i},n=n===void 0?null:n,n!==null&&(s.callback=n),i=vs(e,s,t),i!==null&&(Kt(i,e,t),ln(i,e,t))}function td(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function oc(e,t){td(e,t),(e=e.alternate)&&td(e,t)}function id(e){if(e.tag===13||e.tag===31){var t=zs(e,67108864);t!==null&&Kt(t,e,67108864),oc(e,67108864)}}function sd(e){if(e.tag===13||e.tag===31){var t=Jt();t=qr(t);var i=zs(e,t);i!==null&&Kt(i,e,t),oc(e,t)}}var Ga=!0;function Pv(e,t,i,s){var r=G.T;G.T=null;var n=J.p;try{J.p=2,cc(e,t,i,s)}finally{J.p=n,G.T=r}}function Yv(e,t,i,s){var r=G.T;G.T=null;var n=J.p;try{J.p=8,cc(e,t,i,s)}finally{J.p=n,G.T=r}}function cc(e,t,i,s){if(Ga){var r=uc(s);if(r===null)Xo(e,t,s,Pa,i),nd(e,s);else if(Wv(r,e,t,i,s))s.stopPropagation();else if(nd(e,s),t&4&&-1<Kv.indexOf(e)){for(;r!==null;){var n=Oi(r);if(n!==null)switch(n.tag){case 3:if(n=n.stateNode,n.current.memoizedState.isDehydrated){var g=Ri(n.pendingLanes);if(g!==0){var M=n;for(M.pendingLanes|=2,M.entangledLanes|=2;g;){var U=1<<31-wt(g);M.entanglements[1]|=U,g&=~U}Di(n),(Ge&6)===0&&(xa=at()+500,En(0))}}break;case 31:case 13:M=zs(n,2),M!==null&&Kt(M,n,2),Da(),oc(n,2)}if(n=uc(s),n===null&&Xo(e,t,s,Pa,i),n===r)break;r=n}r!==null&&s.stopPropagation()}else Xo(e,t,s,null,i)}}function uc(e){return e=hl(e),hc(e)}var Pa=null;function hc(e){if(Pa=null,e=Ji(e),e!==null){var t=ue(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=$(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 Pa=e,null}function rd(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(gt()){case vi:return 2;case Ti:return 8;case Et:case Zi:return 32;case Nt:return 268435456;default:return 32}default:return 32}}var fc=!1,As=null,Ds=null,Ts=null,Mn=new Map,Ln=new Map,Rs=[],Kv="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 nd(e,t){switch(e){case"focusin":case"focusout":As=null;break;case"dragenter":case"dragleave":Ds=null;break;case"mouseover":case"mouseout":Ts=null;break;case"pointerover":case"pointerout":Mn.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ln.delete(t.pointerId)}}function On(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=Oi(t),t!==null&&id(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function Wv(e,t,i,s,r){switch(t){case"focusin":return As=On(As,e,t,i,s,r),!0;case"dragenter":return Ds=On(Ds,e,t,i,s,r),!0;case"mouseover":return Ts=On(Ts,e,t,i,s,r),!0;case"pointerover":var n=r.pointerId;return Mn.set(n,On(Mn.get(n)||null,e,t,i,s,r)),!0;case"gotpointercapture":return n=r.pointerId,Ln.set(n,On(Ln.get(n)||null,e,t,i,s,r)),!0}return!1}function ad(e){var t=Ji(e.target);if(t!==null){var i=ue(t);if(i!==null){if(t=i.tag,t===13){if(t=$(i),t!==null){e.blockedOn=t,Wt(e.priority,function(){sd(i)});return}}else if(t===31){if(t=u(i),t!==null){e.blockedOn=t,Wt(e.priority,function(){sd(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 Ya(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=uc(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);ul=s,i.target.dispatchEvent(s),ul=null}else return t=Oi(i),t!==null&&id(t),e.blockedOn=i,!1;t.shift()}return!0}function ld(e,t,i){Ya(e)&&i.delete(t)}function Fv(){fc=!1,As!==null&&Ya(As)&&(As=null),Ds!==null&&Ya(Ds)&&(Ds=null),Ts!==null&&Ya(Ts)&&(Ts=null),Mn.forEach(ld),Ln.forEach(ld)}function Ka(e,t){e.blockedOn===t&&(e.blockedOn=null,fc||(fc=!0,R.unstable_scheduleCallback(R.unstable_NormalPriority,Fv)))}var Wa=null;function od(e){Wa!==e&&(Wa=e,R.unstable_scheduleCallback(R.unstable_NormalPriority,function(){Wa===e&&(Wa=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(hc(s||i)===null)continue;break}var n=Oi(i);n!==null&&(e.splice(t,3),t-=3,co(n,{pending:!0,data:r,method:i.method,action:s},s,r))}}))}function Hr(e){function t(U){return Ka(U,e)}As!==null&&Ka(As,e),Ds!==null&&Ka(Ds,e),Ts!==null&&Ka(Ts,e),Mn.forEach(t),Ln.forEach(t);for(var i=0;i<Rs.length;i++){var s=Rs[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Rs.length&&(i=Rs[0],i.blockedOn===null);)ad(i),i.blockedOn===null&&Rs.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],g=r[Bt]||null;if(typeof n=="function")g||od(i);else if(g){var M=null;if(n&&n.hasAttribute("formAction")){if(r=n,g=n[Bt]||null)M=g.formAction;else if(hc(r)!==null)continue}else M=g.action;typeof M=="function"?i[s+1]=M:(i.splice(s,3),s-=3),od(i)}}}function cd(){function e(n){n.canIntercept&&n.info==="react-transition"&&n.intercept({handler:function(){return new Promise(function(g){return r=g})},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 dc(e){this._internalRoot=e}Fa.prototype.render=dc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(B(409));var i=t.current,s=Jt();ed(i,s,e,t,null,null)},Fa.prototype.unmount=dc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;ed(e.current,2,null,e,null,null),Da(),t[Li]=null}};function Fa(e){this._internalRoot=e}Fa.prototype.unstable_scheduleHydration=function(e){if(e){var t=jt();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Rs.length&&t!==0&&t<Rs[i].priority;i++);Rs.splice(i,0,e),i===0&&ad(e)}};var ud=N.version;if(ud!=="19.2.8")throw Error(B(527,ud,"19.2.8"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(B(188)):(e=Object.keys(e).join(","),Error(B(268,e)));return e=d(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var Vv={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Va=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Va.isDisabled&&Va.supportsFiber)try{Ut=Va.inject(Vv),Lt=Va}catch{}}return kn.createRoot=function(e,t){if(!re(e))throw Error(B(299));var i=!1,s="",r=mh,n=ph,g=gh;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&&(g=t.onRecoverableError)),t=Qf(e,1,!1,null,null,i,s,null,r,n,g,cd),e[Li]=t.current,Vo(e),new dc(t)},kn.hydrateRoot=function(e,t,i){if(!re(e))throw Error(B(299));var s=!1,r="",n=mh,g=ph,M=gh,U=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&&(g=i.onCaughtError),i.onRecoverableError!==void 0&&(M=i.onRecoverableError),i.formState!==void 0&&(U=i.formState)),t=Qf(e,1,!0,t,i??null,s,r,U,n,g,M,cd),t.context=Jf(null),i=t.current,s=Jt(),s=qr(s),r=_s(s),r.callback=null,vs(i,r,s),i=s,t.current.lanes=i,si(t,i),Di(t),e[Li]=t.current,Vo(e),new Fa(t)},kn.version="19.2.8",kn}var bd;function rm(){if(bd)return mc.exports;bd=1;function R(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(R)}catch(N){console.error(N)}}return R(),mc.exports=sm(),mc.exports}var nm=rm(),bc={exports:{}},yd;function am(){return yd||(yd=1,(function(R,N){(function(z,B){R.exports=B()})(globalThis,(()=>(()=>{var z={4567:function($,u,f){var d=this&&this.__decorate||function(a,l,_,E){var y,w=arguments.length,m=w<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(a,l,_,E);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(m=(w<3?y(m):w>3?y(l,_,m):y(l,_))||m);return w>3&&m&&Object.defineProperty(l,_,m),m},b=this&&this.__param||function(a,l){return function(_,E){l(_,E,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.AccessibilityManager=void 0;const h=f(9042),v=f(9924),C=f(844),S=f(4725),p=f(2585),o=f(3656);let c=u.AccessibilityManager=class extends C.Disposable{constructor(a,l,_,E){super(),this._terminal=a,this._coreBrowserService=_,this._renderService=E,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let y=0;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);if(this._topBoundaryFocusListener=y=>this._handleBoundaryFocus(y,0),this._bottomBoundaryFocusListener=y=>this._handleBoundaryFocus(y,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new v.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((y=>this._handleResize(y.rows)))),this.register(this._terminal.onRender((y=>this._refreshRows(y.start,y.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((y=>this._handleChar(y)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
10
|
+
`)))),this.register(this._terminal.onA11yTab((y=>this._handleTab(y)))),this.register(this._terminal.onKey((y=>this._handleKey(y.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,o.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,C.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(a){for(let l=0;l<a;l++)this._handleChar(" ")}_handleChar(a){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==a&&(this._charsToAnnounce+=a):this._charsToAnnounce+=a,a===`
|
|
11
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(a){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(a)||this._charsToConsume.push(a)}_refreshRows(a,l){this._liveRegionDebouncer.refresh(a,l,this._terminal.rows)}_renderRows(a,l){const _=this._terminal.buffer,E=_.lines.length.toString();for(let y=a;y<=l;y++){const w=_.lines.get(_.ydisp+y),m=[],D=w?.translateToString(!0,void 0,void 0,m)||"",q=(_.ydisp+y+1).toString(),I=this._rowElements[y];I&&(D.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=D,this._rowColumns.set(I,m)),I.setAttribute("aria-posinset",q),I.setAttribute("aria-setsize",E))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(a,l){const _=a.target,E=this._rowElements[l===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||a.relatedTarget!==E)return;let y,w;if(l===0?(y=_,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(y=this._rowElements.shift(),w=_,this._rowContainer.removeChild(y)),y.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const m=this._createAccessibilityTreeNode();this._rowElements.unshift(m),this._rowContainer.insertAdjacentElement("afterbegin",m)}else{const m=this._createAccessibilityTreeNode();this._rowElements.push(m),this._rowContainer.appendChild(m)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),a.preventDefault(),a.stopImmediatePropagation()}_handleSelectionChange(){if(this._rowElements.length===0)return;const a=document.getSelection();if(!a)return;if(a.isCollapsed)return void(this._rowContainer.contains(a.anchorNode)&&this._terminal.clearSelection());if(!a.anchorNode||!a.focusNode)return void console.error("anchorNode and/or focusNode are null");let l={node:a.anchorNode,offset:a.anchorOffset},_={node:a.focusNode,offset:a.focusOffset};if((l.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===_.node&&l.offset>_.offset)&&([l,_]=[_,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const E=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(E)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:E,offset:E.textContent?.length??0}),!this._rowContainer.contains(_.node))return;const y=({node:D,offset:q})=>{const I=D instanceof Text?D.parentNode:D;let K=parseInt(I?.getAttribute("aria-posinset"),10)-1;if(isNaN(K))return console.warn("row is invalid. Race condition?"),null;const H=this._rowColumns.get(I);if(!H)return console.warn("columns is null. Race condition?"),null;let Q=q<H.length?H[q]:H.slice(-1)[0]+1;return Q>=this._terminal.cols&&(++K,Q=0),{row:K,column:Q}},w=y(l),m=y(_);if(w&&m){if(w.row>m.row||w.row===m.row&&w.column>=m.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(m.row-w.row)*this._terminal.cols-w.column+m.column)}}_handleResize(a){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>a;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const a=this._coreBrowserService.mainDocument.createElement("div");return a.setAttribute("role","listitem"),a.tabIndex=-1,this._refreshRowDimensions(a),a}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let a=0;a<this._terminal.rows;a++)this._refreshRowDimensions(this._rowElements[a])}}_refreshRowDimensions(a){a.style.height=`${this._renderService.dimensions.css.cell.height}px`}};u.AccessibilityManager=c=d([b(1,p.IInstantiationService),b(2,S.ICoreBrowserService),b(3,S.IRenderService)],c)},3614:($,u)=>{function f(v){return v.replace(/\r?\n/g,"\r")}function d(v,C){return C?"\x1B[200~"+v+"\x1B[201~":v}function b(v,C,S,p){v=d(v=f(v),S.decPrivateModes.bracketedPasteMode&&p.rawOptions.ignoreBracketedPasteMode!==!0),S.triggerDataEvent(v,!0),C.value=""}function h(v,C,S){const p=S.getBoundingClientRect(),o=v.clientX-p.left-10,c=v.clientY-p.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${o}px`,C.style.top=`${c}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(v,C){v.clipboardData&&v.clipboardData.setData("text/plain",C.selectionText),v.preventDefault()},u.handlePasteEvent=function(v,C,S,p){v.stopPropagation(),v.clipboardData&&b(v.clipboardData.getData("text/plain"),C,S,p)},u.paste=b,u.moveTextAreaUnderMouseCursor=h,u.rightClickHandler=function(v,C,S,p,o){h(v,C,S),o&&p.rightClickSelect(v),C.value=p.selectionText,C.select()}},7239:($,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(b,h,v){this._css.set(b,h,v)}getCss(b,h){return this._css.get(b,h)}setColor(b,h,v){this._color.set(b,h,v)}getColor(b,h){return this._color.get(b,h)}clear(){this._color.clear(),this._css.clear()}}},3656:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.addDisposableDomListener=void 0,u.addDisposableDomListener=function(f,d,b,h){f.addEventListener(d,b,h);let v=!1;return{dispose:()=>{v||(v=!0,f.removeEventListener(d,b,h))}}}},3551:function($,u,f){var d=this&&this.__decorate||function(c,a,l,_){var E,y=arguments.length,w=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,a,l,_);else for(var m=c.length-1;m>=0;m--)(E=c[m])&&(w=(y<3?E(w):y>3?E(a,l,w):E(a,l))||w);return y>3&&w&&Object.defineProperty(a,l,w),w},b=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Linkifier=void 0;const h=f(3656),v=f(8460),C=f(844),S=f(2585),p=f(4725);let o=u.Linkifier=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(c,a,l,_,E){super(),this._element=c,this._mouseService=a,this._renderService=l,this._bufferService=_,this._linkProviderService=E,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new v.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new v.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{this._lastMouseEvent=void 0,this._activeProviderReplies?.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),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(c){this._lastMouseEvent=c;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);if(!a)return;this._isMouseOut=!1;const l=c.composedPath();for(let _=0;_<l.length;_++){const E=l[_];if(E.classList.contains("xterm"))break;if(E.classList.contains("xterm-hover"))return}this._lastBufferCell&&a.x===this._lastBufferCell.x&&a.y===this._lastBufferCell.y||(this._handleHover(a),this._lastBufferCell=a)}_handleHover(c){if(this._activeLine!==c.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(c,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,c)||(this._clearCurrentLink(),this._askForLink(c,!0))}_askForLink(c,a){this._activeProviderReplies&&a||(this._activeProviderReplies?.forEach((_=>{_?.forEach((E=>{E.link.dispose&&E.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=c.y);let l=!1;for(const[_,E]of this._linkProviderService.linkProviders.entries())a?this._activeProviderReplies?.get(_)&&(l=this._checkLinkProviderResult(_,c,l)):E.provideLinks(c.y,(y=>{if(this._isMouseOut)return;const w=y?.map((m=>({link:m})));this._activeProviderReplies?.set(_,w),l=this._checkLinkProviderResult(_,c,l),this._activeProviderReplies?.size===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(c.y,this._activeProviderReplies)}))}_removeIntersectingLinks(c,a){const l=new Set;for(let _=0;_<a.size;_++){const E=a.get(_);if(E)for(let y=0;y<E.length;y++){const w=E[y],m=w.link.range.start.y<c?0:w.link.range.start.x,D=w.link.range.end.y>c?this._bufferService.cols:w.link.range.end.x;for(let q=m;q<=D;q++){if(l.has(q)){E.splice(y--,1);break}l.add(q)}}}}_checkLinkProviderResult(c,a,l){if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(c);let E=!1;for(let y=0;y<c;y++)this._activeProviderReplies.has(y)&&!this._activeProviderReplies.get(y)||(E=!0);if(!E&&_){const y=_.find((w=>this._linkAtPosition(w.link,a)));y&&(l=!0,this._handleNewLink(y))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let y=0;y<this._activeProviderReplies.size;y++){const w=this._activeProviderReplies.get(y)?.find((m=>this._linkAtPosition(m.link,a)));if(w){l=!0,this._handleNewLink(w);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(c){if(!this._currentLink)return;const a=this._positionFromMouseEvent(c,this._element,this._mouseService);a&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,a)&&this._currentLink.link.activate(c,this._currentLink.link.text)}_clearCurrentLink(c,a){this._currentLink&&this._lastMouseEvent&&(!c||!a||this._currentLink.link.range.start.y>=c&&this._currentLink.link.range.end.y<=a)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(c){if(!this._lastMouseEvent)return;const a=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);a&&this._linkAtPosition(c.link,a)&&(this._currentLink=c,this._currentLink.state={decorations:{underline:c.link.decorations===void 0||c.link.decorations.underline,pointerCursor:c.link.decorations===void 0||c.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,c.link,this._lastMouseEvent),c.link.decorations={},Object.defineProperties(c.link.decorations,{pointerCursor:{get:()=>this._currentLink?.state?.decorations.pointerCursor,set:l=>{this._currentLink?.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>this._currentLink?.state?.decorations.underline,set:l=>{this._currentLink?.state&&this._currentLink?.state?.decorations.underline!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(c.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((l=>{if(!this._currentLink)return;const _=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,E=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=E&&(this._clearCurrentLink(_,E),this._lastMouseEvent)){const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._askForLink(y,!1)}}))))}_linkHover(c,a,l){this._currentLink?.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!0),this._currentLink.state.decorations.pointerCursor&&c.classList.add("xterm-cursor-pointer")),a.hover&&a.hover(l,a.text)}_fireUnderlineEvent(c,a){const l=c.range,_=this._bufferService.buffer.ydisp,E=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-_-1,l.end.x,l.end.y-_-1,void 0);(a?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(E)}_linkLeave(c,a,l){this._currentLink?.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(a,!1),this._currentLink.state.decorations.pointerCursor&&c.classList.remove("xterm-cursor-pointer")),a.leave&&a.leave(l,a.text)}_linkAtPosition(c,a){const l=c.range.start.y*this._bufferService.cols+c.range.start.x,_=c.range.end.y*this._bufferService.cols+c.range.end.x,E=a.y*this._bufferService.cols+a.x;return l<=E&&E<=_}_positionFromMouseEvent(c,a,l){const _=l.getCoords(c,a,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(c,a,l,_,E){return{x1:c,y1:a,x2:l,y2:_,cols:this._bufferService.cols,fg:E}}};u.Linkifier=o=d([b(1,p.IMouseService),b(2,p.IRenderService),b(3,S.IBufferService),b(4,p.ILinkProviderService)],o)},9042:($,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($,u,f){var d=this&&this.__decorate||function(p,o,c,a){var l,_=arguments.length,E=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(p,o,c,a);else for(var y=p.length-1;y>=0;y--)(l=p[y])&&(E=(_<3?l(E):_>3?l(o,c,E):l(o,c))||E);return _>3&&E&&Object.defineProperty(o,c,E),E},b=this&&this.__param||function(p,o){return function(c,a){o(c,a,p)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkProvider=void 0;const h=f(511),v=f(2585);let C=u.OscLinkProvider=class{constructor(p,o,c){this._bufferService=p,this._optionsService=o,this._oscLinkService=c}provideLinks(p,o){const c=this._bufferService.buffer.lines.get(p-1);if(!c)return void o(void 0);const a=[],l=this._optionsService.rawOptions.linkHandler,_=new h.CellData,E=c.getTrimmedLength();let y=-1,w=-1,m=!1;for(let D=0;D<E;D++)if(w!==-1||c.hasContent(D)){if(c.loadCell(D,_),_.hasExtendedAttrs()&&_.extended.urlId){if(w===-1){w=D,y=_.extended.urlId;continue}m=_.extended.urlId!==y}else w!==-1&&(m=!0);if(m||w!==-1&&D===E-1){const q=this._oscLinkService.getLinkData(y)?.uri;if(q){const I={start:{x:w+1,y:p},end:{x:D+(m||D!==E-1?0:1),y:p}};let K=!1;if(!l?.allowNonHttpProtocols)try{const H=new URL(q);["http:","https:"].includes(H.protocol)||(K=!0)}catch{K=!0}K||a.push({text:q,range:I,activate:(H,Q)=>l?l.activate(H,Q,I):S(0,Q),hover:(H,Q)=>l?.hover?.(H,Q,I),leave:(H,Q)=>l?.leave?.(H,Q,I)})}m=!1,_.hasExtendedAttrs()&&_.extended.urlId?(w=D,y=_.extended.urlId):(w=-1,y=-1)}}o(a)}};function S(p,o){if(confirm(`Do you want to navigate to ${o}?
|
|
12
|
+
|
|
13
|
+
WARNING: This link could potentially be dangerous`)){const c=window.open();if(c){try{c.opener=null}catch{}c.location.href=o}else console.warn("Opening link blocked as opener could not be cleared")}}u.OscLinkProvider=C=d([b(0,v.IBufferService),b(1,v.IOptionsService),b(2,v.IOscLinkService)],C)},6193:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.RenderDebouncer=void 0,u.RenderDebouncer=class{constructor(f,d){this._renderCallback=f,this._coreBrowserService=d,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(f){return this._refreshCallbacks.push(f),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(f,d,b){this._rowCount=b,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._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._animationFrame=void 0,this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return void this._runRefreshCallbacks();const 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=[]}}},3236:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Terminal=void 0;const d=f(3614),b=f(3656),h=f(3551),v=f(9042),C=f(3730),S=f(1680),p=f(3107),o=f(5744),c=f(2950),a=f(1296),l=f(428),_=f(4269),E=f(5114),y=f(8934),w=f(3230),m=f(9312),D=f(4725),q=f(6731),I=f(8055),K=f(8969),H=f(8460),Q=f(844),ce=f(6114),G=f(8437),J=f(2584),ee=f(7399),T=f(5941),k=f(9074),x=f(2585),O=f(5435),F=f(4567),se=f(779);class _e extends K.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(Y={}){super(Y),this.browser=ce,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new Q.MutableDisposable),this._onCursorMove=this.register(new H.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new H.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new H.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new H.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new H.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new H.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new H.EventEmitter),this._onBlur=this.register(new H.EventEmitter),this._onA11yCharEmitter=this.register(new H.EventEmitter),this._onA11yTabEmitter=this.register(new H.EventEmitter),this._onWillOpen=this.register(new H.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(k.DecorationService),this._instantiationService.setService(x.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(se.LinkProviderService),this._instantiationService.setService(D.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(C.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((L,te)=>this.refresh(L,te)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((L=>this._reportWindowsOptions(L)))),this.register(this._inputHandler.onColor((L=>this._handleColorEvent(L)))),this.register((0,H.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,H.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,H.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((L=>this._afterResize(L.cols,L.rows)))),this.register((0,Q.toDisposable)((()=>{this._customKeyEventHandler=void 0,this.element?.parentNode?.removeChild(this.element)})))}_handleColorEvent(Y){if(this._themeService)for(const L of Y){let te,fe="";switch(L.index){case 256:te="foreground",fe="10";break;case 257:te="background",fe="11";break;case 258:te="cursor",fe="12";break;default:te="ansi",fe="4;"+L.index}switch(L.type){case 0:const pe=I.color.toColorRGB(te==="ansi"?this._themeService.colors.ansi[L.index]:this._themeService.colors[te]);this.coreService.triggerDataEvent(`${J.C0.ESC}]${fe};${(0,T.toRgbString)(pe)}${J.C1_ESCAPED.ST}`);break;case 1:if(te==="ansi")this._themeService.modifyColors((me=>me.ansi[L.index]=I.channels.toColor(...L.color)));else{const me=te;this._themeService.modifyColors((De=>De[me]=I.channels.toColor(...L.color)))}break;case 2:this._themeService.restoreColor(L.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(Y){Y?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(Y){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){return this.textarea?.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(J.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 Y=this.buffer.ybase+this.buffer.y,L=this.buffer.lines.get(Y);if(!L)return;const te=Math.min(this.buffer.x,this.cols-1),fe=this._renderService.dimensions.css.cell.height,pe=L.getWidth(te),me=this._renderService.dimensions.css.cell.width*pe,De=this.buffer.y*this._renderService.dimensions.css.cell.height,je=te*this._renderService.dimensions.css.cell.width;this.textarea.style.left=je+"px",this.textarea.style.top=De+"px",this.textarea.style.width=me+"px",this.textarea.style.height=fe+"px",this.textarea.style.lineHeight=fe+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,b.addDisposableDomListener)(this.element,"copy",(L=>{this.hasSelection()&&(0,d.copyHandler)(L,this._selectionService)})));const Y=L=>(0,d.handlePasteEvent)(L,this.textarea,this.coreService,this.optionsService);this.register((0,b.addDisposableDomListener)(this.textarea,"paste",Y)),this.register((0,b.addDisposableDomListener)(this.element,"paste",Y)),ce.isFirefox?this.register((0,b.addDisposableDomListener)(this.element,"mousedown",(L=>{L.button===2&&(0,d.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,b.addDisposableDomListener)(this.element,"contextmenu",(L=>{(0,d.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),ce.isLinux&&this.register((0,b.addDisposableDomListener)(this.element,"auxclick",(L=>{L.button===1&&(0,d.moveTextAreaUnderMouseCursor)(L,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,b.addDisposableDomListener)(this.textarea,"keyup",(Y=>this._keyUp(Y)),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keydown",(Y=>this._keyDown(Y)),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"keypress",(Y=>this._keyPress(Y)),!0)),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionupdate",(Y=>this._compositionHelper.compositionupdate(Y)))),this.register((0,b.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,b.addDisposableDomListener)(this.textarea,"input",(Y=>this._inputEvent(Y)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(Y){if(!Y)throw new Error("Terminal requires a parent element.");if(Y.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this.element?.ownerDocument.defaultView&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=Y.ownerDocument,this.options.documentOverride&&this.options.documentOverride instanceof Document&&(this._document=this.optionsService.rawOptions.documentOverride),this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),Y.appendChild(this.element);const L=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),L.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,b.addDisposableDomListener)(this.screenElement,"mousemove",(te=>this.updateCursorStyle(te)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),L.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",v.promptLabel),ce.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(E.CoreBrowserService,this.textarea,Y.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(D.ICoreBrowserService,this._coreBrowserService),this.register((0,b.addDisposableDomListener)(this.textarea,"focus",(te=>this._handleTextAreaFocus(te)))),this.register((0,b.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(D.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(q.ThemeService),this._instantiationService.setService(D.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(D.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(D.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((te=>this._onRender.fire(te)))),this.onResize((te=>this._renderService.resize(te.cols,te.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(c.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(y.MouseService),this._instantiationService.setService(D.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(L);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(S.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((te=>this.scrollLines(te.amount,te.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(m.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(D.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((te=>this.scrollLines(te.amount,te.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((te=>this._renderService.handleSelectionChanged(te.start,te.end,te.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((te=>{this.textarea.value=te,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((te=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,b.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(p.BufferDecorationRenderer,this.screenElement)),this.register((0,b.addDisposableDomListener)(this.element,"mousedown",(te=>this._selectionService.handleMouseDown(te)))),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(F.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(te=>this._handleScreenReaderModeOptionChange(te)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(te=>{!this._overviewRulerRenderer&&te&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(o.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(a.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const Y=this,L=this.element;function te(me){const De=Y._mouseService.getMouseReportCoords(me,Y.screenElement);if(!De)return!1;let je,ze;switch(me.overrideType||me.type){case"mousemove":ze=32,me.buttons===void 0?(je=3,me.button!==void 0&&(je=me.button<3?me.button:3)):je=1&me.buttons?0:4&me.buttons?1:2&me.buttons?2:3;break;case"mouseup":ze=0,je=me.button<3?me.button:3;break;case"mousedown":ze=1,je=me.button<3?me.button:3;break;case"wheel":if(Y._customWheelEventHandler&&Y._customWheelEventHandler(me)===!1||Y.viewport.getLinesScrolled(me)===0)return!1;ze=me.deltaY<0?0:1,je=4;break;default:return!1}return!(ze===void 0||je===void 0||je>4)&&Y.coreMouseService.triggerMouseEvent({col:De.col,row:De.row,x:De.x,y:De.y,button:je,action:ze,ctrl:me.ctrlKey,alt:me.altKey,shift:me.shiftKey})}const fe={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe={mouseup:me=>(te(me),me.buttons||(this._document.removeEventListener("mouseup",fe.mouseup),fe.mousedrag&&this._document.removeEventListener("mousemove",fe.mousedrag)),this.cancel(me)),wheel:me=>(te(me),this.cancel(me,!0)),mousedrag:me=>{me.buttons&&te(me)},mousemove:me=>{me.buttons||te(me)}};this.register(this.coreMouseService.onProtocolChange((me=>{me?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(me)),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&me?fe.mousemove||(L.addEventListener("mousemove",pe.mousemove),fe.mousemove=pe.mousemove):(L.removeEventListener("mousemove",fe.mousemove),fe.mousemove=null),16&me?fe.wheel||(L.addEventListener("wheel",pe.wheel,{passive:!1}),fe.wheel=pe.wheel):(L.removeEventListener("wheel",fe.wheel),fe.wheel=null),2&me?fe.mouseup||(fe.mouseup=pe.mouseup):(this._document.removeEventListener("mouseup",fe.mouseup),fe.mouseup=null),4&me?fe.mousedrag||(fe.mousedrag=pe.mousedrag):(this._document.removeEventListener("mousemove",fe.mousedrag),fe.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,b.addDisposableDomListener)(L,"mousedown",(me=>{if(me.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(me))return te(me),fe.mouseup&&this._document.addEventListener("mouseup",fe.mouseup),fe.mousedrag&&this._document.addEventListener("mousemove",fe.mousedrag),this.cancel(me)}))),this.register((0,b.addDisposableDomListener)(L,"wheel",(me=>{if(!fe.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(me)===!1)return!1;if(!this.buffer.hasScrollback){const De=this.viewport.getLinesScrolled(me);if(De===0)return;const je=J.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(me.deltaY<0?"A":"B");let ze="";for(let st=0;st<Math.abs(De);st++)ze+=je;return this.coreService.triggerDataEvent(ze,!0),this.cancel(me,!0)}return this.viewport.handleWheel(me)?this.cancel(me):void 0}}),{passive:!1})),this.register((0,b.addDisposableDomListener)(L,"touchstart",(me=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(me),this.cancel(me)}),{passive:!0})),this.register((0,b.addDisposableDomListener)(L,"touchmove",(me=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(me)?void 0:this.cancel(me)}),{passive:!1}))}refresh(Y,L){this._renderService?.refreshRows(Y,L)}updateCursorStyle(Y){this._selectionService?.shouldColumnSelect(Y)?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(Y,L,te=0){te===1?(super.scrollLines(Y,L,te),this.refresh(0,this.rows-1)):this.viewport?.scrollLines(Y)}paste(Y){(0,d.paste)(Y,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(Y){this._customKeyEventHandler=Y}attachCustomWheelEventHandler(Y){this._customWheelEventHandler=Y}registerLinkProvider(Y){return this._linkProviderService.registerLinkProvider(Y)}registerCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const L=this._characterJoinerService.register(Y);return this.refresh(0,this.rows-1),L}deregisterCharacterJoiner(Y){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(Y)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(Y){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+Y)}registerDecoration(Y){return this._decorationService.registerDecoration(Y)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(Y,L,te){this._selectionService.setSelection(Y,L,te)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){this._selectionService?.clearSelection()}selectAll(){this._selectionService?.selectAll()}selectLines(Y,L){this._selectionService?.selectLines(Y,L)}_keyDown(Y){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;const L=this.browser.isMac&&this.options.macOptionIsMeta&&Y.altKey;if(!L&&!this._compositionHelper.keydown(Y))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;L||Y.key!=="Dead"&&Y.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const te=(0,ee.evaluateKeyboardEvent)(Y,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(Y),te.type===3||te.type===2){const fe=this.rows-1;return this.scrollLines(te.type===2?-fe:fe),this.cancel(Y,!0)}return te.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,Y)||(te.cancel&&this.cancel(Y,!0),!te.key||!!(Y.key&&!Y.ctrlKey&&!Y.altKey&&!Y.metaKey&&Y.key.length===1&&Y.key.charCodeAt(0)>=65&&Y.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(te.key!==J.C0.ETX&&te.key!==J.C0.CR||(this.textarea.value=""),this._onKey.fire({key:te.key,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(te.key,!0),!this.optionsService.rawOptions.screenReaderMode||Y.altKey||Y.ctrlKey?this.cancel(Y,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(Y,L){const te=Y.isMac&&!this.options.macOptionIsMeta&&L.altKey&&!L.ctrlKey&&!L.metaKey||Y.isWindows&&L.altKey&&L.ctrlKey&&!L.metaKey||Y.isWindows&&L.getModifierState("AltGraph");return L.type==="keypress"?te:te&&(!L.keyCode||L.keyCode>47)}_keyUp(Y){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1||((function(L){return L.keyCode===16||L.keyCode===17||L.keyCode===18})(Y)||this.focus(),this.updateCursorStyle(Y),this._keyPressHandled=!1)}_keyPress(Y){let L;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(Y)===!1)return!1;if(this.cancel(Y),Y.charCode)L=Y.charCode;else if(Y.which===null||Y.which===void 0)L=Y.keyCode;else{if(Y.which===0||Y.charCode===0)return!1;L=Y.which}return!(!L||(Y.altKey||Y.ctrlKey||Y.metaKey)&&!this._isThirdLevelShift(this.browser,Y)||(L=String.fromCharCode(L),this._onKey.fire({key:L,domEvent:Y}),this._showCursor(),this.coreService.triggerDataEvent(L,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(Y){if(Y.data&&Y.inputType==="insertText"&&(!Y.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const L=Y.data;return this.coreService.triggerDataEvent(L,!0),this.cancel(Y),!0}return!1}resize(Y,L){Y!==this.cols||L!==this.rows?super.resize(Y,L):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(Y,L){this._charSizeService?.measure(),this.viewport?.syncScrollArea(!0)}clear(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let Y=1;Y<this.rows;Y++)this.buffer.lines.push(this.buffer.getBlankLine(G.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),this.viewport?.reset(),this.refresh(0,this.rows-1)}}reset(){this.options.rows=this.rows,this.options.cols=this.cols;const Y=this._customKeyEventHandler;this._setup(),super.reset(),this._selectionService?.reset(),this._decorationService.reset(),this.viewport?.reset(),this._customKeyEventHandler=Y,this.refresh(0,this.rows-1)}clearTextureAtlas(){this._renderService?.clearTextureAtlas()}_reportFocus(){this.element?.classList.contains("focus")?this.coreService.triggerDataEvent(J.C0.ESC+"[I"):this.coreService.triggerDataEvent(J.C0.ESC+"[O")}_reportWindowsOptions(Y){if(this._renderService)switch(Y){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const L=this._renderService.dimensions.css.canvas.width.toFixed(0),te=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[4;${te};${L}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const fe=this._renderService.dimensions.css.cell.width.toFixed(0),pe=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${J.C0.ESC}[6;${pe};${fe}t`)}}cancel(Y,L){if(this.options.cancelEvents||L)return Y.preventDefault(),Y.stopPropagation(),!1}}u.Terminal=_e},9924:($,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,b){this._rowCount=b,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 v=h-this._lastRefreshMs,C=this._debounceThresholdMS-v;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($,u,f){var d=this&&this.__decorate||function(c,a,l,_){var E,y=arguments.length,w=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,a,l,_);else for(var m=c.length-1;m>=0;m--)(E=c[m])&&(w=(y<3?E(w):y>3?E(a,l,w):E(a,l))||w);return y>3&&w&&Object.defineProperty(a,l,w),w},b=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.Viewport=void 0;const h=f(3656),v=f(4725),C=f(8460),S=f(844),p=f(2585);let o=u.Viewport=class extends S.Disposable{constructor(c,a,l,_,E,y,w,m){super(),this._viewportElement=c,this._scrollArea=a,this._bufferService=l,this._optionsService=_,this._charSizeService=E,this._renderService=y,this._coreBrowserService=w,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((D=>this._activeBuffer=D.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((D=>this._renderDimensions=D))),this._handleThemeChange(m.colors),this.register(m.onChangeColors((D=>this._handleThemeChange(D)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(c){this._viewportElement.style.backgroundColor=c.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame((()=>this.syncScrollArea()))}_refresh(c){if(c)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh())))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderDimensions.device.cell.height/this._coreBrowserService.dpr,this._currentDeviceCellHeight=this._renderDimensions.device.cell.height,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;const a=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==a&&(this._lastRecordedBufferHeight=a,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const c=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==c&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=c),this._refreshAnimationFrame=null}syncScrollArea(c=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(c);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(c)}_handleScroll(c){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const a=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:a,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const c=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(c*(this._smoothScrollState.target-this._smoothScrollState.origin)),c<1?this._coreBrowserService.window.requestAnimationFrame((()=>this._smoothScroll())):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(c,a){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(a<0&&this._viewportElement.scrollTop!==0||a>0&&l<this._lastRecordedBufferHeight)||(c.cancelable&&c.preventDefault(),!1)}handleWheel(c){const a=this._getPixelsScrolled(c);return a!==0&&(this._optionsService.rawOptions.smoothScrollDuration?(this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target===-1?this._smoothScrollState.target=this._viewportElement.scrollTop+a:this._smoothScrollState.target+=a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}scrollLines(c){if(c!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const a=c*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+a,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:c,suppressScrollEvent:!1})}_getPixelsScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_LINE?a*=this._currentRowHeight:c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._currentRowHeight*this._bufferService.rows),a}getBufferElements(c,a){let l,_="";const E=[],y=a??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let m=c;m<y;m++){const D=w.get(m);if(!D)continue;const q=w.get(m+1)?.isWrapped;if(_+=D.translateToString(!q),!q||m===w.length-1){const I=document.createElement("div");I.textContent=_,E.push(I),_.length>0&&(l=I),_=""}}return{bufferElements:E,cursorElement:l}}getLinesScrolled(c){if(c.deltaY===0||c.shiftKey)return 0;let a=this._applyScrollModifier(c.deltaY,c);return c.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(a/=this._currentRowHeight+0,this._wheelPartialScroll+=a,a=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):c.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(a*=this._bufferService.rows),a}_applyScrollModifier(c,a){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&a.altKey||l==="ctrl"&&a.ctrlKey||l==="shift"&&a.shiftKey?c*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:c*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(c){this._lastTouchY=c.touches[0].pageY}handleTouchMove(c){const a=this._lastTouchY-c.touches[0].pageY;return this._lastTouchY=c.touches[0].pageY,a!==0&&(this._viewportElement.scrollTop+=a,this._bubbleScroll(c,a))}};u.Viewport=o=d([b(2,p.IBufferService),b(3,p.IOptionsService),b(4,v.ICharSizeService),b(5,v.IRenderService),b(6,v.ICoreBrowserService),b(7,v.IThemeService)],o)},3107:function($,u,f){var d=this&&this.__decorate||function(p,o,c,a){var l,_=arguments.length,E=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(p,o,c,a);else for(var y=p.length-1;y>=0;y--)(l=p[y])&&(E=(_<3?l(E):_>3?l(o,c,E):l(o,c))||E);return _>3&&E&&Object.defineProperty(o,c,E),E},b=this&&this.__param||function(p,o){return function(c,a){o(c,a,p)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferDecorationRenderer=void 0;const h=f(4725),v=f(844),C=f(2585);let S=u.BufferDecorationRenderer=class extends v.Disposable{constructor(p,o,c,a,l){super(),this._screenElement=p,this._bufferService=o,this._coreBrowserService=c,this._decorationService=a,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt}))),this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh()))),this.register(this._decorationService.onDecorationRemoved((_=>this._removeDecoration(_)))),this.register((0,v.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 p of this._decorationService.decorations)this._renderDecoration(p);this._dimensionsChanged=!1}_renderDecoration(p){this._refreshStyle(p),this._dimensionsChanged&&this._refreshXPosition(p)}_createElement(p){const o=this._coreBrowserService.mainDocument.createElement("div");o.classList.add("xterm-decoration"),o.classList.toggle("xterm-decoration-top-layer",p?.options?.layer==="top"),o.style.width=`${Math.round((p.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,o.style.height=(p.options.height||1)*this._renderService.dimensions.css.cell.height+"px",o.style.top=(p.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",o.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const c=p.options.x??0;return c&&c>this._bufferService.cols&&(o.style.display="none"),this._refreshXPosition(p,o),o}_refreshStyle(p){const o=p.marker.line-this._bufferService.buffers.active.ydisp;if(o<0||o>=this._bufferService.rows)p.element&&(p.element.style.display="none",p.onRenderEmitter.fire(p.element));else{let c=this._decorationElements.get(p);c||(c=this._createElement(p),p.element=c,this._decorationElements.set(p,c),this._container.appendChild(c),p.onDispose((()=>{this._decorationElements.delete(p),c.remove()}))),c.style.top=o*this._renderService.dimensions.css.cell.height+"px",c.style.display=this._altBufferIsActive?"none":"block",p.onRenderEmitter.fire(c)}}_refreshXPosition(p,o=p.element){if(!o)return;const c=p.options.x??0;(p.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(p){this._decorationElements.get(p)?.remove(),this._decorationElements.delete(p),p.dispose()}};u.BufferDecorationRenderer=S=d([b(1,C.IBufferService),b(2,h.ICoreBrowserService),b(3,C.IDecorationService),b(4,h.IRenderService)],S)},5871:($,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,b){return d>=f.startBufferLine-this._linePadding[b||"full"]&&d<=f.endBufferLine+this._linePadding[b||"full"]}_addLineToZone(f,d){f.startBufferLine=Math.min(f.startBufferLine,d),f.endBufferLine=Math.max(f.endBufferLine,d)}}},5744:function($,u,f){var d=this&&this.__decorate||function(l,_,E,y){var w,m=arguments.length,D=m<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,E):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(l,_,E,y);else for(var q=l.length-1;q>=0;q--)(w=l[q])&&(D=(m<3?w(D):m>3?w(_,E,D):w(_,E))||D);return m>3&&D&&Object.defineProperty(_,E,D),D},b=this&&this.__param||function(l,_){return function(E,y){_(E,y,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OverviewRulerRenderer=void 0;const h=f(5871),v=f(4725),C=f(844),S=f(2585),p={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0},c={full:0,left:0,center:0,right:0};let a=u.OverviewRulerRenderer=class extends C.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,E,y,w,m,D){super(),this._viewportElement=l,this._screenElement=_,this._bufferService=E,this._decorationService=y,this._renderService=w,this._optionsService=m,this._coreBrowserService=D,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),this._viewportElement.parentElement?.insertBefore(this._canvas,this._viewportElement);const q=this._canvas.getContext("2d");if(!q)throw new Error("Ctx cannot be null");this._ctx=q,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,C.toDisposable)((()=>{this._canvas?.remove()})))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered((()=>this._queueRefresh(void 0,!0)))),this.register(this._decorationService.onDecorationRemoved((()=>this._queueRefresh(void 0,!0))))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange((()=>this._queueRefresh()))),this.register(this._bufferService.buffers.onBufferActivate((()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"}))),this.register(this._bufferService.onScroll((()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())})))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender((()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)}))),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",(()=>this._queueRefresh(!0)))),this.register(this._coreBrowserService.onDprChange((()=>this._queueRefresh(!0)))),this._queueRefresh(!0)}_refreshDrawConstants(){const l=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);o.full=this._canvas.width,o.left=l,o.center=_,o.right=l,this._refreshDrawHeightConstants(),c.full=0,c.left=0,c.center=o.left,c.right=o.left+o.center}_refreshDrawHeightConstants(){p.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);p.left=_,p.center=_,p.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*p.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const _ of l)_.position!=="full"&&this._renderColorZone(_);for(const _ of l)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(c[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-p[l.position||"full"]/2),o[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+p[l.position||"full"]))}_queueRefresh(l,_){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};u.OverviewRulerRenderer=a=d([b(2,S.IBufferService),b(3,S.IDecorationService),b(4,v.IRenderService),b(5,S.IOptionsService),b(6,v.ICoreBrowserService)],a)},2950:function($,u,f){var d=this&&this.__decorate||function(p,o,c,a){var l,_=arguments.length,E=_<3?o:a===null?a=Object.getOwnPropertyDescriptor(o,c):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(p,o,c,a);else for(var y=p.length-1;y>=0;y--)(l=p[y])&&(E=(_<3?l(E):_>3?l(o,c,E):l(o,c))||E);return _>3&&E&&Object.defineProperty(o,c,E),E},b=this&&this.__param||function(p,o){return function(c,a){o(c,a,p)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CompositionHelper=void 0;const h=f(4725),v=f(2585),C=f(2584);let S=u.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(p,o,c,a,l,_){this._textarea=p,this._compositionView=o,this._bufferService=c,this._optionsService=a,this._coreService=l,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(p){this._compositionView.textContent=p.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(p){if(this._isComposing||this._isSendingComposition){if(p.keyCode===229||p.keyCode===16||p.keyCode===17||p.keyCode===18)return!1;this._finalizeComposition(!1)}return p.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(p){if(this._compositionView.classList.remove("active"),this._isComposing=!1,p){const o={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let c;this._isSendingComposition=!1,o.start+=this._dataAlreadySent.length,c=this._isComposing?this._textarea.value.substring(o.start,o.end):this._textarea.value.substring(o.start),c.length>0&&this._coreService.triggerDataEvent(c,!0)}}),0)}else{this._isSendingComposition=!1;const o=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(o,!0)}}_handleAnyTextareaChanges(){const p=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const o=this._textarea.value,c=o.replace(p,"");this._dataAlreadySent=c,o.length>p.length?this._coreService.triggerDataEvent(c,!0):o.length<p.length?this._coreService.triggerDataEvent(`${C.C0.DEL}`,!0):o.length===p.length&&o!==p&&this._coreService.triggerDataEvent(o,!0)}}),0)}updateCompositionElements(p){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const o=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),c=this._renderService.dimensions.css.cell.height,a=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=o*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=a+"px",this._compositionView.style.height=c+"px",this._compositionView.style.lineHeight=c+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=a+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}p||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};u.CompositionHelper=S=d([b(2,v.IBufferService),b(3,v.IOptionsService),b(4,v.ICoreService),b(5,h.IRenderService)],S)},9806:($,u)=>{function f(d,b,h){const v=h.getBoundingClientRect(),C=d.getComputedStyle(h),S=parseInt(C.getPropertyValue("padding-left")),p=parseInt(C.getPropertyValue("padding-top"));return[b.clientX-v.left-S,b.clientY-v.top-p]}Object.defineProperty(u,"__esModule",{value:!0}),u.getCoords=u.getCoordsRelativeToElement=void 0,u.getCoordsRelativeToElement=f,u.getCoords=function(d,b,h,v,C,S,p,o,c){if(!S)return;const a=f(d,b,h);return a?(a[0]=Math.ceil((a[0]+(c?p/2:0))/p),a[1]=Math.ceil(a[1]/o),a[0]=Math.min(Math.max(a[0],1),v+(c?1:0)),a[1]=Math.min(Math.max(a[1],1),C),a):void 0}},9504:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.moveToCellSequence=void 0;const d=f(2584);function b(o,c,a,l){const _=o-h(o,a),E=c-h(c,a),y=Math.abs(_-E)-(function(w,m,D){let q=0;const I=w-h(w,D),K=m-h(m,D);for(let H=0;H<Math.abs(I-K);H++){const Q=v(w,m)==="A"?-1:1;D.buffer.lines.get(I+Q*H)?.isWrapped&&q++}return q})(o,c,a);return p(y,S(v(o,c),l))}function h(o,c){let a=0,l=c.buffer.lines.get(o),_=l?.isWrapped;for(;_&&o>=0&&o<c.rows;)a++,l=c.buffer.lines.get(--o),_=l?.isWrapped;return a}function v(o,c){return o>c?"A":"B"}function C(o,c,a,l,_,E){let y=o,w=c,m="";for(;y!==a||w!==l;)y+=_?1:-1,_&&y>E.cols-1?(m+=E.buffer.translateBufferLineToString(w,!1,o,y),y=0,o=0,w++):!_&&y<0&&(m+=E.buffer.translateBufferLineToString(w,!1,0,o+1),y=E.cols-1,o=y,w--);return m+E.buffer.translateBufferLineToString(w,!1,o,y)}function S(o,c){const a=c?"O":"[";return d.C0.ESC+a+o}function p(o,c){o=Math.floor(o);let a="";for(let l=0;l<o;l++)a+=c;return a}u.moveToCellSequence=function(o,c,a,l){const _=a.buffer.x,E=a.buffer.y;if(!a.buffer.hasScrollback)return(function(m,D,q,I,K,H){return b(D,I,K,H).length===0?"":p(C(m,D,m,D-h(D,K),!1,K).length,S("D",H))})(_,E,0,c,a,l)+b(E,c,a,l)+(function(m,D,q,I,K,H){let Q;Q=b(D,I,K,H).length>0?I-h(I,K):D;const ce=I,G=(function(J,ee,T,k,x,O){let F;return F=b(T,k,x,O).length>0?k-h(k,x):ee,J<T&&F<=k||J>=T&&F<k?"C":"D"})(m,D,q,I,K,H);return p(C(m,Q,q,ce,G==="C",K).length,S(G,H))})(_,E,o,c,a,l);let y;if(E===c)return y=_>o?"D":"C",p(Math.abs(_-o),S(y,l));y=E>c?"D":"C";const w=Math.abs(E-c);return p((function(m,D){return D.cols-m})(E>c?o:_,a)+(w-1)*a.cols+1+((E>c?_:o)-1),S(y,l))}},1296:function($,u,f){var d=this&&this.__decorate||function(H,Q,ce,G){var J,ee=arguments.length,T=ee<3?Q:G===null?G=Object.getOwnPropertyDescriptor(Q,ce):G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(H,Q,ce,G);else for(var k=H.length-1;k>=0;k--)(J=H[k])&&(T=(ee<3?J(T):ee>3?J(Q,ce,T):J(Q,ce))||T);return ee>3&&T&&Object.defineProperty(Q,ce,T),T},b=this&&this.__param||function(H,Q){return function(ce,G){Q(ce,G,H)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRenderer=void 0;const h=f(3787),v=f(2550),C=f(2223),S=f(6171),p=f(6052),o=f(4725),c=f(8055),a=f(8460),l=f(844),_=f(2585),E="xterm-dom-renderer-owner-",y="xterm-rows",w="xterm-fg-",m="xterm-bg-",D="xterm-focus",q="xterm-selection";let I=1,K=u.DomRenderer=class extends l.Disposable{constructor(H,Q,ce,G,J,ee,T,k,x,O,F,se,_e){super(),this._terminal=H,this._document=Q,this._element=ce,this._screenElement=G,this._viewportElement=J,this._helperContainer=ee,this._linkifier2=T,this._charSizeService=x,this._optionsService=O,this._bufferService=F,this._coreBrowserService=se,this._themeService=_e,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,p.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new a.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(y),this._rowContainer.style.lineHeight="normal",this._rowContainer.setAttribute("aria-hidden","true"),this._refreshRowElements(this._bufferService.cols,this._bufferService.rows),this._selectionContainer=this._document.createElement("div"),this._selectionContainer.classList.add(q),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,S.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ve=>this._injectCss(ve)))),this._injectCss(this._themeService.colors),this._rowFactory=k.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(E+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ve=>this._handleLinkHover(ve)))),this.register(this._linkifier2.onHideLinkUnderline((ve=>this._handleLinkLeave(ve)))),this.register((0,l.toDisposable)((()=>{this._element.classList.remove(E+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new v.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const H=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*H,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*H),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/H),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/H),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 ce of this._rowElements)ce.style.width=`${this.dimensions.css.canvas.width}px`,ce.style.height=`${this.dimensions.css.cell.height}px`,ce.style.lineHeight=`${this.dimensions.css.cell.height}px`,ce.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const Q=`${this._terminalSelector} .${y} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=Q,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(H){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let Q=`${this._terminalSelector} .${y} { color: ${H.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;Q+=`${this._terminalSelector} .${y} .xterm-dim { color: ${c.color.multiplyOpacity(H.foreground,.5).css};}`,Q+=`${this._terminalSelector} span:not(.xterm-bold) { font-weight: ${this._optionsService.rawOptions.fontWeight};}${this._terminalSelector} span.xterm-bold { font-weight: ${this._optionsService.rawOptions.fontWeightBold};}${this._terminalSelector} span.xterm-italic { font-style: italic;}`;const ce=`blink_underline_${this._terminalClass}`,G=`blink_bar_${this._terminalClass}`,J=`blink_block_${this._terminalClass}`;Q+=`@keyframes ${ce} { 50% { border-bottom-style: hidden; }}`,Q+=`@keyframes ${G} { 50% { box-shadow: none; }}`,Q+=`@keyframes ${J} { 0% { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css}; } 50% { background-color: inherit; color: ${H.cursor.css}; }}`,Q+=`${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${ce} 1s step-end infinite;}${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${G} 1s step-end infinite;}${this._terminalSelector} .${y}.${D} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${J} 1s step-end infinite;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block { background-color: ${H.cursor.css}; color: ${H.cursorAccent.css};}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${H.cursor.css} !important; color: ${H.cursorAccent.css} !important;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${H.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${H.cursor.css} inset;}${this._terminalSelector} .${y} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${H.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,Q+=`${this._terminalSelector} .${q} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${q} div { position: absolute; background-color: ${H.selectionBackgroundOpaque.css};}${this._terminalSelector} .${q} div { position: absolute; background-color: ${H.selectionInactiveBackgroundOpaque.css};}`;for(const[ee,T]of H.ansi.entries())Q+=`${this._terminalSelector} .${w}${ee} { color: ${T.css}; }${this._terminalSelector} .${w}${ee}.xterm-dim { color: ${c.color.multiplyOpacity(T,.5).css}; }${this._terminalSelector} .${m}${ee} { background-color: ${T.css}; }`;Q+=`${this._terminalSelector} .${w}${C.INVERTED_DEFAULT_COLOR} { color: ${c.color.opaque(H.background).css}; }${this._terminalSelector} .${w}${C.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${c.color.multiplyOpacity(c.color.opaque(H.background),.5).css}; }${this._terminalSelector} .${m}${C.INVERTED_DEFAULT_COLOR} { background-color: ${H.foreground.css}; }`,this._themeStyleElement.textContent=Q}_setDefaultSpacing(){const H=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${H}px`,this._rowFactory.defaultSpacing=H}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(H,Q){for(let ce=this._rowElements.length;ce<=Q;ce++){const G=this._document.createElement("div");this._rowContainer.appendChild(G),this._rowElements.push(G)}for(;this._rowElements.length>Q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(H,Q){this._refreshRowElements(H,Q),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(D),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(D),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(H,Q,ce){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(H,Q,ce),this.renderRows(0,this._bufferService.rows-1),!H||!Q)return;this._selectionRenderModel.update(this._terminal,H,Q,ce);const G=this._selectionRenderModel.viewportStartRow,J=this._selectionRenderModel.viewportEndRow,ee=this._selectionRenderModel.viewportCappedStartRow,T=this._selectionRenderModel.viewportCappedEndRow;if(ee>=this._bufferService.rows||T<0)return;const k=this._document.createDocumentFragment();if(ce){const x=H[0]>Q[0];k.appendChild(this._createSelectionElement(ee,x?Q[0]:H[0],x?H[0]:Q[0],T-ee+1))}else{const x=G===ee?H[0]:0,O=ee===J?Q[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(ee,x,O));const F=T-ee-1;if(k.appendChild(this._createSelectionElement(ee+1,0,this._bufferService.cols,F)),ee!==T){const se=J===T?Q[0]:this._bufferService.cols;k.appendChild(this._createSelectionElement(T,0,se))}}this._selectionContainer.appendChild(k)}_createSelectionElement(H,Q,ce,G=1){const J=this._document.createElement("div"),ee=Q*this.dimensions.css.cell.width;let T=this.dimensions.css.cell.width*(ce-Q);return ee+T>this.dimensions.css.canvas.width&&(T=this.dimensions.css.canvas.width-ee),J.style.height=G*this.dimensions.css.cell.height+"px",J.style.top=H*this.dimensions.css.cell.height+"px",J.style.left=`${ee}px`,J.style.width=`${T}px`,J}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 H of this._rowElements)H.replaceChildren()}renderRows(H,Q){const ce=this._bufferService.buffer,G=ce.ybase+ce.y,J=Math.min(ce.x,this._bufferService.cols-1),ee=this._optionsService.rawOptions.cursorBlink,T=this._optionsService.rawOptions.cursorStyle,k=this._optionsService.rawOptions.cursorInactiveStyle;for(let x=H;x<=Q;x++){const O=x+ce.ydisp,F=this._rowElements[x],se=ce.lines.get(O);if(!F||!se)break;F.replaceChildren(...this._rowFactory.createRow(se,O,O===G,T,k,J,ee,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${E}${this._terminalClass}`}_handleLinkHover(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!0)}_handleLinkLeave(H){this._setCellUnderline(H.x1,H.x2,H.y1,H.y2,H.cols,!1)}_setCellUnderline(H,Q,ce,G,J,ee){ce<0&&(H=0),G<0&&(Q=0);const T=this._bufferService.rows-1;ce=Math.max(Math.min(ce,T),0),G=Math.max(Math.min(G,T),0),J=Math.min(J,this._bufferService.cols);const k=this._bufferService.buffer,x=k.ybase+k.y,O=Math.min(k.x,J-1),F=this._optionsService.rawOptions.cursorBlink,se=this._optionsService.rawOptions.cursorStyle,_e=this._optionsService.rawOptions.cursorInactiveStyle;for(let ve=ce;ve<=G;++ve){const Y=ve+k.ydisp,L=this._rowElements[ve],te=k.lines.get(Y);if(!L||!te)break;L.replaceChildren(...this._rowFactory.createRow(te,Y,Y===x,se,_e,O,F,this.dimensions.css.cell.width,this._widthCache,ee?ve===ce?H:0:-1,ee?(ve===G?Q:J)-1:-1))}}};u.DomRenderer=K=d([b(7,_.IInstantiationService),b(8,o.ICharSizeService),b(9,_.IOptionsService),b(10,_.IBufferService),b(11,o.ICoreBrowserService),b(12,o.IThemeService)],K)},3787:function($,u,f){var d=this&&this.__decorate||function(y,w,m,D){var q,I=arguments.length,K=I<3?w:D===null?D=Object.getOwnPropertyDescriptor(w,m):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")K=Reflect.decorate(y,w,m,D);else for(var H=y.length-1;H>=0;H--)(q=y[H])&&(K=(I<3?q(K):I>3?q(w,m,K):q(w,m))||K);return I>3&&K&&Object.defineProperty(w,m,K),K},b=this&&this.__param||function(y,w){return function(m,D){w(m,D,y)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DomRendererRowFactory=void 0;const h=f(2223),v=f(643),C=f(511),S=f(2585),p=f(8055),o=f(4725),c=f(4269),a=f(6171),l=f(3734);let _=u.DomRendererRowFactory=class{constructor(y,w,m,D,q,I,K){this._document=y,this._characterJoinerService=w,this._optionsService=m,this._coreBrowserService=D,this._coreService=q,this._decorationService=I,this._themeService=K,this._workCell=new C.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(y,w,m){this._selectionStart=y,this._selectionEnd=w,this._columnSelectMode=m}createRow(y,w,m,D,q,I,K,H,Q,ce,G){const J=[],ee=this._characterJoinerService.getJoinedCharacters(w),T=this._themeService.colors;let k,x=y.getNoBgTrimmedLength();m&&x<I+1&&(x=I+1);let O=0,F="",se=0,_e=0,ve=0,Y=!1,L=0,te=!1,fe=0;const pe=[],me=ce!==-1&&G!==-1;for(let De=0;De<x;De++){y.loadCell(De,this._workCell);let je=this._workCell.getWidth();if(je===0)continue;let ze=!1,st=De,Ee=this._workCell;if(ee.length>0&&De===ee[0][0]){ze=!0;const Pe=ee.shift();Ee=new c.JoinedCellData(this._workCell,y.translateToString(!0,Pe[0],Pe[1]),Pe[1]-Pe[0]),st=Pe[1]-1,je=Ee.getWidth()}const Ht=this._isCellInSelection(De,w),ti=m&&De===I,Mt=me&&De>=ce&&De<=G;let ii=!1;this._decorationService.forEachDecorationAtCell(De,w,void 0,(Pe=>{ii=!0}));let _i=Ee.getChars()||v.WHITESPACE_CELL_CHAR;if(_i===" "&&(Ee.isUnderline()||Ee.isOverline())&&(_i=" "),fe=je*H-Q.get(_i,Ee.isBold(),Ee.isItalic()),k){if(O&&(Ht&&te||!Ht&&!te&&Ee.bg===se)&&(Ht&&te&&T.selectionForeground||Ee.fg===_e)&&Ee.extended.ext===ve&&Mt===Y&&fe===L&&!ti&&!ze&&!ii){Ee.isInvisible()?F+=v.WHITESPACE_CELL_CHAR:F+=_i,O++;continue}O&&(k.textContent=F),k=this._document.createElement("span"),O=0,F=""}else k=this._document.createElement("span");if(se=Ee.bg,_e=Ee.fg,ve=Ee.extended.ext,Y=Mt,L=fe,te=Ht,ze&&I>=De&&I<=st&&(I=De),!this._coreService.isCursorHidden&&ti&&this._coreService.isCursorInitialized){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)K&&pe.push("xterm-cursor-blink"),pe.push(D==="bar"?"xterm-cursor-bar":D==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(q)switch(q){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(Ee.isBold()&&pe.push("xterm-bold"),Ee.isItalic()&&pe.push("xterm-italic"),Ee.isDim()&&pe.push("xterm-dim"),F=Ee.isInvisible()?v.WHITESPACE_CELL_CHAR:Ee.getChars()||v.WHITESPACE_CELL_CHAR,Ee.isUnderline()&&(pe.push(`xterm-underline-${Ee.extended.underlineStyle}`),F===" "&&(F=" "),!Ee.isUnderlineColorDefault()))if(Ee.isUnderlineColorRGB())k.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(Ee.getUnderlineColor()).join(",")})`;else{let Pe=Ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&Ee.isBold()&&Pe<8&&(Pe+=8),k.style.textDecorationColor=T.ansi[Pe].css}Ee.isOverline()&&(pe.push("xterm-overline"),F===" "&&(F=" ")),Ee.isStrikethrough()&&pe.push("xterm-strikethrough"),Mt&&(k.style.textDecoration="underline");let pt=Ee.getFgColor(),at=Ee.getFgColorMode(),gt=Ee.getBgColor(),vi=Ee.getBgColorMode();const Ti=!!Ee.isInverse();if(Ti){const Pe=pt;pt=gt,gt=Pe;const Ut=at;at=vi,vi=Ut}let Et,Zi,Nt,yi=!1;switch(this._decorationService.forEachDecorationAtCell(De,w,void 0,(Pe=>{Pe.options.layer!=="top"&&yi||(Pe.backgroundColorRGB&&(vi=50331648,gt=Pe.backgroundColorRGB.rgba>>8&16777215,Et=Pe.backgroundColorRGB),Pe.foregroundColorRGB&&(at=50331648,pt=Pe.foregroundColorRGB.rgba>>8&16777215,Zi=Pe.foregroundColorRGB),yi=Pe.options.layer==="top")})),!yi&&Ht&&(Et=this._coreBrowserService.isFocused?T.selectionBackgroundOpaque:T.selectionInactiveBackgroundOpaque,gt=Et.rgba>>8&16777215,vi=50331648,yi=!0,T.selectionForeground&&(at=50331648,pt=T.selectionForeground.rgba>>8&16777215,Zi=T.selectionForeground)),yi&&pe.push("xterm-decoration-top"),vi){case 16777216:case 33554432:Nt=T.ansi[gt],pe.push(`xterm-bg-${gt}`);break;case 50331648:Nt=p.channels.toColor(gt>>16,gt>>8&255,255>),this._addStyle(k,`background-color:#${E((gt>>>0).toString(16),"0",6)}`);break;default:Ti?(Nt=T.foreground,pe.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Nt=T.background}switch(Et||Ee.isDim()&&(Et=p.color.multiplyOpacity(Nt,.5)),at){case 16777216:case 33554432:Ee.isBold()&&pt<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(pt+=8),this._applyMinimumContrast(k,Nt,T.ansi[pt],Ee,Et,void 0)||pe.push(`xterm-fg-${pt}`);break;case 50331648:const Pe=p.channels.toColor(pt>>16&255,pt>>8&255,255&pt);this._applyMinimumContrast(k,Nt,Pe,Ee,Et,Zi)||this._addStyle(k,`color:#${E(pt.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(k,Nt,T.foreground,Ee,Et,Zi)||Ti&&pe.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}pe.length&&(k.className=pe.join(" "),pe.length=0),ti||ze||ii?k.textContent=F:O++,fe!==this.defaultSpacing&&(k.style.letterSpacing=`${fe}px`),J.push(k),De=st}return k&&O&&(k.textContent=F),J}_applyMinimumContrast(y,w,m,D,q,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,a.treatGlyphAsBackgroundColor)(D.getCode()))return!1;const K=this._getContrastCache(D);let H;if(q||I||(H=K.getColor(w.rgba,m.rgba)),H===void 0){const Q=this._optionsService.rawOptions.minimumContrastRatio/(D.isDim()?2:1);H=p.color.ensureContrastRatio(q||w,I||m,Q),K.setColor((q||w).rgba,(I||m).rgba,H??null)}return!!H&&(this._addStyle(y,`color:${H.css}`),!0)}_getContrastCache(y){return y.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(y,w){y.setAttribute("style",`${y.getAttribute("style")||""}${w};`)}_isCellInSelection(y,w){const m=this._selectionStart,D=this._selectionEnd;return!(!m||!D)&&(this._columnSelectMode?m[0]<=D[0]?y>=m[0]&&w>=m[1]&&y<D[0]&&w<=D[1]:y<m[0]&&w>=m[1]&&y>=D[0]&&w<=D[1]:w>m[1]&&w<D[1]||m[1]===D[1]&&w===m[1]&&y>=m[0]&&y<D[0]||m[1]<D[1]&&w===D[1]&&y<D[0]||m[1]<D[1]&&w===m[1]&&y>=m[0])}};function E(y,w,m){for(;y.length<m;)y=w+y;return y}u.DomRendererRowFactory=_=d([b(1,o.ICharacterJoinerService),b(2,S.IOptionsService),b(3,o.ICoreBrowserService),b(4,S.ICoreService),b(5,S.IDecorationService),b(6,o.IThemeService)],_)},2550:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WidthCache=void 0,u.WidthCache=class{constructor(f,d){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.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const b=f.createElement("span");b.classList.add("xterm-char-measure-element");const h=f.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const v=f.createElement("span");v.classList.add("xterm-char-measure-element"),v.style.fontStyle="italic";const C=f.createElement("span");C.classList.add("xterm-char-measure-element"),C.style.fontWeight="bold",C.style.fontStyle="italic",this._measureElements=[b,h,v,C],this._container.appendChild(b),this._container.appendChild(h),this._container.appendChild(v),this._container.appendChild(C),d.appendChild(this._container),this.clear()}dispose(){this._container.remove(),this._measureElements.length=0,this._holey=void 0}clear(){this._flat.fill(-9999),this._holey=new Map}setFont(f,d,b,h){f===this._font&&d===this._fontSize&&b===this._weight&&h===this._weightBold||(this._font=f,this._fontSize=d,this._weight=b,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${b}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${b}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(f,d,b){let h=0;if(!d&&!b&&f.length===1&&(h=f.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const S=this._measure(f,0);return S>0&&(this._flat[h]=S),S}let v=f;d&&(v+="B"),b&&(v+="I");let C=this._holey.get(v);if(C===void 0){let S=0;d&&(S|=1),b&&(S|=2),C=this._measure(f,S),C>0&&this._holey.set(v,C)}return C}_measure(f,d){const b=this._measureElements[d];return b.textContent=f.repeat(32),b.offsetWidth/32}}},2223:($,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:($,u)=>{function f(b){return 57508<=b&&b<=57558}function d(b){return b>=128512&&b<=128591||b>=127744&&b<=128511||b>=128640&&b<=128767||b>=9728&&b<=9983||b>=9984&&b<=10175||b>=65024&&b<=65039||b>=129280&&b<=129535||b>=127462&&b<=127487}Object.defineProperty(u,"__esModule",{value:!0}),u.computeNextVariantOffset=u.createRenderDimensions=u.treatGlyphAsBackgroundColor=u.allowRescaling=u.isEmoji=u.isRestrictedPowerlineGlyph=u.isPowerlineGlyph=u.throwIfFalsy=void 0,u.throwIfFalsy=function(b){if(!b)throw new Error("value must not be falsy");return b},u.isPowerlineGlyph=f,u.isRestrictedPowerlineGlyph=function(b){return 57520<=b&&b<=57527},u.isEmoji=d,u.allowRescaling=function(b,h,v,C){return h===1&&v>Math.ceil(1.5*C)&&b!==void 0&&b>255&&!d(b)&&!f(b)&&!(function(S){return 57344<=S&&S<=63743})(b)},u.treatGlyphAsBackgroundColor=function(b){return f(b)||(function(h){return 9472<=h&&h<=9631})(b)},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}}}},u.computeNextVariantOffset=function(b,h,v=0){return(b-(2*Math.round(h)-v))%(2*Math.round(h))}},6052:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.createSelectionRenderModel=void 0;class f{constructor(){this.clear()}clear(){this.hasSelection=!1,this.columnSelectMode=!1,this.viewportStartRow=0,this.viewportEndRow=0,this.viewportCappedStartRow=0,this.viewportCappedEndRow=0,this.startCol=0,this.endCol=0,this.selectionStart=void 0,this.selectionEnd=void 0}update(b,h,v,C=!1){if(this.selectionStart=h,this.selectionEnd=v,!h||!v||h[0]===v[0]&&h[1]===v[1])return void this.clear();const S=b.buffers.active.ydisp,p=h[1]-S,o=v[1]-S,c=Math.max(p,0),a=Math.min(o,b.rows-1);c>=b.rows||a<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=C,this.viewportStartRow=p,this.viewportEndRow=o,this.viewportCappedStartRow=c,this.viewportCappedEndRow=a,this.startCol=h[0],this.endCol=v[0])}isCellSelected(b,h,v){return!!this.hasSelection&&(v-=b.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&v>=this.viewportCappedStartRow&&h<this.endCol&&v<=this.viewportCappedEndRow:h<this.startCol&&v>=this.viewportCappedStartRow&&h>=this.endCol&&v<=this.viewportCappedEndRow:v>this.viewportStartRow&&v<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&v===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&v===this.viewportStartRow&&h>=this.startCol)}}u.createSelectionRenderModel=function(){return new f}},456:($,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($,u,f){var d=this&&this.__decorate||function(a,l,_,E){var y,w=arguments.length,m=w<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(a,l,_,E);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(m=(w<3?y(m):w>3?y(l,_,m):y(l,_))||m);return w>3&&m&&Object.defineProperty(l,_,m),m},b=this&&this.__param||function(a,l){return function(_,E){l(_,E,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharSizeService=void 0;const h=f(2585),v=f(8460),C=f(844);let S=u.CharSizeService=class extends C.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(a,l,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new v.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new c(this._optionsService))}catch{this._measureStrategy=this.register(new o(a,l,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const a=this._measureStrategy.measure();a.width===this.width&&a.height===this.height||(this.width=a.width,this.height=a.height,this._onCharSizeChange.fire())}};u.CharSizeService=S=d([b(2,h.IOptionsService)],S);class p extends C.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,_){l!==void 0&&l>0&&_!==void 0&&_>0&&(this._result.width=l,this._result.height=_)}}class o extends p{constructor(l,_,E){super(),this._document=l,this._parentElement=_,this._optionsService=E,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class c extends p{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function($,u,f){var d=this&&this.__decorate||function(c,a,l,_){var E,y=arguments.length,w=y<3?a:_===null?_=Object.getOwnPropertyDescriptor(a,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(c,a,l,_);else for(var m=c.length-1;m>=0;m--)(E=c[m])&&(w=(y<3?E(w):y>3?E(a,l,w):E(a,l))||w);return y>3&&w&&Object.defineProperty(a,l,w),w},b=this&&this.__param||function(c,a){return function(l,_){a(l,_,c)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CharacterJoinerService=u.JoinedCellData=void 0;const h=f(3734),v=f(643),C=f(511),S=f(2585);class p extends h.AttributeData{constructor(a,l,_){super(),this.content=0,this.combinedData="",this.fg=a.fg,this.bg=a.bg,this.combinedData=l,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(a){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.JoinedCellData=p;let o=u.CharacterJoinerService=class jd{constructor(a){this._bufferService=a,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new C.CellData}register(a){const l={id:this._nextCharacterJoinerId++,handler:a};return this._characterJoiners.push(l),l.id}deregister(a){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===a)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(a){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(a);if(!l||l.length===0)return[];const _=[],E=l.translateToString(!0);let y=0,w=0,m=0,D=l.getFg(0),q=l.getBg(0);for(let I=0;I<l.getTrimmedLength();I++)if(l.loadCell(I,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==D||this._workCell.bg!==q){if(I-y>1){const K=this._getJoinedRanges(E,m,w,l,y);for(let H=0;H<K.length;H++)_.push(K[H])}y=I,m=w,D=this._workCell.fg,q=this._workCell.bg}w+=this._workCell.getChars().length||v.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-y>1){const I=this._getJoinedRanges(E,m,w,l,y);for(let K=0;K<I.length;K++)_.push(I[K])}return _}_getJoinedRanges(a,l,_,E,y){const w=a.substring(l,_);let m=[];try{m=this._characterJoiners[0].handler(w)}catch(D){console.error(D)}for(let D=1;D<this._characterJoiners.length;D++)try{const q=this._characterJoiners[D].handler(w);for(let I=0;I<q.length;I++)jd._mergeRanges(m,q[I])}catch(q){console.error(q)}return this._stringRangesToCellRanges(m,E,y),m}_stringRangesToCellRanges(a,l,_){let E=0,y=!1,w=0,m=a[E];if(m){for(let D=_;D<this._bufferService.cols;D++){const q=l.getWidth(D),I=l.getString(D).length||v.WHITESPACE_CELL_CHAR.length;if(q!==0){if(!y&&m[0]<=w&&(m[0]=D,y=!0),m[1]<=w){if(m[1]=D,m=a[++E],!m)break;m[0]<=w?(m[0]=D,y=!0):y=!1}w+=I}}m&&(m[1]=this._bufferService.cols)}}static _mergeRanges(a,l){let _=!1;for(let E=0;E<a.length;E++){const y=a[E];if(_){if(l[1]<=y[0])return a[E-1][1]=l[1],a;if(l[1]<=y[1])return a[E-1][1]=Math.max(l[1],y[1]),a.splice(E,1),a;a.splice(E,1),E--}else{if(l[1]<=y[0])return a.splice(E,0,l),a;if(l[1]<=y[1])return y[0]=Math.min(l[0],y[0]),a;l[0]<y[1]&&(y[0]=Math.min(l[0],y[0]),_=!0)}}return _?a[a.length-1][1]=l[1]:a.push(l),a}};u.CharacterJoinerService=o=d([b(0,S.IBufferService)],o)},5114:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreBrowserService=void 0;const d=f(844),b=f(8460),h=f(3656);class v extends d.Disposable{constructor(p,o,c){super(),this._textarea=p,this._window=o,this.mainDocument=c,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new C(this._window),this._onDprChange=this.register(new b.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new b.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((a=>this._screenDprMonitor.setWindow(a)))),this.register((0,b.forwardEvent)(this._screenDprMonitor.onDprChange,this._onDprChange)),this._textarea.addEventListener("focus",(()=>this._isFocused=!0)),this._textarea.addEventListener("blur",(()=>this._isFocused=!1))}get window(){return this._window}set window(p){this._window!==p&&(this._window=p,this._onWindowChange.fire(this._window))}get dpr(){return this.window.devicePixelRatio}get isFocused(){return this._cachedIsFocused===void 0&&(this._cachedIsFocused=this._isFocused&&this._textarea.ownerDocument.hasFocus(),queueMicrotask((()=>this._cachedIsFocused=void 0))),this._cachedIsFocused}}u.CoreBrowserService=v;class C extends d.Disposable{constructor(p){super(),this._parentWindow=p,this._windowResizeListener=this.register(new d.MutableDisposable),this._onDprChange=this.register(new b.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,d.toDisposable)((()=>this.clearListener())))}setWindow(p){this._parentWindow=p,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){this._outerListener&&(this._resolutionMediaMatchList?.removeListener(this._outerListener),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._resolutionMediaMatchList=this._parentWindow.matchMedia(`screen and (resolution: ${this._parentWindow.devicePixelRatio}dppx)`),this._resolutionMediaMatchList.addListener(this._outerListener))}clearListener(){this._resolutionMediaMatchList&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._outerListener=void 0)}}},779:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.LinkProviderService=void 0;const d=f(844);class b extends d.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,d.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(v){return this.linkProviders.push(v),{dispose:()=>{const C=this.linkProviders.indexOf(v);C!==-1&&this.linkProviders.splice(C,1)}}}}u.LinkProviderService=b},8934:function($,u,f){var d=this&&this.__decorate||function(S,p,o,c){var a,l=arguments.length,_=l<3?p:c===null?c=Object.getOwnPropertyDescriptor(p,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(S,p,o,c);else for(var E=S.length-1;E>=0;E--)(a=S[E])&&(_=(l<3?a(_):l>3?a(p,o,_):a(p,o))||_);return l>3&&_&&Object.defineProperty(p,o,_),_},b=this&&this.__param||function(S,p){return function(o,c){p(o,c,S)}};Object.defineProperty(u,"__esModule",{value:!0}),u.MouseService=void 0;const h=f(4725),v=f(9806);let C=u.MouseService=class{constructor(S,p){this._renderService=S,this._charSizeService=p}getCoords(S,p,o,c,a){return(0,v.getCoords)(window,S,p,o,c,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,a)}getMouseReportCoords(S,p){const o=(0,v.getCoordsRelativeToElement)(window,S,p);if(this._charSizeService.hasValidSize)return o[0]=Math.min(Math.max(o[0],0),this._renderService.dimensions.css.canvas.width-1),o[1]=Math.min(Math.max(o[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(o[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(o[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(o[0]),y:Math.floor(o[1])}}};u.MouseService=C=d([b(0,h.IRenderService),b(1,h.ICharSizeService)],C)},3230:function($,u,f){var d=this&&this.__decorate||function(a,l,_,E){var y,w=arguments.length,m=w<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(a,l,_,E);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(m=(w<3?y(m):w>3?y(l,_,m):y(l,_))||m);return w>3&&m&&Object.defineProperty(l,_,m),m},b=this&&this.__param||function(a,l){return function(_,E){l(_,E,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.RenderService=void 0;const h=f(6193),v=f(4725),C=f(8460),S=f(844),p=f(7226),o=f(2585);let c=u.RenderService=class extends S.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(a,l,_,E,y,w,m,D){super(),this._rowCount=a,this._charSizeService=E,this._renderer=this.register(new S.MutableDisposable),this._pausedResizeTask=new p.DebouncedIdleTask,this._observerDisposable=this.register(new S.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new C.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new C.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new C.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new C.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer(((q,I)=>this._renderRows(q,I)),m),this.register(this._renderDebouncer),this.register(m.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>this._renderer.value?.clear()))),this.register(_.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(y.onDecorationRegistered((()=>this._fullRefresh()))),this.register(y.onDecorationRemoved((()=>this._fullRefresh()))),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(D.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(m.window,l),this.register(m.onWindowChange((q=>this._registerIntersectionObserver(q,l))))}_registerIntersectionObserver(a,l){if("IntersectionObserver"in a){const _=new a.IntersectionObserver((E=>this._handleIntersectionChange(E[E.length-1])),{threshold:0});_.observe(l),this._observerDisposable.value=(0,S.toDisposable)((()=>_.disconnect()))}}_handleIntersectionChange(a){this._isPaused=a.isIntersecting===void 0?a.intersectionRatio===0:!a.isIntersecting,this._isPaused||this._charSizeService.hasValidSize||this._charSizeService.measure(),!this._isPaused&&this._needsFullRefresh&&(this._pausedResizeTask.flush(),this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)}refreshRows(a,l,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(a,l,this._rowCount))}_renderRows(a,l){this._renderer.value&&(a=Math.min(a,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(a,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:a,end:l}),this._onRender.fire({start:a,end:l}),this._isNextRenderRedrawOnly=!0)}resize(a,l){this._rowCount=l,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(a){this._renderer.value=a,this._renderer.value&&(this._renderer.value.onRequestRedraw((l=>this.refreshRows(l.start,l.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(a){return this._renderDebouncer.addRefreshCallback(a)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){this._renderer.value&&(this._renderer.value.clearTextureAtlas?.(),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(a,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>this._renderer.value?.handleResize(a,l))):this._renderer.value.handleResize(a,l),this._fullRefresh())}handleCharSizeChanged(){this._renderer.value?.handleCharSizeChanged()}handleBlur(){this._renderer.value?.handleBlur()}handleFocus(){this._renderer.value?.handleFocus()}handleSelectionChanged(a,l,_){this._selectionState.start=a,this._selectionState.end=l,this._selectionState.columnSelectMode=_,this._renderer.value?.handleSelectionChanged(a,l,_)}handleCursorMove(){this._renderer.value?.handleCursorMove()}clear(){this._renderer.value?.clear()}};u.RenderService=c=d([b(2,o.IOptionsService),b(3,v.ICharSizeService),b(4,o.IDecorationService),b(5,o.IBufferService),b(6,v.ICoreBrowserService),b(7,v.IThemeService)],c)},9312:function($,u,f){var d=this&&this.__decorate||function(m,D,q,I){var K,H=arguments.length,Q=H<3?D:I===null?I=Object.getOwnPropertyDescriptor(D,q):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Q=Reflect.decorate(m,D,q,I);else for(var ce=m.length-1;ce>=0;ce--)(K=m[ce])&&(Q=(H<3?K(Q):H>3?K(D,q,Q):K(D,q))||Q);return H>3&&Q&&Object.defineProperty(D,q,Q),Q},b=this&&this.__param||function(m,D){return function(q,I){D(q,I,m)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SelectionService=void 0;const h=f(9806),v=f(9504),C=f(456),S=f(4725),p=f(8460),o=f(844),c=f(6114),a=f(4841),l=f(511),_=f(2585),E=" ",y=new RegExp(E,"g");let w=u.SelectionService=class extends o.Disposable{constructor(m,D,q,I,K,H,Q,ce,G){super(),this._element=m,this._screenElement=D,this._linkifier=q,this._bufferService=I,this._coreService=K,this._mouseService=H,this._optionsService=Q,this._renderService=ce,this._coreBrowserService=G,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new p.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new p.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new p.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new p.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=J=>this._handleMouseMove(J),this._mouseUpListener=J=>this._handleMouseUp(J),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((J=>this._handleTrim(J))),this.register(this._bufferService.buffers.onBufferActivate((J=>this._handleBufferActivate(J)))),this.enable(),this._model=new C.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,o.toDisposable)((()=>{this._removeMouseDownListeners()})))}reset(){this.clearSelection()}disable(){this.clearSelection(),this._enabled=!1}enable(){this._enabled=!0}get selectionStart(){return this._model.finalSelectionStart}get selectionEnd(){return this._model.finalSelectionEnd}get hasSelection(){const m=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;return!(!m||!D||m[0]===D[0]&&m[1]===D[1])}get selectionText(){const m=this._model.finalSelectionStart,D=this._model.finalSelectionEnd;if(!m||!D)return"";const q=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(m[0]===D[0])return"";const K=m[0]<D[0]?m[0]:D[0],H=m[0]<D[0]?D[0]:m[0];for(let Q=m[1];Q<=D[1];Q++){const ce=q.translateBufferLineToString(Q,!0,K,H);I.push(ce)}}else{const K=m[1]===D[1]?D[0]:void 0;I.push(q.translateBufferLineToString(m[1],!0,m[0],K));for(let H=m[1]+1;H<=D[1]-1;H++){const Q=q.lines.get(H),ce=q.translateBufferLineToString(H,!0);Q?.isWrapped?I[I.length-1]+=ce:I.push(ce)}if(m[1]!==D[1]){const H=q.lines.get(D[1]),Q=q.translateBufferLineToString(D[1],!0,0,D[0]);H&&H.isWrapped?I[I.length-1]+=Q:I.push(Q)}}return I.map((K=>K.replace(y," "))).join(c.isWindows?`\r
|
|
14
|
+
`:`
|
|
15
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(m){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),c.isLinux&&m&&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(m){const D=this._getMouseBufferCoords(m),q=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(q&&I&&D)&&this._areCoordsInSelection(D,q,I)}isCellInSelection(m,D){const q=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!q||!I)&&this._areCoordsInSelection([m,D],q,I)}_areCoordsInSelection(m,D,q){return m[1]>D[1]&&m[1]<q[1]||D[1]===q[1]&&m[1]===D[1]&&m[0]>=D[0]&&m[0]<q[0]||D[1]<q[1]&&m[1]===q[1]&&m[0]<q[0]||D[1]<q[1]&&m[1]===D[1]&&m[0]>=D[0]}_selectWordAtCursor(m,D){const q=this._linkifier.currentLink?.link?.range;if(q)return this._model.selectionStart=[q.start.x-1,q.start.y-1],this._model.selectionStartLength=(0,a.getRangeLength)(q,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(m);return!!I&&(this._selectWordAt(I,D),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(m,D){this._model.clearSelection(),m=Math.max(m,0),D=Math.min(D,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,m],this._model.selectionEnd=[this._bufferService.cols,D],this.refresh(),this._onSelectionChange.fire()}_handleTrim(m){this._model.handleTrim(m)&&this.refresh()}_getMouseBufferCoords(m){const D=this._mouseService.getCoords(m,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(D)return D[0]--,D[1]--,D[1]+=this._bufferService.buffer.ydisp,D}_getMouseEventScrollAmount(m){let D=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,m,this._screenElement)[1];const q=this._renderService.dimensions.css.canvas.height;return D>=0&&D<=q?0:(D>q&&(D-=q),D=Math.min(Math.max(D,-50),50),D/=50,D/Math.abs(D)+Math.round(14*D))}shouldForceSelection(m){return c.isMac?m.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:m.shiftKey}handleMouseDown(m){if(this._mouseDownTimeStamp=m.timeStamp,(m.button!==2||!this.hasSelection)&&m.button===0){if(!this._enabled){if(!this.shouldForceSelection(m))return;m.stopPropagation()}m.preventDefault(),this._dragScrollAmount=0,this._enabled&&m.shiftKey?this._handleIncrementalClick(m):m.detail===1?this._handleSingleClick(m):m.detail===2?this._handleDoubleClick(m):m.detail===3&&this._handleTripleClick(m),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(m){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(m))}_handleSingleClick(m){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(m)?3:0,this._model.selectionStart=this._getMouseBufferCoords(m),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const D=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);D&&D.length!==this._model.selectionStart[0]&&D.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(m){this._selectWordAtCursor(m,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(m){const D=this._getMouseBufferCoords(m);D&&(this._activeSelectionMode=2,this._selectLineAt(D[1]))}shouldColumnSelect(m){return m.altKey&&!(c.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(m){if(m.stopImmediatePropagation(),!this._model.selectionStart)return;const D=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(m),!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(m),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const q=this._bufferService.buffer;if(this._model.selectionEnd[1]<q.lines.length){const I=q.lines.get(this._model.selectionEnd[1]);I&&I.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}D&&D[0]===this._model.selectionEnd[0]&&D[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 m=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(m.ydisp+this._bufferService.rows,m.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=m.ydisp),this.refresh()}}_handleMouseUp(m){const D=m.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&D<500&&m.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const q=this._mouseService.getCoords(m,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(q&&q[0]!==void 0&&q[1]!==void 0){const I=(0,v.moveToCellSequence)(q[0]-1,q[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const m=this._model.finalSelectionStart,D=this._model.finalSelectionEnd,q=!(!m||!D||m[0]===D[0]&&m[1]===D[1]);q?m&&D&&(this._oldSelectionStart&&this._oldSelectionEnd&&m[0]===this._oldSelectionStart[0]&&m[1]===this._oldSelectionStart[1]&&D[0]===this._oldSelectionEnd[0]&&D[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(m,D,q)):this._oldHasSelection&&this._fireOnSelectionChange(m,D,q)}_fireOnSelectionChange(m,D,q){this._oldSelectionStart=m,this._oldSelectionEnd=D,this._oldHasSelection=q,this._onSelectionChange.fire()}_handleBufferActivate(m){this.clearSelection(),this._trimListener.dispose(),this._trimListener=m.activeBuffer.lines.onTrim((D=>this._handleTrim(D)))}_convertViewportColToCharacterIndex(m,D){let q=D;for(let I=0;D>=I;I++){const K=m.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?q--:K>1&&D!==I&&(q+=K-1)}return q}setSelection(m,D,q){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[m,D],this._model.selectionStartLength=q,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(m){this._isClickInSelection(m)||(this._selectWordAtCursor(m,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(m,D,q=!0,I=!0){if(m[0]>=this._bufferService.cols)return;const K=this._bufferService.buffer,H=K.lines.get(m[1]);if(!H)return;const Q=K.translateBufferLineToString(m[1],!1);let ce=this._convertViewportColToCharacterIndex(H,m[0]),G=ce;const J=m[0]-ce;let ee=0,T=0,k=0,x=0;if(Q.charAt(ce)===" "){for(;ce>0&&Q.charAt(ce-1)===" ";)ce--;for(;G<Q.length&&Q.charAt(G+1)===" ";)G++}else{let se=m[0],_e=m[0];H.getWidth(se)===0&&(ee++,se--),H.getWidth(_e)===2&&(T++,_e++);const ve=H.getString(_e).length;for(ve>1&&(x+=ve-1,G+=ve-1);se>0&&ce>0&&!this._isCharWordSeparator(H.loadCell(se-1,this._workCell));){H.loadCell(se-1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===0?(ee++,se--):Y>1&&(k+=Y-1,ce-=Y-1),ce--,se--}for(;_e<H.length&&G+1<Q.length&&!this._isCharWordSeparator(H.loadCell(_e+1,this._workCell));){H.loadCell(_e+1,this._workCell);const Y=this._workCell.getChars().length;this._workCell.getWidth()===2?(T++,_e++):Y>1&&(x+=Y-1,G+=Y-1),G++,_e++}}G++;let O=ce+J-ee+k,F=Math.min(this._bufferService.cols,G-ce+ee+T-k-x);if(D||Q.slice(ce,G).trim()!==""){if(q&&O===0&&H.getCodePoint(0)!==32){const se=K.lines.get(m[1]-1);if(se&&H.isWrapped&&se.getCodePoint(this._bufferService.cols-1)!==32){const _e=this._getWordAt([this._bufferService.cols-1,m[1]-1],!1,!0,!1);if(_e){const ve=this._bufferService.cols-_e.start;O-=ve,F+=ve}}}if(I&&O+F===this._bufferService.cols&&H.getCodePoint(this._bufferService.cols-1)!==32){const se=K.lines.get(m[1]+1);if(se?.isWrapped&&se.getCodePoint(0)!==32){const _e=this._getWordAt([0,m[1]+1],!1,!1,!0);_e&&(F+=_e.length)}}return{start:O,length:F}}}_selectWordAt(m,D){const q=this._getWordAt(m,D);if(q){for(;q.start<0;)q.start+=this._bufferService.cols,m[1]--;this._model.selectionStart=[q.start,m[1]],this._model.selectionStartLength=q.length}}_selectToWordAt(m){const D=this._getWordAt(m,!0);if(D){let q=m[1];for(;D.start<0;)D.start+=this._bufferService.cols,q--;if(!this._model.areSelectionValuesReversed())for(;D.start+D.length>this._bufferService.cols;)D.length-=this._bufferService.cols,q++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?D.start:D.start+D.length,q]}}_isCharWordSeparator(m){return m.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(m.getChars())>=0}_selectLineAt(m){const D=this._bufferService.buffer.getWrappedRangeForLine(m),q={start:{x:0,y:D.first},end:{x:this._bufferService.cols-1,y:D.last}};this._model.selectionStart=[0,D.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,a.getRangeLength)(q,this._bufferService.cols)}};u.SelectionService=w=d([b(3,_.IBufferService),b(4,_.ICoreService),b(5,S.IMouseService),b(6,_.IOptionsService),b(7,S.IRenderService),b(8,S.ICoreBrowserService)],w)},4725:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.ILinkProviderService=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"),u.ILinkProviderService=(0,d.createDecorator)("LinkProviderService")},6731:function($,u,f){var d=this&&this.__decorate||function(w,m,D,q){var I,K=arguments.length,H=K<3?m:q===null?q=Object.getOwnPropertyDescriptor(m,D):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")H=Reflect.decorate(w,m,D,q);else for(var Q=w.length-1;Q>=0;Q--)(I=w[Q])&&(H=(K<3?I(H):K>3?I(m,D,H):I(m,D))||H);return K>3&&H&&Object.defineProperty(m,D,H),H},b=this&&this.__param||function(w,m){return function(D,q){m(D,q,w)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ThemeService=u.DEFAULT_ANSI_COLORS=void 0;const h=f(7239),v=f(8055),C=f(8460),S=f(844),p=f(2585),o=v.css.toColor("#ffffff"),c=v.css.toColor("#000000"),a=v.css.toColor("#ffffff"),l=v.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};u.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[v.css.toColor("#2e3436"),v.css.toColor("#cc0000"),v.css.toColor("#4e9a06"),v.css.toColor("#c4a000"),v.css.toColor("#3465a4"),v.css.toColor("#75507b"),v.css.toColor("#06989a"),v.css.toColor("#d3d7cf"),v.css.toColor("#555753"),v.css.toColor("#ef2929"),v.css.toColor("#8ae234"),v.css.toColor("#fce94f"),v.css.toColor("#729fcf"),v.css.toColor("#ad7fa8"),v.css.toColor("#34e2e2"),v.css.toColor("#eeeeec")],m=[0,95,135,175,215,255];for(let D=0;D<216;D++){const q=m[D/36%6|0],I=m[D/6%6|0],K=m[D%6];w.push({css:v.channels.toCss(q,I,K),rgba:v.channels.toRgba(q,I,K)})}for(let D=0;D<24;D++){const q=8+10*D;w.push({css:v.channels.toCss(q,q,q),rgba:v.channels.toRgba(q,q,q)})}return w})());let E=u.ThemeService=class extends S.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,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:o,background:c,cursor:a,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:v.color.blend(c,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:v.color.blend(c,_),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(w={}){const m=this._colors;if(m.foreground=y(w.foreground,o),m.background=y(w.background,c),m.cursor=y(w.cursor,a),m.cursorAccent=y(w.cursorAccent,l),m.selectionBackgroundTransparent=y(w.selectionBackground,_),m.selectionBackgroundOpaque=v.color.blend(m.background,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundTransparent=y(w.selectionInactiveBackground,m.selectionBackgroundTransparent),m.selectionInactiveBackgroundOpaque=v.color.blend(m.background,m.selectionInactiveBackgroundTransparent),m.selectionForeground=w.selectionForeground?y(w.selectionForeground,v.NULL_COLOR):void 0,m.selectionForeground===v.NULL_COLOR&&(m.selectionForeground=void 0),v.color.isOpaque(m.selectionBackgroundTransparent)&&(m.selectionBackgroundTransparent=v.color.opacity(m.selectionBackgroundTransparent,.3)),v.color.isOpaque(m.selectionInactiveBackgroundTransparent)&&(m.selectionInactiveBackgroundTransparent=v.color.opacity(m.selectionInactiveBackgroundTransparent,.3)),m.ansi=u.DEFAULT_ANSI_COLORS.slice(),m.ansi[0]=y(w.black,u.DEFAULT_ANSI_COLORS[0]),m.ansi[1]=y(w.red,u.DEFAULT_ANSI_COLORS[1]),m.ansi[2]=y(w.green,u.DEFAULT_ANSI_COLORS[2]),m.ansi[3]=y(w.yellow,u.DEFAULT_ANSI_COLORS[3]),m.ansi[4]=y(w.blue,u.DEFAULT_ANSI_COLORS[4]),m.ansi[5]=y(w.magenta,u.DEFAULT_ANSI_COLORS[5]),m.ansi[6]=y(w.cyan,u.DEFAULT_ANSI_COLORS[6]),m.ansi[7]=y(w.white,u.DEFAULT_ANSI_COLORS[7]),m.ansi[8]=y(w.brightBlack,u.DEFAULT_ANSI_COLORS[8]),m.ansi[9]=y(w.brightRed,u.DEFAULT_ANSI_COLORS[9]),m.ansi[10]=y(w.brightGreen,u.DEFAULT_ANSI_COLORS[10]),m.ansi[11]=y(w.brightYellow,u.DEFAULT_ANSI_COLORS[11]),m.ansi[12]=y(w.brightBlue,u.DEFAULT_ANSI_COLORS[12]),m.ansi[13]=y(w.brightMagenta,u.DEFAULT_ANSI_COLORS[13]),m.ansi[14]=y(w.brightCyan,u.DEFAULT_ANSI_COLORS[14]),m.ansi[15]=y(w.brightWhite,u.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const D=Math.min(m.ansi.length-16,w.extendedAnsi.length);for(let q=0;q<D;q++)m.ansi[q+16]=y(w.extendedAnsi[q],u.DEFAULT_ANSI_COLORS[q+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(w){this._restoreColor(w),this._onChangeColors.fire(this.colors)}_restoreColor(w){if(w!==void 0)switch(w){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[w]=this._restoreColors.ansi[w]}else for(let m=0;m<this._restoreColors.ansi.length;++m)this._colors.ansi[m]=this._restoreColors.ansi[m]}modifyColors(w){w(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function y(w,m){if(w!==void 0)try{return v.css.toColor(w)}catch{}return m}u.ThemeService=E=d([b(0,p.IOptionsService)],E)},6349:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CircularList=void 0;const d=f(8460),b=f(844);class h extends b.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 S=new Array(C);for(let p=0;p<Math.min(C,this.length);p++)S[p]=this._array[this._getCyclicIndex(p)];this._array=S,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let S=this._length;S<C;S++)this._array[S]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,S){this._array[this._getCyclicIndex(C)]=S}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,S,...p){if(S){for(let o=C;o<this._length-S;o++)this._array[this._getCyclicIndex(o)]=this._array[this._getCyclicIndex(o+S)];this._length-=S,this.onDeleteEmitter.fire({index:C,amount:S})}for(let o=this._length-1;o>=C;o--)this._array[this._getCyclicIndex(o+p.length)]=this._array[this._getCyclicIndex(o)];for(let o=0;o<p.length;o++)this._array[this._getCyclicIndex(C+o)]=p[o];if(p.length&&this.onInsertEmitter.fire({index:C,amount:p.length}),this._length+p.length>this._maxLength){const o=this._length+p.length-this._maxLength;this._startIndex+=o,this._length=this._maxLength,this.onTrimEmitter.fire(o)}else this._length+=p.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,S,p){if(!(S<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+p<0)throw new Error("Cannot shift elements in list beyond index 0");if(p>0){for(let c=S-1;c>=0;c--)this.set(C+c+p,this.get(C+c));const o=C+S+p-this._length;if(o>0)for(this._length+=o;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let o=0;o<S;o++)this.set(C+o+p,this.get(C+o))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}u.CircularList=h},1439:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.clone=void 0,u.clone=function f(d,b=5){if(typeof d!="object")return d;const h=Array.isArray(d)?[]:{};for(const v in d)h[v]=b<=1?d[v]:d[v]&&f(d[v],b-1);return h}},8055:($,u)=>{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;let f=0,d=0,b=0,h=0;var v,C,S,p,o;function c(l){const _=l.toString(16);return _.length<2?"0"+_:_}function a(l,_){return l<_?(_+.05)/(l+.05):(l+.05)/(_+.05)}u.NULL_COLOR={css:"#00000000",rgba:0},(function(l){l.toCss=function(_,E,y,w){return w!==void 0?`#${c(_)}${c(E)}${c(y)}${c(w)}`:`#${c(_)}${c(E)}${c(y)}`},l.toRgba=function(_,E,y,w=255){return(_<<24|E<<16|y<<8|w)>>>0},l.toColor=function(_,E,y,w){return{css:l.toCss(_,E,y,w),rgba:l.toRgba(_,E,y,w)}}})(v||(u.channels=v={})),(function(l){function _(E,y){return h=Math.round(255*y),[f,d,b]=o.toChannels(E.rgba),{css:v.toCss(f,d,b,h),rgba:v.toRgba(f,d,b,h)}}l.blend=function(E,y){if(h=(255&y.rgba)/255,h===1)return{css:y.css,rgba:y.rgba};const w=y.rgba>>24&255,m=y.rgba>>16&255,D=y.rgba>>8&255,q=E.rgba>>24&255,I=E.rgba>>16&255,K=E.rgba>>8&255;return f=q+Math.round((w-q)*h),d=I+Math.round((m-I)*h),b=K+Math.round((D-K)*h),{css:v.toCss(f,d,b),rgba:v.toRgba(f,d,b)}},l.isOpaque=function(E){return(255&E.rgba)==255},l.ensureContrastRatio=function(E,y,w){const m=o.ensureContrastRatio(E.rgba,y.rgba,w);if(m)return v.toColor(m>>24&255,m>>16&255,m>>8&255)},l.opaque=function(E){const y=(255|E.rgba)>>>0;return[f,d,b]=o.toChannels(y),{css:v.toCss(f,d,b),rgba:y}},l.opacity=_,l.multiplyOpacity=function(E,y){return h=255&E.rgba,_(E,h*y/255)},l.toColorRGB=function(E){return[E.rgba>>24&255,E.rgba>>16&255,E.rgba>>8&255]}})(C||(u.color=C={})),(function(l){let _,E;try{const y=document.createElement("canvas");y.width=1,y.height=1;const w=y.getContext("2d",{willReadFrequently:!0});w&&(_=w,_.globalCompositeOperation="copy",E=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(y){if(y.match(/#[\da-f]{3,8}/i))switch(y.length){case 4:return f=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),b=parseInt(y.slice(3,4).repeat(2),16),v.toColor(f,d,b);case 5:return f=parseInt(y.slice(1,2).repeat(2),16),d=parseInt(y.slice(2,3).repeat(2),16),b=parseInt(y.slice(3,4).repeat(2),16),h=parseInt(y.slice(4,5).repeat(2),16),v.toColor(f,d,b,h);case 7:return{css:y,rgba:(parseInt(y.slice(1),16)<<8|255)>>>0};case 9:return{css:y,rgba:parseInt(y.slice(1),16)>>>0}}const w=y.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(w)return f=parseInt(w[1]),d=parseInt(w[2]),b=parseInt(w[3]),h=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),v.toColor(f,d,b,h);if(!_||!E)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=E,_.fillStyle=y,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[f,d,b,h]=_.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:v.toRgba(f,d,b,h),css:y}}})(S||(u.css=S={})),(function(l){function _(E,y,w){const m=E/255,D=y/255,q=w/255;return .2126*(m<=.03928?m/12.92:Math.pow((m+.055)/1.055,2.4))+.7152*(D<=.03928?D/12.92:Math.pow((D+.055)/1.055,2.4))+.0722*(q<=.03928?q/12.92:Math.pow((q+.055)/1.055,2.4))}l.relativeLuminance=function(E){return _(E>>16&255,E>>8&255,255&E)},l.relativeLuminance2=_})(p||(u.rgb=p={})),(function(l){function _(y,w,m){const D=y>>24&255,q=y>>16&255,I=y>>8&255;let K=w>>24&255,H=w>>16&255,Q=w>>8&255,ce=a(p.relativeLuminance2(K,H,Q),p.relativeLuminance2(D,q,I));for(;ce<m&&(K>0||H>0||Q>0);)K-=Math.max(0,Math.ceil(.1*K)),H-=Math.max(0,Math.ceil(.1*H)),Q-=Math.max(0,Math.ceil(.1*Q)),ce=a(p.relativeLuminance2(K,H,Q),p.relativeLuminance2(D,q,I));return(K<<24|H<<16|Q<<8|255)>>>0}function E(y,w,m){const D=y>>24&255,q=y>>16&255,I=y>>8&255;let K=w>>24&255,H=w>>16&255,Q=w>>8&255,ce=a(p.relativeLuminance2(K,H,Q),p.relativeLuminance2(D,q,I));for(;ce<m&&(K<255||H<255||Q<255);)K=Math.min(255,K+Math.ceil(.1*(255-K))),H=Math.min(255,H+Math.ceil(.1*(255-H))),Q=Math.min(255,Q+Math.ceil(.1*(255-Q))),ce=a(p.relativeLuminance2(K,H,Q),p.relativeLuminance2(D,q,I));return(K<<24|H<<16|Q<<8|255)>>>0}l.blend=function(y,w){if(h=(255&w)/255,h===1)return w;const m=w>>24&255,D=w>>16&255,q=w>>8&255,I=y>>24&255,K=y>>16&255,H=y>>8&255;return f=I+Math.round((m-I)*h),d=K+Math.round((D-K)*h),b=H+Math.round((q-H)*h),v.toRgba(f,d,b)},l.ensureContrastRatio=function(y,w,m){const D=p.relativeLuminance(y>>8),q=p.relativeLuminance(w>>8);if(a(D,q)<m){if(q<D){const H=_(y,w,m),Q=a(D,p.relativeLuminance(H>>8));if(Q<m){const ce=E(y,w,m);return Q>a(D,p.relativeLuminance(ce>>8))?H:ce}return H}const I=E(y,w,m),K=a(D,p.relativeLuminance(I>>8));if(K<m){const H=_(y,w,m);return K>a(D,p.relativeLuminance(H>>8))?I:H}return I}},l.reduceLuminance=_,l.increaseLuminance=E,l.toChannels=function(y){return[y>>24&255,y>>16&255,y>>8&255,255&y]}})(o||(u.rgba=o={})),u.toPaddedHex=c,u.contrastRatio=a},8969:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CoreTerminal=void 0;const d=f(844),b=f(2585),h=f(4348),v=f(7866),C=f(744),S=f(7302),p=f(6975),o=f(8460),c=f(1753),a=f(1480),l=f(7994),_=f(9282),E=f(5435),y=f(5981),w=f(2660);let m=!1;class D extends d.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new o.EventEmitter),this._onScroll.event((I=>{this._onScrollApi?.fire(I.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(I){for(const K in I)this.optionsService.options[K]=I[K]}constructor(I){super(),this._windowsWrappingHeuristics=this.register(new d.MutableDisposable),this._onBinary=this.register(new o.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new o.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new o.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new o.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new o.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new S.OptionsService(I)),this._instantiationService.setService(b.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(b.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(v.LogService)),this._instantiationService.setService(b.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(p.CoreService)),this._instantiationService.setService(b.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(c.CoreMouseService)),this._instantiationService.setService(b.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(a.UnicodeService)),this._instantiationService.setService(b.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(b.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(b.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new E.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,o.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,o.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,o.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,o.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((K=>{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((K=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new y.WriteBuffer(((K,H)=>this._inputHandler.parse(K,H)))),this.register((0,o.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,K){this._writeBuffer.write(I,K)}writeSync(I,K){this._logService.logLevel<=b.LogLevelEnum.WARN&&!m&&(this._logService.warn("writeSync is unreliable and will be removed soon."),m=!0),this._writeBuffer.writeSync(I,K)}input(I,K=!0){this.coreService.triggerDataEvent(I,K)}resize(I,K){isNaN(I)||isNaN(K)||(I=Math.max(I,C.MINIMUM_COLS),K=Math.max(K,C.MINIMUM_ROWS),this._bufferService.resize(I,K))}scroll(I,K=!1){this._bufferService.scroll(I,K)}scrollLines(I,K,H){this._bufferService.scrollLines(I,K,H)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const K=I-this._bufferService.buffer.ydisp;K!==0&&this.scrollLines(K)}registerEscHandler(I,K){return this._inputHandler.registerEscHandler(I,K)}registerDcsHandler(I,K){return this._inputHandler.registerDcsHandler(I,K)}registerCsiHandler(I,K){return this._inputHandler.registerCsiHandler(I,K)}registerOscHandler(I,K){return this._inputHandler.registerOscHandler(I,K)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const K=this.optionsService.rawOptions.windowsPty;K&&K.buildNumber!==void 0&&K.buildNumber!==void 0?I=K.backend==="conpty"&&K.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,d.toDisposable)((()=>{for(const K of I)K.dispose()}))}}}u.CoreTerminal=D},8460:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.runAndSubscribe=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 b=[];for(let h=0;h<this._listeners.length;h++)b.push(this._listeners[h]);for(let h=0;h<b.length;h++)b[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((b=>d.fire(b)))},u.runAndSubscribe=function(f,d){return d(void 0),f((b=>d(b)))}},5435:function($,u,f){var d=this&&this.__decorate||function(ee,T,k,x){var O,F=arguments.length,se=F<3?T:x===null?x=Object.getOwnPropertyDescriptor(T,k):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")se=Reflect.decorate(ee,T,k,x);else for(var _e=ee.length-1;_e>=0;_e--)(O=ee[_e])&&(se=(F<3?O(se):F>3?O(T,k,se):O(T,k))||se);return F>3&&se&&Object.defineProperty(T,k,se),se},b=this&&this.__param||function(ee,T){return function(k,x){T(k,x,ee)}};Object.defineProperty(u,"__esModule",{value:!0}),u.InputHandler=u.WindowsOptionsReportType=void 0;const h=f(2584),v=f(7116),C=f(2015),S=f(844),p=f(482),o=f(8437),c=f(8460),a=f(643),l=f(511),_=f(3734),E=f(2585),y=f(1480),w=f(6242),m=f(6351),D=f(5941),q={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function K(ee,T){if(ee>24)return T.setWinLines||!1;switch(ee){case 1:return!!T.restoreWin;case 2:return!!T.minimizeWin;case 3:return!!T.setWinPosition;case 4:return!!T.setWinSizePixels;case 5:return!!T.raiseWin;case 6:return!!T.lowerWin;case 7:return!!T.refreshWin;case 8:return!!T.setWinSizeChars;case 9:return!!T.maximizeWin;case 10:return!!T.fullscreenWin;case 11:return!!T.getWinState;case 13:return!!T.getWinPosition;case 14:return!!T.getWinSizePixels;case 15:return!!T.getScreenSizePixels;case 16:return!!T.getCellSizePixels;case 18:return!!T.getWinSizeChars;case 19:return!!T.getScreenSizeChars;case 20:return!!T.getIconTitle;case 21:return!!T.getWinTitle;case 22:return!!T.pushTitle;case 23:return!!T.popTitle;case 24:return!!T.setWinLines}return!1}var H;(function(ee){ee[ee.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",ee[ee.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(H||(u.WindowsOptionsReportType=H={}));let Q=0;class ce extends S.Disposable{getAttrData(){return this._curAttrData}constructor(T,k,x,O,F,se,_e,ve,Y=new C.EscapeSequenceParser){super(),this._bufferService=T,this._charsetService=k,this._coreService=x,this._logService=O,this._optionsService=F,this._oscLinkService=se,this._coreMouseService=_e,this._unicodeService=ve,this._parser=Y,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new p.StringToUtf32,this._utf8Decoder=new p.Utf8ToUtf32,this._workCell=new l.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new c.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new c.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new c.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new c.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new c.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new c.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new c.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new c.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new c.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new c.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new c.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new c.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new c.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((L=>this._activeBuffer=L.activeBuffer))),this._parser.setCsiHandlerFallback(((L,te)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:te.toArray()})})),this._parser.setEscHandlerFallback((L=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(L)})})),this._parser.setExecuteHandlerFallback((L=>{this._logService.debug("Unknown EXECUTE code: ",{code:L})})),this._parser.setOscHandlerFallback(((L,te,fe)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:te,data:fe})})),this._parser.setDcsHandlerFallback(((L,te,fe)=>{te==="HOOK"&&(fe=fe.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:te,payload:fe})})),this._parser.setPrintHandler(((L,te,fe)=>this.print(L,te,fe))),this._parser.registerCsiHandler({final:"@"},(L=>this.insertChars(L))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(L=>this.scrollLeft(L))),this._parser.registerCsiHandler({final:"A"},(L=>this.cursorUp(L))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(L=>this.scrollRight(L))),this._parser.registerCsiHandler({final:"B"},(L=>this.cursorDown(L))),this._parser.registerCsiHandler({final:"C"},(L=>this.cursorForward(L))),this._parser.registerCsiHandler({final:"D"},(L=>this.cursorBackward(L))),this._parser.registerCsiHandler({final:"E"},(L=>this.cursorNextLine(L))),this._parser.registerCsiHandler({final:"F"},(L=>this.cursorPrecedingLine(L))),this._parser.registerCsiHandler({final:"G"},(L=>this.cursorCharAbsolute(L))),this._parser.registerCsiHandler({final:"H"},(L=>this.cursorPosition(L))),this._parser.registerCsiHandler({final:"I"},(L=>this.cursorForwardTab(L))),this._parser.registerCsiHandler({final:"J"},(L=>this.eraseInDisplay(L,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(L=>this.eraseInDisplay(L,!0))),this._parser.registerCsiHandler({final:"K"},(L=>this.eraseInLine(L,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(L=>this.eraseInLine(L,!0))),this._parser.registerCsiHandler({final:"L"},(L=>this.insertLines(L))),this._parser.registerCsiHandler({final:"M"},(L=>this.deleteLines(L))),this._parser.registerCsiHandler({final:"P"},(L=>this.deleteChars(L))),this._parser.registerCsiHandler({final:"S"},(L=>this.scrollUp(L))),this._parser.registerCsiHandler({final:"T"},(L=>this.scrollDown(L))),this._parser.registerCsiHandler({final:"X"},(L=>this.eraseChars(L))),this._parser.registerCsiHandler({final:"Z"},(L=>this.cursorBackwardTab(L))),this._parser.registerCsiHandler({final:"`"},(L=>this.charPosAbsolute(L))),this._parser.registerCsiHandler({final:"a"},(L=>this.hPositionRelative(L))),this._parser.registerCsiHandler({final:"b"},(L=>this.repeatPrecedingCharacter(L))),this._parser.registerCsiHandler({final:"c"},(L=>this.sendDeviceAttributesPrimary(L))),this._parser.registerCsiHandler({prefix:">",final:"c"},(L=>this.sendDeviceAttributesSecondary(L))),this._parser.registerCsiHandler({final:"d"},(L=>this.linePosAbsolute(L))),this._parser.registerCsiHandler({final:"e"},(L=>this.vPositionRelative(L))),this._parser.registerCsiHandler({final:"f"},(L=>this.hVPosition(L))),this._parser.registerCsiHandler({final:"g"},(L=>this.tabClear(L))),this._parser.registerCsiHandler({final:"h"},(L=>this.setMode(L))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(L=>this.setModePrivate(L))),this._parser.registerCsiHandler({final:"l"},(L=>this.resetMode(L))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(L=>this.resetModePrivate(L))),this._parser.registerCsiHandler({final:"m"},(L=>this.charAttributes(L))),this._parser.registerCsiHandler({final:"n"},(L=>this.deviceStatus(L))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(L=>this.deviceStatusPrivate(L))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(L=>this.softReset(L))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(L=>this.setCursorStyle(L))),this._parser.registerCsiHandler({final:"r"},(L=>this.setScrollRegion(L))),this._parser.registerCsiHandler({final:"s"},(L=>this.saveCursor(L))),this._parser.registerCsiHandler({final:"t"},(L=>this.windowOptions(L))),this._parser.registerCsiHandler({final:"u"},(L=>this.restoreCursor(L))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(L=>this.insertColumns(L))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(L=>this.deleteColumns(L))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(L=>this.selectProtected(L))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(L=>this.requestMode(L,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(L=>this.requestMode(L,!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 w.OscHandler((L=>(this.setTitle(L),this.setIconName(L),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((L=>this.setIconName(L)))),this._parser.registerOscHandler(2,new w.OscHandler((L=>this.setTitle(L)))),this._parser.registerOscHandler(4,new w.OscHandler((L=>this.setOrReportIndexedColor(L)))),this._parser.registerOscHandler(8,new w.OscHandler((L=>this.setHyperlink(L)))),this._parser.registerOscHandler(10,new w.OscHandler((L=>this.setOrReportFgColor(L)))),this._parser.registerOscHandler(11,new w.OscHandler((L=>this.setOrReportBgColor(L)))),this._parser.registerOscHandler(12,new w.OscHandler((L=>this.setOrReportCursorColor(L)))),this._parser.registerOscHandler(104,new w.OscHandler((L=>this.restoreIndexedColor(L)))),this._parser.registerOscHandler(110,new w.OscHandler((L=>this.restoreFgColor(L)))),this._parser.registerOscHandler(111,new w.OscHandler((L=>this.restoreBgColor(L)))),this._parser.registerOscHandler(112,new w.OscHandler((L=>this.restoreCursorColor(L)))),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 L in v.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:L},(()=>this.selectCharset("("+L))),this._parser.registerEscHandler({intermediates:")",final:L},(()=>this.selectCharset(")"+L))),this._parser.registerEscHandler({intermediates:"*",final:L},(()=>this.selectCharset("*"+L))),this._parser.registerEscHandler({intermediates:"+",final:L},(()=>this.selectCharset("+"+L))),this._parser.registerEscHandler({intermediates:"-",final:L},(()=>this.selectCharset("-"+L))),this._parser.registerEscHandler({intermediates:".",final:L},(()=>this.selectCharset("."+L))),this._parser.registerEscHandler({intermediates:"/",final:L},(()=>this.selectCharset("/"+L)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((L=>(this._logService.error("Parsing error: ",L),L))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new m.DcsHandler(((L,te)=>this.requestStatusString(L,te))))}_preserveStack(T,k,x,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=T,this._parseStack.cursorStartY=k,this._parseStack.decodedLength=x,this._parseStack.position=O}_logSlowResolvingAsync(T){this._logService.logLevel<=E.LogLevelEnum.WARN&&Promise.race([T,new Promise(((k,x)=>setTimeout((()=>x("#SLOW_TIMEOUT")),5e3)))]).catch((k=>{if(k!=="#SLOW_TIMEOUT")throw k;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(T,k){let x,O=this._activeBuffer.x,F=this._activeBuffer.y,se=0;const _e=this._parseStack.paused;if(_e){if(x=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,k))return this._logSlowResolvingAsync(x),x;O=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,T.length>I&&(se=this._parseStack.position+I)}if(this._logService.logLevel<=E.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof T=="string"?` "${T}"`:` "${Array.prototype.map.call(T,(L=>String.fromCharCode(L))).join("")}"`),typeof T=="string"?T.split("").map((L=>L.charCodeAt(0))):T),this._parseBuffer.length<T.length&&this._parseBuffer.length<I&&(this._parseBuffer=new Uint32Array(Math.min(T.length,I))),_e||this._dirtyRowTracker.clearRange(),T.length>I)for(let L=se;L<T.length;L+=I){const te=L+I<T.length?L+I:T.length,fe=typeof T=="string"?this._stringDecoder.decode(T.substring(L,te),this._parseBuffer):this._utf8Decoder.decode(T.subarray(L,te),this._parseBuffer);if(x=this._parser.parse(this._parseBuffer,fe))return this._preserveStack(O,F,fe,L),this._logSlowResolvingAsync(x),x}else if(!_e){const L=typeof T=="string"?this._stringDecoder.decode(T,this._parseBuffer):this._utf8Decoder.decode(T,this._parseBuffer);if(x=this._parser.parse(this._parseBuffer,L))return this._preserveStack(O,F,L,0),this._logSlowResolvingAsync(x),x}this._activeBuffer.x===O&&this._activeBuffer.y===F||this._onCursorMove.fire();const ve=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Y=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Y<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Y,this._bufferService.rows-1),Math.min(ve,this._bufferService.rows-1))}print(T,k,x){let O,F;const se=this._charsetService.charset,_e=this._optionsService.rawOptions.screenReaderMode,ve=this._bufferService.cols,Y=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,te=this._curAttrData;let fe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&x-k>0&&fe.getWidth(this._activeBuffer.x-1)===2&&fe.setCellFromCodepoint(this._activeBuffer.x-1,0,1,te);let pe=this._parser.precedingJoinState;for(let me=k;me<x;++me){if(O=T[me],O<127&&se){const st=se[String.fromCharCode(O)];st&&(O=st.charCodeAt(0))}const De=this._unicodeService.charProperties(O,pe);F=y.UnicodeService.extractWidth(De);const je=y.UnicodeService.extractShouldJoin(De),ze=je?y.UnicodeService.extractWidth(pe):0;if(pe=De,_e&&this._onA11yChar.fire((0,p.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+F-ze>ve){if(Y){const st=fe;let Ee=this._activeBuffer.x-ze;for(this._activeBuffer.x=ze,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),fe=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),ze>0&&fe instanceof o.BufferLine&&fe.copyCellsFrom(st,Ee,0,ze,!1);Ee<ve;)st.setCellFromCodepoint(Ee++,0,1,te)}else if(this._activeBuffer.x=ve-1,F===2)continue}if(je&&this._activeBuffer.x){const st=fe.getWidth(this._activeBuffer.x-1)?1:2;fe.addCodepointToCell(this._activeBuffer.x-st,O,F);for(let Ee=F-ze;--Ee>=0;)fe.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}else if(L&&(fe.insertCells(this._activeBuffer.x,F-ze,this._activeBuffer.getNullCell(te)),fe.getWidth(ve-1)===2&&fe.setCellFromCodepoint(ve-1,a.NULL_CELL_CODE,a.NULL_CELL_WIDTH,te)),fe.setCellFromCodepoint(this._activeBuffer.x++,O,F,te),F>0)for(;--F;)fe.setCellFromCodepoint(this._activeBuffer.x++,0,0,te)}this._parser.precedingJoinState=pe,this._activeBuffer.x<ve&&x-k>0&&fe.getWidth(this._activeBuffer.x)===0&&!fe.hasContent(this._activeBuffer.x)&&fe.setCellFromCodepoint(this._activeBuffer.x,0,1,te),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(T,k){return T.final!=="t"||T.prefix||T.intermediates?this._parser.registerCsiHandler(T,k):this._parser.registerCsiHandler(T,(x=>!K(x.params[0],this._optionsService.rawOptions.windowOptions)||k(x)))}registerDcsHandler(T,k){return this._parser.registerDcsHandler(T,new m.DcsHandler(k))}registerEscHandler(T,k){return this._parser.registerEscHandler(T,k)}registerOscHandler(T,k){return this._parser.registerOscHandler(T,new w.OscHandler(k))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y)?.isWrapped){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const T=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);T.hasWidth(this._activeBuffer.x)&&!T.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const T=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-T),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(T=this._bufferService.cols-1){this._activeBuffer.x=Math.min(T,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(T,k){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=T,this._activeBuffer.y=this._activeBuffer.scrollTop+k):(this._activeBuffer.x=T,this._activeBuffer.y=k),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(T,k){this._restrictCursor(),this._setCursor(this._activeBuffer.x+T,this._activeBuffer.y+k)}cursorUp(T){const k=this._activeBuffer.y-this._activeBuffer.scrollTop;return k>=0?this._moveCursor(0,-Math.min(k,T.params[0]||1)):this._moveCursor(0,-(T.params[0]||1)),!0}cursorDown(T){const k=this._activeBuffer.scrollBottom-this._activeBuffer.y;return k>=0?this._moveCursor(0,Math.min(k,T.params[0]||1)):this._moveCursor(0,T.params[0]||1),!0}cursorForward(T){return this._moveCursor(T.params[0]||1,0),!0}cursorBackward(T){return this._moveCursor(-(T.params[0]||1),0),!0}cursorNextLine(T){return this.cursorDown(T),this._activeBuffer.x=0,!0}cursorPrecedingLine(T){return this.cursorUp(T),this._activeBuffer.x=0,!0}cursorCharAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(T){return this._setCursor(T.length>=2?(T.params[1]||1)-1:0,(T.params[0]||1)-1),!0}charPosAbsolute(T){return this._setCursor((T.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(T){return this._moveCursor(T.params[0]||1,0),!0}linePosAbsolute(T){return this._setCursor(this._activeBuffer.x,(T.params[0]||1)-1),!0}vPositionRelative(T){return this._moveCursor(0,T.params[0]||1),!0}hVPosition(T){return this.cursorPosition(T),!0}tabClear(T){const k=T.params[0];return k===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:k===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let k=T.params[0]||1;for(;k--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(T){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let k=T.params[0]||1;for(;k--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(T){const k=T.params[0];return k===1&&(this._curAttrData.bg|=536870912),k!==2&&k!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(T,k,x,O=!1,F=!1){const se=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);se.replaceCells(k,x,this._activeBuffer.getNullCell(this._eraseAttrData()),F),O&&(se.isWrapped=!1)}_resetBufferLine(T,k=!1){const x=this._activeBuffer.lines.get(this._activeBuffer.ybase+T);x&&(x.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),k),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+T),x.isWrapped=!1)}eraseInDisplay(T,k=!1){let x;switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:for(x=this._activeBuffer.y,this._dirtyRowTracker.markDirty(x),this._eraseInBufferLine(x++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,k);x<this._bufferService.rows;x++)this._resetBufferLine(x,k);this._dirtyRowTracker.markDirty(x);break;case 1:for(x=this._activeBuffer.y,this._dirtyRowTracker.markDirty(x),this._eraseInBufferLine(x,0,this._activeBuffer.x+1,!0,k),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(x+1).isWrapped=!1);x--;)this._resetBufferLine(x,k);this._dirtyRowTracker.markDirty(0);break;case 2:for(x=this._bufferService.rows,this._dirtyRowTracker.markDirty(x-1);x--;)this._resetBufferLine(x,k);this._dirtyRowTracker.markDirty(0);break;case 3:const O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(T,k=!1){switch(this._restrictCursor(this._bufferService.cols),T.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,k);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,k);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,k)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(T){this._restrictCursor();let k=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=this._activeBuffer.ybase+this._activeBuffer.y,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,F=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;k--;)this._activeBuffer.lines.splice(F-1,1),this._activeBuffer.lines.splice(x,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(T){this._restrictCursor();let k=T.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const x=this._activeBuffer.ybase+this._activeBuffer.y;let O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;k--;)this._activeBuffer.lines.splice(x,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}insertChars(T){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.insertCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(T){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.deleteCells(this._activeBuffer.x,T.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(T){let k=T.params[0]||1;for(;k--;)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(T){let k=T.params[0]||1;for(;k--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(o.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=T.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);O.deleteCells(0,k,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=T.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);O.insertCells(0,k,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=T.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);O.insertCells(this._activeBuffer.x,k,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(T){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const k=T.params[0]||1;for(let x=this._activeBuffer.scrollTop;x<=this._activeBuffer.scrollBottom;++x){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+x);O.deleteCells(this._activeBuffer.x,k,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(T){this._restrictCursor();const k=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return k&&(k.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(T.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(T){const k=this._parser.precedingJoinState;if(!k)return!0;const x=T.params[0]||1,O=y.UnicodeService.extractWidth(k),F=this._activeBuffer.x-O,se=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(F),_e=new Uint32Array(se.length*x);let ve=0;for(let L=0;L<se.length;){const te=se.codePointAt(L)||0;_e[ve++]=te,L+=te>65535?2:1}let Y=ve;for(let L=1;L<x;++L)_e.copyWithin(Y,0,ve),Y+=ve;return this.print(_e,0,Y),!0}sendDeviceAttributesPrimary(T){return T.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(T){return T.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(T.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(T){return(this._optionsService.rawOptions.termName+"").indexOf(T)===0}setMode(T){for(let k=0;k<T.length;k++)switch(T.params[k]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(T){for(let k=0;k<T.length;k++)switch(T.params[k]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,v.DEFAULT_CHARSET),this._charsetService.setgCharset(1,v.DEFAULT_CHARSET),this._charsetService.setgCharset(2,v.DEFAULT_CHARSET),this._charsetService.setgCharset(3,v.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(T){for(let k=0;k<T.length;k++)switch(T.params[k]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(T){for(let k=0;k<T.length;k++)switch(T.params[k]){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(),T.params[k]===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(T,k){const x=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:F}=this._coreMouseService,se=this._coreService,{buffers:_e,cols:ve}=this._bufferService,{active:Y,alt:L}=_e,te=this._optionsService.rawOptions,fe=je=>je?1:2,pe=T.params[0];return me=pe,De=k?pe===2?4:pe===4?fe(se.modes.insertMode):pe===12?3:pe===20?fe(te.convertEol):0:pe===1?fe(x.applicationCursorKeys):pe===3?te.windowOptions.setWinLines?ve===80?2:ve===132?1:0:0:pe===6?fe(x.origin):pe===7?fe(x.wraparound):pe===8?3:pe===9?fe(O==="X10"):pe===12?fe(te.cursorBlink):pe===25?fe(!se.isCursorHidden):pe===45?fe(x.reverseWraparound):pe===66?fe(x.applicationKeypad):pe===67?4:pe===1e3?fe(O==="VT200"):pe===1002?fe(O==="DRAG"):pe===1003?fe(O==="ANY"):pe===1004?fe(x.sendFocus):pe===1005?4:pe===1006?fe(F==="SGR"):pe===1015?4:pe===1016?fe(F==="SGR_PIXELS"):pe===1048?1:pe===47||pe===1047||pe===1049?fe(Y===L):pe===2004?fe(x.bracketedPasteMode):0,se.triggerDataEvent(`${h.C0.ESC}[${k?"":"?"}${me};${De}$y`),!0;var me,De}_updateAttrColor(T,k,x,O,F){return k===2?(T|=50331648,T&=-16777216,T|=_.AttributeData.fromColorRGB([x,O,F])):k===5&&(T&=-50331904,T|=33554432|255&x),T}_extractColor(T,k,x){const O=[0,0,-1,0,0,0];let F=0,se=0;do{if(O[se+F]=T.params[k+se],T.hasSubParams(k+se)){const _e=T.getSubParams(k+se);let ve=0;do O[1]===5&&(F=1),O[se+ve+1+F]=_e[ve];while(++ve<_e.length&&ve+se+1+F<O.length);break}if(O[1]===5&&se+F>=2||O[1]===2&&se+F>=5)break;O[1]&&(F=1)}while(++se+k<T.length&&se+F<O.length);for(let _e=2;_e<O.length;++_e)O[_e]===-1&&(O[_e]=0);switch(O[0]){case 38:x.fg=this._updateAttrColor(x.fg,O[1],O[3],O[4],O[5]);break;case 48:x.bg=this._updateAttrColor(x.bg,O[1],O[3],O[4],O[5]);break;case 58:x.extended=x.extended.clone(),x.extended.underlineColor=this._updateAttrColor(x.extended.underlineColor,O[1],O[3],O[4],O[5])}return se}_processUnderline(T,k){k.extended=k.extended.clone(),(!~T||T>5)&&(T=1),k.extended.underlineStyle=T,k.fg|=268435456,T===0&&(k.fg&=-268435457),k.updateExtended()}_processSGR0(T){T.fg=o.DEFAULT_ATTR_DATA.fg,T.bg=o.DEFAULT_ATTR_DATA.bg,T.extended=T.extended.clone(),T.extended.underlineStyle=0,T.extended.underlineColor&=-67108864,T.updateExtended()}charAttributes(T){if(T.length===1&&T.params[0]===0)return this._processSGR0(this._curAttrData),!0;const k=T.length;let x;const O=this._curAttrData;for(let F=0;F<k;F++)x=T.params[F],x>=30&&x<=37?(O.fg&=-50331904,O.fg|=16777216|x-30):x>=40&&x<=47?(O.bg&=-50331904,O.bg|=16777216|x-40):x>=90&&x<=97?(O.fg&=-50331904,O.fg|=16777224|x-90):x>=100&&x<=107?(O.bg&=-50331904,O.bg|=16777224|x-100):x===0?this._processSGR0(O):x===1?O.fg|=134217728:x===3?O.bg|=67108864:x===4?(O.fg|=268435456,this._processUnderline(T.hasSubParams(F)?T.getSubParams(F)[0]:1,O)):x===5?O.fg|=536870912:x===7?O.fg|=67108864:x===8?O.fg|=1073741824:x===9?O.fg|=2147483648:x===2?O.bg|=134217728:x===21?this._processUnderline(2,O):x===22?(O.fg&=-134217729,O.bg&=-134217729):x===23?O.bg&=-67108865:x===24?(O.fg&=-268435457,this._processUnderline(0,O)):x===25?O.fg&=-536870913:x===27?O.fg&=-67108865:x===28?O.fg&=-1073741825:x===29?O.fg&=2147483647:x===39?(O.fg&=-67108864,O.fg|=16777215&o.DEFAULT_ATTR_DATA.fg):x===49?(O.bg&=-67108864,O.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):x===38||x===48||x===58?F+=this._extractColor(T,F,O):x===53?O.bg|=1073741824:x===55?O.bg&=-1073741825:x===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):x===100?(O.fg&=-67108864,O.fg|=16777215&o.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&o.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",x);return!0}deviceStatus(T){switch(T.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const k=this._activeBuffer.y+1,x=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${k};${x}R`)}return!0}deviceStatusPrivate(T){if(T.params[0]===6){const k=this._activeBuffer.y+1,x=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${k};${x}R`)}return!0}softReset(T){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(T){const k=T.params[0]||1;switch(k){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 x=k%2==1;return this._optionsService.options.cursorBlink=x,!0}setScrollRegion(T){const k=T.params[0]||1;let x;return(T.length<2||(x=T.params[1])>this._bufferService.rows||x===0)&&(x=this._bufferService.rows),x>k&&(this._activeBuffer.scrollTop=k-1,this._activeBuffer.scrollBottom=x-1,this._setCursor(0,0)),!0}windowOptions(T){if(!K(T.params[0],this._optionsService.rawOptions.windowOptions))return!0;const k=T.length>1?T.params[1]:0;switch(T.params[0]){case 14:k!==2&&this._onRequestWindowsOptionsReport.fire(H.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(H.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:k!==0&&k!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),k!==0&&k!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:k!==0&&k!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),k!==0&&k!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(T){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(T){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(T){return this._windowTitle=T,this._onTitleChange.fire(T),!0}setIconName(T){return this._iconName=T,!0}setOrReportIndexedColor(T){const k=[],x=T.split(";");for(;x.length>1;){const O=x.shift(),F=x.shift();if(/^\d+$/.exec(O)){const se=parseInt(O);if(J(se))if(F==="?")k.push({type:0,index:se});else{const _e=(0,D.parseColor)(F);_e&&k.push({type:1,index:se,color:_e})}}}return k.length&&this._onColor.fire(k),!0}setHyperlink(T){const k=T.split(";");return!(k.length<2)&&(k[1]?this._createHyperlink(k[0],k[1]):!k[0]&&this._finishHyperlink())}_createHyperlink(T,k){this._getCurrentLinkId()&&this._finishHyperlink();const x=T.split(":");let O;const F=x.findIndex((se=>se.startsWith("id=")));return F!==-1&&(O=x[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,uri:k}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(T,k){const x=T.split(";");for(let O=0;O<x.length&&!(k>=this._specialColors.length);++O,++k)if(x[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[k]}]);else{const F=(0,D.parseColor)(x[O]);F&&this._onColor.fire([{type:1,index:this._specialColors[k],color:F}])}return!0}setOrReportFgColor(T){return this._setOrReportSpecialColor(T,0)}setOrReportBgColor(T){return this._setOrReportSpecialColor(T,1)}setOrReportCursorColor(T){return this._setOrReportSpecialColor(T,2)}restoreIndexedColor(T){if(!T)return this._onColor.fire([{type:2}]),!0;const k=[],x=T.split(";");for(let O=0;O<x.length;++O)if(/^\d+$/.exec(x[O])){const F=parseInt(x[O]);J(F)&&k.push({type:2,index:F})}return k.length&&this._onColor.fire(k),!0}restoreFgColor(T){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(T){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(T){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,v.DEFAULT_CHARSET),!0}selectCharset(T){return T.length!==2?(this.selectDefaultCharset(),!0):(T[0]==="/"||this._charsetService.setgCharset(q[T[0]],v.CHARSETS[T[1]]||v.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 T=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,T,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=o.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=o.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(T){return this._charsetService.setgLevel(T),!0}screenAlignmentPattern(){const T=new l.CellData;T.content=4194373,T.fg=this._curAttrData.fg,T.bg=this._curAttrData.bg,this._setCursor(0,0);for(let k=0;k<this._bufferService.rows;++k){const x=this._activeBuffer.ybase+this._activeBuffer.y+k,O=this._activeBuffer.lines.get(x);O&&(O.fill(T),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(T,k){const x=this._bufferService.buffer,O=this._optionsService.rawOptions;return(F=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${F}${h.C0.ESC}\\`),!0))(T==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:T==='"p'?'P1$r61;1"p':T==="r"?`P1$r${x.scrollTop+1};${x.scrollBottom+1}r`:T==="m"?"P1$r0m":T===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(T,k){this._dirtyRowTracker.markRangeDirty(T,k)}}u.InputHandler=ce;let G=class{constructor(ee){this._bufferService=ee,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(ee){ee<this.start?this.start=ee:ee>this.end&&(this.end=ee)}markRangeDirty(ee,T){ee>T&&(Q=ee,ee=T,T=Q),ee<this.start&&(this.start=ee),T>this.end&&(this.end=T)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function J(ee){return 0<=ee&&ee<256}G=d([b(0,E.IBufferService)],G)},844:($,u)=>{function f(d){for(const b of d)b.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 b=this._disposables.indexOf(d);b!==-1&&this._disposables.splice(b,1)}},u.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(d){this._isDisposed||d===this._value||(this._value?.dispose(),this._value=d)}clear(){this.value=void 0}dispose(){this._isDisposed=!0,this._value?.dispose(),this._value=void 0}},u.toDisposable=function(d){return{dispose:d}},u.disposeArray=f,u.getDisposeArrayDisposable=function(d){return{dispose:()=>f(d)}}},1505:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.FourKeyMap=u.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(b,h,v){this._data[b]||(this._data[b]={}),this._data[b][h]=v}get(b,h){return this._data[b]?this._data[b][h]:void 0}clear(){this._data={}}}u.TwoKeyMap=f,u.FourKeyMap=class{constructor(){this._data=new f}set(d,b,h,v,C){this._data.get(d,b)||this._data.set(d,b,new f),this._data.get(d,b).set(h,v,C)}get(d,b,h,v){return this._data.get(d,b)?.get(h,v)}clear(){this._data.clear()}}},6114:($,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 process<"u"&&"title"in process;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 b=f.match(/Version\/(\d+)/);return b===null||b.length<2?0:parseInt(b[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:($,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 b=this._getKey(d);if(b===void 0||(f=this._search(b),f===-1)||this._getKey(this._array[f])!==b)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])===b);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,b){if(this._array.length!==0&&(f=this._search(d),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===d))do b(this._array[f]);while(++f<this._array.length&&this._getKey(this._array[f])===d)}values(){return[...this._array].values()}_search(d){let b=0,h=this._array.length-1;for(;h>=b;){let v=b+h>>1;const C=this._getKey(this._array[v]);if(C>d)h=v-1;else{if(!(C<d)){for(;v>0&&this._getKey(this._array[v-1])===d;)v--;return v}b=v+1}}return b}}},7226:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DebouncedIdleTask=u.IdleTaskQueue=u.PriorityTaskQueue=void 0;const d=f(6114);class b{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 S=0,p=0,o=C.timeRemaining(),c=0;for(;this._i<this._tasks.length;){if(S=Date.now(),this._tasks[this._i]()||this._i++,S=Math.max(1,Date.now()-S),p=Math.max(S,p),c=C.timeRemaining(),1.5*p>c)return o-S<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(o-S))}ms`),void this._start();o=c}this.clear()}}class h extends b{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const S=Date.now()+C;return{timeRemaining:()=>Math.max(0,S-Date.now())}}}u.PriorityTaskQueue=h,u.IdleTaskQueue=!d.isNode&&"requestIdleCallback"in window?class extends b{_requestCallback(v){return requestIdleCallback(v)}_cancelCallback(v){cancelIdleCallback(v)}}:h,u.DebouncedIdleTask=class{constructor(){this._queue=new u.IdleTaskQueue}set(v){this._queue.clear(),this._queue.enqueue(v)}flush(){this._queue.flush()}}},9282:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.updateWindowsModeWrappedState=void 0;const d=f(643);u.updateWindowsModeWrappedState=function(b){const h=b.buffer.lines.get(b.buffer.ybase+b.buffer.y-1),v=h?.get(b.cols-1),C=b.buffer.lines.get(b.buffer.ybase+b.buffer.y);C&&v&&(C.isWrapped=v[d.CHAR_DATA_CODE_INDEX]!==d.NULL_CELL_CODE&&v[d.CHAR_DATA_CODE_INDEX]!==d.WHITESPACE_CELL_CODE)}},3734:($,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}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}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}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,v=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=v}clone(){return new d(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}u.ExtendedAttrs=d},9092:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Buffer=u.MAX_BUFFER_SIZE=void 0;const d=f(6349),b=f(7226),h=f(3734),v=f(8437),C=f(4634),S=f(511),p=f(643),o=f(4863),c=f(7116);u.MAX_BUFFER_SIZE=4294967295,u.Buffer=class{constructor(a,l,_){this._hasScrollback=a,this._optionsService=l,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=v.DEFAULT_ATTR_DATA.clone(),this.savedCharset=c.DEFAULT_CHARSET,this.markers=[],this._nullCell=S.CellData.fromCharData([0,p.NULL_CELL_CHAR,p.NULL_CELL_WIDTH,p.NULL_CELL_CODE]),this._whitespaceCell=S.CellData.fromCharData([0,p.WHITESPACE_CELL_CHAR,p.WHITESPACE_CELL_WIDTH,p.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new b.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,l){return new v.BufferLine(this._bufferService.cols,this.getNullCell(a),l)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const a=this.ybase+this.y-this.ydisp;return a>=0&&a<this._rows}_getCorrectBufferLength(a){if(!this._hasScrollback)return a;const l=a+this._optionsService.rawOptions.scrollback;return l>u.MAX_BUFFER_SIZE?u.MAX_BUFFER_SIZE:l}fillViewportRows(a){if(this.lines.length===0){a===void 0&&(a=v.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)this.lines.push(this.getBlankLine(a))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new d.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(a,l){const _=this.getNullCell(v.DEFAULT_ATTR_DATA);let E=0;const y=this._getCorrectBufferLength(l);if(y>this.lines.maxLength&&(this.lines.maxLength=y),this.lines.length>0){if(this._cols<a)for(let m=0;m<this.lines.length;m++)E+=+this.lines.get(m).resize(a,_);let w=0;if(this._rows<l)for(let m=this._rows;m<l;m++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new v.BufferLine(a,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new v.BufferLine(a,_)));else for(let m=this._rows;m>l;m--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(y<this.lines.maxLength){const m=this.lines.length-y;m>0&&(this.lines.trimStart(m),this.ybase=Math.max(this.ybase-m,0),this.ydisp=Math.max(this.ydisp-m,0),this.savedY=Math.max(this.savedY-m,0)),this.lines.maxLength=y}this.x=Math.min(this.x,a-1),this.y=Math.min(this.y,l-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,a-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(a,l),this._cols>a))for(let w=0;w<this.lines.length;w++)E+=+this.lines.get(w).resize(a,_);this._cols=a,this._rows=l,this._memoryCleanupQueue.clear(),E>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let a=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,a=!1);let l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>100)return!0;return a}get _isReflowEnabled(){const a=this._optionsService.rawOptions.windowsPty;return a&&a.buildNumber?this._hasScrollback&&a.backend==="conpty"&&a.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(a,l){this._cols!==a&&(a>this._cols?this._reflowLarger(a,l):this._reflowSmaller(a,l))}_reflowLarger(a,l){const _=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,a,this.ybase+this.y,this.getNullCell(v.DEFAULT_ATTR_DATA));if(_.length>0){const E=(0,C.reflowLargerCreateNewLayout)(this.lines,_);(0,C.reflowLargerApplyNewLayout)(this.lines,E.layout),this._reflowLargerAdjustViewport(a,l,E.countRemoved)}}_reflowLargerAdjustViewport(a,l,_){const E=this.getNullCell(v.DEFAULT_ATTR_DATA);let y=_;for(;y-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new v.BufferLine(a,E))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(a,l){const _=this.getNullCell(v.DEFAULT_ATTR_DATA),E=[];let y=0;for(let w=this.lines.length-1;w>=0;w--){let m=this.lines.get(w);if(!m||!m.isWrapped&&m.getTrimmedLength()<=a)continue;const D=[m];for(;m.isWrapped&&w>0;)m=this.lines.get(--w),D.unshift(m);const q=this.ybase+this.y;if(q>=w&&q<w+D.length)continue;const I=D[D.length-1].getTrimmedLength(),K=(0,C.reflowSmallerGetNewLineLengths)(D,this._cols,a),H=K.length-D.length;let Q;Q=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+H):Math.max(0,this.lines.length-this.lines.maxLength+H);const ce=[];for(let x=0;x<H;x++){const O=this.getBlankLine(v.DEFAULT_ATTR_DATA,!0);ce.push(O)}ce.length>0&&(E.push({start:w+D.length+y,newLines:ce}),y+=ce.length),D.push(...ce);let G=K.length-1,J=K[G];J===0&&(G--,J=K[G]);let ee=D.length-H-1,T=I;for(;ee>=0;){const x=Math.min(T,J);if(D[G]===void 0)break;if(D[G].copyCellsFrom(D[ee],T-x,J-x,x,!0),J-=x,J===0&&(G--,J=K[G]),T-=x,T===0){ee--;const O=Math.max(ee,0);T=(0,C.getWrappedLineTrimmedLength)(D,O,this._cols)}}for(let x=0;x<D.length;x++)K[x]<a&&D[x].setCell(K[x],_);let k=H-Q;for(;k-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+y)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+H,this.ybase+l-1)}if(E.length>0){const w=[],m=[];for(let G=0;G<this.lines.length;G++)m.push(this.lines.get(G));const D=this.lines.length;let q=D-1,I=0,K=E[I];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+y);let H=0;for(let G=Math.min(this.lines.maxLength-1,D+y-1);G>=0;G--)if(K&&K.start>q+H){for(let J=K.newLines.length-1;J>=0;J--)this.lines.set(G--,K.newLines[J]);G++,w.push({index:q+1,amount:K.newLines.length}),H+=K.newLines.length,K=E[++I]}else this.lines.set(G,m[q--]);let Q=0;for(let G=w.length-1;G>=0;G--)w[G].index+=Q,this.lines.onInsertEmitter.fire(w[G]),Q+=w[G].amount;const ce=Math.max(0,D+y-this.lines.maxLength);ce>0&&this.lines.onTrimEmitter.fire(ce)}}translateBufferLineToString(a,l,_=0,E){const y=this.lines.get(a);return y?y.translateToString(l,_,E):""}getWrappedRangeForLine(a){let l=a,_=a;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,last:_}}setupTabStops(a){for(a!=null?this.tabs[a]||(a=this.prevStop(a)):(this.tabs={},a=0);a<this._cols;a+=this._optionsService.rawOptions.tabStopWidth)this.tabs[a]=!0}prevStop(a){for(a==null&&(a=this.x);!this.tabs[--a]&&a>0;);return a>=this._cols?this._cols-1:a<0?0:a}nextStop(a){for(a==null&&(a=this.x);!this.tabs[++a]&&a<this._cols;);return a>=this._cols?this._cols-1:a<0?0:a}clearMarkers(a){this._isClearing=!0;for(let l=0;l<this.markers.length;l++)this.markers[l].line===a&&(this.markers[l].dispose(),this.markers.splice(l--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let a=0;a<this.markers.length;a++)this.markers[a].dispose(),this.markers.splice(a--,1);this._isClearing=!1}addMarker(a){const l=new o.Marker(a);return this.markers.push(l),l.register(this.lines.onTrim((_=>{l.line-=_,l.line<0&&l.dispose()}))),l.register(this.lines.onInsert((_=>{l.line>=_.index&&(l.line+=_.amount)}))),l.register(this.lines.onDelete((_=>{l.line>=_.index&&l.line<_.index+_.amount&&l.dispose(),l.line>_.index&&(l.line-=_.amount)}))),l.register(l.onDispose((()=>this._removeMarker(l)))),l}_removeMarker(a){this._isClearing||this.markers.splice(this.markers.indexOf(a),1)}}},8437:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLine=u.DEFAULT_ATTR_DATA=void 0;const d=f(3734),b=f(511),h=f(643),v=f(482);u.DEFAULT_ATTR_DATA=Object.freeze(new d.AttributeData);let C=0;class S{constructor(o,c,a=!1){this.isWrapped=a,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*o);const l=c||b.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<o;++_)this.setCell(_,l);this.length=o}get(o){const c=this._data[3*o+0],a=2097151&c;return[this._data[3*o+1],2097152&c?this._combined[o]:a?(0,v.stringFromCodePoint)(a):"",c>>22,2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):a]}set(o,c){this._data[3*o+1]=c[h.CHAR_DATA_ATTR_INDEX],c[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[o]=c[1],this._data[3*o+0]=2097152|o|c[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*o+0]=c[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|c[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(o){return this._data[3*o+0]>>22}hasWidth(o){return 12582912&this._data[3*o+0]}getFg(o){return this._data[3*o+1]}getBg(o){return this._data[3*o+2]}hasContent(o){return 4194303&this._data[3*o+0]}getCodePoint(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o].charCodeAt(this._combined[o].length-1):2097151&c}isCombined(o){return 2097152&this._data[3*o+0]}getString(o){const c=this._data[3*o+0];return 2097152&c?this._combined[o]:2097151&c?(0,v.stringFromCodePoint)(2097151&c):""}isProtected(o){return 536870912&this._data[3*o+2]}loadCell(o,c){return C=3*o,c.content=this._data[C+0],c.fg=this._data[C+1],c.bg=this._data[C+2],2097152&c.content&&(c.combinedData=this._combined[o]),268435456&c.bg&&(c.extended=this._extendedAttrs[o]),c}setCell(o,c){2097152&c.content&&(this._combined[o]=c.combinedData),268435456&c.bg&&(this._extendedAttrs[o]=c.extended),this._data[3*o+0]=c.content,this._data[3*o+1]=c.fg,this._data[3*o+2]=c.bg}setCellFromCodepoint(o,c,a,l){268435456&l.bg&&(this._extendedAttrs[o]=l.extended),this._data[3*o+0]=c|a<<22,this._data[3*o+1]=l.fg,this._data[3*o+2]=l.bg}addCodepointToCell(o,c,a){let l=this._data[3*o+0];2097152&l?this._combined[o]+=(0,v.stringFromCodePoint)(c):2097151&l?(this._combined[o]=(0,v.stringFromCodePoint)(2097151&l)+(0,v.stringFromCodePoint)(c),l&=-2097152,l|=2097152):l=c|4194304,a&&(l&=-12582913,l|=a<<22),this._data[3*o+0]=l}insertCells(o,c,a){if((o%=this.length)&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length-o){const l=new b.CellData;for(let _=this.length-o-c-1;_>=0;--_)this.setCell(o+c+_,this.loadCell(o+_,l));for(let _=0;_<c;++_)this.setCell(o+_,a)}else for(let l=o;l<this.length;++l)this.setCell(l,a);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,a)}deleteCells(o,c,a){if(o%=this.length,c<this.length-o){const l=new b.CellData;for(let _=0;_<this.length-o-c;++_)this.setCell(o+_,this.loadCell(o+c+_,l));for(let _=this.length-c;_<this.length;++_)this.setCell(_,a)}else for(let l=o;l<this.length;++l)this.setCell(l,a);o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),this.getWidth(o)!==0||this.hasContent(o)||this.setCellFromCodepoint(o,0,1,a)}replaceCells(o,c,a,l=!1){if(l)for(o&&this.getWidth(o-1)===2&&!this.isProtected(o-1)&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&!this.isProtected(c)&&this.setCellFromCodepoint(c,0,1,a);o<c&&o<this.length;)this.isProtected(o)||this.setCell(o,a),o++;else for(o&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o-1,0,1,a),c<this.length&&this.getWidth(c-1)===2&&this.setCellFromCodepoint(c,0,1,a);o<c&&o<this.length;)this.setCell(o++,a)}resize(o,c){if(o===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const a=3*o;if(o>this.length){if(this._data.buffer.byteLength>=4*a)this._data=new Uint32Array(this._data.buffer,0,a);else{const l=new Uint32Array(a);l.set(this._data),this._data=l}for(let l=this.length;l<o;++l)this.setCell(l,c)}else{this._data=this._data.subarray(0,a);const l=Object.keys(this._combined);for(let E=0;E<l.length;E++){const y=parseInt(l[E],10);y>=o&&delete this._combined[y]}const _=Object.keys(this._extendedAttrs);for(let E=0;E<_.length;E++){const y=parseInt(_[E],10);y>=o&&delete this._extendedAttrs[y]}}return this.length=o,4*a*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const o=new Uint32Array(this._data.length);return o.set(this._data),this._data=o,1}return 0}fill(o,c=!1){if(c)for(let a=0;a<this.length;++a)this.isProtected(a)||this.setCell(a,o);else{this._combined={},this._extendedAttrs={};for(let a=0;a<this.length;++a)this.setCell(a,o)}}copyFrom(o){this.length!==o.length?this._data=new Uint32Array(o._data):this._data.set(o._data),this.length=o.length,this._combined={};for(const c in o._combined)this._combined[c]=o._combined[c];this._extendedAttrs={};for(const c in o._extendedAttrs)this._extendedAttrs[c]=o._extendedAttrs[c];this.isWrapped=o.isWrapped}clone(){const o=new S(0);o._data=new Uint32Array(this._data),o.length=this.length;for(const c in this._combined)o._combined[c]=this._combined[c];for(const c in this._extendedAttrs)o._extendedAttrs[c]=this._extendedAttrs[c];return o.isWrapped=this.isWrapped,o}getTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0])return o+(this._data[3*o+0]>>22);return 0}getNoBgTrimmedLength(){for(let o=this.length-1;o>=0;--o)if(4194303&this._data[3*o+0]||50331648&this._data[3*o+2])return o+(this._data[3*o+0]>>22);return 0}copyCellsFrom(o,c,a,l,_){const E=o._data;if(_)for(let w=l-1;w>=0;w--){for(let m=0;m<3;m++)this._data[3*(a+w)+m]=E[3*(c+w)+m];268435456&E[3*(c+w)+2]&&(this._extendedAttrs[a+w]=o._extendedAttrs[c+w])}else for(let w=0;w<l;w++){for(let m=0;m<3;m++)this._data[3*(a+w)+m]=E[3*(c+w)+m];268435456&E[3*(c+w)+2]&&(this._extendedAttrs[a+w]=o._extendedAttrs[c+w])}const y=Object.keys(o._combined);for(let w=0;w<y.length;w++){const m=parseInt(y[w],10);m>=c&&(this._combined[m-c+a]=o._combined[m])}}translateToString(o,c,a,l){c=c??0,a=a??this.length,o&&(a=Math.min(a,this.getTrimmedLength())),l&&(l.length=0);let _="";for(;c<a;){const E=this._data[3*c+0],y=2097151&E,w=2097152&E?this._combined[c]:y?(0,v.stringFromCodePoint)(y):h.WHITESPACE_CELL_CHAR;if(_+=w,l)for(let m=0;m<w.length;++m)l.push(c);c+=E>>22||1}return l&&l.push(c),_}}u.BufferLine=S},4841:($,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:($,u)=>{function f(d,b,h){if(b===d.length-1)return d[b].getTrimmedLength();const v=!d[b].hasContent(h-1)&&d[b].getWidth(h-1)===1,C=d[b+1].getWidth(0)===2;return v&&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,b,h,v,C){const S=[];for(let p=0;p<d.length-1;p++){let o=p,c=d.get(++o);if(!c.isWrapped)continue;const a=[d.get(p)];for(;o<d.length&&c.isWrapped;)a.push(c),c=d.get(++o);if(v>=p&&v<o){p+=a.length-1;continue}let l=0,_=f(a,l,b),E=1,y=0;for(;E<a.length;){const m=f(a,E,b),D=m-y,q=h-_,I=Math.min(D,q);a[l].copyCellsFrom(a[E],y,_,I,!1),_+=I,_===h&&(l++,_=0),y+=I,y===m&&(E++,y=0),_===0&&l!==0&&a[l-1].getWidth(h-1)===2&&(a[l].copyCellsFrom(a[l-1],h-1,_++,1,!1),a[l-1].setCell(h-1,C))}a[l].replaceCells(_,h,C);let w=0;for(let m=a.length-1;m>0&&(m>l||a[m].getTrimmedLength()===0);m--)w++;w>0&&(S.push(p+a.length-w),S.push(w)),p+=a.length-1}return S},u.reflowLargerCreateNewLayout=function(d,b){const h=[];let v=0,C=b[v],S=0;for(let p=0;p<d.length;p++)if(C===p){const o=b[++v];d.onDeleteEmitter.fire({index:p-S,amount:o}),p+=o-1,S+=o,C=b[++v]}else h.push(p);return{layout:h,countRemoved:S}},u.reflowLargerApplyNewLayout=function(d,b){const h=[];for(let v=0;v<b.length;v++)h.push(d.get(b[v]));for(let v=0;v<h.length;v++)d.set(v,h[v]);d.length=b.length},u.reflowSmallerGetNewLineLengths=function(d,b,h){const v=[],C=d.map(((c,a)=>f(d,a,b))).reduce(((c,a)=>c+a));let S=0,p=0,o=0;for(;o<C;){if(C-o<h){v.push(C-o);break}S+=h;const c=f(d,p,b);S>c&&(S-=c,p++);const a=d[p].getWidth(S-1)===2;a&&S--;const l=a?h-1:h;v.push(l),o+=l}return v},u.getWrappedLineTrimmedLength=f},5295:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferSet=void 0;const d=f(8460),b=f(844),h=f(9092);class v extends b.Disposable{constructor(S,p){super(),this._optionsService=S,this._bufferService=p,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(S){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(S),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(S,p){this._normal.resize(S,p),this._alt.resize(S,p),this.setupTabStops(S)}setupTabStops(S){this._normal.setupTabStops(S),this._alt.setupTabStops(S)}}u.BufferSet=v},511:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.CellData=void 0;const d=f(482),b=f(643),h=f(3734);class v extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(S){const p=new v;return p.setFromCharData(S),p}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(S){this.fg=S[b.CHAR_DATA_ATTR_INDEX],this.bg=0;let p=!1;if(S[b.CHAR_DATA_CHAR_INDEX].length>2)p=!0;else if(S[b.CHAR_DATA_CHAR_INDEX].length===2){const o=S[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=o&&o<=56319){const c=S[b.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=c&&c<=57343?this.content=1024*(o-55296)+c-56320+65536|S[b.CHAR_DATA_WIDTH_INDEX]<<22:p=!0}else p=!0}else this.content=S[b.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|S[b.CHAR_DATA_WIDTH_INDEX]<<22;p&&(this.combinedData=S[b.CHAR_DATA_CHAR_INDEX],this.content=2097152|S[b.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}u.CellData=v},643:($,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:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Marker=void 0;const d=f(8460),b=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,b.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}u.Marker=h,h._nextId=1},7116:($,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:($,u)=>{var f,d,b;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}\\`})(b||(u.C1_ESCAPED=b={}))},7399:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.evaluateKeyboardEvent=void 0;const d=f(2584),b={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,v,C,S){const p={type:0,cancel:!1,key:void 0},o=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?p.key=v?d.C0.ESC+"OA":d.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?p.key=v?d.C0.ESC+"OD":d.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?p.key=v?d.C0.ESC+"OC":d.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(p.key=v?d.C0.ESC+"OB":d.C0.ESC+"[B");break;case 8:p.key=h.ctrlKey?"\b":d.C0.DEL,h.altKey&&(p.key=d.C0.ESC+p.key);break;case 9:if(h.shiftKey){p.key=d.C0.ESC+"[Z";break}p.key=d.C0.HT,p.cancel=!0;break;case 13:p.key=h.altKey?d.C0.ESC+d.C0.CR:d.C0.CR,p.cancel=!0;break;case 27:p.key=d.C0.ESC,h.altKey&&(p.key=d.C0.ESC+d.C0.ESC),p.cancel=!0;break;case 37:if(h.metaKey)break;o?(p.key=d.C0.ESC+"[1;"+(o+1)+"D",p.key===d.C0.ESC+"[1;3D"&&(p.key=d.C0.ESC+(C?"b":"[1;5D"))):p.key=v?d.C0.ESC+"OD":d.C0.ESC+"[D";break;case 39:if(h.metaKey)break;o?(p.key=d.C0.ESC+"[1;"+(o+1)+"C",p.key===d.C0.ESC+"[1;3C"&&(p.key=d.C0.ESC+(C?"f":"[1;5C"))):p.key=v?d.C0.ESC+"OC":d.C0.ESC+"[C";break;case 38:if(h.metaKey)break;o?(p.key=d.C0.ESC+"[1;"+(o+1)+"A",C||p.key!==d.C0.ESC+"[1;3A"||(p.key=d.C0.ESC+"[1;5A")):p.key=v?d.C0.ESC+"OA":d.C0.ESC+"[A";break;case 40:if(h.metaKey)break;o?(p.key=d.C0.ESC+"[1;"+(o+1)+"B",C||p.key!==d.C0.ESC+"[1;3B"||(p.key=d.C0.ESC+"[1;5B")):p.key=v?d.C0.ESC+"OB":d.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(p.key=d.C0.ESC+"[2~");break;case 46:p.key=o?d.C0.ESC+"[3;"+(o+1)+"~":d.C0.ESC+"[3~";break;case 36:p.key=o?d.C0.ESC+"[1;"+(o+1)+"H":v?d.C0.ESC+"OH":d.C0.ESC+"[H";break;case 35:p.key=o?d.C0.ESC+"[1;"+(o+1)+"F":v?d.C0.ESC+"OF":d.C0.ESC+"[F";break;case 33:h.shiftKey?p.type=2:h.ctrlKey?p.key=d.C0.ESC+"[5;"+(o+1)+"~":p.key=d.C0.ESC+"[5~";break;case 34:h.shiftKey?p.type=3:h.ctrlKey?p.key=d.C0.ESC+"[6;"+(o+1)+"~":p.key=d.C0.ESC+"[6~";break;case 112:p.key=o?d.C0.ESC+"[1;"+(o+1)+"P":d.C0.ESC+"OP";break;case 113:p.key=o?d.C0.ESC+"[1;"+(o+1)+"Q":d.C0.ESC+"OQ";break;case 114:p.key=o?d.C0.ESC+"[1;"+(o+1)+"R":d.C0.ESC+"OR";break;case 115:p.key=o?d.C0.ESC+"[1;"+(o+1)+"S":d.C0.ESC+"OS";break;case 116:p.key=o?d.C0.ESC+"[15;"+(o+1)+"~":d.C0.ESC+"[15~";break;case 117:p.key=o?d.C0.ESC+"[17;"+(o+1)+"~":d.C0.ESC+"[17~";break;case 118:p.key=o?d.C0.ESC+"[18;"+(o+1)+"~":d.C0.ESC+"[18~";break;case 119:p.key=o?d.C0.ESC+"[19;"+(o+1)+"~":d.C0.ESC+"[19~";break;case 120:p.key=o?d.C0.ESC+"[20;"+(o+1)+"~":d.C0.ESC+"[20~";break;case 121:p.key=o?d.C0.ESC+"[21;"+(o+1)+"~":d.C0.ESC+"[21~";break;case 122:p.key=o?d.C0.ESC+"[23;"+(o+1)+"~":d.C0.ESC+"[23~";break;case 123:p.key=o?d.C0.ESC+"[24;"+(o+1)+"~":d.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(C&&!S||!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?p.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(p.key=d.C0.US),h.key==="@"&&(p.key=d.C0.NUL)):h.keyCode===65&&(p.type=1);else{const c=b[h.keyCode],a=c?.[h.shiftKey?1:0];if(a)p.key=d.C0.ESC+a;else if(h.keyCode>=65&&h.keyCode<=90){const l=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(l);h.shiftKey&&(_=_.toUpperCase()),p.key=d.C0.ESC+_}else if(h.keyCode===32)p.key=d.C0.ESC+(h.ctrlKey?d.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let l=h.code.slice(3,4);h.shiftKey||(l=l.toLowerCase()),p.key=d.C0.ESC+l,p.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?p.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?p.key=d.C0.NUL:h.keyCode>=51&&h.keyCode<=55?p.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?p.key=d.C0.DEL:h.keyCode===219?p.key=d.C0.ESC:h.keyCode===220?p.key=d.C0.FS:h.keyCode===221&&(p.key=d.C0.GS)}return p}},482:($,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,b=f.length){let h="";for(let v=d;v<b;++v){let C=f[v];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 b=f.length;if(!b)return 0;let h=0,v=0;if(this._interim){const C=f.charCodeAt(v++);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=v;C<b;++C){const S=f.charCodeAt(C);if(55296<=S&&S<=56319){if(++C>=b)return this._interim=S,h;const p=f.charCodeAt(C);56320<=p&&p<=57343?d[h++]=1024*(S-55296)+p-56320+65536:(d[h++]=S,d[h++]=p)}else S!==65279&&(d[h++]=S)}return h}},u.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,d){const b=f.length;if(!b)return 0;let h,v,C,S,p=0,o=0,c=0;if(this.interim[0]){let _=!1,E=this.interim[0];E&=(224&E)==192?31:(240&E)==224?15:7;let y,w=0;for(;(y=63&this.interim[++w])&&w<4;)E<<=6,E|=y;const m=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,D=m-w;for(;c<D;){if(c>=b)return 0;if(y=f[c++],(192&y)!=128){c--,_=!0;break}this.interim[w++]=y,E<<=6,E|=63&y}_||(m===2?E<128?c--:d[p++]=E:m===3?E<2048||E>=55296&&E<=57343||E===65279||(d[p++]=E):E<65536||E>1114111||(d[p++]=E)),this.interim.fill(0)}const a=b-4;let l=c;for(;l<b;){for(;!(!(l<a)||128&(h=f[l])||128&(v=f[l+1])||128&(C=f[l+2])||128&(S=f[l+3]));)d[p++]=h,d[p++]=v,d[p++]=C,d[p++]=S,l+=4;if(h=f[l++],h<128)d[p++]=h;else if((224&h)==192){if(l>=b)return this.interim[0]=h,p;if(v=f[l++],(192&v)!=128){l--;continue}if(o=(31&h)<<6|63&v,o<128){l--;continue}d[p++]=o}else if((240&h)==224){if(l>=b)return this.interim[0]=h,p;if(v=f[l++],(192&v)!=128){l--;continue}if(l>=b)return this.interim[0]=h,this.interim[1]=v,p;if(C=f[l++],(192&C)!=128){l--;continue}if(o=(15&h)<<12|(63&v)<<6|63&C,o<2048||o>=55296&&o<=57343||o===65279)continue;d[p++]=o}else if((248&h)==240){if(l>=b)return this.interim[0]=h,p;if(v=f[l++],(192&v)!=128){l--;continue}if(l>=b)return this.interim[0]=h,this.interim[1]=v,p;if(C=f[l++],(192&C)!=128){l--;continue}if(l>=b)return this.interim[0]=h,this.interim[1]=v,this.interim[2]=C,p;if(S=f[l++],(192&S)!=128){l--;continue}if(o=(7&h)<<18|(63&v)<<12|(63&C)<<6|63&S,o<65536||o>1114111)continue;d[p++]=o}}return p}}},225:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeV6=void 0;const d=f(1480),b=[[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]],h=[[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 v;u.UnicodeV6=class{constructor(){if(this.version="6",!v){v=new Uint8Array(65536),v.fill(1),v[0]=0,v.fill(0,1,32),v.fill(0,127,160),v.fill(2,4352,4448),v[9001]=2,v[9002]=2,v.fill(2,11904,42192),v[12351]=1,v.fill(2,44032,55204),v.fill(2,63744,64256),v.fill(2,65040,65050),v.fill(2,65072,65136),v.fill(2,65280,65377),v.fill(2,65504,65511);for(let C=0;C<b.length;++C)v.fill(0,b[C][0],b[C][1]+1)}}wcwidth(C){return C<32?0:C<127?1:C<65536?v[C]:(function(S,p){let o,c=0,a=p.length-1;if(S<p[0][0]||S>p[a][1])return!1;for(;a>=c;)if(o=c+a>>1,S>p[o][1])c=o+1;else{if(!(S<p[o][0]))return!0;a=o-1}return!1})(C,h)?0:C>=131072&&C<=196605||C>=196608&&C<=262141?2:1}charProperties(C,S){let p=this.wcwidth(C),o=p===0&&S!==0;if(o){const c=d.UnicodeService.extractWidth(S);c===0?o=!1:c>p&&(p=c)}return d.UnicodeService.createPropertyValue(0,p,o)}}},5981:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.WriteBuffer=void 0;const d=f(8460),b=f(844);class h extends b.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,S){if(S!==void 0&&this._syncCalls>S)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 p;for(this._isSyncWriting=!0;p=this._writeBuffer.shift();){this._action(p);const o=this._callbacks.shift();o&&o()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,S){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(S),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(S)}_innerWrite(C=0,S=!0){const p=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const o=this._writeBuffer[this._bufferOffset],c=this._action(o,S);if(c){const l=_=>Date.now()-p>=12?setTimeout((()=>this._innerWrite(0,_))):this._innerWrite(p,_);return void c.catch((_=>(queueMicrotask((()=>{throw _})),Promise.resolve(!1)))).then(l)}const a=this._callbacks[this._bufferOffset];if(a&&a(),this._bufferOffset++,this._pendingData-=o.length,Date.now()-p>=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:($,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 b(h,v){const C=h.toString(16),S=C.length<2?"0"+C:C;switch(v){case 4:return C[0];case 8:return S;case 12:return(S+S).slice(0,3);default:return S+S}}u.parseColor=function(h){if(!h)return;let v=h.toLowerCase();if(v.indexOf("rgb:")===0){v=v.slice(4);const C=f.exec(v);if(C){const S=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/S*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/S*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/S*255)]}}else if(v.indexOf("#")===0&&(v=v.slice(1),d.exec(v)&&[3,6,9,12].includes(v.length))){const C=v.length/3,S=[0,0,0];for(let p=0;p<3;++p){const o=parseInt(v.slice(C*p,C*p+C),16);S[p]=C===1?o<<4:C===2?o:C===3?o>>4:o>>8}return S}},u.toRgbString=function(h,v=16){const[C,S,p]=h;return`rgb:${b(C,v)}/${b(S,v)}/${b(p,v)}`}},5770:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.PAYLOAD_LIMIT=void 0,u.PAYLOAD_LIMIT=1e7},6351:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DcsHandler=u.DcsParser=void 0;const d=f(482),b=f(8742),h=f(5770),v=[];u.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=v,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=v}registerHandler(S,p){this._handlers[S]===void 0&&(this._handlers[S]=[]);const o=this._handlers[S];return o.push(p),{dispose:()=>{const c=o.indexOf(p);c!==-1&&o.splice(c,1)}}}clearHandler(S){this._handlers[S]&&delete this._handlers[S]}setHandlerFallback(S){this._handlerFb=S}reset(){if(this._active.length)for(let S=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;S>=0;--S)this._active[S].unhook(!1);this._stack.paused=!1,this._active=v,this._ident=0}hook(S,p){if(this.reset(),this._ident=S,this._active=this._handlers[S]||v,this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].hook(p);else this._handlerFb(this._ident,"HOOK",p)}put(S,p,o){if(this._active.length)for(let c=this._active.length-1;c>=0;c--)this._active[c].put(S,p,o);else this._handlerFb(this._ident,"PUT",(0,d.utf32ToString)(S,p,o))}unhook(S,p=!0){if(this._active.length){let o=!1,c=this._active.length-1,a=!1;if(this._stack.paused&&(c=this._stack.loopPosition-1,o=p,a=this._stack.fallThrough,this._stack.paused=!1),!a&&o===!1){for(;c>=0&&(o=this._active[c].unhook(S),o!==!0);c--)if(o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!1,o;c--}for(;c>=0;c--)if(o=this._active[c].unhook(!1),o instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=c,this._stack.fallThrough=!0,o}else this._handlerFb(this._ident,"UNHOOK",S);this._active=v,this._ident=0}};const C=new b.Params;C.addParam(0),u.DcsHandler=class{constructor(S){this._handler=S,this._data="",this._params=C,this._hitLimit=!1}hook(S){this._params=S.length>1||S.params[0]?S.clone():C,this._data="",this._hitLimit=!1}put(S,p,o){this._hitLimit||(this._data+=(0,d.utf32ToString)(S,p,o),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(S){let p=!1;if(this._hitLimit)p=!1;else if(S&&(p=this._handler(this._data,this._params),p instanceof Promise))return p.then((o=>(this._params=C,this._data="",this._hitLimit=!1,o)));return this._params=C,this._data="",this._hitLimit=!1,p}}},2015:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.EscapeSequenceParser=u.VT500_TRANSITION_TABLE=u.TransitionTable=void 0;const d=f(844),b=f(8742),h=f(6242),v=f(6351);class C{constructor(c){this.table=new Uint8Array(c)}setDefault(c,a){this.table.fill(c<<4|a)}add(c,a,l,_){this.table[a<<8|c]=l<<4|_}addMany(c,a,l,_){for(let E=0;E<c.length;E++)this.table[a<<8|c[E]]=l<<4|_}}u.TransitionTable=C;const S=160;u.VT500_TRANSITION_TABLE=(function(){const o=new C(4095),c=Array.apply(null,Array(256)).map(((w,m)=>m)),a=(w,m)=>c.slice(w,m),l=a(32,127),_=a(0,24);_.push(25),_.push.apply(_,a(28,32));const E=a(0,14);let y;for(y in o.setDefault(1,0),o.addMany(l,0,2,0),E)o.addMany([24,26,153,154],y,3,0),o.addMany(a(128,144),y,3,0),o.addMany(a(144,152),y,3,0),o.add(156,y,0,0),o.add(27,y,11,1),o.add(157,y,4,8),o.addMany([152,158,159],y,0,7),o.add(155,y,11,3),o.add(144,y,11,9);return o.addMany(_,0,3,0),o.addMany(_,1,3,1),o.add(127,1,0,1),o.addMany(_,8,0,8),o.addMany(_,3,3,3),o.add(127,3,0,3),o.addMany(_,4,3,4),o.add(127,4,0,4),o.addMany(_,6,3,6),o.addMany(_,5,3,5),o.add(127,5,0,5),o.addMany(_,2,3,2),o.add(127,2,0,2),o.add(93,1,4,8),o.addMany(l,8,5,8),o.add(127,8,5,8),o.addMany([156,27,24,26,7],8,6,0),o.addMany(a(28,32),8,0,8),o.addMany([88,94,95],1,0,7),o.addMany(l,7,0,7),o.addMany(_,7,0,7),o.add(156,7,0,0),o.add(127,7,0,7),o.add(91,1,11,3),o.addMany(a(64,127),3,7,0),o.addMany(a(48,60),3,8,4),o.addMany([60,61,62,63],3,9,4),o.addMany(a(48,60),4,8,4),o.addMany(a(64,127),4,7,0),o.addMany([60,61,62,63],4,0,6),o.addMany(a(32,64),6,0,6),o.add(127,6,0,6),o.addMany(a(64,127),6,0,0),o.addMany(a(32,48),3,9,5),o.addMany(a(32,48),5,9,5),o.addMany(a(48,64),5,0,6),o.addMany(a(64,127),5,7,0),o.addMany(a(32,48),4,9,5),o.addMany(a(32,48),1,9,2),o.addMany(a(32,48),2,9,2),o.addMany(a(48,127),2,10,0),o.addMany(a(48,80),1,10,0),o.addMany(a(81,88),1,10,0),o.addMany([89,90,92],1,10,0),o.addMany(a(96,127),1,10,0),o.add(80,1,11,9),o.addMany(_,9,0,9),o.add(127,9,0,9),o.addMany(a(28,32),9,0,9),o.addMany(a(32,48),9,9,12),o.addMany(a(48,60),9,8,10),o.addMany([60,61,62,63],9,9,10),o.addMany(_,11,0,11),o.addMany(a(32,128),11,0,11),o.addMany(a(28,32),11,0,11),o.addMany(_,10,0,10),o.add(127,10,0,10),o.addMany(a(28,32),10,0,10),o.addMany(a(48,60),10,8,10),o.addMany([60,61,62,63],10,0,11),o.addMany(a(32,48),10,9,12),o.addMany(_,12,0,12),o.add(127,12,0,12),o.addMany(a(28,32),12,0,12),o.addMany(a(32,48),12,9,12),o.addMany(a(48,64),12,0,11),o.addMany(a(64,127),12,12,13),o.addMany(a(64,127),10,12,13),o.addMany(a(64,127),9,12,13),o.addMany(_,13,13,13),o.addMany(l,13,13,13),o.add(127,13,0,13),o.addMany([27,156,24,26],13,14,0),o.add(S,0,2,0),o.add(S,8,5,8),o.add(S,6,0,6),o.add(S,11,0,11),o.add(S,13,13,13),o})();class p extends d.Disposable{constructor(c=u.VT500_TRANSITION_TABLE){super(),this._transitions=c,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new b.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(a,l,_)=>{},this._executeHandlerFb=a=>{},this._csiHandlerFb=(a,l)=>{},this._escHandlerFb=a=>{},this._errorHandlerFb=a=>a,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,d.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new v.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(c,a=[64,126]){let l=0;if(c.prefix){if(c.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=c.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(c.intermediates){if(c.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let E=0;E<c.intermediates.length;++E){const y=c.intermediates.charCodeAt(E);if(32>y||y>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=y}}if(c.final.length!==1)throw new Error("final must be a single byte");const _=c.final.charCodeAt(0);if(a[0]>_||_>a[1])throw new Error(`final must be in range ${a[0]} .. ${a[1]}`);return l<<=8,l|=_,l}identToString(c){const a=[];for(;c;)a.push(String.fromCharCode(255&c)),c>>=8;return a.reverse().join("")}setPrintHandler(c){this._printHandler=c}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(c,a){const l=this._identifier(c,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(a),{dispose:()=>{const E=_.indexOf(a);E!==-1&&_.splice(E,1)}}}clearEscHandler(c){this._escHandlers[this._identifier(c,[48,126])]&&delete this._escHandlers[this._identifier(c,[48,126])]}setEscHandlerFallback(c){this._escHandlerFb=c}setExecuteHandler(c,a){this._executeHandlers[c.charCodeAt(0)]=a}clearExecuteHandler(c){this._executeHandlers[c.charCodeAt(0)]&&delete this._executeHandlers[c.charCodeAt(0)]}setExecuteHandlerFallback(c){this._executeHandlerFb=c}registerCsiHandler(c,a){const l=this._identifier(c);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(a),{dispose:()=>{const E=_.indexOf(a);E!==-1&&_.splice(E,1)}}}clearCsiHandler(c){this._csiHandlers[this._identifier(c)]&&delete this._csiHandlers[this._identifier(c)]}setCsiHandlerFallback(c){this._csiHandlerFb=c}registerDcsHandler(c,a){return this._dcsParser.registerHandler(this._identifier(c),a)}clearDcsHandler(c){this._dcsParser.clearHandler(this._identifier(c))}setDcsHandlerFallback(c){this._dcsParser.setHandlerFallback(c)}registerOscHandler(c,a){return this._oscParser.registerHandler(c,a)}clearOscHandler(c){this._oscParser.clearHandler(c)}setOscHandlerFallback(c){this._oscParser.setHandlerFallback(c)}setErrorHandler(c){this._errorHandler=c}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(c,a,l,_,E){this._parseStack.state=c,this._parseStack.handlers=a,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=E}parse(c,a,l){let _,E=0,y=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const m=this._parseStack.handlers;let D=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&D>-1){for(;D>=0&&(_=m[D](this._params),_!==!0);D--)if(_ instanceof Promise)return this._parseStack.handlerPos=D,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&D>-1){for(;D>=0&&(_=m[D](),_!==!0);D--)if(_ instanceof Promise)return this._parseStack.handlerPos=D,_}this._parseStack.handlers=[];break;case 6:if(E=c[this._parseStack.chunkPos],_=this._dcsParser.unhook(E!==24&&E!==26,l),_)return _;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(E=c[this._parseStack.chunkPos],_=this._oscParser.end(E!==24&&E!==26,l),_)return _;E===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,w=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let m=w;m<a;++m){switch(E=c[m],y=this._transitions.table[this.currentState<<8|(E<160?E:S)],y>>4){case 2:for(let H=m+1;;++H){if(H>=a||(E=c[H])<32||E>126&&E<S){this._printHandler(c,m,H),m=H-1;break}if(++H>=a||(E=c[H])<32||E>126&&E<S){this._printHandler(c,m,H),m=H-1;break}if(++H>=a||(E=c[H])<32||E>126&&E<S){this._printHandler(c,m,H),m=H-1;break}if(++H>=a||(E=c[H])<32||E>126&&E<S){this._printHandler(c,m,H),m=H-1;break}}break;case 3:this._executeHandlers[E]?this._executeHandlers[E]():this._executeHandlerFb(E),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:m,code:E,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const D=this._csiHandlers[this._collect<<8|E];let q=D?D.length-1:-1;for(;q>=0&&(_=D[q](this._params),_!==!0);q--)if(_ instanceof Promise)return this._preserveStack(3,D,q,y,m),_;q<0&&this._csiHandlerFb(this._collect<<8|E,this._params),this.precedingJoinState=0;break;case 8:do switch(E){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(E-48)}while(++m<a&&(E=c[m])>47&&E<60);m--;break;case 9:this._collect<<=8,this._collect|=E;break;case 10:const I=this._escHandlers[this._collect<<8|E];let K=I?I.length-1:-1;for(;K>=0&&(_=I[K](),_!==!0);K--)if(_ instanceof Promise)return this._preserveStack(4,I,K,y,m),_;K<0&&this._escHandlerFb(this._collect<<8|E),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|E,this._params);break;case 13:for(let H=m+1;;++H)if(H>=a||(E=c[H])===24||E===26||E===27||E>127&&E<S){this._dcsParser.put(c,m,H),m=H-1;break}break;case 14:if(_=this._dcsParser.unhook(E!==24&&E!==26),_)return this._preserveStack(6,[],0,y,m),_;E===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let H=m+1;;H++)if(H>=a||(E=c[H])<32||E>127&&E<S){this._oscParser.put(c,m,H),m=H-1;break}break;case 6:if(_=this._oscParser.end(E!==24&&E!==26),_)return this._preserveStack(5,[],0,y,m),_;E===27&&(y|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&y}}}u.EscapeSequenceParser=p},6242:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OscHandler=u.OscParser=void 0;const d=f(5770),b=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(v,C){this._handlers[v]===void 0&&(this._handlers[v]=[]);const S=this._handlers[v];return S.push(C),{dispose:()=>{const p=S.indexOf(C);p!==-1&&S.splice(p,1)}}}clearHandler(v){this._handlers[v]&&delete this._handlers[v]}setHandlerFallback(v){this._handlerFb=v}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let v=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;v>=0;--v)this._active[v].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 v=this._active.length-1;v>=0;v--)this._active[v].start();else this._handlerFb(this._id,"START")}_put(v,C,S){if(this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].put(v,C,S);else this._handlerFb(this._id,"PUT",(0,b.utf32ToString)(v,C,S))}start(){this.reset(),this._state=1}put(v,C,S){if(this._state!==3){if(this._state===1)for(;C<S;){const p=v[C++];if(p===59){this._state=2,this._start();break}if(p<48||57<p)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+p-48}this._state===2&&S-C>0&&this._put(v,C,S)}}end(v,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let S=!1,p=this._active.length-1,o=!1;if(this._stack.paused&&(p=this._stack.loopPosition-1,S=C,o=this._stack.fallThrough,this._stack.paused=!1),!o&&S===!1){for(;p>=0&&(S=this._active[p].end(v),S!==!0);p--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!1,S;p--}for(;p>=0;p--)if(S=this._active[p].end(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=p,this._stack.fallThrough=!0,S}else this._handlerFb(this._id,"END",v);this._active=h,this._id=-1,this._state=0}}},u.OscHandler=class{constructor(v){this._handler=v,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(v,C,S){this._hitLimit||(this._data+=(0,b.utf32ToString)(v,C,S),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(v){let C=!1;if(this._hitLimit)C=!1;else if(v&&(C=this._handler(this._data),C instanceof Promise))return C.then((S=>(this._data="",this._hitLimit=!1,S)));return this._data="",this._hitLimit=!1,C}}},8742:($,u)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.Params=void 0;const f=2147483647;class d{static fromArray(h){const v=new d;if(!h.length)return v;for(let C=Array.isArray(h[0])?1:0;C<h.length;++C){const S=h[C];if(Array.isArray(S))for(let p=0;p<S.length;++p)v.addSubParam(S[p]);else v.addParam(S)}return v}constructor(h=32,v=32){if(this.maxLength=h,this.maxSubParamsLength=v,v>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(v),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 v=0;v<this.length;++v){h.push(this.params[v]);const C=this._subParamsIdx[v]>>8,S=255&this._subParamsIdx[v];S-C>0&&h.push(Array.prototype.slice.call(this._subParams,C,S))}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 v=this._subParamsIdx[h]>>8,C=255&this._subParamsIdx[h];return C-v>0?this._subParams.subarray(v,C):null}getSubParamsAll(){const h={};for(let v=0;v<this.length;++v){const C=this._subParamsIdx[v]>>8,S=255&this._subParamsIdx[v];S-C>0&&(h[v]=this._subParams.slice(C,S))}return h}addDigit(h){let v;if(this._rejectDigits||!(v=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,S=C[v-1];C[v-1]=~S?Math.min(10*S+h,f):h}}u.Params=d},5741:($,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 b={instance:d,dispose:d.dispose,isDisposed:!1};this._addons.push(b),d.dispose=()=>this._wrappedAddonDispose(b),d.activate(f)}_wrappedAddonDispose(f){if(f.isDisposed)return;let d=-1;for(let b=0;b<this._addons.length;b++)if(this._addons[b]===f){d=b;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:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferApiView=void 0;const d=f(3785),b=f(511);u.BufferApiView=class{constructor(h,v){this._buffer=h,this.type=v}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 v=this._buffer.lines.get(h);if(v)return new d.BufferLineApiView(v)}getNullCell(){return new b.CellData}}},3785:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferLineApiView=void 0;const d=f(511);u.BufferLineApiView=class{constructor(b){this._line=b}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(b,h){if(!(b<0||b>=this._line.length))return h?(this._line.loadCell(b,h),h):this._line.loadCell(b,new d.CellData)}translateToString(b,h,v){return this._line.translateToString(b,h,v)}}},8285:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.BufferNamespaceApi=void 0;const d=f(8771),b=f(8460),h=f(844);class v extends h.Disposable{constructor(S){super(),this._core=S,this._onBufferChange=this.register(new b.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=v},7975:($,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,(b=>d(b.toArray())))}addCsiHandler(f,d){return this.registerCsiHandler(f,d)}registerDcsHandler(f,d){return this._core.registerDcsHandler(f,((b,h)=>d(b,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:($,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($,u,f){var d=this&&this.__decorate||function(o,c,a,l){var _,E=arguments.length,y=E<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,c,a,l);else for(var w=o.length-1;w>=0;w--)(_=o[w])&&(y=(E<3?_(y):E>3?_(c,a,y):_(c,a))||y);return E>3&&y&&Object.defineProperty(c,a,y),y},b=this&&this.__param||function(o,c){return function(a,l){c(a,l,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.BufferService=u.MINIMUM_ROWS=u.MINIMUM_COLS=void 0;const h=f(8460),v=f(844),C=f(5295),S=f(2585);u.MINIMUM_COLS=2,u.MINIMUM_ROWS=1;let p=u.BufferService=class extends v.Disposable{get buffer(){return this.buffers.active}constructor(o){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(o.rawOptions.cols||0,u.MINIMUM_COLS),this.rows=Math.max(o.rawOptions.rows||0,u.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(o,this))}resize(o,c){this.cols=o,this.rows=c,this.buffers.resize(o,c),this._onResize.fire({cols:o,rows:c})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(o,c=!1){const a=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===o.fg&&l.getBg(0)===o.bg||(l=a.getBlankLine(o,c),this._cachedBlankLine=l),l.isWrapped=c;const _=a.ybase+a.scrollTop,E=a.ybase+a.scrollBottom;if(a.scrollTop===0){const y=a.lines.isFull;E===a.lines.length-1?y?a.lines.recycle().copyFrom(l):a.lines.push(l.clone()):a.lines.splice(E+1,0,l.clone()),y?this.isUserScrolling&&(a.ydisp=Math.max(a.ydisp-1,0)):(a.ybase++,this.isUserScrolling||a.ydisp++)}else{const y=E-_+1;a.lines.shiftElements(_+1,y-1,-1),a.lines.set(E,l.clone())}this.isUserScrolling||(a.ydisp=a.ybase),this._onScroll.fire(a.ydisp)}scrollLines(o,c,a){const l=this.buffer;if(o<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else o+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const _=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+o,l.ybase),0),_!==l.ydisp&&(c||this._onScroll.fire(l.ydisp))}};u.BufferService=p=d([b(0,S.IOptionsService)],p)},7994:($,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($,u,f){var d=this&&this.__decorate||function(l,_,E,y){var w,m=arguments.length,D=m<3?_:y===null?y=Object.getOwnPropertyDescriptor(_,E):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(l,_,E,y);else for(var q=l.length-1;q>=0;q--)(w=l[q])&&(D=(m<3?w(D):m>3?w(_,E,D):w(_,E))||D);return m>3&&D&&Object.defineProperty(_,E,D),D},b=this&&this.__param||function(l,_){return function(E,y){_(E,y,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreMouseService=void 0;const h=f(2585),v=f(8460),C=f(844),S={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function p(l,_){let E=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(E|=64,E|=l.action):(E|=3&l.button,4&l.button&&(E|=64),8&l.button&&(E|=128),l.action===32?E|=32:l.action!==0||_||(E|=3)),E}const o=String.fromCharCode,c={DEFAULT:l=>{const _=[p(l,!1)+32,l.col+32,l.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${o(_[0])}${o(_[1])}${o(_[2])}`},SGR:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${p(l,!0)};${l.col};${l.row}${_}`},SGR_PIXELS:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${p(l,!0)};${l.x};${l.y}${_}`}};let a=u.CoreMouseService=class extends C.Disposable{constructor(l,_){super(),this._bufferService=l,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new v.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const E of Object.keys(S))this.addProtocol(E,S[E]);for(const E of Object.keys(c))this.addEncoding(E,c[E]);this.reset()}addProtocol(l,_){this._protocols[l]=_}addEncoding(l,_){this._encodings[l]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const _=this._encodings[this._activeEncoding](l);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,_,E){if(E){if(l.x!==_.x||l.y!==_.y)return!1}else if(l.col!==_.col||l.row!==_.row)return!1;return l.button===_.button&&l.action===_.action&&l.ctrl===_.ctrl&&l.alt===_.alt&&l.shift===_.shift}};u.CoreMouseService=a=d([b(0,h.IBufferService),b(1,h.ICoreService)],a)},6975:function($,u,f){var d=this&&this.__decorate||function(a,l,_,E){var y,w=arguments.length,m=w<3?l:E===null?E=Object.getOwnPropertyDescriptor(l,_):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(a,l,_,E);else for(var D=a.length-1;D>=0;D--)(y=a[D])&&(m=(w<3?y(m):w>3?y(l,_,m):y(l,_))||m);return w>3&&m&&Object.defineProperty(l,_,m),m},b=this&&this.__param||function(a,l){return function(_,E){l(_,E,a)}};Object.defineProperty(u,"__esModule",{value:!0}),u.CoreService=void 0;const h=f(1439),v=f(8460),C=f(844),S=f(2585),p=Object.freeze({insertMode:!1}),o=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let c=u.CoreService=class extends C.Disposable{constructor(a,l,_){super(),this._bufferService=a,this._logService=l,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new v.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new v.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new v.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new v.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(p),this.decPrivateModes=(0,h.clone)(o)}reset(){this.modes=(0,h.clone)(p),this.decPrivateModes=(0,h.clone)(o)}triggerDataEvent(a,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${a}"`,(()=>a.split("").map((E=>E.charCodeAt(0))))),this._onData.fire(a)}triggerBinaryEvent(a){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${a}"`,(()=>a.split("").map((l=>l.charCodeAt(0))))),this._onBinary.fire(a))}};u.CoreService=c=d([b(0,S.IBufferService),b(1,S.ILogService),b(2,S.IOptionsService)],c)},9074:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.DecorationService=void 0;const d=f(8055),b=f(8460),h=f(844),v=f(6106);let C=0,S=0;class p extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new v.SortedList((a=>a?.marker.line)),this._onDecorationRegistered=this.register(new b.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new b.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)((()=>this.reset())))}registerDecoration(a){if(a.marker.isDisposed)return;const l=new o(a);if(l){const _=l.marker.onDispose((()=>l.dispose()));l.onDispose((()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),_.dispose())})),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const a of this._decorations.values())a.dispose();this._decorations.clear()}*getDecorationsAtCell(a,l,_){let E=0,y=0;for(const w of this._decorations.getKeyIterator(l))E=w.options.x??0,y=E+(w.options.width??1),a>=E&&a<y&&(!_||(w.options.layer??"bottom")===_)&&(yield w)}forEachDecorationAtCell(a,l,_,E){this._decorations.forEachByKey(l,(y=>{C=y.options.x??0,S=C+(y.options.width??1),a>=C&&a<S&&(!_||(y.options.layer??"bottom")===_)&&E(y)}))}}u.DecorationService=p;class o 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 b.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new b.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:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.InstantiationService=u.ServiceCollection=void 0;const d=f(2585),b=f(8343);class h{constructor(...C){this._entries=new Map;for(const[S,p]of C)this.set(S,p)}set(C,S){const p=this._entries.get(C);return this._entries.set(C,S),p}forEach(C){for(const[S,p]of this._entries.entries())C(S,p)}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(v,C){this._services.set(v,C)}getService(v){return this._services.get(v)}createInstance(v,...C){const S=(0,b.getServiceDependencies)(v).sort(((c,a)=>c.index-a.index)),p=[];for(const c of S){const a=this._services.get(c.id);if(!a)throw new Error(`[createInstance] ${v.name} depends on UNKNOWN service ${c.id}.`);p.push(a)}const o=S.length>0?S[0].index:C.length;if(C.length!==o)throw new Error(`[createInstance] First service dependency of ${v.name} at position ${o+1} conflicts with ${C.length} static arguments`);return new v(...C,...p)}}},7866:function($,u,f){var d=this&&this.__decorate||function(o,c,a,l){var _,E=arguments.length,y=E<3?c:l===null?l=Object.getOwnPropertyDescriptor(c,a):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(o,c,a,l);else for(var w=o.length-1;w>=0;w--)(_=o[w])&&(y=(E<3?_(y):E>3?_(c,a,y):_(c,a))||y);return E>3&&y&&Object.defineProperty(c,a,y),y},b=this&&this.__param||function(o,c){return function(a,l){c(a,l,o)}};Object.defineProperty(u,"__esModule",{value:!0}),u.traceCall=u.setTraceLogger=u.LogService=void 0;const h=f(844),v=f(2585),C={trace:v.LogLevelEnum.TRACE,debug:v.LogLevelEnum.DEBUG,info:v.LogLevelEnum.INFO,warn:v.LogLevelEnum.WARN,error:v.LogLevelEnum.ERROR,off:v.LogLevelEnum.OFF};let S,p=u.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(o){super(),this._optionsService=o,this._logLevel=v.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),S=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(o){for(let c=0;c<o.length;c++)typeof o[c]=="function"&&(o[c]=o[c]())}_log(o,c,a){this._evalLazyOptionalParams(a),o.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+c,...a)}trace(o,...c){this._logLevel<=v.LogLevelEnum.TRACE&&this._log(this._optionsService.options.logger?.trace.bind(this._optionsService.options.logger)??console.log,o,c)}debug(o,...c){this._logLevel<=v.LogLevelEnum.DEBUG&&this._log(this._optionsService.options.logger?.debug.bind(this._optionsService.options.logger)??console.log,o,c)}info(o,...c){this._logLevel<=v.LogLevelEnum.INFO&&this._log(this._optionsService.options.logger?.info.bind(this._optionsService.options.logger)??console.info,o,c)}warn(o,...c){this._logLevel<=v.LogLevelEnum.WARN&&this._log(this._optionsService.options.logger?.warn.bind(this._optionsService.options.logger)??console.warn,o,c)}error(o,...c){this._logLevel<=v.LogLevelEnum.ERROR&&this._log(this._optionsService.options.logger?.error.bind(this._optionsService.options.logger)??console.error,o,c)}};u.LogService=p=d([b(0,v.IOptionsService)],p),u.setTraceLogger=function(o){S=o},u.traceCall=function(o,c,a){if(typeof a.value!="function")throw new Error("not supported");const l=a.value;a.value=function(..._){if(S.logLevel!==v.LogLevelEnum.TRACE)return l.apply(this,_);S.trace(`GlyphRenderer#${l.name}(${_.map((y=>JSON.stringify(y))).join(", ")})`);const E=l.apply(this,_);return S.trace(`GlyphRenderer#${l.name} return`,E),E}}},7302:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.OptionsService=u.DEFAULT_OPTIONS=void 0;const d=f(8460),b=f(844),h=f(6114);u.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const v=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends b.Disposable{constructor(p){super(),this._onOptionChange=this.register(new d.EventEmitter),this.onOptionChange=this._onOptionChange.event;const o={...u.DEFAULT_OPTIONS};for(const c in p)if(c in o)try{const a=p[c];o[c]=this._sanitizeAndValidateOption(c,a)}catch(a){console.error(a)}this.rawOptions=o,this.options={...o},this._setupOptions(),this.register((0,b.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(p,o){return this.onOptionChange((c=>{c===p&&o(this.rawOptions[p])}))}onMultipleOptionChange(p,o){return this.onOptionChange((c=>{p.indexOf(c)!==-1&&o()}))}_setupOptions(){const p=c=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);return this.rawOptions[c]},o=(c,a)=>{if(!(c in u.DEFAULT_OPTIONS))throw new Error(`No option with key "${c}"`);a=this._sanitizeAndValidateOption(c,a),this.rawOptions[c]!==a&&(this.rawOptions[c]=a,this._onOptionChange.fire(c))};for(const c in this.rawOptions){const a={get:p.bind(this,c),set:o.bind(this,c)};Object.defineProperty(this.options,c,a)}}_sanitizeAndValidateOption(p,o){switch(p){case"cursorStyle":if(o||(o=u.DEFAULT_OPTIONS[p]),!(function(c){return c==="block"||c==="underline"||c==="bar"})(o))throw new Error(`"${o}" is not a valid value for ${p}`);break;case"wordSeparator":o||(o=u.DEFAULT_OPTIONS[p]);break;case"fontWeight":case"fontWeightBold":if(typeof o=="number"&&1<=o&&o<=1e3)break;o=v.includes(o)?o:u.DEFAULT_OPTIONS[p];break;case"cursorWidth":o=Math.floor(o);case"lineHeight":case"tabStopWidth":if(o<1)throw new Error(`${p} cannot be less than 1, value: ${o}`);break;case"minimumContrastRatio":o=Math.max(1,Math.min(21,Math.round(10*o)/10));break;case"scrollback":if((o=Math.min(o,4294967295))<0)throw new Error(`${p} cannot be less than 0, value: ${o}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(o<=0)throw new Error(`${p} cannot be less than or equal to 0, value: ${o}`);break;case"rows":case"cols":if(!o&&o!==0)throw new Error(`${p} must be numeric, value: ${o}`);break;case"windowsPty":o=o??{}}return o}}u.OptionsService=C},2660:function($,u,f){var d=this&&this.__decorate||function(C,S,p,o){var c,a=arguments.length,l=a<3?S:o===null?o=Object.getOwnPropertyDescriptor(S,p):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(C,S,p,o);else for(var _=C.length-1;_>=0;_--)(c=C[_])&&(l=(a<3?c(l):a>3?c(S,p,l):c(S,p))||l);return a>3&&l&&Object.defineProperty(S,p,l),l},b=this&&this.__param||function(C,S){return function(p,o){S(p,o,C)}};Object.defineProperty(u,"__esModule",{value:!0}),u.OscLinkService=void 0;const h=f(2585);let v=u.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const S=this._bufferService.buffer;if(C.id===void 0){const _=S.addMarker(S.ybase+S.y),E={data:C,id:this._nextId++,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(E,_))),this._dataByLinkId.set(E.id,E),E.id}const p=C,o=this._getEntryIdKey(p),c=this._entriesWithId.get(o);if(c)return this.addLineToLink(c.id,S.ybase+S.y),c.id;const a=S.addMarker(S.ybase+S.y),l={id:this._nextId++,key:this._getEntryIdKey(p),data:p,lines:[a]};return a.onDispose((()=>this._removeMarkerFromLink(l,a))),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(C,S){const p=this._dataByLinkId.get(C);if(p&&p.lines.every((o=>o.line!==S))){const o=this._bufferService.buffer.addMarker(S);p.lines.push(o),o.onDispose((()=>this._removeMarkerFromLink(p,o)))}}getLinkData(C){return this._dataByLinkId.get(C)?.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,S){const p=C.lines.indexOf(S);p!==-1&&(C.lines.splice(p,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};u.OscLinkService=v=d([b(0,h.IBufferService)],v)},8343:($,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(b){return b[d]||[]},u.createDecorator=function(b){if(u.serviceRegistry.has(b))return u.serviceRegistry.get(b);const h=function(v,C,S){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(p,o,c){o[f]===o?o[d].push({id:p,index:c}):(o[d]=[{id:p,index:c}],o[f]=o)})(h,v,S)};return h.toString=()=>b,u.serviceRegistry.set(b,h),h}},2585:($,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 b;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"})(b||(u.LogLevelEnum=b={})),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:($,u,f)=>{Object.defineProperty(u,"__esModule",{value:!0}),u.UnicodeService=void 0;const d=f(8460),b=f(225);class h{static extractShouldJoin(C){return(1&C)!=0}static extractWidth(C){return C>>1&3}static extractCharKind(C){return C>>3}static createPropertyValue(C,S,p=!1){return(16777215&C)<<3|(3&S)<<1|(p?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new d.EventEmitter,this.onChange=this._onChange.event;const C=new b.UnicodeV6;this.register(C),this._active=C.version,this._activeProvider=C}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(C){if(!this._providers[C])throw new Error(`unknown Unicode version "${C}"`);this._active=C,this._activeProvider=this._providers[C],this._onChange.fire(C)}register(C){this._providers[C.version]=C}wcwidth(C){return this._activeProvider.wcwidth(C)}getStringCellWidth(C){let S=0,p=0;const o=C.length;for(let c=0;c<o;++c){let a=C.charCodeAt(c);if(55296<=a&&a<=56319){if(++c>=o)return S+this.wcwidth(a);const E=C.charCodeAt(c);56320<=E&&E<=57343?a=1024*(a-55296)+E-56320+65536:S+=this.wcwidth(E)}const l=this.charProperties(a,p);let _=h.extractWidth(l);h.extractShouldJoin(l)&&(_-=h.extractWidth(p)),S+=_,p=l}return S}charProperties(C,S){return this._activeProvider.charProperties(C,S)}}u.UnicodeService=h}},B={};function re($){var u=B[$];if(u!==void 0)return u.exports;var f=B[$]={exports:{}};return z[$].call(f.exports,f,f.exports,re),f.exports}var ue={};return(()=>{var $=ue;Object.defineProperty($,"__esModule",{value:!0}),$.Terminal=void 0;const u=re(9042),f=re(3236),d=re(844),b=re(5741),h=re(8285),v=re(7975),C=re(7090),S=["cols","rows"];class p extends d.Disposable{constructor(c){super(),this._core=this.register(new f.Terminal(c)),this._addonManager=this.register(new b.AddonManager),this._publicOptions={...this._core.options};const a=_=>this._core.options[_],l=(_,E)=>{this._checkReadonlyOptions(_),this._core.options[_]=E};for(const _ in this._core.options){const E={get:a.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,E)}}_checkReadonlyOptions(c){if(S.includes(c))throw new Error(`Option "${c}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new v.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 c=this._core.coreService.decPrivateModes;let a="none";switch(this._core.coreMouseService.activeProtocol){case"X10":a="x10";break;case"VT200":a="vt200";break;case"DRAG":a="drag";break;case"ANY":a="any"}return{applicationCursorKeysMode:c.applicationCursorKeys,applicationKeypadMode:c.applicationKeypad,bracketedPasteMode:c.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:a,originMode:c.origin,reverseWraparoundMode:c.reverseWraparound,sendFocusMode:c.sendFocus,wraparoundMode:c.wraparound}}get options(){return this._publicOptions}set options(c){for(const a in c)this._publicOptions[a]=c[a]}blur(){this._core.blur()}focus(){this._core.focus()}input(c,a=!0){this._core.input(c,a)}resize(c,a){this._verifyIntegers(c,a),this._core.resize(c,a)}open(c){this._core.open(c)}attachCustomKeyEventHandler(c){this._core.attachCustomKeyEventHandler(c)}attachCustomWheelEventHandler(c){this._core.attachCustomWheelEventHandler(c)}registerLinkProvider(c){return this._core.registerLinkProvider(c)}registerCharacterJoiner(c){return this._checkProposedApi(),this._core.registerCharacterJoiner(c)}deregisterCharacterJoiner(c){this._checkProposedApi(),this._core.deregisterCharacterJoiner(c)}registerMarker(c=0){return this._verifyIntegers(c),this._core.registerMarker(c)}registerDecoration(c){return this._checkProposedApi(),this._verifyPositiveIntegers(c.x??0,c.width??0,c.height??0),this._core.registerDecoration(c)}hasSelection(){return this._core.hasSelection()}select(c,a,l){this._verifyIntegers(c,a,l),this._core.select(c,a,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(c,a){this._verifyIntegers(c,a),this._core.selectLines(c,a)}dispose(){super.dispose()}scrollLines(c){this._verifyIntegers(c),this._core.scrollLines(c)}scrollPages(c){this._verifyIntegers(c),this._core.scrollPages(c)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(c){this._verifyIntegers(c),this._core.scrollToLine(c)}clear(){this._core.clear()}write(c,a){this._core.write(c,a)}writeln(c,a){this._core.write(c),this._core.write(`\r
|
|
17
|
+
`,a)}paste(c){this._core.paste(c)}refresh(c,a){this._verifyIntegers(c,a),this._core.refresh(c,a)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(c){this._addonManager.loadAddon(this,c)}static get strings(){return u}_verifyIntegers(...c){for(const a of c)if(a===1/0||isNaN(a)||a%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...c){for(const a of c)if(a&&(a===1/0||isNaN(a)||a%1!=0||a<0))throw new Error("This API only accepts positive integers")}}$.Terminal=p})(),ue})()))})(bc)),bc.exports}var lm=am(),yc={exports:{}},Cd;function om(){return Cd||(Cd=1,(function(R,N){(function(z,B){R.exports=B()})(self,(()=>(()=>{var z={};return(()=>{var B=z;Object.defineProperty(B,"__esModule",{value:!0}),B.FitAddon=void 0,B.FitAddon=class{activate(re){this._terminal=re}dispose(){}fit(){const re=this.proposeDimensions();if(!re||!this._terminal||isNaN(re.cols)||isNaN(re.rows))return;const ue=this._terminal._core;this._terminal.rows===re.rows&&this._terminal.cols===re.cols||(ue._renderService.clear(),this._terminal.resize(re.cols,re.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const re=this._terminal._core,ue=re._renderService.dimensions;if(ue.css.cell.width===0||ue.css.cell.height===0)return;const $=this._terminal.options.scrollback===0?0:re.viewport.scrollBarWidth,u=window.getComputedStyle(this._terminal.element.parentElement),f=parseInt(u.getPropertyValue("height")),d=Math.max(0,parseInt(u.getPropertyValue("width"))),b=window.getComputedStyle(this._terminal.element),h=f-(parseInt(b.getPropertyValue("padding-top"))+parseInt(b.getPropertyValue("padding-bottom"))),v=d-(parseInt(b.getPropertyValue("padding-right"))+parseInt(b.getPropertyValue("padding-left")))-$;return{cols:Math.max(2,Math.floor(v/ue.css.cell.width)),rows:Math.max(1,Math.floor(h/ue.css.cell.height))}}}})(),z})()))})(yc)),yc.exports}var cm=om();const il=16e3,um=.004,hm=["audio/webm;codecs=opus","audio/webm","audio/mp4"];function zd(R){if(!R.length)return 0;let N=0;for(const z of R)N+=z*z;return Math.sqrt(N/R.length)}function Ed(R,N=um){return zd(R)<N}async function fm(R){const N=new AudioContext;try{const z=await N.decodeAudioData(await R.arrayBuffer()),B=Math.max(1,Math.ceil(z.duration*il)),re=new OfflineAudioContext(1,B,il),ue=re.createBufferSource();return ue.buffer=z,ue.connect(re.destination),ue.start(),(await re.startRendering()).getChannelData(0)}finally{N.close()}}class wd{constructor(){this.stream=null,this.recorder=null,this.chunks=[]}async start(){this.stream=await navigator.mediaDevices.getUserMedia({audio:!0});const N=hm.find(z=>MediaRecorder.isTypeSupported(z));this.recorder=new MediaRecorder(this.stream,N?{mimeType:N}:void 0),this.chunks=[],this.recorder.ondataavailable=z=>{z.data.size&&this.chunks.push(z.data)},this.recorder.start()}stop(){return new Promise(N=>{const z=this.recorder;if(!z||z.state==="inactive"){this.dispose(),N(null);return}z.onstop=()=>{const B=new Blob(this.chunks,{type:z.mimeType||"audio/webm"});if(this.dispose(),!B.size){N(null);return}fm(B).then(N,()=>N(null))},z.stop()})}cancel(){const N=this.recorder;N&&N.state!=="inactive"&&(N.onstop=null,N.stop()),this.dispose()}dispose(){this.stream?.getTracks().forEach(N=>N.stop()),this.stream=null,this.recorder=null,this.chunks=[]}}function Xa(R){const N=R.replace(/^.*@/,""),z=N.replace(/:\d+$/,"");return z.includes(":")?N:z}const tl="\x1B",xd="\x07",dm=new RegExp(tl+"\\][^"+xd+tl+"]*(?:"+xd+"|"+tl+"\\\\)","g"),_m=new RegExp(tl+"\\[[0-9;?]*[A-Za-z]","g");function vm(R){return/[#$%>]\s*$/.test(R.replace(dm,"").replace(_m,""))}const mm=60,pm=200;function gm(R){if(R.type!=="keydown"||!(R.ctrlKey||R.metaKey)||!R.shiftKey)return null;const N=R.key.toLowerCase();return N==="c"?"copy":N==="v"?"paste":null}function sl(R){return R instanceof Error?R.message:String(R)}function Sm(R,N,z){if(N.mark(),typeof R.terminal.paste=="function"){R.terminal.paste(z);return}R.writeToPty?.(z)}function Ud(R=()=>Date.now()){let N=Number.NEGATIVE_INFINITY;return{mark(){N=R()},isDuplicate(){return R()-N<pm}}}function bm(R,N){const z=B=>{N.isDuplicate()&&(B.preventDefault(),B.stopPropagation(),B.stopImmediatePropagation?.())};return R.addEventListener("paste",z,!0),()=>R.removeEventListener("paste",z,!0)}function ym(R,N=Ud()){return z=>{const B=gm(z);if(!B)return!0;if(z.preventDefault(),z.stopPropagation(),B==="copy"){const re=R.terminal.getSelection();return re&&R.clipboard.copyText(re).catch(ue=>{R.onError(sl(ue))}),!1}return R.clipboard.readText().then(re=>{re&&Sm(R,N,re)}).catch(re=>{R.onError(sl(re))}),!1}}const Cm=new Set(["c","p","s"]);function Em(R){return R?[...R].some(N=>Cm.has(N)):!0}function wm(R){const N=R.replace(/\s+/g,"");if(!/^[A-Za-z0-9+/]*={0,2}$/.test(N))return null;try{const z=atob(N),B=Uint8Array.from(z,re=>re.charCodeAt(0));return new TextDecoder().decode(B)}catch{return null}}function xm(R){const N=R.indexOf(";");if(N===-1||!Em(R.slice(0,N)))return null;const z=R.slice(N+1);return z==="?"||!z?null:wm(z)}function Am(R){const N=R.terminal.parser;if(!N)return()=>{};const z=N.registerOscHandler(52,B=>{const re=xm(B);return re!==null&&R.clipboard.copyText(re).catch(ue=>{R.onError(sl(ue))}),!0});return()=>{z&&typeof z.dispose=="function"&&z.dispose()}}function Dm(R){const{terminal:N}=R;if(typeof N.onSelectionChange!="function")return()=>{};let z,B=null;const re=N.onSelectionChange(()=>{z&&clearTimeout(z),z=setTimeout(()=>{if(z=void 0,R.isCopyOnSelectEnabled&&!R.isCopyOnSelectEnabled())return;const ue=N.getSelection();!ue||ue===B||(B=ue,R.clipboard.copyText(ue).catch($=>{B=null,R.onError(sl($))}))},mm)});return()=>{z&&clearTimeout(z),re&&typeof re.dispose=="function"&&re.dispose()}}function Tm(R){const N=Ud();R.terminal.attachCustomKeyEventHandler(ym(R,N));const z=[Am(R),Dm(R),R.pasteEventTarget?bm(R.pasteEventTarget,N):()=>{}];return()=>{for(const B of z.reverse())B()}}function Rm(R){let N=!1;return{onMouseDown(z){N=z.target===z.currentTarget},onClick(z){const B=N&&z.target===z.currentTarget;N=!1,B&&R()}}}function Nr(R){const N=ge.useRef(R);N.current=R;const z=ge.useRef(null);return z.current||(z.current=Rm(()=>N.current())),z.current}const Ad={q4:96,q8:41,fp16:76,fp32:152},Dd={q4:142,q8:77,fp16:146,fp32:291},Td={q4:299,q8:249,fp16:485,fp32:968},Rc=[{id:"onnx-community/whisper-tiny.en",label:"Whisper tiny · English",family:"tiny",multilingual:!1,downloadMb:Ad},{id:"onnx-community/whisper-base.en",label:"Whisper base · English",family:"base",multilingual:!1,downloadMb:Dd},{id:"onnx-community/whisper-small.en",label:"Whisper small · English",family:"small",multilingual:!1,downloadMb:Td},{id:"onnx-community/whisper-tiny",label:"Whisper tiny · multilingual",family:"tiny",multilingual:!0,downloadMb:Ad},{id:"onnx-community/whisper-base",label:"Whisper base · multilingual",family:"base",multilingual:!0,downloadMb:Dd},{id:"onnx-community/whisper-small",label:"Whisper small · multilingual",family:"small",multilingual:!0,downloadMb:Td}],Mm="onnx-community/whisper-tiny.en",Rd=[{value:"q8",label:"q8 · quantized",detail:"Smallest download, fastest on CPU"},{value:"q4",label:"q4",detail:"Smaller weights, some accuracy loss"},{value:"fp16",label:"fp16",detail:"Half precision; needs WebGPU to pay off"},{value:"fp32",label:"fp32 · full",detail:"Most accurate, largest download"}],qd=[{value:"auto",label:"Detect automatically"},{value:"en",label:"English"},{value:"es",label:"Spanish"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"it",label:"Italian"},{value:"pt",label:"Portuguese"},{value:"nl",label:"Dutch"},{value:"pl",label:"Polish"},{value:"sv",label:"Swedish"},{value:"da",label:"Danish"},{value:"no",label:"Norwegian"},{value:"fi",label:"Finnish"},{value:"cs",label:"Czech"},{value:"el",label:"Greek"},{value:"tr",label:"Turkish"},{value:"ru",label:"Russian"},{value:"uk",label:"Ukrainian"},{value:"he",label:"Hebrew"},{value:"ar",label:"Arabic"},{value:"hi",label:"Hindi"},{value:"zh",label:"Chinese"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"id",label:"Indonesian"},{value:"th",label:"Thai"},{value:"vi",label:"Vietnamese"}];function rl(R){return Rc.find(N=>N.id===R)}function Lm(R){return rl(R)?.multilingual??!1}function Om(R,N){return rl(R)?.downloadMb[N]??null}function Bm(R,N){const z=Om(R,N);return z===null?"Download size unknown":`≈${z} MB download, cached after first use`}const km={bash:"bash",zsh:"zsh",fish:"fish",sh:"sh",powershell:"Windows PowerShell",pwsh:"PowerShell 7",cmd:"Command Prompt",wsl:"WSL"};function Hm(R){return km[R]??R}const Id="zerog-settings",Gd="zerog-theme",Qe={appearance:{theme:"dark",font:"system",fontSize:13,lineHeight:1.2,letterSpacing:0},terminal:{scrollback:1e4,cursorStyle:"block",cursorBlink:!0,copyOnSelect:!0},sessions:{defaultBackend:"bash",defaultWslDistribution:"",defaultLayout:"stack",startSidebarCollapsed:!1},ai:{requireApproval:!0,voiceInsert:"type"},speech:{engine:"builtin",model:Mm,precision:"q8",device:"wasm",language:"auto",task:"transcribe",maxUtteranceSeconds:30,silenceThreshold:.004,serverUrl:"http://127.0.0.1:8080/v1/audio/transcriptions",serverModel:"Qwen3-ASR-0.6B"}},Rt={fontSize:{min:8,max:32},lineHeight:{min:1,max:2},letterSpacing:{min:-2,max:4},scrollback:{min:200,max:2e5},maxUtteranceSeconds:{min:5,max:120},silenceThreshold:{min:5e-4,max:.05}},Md={system:'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace',jetbrains:'"JetBrains Mono", ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace',cascadia:'"Cascadia Code", "Cascadia Mono", ui-monospace, Consolas, "Liberation Mono", monospace',consolas:'Consolas, "Liberation Mono", ui-monospace, monospace',fira:'"Fira Code", "Fira Mono", ui-monospace, Consolas, "Liberation Mono", monospace',menlo:'Menlo, Monaco, ui-monospace, Consolas, "Liberation Mono", monospace'},Nm=[{value:"system",label:"System monospace"},{value:"jetbrains",label:"JetBrains Mono"},{value:"cascadia",label:"Cascadia Code"},{value:"consolas",label:"Consolas"},{value:"fira",label:"Fira Code"},{value:"menlo",label:"Menlo"}];function Dc(R){return Md[R]??Md.system}function jr(R){return typeof R=="object"&&R!==null}function ei(R,N,z){return typeof R=="string"&&N.includes(R)?R:z}function Za(R,N){return typeof R=="boolean"?R:N}function zr(R,N,z){return typeof R!="number"||!Number.isFinite(R)?z:Math.min(N.max,Math.max(N.min,R))}function Cc(R,N,z=512){return typeof R!="string"?N:R.slice(0,z)}const Ld=["dark","light"],jm=["stack","split-v","split-h","grid"],Pd=["bash","zsh","fish","sh","powershell","pwsh","cmd","wsl"],zm=["block","underline","bar"],Um=["system","jetbrains","cascadia","consolas","fira","menlo"],qm=["builtin","server"],Im=["wasm","webgpu"],Gm=["q4","q8","fp16","fp32"],Pm=["transcribe","translate"],Ym=["type","review"];function Qs(R,N){const z=jr(R)?R:{},B=jr(z.appearance)?z.appearance:{},re=jr(z.terminal)?z.terminal:{},ue=jr(z.sessions)?z.sessions:{},$=jr(z.ai)?z.ai:{},u=jr(z.speech)?z.speech:{},f=ei(N,Ld,Qe.appearance.theme),d=ei(u.engine,qm,Qe.speech.engine),b=ei(u.model,Rc.map(v=>v.id),Qe.speech.model),h=d==="server"||rl(b)?.multilingual?ei(u.language,qd.map(v=>v.value),Qe.speech.language):"auto";return{appearance:{theme:ei(B.theme,Ld,f),font:ei(B.font,Um,Qe.appearance.font),fontSize:Math.round(zr(B.fontSize,Rt.fontSize,Qe.appearance.fontSize)),lineHeight:zr(B.lineHeight,Rt.lineHeight,Qe.appearance.lineHeight),letterSpacing:zr(B.letterSpacing,Rt.letterSpacing,Qe.appearance.letterSpacing)},terminal:{scrollback:Math.round(zr(re.scrollback,Rt.scrollback,Qe.terminal.scrollback)),cursorStyle:ei(re.cursorStyle,zm,Qe.terminal.cursorStyle),cursorBlink:Za(re.cursorBlink,Qe.terminal.cursorBlink),copyOnSelect:Za(re.copyOnSelect,Qe.terminal.copyOnSelect)},sessions:{defaultBackend:ei(ue.defaultBackend,Pd,Qe.sessions.defaultBackend),defaultWslDistribution:Cc(ue.defaultWslDistribution,Qe.sessions.defaultWslDistribution,64),defaultLayout:ei(ue.defaultLayout,jm,Qe.sessions.defaultLayout),startSidebarCollapsed:Za(ue.startSidebarCollapsed,Qe.sessions.startSidebarCollapsed)},ai:{requireApproval:Za($.requireApproval,Qe.ai.requireApproval),voiceInsert:ei($.voiceInsert,Ym,Qe.ai.voiceInsert)},speech:{engine:d,model:b,precision:ei(u.precision,Gm,Qe.speech.precision),device:ei(u.device,Im,Qe.speech.device),language:h,task:ei(u.task,Pm,Qe.speech.task),maxUtteranceSeconds:Math.round(zr(u.maxUtteranceSeconds,Rt.maxUtteranceSeconds,Qe.speech.maxUtteranceSeconds)),silenceThreshold:zr(u.silenceThreshold,Rt.silenceThreshold,Qe.speech.silenceThreshold),serverUrl:Cc(u.serverUrl,Qe.speech.serverUrl,512),serverModel:Cc(u.serverModel,Qe.speech.serverModel,128)}}}function Km(R){if(!R)return Qs(void 0);let N=null,z=null;try{N=R.getItem(Id),z=R.getItem(Gd)}catch{return Qs(void 0)}if(!N)return Qs(void 0,z);try{return Qs(JSON.parse(N),z)}catch{return Qs(void 0,z)}}function Od(R,N){if(R)try{R.setItem(Id,JSON.stringify(N)),R.setItem(Gd,N.appearance.theme)}catch{}}function Wm(R,N,z){return Qs({...R,[N]:{...R[N],...z}})}function Yd(R,N){if(N.some(B=>B.backend===R))return R;const z=N[0]?.backend;return z&&Pd.includes(z)?z:R}function Fm(R){const N=R.engine==="builtin",z=rl(R.model)?.multilingual??!1;return{model:N,precision:N,device:N,language:N?z:!0,task:N&&z,server:!N}}function Vm(R,N){return Qs({...R,[N]:Qe[N]})}const Ec=[{id:"appearance",label:"Appearance",hint:"Theme, font",blurb:"How the workspace and terminal text look."},{id:"terminal",label:"Terminal",hint:"Scrollback, cursor",blurb:"Behaviour of every terminal pane."},{id:"sessions",label:"Sessions",hint:"Defaults, layout",blurb:"What new terminals and new windows start as."},{id:"ai",label:"AI & voice",hint:"Approval, insert",blurb:"How AI suggestions and transcripts reach a terminal."},{id:"speech",label:"Speech recognition",hint:"Engine, model",blurb:"Which recogniser runs, and how it is tuned."}];function Hn({label:R,hint:N,children:z}){return A.jsxs("label",{className:"settings-field",children:[A.jsx("span",{className:"settings-field-label",children:R}),z,N?A.jsx("small",{children:N}):null]})}function bi({label:R,hint:N,value:z,options:B,onChange:re}){return A.jsx(Hn,{label:R,hint:N,children:A.jsx("select",{value:z,onChange:ue=>re(ue.target.value),children:B.map(ue=>A.jsx("option",{value:ue.value,children:ue.label},ue.value))})})}function Ur({label:R,hint:N,value:z,min:B,max:re,step:ue,format:$,onChange:u}){return A.jsx(Hn,{label:R,hint:N,children:A.jsxs("span",{className:"settings-range",children:[A.jsx("input",{type:"range",min:B,max:re,step:ue,value:z,onChange:f=>u(Number(f.target.value)),"aria-label":R}),A.jsx("output",{children:$(z)})]})})}function $a({label:R,hint:N,checked:z,onChange:B}){return A.jsxs("label",{className:"settings-toggle",children:[A.jsx("input",{type:"checkbox",checked:z,onChange:re=>B(re.target.checked)}),A.jsxs("span",{children:[A.jsx("b",{children:R}),N?A.jsx("small",{children:N}):null]})]})}function Xm({value:R,onChange:N}){const z=[{id:"builtin",title:"Built-in",detail:"Whisper ONNX in this app, downloaded once and cached. No other software needed."},{id:"server",title:"Local server",detail:"Post audio to a transcription server on this machine — the way to use a GGUF model such as Qwen3-ASR through llama.cpp, LM Studio or Unsloth Studio."}];return A.jsx("div",{className:"settings-engines",role:"radiogroup","aria-label":"Speech engine",children:z.map(B=>A.jsxs("button",{type:"button",role:"radio","aria-checked":R===B.id,className:`settings-engine ${R===B.id?"active":""}`,onClick:()=>N(B.id),children:[A.jsx("b",{children:B.title}),A.jsx("small",{children:B.detail})]},B.id))})}function Zm({state:R,onRun:N}){const z=R.status!=="idle",B=R.status==="recording"?"Stop and transcribe":R.status==="transcribing"?"Transcribing…":"Test recognition";return A.jsxs("div",{className:"settings-test",children:[A.jsxs("div",{className:"settings-test-head",children:[A.jsxs("div",{children:[A.jsx("b",{children:"Try it"}),A.jsx("small",{children:"Records a phrase and transcribes it here, without typing into a terminal."})]}),A.jsx("button",{type:"button",className:R.status==="recording"?"settings-test-button recording":"settings-test-button",onClick:N,disabled:R.status==="transcribing",children:B})]}),R.message?A.jsx("p",{className:"settings-test-status",children:R.message}):null,R.error?A.jsx("p",{className:"settings-test-error",children:R.error}):null,R.transcript!==null&&R.transcript!==void 0?A.jsx("output",{className:"settings-test-transcript",children:R.transcript||"(nothing transcribed)"}):null,!z&&(R.elapsedMs!=null||R.level!=null)?A.jsxs("p",{className:"settings-test-metrics",children:[R.elapsedMs!=null?`${(R.elapsedMs/1e3).toFixed(1)}s`:null,R.elapsedMs!=null&&R.level!=null?" · ":null,R.level!=null?`level ${R.level.toFixed(4)} RMS`:null]}):null]})}function $m({settings:R,onChange:N,onReset:z,onClose:B,backdrop:re,backends:ue,wslDistributions:$,speechTest:u,onSpeechTest:f}){const[d,b]=ge.useState("appearance"),h=Ec.find(S=>S.id===d)??Ec[0],v=Fm(R.speech),C=ue.length?ue.map(S=>({value:S.backend,label:S.label})):[{value:R.sessions.defaultBackend,label:R.sessions.defaultBackend}];return A.jsx("div",{className:"modal-layer settings-layer",role:"presentation",...re,children:A.jsxs("section",{className:"settings-card",role:"dialog","aria-modal":"true","aria-label":"Settings",children:[A.jsxs("div",{className:"modal-head",children:[A.jsxs("div",{children:[A.jsx("span",{className:"eyebrow",children:"SETTINGS"}),A.jsx("h2",{children:h.label})]}),A.jsx("button",{type:"button",className:"close-button",onClick:B,children:"Esc"})]}),A.jsxs("div",{className:"settings-body",children:[A.jsx("nav",{className:"settings-nav","aria-label":"Settings pages",children:Ec.map(S=>A.jsxs("button",{type:"button",className:`settings-nav-item ${S.id===d?"active":""}`,"aria-current":S.id===d,onClick:()=>b(S.id),children:[A.jsx("b",{children:S.label}),A.jsx("small",{children:S.hint})]},S.id))}),A.jsxs("div",{className:"settings-page",children:[A.jsx("p",{className:"settings-blurb",children:h.blurb}),d==="appearance"&&A.jsxs(A.Fragment,{children:[A.jsx(bi,{label:"Theme",value:R.appearance.theme,options:[{value:"dark",label:"Dark"},{value:"light",label:"Light"}],onChange:S=>N("appearance",{theme:S})}),A.jsx(bi,{label:"Terminal font",hint:"Falls back to another monospace face when the font is not installed.",value:R.appearance.font,options:Nm,onChange:S=>N("appearance",{font:S})}),A.jsx(Ur,{label:"Font size",value:R.appearance.fontSize,min:Rt.fontSize.min,max:Rt.fontSize.max,step:1,format:S=>`${S} px`,onChange:S=>N("appearance",{fontSize:S})}),A.jsx(Ur,{label:"Line height",value:R.appearance.lineHeight,min:Rt.lineHeight.min,max:Rt.lineHeight.max,step:.05,format:S=>S.toFixed(2),onChange:S=>N("appearance",{lineHeight:S})}),A.jsx(Ur,{label:"Letter spacing",value:R.appearance.letterSpacing,min:Rt.letterSpacing.min,max:Rt.letterSpacing.max,step:.1,format:S=>`${S.toFixed(1)} px`,onChange:S=>N("appearance",{letterSpacing:S})}),A.jsxs("div",{className:"settings-preview",style:{fontFamily:Dc(R.appearance.font),fontSize:`${R.appearance.fontSize}px`,lineHeight:R.appearance.lineHeight,letterSpacing:`${R.appearance.letterSpacing}px`},children:[A.jsx("span",{children:"user@host:~$ git status --short"}),A.jsx("span",{children:" M src/renderer/settings.ts"})]})]}),d==="terminal"&&A.jsxs(A.Fragment,{children:[A.jsx(Ur,{label:"Scrollback",hint:"Lines kept per pane. Larger scrollback costs memory in every open pane.",value:R.terminal.scrollback,min:Rt.scrollback.min,max:5e4,step:200,format:S=>`${S.toLocaleString()} lines`,onChange:S=>N("terminal",{scrollback:S})}),A.jsx(bi,{label:"Cursor",value:R.terminal.cursorStyle,options:[{value:"block",label:"Block"},{value:"underline",label:"Underline"},{value:"bar",label:"Bar"}],onChange:S=>N("terminal",{cursorStyle:S})}),A.jsx($a,{label:"Blink the cursor",checked:R.terminal.cursorBlink,onChange:S=>N("terminal",{cursorBlink:S})}),A.jsx($a,{label:"Copy on selection",hint:"Selecting text with the mouse puts it on the clipboard. Ctrl+Shift+C copies regardless.",checked:R.terminal.copyOnSelect,onChange:S=>N("terminal",{copyOnSelect:S})})]}),d==="sessions"&&A.jsxs(A.Fragment,{children:[A.jsx(bi,{label:"Default shell",hint:"Pre-selected when opening a new local terminal.",value:Yd(R.sessions.defaultBackend,ue),options:C,onChange:S=>N("sessions",{defaultBackend:S})}),A.jsxs(Hn,{label:"Default WSL distribution",hint:"Used when the default shell is WSL.",children:[A.jsx("input",{list:"settings-wsl-distributions",value:R.sessions.defaultWslDistribution,placeholder:"Ubuntu",onChange:S=>N("sessions",{defaultWslDistribution:S.target.value})}),A.jsx("datalist",{id:"settings-wsl-distributions",children:$.map(S=>A.jsx("option",{value:S},S))})]}),A.jsx(bi,{label:"Layout at startup",value:R.sessions.defaultLayout,options:[{value:"stack",label:"Single pane"},{value:"split-v",label:"Split vertically"},{value:"split-h",label:"Split horizontally"},{value:"grid",label:"Grid of four"}],onChange:S=>N("sessions",{defaultLayout:S})}),A.jsx($a,{label:"Start with the sidebar collapsed",checked:R.sessions.startSidebarCollapsed,onChange:S=>N("sessions",{startSidebarCollapsed:S})})]}),d==="ai"&&A.jsxs(A.Fragment,{children:[A.jsx($a,{label:"Ask before running an AI suggestion",hint:"Off means a suggested command is sent to the terminal as soon as it arrives.",checked:R.ai.requireApproval,onChange:S=>N("ai",{requireApproval:S})}),A.jsx(bi,{label:"Voice transcripts",hint:"Neither option presses Enter for you.",value:R.ai.voiceInsert,options:[{value:"type",label:"Type into the terminal"},{value:"review",label:"Show for review first"}],onChange:S=>N("ai",{voiceInsert:S})})]}),d==="speech"&&A.jsxs(A.Fragment,{children:[A.jsx(Xm,{value:R.speech.engine,onChange:S=>N("speech",{engine:S})}),v.model?A.jsx(bi,{label:"Model",hint:Bm(R.speech.model,R.speech.precision),value:R.speech.model,options:Rc.map(S=>({value:S.id,label:S.label})),onChange:S=>N("speech",{model:S})}):null,v.precision?A.jsx(bi,{label:"Precision",hint:Rd.find(S=>S.value===R.speech.precision)?.detail,value:R.speech.precision,options:Rd.map(S=>({value:S.value,label:S.label})),onChange:S=>N("speech",{precision:S})}):null,v.device?A.jsx(bi,{label:"Compute",hint:"WebGPU is faster where it works; the app falls back to WASM when it does not.",value:R.speech.device,options:[{value:"wasm",label:"CPU (WASM)"},{value:"webgpu",label:"GPU (WebGPU)"}],onChange:S=>N("speech",{device:S})}):null,v.language?A.jsx(bi,{label:"Language",value:R.speech.language,options:qd,onChange:S=>N("speech",{language:S})}):null,v.task?A.jsx(bi,{label:"Task",hint:"Translate produces English text from another language.",value:R.speech.task,options:[{value:"transcribe",label:"Transcribe"},{value:"translate",label:"Translate to English"}],onChange:S=>N("speech",{task:S})}):null,v.server?A.jsxs(A.Fragment,{children:[A.jsx(Hn,{label:"Server URL",hint:"Must be on this machine. OpenAI-compatible: POST multipart audio to /v1/audio/transcriptions.",children:A.jsx("input",{value:R.speech.serverUrl,placeholder:"http://127.0.0.1:8080/v1/audio/transcriptions",onChange:S=>N("speech",{serverUrl:S.target.value})})}),A.jsx(Hn,{label:"Server model",hint:"The model name the server expects, e.g. Qwen3-ASR-0.6B.",children:A.jsx("input",{value:R.speech.serverModel,placeholder:"Qwen3-ASR-0.6B",onChange:S=>N("speech",{serverModel:S.target.value})})})]}):null,A.jsx(Ur,{label:"Maximum utterance",hint:"Recording stops itself at this length so a stuck microphone cannot queue forever.",value:R.speech.maxUtteranceSeconds,min:Rt.maxUtteranceSeconds.min,max:Rt.maxUtteranceSeconds.max,step:5,format:S=>`${S} s`,onChange:S=>N("speech",{maxUtteranceSeconds:S})}),A.jsx(Ur,{label:"Silence threshold",hint:"Recordings quieter than this are discarded without transcribing. Raise it for a noisy room, lower it for a quiet microphone.",value:R.speech.silenceThreshold,min:Rt.silenceThreshold.min,max:Rt.silenceThreshold.max,step:5e-4,format:S=>S.toFixed(4),onChange:S=>N("speech",{silenceThreshold:S})}),A.jsx(Zm,{state:u,onRun:f})]}),A.jsxs("div",{className:"settings-foot",children:[A.jsx("span",{className:"settings-hint",children:"Changes apply immediately and are remembered."}),A.jsxs("button",{type:"button",onClick:()=>z(d),children:["Reset ",h.label.toLowerCase()]})]})]})]})]})})}const $s=[{kind:"local",label:"Local terminal",hint:"Shell on this machine"},{kind:"ssh",label:"SSH",hint:"Remote host"}];function Bd(R){return R==="local"||R==="ssh"}const Qm={workspace:{eyebrow:"WORKSPACE",title:"New workspace",submit:"Create workspace"},local:{eyebrow:"NEW SESSION",title:"Start a session",submit:"Open terminal"},ssh:{eyebrow:"NEW SESSION",title:"Start a session",submit:"Connect"}};function wc(R){return Qm[R]}function Jm(R,N){const z=$s.findIndex(re=>re.kind===R);if(z===-1)return null;const B=$s.length;switch(N){case"ArrowRight":case"ArrowDown":return $s[(z+1)%B].kind;case"ArrowLeft":case"ArrowUp":return $s[(z-1+B)%B].kind;case"Home":return $s[0].kind;case"End":return $s[B-1].kind;default:return null}}const ep=new Set(["127.0.0.1","localhost"]),tp=new Set(["::1","[::1]"]),ip=12e4,sp=300;function Kd(R){try{const N=new URL(R);return N.protocol!=="http:"&&N.protocol!=="https:"?null:N.hostname.toLowerCase()}catch{return null}}function rp(R){const N=Kd(R);return N===null?!1:ep.has(N)||N.endsWith(".localhost")}function np(R){const N=Kd(R);return N!==null&&tp.has(N)}function Qa(R,N,z){for(let B=0;B<z.length;B+=1)R.setUint8(N+B,z.charCodeAt(B))}function ap(R,N=il){const B=R.length*2,re=new ArrayBuffer(44+B),ue=new DataView(re);Qa(ue,0,"RIFF"),ue.setUint32(4,36+B,!0),Qa(ue,8,"WAVE"),Qa(ue,12,"fmt "),ue.setUint32(16,16,!0),ue.setUint16(20,1,!0),ue.setUint16(22,1,!0),ue.setUint32(24,N,!0),ue.setUint32(28,N*2,!0),ue.setUint16(32,2,!0),ue.setUint16(34,16,!0),Qa(ue,36,"data"),ue.setUint32(40,B,!0);for(let $=0;$<R.length;$+=1){const u=Math.max(-1,Math.min(1,R[$]));ue.setInt16(44+$*2,Math.round(u*32767),!0)}return re}function lp(R){if(typeof R=="string"){const B=R.trim();return B||null}if(typeof R!="object"||R===null)return null;const N=R;if(typeof N.text=="string"&&N.text.trim())return N.text.trim();const z=N.segments;if(Array.isArray(z)){const B=z.map(re=>typeof re=="object"&&re!==null?re.text:null).filter(re=>typeof re=="string").join(" ").trim();if(B)return B}if(typeof N.error=="string")throw new Error(N.error);return null}function op(R){const N=ap(R.audio,R.sampleRate??il),z=new FormData;return z.set("file",new Blob([N],{type:"audio/wav"}),"utterance.wav"),z.set("model",R.model),z.set("response_format","json"),R.language&&R.language!=="auto"&&z.set("language",R.language),z}function cp(){return typeof AbortSignal<"u"&&typeof AbortSignal.timeout=="function"?AbortSignal.timeout(ip):void 0}async function up(R,N=fetch){if(!rp(R.url))throw new Error(np(R.url)?"Use http://localhost instead of an IPv6 literal — the renderer cannot allow [::1]":"Speech server URL must be on this machine (http://127.0.0.1 or http://localhost)");if(!R.model.trim())throw new Error("Speech server model name is required");const z=await N(R.url,{method:"POST",body:op(R),signal:cp()}),B=await z.text();if(!z.ok){const $=B.slice(0,sp).trim();throw new Error(`Speech server returned ${z.status}${$?`: ${$}`:""}`)}let re=B;try{re=JSON.parse(B)}catch{}const ue=lp(re);if(ue===null)throw new Error("Speech server returned no transcript");return ue}function kd(R){return typeof R=="object"&&R!==null}class hp{constructor(N){this.options=N,this.worker=null,this.pending=new Map,this.nextId=1}async transcribe(N,z,B){if(z.engine==="server"){const ue=this.options.now??(()=>Date.now()),$=ue();return{text:await up({url:z.serverUrl,model:z.serverModel,language:z.language,audio:N},this.options.fetchImpl),elapsedMs:ue()-$,engine:"server"}}return{...await this.transcribeInWorker(N,z,B),engine:"builtin"}}transcribeInWorker(N,z,B){const re=this.ensureWorker(),ue=this.nextId++;return new Promise(($,u)=>{this.pending.set(ue,{resolve:$,reject:u,onProgress:B}),re.postMessage({type:"transcribe",id:ue,audio:N,config:{model:z.model,precision:z.precision,device:z.device,language:z.language,task:z.task,multilingual:Lm(z.model)}},[N.buffer])})}ensureWorker(){if(this.worker)return this.worker;const N=this.options.createWorker();return N.onmessage=z=>this.handleMessage(z.data),N.onerror=z=>{const B=kd(z)&&typeof z.message=="string"?z.message:"Speech worker failed";this.failAll(new Error(B)),this.worker=null},this.worker=N,N}handleMessage(N){if(!kd(N)||typeof N.id!="number")return;const z=this.pending.get(N.id);if(z){if(N.type==="loading"){z.onProgress?.({kind:"loading",progress:typeof N.progress=="number"?N.progress:null});return}if(N.type==="notice"){z.onProgress?.({kind:"notice",message:String(N.message)});return}if(N.type==="result"){this.pending.delete(N.id),z.resolve({text:typeof N.text=="string"?N.text:"",elapsedMs:typeof N.elapsedMs=="number"?N.elapsedMs:0});return}N.type==="error"&&(this.pending.delete(N.id),z.reject(new Error(typeof N.message=="string"?N.message:"Transcription failed")))}}failAll(N){for(const z of this.pending.values())z.reject(N);this.pending.clear()}dispose(){this.failAll(new Error("Speech client disposed")),this.worker?.terminate(),this.worker=null}}const fp=150,dp=3e3,mt=()=>window.zerog;function xc(){try{return window.localStorage}catch{return null}}function nt({name:R,className:N=""}){const z={viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round",className:`icon-svg ${N}`.trim(),"aria-hidden":!0};switch(R){case"plus":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M12 5v14M5 12h14"})});case"panel-left":return A.jsxs("svg",{...z,children:[A.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),A.jsx("path",{d:"M9 4v16"})]});case"panel-left-open":return A.jsxs("svg",{...z,children:[A.jsx("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),A.jsx("path",{d:"M9 4v16M6 9l2 3-2 3"})]});case"grid":return A.jsxs("svg",{...z,children:[A.jsx("rect",{x:"4",y:"4",width:"7",height:"7",rx:"1"}),A.jsx("rect",{x:"13",y:"4",width:"7",height:"7",rx:"1"}),A.jsx("rect",{x:"4",y:"13",width:"7",height:"7",rx:"1"}),A.jsx("rect",{x:"13",y:"13",width:"7",height:"7",rx:"1"})]});case"sessions":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M4 7h16M4 12h16M4 17h10"})});case"ssh":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M7 17l5-5-5-5M12 17h7"})});case"history":return A.jsxs("svg",{...z,children:[A.jsx("path",{d:"M4 12a8 8 0 1 0 2.3-5.7L4 8.5M4 4v4.5h4.5"}),A.jsx("path",{d:"M12 7v5l3 2"})]});case"spark":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M12 3l1.8 5.2L19 10l-5.2 1.8L12 17l-1.8-5.2L5 10l5.2-1.8L12 3z"})});case"settings":return A.jsxs("svg",{...z,children:[A.jsx("circle",{cx:"12",cy:"12",r:"3"}),A.jsx("path",{d:"M19.4 15a1.7 1.7 0 0 0 .3 1.8l.1.1a2 2 0 1 1-2.8 2.8l-.1-.1a1.7 1.7 0 0 0-1.8-.3 1.7 1.7 0 0 0-1 1.5V21a2 2 0 1 1-4 0v-.1a1.7 1.7 0 0 0-1-1.5 1.7 1.7 0 0 0-1.8.3l-.1.1a2 2 0 1 1-2.8-2.8l.1-.1a1.7 1.7 0 0 0 .3-1.8 1.7 1.7 0 0 0-1.5-1H3a2 2 0 1 1 0-4h.1a1.7 1.7 0 0 0 1.5-1 1.7 1.7 0 0 0-.3-1.8l-.1-.1a2 2 0 1 1 2.8-2.8l.1.1a1.7 1.7 0 0 0 1.8.3H9a1.7 1.7 0 0 0 1-1.5V3a2 2 0 1 1 4 0v.1a1.7 1.7 0 0 0 1 1.5 1.7 1.7 0 0 0 1.8-.3l.1-.1a2 2 0 1 1 2.8 2.8l-.1.1a1.7 1.7 0 0 0-.3 1.8V9c.3.6.9 1 1.6 1H21a2 2 0 1 1 0 4h-.1a1.7 1.7 0 0 0-1.5 1z"})]});case"sun":return A.jsxs("svg",{...z,children:[A.jsx("circle",{cx:"12",cy:"12",r:"4"}),A.jsx("path",{d:"M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"})]});case"moon":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M20.5 15.5A8.5 8.5 0 0 1 8.5 3.5 8.5 8.5 0 1 0 20.5 15.5z"})});case"stack":return A.jsx("svg",{...z,children:A.jsx("rect",{x:"5",y:"5",width:"14",height:"14",rx:"1.5"})});case"maximize":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M8 4H4v4M16 4h4v4M4 16v4h4M20 16v4h-4"})});case"restore":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M8 8h12v12H8zM4 16V4h12"})});case"chevron-left":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M15 5l-7 7 7 7"})});case"chevron-right":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M9 5l7 7-7 7"})});case"split-v":return A.jsxs("svg",{...z,children:[A.jsx("rect",{x:"4",y:"5",width:"7",height:"14",rx:"1"}),A.jsx("rect",{x:"13",y:"5",width:"7",height:"14",rx:"1"})]});case"split-h":return A.jsxs("svg",{...z,children:[A.jsx("rect",{x:"4",y:"4",width:"16",height:"7",rx:"1"}),A.jsx("rect",{x:"4",y:"13",width:"16",height:"7",rx:"1"})]});case"x":return A.jsx("svg",{...z,children:A.jsx("path",{d:"M6 6l12 12M18 6L6 18"})});case"mic":return A.jsxs("svg",{...z,children:[A.jsx("rect",{x:"9",y:"2.5",width:"6",height:"12",rx:"3"}),A.jsx("path",{d:"M5 11.5a7 7 0 0 0 14 0"}),A.jsx("path",{d:"M12 18.5V21"})]});default:return A.jsx("span",{className:"icon","aria-hidden":"true",children:"•"})}}function Ja({session:R,active:N=!1,ghosted:z=!1,onClick:B}){const re=R.kind==="ssh"?`SSH · ${R.host}`:R.backend==="wsl"?`WSL${R.wslDistribution?` · ${R.wslDistribution}`:""} · ${R.cwd}`:R.backend&&R.backend!=="screen"?`${Hm(R.backend)} · ${R.cwd}`:R.persistence==="screen"?`screen · ${R.cwd}`:`local · process only · ${R.cwd}`;return A.jsxs("button",{type:"button",className:`session-row ${N?"active":""} ${z?"session-ghosted":""}`,onClick:B,children:[A.jsx("span",{className:`status-dot ${R.status}`}),A.jsxs("span",{className:"session-copy",children:[A.jsx("b",{children:R.name}),A.jsx("small",{children:re})]}),A.jsx("span",{className:"session-state",children:z?"↗":R.status==="connected"?"●":"○"})]})}function _p({sessionId:R,focused:N,onStatus:z,appearance:B,terminalSettings:re}){const ue=ge.useRef(null),$=ge.useRef(null),u=ge.useRef(z);u.current=z;const f=ge.useRef(B);f.current=B;const d=ge.useRef(re);d.current=re;const b=ge.useRef(null);return ge.useEffect(()=>{if(!ue.current)return;const h=ue.current,v=new lm.Terminal({cursorBlink:d.current.cursorBlink,cursorStyle:d.current.cursorStyle,fontFamily:Dc(f.current.font),fontSize:f.current.fontSize,lineHeight:f.current.lineHeight,letterSpacing:f.current.letterSpacing,scrollback:d.current.scrollback,allowProposedApi:!0,theme:Nd(f.current.theme),convertEol:!0}),C=new cm.FitAddon;v.loadAddon(C),v.open(h),$.current=v;const S=mt();let p=!1,o=0;const c=()=>{if(!(p||!h.isConnected)&&!(h.clientWidth<20||h.clientHeight<20)){try{C.fit()}catch{return}S&&v.cols>0&&v.rows>0&&R&&S.resize(R,v.cols,v.rows)}},a=()=>{cancelAnimationFrame(o),o=requestAnimationFrame(()=>{c(),o=requestAnimationFrame(c)})};if(b.current=a,!S)return a(),v.writeln("\x1B[90mZeroG Terminal\x1B[0m"),v.writeln("\x1B[31mPreload API unavailable. Rebuild the app.\x1B[0m"),u.current("Preload API unavailable"),()=>{p=!0,cancelAnimationFrame(o),$.current=null,v.dispose()};const l=S.onData((m,D)=>{m===R&&v.write(D)}),_=S.onStatus((m,D)=>{m===R&&(u.current(D),a())}),E=v.onData(m=>{R&&S.write(R,m)}),y=Tm({terminal:v,clipboard:S,onError:m=>u.current(m),writeToPty:m=>{R&&S.write(R,m)},pasteEventTarget:h,isCopyOnSelectEnabled:()=>d.current.copyOnSelect}),w=new ResizeObserver(()=>a());return w.observe(h),window.addEventListener("resize",a),document.fonts?.ready?.then(()=>{p||a()}).catch(()=>{}),a(),R?S.attachSession(R).then(m=>{m.persistence==="process"?u.current(`${m.host} · ${m.name} · process only (install screen for persistence)`):u.current(`${m.host} · ${m.name}`),a()}).catch(m=>{u.current(m instanceof Error?m.message:String(m))}):(v.writeln("\x1B[90mZeroG Terminal\x1B[0m"),v.writeln("\x1B[90mSelect a session or create a local/SSH connection.\x1B[0m")),()=>{p=!0,cancelAnimationFrame(o),y(),E.dispose(),l(),_(),w.disconnect(),window.removeEventListener("resize",a),b.current=null,$.current=null,v.dispose()}},[R]),ge.useEffect(()=>{const h=$.current;h&&(h.options.theme=Nd(B.theme),h.options.fontFamily=Dc(B.font),h.options.fontSize=B.fontSize,h.options.lineHeight=B.lineHeight,h.options.letterSpacing=B.letterSpacing,h.options.scrollback=re.scrollback,h.options.cursorStyle=re.cursorStyle,h.options.cursorBlink=re.cursorBlink,b.current?.())},[B,re]),ge.useEffect(()=>{N&&$.current?.focus()},[N]),A.jsx("div",{className:"terminal",ref:ue,onMouseDownCapture:h=>h.preventDefault()})}function vp({index:R,onCreate:N}){return A.jsxs("article",{className:"pane empty-pane",children:[A.jsxs("div",{className:"pane-title",children:[A.jsxs("span",{children:["PANE ",R]}),A.jsx("span",{className:"pane-dim",children:"EMPTY"})]}),A.jsxs("div",{className:"empty-pane-body",children:[A.jsx("span",{className:"empty-glyph",children:"+"}),A.jsx("strong",{children:"Split ready"}),A.jsx("small",{children:"Open another terminal here"}),A.jsx("button",{type:"button",onClick:N,children:"Choose session"})]})]})}function Hd(R,N=[]){return{id:`ws-${crypto.randomUUID()}`,name:R,sessionIds:N}}function mp(){const[R,N]=ge.useState(()=>Km(xc())),z=R.appearance.theme,[B,re]=ge.useState([]),[ue,$]=ge.useState(()=>[Hd("Workspace")]),[u,f]=ge.useState(()=>ue[0]?.id??""),[d,b]=ge.useState(null),[h,v]=ge.useState("Ready"),[C,S]=ge.useState(!1),[p,o]=ge.useState(R.sessions.startSidebarCollapsed),[c,a]=ge.useState("terminals"),[l,_]=ge.useState(!1),[E,y]=ge.useState(!0),[w,m]=ge.useState(null),[D,q]=ge.useState(null),[I,K]=ge.useState(!1),[H,Q]=ge.useState(R.sessions.defaultLayout),[ce,G]=ge.useState(),[J,ee]=ge.useState(null),[T,k]=ge.useState("Workspace"),[x,O]=ge.useState("term"),[F,se]=ge.useState(""),[_e,ve]=ge.useState(""),[Y,L]=ge.useState(null),[te,fe]=ge.useState({status:"idle",sessionId:null}),[pe,me]=ge.useState(null),De=ge.useRef(null),je=ge.useRef(null),ze=ge.useRef(null),st=ge.useRef(void 0),[Ee,Ht]=ge.useState(!1),[ti,Mt]=ge.useState({status:"idle"}),ii=ge.useRef(null),_i=ge.useRef(void 0),[pt,at]=ge.useState([]),[gt,vi]=ge.useState(R.sessions.defaultBackend),[Ti,Et]=ge.useState(R.sessions.defaultWslDistribution),[Zi,Nt]=ge.useState([]),[yi,Pe]=ge.useState([]),[Ut,Lt]=ge.useState([]),[mi,wt]=ge.useState([]),[Mc,Nn]=ge.useState(!1),nl=Nr(()=>q(null)),Js=Nr(()=>L(null)),er=Nr(()=>K(!1)),tr=Nr(()=>_(!1)),Ri=Nr(()=>Ht(!1)),ir=Nr(()=>me(null)),$i=ge.useCallback((j,ae)=>{N(le=>{const de=Wm(le,j,ae);return Od(xc(),de),de})},[]),al=ge.useCallback(j=>{N(ae=>{const le=Vm(ae,j);return Od(xc(),le),le})},[]);ge.useEffect(()=>{document.documentElement.dataset.theme=z},[z]);const Ot=ge.useMemo(()=>ue.find(j=>j.id===u)??ue[0]??null,[ue,u]),Ue=ge.useMemo(()=>{if(!Ot)return B;const j=new Set(Ot.sessionIds),ae=B.filter(le=>j.has(le.id));if(Ot.id===ue[0]?.id){const le=new Set(ue.flatMap(ye=>ye.sessionIds)),de=B.filter(ye=>!le.has(ye.id));return[...new Map([...ae,...de].map(ye=>[ye.id,ye])).values()]}return ae},[Ot,B,ue]),si=ge.useCallback(async()=>{const j=mt();if(y(!0),m(null),!j){m("Preload API unavailable"),v("Preload API unavailable"),y(!1);return}try{const ae=await j.listSessions();re(ae),v(ae.length?`${ae.length} session${ae.length===1?"":"s"}`:"No sessions")}catch(ae){const le=ae instanceof Error?ae.message:String(ae);m(le),v(le)}finally{y(!1)}},[]);ge.useEffect(()=>{si()},[si]),ge.useEffect(()=>{const j=mt();j&&j.listBackends?.().then(at).catch(()=>at([]))},[]),ge.useEffect(()=>{if(gt!=="wsl"){Nt([]),Et("");return}const j=mt();j&&j.listWslDistributions?.().then(Nt).catch(()=>Nt([]))},[gt]),ge.useEffect(()=>{if(!l){Pe([]);return}const j=mt();j&&j.listHistory?.().then(Pe).catch(()=>Pe([]))},[l]),ge.useEffect(()=>{const j=mt(),ae=Xa((d?.kind==="ssh"?d.host:"")||(ce?B.find(de=>de.id===ce)?.host:"")||""),le=ae?Ut.filter(de=>Xa(de.hostName??"")===ae||de.alias===ae):[];if(le.length===0){wt([]);return}j?.discoverRemoteScreens&&(Nn(!0),Promise.allSettled(le.map(de=>j.discoverRemoteScreens(de))).then(de=>{const we=[];de.forEach((ye,xe)=>{ye.status==="fulfilled"&&Array.isArray(ye.value)&&ye.value.forEach(Je=>{we.push({session:Je,connection:le[xe]})})}),wt(we)}).catch(()=>wt([])).finally(()=>Nn(!1)))},[Ut,d?.host,B,ce]),ge.useEffect(()=>{const j=mt();j&&j.listKnownConnections?.().then(Lt).catch(()=>Lt([]))},[]),ge.useEffect(()=>{!d&&Ue.length&&b(Ue[0])},[d,Ue]),ge.useEffect(()=>{const j=ae=>{if(ae.key==="Escape"){if(te.status==="listening"){ae.preventDefault(),ct(),v("Voice cancelled");return}if(Ee){ae.preventDefault(),Ht(!1);return}if(pe){ae.preventDefault(),me(null);return}if(I){ae.preventDefault(),K(!1);return}if(Y){ae.preventDefault(),L(null);return}if(D){ae.preventDefault(),q(null);return}if(l){ae.preventDefault(),_(!1);return}}if(!(ae.ctrlKey||ae.metaKey)||!ae.shiftKey)return;const le=ae.key.toLowerCase();le==="o"&&(ae.preventDefault(),K(de=>!de)),le==="n"&&(ae.preventDefault(),k(Ac(ue)),q("workspace")),le==="t"&&(ae.preventDefault(),Qi("local")),le==="l"&&(ae.preventDefault(),ee(null),Q(de=>de==="stack"?"split-v":"stack")),le==="b"&&(ae.preventDefault(),o(de=>!de)),ae.code==="Comma"&&(ae.preventDefault(),Ht(de=>!de))};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)},[I,Y,D,l,Ee,pe,te.status,ue,Ot,Ue]);const sr=H==="stack"?1:H==="grid"?4:2,Mi=Ue.slice(0,4),jn=Math.max(sr,Mi.length),yt=Mi.some(j=>j.id===J)?J:null,qr=Mi.find(j=>j.id===d?.id)?.id??Mi[0]?.id,Ir=(j,ae)=>H==="stack"?j.id===qr:ae<sr,jt=async j=>{b(j),G(j.id);const ae=Mi.findIndex(le=>le.id===j.id);yt?ee(j.id):ae>=sr&&H!=="stack"&&Q("grid"),v(j.persistence==="process"?`${j.host} · ${j.name} · process only (install screen for persistence)`:`${j.host} · ${j.name}`),K(!1)},Wt=(j,ae=u)=>{$(le=>le.map(de=>de.id!==ae?{...de,sessionIds:de.sessionIds.filter(we=>we!==j.id)}:de.sessionIds.includes(j.id)?de:{...de,sessionIds:[...de.sessionIds,j.id]}))},Ci=async j=>{j.preventDefault();const ae=T.trim()||Ac(ue),le=Hd(ae);$(de=>[...de,le]),f(le.id),b(null),q(null),v(`Workspace “${ae}” ready`)},St=async j=>{j.preventDefault();const ae=mt();if(ae){if(Ue.length>=4){v("This workspace supports up to 4 sessions."),q(null);return}S(!0);try{const le=await ae.createLocalSession({name:x,backend:gt,wslDistribution:gt==="wsl"?Ti:void 0});re(de=>[...de.filter(we=>we.id!==le.id),le]),Wt(le),G(le.id),ee(null),Q(el(Ue.length+1)),q(null),await jt(le)}catch(le){v(le instanceof Error?le.message:String(le))}finally{S(!1)}}},Bt=async j=>{j.preventDefault();const ae=mt();if(ae){if(Ue.length>=4){v("This workspace supports up to 4 sessions."),q(null);return}S(!0);try{const le=await ae.createSshSession({name:F||void 0,target:_e});re(de=>[...de.filter(we=>we.id!==le.id),le]),Wt(le),G(le.id),ee(null),Q(el(Ue.length+1)),q(null),await jt(le)}catch(le){v(le instanceof Error?le.message:String(le))}finally{S(!1)}}},Li=async(j,ae)=>{try{const le=mt();if(!le)return;v(`Attaching to ${j.name} on ${ae.alias}…`);const we=(await le.buildRemoteScreenAttach?.(ae,j.screenName??j.name))?.args,ye=Array.isArray(we)?we.indexOf("--"):-1,xe=ye>0?we[ye-1]:ae.hostName??ae.alias,Je=await le.createSshSession({target:xe,name:j.name}),Ye=j.screenName??j.name,He={...Je,screenName:Ye,persistence:"screen",backend:"screen"};re(et=>et.some($e=>$e.id===He.id)?et.map($e=>$e.id===He.id?He:$e):[...et,He]),Wt(He),await jt(He),await le.attachSession(He.id);const ri=we&&ye>0?we.slice(ye+1).join(" "):`screen -x ${Ye}`;await rr(le,He.id),le.write(He.id,`${ri}\r`),await si(),v(`Connected to ${j.name} on ${ae.alias}`)}catch(le){v(le instanceof Error?le.message:String(le))}},rr=(j,ae)=>new Promise(le=>{let de=!1,we="",ye,xe;const Je=()=>{de||(de=!0,clearTimeout(ye),clearTimeout(Ye),xe?.(),le())},Ye=setTimeout(Je,dp);xe=j.onData((He,ri)=>{if(He===ae){if(we=(we+ri).slice(-512),vm(we)){Je();return}clearTimeout(ye),ye=setTimeout(Je,fp)}})}),zn=()=>{k(Ac(ue)),q("workspace")},Qi=(j,ae)=>{O(pp(Ot?.name??"term",Ue)),vi(Yd(R.sessions.defaultBackend,pt)),Et(R.sessions.defaultWslDistribution),ae?.sshTarget!==void 0&&ve(ae.sshTarget),q(j)},Ls=()=>Qi("local"),Os=()=>{const j=Xa((d?.kind==="ssh"?d.host:"")||(ce?B.find(xe=>xe.id===ce)?.host:"")||""),ae=j?mi.filter(xe=>Xa(xe.connection.hostName??"")===j||xe.connection.alias===j).reduce((xe,Je)=>{const Ye=Je.connection.hostName||Je.connection.alias;return(xe[Ye]=xe[Ye]||[]).push(Je),xe},{}):{},le=B.filter(xe=>xe.persistence==="screen"&&!Ue.some(Je=>Je.id===xe.id)),de=Object.keys(ae).length>0,we=le.length>0;if(!de&&!we)return A.jsxs("div",{className:"session-empty",children:[A.jsx("b",{children:"No screens"}),A.jsx("small",{children:j?"No remote screens found for this host.":"Open a remote session to discover screens, or start a local screen."})]});const ye=[];if(de)for(const[xe,Je]of Object.entries(ae)){const Ye=Je,He=A.jsx("div",{className:"session-group-label",children:xe},`${xe}-label`),ri=Ye.map(({session:et})=>{const Bs=Ye.find($e=>$e.session.id===et.id)?.connection;return A.jsx(Ja,{session:et,ghosted:!0,onClick:async()=>{if(!Bs)return;v(`Attaching ${et.name}…`);const $e=mt();if($e)try{const rs=(await $e.buildRemoteScreenAttach?.(Bs,et.screenName??et.name))?.args,ns=Array.isArray(rs)?rs.indexOf("--"):-1,as=ns>0?rs[ns-1]:Bs.hostName??Bs.alias,ni={...await $e.createSshSession({target:as,name:et.name}),screenName:et.screenName??et.name,persistence:"screen",backend:"screen"};re(Yr=>Yr.some(ks=>ks.id===ni.id)?Yr.map(ks=>ks.id===ni.id?ni:ks):[...Yr,ni]),Wt(ni),await jt(ni),await $e.attachSession(ni.id);const ls=rs&&ns>0?rs.slice(ns+1).join(" "):`screen -x ${et.screenName??et.name}`;await rr($e,ni.id),$e.write(ni.id,`${ls}\r`),await si(),v(`Connected to ${et.name}`)}catch(ss){v(ss instanceof Error?ss.message:String(ss))}}},et.id)});ye.push(He,...ri)}return we&&!de&&(ye.push(A.jsx("div",{className:"session-group-label",children:"local"},"local-label")),le.forEach(xe=>{ye.push(A.jsx(Ja,{session:xe,ghosted:!0,onClick:()=>{Wt(xe),jt(xe),v(`Reconnecting to ${xe.name}…`)}},xe.id))})),A.jsx(A.Fragment,{children:ye})},Gr=H==="split-v"?"pane-grid split-v":H==="split-h"?"pane-grid split-h":H==="grid"?"pane-grid grid":"pane-grid",Ji=j=>{G(j),ee(ae=>ae===j?null:j)},Oi=j=>{if(!yt||Ue.length<2)return;const le=(Ue.findIndex(we=>we.id===yt)+j+Ue.length)%Ue.length,de=Ue[le];G(de.id),b(de),ee(de.id)},es=()=>(je.current??=new hp({createWorker:()=>new Worker(new URL(""+new URL("voice-worker-DoNT0zEM.js",import.meta.url).href,import.meta.url),{type:"module"})}),je.current),ts=j=>{if(j.kind==="notice"){v(j.message);return}j.progress!==null&&v(`Loading speech model… ${Math.round(j.progress)}%`)},ct=()=>{window.clearTimeout(st.current),De.current?.cancel(),De.current=null,ze.current=null,fe({status:"idle",sessionId:null})},Pr=async()=>{const j=De.current,ae=ze.current;if(!j||!ae)return;window.clearTimeout(st.current),De.current=null,fe({status:"transcribing",sessionId:ae}),v("Transcribing…");const le=await j.stop();if(!le||Ed(le,R.speech.silenceThreshold)){ze.current=null,fe({status:"idle",sessionId:null}),v("Voice: no speech detected — lower the silence threshold in Settings if this is wrong");return}try{const de=await es().transcribe(le,R.speech,ts);if(ze.current=null,fe({status:"idle",sessionId:null}),!de.text){v("Voice: nothing transcribed");return}if(R.ai.voiceInsert==="review"){me({sessionId:ae,text:de.text}),v(`Voice: review "${de.text}"`);return}mt()?.write(ae,de.text),v(`Voice: "${de.text}"`)}catch(de){ze.current=null,fe({status:"idle",sessionId:null}),v(`Voice error: ${de instanceof Error?de.message:String(de)}`)}},Un=async j=>{if(te.status==="listening"&&te.sessionId===j.id){await Pr();return}if(te.status!=="idle")return;if(ti.status!=="idle"){v("The speech test in Settings is using the microphone");return}const ae=new wd;try{await ae.start()}catch(le){v(`Microphone unavailable: ${le instanceof Error?le.message:String(le)}`);return}De.current=ae,ze.current=j.id,fe({status:"listening",sessionId:j.id}),G(j.id),window.clearTimeout(st.current),st.current=window.setTimeout(()=>{Pr()},R.speech.maxUtteranceSeconds*1e3),v(`Listening on ${j.name}… click the mic again or press Esc to finish`)},Ei=async()=>{const j=ii.current;if(!j)return;window.clearTimeout(_i.current),ii.current=null,Mt({status:"transcribing",message:"Transcribing…",transcript:null,error:null});const ae=await j.stop();if(!ae){Mt({status:"idle",error:"Nothing was recorded."});return}const le=zd(ae),de=Ed(ae,R.speech.silenceThreshold);try{const we=await es().transcribe(ae,R.speech,ye=>{Mt(xe=>({...xe,message:ye.kind==="notice"?ye.message:ye.progress!==null?`Loading speech model… ${Math.round(ye.progress)}%`:"Loading speech model…"}))});Mt({status:"idle",transcript:we.text,elapsedMs:we.elapsedMs,level:le,message:de?"Below the silence threshold — a real recording at this level would have been discarded.":we.engine==="server"?"Transcribed by the local server.":"Transcribed by the built-in engine.",error:null})}catch(we){Mt({status:"idle",level:le,error:we instanceof Error?we.message:String(we)})}},is=async()=>{if(ti.status==="recording"){await Ei();return}if(ti.status==="transcribing")return;if(te.status!=="idle"){Mt({status:"idle",error:"A terminal pane is recording — stop that first."});return}const j=new wd;try{await j.start()}catch(ae){Mt({status:"idle",error:`Microphone unavailable: ${ae instanceof Error?ae.message:String(ae)}`});return}ii.current=j,Mt({status:"recording",message:"Listening… say a command, then stop.",transcript:null,error:null}),window.clearTimeout(_i.current),_i.current=window.setTimeout(()=>{Ei()},R.speech.maxUtteranceSeconds*1e3)};ge.useEffect(()=>()=>{window.clearTimeout(st.current),window.clearTimeout(_i.current),De.current?.cancel(),ii.current?.cancel(),je.current?.dispose()},[]);const ll=async j=>{te.sessionId===j.id&&ct();const ae=Ue.filter(de=>de.id!==j.id);$(de=>de.map(we=>({...we,sessionIds:we.sessionIds.filter(ye=>ye!==j.id)}))),d?.id===j.id&&b(ae[0]??null),ce===j.id&&G(ae[0]?.id),J===j.id&&ee(null),Q(el(ae.length));const le=mt();if(le)try{await le.closeSession(j.id)}catch(de){v(de instanceof Error?de.message:String(de));return}v(j.persistence==="screen"?`Closed ${j.name} · screen session survives`:j.kind==="ssh"?`Closed ${j.name} · SSH connection ended`:`Closed ${j.name} · process ended`),si()};return A.jsxs("main",{className:`app-shell ${p?"drawer-collapsed":""}`,children:[A.jsxs("header",{className:"window-bar",children:[A.jsxs("div",{className:"window-brand",children:[A.jsx("span",{className:"brand-mark",children:"ZG"}),A.jsx("span",{className:"brand-name",children:"ZeroG"})]}),A.jsx("div",{className:"workspace-tabs",children:ue.map(j=>A.jsxs("button",{type:"button",className:`workspace-tab ${j.id===Ot?.id?"active":""}`,onClick:()=>{f(j.id);const ae=B.find(le=>j.sessionIds.includes(le.id));b(ae??null),G(ae?.id)},children:[A.jsx("span",{className:"tab-dot"}),j.name,A.jsx("span",{className:"tab-meta",children:j.sessionIds.length||(j.id===ue[0]?.id?Ue.length:0)})]},j.id))}),A.jsxs("div",{className:"window-actions",children:[A.jsxs("button",{type:"button",className:"bar-button",onClick:()=>K(j=>!j),title:"Session overview (Ctrl+Shift+O)",children:[A.jsx(nt,{name:"grid"}),A.jsx("span",{children:"Overview"})]}),A.jsxs("button",{type:"button",className:"bar-button",onClick:zn,title:"New workspace (Ctrl+Shift+N)",children:[A.jsx(nt,{name:"plus"}),A.jsx("span",{children:"New"})]}),A.jsxs("button",{type:"button",className:"bar-button",onClick:async()=>{const j=mt();if(!j)return;const ae=await j.requestAiCommand();if(R.ai.requireApproval){L(ae);return}const le=d?.id??ce;if(!le){v("No terminal selected for the suggestion");return}j.write(le,`${ae.command}\r`),v(`Ran suggestion: ${ae.command}`)},children:[A.jsx(nt,{name:"spark"}),A.jsx("span",{children:"Suggest"})]}),A.jsx("button",{type:"button",className:"bar-button theme-button",onClick:()=>$i("appearance",{theme:z==="dark"?"light":"dark"}),title:`Switch to ${z==="dark"?"light":"dark"} theme`,"aria-label":`Switch to ${z==="dark"?"light":"dark"} theme`,"aria-pressed":z==="light",children:A.jsx(nt,{name:z==="dark"?"sun":"moon"})}),A.jsx("button",{type:"button",className:"avatar",title:"Settings (Ctrl+Shift+,)","aria-label":"Settings","aria-expanded":Ee,onClick:()=>Ht(!0),children:"S"})]})]}),A.jsxs("div",{className:"body-shell",children:[A.jsxs("nav",{className:"rail","aria-label":"Workspace navigation",children:[A.jsx("button",{type:"button",className:"rail-button",title:p?"Show sessions sidebar (Ctrl+Shift+B)":"Hide sessions sidebar (Ctrl+Shift+B)",onClick:()=>o(j=>!j),children:A.jsx(nt,{name:p?"panel-left-open":"panel-left"})}),A.jsx("button",{type:"button",className:`rail-button ${p?"":"active"}`,title:"Sessions",onClick:()=>o(!1),children:A.jsx(nt,{name:"sessions"})}),A.jsx("button",{type:"button",className:"rail-button",onClick:()=>K(!0),title:"Overview",children:A.jsx(nt,{name:"grid"})}),A.jsx("span",{className:"rail-spacer"}),A.jsx("button",{type:"button",className:"rail-button",onClick:()=>Qi("ssh"),title:"Connect SSH",children:A.jsx(nt,{name:"ssh"})}),A.jsx("button",{type:"button",className:`rail-button ${Ee?"active":""}`,title:"Settings (Ctrl+Shift+,)","aria-label":"Settings","aria-expanded":Ee,onClick:()=>Ht(j=>!j),children:A.jsx(nt,{name:"settings"})})]}),!p&&A.jsxs("aside",{className:"session-drawer",children:[A.jsxs("div",{className:"drawer-head",children:[A.jsxs("div",{children:[A.jsx("span",{className:"eyebrow",children:"WORKSPACE"}),A.jsx("h1",{children:Ot?.name??"Sessions"})]}),A.jsxs("div",{className:"drawer-head-actions",children:[A.jsx("button",{type:"button",className:"square-button",onClick:()=>o(!0),title:"Hide sessions sidebar",children:A.jsx(nt,{name:"panel-left"})}),A.jsx("button",{type:"button",className:"square-button history-button",onClick:()=>_(j=>!j),title:"Session history","aria-label":"Open session history","aria-expanded":l,children:A.jsx(nt,{name:"history"})}),A.jsx("button",{type:"button",className:"square-button",onClick:Ls,title:"New local terminal","aria-label":"New local terminal",children:A.jsx(nt,{name:"plus"})})]})]}),A.jsx("div",{className:"drawer-tools",role:"tablist","aria-label":"Session inventory",children:["terminals","screens","connections"].map(j=>{const ae={terminals:"Terminals",screens:"Screens",connections:"Connections"},le=j==="terminals"?Ue.length:j==="screens"?B.filter(de=>(de.persistence==="screen"||de.screenName)&&!Ue.some(we=>we.id===de.id)).length+mi.length:B.filter(de=>de.kind==="ssh").length;return A.jsxs("button",{type:"button",role:"tab","aria-selected":c===j,className:`drawer-tool ${c===j?"active":""}`,onClick:()=>a(j),children:[ae[j]," ",A.jsx("span",{children:le})]},j)})}),A.jsx("div",{className:"session-list",role:"tabpanel",children:E?A.jsxs("div",{className:"session-empty",children:[A.jsx("b",{children:"Loading sessions…"}),A.jsx("small",{children:"Checking available terminals and durable sessions."})]}):w?A.jsxs("div",{className:"session-empty session-error",children:[A.jsx("b",{children:"Session inventory unavailable"}),A.jsx("small",{children:w}),A.jsx("button",{type:"button",onClick:()=>{si()},children:"Retry"})]}):c==="terminals"?Ue.length?Ue.map(j=>A.jsx(Ja,{session:j,active:d?.id===j.id,onClick:()=>{jt(j)}},j.id)):A.jsxs("div",{className:"session-empty",children:[A.jsx("b",{children:"No terminals yet"}),A.jsx("small",{children:"Add a local terminal or SSH connection to this workspace."})]}):c==="screens"?Os():c==="connections"?Ut.length?Ut.map(j=>A.jsxs("button",{type:"button",className:"session-row",onClick:()=>Qi("ssh",{sshTarget:j.hostName??j.alias}),children:[A.jsx("span",{className:"status-dot"}),A.jsxs("span",{className:"session-copy",children:[A.jsx("b",{children:j.alias}),A.jsx("small",{children:j.hostName?`${j.user??""}${j.user?"@":""}${j.hostName}${j.port?`:${j.port}`:""}`:"Saved SSH connection"})]}),A.jsx("span",{className:"session-state",children:"→"})]},j.alias)):A.jsxs("div",{className:"session-empty",children:[A.jsx("b",{children:"No saved connections"}),A.jsx("small",{children:"Add Host entries to ~/.ssh/config to populate connections."})]}):B.filter(j=>j.kind==="ssh"&&j.scope==="remote"&&j.source==="discovered").length?B.filter(j=>j.kind==="ssh"&&j.scope==="remote"&&j.source==="discovered").map(j=>A.jsx(Ja,{session:j,ghosted:!0,onClick:async()=>{Wt(j),v(`Attaching remote screen ${j.name}…`);const ae=mt();if(ae)try{const de=(await ae.buildRemoteScreenAttach?.({alias:j.host,hostName:j.host},j.screenName??j.name))?.args?.find(ye=>ye.includes("@")||!ye.startsWith("-"))??j.host,we=await ae.createSshSession({target:de,name:j.name});re(ye=>ye.map(xe=>xe.id===j.id?we:xe)),await jt(we)}catch(le){v(le instanceof Error?le.message:String(le))}}},j.id)):A.jsxs("div",{className:"session-empty",children:[A.jsx("b",{children:"No remote screens"}),A.jsx("small",{children:"Remote screen sessions will appear here after discovery."})]})}),A.jsxs("div",{className:"drawer-bottom",children:[A.jsxs("button",{type:"button",className:"drawer-action",onClick:Ls,children:[A.jsx(nt,{name:"plus"})," Local terminal ",A.jsx("kbd",{children:"⌘⇧T"})]}),A.jsxs("button",{type:"button",className:"drawer-action",onClick:()=>Qi("ssh"),children:[A.jsx(nt,{name:"ssh"})," Connect SSH"]}),A.jsxs("div",{className:"drawer-status",children:[A.jsx("span",{className:"status-dot connected"}),h]})]})]}),A.jsxs("section",{className:"workspace",children:[A.jsxs("div",{className:"workspace-head",children:[A.jsxs("div",{className:"location",children:[p&&A.jsx("button",{type:"button",className:"inline-restore",onClick:()=>o(!1),title:"Show sessions sidebar",children:A.jsx(nt,{name:"panel-left-open"})}),A.jsx("span",{className:"connection-dot"}),A.jsx("span",{children:d?.host??"local"}),A.jsx("span",{className:"slash",children:"/"}),A.jsx("span",{children:d?.cwd??"~"}),A.jsx("span",{className:"slash",children:"/"}),A.jsx("span",{className:"muted-text",children:d?.name??Ot?.name??"no session"})]}),A.jsxs("div",{className:"layout-controls",children:[A.jsx("span",{className:"control-label",children:"LAYOUT"}),A.jsx("button",{type:"button",className:H==="stack"||yt?"layout-button active":"layout-button",onClick:()=>{if(yt)ee(null);else if(Ue.length>1){const j=ce??d?.id??Ue[0]?.id;j&&ee(j)}else Q("stack")},title:yt?"Restore panes":Ue.length>1?"Maximize focused pane":"Single pane",children:A.jsx(nt,{name:"stack"})}),A.jsx("button",{type:"button",className:H==="split-v"&&!yt?"layout-button active":"layout-button",onClick:()=>{ee(null),Q("split-v")},title:"Vertical split",children:A.jsx(nt,{name:"split-v"})}),A.jsx("button",{type:"button",className:H==="split-h"&&!yt?"layout-button active":"layout-button",onClick:()=>{ee(null),Q("split-h")},title:"Horizontal split",children:A.jsx(nt,{name:"split-h"})}),A.jsx("button",{type:"button",className:H==="grid"&&!yt?"layout-button active":"layout-button",onClick:()=>{ee(null),Q("grid")},title:"Four-pane grid",children:A.jsx(nt,{name:"grid"})})]})]}),A.jsx("div",{className:`${Gr} ${yt?"maximized-pane-grid":""}`,children:Array.from({length:jn},(j,ae)=>{const le=Mi[ae];if(!le)return A.jsx(vp,{index:ae+1,onCreate:Ls},ae);const de=te.sessionId===le.id&&te.status!=="idle"?te.status:null;return A.jsxs("article",{className:`pane terminal-pane ${ce===le.id?"focused":""} ${yt===le.id?"maximized-pane":""} ${Ir(le,ae)?"":"overflow-pane"}`,onMouseDown:()=>G(le.id),children:[A.jsxs("div",{className:"pane-title",children:[A.jsxs("span",{children:[A.jsx("span",{className:"pane-live"})," ",le.name]}),A.jsxs("span",{className:"pane-actions",children:[yt&&A.jsxs(A.Fragment,{children:[A.jsx("button",{type:"button",className:"pane-nav",onClick:()=>Oi(-1),title:"Previous session",children:A.jsx(nt,{name:"chevron-left"})}),A.jsx("button",{type:"button",className:"pane-nav",onClick:()=>Oi(1),title:"Next session",children:A.jsx(nt,{name:"chevron-right"})})]}),C?"connecting…":de?`${de}…`:le.kind==="ssh"?"ssh":"bash",A.jsx("button",{type:"button",className:de?`pane-mic ${de}`:"pane-mic",onClick:()=>{Un(le)},disabled:te.status!=="idle"&&!de,title:de==="listening"?"Stop and transcribe":de==="transcribing"?"Transcribing…":"Voice input","aria-label":de==="listening"?`Stop recording ${le.name}`:`Voice input for ${le.name}`,children:A.jsx(nt,{name:"mic"})}),A.jsx("button",{type:"button",className:"pane-maximize",onClick:()=>Ji(le.id),title:yt?"Restore pane":"Maximize pane",children:A.jsx(nt,{name:yt?"restore":"maximize"})}),A.jsx("button",{type:"button",className:"pane-close",onClick:()=>{ll(le)},title:"Close pane","aria-label":`Close ${le.name}`,children:A.jsx(nt,{name:"x"})})]})]}),A.jsx(_p,{sessionId:le.id,focused:ce===le.id,onStatus:v,appearance:R.appearance,terminalSettings:R.terminal})]},le.id)})}),A.jsxs("footer",{className:"status-bar",children:[A.jsx("span",{children:"ZeroG"}),A.jsx("span",{className:"status-separator"}),A.jsx("span",{children:Ot?.name??"Workspace"}),A.jsx("span",{className:"status-separator"}),A.jsx("span",{children:yt?"maximized pane":H==="stack"?"1 pane":`${sr} panes`}),A.jsx("span",{className:"status-separator"}),A.jsx("span",{children:"Esc closes overlays · ⌘⇧B sidebar"}),A.jsx("span",{className:"status-spacer"}),A.jsx("span",{children:d?`${d.kind==="ssh"?"SSH":d.persistence==="process"?"PROCESS":"SCREEN"} · ${d.persistence==="process"?"non-persistent":"persistent"}`:"no connection"})]})]})]}),I&&A.jsx("div",{className:"overview-layer",role:"presentation",...er,children:A.jsxs("section",{className:"overview",children:[A.jsxs("div",{className:"overview-head",children:[A.jsxs("div",{children:[A.jsx("span",{className:"eyebrow",children:"WORKSPACE OVERVIEW"}),A.jsx("h2",{children:Ot?.name??"Choose a session"})]}),A.jsx("button",{type:"button",className:"close-button",onClick:()=>K(!1),children:"Esc"})]}),A.jsx("div",{className:"thumbnail-grid",children:Ue.length?Ue.map(j=>A.jsxs("button",{type:"button",className:`thumbnail ${d?.id===j.id?"active":""}`,onClick:()=>{jt(j)},children:[A.jsxs("div",{className:"thumbnail-preview",children:[A.jsx("span",{className:"thumbnail-line cyan"}),A.jsx("span",{className:"thumbnail-line short"}),A.jsx("span",{className:"thumbnail-line green"}),A.jsx("span",{className:"thumbnail-cursor"})]}),A.jsxs("div",{className:"thumbnail-label",children:[A.jsx("b",{children:j.name}),A.jsxs("small",{children:[j.kind==="ssh"?j.host:"local screen"," · ",j.status]})]})]},j.id)):A.jsxs("div",{className:"overview-empty",children:[A.jsx("span",{children:"▦"}),A.jsx("b",{children:"No terminals in this workspace"}),A.jsx("small",{children:"Create a local terminal or connect over SSH."})]})}),A.jsxs("div",{className:"overview-foot",children:[A.jsx("button",{type:"button",onClick:()=>{K(!1),Ls()},children:"+ Local terminal"}),A.jsx("button",{type:"button",onClick:()=>{K(!1),Qi("ssh")},children:"Connect SSH"}),A.jsx("button",{type:"button",onClick:()=>{K(!1),zn()},children:"+ Workspace"}),A.jsx("span",{className:"overview-hint",children:"Press Esc to close"})]})]})}),l&&A.jsx("div",{className:"history-layer",role:"presentation",...tr,children:A.jsxs("div",{className:"history-popover",role:"dialog","aria-label":"Session history",children:[A.jsxs("div",{className:"history-head",children:[A.jsx("b",{children:"History"}),A.jsx("button",{type:"button",onClick:()=>_(!1),"aria-label":"Close history",children:"×"})]}),yi.length?yi.slice().sort((j,ae)=>ae.timestamp.localeCompare(j.timestamp)).map(j=>A.jsxs("button",{type:"button",className:"history-item",onClick:async()=>{_(!1);const ae=!!j.session.screenName,le=j.session.kind==="ssh"&&!ae;if(ae||j.session.backend==="screen"){a("screens");const de=j.session.screenName||j.session.name,we=B.find(Ye=>Ye.kind==="ssh"&&Ye.screenName===de),ye=B.find(Ye=>Ye.screenName===de&&Ye.kind==="local");if(we){Wt(we),await jt(we),v(`Reconnecting to ${we.name}…`);return}if(ye){Wt(ye),await jt(ye),v(`Reconnecting to ${ye.name}…`);return}const xe=mt();if(!xe)return;const Je=Ut.find(Ye=>(j.session.host||"").includes(Ye.hostName||Ye.alias)||(Ye.hostName||Ye.alias).includes(j.session.host||""));if(Je){await Li({...j.session,screenName:de,host:Je.hostName||Je.alias},Je);return}if(j.session.host){const Ye=j.session.host,He=await xe.createSshSession({target:Ye,name:j.session.name});re(et=>[...et,He]),Wt(He),G(He.id),ee(null),Q(el(Ue.length+1)),await jt(He);const ri=j.session.screenName||j.session.name;xe.write(He.id,`screen -x ${ri}\r`),v(`Connected to ${He.name}`)}return}if(le){const de=j.session.host||j.session.sshTarget||"",we=de.replace(/[^a-zA-Z0-9_.-]+/g,"-").slice(0,40);ve(de),se(j.session.name&&j.session.name!==we?j.session.name:"");const ye=mt();if(!ye)return;const xe=Ut.find(He=>de.includes(He.hostName||He.alias)||(He.hostName||He.alias).includes(de)),Je=j.session.name||we,Ye=await ye.createSshSession({target:de,name:Je});if(re(He=>[...He,Ye]),Wt(Ye),await jt(Ye),v(`Connected to ${Ye.name}`),ye.discoverRemoteScreens&&xe)try{const He=await ye.discoverRemoteScreens(xe);if(He.length){const ri=He.find(et=>et.status==="detached")??He[0];await Li(ri,xe);return}}catch{}return}a("terminals")},children:[A.jsxs("span",{className:"history-main",children:[A.jsx("span",{className:"history-kind",children:j.event.toUpperCase()}),A.jsxs("span",{className:"history-text",children:[A.jsx("b",{children:j.session.name}),A.jsxs("small",{children:[j.session.host," · ",j.available?"available":"unavailable"]})]})]}),A.jsx("button",{type:"button",className:"history-remove","aria-label":"Remove history entry",onClick:ae=>{ae.stopPropagation(),mt()?.removeHistory(j.id).then(()=>Pe(le=>le.filter(de=>de.id!==j.id))).catch(()=>{})},children:"×"})]},j.id)):A.jsx("p",{className:"history-empty",children:"No history entries yet."}),A.jsx("small",{className:"history-note",children:"Persisted session lifecycle from the main process."})]})}),D&&A.jsx("div",{className:"modal-layer",role:"presentation",...nl,children:A.jsxs("form",{className:"modal-card",onSubmit:D==="workspace"?Ci:D==="local"?St:Bt,children:[A.jsxs("div",{className:"modal-head",children:[A.jsxs("div",{children:[A.jsx("span",{className:"eyebrow",children:wc(D).eyebrow}),A.jsx("h2",{children:wc(D).title})]}),A.jsx("button",{type:"button",className:"close-button",onClick:()=>q(null),children:"Esc"})]}),Bd(D)&&A.jsx("div",{className:"dialog-tabs",role:"tablist","aria-label":"Session type",children:$s.map(j=>A.jsxs("button",{type:"button",id:`session-tab-${j.kind}`,role:"tab","aria-selected":D===j.kind,"aria-controls":"session-dialog-panel",tabIndex:D===j.kind?0:-1,disabled:C,className:`dialog-tab ${D===j.kind?"active":""}`,onClick:()=>q(j.kind),onKeyDown:ae=>{const le=Jm(j.kind,ae.key);le&&(ae.preventDefault(),q(le),document.getElementById(`session-tab-${le}`)?.focus())},children:[A.jsx("b",{children:j.label}),A.jsx("small",{children:j.hint})]},j.kind))}),D==="workspace"&&A.jsxs(A.Fragment,{children:[A.jsx("p",{children:"Create a separate workspace for a project or host group. Terminals stay scoped to the active workspace."}),A.jsxs("label",{children:["Workspace name",A.jsx("input",{autoFocus:!0,value:T,onChange:j=>k(j.target.value),pattern:"[A-Za-z0-9](?:[A-Za-z0-9_.]|-| ){0,48}",required:!0})]})]}),Bd(D)&&A.jsxs("div",{id:"session-dialog-panel",role:"tabpanel","aria-labelledby":`session-tab-${D}`,children:[D==="local"&&A.jsxs(A.Fragment,{children:[A.jsxs("p",{children:["Start a local session inside “",Ot?.name??"this workspace","”."]}),A.jsxs("label",{children:["Terminal name",A.jsx("input",{autoFocus:!0,value:x,onChange:j=>O(j.target.value),pattern:"[A-Za-z0-9](?:[A-Za-z0-9_.]|-){0,48}",required:!0})]}),A.jsxs("label",{children:["Shell backend",A.jsx("select",{value:gt,onChange:j=>{const ae=j.target.value;vi(ae)},children:pt.length?pt.map(j=>A.jsx("option",{value:j.backend,children:j.label},j.backend)):A.jsx("option",{value:"bash",children:"bash"})})]}),gt==="wsl"&&A.jsxs("label",{children:["WSL distribution",A.jsx("input",{value:Ti,onChange:j=>Et(j.target.value),placeholder:"Ubuntu"})]})]}),D==="ssh"&&A.jsxs(A.Fragment,{children:[A.jsxs("p",{children:["Connect a remote host into “",Ot?.name??"this workspace","”."]}),A.jsxs("label",{children:["SSH target",A.jsx("input",{autoFocus:!0,value:_e,onChange:j=>ve(j.target.value),placeholder:"user@server:22",required:!0})]}),A.jsxs("label",{children:["Session label ",A.jsx("span",{className:"muted-text",children:"optional"}),A.jsx("input",{value:F,onChange:j=>se(j.target.value),placeholder:"server"})]})]})]}),A.jsxs("div",{className:"modal-actions",children:[A.jsx("button",{type:"button",onClick:()=>q(null),children:"Cancel"}),A.jsx("button",{className:"primary-button",disabled:C,type:"submit",children:C?"Working…":wc(D).submit})]})]})}),Ee&&A.jsx($m,{settings:R,onChange:$i,onReset:al,onClose:()=>Ht(!1),backdrop:Ri,backends:pt,wslDistributions:Zi,speechTest:ti,onSpeechTest:()=>{is()}}),pe&&A.jsx("div",{className:"modal-layer",role:"presentation",...ir,children:A.jsxs("div",{className:"modal-card approval-card",children:[A.jsxs("div",{className:"modal-head",children:[A.jsxs("div",{children:[A.jsx("span",{className:"eyebrow",children:"VOICE"}),A.jsx("h2",{children:"Insert transcript?"})]}),A.jsx("button",{type:"button",className:"close-button",onClick:()=>me(null),children:"Esc"})]}),A.jsx("p",{children:"Review mode is on, so nothing has been typed yet. Inserting does not press Enter."}),A.jsx("code",{children:pe.text}),A.jsxs("div",{className:"modal-actions",children:[A.jsx("button",{type:"button",onClick:()=>me(null),children:"Discard"}),A.jsx("button",{type:"button",className:"primary-button",onClick:()=>{mt()?.write(pe.sessionId,pe.text),v(`Voice: "${pe.text}"`),me(null)},children:"Insert"})]})]})}),Y&&A.jsx("div",{className:"modal-layer",role:"presentation",...Js,children:A.jsxs("div",{className:"modal-card approval-card",children:[A.jsxs("div",{className:"modal-head",children:[A.jsxs("div",{children:[A.jsx("span",{className:"eyebrow warning-text",children:"APPROVAL REQUIRED"}),A.jsx("h2",{children:"Run suggestion?"})]}),A.jsx("button",{type:"button",className:"close-button",onClick:()=>L(null),children:"Esc"})]}),A.jsx("p",{children:Y.explanation}),A.jsx("code",{children:Y.command}),A.jsxs("div",{className:"modal-actions",children:[A.jsx("button",{type:"button",onClick:()=>L(null),children:"Cancel"}),A.jsx("button",{type:"button",className:"primary-button",onClick:()=>{d&&mt()?.write(d.id,`${Y.command}\r`),L(null)},children:"Approve & run"})]})]})})]})}function Nd(R){return R==="light"?{background:"#f7f9fc",foreground:"#253044",cursor:"#16803c",selectionBackground:"#cbdcf5",green:"#16803c",yellow:"#a15c00",red:"#c53030",blue:"#2459a6",cyan:"#087f8c"}:{background:"#0a0c10",foreground:"#d8dee9",cursor:"#9ece6a",selectionBackground:"#334155",green:"#9ece6a",yellow:"#e0af68",red:"#f7768e",blue:"#7aa2f7",cyan:"#7dcfff"}}function Ac(R){let N=R.length+1;const z=new Set(R.map(B=>B.name.toLowerCase()));for(;z.has(`workspace ${N}`);)N+=1;return`Workspace ${N}`}function pp(R,N){const z=R.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,24)||"term",B=new Set(N.map(ue=>ue.name.toLowerCase()));if(!B.has(z))return z;let re=2;for(;B.has(`${z}-${re}`);)re+=1;return`${z}-${re}`}function el(R){return R<=1?"stack":R===2?"split-v":"grid"}nm.createRoot(document.getElementById("root")).render(A.jsx(mp,{}));
|