tono 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/server/agents/claude-code.js +53 -2
- package/dist/server/agents/claude-code.js.map +1 -1
- package/dist/server/agents/types.js.map +1 -1
- package/dist/server/app.js +46 -2
- package/dist/server/app.js.map +1 -1
- package/dist/server/worker/agent.js +43 -1
- package/dist/server/worker/agent.js.map +1 -1
- package/dist/server/workers/registry.js +23 -0
- package/dist/server/workers/registry.js.map +1 -1
- package/dist/server/workers/scheduler.js +21 -1
- package/dist/server/workers/scheduler.js.map +1 -1
- package/dist/server/ws/workers.js +8 -2
- package/dist/server/ws/workers.js.map +1 -1
- package/dist/shared/worker-protocol.js.map +1 -1
- package/dist/web/assets/{index-0idS-FGA.js → index-B-huT_Di.js} +22 -22
- package/dist/web/assets/index-BX3Gkspr.css +1 -0
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/index-BZZmYvK2.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){const Y=document.createElement("link").relList;if(Y&&Y.supports&&Y.supports("modulepreload"))return;for(const Z of document.querySelectorAll('link[rel="modulepreload"]'))j(Z);new MutationObserver(Z=>{for(const
|
|
1
|
+
(function(){const Y=document.createElement("link").relList;if(Y&&Y.supports&&Y.supports("modulepreload"))return;for(const Z of document.querySelectorAll('link[rel="modulepreload"]'))j(Z);new MutationObserver(Z=>{for(const ie of Z)if(ie.type==="childList")for(const P of ie.addedNodes)P.tagName==="LINK"&&P.rel==="modulepreload"&&j(P)}).observe(document,{childList:!0,subtree:!0});function W(Z){const ie={};return Z.integrity&&(ie.integrity=Z.integrity),Z.referrerPolicy&&(ie.referrerPolicy=Z.referrerPolicy),Z.crossOrigin==="use-credentials"?ie.credentials="include":Z.crossOrigin==="anonymous"?ie.credentials="omit":ie.credentials="same-origin",ie}function j(Z){if(Z.ep)return;Z.ep=!0;const ie=W(Z);fetch(Z.href,ie)}})();var Do={exports:{}},Zr={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var Pd;function Tv(){if(Pd)return Zr;Pd=1;var B=Symbol.for("react.transitional.element"),Y=Symbol.for("react.fragment");function W(j,Z,ie){var P=null;if(ie!==void 0&&(P=""+ie),Z.key!==void 0&&(P=""+Z.key),"key"in Z){ie={};for(var n in Z)n!=="key"&&(ie[n]=Z[n])}else ie=Z;return Z=ie.ref,{$$typeof:B,type:j,key:P,ref:Z!==void 0?Z:null,props:ie}}return Zr.Fragment=Y,Zr.jsx=W,Zr.jsxs=W,Zr}var Fd;function Mv(){return Fd||(Fd=1,Do.exports=Tv()),Do.exports}var A=Mv(),To={exports:{}},we={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var qd;function Bv(){if(qd)return we;qd=1;var B=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),W=Symbol.for("react.fragment"),j=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),ie=Symbol.for("react.consumer"),P=Symbol.for("react.context"),n=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),_=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),l=Symbol.for("react.activity"),g=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=g&&D[g]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},d=Object.assign,r={};function h(D,z,V){this.props=D,this.context=z,this.refs=r,this.updater=V||y}h.prototype.isReactComponent={},h.prototype.setState=function(D,z){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,z,"setState")},h.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function o(){}o.prototype=h.prototype;function c(D,z,V){this.props=D,this.context=z,this.refs=r,this.updater=V||y}var m=c.prototype=new o;m.constructor=c,d(m,h.prototype),m.isPureReactComponent=!0;var C=Array.isArray;function S(){}var w={H:null,A:null,T:null,S:null},p=Object.prototype.hasOwnProperty;function x(D,z,V){var J=V.ref;return{$$typeof:B,type:D,key:z,ref:J!==void 0?J:null,props:V}}function L(D,z){return x(D.type,z,D.props)}function O(D){return typeof D=="object"&&D!==null&&D.$$typeof===B}function T(D){var z={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(V){return z[V]})}var M=/\/+/g;function U(D,z){return typeof D=="object"&&D!==null&&D.key!=null?T(""+D.key):z.toString(36)}function K(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(S,S):(D.status="pending",D.then(function(z){D.status==="pending"&&(D.status="fulfilled",D.value=z)},function(z){D.status==="pending"&&(D.status="rejected",D.reason=z)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function I(D,z,V,J,he){var ue=typeof D;(ue==="undefined"||ue==="boolean")&&(D=null);var $=!1;if(D===null)$=!0;else switch(ue){case"bigint":case"string":case"number":$=!0;break;case"object":switch(D.$$typeof){case B:case Y:$=!0;break;case v:return $=D._init,I($(D._payload),z,V,J,he)}}if($)return he=he(D),$=J===""?"."+U(D,0):J,C(he)?(V="",$!=null&&(V=$.replace(M,"$&/")+"/"),I(he,z,V,"",function(re){return re})):he!=null&&(O(he)&&(he=L(he,V+(he.key==null||D&&D.key===he.key?"":(""+he.key).replace(M,"$&/")+"/")+$)),z.push(he)),1;$=0;var N=J===""?".":J+":";if(C(D))for(var ne=0;ne<D.length;ne++)J=D[ne],ue=N+U(J,ne),$+=I(J,z,V,ue,he);else if(ne=b(D),typeof ne=="function")for(D=ne.call(D),ne=0;!(J=D.next()).done;)J=J.value,ue=N+U(J,ne++),$+=I(J,z,V,ue,he);else if(ue==="object"){if(typeof D.then=="function")return I(K(D),z,V,J,he);throw z=String(D),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return $}function q(D,z,V){if(D==null)return D;var J=[],he=0;return I(D,J,"","",function(ue){return z.call(V,ue,he++)}),J}function F(D){if(D._status===-1){var z=D._result;z=z(),z.then(function(V){(D._status===0||D._status===-1)&&(D._status=1,D._result=V)},function(V){(D._status===0||D._status===-1)&&(D._status=2,D._result=V)}),D._status===-1&&(D._status=0,D._result=z)}if(D._status===1)return D._result.default;throw D._result}var R=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},H={map:q,forEach:function(D,z,V){q(D,function(){z.apply(this,arguments)},V)},count:function(D){var z=0;return q(D,function(){z++}),z},toArray:function(D){return q(D,function(z){return z})||[]},only:function(D){if(!O(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return we.Activity=l,we.Children=H,we.Component=h,we.Fragment=W,we.Profiler=Z,we.PureComponent=c,we.StrictMode=j,we.Suspense=u,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,we.__COMPILER_RUNTIME={__proto__:null,c:function(D){return w.H.useMemoCache(D)}},we.cache=function(D){return function(){return D.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(D,z,V){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var J=d({},D.props),he=D.key;if(z!=null)for(ue in z.key!==void 0&&(he=""+z.key),z)!p.call(z,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&z.ref===void 0||(J[ue]=z[ue]);var ue=arguments.length-2;if(ue===1)J.children=V;else if(1<ue){for(var $=Array(ue),N=0;N<ue;N++)$[N]=arguments[N+2];J.children=$}return x(D.type,he,J)},we.createContext=function(D){return D={$$typeof:P,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:ie,_context:D},D},we.createElement=function(D,z,V){var J,he={},ue=null;if(z!=null)for(J in z.key!==void 0&&(ue=""+z.key),z)p.call(z,J)&&J!=="key"&&J!=="__self"&&J!=="__source"&&(he[J]=z[J]);var $=arguments.length-2;if($===1)he.children=V;else if(1<$){for(var N=Array($),ne=0;ne<$;ne++)N[ne]=arguments[ne+2];he.children=N}if(D&&D.defaultProps)for(J in $=D.defaultProps,$)he[J]===void 0&&(he[J]=$[J]);return x(D,ue,he)},we.createRef=function(){return{current:null}},we.forwardRef=function(D){return{$$typeof:n,render:D}},we.isValidElement=O,we.lazy=function(D){return{$$typeof:v,_payload:{_status:-1,_result:D},_init:F}},we.memo=function(D,z){return{$$typeof:_,type:D,compare:z===void 0?null:z}},we.startTransition=function(D){var z=w.T,V={};w.T=V;try{var J=D(),he=w.S;he!==null&&he(V,J),typeof J=="object"&&J!==null&&typeof J.then=="function"&&J.then(S,R)}catch(ue){R(ue)}finally{z!==null&&V.types!==null&&(z.types=V.types),w.T=z}},we.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},we.use=function(D){return w.H.use(D)},we.useActionState=function(D,z,V){return w.H.useActionState(D,z,V)},we.useCallback=function(D,z){return w.H.useCallback(D,z)},we.useContext=function(D){return w.H.useContext(D)},we.useDebugValue=function(){},we.useDeferredValue=function(D,z){return w.H.useDeferredValue(D,z)},we.useEffect=function(D,z){return w.H.useEffect(D,z)},we.useEffectEvent=function(D){return w.H.useEffectEvent(D)},we.useId=function(){return w.H.useId()},we.useImperativeHandle=function(D,z,V){return w.H.useImperativeHandle(D,z,V)},we.useInsertionEffect=function(D,z){return w.H.useInsertionEffect(D,z)},we.useLayoutEffect=function(D,z){return w.H.useLayoutEffect(D,z)},we.useMemo=function(D,z){return w.H.useMemo(D,z)},we.useOptimistic=function(D,z){return w.H.useOptimistic(D,z)},we.useReducer=function(D,z,V){return w.H.useReducer(D,z,V)},we.useRef=function(D){return w.H.useRef(D)},we.useState=function(D){return w.H.useState(D)},we.useSyncExternalStore=function(D,z,V){return w.H.useSyncExternalStore(D,z,V)},we.useTransition=function(){return w.H.useTransition()},we.version="19.2.6",we}var $d;function $o(){return $d||($d=1,To.exports=Bv()),To.exports}var de=$o(),Mo={exports:{}},Jr={},Bo={exports:{}},Oo={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Wd;function
|
|
25
|
+
*/var Wd;function Ov(){return Wd||(Wd=1,(function(B){function Y(I,q){var F=I.length;I.push(q);e:for(;0<F;){var R=F-1>>>1,H=I[R];if(0<Z(H,q))I[R]=q,I[F]=H,F=R;else break e}}function W(I){return I.length===0?null:I[0]}function j(I){if(I.length===0)return null;var q=I[0],F=I.pop();if(F!==q){I[0]=F;e:for(var R=0,H=I.length,D=H>>>1;R<D;){var z=2*(R+1)-1,V=I[z],J=z+1,he=I[J];if(0>Z(V,F))J<H&&0>Z(he,V)?(I[R]=he,I[J]=F,R=J):(I[R]=V,I[z]=F,R=z);else if(J<H&&0>Z(he,F))I[R]=he,I[J]=F,R=J;else break e}}return q}function Z(I,q){var F=I.sortIndex-q.sortIndex;return F!==0?F:I.id-q.id}if(B.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var ie=performance;B.unstable_now=function(){return ie.now()}}else{var P=Date,n=P.now();B.unstable_now=function(){return P.now()-n}}var u=[],_=[],v=1,l=null,g=3,b=!1,y=!1,d=!1,r=!1,h=typeof setTimeout=="function"?setTimeout:null,o=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;function m(I){for(var q=W(_);q!==null;){if(q.callback===null)j(_);else if(q.startTime<=I)j(_),q.sortIndex=q.expirationTime,Y(u,q);else break;q=W(_)}}function C(I){if(d=!1,m(I),!y)if(W(u)!==null)y=!0,S||(S=!0,T());else{var q=W(_);q!==null&&K(C,q.startTime-I)}}var S=!1,w=-1,p=5,x=-1;function L(){return r?!0:!(B.unstable_now()-x<p)}function O(){if(r=!1,S){var I=B.unstable_now();x=I;var q=!0;try{e:{y=!1,d&&(d=!1,o(w),w=-1),b=!0;var F=g;try{t:{for(m(I),l=W(u);l!==null&&!(l.expirationTime>I&&L());){var R=l.callback;if(typeof R=="function"){l.callback=null,g=l.priorityLevel;var H=R(l.expirationTime<=I);if(I=B.unstable_now(),typeof H=="function"){l.callback=H,m(I),q=!0;break t}l===W(u)&&j(u),m(I)}else j(u);l=W(u)}if(l!==null)q=!0;else{var D=W(_);D!==null&&K(C,D.startTime-I),q=!1}}break e}finally{l=null,g=F,b=!1}q=void 0}}finally{q?T():S=!1}}}var T;if(typeof c=="function")T=function(){c(O)};else if(typeof MessageChannel<"u"){var M=new MessageChannel,U=M.port2;M.port1.onmessage=O,T=function(){U.postMessage(null)}}else T=function(){h(O,0)};function K(I,q){w=h(function(){I(B.unstable_now())},q)}B.unstable_IdlePriority=5,B.unstable_ImmediatePriority=1,B.unstable_LowPriority=4,B.unstable_NormalPriority=3,B.unstable_Profiling=null,B.unstable_UserBlockingPriority=2,B.unstable_cancelCallback=function(I){I.callback=null},B.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):p=0<I?Math.floor(1e3/I):5},B.unstable_getCurrentPriorityLevel=function(){return g},B.unstable_next=function(I){switch(g){case 1:case 2:case 3:var q=3;break;default:q=g}var F=g;g=q;try{return I()}finally{g=F}},B.unstable_requestPaint=function(){r=!0},B.unstable_runWithPriority=function(I,q){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var F=g;g=I;try{return q()}finally{g=F}},B.unstable_scheduleCallback=function(I,q,F){var R=B.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?R+F:R):F=R,I){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=F+H,I={id:v++,callback:q,priorityLevel:I,startTime:F,expirationTime:H,sortIndex:-1},F>R?(I.sortIndex=F,Y(_,I),W(u)===null&&I===W(_)&&(d?(o(w),w=-1):d=!0,K(C,F-R))):(I.sortIndex=H,Y(u,I),y||b||(y=!0,S||(S=!0,T()))),I},B.unstable_shouldYield=L,B.unstable_wrapCallback=function(I){var q=g;return function(){var F=g;g=q;try{return I.apply(this,arguments)}finally{g=F}}}})(Oo)),Oo}var Gd;function kv(){return Gd||(Gd=1,Bo.exports=Ov()),Bo.exports}var ko={exports:{}},yt={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var Yd;function zv(){if(Yd)return yt;Yd=1;var B=$o();function Y(u){var _="https://react.dev/errors/"+u;if(1<arguments.length){_+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)_+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+u+"; visit "+_+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function W(){}var j={d:{f:W,r:function(){throw Error(Y(522))},D:W,C:W,L:W,m:W,X:W,S:W,M:W},p:0,findDOMNode:null},Z=Symbol.for("react.portal");function ie(u,_,v){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Z,key:l==null?null:""+l,children:u,containerInfo:_,implementation:v}}var P=B.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function n(u,_){if(u==="font")return"";if(typeof _=="string")return _==="use-credentials"?_:""}return yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=j,yt.createPortal=function(u,_){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!_||_.nodeType!==1&&_.nodeType!==9&&_.nodeType!==11)throw Error(Y(299));return ie(u,_,null,v)},yt.flushSync=function(u){var _=P.T,v=j.p;try{if(P.T=null,j.p=2,u)return u()}finally{P.T=_,j.p=v,j.d.f()}},yt.preconnect=function(u,_){typeof u=="string"&&(_?(_=_.crossOrigin,_=typeof _=="string"?_==="use-credentials"?_:"":void 0):_=null,j.d.C(u,_))},yt.prefetchDNS=function(u){typeof u=="string"&&j.d.D(u)},yt.preinit=function(u,_){if(typeof u=="string"&&_&&typeof _.as=="string"){var v=_.as,l=n(v,_.crossOrigin),g=typeof _.integrity=="string"?_.integrity:void 0,b=typeof _.fetchPriority=="string"?_.fetchPriority:void 0;v==="style"?j.d.S(u,typeof _.precedence=="string"?_.precedence:void 0,{crossOrigin:l,integrity:g,fetchPriority:b}):v==="script"&&j.d.X(u,{crossOrigin:l,integrity:g,fetchPriority:b,nonce:typeof _.nonce=="string"?_.nonce:void 0})}},yt.preinitModule=function(u,_){if(typeof u=="string")if(typeof _=="object"&&_!==null){if(_.as==null||_.as==="script"){var v=n(_.as,_.crossOrigin);j.d.M(u,{crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0})}}else _==null&&j.d.M(u)},yt.preload=function(u,_){if(typeof u=="string"&&typeof _=="object"&&_!==null&&typeof _.as=="string"){var v=_.as,l=n(v,_.crossOrigin);j.d.L(u,v,{crossOrigin:l,integrity:typeof _.integrity=="string"?_.integrity:void 0,nonce:typeof _.nonce=="string"?_.nonce:void 0,type:typeof _.type=="string"?_.type:void 0,fetchPriority:typeof _.fetchPriority=="string"?_.fetchPriority:void 0,referrerPolicy:typeof _.referrerPolicy=="string"?_.referrerPolicy:void 0,imageSrcSet:typeof _.imageSrcSet=="string"?_.imageSrcSet:void 0,imageSizes:typeof _.imageSizes=="string"?_.imageSizes:void 0,media:typeof _.media=="string"?_.media:void 0})}},yt.preloadModule=function(u,_){if(typeof u=="string")if(_){var v=n(_.as,_.crossOrigin);j.d.m(u,{as:typeof _.as=="string"&&_.as!=="script"?_.as:void 0,crossOrigin:v,integrity:typeof _.integrity=="string"?_.integrity:void 0})}else j.d.m(u)},yt.requestFormReset=function(u){j.d.r(u)},yt.unstable_batchedUpdates=function(u,_){return u(_)},yt.useFormState=function(u,_,v){return P.H.useFormState(u,_,v)},yt.useFormStatus=function(){return P.H.useHostTransitionStatus()},yt.version="19.2.6",yt}var Xd;function Nv(){if(Xd)return ko.exports;Xd=1;function B(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(B)}catch(Y){console.error(Y)}}return B(),ko.exports=zv(),ko.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,23 +38,23 @@
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var
|
|
41
|
+
*/var Vd;function Hv(){if(Vd)return Jr;Vd=1;var B=kv(),Y=$o(),W=Nv();function j(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 Z(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ie(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function P(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function n(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 u(e){if(ie(e)!==e)throw Error(j(188))}function _(e){var t=e.alternate;if(!t){if(t=ie(e),t===null)throw Error(j(188));return t!==e?null:e}for(var i=e,s=t;;){var a=i.return;if(a===null)break;var f=a.alternate;if(f===null){if(s=a.return,s!==null){i=s;continue}break}if(a.child===f.child){for(f=a.child;f;){if(f===i)return u(a),e;if(f===s)return u(a),t;f=f.sibling}throw Error(j(188))}if(i.return!==s.return)i=a,s=f;else{for(var E=!1,k=a.child;k;){if(k===i){E=!0,i=a,s=f;break}if(k===s){E=!0,s=a,i=f;break}k=k.sibling}if(!E){for(k=f.child;k;){if(k===i){E=!0,i=f,s=a;break}if(k===s){E=!0,s=f,i=a;break}k=k.sibling}if(!E)throw Error(j(189))}}if(i.alternate!==s)throw Error(j(190))}if(i.tag!==3)throw Error(j(188));return i.stateNode.current===i?e:t}function v(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=v(e),t!==null)return t;e=e.sibling}return null}var l=Object.assign,g=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),S=Symbol.for("react.suspense_list"),w=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),O=Symbol.iterator;function T(e){return e===null||typeof e!="object"?null:(e=O&&e[O]||e["@@iterator"],typeof e=="function"?e:null)}var M=Symbol.for("react.client.reference");function U(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===M?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case d:return"Fragment";case h:return"Profiler";case r:return"StrictMode";case C:return"Suspense";case S:return"SuspenseList";case x:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case y:return"Portal";case c:return e.displayName||"Context";case o:return(e._context.displayName||"Context")+".Consumer";case m: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:U(e.type)||"Memo";case p:t=e._payload,e=e._init;try{return U(e(t))}catch{}}return null}var K=Array.isArray,I=Y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=W.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},R=[],H=-1;function D(e){return{current:e}}function z(e){0>H||(e.current=R[H],R[H]=null,H--)}function V(e,t){H++,R[H]=e.current,e.current=t}var J=D(null),he=D(null),ue=D(null),$=D(null);function N(e,t){switch(V(ue,t),V(he,e),V(J,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?hd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=hd(t),e=ud(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}z(J),V(J,e)}function ne(){z(J),z(he),z(ue)}function re(e){e.memoizedState!==null&&V($,e);var t=J.current,i=ud(t,e.type);t!==i&&(V(he,e),V(J,i))}function _e(e){he.current===e&&(z(J),z(he)),$.current===e&&(z($),Xr._currentValue=F)}var fe,xe;function pe(e){if(fe===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);fe=t&&t[1]||"",xe=-1<i.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+fe+e+xe}var Ne=!1;function Qe(e,t){if(!e||Ne)return"";Ne=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ae){var
|
|
43
|
+
`+fe+e+xe}var Ne=!1;function Qe(e,t){if(!e||Ne)return"";Ne=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var s={DetermineComponentFrameRoot:function(){try{if(t){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(ae){var se=ae}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(ae){se=ae}e.call(ce.prototype)}}else{try{throw Error()}catch(ae){se=ae}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(ae){if(ae&&se&&typeof ae.stack=="string")return[ae.stack,se.stack]}return[null,null]}};s.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(s.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(s.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=s.DetermineComponentFrameRoot(),E=f[0],k=f[1];if(E&&k){var G=E.split(`
|
|
44
44
|
`),te=k.split(`
|
|
45
|
-
`);for(a=s=0;s
|
|
46
|
-
|
|
45
|
+
`);for(a=s=0;s<G.length&&!G[s].includes("DetermineComponentFrameRoot");)s++;for(;a<te.length&&!te[a].includes("DetermineComponentFrameRoot");)a++;if(s===G.length||a===te.length)for(s=G.length-1,a=te.length-1;1<=s&&0<=a&&G[s]!==te[a];)a--;for(;1<=s&&0<=a;s--,a--)if(G[s]!==te[a]){if(s!==1||a!==1)do if(s--,a--,0>a||G[s]!==te[a]){var le=`
|
|
46
|
+
`+G[s].replace(" at new "," at ");return e.displayName&&le.includes("<anonymous>")&&(le=le.replace("<anonymous>",e.displayName)),le}while(1<=s&&0<=a);break}}}finally{Ne=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?pe(i):""}function be(e,t){switch(e.tag){case 26:case 27:case 5:return pe(e.type);case 16:return pe("Lazy");case 13:return e.child!==t&&t!==null?pe("Suspense Fallback"):pe("Suspense");case 19:return pe("SuspenseList");case 0:case 15:return Qe(e.type,!1);case 11:return Qe(e.type.render,!1);case 1:return Qe(e.type,!0);case 31:return pe("Activity");default:return""}}function Bt(e){try{var t="",i=null;do t+=be(e,i),i=e,e=e.return;while(e);return t}catch(s){return`
|
|
47
47
|
Error generating stack: `+s.message+`
|
|
48
|
-
`+s.stack}}var si=Object.prototype.hasOwnProperty,Be=O.unstable_scheduleCallback,Ae=O.unstable_cancelCallback,De=O.unstable_shouldYield,ve=O.unstable_requestPaint,Ce=O.unstable_now,Ze=O.unstable_getCurrentPriorityLevel,Fe=O.unstable_ImmediatePriority,Ft=O.unstable_UserBlockingPriority,ht=O.unstable_NormalPriority,wt=O.unstable_LowPriority,et=O.unstable_IdlePriority,qe=O.log,Re=O.unstable_setDisableYieldValue,Jt=null,dt=null;function Ot(e){if(typeof qe=="function"&&Re(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Jt,e)}catch{}}var bt=Math.clz32?Math.clz32:va,ys=Math.log,_a=Math.LN2;function va(e){return e>>>=0,e===0?32:31-(ys(e)/_a|0)|0}var Ri=256,ts=262144,is=4194304;function ci(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 en(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var a=0,d=e.suspendedLanes,E=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~d,s!==0?a=ci(s):(E&=k,E!==0?a=ci(E):i||(i=k&~e,i!==0&&(a=ci(i))))):(k=s&~d,k!==0?a=ci(k):E!==0?a=ci(E):i||(i=s&~e,i!==0&&(a=ci(i)))),a===0?0:t!==0&&t!==a&&(t&d)===0&&(d=a&-a,i=t&-t,d>=i||d===32&&(i&4194048)!==0)?t:a}function lr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function _f(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 Wo(){var e=is;return is<<=1,(is&62914560)===0&&(is=4194304),e}function ga(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function or(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function vf(e,t,i,s,a,d){var E=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 k=e.entanglements,$=e.expirationTimes,te=e.hiddenUpdates;for(i=E&~i;0<i;){var le=31-bt(i),ce=1<<le;k[le]=0,$[le]=-1;var ie=te[le];if(ie!==null)for(te[le]=null,le=0;le<ie.length;le++){var ae=ie[le];ae!==null&&(ae.lane&=-536870913)}i&=~ce}s!==0&&$o(e,s,0),d!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=d&~(E&~t))}function $o(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-bt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Go(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-bt(i),a=1<<s;a&t|e[s]&t&&(e[s]|=t),i&=~a}}function Yo(e,t){var i=t&-t;return i=(i&42)!==0?1:ma(i),(i&(e.suspendedLanes|t))!==0?0:i}function ma(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 pa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xo(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:Od(e.type))}function Vo(e,t){var i=q.p;try{return q.p=e,t()}finally{q.p=i}}var Di=Math.random().toString(36).slice(2),vt="__reactFiber$"+Di,Et="__reactProps$"+Di,Cs="__reactContainer$"+Di,Sa="__reactEvents$"+Di,gf="__reactListeners$"+Di,mf="__reactHandles$"+Di,Ko="__reactResources$"+Di,cr="__reactMarker$"+Di;function ba(e){delete e[vt],delete e[Et],delete e[Sa],delete e[gf],delete e[mf]}function xs(e){var t=e[vt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Cs]||i[vt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=md(e);e!==null;){if(i=e[vt])return i;e=md(e)}return t}e=i,i=e.parentNode}return null}function ws(e){if(e=e[vt]||e[Cs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function hr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(j(33))}function Es(e){var t=e[Ko];return t||(t=e[Ko]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[cr]=!0}var Qo=new Set,Zo={};function ss(e,t){Ls(e,t),Ls(e+"Capture",t)}function Ls(e,t){for(Zo[e]=t,e=0;e<t.length;e++)Qo.add(t[e])}var pf=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]*$"),Jo={},ec={};function Sf(e){return si.call(ec,e)?!0:si.call(Jo,e)?!1:pf.test(e)?ec[e]=!0:(Jo[e]=!0,!1)}function tn(e,t,i){if(Sf(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 sn(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 hi(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 qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function tc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function bf(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 a=s.get,d=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(E){i=""+E,d.call(this,E)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(E){i=""+E},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ya(e){if(!e._valueTracker){var t=tc(e)?"checked":"value";e._valueTracker=bf(e,t,""+e[t])}}function ic(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=tc(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function rn(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 yf=/[\n"\\]/g;function Wt(e){return e.replace(yf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ca(e,t,i,s,a,d,E,k){e.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.type=E:e.removeAttribute("type"),t!=null?E==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+qt(t)):e.value!==""+qt(t)&&(e.value=""+qt(t)):E!=="submit"&&E!=="reset"||e.removeAttribute("value"),t!=null?xa(e,E,qt(t)):i!=null?xa(e,E,qt(i)):s!=null&&e.removeAttribute("value"),a==null&&d!=null&&(e.defaultChecked=!!d),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+qt(k):e.removeAttribute("name")}function sc(e,t,i,s,a,d,E,k){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),t!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||t!=null)){ya(e);return}i=i!=null?""+qt(i):"",t=t!=null?""+qt(t):i,k||t===e.value||(e.value=t),e.defaultValue=t}s=s??a,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(e.name=E),ya(e)}function xa(e,t,i){t==="number"&&rn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function As(e,t,i,s){if(e=e.options,t){t={};for(var a=0;a<i.length;a++)t["$"+i[a]]=!0;for(i=0;i<e.length;i++)a=t.hasOwnProperty("$"+e[i].value),e[i].selected!==a&&(e[i].selected=a),a&&s&&(e[i].defaultSelected=!0)}else{for(i=""+qt(i),t=null,a=0;a<e.length;a++){if(e[a].value===i){e[a].selected=!0,s&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function rc(e,t,i){if(t!=null&&(t=""+qt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+qt(i):""}function nc(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(j(92));if(K(s)){if(1<s.length)throw Error(j(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=qt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),ya(e)}function Rs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Cf=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 ac(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||Cf.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(j(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 a in t)s=t[a],t.hasOwnProperty(a)&&i[a]!==s&&ac(e,a,s)}else for(var d in t)t.hasOwnProperty(d)&&ac(e,d,t[d])}function wa(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 xf=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"]]),wf=/^[\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 nn(e){return wf.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ui(){}var Ea=null;function La(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ds=null,Ts=null;function oc(e){var t=ws(e);if(t&&(e=t.stateNode)){var i=e[Et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ca(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="'+Wt(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var a=s[Et]||null;if(!a)throw Error(j(90));Ca(s,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&ic(s)}break e;case"textarea":rc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&As(e,!!i.multiple,t,!1)}}}var Aa=!1;function cc(e,t,i){if(Aa)return e(t,i);Aa=!0;try{var s=e(t);return s}finally{if(Aa=!1,(Ds!==null||Ts!==null)&&(Gn(),Ds&&(t=Ds,e=Ts,Ts=Ds=null,oc(t),e)))for(t=0;t<e.length;t++)oc(e[t])}}function ur(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Et]||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(j(231,t,typeof i));return i}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ra=!1;if(di)try{var dr={};Object.defineProperty(dr,"passive",{get:function(){Ra=!0}}),window.addEventListener("test",dr,dr),window.removeEventListener("test",dr,dr)}catch{Ra=!1}var Ti=null,Da=null,an=null;function hc(){if(an)return an;var e,t=Da,i=t.length,s,a="value"in Ti?Ti.value:Ti.textContent,d=a.length;for(e=0;e<i&&t[e]===a[e];e++);var E=i-e;for(s=1;s<=E&&t[i-s]===a[d-s];s++);return an=a.slice(e,1<s?1-s:void 0)}function ln(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 on(){return!0}function uc(){return!1}function Lt(e){function t(i,s,a,d,E){this._reactName=i,this._targetInst=a,this.type=s,this.nativeEvent=d,this.target=E,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(i=e[k],this[k]=i?i(d):d[k]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?on:uc,this.isPropagationStopped=uc,this}return l(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=on)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var rs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=Lt(rs),fr=l({},rs,{view:0,detail:0}),Ef=Lt(fr),Ta,Ma,_r,hn=l({},fr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oa,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!==_r&&(_r&&e.type==="mousemove"?(Ta=e.screenX-_r.screenX,Ma=e.screenY-_r.screenY):Ma=Ta=0,_r=e),Ta)},movementY:function(e){return"movementY"in e?e.movementY:Ma}}),dc=Lt(hn),Lf=l({},hn,{dataTransfer:0}),Af=Lt(Lf),Rf=l({},fr,{relatedTarget:0}),Ba=Lt(Rf),Df=l({},rs,{animationName:0,elapsedTime:0,pseudoElement:0}),Tf=Lt(Df),Mf=l({},rs,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bf=Lt(Mf),Of=l({},rs,{data:0}),fc=Lt(Of),kf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},zf={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"},Nf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Hf(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Nf[e])?!!t[e]:!1}function Oa(){return Hf}var jf=l({},fr,{key:function(e){if(e.key){var t=kf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ln(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?zf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oa,charCode:function(e){return e.type==="keypress"?ln(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ln(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uf=Lt(jf),If=l({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_c=Lt(If),Pf=l({},fr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oa}),Ff=Lt(Pf),qf=l({},rs,{propertyName:0,elapsedTime:0,pseudoElement:0}),Wf=Lt(qf),$f=l({},hn,{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}),Gf=Lt($f),Yf=l({},rs,{newState:0,oldState:0}),Xf=Lt(Yf),Vf=[9,13,27,32],ka=di&&"CompositionEvent"in window,vr=null;di&&"documentMode"in document&&(vr=document.documentMode);var Kf=di&&"TextEvent"in window&&!vr,vc=di&&(!ka||vr&&8<vr&&11>=vr),gc=" ",mc=!1;function pc(e,t){switch(e){case"keyup":return Vf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Sc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ms=!1;function Qf(e,t){switch(e){case"compositionend":return Sc(t);case"keypress":return t.which!==32?null:(mc=!0,gc);case"textInput":return e=t.data,e===gc&&mc?null:e;default:return null}}function Zf(e,t){if(Ms)return e==="compositionend"||!ka&&pc(e,t)?(e=hc(),an=Da=Ti=null,Ms=!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 vc&&t.locale!=="ko"?null:t.data;default:return null}}var Jf={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 bc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Jf[e.type]:t==="textarea"}function yc(e,t,i,s){Ds?Ts?Ts.push(s):Ts=[s]:Ds=s,t=Jn(t,"onChange"),0<t.length&&(i=new cn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var gr=null,mr=null;function e_(e){sd(e,0)}function un(e){var t=hr(e);if(ic(t))return e}function Cc(e,t){if(e==="change")return t}var xc=!1;if(di){var za;if(di){var Na="oninput"in document;if(!Na){var wc=document.createElement("div");wc.setAttribute("oninput","return;"),Na=typeof wc.oninput=="function"}za=Na}else za=!1;xc=za&&(!document.documentMode||9<document.documentMode)}function Ec(){gr&&(gr.detachEvent("onpropertychange",Lc),mr=gr=null)}function Lc(e){if(e.propertyName==="value"&&un(mr)){var t=[];yc(t,mr,e,La(e)),cc(e_,t)}}function t_(e,t,i){e==="focusin"?(Ec(),gr=t,mr=i,gr.attachEvent("onpropertychange",Lc)):e==="focusout"&&Ec()}function i_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return un(mr)}function s_(e,t){if(e==="click")return un(t)}function r_(e,t){if(e==="input"||e==="change")return un(t)}function n_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:n_;function pr(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var a=i[s];if(!si.call(t,a)||!kt(e[a],t[a]))return!1}return!0}function Ac(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rc(e,t){var i=Ac(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=Ac(i)}}function Dc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Dc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Tc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=rn(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=rn(e.document)}return t}function Ha(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 a_=di&&"documentMode"in document&&11>=document.documentMode,Bs=null,ja=null,Sr=null,Ua=!1;function Mc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ua||Bs==null||Bs!==rn(s)||(s=Bs,"selectionStart"in s&&Ha(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}),Sr&&pr(Sr,s)||(Sr=s,s=Jn(ja,"onSelect"),0<s.length&&(t=new cn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Bs)))}function ns(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Os={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")},Ia={},Bc={};di&&(Bc=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function as(e){if(Ia[e])return Ia[e];if(!Os[e])return e;var t=Os[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Bc)return Ia[e]=t[i];return e}var Oc=as("animationend"),kc=as("animationiteration"),zc=as("animationstart"),l_=as("transitionrun"),o_=as("transitionstart"),c_=as("transitioncancel"),Nc=as("transitionend"),Hc=new Map,Pa="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(" ");Pa.push("scrollEnd");function ei(e,t){Hc.set(e,t),ss(t,[e])}var dn=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)},$t=[],ks=0,Fa=0;function fn(){for(var e=ks,t=Fa=ks=0;t<e;){var i=$t[t];$t[t++]=null;var s=$t[t];$t[t++]=null;var a=$t[t];$t[t++]=null;var d=$t[t];if($t[t++]=null,s!==null&&a!==null){var E=s.pending;E===null?a.next=a:(a.next=E.next,E.next=a),s.pending=a}d!==0&&jc(i,a,d)}}function _n(e,t,i,s){$t[ks++]=e,$t[ks++]=t,$t[ks++]=i,$t[ks++]=s,Fa|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function qa(e,t,i,s){return _n(e,t,i,s),vn(e)}function ls(e,t){return _n(e,null,null,t),vn(e)}function jc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var a=!1,d=e.return;d!==null;)d.childLanes|=i,s=d.alternate,s!==null&&(s.childLanes|=i),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(a=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,a&&t!==null&&(a=31-bt(i),e=d.hiddenUpdates,s=e[a],s===null?e[a]=[t]:s.push(t),t.lane=i|536870912),d):null}function vn(e){if(50<Pr)throw Pr=0,Zl=null,Error(j(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zs={};function h_(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 zt(e,t,i,s){return new h_(e,t,i,s)}function Wa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var i=e.alternate;return i===null?(i=zt(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 Uc(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 gn(e,t,i,s,a,d){var E=0;if(s=e,typeof e=="function")Wa(e)&&(E=1);else if(typeof e=="string")E=vv(e,i,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case x:return e=zt(31,i,t,a),e.elementType=x,e.lanes=d,e;case u:return os(i.children,a,d,t);case r:E=8,a|=24;break;case h:return e=zt(12,i,t,a|2),e.elementType=h,e.lanes=d,e;case C:return e=zt(13,i,t,a),e.elementType=C,e.lanes=d,e;case S:return e=zt(19,i,t,a),e.elementType=S,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c:E=10;break e;case o:E=9;break e;case m:E=11;break e;case w:E=14;break e;case p:E=16,s=null;break e}E=29,i=Error(j(130,e===null?"null":typeof e,"")),s=null}return t=zt(E,i,t,a),t.elementType=e,t.type=s,t.lanes=d,t}function os(e,t,i,s){return e=zt(7,e,s,t),e.lanes=i,e}function $a(e,t,i){return e=zt(6,e,null,t),e.lanes=i,e}function Ic(e){var t=zt(18,null,null,0);return t.stateNode=e,t}function Ga(e,t,i){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pc=new WeakMap;function Gt(e,t){if(typeof e=="object"&&e!==null){var i=Pc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Bt(t)},Pc.set(e,t),t)}return{value:e,source:t,stack:Bt(t)}}var Ns=[],Hs=0,mn=null,br=0,Yt=[],Xt=0,Mi=null,ri=1,ni="";function _i(e,t){Ns[Hs++]=br,Ns[Hs++]=mn,mn=e,br=t}function Fc(e,t,i){Yt[Xt++]=ri,Yt[Xt++]=ni,Yt[Xt++]=Mi,Mi=e;var s=ri;e=ni;var a=32-bt(s)-1;s&=~(1<<a),i+=1;var d=32-bt(t)+a;if(30<d){var E=a-a%5;d=(s&(1<<E)-1).toString(32),s>>=E,a-=E,ri=1<<32-bt(t)+a|i<<a|s,ni=d+e}else ri=1<<d|i<<a|s,ni=e}function Ya(e){e.return!==null&&(_i(e,1),Fc(e,1,0))}function Xa(e){for(;e===mn;)mn=Ns[--Hs],Ns[Hs]=null,br=Ns[--Hs],Ns[Hs]=null;for(;e===Mi;)Mi=Yt[--Xt],Yt[Xt]=null,ni=Yt[--Xt],Yt[Xt]=null,ri=Yt[--Xt],Yt[Xt]=null}function qc(e,t){Yt[Xt++]=ri,Yt[Xt++]=ni,Yt[Xt++]=Mi,ri=t.id,ni=t.overflow,Mi=e}var gt=null,Ve=null,ze=!1,Bi=null,Vt=!1,Va=Error(j(519));function Oi(e){var t=Error(j(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yr(Gt(t,e)),Va}function Wc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[vt]=e,t[Et]=s,i){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(i=0;i<qr.length;i++)Me(qr[i],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),sc(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),nc(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||ld(t.textContent,i)?(s.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),s.onScroll!=null&&Me("scroll",t),s.onScrollEnd!=null&&Me("scrollend",t),s.onClick!=null&&(t.onclick=ui),t=!0):t=!1,t||Oi(e,!0)}function $c(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:Vt=!1;return;case 27:case 3:Vt=!0;return;default:gt=gt.return}}function js(e){if(e!==gt)return!1;if(!ze)return $c(e),ze=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||_o(e.type,e.memoizedProps)),i=!i),i&&Ve&&Oi(e),$c(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ve=gd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ve=gd(e)}else t===27?(t=Ve,Yi(e.type)?(e=So,So=null,Ve=e):Ve=t):Ve=gt?Qt(e.stateNode.nextSibling):null;return!0}function cs(){Ve=gt=null,ze=!1}function Ka(){var e=Bi;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Bi=null),e}function yr(e){Bi===null?Bi=[e]:Bi.push(e)}var Qa=R(null),hs=null,vi=null;function ki(e,t,i){V(Qa,t._currentValue),t._currentValue=i}function gi(e){e._currentValue=Qa.current,z(Qa)}function Za(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 Ja(e,t,i,s){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var d=a.dependencies;if(d!==null){var E=a.child;d=d.firstContext;e:for(;d!==null;){var k=d;d=a;for(var $=0;$<t.length;$++)if(k.context===t[$]){d.lanes|=i,k=d.alternate,k!==null&&(k.lanes|=i),Za(d.return,i,e),s||(E=null);break e}d=k.next}}else if(a.tag===18){if(E=a.return,E===null)throw Error(j(341));E.lanes|=i,d=E.alternate,d!==null&&(d.lanes|=i),Za(E,i,e),E=null}else E=a.child;if(E!==null)E.return=a;else for(E=a;E!==null;){if(E===e){E=null;break}if(a=E.sibling,a!==null){a.return=E.return,E=a;break}E=E.return}a=E}}function Us(e,t,i,s){e=null;for(var a=t,d=!1;a!==null;){if(!d){if((a.flags&524288)!==0)d=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var E=a.alternate;if(E===null)throw Error(j(387));if(E=E.memoizedProps,E!==null){var k=a.type;kt(a.pendingProps.value,E.value)||(e!==null?e.push(k):e=[k])}}else if(a===W.current){if(E=a.alternate,E===null)throw Error(j(387));E.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Xr):e=[Xr])}a=a.return}e!==null&&Ja(t,e,i,s),t.flags|=262144}function pn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function us(e){hs=e,vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function mt(e){return Gc(hs,e)}function Sn(e,t){return hs===null&&us(e),Gc(e,t)}function Gc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},vi===null){if(e===null)throw Error(j(308));vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vi=vi.next=t;return i}var u_=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()})}},d_=O.unstable_scheduleCallback,f_=O.unstable_NormalPriority,at={$$typeof:c,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function el(){return{controller:new u_,data:new Map,refCount:0}}function Cr(e){e.refCount--,e.refCount===0&&d_(f_,function(){e.controller.abort()})}var xr=null,tl=0,Is=0,Ps=null;function __(e,t){if(xr===null){var i=xr=[];tl=0,Is=ro(),Ps={status:"pending",value:void 0,then:function(s){i.push(s)}}}return tl++,t.then(Yc,Yc),t}function Yc(){if(--tl===0&&xr!==null){Ps!==null&&(Ps.status="fulfilled");var e=xr;xr=null,Is=0,Ps=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function v_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(a){i.push(a)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var a=0;a<i.length;a++)(0,i[a])(t)},function(a){for(s.status="rejected",s.reason=a,a=0;a<i.length;a++)(0,i[a])(void 0)}),s}var Xc=I.S;I.S=function(e,t){Mu=Ce(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&__(e,t),Xc!==null&&Xc(e,t)};var ds=R(null);function il(){var e=ds.current;return e!==null?e:Ye.pooledCache}function bn(e,t){t===null?V(ds,ds.current):V(ds,t.pool)}function Vc(){var e=il();return e===null?null:{parent:at._currentValue,pool:e}}var Fs=Error(j(460)),sl=Error(j(474)),yn=Error(j(542)),Cn={then:function(){}};function Kc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ui,ui),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jc(e),e;default:if(typeof t.status=="string")t.then(ui,ui);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(j(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=s}},function(s){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Jc(e),e}throw _s=t,Fs}}function fs(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(_s=i,Fs):i}}var _s=null;function Zc(){if(_s===null)throw Error(j(459));var e=_s;return _s=null,e}function Jc(e){if(e===Fs||e===yn)throw Error(j(483))}var qs=null,wr=0;function xn(e){var t=wr;return wr+=1,qs===null&&(qs=[]),Qc(qs,e,t)}function Er(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function wn(e,t){throw t.$$typeof===g?Error(j(525)):(e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function eh(e){function t(Q,X){if(e){var ee=Q.deletions;ee===null?(Q.deletions=[X],Q.flags|=16):ee.push(X)}}function i(Q,X){if(!e)return null;for(;X!==null;)t(Q,X),X=X.sibling;return null}function s(Q){for(var X=new Map;Q!==null;)Q.key!==null?X.set(Q.key,Q):X.set(Q.index,Q),Q=Q.sibling;return X}function a(Q,X){return Q=fi(Q,X),Q.index=0,Q.sibling=null,Q}function d(Q,X,ee){return Q.index=ee,e?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<X?(Q.flags|=67108866,X):ee):(Q.flags|=67108866,X)):(Q.flags|=1048576,X)}function E(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function k(Q,X,ee,oe){return X===null||X.tag!==6?(X=$a(ee,Q.mode,oe),X.return=Q,X):(X=a(X,ee),X.return=Q,X)}function $(Q,X,ee,oe){var Se=ee.type;return Se===u?le(Q,X,ee.props.children,oe,ee.key):X!==null&&(X.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===p&&fs(Se)===X.type)?(X=a(X,ee.props),Er(X,ee),X.return=Q,X):(X=gn(ee.type,ee.key,ee.props,null,Q.mode,oe),Er(X,ee),X.return=Q,X)}function te(Q,X,ee,oe){return X===null||X.tag!==4||X.stateNode.containerInfo!==ee.containerInfo||X.stateNode.implementation!==ee.implementation?(X=Ga(ee,Q.mode,oe),X.return=Q,X):(X=a(X,ee.children||[]),X.return=Q,X)}function le(Q,X,ee,oe,Se){return X===null||X.tag!==7?(X=os(ee,Q.mode,oe,Se),X.return=Q,X):(X=a(X,ee),X.return=Q,X)}function ce(Q,X,ee){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=$a(""+X,Q.mode,ee),X.return=Q,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return ee=gn(X.type,X.key,X.props,null,Q.mode,ee),Er(ee,X),ee.return=Q,ee;case y:return X=Ga(X,Q.mode,ee),X.return=Q,X;case p:return X=fs(X),ce(Q,X,ee)}if(K(X)||T(X))return X=os(X,Q.mode,ee,null),X.return=Q,X;if(typeof X.then=="function")return ce(Q,xn(X),ee);if(X.$$typeof===c)return ce(Q,Sn(Q,X),ee);wn(Q,X)}return null}function ie(Q,X,ee,oe){var Se=X!==null?X.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return Se!==null?null:k(Q,X,""+ee,oe);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return ee.key===Se?$(Q,X,ee,oe):null;case y:return ee.key===Se?te(Q,X,ee,oe):null;case p:return ee=fs(ee),ie(Q,X,ee,oe)}if(K(ee)||T(ee))return Se!==null?null:le(Q,X,ee,oe,null);if(typeof ee.then=="function")return ie(Q,X,xn(ee),oe);if(ee.$$typeof===c)return ie(Q,X,Sn(Q,ee),oe);wn(Q,ee)}return null}function ae(Q,X,ee,oe,Se){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Q=Q.get(ee)||null,k(X,Q,""+oe,Se);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return Q=Q.get(oe.key===null?ee:oe.key)||null,$(X,Q,oe,Se);case y:return Q=Q.get(oe.key===null?ee:oe.key)||null,te(X,Q,oe,Se);case p:return oe=fs(oe),ae(Q,X,ee,oe,Se)}if(K(oe)||T(oe))return Q=Q.get(ee)||null,le(X,Q,oe,Se,null);if(typeof oe.then=="function")return ae(Q,X,ee,xn(oe),Se);if(oe.$$typeof===c)return ae(Q,X,ee,Sn(X,oe),Se);wn(X,oe)}return null}function ge(Q,X,ee,oe){for(var Se=null,He=null,me=X,Le=X=0,ke=null;me!==null&&Le<ee.length;Le++){me.index>Le?(ke=me,me=null):ke=me.sibling;var je=ie(Q,me,ee[Le],oe);if(je===null){me===null&&(me=ke);break}e&&me&&je.alternate===null&&t(Q,me),X=d(je,X,Le),He===null?Se=je:He.sibling=je,He=je,me=ke}if(Le===ee.length)return i(Q,me),ze&&_i(Q,Le),Se;if(me===null){for(;Le<ee.length;Le++)me=ce(Q,ee[Le],oe),me!==null&&(X=d(me,X,Le),He===null?Se=me:He.sibling=me,He=me);return ze&&_i(Q,Le),Se}for(me=s(me);Le<ee.length;Le++)ke=ae(me,Q,Le,ee[Le],oe),ke!==null&&(e&&ke.alternate!==null&&me.delete(ke.key===null?Le:ke.key),X=d(ke,X,Le),He===null?Se=ke:He.sibling=ke,He=ke);return e&&me.forEach(function(Zi){return t(Q,Zi)}),ze&&_i(Q,Le),Se}function ye(Q,X,ee,oe){if(ee==null)throw Error(j(151));for(var Se=null,He=null,me=X,Le=X=0,ke=null,je=ee.next();me!==null&&!je.done;Le++,je=ee.next()){me.index>Le?(ke=me,me=null):ke=me.sibling;var Zi=ie(Q,me,je.value,oe);if(Zi===null){me===null&&(me=ke);break}e&&me&&Zi.alternate===null&&t(Q,me),X=d(Zi,X,Le),He===null?Se=Zi:He.sibling=Zi,He=Zi,me=ke}if(je.done)return i(Q,me),ze&&_i(Q,Le),Se;if(me===null){for(;!je.done;Le++,je=ee.next())je=ce(Q,je.value,oe),je!==null&&(X=d(je,X,Le),He===null?Se=je:He.sibling=je,He=je);return ze&&_i(Q,Le),Se}for(me=s(me);!je.done;Le++,je=ee.next())je=ae(me,Q,Le,je.value,oe),je!==null&&(e&&je.alternate!==null&&me.delete(je.key===null?Le:je.key),X=d(je,X,Le),He===null?Se=je:He.sibling=je,He=je);return e&&me.forEach(function(Lv){return t(Q,Lv)}),ze&&_i(Q,Le),Se}function Ge(Q,X,ee,oe){if(typeof ee=="object"&&ee!==null&&ee.type===u&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:e:{for(var Se=ee.key;X!==null;){if(X.key===Se){if(Se=ee.type,Se===u){if(X.tag===7){i(Q,X.sibling),oe=a(X,ee.props.children),oe.return=Q,Q=oe;break e}}else if(X.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===p&&fs(Se)===X.type){i(Q,X.sibling),oe=a(X,ee.props),Er(oe,ee),oe.return=Q,Q=oe;break e}i(Q,X);break}else t(Q,X);X=X.sibling}ee.type===u?(oe=os(ee.props.children,Q.mode,oe,ee.key),oe.return=Q,Q=oe):(oe=gn(ee.type,ee.key,ee.props,null,Q.mode,oe),Er(oe,ee),oe.return=Q,Q=oe)}return E(Q);case y:e:{for(Se=ee.key;X!==null;){if(X.key===Se)if(X.tag===4&&X.stateNode.containerInfo===ee.containerInfo&&X.stateNode.implementation===ee.implementation){i(Q,X.sibling),oe=a(X,ee.children||[]),oe.return=Q,Q=oe;break e}else{i(Q,X);break}else t(Q,X);X=X.sibling}oe=Ga(ee,Q.mode,oe),oe.return=Q,Q=oe}return E(Q);case p:return ee=fs(ee),Ge(Q,X,ee,oe)}if(K(ee))return ge(Q,X,ee,oe);if(T(ee)){if(Se=T(ee),typeof Se!="function")throw Error(j(150));return ee=Se.call(ee),ye(Q,X,ee,oe)}if(typeof ee.then=="function")return Ge(Q,X,xn(ee),oe);if(ee.$$typeof===c)return Ge(Q,X,Sn(Q,ee),oe);wn(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,X!==null&&X.tag===6?(i(Q,X.sibling),oe=a(X,ee),oe.return=Q,Q=oe):(i(Q,X),oe=$a(ee,Q.mode,oe),oe.return=Q,Q=oe),E(Q)):i(Q,X)}return function(Q,X,ee,oe){try{wr=0;var Se=Ge(Q,X,ee,oe);return qs=null,Se}catch(me){if(me===Fs||me===yn)throw me;var He=zt(29,me,null,Q.mode);return He.lanes=oe,He.return=Q,He}finally{}}}var vs=eh(!0),th=eh(!1),zi=!1;function rl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nl(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 Ni(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Hi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ue&2)!==0){var a=s.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),s.pending=t,t=vn(e),jc(e,null,i),t}return _n(e,s,t,i),vn(e)}function Lr(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,Go(e,i)}}function al(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var a=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var E={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?a=d=E:d=d.next=E,i=i.next}while(i!==null);d===null?a=d=t:d=d.next=t}else a=d=t;i={baseState:s.baseState,firstBaseUpdate:a,lastBaseUpdate:d,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 ll=!1;function Ar(){if(ll){var e=Ps;if(e!==null)throw e}}function Rr(e,t,i,s){ll=!1;var a=e.updateQueue;zi=!1;var d=a.firstBaseUpdate,E=a.lastBaseUpdate,k=a.shared.pending;if(k!==null){a.shared.pending=null;var $=k,te=$.next;$.next=null,E===null?d=te:E.next=te,E=$;var le=e.alternate;le!==null&&(le=le.updateQueue,k=le.lastBaseUpdate,k!==E&&(k===null?le.firstBaseUpdate=te:k.next=te,le.lastBaseUpdate=$))}if(d!==null){var ce=a.baseState;E=0,le=te=$=null,k=d;do{var ie=k.lane&-536870913,ae=ie!==k.lane;if(ae?(Oe&ie)===ie:(s&ie)===ie){ie!==0&&ie===Is&&(ll=!0),le!==null&&(le=le.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ge=e,ye=k;ie=t;var Ge=i;switch(ye.tag){case 1:if(ge=ye.payload,typeof ge=="function"){ce=ge.call(Ge,ce,ie);break e}ce=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=ye.payload,ie=typeof ge=="function"?ge.call(Ge,ce,ie):ge,ie==null)break e;ce=l({},ce,ie);break e;case 2:zi=!0}}ie=k.callback,ie!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=a.callbacks,ae===null?a.callbacks=[ie]:ae.push(ie))}else ae={lane:ie,tag:k.tag,payload:k.payload,callback:k.callback,next:null},le===null?(te=le=ae,$=ce):le=le.next=ae,E|=ie;if(k=k.next,k===null){if(k=a.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,a.lastBaseUpdate=ae,a.shared.pending=null}}while(!0);le===null&&($=ce),a.baseState=$,a.firstBaseUpdate=te,a.lastBaseUpdate=le,d===null&&(a.shared.lanes=0),Fi|=E,e.lanes=E,e.memoizedState=ce}}function ih(e,t){if(typeof e!="function")throw Error(j(191,e));e.call(t)}function sh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)ih(i[e],t)}var Ws=R(null),En=R(0);function rh(e,t){e=Ei,V(En,e),V(Ws,t),Ei=e|t.baseLanes}function ol(){V(En,Ei),V(Ws,Ws.current)}function cl(){Ei=En.current,z(Ws),z(En)}var Nt=R(null),Kt=null;function ji(e){var t=e.alternate;V(rt,rt.current&1),V(Nt,e),Kt===null&&(t===null||Ws.current!==null||t.memoizedState!==null)&&(Kt=e)}function hl(e){V(rt,rt.current),V(Nt,e),Kt===null&&(Kt=e)}function nh(e){e.tag===22?(V(rt,rt.current),V(Nt,e),Kt===null&&(Kt=e)):Ui()}function Ui(){V(rt,rt.current),V(Nt,Nt.current)}function Ht(e){z(Nt),Kt===e&&(Kt=null),z(rt)}var rt=R(0);function Ln(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||mo(i)||po(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 mi=0,Ee=null,We=null,lt=null,An=!1,$s=!1,gs=!1,Rn=0,Dr=0,Gs=null,g_=0;function tt(){throw Error(j(321))}function ul(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function dl(e,t,i,s,a,d){return mi=d,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?Fh:Al,gs=!1,d=i(s,a),gs=!1,$s&&(d=lh(t,i,s,a)),ah(e),d}function ah(e){I.H=Br;var t=We!==null&&We.next!==null;if(mi=0,lt=We=Ee=null,An=!1,Dr=0,Gs=null,t)throw Error(j(300));e===null||ot||(e=e.dependencies,e!==null&&pn(e)&&(ot=!0))}function lh(e,t,i,s){Ee=e;var a=0;do{if($s&&(Gs=null),Dr=0,$s=!1,25<=a)throw Error(j(301));if(a+=1,lt=We=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}I.H=qh,d=t(i,s)}while($s);return d}function m_(){var e=I.H,t=e.useState()[0];return t=typeof t.then=="function"?Tr(t):t,e=e.useState()[0],(We!==null?We.memoizedState:null)!==e&&(Ee.flags|=1024),t}function fl(){var e=Rn!==0;return Rn=0,e}function _l(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function vl(e){if(An){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}An=!1}mi=0,lt=We=Ee=null,$s=!1,Dr=Rn=0,Gs=null}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ee.memoizedState=lt=e:lt=lt.next=e,lt}function nt(){if(We===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=We.next;var t=lt===null?Ee.memoizedState:lt.next;if(t!==null)lt=t,We=e;else{if(e===null)throw Ee.alternate===null?Error(j(467)):Error(j(310));We=e,e={memoizedState:We.memoizedState,baseState:We.baseState,baseQueue:We.baseQueue,queue:We.queue,next:null},lt===null?Ee.memoizedState=lt=e:lt=lt.next=e}return lt}function Dn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tr(e){var t=Dr;return Dr+=1,Gs===null&&(Gs=[]),e=Qc(Gs,e,t),t=Ee,(lt===null?t.memoizedState:lt.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?Fh:Al),e}function Tn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tr(e);if(e.$$typeof===c)return mt(e)}throw Error(j(438,String(e)))}function gl(e){var t=null,i=Ee.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ee.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Dn(),Ee.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=L;return t.index++,i}function pi(e,t){return typeof t=="function"?t(e):t}function Mn(e){var t=nt();return ml(t,We,e)}function ml(e,t,i){var s=e.queue;if(s===null)throw Error(j(311));s.lastRenderedReducer=i;var a=e.baseQueue,d=s.pending;if(d!==null){if(a!==null){var E=a.next;a.next=d.next,d.next=E}t.baseQueue=a=d,s.pending=null}if(d=e.baseState,a===null)e.memoizedState=d;else{t=a.next;var k=E=null,$=null,te=t,le=!1;do{var ce=te.lane&-536870913;if(ce!==te.lane?(Oe&ce)===ce:(mi&ce)===ce){var ie=te.revertLane;if(ie===0)$!==null&&($=$.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ce===Is&&(le=!0);else if((mi&ie)===ie){te=te.next,ie===Is&&(le=!0);continue}else ce={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},$===null?(k=$=ce,E=d):$=$.next=ce,Ee.lanes|=ie,Fi|=ie;ce=te.action,gs&&i(d,ce),d=te.hasEagerState?te.eagerState:i(d,ce)}else ie={lane:ce,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},$===null?(k=$=ie,E=d):$=$.next=ie,Ee.lanes|=ce,Fi|=ce;te=te.next}while(te!==null&&te!==t);if($===null?E=d:$.next=k,!kt(d,e.memoizedState)&&(ot=!0,le&&(i=Ps,i!==null)))throw i;e.memoizedState=d,e.baseState=E,e.baseQueue=$,s.lastRenderedState=d}return a===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function pl(e){var t=nt(),i=t.queue;if(i===null)throw Error(j(311));i.lastRenderedReducer=e;var s=i.dispatch,a=i.pending,d=t.memoizedState;if(a!==null){i.pending=null;var E=a=a.next;do d=e(d,E.action),E=E.next;while(E!==a);kt(d,t.memoizedState)||(ot=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),i.lastRenderedState=d}return[d,s]}function oh(e,t,i){var s=Ee,a=nt(),d=ze;if(d){if(i===void 0)throw Error(j(407));i=i()}else i=t();var E=!kt((We||a).memoizedState,i);if(E&&(a.memoizedState=i,ot=!0),a=a.queue,yl(uh.bind(null,s,a,e),[e]),a.getSnapshot!==t||E||lt!==null&<.memoizedState.tag&1){if(s.flags|=2048,Ys(9,{destroy:void 0},hh.bind(null,s,a,i,t),null),Ye===null)throw Error(j(349));d||(mi&127)!==0||ch(s,t,i)}return i}function ch(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ee.updateQueue,t===null?(t=Dn(),Ee.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function hh(e,t,i,s){t.value=i,t.getSnapshot=s,dh(t)&&fh(e)}function uh(e,t,i){return i(function(){dh(t)&&fh(e)})}function dh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function fh(e){var t=ls(e,2);t!==null&&Mt(t,e,2)}function Sl(e){var t=xt();if(typeof e=="function"){var i=e;if(e=i(),gs){Ot(!0);try{i()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:e},t}function _h(e,t,i,s){return e.baseState=i,ml(e,We,typeof s=="function"?s:pi)}function p_(e,t,i,s,a){if(kn(e))throw Error(j(485));if(e=t.action,e!==null){var d={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){d.listeners.push(E)}};I.T!==null?i(!0):d.isTransition=!1,s(d),i=t.pending,i===null?(d.next=t.pending=d,vh(t,d)):(d.next=i.next,t.pending=i.next=d)}}function vh(e,t){var i=t.action,s=t.payload,a=e.state;if(t.isTransition){var d=I.T,E={};I.T=E;try{var k=i(a,s),$=I.S;$!==null&&$(E,k),gh(e,t,k)}catch(te){bl(e,t,te)}finally{d!==null&&E.types!==null&&(d.types=E.types),I.T=d}}else try{d=i(a,s),gh(e,t,d)}catch(te){bl(e,t,te)}}function gh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){mh(e,t,s)},function(s){return bl(e,t,s)}):mh(e,t,i)}function mh(e,t,i){t.status="fulfilled",t.value=i,ph(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,vh(e,i)))}function bl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,ph(t),t=t.next;while(t!==s)}e.action=null}function ph(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sh(e,t){return t}function bh(e,t){if(ze){var i=Ye.formState;if(i!==null){e:{var s=Ee;if(ze){if(Ve){t:{for(var a=Ve,d=Vt;a.nodeType!==8;){if(!d){a=null;break t}if(a=Qt(a.nextSibling),a===null){a=null;break t}}d=a.data,a=d==="F!"||d==="F"?a:null}if(a){Ve=Qt(a.nextSibling),s=a.data==="F!";break e}}Oi(s)}s=!1}s&&(t=i[0])}}return i=xt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sh,lastRenderedState:t},i.queue=s,i=Uh.bind(null,Ee,s),s.dispatch=i,s=Sl(!1),d=Ll.bind(null,Ee,!1,s.queue),s=xt(),a={state:t,dispatch:null,action:e,pending:null},s.queue=a,i=p_.bind(null,Ee,a,d,i),a.dispatch=i,s.memoizedState=e,[t,i,!1]}function yh(e){var t=nt();return Ch(t,We,e)}function Ch(e,t,i){if(t=ml(e,t,Sh)[0],e=Mn(pi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Tr(t)}catch(E){throw E===Fs?yn:E}else s=t;t=nt();var a=t.queue,d=a.dispatch;return i!==t.memoizedState&&(Ee.flags|=2048,Ys(9,{destroy:void 0},S_.bind(null,a,i),null)),[s,d,e]}function S_(e,t){e.action=t}function xh(e){var t=nt(),i=We;if(i!==null)return Ch(t,i,e);nt(),t=t.memoizedState,i=nt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ys(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Dn(),Ee.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function wh(){return nt().memoizedState}function Bn(e,t,i,s){var a=xt();Ee.flags|=e,a.memoizedState=Ys(1|t,{destroy:void 0},i,s===void 0?null:s)}function On(e,t,i,s){var a=nt();s=s===void 0?null:s;var d=a.memoizedState.inst;We!==null&&s!==null&&ul(s,We.memoizedState.deps)?a.memoizedState=Ys(t,d,i,s):(Ee.flags|=e,a.memoizedState=Ys(1|t,d,i,s))}function Eh(e,t){Bn(8390656,8,e,t)}function yl(e,t){On(2048,8,e,t)}function b_(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Dn(),Ee.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Lh(e){var t=nt().memoizedState;return b_({ref:t,nextImpl:e}),function(){if((Ue&2)!==0)throw Error(j(440));return t.impl.apply(void 0,arguments)}}function Ah(e,t){return On(4,2,e,t)}function Rh(e,t){return On(4,4,e,t)}function Dh(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 Th(e,t,i){i=i!=null?i.concat([e]):null,On(4,4,Dh.bind(null,t,e),i)}function Cl(){}function Mh(e,t){var i=nt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ul(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Bh(e,t){var i=nt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ul(t,s[1]))return s[0];if(s=e(),gs){Ot(!0);try{e()}finally{Ot(!1)}}return i.memoizedState=[s,t],s}function xl(e,t,i){return i===void 0||(mi&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=Ou(),Ee.lanes|=e,Fi|=e,i)}function Oh(e,t,i,s){return kt(i,t)?i:Ws.current!==null?(e=xl(e,i,s),kt(e,t)||(ot=!0),e):(mi&42)===0||(mi&1073741824)!==0&&(Oe&261930)===0?(ot=!0,e.memoizedState=i):(e=Ou(),Ee.lanes|=e,Fi|=e,t)}function kh(e,t,i,s,a){var d=q.p;q.p=d!==0&&8>d?d:8;var E=I.T,k={};I.T=k,Ll(e,!1,t,i);try{var $=a(),te=I.S;if(te!==null&&te(k,$),$!==null&&typeof $=="object"&&typeof $.then=="function"){var le=v_($,s);Mr(e,t,le,It(e))}else Mr(e,t,s,It(e))}catch(ce){Mr(e,t,{then:function(){},status:"rejected",reason:ce},It())}finally{q.p=d,E!==null&&k.types!==null&&(E.types=k.types),I.T=E}}function y_(){}function wl(e,t,i,s){if(e.tag!==5)throw Error(j(476));var a=zh(e).queue;kh(e,a,t,P,i===null?y_:function(){return Nh(e),i(s)})}function zh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:P},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Nh(e){var t=zh(e);t.next===null&&(t=e.alternate.memoizedState),Mr(e,t.next.queue,{},It())}function El(){return mt(Xr)}function Hh(){return nt().memoizedState}function jh(){return nt().memoizedState}function C_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=It();e=Ni(i);var s=Hi(t,e,i);s!==null&&(Mt(s,t,i),Lr(s,t,i)),t={cache:el()},e.payload=t;return}t=t.return}}function x_(e,t,i){var s=It();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},kn(e)?Ih(t,i):(i=qa(e,t,i,s),i!==null&&(Mt(i,e,s),Ph(i,t,s)))}function Uh(e,t,i){var s=It();Mr(e,t,i,s)}function Mr(e,t,i,s){var a={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(kn(e))Ih(t,a);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var E=t.lastRenderedState,k=d(E,i);if(a.hasEagerState=!0,a.eagerState=k,kt(k,E))return _n(e,t,a,0),Ye===null&&fn(),!1}catch{}finally{}if(i=qa(e,t,a,s),i!==null)return Mt(i,e,s),Ph(i,t,s),!0}return!1}function Ll(e,t,i,s){if(s={lane:2,revertLane:ro(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},kn(e)){if(t)throw Error(j(479))}else t=qa(e,i,s,2),t!==null&&Mt(t,e,2)}function kn(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Ih(e,t){$s=An=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Ph(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Go(e,i)}}var Br={readContext:mt,use:Tn,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};Br.useEffectEvent=tt;var Fh={readContext:mt,use:Tn,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:Eh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Bn(4194308,4,Dh.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Bn(4194308,4,e,t)},useInsertionEffect:function(e,t){Bn(4,2,e,t)},useMemo:function(e,t){var i=xt();t=t===void 0?null:t;var s=e();if(gs){Ot(!0);try{e()}finally{Ot(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=xt();if(i!==void 0){var a=i(t);if(gs){Ot(!0);try{i(t)}finally{Ot(!1)}}}else a=t;return s.memoizedState=s.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},s.queue=e,e=e.dispatch=x_.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Sl(e);var t=e.queue,i=Uh.bind(null,Ee,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Cl,useDeferredValue:function(e,t){var i=xt();return xl(i,e,t)},useTransition:function(){var e=Sl(!1);return e=kh.bind(null,Ee,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ee,a=xt();if(ze){if(i===void 0)throw Error(j(407));i=i()}else{if(i=t(),Ye===null)throw Error(j(349));(Oe&127)!==0||ch(s,t,i)}a.memoizedState=i;var d={value:i,getSnapshot:t};return a.queue=d,Eh(uh.bind(null,s,d,e),[e]),s.flags|=2048,Ys(9,{destroy:void 0},hh.bind(null,s,d,i,t),null),i},useId:function(){var e=xt(),t=Ye.identifierPrefix;if(ze){var i=ni,s=ri;i=(s&~(1<<32-bt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Rn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=g_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:El,useFormState:bh,useActionState:bh,useOptimistic:function(e){var t=xt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ll.bind(null,Ee,!0,i),i.dispatch=t,[e,t]},useMemoCache:gl,useCacheRefresh:function(){return xt().memoizedState=C_.bind(null,Ee)},useEffectEvent:function(e){var t=xt(),i={impl:e};return t.memoizedState=i,function(){if((Ue&2)!==0)throw Error(j(440));return i.impl.apply(void 0,arguments)}}},Al={readContext:mt,use:Tn,useCallback:Mh,useContext:mt,useEffect:yl,useImperativeHandle:Th,useInsertionEffect:Ah,useLayoutEffect:Rh,useMemo:Bh,useReducer:Mn,useRef:wh,useState:function(){return Mn(pi)},useDebugValue:Cl,useDeferredValue:function(e,t){var i=nt();return Oh(i,We.memoizedState,e,t)},useTransition:function(){var e=Mn(pi)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:Tr(e),t]},useSyncExternalStore:oh,useId:Hh,useHostTransitionStatus:El,useFormState:yh,useActionState:yh,useOptimistic:function(e,t){var i=nt();return _h(i,We,e,t)},useMemoCache:gl,useCacheRefresh:jh};Al.useEffectEvent=Lh;var qh={readContext:mt,use:Tn,useCallback:Mh,useContext:mt,useEffect:yl,useImperativeHandle:Th,useInsertionEffect:Ah,useLayoutEffect:Rh,useMemo:Bh,useReducer:pl,useRef:wh,useState:function(){return pl(pi)},useDebugValue:Cl,useDeferredValue:function(e,t){var i=nt();return We===null?xl(i,e,t):Oh(i,We.memoizedState,e,t)},useTransition:function(){var e=pl(pi)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:Tr(e),t]},useSyncExternalStore:oh,useId:Hh,useHostTransitionStatus:El,useFormState:xh,useActionState:xh,useOptimistic:function(e,t){var i=nt();return We!==null?_h(i,We,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:gl,useCacheRefresh:jh};qh.useEffectEvent=Lh;function Rl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:l({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Dl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=It(),a=Ni(s);a.payload=t,i!=null&&(a.callback=i),t=Hi(e,a,s),t!==null&&(Mt(t,e,s),Lr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=It(),a=Ni(s);a.tag=1,a.payload=t,i!=null&&(a.callback=i),t=Hi(e,a,s),t!==null&&(Mt(t,e,s),Lr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=It(),s=Ni(i);s.tag=2,t!=null&&(s.callback=t),t=Hi(e,s,i),t!==null&&(Mt(t,e,i),Lr(t,e,i))}};function Wh(e,t,i,s,a,d,E){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,d,E):t.prototype&&t.prototype.isPureReactComponent?!pr(i,s)||!pr(a,d):!0}function $h(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&&Dl.enqueueReplaceState(t,t.state,null)}function ms(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=l({},i));for(var a in e)i[a]===void 0&&(i[a]=e[a])}return i}function Gh(e){dn(e)}function Yh(e){console.error(e)}function Xh(e){dn(e)}function zn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Vh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Tl(e,t,i){return i=Ni(i),i.tag=3,i.payload={element:null},i.callback=function(){zn(e,t)},i}function Kh(e){return e=Ni(e),e.tag=3,e}function Qh(e,t,i,s){var a=i.type.getDerivedStateFromError;if(typeof a=="function"){var d=s.value;e.payload=function(){return a(d)},e.callback=function(){Vh(t,i,s)}}var E=i.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(e.callback=function(){Vh(t,i,s),typeof a!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function w_(e,t,i,s,a){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Us(t,i,a,!0),i=Nt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?Yn():i.alternate===null&&it===0&&(it=3),i.flags&=-257,i.flags|=65536,i.lanes=a,s===Cn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),to(e,s,a)),!1;case 22:return i.flags|=65536,s===Cn?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)),to(e,s,a)),!1}throw Error(j(435,i.tag))}return to(e,s,a),Yn(),!1}if(ze)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,s!==Va&&(e=Error(j(422),{cause:s}),yr(Gt(e,i)))):(s!==Va&&(t=Error(j(423),{cause:s}),yr(Gt(t,i))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,s=Gt(s,i),a=Tl(e.stateNode,s,a),al(e,a),it!==4&&(it=2)),!1;var d=Error(j(520),{cause:s});if(d=Gt(d,i),Ir===null?Ir=[d]:Ir.push(d),it!==4&&(it=2),t===null)return!0;s=Gt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=a&-a,i.lanes|=e,e=Tl(i.stateNode,s,e),al(i,e),!1;case 1:if(t=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(qi===null||!qi.has(d))))return i.flags|=65536,a&=-a,i.lanes|=a,a=Kh(a),Qh(a,e,i,s),al(i,a),!1}i=i.return}while(i!==null);return!1}var Ml=Error(j(461)),ot=!1;function pt(e,t,i,s){t.child=e===null?th(t,null,i,s):vs(t,e.child,i,s)}function Zh(e,t,i,s,a){i=i.render;var d=t.ref;if("ref"in s){var E={};for(var k in s)k!=="ref"&&(E[k]=s[k])}else E=s;return us(t),s=dl(e,t,i,E,d,a),k=fl(),e!==null&&!ot?(_l(e,t,a),Si(e,t,a)):(ze&&k&&Ya(t),t.flags|=1,pt(e,t,s,a),t.child)}function Jh(e,t,i,s,a){if(e===null){var d=i.type;return typeof d=="function"&&!Wa(d)&&d.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=d,eu(e,t,d,s,a)):(e=gn(i.type,null,s,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!Ul(e,a)){var E=d.memoizedProps;if(i=i.compare,i=i!==null?i:pr,i(E,s)&&e.ref===t.ref)return Si(e,t,a)}return t.flags|=1,e=fi(d,s),e.ref=t.ref,e.return=t,t.child=e}function eu(e,t,i,s,a){if(e!==null){var d=e.memoizedProps;if(pr(d,s)&&e.ref===t.ref)if(ot=!1,t.pendingProps=s=d,Ul(e,a))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,Si(e,t,a)}return Bl(e,t,i,s,a)}function tu(e,t,i,s){var a=s.children,d=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(d=d!==null?d.baseLanes|i:i,e!==null){for(s=t.child=e.child,a=0;s!==null;)a=a|s.lanes|s.childLanes,s=s.sibling;s=a&~d}else s=0,t.child=null;return iu(e,t,d,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bn(t,d!==null?d.cachePool:null),d!==null?rh(t,d):ol(),nh(t);else return s=t.lanes=536870912,iu(e,t,d!==null?d.baseLanes|i:i,i,s)}else d!==null?(bn(t,d.cachePool),rh(t,d),Ui(),t.memoizedState=null):(e!==null&&bn(t,null),ol(),Ui());return pt(e,t,a,i),t.child}function Or(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function iu(e,t,i,s,a){var d=il();return d=d===null?null:{parent:at._currentValue,pool:d},t.memoizedState={baseLanes:i,cachePool:d},e!==null&&bn(t,null),ol(),nh(t),e!==null&&Us(e,t,s,!0),t.childLanes=a,null}function Nn(e,t){return t=jn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function su(e,t,i){return vs(t,e.child,null,i),e=Nn(t,t.pendingProps),e.flags|=2,Ht(t),t.memoizedState=null,e}function E_(e,t,i){var s=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(s.mode==="hidden")return e=Nn(t,s),t.lanes=536870912,Or(null,e);if(hl(t),(e=Ve)?(e=vd(e,Vt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi!==null?{id:ri,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},i=Ic(e),i.return=t,t.child=i,gt=t,Ve=null)):e=null,e===null)throw Oi(t);return t.lanes=536870912,null}return Nn(t,s)}var d=e.memoizedState;if(d!==null){var E=d.dehydrated;if(hl(t),a)if(t.flags&256)t.flags&=-257,t=su(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(j(558));else if(ot||Us(e,t,i,!1),a=(i&e.childLanes)!==0,ot||a){if(s=Ye,s!==null&&(E=Yo(s,i),E!==0&&E!==d.retryLane))throw d.retryLane=E,ls(e,E),Mt(s,e,E),Ml;Yn(),t=su(e,t,i)}else e=d.treeContext,Ve=Qt(E.nextSibling),gt=t,ze=!0,Bi=null,Vt=!1,e!==null&&qc(t,e),t=Nn(t,s),t.flags|=4096;return t}return e=fi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hn(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(j(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Bl(e,t,i,s,a){return us(t),i=dl(e,t,i,s,void 0,a),s=fl(),e!==null&&!ot?(_l(e,t,a),Si(e,t,a)):(ze&&s&&Ya(t),t.flags|=1,pt(e,t,i,a),t.child)}function ru(e,t,i,s,a,d){return us(t),t.updateQueue=null,i=lh(t,s,i,a),ah(e),s=fl(),e!==null&&!ot?(_l(e,t,d),Si(e,t,d)):(ze&&s&&Ya(t),t.flags|=1,pt(e,t,i,d),t.child)}function nu(e,t,i,s,a){if(us(t),t.stateNode===null){var d=zs,E=i.contextType;typeof E=="object"&&E!==null&&(d=mt(E)),d=new i(s,d),t.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Dl,t.stateNode=d,d._reactInternals=t,d=t.stateNode,d.props=s,d.state=t.memoizedState,d.refs={},rl(t),E=i.contextType,d.context=typeof E=="object"&&E!==null?mt(E):zs,d.state=t.memoizedState,E=i.getDerivedStateFromProps,typeof E=="function"&&(Rl(t,i,E,s),d.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(E=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),E!==d.state&&Dl.enqueueReplaceState(d,d.state,null),Rr(t,s,d,a),Ar(),d.state=t.memoizedState),typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){d=t.stateNode;var k=t.memoizedProps,$=ms(i,k);d.props=$;var te=d.context,le=i.contextType;E=zs,typeof le=="object"&&le!==null&&(E=mt(le));var ce=i.getDerivedStateFromProps;le=typeof ce=="function"||typeof d.getSnapshotBeforeUpdate=="function",k=t.pendingProps!==k,le||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(k||te!==E)&&$h(t,d,s,E),zi=!1;var ie=t.memoizedState;d.state=ie,Rr(t,s,d,a),Ar(),te=t.memoizedState,k||ie!==te||zi?(typeof ce=="function"&&(Rl(t,i,ce,s),te=t.memoizedState),($=zi||Wh(t,i,$,s,ie,te,E))?(le||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(t.flags|=4194308)):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=te),d.props=s,d.state=te,d.context=E,s=$):(typeof d.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{d=t.stateNode,nl(e,t),E=t.memoizedProps,le=ms(i,E),d.props=le,ce=t.pendingProps,ie=d.context,te=i.contextType,$=zs,typeof te=="object"&&te!==null&&($=mt(te)),k=i.getDerivedStateFromProps,(te=typeof k=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(E!==ce||ie!==$)&&$h(t,d,s,$),zi=!1,ie=t.memoizedState,d.state=ie,Rr(t,s,d,a),Ar();var ae=t.memoizedState;E!==ce||ie!==ae||zi||e!==null&&e.dependencies!==null&&pn(e.dependencies)?(typeof k=="function"&&(Rl(t,i,k,s),ae=t.memoizedState),(le=zi||Wh(t,i,le,s,ie,ae,$)||e!==null&&e.dependencies!==null&&pn(e.dependencies))?(te||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(s,ae,$),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(s,ae,$)),typeof d.componentDidUpdate=="function"&&(t.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof d.componentDidUpdate!="function"||E===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),d.props=s,d.state=ae,d.context=$,s=le):(typeof d.componentDidUpdate!="function"||E===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),s=!1)}return d=s,Hn(e,t),s=(t.flags&128)!==0,d||s?(d=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:d.render(),t.flags|=1,e!==null&&s?(t.child=vs(t,e.child,null,a),t.child=vs(t,null,i,a)):pt(e,t,i,a),t.memoizedState=d.state,e=t.child):e=Si(e,t,a),e}function au(e,t,i,s){return cs(),t.flags|=256,pt(e,t,i,s),t.child}var Ol={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kl(e){return{baseLanes:e,cachePool:Vc()}}function zl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Ut),e}function lu(e,t,i){var s=t.pendingProps,a=!1,d=(t.flags&128)!==0,E;if((E=d)||(E=e!==null&&e.memoizedState===null?!1:(rt.current&2)!==0),E&&(a=!0,t.flags&=-129),E=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(a?ji(t):Ui(),(e=Ve)?(e=vd(e,Vt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi!==null?{id:ri,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},i=Ic(e),i.return=t,t.child=i,gt=t,Ve=null)):e=null,e===null)throw Oi(t);return po(e)?t.lanes=32:t.lanes=536870912,null}var k=s.children;return s=s.fallback,a?(Ui(),a=t.mode,k=jn({mode:"hidden",children:k},a),s=os(s,a,i,null),k.return=t,s.return=t,k.sibling=s,t.child=k,s=t.child,s.memoizedState=kl(i),s.childLanes=zl(e,E,i),t.memoizedState=Ol,Or(null,s)):(ji(t),Nl(t,k))}var $=e.memoizedState;if($!==null&&(k=$.dehydrated,k!==null)){if(d)t.flags&256?(ji(t),t.flags&=-257,t=Hl(e,t,i)):t.memoizedState!==null?(Ui(),t.child=e.child,t.flags|=128,t=null):(Ui(),k=s.fallback,a=t.mode,s=jn({mode:"visible",children:s.children},a),k=os(k,a,i,null),k.flags|=2,s.return=t,k.return=t,s.sibling=k,t.child=s,vs(t,e.child,null,i),s=t.child,s.memoizedState=kl(i),s.childLanes=zl(e,E,i),t.memoizedState=Ol,t=Or(null,s));else if(ji(t),po(k)){if(E=k.nextSibling&&k.nextSibling.dataset,E)var te=E.dgst;E=te,s=Error(j(419)),s.stack="",s.digest=E,yr({value:s,source:null,stack:null}),t=Hl(e,t,i)}else if(ot||Us(e,t,i,!1),E=(i&e.childLanes)!==0,ot||E){if(E=Ye,E!==null&&(s=Yo(E,i),s!==0&&s!==$.retryLane))throw $.retryLane=s,ls(e,s),Mt(E,e,s),Ml;mo(k)||Yn(),t=Hl(e,t,i)}else mo(k)?(t.flags|=192,t.child=e.child,t=null):(e=$.treeContext,Ve=Qt(k.nextSibling),gt=t,ze=!0,Bi=null,Vt=!1,e!==null&&qc(t,e),t=Nl(t,s.children),t.flags|=4096);return t}return a?(Ui(),k=s.fallback,a=t.mode,$=e.child,te=$.sibling,s=fi($,{mode:"hidden",children:s.children}),s.subtreeFlags=$.subtreeFlags&65011712,te!==null?k=fi(te,k):(k=os(k,a,i,null),k.flags|=2),k.return=t,s.return=t,s.sibling=k,t.child=s,Or(null,s),s=t.child,k=e.child.memoizedState,k===null?k=kl(i):(a=k.cachePool,a!==null?($=at._currentValue,a=a.parent!==$?{parent:$,pool:$}:a):a=Vc(),k={baseLanes:k.baseLanes|i,cachePool:a}),s.memoizedState=k,s.childLanes=zl(e,E,i),t.memoizedState=Ol,Or(e.child,s)):(ji(t),i=e.child,e=i.sibling,i=fi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(E=t.deletions,E===null?(t.deletions=[e],t.flags|=16):E.push(e)),t.child=i,t.memoizedState=null,i)}function Nl(e,t){return t=jn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function jn(e,t){return e=zt(22,e,null,t),e.lanes=0,e}function Hl(e,t,i){return vs(t,e.child,null,i),e=Nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ou(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Za(e.return,t,i)}function jl(e,t,i,s,a,d){var E=e.memoizedState;E===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:a,treeForkCount:d}:(E.isBackwards=t,E.rendering=null,E.renderingStartTime=0,E.last=s,E.tail=i,E.tailMode=a,E.treeForkCount=d)}function cu(e,t,i){var s=t.pendingProps,a=s.revealOrder,d=s.tail;s=s.children;var E=rt.current,k=(E&2)!==0;if(k?(E=E&1|2,t.flags|=128):E&=1,V(rt,E),pt(e,t,s,i),s=ze?br:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ou(e,i,t);else if(e.tag===19)ou(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(a){case"forwards":for(i=t.child,a=null;i!==null;)e=i.alternate,e!==null&&Ln(e)===null&&(a=i),i=i.sibling;i=a,i===null?(a=t.child,t.child=null):(a=i.sibling,i.sibling=null),jl(t,!1,a,i,d,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ln(e)===null){t.child=a;break}e=a.sibling,a.sibling=i,i=a,a=e}jl(t,!0,i,null,d,s);break;case"together":jl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Si(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Fi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Us(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,i=fi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=fi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ul(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pn(e)))}function L_(e,t,i){switch(t.tag){case 3:N(t,t.stateNode.containerInfo),ki(t,at,e.memoizedState.cache),cs();break;case 27:case 5:re(t);break;case 4:N(t,t.stateNode.containerInfo);break;case 10:ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,hl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(ji(t),t.flags|=128,null):(i&t.child.childLanes)!==0?lu(e,t,i):(ji(t),e=Si(e,t,i),e!==null?e.sibling:null);ji(t);break;case 19:var a=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Us(e,t,i,!1),s=(i&t.childLanes)!==0),a){if(s)return cu(e,t,i);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),V(rt,rt.current),s)break;return null;case 22:return t.lanes=0,tu(e,t,i,t.pendingProps);case 24:ki(t,at,e.memoizedState.cache)}return Si(e,t,i)}function hu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!Ul(e,i)&&(t.flags&128)===0)return ot=!1,L_(e,t,i);ot=(e.flags&131072)!==0}else ot=!1,ze&&(t.flags&1048576)!==0&&Fc(t,br,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=fs(t.elementType),t.type=e,typeof e=="function")Wa(e)?(s=ms(e,s),t.tag=1,t=nu(null,t,e,s,i)):(t.tag=0,t=Bl(null,t,e,s,i));else{if(e!=null){var a=e.$$typeof;if(a===m){t.tag=11,t=Zh(null,t,e,s,i);break e}else if(a===w){t.tag=14,t=Jh(null,t,e,s,i);break e}}throw t=U(e)||e,Error(j(306,t,""))}}return t;case 0:return Bl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,a=ms(s,t.pendingProps),nu(e,t,s,a,i);case 3:e:{if(N(t,t.stateNode.containerInfo),e===null)throw Error(j(387));s=t.pendingProps;var d=t.memoizedState;a=d.element,nl(e,t),Rr(t,s,null,i);var E=t.memoizedState;if(s=E.cache,ki(t,at,s),s!==d.cache&&Ja(t,[at],i,!0),Ar(),s=E.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:E.cache},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){t=au(e,t,s,i);break e}else if(s!==a){a=Gt(Error(j(424)),t),yr(a),t=au(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ve=Qt(e.firstChild),gt=t,ze=!0,Bi=null,Vt=!0,i=th(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(cs(),s===a){t=Si(e,t,i);break e}pt(e,t,s,i)}t=t.child}return t;case 26:return Hn(e,t),e===null?(i=yd(t.type,null,t.pendingProps,null))?t.memoizedState=i:ze||(i=t.type,e=t.pendingProps,s=ea(ue.current).createElement(i),s[vt]=t,s[Et]=e,St(s,i,e),ft(s),t.stateNode=s):t.memoizedState=yd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return re(t),e===null&&ze&&(s=t.stateNode=pd(t.type,t.pendingProps,ue.current),gt=t,Vt=!0,a=Ve,Yi(t.type)?(So=a,Ve=Qt(s.firstChild)):Ve=a),pt(e,t,t.pendingProps.children,i),Hn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((a=s=Ve)&&(s=iv(s,t.type,t.pendingProps,Vt),s!==null?(t.stateNode=s,gt=t,Ve=Qt(s.firstChild),Vt=!1,a=!0):a=!1),a||Oi(t)),re(t),a=t.type,d=t.pendingProps,E=e!==null?e.memoizedProps:null,s=d.children,_o(a,d)?s=null:E!==null&&_o(a,E)&&(t.flags|=32),t.memoizedState!==null&&(a=dl(e,t,m_,null,null,i),Xr._currentValue=a),Hn(e,t),pt(e,t,s,i),t.child;case 6:return e===null&&ze&&((e=i=Ve)&&(i=sv(i,t.pendingProps,Vt),i!==null?(t.stateNode=i,gt=t,Ve=null,e=!0):e=!1),e||Oi(t)),null;case 13:return lu(e,t,i);case 4:return N(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=vs(t,null,s,i):pt(e,t,s,i),t.child;case 11:return Zh(e,t,t.type,t.pendingProps,i);case 7:return pt(e,t,t.pendingProps,i),t.child;case 8:return pt(e,t,t.pendingProps.children,i),t.child;case 12:return pt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,ki(t,t.type,s.value),pt(e,t,s.children,i),t.child;case 9:return a=t.type._context,s=t.pendingProps.children,us(t),a=mt(a),s=s(a),t.flags|=1,pt(e,t,s,i),t.child;case 14:return Jh(e,t,t.type,t.pendingProps,i);case 15:return eu(e,t,t.type,t.pendingProps,i);case 19:return cu(e,t,i);case 31:return E_(e,t,i);case 22:return tu(e,t,i,t.pendingProps);case 24:return us(t),s=mt(at),e===null?(a=il(),a===null&&(a=Ye,d=el(),a.pooledCache=d,d.refCount++,d!==null&&(a.pooledCacheLanes|=i),a=d),t.memoizedState={parent:s,cache:a},rl(t),ki(t,at,a)):((e.lanes&i)!==0&&(nl(e,t),Rr(t,null,null,i),Ar()),a=e.memoizedState,d=t.memoizedState,a.parent!==s?(a={parent:s,cache:s},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ki(t,at,s)):(s=d.cache,ki(t,at,s),s!==a.cache&&Ja(t,[at],i,!0))),pt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(j(156,t.tag))}function bi(e){e.flags|=4}function Il(e,t,i,s,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Hu())e.flags|=8192;else throw _s=Cn,sl}else e.flags&=-16777217}function uu(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ld(t))if(Hu())e.flags|=8192;else throw _s=Cn,sl}function Un(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wo():536870912,e.lanes|=t,Qs|=t)}function kr(e,t){if(!ze)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 Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var a=e.child;a!==null;)i|=a.lanes|a.childLanes,s|=a.subtreeFlags&65011712,s|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)i|=a.lanes|a.childLanes,s|=a.subtreeFlags,s|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function A_(e,t,i){var s=t.pendingProps;switch(Xa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),gi(at),ne(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(js(t)?bi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ka())),Ke(t),null;case 26:var a=t.type,d=t.memoizedState;return e===null?(bi(t),d!==null?(Ke(t),uu(t,d)):(Ke(t),Il(t,a,null,s,i))):d?d!==e.memoizedState?(bi(t),Ke(t),uu(t,d)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&bi(t),Ke(t),Il(t,a,e,s,i)),null;case 27:if(_e(t),i=ue.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Ke(t),null}e=J.current,js(t)?Wc(t):(e=pd(a,s,i),t.stateNode=e,bi(t))}return Ke(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Ke(t),null}if(d=J.current,js(t))Wc(t);else{var E=ea(ue.current);switch(d){case 1:d=E.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:d=E.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":d=E.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":d=E.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":d=E.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof s.is=="string"?E.createElement("select",{is:s.is}):E.createElement("select"),s.multiple?d.multiple=!0:s.size&&(d.size=s.size);break;default:d=typeof s.is=="string"?E.createElement(a,{is:s.is}):E.createElement(a)}}d[vt]=t,d[Et]=s;e:for(E=t.child;E!==null;){if(E.tag===5||E.tag===6)d.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&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}t.stateNode=d;e:switch(St(d,a,s),a){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&bi(t)}}return Ke(t),Il(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(j(166));if(e=ue.current,js(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,a=gt,a!==null)switch(a.tag){case 27:case 5:s=a.memoizedProps}e[vt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||ld(e.nodeValue,i)),e||Oi(t,!0)}else e=ea(e).createTextNode(s),e[vt]=t,t.stateNode=e}return Ke(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=js(t),i!==null){if(e===null){if(!s)throw Error(j(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(557));e[vt]=t}else cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else i=Ka(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Ht(t),t):(Ht(t),null);if((t.flags&128)!==0)throw Error(j(558))}return Ke(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=js(t),s!==null&&s.dehydrated!==null){if(e===null){if(!a)throw Error(j(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(j(317));a[vt]=t}else cs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),a=!1}else a=Ka(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ht(t),t):(Ht(t),null)}return Ht(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,a=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(a=s.alternate.memoizedState.cachePool.pool),d=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),d!==a&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Un(t,t.updateQueue),Ke(t),null);case 4:return ne(),e===null&&oo(t.stateNode.containerInfo),Ke(t),null;case 10:return gi(t.type),Ke(t),null;case 19:if(z(rt),s=t.memoizedState,s===null)return Ke(t),null;if(a=(t.flags&128)!==0,d=s.rendering,d===null)if(a)kr(s,!1);else{if(it!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(d=Ln(e),d!==null){for(t.flags|=128,kr(s,!1),e=d.updateQueue,t.updateQueue=e,Un(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Uc(i,e),i=i.sibling;return V(rt,rt.current&1|2),ze&&_i(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ce()>Wn&&(t.flags|=128,a=!0,kr(s,!1),t.lanes=4194304)}else{if(!a)if(e=Ln(d),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Un(t,e),kr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!d.alternate&&!ze)return Ke(t),null}else 2*Ce()-s.renderingStartTime>Wn&&i!==536870912&&(t.flags|=128,a=!0,kr(s,!1),t.lanes=4194304);s.isBackwards?(d.sibling=t.child,t.child=d):(e=s.last,e!==null?e.sibling=d:t.child=d,s.last=d)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ce(),e.sibling=null,i=rt.current,V(rt,a?i&1|2:i&1),ze&&_i(t,s.treeForkCount),e):(Ke(t),null);case 22:case 23:return Ht(t),cl(),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&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),i=t.updateQueue,i!==null&&Un(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&&z(ds),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),gi(at),Ke(t),null;case 25:return null;case 30:return null}throw Error(j(156,t.tag))}function R_(e,t){switch(Xa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gi(at),ne(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(Ht(t),t.alternate===null)throw Error(j(340));cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));cs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(rt),null;case 4:return ne(),null;case 10:return gi(t.type),null;case 22:case 23:return Ht(t),cl(),e!==null&&z(ds),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return gi(at),null;case 25:return null;default:return null}}function du(e,t){switch(Xa(t),t.tag){case 3:gi(at),ne();break;case 26:case 27:case 5:_e(t);break;case 4:ne();break;case 31:t.memoizedState!==null&&Ht(t);break;case 13:Ht(t);break;case 19:z(rt);break;case 10:gi(t.type);break;case 22:case 23:Ht(t),cl(),e!==null&&z(ds);break;case 24:gi(at)}}function zr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var a=s.next;i=a;do{if((i.tag&e)===e){s=void 0;var d=i.create,E=i.inst;s=d(),E.destroy=s}i=i.next}while(i!==a)}}catch(k){Pe(t,t.return,k)}}function Ii(e,t,i){try{var s=t.updateQueue,a=s!==null?s.lastEffect:null;if(a!==null){var d=a.next;s=d;do{if((s.tag&e)===e){var E=s.inst,k=E.destroy;if(k!==void 0){E.destroy=void 0,a=t;var $=i,te=k;try{te()}catch(le){Pe(a,$,le)}}}s=s.next}while(s!==d)}}catch(le){Pe(t,t.return,le)}}function fu(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{sh(t,i)}catch(s){Pe(e,e.return,s)}}}function _u(e,t,i){i.props=ms(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Pe(e,t,s)}}function Nr(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(a){Pe(e,t,a)}}function ai(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(a){Pe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(a){Pe(e,t,a)}else i.current=null}function vu(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(a){Pe(e,e.return,a)}}function Pl(e,t,i){try{var s=e.stateNode;K_(s,e.type,i,t),s[Et]=t}catch(a){Pe(e,e.return,a)}}function gu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Yi(e.type)||e.tag===4}function Fl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gu(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&&Yi(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 ql(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=ui));else if(s!==4&&(s===27&&Yi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(ql(e,t,i),e=e.sibling;e!==null;)ql(e,t,i),e=e.sibling}function In(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&&Yi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(In(e,t,i),e=e.sibling;e!==null;)In(e,t,i),e=e.sibling}function mu(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);St(t,s,i),t[vt]=e,t[Et]=i}catch(d){Pe(e,e.return,d)}}var yi=!1,ct=!1,Wl=!1,pu=typeof WeakSet=="function"?WeakSet:Set,_t=null;function D_(e,t){if(e=e.containerInfo,uo=la,e=Tc(e),Ha(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 a=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var E=0,k=-1,$=-1,te=0,le=0,ce=e,ie=null;t:for(;;){for(var ae;ce!==i||a!==0&&ce.nodeType!==3||(k=E+a),ce!==d||s!==0&&ce.nodeType!==3||($=E+s),ce.nodeType===3&&(E+=ce.nodeValue.length),(ae=ce.firstChild)!==null;)ie=ce,ce=ae;for(;;){if(ce===e)break t;if(ie===i&&++te===a&&(k=E),ie===d&&++le===s&&($=E),(ae=ce.nextSibling)!==null)break;ce=ie,ie=ce.parentNode}ce=ae}i=k===-1||$===-1?null:{start:k,end:$}}else i=null}i=i||{start:0,end:0}}else i=null;for(fo={focusedElem:e,selectionRange:i},la=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,d=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++)a=e[i],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,i=t,a=d.memoizedProps,d=d.memoizedState,s=i.stateNode;try{var ge=ms(i.type,a);e=s.getSnapshotBeforeUpdate(ge,d),s.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Pe(i,i.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)go(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":go(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(j(163))}if(e=t.sibling,e!==null){e.return=t.return,_t=e;break}_t=t.return}}function Su(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:xi(e,i),s&4&&zr(5,i);break;case 1:if(xi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(E){Pe(i,i.return,E)}else{var a=ms(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(E){Pe(i,i.return,E)}}s&64&&fu(i),s&512&&Nr(i,i.return);break;case 3:if(xi(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{sh(e,t)}catch(E){Pe(i,i.return,E)}}break;case 27:t===null&&s&4&&mu(i);case 26:case 5:xi(e,i),t===null&&s&4&&vu(i),s&512&&Nr(i,i.return);break;case 12:xi(e,i);break;case 31:xi(e,i),s&4&&Cu(e,i);break;case 13:xi(e,i),s&4&&xu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=j_.bind(null,i),rv(e,i))));break;case 22:if(s=i.memoizedState!==null||yi,!s){t=t!==null&&t.memoizedState!==null||ct,a=yi;var d=ct;yi=s,(ct=t)&&!d?wi(e,i,(i.subtreeFlags&8772)!==0):xi(e,i),yi=a,ct=d}break;case 30:break;default:xi(e,i)}}function bu(e){var t=e.alternate;t!==null&&(e.alternate=null,bu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ba(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,At=!1;function Ci(e,t,i){for(i=i.child;i!==null;)yu(e,t,i),i=i.sibling}function yu(e,t,i){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Jt,i)}catch{}switch(i.tag){case 26:ct||ai(i,t),Ci(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ct||ai(i,t);var s=Je,a=At;Yi(i.type)&&(Je=i.stateNode,At=!1),Ci(e,t,i),$r(i.stateNode),Je=s,At=a;break;case 5:ct||ai(i,t);case 6:if(s=Je,a=At,Je=null,Ci(e,t,i),Je=s,At=a,Je!==null)if(At)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(i.stateNode)}catch(d){Pe(i,t,d)}else try{Je.removeChild(i.stateNode)}catch(d){Pe(i,t,d)}break;case 18:Je!==null&&(At?(e=Je,fd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),nr(e)):fd(Je,i.stateNode));break;case 4:s=Je,a=At,Je=i.stateNode.containerInfo,At=!0,Ci(e,t,i),Je=s,At=a;break;case 0:case 11:case 14:case 15:Ii(2,i,t),ct||Ii(4,i,t),Ci(e,t,i);break;case 1:ct||(ai(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&_u(i,t,s)),Ci(e,t,i);break;case 21:Ci(e,t,i);break;case 22:ct=(s=ct)||i.memoizedState!==null,Ci(e,t,i),ct=s;break;default:Ci(e,t,i)}}function Cu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{nr(e)}catch(i){Pe(t,t.return,i)}}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{nr(e)}catch(i){Pe(t,t.return,i)}}function T_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new pu),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new pu),t;default:throw Error(j(435,e.tag))}}function Pn(e,t){var i=T_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var a=U_.bind(null,e,s);s.then(a,a)}})}function Rt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var a=i[s],d=e,E=t,k=E;e:for(;k!==null;){switch(k.tag){case 27:if(Yi(k.type)){Je=k.stateNode,At=!1;break e}break;case 5:Je=k.stateNode,At=!1;break e;case 3:case 4:Je=k.stateNode.containerInfo,At=!0;break e}k=k.return}if(Je===null)throw Error(j(160));yu(d,E,a),Je=null,At=!1,d=a.alternate,d!==null&&(d.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wu(t,e),t=t.sibling}var ti=null;function wu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rt(t,e),Dt(e),s&4&&(Ii(3,e,e.return),zr(3,e),Ii(5,e,e.return));break;case 1:Rt(t,e),Dt(e),s&512&&(ct||i===null||ai(i,i.return)),s&64&&yi&&(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 a=ti;if(Rt(t,e),Dt(e),s&512&&(ct||i===null||ai(i,i.return)),s&4){var d=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,a=a.ownerDocument||a;t:switch(s){case"title":d=a.getElementsByTagName("title")[0],(!d||d[cr]||d[vt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=a.createElement(s),a.head.insertBefore(d,a.querySelector("head > title"))),St(d,s,i),d[vt]=e,ft(d),s=d;break e;case"link":var E=wd("link","href",a).get(s+(i.href||""));if(E){for(var k=0;k<E.length;k++)if(d=E[k],d.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&d.getAttribute("rel")===(i.rel==null?null:i.rel)&&d.getAttribute("title")===(i.title==null?null:i.title)&&d.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){E.splice(k,1);break t}}d=a.createElement(s),St(d,s,i),a.head.appendChild(d);break;case"meta":if(E=wd("meta","content",a).get(s+(i.content||""))){for(k=0;k<E.length;k++)if(d=E[k],d.getAttribute("content")===(i.content==null?null:""+i.content)&&d.getAttribute("name")===(i.name==null?null:i.name)&&d.getAttribute("property")===(i.property==null?null:i.property)&&d.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&d.getAttribute("charset")===(i.charSet==null?null:i.charSet)){E.splice(k,1);break t}}d=a.createElement(s),St(d,s,i),a.head.appendChild(d);break;default:throw Error(j(468,s))}d[vt]=e,ft(d),s=d}e.stateNode=s}else Ed(a,e.type,e.stateNode);else e.stateNode=xd(a,s,e.memoizedProps);else d!==s?(d===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):d.count--,s===null?Ed(a,e.type,e.stateNode):xd(a,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Dt(e),s&512&&(ct||i===null||ai(i,i.return)),i!==null&&s&4&&Pl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Dt(e),s&512&&(ct||i===null||ai(i,i.return)),e.flags&32){a=e.stateNode;try{Rs(a,"")}catch(ge){Pe(e,e.return,ge)}}s&4&&e.stateNode!=null&&(a=e.memoizedProps,Pl(e,a,i!==null?i.memoizedProps:a)),s&1024&&(Wl=!0);break;case 6:if(Rt(t,e),Dt(e),s&4){if(e.stateNode===null)throw Error(j(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ge){Pe(e,e.return,ge)}}break;case 3:if(sa=null,a=ti,ti=ta(t.containerInfo),Rt(t,e),ti=a,Dt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{nr(t.containerInfo)}catch(ge){Pe(e,e.return,ge)}Wl&&(Wl=!1,Eu(e));break;case 4:s=ti,ti=ta(e.stateNode.containerInfo),Rt(t,e),Dt(e),ti=s;break;case 12:Rt(t,e),Dt(e);break;case 31:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pn(e,s)));break;case 13:Rt(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(qn=Ce()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pn(e,s)));break;case 22:a=e.memoizedState!==null;var $=i!==null&&i.memoizedState!==null,te=yi,le=ct;if(yi=te||a,ct=le||$,Rt(t,e),ct=le,yi=te,Dt(e),s&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(i===null||$||yi||ct||ps(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){$=i=t;try{if(d=$.stateNode,a)E=d.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{k=$.stateNode;var ce=$.memoizedProps.style,ie=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;k.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(ge){Pe($,$.return,ge)}}}else if(t.tag===6){if(i===null){$=t;try{$.stateNode.nodeValue=a?"":$.memoizedProps}catch(ge){Pe($,$.return,ge)}}}else if(t.tag===18){if(i===null){$=t;try{var ae=$.stateNode;a?_d(ae,!0):_d($.stateNode,!1)}catch(ge){Pe($,$.return,ge)}}}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,Pn(e,i))));break;case 19:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pn(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(gu(s)){i=s;break}s=s.return}if(i==null)throw Error(j(160));switch(i.tag){case 27:var a=i.stateNode,d=Fl(e);In(e,d,a);break;case 5:var E=i.stateNode;i.flags&32&&(Rs(E,""),i.flags&=-33);var k=Fl(e);In(e,k,E);break;case 3:case 4:var $=i.stateNode.containerInfo,te=Fl(e);ql(e,te,$);break;default:throw Error(j(161))}}catch(le){Pe(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Eu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Eu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Su(e,t.alternate,t),t=t.sibling}function ps(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ii(4,t,t.return),ps(t);break;case 1:ai(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&_u(t,t.return,i),ps(t);break;case 27:$r(t.stateNode);case 26:case 5:ai(t,t.return),ps(t);break;case 22:t.memoizedState===null&&ps(t);break;case 30:ps(t);break;default:ps(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,a=e,d=t,E=d.flags;switch(d.tag){case 0:case 11:case 15:wi(a,d,i),zr(4,d);break;case 1:if(wi(a,d,i),s=d,a=s.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(te){Pe(s,s.return,te)}if(s=d,a=s.updateQueue,a!==null){var k=s.stateNode;try{var $=a.shared.hiddenCallbacks;if($!==null)for(a.shared.hiddenCallbacks=null,a=0;a<$.length;a++)ih($[a],k)}catch(te){Pe(s,s.return,te)}}i&&E&64&&fu(d),Nr(d,d.return);break;case 27:mu(d);case 26:case 5:wi(a,d,i),i&&s===null&&E&4&&vu(d),Nr(d,d.return);break;case 12:wi(a,d,i);break;case 31:wi(a,d,i),i&&E&4&&Cu(a,d);break;case 13:wi(a,d,i),i&&E&4&&xu(a,d);break;case 22:d.memoizedState===null&&wi(a,d,i),Nr(d,d.return);break;case 30:break;default:wi(a,d,i)}t=t.sibling}}function $l(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&&Cr(i))}function Gl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e))}function ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Lu(e,t,i,s),t=t.sibling}function Lu(e,t,i,s){var a=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,i,s),a&2048&&zr(9,t);break;case 1:ii(e,t,i,s);break;case 3:ii(e,t,i,s),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e)));break;case 12:if(a&2048){ii(e,t,i,s),e=t.stateNode;try{var d=t.memoizedProps,E=d.id,k=d.onPostCommit;typeof k=="function"&&k(E,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch($){Pe(t,t.return,$)}}else ii(e,t,i,s);break;case 31:ii(e,t,i,s);break;case 13:ii(e,t,i,s);break;case 23:break;case 22:d=t.stateNode,E=t.alternate,t.memoizedState!==null?d._visibility&2?ii(e,t,i,s):Hr(e,t):d._visibility&2?ii(e,t,i,s):(d._visibility|=2,Xs(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),a&2048&&$l(E,t);break;case 24:ii(e,t,i,s),a&2048&&Gl(t.alternate,t);break;default:ii(e,t,i,s)}}function Xs(e,t,i,s,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var d=e,E=t,k=i,$=s,te=E.flags;switch(E.tag){case 0:case 11:case 15:Xs(d,E,k,$,a),zr(8,E);break;case 23:break;case 22:var le=E.stateNode;E.memoizedState!==null?le._visibility&2?Xs(d,E,k,$,a):Hr(d,E):(le._visibility|=2,Xs(d,E,k,$,a)),a&&te&2048&&$l(E.alternate,E);break;case 24:Xs(d,E,k,$,a),a&&te&2048&&Gl(E.alternate,E);break;default:Xs(d,E,k,$,a)}t=t.sibling}}function Hr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,a=s.flags;switch(s.tag){case 22:Hr(i,s),a&2048&&$l(s.alternate,s);break;case 24:Hr(i,s),a&2048&&Gl(s.alternate,s);break;default:Hr(i,s)}t=t.sibling}}var jr=8192;function Vs(e,t,i){if(e.subtreeFlags&jr)for(e=e.child;e!==null;)Au(e,t,i),e=e.sibling}function Au(e,t,i){switch(e.tag){case 26:Vs(e,t,i),e.flags&jr&&e.memoizedState!==null&&gv(i,ti,e.memoizedState,e.memoizedProps);break;case 5:Vs(e,t,i);break;case 3:case 4:var s=ti;ti=ta(e.stateNode.containerInfo),Vs(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=jr,jr=16777216,Vs(e,t,i),jr=s):Vs(e,t,i));break;default:Vs(e,t,i)}}function Ru(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 Ur(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];_t=s,Tu(s,e)}Ru(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Du(e),e=e.sibling}function Du(e){switch(e.tag){case 0:case 11:case 15:Ur(e),e.flags&2048&&Ii(9,e,e.return);break;case 3:Ur(e);break;case 12:Ur(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fn(e)):Ur(e);break;default:Ur(e)}}function Fn(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];_t=s,Tu(s,e)}Ru(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ii(8,t,t.return),Fn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Fn(t));break;default:Fn(t)}e=e.sibling}}function Tu(e,t){for(;_t!==null;){var i=_t;switch(i.tag){case 0:case 11:case 15:Ii(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:Cr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,_t=s;else e:for(i=e;_t!==null;){s=_t;var a=s.sibling,d=s.return;if(bu(s),s===i){_t=null;break e}if(a!==null){a.return=d,_t=a;break e}_t=d}}}var M_={getCacheForType:function(e){var t=mt(at),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return mt(at).controller.signal}},B_=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Ye=null,Te=null,Oe=0,Ie=0,jt=null,Pi=!1,Ks=!1,Yl=!1,Ei=0,it=0,Fi=0,Ss=0,Xl=0,Ut=0,Qs=0,Ir=null,Tt=null,Vl=!1,qn=0,Mu=0,Wn=1/0,$n=null,qi=null,ut=0,Wi=null,Zs=null,Li=0,Kl=0,Ql=null,Bu=null,Pr=0,Zl=null;function It(){return(Ue&2)!==0&&Oe!==0?Oe&-Oe:I.T!==null?ro():Xo()}function Ou(){if(Ut===0)if((Oe&536870912)===0||ze){var e=ts;ts<<=1,(ts&3932160)===0&&(ts=262144),Ut=e}else Ut=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Ut}function Mt(e,t,i){(e===Ye&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Js(e,0),$i(e,Oe,Ut,!1)),or(e,i),((Ue&2)===0||e!==Ye)&&(e===Ye&&((Ue&2)===0&&(Ss|=i),it===4&&$i(e,Oe,Ut,!1)),li(e))}function ku(e,t,i){if((Ue&6)!==0)throw Error(j(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||lr(e,t),a=s?z_(e,t):eo(e,t,!0),d=s;do{if(a===0){Ks&&!s&&$i(e,t,0,!1);break}else{if(i=e.current.alternate,d&&!O_(i)){a=eo(e,t,!1),d=!1;continue}if(a===2){if(d=t,e.errorRecoveryDisabledLanes&d)var E=0;else E=e.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){t=E;e:{var k=e;a=Ir;var $=k.current.memoizedState.isDehydrated;if($&&(Js(k,E).flags|=256),E=eo(k,E,!1),E!==2){if(Yl&&!$){k.errorRecoveryDisabledLanes|=d,Ss|=d,a=4;break e}d=Tt,Tt=a,d!==null&&(Tt===null?Tt=d:Tt.push.apply(Tt,d))}a=E}if(d=!1,a!==2)continue}}if(a===1){Js(e,0),$i(e,t,0,!0);break}e:{switch(s=e,d=a,d){case 0:case 1:throw Error(j(345));case 4:if((t&4194048)!==t)break;case 6:$i(s,t,Ut,!Pi);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(j(329))}if((t&62914560)===t&&(a=qn+300-Ce(),10<a)){if($i(s,t,Ut,!Pi),en(s,0,!0)!==0)break e;Li=t,s.timeoutHandle=ud(zu.bind(null,s,i,Tt,$n,Vl,t,Ut,Ss,Qs,Pi,d,"Throttled",-0,0),a);break e}zu(s,i,Tt,$n,Vl,t,Ut,Ss,Qs,Pi,d,null,-0,0)}}break}while(!0);li(e)}function zu(e,t,i,s,a,d,E,k,$,te,le,ce,ie,ae){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ui},Au(t,d,ce);var ge=(d&62914560)===d?qn-Ce():(d&4194048)===d?Mu-Ce():0;if(ge=mv(ce,ge),ge!==null){Li=d,e.cancelPendingCommit=ge(qu.bind(null,e,t,d,i,s,a,E,k,$,le,ce,null,ie,ae)),$i(e,d,E,!te);return}}qu(e,t,d,i,s,a,E,k,$)}function O_(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 a=i[s],d=a.getSnapshot;a=a.value;try{if(!kt(d(),a))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 $i(e,t,i,s){t&=~Xl,t&=~Ss,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var a=t;0<a;){var d=31-bt(a),E=1<<d;s[d]=-1,a&=~E}i!==0&&$o(e,i,t)}function Gn(){return(Ue&6)===0?(Fr(0),!1):!0}function Jl(){if(Te!==null){if(Ie===0)var e=Te.return;else e=Te,vi=hs=null,vl(e),qs=null,wr=0,e=Te;for(;e!==null;)du(e.alternate,e),e=e.return;Te=null}}function Js(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,J_(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Li=0,Jl(),Ye=e,Te=i=fi(e.current,null),Oe=t,Ie=0,jt=null,Pi=!1,Ks=lr(e,t),Yl=!1,Qs=Ut=Xl=Ss=Fi=it=0,Tt=Ir=null,Vl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var a=31-bt(s),d=1<<a;t|=e[a],s&=~d}return Ei=t,fn(),i}function Nu(e,t){Ee=null,I.H=Br,t===Fs||t===yn?(t=Zc(),Ie=3):t===sl?(t=Zc(),Ie=4):Ie=t===Ml?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,Te===null&&(it=1,zn(e,Gt(t,e.current)))}function Hu(){var e=Nt.current;return e===null?!0:(Oe&4194048)===Oe?Kt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===Kt:!1}function ju(){var e=I.H;return I.H=Br,e===null?Br:e}function Uu(){var e=I.A;return I.A=M_,e}function Yn(){it=4,Pi||(Oe&4194048)!==Oe&&Nt.current!==null||(Ks=!0),(Fi&134217727)===0&&(Ss&134217727)===0||Ye===null||$i(Ye,Oe,Ut,!1)}function eo(e,t,i){var s=Ue;Ue|=2;var a=ju(),d=Uu();(Ye!==e||Oe!==t)&&($n=null,Js(e,t)),t=!1;var E=it;e:do try{if(Ie!==0&&Te!==null){var k=Te,$=jt;switch(Ie){case 8:Jl(),E=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var te=Ie;if(Ie=0,jt=null,er(e,k,$,te),i&&Ks){E=0;break e}break;default:te=Ie,Ie=0,jt=null,er(e,k,$,te)}}k_(),E=it;break}catch(le){Nu(e,le)}while(!0);return t&&e.shellSuspendCounter++,vi=hs=null,Ue=s,I.H=a,I.A=d,Te===null&&(Ye=null,Oe=0,fn()),E}function k_(){for(;Te!==null;)Iu(Te)}function z_(e,t){var i=Ue;Ue|=2;var s=ju(),a=Uu();Ye!==e||Oe!==t?($n=null,Wn=Ce()+500,Js(e,t)):Ks=lr(e,t);e:do try{if(Ie!==0&&Te!==null){t=Te;var d=jt;t:switch(Ie){case 1:Ie=0,jt=null,er(e,t,d,1);break;case 2:case 9:if(Kc(d)){Ie=0,jt=null,Pu(t);break}t=function(){Ie!==2&&Ie!==9||Ye!==e||(Ie=7),li(e)},d.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Kc(d)?(Ie=0,jt=null,Pu(t)):(Ie=0,jt=null,er(e,t,d,7));break;case 5:var E=null;switch(Te.tag){case 26:E=Te.memoizedState;case 5:case 27:var k=Te;if(E?Ld(E):k.stateNode.complete){Ie=0,jt=null;var $=k.sibling;if($!==null)Te=$;else{var te=k.return;te!==null?(Te=te,Xn(te)):Te=null}break t}}Ie=0,jt=null,er(e,t,d,5);break;case 6:Ie=0,jt=null,er(e,t,d,6);break;case 8:Jl(),it=6;break e;default:throw Error(j(462))}}N_();break}catch(le){Nu(e,le)}while(!0);return vi=hs=null,I.H=s,I.A=a,Ue=i,Te!==null?0:(Ye=null,Oe=0,fn(),it)}function N_(){for(;Te!==null&&!De();)Iu(Te)}function Iu(e){var t=hu(e.alternate,e,Ei);e.memoizedProps=e.pendingProps,t===null?Xn(e):Te=t}function Pu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=ru(i,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=ru(i,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:vl(t);default:du(i,t),t=Te=Uc(t,Ei),t=hu(i,t,Ei)}e.memoizedProps=e.pendingProps,t===null?Xn(e):Te=t}function er(e,t,i,s){vi=hs=null,vl(t),qs=null,wr=0;var a=t.return;try{if(w_(e,a,t,i,Oe)){it=1,zn(e,Gt(i,e.current)),Te=null;return}}catch(d){if(a!==null)throw Te=a,d;it=1,zn(e,Gt(i,e.current)),Te=null;return}t.flags&32768?(ze||s===1?e=!0:Ks||(Oe&536870912)!==0?e=!1:(Pi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Nt.current,s!==null&&s.tag===13&&(s.flags|=16384))),Fu(t,e)):Xn(t)}function Xn(e){var t=e;do{if((t.flags&32768)!==0){Fu(t,Pi);return}e=t.return;var i=A_(t.alternate,t,Ei);if(i!==null){Te=i;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);it===0&&(it=5)}function Fu(e,t){do{var i=R_(e.alternate,e);if(i!==null){i.flags&=32767,Te=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=i}while(e!==null);it=6,Te=null}function qu(e,t,i,s,a,d,E,k,$){e.cancelPendingCommit=null;do Vn();while(ut!==0);if((Ue&6)!==0)throw Error(j(327));if(t!==null){if(t===e.current)throw Error(j(177));if(d=t.lanes|t.childLanes,d|=Fa,vf(e,i,d,E,k,$),e===Ye&&(Te=Ye=null,Oe=0),Zs=t,Wi=e,Li=i,Kl=d,Ql=a,Bu=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,I_(ht,function(){return Xu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=I.T,I.T=null,a=q.p,q.p=2,E=Ue,Ue|=4;try{D_(e,t,i)}finally{Ue=E,q.p=a,I.T=s}}ut=1,Wu(),$u(),Gu()}}function Wu(){if(ut===1){ut=0;var e=Wi,t=Zs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=I.T,I.T=null;var s=q.p;q.p=2;var a=Ue;Ue|=4;try{wu(t,e);var d=fo,E=Tc(e.containerInfo),k=d.focusedElem,$=d.selectionRange;if(E!==k&&k&&k.ownerDocument&&Dc(k.ownerDocument.documentElement,k)){if($!==null&&Ha(k)){var te=$.start,le=$.end;if(le===void 0&&(le=te),"selectionStart"in k)k.selectionStart=te,k.selectionEnd=Math.min(le,k.value.length);else{var ce=k.ownerDocument||document,ie=ce&&ce.defaultView||window;if(ie.getSelection){var ae=ie.getSelection(),ge=k.textContent.length,ye=Math.min($.start,ge),Ge=$.end===void 0?ye:Math.min($.end,ge);!ae.extend&&ye>Ge&&(E=Ge,Ge=ye,ye=E);var Q=Rc(k,ye),X=Rc(k,Ge);if(Q&&X&&(ae.rangeCount!==1||ae.anchorNode!==Q.node||ae.anchorOffset!==Q.offset||ae.focusNode!==X.node||ae.focusOffset!==X.offset)){var ee=ce.createRange();ee.setStart(Q.node,Q.offset),ae.removeAllRanges(),ye>Ge?(ae.addRange(ee),ae.extend(X.node,X.offset)):(ee.setEnd(X.node,X.offset),ae.addRange(ee))}}}}for(ce=[],ae=k;ae=ae.parentNode;)ae.nodeType===1&&ce.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ce.length;k++){var oe=ce[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}la=!!uo,fo=uo=null}finally{Ue=a,q.p=s,I.T=i}}e.current=t,ut=2}}function $u(){if(ut===2){ut=0;var e=Wi,t=Zs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=I.T,I.T=null;var s=q.p;q.p=2;var a=Ue;Ue|=4;try{Su(e,t.alternate,t)}finally{Ue=a,q.p=s,I.T=i}}ut=3}}function Gu(){if(ut===4||ut===3){ut=0,ve();var e=Wi,t=Zs,i=Li,s=Bu;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,Zs=Wi=null,Yu(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(qi=null),pa(i),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Jt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=I.T,a=q.p,q.p=2,I.T=null;try{for(var d=e.onRecoverableError,E=0;E<s.length;E++){var k=s[E];d(k.value,{componentStack:k.stack})}}finally{I.T=t,q.p=a}}(Li&3)!==0&&Vn(),li(e),a=e.pendingLanes,(i&261930)!==0&&(a&42)!==0?e===Zl?Pr++:(Pr=0,Zl=e):Pr=0,Fr(0)}}function Yu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Cr(t)))}function Vn(){return Wu(),$u(),Gu(),Xu()}function Xu(){if(ut!==5)return!1;var e=Wi,t=Kl;Kl=0;var i=pa(Li),s=I.T,a=q.p;try{q.p=32>i?32:i,I.T=null,i=Ql,Ql=null;var d=Wi,E=Li;if(ut=0,Zs=Wi=null,Li=0,(Ue&6)!==0)throw Error(j(331));var k=Ue;if(Ue|=4,Du(d.current),Lu(d,d.current,E,i),Ue=k,Fr(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Jt,d)}catch{}return!0}finally{q.p=a,I.T=s,Yu(e,t)}}function Vu(e,t,i){t=Gt(i,t),t=Tl(e.stateNode,t,2),e=Hi(e,t,2),e!==null&&(or(e,2),li(e))}function Pe(e,t,i){if(e.tag===3)Vu(e,e,i);else for(;t!==null;){if(t.tag===3){Vu(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(qi===null||!qi.has(s))){e=Gt(i,e),i=Kh(2),s=Hi(t,i,2),s!==null&&(Qh(i,s,t,e),or(s,2),li(s));break}}t=t.return}}function to(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new B_;var a=new Set;s.set(t,a)}else a=s.get(t),a===void 0&&(a=new Set,s.set(t,a));a.has(i)||(Yl=!0,a.add(i),e=H_.bind(null,e,t,i),t.then(e,e))}function H_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ye===e&&(Oe&i)===i&&(it===4||it===3&&(Oe&62914560)===Oe&&300>Ce()-qn?(Ue&2)===0&&Js(e,0):Xl|=i,Qs===Oe&&(Qs=0)),li(e)}function Ku(e,t){t===0&&(t=Wo()),e=ls(e,t),e!==null&&(or(e,t),li(e))}function j_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Ku(e,i)}function U_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,a=e.memoizedState;a!==null&&(i=a.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(j(314))}s!==null&&s.delete(t),Ku(e,i)}function I_(e,t){return Be(e,t)}var Kn=null,tr=null,io=!1,Qn=!1,so=!1,Gi=0;function li(e){e!==tr&&e.next===null&&(tr===null?Kn=tr=e:tr=tr.next=e),Qn=!0,io||(io=!0,F_())}function Fr(e,t){if(!so&&Qn){so=!0;do for(var i=!1,s=Kn;s!==null;){if(e!==0){var a=s.pendingLanes;if(a===0)var d=0;else{var E=s.suspendedLanes,k=s.pingedLanes;d=(1<<31-bt(42|e)+1)-1,d&=a&~(E&~k),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,ed(s,d))}else d=Oe,d=en(s,s===Ye?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(d&3)===0||lr(s,d)||(i=!0,ed(s,d));s=s.next}while(i);so=!1}}function P_(){Qu()}function Qu(){Qn=io=!1;var e=0;Gi!==0&&Z_()&&(e=Gi);for(var t=Ce(),i=null,s=Kn;s!==null;){var a=s.next,d=Zu(s,t);d===0?(s.next=null,i===null?Kn=a:i.next=a,a===null&&(tr=i)):(i=s,(e!==0||(d&3)!==0)&&(Qn=!0)),s=a}ut!==0&&ut!==5||Fr(e),Gi!==0&&(Gi=0)}function Zu(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,a=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var E=31-bt(d),k=1<<E,$=a[E];$===-1?((k&i)===0||(k&s)!==0)&&(a[E]=_f(k,t)):$<=t&&(e.expiredLanes|=k),d&=~k}if(t=Ye,i=Oe,i=en(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ae(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||lr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Ae(s),pa(i)){case 2:case 8:i=Ft;break;case 32:i=ht;break;case 268435456:i=et;break;default:i=ht}return s=Ju.bind(null,e),i=Be(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Ae(s),e.callbackPriority=2,e.callbackNode=null,2}function Ju(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Vn()&&e.callbackNode!==i)return null;var s=Oe;return s=en(e,e===Ye?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(ku(e,s,t),Zu(e,Ce()),e.callbackNode!=null&&e.callbackNode===i?Ju.bind(null,e):null)}function ed(e,t){if(Vn())return null;ku(e,t,!0)}function F_(){ev(function(){(Ue&6)!==0?Be(Fe,P_):Qu()})}function ro(){if(Gi===0){var e=Is;e===0&&(e=Ri,Ri<<=1,(Ri&261888)===0&&(Ri=256)),Gi=e}return Gi}function td(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:nn(""+e)}function id(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 q_(e,t,i,s,a){if(t==="submit"&&i&&i.stateNode===a){var d=td((a[Et]||null).action),E=s.submitter;E&&(t=(t=E[Et]||null)?td(t.formAction):E.getAttribute("formAction"),t!==null&&(d=t,E=null));var k=new cn("action","action",null,s,a);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Gi!==0){var $=E?id(a,E):new FormData(a);wl(i,{pending:!0,data:$,method:a.method,action:d},null,$)}}else typeof d=="function"&&(k.preventDefault(),$=E?id(a,E):new FormData(a),wl(i,{pending:!0,data:$,method:a.method,action:d},d,$))},currentTarget:a}]})}}for(var no=0;no<Pa.length;no++){var ao=Pa[no],W_=ao.toLowerCase(),$_=ao[0].toUpperCase()+ao.slice(1);ei(W_,"on"+$_)}ei(Oc,"onAnimationEnd"),ei(kc,"onAnimationIteration"),ei(zc,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(l_,"onTransitionRun"),ei(o_,"onTransitionStart"),ei(c_,"onTransitionCancel"),ei(Nc,"onTransitionEnd"),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),ss("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ss("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ss("onBeforeInput",["compositionend","keypress","textInput","paste"]),ss("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ss("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),G_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qr));function sd(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],a=s.event;s=s.listeners;e:{var d=void 0;if(t)for(var E=s.length-1;0<=E;E--){var k=s[E],$=k.instance,te=k.currentTarget;if(k=k.listener,$!==d&&a.isPropagationStopped())break e;d=k,a.currentTarget=te;try{d(a)}catch(le){dn(le)}a.currentTarget=null,d=$}else for(E=0;E<s.length;E++){if(k=s[E],$=k.instance,te=k.currentTarget,k=k.listener,$!==d&&a.isPropagationStopped())break e;d=k,a.currentTarget=te;try{d(a)}catch(le){dn(le)}a.currentTarget=null,d=$}}}}function Me(e,t){var i=t[Sa];i===void 0&&(i=t[Sa]=new Set);var s=e+"__bubble";i.has(s)||(rd(t,e,2,!1),i.add(s))}function lo(e,t,i){var s=0;t&&(s|=4),rd(i,e,s,t)}var Zn="_reactListening"+Math.random().toString(36).slice(2);function oo(e){if(!e[Zn]){e[Zn]=!0,Qo.forEach(function(i){i!=="selectionchange"&&(G_.has(i)||lo(i,!1,e),lo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zn]||(t[Zn]=!0,lo("selectionchange",!1,t))}}function rd(e,t,i,s){switch(Od(t)){case 2:var a=bv;break;case 8:a=yv;break;default:a=wo}i=a.bind(null,t,i,e),a=void 0,!Ra||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),s?a!==void 0?e.addEventListener(t,i,{capture:!0,passive:a}):e.addEventListener(t,i,!0):a!==void 0?e.addEventListener(t,i,{passive:a}):e.addEventListener(t,i,!1)}function co(e,t,i,s,a){var d=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var E=s.tag;if(E===3||E===4){var k=s.stateNode.containerInfo;if(k===a)break;if(E===4)for(E=s.return;E!==null;){var $=E.tag;if(($===3||$===4)&&E.stateNode.containerInfo===a)return;E=E.return}for(;k!==null;){if(E=xs(k),E===null)return;if($=E.tag,$===5||$===6||$===26||$===27){s=d=E;continue e}k=k.parentNode}}s=s.return}cc(function(){var te=d,le=La(i),ce=[];e:{var ie=Hc.get(e);if(ie!==void 0){var ae=cn,ge=e;switch(e){case"keypress":if(ln(i)===0)break e;case"keydown":case"keyup":ae=Uf;break;case"focusin":ge="focus",ae=Ba;break;case"focusout":ge="blur",ae=Ba;break;case"beforeblur":case"afterblur":ae=Ba;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":ae=dc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=Af;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=Ff;break;case Oc:case kc:case zc:ae=Tf;break;case Nc:ae=Wf;break;case"scroll":case"scrollend":ae=Ef;break;case"wheel":ae=Gf;break;case"copy":case"cut":case"paste":ae=Bf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=_c;break;case"toggle":case"beforetoggle":ae=Xf}var ye=(t&4)!==0,Ge=!ye&&(e==="scroll"||e==="scrollend"),Q=ye?ie!==null?ie+"Capture":null:ie;ye=[];for(var X=te,ee;X!==null;){var oe=X;if(ee=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||ee===null||Q===null||(oe=ur(X,Q),oe!=null&&ye.push(Wr(X,oe,ee))),Ge)break;X=X.return}0<ye.length&&(ie=new ae(ie,ge,null,i,le),ce.push({event:ie,listeners:ye}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",ie&&i!==Ea&&(ge=i.relatedTarget||i.fromElement)&&(xs(ge)||ge[Cs]))break e;if((ae||ie)&&(ie=le.window===le?le:(ie=le.ownerDocument)?ie.defaultView||ie.parentWindow:window,ae?(ge=i.relatedTarget||i.toElement,ae=te,ge=ge?xs(ge):null,ge!==null&&(Ge=se(ge),ye=ge.tag,ge!==Ge||ye!==5&&ye!==27&&ye!==6)&&(ge=null)):(ae=null,ge=te),ae!==ge)){if(ye=dc,oe="onMouseLeave",Q="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(ye=_c,oe="onPointerLeave",Q="onPointerEnter",X="pointer"),Ge=ae==null?ie:hr(ae),ee=ge==null?ie:hr(ge),ie=new ye(oe,X+"leave",ae,i,le),ie.target=Ge,ie.relatedTarget=ee,oe=null,xs(le)===te&&(ye=new ye(Q,X+"enter",ge,i,le),ye.target=ee,ye.relatedTarget=Ge,oe=ye),Ge=oe,ae&&ge)t:{for(ye=Y_,Q=ae,X=ge,ee=0,oe=Q;oe;oe=ye(oe))ee++;oe=0;for(var Se=X;Se;Se=ye(Se))oe++;for(;0<ee-oe;)Q=ye(Q),ee--;for(;0<oe-ee;)X=ye(X),oe--;for(;ee--;){if(Q===X||X!==null&&Q===X.alternate){ye=Q;break t}Q=ye(Q),X=ye(X)}ye=null}else ye=null;ae!==null&&nd(ce,ie,ae,ye,!1),ge!==null&&Ge!==null&&nd(ce,Ge,ge,ye,!0)}}e:{if(ie=te?hr(te):window,ae=ie.nodeName&&ie.nodeName.toLowerCase(),ae==="select"||ae==="input"&&ie.type==="file")var He=Cc;else if(bc(ie))if(xc)He=r_;else{He=i_;var me=t_}else ae=ie.nodeName,!ae||ae.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?te&&wa(te.elementType)&&(He=Cc):He=s_;if(He&&(He=He(e,te))){yc(ce,He,i,le);break e}me&&me(e,ie,te),e==="focusout"&&te&&ie.type==="number"&&te.memoizedProps.value!=null&&xa(ie,"number",ie.value)}switch(me=te?hr(te):window,e){case"focusin":(bc(me)||me.contentEditable==="true")&&(Bs=me,ja=te,Sr=null);break;case"focusout":Sr=ja=Bs=null;break;case"mousedown":Ua=!0;break;case"contextmenu":case"mouseup":case"dragend":Ua=!1,Mc(ce,i,le);break;case"selectionchange":if(a_)break;case"keydown":case"keyup":Mc(ce,i,le)}var Le;if(ka)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 Ms?pc(e,i)&&(ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ke="onCompositionStart");ke&&(vc&&i.locale!=="ko"&&(Ms||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Ms&&(Le=hc()):(Ti=le,Da="value"in Ti?Ti.value:Ti.textContent,Ms=!0)),me=Jn(te,ke),0<me.length&&(ke=new fc(ke,e,null,i,le),ce.push({event:ke,listeners:me}),Le?ke.data=Le:(Le=Sc(i),Le!==null&&(ke.data=Le)))),(Le=Kf?Qf(e,i):Zf(e,i))&&(ke=Jn(te,"onBeforeInput"),0<ke.length&&(me=new fc("onBeforeInput","beforeinput",null,i,le),ce.push({event:me,listeners:ke}),me.data=Le)),q_(ce,e,te,i,le)}sd(ce,t)})}function Wr(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Jn(e,t){for(var i=t+"Capture",s=[];e!==null;){var a=e,d=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||d===null||(a=ur(e,i),a!=null&&s.unshift(Wr(e,a,d)),a=ur(e,t),a!=null&&s.push(Wr(e,a,d))),e.tag===3)return s;e=e.return}return[]}function Y_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function nd(e,t,i,s,a){for(var d=t._reactName,E=[];i!==null&&i!==s;){var k=i,$=k.alternate,te=k.stateNode;if(k=k.tag,$!==null&&$===s)break;k!==5&&k!==26&&k!==27||te===null||($=te,a?(te=ur(i,d),te!=null&&E.unshift(Wr(i,te,$))):a||(te=ur(i,d),te!=null&&E.push(Wr(i,te,$)))),i=i.return}E.length!==0&&e.push({event:t,listeners:E})}var X_=/\r\n?/g,V_=/\u0000|\uFFFD/g;function ad(e){return(typeof e=="string"?e:""+e).replace(X_,`
|
|
49
|
-
`).replace(V_,"")}function ld(e,t){return t=ad(t),ad(e)===t}function $e(e,t,i,s,a,d){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Rs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Rs(e,""+s);break;case"className":sn(e,"class",s);break;case"tabIndex":sn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":sn(e,i,s);break;case"style":lc(e,s,d);break;case"data":if(t!=="object"){sn(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=nn(""+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 d=="function"&&(i==="formAction"?(t!=="input"&&$e(e,t,"name",a.name,a,null),$e(e,t,"formEncType",a.formEncType,a,null),$e(e,t,"formMethod",a.formMethod,a,null),$e(e,t,"formTarget",a.formTarget,a,null)):($e(e,t,"encType",a.encType,a,null),$e(e,t,"method",a.method,a,null),$e(e,t,"target",a.target,a,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=nn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ui);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(a.children!=null)throw Error(j(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=nn(""+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":Me("beforetoggle",e),Me("toggle",e),tn(e,"popover",s);break;case"xlinkActuate":hi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":hi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":hi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":hi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":hi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":hi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":hi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":hi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":hi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":tn(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=xf.get(i)||i,tn(e,i,s))}}function ho(e,t,i,s,a,d){switch(i){case"style":lc(e,s,d);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(a.children!=null)throw Error(j(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Rs(e,s):(typeof s=="number"||typeof s=="bigint")&&Rs(e,""+s);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ui);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(a=i.endsWith("Capture"),t=i.slice(2,a?i.length-7:void 0),d=e[Et]||null,d=d!=null?d[i]:null,typeof d=="function"&&e.removeEventListener(t,d,a),typeof s=="function")){typeof d!="function"&&d!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,a);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):tn(e,i,s)}}}function St(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var s=!1,a=!1,d;for(d in i)if(i.hasOwnProperty(d)){var E=i[d];if(E!=null)switch(d){case"src":s=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:$e(e,t,d,E,i,null)}}a&&$e(e,t,"srcSet",i.srcSet,i,null),s&&$e(e,t,"src",i.src,i,null);return;case"input":Me("invalid",e);var k=d=E=a=null,$=null,te=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":a=le;break;case"type":E=le;break;case"checked":$=le;break;case"defaultChecked":te=le;break;case"value":d=le;break;case"defaultValue":k=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(j(137,t));break;default:$e(e,t,s,le,i,null)}}sc(e,d,k,$,te,E,a,!1);return;case"select":Me("invalid",e),s=E=d=null;for(a in i)if(i.hasOwnProperty(a)&&(k=i[a],k!=null))switch(a){case"value":d=k;break;case"defaultValue":E=k;break;case"multiple":s=k;default:$e(e,t,a,k,i,null)}t=d,i=E,e.multiple=!!s,t!=null?As(e,!!s,t,!1):i!=null&&As(e,!!s,i,!0);return;case"textarea":Me("invalid",e),d=a=s=null;for(E in i)if(i.hasOwnProperty(E)&&(k=i[E],k!=null))switch(E){case"value":s=k;break;case"defaultValue":a=k;break;case"children":d=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(j(91));break;default:$e(e,t,E,k,i,null)}nc(e,s,a,d);return;case"option":for($ in i)if(i.hasOwnProperty($)&&(s=i[$],s!=null))switch($){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:$e(e,t,$,s,i,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(s=0;s<qr.length;s++)Me(qr[s],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(te in i)if(i.hasOwnProperty(te)&&(s=i[te],s!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:$e(e,t,te,s,i,null)}return;default:if(wa(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&ho(e,t,le,s,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null&&$e(e,t,k,s,i,null))}function K_(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 a=null,d=null,E=null,k=null,$=null,te=null,le=null;for(ae in i){var ce=i[ae];if(i.hasOwnProperty(ae)&&ce!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":$=ce;default:s.hasOwnProperty(ae)||$e(e,t,ae,null,s,ce)}}for(var ie in s){var ae=s[ie];if(ce=i[ie],s.hasOwnProperty(ie)&&(ae!=null||ce!=null))switch(ie){case"type":d=ae;break;case"name":a=ae;break;case"checked":te=ae;break;case"defaultChecked":le=ae;break;case"value":E=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(j(137,t));break;default:ae!==ce&&$e(e,t,ie,ae,s,ce)}}Ca(e,E,k,$,te,le,d,a);return;case"select":ae=E=k=ie=null;for(d in i)if($=i[d],i.hasOwnProperty(d)&&$!=null)switch(d){case"value":break;case"multiple":ae=$;default:s.hasOwnProperty(d)||$e(e,t,d,null,s,$)}for(a in s)if(d=s[a],$=i[a],s.hasOwnProperty(a)&&(d!=null||$!=null))switch(a){case"value":ie=d;break;case"defaultValue":k=d;break;case"multiple":E=d;default:d!==$&&$e(e,t,a,d,s,$)}t=k,i=E,s=ae,ie!=null?As(e,!!i,ie,!1):!!s!=!!i&&(t!=null?As(e,!!i,t,!0):As(e,!!i,i?[]:"",!1));return;case"textarea":ae=ie=null;for(k in i)if(a=i[k],i.hasOwnProperty(k)&&a!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:$e(e,t,k,null,s,a)}for(E in s)if(a=s[E],d=i[E],s.hasOwnProperty(E)&&(a!=null||d!=null))switch(E){case"value":ie=a;break;case"defaultValue":ae=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(j(91));break;default:a!==d&&$e(e,t,E,a,s,d)}rc(e,ie,ae);return;case"option":for(var ge in i)if(ie=i[ge],i.hasOwnProperty(ge)&&ie!=null&&!s.hasOwnProperty(ge))switch(ge){case"selected":e.selected=!1;break;default:$e(e,t,ge,null,s,ie)}for($ in s)if(ie=s[$],ae=i[$],s.hasOwnProperty($)&&ie!==ae&&(ie!=null||ae!=null))switch($){case"selected":e.selected=ie&&typeof ie!="function"&&typeof ie!="symbol";break;default:$e(e,t,$,ie,s,ae)}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 ye in i)ie=i[ye],i.hasOwnProperty(ye)&&ie!=null&&!s.hasOwnProperty(ye)&&$e(e,t,ye,null,s,ie);for(te in s)if(ie=s[te],ae=i[te],s.hasOwnProperty(te)&&ie!==ae&&(ie!=null||ae!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(j(137,t));break;default:$e(e,t,te,ie,s,ae)}return;default:if(wa(t)){for(var Ge in i)ie=i[Ge],i.hasOwnProperty(Ge)&&ie!==void 0&&!s.hasOwnProperty(Ge)&&ho(e,t,Ge,void 0,s,ie);for(le in s)ie=s[le],ae=i[le],!s.hasOwnProperty(le)||ie===ae||ie===void 0&&ae===void 0||ho(e,t,le,ie,s,ae);return}}for(var Q in i)ie=i[Q],i.hasOwnProperty(Q)&&ie!=null&&!s.hasOwnProperty(Q)&&$e(e,t,Q,null,s,ie);for(ce in s)ie=s[ce],ae=i[ce],!s.hasOwnProperty(ce)||ie===ae||ie==null&&ae==null||$e(e,t,ce,ie,s,ae)}function od(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Q_(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var a=i[s],d=a.transferSize,E=a.initiatorType,k=a.duration;if(d&&k&&od(E)){for(E=0,k=a.responseEnd,s+=1;s<i.length;s++){var $=i[s],te=$.startTime;if(te>k)break;var le=$.transferSize,ce=$.initiatorType;le&&od(ce)&&($=$.responseEnd,E+=le*($<k?1:(k-te)/($-te)))}if(--s,t+=8*(d+E)/(a.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 uo=null,fo=null;function ea(e){return e.nodeType===9?e:e.ownerDocument}function cd(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 hd(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 _o(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 vo=null;function Z_(){var e=window.event;return e&&e.type==="popstate"?e===vo?!1:(vo=e,!0):(vo=null,!1)}var ud=typeof setTimeout=="function"?setTimeout:void 0,J_=typeof clearTimeout=="function"?clearTimeout:void 0,dd=typeof Promise=="function"?Promise:void 0,ev=typeof queueMicrotask=="function"?queueMicrotask:typeof dd<"u"?function(e){return dd.resolve(null).then(e).catch(tv)}:ud;function tv(e){setTimeout(function(){throw e})}function Yi(e){return e==="head"}function fd(e,t){var i=t,s=0;do{var a=i.nextSibling;if(e.removeChild(i),a&&a.nodeType===8)if(i=a.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(a),nr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")$r(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,$r(i);for(var d=i.firstChild;d;){var E=d.nextSibling,k=d.nodeName;d[cr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=E}}else i==="body"&&$r(e.ownerDocument.body);i=a}while(i);nr(t)}function _d(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 go(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":go(i),ba(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function iv(e,t,i,s){for(;e.nodeType===1;){var a=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[cr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var d=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Qt(e.nextSibling),e===null)break}return null}function sv(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Qt(e.nextSibling),e===null))return null;return e}function vd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qt(e.nextSibling),e===null))return null;return e}function mo(e){return e.data==="$?"||e.data==="$~"}function po(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function rv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var So=null;function gd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Qt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function md(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 pd(e,t,i){switch(t=ea(i),e){case"html":if(e=t.documentElement,!e)throw Error(j(452));return e;case"head":if(e=t.head,!e)throw Error(j(453));return e;case"body":if(e=t.body,!e)throw Error(j(454));return e;default:throw Error(j(451))}}function $r(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ba(e)}var Zt=new Map,Sd=new Set;function ta(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ai=q.d;q.d={f:nv,r:av,D:lv,C:ov,L:cv,m:hv,X:dv,S:uv,M:fv};function nv(){var e=Ai.f(),t=Gn();return e||t}function av(e){var t=ws(e);t!==null&&t.tag===5&&t.type==="form"?Nh(t):Ai.r(e)}var ir=typeof document>"u"?null:document;function bd(e,t,i){var s=ir;if(s&&typeof t=="string"&&t){var a=Wt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof i=="string"&&(a+='[crossorigin="'+i+'"]'),Sd.has(a)||(Sd.add(a),e={rel:e,crossOrigin:i,href:t},s.querySelector(a)===null&&(t=s.createElement("link"),St(t,"link",e),ft(t),s.head.appendChild(t)))}}function lv(e){Ai.D(e),bd("dns-prefetch",e,null)}function ov(e,t){Ai.C(e,t),bd("preconnect",e,t)}function cv(e,t,i){Ai.L(e,t,i);var s=ir;if(s&&e&&t){var a='link[rel="preload"][as="'+Wt(t)+'"]';t==="image"&&i&&i.imageSrcSet?(a+='[imagesrcset="'+Wt(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(a+='[imagesizes="'+Wt(i.imageSizes)+'"]')):a+='[href="'+Wt(e)+'"]';var d=a;switch(t){case"style":d=sr(e);break;case"script":d=rr(e)}Zt.has(d)||(e=l({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(d,e),s.querySelector(a)!==null||t==="style"&&s.querySelector(Gr(d))||t==="script"&&s.querySelector(Yr(d))||(t=s.createElement("link"),St(t,"link",e),ft(t),s.head.appendChild(t)))}}function hv(e,t){Ai.m(e,t);var i=ir;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Wt(s)+'"][href="'+Wt(e)+'"]',d=a;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=rr(e)}if(!Zt.has(d)&&(e=l({rel:"modulepreload",href:e},t),Zt.set(d,e),i.querySelector(a)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Yr(d)))return}s=i.createElement("link"),St(s,"link",e),ft(s),i.head.appendChild(s)}}}function uv(e,t,i){Ai.S(e,t,i);var s=ir;if(s&&e){var a=Es(s).hoistableStyles,d=sr(e);t=t||"default";var E=a.get(d);if(!E){var k={loading:0,preload:null};if(E=s.querySelector(Gr(d)))k.loading=5;else{e=l({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(d))&&bo(e,i);var $=E=s.createElement("link");ft($),St($,"link",e),$._p=new Promise(function(te,le){$.onload=te,$.onerror=le}),$.addEventListener("load",function(){k.loading|=1}),$.addEventListener("error",function(){k.loading|=2}),k.loading|=4,ia(E,t,s)}E={type:"stylesheet",instance:E,count:1,state:k},a.set(d,E)}}}function dv(e,t){Ai.X(e,t);var i=ir;if(i&&e){var s=Es(i).hoistableScripts,a=rr(e),d=s.get(a);d||(d=i.querySelector(Yr(a)),d||(e=l({src:e,async:!0},t),(t=Zt.get(a))&&yo(e,t),d=i.createElement("script"),ft(d),St(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(a,d))}}function fv(e,t){Ai.M(e,t);var i=ir;if(i&&e){var s=Es(i).hoistableScripts,a=rr(e),d=s.get(a);d||(d=i.querySelector(Yr(a)),d||(e=l({src:e,async:!0,type:"module"},t),(t=Zt.get(a))&&yo(e,t),d=i.createElement("script"),ft(d),St(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},s.set(a,d))}}function yd(e,t,i,s){var a=(a=ue.current)?ta(a):null;if(!a)throw Error(j(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=sr(i.href),i=Es(a).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=sr(i.href);var d=Es(a).hoistableStyles,E=d.get(e);if(E||(a=a.ownerDocument||a,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,E),(d=a.querySelector(Gr(e)))&&!d._p&&(E.instance=d,E.state.loading=5),Zt.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},Zt.set(e,i),d||_v(a,e,i,E.state))),t&&s===null)throw Error(j(528,""));return E}if(t&&s!==null)throw Error(j(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=rr(i),i=Es(a).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(j(444,e))}}function sr(e){return'href="'+Wt(e)+'"'}function Gr(e){return'link[rel="stylesheet"]['+e+"]"}function Cd(e){return l({},e,{"data-precedence":e.precedence,precedence:null})}function _v(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}),St(t,"link",i),ft(t),e.head.appendChild(t))}function rr(e){return'[src="'+Wt(e)+'"]'}function Yr(e){return"script[async]"+e}function xd(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+Wt(i.href)+'"]');if(s)return t.instance=s,ft(s),s;var a=l({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ft(s),St(s,"style",a),ia(s,i.precedence,e),t.instance=s;case"stylesheet":a=sr(i.href);var d=e.querySelector(Gr(a));if(d)return t.state.loading|=4,t.instance=d,ft(d),d;s=Cd(i),(a=Zt.get(a))&&bo(s,a),d=(e.ownerDocument||e).createElement("link"),ft(d);var E=d;return E._p=new Promise(function(k,$){E.onload=k,E.onerror=$}),St(d,"link",s),t.state.loading|=4,ia(d,i.precedence,e),t.instance=d;case"script":return d=rr(i.src),(a=e.querySelector(Yr(d)))?(t.instance=a,ft(a),a):(s=i,(a=Zt.get(d))&&(s=l({},i),yo(s,a)),e=e.ownerDocument||e,a=e.createElement("script"),ft(a),St(a,"link",s),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(j(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ia(s,i.precedence,e));return t.instance}function ia(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=s.length?s[s.length-1]:null,d=a,E=0;E<s.length;E++){var k=s[E];if(k.dataset.precedence===t)d=k;else if(d!==a)break}d?d.parentNode.insertBefore(e,d.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function bo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var sa=null;function wd(e,t,i){if(sa===null){var s=new Map,a=sa=new Map;a.set(i,s)}else a=sa,s=a.get(i),s||(s=new Map,a.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),a=0;a<i.length;a++){var d=i[a];if(!(d[cr]||d[vt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var E=d.getAttribute(t)||"";E=e+E;var k=s.get(E);k?k.push(d):s.set(E,[d])}}return s}function Ed(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function vv(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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Ld(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function gv(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 a=sr(s.href),d=t.querySelector(Gr(a));if(d){t=d._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ra.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=d,ft(d);return}d=t.ownerDocument||t,s=Cd(s),(a=Zt.get(a))&&bo(s,a),d=d.createElement("link"),ft(d);var E=d;E._p=new Promise(function(k,$){E.onload=k,E.onerror=$}),St(d,"link",s),i.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ra.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Co=0;function mv(e,t){return e.stylesheets&&e.count===0&&aa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&aa(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+t);0<e.imgBytes&&Co===0&&(Co=62500*Q_());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&aa(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Co?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(a)}}:null}function ra(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)aa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var na=null;function aa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,na=new Map,t.forEach(pv,e),na=null,ra.call(e))}function pv(e,t){if(!(t.state.loading&4)){var i=na.get(e);if(i)var s=i.get(null);else{i=new Map,na.set(e,i);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<a.length;d++){var E=a[d];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(i.set(E.dataset.precedence,E),s=E)}s&&i.set(null,s)}a=t.instance,E=a.getAttribute("data-precedence"),d=i.get(E)||s,d===s&&i.set(null,a),i.set(E,a),this.count++,s=ra.bind(this),a.addEventListener("load",s),a.addEventListener("error",s),d?d.parentNode.insertBefore(a,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Xr={$$typeof:c,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function Sv(e,t,i,s,a,d,E,k,$){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ga(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ga(0),this.hiddenUpdates=ga(null),this.identifierPrefix=s,this.onUncaughtError=a,this.onCaughtError=d,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=$,this.incompleteTransitions=new Map}function Ad(e,t,i,s,a,d,E,k,$,te,le,ce){return e=new Sv(e,t,i,E,$,te,le,ce,k),t=1,d===!0&&(t|=24),d=zt(3,null,null,t),e.current=d,d.stateNode=e,t=el(),t.refCount++,e.pooledCache=t,t.refCount++,d.memoizedState={element:s,isDehydrated:i,cache:t},rl(d),e}function Rd(e){return e?(e=zs,e):zs}function Dd(e,t,i,s,a,d){a=Rd(a),s.context===null?s.context=a:s.pendingContext=a,s=Ni(t),s.payload={element:i},d=d===void 0?null:d,d!==null&&(s.callback=d),i=Hi(e,s,t),i!==null&&(Mt(i,e,t),Lr(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 xo(e,t){Td(e,t),(e=e.alternate)&&Td(e,t)}function Md(e){if(e.tag===13||e.tag===31){var t=ls(e,67108864);t!==null&&Mt(t,e,67108864),xo(e,67108864)}}function Bd(e){if(e.tag===13||e.tag===31){var t=It();t=ma(t);var i=ls(e,t);i!==null&&Mt(i,e,t),xo(e,t)}}var la=!0;function bv(e,t,i,s){var a=I.T;I.T=null;var d=q.p;try{q.p=2,wo(e,t,i,s)}finally{q.p=d,I.T=a}}function yv(e,t,i,s){var a=I.T;I.T=null;var d=q.p;try{q.p=8,wo(e,t,i,s)}finally{q.p=d,I.T=a}}function wo(e,t,i,s){if(la){var a=Eo(s);if(a===null)co(e,t,s,oa,i),kd(e,s);else if(xv(a,e,t,i,s))s.stopPropagation();else if(kd(e,s),t&4&&-1<Cv.indexOf(e)){for(;a!==null;){var d=ws(a);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var E=ci(d.pendingLanes);if(E!==0){var k=d;for(k.pendingLanes|=2,k.entangledLanes|=2;E;){var $=1<<31-bt(E);k.entanglements[1]|=$,E&=~$}li(d),(Ue&6)===0&&(Wn=Ce()+500,Fr(0))}}break;case 31:case 13:k=ls(d,2),k!==null&&Mt(k,d,2),Gn(),xo(d,2)}if(d=Eo(s),d===null&&co(e,t,s,oa,i),d===a)break;a=d}a!==null&&s.stopPropagation()}else co(e,t,s,null,i)}}function Eo(e){return e=La(e),Lo(e)}var oa=null;function Lo(e){if(oa=null,e=xs(e),e!==null){var t=se(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=F(t),e!==null)return e;e=null}else if(i===31){if(e=n(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 oa=e,null}function Od(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(Ze()){case Fe:return 2;case Ft:return 8;case ht:case wt:return 32;case et:return 268435456;default:return 32}default:return 32}}var Ao=!1,Xi=null,Vi=null,Ki=null,Vr=new Map,Kr=new Map,Qi=[],Cv="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 kd(e,t){switch(e){case"focusin":case"focusout":Xi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":Vr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kr.delete(t.pointerId)}}function Qr(e,t,i,s,a,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:d,targetContainers:[a]},t!==null&&(t=ws(t),t!==null&&Md(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function xv(e,t,i,s,a){switch(t){case"focusin":return Xi=Qr(Xi,e,t,i,s,a),!0;case"dragenter":return Vi=Qr(Vi,e,t,i,s,a),!0;case"mouseover":return Ki=Qr(Ki,e,t,i,s,a),!0;case"pointerover":var d=a.pointerId;return Vr.set(d,Qr(Vr.get(d)||null,e,t,i,s,a)),!0;case"gotpointercapture":return d=a.pointerId,Kr.set(d,Qr(Kr.get(d)||null,e,t,i,s,a)),!0}return!1}function zd(e){var t=xs(e.target);if(t!==null){var i=se(t);if(i!==null){if(t=i.tag,t===13){if(t=F(i),t!==null){e.blockedOn=t,Vo(e.priority,function(){Bd(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Vo(e.priority,function(){Bd(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 ca(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Eo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Ea=s,i.target.dispatchEvent(s),Ea=null}else return t=ws(i),t!==null&&Md(t),e.blockedOn=i,!1;t.shift()}return!0}function Nd(e,t,i){ca(e)&&i.delete(t)}function wv(){Ao=!1,Xi!==null&&ca(Xi)&&(Xi=null),Vi!==null&&ca(Vi)&&(Vi=null),Ki!==null&&ca(Ki)&&(Ki=null),Vr.forEach(Nd),Kr.forEach(Nd)}function ha(e,t){e.blockedOn===t&&(e.blockedOn=null,Ao||(Ao=!0,O.unstable_scheduleCallback(O.unstable_NormalPriority,wv)))}var ua=null;function Hd(e){ua!==e&&(ua=e,O.unstable_scheduleCallback(O.unstable_NormalPriority,function(){ua===e&&(ua=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],a=e[t+2];if(typeof s!="function"){if(Lo(s||i)===null)continue;break}var d=ws(i);d!==null&&(e.splice(t,3),t-=3,wl(d,{pending:!0,data:a,method:i.method,action:s},s,a))}}))}function nr(e){function t($){return ha($,e)}Xi!==null&&ha(Xi,e),Vi!==null&&ha(Vi,e),Ki!==null&&ha(Ki,e),Vr.forEach(t),Kr.forEach(t);for(var i=0;i<Qi.length;i++){var s=Qi[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Qi.length&&(i=Qi[0],i.blockedOn===null);)zd(i),i.blockedOn===null&&Qi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var a=i[s],d=i[s+1],E=a[Et]||null;if(typeof d=="function")E||Hd(i);else if(E){var k=null;if(d&&d.hasAttribute("formAction")){if(a=d,E=d[Et]||null)k=E.formAction;else if(Lo(a)!==null)continue}else k=E.action;typeof k=="function"?i[s+1]=k:(i.splice(s,3),s-=3),Hd(i)}}}function jd(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(E){return a=E})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,a=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),a!==null&&(a(),a=null)}}}function Ro(e){this._internalRoot=e}da.prototype.render=Ro.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));var i=t.current,s=It();Dd(i,s,e,t,null,null)},da.prototype.unmount=Ro.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Dd(e.current,2,null,e,null,null),Gn(),t[Cs]=null}};function da(e){this._internalRoot=e}da.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Qi.length&&t!==0&&t<Qi[i].priority;i++);Qi.splice(i,0,e),i===0&&zd(e)}};var Ud=Y.version;if(Ud!=="19.2.6")throw Error(j(527,Ud,"19.2.6"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=_(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Ev={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fa.isDisabled&&fa.supportsFiber)try{Jt=fa.inject(Ev),dt=fa}catch{}}return Jr.createRoot=function(e,t){if(!Z(e))throw Error(j(299));var i=!1,s="",a=Gh,d=Yh,E=Xh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(d=t.onCaughtError),t.onRecoverableError!==void 0&&(E=t.onRecoverableError)),t=Ad(e,1,!1,null,null,i,s,null,a,d,E,jd),e[Cs]=t.current,oo(e),new Ro(t)},Jr.hydrateRoot=function(e,t,i){if(!Z(e))throw Error(j(299));var s=!1,a="",d=Gh,E=Yh,k=Xh,$=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(a=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&($=i.formState)),t=Ad(e,1,!0,t,i??null,s,a,$,d,E,k,jd),t.context=Rd(null),i=t.current,s=It(),s=ma(s),a=Ni(s),a.callback=null,Hi(i,a,s),i=s,t.current.lanes=i,or(t,i),li(t),e[Cs]=t.current,oo(e),new da(t)},Jr.version="19.2.6",Jr}var Vd;function zv(){if(Vd)return Mo.exports;Vd=1;function O(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(O)}catch(Y){console.error(Y)}}return O(),Mo.exports=kv(),Mo.exports}var Nv=zv();function bs(O,Y){const[G,j]=de.useState(null),[Z,se]=de.useState(null),F=de.useRef(O);F.current=O;const n=de.useRef(async()=>{try{const f=await F.current();j(f),se(null)}catch(f){se(f)}});return de.useEffect(()=>{let f=!1;const _=async()=>{f||await n.current()};_();const v=setInterval(_,Y);return()=>{f=!0,clearInterval(v)}},[Y]),{data:G,error:Z,refresh:()=>void n.current()}}const zo="tono:route";function es(){const[O,Y]=de.useState(window.location.pathname);return de.useEffect(()=>{const j=()=>Y(window.location.pathname);return window.addEventListener("popstate",j),window.addEventListener(zo,j),()=>{window.removeEventListener("popstate",j),window.removeEventListener(zo,j)}},[]),{path:O,navigate:j=>{j!==window.location.pathname&&(window.history.pushState({},"",j),window.dispatchEvent(new Event(zo)))}}}async function ar(O){const Y=await fetch(O);if(!Y.ok)throw new Error(`${O}: ${Y.status}`);return Y.json()}const st={health:()=>ar("/api/health"),config:()=>ar("/api/config"),tasks:()=>ar("/api/tasks").then(O=>O.tasks),task:O=>ar(`/api/tasks/${O}`).then(Y=>Y.task),sessions:()=>ar("/api/sessions").then(O=>O.sessions),workers:()=>ar("/api/workers").then(O=>O.workers),killSession:async O=>{const Y=await fetch(`/api/sessions/${encodeURIComponent(O)}`,{method:"DELETE"});if(!Y.ok)throw new Error(`kill: ${Y.status}`)},cleanupTask:async O=>{const Y=await fetch(`/api/tasks/${O}/cleanup`,{method:"POST"});if(!Y.ok){const G=await Y.text();throw new Error(`cleanup: ${Y.status} ${G}`)}},rawConfig:async()=>{const O=await fetch("/api/config/raw");if(!O.ok)throw new Error(`config/raw: ${O.status}`);return O.json()},saveRawConfig:async O=>{const Y=await fetch("/api/config/raw",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({content:O})}),G=await Y.json().catch(()=>({}));if(!Y.ok){const j=G.error??`${Y.status}`;throw new Error(j)}return G},startTask:async O=>{const Y=await fetch("/api/tasks",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(O)}),G=await Y.json().catch(()=>({}));if(!Y.ok)throw new Error(G.error??`${Y.status}`);return G.task},repoItems:async O=>{const Y=await fetch(`/api/repos/${encodeURIComponent(O)}/items`);if(!Y.ok){const G=await Y.json().catch(()=>({}));throw new Error(G.error??`${Y.status}`)}return await Y.json()},retryTask:async O=>{const Y=await fetch(`/api/tasks/${O}/retry`,{method:"POST"}),G=await Y.json().catch(()=>({}));if(!Y.ok)throw new Error(G.error??`${Y.status}`);return G.task},markDone:async O=>{const Y=await fetch(`/api/tasks/${O}/done`,{method:"POST"}),G=await Y.json().catch(()=>({}));if(!Y.ok)throw new Error(G.error??`${Y.status}`);return G.task},newShell:async(O={})=>{const Y=await fetch("/api/sessions/shell",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(O)}),G=await Y.json().catch(()=>({}));if(!Y.ok)throw new Error(G.error??`${Y.status}`);return G}};function Hv(O){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${O}`}const jv={neutral:"bg-zinc-800 text-zinc-300 border-zinc-700",blue:"bg-blue-950/60 text-blue-300 border-blue-900",green:"bg-green-950/60 text-green-300 border-green-900",amber:"bg-amber-950/60 text-amber-300 border-amber-900",red:"bg-red-950/60 text-red-300 border-red-900",orange:"bg-orange-950/60 text-orange-300 border-orange-900"};function Ji({tone:O="neutral",children:Y}){return D.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium ${jv[O]}`,children:Y})}function Uv(){const{path:O,navigate:Y}=es(),{data:G}=bs(st.health,5e3),j=(n,f)=>{const _=n==="/"?O==="/":O.startsWith(n);return D.jsx("button",{onClick:()=>Y(n),className:`px-3 py-1.5 text-sm rounded-md transition ${_?"bg-zinc-800 text-zinc-100":"text-zinc-400 hover:text-zinc-200"}`,children:f})},Z=G==null?void 0:G.poller.some(n=>n.lastError&&(!n.lastSuccessAt||Date.parse(n.lastSuccessAt)<Date.now()-5*6e4)),se=G==null?void 0:G.workers,F=se?se.connected===0?"red":se.connected<se.total?"amber":"green":"neutral";return D.jsx("header",{className:"border-b border-zinc-800 bg-zinc-950/80 backdrop-blur sticky top-0 z-10",children:D.jsxs("div",{className:"mx-auto max-w-6xl flex items-center gap-4 px-6 py-3",children:[D.jsxs("button",{onClick:()=>Y("/"),className:"text-lg font-semibold tracking-tight text-zinc-100 hover:text-white",children:["tono",D.jsx("span",{children:".sh"})]}),D.jsxs("nav",{className:"flex items-center gap-1",children:[j("/","Dashboard"),j("/workers","Workers"),j("/config","Config")]}),D.jsx("div",{className:"ml-auto flex items-center gap-3 text-xs text-zinc-400",children:G?D.jsxs(D.Fragment,{children:[D.jsxs(Ji,{tone:"neutral",children:["agents: ",Object.keys(G.agents).length]}),D.jsxs(Ji,{tone:Z?"red":"green",children:["repos: ",G.reposWatched]}),D.jsx("button",{onClick:()=>Y("/workers"),className:"cursor-pointer",title:"Click for worker details",children:D.jsxs(Ji,{tone:F,children:["workers: ",(se==null?void 0:se.connected)??0,se&&se.total!==se.connected?`/${se.total}`:""]})})]}):D.jsx("span",{className:"text-zinc-600",children:"connecting…"})})]})})}function Xe({variant:O="default",className:Y="",...G}){const j="inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition disabled:opacity-50 disabled:cursor-not-allowed",Z={default:"bg-zinc-100 text-zinc-900 hover:bg-white",danger:"bg-red-600 text-white hover:bg-red-500",ghost:"text-zinc-300 hover:bg-zinc-800"}[O];return D.jsx("button",{className:`${j} ${Z} ${Y}`,...G})}function Iv({config:O,onClose:Y}){var q;const{navigate:G}=es(),j=de.useMemo(()=>Object.keys(O.agents),[O.agents]),[Z,se]=de.useState(((q=O.repos[0])==null?void 0:q.slug)??""),[F,n]=de.useState("implement"),[f,_]=de.useState(""),[v,l]=de.useState(""),[g,b]=de.useState(!1),[y,u]=de.useState(null),[r,h]=de.useState(null),[o,c]=de.useState(!1),[m,C]=de.useState(null),[S,w]=de.useState(""),[p,x]=de.useState(!1),L=de.useMemo(()=>{const P=O.repos.find(A=>A.slug===Z);return!P||!P.agents||P.agents.length===0?j:P.agents.filter(A=>j.includes(A))},[O.repos,Z,j]);de.useEffect(()=>{L.length!==0&&(L.includes(v)||l(L[0]))},[L,v]),de.useEffect(()=>{const P=A=>{A.key==="Escape"&&Y()};return window.addEventListener("keydown",P),()=>window.removeEventListener("keydown",P)},[Y]),de.useEffect(()=>{if(!Z)return;let P=!1;return c(!0),C(null),h(null),st.repoItems(Z).then(A=>{P||h(A)}).catch(A=>{P||C(A.message)}).finally(()=>{P||c(!1)}),()=>{P=!0}},[Z]);const B=async P=>{if(!Number.isInteger(P)||P<=0){u("issue/PR number must be a positive integer");return}if(!v){u("pick an agent");return}b(!0),u(null);try{const A=await st.startTask({repoSlug:Z,issueNumber:P,agent:v,kind:F});Y(),G(`/tasks/${A.id}`)}catch(A){u(A.message),b(!1)}};if(O.repos.length===0)return D.jsx(Zd,{onClose:Y,children:D.jsxs("div",{className:"text-sm text-zinc-300",children:["No repos configured yet. Add one on the"," ",D.jsx("button",{className:"text-orange-400 hover:underline",onClick:()=>{Y(),G("/config")},children:"Config page"})," ","first."]})});const T=de.useMemo(()=>r?Qd(r.issues,S):[],[r,S]),M=de.useMemo(()=>r?Qd(r.prs,S):[],[r,S]),U=F==="implement"?T:M,K=F==="implement"?(r==null?void 0:r.issues.length)??0:(r==null?void 0:r.prs.length)??0,I=F==="implement"?(r==null?void 0:r.issuesError)??null:(r==null?void 0:r.prsError)??null;return D.jsx(Zd,{onClose:Y,children:D.jsxs("div",{className:"space-y-3",children:[D.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[D.jsxs("div",{children:[D.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:"Repo"}),D.jsx("select",{value:Z,onChange:P=>se(P.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm",children:O.repos.map(P=>D.jsx("option",{value:P.slug,children:P.slug},P.slug))})]}),D.jsxs("div",{children:[D.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:"Agent"}),D.jsx("select",{value:v,onChange:P=>l(P.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm",children:L.map(P=>D.jsx("option",{value:P,children:P},P))}),L.length===0&&D.jsx("p",{className:"mt-1 text-xs text-red-300",children:"no agents enabled on this repo"})]})]}),D.jsxs("div",{children:[D.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:"Kind"}),D.jsxs("div",{className:"inline-flex rounded-md border border-zinc-700 bg-zinc-900 p-0.5 text-sm",children:[D.jsx(Kd,{active:F==="implement",onClick:()=>n("implement"),children:"Implement"}),D.jsx(Kd,{active:F==="review",onClick:()=>n("review"),children:"Review"})]}),D.jsx("p",{className:"mt-1 text-xs text-zinc-500",children:F==="implement"?"Pick an open issue. Tono will run the agent in a fresh worktree off baseBranch and queue it to open a PR.":"Pick an open PR. Tono will check out the PR head into a detached worktree and queue the agent to post a review."})]}),D.jsxs("div",{className:"border-t border-zinc-800 pt-3",children:[D.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[D.jsxs("label",{className:"text-xs text-zinc-400",children:[F==="implement"?"Open issues":"Open PRs",o?" · loading…":r?` · ${K}`:""]}),D.jsx("button",{type:"button",onClick:()=>x(P=>!P),className:"text-xs text-zinc-500 hover:text-zinc-300",children:p?"← back to list":"enter number manually"})]}),p?D.jsx(Pv,{kind:F,disabled:g||L.length===0,onSubmit:P=>B(P),issueNumber:f,setIssueNumber:_}):D.jsxs(D.Fragment,{children:[D.jsx("input",{type:"text",placeholder:F==="implement"?"filter issues by title or #number":"filter PRs by title or #number",value:S,onChange:P=>w(P.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm mb-2",autoFocus:!0}),D.jsx("div",{className:"max-h-64 overflow-y-auto rounded-md border border-zinc-800 divide-y divide-zinc-800",children:o?D.jsx("div",{className:"px-3 py-6 text-center text-xs text-zinc-500",children:"loading from gh…"}):m?D.jsx("div",{className:"px-3 py-3 text-xs text-red-300",children:m}):I?D.jsxs("div",{className:"px-3 py-3 text-xs text-red-300",children:["couldn't load open ",F==="implement"?"issues":"PRs",": ",I]}):U.length===0?D.jsx("div",{className:"px-3 py-6 text-center text-xs text-zinc-500",children:K===0?`No open ${F==="implement"?"issues":"PRs"} on ${Z}.`:"No matches."}):U.map(P=>D.jsxs("button",{type:"button",disabled:g,onClick:()=>B(P.number),className:"w-full text-left px-3 py-2 hover:bg-zinc-800/60 transition disabled:opacity-50 disabled:cursor-not-allowed",children:[D.jsxs("div",{className:"flex items-baseline gap-2",children:[D.jsxs("span",{className:"text-[11px] font-mono text-zinc-500 w-12 shrink-0",children:["#",P.number]}),D.jsx("span",{className:"text-sm text-zinc-100 truncate flex-1",children:P.title})]}),P.labels.length>0&&D.jsx("div",{className:"mt-1 ml-14 flex flex-wrap gap-1",children:P.labels.slice(0,4).map(A=>D.jsx("span",{className:"text-[10px] font-mono text-zinc-500",children:A},A))})]},P.number))})]})]}),y&&D.jsx("div",{className:"rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:y}),D.jsx("div",{className:"flex justify-end gap-2 pt-1",children:D.jsx(Xe,{type:"button",variant:"ghost",onClick:Y,children:"Cancel"})})]})})}function Kd({active:O,onClick:Y,children:G}){return D.jsx("button",{type:"button",onClick:Y,className:`px-3 py-1 text-sm rounded-md transition ${O?"bg-zinc-800 text-zinc-100":"text-zinc-400 hover:text-zinc-200"}`,children:G})}function Pv({kind:O,disabled:Y,onSubmit:G,issueNumber:j,setIssueNumber:Z}){return D.jsxs("form",{onSubmit:se=>{se.preventDefault(),G(Number(j))},children:[D.jsxs("div",{className:"flex gap-2",children:[D.jsx("input",{type:"number",min:1,value:j,onChange:se=>Z(se.target.value),placeholder:O==="implement"?"issue #":"PR #",className:"flex-1 rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-mono",autoFocus:!0}),D.jsx(Xe,{type:"submit",disabled:Y||!j,children:O==="implement"?"Start implement":"Start review"})]}),D.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:["Tono will fetch the ",O==="implement"?"issue":"PR"," via ",D.jsx("code",{children:"gh"})," and queue a ",O," task."]})]})}function Qd(O,Y){const G=Y.trim().toLowerCase();if(!G)return O;if(/^#?\d+$/.test(G)){const j=G.startsWith("#")?G.slice(1):G;return O.filter(Z=>String(Z.number).includes(j))}return O.filter(j=>j.title.toLowerCase().includes(G))}function Zd({children:O,onClose:Y}){return D.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onMouseDown:G=>{G.target===G.currentTarget&&Y()},children:D.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-zinc-800 bg-zinc-950 p-5 shadow-2xl",children:[D.jsx("h2",{className:"text-base font-semibold text-zinc-100 mb-3",children:"Start a session"}),O]})})}const cf={queued:"queued",assigning:"assigning",running:"running",completed:"completed",pr_open:"PR open",pr_closed:"PR closed",merged:"merged",cleaned:"cleaned",failed:"failed"};function Fv({workers:O,disabled:Y,opening:G,onOpen:j}){const[Z,se]=de.useState(!1),F=de.useRef(null);if(de.useEffect(()=>{if(!Z)return;const n=f=>{var _;(_=F.current)!=null&&_.contains(f.target)||se(!1)};return window.addEventListener("mousedown",n),()=>window.removeEventListener("mousedown",n)},[Z]),O.length===0)return D.jsx(Xe,{variant:"ghost",disabled:!0,title:"No workers connected — start a worker to open a terminal",children:"+ New terminal"});if(O.length===1){const n=O[0];return D.jsx(Xe,{variant:"ghost",disabled:Y,title:`Open a terminal on ${n.hostname}`,onClick:()=>j(n.id),children:G?"Opening…":`+ New terminal (${n.hostname})`})}return D.jsxs("div",{ref:F,className:"relative",children:[D.jsx(Xe,{variant:"ghost",disabled:Y,onClick:()=>se(n=>!n),children:G?"Opening…":"+ New terminal ▾"}),Z&&D.jsxs("div",{className:"absolute right-0 z-20 mt-1 w-64 rounded-md border border-zinc-800 bg-zinc-900 shadow-lg overflow-hidden",children:[D.jsx("div",{className:"px-3 py-2 text-[10px] uppercase tracking-wide text-zinc-500 border-b border-zinc-800",children:"Open shell on…"}),O.map(n=>D.jsxs("button",{className:"w-full text-left px-3 py-2 text-sm text-zinc-200 hover:bg-zinc-800 transition flex items-center justify-between gap-2",onClick:()=>{se(!1),j(n.id)},children:[D.jsx("span",{className:"truncate",children:n.hostname}),D.jsx("span",{className:"text-[10px] font-mono text-zinc-500",children:n.id.slice(0,8)})]},n.id))]})]})}const qv={queued:"neutral",assigning:"blue",running:"blue",completed:"green",pr_open:"amber",pr_closed:"red",merged:"orange",cleaned:"neutral",failed:"red"};function No(O){if(!O)return"—";const Y=Date.now()-Date.parse(O);return Y<6e4?`${Math.round(Y/1e3)}s ago`:Y<36e5?`${Math.round(Y/6e4)}m ago`:Y<864e5?`${Math.round(Y/36e5)}h ago`:`${Math.round(Y/864e5)}d ago`}function Wv(O){return O.status==="queued"?`queued ${No(O.createdAt)}`:O.status==="running"?`started ${No(O.startedAt)}`:`${No(O.completedAt??O.startedAt??O.createdAt)}`}function $v({task:O}){const{navigate:Y}=es();return D.jsxs("button",{onClick:()=>Y(`/tasks/${O.id}`),className:"group w-full text-left rounded-md border border-zinc-800 bg-zinc-900/50 p-3 hover:border-zinc-700 hover:bg-zinc-900 transition",children:[D.jsxs("div",{className:"flex items-start justify-between gap-2",children:[D.jsxs("span",{className:"text-[11px] font-mono text-zinc-500",children:["#",O.id]}),D.jsx(Ji,{tone:qv[O.status],children:cf[O.status]})]}),D.jsx("div",{className:"mt-1 text-sm font-medium text-zinc-100 line-clamp-2",children:O.issueTitle}),D.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-zinc-500",children:[D.jsxs("span",{className:"font-mono truncate max-w-[160px]",children:[O.repoSlug,"#",O.issueNumber]}),D.jsx("span",{children:"·"}),D.jsx("span",{children:Wv(O)}),O.prUrl&&D.jsxs(D.Fragment,{children:[D.jsx("span",{children:"·"}),D.jsx("a",{href:O.prUrl,target:"_blank",rel:"noreferrer",onClick:G=>G.stopPropagation(),className:"text-orange-400 hover:underline",children:"PR"})]})]})]})}const Gv=[{id:"queued",title:"Queued",hint:"implement + review",match:O=>O.status==="queued",sort:(O,Y)=>Date.parse(O.createdAt)-Date.parse(Y.createdAt),emptyMessage:"Empty."},{id:"building",title:"Building",hint:"implementing an issue",match:O=>O.status==="running"&&O.kind==="implement",sort:(O,Y)=>Date.parse(Y.startedAt??Y.createdAt)-Date.parse(O.startedAt??O.createdAt),emptyMessage:"No implementations running."},{id:"reviewing",title:"Reviewing",hint:"agent is reviewing a PR",match:O=>O.status==="running"&&O.kind==="review",sort:(O,Y)=>Date.parse(Y.startedAt??Y.createdAt)-Date.parse(O.startedAt??O.createdAt),emptyMessage:"No active reviews."},{id:"awaiting-review",title:"Awaiting review",hint:"PR open on GitHub",match:O=>O.status==="pr_open",sort:(O,Y)=>Date.parse(Y.completedAt??Y.createdAt)-Date.parse(O.completedAt??O.createdAt),emptyMessage:"No PRs awaiting review."},{id:"done",title:"Done",hint:"merged · completed · closed · failed",match:O=>O.status==="merged"||O.status==="pr_closed"||O.status==="completed"||O.status==="cleaned"||O.status==="failed",sort:(O,Y)=>Date.parse(Y.completedAt??Y.createdAt)-Date.parse(O.completedAt??O.createdAt),limit:12,emptyMessage:"Nothing finished yet."}];function Yv({column:O,tasks:Y}){const G=Y.filter(O.match);O.sort&&G.sort(O.sort);const j=O.limit?G.slice(0,O.limit):G,Z=G.length-j.length;return D.jsxs("div",{className:"flex min-w-[260px] flex-1 flex-col rounded-lg border border-zinc-800 bg-zinc-950/40",children:[D.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-800 px-3 py-2",children:[D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-zinc-300",children:O.title}),D.jsx("span",{className:"text-[11px] text-zinc-500",children:G.length})]}),O.hint&&D.jsx("span",{className:"text-[10px] text-zinc-600 truncate",children:O.hint})]}),D.jsxs("div",{className:"flex-1 space-y-2 p-2",children:[j.length===0?D.jsx("div",{className:"rounded-md border border-dashed border-zinc-800 px-3 py-6 text-center text-xs text-zinc-600",children:O.emptyMessage??"—"}):j.map(se=>D.jsx($v,{task:se},se.id)),Z>0&&D.jsxs("div",{className:"text-center text-[11px] text-zinc-500",children:["+",Z," more"]})]})]})}function Xv(){const{data:O}=bs(st.tasks,3e3),{data:Y}=bs(st.sessions,3e3),{data:G}=bs(st.health,5e3),{data:j}=bs(st.config,3e4),{data:Z}=bs(st.workers,5e3),{navigate:se}=es(),[F,n]=de.useState(!1),[f,_]=de.useState(!1),v=de.useMemo(()=>(Z??[]).filter(u=>u.connected),[Z]),l=(Y??[]).filter(u=>u.kind==="shell"&&u.status==="running"),g=de.useMemo(()=>O??[],[O]),b=((G==null?void 0:G.poller)??[]).filter(u=>u.lastError),y=j!==null&&j.repos.length===0;return D.jsxs("div",{className:"mx-auto max-w-[1400px] px-6 py-6 space-y-5",children:[D.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[D.jsx("h1",{className:"text-base font-semibold text-zinc-200",children:"Dashboard"}),D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(Fv,{workers:v,disabled:f,opening:f,onOpen:async u=>{_(!0);try{const{sessionId:r}=await st.newShell({workerId:u});se(`/shells/${encodeURIComponent(r)}`)}catch(r){alert(r.message)}finally{_(!1)}}}),D.jsx(Xe,{onClick:()=>n(!0),children:"+ Start session"})]})]}),y&&D.jsxs("div",{className:"rounded-md border border-zinc-800 bg-zinc-900/60 px-4 py-3 text-sm text-zinc-300 flex items-center justify-between",children:[D.jsx("span",{children:"No repos configured. Add one to start receiving labeled-issue triggers."}),D.jsx(Xe,{variant:"ghost",onClick:()=>se("/config"),children:"Edit config"})]}),b.length>0&&D.jsxs("div",{className:"rounded-md border border-red-900 bg-red-950/40 px-4 py-3 text-sm text-red-300",children:[D.jsx("div",{className:"font-medium",children:"GitHub poller errors"}),D.jsx("ul",{className:"mt-1 space-y-0.5 text-xs font-mono",children:b.map(u=>D.jsxs("li",{children:[u.repo,": ",u.lastError]},u.repo))})]}),l.length>0&&D.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[D.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs uppercase tracking-wide text-zinc-400",children:["Shells ",D.jsxs("span",{className:"text-[11px] text-zinc-500 normal-case tracking-normal",children:[l.length," live"]})]}),D.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:l.map(u=>D.jsxs("button",{onClick:()=>se(`/shells/${encodeURIComponent(u.id)}`),className:"rounded-md border border-zinc-800 bg-zinc-950/60 px-3 py-2 text-left hover:border-zinc-700 hover:bg-zinc-900 transition flex items-center gap-3",children:[D.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-blue-400 animate-pulse"}),D.jsxs("span",{className:"text-[11px] text-zinc-500 font-mono",children:["pid ",u.pid]}),D.jsx("span",{className:"font-mono text-xs text-zinc-300 truncate",children:u.label??"shell"})]},u.id))})]}),D.jsx("div",{className:"flex gap-3 overflow-x-auto pb-3 lg:overflow-visible",children:Gv.map(u=>D.jsx(Yv,{column:u,tasks:g},u.id))}),F&&j&&D.jsx(Iv,{config:j,onClose:()=>n(!1)})]})}var Ho={exports:{}},Jd;function Vv(){return Jd||(Jd=1,(function(O,Y){(function(G,j){O.exports=j()})(globalThis,(()=>(()=>{var G={4567:function(F,n,f){var _=this&&this.__decorate||function(o,c,m,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,m,C);else for(var x=o.length-1;x>=0;x--)(S=o[x])&&(p=(w<3?S(p):w>3?S(c,m,p):S(c,m))||p);return w>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(o,c){return function(m,C){c(m,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const l=f(9042),g=f(9924),b=f(844),y=f(4725),u=f(2585),r=f(3656);let h=n.AccessibilityManager=class extends b.Disposable{constructor(o,c,m,C){super(),this._terminal=o,this._coreBrowserService=m,this._renderService=C,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,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 g.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((S=>this._handleResize(S.rows)))),this.register(this._terminal.onRender((S=>this._refreshRows(S.start,S.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((S=>this._handleChar(S)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
48
|
+
`+s.stack}}var si=Object.prototype.hasOwnProperty,Be=B.unstable_scheduleCallback,Ae=B.unstable_cancelCallback,De=B.unstable_shouldYield,ve=B.unstable_requestPaint,Ce=B.unstable_now,Ze=B.unstable_getCurrentPriorityLevel,Fe=B.unstable_ImmediatePriority,Ft=B.unstable_UserBlockingPriority,ht=B.unstable_NormalPriority,wt=B.unstable_LowPriority,et=B.unstable_IdlePriority,qe=B.log,Re=B.unstable_setDisableYieldValue,Jt=null,dt=null;function Ot(e){if(typeof qe=="function"&&Re(e),dt&&typeof dt.setStrictMode=="function")try{dt.setStrictMode(Jt,e)}catch{}}var bt=Math.clz32?Math.clz32:va,ys=Math.log,_a=Math.LN2;function va(e){return e>>>=0,e===0?32:31-(ys(e)/_a|0)|0}var Ri=256,is=262144,ss=4194304;function ci(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 en(e,t,i){var s=e.pendingLanes;if(s===0)return 0;var a=0,f=e.suspendedLanes,E=e.pingedLanes;e=e.warmLanes;var k=s&134217727;return k!==0?(s=k&~f,s!==0?a=ci(s):(E&=k,E!==0?a=ci(E):i||(i=k&~e,i!==0&&(a=ci(i))))):(k=s&~f,k!==0?a=ci(k):E!==0?a=ci(E):i||(i=s&~e,i!==0&&(a=ci(i)))),a===0?0:t!==0&&t!==a&&(t&f)===0&&(f=a&-a,i=t&-t,f>=i||f===32&&(i&4194048)!==0)?t:a}function lr(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function mf(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 Wo(){var e=ss;return ss<<=1,(ss&62914560)===0&&(ss=4194304),e}function ga(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function or(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pf(e,t,i,s,a,f){var E=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 k=e.entanglements,G=e.expirationTimes,te=e.hiddenUpdates;for(i=E&~i;0<i;){var le=31-bt(i),ce=1<<le;k[le]=0,G[le]=-1;var se=te[le];if(se!==null)for(te[le]=null,le=0;le<se.length;le++){var ae=se[le];ae!==null&&(ae.lane&=-536870913)}i&=~ce}s!==0&&Go(e,s,0),f!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=f&~(E&~t))}function Go(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-bt(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|i&261930}function Yo(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var s=31-bt(i),a=1<<s;a&t|e[s]&t&&(e[s]|=t),i&=~a}}function Xo(e,t){var i=t&-t;return i=(i&42)!==0?1:ma(i),(i&(e.suspendedLanes|t))!==0?0:i}function ma(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 pa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vo(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:kd(e.type))}function Ko(e,t){var i=q.p;try{return q.p=e,t()}finally{q.p=i}}var Di=Math.random().toString(36).slice(2),vt="__reactFiber$"+Di,Et="__reactProps$"+Di,Cs="__reactContainer$"+Di,Sa="__reactEvents$"+Di,Sf="__reactListeners$"+Di,bf="__reactHandles$"+Di,Qo="__reactResources$"+Di,cr="__reactMarker$"+Di;function ba(e){delete e[vt],delete e[Et],delete e[Sa],delete e[Sf],delete e[bf]}function xs(e){var t=e[vt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Cs]||i[vt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=pd(e);e!==null;){if(i=e[vt])return i;e=pd(e)}return t}e=i,i=e.parentNode}return null}function ws(e){if(e=e[vt]||e[Cs]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function hr(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(j(33))}function Es(e){var t=e[Qo];return t||(t=e[Qo]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ft(e){e[cr]=!0}var Zo=new Set,Jo={};function rs(e,t){Ls(e,t),Ls(e+"Capture",t)}function Ls(e,t){for(Jo[e]=t,e=0;e<t.length;e++)Zo.add(t[e])}var yf=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]*$"),ec={},tc={};function Cf(e){return si.call(tc,e)?!0:si.call(ec,e)?!1:yf.test(e)?tc[e]=!0:(ec[e]=!0,!1)}function tn(e,t,i){if(Cf(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 sn(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 hi(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 qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ic(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xf(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 a=s.get,f=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(E){i=""+E,f.call(this,E)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return i},setValue:function(E){i=""+E},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ya(e){if(!e._valueTracker){var t=ic(e)?"checked":"value";e._valueTracker=xf(e,t,""+e[t])}}function sc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),s="";return e&&(s=ic(e)?e.checked?"true":"false":e.value),e=s,e!==i?(t.setValue(e),!0):!1}function rn(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 wf=/[\n"\\]/g;function $t(e){return e.replace(wf,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ca(e,t,i,s,a,f,E,k){e.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.type=E:e.removeAttribute("type"),t!=null?E==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+qt(t)):e.value!==""+qt(t)&&(e.value=""+qt(t)):E!=="submit"&&E!=="reset"||e.removeAttribute("value"),t!=null?xa(e,E,qt(t)):i!=null?xa(e,E,qt(i)):s!=null&&e.removeAttribute("value"),a==null&&f!=null&&(e.defaultChecked=!!f),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+qt(k):e.removeAttribute("name")}function rc(e,t,i,s,a,f,E,k){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(e.type=f),t!=null||i!=null){if(!(f!=="submit"&&f!=="reset"||t!=null)){ya(e);return}i=i!=null?""+qt(i):"",t=t!=null?""+qt(t):i,k||t===e.value||(e.value=t),e.defaultValue=t}s=s??a,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=k?e.checked:!!s,e.defaultChecked=!!s,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(e.name=E),ya(e)}function xa(e,t,i){t==="number"&&rn(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function As(e,t,i,s){if(e=e.options,t){t={};for(var a=0;a<i.length;a++)t["$"+i[a]]=!0;for(i=0;i<e.length;i++)a=t.hasOwnProperty("$"+e[i].value),e[i].selected!==a&&(e[i].selected=a),a&&s&&(e[i].defaultSelected=!0)}else{for(i=""+qt(i),t=null,a=0;a<e.length;a++){if(e[a].value===i){e[a].selected=!0,s&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function nc(e,t,i){if(t!=null&&(t=""+qt(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+qt(i):""}function ac(e,t,i,s){if(t==null){if(s!=null){if(i!=null)throw Error(j(92));if(K(s)){if(1<s.length)throw Error(j(93));s=s[0]}i=s}i==null&&(i=""),t=i}i=qt(t),e.defaultValue=i,s=e.textContent,s===i&&s!==""&&s!==null&&(e.value=s),ya(e)}function Rs(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Ef=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 lc(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||Ef.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function oc(e,t,i){if(t!=null&&typeof t!="object")throw Error(j(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 a in t)s=t[a],t.hasOwnProperty(a)&&i[a]!==s&&lc(e,a,s)}else for(var f in t)t.hasOwnProperty(f)&&lc(e,f,t[f])}function wa(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 Lf=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"]]),Af=/^[\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 nn(e){return Af.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ui(){}var Ea=null;function La(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ds=null,Ts=null;function cc(e){var t=ws(e);if(t&&(e=t.stateNode)){var i=e[Et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ca(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="'+$t(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var s=i[t];if(s!==e&&s.form===e.form){var a=s[Et]||null;if(!a)throw Error(j(90));Ca(s,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<i.length;t++)s=i[t],s.form===e.form&&sc(s)}break e;case"textarea":nc(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&As(e,!!i.multiple,t,!1)}}}var Aa=!1;function hc(e,t,i){if(Aa)return e(t,i);Aa=!0;try{var s=e(t);return s}finally{if(Aa=!1,(Ds!==null||Ts!==null)&&(Gn(),Ds&&(t=Ds,e=Ts,Ts=Ds=null,cc(t),e)))for(t=0;t<e.length;t++)cc(e[t])}}function ur(e,t){var i=e.stateNode;if(i===null)return null;var s=i[Et]||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(j(231,t,typeof i));return i}var di=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ra=!1;if(di)try{var dr={};Object.defineProperty(dr,"passive",{get:function(){Ra=!0}}),window.addEventListener("test",dr,dr),window.removeEventListener("test",dr,dr)}catch{Ra=!1}var Ti=null,Da=null,an=null;function uc(){if(an)return an;var e,t=Da,i=t.length,s,a="value"in Ti?Ti.value:Ti.textContent,f=a.length;for(e=0;e<i&&t[e]===a[e];e++);var E=i-e;for(s=1;s<=E&&t[i-s]===a[f-s];s++);return an=a.slice(e,1<s?1-s:void 0)}function ln(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 on(){return!0}function dc(){return!1}function Lt(e){function t(i,s,a,f,E){this._reactName=i,this._targetInst=a,this.type=s,this.nativeEvent=f,this.target=E,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(i=e[k],this[k]=i?i(f):f[k]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?on:dc,this.isPropagationStopped=dc,this}return l(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=on)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ns={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=Lt(ns),fr=l({},ns,{view:0,detail:0}),Rf=Lt(fr),Ta,Ma,_r,hn=l({},fr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Oa,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!==_r&&(_r&&e.type==="mousemove"?(Ta=e.screenX-_r.screenX,Ma=e.screenY-_r.screenY):Ma=Ta=0,_r=e),Ta)},movementY:function(e){return"movementY"in e?e.movementY:Ma}}),fc=Lt(hn),Df=l({},hn,{dataTransfer:0}),Tf=Lt(Df),Mf=l({},fr,{relatedTarget:0}),Ba=Lt(Mf),Bf=l({},ns,{animationName:0,elapsedTime:0,pseudoElement:0}),Of=Lt(Bf),kf=l({},ns,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),zf=Lt(kf),Nf=l({},ns,{data:0}),_c=Lt(Nf),Hf={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},jf={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"},Uf={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function If(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Uf[e])?!!t[e]:!1}function Oa(){return If}var Pf=l({},fr,{key:function(e){if(e.key){var t=Hf[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ln(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?jf[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Oa,charCode:function(e){return e.type==="keypress"?ln(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ln(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Ff=Lt(Pf),qf=l({},hn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vc=Lt(qf),$f=l({},fr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Oa}),Wf=Lt($f),Gf=l({},ns,{propertyName:0,elapsedTime:0,pseudoElement:0}),Yf=Lt(Gf),Xf=l({},hn,{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}),Vf=Lt(Xf),Kf=l({},ns,{newState:0,oldState:0}),Qf=Lt(Kf),Zf=[9,13,27,32],ka=di&&"CompositionEvent"in window,vr=null;di&&"documentMode"in document&&(vr=document.documentMode);var Jf=di&&"TextEvent"in window&&!vr,gc=di&&(!ka||vr&&8<vr&&11>=vr),mc=" ",pc=!1;function Sc(e,t){switch(e){case"keyup":return Zf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ms=!1;function e_(e,t){switch(e){case"compositionend":return bc(t);case"keypress":return t.which!==32?null:(pc=!0,mc);case"textInput":return e=t.data,e===mc&&pc?null:e;default:return null}}function t_(e,t){if(Ms)return e==="compositionend"||!ka&&Sc(e,t)?(e=uc(),an=Da=Ti=null,Ms=!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 gc&&t.locale!=="ko"?null:t.data;default:return null}}var i_={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"?!!i_[e.type]:t==="textarea"}function Cc(e,t,i,s){Ds?Ts?Ts.push(s):Ts=[s]:Ds=s,t=Jn(t,"onChange"),0<t.length&&(i=new cn("onChange","change",null,i,s),e.push({event:i,listeners:t}))}var gr=null,mr=null;function s_(e){rd(e,0)}function un(e){var t=hr(e);if(sc(t))return e}function xc(e,t){if(e==="change")return t}var wc=!1;if(di){var za;if(di){var Na="oninput"in document;if(!Na){var Ec=document.createElement("div");Ec.setAttribute("oninput","return;"),Na=typeof Ec.oninput=="function"}za=Na}else za=!1;wc=za&&(!document.documentMode||9<document.documentMode)}function Lc(){gr&&(gr.detachEvent("onpropertychange",Ac),mr=gr=null)}function Ac(e){if(e.propertyName==="value"&&un(mr)){var t=[];Cc(t,mr,e,La(e)),hc(s_,t)}}function r_(e,t,i){e==="focusin"?(Lc(),gr=t,mr=i,gr.attachEvent("onpropertychange",Ac)):e==="focusout"&&Lc()}function n_(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return un(mr)}function a_(e,t){if(e==="click")return un(t)}function l_(e,t){if(e==="input"||e==="change")return un(t)}function o_(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var kt=typeof Object.is=="function"?Object.is:o_;function pr(e,t){if(kt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(s=0;s<i.length;s++){var a=i[s];if(!si.call(t,a)||!kt(e[a],t[a]))return!1}return!0}function Rc(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Dc(e,t){var i=Rc(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=Rc(i)}}function Tc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Tc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mc(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=rn(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=rn(e.document)}return t}function Ha(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 c_=di&&"documentMode"in document&&11>=document.documentMode,Bs=null,ja=null,Sr=null,Ua=!1;function Bc(e,t,i){var s=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ua||Bs==null||Bs!==rn(s)||(s=Bs,"selectionStart"in s&&Ha(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}),Sr&&pr(Sr,s)||(Sr=s,s=Jn(ja,"onSelect"),0<s.length&&(t=new cn("onSelect","select",null,t,i),e.push({event:t,listeners:s}),t.target=Bs)))}function as(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var Os={animationend:as("Animation","AnimationEnd"),animationiteration:as("Animation","AnimationIteration"),animationstart:as("Animation","AnimationStart"),transitionrun:as("Transition","TransitionRun"),transitionstart:as("Transition","TransitionStart"),transitioncancel:as("Transition","TransitionCancel"),transitionend:as("Transition","TransitionEnd")},Ia={},Oc={};di&&(Oc=document.createElement("div").style,"AnimationEvent"in window||(delete Os.animationend.animation,delete Os.animationiteration.animation,delete Os.animationstart.animation),"TransitionEvent"in window||delete Os.transitionend.transition);function ls(e){if(Ia[e])return Ia[e];if(!Os[e])return e;var t=Os[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in Oc)return Ia[e]=t[i];return e}var kc=ls("animationend"),zc=ls("animationiteration"),Nc=ls("animationstart"),h_=ls("transitionrun"),u_=ls("transitionstart"),d_=ls("transitioncancel"),Hc=ls("transitionend"),jc=new Map,Pa="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(" ");Pa.push("scrollEnd");function ei(e,t){jc.set(e,t),rs(t,[e])}var dn=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)},Wt=[],ks=0,Fa=0;function fn(){for(var e=ks,t=Fa=ks=0;t<e;){var i=Wt[t];Wt[t++]=null;var s=Wt[t];Wt[t++]=null;var a=Wt[t];Wt[t++]=null;var f=Wt[t];if(Wt[t++]=null,s!==null&&a!==null){var E=s.pending;E===null?a.next=a:(a.next=E.next,E.next=a),s.pending=a}f!==0&&Uc(i,a,f)}}function _n(e,t,i,s){Wt[ks++]=e,Wt[ks++]=t,Wt[ks++]=i,Wt[ks++]=s,Fa|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function qa(e,t,i,s){return _n(e,t,i,s),vn(e)}function os(e,t){return _n(e,null,null,t),vn(e)}function Uc(e,t,i){e.lanes|=i;var s=e.alternate;s!==null&&(s.lanes|=i);for(var a=!1,f=e.return;f!==null;)f.childLanes|=i,s=f.alternate,s!==null&&(s.childLanes|=i),f.tag===22&&(e=f.stateNode,e===null||e._visibility&1||(a=!0)),e=f,f=f.return;return e.tag===3?(f=e.stateNode,a&&t!==null&&(a=31-bt(i),e=f.hiddenUpdates,s=e[a],s===null?e[a]=[t]:s.push(t),t.lane=i|536870912),f):null}function vn(e){if(50<Pr)throw Pr=0,Zl=null,Error(j(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var zs={};function f_(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 zt(e,t,i,s){return new f_(e,t,i,s)}function $a(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fi(e,t){var i=e.alternate;return i===null?(i=zt(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 Ic(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 gn(e,t,i,s,a,f){var E=0;if(s=e,typeof e=="function")$a(e)&&(E=1);else if(typeof e=="string")E=pv(e,i,J.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case x:return e=zt(31,i,t,a),e.elementType=x,e.lanes=f,e;case d:return cs(i.children,a,f,t);case r:E=8,a|=24;break;case h:return e=zt(12,i,t,a|2),e.elementType=h,e.lanes=f,e;case C:return e=zt(13,i,t,a),e.elementType=C,e.lanes=f,e;case S:return e=zt(19,i,t,a),e.elementType=S,e.lanes=f,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case c:E=10;break e;case o:E=9;break e;case m:E=11;break e;case w:E=14;break e;case p:E=16,s=null;break e}E=29,i=Error(j(130,e===null?"null":typeof e,"")),s=null}return t=zt(E,i,t,a),t.elementType=e,t.type=s,t.lanes=f,t}function cs(e,t,i,s){return e=zt(7,e,s,t),e.lanes=i,e}function Wa(e,t,i){return e=zt(6,e,null,t),e.lanes=i,e}function Pc(e){var t=zt(18,null,null,0);return t.stateNode=e,t}function Ga(e,t,i){return t=zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Fc=new WeakMap;function Gt(e,t){if(typeof e=="object"&&e!==null){var i=Fc.get(e);return i!==void 0?i:(t={value:e,source:t,stack:Bt(t)},Fc.set(e,t),t)}return{value:e,source:t,stack:Bt(t)}}var Ns=[],Hs=0,mn=null,br=0,Yt=[],Xt=0,Mi=null,ri=1,ni="";function _i(e,t){Ns[Hs++]=br,Ns[Hs++]=mn,mn=e,br=t}function qc(e,t,i){Yt[Xt++]=ri,Yt[Xt++]=ni,Yt[Xt++]=Mi,Mi=e;var s=ri;e=ni;var a=32-bt(s)-1;s&=~(1<<a),i+=1;var f=32-bt(t)+a;if(30<f){var E=a-a%5;f=(s&(1<<E)-1).toString(32),s>>=E,a-=E,ri=1<<32-bt(t)+a|i<<a|s,ni=f+e}else ri=1<<f|i<<a|s,ni=e}function Ya(e){e.return!==null&&(_i(e,1),qc(e,1,0))}function Xa(e){for(;e===mn;)mn=Ns[--Hs],Ns[Hs]=null,br=Ns[--Hs],Ns[Hs]=null;for(;e===Mi;)Mi=Yt[--Xt],Yt[Xt]=null,ni=Yt[--Xt],Yt[Xt]=null,ri=Yt[--Xt],Yt[Xt]=null}function $c(e,t){Yt[Xt++]=ri,Yt[Xt++]=ni,Yt[Xt++]=Mi,ri=t.id,ni=t.overflow,Mi=e}var gt=null,Ve=null,ze=!1,Bi=null,Vt=!1,Va=Error(j(519));function Oi(e){var t=Error(j(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw yr(Gt(t,e)),Va}function Wc(e){var t=e.stateNode,i=e.type,s=e.memoizedProps;switch(t[vt]=e,t[Et]=s,i){case"dialog":Me("cancel",t),Me("close",t);break;case"iframe":case"object":case"embed":Me("load",t);break;case"video":case"audio":for(i=0;i<qr.length;i++)Me(qr[i],t);break;case"source":Me("error",t);break;case"img":case"image":case"link":Me("error",t),Me("load",t);break;case"details":Me("toggle",t);break;case"input":Me("invalid",t),rc(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"select":Me("invalid",t);break;case"textarea":Me("invalid",t),ac(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||od(t.textContent,i)?(s.popover!=null&&(Me("beforetoggle",t),Me("toggle",t)),s.onScroll!=null&&Me("scroll",t),s.onScrollEnd!=null&&Me("scrollend",t),s.onClick!=null&&(t.onclick=ui),t=!0):t=!1,t||Oi(e,!0)}function Gc(e){for(gt=e.return;gt;)switch(gt.tag){case 5:case 31:case 13:Vt=!1;return;case 27:case 3:Vt=!0;return;default:gt=gt.return}}function js(e){if(e!==gt)return!1;if(!ze)return Gc(e),ze=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||_o(e.type,e.memoizedProps)),i=!i),i&&Ve&&Oi(e),Gc(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ve=md(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));Ve=md(e)}else t===27?(t=Ve,Yi(e.type)?(e=So,So=null,Ve=e):Ve=t):Ve=gt?Qt(e.stateNode.nextSibling):null;return!0}function hs(){Ve=gt=null,ze=!1}function Ka(){var e=Bi;return e!==null&&(Tt===null?Tt=e:Tt.push.apply(Tt,e),Bi=null),e}function yr(e){Bi===null?Bi=[e]:Bi.push(e)}var Qa=D(null),us=null,vi=null;function ki(e,t,i){V(Qa,t._currentValue),t._currentValue=i}function gi(e){e._currentValue=Qa.current,z(Qa)}function Za(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 Ja(e,t,i,s){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var f=a.dependencies;if(f!==null){var E=a.child;f=f.firstContext;e:for(;f!==null;){var k=f;f=a;for(var G=0;G<t.length;G++)if(k.context===t[G]){f.lanes|=i,k=f.alternate,k!==null&&(k.lanes|=i),Za(f.return,i,e),s||(E=null);break e}f=k.next}}else if(a.tag===18){if(E=a.return,E===null)throw Error(j(341));E.lanes|=i,f=E.alternate,f!==null&&(f.lanes|=i),Za(E,i,e),E=null}else E=a.child;if(E!==null)E.return=a;else for(E=a;E!==null;){if(E===e){E=null;break}if(a=E.sibling,a!==null){a.return=E.return,E=a;break}E=E.return}a=E}}function Us(e,t,i,s){e=null;for(var a=t,f=!1;a!==null;){if(!f){if((a.flags&524288)!==0)f=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var E=a.alternate;if(E===null)throw Error(j(387));if(E=E.memoizedProps,E!==null){var k=a.type;kt(a.pendingProps.value,E.value)||(e!==null?e.push(k):e=[k])}}else if(a===$.current){if(E=a.alternate,E===null)throw Error(j(387));E.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Xr):e=[Xr])}a=a.return}e!==null&&Ja(t,e,i,s),t.flags|=262144}function pn(e){for(e=e.firstContext;e!==null;){if(!kt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ds(e){us=e,vi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function mt(e){return Yc(us,e)}function Sn(e,t){return us===null&&ds(e),Yc(e,t)}function Yc(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},vi===null){if(e===null)throw Error(j(308));vi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vi=vi.next=t;return i}var __=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()})}},v_=B.unstable_scheduleCallback,g_=B.unstable_NormalPriority,at={$$typeof:c,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function el(){return{controller:new __,data:new Map,refCount:0}}function Cr(e){e.refCount--,e.refCount===0&&v_(g_,function(){e.controller.abort()})}var xr=null,tl=0,Is=0,Ps=null;function m_(e,t){if(xr===null){var i=xr=[];tl=0,Is=ro(),Ps={status:"pending",value:void 0,then:function(s){i.push(s)}}}return tl++,t.then(Xc,Xc),t}function Xc(){if(--tl===0&&xr!==null){Ps!==null&&(Ps.status="fulfilled");var e=xr;xr=null,Is=0,Ps=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function p_(e,t){var i=[],s={status:"pending",value:null,reason:null,then:function(a){i.push(a)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var a=0;a<i.length;a++)(0,i[a])(t)},function(a){for(s.status="rejected",s.reason=a,a=0;a<i.length;a++)(0,i[a])(void 0)}),s}var Vc=I.S;I.S=function(e,t){Bu=Ce(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&m_(e,t),Vc!==null&&Vc(e,t)};var fs=D(null);function il(){var e=fs.current;return e!==null?e:Ye.pooledCache}function bn(e,t){t===null?V(fs,fs.current):V(fs,t.pool)}function Kc(){var e=il();return e===null?null:{parent:at._currentValue,pool:e}}var Fs=Error(j(460)),sl=Error(j(474)),yn=Error(j(542)),Cn={then:function(){}};function Qc(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zc(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(ui,ui),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eh(e),e;default:if(typeof t.status=="string")t.then(ui,ui);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(j(482));e=t,e.status="pending",e.then(function(s){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=s}},function(s){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=s}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,eh(e),e}throw vs=t,Fs}}function _s(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(vs=i,Fs):i}}var vs=null;function Jc(){if(vs===null)throw Error(j(459));var e=vs;return vs=null,e}function eh(e){if(e===Fs||e===yn)throw Error(j(483))}var qs=null,wr=0;function xn(e){var t=wr;return wr+=1,qs===null&&(qs=[]),Zc(qs,e,t)}function Er(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function wn(e,t){throw t.$$typeof===g?Error(j(525)):(e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function th(e){function t(Q,X){if(e){var ee=Q.deletions;ee===null?(Q.deletions=[X],Q.flags|=16):ee.push(X)}}function i(Q,X){if(!e)return null;for(;X!==null;)t(Q,X),X=X.sibling;return null}function s(Q){for(var X=new Map;Q!==null;)Q.key!==null?X.set(Q.key,Q):X.set(Q.index,Q),Q=Q.sibling;return X}function a(Q,X){return Q=fi(Q,X),Q.index=0,Q.sibling=null,Q}function f(Q,X,ee){return Q.index=ee,e?(ee=Q.alternate,ee!==null?(ee=ee.index,ee<X?(Q.flags|=67108866,X):ee):(Q.flags|=67108866,X)):(Q.flags|=1048576,X)}function E(Q){return e&&Q.alternate===null&&(Q.flags|=67108866),Q}function k(Q,X,ee,oe){return X===null||X.tag!==6?(X=Wa(ee,Q.mode,oe),X.return=Q,X):(X=a(X,ee),X.return=Q,X)}function G(Q,X,ee,oe){var Se=ee.type;return Se===d?le(Q,X,ee.props.children,oe,ee.key):X!==null&&(X.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===p&&_s(Se)===X.type)?(X=a(X,ee.props),Er(X,ee),X.return=Q,X):(X=gn(ee.type,ee.key,ee.props,null,Q.mode,oe),Er(X,ee),X.return=Q,X)}function te(Q,X,ee,oe){return X===null||X.tag!==4||X.stateNode.containerInfo!==ee.containerInfo||X.stateNode.implementation!==ee.implementation?(X=Ga(ee,Q.mode,oe),X.return=Q,X):(X=a(X,ee.children||[]),X.return=Q,X)}function le(Q,X,ee,oe,Se){return X===null||X.tag!==7?(X=cs(ee,Q.mode,oe,Se),X.return=Q,X):(X=a(X,ee),X.return=Q,X)}function ce(Q,X,ee){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=Wa(""+X,Q.mode,ee),X.return=Q,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case b:return ee=gn(X.type,X.key,X.props,null,Q.mode,ee),Er(ee,X),ee.return=Q,ee;case y:return X=Ga(X,Q.mode,ee),X.return=Q,X;case p:return X=_s(X),ce(Q,X,ee)}if(K(X)||T(X))return X=cs(X,Q.mode,ee,null),X.return=Q,X;if(typeof X.then=="function")return ce(Q,xn(X),ee);if(X.$$typeof===c)return ce(Q,Sn(Q,X),ee);wn(Q,X)}return null}function se(Q,X,ee,oe){var Se=X!==null?X.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return Se!==null?null:k(Q,X,""+ee,oe);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:return ee.key===Se?G(Q,X,ee,oe):null;case y:return ee.key===Se?te(Q,X,ee,oe):null;case p:return ee=_s(ee),se(Q,X,ee,oe)}if(K(ee)||T(ee))return Se!==null?null:le(Q,X,ee,oe,null);if(typeof ee.then=="function")return se(Q,X,xn(ee),oe);if(ee.$$typeof===c)return se(Q,X,Sn(Q,ee),oe);wn(Q,ee)}return null}function ae(Q,X,ee,oe,Se){if(typeof oe=="string"&&oe!==""||typeof oe=="number"||typeof oe=="bigint")return Q=Q.get(ee)||null,k(X,Q,""+oe,Se);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case b:return Q=Q.get(oe.key===null?ee:oe.key)||null,G(X,Q,oe,Se);case y:return Q=Q.get(oe.key===null?ee:oe.key)||null,te(X,Q,oe,Se);case p:return oe=_s(oe),ae(Q,X,ee,oe,Se)}if(K(oe)||T(oe))return Q=Q.get(ee)||null,le(X,Q,oe,Se,null);if(typeof oe.then=="function")return ae(Q,X,ee,xn(oe),Se);if(oe.$$typeof===c)return ae(Q,X,ee,Sn(X,oe),Se);wn(X,oe)}return null}function ge(Q,X,ee,oe){for(var Se=null,He=null,me=X,Le=X=0,ke=null;me!==null&&Le<ee.length;Le++){me.index>Le?(ke=me,me=null):ke=me.sibling;var je=se(Q,me,ee[Le],oe);if(je===null){me===null&&(me=ke);break}e&&me&&je.alternate===null&&t(Q,me),X=f(je,X,Le),He===null?Se=je:He.sibling=je,He=je,me=ke}if(Le===ee.length)return i(Q,me),ze&&_i(Q,Le),Se;if(me===null){for(;Le<ee.length;Le++)me=ce(Q,ee[Le],oe),me!==null&&(X=f(me,X,Le),He===null?Se=me:He.sibling=me,He=me);return ze&&_i(Q,Le),Se}for(me=s(me);Le<ee.length;Le++)ke=ae(me,Q,Le,ee[Le],oe),ke!==null&&(e&&ke.alternate!==null&&me.delete(ke.key===null?Le:ke.key),X=f(ke,X,Le),He===null?Se=ke:He.sibling=ke,He=ke);return e&&me.forEach(function(Zi){return t(Q,Zi)}),ze&&_i(Q,Le),Se}function ye(Q,X,ee,oe){if(ee==null)throw Error(j(151));for(var Se=null,He=null,me=X,Le=X=0,ke=null,je=ee.next();me!==null&&!je.done;Le++,je=ee.next()){me.index>Le?(ke=me,me=null):ke=me.sibling;var Zi=se(Q,me,je.value,oe);if(Zi===null){me===null&&(me=ke);break}e&&me&&Zi.alternate===null&&t(Q,me),X=f(Zi,X,Le),He===null?Se=Zi:He.sibling=Zi,He=Zi,me=ke}if(je.done)return i(Q,me),ze&&_i(Q,Le),Se;if(me===null){for(;!je.done;Le++,je=ee.next())je=ce(Q,je.value,oe),je!==null&&(X=f(je,X,Le),He===null?Se=je:He.sibling=je,He=je);return ze&&_i(Q,Le),Se}for(me=s(me);!je.done;Le++,je=ee.next())je=ae(me,Q,Le,je.value,oe),je!==null&&(e&&je.alternate!==null&&me.delete(je.key===null?Le:je.key),X=f(je,X,Le),He===null?Se=je:He.sibling=je,He=je);return e&&me.forEach(function(Dv){return t(Q,Dv)}),ze&&_i(Q,Le),Se}function Ge(Q,X,ee,oe){if(typeof ee=="object"&&ee!==null&&ee.type===d&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case b:e:{for(var Se=ee.key;X!==null;){if(X.key===Se){if(Se=ee.type,Se===d){if(X.tag===7){i(Q,X.sibling),oe=a(X,ee.props.children),oe.return=Q,Q=oe;break e}}else if(X.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===p&&_s(Se)===X.type){i(Q,X.sibling),oe=a(X,ee.props),Er(oe,ee),oe.return=Q,Q=oe;break e}i(Q,X);break}else t(Q,X);X=X.sibling}ee.type===d?(oe=cs(ee.props.children,Q.mode,oe,ee.key),oe.return=Q,Q=oe):(oe=gn(ee.type,ee.key,ee.props,null,Q.mode,oe),Er(oe,ee),oe.return=Q,Q=oe)}return E(Q);case y:e:{for(Se=ee.key;X!==null;){if(X.key===Se)if(X.tag===4&&X.stateNode.containerInfo===ee.containerInfo&&X.stateNode.implementation===ee.implementation){i(Q,X.sibling),oe=a(X,ee.children||[]),oe.return=Q,Q=oe;break e}else{i(Q,X);break}else t(Q,X);X=X.sibling}oe=Ga(ee,Q.mode,oe),oe.return=Q,Q=oe}return E(Q);case p:return ee=_s(ee),Ge(Q,X,ee,oe)}if(K(ee))return ge(Q,X,ee,oe);if(T(ee)){if(Se=T(ee),typeof Se!="function")throw Error(j(150));return ee=Se.call(ee),ye(Q,X,ee,oe)}if(typeof ee.then=="function")return Ge(Q,X,xn(ee),oe);if(ee.$$typeof===c)return Ge(Q,X,Sn(Q,ee),oe);wn(Q,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,X!==null&&X.tag===6?(i(Q,X.sibling),oe=a(X,ee),oe.return=Q,Q=oe):(i(Q,X),oe=Wa(ee,Q.mode,oe),oe.return=Q,Q=oe),E(Q)):i(Q,X)}return function(Q,X,ee,oe){try{wr=0;var Se=Ge(Q,X,ee,oe);return qs=null,Se}catch(me){if(me===Fs||me===yn)throw me;var He=zt(29,me,null,Q.mode);return He.lanes=oe,He.return=Q,He}finally{}}}var gs=th(!0),ih=th(!1),zi=!1;function rl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function nl(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 Ni(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Hi(e,t,i){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(Ue&2)!==0){var a=s.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),s.pending=t,t=vn(e),Uc(e,null,i),t}return _n(e,s,t,i),vn(e)}function Lr(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,Yo(e,i)}}function al(e,t){var i=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,i===s)){var a=null,f=null;if(i=i.firstBaseUpdate,i!==null){do{var E={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};f===null?a=f=E:f=f.next=E,i=i.next}while(i!==null);f===null?a=f=t:f=f.next=t}else a=f=t;i={baseState:s.baseState,firstBaseUpdate:a,lastBaseUpdate:f,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 ll=!1;function Ar(){if(ll){var e=Ps;if(e!==null)throw e}}function Rr(e,t,i,s){ll=!1;var a=e.updateQueue;zi=!1;var f=a.firstBaseUpdate,E=a.lastBaseUpdate,k=a.shared.pending;if(k!==null){a.shared.pending=null;var G=k,te=G.next;G.next=null,E===null?f=te:E.next=te,E=G;var le=e.alternate;le!==null&&(le=le.updateQueue,k=le.lastBaseUpdate,k!==E&&(k===null?le.firstBaseUpdate=te:k.next=te,le.lastBaseUpdate=G))}if(f!==null){var ce=a.baseState;E=0,le=te=G=null,k=f;do{var se=k.lane&-536870913,ae=se!==k.lane;if(ae?(Oe&se)===se:(s&se)===se){se!==0&&se===Is&&(ll=!0),le!==null&&(le=le.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var ge=e,ye=k;se=t;var Ge=i;switch(ye.tag){case 1:if(ge=ye.payload,typeof ge=="function"){ce=ge.call(Ge,ce,se);break e}ce=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=ye.payload,se=typeof ge=="function"?ge.call(Ge,ce,se):ge,se==null)break e;ce=l({},ce,se);break e;case 2:zi=!0}}se=k.callback,se!==null&&(e.flags|=64,ae&&(e.flags|=8192),ae=a.callbacks,ae===null?a.callbacks=[se]:ae.push(se))}else ae={lane:se,tag:k.tag,payload:k.payload,callback:k.callback,next:null},le===null?(te=le=ae,G=ce):le=le.next=ae,E|=se;if(k=k.next,k===null){if(k=a.shared.pending,k===null)break;ae=k,k=ae.next,ae.next=null,a.lastBaseUpdate=ae,a.shared.pending=null}}while(!0);le===null&&(G=ce),a.baseState=G,a.firstBaseUpdate=te,a.lastBaseUpdate=le,f===null&&(a.shared.lanes=0),Fi|=E,e.lanes=E,e.memoizedState=ce}}function sh(e,t){if(typeof e!="function")throw Error(j(191,e));e.call(t)}function rh(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)sh(i[e],t)}var $s=D(null),En=D(0);function nh(e,t){e=Ei,V(En,e),V($s,t),Ei=e|t.baseLanes}function ol(){V(En,Ei),V($s,$s.current)}function cl(){Ei=En.current,z($s),z(En)}var Nt=D(null),Kt=null;function ji(e){var t=e.alternate;V(rt,rt.current&1),V(Nt,e),Kt===null&&(t===null||$s.current!==null||t.memoizedState!==null)&&(Kt=e)}function hl(e){V(rt,rt.current),V(Nt,e),Kt===null&&(Kt=e)}function ah(e){e.tag===22?(V(rt,rt.current),V(Nt,e),Kt===null&&(Kt=e)):Ui()}function Ui(){V(rt,rt.current),V(Nt,Nt.current)}function Ht(e){z(Nt),Kt===e&&(Kt=null),z(rt)}var rt=D(0);function Ln(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||mo(i)||po(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 mi=0,Ee=null,$e=null,lt=null,An=!1,Ws=!1,ms=!1,Rn=0,Dr=0,Gs=null,S_=0;function it(){throw Error(j(321))}function ul(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!kt(e[i],t[i]))return!1;return!0}function dl(e,t,i,s,a,f){return mi=f,Ee=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?qh:Al,ms=!1,f=i(s,a),ms=!1,Ws&&(f=oh(t,i,s,a)),lh(e),f}function lh(e){I.H=Br;var t=$e!==null&&$e.next!==null;if(mi=0,lt=$e=Ee=null,An=!1,Dr=0,Gs=null,t)throw Error(j(300));e===null||ot||(e=e.dependencies,e!==null&&pn(e)&&(ot=!0))}function oh(e,t,i,s){Ee=e;var a=0;do{if(Ws&&(Gs=null),Dr=0,Ws=!1,25<=a)throw Error(j(301));if(a+=1,lt=$e=null,e.updateQueue!=null){var f=e.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}I.H=$h,f=t(i,s)}while(Ws);return f}function b_(){var e=I.H,t=e.useState()[0];return t=typeof t.then=="function"?Tr(t):t,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Ee.flags|=1024),t}function fl(){var e=Rn!==0;return Rn=0,e}function _l(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function vl(e){if(An){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}An=!1}mi=0,lt=$e=Ee=null,Ws=!1,Dr=Rn=0,Gs=null}function xt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return lt===null?Ee.memoizedState=lt=e:lt=lt.next=e,lt}function nt(){if($e===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var t=lt===null?Ee.memoizedState:lt.next;if(t!==null)lt=t,$e=e;else{if(e===null)throw Ee.alternate===null?Error(j(467)):Error(j(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},lt===null?Ee.memoizedState=lt=e:lt=lt.next=e}return lt}function Dn(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Tr(e){var t=Dr;return Dr+=1,Gs===null&&(Gs=[]),e=Zc(Gs,e,t),t=Ee,(lt===null?t.memoizedState:lt.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?qh:Al),e}function Tn(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Tr(e);if(e.$$typeof===c)return mt(e)}throw Error(j(438,String(e)))}function gl(e){var t=null,i=Ee.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var s=Ee.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Dn(),Ee.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),s=0;s<e;s++)i[s]=L;return t.index++,i}function pi(e,t){return typeof t=="function"?t(e):t}function Mn(e){var t=nt();return ml(t,$e,e)}function ml(e,t,i){var s=e.queue;if(s===null)throw Error(j(311));s.lastRenderedReducer=i;var a=e.baseQueue,f=s.pending;if(f!==null){if(a!==null){var E=a.next;a.next=f.next,f.next=E}t.baseQueue=a=f,s.pending=null}if(f=e.baseState,a===null)e.memoizedState=f;else{t=a.next;var k=E=null,G=null,te=t,le=!1;do{var ce=te.lane&-536870913;if(ce!==te.lane?(Oe&ce)===ce:(mi&ce)===ce){var se=te.revertLane;if(se===0)G!==null&&(G=G.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ce===Is&&(le=!0);else if((mi&se)===se){te=te.next,se===Is&&(le=!0);continue}else ce={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},G===null?(k=G=ce,E=f):G=G.next=ce,Ee.lanes|=se,Fi|=se;ce=te.action,ms&&i(f,ce),f=te.hasEagerState?te.eagerState:i(f,ce)}else se={lane:ce,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},G===null?(k=G=se,E=f):G=G.next=se,Ee.lanes|=ce,Fi|=ce;te=te.next}while(te!==null&&te!==t);if(G===null?E=f:G.next=k,!kt(f,e.memoizedState)&&(ot=!0,le&&(i=Ps,i!==null)))throw i;e.memoizedState=f,e.baseState=E,e.baseQueue=G,s.lastRenderedState=f}return a===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function pl(e){var t=nt(),i=t.queue;if(i===null)throw Error(j(311));i.lastRenderedReducer=e;var s=i.dispatch,a=i.pending,f=t.memoizedState;if(a!==null){i.pending=null;var E=a=a.next;do f=e(f,E.action),E=E.next;while(E!==a);kt(f,t.memoizedState)||(ot=!0),t.memoizedState=f,t.baseQueue===null&&(t.baseState=f),i.lastRenderedState=f}return[f,s]}function ch(e,t,i){var s=Ee,a=nt(),f=ze;if(f){if(i===void 0)throw Error(j(407));i=i()}else i=t();var E=!kt(($e||a).memoizedState,i);if(E&&(a.memoizedState=i,ot=!0),a=a.queue,yl(dh.bind(null,s,a,e),[e]),a.getSnapshot!==t||E||lt!==null&<.memoizedState.tag&1){if(s.flags|=2048,Ys(9,{destroy:void 0},uh.bind(null,s,a,i,t),null),Ye===null)throw Error(j(349));f||(mi&127)!==0||hh(s,t,i)}return i}function hh(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ee.updateQueue,t===null?(t=Dn(),Ee.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function uh(e,t,i,s){t.value=i,t.getSnapshot=s,fh(t)&&_h(e)}function dh(e,t,i){return i(function(){fh(t)&&_h(e)})}function fh(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!kt(e,i)}catch{return!0}}function _h(e){var t=os(e,2);t!==null&&Mt(t,e,2)}function Sl(e){var t=xt();if(typeof e=="function"){var i=e;if(e=i(),ms){Ot(!0);try{i()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:e},t}function vh(e,t,i,s){return e.baseState=i,ml(e,$e,typeof s=="function"?s:pi)}function y_(e,t,i,s,a){if(kn(e))throw Error(j(485));if(e=t.action,e!==null){var f={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(E){f.listeners.push(E)}};I.T!==null?i(!0):f.isTransition=!1,s(f),i=t.pending,i===null?(f.next=t.pending=f,gh(t,f)):(f.next=i.next,t.pending=i.next=f)}}function gh(e,t){var i=t.action,s=t.payload,a=e.state;if(t.isTransition){var f=I.T,E={};I.T=E;try{var k=i(a,s),G=I.S;G!==null&&G(E,k),mh(e,t,k)}catch(te){bl(e,t,te)}finally{f!==null&&E.types!==null&&(f.types=E.types),I.T=f}}else try{f=i(a,s),mh(e,t,f)}catch(te){bl(e,t,te)}}function mh(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(s){ph(e,t,s)},function(s){return bl(e,t,s)}):ph(e,t,i)}function ph(e,t,i){t.status="fulfilled",t.value=i,Sh(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,gh(e,i)))}function bl(e,t,i){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=i,Sh(t),t=t.next;while(t!==s)}e.action=null}function Sh(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bh(e,t){return t}function yh(e,t){if(ze){var i=Ye.formState;if(i!==null){e:{var s=Ee;if(ze){if(Ve){t:{for(var a=Ve,f=Vt;a.nodeType!==8;){if(!f){a=null;break t}if(a=Qt(a.nextSibling),a===null){a=null;break t}}f=a.data,a=f==="F!"||f==="F"?a:null}if(a){Ve=Qt(a.nextSibling),s=a.data==="F!";break e}}Oi(s)}s=!1}s&&(t=i[0])}}return i=xt(),i.memoizedState=i.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bh,lastRenderedState:t},i.queue=s,i=Ih.bind(null,Ee,s),s.dispatch=i,s=Sl(!1),f=Ll.bind(null,Ee,!1,s.queue),s=xt(),a={state:t,dispatch:null,action:e,pending:null},s.queue=a,i=y_.bind(null,Ee,a,f,i),a.dispatch=i,s.memoizedState=e,[t,i,!1]}function Ch(e){var t=nt();return xh(t,$e,e)}function xh(e,t,i){if(t=ml(e,t,bh)[0],e=Mn(pi)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Tr(t)}catch(E){throw E===Fs?yn:E}else s=t;t=nt();var a=t.queue,f=a.dispatch;return i!==t.memoizedState&&(Ee.flags|=2048,Ys(9,{destroy:void 0},C_.bind(null,a,i),null)),[s,f,e]}function C_(e,t){e.action=t}function wh(e){var t=nt(),i=$e;if(i!==null)return xh(t,i,e);nt(),t=t.memoizedState,i=nt();var s=i.queue.dispatch;return i.memoizedState=e,[t,s,!1]}function Ys(e,t,i,s){return e={tag:e,create:i,deps:s,inst:t,next:null},t=Ee.updateQueue,t===null&&(t=Dn(),Ee.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(s=i.next,i.next=e,e.next=s,t.lastEffect=e),e}function Eh(){return nt().memoizedState}function Bn(e,t,i,s){var a=xt();Ee.flags|=e,a.memoizedState=Ys(1|t,{destroy:void 0},i,s===void 0?null:s)}function On(e,t,i,s){var a=nt();s=s===void 0?null:s;var f=a.memoizedState.inst;$e!==null&&s!==null&&ul(s,$e.memoizedState.deps)?a.memoizedState=Ys(t,f,i,s):(Ee.flags|=e,a.memoizedState=Ys(1|t,f,i,s))}function Lh(e,t){Bn(8390656,8,e,t)}function yl(e,t){On(2048,8,e,t)}function x_(e){Ee.flags|=4;var t=Ee.updateQueue;if(t===null)t=Dn(),Ee.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function Ah(e){var t=nt().memoizedState;return x_({ref:t,nextImpl:e}),function(){if((Ue&2)!==0)throw Error(j(440));return t.impl.apply(void 0,arguments)}}function Rh(e,t){return On(4,2,e,t)}function Dh(e,t){return On(4,4,e,t)}function Th(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 Mh(e,t,i){i=i!=null?i.concat([e]):null,On(4,4,Th.bind(null,t,e),i)}function Cl(){}function Bh(e,t){var i=nt();t=t===void 0?null:t;var s=i.memoizedState;return t!==null&&ul(t,s[1])?s[0]:(i.memoizedState=[e,t],e)}function Oh(e,t){var i=nt();t=t===void 0?null:t;var s=i.memoizedState;if(t!==null&&ul(t,s[1]))return s[0];if(s=e(),ms){Ot(!0);try{e()}finally{Ot(!1)}}return i.memoizedState=[s,t],s}function xl(e,t,i){return i===void 0||(mi&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=ku(),Ee.lanes|=e,Fi|=e,i)}function kh(e,t,i,s){return kt(i,t)?i:$s.current!==null?(e=xl(e,i,s),kt(e,t)||(ot=!0),e):(mi&42)===0||(mi&1073741824)!==0&&(Oe&261930)===0?(ot=!0,e.memoizedState=i):(e=ku(),Ee.lanes|=e,Fi|=e,t)}function zh(e,t,i,s,a){var f=q.p;q.p=f!==0&&8>f?f:8;var E=I.T,k={};I.T=k,Ll(e,!1,t,i);try{var G=a(),te=I.S;if(te!==null&&te(k,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var le=p_(G,s);Mr(e,t,le,It(e))}else Mr(e,t,s,It(e))}catch(ce){Mr(e,t,{then:function(){},status:"rejected",reason:ce},It())}finally{q.p=f,E!==null&&k.types!==null&&(E.types=k.types),I.T=E}}function w_(){}function wl(e,t,i,s){if(e.tag!==5)throw Error(j(476));var a=Nh(e).queue;zh(e,a,t,F,i===null?w_:function(){return Hh(e),i(s)})}function Nh(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:F},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pi,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hh(e){var t=Nh(e);t.next===null&&(t=e.alternate.memoizedState),Mr(e,t.next.queue,{},It())}function El(){return mt(Xr)}function jh(){return nt().memoizedState}function Uh(){return nt().memoizedState}function E_(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=It();e=Ni(i);var s=Hi(t,e,i);s!==null&&(Mt(s,t,i),Lr(s,t,i)),t={cache:el()},e.payload=t;return}t=t.return}}function L_(e,t,i){var s=It();i={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},kn(e)?Ph(t,i):(i=qa(e,t,i,s),i!==null&&(Mt(i,e,s),Fh(i,t,s)))}function Ih(e,t,i){var s=It();Mr(e,t,i,s)}function Mr(e,t,i,s){var a={lane:s,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(kn(e))Ph(t,a);else{var f=e.alternate;if(e.lanes===0&&(f===null||f.lanes===0)&&(f=t.lastRenderedReducer,f!==null))try{var E=t.lastRenderedState,k=f(E,i);if(a.hasEagerState=!0,a.eagerState=k,kt(k,E))return _n(e,t,a,0),Ye===null&&fn(),!1}catch{}finally{}if(i=qa(e,t,a,s),i!==null)return Mt(i,e,s),Fh(i,t,s),!0}return!1}function Ll(e,t,i,s){if(s={lane:2,revertLane:ro(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},kn(e)){if(t)throw Error(j(479))}else t=qa(e,i,s,2),t!==null&&Mt(t,e,2)}function kn(e){var t=e.alternate;return e===Ee||t!==null&&t===Ee}function Ph(e,t){Ws=An=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function Fh(e,t,i){if((i&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,i|=s,t.lanes=i,Yo(e,i)}}var Br={readContext:mt,use:Tn,useCallback:it,useContext:it,useEffect:it,useImperativeHandle:it,useLayoutEffect:it,useInsertionEffect:it,useMemo:it,useReducer:it,useRef:it,useState:it,useDebugValue:it,useDeferredValue:it,useTransition:it,useSyncExternalStore:it,useId:it,useHostTransitionStatus:it,useFormState:it,useActionState:it,useOptimistic:it,useMemoCache:it,useCacheRefresh:it};Br.useEffectEvent=it;var qh={readContext:mt,use:Tn,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:mt,useEffect:Lh,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Bn(4194308,4,Th.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Bn(4194308,4,e,t)},useInsertionEffect:function(e,t){Bn(4,2,e,t)},useMemo:function(e,t){var i=xt();t=t===void 0?null:t;var s=e();if(ms){Ot(!0);try{e()}finally{Ot(!1)}}return i.memoizedState=[s,t],s},useReducer:function(e,t,i){var s=xt();if(i!==void 0){var a=i(t);if(ms){Ot(!0);try{i(t)}finally{Ot(!1)}}}else a=t;return s.memoizedState=s.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},s.queue=e,e=e.dispatch=L_.bind(null,Ee,e),[s.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:function(e){e=Sl(e);var t=e.queue,i=Ih.bind(null,Ee,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Cl,useDeferredValue:function(e,t){var i=xt();return xl(i,e,t)},useTransition:function(){var e=Sl(!1);return e=zh.bind(null,Ee,e.queue,!0,!1),xt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var s=Ee,a=xt();if(ze){if(i===void 0)throw Error(j(407));i=i()}else{if(i=t(),Ye===null)throw Error(j(349));(Oe&127)!==0||hh(s,t,i)}a.memoizedState=i;var f={value:i,getSnapshot:t};return a.queue=f,Lh(dh.bind(null,s,f,e),[e]),s.flags|=2048,Ys(9,{destroy:void 0},uh.bind(null,s,f,i,t),null),i},useId:function(){var e=xt(),t=Ye.identifierPrefix;if(ze){var i=ni,s=ri;i=(s&~(1<<32-bt(s)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Rn++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=S_++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:El,useFormState:yh,useActionState:yh,useOptimistic:function(e){var t=xt();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=Ll.bind(null,Ee,!0,i),i.dispatch=t,[e,t]},useMemoCache:gl,useCacheRefresh:function(){return xt().memoizedState=E_.bind(null,Ee)},useEffectEvent:function(e){var t=xt(),i={impl:e};return t.memoizedState=i,function(){if((Ue&2)!==0)throw Error(j(440));return i.impl.apply(void 0,arguments)}}},Al={readContext:mt,use:Tn,useCallback:Bh,useContext:mt,useEffect:yl,useImperativeHandle:Mh,useInsertionEffect:Rh,useLayoutEffect:Dh,useMemo:Oh,useReducer:Mn,useRef:Eh,useState:function(){return Mn(pi)},useDebugValue:Cl,useDeferredValue:function(e,t){var i=nt();return kh(i,$e.memoizedState,e,t)},useTransition:function(){var e=Mn(pi)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:Tr(e),t]},useSyncExternalStore:ch,useId:jh,useHostTransitionStatus:El,useFormState:Ch,useActionState:Ch,useOptimistic:function(e,t){var i=nt();return vh(i,$e,e,t)},useMemoCache:gl,useCacheRefresh:Uh};Al.useEffectEvent=Ah;var $h={readContext:mt,use:Tn,useCallback:Bh,useContext:mt,useEffect:yl,useImperativeHandle:Mh,useInsertionEffect:Rh,useLayoutEffect:Dh,useMemo:Oh,useReducer:pl,useRef:Eh,useState:function(){return pl(pi)},useDebugValue:Cl,useDeferredValue:function(e,t){var i=nt();return $e===null?xl(i,e,t):kh(i,$e.memoizedState,e,t)},useTransition:function(){var e=pl(pi)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:Tr(e),t]},useSyncExternalStore:ch,useId:jh,useHostTransitionStatus:El,useFormState:wh,useActionState:wh,useOptimistic:function(e,t){var i=nt();return $e!==null?vh(i,$e,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:gl,useCacheRefresh:Uh};$h.useEffectEvent=Ah;function Rl(e,t,i,s){t=e.memoizedState,i=i(s,t),i=i==null?t:l({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Dl={enqueueSetState:function(e,t,i){e=e._reactInternals;var s=It(),a=Ni(s);a.payload=t,i!=null&&(a.callback=i),t=Hi(e,a,s),t!==null&&(Mt(t,e,s),Lr(t,e,s))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var s=It(),a=Ni(s);a.tag=1,a.payload=t,i!=null&&(a.callback=i),t=Hi(e,a,s),t!==null&&(Mt(t,e,s),Lr(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=It(),s=Ni(i);s.tag=2,t!=null&&(s.callback=t),t=Hi(e,s,i),t!==null&&(Mt(t,e,i),Lr(t,e,i))}};function Wh(e,t,i,s,a,f,E){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(s,f,E):t.prototype&&t.prototype.isPureReactComponent?!pr(i,s)||!pr(a,f):!0}function Gh(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&&Dl.enqueueReplaceState(t,t.state,null)}function ps(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=l({},i));for(var a in e)i[a]===void 0&&(i[a]=e[a])}return i}function Yh(e){dn(e)}function Xh(e){console.error(e)}function Vh(e){dn(e)}function zn(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(s){setTimeout(function(){throw s})}}function Kh(e,t,i){try{var s=e.onCaughtError;s(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Tl(e,t,i){return i=Ni(i),i.tag=3,i.payload={element:null},i.callback=function(){zn(e,t)},i}function Qh(e){return e=Ni(e),e.tag=3,e}function Zh(e,t,i,s){var a=i.type.getDerivedStateFromError;if(typeof a=="function"){var f=s.value;e.payload=function(){return a(f)},e.callback=function(){Kh(t,i,s)}}var E=i.stateNode;E!==null&&typeof E.componentDidCatch=="function"&&(e.callback=function(){Kh(t,i,s),typeof a!="function"&&(qi===null?qi=new Set([this]):qi.add(this));var k=s.stack;this.componentDidCatch(s.value,{componentStack:k!==null?k:""})})}function A_(e,t,i,s,a){if(i.flags|=32768,s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=i.alternate,t!==null&&Us(t,i,a,!0),i=Nt.current,i!==null){switch(i.tag){case 31:case 13:return Kt===null?Yn():i.alternate===null&&st===0&&(st=3),i.flags&=-257,i.flags|=65536,i.lanes=a,s===Cn?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([s]):t.add(s),to(e,s,a)),!1;case 22:return i.flags|=65536,s===Cn?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)),to(e,s,a)),!1}throw Error(j(435,i.tag))}return to(e,s,a),Yn(),!1}if(ze)return t=Nt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,s!==Va&&(e=Error(j(422),{cause:s}),yr(Gt(e,i)))):(s!==Va&&(t=Error(j(423),{cause:s}),yr(Gt(t,i))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,s=Gt(s,i),a=Tl(e.stateNode,s,a),al(e,a),st!==4&&(st=2)),!1;var f=Error(j(520),{cause:s});if(f=Gt(f,i),Ir===null?Ir=[f]:Ir.push(f),st!==4&&(st=2),t===null)return!0;s=Gt(s,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=a&-a,i.lanes|=e,e=Tl(i.stateNode,s,e),al(i,e),!1;case 1:if(t=i.type,f=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(qi===null||!qi.has(f))))return i.flags|=65536,a&=-a,i.lanes|=a,a=Qh(a),Zh(a,e,i,s),al(i,a),!1}i=i.return}while(i!==null);return!1}var Ml=Error(j(461)),ot=!1;function pt(e,t,i,s){t.child=e===null?ih(t,null,i,s):gs(t,e.child,i,s)}function Jh(e,t,i,s,a){i=i.render;var f=t.ref;if("ref"in s){var E={};for(var k in s)k!=="ref"&&(E[k]=s[k])}else E=s;return ds(t),s=dl(e,t,i,E,f,a),k=fl(),e!==null&&!ot?(_l(e,t,a),Si(e,t,a)):(ze&&k&&Ya(t),t.flags|=1,pt(e,t,s,a),t.child)}function eu(e,t,i,s,a){if(e===null){var f=i.type;return typeof f=="function"&&!$a(f)&&f.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=f,tu(e,t,f,s,a)):(e=gn(i.type,null,s,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(f=e.child,!Ul(e,a)){var E=f.memoizedProps;if(i=i.compare,i=i!==null?i:pr,i(E,s)&&e.ref===t.ref)return Si(e,t,a)}return t.flags|=1,e=fi(f,s),e.ref=t.ref,e.return=t,t.child=e}function tu(e,t,i,s,a){if(e!==null){var f=e.memoizedProps;if(pr(f,s)&&e.ref===t.ref)if(ot=!1,t.pendingProps=s=f,Ul(e,a))(e.flags&131072)!==0&&(ot=!0);else return t.lanes=e.lanes,Si(e,t,a)}return Bl(e,t,i,s,a)}function iu(e,t,i,s){var a=s.children,f=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(f=f!==null?f.baseLanes|i:i,e!==null){for(s=t.child=e.child,a=0;s!==null;)a=a|s.lanes|s.childLanes,s=s.sibling;s=a&~f}else s=0,t.child=null;return su(e,t,f,i,s)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bn(t,f!==null?f.cachePool:null),f!==null?nh(t,f):ol(),ah(t);else return s=t.lanes=536870912,su(e,t,f!==null?f.baseLanes|i:i,i,s)}else f!==null?(bn(t,f.cachePool),nh(t,f),Ui(),t.memoizedState=null):(e!==null&&bn(t,null),ol(),Ui());return pt(e,t,a,i),t.child}function Or(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function su(e,t,i,s,a){var f=il();return f=f===null?null:{parent:at._currentValue,pool:f},t.memoizedState={baseLanes:i,cachePool:f},e!==null&&bn(t,null),ol(),ah(t),e!==null&&Us(e,t,s,!0),t.childLanes=a,null}function Nn(e,t){return t=jn({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ru(e,t,i){return gs(t,e.child,null,i),e=Nn(t,t.pendingProps),e.flags|=2,Ht(t),t.memoizedState=null,e}function R_(e,t,i){var s=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ze){if(s.mode==="hidden")return e=Nn(t,s),t.lanes=536870912,Or(null,e);if(hl(t),(e=Ve)?(e=gd(e,Vt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi!==null?{id:ri,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},i=Pc(e),i.return=t,t.child=i,gt=t,Ve=null)):e=null,e===null)throw Oi(t);return t.lanes=536870912,null}return Nn(t,s)}var f=e.memoizedState;if(f!==null){var E=f.dehydrated;if(hl(t),a)if(t.flags&256)t.flags&=-257,t=ru(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(j(558));else if(ot||Us(e,t,i,!1),a=(i&e.childLanes)!==0,ot||a){if(s=Ye,s!==null&&(E=Xo(s,i),E!==0&&E!==f.retryLane))throw f.retryLane=E,os(e,E),Mt(s,e,E),Ml;Yn(),t=ru(e,t,i)}else e=f.treeContext,Ve=Qt(E.nextSibling),gt=t,ze=!0,Bi=null,Vt=!1,e!==null&&$c(t,e),t=Nn(t,s),t.flags|=4096;return t}return e=fi(e.child,{mode:s.mode,children:s.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hn(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(j(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Bl(e,t,i,s,a){return ds(t),i=dl(e,t,i,s,void 0,a),s=fl(),e!==null&&!ot?(_l(e,t,a),Si(e,t,a)):(ze&&s&&Ya(t),t.flags|=1,pt(e,t,i,a),t.child)}function nu(e,t,i,s,a,f){return ds(t),t.updateQueue=null,i=oh(t,s,i,a),lh(e),s=fl(),e!==null&&!ot?(_l(e,t,f),Si(e,t,f)):(ze&&s&&Ya(t),t.flags|=1,pt(e,t,i,f),t.child)}function au(e,t,i,s,a){if(ds(t),t.stateNode===null){var f=zs,E=i.contextType;typeof E=="object"&&E!==null&&(f=mt(E)),f=new i(s,f),t.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=Dl,t.stateNode=f,f._reactInternals=t,f=t.stateNode,f.props=s,f.state=t.memoizedState,f.refs={},rl(t),E=i.contextType,f.context=typeof E=="object"&&E!==null?mt(E):zs,f.state=t.memoizedState,E=i.getDerivedStateFromProps,typeof E=="function"&&(Rl(t,i,E,s),f.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(E=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),E!==f.state&&Dl.enqueueReplaceState(f,f.state,null),Rr(t,s,f,a),Ar(),f.state=t.memoizedState),typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!0}else if(e===null){f=t.stateNode;var k=t.memoizedProps,G=ps(i,k);f.props=G;var te=f.context,le=i.contextType;E=zs,typeof le=="object"&&le!==null&&(E=mt(le));var ce=i.getDerivedStateFromProps;le=typeof ce=="function"||typeof f.getSnapshotBeforeUpdate=="function",k=t.pendingProps!==k,le||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(k||te!==E)&&Gh(t,f,s,E),zi=!1;var se=t.memoizedState;f.state=se,Rr(t,s,f,a),Ar(),te=t.memoizedState,k||se!==te||zi?(typeof ce=="function"&&(Rl(t,i,ce,s),te=t.memoizedState),(G=zi||Wh(t,i,G,s,se,te,E))?(le||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(t.flags|=4194308)):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=s,t.memoizedState=te),f.props=s,f.state=te,f.context=E,s=G):(typeof f.componentDidMount=="function"&&(t.flags|=4194308),s=!1)}else{f=t.stateNode,nl(e,t),E=t.memoizedProps,le=ps(i,E),f.props=le,ce=t.pendingProps,se=f.context,te=i.contextType,G=zs,typeof te=="object"&&te!==null&&(G=mt(te)),k=i.getDerivedStateFromProps,(te=typeof k=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(E!==ce||se!==G)&&Gh(t,f,s,G),zi=!1,se=t.memoizedState,f.state=se,Rr(t,s,f,a),Ar();var ae=t.memoizedState;E!==ce||se!==ae||zi||e!==null&&e.dependencies!==null&&pn(e.dependencies)?(typeof k=="function"&&(Rl(t,i,k,s),ae=t.memoizedState),(le=zi||Wh(t,i,le,s,se,ae,G)||e!==null&&e.dependencies!==null&&pn(e.dependencies))?(te||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(s,ae,G),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(s,ae,G)),typeof f.componentDidUpdate=="function"&&(t.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof f.componentDidUpdate!="function"||E===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=ae),f.props=s,f.state=ae,f.context=G,s=le):(typeof f.componentDidUpdate!="function"||E===e.memoizedProps&&se===e.memoizedState||(t.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||E===e.memoizedProps&&se===e.memoizedState||(t.flags|=1024),s=!1)}return f=s,Hn(e,t),s=(t.flags&128)!==0,f||s?(f=t.stateNode,i=s&&typeof i.getDerivedStateFromError!="function"?null:f.render(),t.flags|=1,e!==null&&s?(t.child=gs(t,e.child,null,a),t.child=gs(t,null,i,a)):pt(e,t,i,a),t.memoizedState=f.state,e=t.child):e=Si(e,t,a),e}function lu(e,t,i,s){return hs(),t.flags|=256,pt(e,t,i,s),t.child}var Ol={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function kl(e){return{baseLanes:e,cachePool:Kc()}}function zl(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Ut),e}function ou(e,t,i){var s=t.pendingProps,a=!1,f=(t.flags&128)!==0,E;if((E=f)||(E=e!==null&&e.memoizedState===null?!1:(rt.current&2)!==0),E&&(a=!0,t.flags&=-129),E=(t.flags&32)!==0,t.flags&=-33,e===null){if(ze){if(a?ji(t):Ui(),(e=Ve)?(e=gd(e,Vt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Mi!==null?{id:ri,overflow:ni}:null,retryLane:536870912,hydrationErrors:null},i=Pc(e),i.return=t,t.child=i,gt=t,Ve=null)):e=null,e===null)throw Oi(t);return po(e)?t.lanes=32:t.lanes=536870912,null}var k=s.children;return s=s.fallback,a?(Ui(),a=t.mode,k=jn({mode:"hidden",children:k},a),s=cs(s,a,i,null),k.return=t,s.return=t,k.sibling=s,t.child=k,s=t.child,s.memoizedState=kl(i),s.childLanes=zl(e,E,i),t.memoizedState=Ol,Or(null,s)):(ji(t),Nl(t,k))}var G=e.memoizedState;if(G!==null&&(k=G.dehydrated,k!==null)){if(f)t.flags&256?(ji(t),t.flags&=-257,t=Hl(e,t,i)):t.memoizedState!==null?(Ui(),t.child=e.child,t.flags|=128,t=null):(Ui(),k=s.fallback,a=t.mode,s=jn({mode:"visible",children:s.children},a),k=cs(k,a,i,null),k.flags|=2,s.return=t,k.return=t,s.sibling=k,t.child=s,gs(t,e.child,null,i),s=t.child,s.memoizedState=kl(i),s.childLanes=zl(e,E,i),t.memoizedState=Ol,t=Or(null,s));else if(ji(t),po(k)){if(E=k.nextSibling&&k.nextSibling.dataset,E)var te=E.dgst;E=te,s=Error(j(419)),s.stack="",s.digest=E,yr({value:s,source:null,stack:null}),t=Hl(e,t,i)}else if(ot||Us(e,t,i,!1),E=(i&e.childLanes)!==0,ot||E){if(E=Ye,E!==null&&(s=Xo(E,i),s!==0&&s!==G.retryLane))throw G.retryLane=s,os(e,s),Mt(E,e,s),Ml;mo(k)||Yn(),t=Hl(e,t,i)}else mo(k)?(t.flags|=192,t.child=e.child,t=null):(e=G.treeContext,Ve=Qt(k.nextSibling),gt=t,ze=!0,Bi=null,Vt=!1,e!==null&&$c(t,e),t=Nl(t,s.children),t.flags|=4096);return t}return a?(Ui(),k=s.fallback,a=t.mode,G=e.child,te=G.sibling,s=fi(G,{mode:"hidden",children:s.children}),s.subtreeFlags=G.subtreeFlags&65011712,te!==null?k=fi(te,k):(k=cs(k,a,i,null),k.flags|=2),k.return=t,s.return=t,s.sibling=k,t.child=s,Or(null,s),s=t.child,k=e.child.memoizedState,k===null?k=kl(i):(a=k.cachePool,a!==null?(G=at._currentValue,a=a.parent!==G?{parent:G,pool:G}:a):a=Kc(),k={baseLanes:k.baseLanes|i,cachePool:a}),s.memoizedState=k,s.childLanes=zl(e,E,i),t.memoizedState=Ol,Or(e.child,s)):(ji(t),i=e.child,e=i.sibling,i=fi(i,{mode:"visible",children:s.children}),i.return=t,i.sibling=null,e!==null&&(E=t.deletions,E===null?(t.deletions=[e],t.flags|=16):E.push(e)),t.child=i,t.memoizedState=null,i)}function Nl(e,t){return t=jn({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function jn(e,t){return e=zt(22,e,null,t),e.lanes=0,e}function Hl(e,t,i){return gs(t,e.child,null,i),e=Nl(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function cu(e,t,i){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Za(e.return,t,i)}function jl(e,t,i,s,a,f){var E=e.memoizedState;E===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:i,tailMode:a,treeForkCount:f}:(E.isBackwards=t,E.rendering=null,E.renderingStartTime=0,E.last=s,E.tail=i,E.tailMode=a,E.treeForkCount=f)}function hu(e,t,i){var s=t.pendingProps,a=s.revealOrder,f=s.tail;s=s.children;var E=rt.current,k=(E&2)!==0;if(k?(E=E&1|2,t.flags|=128):E&=1,V(rt,E),pt(e,t,s,i),s=ze?br:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&cu(e,i,t);else if(e.tag===19)cu(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(a){case"forwards":for(i=t.child,a=null;i!==null;)e=i.alternate,e!==null&&Ln(e)===null&&(a=i),i=i.sibling;i=a,i===null?(a=t.child,t.child=null):(a=i.sibling,i.sibling=null),jl(t,!1,a,i,f,s);break;case"backwards":case"unstable_legacy-backwards":for(i=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ln(e)===null){t.child=a;break}e=a.sibling,a.sibling=i,i=a,a=e}jl(t,!0,i,null,f,s);break;case"together":jl(t,!1,null,null,void 0,s);break;default:t.memoizedState=null}return t.child}function Si(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Fi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(Us(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,i=fi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=fi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Ul(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&pn(e)))}function D_(e,t,i){switch(t.tag){case 3:N(t,t.stateNode.containerInfo),ki(t,at,e.memoizedState.cache),hs();break;case 27:case 5:re(t);break;case 4:N(t,t.stateNode.containerInfo);break;case 10:ki(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,hl(t),null;break;case 13:var s=t.memoizedState;if(s!==null)return s.dehydrated!==null?(ji(t),t.flags|=128,null):(i&t.child.childLanes)!==0?ou(e,t,i):(ji(t),e=Si(e,t,i),e!==null?e.sibling:null);ji(t);break;case 19:var a=(e.flags&128)!==0;if(s=(i&t.childLanes)!==0,s||(Us(e,t,i,!1),s=(i&t.childLanes)!==0),a){if(s)return hu(e,t,i);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),V(rt,rt.current),s)break;return null;case 22:return t.lanes=0,iu(e,t,i,t.pendingProps);case 24:ki(t,at,e.memoizedState.cache)}return Si(e,t,i)}function uu(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)ot=!0;else{if(!Ul(e,i)&&(t.flags&128)===0)return ot=!1,D_(e,t,i);ot=(e.flags&131072)!==0}else ot=!1,ze&&(t.flags&1048576)!==0&&qc(t,br,t.index);switch(t.lanes=0,t.tag){case 16:e:{var s=t.pendingProps;if(e=_s(t.elementType),t.type=e,typeof e=="function")$a(e)?(s=ps(e,s),t.tag=1,t=au(null,t,e,s,i)):(t.tag=0,t=Bl(null,t,e,s,i));else{if(e!=null){var a=e.$$typeof;if(a===m){t.tag=11,t=Jh(null,t,e,s,i);break e}else if(a===w){t.tag=14,t=eu(null,t,e,s,i);break e}}throw t=U(e)||e,Error(j(306,t,""))}}return t;case 0:return Bl(e,t,t.type,t.pendingProps,i);case 1:return s=t.type,a=ps(s,t.pendingProps),au(e,t,s,a,i);case 3:e:{if(N(t,t.stateNode.containerInfo),e===null)throw Error(j(387));s=t.pendingProps;var f=t.memoizedState;a=f.element,nl(e,t),Rr(t,s,null,i);var E=t.memoizedState;if(s=E.cache,ki(t,at,s),s!==f.cache&&Ja(t,[at],i,!0),Ar(),s=E.element,f.isDehydrated)if(f={element:s,isDehydrated:!1,cache:E.cache},t.updateQueue.baseState=f,t.memoizedState=f,t.flags&256){t=lu(e,t,s,i);break e}else if(s!==a){a=Gt(Error(j(424)),t),yr(a),t=lu(e,t,s,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Ve=Qt(e.firstChild),gt=t,ze=!0,Bi=null,Vt=!0,i=ih(t,null,s,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(hs(),s===a){t=Si(e,t,i);break e}pt(e,t,s,i)}t=t.child}return t;case 26:return Hn(e,t),e===null?(i=Cd(t.type,null,t.pendingProps,null))?t.memoizedState=i:ze||(i=t.type,e=t.pendingProps,s=ea(ue.current).createElement(i),s[vt]=t,s[Et]=e,St(s,i,e),ft(s),t.stateNode=s):t.memoizedState=Cd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return re(t),e===null&&ze&&(s=t.stateNode=Sd(t.type,t.pendingProps,ue.current),gt=t,Vt=!0,a=Ve,Yi(t.type)?(So=a,Ve=Qt(s.firstChild)):Ve=a),pt(e,t,t.pendingProps.children,i),Hn(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ze&&((a=s=Ve)&&(s=nv(s,t.type,t.pendingProps,Vt),s!==null?(t.stateNode=s,gt=t,Ve=Qt(s.firstChild),Vt=!1,a=!0):a=!1),a||Oi(t)),re(t),a=t.type,f=t.pendingProps,E=e!==null?e.memoizedProps:null,s=f.children,_o(a,f)?s=null:E!==null&&_o(a,E)&&(t.flags|=32),t.memoizedState!==null&&(a=dl(e,t,b_,null,null,i),Xr._currentValue=a),Hn(e,t),pt(e,t,s,i),t.child;case 6:return e===null&&ze&&((e=i=Ve)&&(i=av(i,t.pendingProps,Vt),i!==null?(t.stateNode=i,gt=t,Ve=null,e=!0):e=!1),e||Oi(t)),null;case 13:return ou(e,t,i);case 4:return N(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=gs(t,null,s,i):pt(e,t,s,i),t.child;case 11:return Jh(e,t,t.type,t.pendingProps,i);case 7:return pt(e,t,t.pendingProps,i),t.child;case 8:return pt(e,t,t.pendingProps.children,i),t.child;case 12:return pt(e,t,t.pendingProps.children,i),t.child;case 10:return s=t.pendingProps,ki(t,t.type,s.value),pt(e,t,s.children,i),t.child;case 9:return a=t.type._context,s=t.pendingProps.children,ds(t),a=mt(a),s=s(a),t.flags|=1,pt(e,t,s,i),t.child;case 14:return eu(e,t,t.type,t.pendingProps,i);case 15:return tu(e,t,t.type,t.pendingProps,i);case 19:return hu(e,t,i);case 31:return R_(e,t,i);case 22:return iu(e,t,i,t.pendingProps);case 24:return ds(t),s=mt(at),e===null?(a=il(),a===null&&(a=Ye,f=el(),a.pooledCache=f,f.refCount++,f!==null&&(a.pooledCacheLanes|=i),a=f),t.memoizedState={parent:s,cache:a},rl(t),ki(t,at,a)):((e.lanes&i)!==0&&(nl(e,t),Rr(t,null,null,i),Ar()),a=e.memoizedState,f=t.memoizedState,a.parent!==s?(a={parent:s,cache:s},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ki(t,at,s)):(s=f.cache,ki(t,at,s),s!==a.cache&&Ja(t,[at],i,!0))),pt(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(j(156,t.tag))}function bi(e){e.flags|=4}function Il(e,t,i,s,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(ju())e.flags|=8192;else throw vs=Cn,sl}else e.flags&=-16777217}function du(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ad(t))if(ju())e.flags|=8192;else throw vs=Cn,sl}function Un(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wo():536870912,e.lanes|=t,Qs|=t)}function kr(e,t){if(!ze)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 Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,s=0;if(t)for(var a=e.child;a!==null;)i|=a.lanes|a.childLanes,s|=a.subtreeFlags&65011712,s|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)i|=a.lanes|a.childLanes,s|=a.subtreeFlags,s|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=s,e.childLanes=i,t}function T_(e,t,i){var s=t.pendingProps;switch(Xa(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return i=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),gi(at),ne(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(js(t)?bi(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ka())),Ke(t),null;case 26:var a=t.type,f=t.memoizedState;return e===null?(bi(t),f!==null?(Ke(t),du(t,f)):(Ke(t),Il(t,a,null,s,i))):f?f!==e.memoizedState?(bi(t),Ke(t),du(t,f)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&bi(t),Ke(t),Il(t,a,e,s,i)),null;case 27:if(_e(t),i=ue.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Ke(t),null}e=J.current,js(t)?Wc(t):(e=Sd(a,s,i),t.stateNode=e,bi(t))}return Ke(t),null;case 5:if(_e(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(!s){if(t.stateNode===null)throw Error(j(166));return Ke(t),null}if(f=J.current,js(t))Wc(t);else{var E=ea(ue.current);switch(f){case 1:f=E.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:f=E.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":f=E.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":f=E.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":f=E.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof s.is=="string"?E.createElement("select",{is:s.is}):E.createElement("select"),s.multiple?f.multiple=!0:s.size&&(f.size=s.size);break;default:f=typeof s.is=="string"?E.createElement(a,{is:s.is}):E.createElement(a)}}f[vt]=t,f[Et]=s;e:for(E=t.child;E!==null;){if(E.tag===5||E.tag===6)f.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&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}t.stateNode=f;e:switch(St(f,a,s),a){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&bi(t)}}return Ke(t),Il(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&bi(t);else{if(typeof s!="string"&&t.stateNode===null)throw Error(j(166));if(e=ue.current,js(t)){if(e=t.stateNode,i=t.memoizedProps,s=null,a=gt,a!==null)switch(a.tag){case 27:case 5:s=a.memoizedProps}e[vt]=t,e=!!(e.nodeValue===i||s!==null&&s.suppressHydrationWarning===!0||od(e.nodeValue,i)),e||Oi(t,!0)}else e=ea(e).createTextNode(s),e[vt]=t,t.stateNode=e}return Ke(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(s=js(t),i!==null){if(e===null){if(!s)throw Error(j(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(557));e[vt]=t}else hs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else i=Ka(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Ht(t),t):(Ht(t),null);if((t.flags&128)!==0)throw Error(j(558))}return Ke(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=js(t),s!==null&&s.dehydrated!==null){if(e===null){if(!a)throw Error(j(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(j(317));a[vt]=t}else hs(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),a=!1}else a=Ka(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Ht(t),t):(Ht(t),null)}return Ht(t),(t.flags&128)!==0?(t.lanes=i,t):(i=s!==null,e=e!==null&&e.memoizedState!==null,i&&(s=t.child,a=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(a=s.alternate.memoizedState.cachePool.pool),f=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(f=s.memoizedState.cachePool.pool),f!==a&&(s.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Un(t,t.updateQueue),Ke(t),null);case 4:return ne(),e===null&&oo(t.stateNode.containerInfo),Ke(t),null;case 10:return gi(t.type),Ke(t),null;case 19:if(z(rt),s=t.memoizedState,s===null)return Ke(t),null;if(a=(t.flags&128)!==0,f=s.rendering,f===null)if(a)kr(s,!1);else{if(st!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(f=Ln(e),f!==null){for(t.flags|=128,kr(s,!1),e=f.updateQueue,t.updateQueue=e,Un(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)Ic(i,e),i=i.sibling;return V(rt,rt.current&1|2),ze&&_i(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ce()>$n&&(t.flags|=128,a=!0,kr(s,!1),t.lanes=4194304)}else{if(!a)if(e=Ln(f),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Un(t,e),kr(s,!0),s.tail===null&&s.tailMode==="hidden"&&!f.alternate&&!ze)return Ke(t),null}else 2*Ce()-s.renderingStartTime>$n&&i!==536870912&&(t.flags|=128,a=!0,kr(s,!1),t.lanes=4194304);s.isBackwards?(f.sibling=t.child,t.child=f):(e=s.last,e!==null?e.sibling=f:t.child=f,s.last=f)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ce(),e.sibling=null,i=rt.current,V(rt,a?i&1|2:i&1),ze&&_i(t,s.treeForkCount),e):(Ke(t),null);case 22:case 23:return Ht(t),cl(),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&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),i=t.updateQueue,i!==null&&Un(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&&z(fs),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),gi(at),Ke(t),null;case 25:return null;case 30:return null}throw Error(j(156,t.tag))}function M_(e,t){switch(Xa(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return gi(at),ne(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(Ht(t),t.alternate===null)throw Error(j(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));hs()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return z(rt),null;case 4:return ne(),null;case 10:return gi(t.type),null;case 22:case 23:return Ht(t),cl(),e!==null&&z(fs),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return gi(at),null;case 25:return null;default:return null}}function fu(e,t){switch(Xa(t),t.tag){case 3:gi(at),ne();break;case 26:case 27:case 5:_e(t);break;case 4:ne();break;case 31:t.memoizedState!==null&&Ht(t);break;case 13:Ht(t);break;case 19:z(rt);break;case 10:gi(t.type);break;case 22:case 23:Ht(t),cl(),e!==null&&z(fs);break;case 24:gi(at)}}function zr(e,t){try{var i=t.updateQueue,s=i!==null?i.lastEffect:null;if(s!==null){var a=s.next;i=a;do{if((i.tag&e)===e){s=void 0;var f=i.create,E=i.inst;s=f(),E.destroy=s}i=i.next}while(i!==a)}}catch(k){Pe(t,t.return,k)}}function Ii(e,t,i){try{var s=t.updateQueue,a=s!==null?s.lastEffect:null;if(a!==null){var f=a.next;s=f;do{if((s.tag&e)===e){var E=s.inst,k=E.destroy;if(k!==void 0){E.destroy=void 0,a=t;var G=i,te=k;try{te()}catch(le){Pe(a,G,le)}}}s=s.next}while(s!==f)}}catch(le){Pe(t,t.return,le)}}function _u(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{rh(t,i)}catch(s){Pe(e,e.return,s)}}}function vu(e,t,i){i.props=ps(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(s){Pe(e,t,s)}}function Nr(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(a){Pe(e,t,a)}}function ai(e,t){var i=e.ref,s=e.refCleanup;if(i!==null)if(typeof s=="function")try{s()}catch(a){Pe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(a){Pe(e,t,a)}else i.current=null}function gu(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(a){Pe(e,e.return,a)}}function Pl(e,t,i){try{var s=e.stateNode;J_(s,e.type,i,t),s[Et]=t}catch(a){Pe(e,e.return,a)}}function mu(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Yi(e.type)||e.tag===4}function Fl(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||mu(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&&Yi(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 ql(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=ui));else if(s!==4&&(s===27&&Yi(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(ql(e,t,i),e=e.sibling;e!==null;)ql(e,t,i),e=e.sibling}function In(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&&Yi(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(In(e,t,i),e=e.sibling;e!==null;)In(e,t,i),e=e.sibling}function pu(e){var t=e.stateNode,i=e.memoizedProps;try{for(var s=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);St(t,s,i),t[vt]=e,t[Et]=i}catch(f){Pe(e,e.return,f)}}var yi=!1,ct=!1,$l=!1,Su=typeof WeakSet=="function"?WeakSet:Set,_t=null;function B_(e,t){if(e=e.containerInfo,uo=la,e=Mc(e),Ha(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 a=s.anchorOffset,f=s.focusNode;s=s.focusOffset;try{i.nodeType,f.nodeType}catch{i=null;break e}var E=0,k=-1,G=-1,te=0,le=0,ce=e,se=null;t:for(;;){for(var ae;ce!==i||a!==0&&ce.nodeType!==3||(k=E+a),ce!==f||s!==0&&ce.nodeType!==3||(G=E+s),ce.nodeType===3&&(E+=ce.nodeValue.length),(ae=ce.firstChild)!==null;)se=ce,ce=ae;for(;;){if(ce===e)break t;if(se===i&&++te===a&&(k=E),se===f&&++le===s&&(G=E),(ae=ce.nextSibling)!==null)break;ce=se,se=ce.parentNode}ce=ae}i=k===-1||G===-1?null:{start:k,end:G}}else i=null}i=i||{start:0,end:0}}else i=null;for(fo={focusedElem:e,selectionRange:i},la=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,f=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++)a=e[i],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&f!==null){e=void 0,i=t,a=f.memoizedProps,f=f.memoizedState,s=i.stateNode;try{var ge=ps(i.type,a);e=s.getSnapshotBeforeUpdate(ge,f),s.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Pe(i,i.return,ye)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)go(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":go(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(j(163))}if(e=t.sibling,e!==null){e.return=t.return,_t=e;break}_t=t.return}}function bu(e,t,i){var s=i.flags;switch(i.tag){case 0:case 11:case 15:xi(e,i),s&4&&zr(5,i);break;case 1:if(xi(e,i),s&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(E){Pe(i,i.return,E)}else{var a=ps(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(E){Pe(i,i.return,E)}}s&64&&_u(i),s&512&&Nr(i,i.return);break;case 3:if(xi(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{rh(e,t)}catch(E){Pe(i,i.return,E)}}break;case 27:t===null&&s&4&&pu(i);case 26:case 5:xi(e,i),t===null&&s&4&&gu(i),s&512&&Nr(i,i.return);break;case 12:xi(e,i);break;case 31:xi(e,i),s&4&&xu(e,i);break;case 13:xi(e,i),s&4&&wu(e,i),s&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=P_.bind(null,i),lv(e,i))));break;case 22:if(s=i.memoizedState!==null||yi,!s){t=t!==null&&t.memoizedState!==null||ct,a=yi;var f=ct;yi=s,(ct=t)&&!f?wi(e,i,(i.subtreeFlags&8772)!==0):xi(e,i),yi=a,ct=f}break;case 30:break;default:xi(e,i)}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ba(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,At=!1;function Ci(e,t,i){for(i=i.child;i!==null;)Cu(e,t,i),i=i.sibling}function Cu(e,t,i){if(dt&&typeof dt.onCommitFiberUnmount=="function")try{dt.onCommitFiberUnmount(Jt,i)}catch{}switch(i.tag){case 26:ct||ai(i,t),Ci(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:ct||ai(i,t);var s=Je,a=At;Yi(i.type)&&(Je=i.stateNode,At=!1),Ci(e,t,i),Wr(i.stateNode),Je=s,At=a;break;case 5:ct||ai(i,t);case 6:if(s=Je,a=At,Je=null,Ci(e,t,i),Je=s,At=a,Je!==null)if(At)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(i.stateNode)}catch(f){Pe(i,t,f)}else try{Je.removeChild(i.stateNode)}catch(f){Pe(i,t,f)}break;case 18:Je!==null&&(At?(e=Je,_d(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),nr(e)):_d(Je,i.stateNode));break;case 4:s=Je,a=At,Je=i.stateNode.containerInfo,At=!0,Ci(e,t,i),Je=s,At=a;break;case 0:case 11:case 14:case 15:Ii(2,i,t),ct||Ii(4,i,t),Ci(e,t,i);break;case 1:ct||(ai(i,t),s=i.stateNode,typeof s.componentWillUnmount=="function"&&vu(i,t,s)),Ci(e,t,i);break;case 21:Ci(e,t,i);break;case 22:ct=(s=ct)||i.memoizedState!==null,Ci(e,t,i),ct=s;break;default:Ci(e,t,i)}}function xu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{nr(e)}catch(i){Pe(t,t.return,i)}}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{nr(e)}catch(i){Pe(t,t.return,i)}}function O_(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Su),t;default:throw Error(j(435,e.tag))}}function Pn(e,t){var i=O_(e);t.forEach(function(s){if(!i.has(s)){i.add(s);var a=F_.bind(null,e,s);s.then(a,a)}})}function Rt(e,t){var i=t.deletions;if(i!==null)for(var s=0;s<i.length;s++){var a=i[s],f=e,E=t,k=E;e:for(;k!==null;){switch(k.tag){case 27:if(Yi(k.type)){Je=k.stateNode,At=!1;break e}break;case 5:Je=k.stateNode,At=!1;break e;case 3:case 4:Je=k.stateNode.containerInfo,At=!0;break e}k=k.return}if(Je===null)throw Error(j(160));Cu(f,E,a),Je=null,At=!1,f=a.alternate,f!==null&&(f.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Eu(t,e),t=t.sibling}var ti=null;function Eu(e,t){var i=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Rt(t,e),Dt(e),s&4&&(Ii(3,e,e.return),zr(3,e),Ii(5,e,e.return));break;case 1:Rt(t,e),Dt(e),s&512&&(ct||i===null||ai(i,i.return)),s&64&&yi&&(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 a=ti;if(Rt(t,e),Dt(e),s&512&&(ct||i===null||ai(i,i.return)),s&4){var f=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,a=a.ownerDocument||a;t:switch(s){case"title":f=a.getElementsByTagName("title")[0],(!f||f[cr]||f[vt]||f.namespaceURI==="http://www.w3.org/2000/svg"||f.hasAttribute("itemprop"))&&(f=a.createElement(s),a.head.insertBefore(f,a.querySelector("head > title"))),St(f,s,i),f[vt]=e,ft(f),s=f;break e;case"link":var E=Ed("link","href",a).get(s+(i.href||""));if(E){for(var k=0;k<E.length;k++)if(f=E[k],f.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&f.getAttribute("rel")===(i.rel==null?null:i.rel)&&f.getAttribute("title")===(i.title==null?null:i.title)&&f.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){E.splice(k,1);break t}}f=a.createElement(s),St(f,s,i),a.head.appendChild(f);break;case"meta":if(E=Ed("meta","content",a).get(s+(i.content||""))){for(k=0;k<E.length;k++)if(f=E[k],f.getAttribute("content")===(i.content==null?null:""+i.content)&&f.getAttribute("name")===(i.name==null?null:i.name)&&f.getAttribute("property")===(i.property==null?null:i.property)&&f.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&f.getAttribute("charset")===(i.charSet==null?null:i.charSet)){E.splice(k,1);break t}}f=a.createElement(s),St(f,s,i),a.head.appendChild(f);break;default:throw Error(j(468,s))}f[vt]=e,ft(f),s=f}e.stateNode=s}else Ld(a,e.type,e.stateNode);else e.stateNode=wd(a,s,e.memoizedProps);else f!==s?(f===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):f.count--,s===null?Ld(a,e.type,e.stateNode):wd(a,s,e.memoizedProps)):s===null&&e.stateNode!==null&&Pl(e,e.memoizedProps,i.memoizedProps)}break;case 27:Rt(t,e),Dt(e),s&512&&(ct||i===null||ai(i,i.return)),i!==null&&s&4&&Pl(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Rt(t,e),Dt(e),s&512&&(ct||i===null||ai(i,i.return)),e.flags&32){a=e.stateNode;try{Rs(a,"")}catch(ge){Pe(e,e.return,ge)}}s&4&&e.stateNode!=null&&(a=e.memoizedProps,Pl(e,a,i!==null?i.memoizedProps:a)),s&1024&&($l=!0);break;case 6:if(Rt(t,e),Dt(e),s&4){if(e.stateNode===null)throw Error(j(162));s=e.memoizedProps,i=e.stateNode;try{i.nodeValue=s}catch(ge){Pe(e,e.return,ge)}}break;case 3:if(sa=null,a=ti,ti=ta(t.containerInfo),Rt(t,e),ti=a,Dt(e),s&4&&i!==null&&i.memoizedState.isDehydrated)try{nr(t.containerInfo)}catch(ge){Pe(e,e.return,ge)}$l&&($l=!1,Lu(e));break;case 4:s=ti,ti=ta(e.stateNode.containerInfo),Rt(t,e),Dt(e),ti=s;break;case 12:Rt(t,e),Dt(e);break;case 31:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pn(e,s)));break;case 13:Rt(t,e),Dt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(qn=Ce()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pn(e,s)));break;case 22:a=e.memoizedState!==null;var G=i!==null&&i.memoizedState!==null,te=yi,le=ct;if(yi=te||a,ct=le||G,Rt(t,e),ct=le,yi=te,Dt(e),s&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(i===null||G||yi||ct||Ss(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){G=i=t;try{if(f=G.stateNode,a)E=f.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{k=G.stateNode;var ce=G.memoizedProps.style,se=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;k.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(ge){Pe(G,G.return,ge)}}}else if(t.tag===6){if(i===null){G=t;try{G.stateNode.nodeValue=a?"":G.memoizedProps}catch(ge){Pe(G,G.return,ge)}}}else if(t.tag===18){if(i===null){G=t;try{var ae=G.stateNode;a?vd(ae,!0):vd(G.stateNode,!1)}catch(ge){Pe(G,G.return,ge)}}}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,Pn(e,i))));break;case 19:Rt(t,e),Dt(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Pn(e,s)));break;case 30:break;case 21:break;default:Rt(t,e),Dt(e)}}function Dt(e){var t=e.flags;if(t&2){try{for(var i,s=e.return;s!==null;){if(mu(s)){i=s;break}s=s.return}if(i==null)throw Error(j(160));switch(i.tag){case 27:var a=i.stateNode,f=Fl(e);In(e,f,a);break;case 5:var E=i.stateNode;i.flags&32&&(Rs(E,""),i.flags&=-33);var k=Fl(e);In(e,k,E);break;case 3:case 4:var G=i.stateNode.containerInfo,te=Fl(e);ql(e,te,G);break;default:throw Error(j(161))}}catch(le){Pe(e,e.return,le)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Lu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Lu(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bu(e,t.alternate,t),t=t.sibling}function Ss(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ii(4,t,t.return),Ss(t);break;case 1:ai(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&vu(t,t.return,i),Ss(t);break;case 27:Wr(t.stateNode);case 26:case 5:ai(t,t.return),Ss(t);break;case 22:t.memoizedState===null&&Ss(t);break;case 30:Ss(t);break;default:Ss(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,a=e,f=t,E=f.flags;switch(f.tag){case 0:case 11:case 15:wi(a,f,i),zr(4,f);break;case 1:if(wi(a,f,i),s=f,a=s.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(te){Pe(s,s.return,te)}if(s=f,a=s.updateQueue,a!==null){var k=s.stateNode;try{var G=a.shared.hiddenCallbacks;if(G!==null)for(a.shared.hiddenCallbacks=null,a=0;a<G.length;a++)sh(G[a],k)}catch(te){Pe(s,s.return,te)}}i&&E&64&&_u(f),Nr(f,f.return);break;case 27:pu(f);case 26:case 5:wi(a,f,i),i&&s===null&&E&4&&gu(f),Nr(f,f.return);break;case 12:wi(a,f,i);break;case 31:wi(a,f,i),i&&E&4&&xu(a,f);break;case 13:wi(a,f,i),i&&E&4&&wu(a,f);break;case 22:f.memoizedState===null&&wi(a,f,i),Nr(f,f.return);break;case 30:break;default:wi(a,f,i)}t=t.sibling}}function Wl(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&&Cr(i))}function Gl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e))}function ii(e,t,i,s){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Au(e,t,i,s),t=t.sibling}function Au(e,t,i,s){var a=t.flags;switch(t.tag){case 0:case 11:case 15:ii(e,t,i,s),a&2048&&zr(9,t);break;case 1:ii(e,t,i,s);break;case 3:ii(e,t,i,s),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Cr(e)));break;case 12:if(a&2048){ii(e,t,i,s),e=t.stateNode;try{var f=t.memoizedProps,E=f.id,k=f.onPostCommit;typeof k=="function"&&k(E,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(G){Pe(t,t.return,G)}}else ii(e,t,i,s);break;case 31:ii(e,t,i,s);break;case 13:ii(e,t,i,s);break;case 23:break;case 22:f=t.stateNode,E=t.alternate,t.memoizedState!==null?f._visibility&2?ii(e,t,i,s):Hr(e,t):f._visibility&2?ii(e,t,i,s):(f._visibility|=2,Xs(e,t,i,s,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Wl(E,t);break;case 24:ii(e,t,i,s),a&2048&&Gl(t.alternate,t);break;default:ii(e,t,i,s)}}function Xs(e,t,i,s,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var f=e,E=t,k=i,G=s,te=E.flags;switch(E.tag){case 0:case 11:case 15:Xs(f,E,k,G,a),zr(8,E);break;case 23:break;case 22:var le=E.stateNode;E.memoizedState!==null?le._visibility&2?Xs(f,E,k,G,a):Hr(f,E):(le._visibility|=2,Xs(f,E,k,G,a)),a&&te&2048&&Wl(E.alternate,E);break;case 24:Xs(f,E,k,G,a),a&&te&2048&&Gl(E.alternate,E);break;default:Xs(f,E,k,G,a)}t=t.sibling}}function Hr(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,s=t,a=s.flags;switch(s.tag){case 22:Hr(i,s),a&2048&&Wl(s.alternate,s);break;case 24:Hr(i,s),a&2048&&Gl(s.alternate,s);break;default:Hr(i,s)}t=t.sibling}}var jr=8192;function Vs(e,t,i){if(e.subtreeFlags&jr)for(e=e.child;e!==null;)Ru(e,t,i),e=e.sibling}function Ru(e,t,i){switch(e.tag){case 26:Vs(e,t,i),e.flags&jr&&e.memoizedState!==null&&Sv(i,ti,e.memoizedState,e.memoizedProps);break;case 5:Vs(e,t,i);break;case 3:case 4:var s=ti;ti=ta(e.stateNode.containerInfo),Vs(e,t,i),ti=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=jr,jr=16777216,Vs(e,t,i),jr=s):Vs(e,t,i));break;default:Vs(e,t,i)}}function Du(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 Ur(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];_t=s,Mu(s,e)}Du(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Tu(e),e=e.sibling}function Tu(e){switch(e.tag){case 0:case 11:case 15:Ur(e),e.flags&2048&&Ii(9,e,e.return);break;case 3:Ur(e);break;case 12:Ur(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Fn(e)):Ur(e);break;default:Ur(e)}}function Fn(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];_t=s,Mu(s,e)}Du(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ii(8,t,t.return),Fn(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,Fn(t));break;default:Fn(t)}e=e.sibling}}function Mu(e,t){for(;_t!==null;){var i=_t;switch(i.tag){case 0:case 11:case 15:Ii(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:Cr(i.memoizedState.cache)}if(s=i.child,s!==null)s.return=i,_t=s;else e:for(i=e;_t!==null;){s=_t;var a=s.sibling,f=s.return;if(yu(s),s===i){_t=null;break e}if(a!==null){a.return=f,_t=a;break e}_t=f}}}var k_={getCacheForType:function(e){var t=mt(at),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return mt(at).controller.signal}},z_=typeof WeakMap=="function"?WeakMap:Map,Ue=0,Ye=null,Te=null,Oe=0,Ie=0,jt=null,Pi=!1,Ks=!1,Yl=!1,Ei=0,st=0,Fi=0,bs=0,Xl=0,Ut=0,Qs=0,Ir=null,Tt=null,Vl=!1,qn=0,Bu=0,$n=1/0,Wn=null,qi=null,ut=0,$i=null,Zs=null,Li=0,Kl=0,Ql=null,Ou=null,Pr=0,Zl=null;function It(){return(Ue&2)!==0&&Oe!==0?Oe&-Oe:I.T!==null?ro():Vo()}function ku(){if(Ut===0)if((Oe&536870912)===0||ze){var e=is;is<<=1,(is&3932160)===0&&(is=262144),Ut=e}else Ut=536870912;return e=Nt.current,e!==null&&(e.flags|=32),Ut}function Mt(e,t,i){(e===Ye&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Js(e,0),Wi(e,Oe,Ut,!1)),or(e,i),((Ue&2)===0||e!==Ye)&&(e===Ye&&((Ue&2)===0&&(bs|=i),st===4&&Wi(e,Oe,Ut,!1)),li(e))}function zu(e,t,i){if((Ue&6)!==0)throw Error(j(327));var s=!i&&(t&127)===0&&(t&e.expiredLanes)===0||lr(e,t),a=s?j_(e,t):eo(e,t,!0),f=s;do{if(a===0){Ks&&!s&&Wi(e,t,0,!1);break}else{if(i=e.current.alternate,f&&!N_(i)){a=eo(e,t,!1),f=!1;continue}if(a===2){if(f=t,e.errorRecoveryDisabledLanes&f)var E=0;else E=e.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){t=E;e:{var k=e;a=Ir;var G=k.current.memoizedState.isDehydrated;if(G&&(Js(k,E).flags|=256),E=eo(k,E,!1),E!==2){if(Yl&&!G){k.errorRecoveryDisabledLanes|=f,bs|=f,a=4;break e}f=Tt,Tt=a,f!==null&&(Tt===null?Tt=f:Tt.push.apply(Tt,f))}a=E}if(f=!1,a!==2)continue}}if(a===1){Js(e,0),Wi(e,t,0,!0);break}e:{switch(s=e,f=a,f){case 0:case 1:throw Error(j(345));case 4:if((t&4194048)!==t)break;case 6:Wi(s,t,Ut,!Pi);break e;case 2:Tt=null;break;case 3:case 5:break;default:throw Error(j(329))}if((t&62914560)===t&&(a=qn+300-Ce(),10<a)){if(Wi(s,t,Ut,!Pi),en(s,0,!0)!==0)break e;Li=t,s.timeoutHandle=dd(Nu.bind(null,s,i,Tt,Wn,Vl,t,Ut,bs,Qs,Pi,f,"Throttled",-0,0),a);break e}Nu(s,i,Tt,Wn,Vl,t,Ut,bs,Qs,Pi,f,null,-0,0)}}break}while(!0);li(e)}function Nu(e,t,i,s,a,f,E,k,G,te,le,ce,se,ae){if(e.timeoutHandle=-1,ce=t.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ui},Ru(t,f,ce);var ge=(f&62914560)===f?qn-Ce():(f&4194048)===f?Bu-Ce():0;if(ge=bv(ce,ge),ge!==null){Li=f,e.cancelPendingCommit=ge($u.bind(null,e,t,f,i,s,a,E,k,G,le,ce,null,se,ae)),Wi(e,f,E,!te);return}}$u(e,t,f,i,s,a,E,k,G)}function N_(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 a=i[s],f=a.getSnapshot;a=a.value;try{if(!kt(f(),a))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Wi(e,t,i,s){t&=~Xl,t&=~bs,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var a=t;0<a;){var f=31-bt(a),E=1<<f;s[f]=-1,a&=~E}i!==0&&Go(e,i,t)}function Gn(){return(Ue&6)===0?(Fr(0),!1):!0}function Jl(){if(Te!==null){if(Ie===0)var e=Te.return;else e=Te,vi=us=null,vl(e),qs=null,wr=0,e=Te;for(;e!==null;)fu(e.alternate,e),e=e.return;Te=null}}function Js(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,iv(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Li=0,Jl(),Ye=e,Te=i=fi(e.current,null),Oe=t,Ie=0,jt=null,Pi=!1,Ks=lr(e,t),Yl=!1,Qs=Ut=Xl=bs=Fi=st=0,Tt=Ir=null,Vl=!1,(t&8)!==0&&(t|=t&32);var s=e.entangledLanes;if(s!==0)for(e=e.entanglements,s&=t;0<s;){var a=31-bt(s),f=1<<a;t|=e[a],s&=~f}return Ei=t,fn(),i}function Hu(e,t){Ee=null,I.H=Br,t===Fs||t===yn?(t=Jc(),Ie=3):t===sl?(t=Jc(),Ie=4):Ie=t===Ml?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,jt=t,Te===null&&(st=1,zn(e,Gt(t,e.current)))}function ju(){var e=Nt.current;return e===null?!0:(Oe&4194048)===Oe?Kt===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===Kt:!1}function Uu(){var e=I.H;return I.H=Br,e===null?Br:e}function Iu(){var e=I.A;return I.A=k_,e}function Yn(){st=4,Pi||(Oe&4194048)!==Oe&&Nt.current!==null||(Ks=!0),(Fi&134217727)===0&&(bs&134217727)===0||Ye===null||Wi(Ye,Oe,Ut,!1)}function eo(e,t,i){var s=Ue;Ue|=2;var a=Uu(),f=Iu();(Ye!==e||Oe!==t)&&(Wn=null,Js(e,t)),t=!1;var E=st;e:do try{if(Ie!==0&&Te!==null){var k=Te,G=jt;switch(Ie){case 8:Jl(),E=6;break e;case 3:case 2:case 9:case 6:Nt.current===null&&(t=!0);var te=Ie;if(Ie=0,jt=null,er(e,k,G,te),i&&Ks){E=0;break e}break;default:te=Ie,Ie=0,jt=null,er(e,k,G,te)}}H_(),E=st;break}catch(le){Hu(e,le)}while(!0);return t&&e.shellSuspendCounter++,vi=us=null,Ue=s,I.H=a,I.A=f,Te===null&&(Ye=null,Oe=0,fn()),E}function H_(){for(;Te!==null;)Pu(Te)}function j_(e,t){var i=Ue;Ue|=2;var s=Uu(),a=Iu();Ye!==e||Oe!==t?(Wn=null,$n=Ce()+500,Js(e,t)):Ks=lr(e,t);e:do try{if(Ie!==0&&Te!==null){t=Te;var f=jt;t:switch(Ie){case 1:Ie=0,jt=null,er(e,t,f,1);break;case 2:case 9:if(Qc(f)){Ie=0,jt=null,Fu(t);break}t=function(){Ie!==2&&Ie!==9||Ye!==e||(Ie=7),li(e)},f.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Qc(f)?(Ie=0,jt=null,Fu(t)):(Ie=0,jt=null,er(e,t,f,7));break;case 5:var E=null;switch(Te.tag){case 26:E=Te.memoizedState;case 5:case 27:var k=Te;if(E?Ad(E):k.stateNode.complete){Ie=0,jt=null;var G=k.sibling;if(G!==null)Te=G;else{var te=k.return;te!==null?(Te=te,Xn(te)):Te=null}break t}}Ie=0,jt=null,er(e,t,f,5);break;case 6:Ie=0,jt=null,er(e,t,f,6);break;case 8:Jl(),st=6;break e;default:throw Error(j(462))}}U_();break}catch(le){Hu(e,le)}while(!0);return vi=us=null,I.H=s,I.A=a,Ue=i,Te!==null?0:(Ye=null,Oe=0,fn(),st)}function U_(){for(;Te!==null&&!De();)Pu(Te)}function Pu(e){var t=uu(e.alternate,e,Ei);e.memoizedProps=e.pendingProps,t===null?Xn(e):Te=t}function Fu(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=nu(i,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=nu(i,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:vl(t);default:fu(i,t),t=Te=Ic(t,Ei),t=uu(i,t,Ei)}e.memoizedProps=e.pendingProps,t===null?Xn(e):Te=t}function er(e,t,i,s){vi=us=null,vl(t),qs=null,wr=0;var a=t.return;try{if(A_(e,a,t,i,Oe)){st=1,zn(e,Gt(i,e.current)),Te=null;return}}catch(f){if(a!==null)throw Te=a,f;st=1,zn(e,Gt(i,e.current)),Te=null;return}t.flags&32768?(ze||s===1?e=!0:Ks||(Oe&536870912)!==0?e=!1:(Pi=e=!0,(s===2||s===9||s===3||s===6)&&(s=Nt.current,s!==null&&s.tag===13&&(s.flags|=16384))),qu(t,e)):Xn(t)}function Xn(e){var t=e;do{if((t.flags&32768)!==0){qu(t,Pi);return}e=t.return;var i=T_(t.alternate,t,Ei);if(i!==null){Te=i;return}if(t=t.sibling,t!==null){Te=t;return}Te=t=e}while(t!==null);st===0&&(st=5)}function qu(e,t){do{var i=M_(e.alternate,e);if(i!==null){i.flags&=32767,Te=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){Te=e;return}Te=e=i}while(e!==null);st=6,Te=null}function $u(e,t,i,s,a,f,E,k,G){e.cancelPendingCommit=null;do Vn();while(ut!==0);if((Ue&6)!==0)throw Error(j(327));if(t!==null){if(t===e.current)throw Error(j(177));if(f=t.lanes|t.childLanes,f|=Fa,pf(e,i,f,E,k,G),e===Ye&&(Te=Ye=null,Oe=0),Zs=t,$i=e,Li=i,Kl=f,Ql=a,Ou=s,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,q_(ht,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=I.T,I.T=null,a=q.p,q.p=2,E=Ue,Ue|=4;try{B_(e,t,i)}finally{Ue=E,q.p=a,I.T=s}}ut=1,Wu(),Gu(),Yu()}}function Wu(){if(ut===1){ut=0;var e=$i,t=Zs,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=I.T,I.T=null;var s=q.p;q.p=2;var a=Ue;Ue|=4;try{Eu(t,e);var f=fo,E=Mc(e.containerInfo),k=f.focusedElem,G=f.selectionRange;if(E!==k&&k&&k.ownerDocument&&Tc(k.ownerDocument.documentElement,k)){if(G!==null&&Ha(k)){var te=G.start,le=G.end;if(le===void 0&&(le=te),"selectionStart"in k)k.selectionStart=te,k.selectionEnd=Math.min(le,k.value.length);else{var ce=k.ownerDocument||document,se=ce&&ce.defaultView||window;if(se.getSelection){var ae=se.getSelection(),ge=k.textContent.length,ye=Math.min(G.start,ge),Ge=G.end===void 0?ye:Math.min(G.end,ge);!ae.extend&&ye>Ge&&(E=Ge,Ge=ye,ye=E);var Q=Dc(k,ye),X=Dc(k,Ge);if(Q&&X&&(ae.rangeCount!==1||ae.anchorNode!==Q.node||ae.anchorOffset!==Q.offset||ae.focusNode!==X.node||ae.focusOffset!==X.offset)){var ee=ce.createRange();ee.setStart(Q.node,Q.offset),ae.removeAllRanges(),ye>Ge?(ae.addRange(ee),ae.extend(X.node,X.offset)):(ee.setEnd(X.node,X.offset),ae.addRange(ee))}}}}for(ce=[],ae=k;ae=ae.parentNode;)ae.nodeType===1&&ce.push({element:ae,left:ae.scrollLeft,top:ae.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<ce.length;k++){var oe=ce[k];oe.element.scrollLeft=oe.left,oe.element.scrollTop=oe.top}}la=!!uo,fo=uo=null}finally{Ue=a,q.p=s,I.T=i}}e.current=t,ut=2}}function Gu(){if(ut===2){ut=0;var e=$i,t=Zs,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=I.T,I.T=null;var s=q.p;q.p=2;var a=Ue;Ue|=4;try{bu(e,t.alternate,t)}finally{Ue=a,q.p=s,I.T=i}}ut=3}}function Yu(){if(ut===4||ut===3){ut=0,ve();var e=$i,t=Zs,i=Li,s=Ou;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ut=5:(ut=0,Zs=$i=null,Xu(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(qi=null),pa(i),t=t.stateNode,dt&&typeof dt.onCommitFiberRoot=="function")try{dt.onCommitFiberRoot(Jt,t,void 0,(t.current.flags&128)===128)}catch{}if(s!==null){t=I.T,a=q.p,q.p=2,I.T=null;try{for(var f=e.onRecoverableError,E=0;E<s.length;E++){var k=s[E];f(k.value,{componentStack:k.stack})}}finally{I.T=t,q.p=a}}(Li&3)!==0&&Vn(),li(e),a=e.pendingLanes,(i&261930)!==0&&(a&42)!==0?e===Zl?Pr++:(Pr=0,Zl=e):Pr=0,Fr(0)}}function Xu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Cr(t)))}function Vn(){return Wu(),Gu(),Yu(),Vu()}function Vu(){if(ut!==5)return!1;var e=$i,t=Kl;Kl=0;var i=pa(Li),s=I.T,a=q.p;try{q.p=32>i?32:i,I.T=null,i=Ql,Ql=null;var f=$i,E=Li;if(ut=0,Zs=$i=null,Li=0,(Ue&6)!==0)throw Error(j(331));var k=Ue;if(Ue|=4,Tu(f.current),Au(f,f.current,E,i),Ue=k,Fr(0,!1),dt&&typeof dt.onPostCommitFiberRoot=="function")try{dt.onPostCommitFiberRoot(Jt,f)}catch{}return!0}finally{q.p=a,I.T=s,Xu(e,t)}}function Ku(e,t,i){t=Gt(i,t),t=Tl(e.stateNode,t,2),e=Hi(e,t,2),e!==null&&(or(e,2),li(e))}function Pe(e,t,i){if(e.tag===3)Ku(e,e,i);else for(;t!==null;){if(t.tag===3){Ku(t,e,i);break}else if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(qi===null||!qi.has(s))){e=Gt(i,e),i=Qh(2),s=Hi(t,i,2),s!==null&&(Zh(i,s,t,e),or(s,2),li(s));break}}t=t.return}}function to(e,t,i){var s=e.pingCache;if(s===null){s=e.pingCache=new z_;var a=new Set;s.set(t,a)}else a=s.get(t),a===void 0&&(a=new Set,s.set(t,a));a.has(i)||(Yl=!0,a.add(i),e=I_.bind(null,e,t,i),t.then(e,e))}function I_(e,t,i){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ye===e&&(Oe&i)===i&&(st===4||st===3&&(Oe&62914560)===Oe&&300>Ce()-qn?(Ue&2)===0&&Js(e,0):Xl|=i,Qs===Oe&&(Qs=0)),li(e)}function Qu(e,t){t===0&&(t=Wo()),e=os(e,t),e!==null&&(or(e,t),li(e))}function P_(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),Qu(e,i)}function F_(e,t){var i=0;switch(e.tag){case 31:case 13:var s=e.stateNode,a=e.memoizedState;a!==null&&(i=a.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error(j(314))}s!==null&&s.delete(t),Qu(e,i)}function q_(e,t){return Be(e,t)}var Kn=null,tr=null,io=!1,Qn=!1,so=!1,Gi=0;function li(e){e!==tr&&e.next===null&&(tr===null?Kn=tr=e:tr=tr.next=e),Qn=!0,io||(io=!0,W_())}function Fr(e,t){if(!so&&Qn){so=!0;do for(var i=!1,s=Kn;s!==null;){if(e!==0){var a=s.pendingLanes;if(a===0)var f=0;else{var E=s.suspendedLanes,k=s.pingedLanes;f=(1<<31-bt(42|e)+1)-1,f&=a&~(E&~k),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(i=!0,td(s,f))}else f=Oe,f=en(s,s===Ye?f:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),(f&3)===0||lr(s,f)||(i=!0,td(s,f));s=s.next}while(i);so=!1}}function $_(){Zu()}function Zu(){Qn=io=!1;var e=0;Gi!==0&&tv()&&(e=Gi);for(var t=Ce(),i=null,s=Kn;s!==null;){var a=s.next,f=Ju(s,t);f===0?(s.next=null,i===null?Kn=a:i.next=a,a===null&&(tr=i)):(i=s,(e!==0||(f&3)!==0)&&(Qn=!0)),s=a}ut!==0&&ut!==5||Fr(e),Gi!==0&&(Gi=0)}function Ju(e,t){for(var i=e.suspendedLanes,s=e.pingedLanes,a=e.expirationTimes,f=e.pendingLanes&-62914561;0<f;){var E=31-bt(f),k=1<<E,G=a[E];G===-1?((k&i)===0||(k&s)!==0)&&(a[E]=mf(k,t)):G<=t&&(e.expiredLanes|=k),f&=~k}if(t=Ye,i=Oe,i=en(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s=e.callbackNode,i===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return s!==null&&s!==null&&Ae(s),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||lr(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(s!==null&&Ae(s),pa(i)){case 2:case 8:i=Ft;break;case 32:i=ht;break;case 268435456:i=et;break;default:i=ht}return s=ed.bind(null,e),i=Be(i,s),e.callbackPriority=t,e.callbackNode=i,t}return s!==null&&s!==null&&Ae(s),e.callbackPriority=2,e.callbackNode=null,2}function ed(e,t){if(ut!==0&&ut!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Vn()&&e.callbackNode!==i)return null;var s=Oe;return s=en(e,e===Ye?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),s===0?null:(zu(e,s,t),Ju(e,Ce()),e.callbackNode!=null&&e.callbackNode===i?ed.bind(null,e):null)}function td(e,t){if(Vn())return null;zu(e,t,!0)}function W_(){sv(function(){(Ue&6)!==0?Be(Fe,$_):Zu()})}function ro(){if(Gi===0){var e=Is;e===0&&(e=Ri,Ri<<=1,(Ri&261888)===0&&(Ri=256)),Gi=e}return Gi}function id(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:nn(""+e)}function sd(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 G_(e,t,i,s,a){if(t==="submit"&&i&&i.stateNode===a){var f=id((a[Et]||null).action),E=s.submitter;E&&(t=(t=E[Et]||null)?id(t.formAction):E.getAttribute("formAction"),t!==null&&(f=t,E=null));var k=new cn("action","action",null,s,a);e.push({event:k,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(Gi!==0){var G=E?sd(a,E):new FormData(a);wl(i,{pending:!0,data:G,method:a.method,action:f},null,G)}}else typeof f=="function"&&(k.preventDefault(),G=E?sd(a,E):new FormData(a),wl(i,{pending:!0,data:G,method:a.method,action:f},f,G))},currentTarget:a}]})}}for(var no=0;no<Pa.length;no++){var ao=Pa[no],Y_=ao.toLowerCase(),X_=ao[0].toUpperCase()+ao.slice(1);ei(Y_,"on"+X_)}ei(kc,"onAnimationEnd"),ei(zc,"onAnimationIteration"),ei(Nc,"onAnimationStart"),ei("dblclick","onDoubleClick"),ei("focusin","onFocus"),ei("focusout","onBlur"),ei(h_,"onTransitionRun"),ei(u_,"onTransitionStart"),ei(d_,"onTransitionCancel"),ei(Hc,"onTransitionEnd"),Ls("onMouseEnter",["mouseout","mouseover"]),Ls("onMouseLeave",["mouseout","mouseover"]),Ls("onPointerEnter",["pointerout","pointerover"]),Ls("onPointerLeave",["pointerout","pointerover"]),rs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),rs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),rs("onBeforeInput",["compositionend","keypress","textInput","paste"]),rs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),rs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),rs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),V_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qr));function rd(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var s=e[i],a=s.event;s=s.listeners;e:{var f=void 0;if(t)for(var E=s.length-1;0<=E;E--){var k=s[E],G=k.instance,te=k.currentTarget;if(k=k.listener,G!==f&&a.isPropagationStopped())break e;f=k,a.currentTarget=te;try{f(a)}catch(le){dn(le)}a.currentTarget=null,f=G}else for(E=0;E<s.length;E++){if(k=s[E],G=k.instance,te=k.currentTarget,k=k.listener,G!==f&&a.isPropagationStopped())break e;f=k,a.currentTarget=te;try{f(a)}catch(le){dn(le)}a.currentTarget=null,f=G}}}}function Me(e,t){var i=t[Sa];i===void 0&&(i=t[Sa]=new Set);var s=e+"__bubble";i.has(s)||(nd(t,e,2,!1),i.add(s))}function lo(e,t,i){var s=0;t&&(s|=4),nd(i,e,s,t)}var Zn="_reactListening"+Math.random().toString(36).slice(2);function oo(e){if(!e[Zn]){e[Zn]=!0,Zo.forEach(function(i){i!=="selectionchange"&&(V_.has(i)||lo(i,!1,e),lo(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zn]||(t[Zn]=!0,lo("selectionchange",!1,t))}}function nd(e,t,i,s){switch(kd(t)){case 2:var a=xv;break;case 8:a=wv;break;default:a=wo}i=a.bind(null,t,i,e),a=void 0,!Ra||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),s?a!==void 0?e.addEventListener(t,i,{capture:!0,passive:a}):e.addEventListener(t,i,!0):a!==void 0?e.addEventListener(t,i,{passive:a}):e.addEventListener(t,i,!1)}function co(e,t,i,s,a){var f=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var E=s.tag;if(E===3||E===4){var k=s.stateNode.containerInfo;if(k===a)break;if(E===4)for(E=s.return;E!==null;){var G=E.tag;if((G===3||G===4)&&E.stateNode.containerInfo===a)return;E=E.return}for(;k!==null;){if(E=xs(k),E===null)return;if(G=E.tag,G===5||G===6||G===26||G===27){s=f=E;continue e}k=k.parentNode}}s=s.return}hc(function(){var te=f,le=La(i),ce=[];e:{var se=jc.get(e);if(se!==void 0){var ae=cn,ge=e;switch(e){case"keypress":if(ln(i)===0)break e;case"keydown":case"keyup":ae=Ff;break;case"focusin":ge="focus",ae=Ba;break;case"focusout":ge="blur",ae=Ba;break;case"beforeblur":case"afterblur":ae=Ba;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":ae=fc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ae=Tf;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ae=Wf;break;case kc:case zc:case Nc:ae=Of;break;case Hc:ae=Yf;break;case"scroll":case"scrollend":ae=Rf;break;case"wheel":ae=Vf;break;case"copy":case"cut":case"paste":ae=zf;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ae=vc;break;case"toggle":case"beforetoggle":ae=Qf}var ye=(t&4)!==0,Ge=!ye&&(e==="scroll"||e==="scrollend"),Q=ye?se!==null?se+"Capture":null:se;ye=[];for(var X=te,ee;X!==null;){var oe=X;if(ee=oe.stateNode,oe=oe.tag,oe!==5&&oe!==26&&oe!==27||ee===null||Q===null||(oe=ur(X,Q),oe!=null&&ye.push($r(X,oe,ee))),Ge)break;X=X.return}0<ye.length&&(se=new ae(se,ge,null,i,le),ce.push({event:se,listeners:ye}))}}if((t&7)===0){e:{if(se=e==="mouseover"||e==="pointerover",ae=e==="mouseout"||e==="pointerout",se&&i!==Ea&&(ge=i.relatedTarget||i.fromElement)&&(xs(ge)||ge[Cs]))break e;if((ae||se)&&(se=le.window===le?le:(se=le.ownerDocument)?se.defaultView||se.parentWindow:window,ae?(ge=i.relatedTarget||i.toElement,ae=te,ge=ge?xs(ge):null,ge!==null&&(Ge=ie(ge),ye=ge.tag,ge!==Ge||ye!==5&&ye!==27&&ye!==6)&&(ge=null)):(ae=null,ge=te),ae!==ge)){if(ye=fc,oe="onMouseLeave",Q="onMouseEnter",X="mouse",(e==="pointerout"||e==="pointerover")&&(ye=vc,oe="onPointerLeave",Q="onPointerEnter",X="pointer"),Ge=ae==null?se:hr(ae),ee=ge==null?se:hr(ge),se=new ye(oe,X+"leave",ae,i,le),se.target=Ge,se.relatedTarget=ee,oe=null,xs(le)===te&&(ye=new ye(Q,X+"enter",ge,i,le),ye.target=ee,ye.relatedTarget=Ge,oe=ye),Ge=oe,ae&&ge)t:{for(ye=K_,Q=ae,X=ge,ee=0,oe=Q;oe;oe=ye(oe))ee++;oe=0;for(var Se=X;Se;Se=ye(Se))oe++;for(;0<ee-oe;)Q=ye(Q),ee--;for(;0<oe-ee;)X=ye(X),oe--;for(;ee--;){if(Q===X||X!==null&&Q===X.alternate){ye=Q;break t}Q=ye(Q),X=ye(X)}ye=null}else ye=null;ae!==null&&ad(ce,se,ae,ye,!1),ge!==null&&Ge!==null&&ad(ce,Ge,ge,ye,!0)}}e:{if(se=te?hr(te):window,ae=se.nodeName&&se.nodeName.toLowerCase(),ae==="select"||ae==="input"&&se.type==="file")var He=xc;else if(yc(se))if(wc)He=l_;else{He=n_;var me=r_}else ae=se.nodeName,!ae||ae.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?te&&wa(te.elementType)&&(He=xc):He=a_;if(He&&(He=He(e,te))){Cc(ce,He,i,le);break e}me&&me(e,se,te),e==="focusout"&&te&&se.type==="number"&&te.memoizedProps.value!=null&&xa(se,"number",se.value)}switch(me=te?hr(te):window,e){case"focusin":(yc(me)||me.contentEditable==="true")&&(Bs=me,ja=te,Sr=null);break;case"focusout":Sr=ja=Bs=null;break;case"mousedown":Ua=!0;break;case"contextmenu":case"mouseup":case"dragend":Ua=!1,Bc(ce,i,le);break;case"selectionchange":if(c_)break;case"keydown":case"keyup":Bc(ce,i,le)}var Le;if(ka)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 Ms?Sc(e,i)&&(ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(ke="onCompositionStart");ke&&(gc&&i.locale!=="ko"&&(Ms||ke!=="onCompositionStart"?ke==="onCompositionEnd"&&Ms&&(Le=uc()):(Ti=le,Da="value"in Ti?Ti.value:Ti.textContent,Ms=!0)),me=Jn(te,ke),0<me.length&&(ke=new _c(ke,e,null,i,le),ce.push({event:ke,listeners:me}),Le?ke.data=Le:(Le=bc(i),Le!==null&&(ke.data=Le)))),(Le=Jf?e_(e,i):t_(e,i))&&(ke=Jn(te,"onBeforeInput"),0<ke.length&&(me=new _c("onBeforeInput","beforeinput",null,i,le),ce.push({event:me,listeners:ke}),me.data=Le)),G_(ce,e,te,i,le)}rd(ce,t)})}function $r(e,t,i){return{instance:e,listener:t,currentTarget:i}}function Jn(e,t){for(var i=t+"Capture",s=[];e!==null;){var a=e,f=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||f===null||(a=ur(e,i),a!=null&&s.unshift($r(e,a,f)),a=ur(e,t),a!=null&&s.push($r(e,a,f))),e.tag===3)return s;e=e.return}return[]}function K_(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function ad(e,t,i,s,a){for(var f=t._reactName,E=[];i!==null&&i!==s;){var k=i,G=k.alternate,te=k.stateNode;if(k=k.tag,G!==null&&G===s)break;k!==5&&k!==26&&k!==27||te===null||(G=te,a?(te=ur(i,f),te!=null&&E.unshift($r(i,te,G))):a||(te=ur(i,f),te!=null&&E.push($r(i,te,G)))),i=i.return}E.length!==0&&e.push({event:t,listeners:E})}var Q_=/\r\n?/g,Z_=/\u0000|\uFFFD/g;function ld(e){return(typeof e=="string"?e:""+e).replace(Q_,`
|
|
49
|
+
`).replace(Z_,"")}function od(e,t){return t=ld(t),ld(e)===t}function We(e,t,i,s,a,f){switch(i){case"children":typeof s=="string"?t==="body"||t==="textarea"&&s===""||Rs(e,s):(typeof s=="number"||typeof s=="bigint")&&t!=="body"&&Rs(e,""+s);break;case"className":sn(e,"class",s);break;case"tabIndex":sn(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":sn(e,i,s);break;case"style":oc(e,s,f);break;case"data":if(t!=="object"){sn(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=nn(""+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 f=="function"&&(i==="formAction"?(t!=="input"&&We(e,t,"name",a.name,a,null),We(e,t,"formEncType",a.formEncType,a,null),We(e,t,"formMethod",a.formMethod,a,null),We(e,t,"formTarget",a.formTarget,a,null)):(We(e,t,"encType",a.encType,a,null),We(e,t,"method",a.method,a,null),We(e,t,"target",a.target,a,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(i);break}s=nn(""+s),e.setAttribute(i,s);break;case"onClick":s!=null&&(e.onclick=ui);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(a.children!=null)throw Error(j(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=nn(""+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":Me("beforetoggle",e),Me("toggle",e),tn(e,"popover",s);break;case"xlinkActuate":hi(e,"http://www.w3.org/1999/xlink","xlink:actuate",s);break;case"xlinkArcrole":hi(e,"http://www.w3.org/1999/xlink","xlink:arcrole",s);break;case"xlinkRole":hi(e,"http://www.w3.org/1999/xlink","xlink:role",s);break;case"xlinkShow":hi(e,"http://www.w3.org/1999/xlink","xlink:show",s);break;case"xlinkTitle":hi(e,"http://www.w3.org/1999/xlink","xlink:title",s);break;case"xlinkType":hi(e,"http://www.w3.org/1999/xlink","xlink:type",s);break;case"xmlBase":hi(e,"http://www.w3.org/XML/1998/namespace","xml:base",s);break;case"xmlLang":hi(e,"http://www.w3.org/XML/1998/namespace","xml:lang",s);break;case"xmlSpace":hi(e,"http://www.w3.org/XML/1998/namespace","xml:space",s);break;case"is":tn(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=Lf.get(i)||i,tn(e,i,s))}}function ho(e,t,i,s,a,f){switch(i){case"style":oc(e,s,f);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error(j(61));if(i=s.__html,i!=null){if(a.children!=null)throw Error(j(60));e.innerHTML=i}}break;case"children":typeof s=="string"?Rs(e,s):(typeof s=="number"||typeof s=="bigint")&&Rs(e,""+s);break;case"onScroll":s!=null&&Me("scroll",e);break;case"onScrollEnd":s!=null&&Me("scrollend",e);break;case"onClick":s!=null&&(e.onclick=ui);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Jo.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(a=i.endsWith("Capture"),t=i.slice(2,a?i.length-7:void 0),f=e[Et]||null,f=f!=null?f[i]:null,typeof f=="function"&&e.removeEventListener(t,f,a),typeof s=="function")){typeof f!="function"&&f!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,s,a);break e}i in e?e[i]=s:s===!0?e.setAttribute(i,""):tn(e,i,s)}}}function St(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var s=!1,a=!1,f;for(f in i)if(i.hasOwnProperty(f)){var E=i[f];if(E!=null)switch(f){case"src":s=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:We(e,t,f,E,i,null)}}a&&We(e,t,"srcSet",i.srcSet,i,null),s&&We(e,t,"src",i.src,i,null);return;case"input":Me("invalid",e);var k=f=E=a=null,G=null,te=null;for(s in i)if(i.hasOwnProperty(s)){var le=i[s];if(le!=null)switch(s){case"name":a=le;break;case"type":E=le;break;case"checked":G=le;break;case"defaultChecked":te=le;break;case"value":f=le;break;case"defaultValue":k=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(j(137,t));break;default:We(e,t,s,le,i,null)}}rc(e,f,k,G,te,E,a,!1);return;case"select":Me("invalid",e),s=E=f=null;for(a in i)if(i.hasOwnProperty(a)&&(k=i[a],k!=null))switch(a){case"value":f=k;break;case"defaultValue":E=k;break;case"multiple":s=k;default:We(e,t,a,k,i,null)}t=f,i=E,e.multiple=!!s,t!=null?As(e,!!s,t,!1):i!=null&&As(e,!!s,i,!0);return;case"textarea":Me("invalid",e),f=a=s=null;for(E in i)if(i.hasOwnProperty(E)&&(k=i[E],k!=null))switch(E){case"value":s=k;break;case"defaultValue":a=k;break;case"children":f=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(j(91));break;default:We(e,t,E,k,i,null)}ac(e,s,a,f);return;case"option":for(G in i)if(i.hasOwnProperty(G)&&(s=i[G],s!=null))switch(G){case"selected":e.selected=s&&typeof s!="function"&&typeof s!="symbol";break;default:We(e,t,G,s,i,null)}return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(s=0;s<qr.length;s++)Me(qr[s],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(te in i)if(i.hasOwnProperty(te)&&(s=i[te],s!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(j(137,t));default:We(e,t,te,s,i,null)}return;default:if(wa(t)){for(le in i)i.hasOwnProperty(le)&&(s=i[le],s!==void 0&&ho(e,t,le,s,i,void 0));return}}for(k in i)i.hasOwnProperty(k)&&(s=i[k],s!=null&&We(e,t,k,s,i,null))}function J_(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 a=null,f=null,E=null,k=null,G=null,te=null,le=null;for(ae in i){var ce=i[ae];if(i.hasOwnProperty(ae)&&ce!=null)switch(ae){case"checked":break;case"value":break;case"defaultValue":G=ce;default:s.hasOwnProperty(ae)||We(e,t,ae,null,s,ce)}}for(var se in s){var ae=s[se];if(ce=i[se],s.hasOwnProperty(se)&&(ae!=null||ce!=null))switch(se){case"type":f=ae;break;case"name":a=ae;break;case"checked":te=ae;break;case"defaultChecked":le=ae;break;case"value":E=ae;break;case"defaultValue":k=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(j(137,t));break;default:ae!==ce&&We(e,t,se,ae,s,ce)}}Ca(e,E,k,G,te,le,f,a);return;case"select":ae=E=k=se=null;for(f in i)if(G=i[f],i.hasOwnProperty(f)&&G!=null)switch(f){case"value":break;case"multiple":ae=G;default:s.hasOwnProperty(f)||We(e,t,f,null,s,G)}for(a in s)if(f=s[a],G=i[a],s.hasOwnProperty(a)&&(f!=null||G!=null))switch(a){case"value":se=f;break;case"defaultValue":k=f;break;case"multiple":E=f;default:f!==G&&We(e,t,a,f,s,G)}t=k,i=E,s=ae,se!=null?As(e,!!i,se,!1):!!s!=!!i&&(t!=null?As(e,!!i,t,!0):As(e,!!i,i?[]:"",!1));return;case"textarea":ae=se=null;for(k in i)if(a=i[k],i.hasOwnProperty(k)&&a!=null&&!s.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:We(e,t,k,null,s,a)}for(E in s)if(a=s[E],f=i[E],s.hasOwnProperty(E)&&(a!=null||f!=null))switch(E){case"value":se=a;break;case"defaultValue":ae=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(j(91));break;default:a!==f&&We(e,t,E,a,s,f)}nc(e,se,ae);return;case"option":for(var ge in i)if(se=i[ge],i.hasOwnProperty(ge)&&se!=null&&!s.hasOwnProperty(ge))switch(ge){case"selected":e.selected=!1;break;default:We(e,t,ge,null,s,se)}for(G in s)if(se=s[G],ae=i[G],s.hasOwnProperty(G)&&se!==ae&&(se!=null||ae!=null))switch(G){case"selected":e.selected=se&&typeof se!="function"&&typeof se!="symbol";break;default:We(e,t,G,se,s,ae)}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 ye in i)se=i[ye],i.hasOwnProperty(ye)&&se!=null&&!s.hasOwnProperty(ye)&&We(e,t,ye,null,s,se);for(te in s)if(se=s[te],ae=i[te],s.hasOwnProperty(te)&&se!==ae&&(se!=null||ae!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(j(137,t));break;default:We(e,t,te,se,s,ae)}return;default:if(wa(t)){for(var Ge in i)se=i[Ge],i.hasOwnProperty(Ge)&&se!==void 0&&!s.hasOwnProperty(Ge)&&ho(e,t,Ge,void 0,s,se);for(le in s)se=s[le],ae=i[le],!s.hasOwnProperty(le)||se===ae||se===void 0&&ae===void 0||ho(e,t,le,se,s,ae);return}}for(var Q in i)se=i[Q],i.hasOwnProperty(Q)&&se!=null&&!s.hasOwnProperty(Q)&&We(e,t,Q,null,s,se);for(ce in s)se=s[ce],ae=i[ce],!s.hasOwnProperty(ce)||se===ae||se==null&&ae==null||We(e,t,ce,se,s,ae)}function cd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ev(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),s=0;s<i.length;s++){var a=i[s],f=a.transferSize,E=a.initiatorType,k=a.duration;if(f&&k&&cd(E)){for(E=0,k=a.responseEnd,s+=1;s<i.length;s++){var G=i[s],te=G.startTime;if(te>k)break;var le=G.transferSize,ce=G.initiatorType;le&&cd(ce)&&(G=G.responseEnd,E+=le*(G<k?1:(k-te)/(G-te)))}if(--s,t+=8*(f+E)/(a.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 uo=null,fo=null;function ea(e){return e.nodeType===9?e:e.ownerDocument}function hd(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 ud(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 _o(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 vo=null;function tv(){var e=window.event;return e&&e.type==="popstate"?e===vo?!1:(vo=e,!0):(vo=null,!1)}var dd=typeof setTimeout=="function"?setTimeout:void 0,iv=typeof clearTimeout=="function"?clearTimeout:void 0,fd=typeof Promise=="function"?Promise:void 0,sv=typeof queueMicrotask=="function"?queueMicrotask:typeof fd<"u"?function(e){return fd.resolve(null).then(e).catch(rv)}:dd;function rv(e){setTimeout(function(){throw e})}function Yi(e){return e==="head"}function _d(e,t){var i=t,s=0;do{var a=i.nextSibling;if(e.removeChild(i),a&&a.nodeType===8)if(i=a.data,i==="/$"||i==="/&"){if(s===0){e.removeChild(a),nr(t);return}s--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")s++;else if(i==="html")Wr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Wr(i);for(var f=i.firstChild;f;){var E=f.nextSibling,k=f.nodeName;f[cr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&f.rel.toLowerCase()==="stylesheet"||i.removeChild(f),f=E}}else i==="body"&&Wr(e.ownerDocument.body);i=a}while(i);nr(t)}function vd(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 go(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":go(i),ba(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function nv(e,t,i,s){for(;e.nodeType===1;){var a=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[cr])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(f=e.getAttribute("rel"),f==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(f!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(f=e.getAttribute("src"),(f!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&f&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var f=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===f)return e}else return e;if(e=Qt(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=Qt(e.nextSibling),e===null))return null;return e}function gd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qt(e.nextSibling),e===null))return null;return e}function mo(e){return e.data==="$?"||e.data==="$~"}function po(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function lv(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var s=function(){t(),i.removeEventListener("DOMContentLoaded",s)};i.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function Qt(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var So=null;function md(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Qt(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function pd(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 Sd(e,t,i){switch(t=ea(i),e){case"html":if(e=t.documentElement,!e)throw Error(j(452));return e;case"head":if(e=t.head,!e)throw Error(j(453));return e;case"body":if(e=t.body,!e)throw Error(j(454));return e;default:throw Error(j(451))}}function Wr(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ba(e)}var Zt=new Map,bd=new Set;function ta(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ai=q.d;q.d={f:ov,r:cv,D:hv,C:uv,L:dv,m:fv,X:vv,S:_v,M:gv};function ov(){var e=Ai.f(),t=Gn();return e||t}function cv(e){var t=ws(e);t!==null&&t.tag===5&&t.type==="form"?Hh(t):Ai.r(e)}var ir=typeof document>"u"?null:document;function yd(e,t,i){var s=ir;if(s&&typeof t=="string"&&t){var a=$t(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof i=="string"&&(a+='[crossorigin="'+i+'"]'),bd.has(a)||(bd.add(a),e={rel:e,crossOrigin:i,href:t},s.querySelector(a)===null&&(t=s.createElement("link"),St(t,"link",e),ft(t),s.head.appendChild(t)))}}function hv(e){Ai.D(e),yd("dns-prefetch",e,null)}function uv(e,t){Ai.C(e,t),yd("preconnect",e,t)}function dv(e,t,i){Ai.L(e,t,i);var s=ir;if(s&&e&&t){var a='link[rel="preload"][as="'+$t(t)+'"]';t==="image"&&i&&i.imageSrcSet?(a+='[imagesrcset="'+$t(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(a+='[imagesizes="'+$t(i.imageSizes)+'"]')):a+='[href="'+$t(e)+'"]';var f=a;switch(t){case"style":f=sr(e);break;case"script":f=rr(e)}Zt.has(f)||(e=l({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),Zt.set(f,e),s.querySelector(a)!==null||t==="style"&&s.querySelector(Gr(f))||t==="script"&&s.querySelector(Yr(f))||(t=s.createElement("link"),St(t,"link",e),ft(t),s.head.appendChild(t)))}}function fv(e,t){Ai.m(e,t);var i=ir;if(i&&e){var s=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+$t(s)+'"][href="'+$t(e)+'"]',f=a;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=rr(e)}if(!Zt.has(f)&&(e=l({rel:"modulepreload",href:e},t),Zt.set(f,e),i.querySelector(a)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Yr(f)))return}s=i.createElement("link"),St(s,"link",e),ft(s),i.head.appendChild(s)}}}function _v(e,t,i){Ai.S(e,t,i);var s=ir;if(s&&e){var a=Es(s).hoistableStyles,f=sr(e);t=t||"default";var E=a.get(f);if(!E){var k={loading:0,preload:null};if(E=s.querySelector(Gr(f)))k.loading=5;else{e=l({rel:"stylesheet",href:e,"data-precedence":t},i),(i=Zt.get(f))&&bo(e,i);var G=E=s.createElement("link");ft(G),St(G,"link",e),G._p=new Promise(function(te,le){G.onload=te,G.onerror=le}),G.addEventListener("load",function(){k.loading|=1}),G.addEventListener("error",function(){k.loading|=2}),k.loading|=4,ia(E,t,s)}E={type:"stylesheet",instance:E,count:1,state:k},a.set(f,E)}}}function vv(e,t){Ai.X(e,t);var i=ir;if(i&&e){var s=Es(i).hoistableScripts,a=rr(e),f=s.get(a);f||(f=i.querySelector(Yr(a)),f||(e=l({src:e,async:!0},t),(t=Zt.get(a))&&yo(e,t),f=i.createElement("script"),ft(f),St(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(a,f))}}function gv(e,t){Ai.M(e,t);var i=ir;if(i&&e){var s=Es(i).hoistableScripts,a=rr(e),f=s.get(a);f||(f=i.querySelector(Yr(a)),f||(e=l({src:e,async:!0,type:"module"},t),(t=Zt.get(a))&&yo(e,t),f=i.createElement("script"),ft(f),St(f,"link",e),i.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},s.set(a,f))}}function Cd(e,t,i,s){var a=(a=ue.current)?ta(a):null;if(!a)throw Error(j(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=sr(i.href),i=Es(a).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=sr(i.href);var f=Es(a).hoistableStyles,E=f.get(e);if(E||(a=a.ownerDocument||a,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(e,E),(f=a.querySelector(Gr(e)))&&!f._p&&(E.instance=f,E.state.loading=5),Zt.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},Zt.set(e,i),f||mv(a,e,i,E.state))),t&&s===null)throw Error(j(528,""));return E}if(t&&s!==null)throw Error(j(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=rr(i),i=Es(a).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(j(444,e))}}function sr(e){return'href="'+$t(e)+'"'}function Gr(e){return'link[rel="stylesheet"]['+e+"]"}function xd(e){return l({},e,{"data-precedence":e.precedence,precedence:null})}function mv(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}),St(t,"link",i),ft(t),e.head.appendChild(t))}function rr(e){return'[src="'+$t(e)+'"]'}function Yr(e){return"script[async]"+e}function wd(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+$t(i.href)+'"]');if(s)return t.instance=s,ft(s),s;var a=l({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),ft(s),St(s,"style",a),ia(s,i.precedence,e),t.instance=s;case"stylesheet":a=sr(i.href);var f=e.querySelector(Gr(a));if(f)return t.state.loading|=4,t.instance=f,ft(f),f;s=xd(i),(a=Zt.get(a))&&bo(s,a),f=(e.ownerDocument||e).createElement("link"),ft(f);var E=f;return E._p=new Promise(function(k,G){E.onload=k,E.onerror=G}),St(f,"link",s),t.state.loading|=4,ia(f,i.precedence,e),t.instance=f;case"script":return f=rr(i.src),(a=e.querySelector(Yr(f)))?(t.instance=a,ft(a),a):(s=i,(a=Zt.get(f))&&(s=l({},i),yo(s,a)),e=e.ownerDocument||e,a=e.createElement("script"),ft(a),St(a,"link",s),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(j(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(s=t.instance,t.state.loading|=4,ia(s,i.precedence,e));return t.instance}function ia(e,t,i){for(var s=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=s.length?s[s.length-1]:null,f=a,E=0;E<s.length;E++){var k=s[E];if(k.dataset.precedence===t)f=k;else if(f!==a)break}f?f.parentNode.insertBefore(e,f.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function bo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function yo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var sa=null;function Ed(e,t,i){if(sa===null){var s=new Map,a=sa=new Map;a.set(i,s)}else a=sa,s=a.get(i),s||(s=new Map,a.set(i,s));if(s.has(e))return s;for(s.set(e,null),i=i.getElementsByTagName(e),a=0;a<i.length;a++){var f=i[a];if(!(f[cr]||f[vt]||e==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var E=f.getAttribute(t)||"";E=e+E;var k=s.get(E);k?k.push(f):s.set(E,[f])}}return s}function Ld(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function pv(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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Ad(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Sv(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 a=sr(s.href),f=t.querySelector(Gr(a));if(f){t=f._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ra.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=f,ft(f);return}f=t.ownerDocument||t,s=xd(s),(a=Zt.get(a))&&bo(s,a),f=f.createElement("link"),ft(f);var E=f;E._p=new Promise(function(k,G){E.onload=k,E.onerror=G}),St(f,"link",s),i.instance=f}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=ra.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Co=0;function bv(e,t){return e.stylesheets&&e.count===0&&aa(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var s=setTimeout(function(){if(e.stylesheets&&aa(e,e.stylesheets),e.unsuspend){var f=e.unsuspend;e.unsuspend=null,f()}},6e4+t);0<e.imgBytes&&Co===0&&(Co=62500*ev());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&aa(e,e.stylesheets),e.unsuspend)){var f=e.unsuspend;e.unsuspend=null,f()}},(e.imgBytes>Co?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(a)}}:null}function ra(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)aa(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var na=null;function aa(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,na=new Map,t.forEach(yv,e),na=null,ra.call(e))}function yv(e,t){if(!(t.state.loading&4)){var i=na.get(e);if(i)var s=i.get(null);else{i=new Map,na.set(e,i);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<a.length;f++){var E=a[f];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(i.set(E.dataset.precedence,E),s=E)}s&&i.set(null,s)}a=t.instance,E=a.getAttribute("data-precedence"),f=i.get(E)||s,f===s&&i.set(null,a),i.set(E,a),this.count++,s=ra.bind(this),a.addEventListener("load",s),a.addEventListener("error",s),f?f.parentNode.insertBefore(a,f.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Xr={$$typeof:c,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Cv(e,t,i,s,a,f,E,k,G){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=ga(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ga(0),this.hiddenUpdates=ga(null),this.identifierPrefix=s,this.onUncaughtError=a,this.onCaughtError=f,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=G,this.incompleteTransitions=new Map}function Rd(e,t,i,s,a,f,E,k,G,te,le,ce){return e=new Cv(e,t,i,E,G,te,le,ce,k),t=1,f===!0&&(t|=24),f=zt(3,null,null,t),e.current=f,f.stateNode=e,t=el(),t.refCount++,e.pooledCache=t,t.refCount++,f.memoizedState={element:s,isDehydrated:i,cache:t},rl(f),e}function Dd(e){return e?(e=zs,e):zs}function Td(e,t,i,s,a,f){a=Dd(a),s.context===null?s.context=a:s.pendingContext=a,s=Ni(t),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=Hi(e,s,t),i!==null&&(Mt(i,e,t),Lr(i,e,t))}function Md(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function xo(e,t){Md(e,t),(e=e.alternate)&&Md(e,t)}function Bd(e){if(e.tag===13||e.tag===31){var t=os(e,67108864);t!==null&&Mt(t,e,67108864),xo(e,67108864)}}function Od(e){if(e.tag===13||e.tag===31){var t=It();t=ma(t);var i=os(e,t);i!==null&&Mt(i,e,t),xo(e,t)}}var la=!0;function xv(e,t,i,s){var a=I.T;I.T=null;var f=q.p;try{q.p=2,wo(e,t,i,s)}finally{q.p=f,I.T=a}}function wv(e,t,i,s){var a=I.T;I.T=null;var f=q.p;try{q.p=8,wo(e,t,i,s)}finally{q.p=f,I.T=a}}function wo(e,t,i,s){if(la){var a=Eo(s);if(a===null)co(e,t,s,oa,i),zd(e,s);else if(Lv(a,e,t,i,s))s.stopPropagation();else if(zd(e,s),t&4&&-1<Ev.indexOf(e)){for(;a!==null;){var f=ws(a);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var E=ci(f.pendingLanes);if(E!==0){var k=f;for(k.pendingLanes|=2,k.entangledLanes|=2;E;){var G=1<<31-bt(E);k.entanglements[1]|=G,E&=~G}li(f),(Ue&6)===0&&($n=Ce()+500,Fr(0))}}break;case 31:case 13:k=os(f,2),k!==null&&Mt(k,f,2),Gn(),xo(f,2)}if(f=Eo(s),f===null&&co(e,t,s,oa,i),f===a)break;a=f}a!==null&&s.stopPropagation()}else co(e,t,s,null,i)}}function Eo(e){return e=La(e),Lo(e)}var oa=null;function Lo(e){if(oa=null,e=xs(e),e!==null){var t=ie(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=P(t),e!==null)return e;e=null}else if(i===31){if(e=n(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 oa=e,null}function kd(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(Ze()){case Fe:return 2;case Ft:return 8;case ht:case wt:return 32;case et:return 268435456;default:return 32}default:return 32}}var Ao=!1,Xi=null,Vi=null,Ki=null,Vr=new Map,Kr=new Map,Qi=[],Ev="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function zd(e,t){switch(e){case"focusin":case"focusout":Xi=null;break;case"dragenter":case"dragleave":Vi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":Vr.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kr.delete(t.pointerId)}}function Qr(e,t,i,s,a,f){return e===null||e.nativeEvent!==f?(e={blockedOn:t,domEventName:i,eventSystemFlags:s,nativeEvent:f,targetContainers:[a]},t!==null&&(t=ws(t),t!==null&&Bd(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Lv(e,t,i,s,a){switch(t){case"focusin":return Xi=Qr(Xi,e,t,i,s,a),!0;case"dragenter":return Vi=Qr(Vi,e,t,i,s,a),!0;case"mouseover":return Ki=Qr(Ki,e,t,i,s,a),!0;case"pointerover":var f=a.pointerId;return Vr.set(f,Qr(Vr.get(f)||null,e,t,i,s,a)),!0;case"gotpointercapture":return f=a.pointerId,Kr.set(f,Qr(Kr.get(f)||null,e,t,i,s,a)),!0}return!1}function Nd(e){var t=xs(e.target);if(t!==null){var i=ie(t);if(i!==null){if(t=i.tag,t===13){if(t=P(i),t!==null){e.blockedOn=t,Ko(e.priority,function(){Od(i)});return}}else if(t===31){if(t=n(i),t!==null){e.blockedOn=t,Ko(e.priority,function(){Od(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 ca(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Eo(e.nativeEvent);if(i===null){i=e.nativeEvent;var s=new i.constructor(i.type,i);Ea=s,i.target.dispatchEvent(s),Ea=null}else return t=ws(i),t!==null&&Bd(t),e.blockedOn=i,!1;t.shift()}return!0}function Hd(e,t,i){ca(e)&&i.delete(t)}function Av(){Ao=!1,Xi!==null&&ca(Xi)&&(Xi=null),Vi!==null&&ca(Vi)&&(Vi=null),Ki!==null&&ca(Ki)&&(Ki=null),Vr.forEach(Hd),Kr.forEach(Hd)}function ha(e,t){e.blockedOn===t&&(e.blockedOn=null,Ao||(Ao=!0,B.unstable_scheduleCallback(B.unstable_NormalPriority,Av)))}var ua=null;function jd(e){ua!==e&&(ua=e,B.unstable_scheduleCallback(B.unstable_NormalPriority,function(){ua===e&&(ua=null);for(var t=0;t<e.length;t+=3){var i=e[t],s=e[t+1],a=e[t+2];if(typeof s!="function"){if(Lo(s||i)===null)continue;break}var f=ws(i);f!==null&&(e.splice(t,3),t-=3,wl(f,{pending:!0,data:a,method:i.method,action:s},s,a))}}))}function nr(e){function t(G){return ha(G,e)}Xi!==null&&ha(Xi,e),Vi!==null&&ha(Vi,e),Ki!==null&&ha(Ki,e),Vr.forEach(t),Kr.forEach(t);for(var i=0;i<Qi.length;i++){var s=Qi[i];s.blockedOn===e&&(s.blockedOn=null)}for(;0<Qi.length&&(i=Qi[0],i.blockedOn===null);)Nd(i),i.blockedOn===null&&Qi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(s=0;s<i.length;s+=3){var a=i[s],f=i[s+1],E=a[Et]||null;if(typeof f=="function")E||jd(i);else if(E){var k=null;if(f&&f.hasAttribute("formAction")){if(a=f,E=f[Et]||null)k=E.formAction;else if(Lo(a)!==null)continue}else k=E.action;typeof k=="function"?i[s+1]=k:(i.splice(s,3),s-=3),jd(i)}}}function Ud(){function e(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(E){return a=E})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),s||setTimeout(i,20)}function i(){if(!s&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,a=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),a!==null&&(a(),a=null)}}}function Ro(e){this._internalRoot=e}da.prototype.render=Ro.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));var i=t.current,s=It();Td(i,s,e,t,null,null)},da.prototype.unmount=Ro.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Td(e.current,2,null,e,null,null),Gn(),t[Cs]=null}};function da(e){this._internalRoot=e}da.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vo();e={blockedOn:null,target:e,priority:t};for(var i=0;i<Qi.length&&t!==0&&t<Qi[i].priority;i++);Qi.splice(i,0,e),i===0&&Nd(e)}};var Id=Y.version;if(Id!=="19.2.6")throw Error(j(527,Id,"19.2.6"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(j(188)):(e=Object.keys(e).join(","),Error(j(268,e)));return e=_(t),e=e!==null?v(e):null,e=e===null?null:e.stateNode,e};var Rv={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:I,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fa=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fa.isDisabled&&fa.supportsFiber)try{Jt=fa.inject(Rv),dt=fa}catch{}}return Jr.createRoot=function(e,t){if(!Z(e))throw Error(j(299));var i=!1,s="",a=Yh,f=Xh,E=Vh;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(f=t.onCaughtError),t.onRecoverableError!==void 0&&(E=t.onRecoverableError)),t=Rd(e,1,!1,null,null,i,s,null,a,f,E,Ud),e[Cs]=t.current,oo(e),new Ro(t)},Jr.hydrateRoot=function(e,t,i){if(!Z(e))throw Error(j(299));var s=!1,a="",f=Yh,E=Xh,k=Vh,G=null;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(a=i.identifierPrefix),i.onUncaughtError!==void 0&&(f=i.onUncaughtError),i.onCaughtError!==void 0&&(E=i.onCaughtError),i.onRecoverableError!==void 0&&(k=i.onRecoverableError),i.formState!==void 0&&(G=i.formState)),t=Rd(e,1,!0,t,i??null,s,a,G,f,E,k,Ud),t.context=Dd(null),i=t.current,s=It(),s=ma(s),a=Ni(s),a.callback=null,Hi(i,a,s),i=s,t.current.lanes=i,or(t,i),li(t),e[Cs]=t.current,oo(e),new da(t)},Jr.version="19.2.6",Jr}var Kd;function jv(){if(Kd)return Mo.exports;Kd=1;function B(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(B)}catch(Y){console.error(Y)}}return B(),Mo.exports=Hv(),Mo.exports}var Uv=jv();function Ji(B,Y){const[W,j]=de.useState(null),[Z,ie]=de.useState(null),P=de.useRef(B);P.current=B;const n=de.useRef(async()=>{try{const u=await P.current();j(u),ie(null)}catch(u){ie(u)}});return de.useEffect(()=>{let u=!1;const _=async()=>{u||await n.current()};_();const v=setInterval(_,Y);return()=>{u=!0,clearInterval(v)}},[Y]),{data:W,error:Z,refresh:()=>void n.current()}}const zo="tono:route";function ts(){const[B,Y]=de.useState(window.location.pathname);return de.useEffect(()=>{const j=()=>Y(window.location.pathname);return window.addEventListener("popstate",j),window.addEventListener(zo,j),()=>{window.removeEventListener("popstate",j),window.removeEventListener(zo,j)}},[]),{path:B,navigate:j=>{j!==window.location.pathname&&(window.history.pushState({},"",j),window.dispatchEvent(new Event(zo)))}}}async function ar(B){const Y=await fetch(B);if(!Y.ok)throw new Error(`${B}: ${Y.status}`);return Y.json()}const tt={health:()=>ar("/api/health"),config:()=>ar("/api/config"),tasks:()=>ar("/api/tasks").then(B=>B.tasks),task:B=>ar(`/api/tasks/${B}`).then(Y=>Y.task),sessions:()=>ar("/api/sessions").then(B=>B.sessions),workers:()=>ar("/api/workers").then(B=>B.workers),killSession:async B=>{const Y=await fetch(`/api/sessions/${encodeURIComponent(B)}`,{method:"DELETE"});if(!Y.ok)throw new Error(`kill: ${Y.status}`)},cleanupTask:async B=>{const Y=await fetch(`/api/tasks/${B}/cleanup`,{method:"POST"});if(!Y.ok){const W=await Y.text();throw new Error(`cleanup: ${Y.status} ${W}`)}},rawConfig:async()=>{const B=await fetch("/api/config/raw");if(!B.ok)throw new Error(`config/raw: ${B.status}`);return B.json()},saveRawConfig:async B=>{const Y=await fetch("/api/config/raw",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({content:B})}),W=await Y.json().catch(()=>({}));if(!Y.ok){const j=W.error??`${Y.status}`;throw new Error(j)}return W},startTask:async B=>{const Y=await fetch("/api/tasks",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(B)}),W=await Y.json().catch(()=>({}));if(!Y.ok)throw new Error(W.error??`${Y.status}`);return W.task},repoItems:async B=>{const Y=await fetch(`/api/repos/${encodeURIComponent(B)}/items`);if(!Y.ok){const W=await Y.json().catch(()=>({}));throw new Error(W.error??`${Y.status}`)}return await Y.json()},retryTask:async B=>{const Y=await fetch(`/api/tasks/${B}/retry`,{method:"POST"}),W=await Y.json().catch(()=>({}));if(!Y.ok)throw new Error(W.error??`${Y.status}`);return W.task},markDone:async B=>{const Y=await fetch(`/api/tasks/${B}/done`,{method:"POST"}),W=await Y.json().catch(()=>({}));if(!Y.ok)throw new Error(W.error??`${Y.status}`);return W.task},newShell:async(B={})=>{const Y=await fetch("/api/sessions/shell",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(B)}),W=await Y.json().catch(()=>({}));if(!Y.ok)throw new Error(W.error??`${Y.status}`);return W}};function Iv(B){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}${B}`}const Pv={neutral:"bg-zinc-800 text-zinc-300 border-zinc-700",blue:"bg-blue-950/60 text-blue-300 border-blue-900",green:"bg-green-950/60 text-green-300 border-green-900",amber:"bg-amber-950/60 text-amber-300 border-amber-900",red:"bg-red-950/60 text-red-300 border-red-900",orange:"bg-orange-950/60 text-orange-300 border-orange-900"};function es({tone:B="neutral",children:Y}){return A.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-xs font-medium ${Pv[B]}`,children:Y})}function Fv(){const{path:B,navigate:Y}=ts(),{data:W}=Ji(tt.health,5e3),j=(n,u)=>{const _=n==="/"?B==="/":B.startsWith(n);return A.jsx("button",{onClick:()=>Y(n),className:`px-3 py-1.5 text-sm rounded-md transition ${_?"bg-zinc-800 text-zinc-100":"text-zinc-400 hover:text-zinc-200"}`,children:u})},Z=W==null?void 0:W.poller.some(n=>n.lastError&&(!n.lastSuccessAt||Date.parse(n.lastSuccessAt)<Date.now()-5*6e4)),ie=W==null?void 0:W.workers,P=ie?ie.connected===0?"red":ie.connected<ie.total?"amber":"green":"neutral";return A.jsx("header",{className:"border-b border-zinc-800 bg-zinc-950/80 backdrop-blur sticky top-0 z-10",children:A.jsxs("div",{className:"mx-auto max-w-6xl flex items-center gap-4 px-6 py-3",children:[A.jsxs("button",{onClick:()=>Y("/"),className:"text-lg font-semibold tracking-tight text-zinc-100 hover:text-white",children:["tono",A.jsx("span",{children:".sh"})]}),A.jsxs("nav",{className:"flex items-center gap-1",children:[j("/","Dashboard"),j("/workers","Workers"),j("/config","Config")]}),A.jsx("div",{className:"ml-auto flex items-center gap-3 text-xs text-zinc-400",children:W?A.jsxs(A.Fragment,{children:[A.jsxs(es,{tone:"neutral",children:["agents: ",Object.keys(W.agents).length]}),A.jsxs(es,{tone:Z?"red":"green",children:["repos: ",W.reposWatched]}),A.jsx("button",{onClick:()=>Y("/workers"),className:"cursor-pointer",title:"Click for worker details",children:A.jsxs(es,{tone:P,children:["workers: ",(ie==null?void 0:ie.connected)??0,ie&&ie.total!==ie.connected?`/${ie.total}`:""]})})]}):A.jsx("span",{className:"text-zinc-600",children:"connecting…"})})]})})}function Xe({variant:B="default",className:Y="",...W}){const j="inline-flex items-center gap-1.5 rounded-md px-3 py-1.5 text-sm font-medium transition disabled:opacity-50 disabled:cursor-not-allowed",Z={default:"bg-zinc-100 text-zinc-900 hover:bg-white",danger:"bg-red-600 text-white hover:bg-red-500",ghost:"text-zinc-300 hover:bg-zinc-800"}[B];return A.jsx("button",{className:`${j} ${Z} ${Y}`,...W})}function qv({config:B,onClose:Y}){var q;const{navigate:W}=ts(),j=de.useMemo(()=>Object.keys(B.agents),[B.agents]),[Z,ie]=de.useState(((q=B.repos[0])==null?void 0:q.slug)??""),[P,n]=de.useState("implement"),[u,_]=de.useState(""),[v,l]=de.useState(""),[g,b]=de.useState(!1),[y,d]=de.useState(null),[r,h]=de.useState(null),[o,c]=de.useState(!1),[m,C]=de.useState(null),[S,w]=de.useState(""),[p,x]=de.useState(!1),L=de.useMemo(()=>{const F=B.repos.find(R=>R.slug===Z);return!F||!F.agents||F.agents.length===0?j:F.agents.filter(R=>j.includes(R))},[B.repos,Z,j]);de.useEffect(()=>{L.length!==0&&(L.includes(v)||l(L[0]))},[L,v]),de.useEffect(()=>{const F=R=>{R.key==="Escape"&&Y()};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[Y]),de.useEffect(()=>{if(!Z)return;let F=!1;return c(!0),C(null),h(null),tt.repoItems(Z).then(R=>{F||h(R)}).catch(R=>{F||C(R.message)}).finally(()=>{F||c(!1)}),()=>{F=!0}},[Z]);const O=async F=>{if(!Number.isInteger(F)||F<=0){d("issue/PR number must be a positive integer");return}if(!v){d("pick an agent");return}b(!0),d(null);try{const R=await tt.startTask({repoSlug:Z,issueNumber:F,agent:v,kind:P});Y(),W(`/tasks/${R.id}`)}catch(R){d(R.message),b(!1)}};if(B.repos.length===0)return A.jsx(Jd,{onClose:Y,children:A.jsxs("div",{className:"text-sm text-zinc-300",children:["No repos configured yet. Add one on the"," ",A.jsx("button",{className:"text-orange-400 hover:underline",onClick:()=>{Y(),W("/config")},children:"Config page"})," ","first."]})});const T=de.useMemo(()=>r?Zd(r.issues,S):[],[r,S]),M=de.useMemo(()=>r?Zd(r.prs,S):[],[r,S]),U=P==="implement"?T:M,K=P==="implement"?(r==null?void 0:r.issues.length)??0:(r==null?void 0:r.prs.length)??0,I=P==="implement"?(r==null?void 0:r.issuesError)??null:(r==null?void 0:r.prsError)??null;return A.jsx(Jd,{onClose:Y,children:A.jsxs("div",{className:"space-y-3",children:[A.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[A.jsxs("div",{children:[A.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:"Repo"}),A.jsx("select",{value:Z,onChange:F=>ie(F.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm",children:B.repos.map(F=>A.jsx("option",{value:F.slug,children:F.slug},F.slug))})]}),A.jsxs("div",{children:[A.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:"Agent"}),A.jsx("select",{value:v,onChange:F=>l(F.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm",children:L.map(F=>A.jsx("option",{value:F,children:F},F))}),L.length===0&&A.jsx("p",{className:"mt-1 text-xs text-red-300",children:"no agents enabled on this repo"})]})]}),A.jsxs("div",{children:[A.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:"Kind"}),A.jsxs("div",{className:"inline-flex rounded-md border border-zinc-700 bg-zinc-900 p-0.5 text-sm",children:[A.jsx(Qd,{active:P==="implement",onClick:()=>n("implement"),children:"Implement"}),A.jsx(Qd,{active:P==="review",onClick:()=>n("review"),children:"Review"})]}),A.jsx("p",{className:"mt-1 text-xs text-zinc-500",children:P==="implement"?"Pick an open issue. Tono will run the agent in a fresh worktree off baseBranch and queue it to open a PR.":"Pick an open PR. Tono will check out the PR head into a detached worktree and queue the agent to post a review."})]}),A.jsxs("div",{className:"border-t border-zinc-800 pt-3",children:[A.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[A.jsxs("label",{className:"text-xs text-zinc-400",children:[P==="implement"?"Open issues":"Open PRs",o?" · loading…":r?` · ${K}`:""]}),A.jsx("button",{type:"button",onClick:()=>x(F=>!F),className:"text-xs text-zinc-500 hover:text-zinc-300",children:p?"← back to list":"enter number manually"})]}),p?A.jsx($v,{kind:P,disabled:g||L.length===0,onSubmit:F=>O(F),issueNumber:u,setIssueNumber:_}):A.jsxs(A.Fragment,{children:[A.jsx("input",{type:"text",placeholder:P==="implement"?"filter issues by title or #number":"filter PRs by title or #number",value:S,onChange:F=>w(F.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm mb-2",autoFocus:!0}),A.jsx("div",{className:"max-h-64 overflow-y-auto rounded-md border border-zinc-800 divide-y divide-zinc-800",children:o?A.jsx("div",{className:"px-3 py-6 text-center text-xs text-zinc-500",children:"loading from gh…"}):m?A.jsx("div",{className:"px-3 py-3 text-xs text-red-300",children:m}):I?A.jsxs("div",{className:"px-3 py-3 text-xs text-red-300",children:["couldn't load open ",P==="implement"?"issues":"PRs",": ",I]}):U.length===0?A.jsx("div",{className:"px-3 py-6 text-center text-xs text-zinc-500",children:K===0?`No open ${P==="implement"?"issues":"PRs"} on ${Z}.`:"No matches."}):U.map(F=>A.jsxs("button",{type:"button",disabled:g,onClick:()=>O(F.number),className:"w-full text-left px-3 py-2 hover:bg-zinc-800/60 transition disabled:opacity-50 disabled:cursor-not-allowed",children:[A.jsxs("div",{className:"flex items-baseline gap-2",children:[A.jsxs("span",{className:"text-[11px] font-mono text-zinc-500 w-12 shrink-0",children:["#",F.number]}),A.jsx("span",{className:"text-sm text-zinc-100 truncate flex-1",children:F.title})]}),F.labels.length>0&&A.jsx("div",{className:"mt-1 ml-14 flex flex-wrap gap-1",children:F.labels.slice(0,4).map(R=>A.jsx("span",{className:"text-[10px] font-mono text-zinc-500",children:R},R))})]},F.number))})]})]}),y&&A.jsx("div",{className:"rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:y}),A.jsx("div",{className:"flex justify-end gap-2 pt-1",children:A.jsx(Xe,{type:"button",variant:"ghost",onClick:Y,children:"Cancel"})})]})})}function Qd({active:B,onClick:Y,children:W}){return A.jsx("button",{type:"button",onClick:Y,className:`px-3 py-1 text-sm rounded-md transition ${B?"bg-zinc-800 text-zinc-100":"text-zinc-400 hover:text-zinc-200"}`,children:W})}function $v({kind:B,disabled:Y,onSubmit:W,issueNumber:j,setIssueNumber:Z}){return A.jsxs("form",{onSubmit:ie=>{ie.preventDefault(),W(Number(j))},children:[A.jsxs("div",{className:"flex gap-2",children:[A.jsx("input",{type:"number",min:1,value:j,onChange:ie=>Z(ie.target.value),placeholder:B==="implement"?"issue #":"PR #",className:"flex-1 rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-mono",autoFocus:!0}),A.jsx(Xe,{type:"submit",disabled:Y||!j,children:B==="implement"?"Start implement":"Start review"})]}),A.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:["Tono will fetch the ",B==="implement"?"issue":"PR"," via ",A.jsx("code",{children:"gh"})," and queue a ",B," task."]})]})}function Zd(B,Y){const W=Y.trim().toLowerCase();if(!W)return B;if(/^#?\d+$/.test(W)){const j=W.startsWith("#")?W.slice(1):W;return B.filter(Z=>String(Z.number).includes(j))}return B.filter(j=>j.title.toLowerCase().includes(W))}function Jd({children:B,onClose:Y}){return A.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",onMouseDown:W=>{W.target===W.currentTarget&&Y()},children:A.jsxs("div",{className:"w-full max-w-lg rounded-lg border border-zinc-800 bg-zinc-950 p-5 shadow-2xl",children:[A.jsx("h2",{className:"text-base font-semibold text-zinc-100 mb-3",children:"Start a session"}),B]})})}const uf={queued:"queued",assigning:"assigning",running:"running",completed:"completed",pr_open:"PR open",pr_closed:"PR closed",merged:"merged",cleaned:"cleaned",failed:"failed"};function Wv({workers:B,disabled:Y,opening:W,onOpen:j}){const[Z,ie]=de.useState(!1),P=de.useRef(null);if(de.useEffect(()=>{if(!Z)return;const n=u=>{var _;(_=P.current)!=null&&_.contains(u.target)||ie(!1)};return window.addEventListener("mousedown",n),()=>window.removeEventListener("mousedown",n)},[Z]),B.length===0)return A.jsx(Xe,{variant:"ghost",disabled:!0,title:"No workers connected — start a worker to open a terminal",children:"+ New terminal"});if(B.length===1){const n=B[0];return A.jsx(Xe,{variant:"ghost",disabled:Y,title:`Open a terminal on ${n.hostname}`,onClick:()=>j(n.id),children:W?"Opening…":`+ New terminal (${n.hostname})`})}return A.jsxs("div",{ref:P,className:"relative",children:[A.jsx(Xe,{variant:"ghost",disabled:Y,onClick:()=>ie(n=>!n),children:W?"Opening…":"+ New terminal ▾"}),Z&&A.jsxs("div",{className:"absolute right-0 z-20 mt-1 w-64 rounded-md border border-zinc-800 bg-zinc-900 shadow-lg overflow-hidden",children:[A.jsx("div",{className:"px-3 py-2 text-[10px] uppercase tracking-wide text-zinc-500 border-b border-zinc-800",children:"Open shell on…"}),B.map(n=>A.jsxs("button",{className:"w-full text-left px-3 py-2 text-sm text-zinc-200 hover:bg-zinc-800 transition flex items-center justify-between gap-2",onClick:()=>{ie(!1),j(n.id)},children:[A.jsx("span",{className:"truncate",children:n.hostname}),A.jsx("span",{className:"text-[10px] font-mono text-zinc-500",children:n.id.slice(0,8)})]},n.id))]})]})}const Gv={queued:"neutral",assigning:"blue",running:"blue",completed:"green",pr_open:"amber",pr_closed:"red",merged:"orange",cleaned:"neutral",failed:"red"};function No(B){if(!B)return"—";const Y=Date.now()-Date.parse(B);return Y<6e4?`${Math.round(Y/1e3)}s ago`:Y<36e5?`${Math.round(Y/6e4)}m ago`:Y<864e5?`${Math.round(Y/36e5)}h ago`:`${Math.round(Y/864e5)}d ago`}function Yv(B){return B.status==="queued"?`queued ${No(B.createdAt)}`:B.status==="running"?`started ${No(B.startedAt)}`:`${No(B.completedAt??B.startedAt??B.createdAt)}`}function Xv({task:B}){const{navigate:Y}=ts();return A.jsxs("button",{onClick:()=>Y(`/tasks/${B.id}`),className:"group w-full text-left rounded-md border border-zinc-800 bg-zinc-900/50 p-3 hover:border-zinc-700 hover:bg-zinc-900 transition",children:[A.jsxs("div",{className:"flex items-start justify-between gap-2",children:[A.jsxs("span",{className:"text-[11px] font-mono text-zinc-500",children:["#",B.id]}),A.jsx(es,{tone:Gv[B.status],children:uf[B.status]})]}),A.jsx("div",{className:"mt-1 text-sm font-medium text-zinc-100 line-clamp-2",children:B.issueTitle}),A.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-x-2 gap-y-1 text-[11px] text-zinc-500",children:[A.jsxs("span",{className:"font-mono truncate max-w-[160px]",children:[B.repoSlug,"#",B.issueNumber]}),A.jsx("span",{children:"·"}),A.jsx("span",{children:Yv(B)}),B.prUrl&&A.jsxs(A.Fragment,{children:[A.jsx("span",{children:"·"}),A.jsx("a",{href:B.prUrl,target:"_blank",rel:"noreferrer",onClick:W=>W.stopPropagation(),className:"text-orange-400 hover:underline",children:"PR"})]})]})]})}const Vv=[{id:"queued",title:"Queued",hint:"implement + review",match:B=>B.status==="queued",sort:(B,Y)=>Date.parse(B.createdAt)-Date.parse(Y.createdAt),emptyMessage:"Empty."},{id:"building",title:"Building",hint:"implementing an issue",match:B=>B.status==="running"&&B.kind==="implement",sort:(B,Y)=>Date.parse(Y.startedAt??Y.createdAt)-Date.parse(B.startedAt??B.createdAt),emptyMessage:"No implementations running."},{id:"reviewing",title:"Reviewing",hint:"agent is reviewing a PR",match:B=>B.status==="running"&&B.kind==="review",sort:(B,Y)=>Date.parse(Y.startedAt??Y.createdAt)-Date.parse(B.startedAt??B.createdAt),emptyMessage:"No active reviews."},{id:"awaiting-review",title:"Awaiting review",hint:"PR open on GitHub",match:B=>B.status==="pr_open",sort:(B,Y)=>Date.parse(Y.completedAt??Y.createdAt)-Date.parse(B.completedAt??B.createdAt),emptyMessage:"No PRs awaiting review."},{id:"done",title:"Done",hint:"merged · completed · closed · failed",match:B=>B.status==="merged"||B.status==="pr_closed"||B.status==="completed"||B.status==="cleaned"||B.status==="failed",sort:(B,Y)=>Date.parse(Y.completedAt??Y.createdAt)-Date.parse(B.completedAt??B.createdAt),limit:12,emptyMessage:"Nothing finished yet."}];function Kv({column:B,tasks:Y}){const W=Y.filter(B.match);B.sort&&W.sort(B.sort);const j=B.limit?W.slice(0,B.limit):W,Z=W.length-j.length;return A.jsxs("div",{className:"flex min-w-[260px] flex-1 flex-col rounded-lg border border-zinc-800 bg-zinc-950/40",children:[A.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-800 px-3 py-2",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-zinc-300",children:B.title}),A.jsx("span",{className:"text-[11px] text-zinc-500",children:W.length})]}),B.hint&&A.jsx("span",{className:"text-[10px] text-zinc-600 truncate",children:B.hint})]}),A.jsxs("div",{className:"flex-1 space-y-2 p-2",children:[j.length===0?A.jsx("div",{className:"rounded-md border border-dashed border-zinc-800 px-3 py-6 text-center text-xs text-zinc-600",children:B.emptyMessage??"—"}):j.map(ie=>A.jsx(Xv,{task:ie},ie.id)),Z>0&&A.jsxs("div",{className:"text-center text-[11px] text-zinc-500",children:["+",Z," more"]})]})]})}function Qv(){const{data:B}=Ji(tt.tasks,3e3),{data:Y}=Ji(tt.sessions,3e3),{data:W}=Ji(tt.health,5e3),{data:j}=Ji(tt.config,3e4),{data:Z}=Ji(tt.workers,5e3),{navigate:ie}=ts(),[P,n]=de.useState(!1),[u,_]=de.useState(!1),v=de.useMemo(()=>(Z??[]).filter(d=>d.connected),[Z]),l=(Y??[]).filter(d=>d.kind==="shell"&&d.status==="running"),g=de.useMemo(()=>B??[],[B]),b=((W==null?void 0:W.poller)??[]).filter(d=>d.lastError),y=j!==null&&j.repos.length===0;return A.jsxs("div",{className:"mx-auto max-w-[1400px] px-6 py-6 space-y-5",children:[A.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[A.jsx("h1",{className:"text-base font-semibold text-zinc-200",children:"Dashboard"}),A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx(Wv,{workers:v,disabled:u,opening:u,onOpen:async d=>{_(!0);try{const{sessionId:r}=await tt.newShell({workerId:d});ie(`/shells/${encodeURIComponent(r)}`)}catch(r){alert(r.message)}finally{_(!1)}}}),A.jsx(Xe,{onClick:()=>n(!0),children:"+ Start session"})]})]}),y&&A.jsxs("div",{className:"rounded-md border border-zinc-800 bg-zinc-900/60 px-4 py-3 text-sm text-zinc-300 flex items-center justify-between",children:[A.jsx("span",{children:"No repos configured. Add one to start receiving labeled-issue triggers."}),A.jsx(Xe,{variant:"ghost",onClick:()=>ie("/config"),children:"Edit config"})]}),b.length>0&&A.jsxs("div",{className:"rounded-md border border-red-900 bg-red-950/40 px-4 py-3 text-sm text-red-300",children:[A.jsx("div",{className:"font-medium",children:"GitHub poller errors"}),A.jsx("ul",{className:"mt-1 space-y-0.5 text-xs font-mono",children:b.map(d=>A.jsxs("li",{children:[d.repo,": ",d.lastError]},d.repo))})]}),l.length>0&&A.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[A.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs uppercase tracking-wide text-zinc-400",children:["Shells ",A.jsxs("span",{className:"text-[11px] text-zinc-500 normal-case tracking-normal",children:[l.length," live"]})]}),A.jsx("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2 lg:grid-cols-3",children:l.map(d=>A.jsxs("button",{onClick:()=>ie(`/shells/${encodeURIComponent(d.id)}`),className:"rounded-md border border-zinc-800 bg-zinc-950/60 px-3 py-2 text-left hover:border-zinc-700 hover:bg-zinc-900 transition flex items-center gap-3",children:[A.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-blue-400 animate-pulse"}),A.jsxs("span",{className:"text-[11px] text-zinc-500 font-mono",children:["pid ",d.pid]}),A.jsx("span",{className:"font-mono text-xs text-zinc-300 truncate",children:d.label??"shell"})]},d.id))})]}),A.jsx("div",{className:"flex gap-3 overflow-x-auto pb-3 lg:overflow-visible",children:Vv.map(d=>A.jsx(Kv,{column:d,tasks:g},d.id))}),P&&j&&A.jsx(qv,{config:j,onClose:()=>n(!1)})]})}var Ho={exports:{}},ef;function Zv(){return ef||(ef=1,(function(B,Y){(function(W,j){B.exports=j()})(globalThis,(()=>(()=>{var W={4567:function(P,n,u){var _=this&&this.__decorate||function(o,c,m,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,m,C);else for(var x=o.length-1;x>=0;x--)(S=o[x])&&(p=(w<3?S(p):w>3?S(c,m,p):S(c,m))||p);return w>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(o,c){return function(m,C){c(m,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.AccessibilityManager=void 0;const l=u(9042),g=u(9924),b=u(844),y=u(4725),d=u(2585),r=u(3656);let h=n.AccessibilityManager=class extends b.Disposable{constructor(o,c,m,C){super(),this._terminal=o,this._coreBrowserService=m,this._renderService=C,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let S=0;S<this._terminal.rows;S++)this._rowElements[S]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[S]);if(this._topBoundaryFocusListener=S=>this._handleBoundaryFocus(S,0),this._bottomBoundaryFocusListener=S=>this._handleBoundaryFocus(S,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 g.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((S=>this._handleResize(S.rows)))),this.register(this._terminal.onRender((S=>this._refreshRows(S.start,S.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((S=>this._handleChar(S)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
50
50
|
`)))),this.register(this._terminal.onA11yTab((S=>this._handleTab(S)))),this.register(this._terminal.onKey((S=>this._handleKey(S.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,r.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,b.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(o){for(let c=0;c<o;c++)this._handleChar(" ")}_handleChar(o){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==o&&(this._charsToAnnounce+=o):this._charsToAnnounce+=o,o===`
|
|
51
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=l.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,c){this._liveRegionDebouncer.refresh(o,c,this._terminal.rows)}_renderRows(o,c){const m=this._terminal.buffer,C=m.lines.length.toString();for(let S=o;S<=c;S++){const w=m.lines.get(m.ydisp+S),p=[],x=(w==null?void 0:w.translateToString(!0,void 0,void 0,p))||"",L=(m.ydisp+S+1).toString(),B=this._rowElements[S];B&&(x.length===0?(B.innerText=" ",this._rowColumns.set(B,[0,1])):(B.textContent=x,this._rowColumns.set(B,p)),B.setAttribute("aria-posinset",L),B.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,c){const m=o.target,C=this._rowElements[c===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(c===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==C)return;let S,w;if(c===0?(S=m,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(S=this._rowElements.shift(),w=m,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),c===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(c===0?-1:1),this._rowElements[c===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var x;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let c={node:o.anchorNode,offset:o.anchorOffset},m={node:o.focusNode,offset:o.focusOffset};if((c.node.compareDocumentPosition(m.node)&Node.DOCUMENT_POSITION_PRECEDING||c.node===m.node&&c.offset>m.offset)&&([c,m]=[m,c]),c.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(c={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(c.node))return;const C=this._rowElements.slice(-1)[0];if(m.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(m={node:C,offset:((x=C.textContent)==null?void 0:x.length)??0}),!this._rowContainer.contains(m.node))return;const S=({node:L,offset:B})=>{const T=L instanceof Text?L.parentNode:L;let M=parseInt(T==null?void 0:T.getAttribute("aria-posinset"),10)-1;if(isNaN(M))return console.warn("row is invalid. Race condition?"),null;const U=this._rowColumns.get(T);if(!U)return console.warn("columns is null. Race condition?"),null;let K=B<U.length?U[B]:U.slice(-1)[0]+1;return K>=this._terminal.cols&&(++M,K=0),{row:M,column:K}},w=S(c),p=S(m);if(w&&p){if(w.row>p.row||w.row===p.row&&w.column>=p.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(p.row-w.row)*this._terminal.cols-w.column+p.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let c=this._rowContainer.children.length;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_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 o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=h=_([v(1,u.IInstantiationService),v(2,y.ICoreBrowserService),v(3,y.IRenderService)],h)},3614:(F,n)=>{function f(g){return g.replace(/\r?\n/g,"\r")}function _(g,b){return b?"\x1B[200~"+g+"\x1B[201~":g}function v(g,b,y,u){g=_(g=f(g),y.decPrivateModes.bracketedPasteMode&&u.rawOptions.ignoreBracketedPasteMode!==!0),y.triggerDataEvent(g,!0),b.value=""}function l(g,b,y){const u=y.getBoundingClientRect(),r=g.clientX-u.left-10,h=g.clientY-u.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${r}px`,b.style.top=`${h}px`,b.style.zIndex="1000",b.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=f,n.bracketTextForPaste=_,n.copyHandler=function(g,b){g.clipboardData&&g.clipboardData.setData("text/plain",b.selectionText),g.preventDefault()},n.handlePasteEvent=function(g,b,y,u){g.stopPropagation(),g.clipboardData&&v(g.clipboardData.getData("text/plain"),b,y,u)},n.paste=v,n.moveTextAreaUnderMouseCursor=l,n.rightClickHandler=function(g,b,y,u,r){l(g,b,y),r&&u.rightClickSelect(g),b.value=u.selectionText,b.select()}},7239:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const _=f(1505);n.ColorContrastCache=class{constructor(){this._color=new _.TwoKeyMap,this._css=new _.TwoKeyMap}setCss(v,l,g){this._css.set(v,l,g)}getCss(v,l){return this._css.get(v,l)}setColor(v,l,g){this._color.set(v,l,g)}getColor(v,l){return this._color.get(v,l)}clear(){this._color.clear(),this._css.clear()}}},3656:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(f,_,v,l){f.addEventListener(_,v,l);let g=!1;return{dispose:()=>{g||(g=!0,f.removeEventListener(_,v,l))}}}},3551:function(F,n,f){var _=this&&this.__decorate||function(h,o,c,m){var C,S=arguments.length,w=S<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,m);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,m){o(c,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const l=f(3656),g=f(8460),b=f(844),y=f(2585),u=f(4725);let r=n.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(h,o,c,m,C){super(),this._element=h,this._mouseService=o,this._renderService=c,this._bufferService=m,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.toDisposable)((()=>{var S;this._lastMouseEvent=void 0,(S=this._activeProviderReplies)==null||S.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,l.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,l.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const c=h.composedPath();for(let m=0;m<c.length;m++){const C=c[m];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,o){var m,C;this._activeProviderReplies&&o||((m=this._activeProviderReplies)==null||m.forEach((S=>{S==null||S.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let c=!1;for(const[S,w]of this._linkProviderService.linkProviders.entries())o?(C=this._activeProviderReplies)!=null&&C.get(S)&&(c=this._checkLinkProviderResult(S,h,c)):w.provideLinks(h.y,(p=>{var L,B;if(this._isMouseOut)return;const x=p==null?void 0:p.map((T=>({link:T})));(L=this._activeProviderReplies)==null||L.set(S,x),c=this._checkLinkProviderResult(S,h,c),((B=this._activeProviderReplies)==null?void 0:B.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,o){const c=new Set;for(let m=0;m<o.size;m++){const C=o.get(m);if(C)for(let S=0;S<C.length;S++){const w=C[S],p=w.link.range.start.y<h?0:w.link.range.start.x,x=w.link.range.end.y>h?this._bufferService.cols:w.link.range.end.x;for(let L=p;L<=x;L++){if(c.has(L)){C.splice(S--,1);break}c.add(L)}}}}_checkLinkProviderResult(h,o,c){var S;if(!this._activeProviderReplies)return c;const m=this._activeProviderReplies.get(h);let C=!1;for(let w=0;w<h;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(C=!0);if(!C&&m){const w=m.find((p=>this._linkAtPosition(p.link,o)));w&&(c=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!c)for(let w=0;w<this._activeProviderReplies.size;w++){const p=(S=this._activeProviderReplies.get(w))==null?void 0:S.find((x=>this._linkAtPosition(x.link,o)));if(p){c=!0,this._handleNewLink(p);break}}return c}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,o){this._currentLink&&this._lastMouseEvent&&(!h||!o||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,b.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(h.link,o)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var c,m;return(m=(c=this._currentLink)==null?void 0:c.state)==null?void 0:m.decorations.pointerCursor},set:c=>{var m;(m=this._currentLink)!=null&&m.state&&this._currentLink.state.decorations.pointerCursor!==c&&(this._currentLink.state.decorations.pointerCursor=c,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",c))}},underline:{get:()=>{var c,m;return(m=(c=this._currentLink)==null?void 0:c.state)==null?void 0:m.decorations.underline},set:c=>{var m,C,S;(m=this._currentLink)!=null&&m.state&&((S=(C=this._currentLink)==null?void 0:C.state)==null?void 0:S.decorations.underline)!==c&&(this._currentLink.state.decorations.underline=c,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,c))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((c=>{if(!this._currentLink)return;const m=c.start===0?0:c.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+c.end;if(this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(m,C),this._lastMouseEvent)){const S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._askForLink(S,!1)}}))))}_linkHover(h,o,c){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(c,o.text)}_fireUnderlineEvent(h,o){const c=h.range,m=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-m-1,c.end.x,c.end.y-m-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(h,o,c){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(c,o.text)}_linkAtPosition(h,o){const c=h.range.start.y*this._bufferService.cols+h.range.start.x,m=h.range.end.y*this._bufferService.cols+h.range.end.x,C=o.y*this._bufferService.cols+o.x;return c<=C&&C<=m}_positionFromMouseEvent(h,o,c){const m=c.getCoords(h,o,this._bufferService.cols,this._bufferService.rows);if(m)return{x:m[0],y:m[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,o,c,m,C){return{x1:h,y1:o,x2:c,y2:m,cols:this._bufferService.cols,fg:C}}};n.Linkifier=r=_([v(1,u.IMouseService),v(2,u.IRenderService),v(3,y.IBufferService),v(4,u.ILinkProviderService)],r)},9042:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(F,n,f){var _=this&&this.__decorate||function(u,r,h,o){var c,m=arguments.length,C=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(u,r,h,o);else for(var S=u.length-1;S>=0;S--)(c=u[S])&&(C=(m<3?c(C):m>3?c(r,h,C):c(r,h))||C);return m>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(u,r){return function(h,o){r(h,o,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const l=f(511),g=f(2585);let b=n.OscLinkProvider=class{constructor(u,r,h){this._bufferService=u,this._optionsService=r,this._oscLinkService=h}provideLinks(u,r){var x;const h=this._bufferService.buffer.lines.get(u-1);if(!h)return void r(void 0);const o=[],c=this._optionsService.rawOptions.linkHandler,m=new l.CellData,C=h.getTrimmedLength();let S=-1,w=-1,p=!1;for(let L=0;L<C;L++)if(w!==-1||h.hasContent(L)){if(h.loadCell(L,m),m.hasExtendedAttrs()&&m.extended.urlId){if(w===-1){w=L,S=m.extended.urlId;continue}p=m.extended.urlId!==S}else w!==-1&&(p=!0);if(p||w!==-1&&L===C-1){const B=(x=this._oscLinkService.getLinkData(S))==null?void 0:x.uri;if(B){const T={start:{x:w+1,y:u},end:{x:L+(p||L!==C-1?0:1),y:u}};let M=!1;if(!(c!=null&&c.allowNonHttpProtocols))try{const U=new URL(B);["http:","https:"].includes(U.protocol)||(M=!0)}catch{M=!0}M||o.push({text:B,range:T,activate:(U,K)=>c?c.activate(U,K,T):y(0,K),hover:(U,K)=>{var I;return(I=c==null?void 0:c.hover)==null?void 0:I.call(c,U,K,T)},leave:(U,K)=>{var I;return(I=c==null?void 0:c.leave)==null?void 0:I.call(c,U,K,T)}})}p=!1,m.hasExtendedAttrs()&&m.extended.urlId?(w=L,S=m.extended.urlId):(w=-1,S=-1)}}r(o)}};function y(u,r){if(confirm(`Do you want to navigate to ${r}?
|
|
51
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=l.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(o){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(o)||this._charsToConsume.push(o)}_refreshRows(o,c){this._liveRegionDebouncer.refresh(o,c,this._terminal.rows)}_renderRows(o,c){const m=this._terminal.buffer,C=m.lines.length.toString();for(let S=o;S<=c;S++){const w=m.lines.get(m.ydisp+S),p=[],x=(w==null?void 0:w.translateToString(!0,void 0,void 0,p))||"",L=(m.ydisp+S+1).toString(),O=this._rowElements[S];O&&(x.length===0?(O.innerText=" ",this._rowColumns.set(O,[0,1])):(O.textContent=x,this._rowColumns.set(O,p)),O.setAttribute("aria-posinset",L),O.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(o,c){const m=o.target,C=this._rowElements[c===0?1:this._rowElements.length-2];if(m.getAttribute("aria-posinset")===(c===0?"1":`${this._terminal.buffer.lines.length}`)||o.relatedTarget!==C)return;let S,w;if(c===0?(S=m,w=this._rowElements.pop(),this._rowContainer.removeChild(w)):(S=this._rowElements.shift(),w=m,this._rowContainer.removeChild(S)),S.removeEventListener("focus",this._topBoundaryFocusListener),w.removeEventListener("focus",this._bottomBoundaryFocusListener),c===0){const p=this._createAccessibilityTreeNode();this._rowElements.unshift(p),this._rowContainer.insertAdjacentElement("afterbegin",p)}else{const p=this._createAccessibilityTreeNode();this._rowElements.push(p),this._rowContainer.appendChild(p)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(c===0?-1:1),this._rowElements[c===0?1:this._rowElements.length-2].focus(),o.preventDefault(),o.stopImmediatePropagation()}_handleSelectionChange(){var x;if(this._rowElements.length===0)return;const o=document.getSelection();if(!o)return;if(o.isCollapsed)return void(this._rowContainer.contains(o.anchorNode)&&this._terminal.clearSelection());if(!o.anchorNode||!o.focusNode)return void console.error("anchorNode and/or focusNode are null");let c={node:o.anchorNode,offset:o.anchorOffset},m={node:o.focusNode,offset:o.focusOffset};if((c.node.compareDocumentPosition(m.node)&Node.DOCUMENT_POSITION_PRECEDING||c.node===m.node&&c.offset>m.offset)&&([c,m]=[m,c]),c.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(c={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(c.node))return;const C=this._rowElements.slice(-1)[0];if(m.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(m={node:C,offset:((x=C.textContent)==null?void 0:x.length)??0}),!this._rowContainer.contains(m.node))return;const S=({node:L,offset:O})=>{const T=L instanceof Text?L.parentNode:L;let M=parseInt(T==null?void 0:T.getAttribute("aria-posinset"),10)-1;if(isNaN(M))return console.warn("row is invalid. Race condition?"),null;const U=this._rowColumns.get(T);if(!U)return console.warn("columns is null. Race condition?"),null;let K=O<U.length?U[O]:U.slice(-1)[0]+1;return K>=this._terminal.cols&&(++M,K=0),{row:M,column:K}},w=S(c),p=S(m);if(w&&p){if(w.row>p.row||w.row===p.row&&w.column>=p.column)throw new Error("invalid range");this._terminal.select(w.column,w.row,(p.row-w.row)*this._terminal.cols-w.column+p.column)}}_handleResize(o){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let c=this._rowContainer.children.length;c<this._terminal.rows;c++)this._rowElements[c]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[c]);for(;this._rowElements.length>o;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const o=this._coreBrowserService.mainDocument.createElement("div");return o.setAttribute("role","listitem"),o.tabIndex=-1,this._refreshRowDimensions(o),o}_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 o=0;o<this._terminal.rows;o++)this._refreshRowDimensions(this._rowElements[o])}}_refreshRowDimensions(o){o.style.height=`${this._renderService.dimensions.css.cell.height}px`}};n.AccessibilityManager=h=_([v(1,d.IInstantiationService),v(2,y.ICoreBrowserService),v(3,y.IRenderService)],h)},3614:(P,n)=>{function u(g){return g.replace(/\r?\n/g,"\r")}function _(g,b){return b?"\x1B[200~"+g+"\x1B[201~":g}function v(g,b,y,d){g=_(g=u(g),y.decPrivateModes.bracketedPasteMode&&d.rawOptions.ignoreBracketedPasteMode!==!0),y.triggerDataEvent(g,!0),b.value=""}function l(g,b,y){const d=y.getBoundingClientRect(),r=g.clientX-d.left-10,h=g.clientY-d.top-10;b.style.width="20px",b.style.height="20px",b.style.left=`${r}px`,b.style.top=`${h}px`,b.style.zIndex="1000",b.focus()}Object.defineProperty(n,"__esModule",{value:!0}),n.rightClickHandler=n.moveTextAreaUnderMouseCursor=n.paste=n.handlePasteEvent=n.copyHandler=n.bracketTextForPaste=n.prepareTextForTerminal=void 0,n.prepareTextForTerminal=u,n.bracketTextForPaste=_,n.copyHandler=function(g,b){g.clipboardData&&g.clipboardData.setData("text/plain",b.selectionText),g.preventDefault()},n.handlePasteEvent=function(g,b,y,d){g.stopPropagation(),g.clipboardData&&v(g.clipboardData.getData("text/plain"),b,y,d)},n.paste=v,n.moveTextAreaUnderMouseCursor=l,n.rightClickHandler=function(g,b,y,d,r){l(g,b,y),r&&d.rightClickSelect(g),b.value=d.selectionText,b.select()}},7239:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorContrastCache=void 0;const _=u(1505);n.ColorContrastCache=class{constructor(){this._color=new _.TwoKeyMap,this._css=new _.TwoKeyMap}setCss(v,l,g){this._css.set(v,l,g)}getCss(v,l){return this._css.get(v,l)}setColor(v,l,g){this._color.set(v,l,g)}getColor(v,l){return this._color.get(v,l)}clear(){this._color.clear(),this._css.clear()}}},3656:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,_,v,l){u.addEventListener(_,v,l);let g=!1;return{dispose:()=>{g||(g=!0,u.removeEventListener(_,v,l))}}}},3551:function(P,n,u){var _=this&&this.__decorate||function(h,o,c,m){var C,S=arguments.length,w=S<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,m);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,m){o(c,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Linkifier=void 0;const l=u(3656),g=u(8460),b=u(844),y=u(2585),d=u(4725);let r=n.Linkifier=class extends b.Disposable{get currentLink(){return this._currentLink}constructor(h,o,c,m,C){super(),this._element=h,this._mouseService=o,this._renderService=c,this._bufferService=m,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,b.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,b.toDisposable)((()=>{var S;this._lastMouseEvent=void 0,(S=this._activeProviderReplies)==null||S.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,l.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,l.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,l.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(h){this._lastMouseEvent=h;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);if(!o)return;this._isMouseOut=!1;const c=h.composedPath();for(let m=0;m<c.length;m++){const C=c[m];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&o.x===this._lastBufferCell.x&&o.y===this._lastBufferCell.y||(this._handleHover(o),this._lastBufferCell=o)}_handleHover(h){if(this._activeLine!==h.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(h,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,h)||(this._clearCurrentLink(),this._askForLink(h,!0))}_askForLink(h,o){var m,C;this._activeProviderReplies&&o||((m=this._activeProviderReplies)==null||m.forEach((S=>{S==null||S.forEach((w=>{w.link.dispose&&w.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=h.y);let c=!1;for(const[S,w]of this._linkProviderService.linkProviders.entries())o?(C=this._activeProviderReplies)!=null&&C.get(S)&&(c=this._checkLinkProviderResult(S,h,c)):w.provideLinks(h.y,(p=>{var L,O;if(this._isMouseOut)return;const x=p==null?void 0:p.map((T=>({link:T})));(L=this._activeProviderReplies)==null||L.set(S,x),c=this._checkLinkProviderResult(S,h,c),((O=this._activeProviderReplies)==null?void 0:O.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(h.y,this._activeProviderReplies)}))}_removeIntersectingLinks(h,o){const c=new Set;for(let m=0;m<o.size;m++){const C=o.get(m);if(C)for(let S=0;S<C.length;S++){const w=C[S],p=w.link.range.start.y<h?0:w.link.range.start.x,x=w.link.range.end.y>h?this._bufferService.cols:w.link.range.end.x;for(let L=p;L<=x;L++){if(c.has(L)){C.splice(S--,1);break}c.add(L)}}}}_checkLinkProviderResult(h,o,c){var S;if(!this._activeProviderReplies)return c;const m=this._activeProviderReplies.get(h);let C=!1;for(let w=0;w<h;w++)this._activeProviderReplies.has(w)&&!this._activeProviderReplies.get(w)||(C=!0);if(!C&&m){const w=m.find((p=>this._linkAtPosition(p.link,o)));w&&(c=!0,this._handleNewLink(w))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!c)for(let w=0;w<this._activeProviderReplies.size;w++){const p=(S=this._activeProviderReplies.get(w))==null?void 0:S.find((x=>this._linkAtPosition(x.link,o)));if(p){c=!0,this._handleNewLink(p);break}}return c}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(h){if(!this._currentLink)return;const o=this._positionFromMouseEvent(h,this._element,this._mouseService);o&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,o)&&this._currentLink.link.activate(h,this._currentLink.link.text)}_clearCurrentLink(h,o){this._currentLink&&this._lastMouseEvent&&(!h||!o||this._currentLink.link.range.start.y>=h&&this._currentLink.link.range.end.y<=o)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,b.disposeArray)(this._linkCacheDisposables))}_handleNewLink(h){if(!this._lastMouseEvent)return;const o=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);o&&this._linkAtPosition(h.link,o)&&(this._currentLink=h,this._currentLink.state={decorations:{underline:h.link.decorations===void 0||h.link.decorations.underline,pointerCursor:h.link.decorations===void 0||h.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,h.link,this._lastMouseEvent),h.link.decorations={},Object.defineProperties(h.link.decorations,{pointerCursor:{get:()=>{var c,m;return(m=(c=this._currentLink)==null?void 0:c.state)==null?void 0:m.decorations.pointerCursor},set:c=>{var m;(m=this._currentLink)!=null&&m.state&&this._currentLink.state.decorations.pointerCursor!==c&&(this._currentLink.state.decorations.pointerCursor=c,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",c))}},underline:{get:()=>{var c,m;return(m=(c=this._currentLink)==null?void 0:c.state)==null?void 0:m.decorations.underline},set:c=>{var m,C,S;(m=this._currentLink)!=null&&m.state&&((S=(C=this._currentLink)==null?void 0:C.state)==null?void 0:S.decorations.underline)!==c&&(this._currentLink.state.decorations.underline=c,this._currentLink.state.isHovered&&this._fireUnderlineEvent(h.link,c))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((c=>{if(!this._currentLink)return;const m=c.start===0?0:c.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+c.end;if(this._currentLink.link.range.start.y>=m&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(m,C),this._lastMouseEvent)){const S=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);S&&this._askForLink(S,!1)}}))))}_linkHover(h,o,c){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!0),this._currentLink.state.decorations.pointerCursor&&h.classList.add("xterm-cursor-pointer")),o.hover&&o.hover(c,o.text)}_fireUnderlineEvent(h,o){const c=h.range,m=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(c.start.x-1,c.start.y-m-1,c.end.x,c.end.y-m-1,void 0);(o?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(h,o,c){var m;(m=this._currentLink)!=null&&m.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(o,!1),this._currentLink.state.decorations.pointerCursor&&h.classList.remove("xterm-cursor-pointer")),o.leave&&o.leave(c,o.text)}_linkAtPosition(h,o){const c=h.range.start.y*this._bufferService.cols+h.range.start.x,m=h.range.end.y*this._bufferService.cols+h.range.end.x,C=o.y*this._bufferService.cols+o.x;return c<=C&&C<=m}_positionFromMouseEvent(h,o,c){const m=c.getCoords(h,o,this._bufferService.cols,this._bufferService.rows);if(m)return{x:m[0],y:m[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(h,o,c,m,C){return{x1:h,y1:o,x2:c,y2:m,cols:this._bufferService.cols,fg:C}}};n.Linkifier=r=_([v(1,d.IMouseService),v(2,d.IRenderService),v(3,y.IBufferService),v(4,d.ILinkProviderService)],r)},9042:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tooMuchOutput=n.promptLabel=void 0,n.promptLabel="Terminal input",n.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(P,n,u){var _=this&&this.__decorate||function(d,r,h,o){var c,m=arguments.length,C=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(d,r,h,o);else for(var S=d.length-1;S>=0;S--)(c=d[S])&&(C=(m<3?c(C):m>3?c(r,h,C):c(r,h))||C);return m>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(d,r){return function(h,o){r(h,o,d)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkProvider=void 0;const l=u(511),g=u(2585);let b=n.OscLinkProvider=class{constructor(d,r,h){this._bufferService=d,this._optionsService=r,this._oscLinkService=h}provideLinks(d,r){var x;const h=this._bufferService.buffer.lines.get(d-1);if(!h)return void r(void 0);const o=[],c=this._optionsService.rawOptions.linkHandler,m=new l.CellData,C=h.getTrimmedLength();let S=-1,w=-1,p=!1;for(let L=0;L<C;L++)if(w!==-1||h.hasContent(L)){if(h.loadCell(L,m),m.hasExtendedAttrs()&&m.extended.urlId){if(w===-1){w=L,S=m.extended.urlId;continue}p=m.extended.urlId!==S}else w!==-1&&(p=!0);if(p||w!==-1&&L===C-1){const O=(x=this._oscLinkService.getLinkData(S))==null?void 0:x.uri;if(O){const T={start:{x:w+1,y:d},end:{x:L+(p||L!==C-1?0:1),y:d}};let M=!1;if(!(c!=null&&c.allowNonHttpProtocols))try{const U=new URL(O);["http:","https:"].includes(U.protocol)||(M=!0)}catch{M=!0}M||o.push({text:O,range:T,activate:(U,K)=>c?c.activate(U,K,T):y(0,K),hover:(U,K)=>{var I;return(I=c==null?void 0:c.hover)==null?void 0:I.call(c,U,K,T)},leave:(U,K)=>{var I;return(I=c==null?void 0:c.leave)==null?void 0:I.call(c,U,K,T)}})}p=!1,m.hasExtendedAttrs()&&m.extended.urlId?(w=L,S=m.extended.urlId):(w=-1,S=-1)}}r(o)}};function y(d,r){if(confirm(`Do you want to navigate to ${r}?
|
|
52
52
|
|
|
53
|
-
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=b=_([v(0,g.IBufferService),v(1,g.IOptionsService),v(2,g.IOscLinkService)],b)},6193:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(f,_){this._renderCallback=f,this._coreBrowserService=_,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,_,v){this._rowCount=v,f=f!==void 0?f:0,_=_!==void 0?_: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,_):_,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),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const f of this._refreshCallbacks)f(0);this._refreshCallbacks=[]}}},3236:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const _=f(3614),v=f(3656),l=f(3551),g=f(9042),b=f(3730),y=f(1680),u=f(3107),r=f(5744),h=f(2950),o=f(1296),c=f(428),m=f(4269),C=f(5114),S=f(8934),w=f(3230),p=f(9312),x=f(4725),L=f(6731),B=f(8055),T=f(8969),M=f(8460),U=f(844),K=f(6114),I=f(8437),q=f(2584),P=f(7399),A=f(5941),H=f(9074),R=f(2585),z=f(5435),V=f(4567),J=f(779);class he extends T.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(W={}){super(W),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new U.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(R.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(J.LinkProviderService),this._instantiationService.setService(x.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(b.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((N,ne)=>this.refresh(N,ne)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((N=>this._reportWindowsOptions(N)))),this.register(this._inputHandler.onColor((N=>this._handleColorEvent(N)))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((N=>this._afterResize(N.cols,N.rows)))),this.register((0,U.toDisposable)((()=>{var N,ne;this._customKeyEventHandler=void 0,(ne=(N=this.element)==null?void 0:N.parentNode)==null||ne.removeChild(this.element)})))}_handleColorEvent(W){if(this._themeService)for(const N of W){let ne,re="";switch(N.index){case 256:ne="foreground",re="10";break;case 257:ne="background",re="11";break;case 258:ne="cursor",re="12";break;default:ne="ansi",re="4;"+N.index}switch(N.type){case 0:const _e=B.color.toColorRGB(ne==="ansi"?this._themeService.colors.ansi[N.index]:this._themeService.colors[ne]);this.coreService.triggerDataEvent(`${q.C0.ESC}]${re};${(0,A.toRgbString)(_e)}${q.C1_ESCAPED.ST}`);break;case 1:if(ne==="ansi")this._themeService.modifyColors((fe=>fe.ansi[N.index]=B.channels.toColor(...N.color)));else{const fe=ne;this._themeService.modifyColors((xe=>xe[fe]=B.channels.toColor(...N.color)))}break;case 2:this._themeService.restoreColor(N.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(W){W?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(W){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var W;return(W=this.textarea)==null?void 0:W.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.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 W=this.buffer.ybase+this.buffer.y,N=this.buffer.lines.get(W);if(!N)return;const ne=Math.min(this.buffer.x,this.cols-1),re=this._renderService.dimensions.css.cell.height,_e=N.getWidth(ne),fe=this._renderService.dimensions.css.cell.width*_e,xe=this.buffer.y*this._renderService.dimensions.css.cell.height,pe=ne*this._renderService.dimensions.css.cell.width;this.textarea.style.left=pe+"px",this.textarea.style.top=xe+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=re+"px",this.textarea.style.lineHeight=re+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(N=>{this.hasSelection()&&(0,_.copyHandler)(N,this._selectionService)})));const W=N=>(0,_.handlePasteEvent)(N,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",W)),this.register((0,v.addDisposableDomListener)(this.element,"paste",W)),K.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(N=>{N.button===2&&(0,_.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(N=>{(0,_.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(N=>{N.button===1&&(0,_.moveTextAreaUnderMouseCursor)(N,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",(W=>this._keyUp(W)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",(W=>this._keyDown(W)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",(W=>this._keyPress(W)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",(W=>this._compositionHelper.compositionupdate(W)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",(W=>this._inputEvent(W)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(W){var ne;if(!W)throw new Error("Terminal requires a parent element.");if(W.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ne=this.element)==null?void 0:ne.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=W.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"),W.appendChild(this.element);const N=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),N.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,v.addDisposableDomListener)(this.screenElement,"mousemove",(re=>this.updateCursorStyle(re)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),N.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),K.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(C.CoreBrowserService,this.textarea,W.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(x.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(re=>this._handleTextAreaFocus(re)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(x.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(m.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((re=>this._onRender.fire(re)))),this.onResize((re=>this._renderService.resize(re.cols,re.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(l.Linkifier,this.screenElement)),this.element.appendChild(N);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(y.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((re=>this.scrollLines(re.amount,re.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(p.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((re=>this.scrollLines(re.amount,re.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((re=>this._renderService.handleSelectionChanged(re.start,re.end,re.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((re=>{this.textarea.value=re,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((re=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(u.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(re=>this._selectionService.handleMouseDown(re)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(re=>this._handleScreenReaderModeOptionChange(re)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(re=>{!this._overviewRulerRenderer&&re&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const W=this,N=this.element;function ne(fe){const xe=W._mouseService.getMouseReportCoords(fe,W.screenElement);if(!xe)return!1;let pe,Ne;switch(fe.overrideType||fe.type){case"mousemove":Ne=32,fe.buttons===void 0?(pe=3,fe.button!==void 0&&(pe=fe.button<3?fe.button:3)):pe=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Ne=0,pe=fe.button<3?fe.button:3;break;case"mousedown":Ne=1,pe=fe.button<3?fe.button:3;break;case"wheel":if(W._customWheelEventHandler&&W._customWheelEventHandler(fe)===!1||W.viewport.getLinesScrolled(fe)===0)return!1;Ne=fe.deltaY<0?0:1,pe=4;break;default:return!1}return!(Ne===void 0||pe===void 0||pe>4)&&W.coreMouseService.triggerMouseEvent({col:xe.col,row:xe.row,x:xe.x,y:xe.y,button:pe,action:Ne,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const re={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:fe=>(ne(fe),fe.buttons||(this._document.removeEventListener("mouseup",re.mouseup),re.mousedrag&&this._document.removeEventListener("mousemove",re.mousedrag)),this.cancel(fe)),wheel:fe=>(ne(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&ne(fe)},mousemove:fe=>{fe.buttons||ne(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&fe?re.mousemove||(N.addEventListener("mousemove",_e.mousemove),re.mousemove=_e.mousemove):(N.removeEventListener("mousemove",re.mousemove),re.mousemove=null),16&fe?re.wheel||(N.addEventListener("wheel",_e.wheel,{passive:!1}),re.wheel=_e.wheel):(N.removeEventListener("wheel",re.wheel),re.wheel=null),2&fe?re.mouseup||(re.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",re.mouseup),re.mouseup=null),4&fe?re.mousedrag||(re.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",re.mousedrag),re.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(N,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return ne(fe),re.mouseup&&this._document.addEventListener("mouseup",re.mouseup),re.mousedrag&&this._document.addEventListener("mousemove",re.mousedrag),this.cancel(fe)}))),this.register((0,v.addDisposableDomListener)(N,"wheel",(fe=>{if(!re.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const xe=this.viewport.getLinesScrolled(fe);if(xe===0)return;const pe=q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Ne="";for(let Qe=0;Qe<Math.abs(xe);Qe++)Ne+=pe;return this.coreService.triggerDataEvent(Ne,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(N,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(N,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh(W,N){var ne;(ne=this._renderService)==null||ne.refreshRows(W,N)}updateCursorStyle(W){var N;(N=this._selectionService)!=null&&N.shouldColumnSelect(W)?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(W,N,ne=0){var re;ne===1?(super.scrollLines(W,N,ne),this.refresh(0,this.rows-1)):(re=this.viewport)==null||re.scrollLines(W)}paste(W){(0,_.paste)(W,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(W){this._customKeyEventHandler=W}attachCustomWheelEventHandler(W){this._customWheelEventHandler=W}registerLinkProvider(W){return this._linkProviderService.registerLinkProvider(W)}registerCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const N=this._characterJoinerService.register(W);return this.refresh(0,this.rows-1),N}deregisterCharacterJoiner(W){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(W)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(W){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+W)}registerDecoration(W){return this._decorationService.registerDecoration(W)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(W,N,ne){this._selectionService.setSelection(W,N,ne)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var W;(W=this._selectionService)==null||W.clearSelection()}selectAll(){var W;(W=this._selectionService)==null||W.selectAll()}selectLines(W,N){var ne;(ne=this._selectionService)==null||ne.selectLines(W,N)}_keyDown(W){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;const N=this.browser.isMac&&this.options.macOptionIsMeta&&W.altKey;if(!N&&!this._compositionHelper.keydown(W))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;N||W.key!=="Dead"&&W.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ne=(0,P.evaluateKeyboardEvent)(W,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(W),ne.type===3||ne.type===2){const re=this.rows-1;return this.scrollLines(ne.type===2?-re:re),this.cancel(W,!0)}return ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,W)||(ne.cancel&&this.cancel(W,!0),!ne.key||!!(W.key&&!W.ctrlKey&&!W.altKey&&!W.metaKey&&W.key.length===1&&W.key.charCodeAt(0)>=65&&W.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ne.key!==q.C0.ETX&&ne.key!==q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ne.key,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||W.altKey||W.ctrlKey?this.cancel(W,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(W,N){const ne=W.isMac&&!this.options.macOptionIsMeta&&N.altKey&&!N.ctrlKey&&!N.metaKey||W.isWindows&&N.altKey&&N.ctrlKey&&!N.metaKey||W.isWindows&&N.getModifierState("AltGraph");return N.type==="keypress"?ne:ne&&(!N.keyCode||N.keyCode>47)}_keyUp(W){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1||((function(N){return N.keyCode===16||N.keyCode===17||N.keyCode===18})(W)||this.focus(),this.updateCursorStyle(W),this._keyPressHandled=!1)}_keyPress(W){let N;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(W)===!1)return!1;if(this.cancel(W),W.charCode)N=W.charCode;else if(W.which===null||W.which===void 0)N=W.keyCode;else{if(W.which===0||W.charCode===0)return!1;N=W.which}return!(!N||(W.altKey||W.ctrlKey||W.metaKey)&&!this._isThirdLevelShift(this.browser,W)||(N=String.fromCharCode(N),this._onKey.fire({key:N,domEvent:W}),this._showCursor(),this.coreService.triggerDataEvent(N,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(W){if(W.data&&W.inputType==="insertText"&&(!W.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const N=W.data;return this.coreService.triggerDataEvent(N,!0),this.cancel(W),!0}return!1}resize(W,N){W!==this.cols||N!==this.rows?super.resize(W,N):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(W,N){var ne,re;(ne=this._charSizeService)==null||ne.measure(),(re=this.viewport)==null||re.syncScrollArea(!0)}clear(){var W;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 N=1;N<this.rows;N++)this.buffer.lines.push(this.buffer.getBlankLine(I.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(W=this.viewport)==null||W.reset(),this.refresh(0,this.rows-1)}}reset(){var N,ne;this.options.rows=this.rows,this.options.cols=this.cols;const W=this._customKeyEventHandler;this._setup(),super.reset(),(N=this._selectionService)==null||N.reset(),this._decorationService.reset(),(ne=this.viewport)==null||ne.reset(),this._customKeyEventHandler=W,this.refresh(0,this.rows-1)}clearTextureAtlas(){var W;(W=this._renderService)==null||W.clearTextureAtlas()}_reportFocus(){var W;(W=this.element)!=null&&W.classList.contains("focus")?this.coreService.triggerDataEvent(q.C0.ESC+"[I"):this.coreService.triggerDataEvent(q.C0.ESC+"[O")}_reportWindowsOptions(W){if(this._renderService)switch(W){case z.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const N=this._renderService.dimensions.css.canvas.width.toFixed(0),ne=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[4;${ne};${N}t`);break;case z.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const re=this._renderService.dimensions.css.cell.width.toFixed(0),_e=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[6;${_e};${re}t`)}}cancel(W,N){if(this.options.cancelEvents||N)return W.preventDefault(),W.stopPropagation(),!1}}n.Terminal=he},9924:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(f,_=1e3){this._renderCallback=f,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(f,_,v){this._rowCount=v,f=f!==void 0?f:0,_=_!==void 0?_: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,_):_;const l=Date.now();if(l-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=l,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=l-this._lastRefreshMs,b=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const f=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(f,_)}}},1680:function(F,n,f){var _=this&&this.__decorate||function(h,o,c,m){var C,S=arguments.length,w=S<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,m);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,m){o(c,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const l=f(3656),g=f(4725),b=f(8460),y=f(844),u=f(2585);let r=n.Viewport=class extends y.Disposable{constructor(h,o,c,m,C,S,w,p){super(),this._viewportElement=h,this._scrollArea=o,this._bufferService=c,this._optionsService=m,this._charSizeService=C,this._renderService=S,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 b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,l.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((x=>this._activeBuffer=x.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((x=>this._renderDimensions=x))),this._handleThemeChange(p.colors),this.register(p.onChangeColors((x=>this._handleThemeChange(x)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,o){const c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&c<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const o=this._getPixelsScrolled(h);return o!==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+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(h,o){var p;let c,m="";const C=[],S=o??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let x=h;x<S;x++){const L=w.get(x);if(!L)continue;const B=(p=w.get(x+1))==null?void 0:p.isWrapped;if(m+=L.translateToString(!B),!B||x===w.length-1){const T=document.createElement("div");T.textContent=m,C.push(T),m.length>0&&(c=T),m=""}}return{bufferElements:C,cursorElement:c}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(h,o){const c=this._optionsService.rawOptions.fastScrollModifier;return c==="alt"&&o.altKey||c==="ctrl"&&o.ctrlKey||c==="shift"&&o.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const o=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}};n.Viewport=r=_([v(2,u.IBufferService),v(3,u.IOptionsService),v(4,g.ICharSizeService),v(5,g.IRenderService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],r)},3107:function(F,n,f){var _=this&&this.__decorate||function(u,r,h,o){var c,m=arguments.length,C=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(u,r,h,o);else for(var S=u.length-1;S>=0;S--)(c=u[S])&&(C=(m<3?c(C):m>3?c(r,h,C):c(r,h))||C);return m>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(u,r){return function(h,o){r(h,o,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const l=f(4725),g=f(844),b=f(2585);let y=n.BufferDecorationRenderer=class extends g.Disposable{constructor(u,r,h,o,c){super(),this._screenElement=u,this._bufferService=r,this._coreBrowserService=h,this._decorationService=o,this._renderService=c,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(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((m=>this._removeDecoration(m)))),this.register((0,g.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 u of this._decorationService.decorations)this._renderDecoration(u);this._dimensionsChanged=!1}_renderDecoration(u){this._refreshStyle(u),this._dimensionsChanged&&this._refreshXPosition(u)}_createElement(u){var o;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((o=u==null?void 0:u.options)==null?void 0:o.layer)==="top"),r.style.width=`${Math.round((u.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(u.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(u.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=u.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(u,r),r}_refreshStyle(u){const r=u.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)u.element&&(u.element.style.display="none",u.onRenderEmitter.fire(u.element));else{let h=this._decorationElements.get(u);h||(h=this._createElement(u),u.element=h,this._decorationElements.set(u,h),this._container.appendChild(h),u.onDispose((()=>{this._decorationElements.delete(u),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",u.onRenderEmitter.fire(h)}}_refreshXPosition(u,r=u.element){if(!r)return;const h=u.options.x??0;(u.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(u){var r;(r=this._decorationElements.get(u))==null||r.remove(),this._decorationElements.delete(u),u.dispose()}};n.BufferDecorationRenderer=y=_([v(1,b.IBufferService),v(2,l.ICoreBrowserService),v(3,b.IDecorationService),v(4,l.IRenderService)],y)},5871:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorZoneStore=void 0,n.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 _ of this._zones)if(_.color===f.options.overviewRulerOptions.color&&_.position===f.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,f.marker.line))return;if(this._lineAdjacentToZone(_,f.marker.line,f.options.overviewRulerOptions.position))return void this._addLineToZone(_,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,_){return _>=f.startBufferLine&&_<=f.endBufferLine}_lineAdjacentToZone(f,_,v){return _>=f.startBufferLine-this._linePadding[v||"full"]&&_<=f.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(f,_){f.startBufferLine=Math.min(f.startBufferLine,_),f.endBufferLine=Math.max(f.endBufferLine,_)}}},5744:function(F,n,f){var _=this&&this.__decorate||function(c,m,C,S){var w,p=arguments.length,x=p<3?m:S===null?S=Object.getOwnPropertyDescriptor(m,C):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,m,C,S);else for(var L=c.length-1;L>=0;L--)(w=c[L])&&(x=(p<3?w(x):p>3?w(m,C,x):w(m,C))||x);return p>3&&x&&Object.defineProperty(m,C,x),x},v=this&&this.__param||function(c,m){return function(C,S){m(C,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const l=f(5871),g=f(4725),b=f(844),y=f(2585),u={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let o=n.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(c,m,C,S,w,p,x){var B;super(),this._viewportElement=c,this._screenElement=m,this._bufferService=C,this._decorationService=S,this._renderService=w,this._optionsService=p,this._coreBrowserService=x,this._colorZoneStore=new l.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(),(B=this._viewportElement.parentElement)==null||B.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,b.toDisposable)((()=>{var T;(T=this._canvas)==null||T.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 c=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=c,r.center=m,r.right=c,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){u.full=Math.round(2*this._coreBrowserService.dpr);const c=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(c,12),6)*this._coreBrowserService.dpr);u.left=m,u.center=m,u.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*u.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*u.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*u.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*u.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 m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const c=this._colorZoneStore.zones;for(const m of c)m.position!=="full"&&this._renderColorZone(m);for(const m of c)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(h[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-u[c.position||"full"]/2),r[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+u[c.position||"full"]))}_queueRefresh(c,m){this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=o=_([v(2,y.IBufferService),v(3,y.IDecorationService),v(4,g.IRenderService),v(5,y.IOptionsService),v(6,g.ICoreBrowserService)],o)},2950:function(F,n,f){var _=this&&this.__decorate||function(u,r,h,o){var c,m=arguments.length,C=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(u,r,h,o);else for(var S=u.length-1;S>=0;S--)(c=u[S])&&(C=(m<3?c(C):m>3?c(r,h,C):c(r,h))||C);return m>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(u,r){return function(h,o){r(h,o,u)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const l=f(4725),g=f(2585),b=f(2584);let y=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(u,r,h,o,c,m){this._textarea=u,this._compositionView=r,this._bufferService=h,this._optionsService=o,this._coreService=c,this._renderService=m,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(u){this._compositionView.textContent=u.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(u){if(this._isComposing||this._isSendingComposition){if(u.keyCode===229||u.keyCode===16||u.keyCode===17||u.keyCode===18)return!1;this._finalizeComposition(!1)}return u.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(u){if(this._compositionView.classList.remove("active"),this._isComposing=!1,u){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const u=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(u,"");this._dataAlreadySent=h,r.length>u.length?this._coreService.triggerDataEvent(h,!0):r.length<u.length?this._coreService.triggerDataEvent(`${b.C0.DEL}`,!0):r.length===u.length&&r!==u&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(u){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,c=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const m=this._compositionView.getBoundingClientRect();this._textarea.style.left=c+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(m.width,1)+"px",this._textarea.style.height=Math.max(m.height,1)+"px",this._textarea.style.lineHeight=m.height+"px"}u||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=y=_([v(2,g.IBufferService),v(3,g.IOptionsService),v(4,g.ICoreService),v(5,l.IRenderService)],y)},9806:(F,n)=>{function f(_,v,l){const g=l.getBoundingClientRect(),b=_.getComputedStyle(l),y=parseInt(b.getPropertyValue("padding-left")),u=parseInt(b.getPropertyValue("padding-top"));return[v.clientX-g.left-y,v.clientY-g.top-u]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=f,n.getCoords=function(_,v,l,g,b,y,u,r,h){if(!y)return;const o=f(_,v,l);return o?(o[0]=Math.ceil((o[0]+(h?u/2:0))/u),o[1]=Math.ceil(o[1]/r),o[0]=Math.min(Math.max(o[0],1),g+(h?1:0)),o[1]=Math.min(Math.max(o[1],1),b),o):void 0}},9504:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const _=f(2584);function v(r,h,o,c){const m=r-l(r,o),C=h-l(h,o),S=Math.abs(m-C)-(function(w,p,x){let L=0;const B=w-l(w,x),T=p-l(p,x);for(let M=0;M<Math.abs(B-T);M++){const U=g(w,p)==="A"?-1:1,K=x.buffer.lines.get(B+U*M);K!=null&&K.isWrapped&&L++}return L})(r,h,o);return u(S,y(g(r,h),c))}function l(r,h){let o=0,c=h.buffer.lines.get(r),m=c==null?void 0:c.isWrapped;for(;m&&r>=0&&r<h.rows;)o++,c=h.buffer.lines.get(--r),m=c==null?void 0:c.isWrapped;return o}function g(r,h){return r>h?"A":"B"}function b(r,h,o,c,m,C){let S=r,w=h,p="";for(;S!==o||w!==c;)S+=m?1:-1,m&&S>C.cols-1?(p+=C.buffer.translateBufferLineToString(w,!1,r,S),S=0,r=0,w++):!m&&S<0&&(p+=C.buffer.translateBufferLineToString(w,!1,0,r+1),S=C.cols-1,r=S,w--);return p+C.buffer.translateBufferLineToString(w,!1,r,S)}function y(r,h){const o=h?"O":"[";return _.C0.ESC+o+r}function u(r,h){r=Math.floor(r);let o="";for(let c=0;c<r;c++)o+=h;return o}n.moveToCellSequence=function(r,h,o,c){const m=o.buffer.x,C=o.buffer.y;if(!o.buffer.hasScrollback)return(function(p,x,L,B,T,M){return v(x,B,T,M).length===0?"":u(b(p,x,p,x-l(x,T),!1,T).length,y("D",M))})(m,C,0,h,o,c)+v(C,h,o,c)+(function(p,x,L,B,T,M){let U;U=v(x,B,T,M).length>0?B-l(B,T):x;const K=B,I=(function(q,P,A,H,R,z){let V;return V=v(A,H,R,z).length>0?H-l(H,R):P,q<A&&V<=H||q>=A&&V<H?"C":"D"})(p,x,L,B,T,M);return u(b(p,U,L,K,I==="C",T).length,y(I,M))})(m,C,r,h,o,c);let S;if(C===h)return S=m>r?"D":"C",u(Math.abs(m-r),y(S,c));S=C>h?"D":"C";const w=Math.abs(C-h);return u((function(p,x){return x.cols-p})(C>h?r:m,o)+(w-1)*o.cols+1+((C>h?m:r)-1),y(S,c))}},1296:function(F,n,f){var _=this&&this.__decorate||function(M,U,K,I){var q,P=arguments.length,A=P<3?U:I===null?I=Object.getOwnPropertyDescriptor(U,K):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(M,U,K,I);else for(var H=M.length-1;H>=0;H--)(q=M[H])&&(A=(P<3?q(A):P>3?q(U,K,A):q(U,K))||A);return P>3&&A&&Object.defineProperty(U,K,A),A},v=this&&this.__param||function(M,U){return function(K,I){U(K,I,M)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const l=f(3787),g=f(2550),b=f(2223),y=f(6171),u=f(6052),r=f(4725),h=f(8055),o=f(8460),c=f(844),m=f(2585),C="xterm-dom-renderer-owner-",S="xterm-rows",w="xterm-fg-",p="xterm-bg-",x="xterm-focus",L="xterm-selection";let B=1,T=n.DomRenderer=class extends c.Disposable{constructor(M,U,K,I,q,P,A,H,R,z,V,J,he){super(),this._terminal=M,this._document=U,this._element=K,this._screenElement=I,this._viewportElement=q,this._helperContainer=P,this._linkifier2=A,this._charSizeService=R,this._optionsService=z,this._bufferService=V,this._coreBrowserService=J,this._themeService=he,this._terminalClass=B++,this._rowElements=[],this._selectionRenderModel=(0,u.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),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(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,y.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(l.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,c.toDisposable)((()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.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 M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),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/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),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 K of this._rowElements)K.style.width=`${this.dimensions.css.canvas.width}px`,K.style.height=`${this.dimensions.css.cell.height}px`,K.style.lineHeight=`${this.dimensions.css.cell.height}px`,K.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const U=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,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(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${S} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${S} .xterm-dim { color: ${h.color.multiplyOpacity(M.foreground,.5).css};}`,U+=`${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 K=`blink_underline_${this._terminalClass}`,I=`blink_bar_${this._terminalClass}`,q=`blink_block_${this._terminalClass}`;U+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,U+=`@keyframes ${I} { 50% { box-shadow: none; }}`,U+=`@keyframes ${q} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,U+=`${this._terminalSelector} .${S}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${S}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${S}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[P,A]of M.ansi.entries())U+=`${this._terminalSelector} .${w}${P} { color: ${A.css}; }${this._terminalSelector} .${w}${P}.xterm-dim { color: ${h.color.multiplyOpacity(A,.5).css}; }${this._terminalSelector} .${p}${P} { background-color: ${A.css}; }`;U+=`${this._terminalSelector} .${w}${b.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(M.background).css}; }${this._terminalSelector} .${w}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${p}${b.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,U){for(let K=this._rowElements.length;K<=U;K++){const I=this._document.createElement("div");this._rowContainer.appendChild(I),this._rowElements.push(I)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,U){this._refreshRowElements(M,U),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(x),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(x),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(M,U,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,U,K),this.renderRows(0,this._bufferService.rows-1),!M||!U)return;this._selectionRenderModel.update(this._terminal,M,U,K);const I=this._selectionRenderModel.viewportStartRow,q=this._selectionRenderModel.viewportEndRow,P=this._selectionRenderModel.viewportCappedStartRow,A=this._selectionRenderModel.viewportCappedEndRow;if(P>=this._bufferService.rows||A<0)return;const H=this._document.createDocumentFragment();if(K){const R=M[0]>U[0];H.appendChild(this._createSelectionElement(P,R?U[0]:M[0],R?M[0]:U[0],A-P+1))}else{const R=I===P?M[0]:0,z=P===q?U[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(P,R,z));const V=A-P-1;if(H.appendChild(this._createSelectionElement(P+1,0,this._bufferService.cols,V)),P!==A){const J=q===A?U[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(A,0,J))}}this._selectionContainer.appendChild(H)}_createSelectionElement(M,U,K,I=1){const q=this._document.createElement("div"),P=U*this.dimensions.css.cell.width;let A=this.dimensions.css.cell.width*(K-U);return P+A>this.dimensions.css.canvas.width&&(A=this.dimensions.css.canvas.width-P),q.style.height=I*this.dimensions.css.cell.height+"px",q.style.top=M*this.dimensions.css.cell.height+"px",q.style.left=`${P}px`,q.style.width=`${A}px`,q}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 M of this._rowElements)M.replaceChildren()}renderRows(M,U){const K=this._bufferService.buffer,I=K.ybase+K.y,q=Math.min(K.x,this._bufferService.cols-1),P=this._optionsService.rawOptions.cursorBlink,A=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let R=M;R<=U;R++){const z=R+K.ydisp,V=this._rowElements[R],J=K.lines.get(z);if(!V||!J)break;V.replaceChildren(...this._rowFactory.createRow(J,z,z===I,A,H,q,P,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,U,K,I,q,P){K<0&&(M=0),I<0&&(U=0);const A=this._bufferService.rows-1;K=Math.max(Math.min(K,A),0),I=Math.max(Math.min(I,A),0),q=Math.min(q,this._bufferService.cols);const H=this._bufferService.buffer,R=H.ybase+H.y,z=Math.min(H.x,q-1),V=this._optionsService.rawOptions.cursorBlink,J=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=K;ue<=I;++ue){const W=ue+H.ydisp,N=this._rowElements[ue],ne=H.lines.get(W);if(!N||!ne)break;N.replaceChildren(...this._rowFactory.createRow(ne,W,W===R,J,he,z,V,this.dimensions.css.cell.width,this._widthCache,P?ue===K?M:0:-1,P?(ue===I?U:q)-1:-1))}}};n.DomRenderer=T=_([v(7,m.IInstantiationService),v(8,r.ICharSizeService),v(9,m.IOptionsService),v(10,m.IBufferService),v(11,r.ICoreBrowserService),v(12,r.IThemeService)],T)},3787:function(F,n,f){var _=this&&this.__decorate||function(S,w,p,x){var L,B=arguments.length,T=B<3?w:x===null?x=Object.getOwnPropertyDescriptor(w,p):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,w,p,x);else for(var M=S.length-1;M>=0;M--)(L=S[M])&&(T=(B<3?L(T):B>3?L(w,p,T):L(w,p))||T);return B>3&&T&&Object.defineProperty(w,p,T),T},v=this&&this.__param||function(S,w){return function(p,x){w(p,x,S)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const l=f(2223),g=f(643),b=f(511),y=f(2585),u=f(8055),r=f(4725),h=f(4269),o=f(6171),c=f(3734);let m=n.DomRendererRowFactory=class{constructor(S,w,p,x,L,B,T){this._document=S,this._characterJoinerService=w,this._optionsService=p,this._coreBrowserService=x,this._coreService=L,this._decorationService=B,this._themeService=T,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,w,p){this._selectionStart=S,this._selectionEnd=w,this._columnSelectMode=p}createRow(S,w,p,x,L,B,T,M,U,K,I){const q=[],P=this._characterJoinerService.getJoinedCharacters(w),A=this._themeService.colors;let H,R=S.getNoBgTrimmedLength();p&&R<B+1&&(R=B+1);let z=0,V="",J=0,he=0,ue=0,W=!1,N=0,ne=!1,re=0;const _e=[],fe=K!==-1&&I!==-1;for(let xe=0;xe<R;xe++){S.loadCell(xe,this._workCell);let pe=this._workCell.getWidth();if(pe===0)continue;let Ne=!1,Qe=xe,be=this._workCell;if(P.length>0&&xe===P[0][0]){Ne=!0;const Re=P.shift();be=new h.JoinedCellData(this._workCell,S.translateToString(!0,Re[0],Re[1]),Re[1]-Re[0]),Qe=Re[1]-1,pe=be.getWidth()}const Bt=this._isCellInSelection(xe,w),si=p&&xe===B,Be=fe&&xe>=K&&xe<=I;let Ae=!1;this._decorationService.forEachDecorationAtCell(xe,w,void 0,(Re=>{Ae=!0}));let De=be.getChars()||g.WHITESPACE_CELL_CHAR;if(De===" "&&(be.isUnderline()||be.isOverline())&&(De=" "),re=pe*M-U.get(De,be.isBold(),be.isItalic()),H){if(z&&(Bt&&ne||!Bt&&!ne&&be.bg===J)&&(Bt&&ne&&A.selectionForeground||be.fg===he)&&be.extended.ext===ue&&Be===W&&re===N&&!si&&!Ne&&!Ae){be.isInvisible()?V+=g.WHITESPACE_CELL_CHAR:V+=De,z++;continue}z&&(H.textContent=V),H=this._document.createElement("span"),z=0,V=""}else H=this._document.createElement("span");if(J=be.bg,he=be.fg,ue=be.extended.ext,W=Be,N=re,ne=Bt,Ne&&B>=xe&&B<=Qe&&(B=xe),!this._coreService.isCursorHidden&&si&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)T&&_e.push("xterm-cursor-blink"),_e.push(x==="bar"?"xterm-cursor-bar":x==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(be.isBold()&&_e.push("xterm-bold"),be.isItalic()&&_e.push("xterm-italic"),be.isDim()&&_e.push("xterm-dim"),V=be.isInvisible()?g.WHITESPACE_CELL_CHAR:be.getChars()||g.WHITESPACE_CELL_CHAR,be.isUnderline()&&(_e.push(`xterm-underline-${be.extended.underlineStyle}`),V===" "&&(V=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${c.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let Re=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&Re<8&&(Re+=8),H.style.textDecorationColor=A.ansi[Re].css}be.isOverline()&&(_e.push("xterm-overline"),V===" "&&(V=" ")),be.isStrikethrough()&&_e.push("xterm-strikethrough"),Be&&(H.style.textDecoration="underline");let ve=be.getFgColor(),Ce=be.getFgColorMode(),Ze=be.getBgColor(),Fe=be.getBgColorMode();const Ft=!!be.isInverse();if(Ft){const Re=ve;ve=Ze,Ze=Re;const Jt=Ce;Ce=Fe,Fe=Jt}let ht,wt,et,qe=!1;switch(this._decorationService.forEachDecorationAtCell(xe,w,void 0,(Re=>{Re.options.layer!=="top"&&qe||(Re.backgroundColorRGB&&(Fe=50331648,Ze=Re.backgroundColorRGB.rgba>>8&16777215,ht=Re.backgroundColorRGB),Re.foregroundColorRGB&&(Ce=50331648,ve=Re.foregroundColorRGB.rgba>>8&16777215,wt=Re.foregroundColorRGB),qe=Re.options.layer==="top")})),!qe&&Bt&&(ht=this._coreBrowserService.isFocused?A.selectionBackgroundOpaque:A.selectionInactiveBackgroundOpaque,Ze=ht.rgba>>8&16777215,Fe=50331648,qe=!0,A.selectionForeground&&(Ce=50331648,ve=A.selectionForeground.rgba>>8&16777215,wt=A.selectionForeground)),qe&&_e.push("xterm-decoration-top"),Fe){case 16777216:case 33554432:et=A.ansi[Ze],_e.push(`xterm-bg-${Ze}`);break;case 50331648:et=u.channels.toColor(Ze>>16,Ze>>8&255,255&Ze),this._addStyle(H,`background-color:#${C((Ze>>>0).toString(16),"0",6)}`);break;default:Ft?(et=A.foreground,_e.push(`xterm-bg-${l.INVERTED_DEFAULT_COLOR}`)):et=A.background}switch(ht||be.isDim()&&(ht=u.color.multiplyOpacity(et,.5)),Ce){case 16777216:case 33554432:be.isBold()&&ve<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ve+=8),this._applyMinimumContrast(H,et,A.ansi[ve],be,ht,void 0)||_e.push(`xterm-fg-${ve}`);break;case 50331648:const Re=u.channels.toColor(ve>>16&255,ve>>8&255,255&ve);this._applyMinimumContrast(H,et,Re,be,ht,wt)||this._addStyle(H,`color:#${C(ve.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,et,A.foreground,be,ht,wt)||Ft&&_e.push(`xterm-fg-${l.INVERTED_DEFAULT_COLOR}`)}_e.length&&(H.className=_e.join(" "),_e.length=0),si||Ne||Ae?H.textContent=V:z++,re!==this.defaultSpacing&&(H.style.letterSpacing=`${re}px`),q.push(H),xe=Qe}return H&&z&&(H.textContent=V),q}_applyMinimumContrast(S,w,p,x,L,B){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(x.getCode()))return!1;const T=this._getContrastCache(x);let M;if(L||B||(M=T.getColor(w.rgba,p.rgba)),M===void 0){const U=this._optionsService.rawOptions.minimumContrastRatio/(x.isDim()?2:1);M=u.color.ensureContrastRatio(L||w,B||p,U),T.setColor((L||w).rgba,(B||p).rgba,M??null)}return!!M&&(this._addStyle(S,`color:${M.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,w){S.setAttribute("style",`${S.getAttribute("style")||""}${w};`)}_isCellInSelection(S,w){const p=this._selectionStart,x=this._selectionEnd;return!(!p||!x)&&(this._columnSelectMode?p[0]<=x[0]?S>=p[0]&&w>=p[1]&&S<x[0]&&w<=x[1]:S<p[0]&&w>=p[1]&&S>=x[0]&&w<=x[1]:w>p[1]&&w<x[1]||p[1]===x[1]&&w===p[1]&&S>=p[0]&&S<x[0]||p[1]<x[1]&&w===x[1]&&S<x[0]||p[1]<x[1]&&w===p[1]&&S>=p[0])}};function C(S,w,p){for(;S.length<p;)S=w+S;return S}n.DomRendererRowFactory=m=_([v(1,r.ICharacterJoinerService),v(2,y.IOptionsService),v(3,r.ICoreBrowserService),v(4,y.ICoreService),v(5,y.IDecorationService),v(6,r.IThemeService)],m)},2550:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(f,_){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=f.createElement("div"),this._container.classList.add("xterm-width-cache-measure-container"),this._container.setAttribute("aria-hidden","true"),this._container.style.whiteSpace="pre",this._container.style.fontKerning="none";const v=f.createElement("span");v.classList.add("xterm-char-measure-element");const l=f.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontWeight="bold";const g=f.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const b=f.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[v,l,g,b],this._container.appendChild(v),this._container.appendChild(l),this._container.appendChild(g),this._container.appendChild(b),_.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,_,v,l){f===this._font&&_===this._fontSize&&v===this._weight&&l===this._weightBold||(this._font=f,this._fontSize=_,this._weight=v,this._weightBold=l,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${l}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${l}`,this.clear())}get(f,_,v){let l=0;if(!_&&!v&&f.length===1&&(l=f.charCodeAt(0))<256){if(this._flat[l]!==-9999)return this._flat[l];const y=this._measure(f,0);return y>0&&(this._flat[l]=y),y}let g=f;_&&(g+="B"),v&&(g+="I");let b=this._holey.get(g);if(b===void 0){let y=0;_&&(y|=1),v&&(y|=2),b=this._measure(f,y),b>0&&this._holey.set(g,b)}return b}_measure(f,_){const v=this._measureElements[_];return v.textContent=f.repeat(32),v.offsetWidth/32}}},2223:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const _=f(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:(F,n)=>{function f(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=f,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=_,n.allowRescaling=function(v,l,g,b){return l===1&&g>Math.ceil(1.5*b)&&v!==void 0&&v>255&&!_(v)&&!f(v)&&!(function(y){return 57344<=y&&y<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return f(v)||(function(l){return 9472<=l&&l<=9631})(v)},n.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}}}},n.computeNextVariantOffset=function(v,l,g=0){return(v-(2*Math.round(l)-g))%(2*Math.round(l))}},6052:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.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(v,l,g,b=!1){if(this.selectionStart=l,this.selectionEnd=g,!l||!g||l[0]===g[0]&&l[1]===g[1])return void this.clear();const y=v.buffers.active.ydisp,u=l[1]-y,r=g[1]-y,h=Math.max(u,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=u,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=g[0])}isCellSelected(v,l,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&g>=this.viewportCappedStartRow&&l<this.endCol&&g<=this.viewportCappedEndRow:l<this.startCol&&g>=this.viewportCappedStartRow&&l>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol)}}n.createSelectionRenderModel=function(){return new f}},456:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.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,_=this.selectionEnd;return!(!f||!_)&&(f[1]>_[1]||f[1]===_[1]&&f[0]>_[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(F,n,f){var _=this&&this.__decorate||function(o,c,m,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,m,C);else for(var x=o.length-1;x>=0;x--)(S=o[x])&&(p=(w<3?S(p):w>3?S(c,m,p):S(c,m))||p);return w>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(o,c){return function(m,C){c(m,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const l=f(2585),g=f(8460),b=f(844);let y=n.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,c,m){super(),this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(o,c,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};n.CharSizeService=y=_([v(2,l.IOptionsService)],y);class u extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(c,m){c!==void 0&&c>0&&m!==void 0&&m>0&&(this._result.width=c,this._result.height=m)}}class r extends u{constructor(c,m,C){super(),this._document=c,this._parentElement=m,this._optionsService=C,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class h extends u{constructor(c){super(),this._optionsService=c,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const m=this._ctx.measureText("W");if(!("width"in m&&"fontBoundingBoxAscent"in m&&"fontBoundingBoxDescent"in m))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const c=this._ctx.measureText("W");return this._validateAndSet(c.width,c.fontBoundingBoxAscent+c.fontBoundingBoxDescent),this._result}}},4269:function(F,n,f){var _=this&&this.__decorate||function(h,o,c,m){var C,S=arguments.length,w=S<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,m);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,m){o(c,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const l=f(3734),g=f(643),b=f(511),y=f(2585);class u extends l.AttributeData{constructor(o,c,m){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=c,this._width=m}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=u;let r=n.CharacterJoinerService=class hf{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(o){const c={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(c),c.id}deregister(o){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===o)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(o);if(!c||c.length===0)return[];const m=[],C=c.translateToString(!0);let S=0,w=0,p=0,x=c.getFg(0),L=c.getBg(0);for(let B=0;B<c.getTrimmedLength();B++)if(c.loadCell(B,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==x||this._workCell.bg!==L){if(B-S>1){const T=this._getJoinedRanges(C,p,w,c,S);for(let M=0;M<T.length;M++)m.push(T[M])}S=B,p=w,x=this._workCell.fg,L=this._workCell.bg}w+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const B=this._getJoinedRanges(C,p,w,c,S);for(let T=0;T<B.length;T++)m.push(B[T])}return m}_getJoinedRanges(o,c,m,C,S){const w=o.substring(c,m);let p=[];try{p=this._characterJoiners[0].handler(w)}catch(x){console.error(x)}for(let x=1;x<this._characterJoiners.length;x++)try{const L=this._characterJoiners[x].handler(w);for(let B=0;B<L.length;B++)hf._mergeRanges(p,L[B])}catch(L){console.error(L)}return this._stringRangesToCellRanges(p,C,S),p}_stringRangesToCellRanges(o,c,m){let C=0,S=!1,w=0,p=o[C];if(p){for(let x=m;x<this._bufferService.cols;x++){const L=c.getWidth(x),B=c.getString(x).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!S&&p[0]<=w&&(p[0]=x,S=!0),p[1]<=w){if(p[1]=x,p=o[++C],!p)break;p[0]<=w?(p[0]=x,S=!0):S=!1}w+=B}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(o,c){let m=!1;for(let C=0;C<o.length;C++){const S=o[C];if(m){if(c[1]<=S[0])return o[C-1][1]=c[1],o;if(c[1]<=S[1])return o[C-1][1]=Math.max(c[1],S[1]),o.splice(C,1),o;o.splice(C,1),C--}else{if(c[1]<=S[0])return o.splice(C,0,c),o;if(c[1]<=S[1])return S[0]=Math.min(c[0],S[0]),o;c[0]<S[1]&&(S[0]=Math.min(c[0],S[0]),m=!0)}}return m?o[o.length-1][1]=c[1]:o.push(c),o}};n.CharacterJoinerService=r=_([v(0,y.IBufferService)],r)},5114:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const _=f(844),v=f(8460),l=f(3656);class g extends _.Disposable{constructor(u,r,h){super(),this._textarea=u,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new b(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,v.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(u){this._window!==u&&(this._window=u,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}}n.CoreBrowserService=g;class b extends _.Disposable{constructor(u){super(),this._parentWindow=u,this._windowResizeListener=this.register(new _.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,_.toDisposable)((()=>this.clearListener())))}setWindow(u){this._parentWindow=u,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,l.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var u;this._outerListener&&((u=this._resolutionMediaMatchList)==null||u.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:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const _=f(844);class v extends _.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,_.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const b=this.linkProviders.indexOf(g);b!==-1&&this.linkProviders.splice(b,1)}}}}n.LinkProviderService=v},8934:function(F,n,f){var _=this&&this.__decorate||function(y,u,r,h){var o,c=arguments.length,m=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(y,u,r,h);else for(var C=y.length-1;C>=0;C--)(o=y[C])&&(m=(c<3?o(m):c>3?o(u,r,m):o(u,r))||m);return c>3&&m&&Object.defineProperty(u,r,m),m},v=this&&this.__param||function(y,u){return function(r,h){u(r,h,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const l=f(4725),g=f(9806);let b=n.MouseService=class{constructor(y,u){this._renderService=y,this._charSizeService=u}getCoords(y,u,r,h,o){return(0,g.getCoords)(window,y,u,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(y,u){const r=(0,g.getCoordsRelativeToElement)(window,y,u);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};n.MouseService=b=_([v(0,l.IRenderService),v(1,l.ICharSizeService)],b)},3230:function(F,n,f){var _=this&&this.__decorate||function(o,c,m,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,m,C);else for(var x=o.length-1;x>=0;x--)(S=o[x])&&(p=(w<3?S(p):w>3?S(c,m,p):S(c,m))||p);return w>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(o,c){return function(m,C){c(m,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const l=f(6193),g=f(4725),b=f(8460),y=f(844),u=f(7226),r=f(2585);let h=n.RenderService=class extends y.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,c,m,C,S,w,p,x){super(),this._rowCount=o,this._charSizeService=C,this._renderer=this.register(new y.MutableDisposable),this._pausedResizeTask=new u.DebouncedIdleTask,this._observerDisposable=this.register(new y.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new l.RenderDebouncer(((L,B)=>this._renderRows(L,B)),p),this.register(this._renderDebouncer),this.register(p.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(m.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(S.onDecorationRegistered((()=>this._fullRefresh()))),this.register(S.onDecorationRemoved((()=>this._fullRefresh()))),this.register(m.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(m.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(x.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(p.window,c),this.register(p.onWindowChange((L=>this._registerIntersectionObserver(L,c))))}_registerIntersectionObserver(o,c){if("IntersectionObserver"in o){const m=new o.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});m.observe(c),this._observerDisposable.value=(0,y.toDisposable)((()=>m.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,c,m=!1){this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,c,this._rowCount))}_renderRows(o,c){this._renderer.value&&(o=Math.min(o,this._rowCount-1),c=Math.min(c,this._rowCount-1),this._renderer.value.renderRows(o,c),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:c}),this._onRender.fire({start:o,end:c}),this._isNextRenderRedrawOnly=!0)}resize(o,c){this._rowCount=c,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((c=>this.refreshRows(c.start,c.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,c;this._renderer.value&&((c=(o=this._renderer.value).clearTextureAtlas)==null||c.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,c){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var m;return(m=this._renderer.value)==null?void 0:m.handleResize(o,c)})):this._renderer.value.handleResize(o,c),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,c,m){var C;this._selectionState.start=o,this._selectionState.end=c,this._selectionState.columnSelectMode=m,(C=this._renderer.value)==null||C.handleSelectionChanged(o,c,m)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=h=_([v(2,r.IOptionsService),v(3,g.ICharSizeService),v(4,r.IDecorationService),v(5,r.IBufferService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],h)},9312:function(F,n,f){var _=this&&this.__decorate||function(p,x,L,B){var T,M=arguments.length,U=M<3?x:B===null?B=Object.getOwnPropertyDescriptor(x,L):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(p,x,L,B);else for(var K=p.length-1;K>=0;K--)(T=p[K])&&(U=(M<3?T(U):M>3?T(x,L,U):T(x,L))||U);return M>3&&U&&Object.defineProperty(x,L,U),U},v=this&&this.__param||function(p,x){return function(L,B){x(L,B,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const l=f(9806),g=f(9504),b=f(456),y=f(4725),u=f(8460),r=f(844),h=f(6114),o=f(4841),c=f(511),m=f(2585),C=" ",S=new RegExp(C,"g");let w=n.SelectionService=class extends r.Disposable{constructor(p,x,L,B,T,M,U,K,I){super(),this._element=p,this._screenElement=x,this._linkifier=L,this._bufferService=B,this._coreService=T,this._mouseService=M,this._optionsService=U,this._renderService=K,this._coreBrowserService=I,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new c.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new u.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new u.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new u.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new u.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=q=>this._handleMouseMove(q),this._mouseUpListener=q=>this._handleMouseUp(q),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((q=>this._handleTrim(q))),this.register(this._bufferService.buffers.onBufferActivate((q=>this._handleBufferActivate(q)))),this.enable(),this._model=new b.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.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 p=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!p||!x||p[0]===x[0]&&p[1]===x[1])}get selectionText(){const p=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!p||!x)return"";const L=this._bufferService.buffer,B=[];if(this._activeSelectionMode===3){if(p[0]===x[0])return"";const T=p[0]<x[0]?p[0]:x[0],M=p[0]<x[0]?x[0]:p[0];for(let U=p[1];U<=x[1];U++){const K=L.translateBufferLineToString(U,!0,T,M);B.push(K)}}else{const T=p[1]===x[1]?x[0]:void 0;B.push(L.translateBufferLineToString(p[1],!0,p[0],T));for(let M=p[1]+1;M<=x[1]-1;M++){const U=L.lines.get(M),K=L.translateBufferLineToString(M,!0);U!=null&&U.isWrapped?B[B.length-1]+=K:B.push(K)}if(p[1]!==x[1]){const M=L.lines.get(x[1]),U=L.translateBufferLineToString(x[1],!0,0,x[0]);M&&M.isWrapped?B[B.length-1]+=U:B.push(U)}}return B.map((T=>T.replace(S," "))).join(h.isWindows?`\r
|
|
53
|
+
WARNING: This link could potentially be dangerous`)){const h=window.open();if(h){try{h.opener=null}catch{}h.location.href=r}else console.warn("Opening link blocked as opener could not be cleared")}}n.OscLinkProvider=b=_([v(0,g.IBufferService),v(1,g.IOptionsService),v(2,g.IOscLinkService)],b)},6193:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderDebouncer=void 0,n.RenderDebouncer=class{constructor(u,_){this._renderCallback=u,this._coreBrowserService=_,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(u){return this._refreshCallbacks.push(u),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._innerRefresh()))),this._animationFrame}refresh(u,_,v){this._rowCount=v,u=u!==void 0?u:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_,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 u=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,_),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const u of this._refreshCallbacks)u(0);this._refreshCallbacks=[]}}},3236:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Terminal=void 0;const _=u(3614),v=u(3656),l=u(3551),g=u(9042),b=u(3730),y=u(1680),d=u(3107),r=u(5744),h=u(2950),o=u(1296),c=u(428),m=u(4269),C=u(5114),S=u(8934),w=u(3230),p=u(9312),x=u(4725),L=u(6731),O=u(8055),T=u(8969),M=u(8460),U=u(844),K=u(6114),I=u(8437),q=u(2584),F=u(7399),R=u(5941),H=u(9074),D=u(2585),z=u(5435),V=u(4567),J=u(779);class he extends T.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($={}){super($),this.browser=K,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new U.MutableDisposable),this._onCursorMove=this.register(new M.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new M.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new M.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new M.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new M.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new M.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new M.EventEmitter),this._onBlur=this.register(new M.EventEmitter),this._onA11yCharEmitter=this.register(new M.EventEmitter),this._onA11yTabEmitter=this.register(new M.EventEmitter),this._onWillOpen=this.register(new M.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(H.DecorationService),this._instantiationService.setService(D.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(J.LinkProviderService),this._instantiationService.setService(x.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(b.OscLinkProvider)),this.register(this._inputHandler.onRequestBell((()=>this._onBell.fire()))),this.register(this._inputHandler.onRequestRefreshRows(((N,ne)=>this.refresh(N,ne)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((N=>this._reportWindowsOptions(N)))),this.register(this._inputHandler.onColor((N=>this._handleColorEvent(N)))),this.register((0,M.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,M.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,M.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((N=>this._afterResize(N.cols,N.rows)))),this.register((0,U.toDisposable)((()=>{var N,ne;this._customKeyEventHandler=void 0,(ne=(N=this.element)==null?void 0:N.parentNode)==null||ne.removeChild(this.element)})))}_handleColorEvent($){if(this._themeService)for(const N of $){let ne,re="";switch(N.index){case 256:ne="foreground",re="10";break;case 257:ne="background",re="11";break;case 258:ne="cursor",re="12";break;default:ne="ansi",re="4;"+N.index}switch(N.type){case 0:const _e=O.color.toColorRGB(ne==="ansi"?this._themeService.colors.ansi[N.index]:this._themeService.colors[ne]);this.coreService.triggerDataEvent(`${q.C0.ESC}]${re};${(0,R.toRgbString)(_e)}${q.C1_ESCAPED.ST}`);break;case 1:if(ne==="ansi")this._themeService.modifyColors((fe=>fe.ansi[N.index]=O.channels.toColor(...N.color)));else{const fe=ne;this._themeService.modifyColors((xe=>xe[fe]=O.channels.toColor(...N.color)))}break;case 2:this._themeService.restoreColor(N.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange($){$?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(V.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus($){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var $;return($=this.textarea)==null?void 0:$.blur()}_handleTextAreaBlur(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.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 $=this.buffer.ybase+this.buffer.y,N=this.buffer.lines.get($);if(!N)return;const ne=Math.min(this.buffer.x,this.cols-1),re=this._renderService.dimensions.css.cell.height,_e=N.getWidth(ne),fe=this._renderService.dimensions.css.cell.width*_e,xe=this.buffer.y*this._renderService.dimensions.css.cell.height,pe=ne*this._renderService.dimensions.css.cell.width;this.textarea.style.left=pe+"px",this.textarea.style.top=xe+"px",this.textarea.style.width=fe+"px",this.textarea.style.height=re+"px",this.textarea.style.lineHeight=re+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,v.addDisposableDomListener)(this.element,"copy",(N=>{this.hasSelection()&&(0,_.copyHandler)(N,this._selectionService)})));const $=N=>(0,_.handlePasteEvent)(N,this.textarea,this.coreService,this.optionsService);this.register((0,v.addDisposableDomListener)(this.textarea,"paste",$)),this.register((0,v.addDisposableDomListener)(this.element,"paste",$)),K.isFirefox?this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(N=>{N.button===2&&(0,_.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,v.addDisposableDomListener)(this.element,"contextmenu",(N=>{(0,_.rightClickHandler)(N,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),K.isLinux&&this.register((0,v.addDisposableDomListener)(this.element,"auxclick",(N=>{N.button===1&&(0,_.moveTextAreaUnderMouseCursor)(N,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,v.addDisposableDomListener)(this.textarea,"keyup",($=>this._keyUp($)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keydown",($=>this._keyDown($)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"keypress",($=>this._keyPress($)),!0)),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionupdate",($=>this._compositionHelper.compositionupdate($)))),this.register((0,v.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,v.addDisposableDomListener)(this.textarea,"input",($=>this._inputEvent($)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open($){var ne;if(!$)throw new Error("Terminal requires a parent element.");if($.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ne=this.element)==null?void 0:ne.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=$.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"),$.appendChild(this.element);const N=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),N.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,v.addDisposableDomListener)(this.screenElement,"mousemove",(re=>this.updateCursorStyle(re)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),N.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",g.promptLabel),K.isChromeOS||this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this._coreBrowserService=this.register(this._instantiationService.createInstance(C.CoreBrowserService,this.textarea,$.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(x.ICoreBrowserService,this._coreBrowserService),this.register((0,v.addDisposableDomListener)(this.textarea,"focus",(re=>this._handleTextAreaFocus(re)))),this.register((0,v.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(c.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(L.ThemeService),this._instantiationService.setService(x.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(m.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(w.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange((re=>this._onRender.fire(re)))),this.onResize((re=>this._renderService.resize(re.cols,re.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(h.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(S.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(l.Linkifier,this.screenElement)),this.element.appendChild(N);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(y.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines((re=>this.scrollLines(re.amount,re.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(p.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((re=>this.scrollLines(re.amount,re.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((re=>this._renderService.handleSelectionChanged(re.start,re.end,re.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((re=>{this.textarea.value=re,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((re=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,v.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(d.BufferDecorationRenderer,this.screenElement)),this.register((0,v.addDisposableDomListener)(this.element,"mousedown",(re=>this._selectionService.handleMouseDown(re)))),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(V.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(re=>this._handleScreenReaderModeOptionChange(re)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(re=>{!this._overviewRulerRenderer&&re&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(r.OverviewRulerRenderer,this._viewportElement,this.screenElement)))})),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(o.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const $=this,N=this.element;function ne(fe){const xe=$._mouseService.getMouseReportCoords(fe,$.screenElement);if(!xe)return!1;let pe,Ne;switch(fe.overrideType||fe.type){case"mousemove":Ne=32,fe.buttons===void 0?(pe=3,fe.button!==void 0&&(pe=fe.button<3?fe.button:3)):pe=1&fe.buttons?0:4&fe.buttons?1:2&fe.buttons?2:3;break;case"mouseup":Ne=0,pe=fe.button<3?fe.button:3;break;case"mousedown":Ne=1,pe=fe.button<3?fe.button:3;break;case"wheel":if($._customWheelEventHandler&&$._customWheelEventHandler(fe)===!1||$.viewport.getLinesScrolled(fe)===0)return!1;Ne=fe.deltaY<0?0:1,pe=4;break;default:return!1}return!(Ne===void 0||pe===void 0||pe>4)&&$.coreMouseService.triggerMouseEvent({col:xe.col,row:xe.row,x:xe.x,y:xe.y,button:pe,action:Ne,ctrl:fe.ctrlKey,alt:fe.altKey,shift:fe.shiftKey})}const re={mouseup:null,wheel:null,mousedrag:null,mousemove:null},_e={mouseup:fe=>(ne(fe),fe.buttons||(this._document.removeEventListener("mouseup",re.mouseup),re.mousedrag&&this._document.removeEventListener("mousemove",re.mousedrag)),this.cancel(fe)),wheel:fe=>(ne(fe),this.cancel(fe,!0)),mousedrag:fe=>{fe.buttons&&ne(fe)},mousemove:fe=>{fe.buttons||ne(fe)}};this.register(this.coreMouseService.onProtocolChange((fe=>{fe?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(fe)),this.element.classList.add("enable-mouse-events"),this._selectionService.disable()):(this._logService.debug("Unbinding from mouse events."),this.element.classList.remove("enable-mouse-events"),this._selectionService.enable()),8&fe?re.mousemove||(N.addEventListener("mousemove",_e.mousemove),re.mousemove=_e.mousemove):(N.removeEventListener("mousemove",re.mousemove),re.mousemove=null),16&fe?re.wheel||(N.addEventListener("wheel",_e.wheel,{passive:!1}),re.wheel=_e.wheel):(N.removeEventListener("wheel",re.wheel),re.wheel=null),2&fe?re.mouseup||(re.mouseup=_e.mouseup):(this._document.removeEventListener("mouseup",re.mouseup),re.mouseup=null),4&fe?re.mousedrag||(re.mousedrag=_e.mousedrag):(this._document.removeEventListener("mousemove",re.mousedrag),re.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,v.addDisposableDomListener)(N,"mousedown",(fe=>{if(fe.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(fe))return ne(fe),re.mouseup&&this._document.addEventListener("mouseup",re.mouseup),re.mousedrag&&this._document.addEventListener("mousemove",re.mousedrag),this.cancel(fe)}))),this.register((0,v.addDisposableDomListener)(N,"wheel",(fe=>{if(!re.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(fe)===!1)return!1;if(!this.buffer.hasScrollback){const xe=this.viewport.getLinesScrolled(fe);if(xe===0)return;const pe=q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(fe.deltaY<0?"A":"B");let Ne="";for(let Qe=0;Qe<Math.abs(xe);Qe++)Ne+=pe;return this.coreService.triggerDataEvent(Ne,!0),this.cancel(fe,!0)}return this.viewport.handleWheel(fe)?this.cancel(fe):void 0}}),{passive:!1})),this.register((0,v.addDisposableDomListener)(N,"touchstart",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(fe),this.cancel(fe)}),{passive:!0})),this.register((0,v.addDisposableDomListener)(N,"touchmove",(fe=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(fe)?void 0:this.cancel(fe)}),{passive:!1}))}refresh($,N){var ne;(ne=this._renderService)==null||ne.refreshRows($,N)}updateCursorStyle($){var N;(N=this._selectionService)!=null&&N.shouldColumnSelect($)?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($,N,ne=0){var re;ne===1?(super.scrollLines($,N,ne),this.refresh(0,this.rows-1)):(re=this.viewport)==null||re.scrollLines($)}paste($){(0,_.paste)($,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler($){this._customKeyEventHandler=$}attachCustomWheelEventHandler($){this._customWheelEventHandler=$}registerLinkProvider($){return this._linkProviderService.registerLinkProvider($)}registerCharacterJoiner($){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const N=this._characterJoinerService.register($);return this.refresh(0,this.rows-1),N}deregisterCharacterJoiner($){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister($)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker($){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+$)}registerDecoration($){return this._decorationService.registerDecoration($)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select($,N,ne){this._selectionService.setSelection($,N,ne)}getSelection(){return this._selectionService?this._selectionService.selectionText:""}getSelectionPosition(){if(this._selectionService&&this._selectionService.hasSelection)return{start:{x:this._selectionService.selectionStart[0],y:this._selectionService.selectionStart[1]},end:{x:this._selectionService.selectionEnd[0],y:this._selectionService.selectionEnd[1]}}}clearSelection(){var $;($=this._selectionService)==null||$.clearSelection()}selectAll(){var $;($=this._selectionService)==null||$.selectAll()}selectLines($,N){var ne;(ne=this._selectionService)==null||ne.selectLines($,N)}_keyDown($){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler($)===!1)return!1;const N=this.browser.isMac&&this.options.macOptionIsMeta&&$.altKey;if(!N&&!this._compositionHelper.keydown($))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;N||$.key!=="Dead"&&$.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ne=(0,F.evaluateKeyboardEvent)($,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle($),ne.type===3||ne.type===2){const re=this.rows-1;return this.scrollLines(ne.type===2?-re:re),this.cancel($,!0)}return ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,$)||(ne.cancel&&this.cancel($,!0),!ne.key||!!($.key&&!$.ctrlKey&&!$.altKey&&!$.metaKey&&$.key.length===1&&$.key.charCodeAt(0)>=65&&$.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ne.key!==q.C0.ETX&&ne.key!==q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ne.key,domEvent:$}),this._showCursor(),this.coreService.triggerDataEvent(ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||$.altKey||$.ctrlKey?this.cancel($,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift($,N){const ne=$.isMac&&!this.options.macOptionIsMeta&&N.altKey&&!N.ctrlKey&&!N.metaKey||$.isWindows&&N.altKey&&N.ctrlKey&&!N.metaKey||$.isWindows&&N.getModifierState("AltGraph");return N.type==="keypress"?ne:ne&&(!N.keyCode||N.keyCode>47)}_keyUp($){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler($)===!1||((function(N){return N.keyCode===16||N.keyCode===17||N.keyCode===18})($)||this.focus(),this.updateCursorStyle($),this._keyPressHandled=!1)}_keyPress($){let N;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler($)===!1)return!1;if(this.cancel($),$.charCode)N=$.charCode;else if($.which===null||$.which===void 0)N=$.keyCode;else{if($.which===0||$.charCode===0)return!1;N=$.which}return!(!N||($.altKey||$.ctrlKey||$.metaKey)&&!this._isThirdLevelShift(this.browser,$)||(N=String.fromCharCode(N),this._onKey.fire({key:N,domEvent:$}),this._showCursor(),this.coreService.triggerDataEvent(N,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent($){if($.data&&$.inputType==="insertText"&&(!$.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const N=$.data;return this.coreService.triggerDataEvent(N,!0),this.cancel($),!0}return!1}resize($,N){$!==this.cols||N!==this.rows?super.resize($,N):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize($,N){var ne,re;(ne=this._charSizeService)==null||ne.measure(),(re=this.viewport)==null||re.syncScrollArea(!0)}clear(){var $;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 N=1;N<this.rows;N++)this.buffer.lines.push(this.buffer.getBlankLine(I.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),($=this.viewport)==null||$.reset(),this.refresh(0,this.rows-1)}}reset(){var N,ne;this.options.rows=this.rows,this.options.cols=this.cols;const $=this._customKeyEventHandler;this._setup(),super.reset(),(N=this._selectionService)==null||N.reset(),this._decorationService.reset(),(ne=this.viewport)==null||ne.reset(),this._customKeyEventHandler=$,this.refresh(0,this.rows-1)}clearTextureAtlas(){var $;($=this._renderService)==null||$.clearTextureAtlas()}_reportFocus(){var $;($=this.element)!=null&&$.classList.contains("focus")?this.coreService.triggerDataEvent(q.C0.ESC+"[I"):this.coreService.triggerDataEvent(q.C0.ESC+"[O")}_reportWindowsOptions($){if(this._renderService)switch($){case z.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const N=this._renderService.dimensions.css.canvas.width.toFixed(0),ne=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[4;${ne};${N}t`);break;case z.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const re=this._renderService.dimensions.css.cell.width.toFixed(0),_e=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[6;${_e};${re}t`)}}cancel($,N){if(this.options.cancelEvents||N)return $.preventDefault(),$.stopPropagation(),!1}}n.Terminal=he},9924:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TimeBasedDebouncer=void 0,n.TimeBasedDebouncer=class{constructor(u,_=1e3){this._renderCallback=u,this._debounceThresholdMS=_,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(u,_,v){this._rowCount=v,u=u!==void 0?u:0,_=_!==void 0?_:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,u):u,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,_):_;const l=Date.now();if(l-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=l,this._innerRefresh();else if(!this._additionalRefreshRequested){const g=l-this._lastRefreshMs,b=this._debounceThresholdMS-g;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout((()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0}),b)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const u=Math.max(this._rowStart,0),_=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(u,_)}}},1680:function(P,n,u){var _=this&&this.__decorate||function(h,o,c,m){var C,S=arguments.length,w=S<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,m);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,m){o(c,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.Viewport=void 0;const l=u(3656),g=u(4725),b=u(8460),y=u(844),d=u(2585);let r=n.Viewport=class extends y.Disposable{constructor(h,o,c,m,C,S,w,p){super(),this._viewportElement=h,this._scrollArea=o,this._bufferService=c,this._optionsService=m,this._charSizeService=C,this._renderService=S,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 b.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,l.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((x=>this._activeBuffer=x.activeBuffer))),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange((x=>this._renderDimensions=x))),this._handleThemeChange(p.colors),this.register(p.onChangeColors((x=>this._handleThemeChange(x)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(h){this._viewportElement.style.backgroundColor=h.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(h){if(h)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 o=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==o&&(this._lastRecordedBufferHeight=o,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const h=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==h&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=h),this._refreshAnimationFrame=null}syncScrollArea(h=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(h);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(h)}_handleScroll(h){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 o=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:o,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const h=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(h*(this._smoothScrollState.target-this._smoothScrollState.origin)),h<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(h,o){const c=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(o<0&&this._viewportElement.scrollTop!==0||o>0&&c<this._lastRecordedBufferHeight)||(h.cancelable&&h.preventDefault(),!1)}handleWheel(h){const o=this._getPixelsScrolled(h);return o!==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+o:this._smoothScrollState.target+=o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}scrollLines(h){if(h!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const o=h*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+o,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:h,suppressScrollEvent:!1})}_getPixelsScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_LINE?o*=this._currentRowHeight:h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._currentRowHeight*this._bufferService.rows),o}getBufferElements(h,o){var p;let c,m="";const C=[],S=o??this._bufferService.buffer.lines.length,w=this._bufferService.buffer.lines;for(let x=h;x<S;x++){const L=w.get(x);if(!L)continue;const O=(p=w.get(x+1))==null?void 0:p.isWrapped;if(m+=L.translateToString(!O),!O||x===w.length-1){const T=document.createElement("div");T.textContent=m,C.push(T),m.length>0&&(c=T),m=""}}return{bufferElements:C,cursorElement:c}}getLinesScrolled(h){if(h.deltaY===0||h.shiftKey)return 0;let o=this._applyScrollModifier(h.deltaY,h);return h.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(o/=this._currentRowHeight+0,this._wheelPartialScroll+=o,o=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):h.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(o*=this._bufferService.rows),o}_applyScrollModifier(h,o){const c=this._optionsService.rawOptions.fastScrollModifier;return c==="alt"&&o.altKey||c==="ctrl"&&o.ctrlKey||c==="shift"&&o.shiftKey?h*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:h*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(h){this._lastTouchY=h.touches[0].pageY}handleTouchMove(h){const o=this._lastTouchY-h.touches[0].pageY;return this._lastTouchY=h.touches[0].pageY,o!==0&&(this._viewportElement.scrollTop+=o,this._bubbleScroll(h,o))}};n.Viewport=r=_([v(2,d.IBufferService),v(3,d.IOptionsService),v(4,g.ICharSizeService),v(5,g.IRenderService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],r)},3107:function(P,n,u){var _=this&&this.__decorate||function(d,r,h,o){var c,m=arguments.length,C=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(d,r,h,o);else for(var S=d.length-1;S>=0;S--)(c=d[S])&&(C=(m<3?c(C):m>3?c(r,h,C):c(r,h))||C);return m>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(d,r){return function(h,o){r(h,o,d)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferDecorationRenderer=void 0;const l=u(4725),g=u(844),b=u(2585);let y=n.BufferDecorationRenderer=class extends g.Disposable{constructor(d,r,h,o,c){super(),this._screenElement=d,this._bufferService=r,this._coreBrowserService=h,this._decorationService=o,this._renderService=c,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange((()=>this._doRefreshDecorations()))),this.register(this._renderService.onDimensionsChange((()=>{this._dimensionsChanged=!0,this._queueRefresh()}))),this.register(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((m=>this._removeDecoration(m)))),this.register((0,g.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 d of this._decorationService.decorations)this._renderDecoration(d);this._dimensionsChanged=!1}_renderDecoration(d){this._refreshStyle(d),this._dimensionsChanged&&this._refreshXPosition(d)}_createElement(d){var o;const r=this._coreBrowserService.mainDocument.createElement("div");r.classList.add("xterm-decoration"),r.classList.toggle("xterm-decoration-top-layer",((o=d==null?void 0:d.options)==null?void 0:o.layer)==="top"),r.style.width=`${Math.round((d.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,r.style.height=(d.options.height||1)*this._renderService.dimensions.css.cell.height+"px",r.style.top=(d.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",r.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const h=d.options.x??0;return h&&h>this._bufferService.cols&&(r.style.display="none"),this._refreshXPosition(d,r),r}_refreshStyle(d){const r=d.marker.line-this._bufferService.buffers.active.ydisp;if(r<0||r>=this._bufferService.rows)d.element&&(d.element.style.display="none",d.onRenderEmitter.fire(d.element));else{let h=this._decorationElements.get(d);h||(h=this._createElement(d),d.element=h,this._decorationElements.set(d,h),this._container.appendChild(h),d.onDispose((()=>{this._decorationElements.delete(d),h.remove()}))),h.style.top=r*this._renderService.dimensions.css.cell.height+"px",h.style.display=this._altBufferIsActive?"none":"block",d.onRenderEmitter.fire(h)}}_refreshXPosition(d,r=d.element){if(!r)return;const h=d.options.x??0;(d.options.anchor||"left")==="right"?r.style.right=h?h*this._renderService.dimensions.css.cell.width+"px":"":r.style.left=h?h*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(d){var r;(r=this._decorationElements.get(d))==null||r.remove(),this._decorationElements.delete(d),d.dispose()}};n.BufferDecorationRenderer=y=_([v(1,b.IBufferService),v(2,l.ICoreBrowserService),v(3,b.IDecorationService),v(4,l.IRenderService)],y)},5871:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ColorZoneStore=void 0,n.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(u){if(u.options.overviewRulerOptions){for(const _ of this._zones)if(_.color===u.options.overviewRulerOptions.color&&_.position===u.options.overviewRulerOptions.position){if(this._lineIntersectsZone(_,u.marker.line))return;if(this._lineAdjacentToZone(_,u.marker.line,u.options.overviewRulerOptions.position))return void this._addLineToZone(_,u.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=u.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=u.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=u.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=u.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:u.options.overviewRulerOptions.color,position:u.options.overviewRulerOptions.position,startBufferLine:u.marker.line,endBufferLine:u.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(u){this._linePadding=u}_lineIntersectsZone(u,_){return _>=u.startBufferLine&&_<=u.endBufferLine}_lineAdjacentToZone(u,_,v){return _>=u.startBufferLine-this._linePadding[v||"full"]&&_<=u.endBufferLine+this._linePadding[v||"full"]}_addLineToZone(u,_){u.startBufferLine=Math.min(u.startBufferLine,_),u.endBufferLine=Math.max(u.endBufferLine,_)}}},5744:function(P,n,u){var _=this&&this.__decorate||function(c,m,C,S){var w,p=arguments.length,x=p<3?m:S===null?S=Object.getOwnPropertyDescriptor(m,C):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,m,C,S);else for(var L=c.length-1;L>=0;L--)(w=c[L])&&(x=(p<3?w(x):p>3?w(m,C,x):w(m,C))||x);return p>3&&x&&Object.defineProperty(m,C,x),x},v=this&&this.__param||function(c,m){return function(C,S){m(C,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OverviewRulerRenderer=void 0;const l=u(5871),g=u(4725),b=u(844),y=u(2585),d={full:0,left:0,center:0,right:0},r={full:0,left:0,center:0,right:0},h={full:0,left:0,center:0,right:0};let o=n.OverviewRulerRenderer=class extends b.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(c,m,C,S,w,p,x){var O;super(),this._viewportElement=c,this._screenElement=m,this._bufferService=C,this._decorationService=S,this._renderService=w,this._optionsService=p,this._coreBrowserService=x,this._colorZoneStore=new l.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(),(O=this._viewportElement.parentElement)==null||O.insertBefore(this._canvas,this._viewportElement);const L=this._canvas.getContext("2d");if(!L)throw new Error("Ctx cannot be null");this._ctx=L,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,b.toDisposable)((()=>{var T;(T=this._canvas)==null||T.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 c=Math.floor(this._canvas.width/3),m=Math.ceil(this._canvas.width/3);r.full=this._canvas.width,r.left=c,r.center=m,r.right=c,this._refreshDrawHeightConstants(),h.full=0,h.left=0,h.center=r.left,h.right=r.left+r.center}_refreshDrawHeightConstants(){d.full=Math.round(2*this._coreBrowserService.dpr);const c=this._canvas.height/this._bufferService.buffer.lines.length,m=Math.round(Math.max(Math.min(c,12),6)*this._coreBrowserService.dpr);d.left=m,d.center=m,d.right=m}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*d.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*d.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*d.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*d.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 m of this._decorationService.decorations)this._colorZoneStore.addDecoration(m);this._ctx.lineWidth=1;const c=this._colorZoneStore.zones;for(const m of c)m.position!=="full"&&this._renderColorZone(m);for(const m of c)m.position==="full"&&this._renderColorZone(m);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(c){this._ctx.fillStyle=c.color,this._ctx.fillRect(h[c.position||"full"],Math.round((this._canvas.height-1)*(c.startBufferLine/this._bufferService.buffers.active.lines.length)-d[c.position||"full"]/2),r[c.position||"full"],Math.round((this._canvas.height-1)*((c.endBufferLine-c.startBufferLine)/this._bufferService.buffers.active.lines.length)+d[c.position||"full"]))}_queueRefresh(c,m){this._shouldUpdateDimensions=c||this._shouldUpdateDimensions,this._shouldUpdateAnchor=m||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._refreshDecorations(),this._animationFrame=void 0})))}};n.OverviewRulerRenderer=o=_([v(2,y.IBufferService),v(3,y.IDecorationService),v(4,g.IRenderService),v(5,y.IOptionsService),v(6,g.ICoreBrowserService)],o)},2950:function(P,n,u){var _=this&&this.__decorate||function(d,r,h,o){var c,m=arguments.length,C=m<3?r:o===null?o=Object.getOwnPropertyDescriptor(r,h):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(d,r,h,o);else for(var S=d.length-1;S>=0;S--)(c=d[S])&&(C=(m<3?c(C):m>3?c(r,h,C):c(r,h))||C);return m>3&&C&&Object.defineProperty(r,h,C),C},v=this&&this.__param||function(d,r){return function(h,o){r(h,o,d)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CompositionHelper=void 0;const l=u(4725),g=u(2585),b=u(2584);let y=n.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(d,r,h,o,c,m){this._textarea=d,this._compositionView=r,this._bufferService=h,this._optionsService=o,this._coreService=c,this._renderService=m,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(d){this._compositionView.textContent=d.data,this.updateCompositionElements(),setTimeout((()=>{this._compositionPosition.end=this._textarea.value.length}),0)}compositionend(){this._finalizeComposition(!0)}keydown(d){if(this._isComposing||this._isSendingComposition){if(d.keyCode===229||d.keyCode===16||d.keyCode===17||d.keyCode===18)return!1;this._finalizeComposition(!1)}return d.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(d){if(this._compositionView.classList.remove("active"),this._isComposing=!1,d){const r={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout((()=>{if(this._isSendingComposition){let h;this._isSendingComposition=!1,r.start+=this._dataAlreadySent.length,h=this._isComposing?this._textarea.value.substring(r.start,r.end):this._textarea.value.substring(r.start),h.length>0&&this._coreService.triggerDataEvent(h,!0)}}),0)}else{this._isSendingComposition=!1;const r=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(r,!0)}}_handleAnyTextareaChanges(){const d=this._textarea.value;setTimeout((()=>{if(!this._isComposing){const r=this._textarea.value,h=r.replace(d,"");this._dataAlreadySent=h,r.length>d.length?this._coreService.triggerDataEvent(h,!0):r.length<d.length?this._coreService.triggerDataEvent(`${b.C0.DEL}`,!0):r.length===d.length&&r!==d&&this._coreService.triggerDataEvent(r,!0)}}),0)}updateCompositionElements(d){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const r=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),h=this._renderService.dimensions.css.cell.height,o=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,c=r*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=c+"px",this._compositionView.style.top=o+"px",this._compositionView.style.height=h+"px",this._compositionView.style.lineHeight=h+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const m=this._compositionView.getBoundingClientRect();this._textarea.style.left=c+"px",this._textarea.style.top=o+"px",this._textarea.style.width=Math.max(m.width,1)+"px",this._textarea.style.height=Math.max(m.height,1)+"px",this._textarea.style.lineHeight=m.height+"px"}d||setTimeout((()=>this.updateCompositionElements(!0)),0)}}};n.CompositionHelper=y=_([v(2,g.IBufferService),v(3,g.IOptionsService),v(4,g.ICoreService),v(5,l.IRenderService)],y)},9806:(P,n)=>{function u(_,v,l){const g=l.getBoundingClientRect(),b=_.getComputedStyle(l),y=parseInt(b.getPropertyValue("padding-left")),d=parseInt(b.getPropertyValue("padding-top"));return[v.clientX-g.left-y,v.clientY-g.top-d]}Object.defineProperty(n,"__esModule",{value:!0}),n.getCoords=n.getCoordsRelativeToElement=void 0,n.getCoordsRelativeToElement=u,n.getCoords=function(_,v,l,g,b,y,d,r,h){if(!y)return;const o=u(_,v,l);return o?(o[0]=Math.ceil((o[0]+(h?d/2:0))/d),o[1]=Math.ceil(o[1]/r),o[0]=Math.min(Math.max(o[0],1),g+(h?1:0)),o[1]=Math.min(Math.max(o[1],1),b),o):void 0}},9504:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.moveToCellSequence=void 0;const _=u(2584);function v(r,h,o,c){const m=r-l(r,o),C=h-l(h,o),S=Math.abs(m-C)-(function(w,p,x){let L=0;const O=w-l(w,x),T=p-l(p,x);for(let M=0;M<Math.abs(O-T);M++){const U=g(w,p)==="A"?-1:1,K=x.buffer.lines.get(O+U*M);K!=null&&K.isWrapped&&L++}return L})(r,h,o);return d(S,y(g(r,h),c))}function l(r,h){let o=0,c=h.buffer.lines.get(r),m=c==null?void 0:c.isWrapped;for(;m&&r>=0&&r<h.rows;)o++,c=h.buffer.lines.get(--r),m=c==null?void 0:c.isWrapped;return o}function g(r,h){return r>h?"A":"B"}function b(r,h,o,c,m,C){let S=r,w=h,p="";for(;S!==o||w!==c;)S+=m?1:-1,m&&S>C.cols-1?(p+=C.buffer.translateBufferLineToString(w,!1,r,S),S=0,r=0,w++):!m&&S<0&&(p+=C.buffer.translateBufferLineToString(w,!1,0,r+1),S=C.cols-1,r=S,w--);return p+C.buffer.translateBufferLineToString(w,!1,r,S)}function y(r,h){const o=h?"O":"[";return _.C0.ESC+o+r}function d(r,h){r=Math.floor(r);let o="";for(let c=0;c<r;c++)o+=h;return o}n.moveToCellSequence=function(r,h,o,c){const m=o.buffer.x,C=o.buffer.y;if(!o.buffer.hasScrollback)return(function(p,x,L,O,T,M){return v(x,O,T,M).length===0?"":d(b(p,x,p,x-l(x,T),!1,T).length,y("D",M))})(m,C,0,h,o,c)+v(C,h,o,c)+(function(p,x,L,O,T,M){let U;U=v(x,O,T,M).length>0?O-l(O,T):x;const K=O,I=(function(q,F,R,H,D,z){let V;return V=v(R,H,D,z).length>0?H-l(H,D):F,q<R&&V<=H||q>=R&&V<H?"C":"D"})(p,x,L,O,T,M);return d(b(p,U,L,K,I==="C",T).length,y(I,M))})(m,C,r,h,o,c);let S;if(C===h)return S=m>r?"D":"C",d(Math.abs(m-r),y(S,c));S=C>h?"D":"C";const w=Math.abs(C-h);return d((function(p,x){return x.cols-p})(C>h?r:m,o)+(w-1)*o.cols+1+((C>h?m:r)-1),y(S,c))}},1296:function(P,n,u){var _=this&&this.__decorate||function(M,U,K,I){var q,F=arguments.length,R=F<3?U:I===null?I=Object.getOwnPropertyDescriptor(U,K):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(M,U,K,I);else for(var H=M.length-1;H>=0;H--)(q=M[H])&&(R=(F<3?q(R):F>3?q(U,K,R):q(U,K))||R);return F>3&&R&&Object.defineProperty(U,K,R),R},v=this&&this.__param||function(M,U){return function(K,I){U(K,I,M)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRenderer=void 0;const l=u(3787),g=u(2550),b=u(2223),y=u(6171),d=u(6052),r=u(4725),h=u(8055),o=u(8460),c=u(844),m=u(2585),C="xterm-dom-renderer-owner-",S="xterm-rows",w="xterm-fg-",p="xterm-bg-",x="xterm-focus",L="xterm-selection";let O=1,T=n.DomRenderer=class extends c.Disposable{constructor(M,U,K,I,q,F,R,H,D,z,V,J,he){super(),this._terminal=M,this._document=U,this._element=K,this._screenElement=I,this._viewportElement=q,this._helperContainer=F,this._linkifier2=R,this._charSizeService=D,this._optionsService=z,this._bufferService=V,this._coreBrowserService=J,this._themeService=he,this._terminalClass=O++,this._rowElements=[],this._selectionRenderModel=(0,d.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new o.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(S),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(L),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,y.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._themeService.onChangeColors((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=H.createInstance(l.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,c.toDisposable)((()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()}))),this._widthCache=new g.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 M=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*M,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*M),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/M),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/M),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 K of this._rowElements)K.style.width=`${this.dimensions.css.canvas.width}px`,K.style.height=`${this.dimensions.css.cell.height}px`,K.style.lineHeight=`${this.dimensions.css.cell.height}px`,K.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const U=`${this._terminalSelector} .${S} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,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(M){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${S} { color: ${M.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${S} .xterm-dim { color: ${h.color.multiplyOpacity(M.foreground,.5).css};}`,U+=`${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 K=`blink_underline_${this._terminalClass}`,I=`blink_bar_${this._terminalClass}`,q=`blink_block_${this._terminalClass}`;U+=`@keyframes ${K} { 50% { border-bottom-style: hidden; }}`,U+=`@keyframes ${I} { 50% { box-shadow: none; }}`,U+=`@keyframes ${q} { 0% { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css}; } 50% { background-color: inherit; color: ${M.cursor.css}; }}`,U+=`${this._terminalSelector} .${S}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${S}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${I} 1s step-end infinite;}${this._terminalSelector} .${S}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block { background-color: ${M.cursor.css}; color: ${M.cursorAccent.css};}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${M.cursor.css} !important; color: ${M.cursorAccent.css} !important;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${M.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${M.cursor.css} inset;}${this._terminalSelector} .${S} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${M.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${L} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${L} div { position: absolute; background-color: ${M.selectionBackgroundOpaque.css};}${this._terminalSelector} .${L} div { position: absolute; background-color: ${M.selectionInactiveBackgroundOpaque.css};}`;for(const[F,R]of M.ansi.entries())U+=`${this._terminalSelector} .${w}${F} { color: ${R.css}; }${this._terminalSelector} .${w}${F}.xterm-dim { color: ${h.color.multiplyOpacity(R,.5).css}; }${this._terminalSelector} .${p}${F} { background-color: ${R.css}; }`;U+=`${this._terminalSelector} .${w}${b.INVERTED_DEFAULT_COLOR} { color: ${h.color.opaque(M.background).css}; }${this._terminalSelector} .${w}${b.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${h.color.multiplyOpacity(h.color.opaque(M.background),.5).css}; }${this._terminalSelector} .${p}${b.INVERTED_DEFAULT_COLOR} { background-color: ${M.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const M=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${M}px`,this._rowFactory.defaultSpacing=M}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(M,U){for(let K=this._rowElements.length;K<=U;K++){const I=this._document.createElement("div");this._rowContainer.appendChild(I),this._rowElements.push(I)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(M,U){this._refreshRowElements(M,U),this._updateDimensions(),this.handleSelectionChanged(this._selectionRenderModel.selectionStart,this._selectionRenderModel.selectionEnd,this._selectionRenderModel.columnSelectMode)}handleCharSizeChanged(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}handleBlur(){this._rowContainer.classList.remove(x),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(x),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(M,U,K){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(M,U,K),this.renderRows(0,this._bufferService.rows-1),!M||!U)return;this._selectionRenderModel.update(this._terminal,M,U,K);const I=this._selectionRenderModel.viewportStartRow,q=this._selectionRenderModel.viewportEndRow,F=this._selectionRenderModel.viewportCappedStartRow,R=this._selectionRenderModel.viewportCappedEndRow;if(F>=this._bufferService.rows||R<0)return;const H=this._document.createDocumentFragment();if(K){const D=M[0]>U[0];H.appendChild(this._createSelectionElement(F,D?U[0]:M[0],D?M[0]:U[0],R-F+1))}else{const D=I===F?M[0]:0,z=F===q?U[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(F,D,z));const V=R-F-1;if(H.appendChild(this._createSelectionElement(F+1,0,this._bufferService.cols,V)),F!==R){const J=q===R?U[0]:this._bufferService.cols;H.appendChild(this._createSelectionElement(R,0,J))}}this._selectionContainer.appendChild(H)}_createSelectionElement(M,U,K,I=1){const q=this._document.createElement("div"),F=U*this.dimensions.css.cell.width;let R=this.dimensions.css.cell.width*(K-U);return F+R>this.dimensions.css.canvas.width&&(R=this.dimensions.css.canvas.width-F),q.style.height=I*this.dimensions.css.cell.height+"px",q.style.top=M*this.dimensions.css.cell.height+"px",q.style.left=`${F}px`,q.style.width=`${R}px`,q}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 M of this._rowElements)M.replaceChildren()}renderRows(M,U){const K=this._bufferService.buffer,I=K.ybase+K.y,q=Math.min(K.x,this._bufferService.cols-1),F=this._optionsService.rawOptions.cursorBlink,R=this._optionsService.rawOptions.cursorStyle,H=this._optionsService.rawOptions.cursorInactiveStyle;for(let D=M;D<=U;D++){const z=D+K.ydisp,V=this._rowElements[D],J=K.lines.get(z);if(!V||!J)break;V.replaceChildren(...this._rowFactory.createRow(J,z,z===I,R,H,q,F,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!0)}_handleLinkLeave(M){this._setCellUnderline(M.x1,M.x2,M.y1,M.y2,M.cols,!1)}_setCellUnderline(M,U,K,I,q,F){K<0&&(M=0),I<0&&(U=0);const R=this._bufferService.rows-1;K=Math.max(Math.min(K,R),0),I=Math.max(Math.min(I,R),0),q=Math.min(q,this._bufferService.cols);const H=this._bufferService.buffer,D=H.ybase+H.y,z=Math.min(H.x,q-1),V=this._optionsService.rawOptions.cursorBlink,J=this._optionsService.rawOptions.cursorStyle,he=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=K;ue<=I;++ue){const $=ue+H.ydisp,N=this._rowElements[ue],ne=H.lines.get($);if(!N||!ne)break;N.replaceChildren(...this._rowFactory.createRow(ne,$,$===D,J,he,z,V,this.dimensions.css.cell.width,this._widthCache,F?ue===K?M:0:-1,F?(ue===I?U:q)-1:-1))}}};n.DomRenderer=T=_([v(7,m.IInstantiationService),v(8,r.ICharSizeService),v(9,m.IOptionsService),v(10,m.IBufferService),v(11,r.ICoreBrowserService),v(12,r.IThemeService)],T)},3787:function(P,n,u){var _=this&&this.__decorate||function(S,w,p,x){var L,O=arguments.length,T=O<3?w:x===null?x=Object.getOwnPropertyDescriptor(w,p):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(S,w,p,x);else for(var M=S.length-1;M>=0;M--)(L=S[M])&&(T=(O<3?L(T):O>3?L(w,p,T):L(w,p))||T);return O>3&&T&&Object.defineProperty(w,p,T),T},v=this&&this.__param||function(S,w){return function(p,x){w(p,x,S)}};Object.defineProperty(n,"__esModule",{value:!0}),n.DomRendererRowFactory=void 0;const l=u(2223),g=u(643),b=u(511),y=u(2585),d=u(8055),r=u(4725),h=u(4269),o=u(6171),c=u(3734);let m=n.DomRendererRowFactory=class{constructor(S,w,p,x,L,O,T){this._document=S,this._characterJoinerService=w,this._optionsService=p,this._coreBrowserService=x,this._coreService=L,this._decorationService=O,this._themeService=T,this._workCell=new b.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(S,w,p){this._selectionStart=S,this._selectionEnd=w,this._columnSelectMode=p}createRow(S,w,p,x,L,O,T,M,U,K,I){const q=[],F=this._characterJoinerService.getJoinedCharacters(w),R=this._themeService.colors;let H,D=S.getNoBgTrimmedLength();p&&D<O+1&&(D=O+1);let z=0,V="",J=0,he=0,ue=0,$=!1,N=0,ne=!1,re=0;const _e=[],fe=K!==-1&&I!==-1;for(let xe=0;xe<D;xe++){S.loadCell(xe,this._workCell);let pe=this._workCell.getWidth();if(pe===0)continue;let Ne=!1,Qe=xe,be=this._workCell;if(F.length>0&&xe===F[0][0]){Ne=!0;const Re=F.shift();be=new h.JoinedCellData(this._workCell,S.translateToString(!0,Re[0],Re[1]),Re[1]-Re[0]),Qe=Re[1]-1,pe=be.getWidth()}const Bt=this._isCellInSelection(xe,w),si=p&&xe===O,Be=fe&&xe>=K&&xe<=I;let Ae=!1;this._decorationService.forEachDecorationAtCell(xe,w,void 0,(Re=>{Ae=!0}));let De=be.getChars()||g.WHITESPACE_CELL_CHAR;if(De===" "&&(be.isUnderline()||be.isOverline())&&(De=" "),re=pe*M-U.get(De,be.isBold(),be.isItalic()),H){if(z&&(Bt&&ne||!Bt&&!ne&&be.bg===J)&&(Bt&&ne&&R.selectionForeground||be.fg===he)&&be.extended.ext===ue&&Be===$&&re===N&&!si&&!Ne&&!Ae){be.isInvisible()?V+=g.WHITESPACE_CELL_CHAR:V+=De,z++;continue}z&&(H.textContent=V),H=this._document.createElement("span"),z=0,V=""}else H=this._document.createElement("span");if(J=be.bg,he=be.fg,ue=be.extended.ext,$=Be,N=re,ne=Bt,Ne&&O>=xe&&O<=Qe&&(O=xe),!this._coreService.isCursorHidden&&si&&this._coreService.isCursorInitialized){if(_e.push("xterm-cursor"),this._coreBrowserService.isFocused)T&&_e.push("xterm-cursor-blink"),_e.push(x==="bar"?"xterm-cursor-bar":x==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(L)switch(L){case"outline":_e.push("xterm-cursor-outline");break;case"block":_e.push("xterm-cursor-block");break;case"bar":_e.push("xterm-cursor-bar");break;case"underline":_e.push("xterm-cursor-underline")}}if(be.isBold()&&_e.push("xterm-bold"),be.isItalic()&&_e.push("xterm-italic"),be.isDim()&&_e.push("xterm-dim"),V=be.isInvisible()?g.WHITESPACE_CELL_CHAR:be.getChars()||g.WHITESPACE_CELL_CHAR,be.isUnderline()&&(_e.push(`xterm-underline-${be.extended.underlineStyle}`),V===" "&&(V=" "),!be.isUnderlineColorDefault()))if(be.isUnderlineColorRGB())H.style.textDecorationColor=`rgb(${c.AttributeData.toColorRGB(be.getUnderlineColor()).join(",")})`;else{let Re=be.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&be.isBold()&&Re<8&&(Re+=8),H.style.textDecorationColor=R.ansi[Re].css}be.isOverline()&&(_e.push("xterm-overline"),V===" "&&(V=" ")),be.isStrikethrough()&&_e.push("xterm-strikethrough"),Be&&(H.style.textDecoration="underline");let ve=be.getFgColor(),Ce=be.getFgColorMode(),Ze=be.getBgColor(),Fe=be.getBgColorMode();const Ft=!!be.isInverse();if(Ft){const Re=ve;ve=Ze,Ze=Re;const Jt=Ce;Ce=Fe,Fe=Jt}let ht,wt,et,qe=!1;switch(this._decorationService.forEachDecorationAtCell(xe,w,void 0,(Re=>{Re.options.layer!=="top"&&qe||(Re.backgroundColorRGB&&(Fe=50331648,Ze=Re.backgroundColorRGB.rgba>>8&16777215,ht=Re.backgroundColorRGB),Re.foregroundColorRGB&&(Ce=50331648,ve=Re.foregroundColorRGB.rgba>>8&16777215,wt=Re.foregroundColorRGB),qe=Re.options.layer==="top")})),!qe&&Bt&&(ht=this._coreBrowserService.isFocused?R.selectionBackgroundOpaque:R.selectionInactiveBackgroundOpaque,Ze=ht.rgba>>8&16777215,Fe=50331648,qe=!0,R.selectionForeground&&(Ce=50331648,ve=R.selectionForeground.rgba>>8&16777215,wt=R.selectionForeground)),qe&&_e.push("xterm-decoration-top"),Fe){case 16777216:case 33554432:et=R.ansi[Ze],_e.push(`xterm-bg-${Ze}`);break;case 50331648:et=d.channels.toColor(Ze>>16,Ze>>8&255,255&Ze),this._addStyle(H,`background-color:#${C((Ze>>>0).toString(16),"0",6)}`);break;default:Ft?(et=R.foreground,_e.push(`xterm-bg-${l.INVERTED_DEFAULT_COLOR}`)):et=R.background}switch(ht||be.isDim()&&(ht=d.color.multiplyOpacity(et,.5)),Ce){case 16777216:case 33554432:be.isBold()&&ve<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(ve+=8),this._applyMinimumContrast(H,et,R.ansi[ve],be,ht,void 0)||_e.push(`xterm-fg-${ve}`);break;case 50331648:const Re=d.channels.toColor(ve>>16&255,ve>>8&255,255&ve);this._applyMinimumContrast(H,et,Re,be,ht,wt)||this._addStyle(H,`color:#${C(ve.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(H,et,R.foreground,be,ht,wt)||Ft&&_e.push(`xterm-fg-${l.INVERTED_DEFAULT_COLOR}`)}_e.length&&(H.className=_e.join(" "),_e.length=0),si||Ne||Ae?H.textContent=V:z++,re!==this.defaultSpacing&&(H.style.letterSpacing=`${re}px`),q.push(H),xe=Qe}return H&&z&&(H.textContent=V),q}_applyMinimumContrast(S,w,p,x,L,O){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,o.treatGlyphAsBackgroundColor)(x.getCode()))return!1;const T=this._getContrastCache(x);let M;if(L||O||(M=T.getColor(w.rgba,p.rgba)),M===void 0){const U=this._optionsService.rawOptions.minimumContrastRatio/(x.isDim()?2:1);M=d.color.ensureContrastRatio(L||w,O||p,U),T.setColor((L||w).rgba,(O||p).rgba,M??null)}return!!M&&(this._addStyle(S,`color:${M.css}`),!0)}_getContrastCache(S){return S.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(S,w){S.setAttribute("style",`${S.getAttribute("style")||""}${w};`)}_isCellInSelection(S,w){const p=this._selectionStart,x=this._selectionEnd;return!(!p||!x)&&(this._columnSelectMode?p[0]<=x[0]?S>=p[0]&&w>=p[1]&&S<x[0]&&w<=x[1]:S<p[0]&&w>=p[1]&&S>=x[0]&&w<=x[1]:w>p[1]&&w<x[1]||p[1]===x[1]&&w===p[1]&&S>=p[0]&&S<x[0]||p[1]<x[1]&&w===x[1]&&S<x[0]||p[1]<x[1]&&w===p[1]&&S>=p[0])}};function C(S,w,p){for(;S.length<p;)S=w+S;return S}n.DomRendererRowFactory=m=_([v(1,r.ICharacterJoinerService),v(2,y.IOptionsService),v(3,r.ICoreBrowserService),v(4,y.ICoreService),v(5,y.IDecorationService),v(6,r.IThemeService)],m)},2550:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WidthCache=void 0,n.WidthCache=class{constructor(u,_){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=u.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 v=u.createElement("span");v.classList.add("xterm-char-measure-element");const l=u.createElement("span");l.classList.add("xterm-char-measure-element"),l.style.fontWeight="bold";const g=u.createElement("span");g.classList.add("xterm-char-measure-element"),g.style.fontStyle="italic";const b=u.createElement("span");b.classList.add("xterm-char-measure-element"),b.style.fontWeight="bold",b.style.fontStyle="italic",this._measureElements=[v,l,g,b],this._container.appendChild(v),this._container.appendChild(l),this._container.appendChild(g),this._container.appendChild(b),_.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(u,_,v,l){u===this._font&&_===this._fontSize&&v===this._weight&&l===this._weightBold||(this._font=u,this._fontSize=_,this._weight=v,this._weightBold=l,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${v}`,this._measureElements[1].style.fontWeight=`${l}`,this._measureElements[2].style.fontWeight=`${v}`,this._measureElements[3].style.fontWeight=`${l}`,this.clear())}get(u,_,v){let l=0;if(!_&&!v&&u.length===1&&(l=u.charCodeAt(0))<256){if(this._flat[l]!==-9999)return this._flat[l];const y=this._measure(u,0);return y>0&&(this._flat[l]=y),y}let g=u;_&&(g+="B"),v&&(g+="I");let b=this._holey.get(g);if(b===void 0){let y=0;_&&(y|=1),v&&(y|=2),b=this._measure(u,y),b>0&&this._holey.set(g,b)}return b}_measure(u,_){const v=this._measureElements[_];return v.textContent=u.repeat(32),v.offsetWidth/32}}},2223:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const _=u(6114);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},6171:(P,n)=>{function u(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=_,n.allowRescaling=function(v,l,g,b){return l===1&&g>Math.ceil(1.5*b)&&v!==void 0&&v>255&&!_(v)&&!u(v)&&!(function(y){return 57344<=y&&y<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(l){return 9472<=l&&l<=9631})(v)},n.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}}}},n.computeNextVariantOffset=function(v,l,g=0){return(v-(2*Math.round(l)-g))%(2*Math.round(l))}},6052:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{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(v,l,g,b=!1){if(this.selectionStart=l,this.selectionEnd=g,!l||!g||l[0]===g[0]&&l[1]===g[1])return void this.clear();const y=v.buffers.active.ydisp,d=l[1]-y,r=g[1]-y,h=Math.max(d,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=d,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=g[0])}isCellSelected(v,l,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&g>=this.viewportCappedStartRow&&l<this.endCol&&g<=this.viewportCappedEndRow:l<this.startCol&&g>=this.viewportCappedStartRow&&l>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},456:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionModel=void 0,n.SelectionModel=class{constructor(u){this._bufferService=u,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 u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?u%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)-1]:[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[u,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const u=this.selectionStart[0]+this.selectionStartLength;return u>this._bufferService.cols?[u%this._bufferService.cols,this.selectionStart[1]+Math.floor(u/this._bufferService.cols)]:[Math.max(u,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const u=this.selectionStart,_=this.selectionEnd;return!(!u||!_)&&(u[1]>_[1]||u[1]===_[1]&&u[0]>_[0])}handleTrim(u){return this.selectionStart&&(this.selectionStart[1]-=u),this.selectionEnd&&(this.selectionEnd[1]-=u),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(P,n,u){var _=this&&this.__decorate||function(o,c,m,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,m,C);else for(var x=o.length-1;x>=0;x--)(S=o[x])&&(p=(w<3?S(p):w>3?S(c,m,p):S(c,m))||p);return w>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(o,c){return function(m,C){c(m,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharSizeService=void 0;const l=u(2585),g=u(8460),b=u(844);let y=n.CharSizeService=class extends b.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(o,c,m){super(),this._optionsService=m,this.width=0,this.height=0,this._onCharSizeChange=this.register(new g.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new h(this._optionsService))}catch{this._measureStrategy=this.register(new r(o,c,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const o=this._measureStrategy.measure();o.width===this.width&&o.height===this.height||(this.width=o.width,this.height=o.height,this._onCharSizeChange.fire())}};n.CharSizeService=y=_([v(2,l.IOptionsService)],y);class d extends b.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(c,m){c!==void 0&&c>0&&m!==void 0&&m>0&&(this._result.width=c,this._result.height=m)}}class r extends d{constructor(c,m,C){super(),this._document=c,this._parentElement=m,this._optionsService=C,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class h extends d{constructor(c){super(),this._optionsService=c,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const m=this._ctx.measureText("W");if(!("width"in m&&"fontBoundingBoxAscent"in m&&"fontBoundingBoxDescent"in m))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const c=this._ctx.measureText("W");return this._validateAndSet(c.width,c.fontBoundingBoxAscent+c.fontBoundingBoxDescent),this._result}}},4269:function(P,n,u){var _=this&&this.__decorate||function(h,o,c,m){var C,S=arguments.length,w=S<3?o:m===null?m=Object.getOwnPropertyDescriptor(o,c):m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(h,o,c,m);else for(var p=h.length-1;p>=0;p--)(C=h[p])&&(w=(S<3?C(w):S>3?C(o,c,w):C(o,c))||w);return S>3&&w&&Object.defineProperty(o,c,w),w},v=this&&this.__param||function(h,o){return function(c,m){o(c,m,h)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CharacterJoinerService=n.JoinedCellData=void 0;const l=u(3734),g=u(643),b=u(511),y=u(2585);class d extends l.AttributeData{constructor(o,c,m){super(),this.content=0,this.combinedData="",this.fg=o.fg,this.bg=o.bg,this.combinedData=c,this._width=m}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(o){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.JoinedCellData=d;let r=n.CharacterJoinerService=class df{constructor(o){this._bufferService=o,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new b.CellData}register(o){const c={id:this._nextCharacterJoinerId++,handler:o};return this._characterJoiners.push(c),c.id}deregister(o){for(let c=0;c<this._characterJoiners.length;c++)if(this._characterJoiners[c].id===o)return this._characterJoiners.splice(c,1),!0;return!1}getJoinedCharacters(o){if(this._characterJoiners.length===0)return[];const c=this._bufferService.buffer.lines.get(o);if(!c||c.length===0)return[];const m=[],C=c.translateToString(!0);let S=0,w=0,p=0,x=c.getFg(0),L=c.getBg(0);for(let O=0;O<c.getTrimmedLength();O++)if(c.loadCell(O,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==x||this._workCell.bg!==L){if(O-S>1){const T=this._getJoinedRanges(C,p,w,c,S);for(let M=0;M<T.length;M++)m.push(T[M])}S=O,p=w,x=this._workCell.fg,L=this._workCell.bg}w+=this._workCell.getChars().length||g.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-S>1){const O=this._getJoinedRanges(C,p,w,c,S);for(let T=0;T<O.length;T++)m.push(O[T])}return m}_getJoinedRanges(o,c,m,C,S){const w=o.substring(c,m);let p=[];try{p=this._characterJoiners[0].handler(w)}catch(x){console.error(x)}for(let x=1;x<this._characterJoiners.length;x++)try{const L=this._characterJoiners[x].handler(w);for(let O=0;O<L.length;O++)df._mergeRanges(p,L[O])}catch(L){console.error(L)}return this._stringRangesToCellRanges(p,C,S),p}_stringRangesToCellRanges(o,c,m){let C=0,S=!1,w=0,p=o[C];if(p){for(let x=m;x<this._bufferService.cols;x++){const L=c.getWidth(x),O=c.getString(x).length||g.WHITESPACE_CELL_CHAR.length;if(L!==0){if(!S&&p[0]<=w&&(p[0]=x,S=!0),p[1]<=w){if(p[1]=x,p=o[++C],!p)break;p[0]<=w?(p[0]=x,S=!0):S=!1}w+=O}}p&&(p[1]=this._bufferService.cols)}}static _mergeRanges(o,c){let m=!1;for(let C=0;C<o.length;C++){const S=o[C];if(m){if(c[1]<=S[0])return o[C-1][1]=c[1],o;if(c[1]<=S[1])return o[C-1][1]=Math.max(c[1],S[1]),o.splice(C,1),o;o.splice(C,1),C--}else{if(c[1]<=S[0])return o.splice(C,0,c),o;if(c[1]<=S[1])return S[0]=Math.min(c[0],S[0]),o;c[0]<S[1]&&(S[0]=Math.min(c[0],S[0]),m=!0)}}return m?o[o.length-1][1]=c[1]:o.push(c),o}};n.CharacterJoinerService=r=_([v(0,y.IBufferService)],r)},5114:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreBrowserService=void 0;const _=u(844),v=u(8460),l=u(3656);class g extends _.Disposable{constructor(d,r,h){super(),this._textarea=d,this._window=r,this.mainDocument=h,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new b(this._window),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new v.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((o=>this._screenDprMonitor.setWindow(o)))),this.register((0,v.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(d){this._window!==d&&(this._window=d,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}}n.CoreBrowserService=g;class b extends _.Disposable{constructor(d){super(),this._parentWindow=d,this._windowResizeListener=this.register(new _.MutableDisposable),this._onDprChange=this.register(new v.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,_.toDisposable)((()=>this.clearListener())))}setWindow(d){this._parentWindow=d,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,l.addDisposableDomListener)(this._parentWindow,"resize",(()=>this._setDprAndFireIfDiffers()))}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var d;this._outerListener&&((d=this._resolutionMediaMatchList)==null||d.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:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkProviderService=void 0;const _=u(844);class v extends _.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,_.toDisposable)((()=>this.linkProviders.length=0)))}registerLinkProvider(g){return this.linkProviders.push(g),{dispose:()=>{const b=this.linkProviders.indexOf(g);b!==-1&&this.linkProviders.splice(b,1)}}}}n.LinkProviderService=v},8934:function(P,n,u){var _=this&&this.__decorate||function(y,d,r,h){var o,c=arguments.length,m=c<3?d:h===null?h=Object.getOwnPropertyDescriptor(d,r):h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(y,d,r,h);else for(var C=y.length-1;C>=0;C--)(o=y[C])&&(m=(c<3?o(m):c>3?o(d,r,m):o(d,r))||m);return c>3&&m&&Object.defineProperty(d,r,m),m},v=this&&this.__param||function(y,d){return function(r,h){d(r,h,y)}};Object.defineProperty(n,"__esModule",{value:!0}),n.MouseService=void 0;const l=u(4725),g=u(9806);let b=n.MouseService=class{constructor(y,d){this._renderService=y,this._charSizeService=d}getCoords(y,d,r,h,o){return(0,g.getCoords)(window,y,d,r,h,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,o)}getMouseReportCoords(y,d){const r=(0,g.getCoordsRelativeToElement)(window,y,d);if(this._charSizeService.hasValidSize)return r[0]=Math.min(Math.max(r[0],0),this._renderService.dimensions.css.canvas.width-1),r[1]=Math.min(Math.max(r[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(r[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(r[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(r[0]),y:Math.floor(r[1])}}};n.MouseService=b=_([v(0,l.IRenderService),v(1,l.ICharSizeService)],b)},3230:function(P,n,u){var _=this&&this.__decorate||function(o,c,m,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,m,C);else for(var x=o.length-1;x>=0;x--)(S=o[x])&&(p=(w<3?S(p):w>3?S(c,m,p):S(c,m))||p);return w>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(o,c){return function(m,C){c(m,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.RenderService=void 0;const l=u(6193),g=u(4725),b=u(8460),y=u(844),d=u(7226),r=u(2585);let h=n.RenderService=class extends y.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(o,c,m,C,S,w,p,x){super(),this._rowCount=o,this._charSizeService=C,this._renderer=this.register(new y.MutableDisposable),this._pausedResizeTask=new d.DebouncedIdleTask,this._observerDisposable=this.register(new y.MutableDisposable),this._isPaused=!1,this._needsFullRefresh=!1,this._isNextRenderRedrawOnly=!0,this._needsSelectionRefresh=!1,this._canvasWidth=0,this._canvasHeight=0,this._selectionState={start:void 0,end:void 0,columnSelectMode:!1},this._onDimensionsChange=this.register(new b.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new b.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new b.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new b.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new l.RenderDebouncer(((L,O)=>this._renderRows(L,O)),p),this.register(this._renderDebouncer),this.register(p.onDprChange((()=>this.handleDevicePixelRatioChange()))),this.register(w.onResize((()=>this._fullRefresh()))),this.register(w.buffers.onBufferActivate((()=>{var L;return(L=this._renderer.value)==null?void 0:L.clear()}))),this.register(m.onOptionChange((()=>this._handleOptionsChanged()))),this.register(this._charSizeService.onCharSizeChange((()=>this.handleCharSizeChanged()))),this.register(S.onDecorationRegistered((()=>this._fullRefresh()))),this.register(S.onDecorationRemoved((()=>this._fullRefresh()))),this.register(m.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],(()=>{this.clear(),this.handleResize(w.cols,w.rows),this._fullRefresh()}))),this.register(m.onMultipleOptionChange(["cursorBlink","cursorStyle"],(()=>this.refreshRows(w.buffer.y,w.buffer.y,!0)))),this.register(x.onChangeColors((()=>this._fullRefresh()))),this._registerIntersectionObserver(p.window,c),this.register(p.onWindowChange((L=>this._registerIntersectionObserver(L,c))))}_registerIntersectionObserver(o,c){if("IntersectionObserver"in o){const m=new o.IntersectionObserver((C=>this._handleIntersectionChange(C[C.length-1])),{threshold:0});m.observe(c),this._observerDisposable.value=(0,y.toDisposable)((()=>m.disconnect()))}}_handleIntersectionChange(o){this._isPaused=o.isIntersecting===void 0?o.intersectionRatio===0:!o.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(o,c,m=!1){this._isPaused?this._needsFullRefresh=!0:(m||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(o,c,this._rowCount))}_renderRows(o,c){this._renderer.value&&(o=Math.min(o,this._rowCount-1),c=Math.min(c,this._rowCount-1),this._renderer.value.renderRows(o,c),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:o,end:c}),this._onRender.fire({start:o,end:c}),this._isNextRenderRedrawOnly=!0)}resize(o,c){this._rowCount=c,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(o){this._renderer.value=o,this._renderer.value&&(this._renderer.value.onRequestRedraw((c=>this.refreshRows(c.start,c.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(o){return this._renderDebouncer.addRefreshCallback(o)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var o,c;this._renderer.value&&((c=(o=this._renderer.value).clearTextureAtlas)==null||c.call(o),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(o,c){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var m;return(m=this._renderer.value)==null?void 0:m.handleResize(o,c)})):this._renderer.value.handleResize(o,c),this._fullRefresh())}handleCharSizeChanged(){var o;(o=this._renderer.value)==null||o.handleCharSizeChanged()}handleBlur(){var o;(o=this._renderer.value)==null||o.handleBlur()}handleFocus(){var o;(o=this._renderer.value)==null||o.handleFocus()}handleSelectionChanged(o,c,m){var C;this._selectionState.start=o,this._selectionState.end=c,this._selectionState.columnSelectMode=m,(C=this._renderer.value)==null||C.handleSelectionChanged(o,c,m)}handleCursorMove(){var o;(o=this._renderer.value)==null||o.handleCursorMove()}clear(){var o;(o=this._renderer.value)==null||o.clear()}};n.RenderService=h=_([v(2,r.IOptionsService),v(3,g.ICharSizeService),v(4,r.IDecorationService),v(5,r.IBufferService),v(6,g.ICoreBrowserService),v(7,g.IThemeService)],h)},9312:function(P,n,u){var _=this&&this.__decorate||function(p,x,L,O){var T,M=arguments.length,U=M<3?x:O===null?O=Object.getOwnPropertyDescriptor(x,L):O;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(p,x,L,O);else for(var K=p.length-1;K>=0;K--)(T=p[K])&&(U=(M<3?T(U):M>3?T(x,L,U):T(x,L))||U);return M>3&&U&&Object.defineProperty(x,L,U),U},v=this&&this.__param||function(p,x){return function(L,O){x(L,O,p)}};Object.defineProperty(n,"__esModule",{value:!0}),n.SelectionService=void 0;const l=u(9806),g=u(9504),b=u(456),y=u(4725),d=u(8460),r=u(844),h=u(6114),o=u(4841),c=u(511),m=u(2585),C=" ",S=new RegExp(C,"g");let w=n.SelectionService=class extends r.Disposable{constructor(p,x,L,O,T,M,U,K,I){super(),this._element=p,this._screenElement=x,this._linkifier=L,this._bufferService=O,this._coreService=T,this._mouseService=M,this._optionsService=U,this._renderService=K,this._coreBrowserService=I,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new c.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new d.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new d.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new d.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new d.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this._mouseMoveListener=q=>this._handleMouseMove(q),this._mouseUpListener=q=>this._handleMouseUp(q),this._coreService.onUserInput((()=>{this.hasSelection&&this.clearSelection()})),this._trimListener=this._bufferService.buffer.lines.onTrim((q=>this._handleTrim(q))),this.register(this._bufferService.buffers.onBufferActivate((q=>this._handleBufferActivate(q)))),this.enable(),this._model=new b.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,r.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 p=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!p||!x||p[0]===x[0]&&p[1]===x[1])}get selectionText(){const p=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!p||!x)return"";const L=this._bufferService.buffer,O=[];if(this._activeSelectionMode===3){if(p[0]===x[0])return"";const T=p[0]<x[0]?p[0]:x[0],M=p[0]<x[0]?x[0]:p[0];for(let U=p[1];U<=x[1];U++){const K=L.translateBufferLineToString(U,!0,T,M);O.push(K)}}else{const T=p[1]===x[1]?x[0]:void 0;O.push(L.translateBufferLineToString(p[1],!0,p[0],T));for(let M=p[1]+1;M<=x[1]-1;M++){const U=L.lines.get(M),K=L.translateBufferLineToString(M,!0);U!=null&&U.isWrapped?O[O.length-1]+=K:O.push(K)}if(p[1]!==x[1]){const M=L.lines.get(x[1]),U=L.translateBufferLineToString(x[1],!0,0,x[0]);M&&M.isWrapped?O[O.length-1]+=U:O.push(U)}}return O.map((T=>T.replace(S," "))).join(h.isWindows?`\r
|
|
54
54
|
`:`
|
|
55
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(p){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&p&&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(p){const x=this._getMouseBufferCoords(p),L=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!!(L&&B&&x)&&this._areCoordsInSelection(x,L,B)}isCellInSelection(p,x){const L=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!L||!B)&&this._areCoordsInSelection([p,x],L,B)}_areCoordsInSelection(p,x,L){return p[1]>x[1]&&p[1]<L[1]||x[1]===L[1]&&p[1]===x[1]&&p[0]>=x[0]&&p[0]<L[0]||x[1]<L[1]&&p[1]===L[1]&&p[0]<L[0]||x[1]<L[1]&&p[1]===x[1]&&p[0]>=x[0]}_selectWordAtCursor(p,x){var T,M;const L=(M=(T=this._linkifier.currentLink)==null?void 0:T.link)==null?void 0:M.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const B=this._getMouseBufferCoords(p);return!!B&&(this._selectWordAt(B,x),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(p,x){this._model.clearSelection(),p=Math.max(p,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,p],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()}_handleTrim(p){this._model.handleTrim(p)&&this.refresh()}_getMouseBufferCoords(p){const x=this._mouseService.getCoords(p,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x}_getMouseEventScrollAmount(p){let x=(0,l.getCoordsRelativeToElement)(this._coreBrowserService.window,p,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return x>=0&&x<=L?0:(x>L&&(x-=L),x=Math.min(Math.max(x,-50),50),x/=50,x/Math.abs(x)+Math.round(14*x))}shouldForceSelection(p){return h.isMac?p.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:p.shiftKey}handleMouseDown(p){if(this._mouseDownTimeStamp=p.timeStamp,(p.button!==2||!this.hasSelection)&&p.button===0){if(!this._enabled){if(!this.shouldForceSelection(p))return;p.stopPropagation()}p.preventDefault(),this._dragScrollAmount=0,this._enabled&&p.shiftKey?this._handleIncrementalClick(p):p.detail===1?this._handleSingleClick(p):p.detail===2?this._handleDoubleClick(p):p.detail===3&&this._handleTripleClick(p),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(p){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(p))}_handleSingleClick(p){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(p)?3:0,this._model.selectionStart=this._getMouseBufferCoords(p),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(p){this._selectWordAtCursor(p,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(p){const x=this._getMouseBufferCoords(p);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))}shouldColumnSelect(p){return p.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(p){if(p.stopImmediatePropagation(),!this._model.selectionStart)return;const x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(p),!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(p),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const B=L.lines.get(this._model.selectionEnd[1]);B&&B.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const p=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(p.ydisp+this._bufferService.rows,p.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=p.ydisp),this.refresh()}}_handleMouseUp(p){const x=p.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&p.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(p,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const B=(0,g.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(B,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const p=this._model.finalSelectionStart,x=this._model.finalSelectionEnd,L=!(!p||!x||p[0]===x[0]&&p[1]===x[1]);L?p&&x&&(this._oldSelectionStart&&this._oldSelectionEnd&&p[0]===this._oldSelectionStart[0]&&p[1]===this._oldSelectionStart[1]&&x[0]===this._oldSelectionEnd[0]&&x[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(p,x,L)):this._oldHasSelection&&this._fireOnSelectionChange(p,x,L)}_fireOnSelectionChange(p,x,L){this._oldSelectionStart=p,this._oldSelectionEnd=x,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(p){this.clearSelection(),this._trimListener.dispose(),this._trimListener=p.activeBuffer.lines.onTrim((x=>this._handleTrim(x)))}_convertViewportColToCharacterIndex(p,x){let L=x;for(let B=0;x>=B;B++){const T=p.loadCell(B,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:T>1&&x!==B&&(L+=T-1)}return L}setSelection(p,x,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[p,x],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(p){this._isClickInSelection(p)||(this._selectWordAtCursor(p,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(p,x,L=!0,B=!0){if(p[0]>=this._bufferService.cols)return;const T=this._bufferService.buffer,M=T.lines.get(p[1]);if(!M)return;const U=T.translateBufferLineToString(p[1],!1);let K=this._convertViewportColToCharacterIndex(M,p[0]),I=K;const q=p[0]-K;let P=0,A=0,H=0,R=0;if(U.charAt(K)===" "){for(;K>0&&U.charAt(K-1)===" ";)K--;for(;I<U.length&&U.charAt(I+1)===" ";)I++}else{let J=p[0],he=p[0];M.getWidth(J)===0&&(P++,J--),M.getWidth(he)===2&&(A++,he++);const ue=M.getString(he).length;for(ue>1&&(R+=ue-1,I+=ue-1);J>0&&K>0&&!this._isCharWordSeparator(M.loadCell(J-1,this._workCell));){M.loadCell(J-1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===0?(P++,J--):W>1&&(H+=W-1,K-=W-1),K--,J--}for(;he<M.length&&I+1<U.length&&!this._isCharWordSeparator(M.loadCell(he+1,this._workCell));){M.loadCell(he+1,this._workCell);const W=this._workCell.getChars().length;this._workCell.getWidth()===2?(A++,he++):W>1&&(R+=W-1,I+=W-1),I++,he++}}I++;let z=K+q-P+H,V=Math.min(this._bufferService.cols,I-K+P+A-H-R);if(x||U.slice(K,I).trim()!==""){if(L&&z===0&&M.getCodePoint(0)!==32){const J=T.lines.get(p[1]-1);if(J&&M.isWrapped&&J.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,p[1]-1],!1,!0,!1);if(he){const ue=this._bufferService.cols-he.start;z-=ue,V+=ue}}}if(B&&z+V===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const J=T.lines.get(p[1]+1);if(J!=null&&J.isWrapped&&J.getCodePoint(0)!==32){const he=this._getWordAt([0,p[1]+1],!1,!1,!0);he&&(V+=he.length)}}return{start:z,length:V}}}_selectWordAt(p,x){const L=this._getWordAt(p,x);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,p[1]--;this._model.selectionStart=[L.start,p[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(p){const x=this._getWordAt(p,!0);if(x){let L=p[1];for(;x.start<0;)x.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,L]}}_isCharWordSeparator(p){return p.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(p.getChars())>=0}_selectLineAt(p){const x=this._bufferService.buffer.getWrappedRangeForLine(p),L={start:{x:0,y:x.first},end:{x:this._bufferService.cols-1,y:x.last}};this._model.selectionStart=[0,x.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols)}};n.SelectionService=w=_([v(3,m.IBufferService),v(4,m.ICoreService),v(5,y.IMouseService),v(6,m.IOptionsService),v(7,y.IRenderService),v(8,y.ICoreBrowserService)],w)},4725:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ILinkProviderService=n.IThemeService=n.ICharacterJoinerService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;const _=f(8343);n.ICharSizeService=(0,_.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),n.IMouseService=(0,_.createDecorator)("MouseService"),n.IRenderService=(0,_.createDecorator)("RenderService"),n.ISelectionService=(0,_.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,_.createDecorator)("ThemeService"),n.ILinkProviderService=(0,_.createDecorator)("LinkProviderService")},6731:function(F,n,f){var _=this&&this.__decorate||function(w,p,x,L){var B,T=arguments.length,M=T<3?p:L===null?L=Object.getOwnPropertyDescriptor(p,x):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(w,p,x,L);else for(var U=w.length-1;U>=0;U--)(B=w[U])&&(M=(T<3?B(M):T>3?B(p,x,M):B(p,x))||M);return T>3&&M&&Object.defineProperty(p,x,M),M},v=this&&this.__param||function(w,p){return function(x,L){p(x,L,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const l=f(7239),g=f(8055),b=f(8460),y=f(844),u=f(2585),r=g.css.toColor("#ffffff"),h=g.css.toColor("#000000"),o=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],p=[0,95,135,175,215,255];for(let x=0;x<216;x++){const L=p[x/36%6|0],B=p[x/6%6|0],T=p[x%6];w.push({css:g.channels.toCss(L,B,T),rgba:g.channels.toRgba(L,B,T)})}for(let x=0;x<24;x++){const L=8+10*x;w.push({css:g.channels.toCss(L,L,L),rgba:g.channels.toRgba(L,L,L)})}return w})());let C=n.ThemeService=class extends y.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new l.ColorContrastCache,this._halfContrastCache=new l.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:o,cursorAccent:c,selectionForeground:void 0,selectionBackgroundTransparent:m,selectionBackgroundOpaque:g.color.blend(h,m),selectionInactiveBackgroundTransparent:m,selectionInactiveBackgroundOpaque:g.color.blend(h,m),ansi:n.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 p=this._colors;if(p.foreground=S(w.foreground,r),p.background=S(w.background,h),p.cursor=S(w.cursor,o),p.cursorAccent=S(w.cursorAccent,c),p.selectionBackgroundTransparent=S(w.selectionBackground,m),p.selectionBackgroundOpaque=g.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=S(w.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=g.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=w.selectionForeground?S(w.selectionForeground,g.NULL_COLOR):void 0,p.selectionForeground===g.NULL_COLOR&&(p.selectionForeground=void 0),g.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=g.color.opacity(p.selectionBackgroundTransparent,.3)),g.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=g.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=n.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=S(w.black,n.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=S(w.red,n.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=S(w.green,n.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=S(w.yellow,n.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=S(w.blue,n.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=S(w.magenta,n.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=S(w.cyan,n.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=S(w.white,n.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=S(w.brightBlack,n.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=S(w.brightRed,n.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=S(w.brightGreen,n.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=S(w.brightYellow,n.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=S(w.brightBlue,n.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=S(w.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=S(w.brightCyan,n.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=S(w.brightWhite,n.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const x=Math.min(p.ansi.length-16,w.extendedAnsi.length);for(let L=0;L<x;L++)p.ansi[L+16]=S(w.extendedAnsi[L],n.DEFAULT_ANSI_COLORS[L+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 p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}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 S(w,p){if(w!==void 0)try{return g.css.toColor(w)}catch{}return p}n.ThemeService=C=_([v(0,u.IOptionsService)],C)},6349:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const _=f(8460),v=f(844);class l extends v.Disposable{constructor(b){super(),this._maxLength=b,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(b){if(this._maxLength===b)return;const y=new Array(b);for(let u=0;u<Math.min(b,this.length);u++)y[u]=this._array[this._getCyclicIndex(u)];this._array=y,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let y=this._length;y<b;y++)this._array[y]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,y){this._array[this._getCyclicIndex(b)]=y}push(b){this._array[this._getCyclicIndex(this._length)]=b,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(b,y,...u){if(y){for(let r=b;r<this._length-y;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+y)];this._length-=y,this.onDeleteEmitter.fire({index:b,amount:y})}for(let r=this._length-1;r>=b;r--)this._array[this._getCyclicIndex(r+u.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<u.length;r++)this._array[this._getCyclicIndex(b+r)]=u[r];if(u.length&&this.onInsertEmitter.fire({index:b,amount:u.length}),this._length+u.length>this._maxLength){const r=this._length+u.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=u.length}trimStart(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,y,u){if(!(y<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+u<0)throw new Error("Cannot shift elements in list beyond index 0");if(u>0){for(let h=y-1;h>=0;h--)this.set(b+h+u,this.get(b+h));const r=b+y+u-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<y;r++)this.set(b+r+u,this.get(b+r))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}n.CircularList=l},1439:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function f(_,v=5){if(typeof _!="object")return _;const l=Array.isArray(_)?[]:{};for(const g in _)l[g]=v<=1?_[g]:_[g]&&f(_[g],v-1);return l}},8055:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let f=0,_=0,v=0,l=0;var g,b,y,u,r;function h(c){const m=c.toString(16);return m.length<2?"0"+m:m}function o(c,m){return c<m?(m+.05)/(c+.05):(c+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(m,C,S,w){return w!==void 0?`#${h(m)}${h(C)}${h(S)}${h(w)}`:`#${h(m)}${h(C)}${h(S)}`},c.toRgba=function(m,C,S,w=255){return(m<<24|C<<16|S<<8|w)>>>0},c.toColor=function(m,C,S,w){return{css:c.toCss(m,C,S,w),rgba:c.toRgba(m,C,S,w)}}})(g||(n.channels=g={})),(function(c){function m(C,S){return l=Math.round(255*S),[f,_,v]=r.toChannels(C.rgba),{css:g.toCss(f,_,v,l),rgba:g.toRgba(f,_,v,l)}}c.blend=function(C,S){if(l=(255&S.rgba)/255,l===1)return{css:S.css,rgba:S.rgba};const w=S.rgba>>24&255,p=S.rgba>>16&255,x=S.rgba>>8&255,L=C.rgba>>24&255,B=C.rgba>>16&255,T=C.rgba>>8&255;return f=L+Math.round((w-L)*l),_=B+Math.round((p-B)*l),v=T+Math.round((x-T)*l),{css:g.toCss(f,_,v),rgba:g.toRgba(f,_,v)}},c.isOpaque=function(C){return(255&C.rgba)==255},c.ensureContrastRatio=function(C,S,w){const p=r.ensureContrastRatio(C.rgba,S.rgba,w);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(C){const S=(255|C.rgba)>>>0;return[f,_,v]=r.toChannels(S),{css:g.toCss(f,_,v),rgba:S}},c.opacity=m,c.multiplyOpacity=function(C,S){return l=255&C.rgba,m(C,l*S/255)},c.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(b||(n.color=b={})),(function(c){let m,C;try{const S=document.createElement("canvas");S.width=1,S.height=1;const w=S.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",C=m.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return f=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),g.toColor(f,_,v);case 5:return f=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),l=parseInt(S.slice(4,5).repeat(2),16),g.toColor(f,_,v,l);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const w=S.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]),_=parseInt(w[2]),v=parseInt(w[3]),l=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(f,_,v,l);if(!m||!C)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=C,m.fillStyle=S,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[f,_,v,l]=m.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(f,_,v,l),css:S}}})(y||(n.css=y={})),(function(c){function m(C,S,w){const p=C/255,x=S/255,L=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(C){return m(C>>16&255,C>>8&255,255&C)},c.relativeLuminance2=m})(u||(n.rgb=u={})),(function(c){function m(S,w,p){const x=S>>24&255,L=S>>16&255,B=S>>8&255;let T=w>>24&255,M=w>>16&255,U=w>>8&255,K=o(u.relativeLuminance2(T,M,U),u.relativeLuminance2(x,L,B));for(;K<p&&(T>0||M>0||U>0);)T-=Math.max(0,Math.ceil(.1*T)),M-=Math.max(0,Math.ceil(.1*M)),U-=Math.max(0,Math.ceil(.1*U)),K=o(u.relativeLuminance2(T,M,U),u.relativeLuminance2(x,L,B));return(T<<24|M<<16|U<<8|255)>>>0}function C(S,w,p){const x=S>>24&255,L=S>>16&255,B=S>>8&255;let T=w>>24&255,M=w>>16&255,U=w>>8&255,K=o(u.relativeLuminance2(T,M,U),u.relativeLuminance2(x,L,B));for(;K<p&&(T<255||M<255||U<255);)T=Math.min(255,T+Math.ceil(.1*(255-T))),M=Math.min(255,M+Math.ceil(.1*(255-M))),U=Math.min(255,U+Math.ceil(.1*(255-U))),K=o(u.relativeLuminance2(T,M,U),u.relativeLuminance2(x,L,B));return(T<<24|M<<16|U<<8|255)>>>0}c.blend=function(S,w){if(l=(255&w)/255,l===1)return w;const p=w>>24&255,x=w>>16&255,L=w>>8&255,B=S>>24&255,T=S>>16&255,M=S>>8&255;return f=B+Math.round((p-B)*l),_=T+Math.round((x-T)*l),v=M+Math.round((L-M)*l),g.toRgba(f,_,v)},c.ensureContrastRatio=function(S,w,p){const x=u.relativeLuminance(S>>8),L=u.relativeLuminance(w>>8);if(o(x,L)<p){if(L<x){const M=m(S,w,p),U=o(x,u.relativeLuminance(M>>8));if(U<p){const K=C(S,w,p);return U>o(x,u.relativeLuminance(K>>8))?M:K}return M}const B=C(S,w,p),T=o(x,u.relativeLuminance(B>>8));if(T<p){const M=m(S,w,p);return T>o(x,u.relativeLuminance(M>>8))?B:M}return B}},c.reduceLuminance=m,c.increaseLuminance=C,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},8969:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const _=f(844),v=f(2585),l=f(4348),g=f(7866),b=f(744),y=f(7302),u=f(6975),r=f(8460),h=f(1753),o=f(1480),c=f(7994),m=f(9282),C=f(5435),S=f(5981),w=f(2660);let p=!1;class x extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((B=>{var T;(T=this._onScrollApi)==null||T.fire(B.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(B){for(const T in B)this.optionsService.options[T]=B[T]}constructor(B){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new l.InstantiationService,this.optionsService=this.register(new y.OptionsService(B)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(u.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(c.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.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((T=>{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((T=>{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 S.WriteBuffer(((T,M)=>this._inputHandler.parse(T,M)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(B,T){this._writeBuffer.write(B,T)}writeSync(B,T){this._logService.logLevel<=v.LogLevelEnum.WARN&&!p&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p=!0),this._writeBuffer.writeSync(B,T)}input(B,T=!0){this.coreService.triggerDataEvent(B,T)}resize(B,T){isNaN(B)||isNaN(T)||(B=Math.max(B,b.MINIMUM_COLS),T=Math.max(T,b.MINIMUM_ROWS),this._bufferService.resize(B,T))}scroll(B,T=!1){this._bufferService.scroll(B,T)}scrollLines(B,T,M){this._bufferService.scrollLines(B,T,M)}scrollPages(B){this.scrollLines(B*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(B){const T=B-this._bufferService.buffer.ydisp;T!==0&&this.scrollLines(T)}registerEscHandler(B,T){return this._inputHandler.registerEscHandler(B,T)}registerDcsHandler(B,T){return this._inputHandler.registerDcsHandler(B,T)}registerCsiHandler(B,T){return this._inputHandler.registerCsiHandler(B,T)}registerOscHandler(B,T){return this._inputHandler.registerOscHandler(B,T)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let B=!1;const T=this.optionsService.rawOptions.windowsPty;T&&T.buildNumber!==void 0&&T.buildNumber!==void 0?B=T.backend==="conpty"&&T.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(B=!0),B?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const B=[];B.push(this.onLineFeed(m.updateWindowsModeWrappedState.bind(null,this._bufferService))),B.push(this.registerCsiHandler({final:"H"},(()=>((0,m.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const T of B)T.dispose()}))}}}n.CoreTerminal=x},8460:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.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 _=0;_<this._listeners.length;_++)if(this._listeners[_]===f)return void this._listeners.splice(_,1)}}})),this._event}fire(f,_){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,f,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(f,_){return f((v=>_.fire(v)))},n.runAndSubscribe=function(f,_){return _(void 0),f((v=>_(v)))}},5435:function(F,n,f){var _=this&&this.__decorate||function(P,A,H,R){var z,V=arguments.length,J=V<3?A:R===null?R=Object.getOwnPropertyDescriptor(A,H):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")J=Reflect.decorate(P,A,H,R);else for(var he=P.length-1;he>=0;he--)(z=P[he])&&(J=(V<3?z(J):V>3?z(A,H,J):z(A,H))||J);return V>3&&J&&Object.defineProperty(A,H,J),J},v=this&&this.__param||function(P,A){return function(H,R){A(H,R,P)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const l=f(2584),g=f(7116),b=f(2015),y=f(844),u=f(482),r=f(8437),h=f(8460),o=f(643),c=f(511),m=f(3734),C=f(2585),S=f(1480),w=f(6242),p=f(6351),x=f(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},B=131072;function T(P,A){if(P>24)return A.setWinLines||!1;switch(P){case 1:return!!A.restoreWin;case 2:return!!A.minimizeWin;case 3:return!!A.setWinPosition;case 4:return!!A.setWinSizePixels;case 5:return!!A.raiseWin;case 6:return!!A.lowerWin;case 7:return!!A.refreshWin;case 8:return!!A.setWinSizeChars;case 9:return!!A.maximizeWin;case 10:return!!A.fullscreenWin;case 11:return!!A.getWinState;case 13:return!!A.getWinPosition;case 14:return!!A.getWinSizePixels;case 15:return!!A.getScreenSizePixels;case 16:return!!A.getCellSizePixels;case 18:return!!A.getWinSizeChars;case 19:return!!A.getScreenSizeChars;case 20:return!!A.getIconTitle;case 21:return!!A.getWinTitle;case 22:return!!A.pushTitle;case 23:return!!A.popTitle;case 24:return!!A.setWinLines}return!1}var M;(function(P){P[P.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",P[P.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(n.WindowsOptionsReportType=M={}));let U=0;class K extends y.Disposable{getAttrData(){return this._curAttrData}constructor(A,H,R,z,V,J,he,ue,W=new b.EscapeSequenceParser){super(),this._bufferService=A,this._charsetService=H,this._coreService=R,this._logService=z,this._optionsService=V,this._oscLinkService=J,this._coreMouseService=he,this._unicodeService=ue,this._parser=W,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new u.StringToUtf32,this._utf8Decoder=new u.Utf8ToUtf32,this._workCell=new c.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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 I(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((N=>this._activeBuffer=N.activeBuffer))),this._parser.setCsiHandlerFallback(((N,ne)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(N),params:ne.toArray()})})),this._parser.setEscHandlerFallback((N=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(N)})})),this._parser.setExecuteHandlerFallback((N=>{this._logService.debug("Unknown EXECUTE code: ",{code:N})})),this._parser.setOscHandlerFallback(((N,ne,re)=>{this._logService.debug("Unknown OSC code: ",{identifier:N,action:ne,data:re})})),this._parser.setDcsHandlerFallback(((N,ne,re)=>{ne==="HOOK"&&(re=re.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(N),action:ne,payload:re})})),this._parser.setPrintHandler(((N,ne,re)=>this.print(N,ne,re))),this._parser.registerCsiHandler({final:"@"},(N=>this.insertChars(N))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(N=>this.scrollLeft(N))),this._parser.registerCsiHandler({final:"A"},(N=>this.cursorUp(N))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(N=>this.scrollRight(N))),this._parser.registerCsiHandler({final:"B"},(N=>this.cursorDown(N))),this._parser.registerCsiHandler({final:"C"},(N=>this.cursorForward(N))),this._parser.registerCsiHandler({final:"D"},(N=>this.cursorBackward(N))),this._parser.registerCsiHandler({final:"E"},(N=>this.cursorNextLine(N))),this._parser.registerCsiHandler({final:"F"},(N=>this.cursorPrecedingLine(N))),this._parser.registerCsiHandler({final:"G"},(N=>this.cursorCharAbsolute(N))),this._parser.registerCsiHandler({final:"H"},(N=>this.cursorPosition(N))),this._parser.registerCsiHandler({final:"I"},(N=>this.cursorForwardTab(N))),this._parser.registerCsiHandler({final:"J"},(N=>this.eraseInDisplay(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(N=>this.eraseInDisplay(N,!0))),this._parser.registerCsiHandler({final:"K"},(N=>this.eraseInLine(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(N=>this.eraseInLine(N,!0))),this._parser.registerCsiHandler({final:"L"},(N=>this.insertLines(N))),this._parser.registerCsiHandler({final:"M"},(N=>this.deleteLines(N))),this._parser.registerCsiHandler({final:"P"},(N=>this.deleteChars(N))),this._parser.registerCsiHandler({final:"S"},(N=>this.scrollUp(N))),this._parser.registerCsiHandler({final:"T"},(N=>this.scrollDown(N))),this._parser.registerCsiHandler({final:"X"},(N=>this.eraseChars(N))),this._parser.registerCsiHandler({final:"Z"},(N=>this.cursorBackwardTab(N))),this._parser.registerCsiHandler({final:"`"},(N=>this.charPosAbsolute(N))),this._parser.registerCsiHandler({final:"a"},(N=>this.hPositionRelative(N))),this._parser.registerCsiHandler({final:"b"},(N=>this.repeatPrecedingCharacter(N))),this._parser.registerCsiHandler({final:"c"},(N=>this.sendDeviceAttributesPrimary(N))),this._parser.registerCsiHandler({prefix:">",final:"c"},(N=>this.sendDeviceAttributesSecondary(N))),this._parser.registerCsiHandler({final:"d"},(N=>this.linePosAbsolute(N))),this._parser.registerCsiHandler({final:"e"},(N=>this.vPositionRelative(N))),this._parser.registerCsiHandler({final:"f"},(N=>this.hVPosition(N))),this._parser.registerCsiHandler({final:"g"},(N=>this.tabClear(N))),this._parser.registerCsiHandler({final:"h"},(N=>this.setMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(N=>this.setModePrivate(N))),this._parser.registerCsiHandler({final:"l"},(N=>this.resetMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(N=>this.resetModePrivate(N))),this._parser.registerCsiHandler({final:"m"},(N=>this.charAttributes(N))),this._parser.registerCsiHandler({final:"n"},(N=>this.deviceStatus(N))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(N=>this.deviceStatusPrivate(N))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(N=>this.softReset(N))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(N=>this.setCursorStyle(N))),this._parser.registerCsiHandler({final:"r"},(N=>this.setScrollRegion(N))),this._parser.registerCsiHandler({final:"s"},(N=>this.saveCursor(N))),this._parser.registerCsiHandler({final:"t"},(N=>this.windowOptions(N))),this._parser.registerCsiHandler({final:"u"},(N=>this.restoreCursor(N))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(N=>this.insertColumns(N))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(N=>this.deleteColumns(N))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(N=>this.selectProtected(N))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(N=>this.requestMode(N,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(N=>this.requestMode(N,!1))),this._parser.setExecuteHandler(l.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(l.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(l.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(l.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(l.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(l.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(l.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(l.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(l.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((N=>(this.setTitle(N),this.setIconName(N),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((N=>this.setIconName(N)))),this._parser.registerOscHandler(2,new w.OscHandler((N=>this.setTitle(N)))),this._parser.registerOscHandler(4,new w.OscHandler((N=>this.setOrReportIndexedColor(N)))),this._parser.registerOscHandler(8,new w.OscHandler((N=>this.setHyperlink(N)))),this._parser.registerOscHandler(10,new w.OscHandler((N=>this.setOrReportFgColor(N)))),this._parser.registerOscHandler(11,new w.OscHandler((N=>this.setOrReportBgColor(N)))),this._parser.registerOscHandler(12,new w.OscHandler((N=>this.setOrReportCursorColor(N)))),this._parser.registerOscHandler(104,new w.OscHandler((N=>this.restoreIndexedColor(N)))),this._parser.registerOscHandler(110,new w.OscHandler((N=>this.restoreFgColor(N)))),this._parser.registerOscHandler(111,new w.OscHandler((N=>this.restoreBgColor(N)))),this._parser.registerOscHandler(112,new w.OscHandler((N=>this.restoreCursorColor(N)))),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 N in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:N},(()=>this.selectCharset("("+N))),this._parser.registerEscHandler({intermediates:")",final:N},(()=>this.selectCharset(")"+N))),this._parser.registerEscHandler({intermediates:"*",final:N},(()=>this.selectCharset("*"+N))),this._parser.registerEscHandler({intermediates:"+",final:N},(()=>this.selectCharset("+"+N))),this._parser.registerEscHandler({intermediates:"-",final:N},(()=>this.selectCharset("-"+N))),this._parser.registerEscHandler({intermediates:".",final:N},(()=>this.selectCharset("."+N))),this._parser.registerEscHandler({intermediates:"/",final:N},(()=>this.selectCharset("/"+N)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((N=>(this._logService.error("Parsing error: ",N),N))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((N,ne)=>this.requestStatusString(N,ne))))}_preserveStack(A,H,R,z){this._parseStack.paused=!0,this._parseStack.cursorStartX=A,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=R,this._parseStack.position=z}_logSlowResolvingAsync(A){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([A,new Promise(((H,R)=>setTimeout((()=>R("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(A,H){let R,z=this._activeBuffer.x,V=this._activeBuffer.y,J=0;const he=this._parseStack.paused;if(he){if(R=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(R),R;z=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,A.length>B&&(J=this._parseStack.position+B)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof A=="string"?` "${A}"`:` "${Array.prototype.map.call(A,(N=>String.fromCharCode(N))).join("")}"`),typeof A=="string"?A.split("").map((N=>N.charCodeAt(0))):A),this._parseBuffer.length<A.length&&this._parseBuffer.length<B&&(this._parseBuffer=new Uint32Array(Math.min(A.length,B))),he||this._dirtyRowTracker.clearRange(),A.length>B)for(let N=J;N<A.length;N+=B){const ne=N+B<A.length?N+B:A.length,re=typeof A=="string"?this._stringDecoder.decode(A.substring(N,ne),this._parseBuffer):this._utf8Decoder.decode(A.subarray(N,ne),this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,re))return this._preserveStack(z,V,re,N),this._logSlowResolvingAsync(R),R}else if(!he){const N=typeof A=="string"?this._stringDecoder.decode(A,this._parseBuffer):this._utf8Decoder.decode(A,this._parseBuffer);if(R=this._parser.parse(this._parseBuffer,N))return this._preserveStack(z,V,N,0),this._logSlowResolvingAsync(R),R}this._activeBuffer.x===z&&this._activeBuffer.y===V||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),W=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);W<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(W,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(A,H,R){let z,V;const J=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,W=this._coreService.decPrivateModes.wraparound,N=this._coreService.modes.insertMode,ne=this._curAttrData;let re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&R-H>0&&re.getWidth(this._activeBuffer.x-1)===2&&re.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ne);let _e=this._parser.precedingJoinState;for(let fe=H;fe<R;++fe){if(z=A[fe],z<127&&J){const Qe=J[String.fromCharCode(z)];Qe&&(z=Qe.charCodeAt(0))}const xe=this._unicodeService.charProperties(z,_e);V=S.UnicodeService.extractWidth(xe);const pe=S.UnicodeService.extractShouldJoin(xe),Ne=pe?S.UnicodeService.extractWidth(_e):0;if(_e=xe,he&&this._onA11yChar.fire((0,u.stringFromCodePoint)(z)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-Ne>ue){if(W){const Qe=re;let be=this._activeBuffer.x-Ne;for(this._activeBuffer.x=Ne,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ne>0&&re instanceof r.BufferLine&&re.copyCellsFrom(Qe,be,0,Ne,!1);be<ue;)Qe.setCellFromCodepoint(be++,0,1,ne)}else if(this._activeBuffer.x=ue-1,V===2)continue}if(pe&&this._activeBuffer.x){const Qe=re.getWidth(this._activeBuffer.x-1)?1:2;re.addCodepointToCell(this._activeBuffer.x-Qe,z,V);for(let be=V-Ne;--be>=0;)re.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}else if(N&&(re.insertCells(this._activeBuffer.x,V-Ne,this._activeBuffer.getNullCell(ne)),re.getWidth(ue-1)===2&&re.setCellFromCodepoint(ue-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,ne)),re.setCellFromCodepoint(this._activeBuffer.x++,z,V,ne),V>0)for(;--V;)re.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}this._parser.precedingJoinState=_e,this._activeBuffer.x<ue&&R-H>0&&re.getWidth(this._activeBuffer.x)===0&&!re.hasContent(this._activeBuffer.x)&&re.setCellFromCodepoint(this._activeBuffer.x,0,1,ne),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(A,H){return A.final!=="t"||A.prefix||A.intermediates?this._parser.registerCsiHandler(A,H):this._parser.registerCsiHandler(A,(R=>!T(R.params[0],this._optionsService.rawOptions.windowOptions)||H(R)))}registerDcsHandler(A,H){return this._parser.registerDcsHandler(A,new p.DcsHandler(H))}registerEscHandler(A,H){return this._parser.registerEscHandler(A,H)}registerOscHandler(A,H){return this._parser.registerOscHandler(A,new w.OscHandler(H))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var A;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((A=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&A.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const A=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-A),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(A=this._bufferService.cols-1){this._activeBuffer.x=Math.min(A,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(A,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=A,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=A,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(A,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+A,this._activeBuffer.y+H)}cursorUp(A){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,A.params[0]||1)):this._moveCursor(0,-(A.params[0]||1)),!0}cursorDown(A){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,A.params[0]||1)):this._moveCursor(0,A.params[0]||1),!0}cursorForward(A){return this._moveCursor(A.params[0]||1,0),!0}cursorBackward(A){return this._moveCursor(-(A.params[0]||1),0),!0}cursorNextLine(A){return this.cursorDown(A),this._activeBuffer.x=0,!0}cursorPrecedingLine(A){return this.cursorUp(A),this._activeBuffer.x=0,!0}cursorCharAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(A){return this._setCursor(A.length>=2?(A.params[1]||1)-1:0,(A.params[0]||1)-1),!0}charPosAbsolute(A){return this._setCursor((A.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(A){return this._moveCursor(A.params[0]||1,0),!0}linePosAbsolute(A){return this._setCursor(this._activeBuffer.x,(A.params[0]||1)-1),!0}vPositionRelative(A){return this._moveCursor(0,A.params[0]||1),!0}hVPosition(A){return this.cursorPosition(A),!0}tabClear(A){const H=A.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=A.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(A){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=A.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(A){const H=A.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(A,H,R,z=!1,V=!1){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);J.replaceCells(H,R,this._activeBuffer.getNullCell(this._eraseAttrData()),V),z&&(J.isWrapped=!1)}_resetBufferLine(A,H=!1){const R=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);R&&(R.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+A),R.isWrapped=!1)}eraseInDisplay(A,H=!1){let R;switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);R<this._bufferService.rows;R++)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(R);break;case 1:for(R=this._activeBuffer.y,this._dirtyRowTracker.markDirty(R),this._eraseInBufferLine(R,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(R+1).isWrapped=!1);R--;)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(R=this._bufferService.rows,this._dirtyRowTracker.markDirty(R-1);R--;)this._resetBufferLine(R,H);this._dirtyRowTracker.markDirty(0);break;case 3:const z=this._activeBuffer.lines.length-this._bufferService.rows;z>0&&(this._activeBuffer.lines.trimStart(z),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-z,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-z,0),this._onScroll.fire(0))}return!0}eraseInLine(A,H=!1){switch(this._restrictCursor(this._bufferService.cols),A.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(A){this._restrictCursor();let H=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y,z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-z+1;for(;H--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(R,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(A){this._restrictCursor();let H=A.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const R=this._activeBuffer.ybase+this._activeBuffer.y;let z;for(z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,z=this._bufferService.rows-1+this._activeBuffer.ybase-z;H--;)this._activeBuffer.lines.splice(R,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(A){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(A){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,A.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(A){let H=A.params[0]||1;for(;H--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(A){let H=A.params[0]||1;for(;H--;)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(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=A.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);z.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=A.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);z.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=A.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);z.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(A){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=A.params[0]||1;for(let R=this._activeBuffer.scrollTop;R<=this._activeBuffer.scrollBottom;++R){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);z.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(A){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(A.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(A){const H=this._parser.precedingJoinState;if(!H)return!0;const R=A.params[0]||1,z=S.UnicodeService.extractWidth(H),V=this._activeBuffer.x-z,J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),he=new Uint32Array(J.length*R);let ue=0;for(let N=0;N<J.length;){const ne=J.codePointAt(N)||0;he[ue++]=ne,N+=ne>65535?2:1}let W=ue;for(let N=1;N<R;++N)he.copyWithin(W,0,ue),W+=ue;return this.print(he,0,W),!0}sendDeviceAttributesPrimary(A){return A.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(l.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(l.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(A){return A.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(l.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(l.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(A.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(l.C0.ESC+"[>83;40003;0c")),!0}_is(A){return(this._optionsService.rawOptions.termName+"").indexOf(A)===0}setMode(A){for(let H=0;H<A.length;H++)switch(A.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(A){for(let H=0;H<A.length;H++)switch(A.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(A){for(let H=0;H<A.length;H++)switch(A.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(A){for(let H=0;H<A.length;H++)switch(A.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),A.params[H]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(A,H){const R=this._coreService.decPrivateModes,{activeProtocol:z,activeEncoding:V}=this._coreMouseService,J=this._coreService,{buffers:he,cols:ue}=this._bufferService,{active:W,alt:N}=he,ne=this._optionsService.rawOptions,re=pe=>pe?1:2,_e=A.params[0];return fe=_e,xe=H?_e===2?4:_e===4?re(J.modes.insertMode):_e===12?3:_e===20?re(ne.convertEol):0:_e===1?re(R.applicationCursorKeys):_e===3?ne.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:_e===6?re(R.origin):_e===7?re(R.wraparound):_e===8?3:_e===9?re(z==="X10"):_e===12?re(ne.cursorBlink):_e===25?re(!J.isCursorHidden):_e===45?re(R.reverseWraparound):_e===66?re(R.applicationKeypad):_e===67?4:_e===1e3?re(z==="VT200"):_e===1002?re(z==="DRAG"):_e===1003?re(z==="ANY"):_e===1004?re(R.sendFocus):_e===1005?4:_e===1006?re(V==="SGR"):_e===1015?4:_e===1016?re(V==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?re(W===N):_e===2004?re(R.bracketedPasteMode):0,J.triggerDataEvent(`${l.C0.ESC}[${H?"":"?"}${fe};${xe}$y`),!0;var fe,xe}_updateAttrColor(A,H,R,z,V){return H===2?(A|=50331648,A&=-16777216,A|=m.AttributeData.fromColorRGB([R,z,V])):H===5&&(A&=-50331904,A|=33554432|255&R),A}_extractColor(A,H,R){const z=[0,0,-1,0,0,0];let V=0,J=0;do{if(z[J+V]=A.params[H+J],A.hasSubParams(H+J)){const he=A.getSubParams(H+J);let ue=0;do z[1]===5&&(V=1),z[J+ue+1+V]=he[ue];while(++ue<he.length&&ue+J+1+V<z.length);break}if(z[1]===5&&J+V>=2||z[1]===2&&J+V>=5)break;z[1]&&(V=1)}while(++J+H<A.length&&J+V<z.length);for(let he=2;he<z.length;++he)z[he]===-1&&(z[he]=0);switch(z[0]){case 38:R.fg=this._updateAttrColor(R.fg,z[1],z[3],z[4],z[5]);break;case 48:R.bg=this._updateAttrColor(R.bg,z[1],z[3],z[4],z[5]);break;case 58:R.extended=R.extended.clone(),R.extended.underlineColor=this._updateAttrColor(R.extended.underlineColor,z[1],z[3],z[4],z[5])}return J}_processUnderline(A,H){H.extended=H.extended.clone(),(!~A||A>5)&&(A=1),H.extended.underlineStyle=A,H.fg|=268435456,A===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(A){A.fg=r.DEFAULT_ATTR_DATA.fg,A.bg=r.DEFAULT_ATTR_DATA.bg,A.extended=A.extended.clone(),A.extended.underlineStyle=0,A.extended.underlineColor&=-67108864,A.updateExtended()}charAttributes(A){if(A.length===1&&A.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=A.length;let R;const z=this._curAttrData;for(let V=0;V<H;V++)R=A.params[V],R>=30&&R<=37?(z.fg&=-50331904,z.fg|=16777216|R-30):R>=40&&R<=47?(z.bg&=-50331904,z.bg|=16777216|R-40):R>=90&&R<=97?(z.fg&=-50331904,z.fg|=16777224|R-90):R>=100&&R<=107?(z.bg&=-50331904,z.bg|=16777224|R-100):R===0?this._processSGR0(z):R===1?z.fg|=134217728:R===3?z.bg|=67108864:R===4?(z.fg|=268435456,this._processUnderline(A.hasSubParams(V)?A.getSubParams(V)[0]:1,z)):R===5?z.fg|=536870912:R===7?z.fg|=67108864:R===8?z.fg|=1073741824:R===9?z.fg|=2147483648:R===2?z.bg|=134217728:R===21?this._processUnderline(2,z):R===22?(z.fg&=-134217729,z.bg&=-134217729):R===23?z.bg&=-67108865:R===24?(z.fg&=-268435457,this._processUnderline(0,z)):R===25?z.fg&=-536870913:R===27?z.fg&=-67108865:R===28?z.fg&=-1073741825:R===29?z.fg&=2147483647:R===39?(z.fg&=-67108864,z.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):R===49?(z.bg&=-67108864,z.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):R===38||R===48||R===58?V+=this._extractColor(A,V,z):R===53?z.bg|=1073741824:R===55?z.bg&=-1073741825:R===59?(z.extended=z.extended.clone(),z.extended.underlineColor=-1,z.updateExtended()):R===100?(z.fg&=-67108864,z.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,z.bg&=-67108864,z.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",R);return!0}deviceStatus(A){switch(A.params[0]){case 5:this._coreService.triggerDataEvent(`${l.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[${H};${R}R`)}return!0}deviceStatusPrivate(A){if(A.params[0]===6){const H=this._activeBuffer.y+1,R=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[?${H};${R}R`)}return!0}softReset(A){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(A){const H=A.params[0]||1;switch(H){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 R=H%2==1;return this._optionsService.options.cursorBlink=R,!0}setScrollRegion(A){const H=A.params[0]||1;let R;return(A.length<2||(R=A.params[1])>this._bufferService.rows||R===0)&&(R=this._bufferService.rows),R>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=R-1,this._setCursor(0,0)),!0}windowOptions(A){if(!T(A.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=A.length>1?A.params[1]:0;switch(A.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${l.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(A){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(A){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(A){return this._windowTitle=A,this._onTitleChange.fire(A),!0}setIconName(A){return this._iconName=A,!0}setOrReportIndexedColor(A){const H=[],R=A.split(";");for(;R.length>1;){const z=R.shift(),V=R.shift();if(/^\d+$/.exec(z)){const J=parseInt(z);if(q(J))if(V==="?")H.push({type:0,index:J});else{const he=(0,x.parseColor)(V);he&&H.push({type:1,index:J,color:he})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(A){const H=A.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(A,H){this._getCurrentLinkId()&&this._finishHyperlink();const R=A.split(":");let z;const V=R.findIndex((J=>J.startsWith("id=")));return V!==-1&&(z=R[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:z,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(A,H){const R=A.split(";");for(let z=0;z<R.length&&!(H>=this._specialColors.length);++z,++H)if(R[z]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const V=(0,x.parseColor)(R[z]);V&&this._onColor.fire([{type:1,index:this._specialColors[H],color:V}])}return!0}setOrReportFgColor(A){return this._setOrReportSpecialColor(A,0)}setOrReportBgColor(A){return this._setOrReportSpecialColor(A,1)}setOrReportCursorColor(A){return this._setOrReportSpecialColor(A,2)}restoreIndexedColor(A){if(!A)return this._onColor.fire([{type:2}]),!0;const H=[],R=A.split(";");for(let z=0;z<R.length;++z)if(/^\d+$/.exec(R[z])){const V=parseInt(R[z]);q(V)&&H.push({type:2,index:V})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(A){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(A){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(A){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),!0}selectCharset(A){return A.length!==2?(this.selectDefaultCharset(),!0):(A[0]==="/"||this._charsetService.setgCharset(L[A[0]],g.CHARSETS[A[1]]||g.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const A=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,A,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(A){return this._charsetService.setgLevel(A),!0}screenAlignmentPattern(){const A=new c.CellData;A.content=4194373,A.fg=this._curAttrData.fg,A.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const R=this._activeBuffer.ybase+this._activeBuffer.y+H,z=this._activeBuffer.lines.get(R);z&&(z.fill(A),z.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(A,H){const R=this._bufferService.buffer,z=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${l.C0.ESC}${V}${l.C0.ESC}\\`),!0))(A==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:A==='"p'?'P1$r61;1"p':A==="r"?`P1$r${R.scrollTop+1};${R.scrollBottom+1}r`:A==="m"?"P1$r0m":A===" q"?`P1$r${{block:2,underline:4,bar:6}[z.cursorStyle]-(z.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(A,H){this._dirtyRowTracker.markRangeDirty(A,H)}}n.InputHandler=K;let I=class{constructor(P){this._bufferService=P,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(P){P<this.start?this.start=P:P>this.end&&(this.end=P)}markRangeDirty(P,A){P>A&&(U=P,P=A,A=U),P<this.start&&(this.start=P),A>this.end&&(this.end=A)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function q(P){return 0<=P&&P<256}I=_([v(0,C.IBufferService)],I)},844:(F,n)=>{function f(_){for(const v of _)v.dispose();_.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},n.toDisposable=function(_){return{dispose:_}},n.disposeArray=f,n.getDisposeArrayDisposable=function(_){return{dispose:()=>f(_)}}},1505:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(v,l,g){this._data[v]||(this._data[v]={}),this._data[v][l]=g}get(v,l){return this._data[v]?this._data[v][l]:void 0}clear(){this._data={}}}n.TwoKeyMap=f,n.FourKeyMap=class{constructor(){this._data=new f}set(_,v,l,g,b){this._data.get(_,v)||this._data.set(_,v,new f),this._data.get(_,v).set(l,g,b)}get(_,v,l,g){var b;return(b=this._data.get(_,v))==null?void 0:b.get(l,g)}clear(){this._data.clear()}}},6114:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const f=n.isNode?"node":navigator.userAgent,_=n.isNode?"node":navigator.platform;n.isFirefox=f.includes("Firefox"),n.isLegacyEdge=f.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(f),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=f.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),n.isIpad=_==="iPad",n.isIphone=_==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),n.isLinux=_.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(f)},6106:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let f=0;n.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(f=this._search(this._getKey(_)),this._array.splice(f,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const v=this._getKey(_);if(v===void 0||(f=this._search(v),f===-1)||this._getKey(this._array[f])!==v)return!1;do if(this._array[f]===_)return this._array.splice(f,1),!0;while(++f<this._array.length&&this._getKey(this._array[f])===v);return!1}*getKeyIterator(_){if(this._array.length!==0&&(f=this._search(_),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===_))do yield this._array[f];while(++f<this._array.length&&this._getKey(this._array[f])===_)}forEachByKey(_,v){if(this._array.length!==0&&(f=this._search(_),!(f<0||f>=this._array.length)&&this._getKey(this._array[f])===_))do v(this._array[f]);while(++f<this._array.length&&this._getKey(this._array[f])===_)}values(){return[...this._array].values()}_search(_){let v=0,l=this._array.length-1;for(;l>=v;){let g=v+l>>1;const b=this._getKey(this._array[g]);if(b>_)l=g-1;else{if(!(b<_)){for(;g>0&&this._getKey(this._array[g-1])===_;)g--;return g}v=g+1}}return v}}},7226:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const _=f(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let y=0,u=0,r=b.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),u=Math.max(y,u),h=b.timeRemaining(),1.5*u>h)return r-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-y))}ms`),void this._start();r=h}this.clear()}}class l extends v{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const y=Date.now()+b;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=l,n.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:l,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const _=f(643);n.updateWindowsModeWrappedState=function(v){const l=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),g=l==null?void 0:l.get(v.cols-1),b=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);b&&g&&(b.isWrapped=g[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&g[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class f{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new f;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}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}}n.AttributeData=f;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,g=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=g}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=_},9092:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const _=f(6349),v=f(7226),l=f(3734),g=f(8437),b=f(4634),y=f(511),u=f(643),r=f(4863),h=f(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,c,m){this._hasScrollback=o,this._optionsService=c,this._bufferService=m,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=y.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]),this._whitespaceCell=y.CellData.fromCharData([0,u.WHITESPACE_CELL_CHAR,u.WHITESPACE_CELL_WIDTH,u.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new l.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new l.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,c){return new g.BufferLine(this._bufferService.cols,this.getNullCell(o),c)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const c=o+this._optionsService.rawOptions.scrollback;return c>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:c}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=g.DEFAULT_ATTR_DATA);let c=this._rows;for(;c--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,c){const m=this.getNullCell(g.DEFAULT_ATTR_DATA);let C=0;const S=this._getCorrectBufferLength(c);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<o)for(let p=0;p<this.lines.length;p++)C+=+this.lines.get(p).resize(o,m);let w=0;if(this._rows<c)for(let p=this._rows;p<c;p++)this.lines.length<c+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(o,m)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(o,m)));else for(let p=this._rows;p>c;p--)this.lines.length>c+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const p=this.lines.length-S;p>0&&(this.lines.trimStart(p),this.ybase=Math.max(this.ybase-p,0),this.ydisp=Math.max(this.ydisp-p,0),this.savedY=Math.max(this.savedY-p,0)),this.lines.maxLength=S}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,c-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=c-1,this._isReflowEnabled&&(this._reflow(o,c),this._cols>o))for(let w=0;w<this.lines.length;w++)C+=+this.lines.get(w).resize(o,m);this._cols=o,this._rows=c,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let c=0;for(;this._memoryCleanupPosition<this.lines.length;)if(c+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),c>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,c){this._cols!==o&&(o>this._cols?this._reflowLarger(o,c):this._reflowSmaller(o,c))}_reflowLarger(o,c){const m=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(m.length>0){const C=(0,b.reflowLargerCreateNewLayout)(this.lines,m);(0,b.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(o,c,C.countRemoved)}}_reflowLargerAdjustViewport(o,c,m){const C=this.getNullCell(g.DEFAULT_ATTR_DATA);let S=m;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<c&&this.lines.push(new g.BufferLine(o,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-m,0)}_reflowSmaller(o,c){const m=this.getNullCell(g.DEFAULT_ATTR_DATA),C=[];let S=0;for(let w=this.lines.length-1;w>=0;w--){let p=this.lines.get(w);if(!p||!p.isWrapped&&p.getTrimmedLength()<=o)continue;const x=[p];for(;p.isWrapped&&w>0;)p=this.lines.get(--w),x.unshift(p);const L=this.ybase+this.y;if(L>=w&&L<w+x.length)continue;const B=x[x.length-1].getTrimmedLength(),T=(0,b.reflowSmallerGetNewLineLengths)(x,this._cols,o),M=T.length-x.length;let U;U=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const K=[];for(let R=0;R<M;R++){const z=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);K.push(z)}K.length>0&&(C.push({start:w+x.length+S,newLines:K}),S+=K.length),x.push(...K);let I=T.length-1,q=T[I];q===0&&(I--,q=T[I]);let P=x.length-M-1,A=B;for(;P>=0;){const R=Math.min(A,q);if(x[I]===void 0)break;if(x[I].copyCellsFrom(x[P],A-R,q-R,R,!0),q-=R,q===0&&(I--,q=T[I]),A-=R,A===0){P--;const z=Math.max(P,0);A=(0,b.getWrappedLineTrimmedLength)(x,z,this._cols)}}for(let R=0;R<x.length;R++)T[R]<o&&x[R].setCell(T[R],m);let H=M-U;for(;H-- >0;)this.ybase===0?this.y<c-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-c&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+c-1)}if(C.length>0){const w=[],p=[];for(let I=0;I<this.lines.length;I++)p.push(this.lines.get(I));const x=this.lines.length;let L=x-1,B=0,T=C[B];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let M=0;for(let I=Math.min(this.lines.maxLength-1,x+S-1);I>=0;I--)if(T&&T.start>L+M){for(let q=T.newLines.length-1;q>=0;q--)this.lines.set(I--,T.newLines[q]);I++,w.push({index:L+1,amount:T.newLines.length}),M+=T.newLines.length,T=C[++B]}else this.lines.set(I,p[L--]);let U=0;for(let I=w.length-1;I>=0;I--)w[I].index+=U,this.lines.onInsertEmitter.fire(w[I]),U+=w[I].amount;const K=Math.max(0,x+S-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(o,c,m=0,C){const S=this.lines.get(o);return S?S.translateToString(c,m,C):""}getWrappedRangeForLine(o){let c=o,m=o;for(;c>0&&this.lines.get(c).isWrapped;)c--;for(;m+1<this.lines.length&&this.lines.get(m+1).isWrapped;)m++;return{first:c,last:m}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let c=0;c<this.markers.length;c++)this.markers[c].line===o&&(this.markers[c].dispose(),this.markers.splice(c--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const c=new r.Marker(o);return this.markers.push(c),c.register(this.lines.onTrim((m=>{c.line-=m,c.line<0&&c.dispose()}))),c.register(this.lines.onInsert((m=>{c.line>=m.index&&(c.line+=m.amount)}))),c.register(this.lines.onDelete((m=>{c.line>=m.index&&c.line<m.index+m.amount&&c.dispose(),c.line>m.index&&(c.line-=m.amount)}))),c.register(c.onDispose((()=>this._removeMarker(c)))),c}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const _=f(3734),v=f(511),l=f(643),g=f(482);n.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let b=0;class y{constructor(r,h,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const c=h||v.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]);for(let m=0;m<r;++m)this.setCell(m,c);this.length=r}get(r){const h=this._data[3*r+0],o=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:o?(0,g.stringFromCodePoint)(o):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):o]}set(r,h){this._data[3*r+1]=h[l.CHAR_DATA_ATTR_INDEX],h[l.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[l.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[l.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,g.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return b=3*r,h.content=this._data[b+0],h.fg=this._data[b+1],h.bg=this._data[b+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,o,c){268435456&c.bg&&(this._extendedAttrs[r]=c.extended),this._data[3*r+0]=h|o<<22,this._data[3*r+1]=c.fg,this._data[3*r+2]=c.bg}addCodepointToCell(r,h,o){let c=this._data[3*r+0];2097152&c?this._combined[r]+=(0,g.stringFromCodePoint)(h):2097151&c?(this._combined[r]=(0,g.stringFromCodePoint)(2097151&c)+(0,g.stringFromCodePoint)(h),c&=-2097152,c|=2097152):c=h|4194304,o&&(c&=-12582913,c|=o<<22),this._data[3*r+0]=c}insertCells(r,h,o){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length-r){const c=new v.CellData;for(let m=this.length-r-h-1;m>=0;--m)this.setCell(r+h+m,this.loadCell(r+m,c));for(let m=0;m<h;++m)this.setCell(r+m,o)}else for(let c=r;c<this.length;++c)this.setCell(c,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(r,h,o){if(r%=this.length,h<this.length-r){const c=new v.CellData;for(let m=0;m<this.length-r-h;++m)this.setCell(r+m,this.loadCell(r+h+m,c));for(let m=this.length-h;m<this.length;++m)this.setCell(m,o)}else for(let c=r;c<this.length;++c)this.setCell(c,o);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,o)}replaceCells(r,h,o,c=!1){if(c)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,o),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.setCell(r++,o)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const c=new Uint32Array(o);c.set(this._data),this._data=c}for(let c=this.length;c<r;++c)this.setCell(c,h)}else{this._data=this._data.subarray(0,o);const c=Object.keys(this._combined);for(let C=0;C<c.length;C++){const S=parseInt(c[C],10);S>=r&&delete this._combined[S]}const m=Object.keys(this._extendedAttrs);for(let C=0;C<m.length;C++){const S=parseInt(m[C],10);S>=r&&delete this._extendedAttrs[S]}}return this.length=r,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,r);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new y(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,o,c,m){const C=r._data;if(m)for(let w=c-1;w>=0;w--){for(let p=0;p<3;p++)this._data[3*(o+w)+p]=C[3*(h+w)+p];268435456&C[3*(h+w)+2]&&(this._extendedAttrs[o+w]=r._extendedAttrs[h+w])}else for(let w=0;w<c;w++){for(let p=0;p<3;p++)this._data[3*(o+w)+p]=C[3*(h+w)+p];268435456&C[3*(h+w)+2]&&(this._extendedAttrs[o+w]=r._extendedAttrs[h+w])}const S=Object.keys(r._combined);for(let w=0;w<S.length;w++){const p=parseInt(S[w],10);p>=h&&(this._combined[p-h+o]=r._combined[p])}}translateToString(r,h,o,c){h=h??0,o=o??this.length,r&&(o=Math.min(o,this.getTrimmedLength())),c&&(c.length=0);let m="";for(;h<o;){const C=this._data[3*h+0],S=2097151&C,w=2097152&C?this._combined[h]:S?(0,g.stringFromCodePoint)(S):l.WHITESPACE_CELL_CHAR;if(m+=w,c)for(let p=0;p<w.length;++p)c.push(h);h+=C>>22||1}return c&&c.push(h),m}}n.BufferLine=y},4841:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(f,_){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 _*(f.end.y-f.start.y)+(f.end.x-f.start.x+1)}},4634:(F,n)=>{function f(_,v,l){if(v===_.length-1)return _[v].getTrimmedLength();const g=!_[v].hasContent(l-1)&&_[v].getWidth(l-1)===1,b=_[v+1].getWidth(0)===2;return g&&b?l-1:l}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(_,v,l,g,b){const y=[];for(let u=0;u<_.length-1;u++){let r=u,h=_.get(++r);if(!h.isWrapped)continue;const o=[_.get(u)];for(;r<_.length&&h.isWrapped;)o.push(h),h=_.get(++r);if(g>=u&&g<r){u+=o.length-1;continue}let c=0,m=f(o,c,v),C=1,S=0;for(;C<o.length;){const p=f(o,C,v),x=p-S,L=l-m,B=Math.min(x,L);o[c].copyCellsFrom(o[C],S,m,B,!1),m+=B,m===l&&(c++,m=0),S+=B,S===p&&(C++,S=0),m===0&&c!==0&&o[c-1].getWidth(l-1)===2&&(o[c].copyCellsFrom(o[c-1],l-1,m++,1,!1),o[c-1].setCell(l-1,b))}o[c].replaceCells(m,l,b);let w=0;for(let p=o.length-1;p>0&&(p>c||o[p].getTrimmedLength()===0);p--)w++;w>0&&(y.push(u+o.length-w),y.push(w)),u+=o.length-1}return y},n.reflowLargerCreateNewLayout=function(_,v){const l=[];let g=0,b=v[g],y=0;for(let u=0;u<_.length;u++)if(b===u){const r=v[++g];_.onDeleteEmitter.fire({index:u-y,amount:r}),u+=r-1,y+=r,b=v[++g]}else l.push(u);return{layout:l,countRemoved:y}},n.reflowLargerApplyNewLayout=function(_,v){const l=[];for(let g=0;g<v.length;g++)l.push(_.get(v[g]));for(let g=0;g<l.length;g++)_.set(g,l[g]);_.length=v.length},n.reflowSmallerGetNewLineLengths=function(_,v,l){const g=[],b=_.map(((h,o)=>f(_,o,v))).reduce(((h,o)=>h+o));let y=0,u=0,r=0;for(;r<b;){if(b-r<l){g.push(b-r);break}y+=l;const h=f(_,u,v);y>h&&(y-=h,u++);const o=_[u].getWidth(y-1)===2;o&&y--;const c=o?l-1:l;g.push(c),r+=c}return g},n.getWrappedLineTrimmedLength=f},5295:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const _=f(8460),v=f(844),l=f(9092);class g extends v.Disposable{constructor(y,u){super(),this._optionsService=y,this._bufferService=u,this._onBufferActivate=this.register(new _.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 l.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new l.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(y){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(y),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(y,u){this._normal.resize(y,u),this._alt.resize(y,u),this.setupTabStops(y)}setupTabStops(y){this._normal.setupTabStops(y),this._alt.setupTabStops(y)}}n.BufferSet=g},511:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const _=f(482),v=f(643),l=f(3734);class g extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const u=new g;return u.setFromCharData(y),u}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let u=!1;if(y[v.CHAR_DATA_CHAR_INDEX].length>2)u=!0;else if(y[v.CHAR_DATA_CHAR_INDEX].length===2){const r=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|y[v.CHAR_DATA_WIDTH_INDEX]<<22:u=!0}else u=!0}else this.content=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[v.CHAR_DATA_WIDTH_INDEX]<<22;u&&(this.combinedData=y[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=g},643:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},4863:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const _=f(8460),v=f(844);class l{get id(){return this._id}constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=l._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(b){return this._disposables.push(b),b}}n.Marker=l,l._nextId=1},7116:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.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:"≥","{":"π","|":"≠","}":"£","~":"·"},n.CHARSETS.A={"#":"£"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},n.CHARSETS.C=n.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},n.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},n.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},n.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},n.CHARSETS.E=n.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},n.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},n.CHARSETS.H=n.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(F,n)=>{var f,_,v;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(l){l.NUL="\0",l.SOH="",l.STX="",l.ETX="",l.EOT="",l.ENQ="",l.ACK="",l.BEL="\x07",l.BS="\b",l.HT=" ",l.LF=`
|
|
56
|
-
`,l.VT="\v",l.FF="\f",l.CR="\r",l.SO="",l.SI="",l.DLE="",l.DC1="",l.DC2="",l.DC3="",l.DC4="",l.NAK="",l.SYN="",l.ETB="",l.CAN="",l.EM="",l.SUB="",l.ESC="\x1B",l.FS="",l.GS="",l.RS="",l.US="",l.SP=" ",l.DEL=""})(f||(n.C0=f={})),(function(l){l.PAD="",l.HOP="",l.BPH="",l.NBH="",l.IND="",l.NEL="
",l.SSA="",l.ESA="",l.HTS="",l.HTJ="",l.VTS="",l.PLD="",l.PLU="",l.RI="",l.SS2="",l.SS3="",l.DCS="",l.PU1="",l.PU2="",l.STS="",l.CCH="",l.MW="",l.SPA="",l.EPA="",l.SOS="",l.SGCI="",l.SCI="",l.CSI="",l.ST="",l.OSC="",l.PM="",l.APC=""})(_||(n.C1=_={})),(function(l){l.ST=`${f.ESC}\\`})(v||(n.C1_ESCAPED=v={}))},7399:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const _=f(2584),v={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:["'",'"']};n.evaluateKeyboardEvent=function(l,g,b,y){const u={type:0,cancel:!1,key:void 0},r=(l.shiftKey?1:0)|(l.altKey?2:0)|(l.ctrlKey?4:0)|(l.metaKey?8:0);switch(l.keyCode){case 0:l.key==="UIKeyInputUpArrow"?u.key=g?_.C0.ESC+"OA":_.C0.ESC+"[A":l.key==="UIKeyInputLeftArrow"?u.key=g?_.C0.ESC+"OD":_.C0.ESC+"[D":l.key==="UIKeyInputRightArrow"?u.key=g?_.C0.ESC+"OC":_.C0.ESC+"[C":l.key==="UIKeyInputDownArrow"&&(u.key=g?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:u.key=l.ctrlKey?"\b":_.C0.DEL,l.altKey&&(u.key=_.C0.ESC+u.key);break;case 9:if(l.shiftKey){u.key=_.C0.ESC+"[Z";break}u.key=_.C0.HT,u.cancel=!0;break;case 13:u.key=l.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,u.cancel=!0;break;case 27:u.key=_.C0.ESC,l.altKey&&(u.key=_.C0.ESC+_.C0.ESC),u.cancel=!0;break;case 37:if(l.metaKey)break;r?(u.key=_.C0.ESC+"[1;"+(r+1)+"D",u.key===_.C0.ESC+"[1;3D"&&(u.key=_.C0.ESC+(b?"b":"[1;5D"))):u.key=g?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(l.metaKey)break;r?(u.key=_.C0.ESC+"[1;"+(r+1)+"C",u.key===_.C0.ESC+"[1;3C"&&(u.key=_.C0.ESC+(b?"f":"[1;5C"))):u.key=g?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(l.metaKey)break;r?(u.key=_.C0.ESC+"[1;"+(r+1)+"A",b||u.key!==_.C0.ESC+"[1;3A"||(u.key=_.C0.ESC+"[1;5A")):u.key=g?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(l.metaKey)break;r?(u.key=_.C0.ESC+"[1;"+(r+1)+"B",b||u.key!==_.C0.ESC+"[1;3B"||(u.key=_.C0.ESC+"[1;5B")):u.key=g?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:l.shiftKey||l.ctrlKey||(u.key=_.C0.ESC+"[2~");break;case 46:u.key=r?_.C0.ESC+"[3;"+(r+1)+"~":_.C0.ESC+"[3~";break;case 36:u.key=r?_.C0.ESC+"[1;"+(r+1)+"H":g?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:u.key=r?_.C0.ESC+"[1;"+(r+1)+"F":g?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:l.shiftKey?u.type=2:l.ctrlKey?u.key=_.C0.ESC+"[5;"+(r+1)+"~":u.key=_.C0.ESC+"[5~";break;case 34:l.shiftKey?u.type=3:l.ctrlKey?u.key=_.C0.ESC+"[6;"+(r+1)+"~":u.key=_.C0.ESC+"[6~";break;case 112:u.key=r?_.C0.ESC+"[1;"+(r+1)+"P":_.C0.ESC+"OP";break;case 113:u.key=r?_.C0.ESC+"[1;"+(r+1)+"Q":_.C0.ESC+"OQ";break;case 114:u.key=r?_.C0.ESC+"[1;"+(r+1)+"R":_.C0.ESC+"OR";break;case 115:u.key=r?_.C0.ESC+"[1;"+(r+1)+"S":_.C0.ESC+"OS";break;case 116:u.key=r?_.C0.ESC+"[15;"+(r+1)+"~":_.C0.ESC+"[15~";break;case 117:u.key=r?_.C0.ESC+"[17;"+(r+1)+"~":_.C0.ESC+"[17~";break;case 118:u.key=r?_.C0.ESC+"[18;"+(r+1)+"~":_.C0.ESC+"[18~";break;case 119:u.key=r?_.C0.ESC+"[19;"+(r+1)+"~":_.C0.ESC+"[19~";break;case 120:u.key=r?_.C0.ESC+"[20;"+(r+1)+"~":_.C0.ESC+"[20~";break;case 121:u.key=r?_.C0.ESC+"[21;"+(r+1)+"~":_.C0.ESC+"[21~";break;case 122:u.key=r?_.C0.ESC+"[23;"+(r+1)+"~":_.C0.ESC+"[23~";break;case 123:u.key=r?_.C0.ESC+"[24;"+(r+1)+"~":_.C0.ESC+"[24~";break;default:if(!l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)if(b&&!y||!l.altKey||l.metaKey)!b||l.altKey||l.ctrlKey||l.shiftKey||!l.metaKey?l.key&&!l.ctrlKey&&!l.altKey&&!l.metaKey&&l.keyCode>=48&&l.key.length===1?u.key=l.key:l.key&&l.ctrlKey&&(l.key==="_"&&(u.key=_.C0.US),l.key==="@"&&(u.key=_.C0.NUL)):l.keyCode===65&&(u.type=1);else{const h=v[l.keyCode],o=h==null?void 0:h[l.shiftKey?1:0];if(o)u.key=_.C0.ESC+o;else if(l.keyCode>=65&&l.keyCode<=90){const c=l.ctrlKey?l.keyCode-64:l.keyCode+32;let m=String.fromCharCode(c);l.shiftKey&&(m=m.toUpperCase()),u.key=_.C0.ESC+m}else if(l.keyCode===32)u.key=_.C0.ESC+(l.ctrlKey?_.C0.NUL:" ");else if(l.key==="Dead"&&l.code.startsWith("Key")){let c=l.code.slice(3,4);l.shiftKey||(c=c.toLowerCase()),u.key=_.C0.ESC+c,u.cancel=!0}}else l.keyCode>=65&&l.keyCode<=90?u.key=String.fromCharCode(l.keyCode-64):l.keyCode===32?u.key=_.C0.NUL:l.keyCode>=51&&l.keyCode<=55?u.key=String.fromCharCode(l.keyCode-51+27):l.keyCode===56?u.key=_.C0.DEL:l.keyCode===219?u.key=_.C0.ESC:l.keyCode===220?u.key=_.C0.FS:l.keyCode===221&&(u.key=_.C0.GS)}return u}},482:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},n.utf32ToString=function(f,_=0,v=f.length){let l="";for(let g=_;g<v;++g){let b=f[g];b>65535?(b-=65536,l+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):l+=String.fromCharCode(b)}return l},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(f,_){const v=f.length;if(!v)return 0;let l=0,g=0;if(this._interim){const b=f.charCodeAt(g++);56320<=b&&b<=57343?_[l++]=1024*(this._interim-55296)+b-56320+65536:(_[l++]=this._interim,_[l++]=b),this._interim=0}for(let b=g;b<v;++b){const y=f.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=v)return this._interim=y,l;const u=f.charCodeAt(b);56320<=u&&u<=57343?_[l++]=1024*(y-55296)+u-56320+65536:(_[l++]=y,_[l++]=u)}else y!==65279&&(_[l++]=y)}return l}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,_){const v=f.length;if(!v)return 0;let l,g,b,y,u=0,r=0,h=0;if(this.interim[0]){let m=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let S,w=0;for(;(S=63&this.interim[++w])&&w<4;)C<<=6,C|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=p-w;for(;h<x;){if(h>=v)return 0;if(S=f[h++],(192&S)!=128){h--,m=!0;break}this.interim[w++]=S,C<<=6,C|=63&S}m||(p===2?C<128?h--:_[u++]=C:p===3?C<2048||C>=55296&&C<=57343||C===65279||(_[u++]=C):C<65536||C>1114111||(_[u++]=C)),this.interim.fill(0)}const o=v-4;let c=h;for(;c<v;){for(;!(!(c<o)||128&(l=f[c])||128&(g=f[c+1])||128&(b=f[c+2])||128&(y=f[c+3]));)_[u++]=l,_[u++]=g,_[u++]=b,_[u++]=y,c+=4;if(l=f[c++],l<128)_[u++]=l;else if((224&l)==192){if(c>=v)return this.interim[0]=l,u;if(g=f[c++],(192&g)!=128){c--;continue}if(r=(31&l)<<6|63&g,r<128){c--;continue}_[u++]=r}else if((240&l)==224){if(c>=v)return this.interim[0]=l,u;if(g=f[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,u;if(b=f[c++],(192&b)!=128){c--;continue}if(r=(15&l)<<12|(63&g)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;_[u++]=r}else if((248&l)==240){if(c>=v)return this.interim[0]=l,u;if(g=f[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,u;if(b=f[c++],(192&b)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,this.interim[2]=b,u;if(y=f[c++],(192&y)!=128){c--;continue}if(r=(7&l)<<18|(63&g)<<12|(63&b)<<6|63&y,r<65536||r>1114111)continue;_[u++]=r}}return u}}},225:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const _=f(1480),v=[[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]],l=[[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 g;n.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let b=0;b<v.length;++b)g.fill(0,v[b][0],v[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?g[b]:(function(y,u){let r,h=0,o=u.length-1;if(y<u[0][0]||y>u[o][1])return!1;for(;o>=h;)if(r=h+o>>1,y>u[r][1])h=r+1;else{if(!(y<u[r][0]))return!0;o=r-1}return!1})(b,l)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,y){let u=this.wcwidth(b),r=u===0&&y!==0;if(r){const h=_.UnicodeService.extractWidth(y);h===0?r=!1:h>u&&(u=h)}return _.UnicodeService.createPropertyValue(0,u,r)}}},5981:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const _=f(8460),v=f(844);class l extends v.Disposable{constructor(b){super(),this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(b,y){if(y!==void 0&&this._syncCalls>y)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let u;for(this._isSyncWriting=!0;u=this._writeBuffer.shift();){this._action(u);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(b,y){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(y),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(y)}_innerWrite(b=0,y=!0){const u=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,y);if(h){const c=m=>Date.now()-u>=12?setTimeout((()=>this._innerWrite(0,m))):this._innerWrite(u,m);return void h.catch((m=>(queueMicrotask((()=>{throw m})),Promise.resolve(!1)))).then(c)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-u>=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()}}n.WriteBuffer=l},5941:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.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})$/,_=/^[\da-f]+$/;function v(l,g){const b=l.toString(16),y=b.length<2?"0"+b:b;switch(g){case 4:return b[0];case 8:return y;case 12:return(y+y).slice(0,3);default:return y+y}}n.parseColor=function(l){if(!l)return;let g=l.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const b=f.exec(g);if(b){const y=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/y*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/y*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/y*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),_.exec(g)&&[3,6,9,12].includes(g.length))){const b=g.length/3,y=[0,0,0];for(let u=0;u<3;++u){const r=parseInt(g.slice(b*u,b*u+b),16);y[u]=b===1?r<<4:b===2?r:b===3?r>>4:r>>8}return y}},n.toRgbString=function(l,g=16){const[b,y,u]=l;return`rgb:${v(b,g)}/${v(y,g)}/${v(u,g)}`}},5770:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const _=f(482),v=f(8742),l=f(5770),g=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(y,u){this._handlers[y]===void 0&&(this._handlers[y]=[]);const r=this._handlers[y];return r.push(u),{dispose:()=>{const h=r.indexOf(u);h!==-1&&r.splice(h,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}reset(){if(this._active.length)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(y,u){if(this.reset(),this._ident=y,this._active=this._handlers[y]||g,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(u);else this._handlerFb(this._ident,"HOOK",u)}put(y,u,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(y,u,r);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(y,u,r))}unhook(y,u=!0){if(this._active.length){let r=!1,h=this._active.length-1,o=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=u,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;h>=0&&(r=this._active[h].unhook(y),r!==!0);h--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,r;h--}for(;h>=0;h--)if(r=this._active[h].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",y);this._active=g,this._ident=0}};const b=new v.Params;b.addParam(0),n.DcsHandler=class{constructor(y){this._handler=y,this._data="",this._params=b,this._hitLimit=!1}hook(y){this._params=y.length>1||y.params[0]?y.clone():b,this._data="",this._hitLimit=!1}put(y,u,r){this._hitLimit||(this._data+=(0,_.utf32ToString)(y,u,r),this._data.length>l.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(y){let u=!1;if(this._hitLimit)u=!1;else if(y&&(u=this._handler(this._data,this._params),u instanceof Promise))return u.then((r=>(this._params=b,this._data="",this._hitLimit=!1,r)));return this._params=b,this._data="",this._hitLimit=!1,u}}},2015:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const _=f(844),v=f(8742),l=f(6242),g=f(6351);class b{constructor(h){this.table=new Uint8Array(h)}setDefault(h,o){this.table.fill(h<<4|o)}add(h,o,c,m){this.table[o<<8|h]=c<<4|m}addMany(h,o,c,m){for(let C=0;C<h.length;C++)this.table[o<<8|h[C]]=c<<4|m}}n.TransitionTable=b;const y=160;n.VT500_TRANSITION_TABLE=(function(){const r=new b(4095),h=Array.apply(null,Array(256)).map(((w,p)=>p)),o=(w,p)=>h.slice(w,p),c=o(32,127),m=o(0,24);m.push(25),m.push.apply(m,o(28,32));const C=o(0,14);let S;for(S in r.setDefault(1,0),r.addMany(c,0,2,0),C)r.addMany([24,26,153,154],S,3,0),r.addMany(o(128,144),S,3,0),r.addMany(o(144,152),S,3,0),r.add(156,S,0,0),r.add(27,S,11,1),r.add(157,S,4,8),r.addMany([152,158,159],S,0,7),r.add(155,S,11,3),r.add(144,S,11,9);return r.addMany(m,0,3,0),r.addMany(m,1,3,1),r.add(127,1,0,1),r.addMany(m,8,0,8),r.addMany(m,3,3,3),r.add(127,3,0,3),r.addMany(m,4,3,4),r.add(127,4,0,4),r.addMany(m,6,3,6),r.addMany(m,5,3,5),r.add(127,5,0,5),r.addMany(m,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(c,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(o(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(c,7,0,7),r.addMany(m,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(o(64,127),3,7,0),r.addMany(o(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(o(48,60),4,8,4),r.addMany(o(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(o(32,64),6,0,6),r.add(127,6,0,6),r.addMany(o(64,127),6,0,0),r.addMany(o(32,48),3,9,5),r.addMany(o(32,48),5,9,5),r.addMany(o(48,64),5,0,6),r.addMany(o(64,127),5,7,0),r.addMany(o(32,48),4,9,5),r.addMany(o(32,48),1,9,2),r.addMany(o(32,48),2,9,2),r.addMany(o(48,127),2,10,0),r.addMany(o(48,80),1,10,0),r.addMany(o(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(o(96,127),1,10,0),r.add(80,1,11,9),r.addMany(m,9,0,9),r.add(127,9,0,9),r.addMany(o(28,32),9,0,9),r.addMany(o(32,48),9,9,12),r.addMany(o(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(m,11,0,11),r.addMany(o(32,128),11,0,11),r.addMany(o(28,32),11,0,11),r.addMany(m,10,0,10),r.add(127,10,0,10),r.addMany(o(28,32),10,0,10),r.addMany(o(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(o(32,48),10,9,12),r.addMany(m,12,0,12),r.add(127,12,0,12),r.addMany(o(28,32),12,0,12),r.addMany(o(32,48),12,9,12),r.addMany(o(48,64),12,0,11),r.addMany(o(64,127),12,12,13),r.addMany(o(64,127),10,12,13),r.addMany(o(64,127),9,12,13),r.addMany(m,13,13,13),r.addMany(c,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(y,0,2,0),r.add(y,8,5,8),r.add(y,6,0,6),r.add(y,11,0,11),r.add(y,13,13,13),r})();class u extends _.Disposable{constructor(h=n.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,c,m)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,c)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,_.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new l.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,o=[64,126]){let c=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(c=h.prefix.charCodeAt(0),c&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<h.intermediates.length;++C){const S=h.intermediates.charCodeAt(C);if(32>S||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=S}}if(h.final.length!==1)throw new Error("final must be a single byte");const m=h.final.charCodeAt(0);if(o[0]>m||m>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return c<<=8,c|=m,c}identToString(h){const o=[];for(;h;)o.push(String.fromCharCode(255&h)),h>>=8;return o.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,o){const c=this._identifier(h,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);const m=this._escHandlers[c];return m.push(o),{dispose:()=>{const C=m.indexOf(o);C!==-1&&m.splice(C,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,o){this._executeHandlers[h.charCodeAt(0)]=o}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,o){const c=this._identifier(h);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);const m=this._csiHandlers[c];return m.push(o),{dispose:()=>{const C=m.indexOf(o);C!==-1&&m.splice(C,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,o){return this._dcsParser.registerHandler(this._identifier(h),o)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,o){return this._oscParser.registerHandler(h,o)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,o,c,m,C){this._parseStack.state=h,this._parseStack.handlers=o,this._parseStack.handlerPos=c,this._parseStack.transition=m,this._parseStack.chunkPos=C}parse(h,o,c){let m,C=0,S=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(c===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const p=this._parseStack.handlers;let x=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(c===!1&&x>-1){for(;x>=0&&(m=p[x](this._params),m!==!0);x--)if(m instanceof Promise)return this._parseStack.handlerPos=x,m}this._parseStack.handlers=[];break;case 4:if(c===!1&&x>-1){for(;x>=0&&(m=p[x](),m!==!0);x--)if(m instanceof Promise)return this._parseStack.handlerPos=x,m}this._parseStack.handlers=[];break;case 6:if(C=h[this._parseStack.chunkPos],m=this._dcsParser.unhook(C!==24&&C!==26,c),m)return m;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=h[this._parseStack.chunkPos],m=this._oscParser.end(C!==24&&C!==26,c),m)return m;C===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 p=w;p<o;++p){switch(C=h[p],S=this._transitions.table[this.currentState<<8|(C<160?C:y)],S>>4){case 2:for(let M=p+1;;++M){if(M>=o||(C=h[M])<32||C>126&&C<y){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<y){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<y){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<y){this._printHandler(h,p,M),p=M-1;break}}break;case 3:this._executeHandlers[C]?this._executeHandlers[C]():this._executeHandlerFb(C),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const x=this._csiHandlers[this._collect<<8|C];let L=x?x.length-1:-1;for(;L>=0&&(m=x[L](this._params),m!==!0);L--)if(m instanceof Promise)return this._preserveStack(3,x,L,S,p),m;L<0&&this._csiHandlerFb(this._collect<<8|C,this._params),this.precedingJoinState=0;break;case 8:do switch(C){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(C-48)}while(++p<o&&(C=h[p])>47&&C<60);p--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const B=this._escHandlers[this._collect<<8|C];let T=B?B.length-1:-1;for(;T>=0&&(m=B[T](),m!==!0);T--)if(m instanceof Promise)return this._preserveStack(4,B,T,S,p),m;T<0&&this._escHandlerFb(this._collect<<8|C),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|C,this._params);break;case 13:for(let M=p+1;;++M)if(M>=o||(C=h[M])===24||C===26||C===27||C>127&&C<y){this._dcsParser.put(h,p,M),p=M-1;break}break;case 14:if(m=this._dcsParser.unhook(C!==24&&C!==26),m)return this._preserveStack(6,[],0,S,p),m;C===27&&(S|=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 M=p+1;;M++)if(M>=o||(C=h[M])<32||C>127&&C<y){this._oscParser.put(h,p,M),p=M-1;break}break;case 6:if(m=this._oscParser.end(C!==24&&C!==26),m)return this._preserveStack(5,[],0,S,p),m;C===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&S}}}n.EscapeSequenceParser=u},6242:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const _=f(5770),v=f(482),l=[];n.OscParser=class{constructor(){this._state=0,this._active=l,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,b){this._handlers[g]===void 0&&(this._handlers[g]=[]);const y=this._handlers[g];return y.push(b),{dispose:()=>{const u=y.indexOf(b);u!==-1&&y.splice(u,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=l}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=l,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||l,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,b,y){if(this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].put(g,b,y);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(g,b,y))}start(){this.reset(),this._state=1}put(g,b,y){if(this._state!==3){if(this._state===1)for(;b<y;){const u=g[b++];if(u===59){this._state=2,this._start();break}if(u<48||57<u)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+u-48}this._state===2&&y-b>0&&this._put(g,b,y)}}end(g,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let y=!1,u=this._active.length-1,r=!1;if(this._stack.paused&&(u=this._stack.loopPosition-1,y=b,r=this._stack.fallThrough,this._stack.paused=!1),!r&&y===!1){for(;u>=0&&(y=this._active[u].end(g),y!==!0);u--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!1,y;u--}for(;u>=0;u--)if(y=this._active[u].end(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=u,this._stack.fallThrough=!0,y}else this._handlerFb(this._id,"END",g);this._active=l,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,b,y){this._hitLimit||(this._data+=(0,v.utf32ToString)(g,b,y),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let b=!1;if(this._hitLimit)b=!1;else if(g&&(b=this._handler(this._data),b instanceof Promise))return b.then((y=>(this._data="",this._hitLimit=!1,y)));return this._data="",this._hitLimit=!1,b}}},8742:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const f=2147483647;class _{static fromArray(l){const g=new _;if(!l.length)return g;for(let b=Array.isArray(l[0])?1:0;b<l.length;++b){const y=l[b];if(Array.isArray(y))for(let u=0;u<y.length;++u)g.addSubParam(y[u]);else g.addParam(y)}return g}constructor(l=32,g=32){if(this.maxLength=l,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(l),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(l),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const l=new _(this.maxLength,this.maxSubParamsLength);return l.params.set(this.params),l.length=this.length,l._subParams.set(this._subParams),l._subParamsLength=this._subParamsLength,l._subParamsIdx.set(this._subParamsIdx),l._rejectDigits=this._rejectDigits,l._rejectSubDigits=this._rejectSubDigits,l._digitIsSub=this._digitIsSub,l}toArray(){const l=[];for(let g=0;g<this.length;++g){l.push(this.params[g]);const b=this._subParamsIdx[g]>>8,y=255&this._subParamsIdx[g];y-b>0&&l.push(Array.prototype.slice.call(this._subParams,b,y))}return l}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(l){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=l>f?f:l}}addSubParam(l){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=l>f?f:l,this._subParamsIdx[this.length-1]++}}hasSubParams(l){return(255&this._subParamsIdx[l])-(this._subParamsIdx[l]>>8)>0}getSubParams(l){const g=this._subParamsIdx[l]>>8,b=255&this._subParamsIdx[l];return b-g>0?this._subParams.subarray(g,b):null}getSubParamsAll(){const l={};for(let g=0;g<this.length;++g){const b=this._subParamsIdx[g]>>8,y=255&this._subParamsIdx[g];y-b>0&&(l[g]=this._subParams.slice(b,y))}return l}addDigit(l){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,y=b[g-1];b[g-1]=~y?Math.min(10*y+l,f):l}}n.Params=_},5741:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let f=this._addons.length-1;f>=0;f--)this._addons[f].instance.dispose()}loadAddon(f,_){const v={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(v),_.dispose=()=>this._wrappedAddonDispose(v),_.activate(f)}_wrappedAddonDispose(f){if(f.isDisposed)return;let _=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===f){_=v;break}if(_===-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(_,1)}}},8771:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const _=f(3785),v=f(511);n.BufferApiView=class{constructor(l,g){this._buffer=l,this.type=g}init(l){return this._buffer=l,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(l){const g=this._buffer.lines.get(l);if(g)return new _.BufferLineApiView(g)}getNullCell(){return new v.CellData}}},3785:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const _=f(511);n.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,l){if(!(v<0||v>=this._line.length))return l?(this._line.loadCell(v,l),l):this._line.loadCell(v,new _.CellData)}translateToString(v,l,g){return this._line.translateToString(v,l,g)}}},8285:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const _=f(8771),v=f(8460),l=f(844);class g extends l.Disposable{constructor(y){super(),this._core=y,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.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)}}n.BufferNamespaceApi=g},7975:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(f){this._core=f}registerCsiHandler(f,_){return this._core.registerCsiHandler(f,(v=>_(v.toArray())))}addCsiHandler(f,_){return this.registerCsiHandler(f,_)}registerDcsHandler(f,_){return this._core.registerDcsHandler(f,((v,l)=>_(v,l.toArray())))}addDcsHandler(f,_){return this.registerDcsHandler(f,_)}registerEscHandler(f,_){return this._core.registerEscHandler(f,_)}addEscHandler(f,_){return this.registerEscHandler(f,_)}registerOscHandler(f,_){return this._core.registerOscHandler(f,_)}addOscHandler(f,_){return this.registerOscHandler(f,_)}}},7090:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.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(F,n,f){var _=this&&this.__decorate||function(r,h,o,c){var m,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(S=(C<3?m(S):C>3?m(h,o,S):m(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const l=f(8460),g=f(844),b=f(5295),y=f(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let u=n.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(r.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(r.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new b.BufferSet(r,this))}resize(r,h){this.cols=r,this.rows=h,this.buffers.resize(r,h),this._onResize.fire({cols:r,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(r,h=!1){const o=this.buffer;let c;c=this._cachedBlankLine,c&&c.length===this.cols&&c.getFg(0)===r.fg&&c.getBg(0)===r.bg||(c=o.getBlankLine(r,h),this._cachedBlankLine=c),c.isWrapped=h;const m=o.ybase+o.scrollTop,C=o.ybase+o.scrollBottom;if(o.scrollTop===0){const S=o.lines.isFull;C===o.lines.length-1?S?o.lines.recycle().copyFrom(c):o.lines.push(c.clone()):o.lines.splice(C+1,0,c.clone()),S?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const S=C-m+1;o.lines.shiftElements(m+1,S-1,-1),o.lines.set(C,c.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(r,h,o){const c=this.buffer;if(r<0){if(c.ydisp===0)return;this.isUserScrolling=!0}else r+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);const m=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+r,c.ybase),0),m!==c.ydisp&&(h||this._onScroll.fire(c.ydisp))}};n.BufferService=u=_([v(0,y.IOptionsService)],u)},7994:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0,n.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,_){this._charsets[f]=_,this.glevel===f&&(this.charset=_)}}},1753:function(F,n,f){var _=this&&this.__decorate||function(c,m,C,S){var w,p=arguments.length,x=p<3?m:S===null?S=Object.getOwnPropertyDescriptor(m,C):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,m,C,S);else for(var L=c.length-1;L>=0;L--)(w=c[L])&&(x=(p<3?w(x):p>3?w(m,C,x):w(m,C))||x);return p>3&&x&&Object.defineProperty(m,C,x),x},v=this&&this.__param||function(c,m){return function(C,S){m(C,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const l=f(2585),g=f(8460),b=f(844),y={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:c=>c.button!==4&&c.action===1&&(c.ctrl=!1,c.alt=!1,c.shift=!1,!0)},VT200:{events:19,restrict:c=>c.action!==32},DRAG:{events:23,restrict:c=>c.action!==32||c.button!==3},ANY:{events:31,restrict:c=>!0}};function u(c,m){let C=(c.ctrl?16:0)|(c.shift?4:0)|(c.alt?8:0);return c.button===4?(C|=64,C|=c.action):(C|=3&c.button,4&c.button&&(C|=64),8&c.button&&(C|=128),c.action===32?C|=32:c.action!==0||m||(C|=3)),C}const r=String.fromCharCode,h={DEFAULT:c=>{const m=[u(c,!1)+32,c.col+32,c.row+32];return m[0]>255||m[1]>255||m[2]>255?"":`\x1B[M${r(m[0])}${r(m[1])}${r(m[2])}`},SGR:c=>{const m=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${u(c,!0)};${c.col};${c.row}${m}`},SGR_PIXELS:c=>{const m=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${u(c,!0)};${c.x};${c.y}${m}`}};let o=n.CoreMouseService=class extends b.Disposable{constructor(c,m){super(),this._bufferService=c,this._coreService=m,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(y))this.addProtocol(C,y[C]);for(const C of Object.keys(h))this.addEncoding(C,h[C]);this.reset()}addProtocol(c,m){this._protocols[c]=m}addEncoding(c,m){this._encodings[c]=m}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(c){if(!this._protocols[c])throw new Error(`unknown protocol "${c}"`);this._activeProtocol=c,this._onProtocolChange.fire(this._protocols[c].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(c){if(!this._encodings[c])throw new Error(`unknown encoding "${c}"`);this._activeEncoding=c}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(c){if(c.col<0||c.col>=this._bufferService.cols||c.row<0||c.row>=this._bufferService.rows||c.button===4&&c.action===32||c.button===3&&c.action!==32||c.button!==4&&(c.action===2||c.action===3)||(c.col++,c.row++,c.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,c,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(c))return!1;const m=this._encodings[this._activeEncoding](c);return m&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(m):this._coreService.triggerDataEvent(m,!0)),this._lastEvent=c,!0}explainEvents(c){return{down:!!(1&c),up:!!(2&c),drag:!!(4&c),move:!!(8&c),wheel:!!(16&c)}}_equalEvents(c,m,C){if(C){if(c.x!==m.x||c.y!==m.y)return!1}else if(c.col!==m.col||c.row!==m.row)return!1;return c.button===m.button&&c.action===m.action&&c.ctrl===m.ctrl&&c.alt===m.alt&&c.shift===m.shift}};n.CoreMouseService=o=_([v(0,l.IBufferService),v(1,l.ICoreService)],o)},6975:function(F,n,f){var _=this&&this.__decorate||function(o,c,m,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,m,C);else for(var x=o.length-1;x>=0;x--)(S=o[x])&&(p=(w<3?S(p):w>3?S(c,m,p):S(c,m))||p);return w>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(o,c){return function(m,C){c(m,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const l=f(1439),g=f(8460),b=f(844),y=f(2585),u=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=n.CoreService=class extends b.Disposable{constructor(o,c,m){super(),this._bufferService=o,this._logService=c,this._optionsService=m,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,l.clone)(u),this.decPrivateModes=(0,l.clone)(r)}reset(){this.modes=(0,l.clone)(u),this.decPrivateModes=(0,l.clone)(r)}triggerDataEvent(o,c=!1){if(this._optionsService.rawOptions.disableStdin)return;const m=this._bufferService.buffer;c&&this._optionsService.rawOptions.scrollOnUserInput&&m.ybase!==m.ydisp&&this._onRequestScrollToBottom.fire(),c&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((c=>c.charCodeAt(0))))),this._onBinary.fire(o))}};n.CoreService=h=_([v(0,y.IBufferService),v(1,y.ILogService),v(2,y.IOptionsService)],h)},9074:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const _=f(8055),v=f(8460),l=f(844),g=f(6106);let b=0,y=0;class u extends l.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,l.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const c=new r(o);if(c){const m=c.marker.onDispose((()=>c.dispose()));c.onDispose((()=>{c&&(this._decorations.delete(c)&&this._onDecorationRemoved.fire(c),m.dispose())})),this._decorations.insert(c),this._onDecorationRegistered.fire(c)}return c}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,c,m){let C=0,S=0;for(const w of this._decorations.getKeyIterator(c))C=w.options.x??0,S=C+(w.options.width??1),o>=C&&o<S&&(!m||(w.options.layer??"bottom")===m)&&(yield w)}forEachDecorationAtCell(o,c,m,C){this._decorations.forEachByKey(c,(S=>{b=S.options.x??0,y=b+(S.options.width??1),o>=b&&o<y&&(!m||(S.options.layer??"bottom")===m)&&C(S)}))}}n.DecorationService=u;class r extends l.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=_.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=_.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const _=f(2585),v=f(8343);class l{constructor(...b){this._entries=new Map;for(const[y,u]of b)this.set(y,u)}set(b,y){const u=this._entries.get(b);return this._entries.set(b,y),u}forEach(b){for(const[y,u]of this._entries.entries())b(y,u)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}n.ServiceCollection=l,n.InstantiationService=class{constructor(){this._services=new l,this._services.set(_.IInstantiationService,this)}setService(g,b){this._services.set(g,b)}getService(g){return this._services.get(g)}createInstance(g,...b){const y=(0,v.getServiceDependencies)(g).sort(((h,o)=>h.index-o.index)),u=[];for(const h of y){const o=this._services.get(h.id);if(!o)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${h.id}.`);u.push(o)}const r=y.length>0?y[0].index:b.length;if(b.length!==r)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${r+1} conflicts with ${b.length} static arguments`);return new g(...b,...u)}}},7866:function(F,n,f){var _=this&&this.__decorate||function(r,h,o,c){var m,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(S=(C<3?m(S):C>3?m(h,o,S):m(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const l=f(844),g=f(2585),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let y,u=n.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=u=_([v(0,g.IOptionsService)],u),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const c=o.value;o.value=function(...m){if(y.logLevel!==g.LogLevelEnum.TRACE)return c.apply(this,m);y.trace(`GlyphRenderer#${c.name}(${m.map((S=>JSON.stringify(S))).join(", ")})`);const C=c.apply(this,m);return y.trace(`GlyphRenderer#${c.name} return`,C),C}}},7302:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const _=f(8460),v=f(844),l=f(6114);n.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:l.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class b extends v.Disposable{constructor(u){super(),this._onOptionChange=this.register(new _.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in u)if(h in r)try{const o=u[h];r[h]=this._sanitizeAndValidateOption(h,o)}catch(o){console.error(o)}this.rawOptions=r,this.options={...r},this._setupOptions(),this.register((0,v.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(u,r){return this.onOptionChange((h=>{h===u&&r(this.rawOptions[u])}))}onMultipleOptionChange(u,r){return this.onOptionChange((h=>{u.indexOf(h)!==-1&&r()}))}_setupOptions(){const u=h=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},r=(h,o)=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);o=this._sanitizeAndValidateOption(h,o),this.rawOptions[h]!==o&&(this.rawOptions[h]=o,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const o={get:u.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,o)}}_sanitizeAndValidateOption(u,r){switch(u){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[u]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${u}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[u]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=g.includes(r)?r:n.DEFAULT_OPTIONS[u];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${u} cannot be less than 1, value: ${r}`);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(`${u} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${u} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${u} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=b},2660:function(F,n,f){var _=this&&this.__decorate||function(b,y,u,r){var h,o=arguments.length,c=o<3?y:r===null?r=Object.getOwnPropertyDescriptor(y,u):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(b,y,u,r);else for(var m=b.length-1;m>=0;m--)(h=b[m])&&(c=(o<3?h(c):o>3?h(y,u,c):h(y,u))||c);return o>3&&c&&Object.defineProperty(y,u,c),c},v=this&&this.__param||function(b,y){return function(u,r){y(u,r,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const l=f(2585);let g=n.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const y=this._bufferService.buffer;if(b.id===void 0){const m=y.addMarker(y.ybase+y.y),C={data:b,id:this._nextId++,lines:[m]};return m.onDispose((()=>this._removeMarkerFromLink(C,m))),this._dataByLinkId.set(C.id,C),C.id}const u=b,r=this._getEntryIdKey(u),h=this._entriesWithId.get(r);if(h)return this.addLineToLink(h.id,y.ybase+y.y),h.id;const o=y.addMarker(y.ybase+y.y),c={id:this._nextId++,key:this._getEntryIdKey(u),data:u,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(c,o))),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.id}addLineToLink(b,y){const u=this._dataByLinkId.get(b);if(u&&u.lines.every((r=>r.line!==y))){const r=this._bufferService.buffer.addMarker(y);u.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(u,r)))}}getLinkData(b){var y;return(y=this._dataByLinkId.get(b))==null?void 0:y.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,y){const u=b.lines.indexOf(y);u!==-1&&(b.lines.splice(u,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};n.OscLinkService=g=_([v(0,l.IBufferService)],g)},8343:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const f="di$target",_="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[_]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const l=function(g,b,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(u,r,h){r[f]===r?r[_].push({id:u,index:h}):(r[_]=[{id:u,index:h}],r[f]=r)})(l,g,y)};return l.toString=()=>v,n.serviceRegistry.set(v,l),l}},2585:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const _=f(8343);var v;n.IBufferService=(0,_.createDecorator)("BufferService"),n.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),n.ICoreService=(0,_.createDecorator)("CoreService"),n.ICharsetService=(0,_.createDecorator)("CharsetService"),n.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,_.createDecorator)("LogService"),n.IOptionsService=(0,_.createDecorator)("OptionsService"),n.IOscLinkService=(0,_.createDecorator)("OscLinkService"),n.IUnicodeService=(0,_.createDecorator)("UnicodeService"),n.IDecorationService=(0,_.createDecorator)("DecorationService")},1480:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const _=f(8460),v=f(225);class l{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,y,u=!1){return(16777215&b)<<3|(3&y)<<1|(u?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter,this.onChange=this._onChange.event;const b=new v.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let y=0,u=0;const r=b.length;for(let h=0;h<r;++h){let o=b.charCodeAt(h);if(55296<=o&&o<=56319){if(++h>=r)return y+this.wcwidth(o);const C=b.charCodeAt(h);56320<=C&&C<=57343?o=1024*(o-55296)+C-56320+65536:y+=this.wcwidth(C)}const c=this.charProperties(o,u);let m=l.extractWidth(c);l.extractShouldJoin(c)&&(m-=l.extractWidth(u)),y+=m,u=c}return y}charProperties(b,y){return this._activeProvider.charProperties(b,y)}}n.UnicodeService=l}},j={};function Z(F){var n=j[F];if(n!==void 0)return n.exports;var f=j[F]={exports:{}};return G[F].call(f.exports,f,f.exports,Z),f.exports}var se={};return(()=>{var F=se;Object.defineProperty(F,"__esModule",{value:!0}),F.Terminal=void 0;const n=Z(9042),f=Z(3236),_=Z(844),v=Z(5741),l=Z(8285),g=Z(7975),b=Z(7090),y=["cols","rows"];class u extends _.Disposable{constructor(h){super(),this._core=this.register(new f.Terminal(h)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const o=m=>this._core.options[m],c=(m,C)=>{this._checkReadonlyOptions(m),this._core.options[m]=C};for(const m in this._core.options){const C={get:o.bind(this,m),set:c.bind(this,m)};Object.defineProperty(this._publicOptions,m,C)}}_checkReadonlyOptions(h){if(y.includes(h))throw new Error(`Option "${h}" 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 g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new b.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new l.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const o in h)this._publicOptions[o]=h[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,o=!0){this._core.input(h,o)}resize(h,o){this._verifyIntegers(h,o),this._core.resize(h,o)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,o,c){this._verifyIntegers(h,o,c),this._core.select(h,o,c)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,o){this._verifyIntegers(h,o),this._core.selectLines(h,o)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,o){this._core.write(h,o)}writeln(h,o){this._core.write(h),this._core.write(`\r
|
|
57
|
-
`,o)}paste(h){this._core.paste(h)}refresh(h,o){this._verifyIntegers(h,o),this._core.refresh(h,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return n}_verifyIntegers(...h){for(const o of h)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const o of h)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}
|
|
55
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(p){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),h.isLinux&&p&&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(p){const x=this._getMouseBufferCoords(p),L=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!!(L&&O&&x)&&this._areCoordsInSelection(x,L,O)}isCellInSelection(p,x){const L=this._model.finalSelectionStart,O=this._model.finalSelectionEnd;return!(!L||!O)&&this._areCoordsInSelection([p,x],L,O)}_areCoordsInSelection(p,x,L){return p[1]>x[1]&&p[1]<L[1]||x[1]===L[1]&&p[1]===x[1]&&p[0]>=x[0]&&p[0]<L[0]||x[1]<L[1]&&p[1]===L[1]&&p[0]<L[0]||x[1]<L[1]&&p[1]===x[1]&&p[0]>=x[0]}_selectWordAtCursor(p,x){var T,M;const L=(M=(T=this._linkifier.currentLink)==null?void 0:T.link)==null?void 0:M.range;if(L)return this._model.selectionStart=[L.start.x-1,L.start.y-1],this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const O=this._getMouseBufferCoords(p);return!!O&&(this._selectWordAt(O,x),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(p,x){this._model.clearSelection(),p=Math.max(p,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,p],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()}_handleTrim(p){this._model.handleTrim(p)&&this.refresh()}_getMouseBufferCoords(p){const x=this._mouseService.getCoords(p,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x}_getMouseEventScrollAmount(p){let x=(0,l.getCoordsRelativeToElement)(this._coreBrowserService.window,p,this._screenElement)[1];const L=this._renderService.dimensions.css.canvas.height;return x>=0&&x<=L?0:(x>L&&(x-=L),x=Math.min(Math.max(x,-50),50),x/=50,x/Math.abs(x)+Math.round(14*x))}shouldForceSelection(p){return h.isMac?p.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:p.shiftKey}handleMouseDown(p){if(this._mouseDownTimeStamp=p.timeStamp,(p.button!==2||!this.hasSelection)&&p.button===0){if(!this._enabled){if(!this.shouldForceSelection(p))return;p.stopPropagation()}p.preventDefault(),this._dragScrollAmount=0,this._enabled&&p.shiftKey?this._handleIncrementalClick(p):p.detail===1?this._handleSingleClick(p):p.detail===2?this._handleDoubleClick(p):p.detail===3&&this._handleTripleClick(p),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(p){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(p))}_handleSingleClick(p){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(p)?3:0,this._model.selectionStart=this._getMouseBufferCoords(p),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const x=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);x&&x.length!==this._model.selectionStart[0]&&x.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(p){this._selectWordAtCursor(p,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(p){const x=this._getMouseBufferCoords(p);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))}shouldColumnSelect(p){return p.altKey&&!(h.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(p){if(p.stopImmediatePropagation(),!this._model.selectionStart)return;const x=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(p),!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(p),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const L=this._bufferService.buffer;if(this._model.selectionEnd[1]<L.lines.length){const O=L.lines.get(this._model.selectionEnd[1]);O&&O.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}x&&x[0]===this._model.selectionEnd[0]&&x[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const p=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(p.ydisp+this._bufferService.rows,p.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=p.ydisp),this.refresh()}}_handleMouseUp(p){const x=p.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&p.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const L=this._mouseService.getCoords(p,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(L&&L[0]!==void 0&&L[1]!==void 0){const O=(0,g.moveToCellSequence)(L[0]-1,L[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(O,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const p=this._model.finalSelectionStart,x=this._model.finalSelectionEnd,L=!(!p||!x||p[0]===x[0]&&p[1]===x[1]);L?p&&x&&(this._oldSelectionStart&&this._oldSelectionEnd&&p[0]===this._oldSelectionStart[0]&&p[1]===this._oldSelectionStart[1]&&x[0]===this._oldSelectionEnd[0]&&x[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(p,x,L)):this._oldHasSelection&&this._fireOnSelectionChange(p,x,L)}_fireOnSelectionChange(p,x,L){this._oldSelectionStart=p,this._oldSelectionEnd=x,this._oldHasSelection=L,this._onSelectionChange.fire()}_handleBufferActivate(p){this.clearSelection(),this._trimListener.dispose(),this._trimListener=p.activeBuffer.lines.onTrim((x=>this._handleTrim(x)))}_convertViewportColToCharacterIndex(p,x){let L=x;for(let O=0;x>=O;O++){const T=p.loadCell(O,this._workCell).getChars().length;this._workCell.getWidth()===0?L--:T>1&&x!==O&&(L+=T-1)}return L}setSelection(p,x,L){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[p,x],this._model.selectionStartLength=L,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(p){this._isClickInSelection(p)||(this._selectWordAtCursor(p,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(p,x,L=!0,O=!0){if(p[0]>=this._bufferService.cols)return;const T=this._bufferService.buffer,M=T.lines.get(p[1]);if(!M)return;const U=T.translateBufferLineToString(p[1],!1);let K=this._convertViewportColToCharacterIndex(M,p[0]),I=K;const q=p[0]-K;let F=0,R=0,H=0,D=0;if(U.charAt(K)===" "){for(;K>0&&U.charAt(K-1)===" ";)K--;for(;I<U.length&&U.charAt(I+1)===" ";)I++}else{let J=p[0],he=p[0];M.getWidth(J)===0&&(F++,J--),M.getWidth(he)===2&&(R++,he++);const ue=M.getString(he).length;for(ue>1&&(D+=ue-1,I+=ue-1);J>0&&K>0&&!this._isCharWordSeparator(M.loadCell(J-1,this._workCell));){M.loadCell(J-1,this._workCell);const $=this._workCell.getChars().length;this._workCell.getWidth()===0?(F++,J--):$>1&&(H+=$-1,K-=$-1),K--,J--}for(;he<M.length&&I+1<U.length&&!this._isCharWordSeparator(M.loadCell(he+1,this._workCell));){M.loadCell(he+1,this._workCell);const $=this._workCell.getChars().length;this._workCell.getWidth()===2?(R++,he++):$>1&&(D+=$-1,I+=$-1),I++,he++}}I++;let z=K+q-F+H,V=Math.min(this._bufferService.cols,I-K+F+R-H-D);if(x||U.slice(K,I).trim()!==""){if(L&&z===0&&M.getCodePoint(0)!==32){const J=T.lines.get(p[1]-1);if(J&&M.isWrapped&&J.getCodePoint(this._bufferService.cols-1)!==32){const he=this._getWordAt([this._bufferService.cols-1,p[1]-1],!1,!0,!1);if(he){const ue=this._bufferService.cols-he.start;z-=ue,V+=ue}}}if(O&&z+V===this._bufferService.cols&&M.getCodePoint(this._bufferService.cols-1)!==32){const J=T.lines.get(p[1]+1);if(J!=null&&J.isWrapped&&J.getCodePoint(0)!==32){const he=this._getWordAt([0,p[1]+1],!1,!1,!0);he&&(V+=he.length)}}return{start:z,length:V}}}_selectWordAt(p,x){const L=this._getWordAt(p,x);if(L){for(;L.start<0;)L.start+=this._bufferService.cols,p[1]--;this._model.selectionStart=[L.start,p[1]],this._model.selectionStartLength=L.length}}_selectToWordAt(p){const x=this._getWordAt(p,!0);if(x){let L=p[1];for(;x.start<0;)x.start+=this._bufferService.cols,L--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,L++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,L]}}_isCharWordSeparator(p){return p.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(p.getChars())>=0}_selectLineAt(p){const x=this._bufferService.buffer.getWrappedRangeForLine(p),L={start:{x:0,y:x.first},end:{x:this._bufferService.cols-1,y:x.last}};this._model.selectionStart=[0,x.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,o.getRangeLength)(L,this._bufferService.cols)}};n.SelectionService=w=_([v(3,m.IBufferService),v(4,m.ICoreService),v(5,y.IMouseService),v(6,m.IOptionsService),v(7,y.IRenderService),v(8,y.ICoreBrowserService)],w)},4725:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ILinkProviderService=n.IThemeService=n.ICharacterJoinerService=n.ISelectionService=n.IRenderService=n.IMouseService=n.ICoreBrowserService=n.ICharSizeService=void 0;const _=u(8343);n.ICharSizeService=(0,_.createDecorator)("CharSizeService"),n.ICoreBrowserService=(0,_.createDecorator)("CoreBrowserService"),n.IMouseService=(0,_.createDecorator)("MouseService"),n.IRenderService=(0,_.createDecorator)("RenderService"),n.ISelectionService=(0,_.createDecorator)("SelectionService"),n.ICharacterJoinerService=(0,_.createDecorator)("CharacterJoinerService"),n.IThemeService=(0,_.createDecorator)("ThemeService"),n.ILinkProviderService=(0,_.createDecorator)("LinkProviderService")},6731:function(P,n,u){var _=this&&this.__decorate||function(w,p,x,L){var O,T=arguments.length,M=T<3?p:L===null?L=Object.getOwnPropertyDescriptor(p,x):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(w,p,x,L);else for(var U=w.length-1;U>=0;U--)(O=w[U])&&(M=(T<3?O(M):T>3?O(p,x,M):O(p,x))||M);return T>3&&M&&Object.defineProperty(p,x,M),M},v=this&&this.__param||function(w,p){return function(x,L){p(x,L,w)}};Object.defineProperty(n,"__esModule",{value:!0}),n.ThemeService=n.DEFAULT_ANSI_COLORS=void 0;const l=u(7239),g=u(8055),b=u(8460),y=u(844),d=u(2585),r=g.css.toColor("#ffffff"),h=g.css.toColor("#000000"),o=g.css.toColor("#ffffff"),c=g.css.toColor("#000000"),m={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};n.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const w=[g.css.toColor("#2e3436"),g.css.toColor("#cc0000"),g.css.toColor("#4e9a06"),g.css.toColor("#c4a000"),g.css.toColor("#3465a4"),g.css.toColor("#75507b"),g.css.toColor("#06989a"),g.css.toColor("#d3d7cf"),g.css.toColor("#555753"),g.css.toColor("#ef2929"),g.css.toColor("#8ae234"),g.css.toColor("#fce94f"),g.css.toColor("#729fcf"),g.css.toColor("#ad7fa8"),g.css.toColor("#34e2e2"),g.css.toColor("#eeeeec")],p=[0,95,135,175,215,255];for(let x=0;x<216;x++){const L=p[x/36%6|0],O=p[x/6%6|0],T=p[x%6];w.push({css:g.channels.toCss(L,O,T),rgba:g.channels.toRgba(L,O,T)})}for(let x=0;x<24;x++){const L=8+10*x;w.push({css:g.channels.toCss(L,L,L),rgba:g.channels.toRgba(L,L,L)})}return w})());let C=n.ThemeService=class extends y.Disposable{get colors(){return this._colors}constructor(w){super(),this._optionsService=w,this._contrastCache=new l.ColorContrastCache,this._halfContrastCache=new l.ColorContrastCache,this._onChangeColors=this.register(new b.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:r,background:h,cursor:o,cursorAccent:c,selectionForeground:void 0,selectionBackgroundTransparent:m,selectionBackgroundOpaque:g.color.blend(h,m),selectionInactiveBackgroundTransparent:m,selectionInactiveBackgroundOpaque:g.color.blend(h,m),ansi:n.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 p=this._colors;if(p.foreground=S(w.foreground,r),p.background=S(w.background,h),p.cursor=S(w.cursor,o),p.cursorAccent=S(w.cursorAccent,c),p.selectionBackgroundTransparent=S(w.selectionBackground,m),p.selectionBackgroundOpaque=g.color.blend(p.background,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundTransparent=S(w.selectionInactiveBackground,p.selectionBackgroundTransparent),p.selectionInactiveBackgroundOpaque=g.color.blend(p.background,p.selectionInactiveBackgroundTransparent),p.selectionForeground=w.selectionForeground?S(w.selectionForeground,g.NULL_COLOR):void 0,p.selectionForeground===g.NULL_COLOR&&(p.selectionForeground=void 0),g.color.isOpaque(p.selectionBackgroundTransparent)&&(p.selectionBackgroundTransparent=g.color.opacity(p.selectionBackgroundTransparent,.3)),g.color.isOpaque(p.selectionInactiveBackgroundTransparent)&&(p.selectionInactiveBackgroundTransparent=g.color.opacity(p.selectionInactiveBackgroundTransparent,.3)),p.ansi=n.DEFAULT_ANSI_COLORS.slice(),p.ansi[0]=S(w.black,n.DEFAULT_ANSI_COLORS[0]),p.ansi[1]=S(w.red,n.DEFAULT_ANSI_COLORS[1]),p.ansi[2]=S(w.green,n.DEFAULT_ANSI_COLORS[2]),p.ansi[3]=S(w.yellow,n.DEFAULT_ANSI_COLORS[3]),p.ansi[4]=S(w.blue,n.DEFAULT_ANSI_COLORS[4]),p.ansi[5]=S(w.magenta,n.DEFAULT_ANSI_COLORS[5]),p.ansi[6]=S(w.cyan,n.DEFAULT_ANSI_COLORS[6]),p.ansi[7]=S(w.white,n.DEFAULT_ANSI_COLORS[7]),p.ansi[8]=S(w.brightBlack,n.DEFAULT_ANSI_COLORS[8]),p.ansi[9]=S(w.brightRed,n.DEFAULT_ANSI_COLORS[9]),p.ansi[10]=S(w.brightGreen,n.DEFAULT_ANSI_COLORS[10]),p.ansi[11]=S(w.brightYellow,n.DEFAULT_ANSI_COLORS[11]),p.ansi[12]=S(w.brightBlue,n.DEFAULT_ANSI_COLORS[12]),p.ansi[13]=S(w.brightMagenta,n.DEFAULT_ANSI_COLORS[13]),p.ansi[14]=S(w.brightCyan,n.DEFAULT_ANSI_COLORS[14]),p.ansi[15]=S(w.brightWhite,n.DEFAULT_ANSI_COLORS[15]),w.extendedAnsi){const x=Math.min(p.ansi.length-16,w.extendedAnsi.length);for(let L=0;L<x;L++)p.ansi[L+16]=S(w.extendedAnsi[L],n.DEFAULT_ANSI_COLORS[L+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 p=0;p<this._restoreColors.ansi.length;++p)this._colors.ansi[p]=this._restoreColors.ansi[p]}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 S(w,p){if(w!==void 0)try{return g.css.toColor(w)}catch{}return p}n.ThemeService=C=_([v(0,d.IOptionsService)],C)},6349:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CircularList=void 0;const _=u(8460),v=u(844);class l extends v.Disposable{constructor(b){super(),this._maxLength=b,this.onDeleteEmitter=this.register(new _.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new _.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new _.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(b){if(this._maxLength===b)return;const y=new Array(b);for(let d=0;d<Math.min(b,this.length);d++)y[d]=this._array[this._getCyclicIndex(d)];this._array=y,this._maxLength=b,this._startIndex=0}get length(){return this._length}set length(b){if(b>this._length)for(let y=this._length;y<b;y++)this._array[y]=void 0;this._length=b}get(b){return this._array[this._getCyclicIndex(b)]}set(b,y){this._array[this._getCyclicIndex(b)]=y}push(b){this._array[this._getCyclicIndex(this._length)]=b,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(b,y,...d){if(y){for(let r=b;r<this._length-y;r++)this._array[this._getCyclicIndex(r)]=this._array[this._getCyclicIndex(r+y)];this._length-=y,this.onDeleteEmitter.fire({index:b,amount:y})}for(let r=this._length-1;r>=b;r--)this._array[this._getCyclicIndex(r+d.length)]=this._array[this._getCyclicIndex(r)];for(let r=0;r<d.length;r++)this._array[this._getCyclicIndex(b+r)]=d[r];if(d.length&&this.onInsertEmitter.fire({index:b,amount:d.length}),this._length+d.length>this._maxLength){const r=this._length+d.length-this._maxLength;this._startIndex+=r,this._length=this._maxLength,this.onTrimEmitter.fire(r)}else this._length+=d.length}trimStart(b){b>this._length&&(b=this._length),this._startIndex+=b,this._length-=b,this.onTrimEmitter.fire(b)}shiftElements(b,y,d){if(!(y<=0)){if(b<0||b>=this._length)throw new Error("start argument out of range");if(b+d<0)throw new Error("Cannot shift elements in list beyond index 0");if(d>0){for(let h=y-1;h>=0;h--)this.set(b+h+d,this.get(b+h));const r=b+y+d-this._length;if(r>0)for(this._length+=r;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let r=0;r<y;r++)this.set(b+r+d,this.get(b+r))}}_getCyclicIndex(b){return(this._startIndex+b)%this._maxLength}}n.CircularList=l},1439:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.clone=void 0,n.clone=function u(_,v=5){if(typeof _!="object")return _;const l=Array.isArray(_)?[]:{};for(const g in _)l[g]=v<=1?_[g]:_[g]&&u(_[g],v-1);return l}},8055:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let u=0,_=0,v=0,l=0;var g,b,y,d,r;function h(c){const m=c.toString(16);return m.length<2?"0"+m:m}function o(c,m){return c<m?(m+.05)/(c+.05):(c+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(m,C,S,w){return w!==void 0?`#${h(m)}${h(C)}${h(S)}${h(w)}`:`#${h(m)}${h(C)}${h(S)}`},c.toRgba=function(m,C,S,w=255){return(m<<24|C<<16|S<<8|w)>>>0},c.toColor=function(m,C,S,w){return{css:c.toCss(m,C,S,w),rgba:c.toRgba(m,C,S,w)}}})(g||(n.channels=g={})),(function(c){function m(C,S){return l=Math.round(255*S),[u,_,v]=r.toChannels(C.rgba),{css:g.toCss(u,_,v,l),rgba:g.toRgba(u,_,v,l)}}c.blend=function(C,S){if(l=(255&S.rgba)/255,l===1)return{css:S.css,rgba:S.rgba};const w=S.rgba>>24&255,p=S.rgba>>16&255,x=S.rgba>>8&255,L=C.rgba>>24&255,O=C.rgba>>16&255,T=C.rgba>>8&255;return u=L+Math.round((w-L)*l),_=O+Math.round((p-O)*l),v=T+Math.round((x-T)*l),{css:g.toCss(u,_,v),rgba:g.toRgba(u,_,v)}},c.isOpaque=function(C){return(255&C.rgba)==255},c.ensureContrastRatio=function(C,S,w){const p=r.ensureContrastRatio(C.rgba,S.rgba,w);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(C){const S=(255|C.rgba)>>>0;return[u,_,v]=r.toChannels(S),{css:g.toCss(u,_,v),rgba:S}},c.opacity=m,c.multiplyOpacity=function(C,S){return l=255&C.rgba,m(C,l*S/255)},c.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(b||(n.color=b={})),(function(c){let m,C;try{const S=document.createElement("canvas");S.width=1,S.height=1;const w=S.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",C=m.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),g.toColor(u,_,v);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),l=parseInt(S.slice(4,5).repeat(2),16),g.toColor(u,_,v,l);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const w=S.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 u=parseInt(w[1]),_=parseInt(w[2]),v=parseInt(w[3]),l=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(u,_,v,l);if(!m||!C)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=C,m.fillStyle=S,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[u,_,v,l]=m.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,_,v,l),css:S}}})(y||(n.css=y={})),(function(c){function m(C,S,w){const p=C/255,x=S/255,L=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(C){return m(C>>16&255,C>>8&255,255&C)},c.relativeLuminance2=m})(d||(n.rgb=d={})),(function(c){function m(S,w,p){const x=S>>24&255,L=S>>16&255,O=S>>8&255;let T=w>>24&255,M=w>>16&255,U=w>>8&255,K=o(d.relativeLuminance2(T,M,U),d.relativeLuminance2(x,L,O));for(;K<p&&(T>0||M>0||U>0);)T-=Math.max(0,Math.ceil(.1*T)),M-=Math.max(0,Math.ceil(.1*M)),U-=Math.max(0,Math.ceil(.1*U)),K=o(d.relativeLuminance2(T,M,U),d.relativeLuminance2(x,L,O));return(T<<24|M<<16|U<<8|255)>>>0}function C(S,w,p){const x=S>>24&255,L=S>>16&255,O=S>>8&255;let T=w>>24&255,M=w>>16&255,U=w>>8&255,K=o(d.relativeLuminance2(T,M,U),d.relativeLuminance2(x,L,O));for(;K<p&&(T<255||M<255||U<255);)T=Math.min(255,T+Math.ceil(.1*(255-T))),M=Math.min(255,M+Math.ceil(.1*(255-M))),U=Math.min(255,U+Math.ceil(.1*(255-U))),K=o(d.relativeLuminance2(T,M,U),d.relativeLuminance2(x,L,O));return(T<<24|M<<16|U<<8|255)>>>0}c.blend=function(S,w){if(l=(255&w)/255,l===1)return w;const p=w>>24&255,x=w>>16&255,L=w>>8&255,O=S>>24&255,T=S>>16&255,M=S>>8&255;return u=O+Math.round((p-O)*l),_=T+Math.round((x-T)*l),v=M+Math.round((L-M)*l),g.toRgba(u,_,v)},c.ensureContrastRatio=function(S,w,p){const x=d.relativeLuminance(S>>8),L=d.relativeLuminance(w>>8);if(o(x,L)<p){if(L<x){const M=m(S,w,p),U=o(x,d.relativeLuminance(M>>8));if(U<p){const K=C(S,w,p);return U>o(x,d.relativeLuminance(K>>8))?M:K}return M}const O=C(S,w,p),T=o(x,d.relativeLuminance(O>>8));if(T<p){const M=m(S,w,p);return T>o(x,d.relativeLuminance(M>>8))?O:M}return O}},c.reduceLuminance=m,c.increaseLuminance=C,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},8969:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CoreTerminal=void 0;const _=u(844),v=u(2585),l=u(4348),g=u(7866),b=u(744),y=u(7302),d=u(6975),r=u(8460),h=u(1753),o=u(1480),c=u(7994),m=u(9282),C=u(5435),S=u(5981),w=u(2660);let p=!1;class x extends _.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new r.EventEmitter),this._onScroll.event((O=>{var T;(T=this._onScrollApi)==null||T.fire(O.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(O){for(const T in O)this.optionsService.options[T]=O[T]}constructor(O){super(),this._windowsWrappingHeuristics=this.register(new _.MutableDisposable),this._onBinary=this.register(new r.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new r.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new r.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new r.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new r.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new r.EventEmitter),this._instantiationService=new l.InstantiationService,this.optionsService=this.register(new y.OptionsService(O)),this._instantiationService.setService(v.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(b.BufferService)),this._instantiationService.setService(v.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(g.LogService)),this._instantiationService.setService(v.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(d.CoreService)),this._instantiationService.setService(v.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(h.CoreMouseService)),this._instantiationService.setService(v.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(o.UnicodeService)),this._instantiationService.setService(v.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(c.CharsetService),this._instantiationService.setService(v.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(w.OscLinkService),this._instantiationService.setService(v.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new C.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,r.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,r.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,r.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,r.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((T=>{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((T=>{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 S.WriteBuffer(((T,M)=>this._inputHandler.parse(T,M)))),this.register((0,r.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(O,T){this._writeBuffer.write(O,T)}writeSync(O,T){this._logService.logLevel<=v.LogLevelEnum.WARN&&!p&&(this._logService.warn("writeSync is unreliable and will be removed soon."),p=!0),this._writeBuffer.writeSync(O,T)}input(O,T=!0){this.coreService.triggerDataEvent(O,T)}resize(O,T){isNaN(O)||isNaN(T)||(O=Math.max(O,b.MINIMUM_COLS),T=Math.max(T,b.MINIMUM_ROWS),this._bufferService.resize(O,T))}scroll(O,T=!1){this._bufferService.scroll(O,T)}scrollLines(O,T,M){this._bufferService.scrollLines(O,T,M)}scrollPages(O){this.scrollLines(O*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(O){const T=O-this._bufferService.buffer.ydisp;T!==0&&this.scrollLines(T)}registerEscHandler(O,T){return this._inputHandler.registerEscHandler(O,T)}registerDcsHandler(O,T){return this._inputHandler.registerDcsHandler(O,T)}registerCsiHandler(O,T){return this._inputHandler.registerCsiHandler(O,T)}registerOscHandler(O,T){return this._inputHandler.registerOscHandler(O,T)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let O=!1;const T=this.optionsService.rawOptions.windowsPty;T&&T.buildNumber!==void 0&&T.buildNumber!==void 0?O=T.backend==="conpty"&&T.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(O=!0),O?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const O=[];O.push(this.onLineFeed(m.updateWindowsModeWrappedState.bind(null,this._bufferService))),O.push(this.registerCsiHandler({final:"H"},(()=>((0,m.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,_.toDisposable)((()=>{for(const T of O)T.dispose()}))}}}n.CoreTerminal=x},8460:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===u)return void this._listeners.splice(_,1)}}})),this._event}fire(u,_){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,u,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,_){return u((v=>_.fire(v)))},n.runAndSubscribe=function(u,_){return _(void 0),u((v=>_(v)))}},5435:function(P,n,u){var _=this&&this.__decorate||function(F,R,H,D){var z,V=arguments.length,J=V<3?R:D===null?D=Object.getOwnPropertyDescriptor(R,H):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")J=Reflect.decorate(F,R,H,D);else for(var he=F.length-1;he>=0;he--)(z=F[he])&&(J=(V<3?z(J):V>3?z(R,H,J):z(R,H))||J);return V>3&&J&&Object.defineProperty(R,H,J),J},v=this&&this.__param||function(F,R){return function(H,D){R(H,D,F)}};Object.defineProperty(n,"__esModule",{value:!0}),n.InputHandler=n.WindowsOptionsReportType=void 0;const l=u(2584),g=u(7116),b=u(2015),y=u(844),d=u(482),r=u(8437),h=u(8460),o=u(643),c=u(511),m=u(3734),C=u(2585),S=u(1480),w=u(6242),p=u(6351),x=u(5941),L={"(":0,")":1,"*":2,"+":3,"-":1,".":2},O=131072;function T(F,R){if(F>24)return R.setWinLines||!1;switch(F){case 1:return!!R.restoreWin;case 2:return!!R.minimizeWin;case 3:return!!R.setWinPosition;case 4:return!!R.setWinSizePixels;case 5:return!!R.raiseWin;case 6:return!!R.lowerWin;case 7:return!!R.refreshWin;case 8:return!!R.setWinSizeChars;case 9:return!!R.maximizeWin;case 10:return!!R.fullscreenWin;case 11:return!!R.getWinState;case 13:return!!R.getWinPosition;case 14:return!!R.getWinSizePixels;case 15:return!!R.getScreenSizePixels;case 16:return!!R.getCellSizePixels;case 18:return!!R.getWinSizeChars;case 19:return!!R.getScreenSizeChars;case 20:return!!R.getIconTitle;case 21:return!!R.getWinTitle;case 22:return!!R.pushTitle;case 23:return!!R.popTitle;case 24:return!!R.setWinLines}return!1}var M;(function(F){F[F.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",F[F.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(M||(n.WindowsOptionsReportType=M={}));let U=0;class K extends y.Disposable{getAttrData(){return this._curAttrData}constructor(R,H,D,z,V,J,he,ue,$=new b.EscapeSequenceParser){super(),this._bufferService=R,this._charsetService=H,this._coreService=D,this._logService=z,this._optionsService=V,this._oscLinkService=J,this._coreMouseService=he,this._unicodeService=ue,this._parser=$,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new d.StringToUtf32,this._utf8Decoder=new d.Utf8ToUtf32,this._workCell=new c.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new h.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new h.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new h.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new h.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new h.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new h.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new h.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new h.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new h.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new h.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new h.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new h.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 I(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((N=>this._activeBuffer=N.activeBuffer))),this._parser.setCsiHandlerFallback(((N,ne)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(N),params:ne.toArray()})})),this._parser.setEscHandlerFallback((N=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(N)})})),this._parser.setExecuteHandlerFallback((N=>{this._logService.debug("Unknown EXECUTE code: ",{code:N})})),this._parser.setOscHandlerFallback(((N,ne,re)=>{this._logService.debug("Unknown OSC code: ",{identifier:N,action:ne,data:re})})),this._parser.setDcsHandlerFallback(((N,ne,re)=>{ne==="HOOK"&&(re=re.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(N),action:ne,payload:re})})),this._parser.setPrintHandler(((N,ne,re)=>this.print(N,ne,re))),this._parser.registerCsiHandler({final:"@"},(N=>this.insertChars(N))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(N=>this.scrollLeft(N))),this._parser.registerCsiHandler({final:"A"},(N=>this.cursorUp(N))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(N=>this.scrollRight(N))),this._parser.registerCsiHandler({final:"B"},(N=>this.cursorDown(N))),this._parser.registerCsiHandler({final:"C"},(N=>this.cursorForward(N))),this._parser.registerCsiHandler({final:"D"},(N=>this.cursorBackward(N))),this._parser.registerCsiHandler({final:"E"},(N=>this.cursorNextLine(N))),this._parser.registerCsiHandler({final:"F"},(N=>this.cursorPrecedingLine(N))),this._parser.registerCsiHandler({final:"G"},(N=>this.cursorCharAbsolute(N))),this._parser.registerCsiHandler({final:"H"},(N=>this.cursorPosition(N))),this._parser.registerCsiHandler({final:"I"},(N=>this.cursorForwardTab(N))),this._parser.registerCsiHandler({final:"J"},(N=>this.eraseInDisplay(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(N=>this.eraseInDisplay(N,!0))),this._parser.registerCsiHandler({final:"K"},(N=>this.eraseInLine(N,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(N=>this.eraseInLine(N,!0))),this._parser.registerCsiHandler({final:"L"},(N=>this.insertLines(N))),this._parser.registerCsiHandler({final:"M"},(N=>this.deleteLines(N))),this._parser.registerCsiHandler({final:"P"},(N=>this.deleteChars(N))),this._parser.registerCsiHandler({final:"S"},(N=>this.scrollUp(N))),this._parser.registerCsiHandler({final:"T"},(N=>this.scrollDown(N))),this._parser.registerCsiHandler({final:"X"},(N=>this.eraseChars(N))),this._parser.registerCsiHandler({final:"Z"},(N=>this.cursorBackwardTab(N))),this._parser.registerCsiHandler({final:"`"},(N=>this.charPosAbsolute(N))),this._parser.registerCsiHandler({final:"a"},(N=>this.hPositionRelative(N))),this._parser.registerCsiHandler({final:"b"},(N=>this.repeatPrecedingCharacter(N))),this._parser.registerCsiHandler({final:"c"},(N=>this.sendDeviceAttributesPrimary(N))),this._parser.registerCsiHandler({prefix:">",final:"c"},(N=>this.sendDeviceAttributesSecondary(N))),this._parser.registerCsiHandler({final:"d"},(N=>this.linePosAbsolute(N))),this._parser.registerCsiHandler({final:"e"},(N=>this.vPositionRelative(N))),this._parser.registerCsiHandler({final:"f"},(N=>this.hVPosition(N))),this._parser.registerCsiHandler({final:"g"},(N=>this.tabClear(N))),this._parser.registerCsiHandler({final:"h"},(N=>this.setMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(N=>this.setModePrivate(N))),this._parser.registerCsiHandler({final:"l"},(N=>this.resetMode(N))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(N=>this.resetModePrivate(N))),this._parser.registerCsiHandler({final:"m"},(N=>this.charAttributes(N))),this._parser.registerCsiHandler({final:"n"},(N=>this.deviceStatus(N))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(N=>this.deviceStatusPrivate(N))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(N=>this.softReset(N))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(N=>this.setCursorStyle(N))),this._parser.registerCsiHandler({final:"r"},(N=>this.setScrollRegion(N))),this._parser.registerCsiHandler({final:"s"},(N=>this.saveCursor(N))),this._parser.registerCsiHandler({final:"t"},(N=>this.windowOptions(N))),this._parser.registerCsiHandler({final:"u"},(N=>this.restoreCursor(N))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(N=>this.insertColumns(N))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(N=>this.deleteColumns(N))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(N=>this.selectProtected(N))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(N=>this.requestMode(N,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(N=>this.requestMode(N,!1))),this._parser.setExecuteHandler(l.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(l.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(l.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(l.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(l.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(l.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(l.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(l.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(l.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(l.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new w.OscHandler((N=>(this.setTitle(N),this.setIconName(N),!0)))),this._parser.registerOscHandler(1,new w.OscHandler((N=>this.setIconName(N)))),this._parser.registerOscHandler(2,new w.OscHandler((N=>this.setTitle(N)))),this._parser.registerOscHandler(4,new w.OscHandler((N=>this.setOrReportIndexedColor(N)))),this._parser.registerOscHandler(8,new w.OscHandler((N=>this.setHyperlink(N)))),this._parser.registerOscHandler(10,new w.OscHandler((N=>this.setOrReportFgColor(N)))),this._parser.registerOscHandler(11,new w.OscHandler((N=>this.setOrReportBgColor(N)))),this._parser.registerOscHandler(12,new w.OscHandler((N=>this.setOrReportCursorColor(N)))),this._parser.registerOscHandler(104,new w.OscHandler((N=>this.restoreIndexedColor(N)))),this._parser.registerOscHandler(110,new w.OscHandler((N=>this.restoreFgColor(N)))),this._parser.registerOscHandler(111,new w.OscHandler((N=>this.restoreBgColor(N)))),this._parser.registerOscHandler(112,new w.OscHandler((N=>this.restoreCursorColor(N)))),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 N in g.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:N},(()=>this.selectCharset("("+N))),this._parser.registerEscHandler({intermediates:")",final:N},(()=>this.selectCharset(")"+N))),this._parser.registerEscHandler({intermediates:"*",final:N},(()=>this.selectCharset("*"+N))),this._parser.registerEscHandler({intermediates:"+",final:N},(()=>this.selectCharset("+"+N))),this._parser.registerEscHandler({intermediates:"-",final:N},(()=>this.selectCharset("-"+N))),this._parser.registerEscHandler({intermediates:".",final:N},(()=>this.selectCharset("."+N))),this._parser.registerEscHandler({intermediates:"/",final:N},(()=>this.selectCharset("/"+N)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((N=>(this._logService.error("Parsing error: ",N),N))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new p.DcsHandler(((N,ne)=>this.requestStatusString(N,ne))))}_preserveStack(R,H,D,z){this._parseStack.paused=!0,this._parseStack.cursorStartX=R,this._parseStack.cursorStartY=H,this._parseStack.decodedLength=D,this._parseStack.position=z}_logSlowResolvingAsync(R){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([R,new Promise(((H,D)=>setTimeout((()=>D("#SLOW_TIMEOUT")),5e3)))]).catch((H=>{if(H!=="#SLOW_TIMEOUT")throw H;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(R,H){let D,z=this._activeBuffer.x,V=this._activeBuffer.y,J=0;const he=this._parseStack.paused;if(he){if(D=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,H))return this._logSlowResolvingAsync(D),D;z=this._parseStack.cursorStartX,V=this._parseStack.cursorStartY,this._parseStack.paused=!1,R.length>O&&(J=this._parseStack.position+O)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof R=="string"?` "${R}"`:` "${Array.prototype.map.call(R,(N=>String.fromCharCode(N))).join("")}"`),typeof R=="string"?R.split("").map((N=>N.charCodeAt(0))):R),this._parseBuffer.length<R.length&&this._parseBuffer.length<O&&(this._parseBuffer=new Uint32Array(Math.min(R.length,O))),he||this._dirtyRowTracker.clearRange(),R.length>O)for(let N=J;N<R.length;N+=O){const ne=N+O<R.length?N+O:R.length,re=typeof R=="string"?this._stringDecoder.decode(R.substring(N,ne),this._parseBuffer):this._utf8Decoder.decode(R.subarray(N,ne),this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,re))return this._preserveStack(z,V,re,N),this._logSlowResolvingAsync(D),D}else if(!he){const N=typeof R=="string"?this._stringDecoder.decode(R,this._parseBuffer):this._utf8Decoder.decode(R,this._parseBuffer);if(D=this._parser.parse(this._parseBuffer,N))return this._preserveStack(z,V,N,0),this._logSlowResolvingAsync(D),D}this._activeBuffer.x===z&&this._activeBuffer.y===V||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),$=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);$<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min($,this._bufferService.rows-1),Math.min(ue,this._bufferService.rows-1))}print(R,H,D){let z,V;const J=this._charsetService.charset,he=this._optionsService.rawOptions.screenReaderMode,ue=this._bufferService.cols,$=this._coreService.decPrivateModes.wraparound,N=this._coreService.modes.insertMode,ne=this._curAttrData;let re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&D-H>0&&re.getWidth(this._activeBuffer.x-1)===2&&re.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ne);let _e=this._parser.precedingJoinState;for(let fe=H;fe<D;++fe){if(z=R[fe],z<127&&J){const Qe=J[String.fromCharCode(z)];Qe&&(z=Qe.charCodeAt(0))}const xe=this._unicodeService.charProperties(z,_e);V=S.UnicodeService.extractWidth(xe);const pe=S.UnicodeService.extractShouldJoin(xe),Ne=pe?S.UnicodeService.extractWidth(_e):0;if(_e=xe,he&&this._onA11yChar.fire((0,d.stringFromCodePoint)(z)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+V-Ne>ue){if($){const Qe=re;let be=this._activeBuffer.x-Ne;for(this._activeBuffer.x=Ne,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ne>0&&re instanceof r.BufferLine&&re.copyCellsFrom(Qe,be,0,Ne,!1);be<ue;)Qe.setCellFromCodepoint(be++,0,1,ne)}else if(this._activeBuffer.x=ue-1,V===2)continue}if(pe&&this._activeBuffer.x){const Qe=re.getWidth(this._activeBuffer.x-1)?1:2;re.addCodepointToCell(this._activeBuffer.x-Qe,z,V);for(let be=V-Ne;--be>=0;)re.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}else if(N&&(re.insertCells(this._activeBuffer.x,V-Ne,this._activeBuffer.getNullCell(ne)),re.getWidth(ue-1)===2&&re.setCellFromCodepoint(ue-1,o.NULL_CELL_CODE,o.NULL_CELL_WIDTH,ne)),re.setCellFromCodepoint(this._activeBuffer.x++,z,V,ne),V>0)for(;--V;)re.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}this._parser.precedingJoinState=_e,this._activeBuffer.x<ue&&D-H>0&&re.getWidth(this._activeBuffer.x)===0&&!re.hasContent(this._activeBuffer.x)&&re.setCellFromCodepoint(this._activeBuffer.x,0,1,ne),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(R,H){return R.final!=="t"||R.prefix||R.intermediates?this._parser.registerCsiHandler(R,H):this._parser.registerCsiHandler(R,(D=>!T(D.params[0],this._optionsService.rawOptions.windowOptions)||H(D)))}registerDcsHandler(R,H){return this._parser.registerDcsHandler(R,new p.DcsHandler(H))}registerEscHandler(R,H){return this._parser.registerEscHandler(R,H)}registerOscHandler(R,H){return this._parser.registerOscHandler(R,new w.OscHandler(H))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var R;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&&((R=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&R.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);H.hasWidth(this._activeBuffer.x)&&!H.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const R=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-R),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(R=this._bufferService.cols-1){this._activeBuffer.x=Math.min(R,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(R,H){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=R,this._activeBuffer.y=this._activeBuffer.scrollTop+H):(this._activeBuffer.x=R,this._activeBuffer.y=H),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(R,H){this._restrictCursor(),this._setCursor(this._activeBuffer.x+R,this._activeBuffer.y+H)}cursorUp(R){const H=this._activeBuffer.y-this._activeBuffer.scrollTop;return H>=0?this._moveCursor(0,-Math.min(H,R.params[0]||1)):this._moveCursor(0,-(R.params[0]||1)),!0}cursorDown(R){const H=this._activeBuffer.scrollBottom-this._activeBuffer.y;return H>=0?this._moveCursor(0,Math.min(H,R.params[0]||1)):this._moveCursor(0,R.params[0]||1),!0}cursorForward(R){return this._moveCursor(R.params[0]||1,0),!0}cursorBackward(R){return this._moveCursor(-(R.params[0]||1),0),!0}cursorNextLine(R){return this.cursorDown(R),this._activeBuffer.x=0,!0}cursorPrecedingLine(R){return this.cursorUp(R),this._activeBuffer.x=0,!0}cursorCharAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(R){return this._setCursor(R.length>=2?(R.params[1]||1)-1:0,(R.params[0]||1)-1),!0}charPosAbsolute(R){return this._setCursor((R.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(R){return this._moveCursor(R.params[0]||1,0),!0}linePosAbsolute(R){return this._setCursor(this._activeBuffer.x,(R.params[0]||1)-1),!0}vPositionRelative(R){return this._moveCursor(0,R.params[0]||1),!0}hVPosition(R){return this.cursorPosition(R),!0}tabClear(R){const H=R.params[0];return H===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:H===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=R.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(R){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let H=R.params[0]||1;for(;H--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(R){const H=R.params[0];return H===1&&(this._curAttrData.bg|=536870912),H!==2&&H!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(R,H,D,z=!1,V=!1){const J=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);J.replaceCells(H,D,this._activeBuffer.getNullCell(this._eraseAttrData()),V),z&&(J.isWrapped=!1)}_resetBufferLine(R,H=!1){const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+R);D&&(D.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),H),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+R),D.isWrapped=!1)}eraseInDisplay(R,H=!1){let D;switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:for(D=this._activeBuffer.y,this._dirtyRowTracker.markDirty(D),this._eraseInBufferLine(D++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);D<this._bufferService.rows;D++)this._resetBufferLine(D,H);this._dirtyRowTracker.markDirty(D);break;case 1:for(D=this._activeBuffer.y,this._dirtyRowTracker.markDirty(D),this._eraseInBufferLine(D,0,this._activeBuffer.x+1,!0,H),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(D+1).isWrapped=!1);D--;)this._resetBufferLine(D,H);this._dirtyRowTracker.markDirty(0);break;case 2:for(D=this._bufferService.rows,this._dirtyRowTracker.markDirty(D-1);D--;)this._resetBufferLine(D,H);this._dirtyRowTracker.markDirty(0);break;case 3:const z=this._activeBuffer.lines.length-this._bufferService.rows;z>0&&(this._activeBuffer.lines.trimStart(z),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-z,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-z,0),this._onScroll.fire(0))}return!0}eraseInLine(R,H=!1){switch(this._restrictCursor(this._bufferService.cols),R.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,H);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,H);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,H)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(R){this._restrictCursor();let H=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=this._activeBuffer.ybase+this._activeBuffer.y,z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,V=this._bufferService.rows-1+this._activeBuffer.ybase-z+1;for(;H--;)this._activeBuffer.lines.splice(V-1,1),this._activeBuffer.lines.splice(D,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(R){this._restrictCursor();let H=R.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=this._activeBuffer.ybase+this._activeBuffer.y;let z;for(z=this._bufferService.rows-1-this._activeBuffer.scrollBottom,z=this._bufferService.rows-1+this._activeBuffer.ybase-z;H--;)this._activeBuffer.lines.splice(D,1),this._activeBuffer.lines.splice(z,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.insertCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.deleteCells(this._activeBuffer.x,R.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(R){let H=R.params[0]||1;for(;H--;)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(R){let H=R.params[0]||1;for(;H--;)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(r.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);z.deleteCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);z.insertCells(0,H,this._activeBuffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);z.insertCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(R){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const H=R.params[0]||1;for(let D=this._activeBuffer.scrollTop;D<=this._activeBuffer.scrollBottom;++D){const z=this._activeBuffer.lines.get(this._activeBuffer.ybase+D);z.deleteCells(this._activeBuffer.x,H,this._activeBuffer.getNullCell(this._eraseAttrData())),z.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(R){this._restrictCursor();const H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return H&&(H.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(R.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(R){const H=this._parser.precedingJoinState;if(!H)return!0;const D=R.params[0]||1,z=S.UnicodeService.extractWidth(H),V=this._activeBuffer.x-z,J=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(V),he=new Uint32Array(J.length*D);let ue=0;for(let N=0;N<J.length;){const ne=J.codePointAt(N)||0;he[ue++]=ne,N+=ne>65535?2:1}let $=ue;for(let N=1;N<D;++N)he.copyWithin($,0,ue),$+=ue;return this.print(he,0,$),!0}sendDeviceAttributesPrimary(R){return R.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(l.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(l.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(R){return R.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(l.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(l.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(R.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(l.C0.ESC+"[>83;40003;0c")),!0}_is(R){return(this._optionsService.rawOptions.termName+"").indexOf(R)===0}setMode(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,g.DEFAULT_CHARSET),this._charsetService.setgCharset(1,g.DEFAULT_CHARSET),this._charsetService.setgCharset(2,g.DEFAULT_CHARSET),this._charsetService.setgCharset(3,g.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(R){for(let H=0;H<R.length;H++)switch(R.params[H]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(R){for(let H=0;H<R.length;H++)switch(R.params[H]){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(),R.params[H]===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(R,H){const D=this._coreService.decPrivateModes,{activeProtocol:z,activeEncoding:V}=this._coreMouseService,J=this._coreService,{buffers:he,cols:ue}=this._bufferService,{active:$,alt:N}=he,ne=this._optionsService.rawOptions,re=pe=>pe?1:2,_e=R.params[0];return fe=_e,xe=H?_e===2?4:_e===4?re(J.modes.insertMode):_e===12?3:_e===20?re(ne.convertEol):0:_e===1?re(D.applicationCursorKeys):_e===3?ne.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:_e===6?re(D.origin):_e===7?re(D.wraparound):_e===8?3:_e===9?re(z==="X10"):_e===12?re(ne.cursorBlink):_e===25?re(!J.isCursorHidden):_e===45?re(D.reverseWraparound):_e===66?re(D.applicationKeypad):_e===67?4:_e===1e3?re(z==="VT200"):_e===1002?re(z==="DRAG"):_e===1003?re(z==="ANY"):_e===1004?re(D.sendFocus):_e===1005?4:_e===1006?re(V==="SGR"):_e===1015?4:_e===1016?re(V==="SGR_PIXELS"):_e===1048?1:_e===47||_e===1047||_e===1049?re($===N):_e===2004?re(D.bracketedPasteMode):0,J.triggerDataEvent(`${l.C0.ESC}[${H?"":"?"}${fe};${xe}$y`),!0;var fe,xe}_updateAttrColor(R,H,D,z,V){return H===2?(R|=50331648,R&=-16777216,R|=m.AttributeData.fromColorRGB([D,z,V])):H===5&&(R&=-50331904,R|=33554432|255&D),R}_extractColor(R,H,D){const z=[0,0,-1,0,0,0];let V=0,J=0;do{if(z[J+V]=R.params[H+J],R.hasSubParams(H+J)){const he=R.getSubParams(H+J);let ue=0;do z[1]===5&&(V=1),z[J+ue+1+V]=he[ue];while(++ue<he.length&&ue+J+1+V<z.length);break}if(z[1]===5&&J+V>=2||z[1]===2&&J+V>=5)break;z[1]&&(V=1)}while(++J+H<R.length&&J+V<z.length);for(let he=2;he<z.length;++he)z[he]===-1&&(z[he]=0);switch(z[0]){case 38:D.fg=this._updateAttrColor(D.fg,z[1],z[3],z[4],z[5]);break;case 48:D.bg=this._updateAttrColor(D.bg,z[1],z[3],z[4],z[5]);break;case 58:D.extended=D.extended.clone(),D.extended.underlineColor=this._updateAttrColor(D.extended.underlineColor,z[1],z[3],z[4],z[5])}return J}_processUnderline(R,H){H.extended=H.extended.clone(),(!~R||R>5)&&(R=1),H.extended.underlineStyle=R,H.fg|=268435456,R===0&&(H.fg&=-268435457),H.updateExtended()}_processSGR0(R){R.fg=r.DEFAULT_ATTR_DATA.fg,R.bg=r.DEFAULT_ATTR_DATA.bg,R.extended=R.extended.clone(),R.extended.underlineStyle=0,R.extended.underlineColor&=-67108864,R.updateExtended()}charAttributes(R){if(R.length===1&&R.params[0]===0)return this._processSGR0(this._curAttrData),!0;const H=R.length;let D;const z=this._curAttrData;for(let V=0;V<H;V++)D=R.params[V],D>=30&&D<=37?(z.fg&=-50331904,z.fg|=16777216|D-30):D>=40&&D<=47?(z.bg&=-50331904,z.bg|=16777216|D-40):D>=90&&D<=97?(z.fg&=-50331904,z.fg|=16777224|D-90):D>=100&&D<=107?(z.bg&=-50331904,z.bg|=16777224|D-100):D===0?this._processSGR0(z):D===1?z.fg|=134217728:D===3?z.bg|=67108864:D===4?(z.fg|=268435456,this._processUnderline(R.hasSubParams(V)?R.getSubParams(V)[0]:1,z)):D===5?z.fg|=536870912:D===7?z.fg|=67108864:D===8?z.fg|=1073741824:D===9?z.fg|=2147483648:D===2?z.bg|=134217728:D===21?this._processUnderline(2,z):D===22?(z.fg&=-134217729,z.bg&=-134217729):D===23?z.bg&=-67108865:D===24?(z.fg&=-268435457,this._processUnderline(0,z)):D===25?z.fg&=-536870913:D===27?z.fg&=-67108865:D===28?z.fg&=-1073741825:D===29?z.fg&=2147483647:D===39?(z.fg&=-67108864,z.fg|=16777215&r.DEFAULT_ATTR_DATA.fg):D===49?(z.bg&=-67108864,z.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):D===38||D===48||D===58?V+=this._extractColor(R,V,z):D===53?z.bg|=1073741824:D===55?z.bg&=-1073741825:D===59?(z.extended=z.extended.clone(),z.extended.underlineColor=-1,z.updateExtended()):D===100?(z.fg&=-67108864,z.fg|=16777215&r.DEFAULT_ATTR_DATA.fg,z.bg&=-67108864,z.bg|=16777215&r.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",D);return!0}deviceStatus(R){switch(R.params[0]){case 5:this._coreService.triggerDataEvent(`${l.C0.ESC}[0n`);break;case 6:const H=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[${H};${D}R`)}return!0}deviceStatusPrivate(R){if(R.params[0]===6){const H=this._activeBuffer.y+1,D=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${l.C0.ESC}[?${H};${D}R`)}return!0}softReset(R){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=r.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(R){const H=R.params[0]||1;switch(H){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 D=H%2==1;return this._optionsService.options.cursorBlink=D,!0}setScrollRegion(R){const H=R.params[0]||1;let D;return(R.length<2||(D=R.params[1])>this._bufferService.rows||D===0)&&(D=this._bufferService.rows),D>H&&(this._activeBuffer.scrollTop=H-1,this._activeBuffer.scrollBottom=D-1,this._setCursor(0,0)),!0}windowOptions(R){if(!T(R.params[0],this._optionsService.rawOptions.windowOptions))return!0;const H=R.length>1?R.params[1]:0;switch(R.params[0]){case 14:H!==2&&this._onRequestWindowsOptionsReport.fire(M.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(M.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${l.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:H!==0&&H!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),H!==0&&H!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:H!==0&&H!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),H!==0&&H!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(R){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(R){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(R){return this._windowTitle=R,this._onTitleChange.fire(R),!0}setIconName(R){return this._iconName=R,!0}setOrReportIndexedColor(R){const H=[],D=R.split(";");for(;D.length>1;){const z=D.shift(),V=D.shift();if(/^\d+$/.exec(z)){const J=parseInt(z);if(q(J))if(V==="?")H.push({type:0,index:J});else{const he=(0,x.parseColor)(V);he&&H.push({type:1,index:J,color:he})}}}return H.length&&this._onColor.fire(H),!0}setHyperlink(R){const H=R.split(";");return!(H.length<2)&&(H[1]?this._createHyperlink(H[0],H[1]):!H[0]&&this._finishHyperlink())}_createHyperlink(R,H){this._getCurrentLinkId()&&this._finishHyperlink();const D=R.split(":");let z;const V=D.findIndex((J=>J.startsWith("id=")));return V!==-1&&(z=D[V].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:z,uri:H}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(R,H){const D=R.split(";");for(let z=0;z<D.length&&!(H>=this._specialColors.length);++z,++H)if(D[z]==="?")this._onColor.fire([{type:0,index:this._specialColors[H]}]);else{const V=(0,x.parseColor)(D[z]);V&&this._onColor.fire([{type:1,index:this._specialColors[H],color:V}])}return!0}setOrReportFgColor(R){return this._setOrReportSpecialColor(R,0)}setOrReportBgColor(R){return this._setOrReportSpecialColor(R,1)}setOrReportCursorColor(R){return this._setOrReportSpecialColor(R,2)}restoreIndexedColor(R){if(!R)return this._onColor.fire([{type:2}]),!0;const H=[],D=R.split(";");for(let z=0;z<D.length;++z)if(/^\d+$/.exec(D[z])){const V=parseInt(D[z]);q(V)&&H.push({type:2,index:V})}return H.length&&this._onColor.fire(H),!0}restoreFgColor(R){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(R){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(R){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,g.DEFAULT_CHARSET),!0}selectCharset(R){return R.length!==2?(this.selectDefaultCharset(),!0):(R[0]==="/"||this._charsetService.setgCharset(L[R[0]],g.CHARSETS[R[1]]||g.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 R=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,R,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=r.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=r.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(R){return this._charsetService.setgLevel(R),!0}screenAlignmentPattern(){const R=new c.CellData;R.content=4194373,R.fg=this._curAttrData.fg,R.bg=this._curAttrData.bg,this._setCursor(0,0);for(let H=0;H<this._bufferService.rows;++H){const D=this._activeBuffer.ybase+this._activeBuffer.y+H,z=this._activeBuffer.lines.get(D);z&&(z.fill(R),z.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(R,H){const D=this._bufferService.buffer,z=this._optionsService.rawOptions;return(V=>(this._coreService.triggerDataEvent(`${l.C0.ESC}${V}${l.C0.ESC}\\`),!0))(R==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:R==='"p'?'P1$r61;1"p':R==="r"?`P1$r${D.scrollTop+1};${D.scrollBottom+1}r`:R==="m"?"P1$r0m":R===" q"?`P1$r${{block:2,underline:4,bar:6}[z.cursorStyle]-(z.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(R,H){this._dirtyRowTracker.markRangeDirty(R,H)}}n.InputHandler=K;let I=class{constructor(F){this._bufferService=F,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(F){F<this.start?this.start=F:F>this.end&&(this.end=F)}markRangeDirty(F,R){F>R&&(U=F,F=R,R=U),F<this.start&&(this.start=F),R>this.end&&(this.end=R)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function q(F){return 0<=F&&F<256}I=_([v(0,C.IBufferService)],I)},844:(P,n)=>{function u(_){for(const v of _)v.dispose();_.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},n.toDisposable=function(_){return{dispose:_}},n.disposeArray=u,n.getDisposeArrayDisposable=function(_){return{dispose:()=>u(_)}}},1505:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,l,g){this._data[v]||(this._data[v]={}),this._data[v][l]=g}get(v,l){return this._data[v]?this._data[v][l]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(_,v,l,g,b){this._data.get(_,v)||this._data.set(_,v,new u),this._data.get(_,v).set(l,g,b)}get(_,v,l,g){var b;return(b=this._data.get(_,v))==null?void 0:b.get(l,g)}clear(){this._data.clear()}}},6114:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const u=n.isNode?"node":navigator.userAgent,_=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),n.isIpad=_==="iPad",n.isIphone=_==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),n.isLinux=_.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},6106:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.SortedList=void 0;let u=0;n.SortedList=class{constructor(_){this._getKey=_,this._array=[]}clear(){this._array.length=0}insert(_){this._array.length!==0?(u=this._search(this._getKey(_)),this._array.splice(u,0,_)):this._array.push(_)}delete(_){if(this._array.length===0)return!1;const v=this._getKey(_);if(v===void 0||(u=this._search(v),u===-1)||this._getKey(this._array[u])!==v)return!1;do if(this._array[u]===_)return this._array.splice(u,1),!0;while(++u<this._array.length&&this._getKey(this._array[u])===v);return!1}*getKeyIterator(_){if(this._array.length!==0&&(u=this._search(_),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===_))do yield this._array[u];while(++u<this._array.length&&this._getKey(this._array[u])===_)}forEachByKey(_,v){if(this._array.length!==0&&(u=this._search(_),!(u<0||u>=this._array.length)&&this._getKey(this._array[u])===_))do v(this._array[u]);while(++u<this._array.length&&this._getKey(this._array[u])===_)}values(){return[...this._array].values()}_search(_){let v=0,l=this._array.length-1;for(;l>=v;){let g=v+l>>1;const b=this._getKey(this._array[g]);if(b>_)l=g-1;else{if(!(b<_)){for(;g>0&&this._getKey(this._array[g-1])===_;)g--;return g}v=g+1}}return v}}},7226:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const _=u(6114);class v{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let y=0,d=0,r=b.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),d=Math.max(y,d),h=b.timeRemaining(),1.5*d>h)return r-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-y))}ms`),void this._start();r=h}this.clear()}}class l extends v{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const y=Date.now()+b;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=l,n.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:l,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},9282:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.updateWindowsModeWrappedState=void 0;const _=u(643);n.updateWindowsModeWrappedState=function(v){const l=v.buffer.lines.get(v.buffer.ybase+v.buffer.y-1),g=l==null?void 0:l.get(v.cols-1),b=v.buffer.lines.get(v.buffer.ybase+v.buffer.y);b&&g&&(b.isWrapped=g[_.CHAR_DATA_CODE_INDEX]!==_.NULL_CELL_CODE&&g[_.CHAR_DATA_CODE_INDEX]!==_.WHITESPACE_CELL_CODE)}},3734:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new u;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}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}}n.AttributeData=u;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,g=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=g}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=_},9092:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Buffer=n.MAX_BUFFER_SIZE=void 0;const _=u(6349),v=u(7226),l=u(3734),g=u(8437),b=u(4634),y=u(511),d=u(643),r=u(4863),h=u(7116);n.MAX_BUFFER_SIZE=4294967295,n.Buffer=class{constructor(o,c,m){this._hasScrollback=o,this._optionsService=c,this._bufferService=m,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=g.DEFAULT_ATTR_DATA.clone(),this.savedCharset=h.DEFAULT_CHARSET,this.markers=[],this._nullCell=y.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]),this._whitespaceCell=y.CellData.fromCharData([0,d.WHITESPACE_CELL_CHAR,d.WHITESPACE_CELL_WIDTH,d.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new v.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(o){return o?(this._nullCell.fg=o.fg,this._nullCell.bg=o.bg,this._nullCell.extended=o.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new l.ExtendedAttrs),this._nullCell}getWhitespaceCell(o){return o?(this._whitespaceCell.fg=o.fg,this._whitespaceCell.bg=o.bg,this._whitespaceCell.extended=o.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new l.ExtendedAttrs),this._whitespaceCell}getBlankLine(o,c){return new g.BufferLine(this._bufferService.cols,this.getNullCell(o),c)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const o=this.ybase+this.y-this.ydisp;return o>=0&&o<this._rows}_getCorrectBufferLength(o){if(!this._hasScrollback)return o;const c=o+this._optionsService.rawOptions.scrollback;return c>n.MAX_BUFFER_SIZE?n.MAX_BUFFER_SIZE:c}fillViewportRows(o){if(this.lines.length===0){o===void 0&&(o=g.DEFAULT_ATTR_DATA);let c=this._rows;for(;c--;)this.lines.push(this.getBlankLine(o))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new _.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(o,c){const m=this.getNullCell(g.DEFAULT_ATTR_DATA);let C=0;const S=this._getCorrectBufferLength(c);if(S>this.lines.maxLength&&(this.lines.maxLength=S),this.lines.length>0){if(this._cols<o)for(let p=0;p<this.lines.length;p++)C+=+this.lines.get(p).resize(o,m);let w=0;if(this._rows<c)for(let p=this._rows;p<c;p++)this.lines.length<c+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new g.BufferLine(o,m)):this.ybase>0&&this.lines.length<=this.ybase+this.y+w+1?(this.ybase--,w++,this.ydisp>0&&this.ydisp--):this.lines.push(new g.BufferLine(o,m)));else for(let p=this._rows;p>c;p--)this.lines.length>c+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(S<this.lines.maxLength){const p=this.lines.length-S;p>0&&(this.lines.trimStart(p),this.ybase=Math.max(this.ybase-p,0),this.ydisp=Math.max(this.ydisp-p,0),this.savedY=Math.max(this.savedY-p,0)),this.lines.maxLength=S}this.x=Math.min(this.x,o-1),this.y=Math.min(this.y,c-1),w&&(this.y+=w),this.savedX=Math.min(this.savedX,o-1),this.scrollTop=0}if(this.scrollBottom=c-1,this._isReflowEnabled&&(this._reflow(o,c),this._cols>o))for(let w=0;w<this.lines.length;w++)C+=+this.lines.get(w).resize(o,m);this._cols=o,this._rows=c,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let o=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,o=!1);let c=0;for(;this._memoryCleanupPosition<this.lines.length;)if(c+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),c>100)return!0;return o}get _isReflowEnabled(){const o=this._optionsService.rawOptions.windowsPty;return o&&o.buildNumber?this._hasScrollback&&o.backend==="conpty"&&o.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(o,c){this._cols!==o&&(o>this._cols?this._reflowLarger(o,c):this._reflowSmaller(o,c))}_reflowLarger(o,c){const m=(0,b.reflowLargerGetLinesToRemove)(this.lines,this._cols,o,this.ybase+this.y,this.getNullCell(g.DEFAULT_ATTR_DATA));if(m.length>0){const C=(0,b.reflowLargerCreateNewLayout)(this.lines,m);(0,b.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(o,c,C.countRemoved)}}_reflowLargerAdjustViewport(o,c,m){const C=this.getNullCell(g.DEFAULT_ATTR_DATA);let S=m;for(;S-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<c&&this.lines.push(new g.BufferLine(o,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-m,0)}_reflowSmaller(o,c){const m=this.getNullCell(g.DEFAULT_ATTR_DATA),C=[];let S=0;for(let w=this.lines.length-1;w>=0;w--){let p=this.lines.get(w);if(!p||!p.isWrapped&&p.getTrimmedLength()<=o)continue;const x=[p];for(;p.isWrapped&&w>0;)p=this.lines.get(--w),x.unshift(p);const L=this.ybase+this.y;if(L>=w&&L<w+x.length)continue;const O=x[x.length-1].getTrimmedLength(),T=(0,b.reflowSmallerGetNewLineLengths)(x,this._cols,o),M=T.length-x.length;let U;U=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+M):Math.max(0,this.lines.length-this.lines.maxLength+M);const K=[];for(let D=0;D<M;D++){const z=this.getBlankLine(g.DEFAULT_ATTR_DATA,!0);K.push(z)}K.length>0&&(C.push({start:w+x.length+S,newLines:K}),S+=K.length),x.push(...K);let I=T.length-1,q=T[I];q===0&&(I--,q=T[I]);let F=x.length-M-1,R=O;for(;F>=0;){const D=Math.min(R,q);if(x[I]===void 0)break;if(x[I].copyCellsFrom(x[F],R-D,q-D,D,!0),q-=D,q===0&&(I--,q=T[I]),R-=D,R===0){F--;const z=Math.max(F,0);R=(0,b.getWrappedLineTrimmedLength)(x,z,this._cols)}}for(let D=0;D<x.length;D++)T[D]<o&&x[D].setCell(T[D],m);let H=M-U;for(;H-- >0;)this.ybase===0?this.y<c-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+S)-c&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+M,this.ybase+c-1)}if(C.length>0){const w=[],p=[];for(let I=0;I<this.lines.length;I++)p.push(this.lines.get(I));const x=this.lines.length;let L=x-1,O=0,T=C[O];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+S);let M=0;for(let I=Math.min(this.lines.maxLength-1,x+S-1);I>=0;I--)if(T&&T.start>L+M){for(let q=T.newLines.length-1;q>=0;q--)this.lines.set(I--,T.newLines[q]);I++,w.push({index:L+1,amount:T.newLines.length}),M+=T.newLines.length,T=C[++O]}else this.lines.set(I,p[L--]);let U=0;for(let I=w.length-1;I>=0;I--)w[I].index+=U,this.lines.onInsertEmitter.fire(w[I]),U+=w[I].amount;const K=Math.max(0,x+S-this.lines.maxLength);K>0&&this.lines.onTrimEmitter.fire(K)}}translateBufferLineToString(o,c,m=0,C){const S=this.lines.get(o);return S?S.translateToString(c,m,C):""}getWrappedRangeForLine(o){let c=o,m=o;for(;c>0&&this.lines.get(c).isWrapped;)c--;for(;m+1<this.lines.length&&this.lines.get(m+1).isWrapped;)m++;return{first:c,last:m}}setupTabStops(o){for(o!=null?this.tabs[o]||(o=this.prevStop(o)):(this.tabs={},o=0);o<this._cols;o+=this._optionsService.rawOptions.tabStopWidth)this.tabs[o]=!0}prevStop(o){for(o==null&&(o=this.x);!this.tabs[--o]&&o>0;);return o>=this._cols?this._cols-1:o<0?0:o}nextStop(o){for(o==null&&(o=this.x);!this.tabs[++o]&&o<this._cols;);return o>=this._cols?this._cols-1:o<0?0:o}clearMarkers(o){this._isClearing=!0;for(let c=0;c<this.markers.length;c++)this.markers[c].line===o&&(this.markers[c].dispose(),this.markers.splice(c--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let o=0;o<this.markers.length;o++)this.markers[o].dispose(),this.markers.splice(o--,1);this._isClearing=!1}addMarker(o){const c=new r.Marker(o);return this.markers.push(c),c.register(this.lines.onTrim((m=>{c.line-=m,c.line<0&&c.dispose()}))),c.register(this.lines.onInsert((m=>{c.line>=m.index&&(c.line+=m.amount)}))),c.register(this.lines.onDelete((m=>{c.line>=m.index&&c.line<m.index+m.amount&&c.dispose(),c.line>m.index&&(c.line-=m.amount)}))),c.register(c.onDispose((()=>this._removeMarker(c)))),c}_removeMarker(o){this._isClearing||this.markers.splice(this.markers.indexOf(o),1)}}},8437:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLine=n.DEFAULT_ATTR_DATA=void 0;const _=u(3734),v=u(511),l=u(643),g=u(482);n.DEFAULT_ATTR_DATA=Object.freeze(new _.AttributeData);let b=0;class y{constructor(r,h,o=!1){this.isWrapped=o,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*r);const c=h||v.CellData.fromCharData([0,l.NULL_CELL_CHAR,l.NULL_CELL_WIDTH,l.NULL_CELL_CODE]);for(let m=0;m<r;++m)this.setCell(m,c);this.length=r}get(r){const h=this._data[3*r+0],o=2097151&h;return[this._data[3*r+1],2097152&h?this._combined[r]:o?(0,g.stringFromCodePoint)(o):"",h>>22,2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):o]}set(r,h){this._data[3*r+1]=h[l.CHAR_DATA_ATTR_INDEX],h[l.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[r]=h[1],this._data[3*r+0]=2097152|r|h[l.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*r+0]=h[l.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|h[l.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(r){return this._data[3*r+0]>>22}hasWidth(r){return 12582912&this._data[3*r+0]}getFg(r){return this._data[3*r+1]}getBg(r){return this._data[3*r+2]}hasContent(r){return 4194303&this._data[3*r+0]}getCodePoint(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r].charCodeAt(this._combined[r].length-1):2097151&h}isCombined(r){return 2097152&this._data[3*r+0]}getString(r){const h=this._data[3*r+0];return 2097152&h?this._combined[r]:2097151&h?(0,g.stringFromCodePoint)(2097151&h):""}isProtected(r){return 536870912&this._data[3*r+2]}loadCell(r,h){return b=3*r,h.content=this._data[b+0],h.fg=this._data[b+1],h.bg=this._data[b+2],2097152&h.content&&(h.combinedData=this._combined[r]),268435456&h.bg&&(h.extended=this._extendedAttrs[r]),h}setCell(r,h){2097152&h.content&&(this._combined[r]=h.combinedData),268435456&h.bg&&(this._extendedAttrs[r]=h.extended),this._data[3*r+0]=h.content,this._data[3*r+1]=h.fg,this._data[3*r+2]=h.bg}setCellFromCodepoint(r,h,o,c){268435456&c.bg&&(this._extendedAttrs[r]=c.extended),this._data[3*r+0]=h|o<<22,this._data[3*r+1]=c.fg,this._data[3*r+2]=c.bg}addCodepointToCell(r,h,o){let c=this._data[3*r+0];2097152&c?this._combined[r]+=(0,g.stringFromCodePoint)(h):2097151&c?(this._combined[r]=(0,g.stringFromCodePoint)(2097151&c)+(0,g.stringFromCodePoint)(h),c&=-2097152,c|=2097152):c=h|4194304,o&&(c&=-12582913,c|=o<<22),this._data[3*r+0]=c}insertCells(r,h,o){if((r%=this.length)&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length-r){const c=new v.CellData;for(let m=this.length-r-h-1;m>=0;--m)this.setCell(r+h+m,this.loadCell(r+m,c));for(let m=0;m<h;++m)this.setCell(r+m,o)}else for(let c=r;c<this.length;++c)this.setCell(c,o);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,o)}deleteCells(r,h,o){if(r%=this.length,h<this.length-r){const c=new v.CellData;for(let m=0;m<this.length-r-h;++m)this.setCell(r+m,this.loadCell(r+h+m,c));for(let m=this.length-h;m<this.length;++m)this.setCell(m,o)}else for(let c=r;c<this.length;++c)this.setCell(c,o);r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),this.getWidth(r)!==0||this.hasContent(r)||this.setCellFromCodepoint(r,0,1,o)}replaceCells(r,h,o,c=!1){if(c)for(r&&this.getWidth(r-1)===2&&!this.isProtected(r-1)&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&!this.isProtected(h)&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.isProtected(r)||this.setCell(r,o),r++;else for(r&&this.getWidth(r-1)===2&&this.setCellFromCodepoint(r-1,0,1,o),h<this.length&&this.getWidth(h-1)===2&&this.setCellFromCodepoint(h,0,1,o);r<h&&r<this.length;)this.setCell(r++,o)}resize(r,h){if(r===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const o=3*r;if(r>this.length){if(this._data.buffer.byteLength>=4*o)this._data=new Uint32Array(this._data.buffer,0,o);else{const c=new Uint32Array(o);c.set(this._data),this._data=c}for(let c=this.length;c<r;++c)this.setCell(c,h)}else{this._data=this._data.subarray(0,o);const c=Object.keys(this._combined);for(let C=0;C<c.length;C++){const S=parseInt(c[C],10);S>=r&&delete this._combined[S]}const m=Object.keys(this._extendedAttrs);for(let C=0;C<m.length;C++){const S=parseInt(m[C],10);S>=r&&delete this._extendedAttrs[S]}}return this.length=r,4*o*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const r=new Uint32Array(this._data.length);return r.set(this._data),this._data=r,1}return 0}fill(r,h=!1){if(h)for(let o=0;o<this.length;++o)this.isProtected(o)||this.setCell(o,r);else{this._combined={},this._extendedAttrs={};for(let o=0;o<this.length;++o)this.setCell(o,r)}}copyFrom(r){this.length!==r.length?this._data=new Uint32Array(r._data):this._data.set(r._data),this.length=r.length,this._combined={};for(const h in r._combined)this._combined[h]=r._combined[h];this._extendedAttrs={};for(const h in r._extendedAttrs)this._extendedAttrs[h]=r._extendedAttrs[h];this.isWrapped=r.isWrapped}clone(){const r=new y(0);r._data=new Uint32Array(this._data),r.length=this.length;for(const h in this._combined)r._combined[h]=this._combined[h];for(const h in this._extendedAttrs)r._extendedAttrs[h]=this._extendedAttrs[h];return r.isWrapped=this.isWrapped,r}getTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0])return r+(this._data[3*r+0]>>22);return 0}getNoBgTrimmedLength(){for(let r=this.length-1;r>=0;--r)if(4194303&this._data[3*r+0]||50331648&this._data[3*r+2])return r+(this._data[3*r+0]>>22);return 0}copyCellsFrom(r,h,o,c,m){const C=r._data;if(m)for(let w=c-1;w>=0;w--){for(let p=0;p<3;p++)this._data[3*(o+w)+p]=C[3*(h+w)+p];268435456&C[3*(h+w)+2]&&(this._extendedAttrs[o+w]=r._extendedAttrs[h+w])}else for(let w=0;w<c;w++){for(let p=0;p<3;p++)this._data[3*(o+w)+p]=C[3*(h+w)+p];268435456&C[3*(h+w)+2]&&(this._extendedAttrs[o+w]=r._extendedAttrs[h+w])}const S=Object.keys(r._combined);for(let w=0;w<S.length;w++){const p=parseInt(S[w],10);p>=h&&(this._combined[p-h+o]=r._combined[p])}}translateToString(r,h,o,c){h=h??0,o=o??this.length,r&&(o=Math.min(o,this.getTrimmedLength())),c&&(c.length=0);let m="";for(;h<o;){const C=this._data[3*h+0],S=2097151&C,w=2097152&C?this._combined[h]:S?(0,g.stringFromCodePoint)(S):l.WHITESPACE_CELL_CHAR;if(m+=w,c)for(let p=0;p<w.length;++p)c.push(h);h+=C>>22||1}return c&&c.push(h),m}}n.BufferLine=y},4841:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.getRangeLength=void 0,n.getRangeLength=function(u,_){if(u.start.y>u.end.y)throw new Error(`Buffer range end (${u.end.x}, ${u.end.y}) cannot be before start (${u.start.x}, ${u.start.y})`);return _*(u.end.y-u.start.y)+(u.end.x-u.start.x+1)}},4634:(P,n)=>{function u(_,v,l){if(v===_.length-1)return _[v].getTrimmedLength();const g=!_[v].hasContent(l-1)&&_[v].getWidth(l-1)===1,b=_[v+1].getWidth(0)===2;return g&&b?l-1:l}Object.defineProperty(n,"__esModule",{value:!0}),n.getWrappedLineTrimmedLength=n.reflowSmallerGetNewLineLengths=n.reflowLargerApplyNewLayout=n.reflowLargerCreateNewLayout=n.reflowLargerGetLinesToRemove=void 0,n.reflowLargerGetLinesToRemove=function(_,v,l,g,b){const y=[];for(let d=0;d<_.length-1;d++){let r=d,h=_.get(++r);if(!h.isWrapped)continue;const o=[_.get(d)];for(;r<_.length&&h.isWrapped;)o.push(h),h=_.get(++r);if(g>=d&&g<r){d+=o.length-1;continue}let c=0,m=u(o,c,v),C=1,S=0;for(;C<o.length;){const p=u(o,C,v),x=p-S,L=l-m,O=Math.min(x,L);o[c].copyCellsFrom(o[C],S,m,O,!1),m+=O,m===l&&(c++,m=0),S+=O,S===p&&(C++,S=0),m===0&&c!==0&&o[c-1].getWidth(l-1)===2&&(o[c].copyCellsFrom(o[c-1],l-1,m++,1,!1),o[c-1].setCell(l-1,b))}o[c].replaceCells(m,l,b);let w=0;for(let p=o.length-1;p>0&&(p>c||o[p].getTrimmedLength()===0);p--)w++;w>0&&(y.push(d+o.length-w),y.push(w)),d+=o.length-1}return y},n.reflowLargerCreateNewLayout=function(_,v){const l=[];let g=0,b=v[g],y=0;for(let d=0;d<_.length;d++)if(b===d){const r=v[++g];_.onDeleteEmitter.fire({index:d-y,amount:r}),d+=r-1,y+=r,b=v[++g]}else l.push(d);return{layout:l,countRemoved:y}},n.reflowLargerApplyNewLayout=function(_,v){const l=[];for(let g=0;g<v.length;g++)l.push(_.get(v[g]));for(let g=0;g<l.length;g++)_.set(g,l[g]);_.length=v.length},n.reflowSmallerGetNewLineLengths=function(_,v,l){const g=[],b=_.map(((h,o)=>u(_,o,v))).reduce(((h,o)=>h+o));let y=0,d=0,r=0;for(;r<b;){if(b-r<l){g.push(b-r);break}y+=l;const h=u(_,d,v);y>h&&(y-=h,d++);const o=_[d].getWidth(y-1)===2;o&&y--;const c=o?l-1:l;g.push(c),r+=c}return g},n.getWrappedLineTrimmedLength=u},5295:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferSet=void 0;const _=u(8460),v=u(844),l=u(9092);class g extends v.Disposable{constructor(y,d){super(),this._optionsService=y,this._bufferService=d,this._onBufferActivate=this.register(new _.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 l.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new l.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(y){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(y),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(y,d){this._normal.resize(y,d),this._alt.resize(y,d),this.setupTabStops(y)}setupTabStops(y){this._normal.setupTabStops(y),this._alt.setupTabStops(y)}}n.BufferSet=g},511:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const _=u(482),v=u(643),l=u(3734);class g extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const d=new g;return d.setFromCharData(y),d}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let d=!1;if(y[v.CHAR_DATA_CHAR_INDEX].length>2)d=!0;else if(y[v.CHAR_DATA_CHAR_INDEX].length===2){const r=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|y[v.CHAR_DATA_WIDTH_INDEX]<<22:d=!0}else d=!0}else this.content=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[v.CHAR_DATA_WIDTH_INDEX]<<22;d&&(this.combinedData=y[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=g},643:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},4863:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Marker=void 0;const _=u(8460),v=u(844);class l{get id(){return this._id}constructor(b){this.line=b,this.isDisposed=!1,this._disposables=[],this._id=l._nextId++,this._onDispose=this.register(new _.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,v.disposeArray)(this._disposables),this._disposables.length=0)}register(b){return this._disposables.push(b),b}}n.Marker=l,l._nextId=1},7116:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DEFAULT_CHARSET=n.CHARSETS=void 0,n.CHARSETS={},n.DEFAULT_CHARSET=n.CHARSETS.B,n.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:"≥","{":"π","|":"≠","}":"£","~":"·"},n.CHARSETS.A={"#":"£"},n.CHARSETS.B=void 0,n.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},n.CHARSETS.C=n.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},n.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},n.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},n.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},n.CHARSETS.E=n.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},n.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},n.CHARSETS.H=n.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},n.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(P,n)=>{var u,_,v;Object.defineProperty(n,"__esModule",{value:!0}),n.C1_ESCAPED=n.C1=n.C0=void 0,(function(l){l.NUL="\0",l.SOH="",l.STX="",l.ETX="",l.EOT="",l.ENQ="",l.ACK="",l.BEL="\x07",l.BS="\b",l.HT=" ",l.LF=`
|
|
56
|
+
`,l.VT="\v",l.FF="\f",l.CR="\r",l.SO="",l.SI="",l.DLE="",l.DC1="",l.DC2="",l.DC3="",l.DC4="",l.NAK="",l.SYN="",l.ETB="",l.CAN="",l.EM="",l.SUB="",l.ESC="\x1B",l.FS="",l.GS="",l.RS="",l.US="",l.SP=" ",l.DEL=""})(u||(n.C0=u={})),(function(l){l.PAD="",l.HOP="",l.BPH="",l.NBH="",l.IND="",l.NEL="
",l.SSA="",l.ESA="",l.HTS="",l.HTJ="",l.VTS="",l.PLD="",l.PLU="",l.RI="",l.SS2="",l.SS3="",l.DCS="",l.PU1="",l.PU2="",l.STS="",l.CCH="",l.MW="",l.SPA="",l.EPA="",l.SOS="",l.SGCI="",l.SCI="",l.CSI="",l.ST="",l.OSC="",l.PM="",l.APC=""})(_||(n.C1=_={})),(function(l){l.ST=`${u.ESC}\\`})(v||(n.C1_ESCAPED=v={}))},7399:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.evaluateKeyboardEvent=void 0;const _=u(2584),v={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:["'",'"']};n.evaluateKeyboardEvent=function(l,g,b,y){const d={type:0,cancel:!1,key:void 0},r=(l.shiftKey?1:0)|(l.altKey?2:0)|(l.ctrlKey?4:0)|(l.metaKey?8:0);switch(l.keyCode){case 0:l.key==="UIKeyInputUpArrow"?d.key=g?_.C0.ESC+"OA":_.C0.ESC+"[A":l.key==="UIKeyInputLeftArrow"?d.key=g?_.C0.ESC+"OD":_.C0.ESC+"[D":l.key==="UIKeyInputRightArrow"?d.key=g?_.C0.ESC+"OC":_.C0.ESC+"[C":l.key==="UIKeyInputDownArrow"&&(d.key=g?_.C0.ESC+"OB":_.C0.ESC+"[B");break;case 8:d.key=l.ctrlKey?"\b":_.C0.DEL,l.altKey&&(d.key=_.C0.ESC+d.key);break;case 9:if(l.shiftKey){d.key=_.C0.ESC+"[Z";break}d.key=_.C0.HT,d.cancel=!0;break;case 13:d.key=l.altKey?_.C0.ESC+_.C0.CR:_.C0.CR,d.cancel=!0;break;case 27:d.key=_.C0.ESC,l.altKey&&(d.key=_.C0.ESC+_.C0.ESC),d.cancel=!0;break;case 37:if(l.metaKey)break;r?(d.key=_.C0.ESC+"[1;"+(r+1)+"D",d.key===_.C0.ESC+"[1;3D"&&(d.key=_.C0.ESC+(b?"b":"[1;5D"))):d.key=g?_.C0.ESC+"OD":_.C0.ESC+"[D";break;case 39:if(l.metaKey)break;r?(d.key=_.C0.ESC+"[1;"+(r+1)+"C",d.key===_.C0.ESC+"[1;3C"&&(d.key=_.C0.ESC+(b?"f":"[1;5C"))):d.key=g?_.C0.ESC+"OC":_.C0.ESC+"[C";break;case 38:if(l.metaKey)break;r?(d.key=_.C0.ESC+"[1;"+(r+1)+"A",b||d.key!==_.C0.ESC+"[1;3A"||(d.key=_.C0.ESC+"[1;5A")):d.key=g?_.C0.ESC+"OA":_.C0.ESC+"[A";break;case 40:if(l.metaKey)break;r?(d.key=_.C0.ESC+"[1;"+(r+1)+"B",b||d.key!==_.C0.ESC+"[1;3B"||(d.key=_.C0.ESC+"[1;5B")):d.key=g?_.C0.ESC+"OB":_.C0.ESC+"[B";break;case 45:l.shiftKey||l.ctrlKey||(d.key=_.C0.ESC+"[2~");break;case 46:d.key=r?_.C0.ESC+"[3;"+(r+1)+"~":_.C0.ESC+"[3~";break;case 36:d.key=r?_.C0.ESC+"[1;"+(r+1)+"H":g?_.C0.ESC+"OH":_.C0.ESC+"[H";break;case 35:d.key=r?_.C0.ESC+"[1;"+(r+1)+"F":g?_.C0.ESC+"OF":_.C0.ESC+"[F";break;case 33:l.shiftKey?d.type=2:l.ctrlKey?d.key=_.C0.ESC+"[5;"+(r+1)+"~":d.key=_.C0.ESC+"[5~";break;case 34:l.shiftKey?d.type=3:l.ctrlKey?d.key=_.C0.ESC+"[6;"+(r+1)+"~":d.key=_.C0.ESC+"[6~";break;case 112:d.key=r?_.C0.ESC+"[1;"+(r+1)+"P":_.C0.ESC+"OP";break;case 113:d.key=r?_.C0.ESC+"[1;"+(r+1)+"Q":_.C0.ESC+"OQ";break;case 114:d.key=r?_.C0.ESC+"[1;"+(r+1)+"R":_.C0.ESC+"OR";break;case 115:d.key=r?_.C0.ESC+"[1;"+(r+1)+"S":_.C0.ESC+"OS";break;case 116:d.key=r?_.C0.ESC+"[15;"+(r+1)+"~":_.C0.ESC+"[15~";break;case 117:d.key=r?_.C0.ESC+"[17;"+(r+1)+"~":_.C0.ESC+"[17~";break;case 118:d.key=r?_.C0.ESC+"[18;"+(r+1)+"~":_.C0.ESC+"[18~";break;case 119:d.key=r?_.C0.ESC+"[19;"+(r+1)+"~":_.C0.ESC+"[19~";break;case 120:d.key=r?_.C0.ESC+"[20;"+(r+1)+"~":_.C0.ESC+"[20~";break;case 121:d.key=r?_.C0.ESC+"[21;"+(r+1)+"~":_.C0.ESC+"[21~";break;case 122:d.key=r?_.C0.ESC+"[23;"+(r+1)+"~":_.C0.ESC+"[23~";break;case 123:d.key=r?_.C0.ESC+"[24;"+(r+1)+"~":_.C0.ESC+"[24~";break;default:if(!l.ctrlKey||l.shiftKey||l.altKey||l.metaKey)if(b&&!y||!l.altKey||l.metaKey)!b||l.altKey||l.ctrlKey||l.shiftKey||!l.metaKey?l.key&&!l.ctrlKey&&!l.altKey&&!l.metaKey&&l.keyCode>=48&&l.key.length===1?d.key=l.key:l.key&&l.ctrlKey&&(l.key==="_"&&(d.key=_.C0.US),l.key==="@"&&(d.key=_.C0.NUL)):l.keyCode===65&&(d.type=1);else{const h=v[l.keyCode],o=h==null?void 0:h[l.shiftKey?1:0];if(o)d.key=_.C0.ESC+o;else if(l.keyCode>=65&&l.keyCode<=90){const c=l.ctrlKey?l.keyCode-64:l.keyCode+32;let m=String.fromCharCode(c);l.shiftKey&&(m=m.toUpperCase()),d.key=_.C0.ESC+m}else if(l.keyCode===32)d.key=_.C0.ESC+(l.ctrlKey?_.C0.NUL:" ");else if(l.key==="Dead"&&l.code.startsWith("Key")){let c=l.code.slice(3,4);l.shiftKey||(c=c.toLowerCase()),d.key=_.C0.ESC+c,d.cancel=!0}}else l.keyCode>=65&&l.keyCode<=90?d.key=String.fromCharCode(l.keyCode-64):l.keyCode===32?d.key=_.C0.NUL:l.keyCode>=51&&l.keyCode<=55?d.key=String.fromCharCode(l.keyCode-51+27):l.keyCode===56?d.key=_.C0.DEL:l.keyCode===219?d.key=_.C0.ESC:l.keyCode===220?d.key=_.C0.FS:l.keyCode===221&&(d.key=_.C0.GS)}return d}},482:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,_=0,v=u.length){let l="";for(let g=_;g<v;++g){let b=u[g];b>65535?(b-=65536,l+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):l+=String.fromCharCode(b)}return l},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,_){const v=u.length;if(!v)return 0;let l=0,g=0;if(this._interim){const b=u.charCodeAt(g++);56320<=b&&b<=57343?_[l++]=1024*(this._interim-55296)+b-56320+65536:(_[l++]=this._interim,_[l++]=b),this._interim=0}for(let b=g;b<v;++b){const y=u.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=v)return this._interim=y,l;const d=u.charCodeAt(b);56320<=d&&d<=57343?_[l++]=1024*(y-55296)+d-56320+65536:(_[l++]=y,_[l++]=d)}else y!==65279&&(_[l++]=y)}return l}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,_){const v=u.length;if(!v)return 0;let l,g,b,y,d=0,r=0,h=0;if(this.interim[0]){let m=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let S,w=0;for(;(S=63&this.interim[++w])&&w<4;)C<<=6,C|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=p-w;for(;h<x;){if(h>=v)return 0;if(S=u[h++],(192&S)!=128){h--,m=!0;break}this.interim[w++]=S,C<<=6,C|=63&S}m||(p===2?C<128?h--:_[d++]=C:p===3?C<2048||C>=55296&&C<=57343||C===65279||(_[d++]=C):C<65536||C>1114111||(_[d++]=C)),this.interim.fill(0)}const o=v-4;let c=h;for(;c<v;){for(;!(!(c<o)||128&(l=u[c])||128&(g=u[c+1])||128&(b=u[c+2])||128&(y=u[c+3]));)_[d++]=l,_[d++]=g,_[d++]=b,_[d++]=y,c+=4;if(l=u[c++],l<128)_[d++]=l;else if((224&l)==192){if(c>=v)return this.interim[0]=l,d;if(g=u[c++],(192&g)!=128){c--;continue}if(r=(31&l)<<6|63&g,r<128){c--;continue}_[d++]=r}else if((240&l)==224){if(c>=v)return this.interim[0]=l,d;if(g=u[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,d;if(b=u[c++],(192&b)!=128){c--;continue}if(r=(15&l)<<12|(63&g)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;_[d++]=r}else if((248&l)==240){if(c>=v)return this.interim[0]=l,d;if(g=u[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,d;if(b=u[c++],(192&b)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,this.interim[2]=b,d;if(y=u[c++],(192&y)!=128){c--;continue}if(r=(7&l)<<18|(63&g)<<12|(63&b)<<6|63&y,r<65536||r>1114111)continue;_[d++]=r}}return d}}},225:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeV6=void 0;const _=u(1480),v=[[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]],l=[[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 g;n.UnicodeV6=class{constructor(){if(this.version="6",!g){g=new Uint8Array(65536),g.fill(1),g[0]=0,g.fill(0,1,32),g.fill(0,127,160),g.fill(2,4352,4448),g[9001]=2,g[9002]=2,g.fill(2,11904,42192),g[12351]=1,g.fill(2,44032,55204),g.fill(2,63744,64256),g.fill(2,65040,65050),g.fill(2,65072,65136),g.fill(2,65280,65377),g.fill(2,65504,65511);for(let b=0;b<v.length;++b)g.fill(0,v[b][0],v[b][1]+1)}}wcwidth(b){return b<32?0:b<127?1:b<65536?g[b]:(function(y,d){let r,h=0,o=d.length-1;if(y<d[0][0]||y>d[o][1])return!1;for(;o>=h;)if(r=h+o>>1,y>d[r][1])h=r+1;else{if(!(y<d[r][0]))return!0;o=r-1}return!1})(b,l)?0:b>=131072&&b<=196605||b>=196608&&b<=262141?2:1}charProperties(b,y){let d=this.wcwidth(b),r=d===0&&y!==0;if(r){const h=_.UnicodeService.extractWidth(y);h===0?r=!1:h>d&&(d=h)}return _.UnicodeService.createPropertyValue(0,d,r)}}},5981:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WriteBuffer=void 0;const _=u(8460),v=u(844);class l extends v.Disposable{constructor(b){super(),this._action=b,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new _.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(b,y){if(y!==void 0&&this._syncCalls>y)return void(this._syncCalls=0);if(this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let d;for(this._isSyncWriting=!0;d=this._writeBuffer.shift();){this._action(d);const r=this._callbacks.shift();r&&r()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(b,y){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(y),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=b.length,this._writeBuffer.push(b),this._callbacks.push(y)}_innerWrite(b=0,y=!0){const d=b||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const r=this._writeBuffer[this._bufferOffset],h=this._action(r,y);if(h){const c=m=>Date.now()-d>=12?setTimeout((()=>this._innerWrite(0,m))):this._innerWrite(d,m);return void h.catch((m=>(queueMicrotask((()=>{throw m})),Promise.resolve(!1)))).then(c)}const o=this._callbacks[this._bufferOffset];if(o&&o(),this._bufferOffset++,this._pendingData-=r.length,Date.now()-d>=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()}}n.WriteBuffer=l},5941:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.toRgbString=n.parseColor=void 0;const u=/^([\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})$/,_=/^[\da-f]+$/;function v(l,g){const b=l.toString(16),y=b.length<2?"0"+b:b;switch(g){case 4:return b[0];case 8:return y;case 12:return(y+y).slice(0,3);default:return y+y}}n.parseColor=function(l){if(!l)return;let g=l.toLowerCase();if(g.indexOf("rgb:")===0){g=g.slice(4);const b=u.exec(g);if(b){const y=b[1]?15:b[4]?255:b[7]?4095:65535;return[Math.round(parseInt(b[1]||b[4]||b[7]||b[10],16)/y*255),Math.round(parseInt(b[2]||b[5]||b[8]||b[11],16)/y*255),Math.round(parseInt(b[3]||b[6]||b[9]||b[12],16)/y*255)]}}else if(g.indexOf("#")===0&&(g=g.slice(1),_.exec(g)&&[3,6,9,12].includes(g.length))){const b=g.length/3,y=[0,0,0];for(let d=0;d<3;++d){const r=parseInt(g.slice(b*d,b*d+b),16);y[d]=b===1?r<<4:b===2?r:b===3?r>>4:r>>8}return y}},n.toRgbString=function(l,g=16){const[b,y,d]=l;return`rgb:${v(b,g)}/${v(y,g)}/${v(d,g)}`}},5770:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.PAYLOAD_LIMIT=void 0,n.PAYLOAD_LIMIT=1e7},6351:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DcsHandler=n.DcsParser=void 0;const _=u(482),v=u(8742),l=u(5770),g=[];n.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=g,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=g}registerHandler(y,d){this._handlers[y]===void 0&&(this._handlers[y]=[]);const r=this._handlers[y];return r.push(d),{dispose:()=>{const h=r.indexOf(d);h!==-1&&r.splice(h,1)}}}clearHandler(y){this._handlers[y]&&delete this._handlers[y]}setHandlerFallback(y){this._handlerFb=y}reset(){if(this._active.length)for(let y=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;y>=0;--y)this._active[y].unhook(!1);this._stack.paused=!1,this._active=g,this._ident=0}hook(y,d){if(this.reset(),this._ident=y,this._active=this._handlers[y]||g,this._active.length)for(let r=this._active.length-1;r>=0;r--)this._active[r].hook(d);else this._handlerFb(this._ident,"HOOK",d)}put(y,d,r){if(this._active.length)for(let h=this._active.length-1;h>=0;h--)this._active[h].put(y,d,r);else this._handlerFb(this._ident,"PUT",(0,_.utf32ToString)(y,d,r))}unhook(y,d=!0){if(this._active.length){let r=!1,h=this._active.length-1,o=!1;if(this._stack.paused&&(h=this._stack.loopPosition-1,r=d,o=this._stack.fallThrough,this._stack.paused=!1),!o&&r===!1){for(;h>=0&&(r=this._active[h].unhook(y),r!==!0);h--)if(r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!1,r;h--}for(;h>=0;h--)if(r=this._active[h].unhook(!1),r instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=h,this._stack.fallThrough=!0,r}else this._handlerFb(this._ident,"UNHOOK",y);this._active=g,this._ident=0}};const b=new v.Params;b.addParam(0),n.DcsHandler=class{constructor(y){this._handler=y,this._data="",this._params=b,this._hitLimit=!1}hook(y){this._params=y.length>1||y.params[0]?y.clone():b,this._data="",this._hitLimit=!1}put(y,d,r){this._hitLimit||(this._data+=(0,_.utf32ToString)(y,d,r),this._data.length>l.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(y){let d=!1;if(this._hitLimit)d=!1;else if(y&&(d=this._handler(this._data,this._params),d instanceof Promise))return d.then((r=>(this._params=b,this._data="",this._hitLimit=!1,r)));return this._params=b,this._data="",this._hitLimit=!1,d}}},2015:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.EscapeSequenceParser=n.VT500_TRANSITION_TABLE=n.TransitionTable=void 0;const _=u(844),v=u(8742),l=u(6242),g=u(6351);class b{constructor(h){this.table=new Uint8Array(h)}setDefault(h,o){this.table.fill(h<<4|o)}add(h,o,c,m){this.table[o<<8|h]=c<<4|m}addMany(h,o,c,m){for(let C=0;C<h.length;C++)this.table[o<<8|h[C]]=c<<4|m}}n.TransitionTable=b;const y=160;n.VT500_TRANSITION_TABLE=(function(){const r=new b(4095),h=Array.apply(null,Array(256)).map(((w,p)=>p)),o=(w,p)=>h.slice(w,p),c=o(32,127),m=o(0,24);m.push(25),m.push.apply(m,o(28,32));const C=o(0,14);let S;for(S in r.setDefault(1,0),r.addMany(c,0,2,0),C)r.addMany([24,26,153,154],S,3,0),r.addMany(o(128,144),S,3,0),r.addMany(o(144,152),S,3,0),r.add(156,S,0,0),r.add(27,S,11,1),r.add(157,S,4,8),r.addMany([152,158,159],S,0,7),r.add(155,S,11,3),r.add(144,S,11,9);return r.addMany(m,0,3,0),r.addMany(m,1,3,1),r.add(127,1,0,1),r.addMany(m,8,0,8),r.addMany(m,3,3,3),r.add(127,3,0,3),r.addMany(m,4,3,4),r.add(127,4,0,4),r.addMany(m,6,3,6),r.addMany(m,5,3,5),r.add(127,5,0,5),r.addMany(m,2,3,2),r.add(127,2,0,2),r.add(93,1,4,8),r.addMany(c,8,5,8),r.add(127,8,5,8),r.addMany([156,27,24,26,7],8,6,0),r.addMany(o(28,32),8,0,8),r.addMany([88,94,95],1,0,7),r.addMany(c,7,0,7),r.addMany(m,7,0,7),r.add(156,7,0,0),r.add(127,7,0,7),r.add(91,1,11,3),r.addMany(o(64,127),3,7,0),r.addMany(o(48,60),3,8,4),r.addMany([60,61,62,63],3,9,4),r.addMany(o(48,60),4,8,4),r.addMany(o(64,127),4,7,0),r.addMany([60,61,62,63],4,0,6),r.addMany(o(32,64),6,0,6),r.add(127,6,0,6),r.addMany(o(64,127),6,0,0),r.addMany(o(32,48),3,9,5),r.addMany(o(32,48),5,9,5),r.addMany(o(48,64),5,0,6),r.addMany(o(64,127),5,7,0),r.addMany(o(32,48),4,9,5),r.addMany(o(32,48),1,9,2),r.addMany(o(32,48),2,9,2),r.addMany(o(48,127),2,10,0),r.addMany(o(48,80),1,10,0),r.addMany(o(81,88),1,10,0),r.addMany([89,90,92],1,10,0),r.addMany(o(96,127),1,10,0),r.add(80,1,11,9),r.addMany(m,9,0,9),r.add(127,9,0,9),r.addMany(o(28,32),9,0,9),r.addMany(o(32,48),9,9,12),r.addMany(o(48,60),9,8,10),r.addMany([60,61,62,63],9,9,10),r.addMany(m,11,0,11),r.addMany(o(32,128),11,0,11),r.addMany(o(28,32),11,0,11),r.addMany(m,10,0,10),r.add(127,10,0,10),r.addMany(o(28,32),10,0,10),r.addMany(o(48,60),10,8,10),r.addMany([60,61,62,63],10,0,11),r.addMany(o(32,48),10,9,12),r.addMany(m,12,0,12),r.add(127,12,0,12),r.addMany(o(28,32),12,0,12),r.addMany(o(32,48),12,9,12),r.addMany(o(48,64),12,0,11),r.addMany(o(64,127),12,12,13),r.addMany(o(64,127),10,12,13),r.addMany(o(64,127),9,12,13),r.addMany(m,13,13,13),r.addMany(c,13,13,13),r.add(127,13,0,13),r.addMany([27,156,24,26],13,14,0),r.add(y,0,2,0),r.add(y,8,5,8),r.add(y,6,0,6),r.add(y,11,0,11),r.add(y,13,13,13),r})();class d extends _.Disposable{constructor(h=n.VT500_TRANSITION_TABLE){super(),this._transitions=h,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new v.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(o,c,m)=>{},this._executeHandlerFb=o=>{},this._csiHandlerFb=(o,c)=>{},this._escHandlerFb=o=>{},this._errorHandlerFb=o=>o,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,_.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new l.OscParser),this._dcsParser=this.register(new g.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(h,o=[64,126]){let c=0;if(h.prefix){if(h.prefix.length>1)throw new Error("only one byte as prefix supported");if(c=h.prefix.charCodeAt(0),c&&60>c||c>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(h.intermediates){if(h.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<h.intermediates.length;++C){const S=h.intermediates.charCodeAt(C);if(32>S||S>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");c<<=8,c|=S}}if(h.final.length!==1)throw new Error("final must be a single byte");const m=h.final.charCodeAt(0);if(o[0]>m||m>o[1])throw new Error(`final must be in range ${o[0]} .. ${o[1]}`);return c<<=8,c|=m,c}identToString(h){const o=[];for(;h;)o.push(String.fromCharCode(255&h)),h>>=8;return o.reverse().join("")}setPrintHandler(h){this._printHandler=h}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(h,o){const c=this._identifier(h,[48,126]);this._escHandlers[c]===void 0&&(this._escHandlers[c]=[]);const m=this._escHandlers[c];return m.push(o),{dispose:()=>{const C=m.indexOf(o);C!==-1&&m.splice(C,1)}}}clearEscHandler(h){this._escHandlers[this._identifier(h,[48,126])]&&delete this._escHandlers[this._identifier(h,[48,126])]}setEscHandlerFallback(h){this._escHandlerFb=h}setExecuteHandler(h,o){this._executeHandlers[h.charCodeAt(0)]=o}clearExecuteHandler(h){this._executeHandlers[h.charCodeAt(0)]&&delete this._executeHandlers[h.charCodeAt(0)]}setExecuteHandlerFallback(h){this._executeHandlerFb=h}registerCsiHandler(h,o){const c=this._identifier(h);this._csiHandlers[c]===void 0&&(this._csiHandlers[c]=[]);const m=this._csiHandlers[c];return m.push(o),{dispose:()=>{const C=m.indexOf(o);C!==-1&&m.splice(C,1)}}}clearCsiHandler(h){this._csiHandlers[this._identifier(h)]&&delete this._csiHandlers[this._identifier(h)]}setCsiHandlerFallback(h){this._csiHandlerFb=h}registerDcsHandler(h,o){return this._dcsParser.registerHandler(this._identifier(h),o)}clearDcsHandler(h){this._dcsParser.clearHandler(this._identifier(h))}setDcsHandlerFallback(h){this._dcsParser.setHandlerFallback(h)}registerOscHandler(h,o){return this._oscParser.registerHandler(h,o)}clearOscHandler(h){this._oscParser.clearHandler(h)}setOscHandlerFallback(h){this._oscParser.setHandlerFallback(h)}setErrorHandler(h){this._errorHandler=h}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(h,o,c,m,C){this._parseStack.state=h,this._parseStack.handlers=o,this._parseStack.handlerPos=c,this._parseStack.transition=m,this._parseStack.chunkPos=C}parse(h,o,c){let m,C=0,S=0,w=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,w=this._parseStack.chunkPos+1;else{if(c===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const p=this._parseStack.handlers;let x=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(c===!1&&x>-1){for(;x>=0&&(m=p[x](this._params),m!==!0);x--)if(m instanceof Promise)return this._parseStack.handlerPos=x,m}this._parseStack.handlers=[];break;case 4:if(c===!1&&x>-1){for(;x>=0&&(m=p[x](),m!==!0);x--)if(m instanceof Promise)return this._parseStack.handlerPos=x,m}this._parseStack.handlers=[];break;case 6:if(C=h[this._parseStack.chunkPos],m=this._dcsParser.unhook(C!==24&&C!==26,c),m)return m;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=h[this._parseStack.chunkPos],m=this._oscParser.end(C!==24&&C!==26,c),m)return m;C===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 p=w;p<o;++p){switch(C=h[p],S=this._transitions.table[this.currentState<<8|(C<160?C:y)],S>>4){case 2:for(let M=p+1;;++M){if(M>=o||(C=h[M])<32||C>126&&C<y){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<y){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<y){this._printHandler(h,p,M),p=M-1;break}if(++M>=o||(C=h[M])<32||C>126&&C<y){this._printHandler(h,p,M),p=M-1;break}}break;case 3:this._executeHandlers[C]?this._executeHandlers[C]():this._executeHandlerFb(C),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:p,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const x=this._csiHandlers[this._collect<<8|C];let L=x?x.length-1:-1;for(;L>=0&&(m=x[L](this._params),m!==!0);L--)if(m instanceof Promise)return this._preserveStack(3,x,L,S,p),m;L<0&&this._csiHandlerFb(this._collect<<8|C,this._params),this.precedingJoinState=0;break;case 8:do switch(C){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(C-48)}while(++p<o&&(C=h[p])>47&&C<60);p--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const O=this._escHandlers[this._collect<<8|C];let T=O?O.length-1:-1;for(;T>=0&&(m=O[T](),m!==!0);T--)if(m instanceof Promise)return this._preserveStack(4,O,T,S,p),m;T<0&&this._escHandlerFb(this._collect<<8|C),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|C,this._params);break;case 13:for(let M=p+1;;++M)if(M>=o||(C=h[M])===24||C===26||C===27||C>127&&C<y){this._dcsParser.put(h,p,M),p=M-1;break}break;case 14:if(m=this._dcsParser.unhook(C!==24&&C!==26),m)return this._preserveStack(6,[],0,S,p),m;C===27&&(S|=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 M=p+1;;M++)if(M>=o||(C=h[M])<32||C>127&&C<y){this._oscParser.put(h,p,M),p=M-1;break}break;case 6:if(m=this._oscParser.end(C!==24&&C!==26),m)return this._preserveStack(5,[],0,S,p),m;C===27&&(S|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&S}}}n.EscapeSequenceParser=d},6242:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OscHandler=n.OscParser=void 0;const _=u(5770),v=u(482),l=[];n.OscParser=class{constructor(){this._state=0,this._active=l,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(g,b){this._handlers[g]===void 0&&(this._handlers[g]=[]);const y=this._handlers[g];return y.push(b),{dispose:()=>{const d=y.indexOf(b);d!==-1&&y.splice(d,1)}}}clearHandler(g){this._handlers[g]&&delete this._handlers[g]}setHandlerFallback(g){this._handlerFb=g}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=l}reset(){if(this._state===2)for(let g=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;g>=0;--g)this._active[g].end(!1);this._stack.paused=!1,this._active=l,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||l,this._active.length)for(let g=this._active.length-1;g>=0;g--)this._active[g].start();else this._handlerFb(this._id,"START")}_put(g,b,y){if(this._active.length)for(let d=this._active.length-1;d>=0;d--)this._active[d].put(g,b,y);else this._handlerFb(this._id,"PUT",(0,v.utf32ToString)(g,b,y))}start(){this.reset(),this._state=1}put(g,b,y){if(this._state!==3){if(this._state===1)for(;b<y;){const d=g[b++];if(d===59){this._state=2,this._start();break}if(d<48||57<d)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+d-48}this._state===2&&y-b>0&&this._put(g,b,y)}}end(g,b=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let y=!1,d=this._active.length-1,r=!1;if(this._stack.paused&&(d=this._stack.loopPosition-1,y=b,r=this._stack.fallThrough,this._stack.paused=!1),!r&&y===!1){for(;d>=0&&(y=this._active[d].end(g),y!==!0);d--)if(y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!1,y;d--}for(;d>=0;d--)if(y=this._active[d].end(!1),y instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=d,this._stack.fallThrough=!0,y}else this._handlerFb(this._id,"END",g);this._active=l,this._id=-1,this._state=0}}},n.OscHandler=class{constructor(g){this._handler=g,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(g,b,y){this._hitLimit||(this._data+=(0,v.utf32ToString)(g,b,y),this._data.length>_.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(g){let b=!1;if(this._hitLimit)b=!1;else if(g&&(b=this._handler(this._data),b instanceof Promise))return b.then((y=>(this._data="",this._hitLimit=!1,y)));return this._data="",this._hitLimit=!1,b}}},8742:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Params=void 0;const u=2147483647;class _{static fromArray(l){const g=new _;if(!l.length)return g;for(let b=Array.isArray(l[0])?1:0;b<l.length;++b){const y=l[b];if(Array.isArray(y))for(let d=0;d<y.length;++d)g.addSubParam(y[d]);else g.addParam(y)}return g}constructor(l=32,g=32){if(this.maxLength=l,this.maxSubParamsLength=g,g>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(l),this.length=0,this._subParams=new Int32Array(g),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(l),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const l=new _(this.maxLength,this.maxSubParamsLength);return l.params.set(this.params),l.length=this.length,l._subParams.set(this._subParams),l._subParamsLength=this._subParamsLength,l._subParamsIdx.set(this._subParamsIdx),l._rejectDigits=this._rejectDigits,l._rejectSubDigits=this._rejectSubDigits,l._digitIsSub=this._digitIsSub,l}toArray(){const l=[];for(let g=0;g<this.length;++g){l.push(this.params[g]);const b=this._subParamsIdx[g]>>8,y=255&this._subParamsIdx[g];y-b>0&&l.push(Array.prototype.slice.call(this._subParams,b,y))}return l}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(l){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=l>u?u:l}}addSubParam(l){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(l<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=l>u?u:l,this._subParamsIdx[this.length-1]++}}hasSubParams(l){return(255&this._subParamsIdx[l])-(this._subParamsIdx[l]>>8)>0}getSubParams(l){const g=this._subParamsIdx[l]>>8,b=255&this._subParamsIdx[l];return b-g>0?this._subParams.subarray(g,b):null}getSubParamsAll(){const l={};for(let g=0;g<this.length;++g){const b=this._subParamsIdx[g]>>8,y=255&this._subParamsIdx[g];y-b>0&&(l[g]=this._subParams.slice(b,y))}return l}addDigit(l){let g;if(this._rejectDigits||!(g=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const b=this._digitIsSub?this._subParams:this.params,y=b[g-1];b[g-1]=~y?Math.min(10*y+l,u):l}}n.Params=_},5741:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.AddonManager=void 0,n.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let u=this._addons.length-1;u>=0;u--)this._addons[u].instance.dispose()}loadAddon(u,_){const v={instance:_,dispose:_.dispose,isDisposed:!1};this._addons.push(v),_.dispose=()=>this._wrappedAddonDispose(v),_.activate(u)}_wrappedAddonDispose(u){if(u.isDisposed)return;let _=-1;for(let v=0;v<this._addons.length;v++)if(this._addons[v]===u){_=v;break}if(_===-1)throw new Error("Could not dispose an addon that has not been loaded");u.isDisposed=!0,u.dispose.apply(u.instance),this._addons.splice(_,1)}}},8771:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferApiView=void 0;const _=u(3785),v=u(511);n.BufferApiView=class{constructor(l,g){this._buffer=l,this.type=g}init(l){return this._buffer=l,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(l){const g=this._buffer.lines.get(l);if(g)return new _.BufferLineApiView(g)}getNullCell(){return new v.CellData}}},3785:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferLineApiView=void 0;const _=u(511);n.BufferLineApiView=class{constructor(v){this._line=v}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(v,l){if(!(v<0||v>=this._line.length))return l?(this._line.loadCell(v,l),l):this._line.loadCell(v,new _.CellData)}translateToString(v,l,g){return this._line.translateToString(v,l,g)}}},8285:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BufferNamespaceApi=void 0;const _=u(8771),v=u(8460),l=u(844);class g extends l.Disposable{constructor(y){super(),this._core=y,this._onBufferChange=this.register(new v.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new _.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new _.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)}}n.BufferNamespaceApi=g},7975:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ParserApi=void 0,n.ParserApi=class{constructor(u){this._core=u}registerCsiHandler(u,_){return this._core.registerCsiHandler(u,(v=>_(v.toArray())))}addCsiHandler(u,_){return this.registerCsiHandler(u,_)}registerDcsHandler(u,_){return this._core.registerDcsHandler(u,((v,l)=>_(v,l.toArray())))}addDcsHandler(u,_){return this.registerDcsHandler(u,_)}registerEscHandler(u,_){return this._core.registerEscHandler(u,_)}addEscHandler(u,_){return this.registerEscHandler(u,_)}registerOscHandler(u,_){return this._core.registerOscHandler(u,_)}addOscHandler(u,_){return this.registerOscHandler(u,_)}}},7090:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeApi=void 0,n.UnicodeApi=class{constructor(u){this._core=u}register(u){this._core.unicodeService.register(u)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(u){this._core.unicodeService.activeVersion=u}}},744:function(P,n,u){var _=this&&this.__decorate||function(r,h,o,c){var m,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(S=(C<3?m(S):C>3?m(h,o,S):m(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.BufferService=n.MINIMUM_ROWS=n.MINIMUM_COLS=void 0;const l=u(8460),g=u(844),b=u(5295),y=u(2585);n.MINIMUM_COLS=2,n.MINIMUM_ROWS=1;let d=n.BufferService=class extends g.Disposable{get buffer(){return this.buffers.active}constructor(r){super(),this.isUserScrolling=!1,this._onResize=this.register(new l.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(r.rawOptions.cols||0,n.MINIMUM_COLS),this.rows=Math.max(r.rawOptions.rows||0,n.MINIMUM_ROWS),this.buffers=this.register(new b.BufferSet(r,this))}resize(r,h){this.cols=r,this.rows=h,this.buffers.resize(r,h),this._onResize.fire({cols:r,rows:h})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(r,h=!1){const o=this.buffer;let c;c=this._cachedBlankLine,c&&c.length===this.cols&&c.getFg(0)===r.fg&&c.getBg(0)===r.bg||(c=o.getBlankLine(r,h),this._cachedBlankLine=c),c.isWrapped=h;const m=o.ybase+o.scrollTop,C=o.ybase+o.scrollBottom;if(o.scrollTop===0){const S=o.lines.isFull;C===o.lines.length-1?S?o.lines.recycle().copyFrom(c):o.lines.push(c.clone()):o.lines.splice(C+1,0,c.clone()),S?this.isUserScrolling&&(o.ydisp=Math.max(o.ydisp-1,0)):(o.ybase++,this.isUserScrolling||o.ydisp++)}else{const S=C-m+1;o.lines.shiftElements(m+1,S-1,-1),o.lines.set(C,c.clone())}this.isUserScrolling||(o.ydisp=o.ybase),this._onScroll.fire(o.ydisp)}scrollLines(r,h,o){const c=this.buffer;if(r<0){if(c.ydisp===0)return;this.isUserScrolling=!0}else r+c.ydisp>=c.ybase&&(this.isUserScrolling=!1);const m=c.ydisp;c.ydisp=Math.max(Math.min(c.ydisp+r,c.ybase),0),m!==c.ydisp&&(h||this._onScroll.fire(c.ydisp))}};n.BufferService=d=_([v(0,y.IOptionsService)],d)},7994:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CharsetService=void 0,n.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(u){this.glevel=u,this.charset=this._charsets[u]}setgCharset(u,_){this._charsets[u]=_,this.glevel===u&&(this.charset=_)}}},1753:function(P,n,u){var _=this&&this.__decorate||function(c,m,C,S){var w,p=arguments.length,x=p<3?m:S===null?S=Object.getOwnPropertyDescriptor(m,C):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(c,m,C,S);else for(var L=c.length-1;L>=0;L--)(w=c[L])&&(x=(p<3?w(x):p>3?w(m,C,x):w(m,C))||x);return p>3&&x&&Object.defineProperty(m,C,x),x},v=this&&this.__param||function(c,m){return function(C,S){m(C,S,c)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreMouseService=void 0;const l=u(2585),g=u(8460),b=u(844),y={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:c=>c.button!==4&&c.action===1&&(c.ctrl=!1,c.alt=!1,c.shift=!1,!0)},VT200:{events:19,restrict:c=>c.action!==32},DRAG:{events:23,restrict:c=>c.action!==32||c.button!==3},ANY:{events:31,restrict:c=>!0}};function d(c,m){let C=(c.ctrl?16:0)|(c.shift?4:0)|(c.alt?8:0);return c.button===4?(C|=64,C|=c.action):(C|=3&c.button,4&c.button&&(C|=64),8&c.button&&(C|=128),c.action===32?C|=32:c.action!==0||m||(C|=3)),C}const r=String.fromCharCode,h={DEFAULT:c=>{const m=[d(c,!1)+32,c.col+32,c.row+32];return m[0]>255||m[1]>255||m[2]>255?"":`\x1B[M${r(m[0])}${r(m[1])}${r(m[2])}`},SGR:c=>{const m=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${d(c,!0)};${c.col};${c.row}${m}`},SGR_PIXELS:c=>{const m=c.action===0&&c.button!==4?"m":"M";return`\x1B[<${d(c,!0)};${c.x};${c.y}${m}`}};let o=n.CoreMouseService=class extends b.Disposable{constructor(c,m){super(),this._bufferService=c,this._coreService=m,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new g.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(y))this.addProtocol(C,y[C]);for(const C of Object.keys(h))this.addEncoding(C,h[C]);this.reset()}addProtocol(c,m){this._protocols[c]=m}addEncoding(c,m){this._encodings[c]=m}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(c){if(!this._protocols[c])throw new Error(`unknown protocol "${c}"`);this._activeProtocol=c,this._onProtocolChange.fire(this._protocols[c].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(c){if(!this._encodings[c])throw new Error(`unknown encoding "${c}"`);this._activeEncoding=c}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(c){if(c.col<0||c.col>=this._bufferService.cols||c.row<0||c.row>=this._bufferService.rows||c.button===4&&c.action===32||c.button===3&&c.action!==32||c.button!==4&&(c.action===2||c.action===3)||(c.col++,c.row++,c.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,c,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(c))return!1;const m=this._encodings[this._activeEncoding](c);return m&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(m):this._coreService.triggerDataEvent(m,!0)),this._lastEvent=c,!0}explainEvents(c){return{down:!!(1&c),up:!!(2&c),drag:!!(4&c),move:!!(8&c),wheel:!!(16&c)}}_equalEvents(c,m,C){if(C){if(c.x!==m.x||c.y!==m.y)return!1}else if(c.col!==m.col||c.row!==m.row)return!1;return c.button===m.button&&c.action===m.action&&c.ctrl===m.ctrl&&c.alt===m.alt&&c.shift===m.shift}};n.CoreMouseService=o=_([v(0,l.IBufferService),v(1,l.ICoreService)],o)},6975:function(P,n,u){var _=this&&this.__decorate||function(o,c,m,C){var S,w=arguments.length,p=w<3?c:C===null?C=Object.getOwnPropertyDescriptor(c,m):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(o,c,m,C);else for(var x=o.length-1;x>=0;x--)(S=o[x])&&(p=(w<3?S(p):w>3?S(c,m,p):S(c,m))||p);return w>3&&p&&Object.defineProperty(c,m,p),p},v=this&&this.__param||function(o,c){return function(m,C){c(m,C,o)}};Object.defineProperty(n,"__esModule",{value:!0}),n.CoreService=void 0;const l=u(1439),g=u(8460),b=u(844),y=u(2585),d=Object.freeze({insertMode:!1}),r=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let h=n.CoreService=class extends b.Disposable{constructor(o,c,m){super(),this._bufferService=o,this._logService=c,this._optionsService=m,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new g.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new g.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new g.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new g.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,l.clone)(d),this.decPrivateModes=(0,l.clone)(r)}reset(){this.modes=(0,l.clone)(d),this.decPrivateModes=(0,l.clone)(r)}triggerDataEvent(o,c=!1){if(this._optionsService.rawOptions.disableStdin)return;const m=this._bufferService.buffer;c&&this._optionsService.rawOptions.scrollOnUserInput&&m.ybase!==m.ydisp&&this._onRequestScrollToBottom.fire(),c&&this._onUserInput.fire(),this._logService.debug(`sending data "${o}"`,(()=>o.split("").map((C=>C.charCodeAt(0))))),this._onData.fire(o)}triggerBinaryEvent(o){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${o}"`,(()=>o.split("").map((c=>c.charCodeAt(0))))),this._onBinary.fire(o))}};n.CoreService=h=_([v(0,y.IBufferService),v(1,y.ILogService),v(2,y.IOptionsService)],h)},9074:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DecorationService=void 0;const _=u(8055),v=u(8460),l=u(844),g=u(6106);let b=0,y=0;class d extends l.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new g.SortedList((o=>o==null?void 0:o.marker.line)),this._onDecorationRegistered=this.register(new v.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new v.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,l.toDisposable)((()=>this.reset())))}registerDecoration(o){if(o.marker.isDisposed)return;const c=new r(o);if(c){const m=c.marker.onDispose((()=>c.dispose()));c.onDispose((()=>{c&&(this._decorations.delete(c)&&this._onDecorationRemoved.fire(c),m.dispose())})),this._decorations.insert(c),this._onDecorationRegistered.fire(c)}return c}reset(){for(const o of this._decorations.values())o.dispose();this._decorations.clear()}*getDecorationsAtCell(o,c,m){let C=0,S=0;for(const w of this._decorations.getKeyIterator(c))C=w.options.x??0,S=C+(w.options.width??1),o>=C&&o<S&&(!m||(w.options.layer??"bottom")===m)&&(yield w)}forEachDecorationAtCell(o,c,m,C){this._decorations.forEachByKey(c,(S=>{b=S.options.x??0,y=b+(S.options.width??1),o>=b&&o<y&&(!m||(S.options.layer??"bottom")===m)&&C(S)}))}}n.DecorationService=d;class r extends l.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=_.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=_.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(o){super(),this.options=o,this.onRenderEmitter=this.register(new v.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new v.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=o.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.InstantiationService=n.ServiceCollection=void 0;const _=u(2585),v=u(8343);class l{constructor(...b){this._entries=new Map;for(const[y,d]of b)this.set(y,d)}set(b,y){const d=this._entries.get(b);return this._entries.set(b,y),d}forEach(b){for(const[y,d]of this._entries.entries())b(y,d)}has(b){return this._entries.has(b)}get(b){return this._entries.get(b)}}n.ServiceCollection=l,n.InstantiationService=class{constructor(){this._services=new l,this._services.set(_.IInstantiationService,this)}setService(g,b){this._services.set(g,b)}getService(g){return this._services.get(g)}createInstance(g,...b){const y=(0,v.getServiceDependencies)(g).sort(((h,o)=>h.index-o.index)),d=[];for(const h of y){const o=this._services.get(h.id);if(!o)throw new Error(`[createInstance] ${g.name} depends on UNKNOWN service ${h.id}.`);d.push(o)}const r=y.length>0?y[0].index:b.length;if(b.length!==r)throw new Error(`[createInstance] First service dependency of ${g.name} at position ${r+1} conflicts with ${b.length} static arguments`);return new g(...b,...d)}}},7866:function(P,n,u){var _=this&&this.__decorate||function(r,h,o,c){var m,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(S=(C<3?m(S):C>3?m(h,o,S):m(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const l=u(844),g=u(2585),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let y,d=n.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=d=_([v(0,g.IOptionsService)],d),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const c=o.value;o.value=function(...m){if(y.logLevel!==g.LogLevelEnum.TRACE)return c.apply(this,m);y.trace(`GlyphRenderer#${c.name}(${m.map((S=>JSON.stringify(S))).join(", ")})`);const C=c.apply(this,m);return y.trace(`GlyphRenderer#${c.name} return`,C),C}}},7302:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.OptionsService=n.DEFAULT_OPTIONS=void 0;const _=u(8460),v=u(844),l=u(6114);n.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:l.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const g=["normal","bold","100","200","300","400","500","600","700","800","900"];class b extends v.Disposable{constructor(d){super(),this._onOptionChange=this.register(new _.EventEmitter),this.onOptionChange=this._onOptionChange.event;const r={...n.DEFAULT_OPTIONS};for(const h in d)if(h in r)try{const o=d[h];r[h]=this._sanitizeAndValidateOption(h,o)}catch(o){console.error(o)}this.rawOptions=r,this.options={...r},this._setupOptions(),this.register((0,v.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(d,r){return this.onOptionChange((h=>{h===d&&r(this.rawOptions[d])}))}onMultipleOptionChange(d,r){return this.onOptionChange((h=>{d.indexOf(h)!==-1&&r()}))}_setupOptions(){const d=h=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);return this.rawOptions[h]},r=(h,o)=>{if(!(h in n.DEFAULT_OPTIONS))throw new Error(`No option with key "${h}"`);o=this._sanitizeAndValidateOption(h,o),this.rawOptions[h]!==o&&(this.rawOptions[h]=o,this._onOptionChange.fire(h))};for(const h in this.rawOptions){const o={get:d.bind(this,h),set:r.bind(this,h)};Object.defineProperty(this.options,h,o)}}_sanitizeAndValidateOption(d,r){switch(d){case"cursorStyle":if(r||(r=n.DEFAULT_OPTIONS[d]),!(function(h){return h==="block"||h==="underline"||h==="bar"})(r))throw new Error(`"${r}" is not a valid value for ${d}`);break;case"wordSeparator":r||(r=n.DEFAULT_OPTIONS[d]);break;case"fontWeight":case"fontWeightBold":if(typeof r=="number"&&1<=r&&r<=1e3)break;r=g.includes(r)?r:n.DEFAULT_OPTIONS[d];break;case"cursorWidth":r=Math.floor(r);case"lineHeight":case"tabStopWidth":if(r<1)throw new Error(`${d} cannot be less than 1, value: ${r}`);break;case"minimumContrastRatio":r=Math.max(1,Math.min(21,Math.round(10*r)/10));break;case"scrollback":if((r=Math.min(r,4294967295))<0)throw new Error(`${d} cannot be less than 0, value: ${r}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(r<=0)throw new Error(`${d} cannot be less than or equal to 0, value: ${r}`);break;case"rows":case"cols":if(!r&&r!==0)throw new Error(`${d} must be numeric, value: ${r}`);break;case"windowsPty":r=r??{}}return r}}n.OptionsService=b},2660:function(P,n,u){var _=this&&this.__decorate||function(b,y,d,r){var h,o=arguments.length,c=o<3?y:r===null?r=Object.getOwnPropertyDescriptor(y,d):r;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(b,y,d,r);else for(var m=b.length-1;m>=0;m--)(h=b[m])&&(c=(o<3?h(c):o>3?h(y,d,c):h(y,d))||c);return o>3&&c&&Object.defineProperty(y,d,c),c},v=this&&this.__param||function(b,y){return function(d,r){y(d,r,b)}};Object.defineProperty(n,"__esModule",{value:!0}),n.OscLinkService=void 0;const l=u(2585);let g=n.OscLinkService=class{constructor(b){this._bufferService=b,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(b){const y=this._bufferService.buffer;if(b.id===void 0){const m=y.addMarker(y.ybase+y.y),C={data:b,id:this._nextId++,lines:[m]};return m.onDispose((()=>this._removeMarkerFromLink(C,m))),this._dataByLinkId.set(C.id,C),C.id}const d=b,r=this._getEntryIdKey(d),h=this._entriesWithId.get(r);if(h)return this.addLineToLink(h.id,y.ybase+y.y),h.id;const o=y.addMarker(y.ybase+y.y),c={id:this._nextId++,key:this._getEntryIdKey(d),data:d,lines:[o]};return o.onDispose((()=>this._removeMarkerFromLink(c,o))),this._entriesWithId.set(c.key,c),this._dataByLinkId.set(c.id,c),c.id}addLineToLink(b,y){const d=this._dataByLinkId.get(b);if(d&&d.lines.every((r=>r.line!==y))){const r=this._bufferService.buffer.addMarker(y);d.lines.push(r),r.onDispose((()=>this._removeMarkerFromLink(d,r)))}}getLinkData(b){var y;return(y=this._dataByLinkId.get(b))==null?void 0:y.data}_getEntryIdKey(b){return`${b.id};;${b.uri}`}_removeMarkerFromLink(b,y){const d=b.lines.indexOf(y);d!==-1&&(b.lines.splice(d,1),b.lines.length===0&&(b.data.id!==void 0&&this._entriesWithId.delete(b.key),this._dataByLinkId.delete(b.id)))}};n.OscLinkService=g=_([v(0,l.IBufferService)],g)},8343:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",_="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[_]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const l=function(g,b,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(d,r,h){r[u]===r?r[_].push({id:d,index:h}):(r[_]=[{id:d,index:h}],r[u]=r)})(l,g,y)};return l.toString=()=>v,n.serviceRegistry.set(v,l),l}},2585:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const _=u(8343);var v;n.IBufferService=(0,_.createDecorator)("BufferService"),n.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),n.ICoreService=(0,_.createDecorator)("CoreService"),n.ICharsetService=(0,_.createDecorator)("CharsetService"),n.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,_.createDecorator)("LogService"),n.IOptionsService=(0,_.createDecorator)("OptionsService"),n.IOscLinkService=(0,_.createDecorator)("OscLinkService"),n.IUnicodeService=(0,_.createDecorator)("UnicodeService"),n.IDecorationService=(0,_.createDecorator)("DecorationService")},1480:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.UnicodeService=void 0;const _=u(8460),v=u(225);class l{static extractShouldJoin(b){return(1&b)!=0}static extractWidth(b){return b>>1&3}static extractCharKind(b){return b>>3}static createPropertyValue(b,y,d=!1){return(16777215&b)<<3|(3&y)<<1|(d?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new _.EventEmitter,this.onChange=this._onChange.event;const b=new v.UnicodeV6;this.register(b),this._active=b.version,this._activeProvider=b}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(b){if(!this._providers[b])throw new Error(`unknown Unicode version "${b}"`);this._active=b,this._activeProvider=this._providers[b],this._onChange.fire(b)}register(b){this._providers[b.version]=b}wcwidth(b){return this._activeProvider.wcwidth(b)}getStringCellWidth(b){let y=0,d=0;const r=b.length;for(let h=0;h<r;++h){let o=b.charCodeAt(h);if(55296<=o&&o<=56319){if(++h>=r)return y+this.wcwidth(o);const C=b.charCodeAt(h);56320<=C&&C<=57343?o=1024*(o-55296)+C-56320+65536:y+=this.wcwidth(C)}const c=this.charProperties(o,d);let m=l.extractWidth(c);l.extractShouldJoin(c)&&(m-=l.extractWidth(d)),y+=m,d=c}return y}charProperties(b,y){return this._activeProvider.charProperties(b,y)}}n.UnicodeService=l}},j={};function Z(P){var n=j[P];if(n!==void 0)return n.exports;var u=j[P]={exports:{}};return W[P].call(u.exports,u,u.exports,Z),u.exports}var ie={};return(()=>{var P=ie;Object.defineProperty(P,"__esModule",{value:!0}),P.Terminal=void 0;const n=Z(9042),u=Z(3236),_=Z(844),v=Z(5741),l=Z(8285),g=Z(7975),b=Z(7090),y=["cols","rows"];class d extends _.Disposable{constructor(h){super(),this._core=this.register(new u.Terminal(h)),this._addonManager=this.register(new v.AddonManager),this._publicOptions={...this._core.options};const o=m=>this._core.options[m],c=(m,C)=>{this._checkReadonlyOptions(m),this._core.options[m]=C};for(const m in this._core.options){const C={get:o.bind(this,m),set:c.bind(this,m)};Object.defineProperty(this._publicOptions,m,C)}}_checkReadonlyOptions(h){if(y.includes(h))throw new Error(`Option "${h}" 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 g.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new b.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new l.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const h=this._core.coreService.decPrivateModes;let o="none";switch(this._core.coreMouseService.activeProtocol){case"X10":o="x10";break;case"VT200":o="vt200";break;case"DRAG":o="drag";break;case"ANY":o="any"}return{applicationCursorKeysMode:h.applicationCursorKeys,applicationKeypadMode:h.applicationKeypad,bracketedPasteMode:h.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:o,originMode:h.origin,reverseWraparoundMode:h.reverseWraparound,sendFocusMode:h.sendFocus,wraparoundMode:h.wraparound}}get options(){return this._publicOptions}set options(h){for(const o in h)this._publicOptions[o]=h[o]}blur(){this._core.blur()}focus(){this._core.focus()}input(h,o=!0){this._core.input(h,o)}resize(h,o){this._verifyIntegers(h,o),this._core.resize(h,o)}open(h){this._core.open(h)}attachCustomKeyEventHandler(h){this._core.attachCustomKeyEventHandler(h)}attachCustomWheelEventHandler(h){this._core.attachCustomWheelEventHandler(h)}registerLinkProvider(h){return this._core.registerLinkProvider(h)}registerCharacterJoiner(h){return this._checkProposedApi(),this._core.registerCharacterJoiner(h)}deregisterCharacterJoiner(h){this._checkProposedApi(),this._core.deregisterCharacterJoiner(h)}registerMarker(h=0){return this._verifyIntegers(h),this._core.registerMarker(h)}registerDecoration(h){return this._checkProposedApi(),this._verifyPositiveIntegers(h.x??0,h.width??0,h.height??0),this._core.registerDecoration(h)}hasSelection(){return this._core.hasSelection()}select(h,o,c){this._verifyIntegers(h,o,c),this._core.select(h,o,c)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(h,o){this._verifyIntegers(h,o),this._core.selectLines(h,o)}dispose(){super.dispose()}scrollLines(h){this._verifyIntegers(h),this._core.scrollLines(h)}scrollPages(h){this._verifyIntegers(h),this._core.scrollPages(h)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(h){this._verifyIntegers(h),this._core.scrollToLine(h)}clear(){this._core.clear()}write(h,o){this._core.write(h,o)}writeln(h,o){this._core.write(h),this._core.write(`\r
|
|
57
|
+
`,o)}paste(h){this._core.paste(h)}refresh(h,o){this._verifyIntegers(h,o),this._core.refresh(h,o)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(h){this._addonManager.loadAddon(this,h)}static get strings(){return n}_verifyIntegers(...h){for(const o of h)if(o===1/0||isNaN(o)||o%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...h){for(const o of h)if(o&&(o===1/0||isNaN(o)||o%1!=0||o<0))throw new Error("This API only accepts positive integers")}}P.Terminal=d})(),ie})()))})(Ho)),Ho.exports}var Jv=Zv(),jo={exports:{}},tf;function eg(){return tf||(tf=1,(function(B,Y){(function(W,j){B.exports=j()})(self,(()=>(()=>{var W={};return(()=>{var j=W;Object.defineProperty(j,"__esModule",{value:!0}),j.FitAddon=void 0,j.FitAddon=class{activate(Z){this._terminal=Z}dispose(){}fit(){const Z=this.proposeDimensions();if(!Z||!this._terminal||isNaN(Z.cols)||isNaN(Z.rows))return;const ie=this._terminal._core;this._terminal.rows===Z.rows&&this._terminal.cols===Z.cols||(ie._renderService.clear(),this._terminal.resize(Z.cols,Z.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const Z=this._terminal._core,ie=Z._renderService.dimensions;if(ie.css.cell.width===0||ie.css.cell.height===0)return;const P=this._terminal.options.scrollback===0?0:Z.viewport.scrollBarWidth,n=window.getComputedStyle(this._terminal.element.parentElement),u=parseInt(n.getPropertyValue("height")),_=Math.max(0,parseInt(n.getPropertyValue("width"))),v=window.getComputedStyle(this._terminal.element),l=u-(parseInt(v.getPropertyValue("padding-top"))+parseInt(v.getPropertyValue("padding-bottom"))),g=_-(parseInt(v.getPropertyValue("padding-right"))+parseInt(v.getPropertyValue("padding-left")))-P;return{cols:Math.max(2,Math.floor(g/ie.css.cell.width)),rows:Math.max(1,Math.floor(l/ie.css.cell.height))}}}})(),W})()))})(jo)),jo.exports}var tg=eg(),Uo={exports:{}},sf;function ig(){return sf||(sf=1,(function(B,Y){(function(W,j){B.exports=j()})(self,(()=>(()=>{var W={965:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GlyphRenderer=void 0;const _=u(374),v=u(509),l=u(855),g=u(859),b=u(381),y=11,d=y*Float32Array.BYTES_PER_ELEMENT;let r,h=0,o=0,c=0;class m extends g.Disposable{constructor(S,w,p,x){super(),this._terminal=S,this._gl=w,this._dimensions=p,this._optionsService=x,this._activeBuffer=0,this._vertices={count:0,attributes:new Float32Array(0),attributesBuffers:[new Float32Array(0),new Float32Array(0)]};const L=this._gl;v.TextureAtlas.maxAtlasPages===void 0&&(v.TextureAtlas.maxAtlasPages=Math.min(32,(0,_.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_IMAGE_UNITS))),v.TextureAtlas.maxTextureSize=(0,_.throwIfFalsy)(L.getParameter(L.MAX_TEXTURE_SIZE))),this._program=(0,_.throwIfFalsy)((0,b.createProgram)(L,`#version 300 es
|
|
58
58
|
layout (location = 0) in vec2 a_unitquad;
|
|
59
59
|
layout (location = 1) in vec2 a_cellpos;
|
|
60
60
|
layout (location = 2) in vec2 a_offset;
|
|
@@ -74,7 +74,7 @@ void main() {
|
|
|
74
74
|
gl_Position = u_projection * vec4(zeroToOne, 0.0, 1.0);
|
|
75
75
|
v_texpage = int(a_texpage);
|
|
76
76
|
v_texcoord = a_texcoord + a_unitquad * a_texsize;
|
|
77
|
-
}`,(function(I){let q="";for(let
|
|
77
|
+
}`,(function(I){let q="";for(let F=1;F<I;F++)q+=` else if (v_texpage == ${F}) { outColor = texture(u_texture[${F}], v_texcoord); }`;return`#version 300 es
|
|
78
78
|
precision lowp float;
|
|
79
79
|
|
|
80
80
|
in vec2 v_texcoord;
|
|
@@ -88,7 +88,7 @@ void main() {
|
|
|
88
88
|
if (v_texpage == 0) {
|
|
89
89
|
outColor = texture(u_texture[0], v_texcoord);
|
|
90
90
|
} ${q}
|
|
91
|
-
}`})(v.TextureAtlas.maxAtlasPages))),this.register((0,g.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const
|
|
91
|
+
}`})(v.TextureAtlas.maxAtlasPages))),this.register((0,g.toDisposable)((()=>L.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_projection")),this._resolutionLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_resolution")),this._textureLocation=(0,_.throwIfFalsy)(L.getUniformLocation(this._program,"u_texture")),this._vertexArrayObject=L.createVertexArray(),L.bindVertexArray(this._vertexArrayObject);const O=new Float32Array([0,0,1,0,0,1,1,1]),T=L.createBuffer();this.register((0,g.toDisposable)((()=>L.deleteBuffer(T)))),L.bindBuffer(L.ARRAY_BUFFER,T),L.bufferData(L.ARRAY_BUFFER,O,L.STATIC_DRAW),L.enableVertexAttribArray(0),L.vertexAttribPointer(0,2,this._gl.FLOAT,!1,0,0);const M=new Uint8Array([0,1,2,3]),U=L.createBuffer();this.register((0,g.toDisposable)((()=>L.deleteBuffer(U)))),L.bindBuffer(L.ELEMENT_ARRAY_BUFFER,U),L.bufferData(L.ELEMENT_ARRAY_BUFFER,M,L.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(L.createBuffer()),this.register((0,g.toDisposable)((()=>L.deleteBuffer(this._attributesBuffer)))),L.bindBuffer(L.ARRAY_BUFFER,this._attributesBuffer),L.enableVertexAttribArray(2),L.vertexAttribPointer(2,2,L.FLOAT,!1,d,0),L.vertexAttribDivisor(2,1),L.enableVertexAttribArray(3),L.vertexAttribPointer(3,2,L.FLOAT,!1,d,2*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(3,1),L.enableVertexAttribArray(4),L.vertexAttribPointer(4,1,L.FLOAT,!1,d,4*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(4,1),L.enableVertexAttribArray(5),L.vertexAttribPointer(5,2,L.FLOAT,!1,d,5*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(5,1),L.enableVertexAttribArray(6),L.vertexAttribPointer(6,2,L.FLOAT,!1,d,7*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(6,1),L.enableVertexAttribArray(1),L.vertexAttribPointer(1,2,L.FLOAT,!1,d,9*Float32Array.BYTES_PER_ELEMENT),L.vertexAttribDivisor(1,1),L.useProgram(this._program);const K=new Int32Array(v.TextureAtlas.maxAtlasPages);for(let I=0;I<v.TextureAtlas.maxAtlasPages;I++)K[I]=I;L.uniform1iv(this._textureLocation,K),L.uniformMatrix4fv(this._projectionLocation,!1,b.PROJECTION_MATRIX),this._atlasTextures=[];for(let I=0;I<v.TextureAtlas.maxAtlasPages;I++){const q=new b.GLTexture((0,_.throwIfFalsy)(L.createTexture()));this.register((0,g.toDisposable)((()=>L.deleteTexture(q.texture)))),L.activeTexture(L.TEXTURE0+I),L.bindTexture(L.TEXTURE_2D,q.texture),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,L.CLAMP_TO_EDGE),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,L.CLAMP_TO_EDGE),L.texImage2D(L.TEXTURE_2D,0,L.RGBA,1,1,0,L.RGBA,L.UNSIGNED_BYTE,new Uint8Array([255,0,0,255])),this._atlasTextures[I]=q}L.enable(L.BLEND),L.blendFunc(L.SRC_ALPHA,L.ONE_MINUS_SRC_ALPHA),this.handleResize()}beginFrame(){return!this._atlas||this._atlas.beginFrame()}updateCell(S,w,p,x,L,O,T,M,U){this._updateCell(this._vertices.attributes,S,w,p,x,L,O,T,M,U)}_updateCell(S,w,p,x,L,O,T,M,U,K){h=(p*this._terminal.cols+w)*y,x!==l.NULL_CELL_CODE&&x!==void 0?this._atlas&&(r=M&&M.length>1?this._atlas.getRasterizedGlyphCombinedChar(M,L,O,T,!1):this._atlas.getRasterizedGlyph(x,L,O,T,!1),o=Math.floor((this._dimensions.device.cell.width-this._dimensions.device.char.width)/2),L!==K&&r.offset.x>o?(c=r.offset.x-o,S[h]=-(r.offset.x-c)+this._dimensions.device.char.left,S[h+1]=-r.offset.y+this._dimensions.device.char.top,S[h+2]=(r.size.x-c)/this._dimensions.device.canvas.width,S[h+3]=r.size.y/this._dimensions.device.canvas.height,S[h+4]=r.texturePage,S[h+5]=r.texturePositionClipSpace.x+c/this._atlas.pages[r.texturePage].canvas.width,S[h+6]=r.texturePositionClipSpace.y,S[h+7]=r.sizeClipSpace.x-c/this._atlas.pages[r.texturePage].canvas.width,S[h+8]=r.sizeClipSpace.y):(S[h]=-r.offset.x+this._dimensions.device.char.left,S[h+1]=-r.offset.y+this._dimensions.device.char.top,S[h+2]=r.size.x/this._dimensions.device.canvas.width,S[h+3]=r.size.y/this._dimensions.device.canvas.height,S[h+4]=r.texturePage,S[h+5]=r.texturePositionClipSpace.x,S[h+6]=r.texturePositionClipSpace.y,S[h+7]=r.sizeClipSpace.x,S[h+8]=r.sizeClipSpace.y),this._optionsService.rawOptions.rescaleOverlappingGlyphs&&(0,_.allowRescaling)(x,U,r.size.x,this._dimensions.device.cell.width)&&(S[h+2]=(this._dimensions.device.cell.width-1)/this._dimensions.device.canvas.width)):S.fill(0,h,h+y-1-2)}clear(){const S=this._terminal,w=S.cols*S.rows*y;this._vertices.count!==w?this._vertices.attributes=new Float32Array(w):this._vertices.attributes.fill(0);let p=0;for(;p<this._vertices.attributesBuffers.length;p++)this._vertices.count!==w?this._vertices.attributesBuffers[p]=new Float32Array(w):this._vertices.attributesBuffers[p].fill(0);this._vertices.count=w,p=0;for(let x=0;x<S.rows;x++)for(let L=0;L<S.cols;L++)this._vertices.attributes[p+9]=L/S.cols,this._vertices.attributes[p+10]=x/S.rows,p+=y}handleResize(){const S=this._gl;S.useProgram(this._program),S.viewport(0,0,S.canvas.width,S.canvas.height),S.uniform2f(this._resolutionLocation,S.canvas.width,S.canvas.height),this.clear()}render(S){if(!this._atlas)return;const w=this._gl;w.useProgram(this._program),w.bindVertexArray(this._vertexArrayObject),this._activeBuffer=(this._activeBuffer+1)%2;const p=this._vertices.attributesBuffers[this._activeBuffer];let x=0;for(let L=0;L<S.lineLengths.length;L++){const O=L*this._terminal.cols*y,T=this._vertices.attributes.subarray(O,O+S.lineLengths[L]*y);p.set(T,x),x+=T.length}w.bindBuffer(w.ARRAY_BUFFER,this._attributesBuffer),w.bufferData(w.ARRAY_BUFFER,p.subarray(0,x),w.STREAM_DRAW);for(let L=0;L<this._atlas.pages.length;L++)this._atlas.pages[L].version!==this._atlasTextures[L].version&&this._bindAtlasPageTexture(w,this._atlas,L);w.drawElementsInstanced(w.TRIANGLE_STRIP,4,w.UNSIGNED_BYTE,0,x/y)}setAtlas(S){this._atlas=S;for(const w of this._atlasTextures)w.version=-1}_bindAtlasPageTexture(S,w,p){S.activeTexture(S.TEXTURE0+p),S.bindTexture(S.TEXTURE_2D,this._atlasTextures[p].texture),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_S,S.CLAMP_TO_EDGE),S.texParameteri(S.TEXTURE_2D,S.TEXTURE_WRAP_T,S.CLAMP_TO_EDGE),S.texImage2D(S.TEXTURE_2D,0,S.RGBA,S.RGBA,S.UNSIGNED_BYTE,w.pages[p].canvas),S.generateMipmap(S.TEXTURE_2D),this._atlasTextures[p].version=w.pages[p].version}setDimensions(S){this._dimensions=S}}n.GlyphRenderer=m},742:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RectangleRenderer=void 0;const _=u(374),v=u(859),l=u(310),g=u(381),b=8*Float32Array.BYTES_PER_ELEMENT;class y{constructor(){this.attributes=new Float32Array(160),this.count=0}}let d=0,r=0,h=0,o=0,c=0,m=0,C=0;class S extends v.Disposable{constructor(p,x,L,O){super(),this._terminal=p,this._gl=x,this._dimensions=L,this._themeService=O,this._vertices=new y,this._verticesCursor=new y;const T=this._gl;this._program=(0,_.throwIfFalsy)((0,g.createProgram)(T,`#version 300 es
|
|
92
92
|
layout (location = 0) in vec2 a_position;
|
|
93
93
|
layout (location = 1) in vec2 a_size;
|
|
94
94
|
layout (location = 2) in vec4 a_color;
|
|
@@ -111,11 +111,11 @@ out vec4 outColor;
|
|
|
111
111
|
|
|
112
112
|
void main() {
|
|
113
113
|
outColor = v_color;
|
|
114
|
-
}`)),this.register((0,v.toDisposable)((()=>T.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(T.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=T.createVertexArray(),T.bindVertexArray(this._vertexArrayObject);const M=new Float32Array([0,0,1,0,0,1,1,1]),U=T.createBuffer();this.register((0,v.toDisposable)((()=>T.deleteBuffer(U)))),T.bindBuffer(T.ARRAY_BUFFER,U),T.bufferData(T.ARRAY_BUFFER,M,T.STATIC_DRAW),T.enableVertexAttribArray(3),T.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const K=new Uint8Array([0,1,2,3]),I=T.createBuffer();this.register((0,v.toDisposable)((()=>T.deleteBuffer(I)))),T.bindBuffer(T.ELEMENT_ARRAY_BUFFER,I),T.bufferData(T.ELEMENT_ARRAY_BUFFER,K,T.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(T.createBuffer()),this.register((0,v.toDisposable)((()=>T.deleteBuffer(this._attributesBuffer)))),T.bindBuffer(T.ARRAY_BUFFER,this._attributesBuffer),T.enableVertexAttribArray(0),T.vertexAttribPointer(0,2,T.FLOAT,!1,b,0),T.vertexAttribDivisor(0,1),T.enableVertexAttribArray(1),T.vertexAttribPointer(1,2,T.FLOAT,!1,b,2*Float32Array.BYTES_PER_ELEMENT),T.vertexAttribDivisor(1,1),T.enableVertexAttribArray(2),T.vertexAttribPointer(2,4,T.FLOAT,!1,b,4*Float32Array.BYTES_PER_ELEMENT),T.vertexAttribDivisor(2,1),this._updateCachedColors(B.colors),this.register(this._themeService.onChangeColors((q=>{this._updateCachedColors(q),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(p){const x=this._gl;x.useProgram(this._program),x.bindVertexArray(this._vertexArrayObject),x.uniformMatrix4fv(this._projectionLocation,!1,g.PROJECTION_MATRIX),x.bindBuffer(x.ARRAY_BUFFER,this._attributesBuffer),x.bufferData(x.ARRAY_BUFFER,p.attributes,x.DYNAMIC_DRAW),x.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,x.UNSIGNED_BYTE,0,p.count)}handleResize(){this._updateViewportRectangle()}setDimensions(p){this._dimensions=p}_updateCachedColors(p){this._bgFloat=this._colorToFloat32Array(p.background),this._cursorFloat=this._colorToFloat32Array(p.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(p){const x=this._terminal,L=this._vertices;let B,T,M,U,K,I,q,P,A,H,R,z=1;for(B=0;B<x.rows;B++){for(M=-1,U=0,K=0,I=!1,T=0;T<x.cols;T++)q=(B*x.cols+T)*l.RENDER_MODEL_INDICIES_PER_CELL,P=p.cells[q+l.RENDER_MODEL_BG_OFFSET],A=p.cells[q+l.RENDER_MODEL_FG_OFFSET],H=!!(67108864&A),(P!==U||A!==K&&(I||H))&&((U!==0||I&&K!==0)&&(R=8*z++,this._updateRectangle(L,R,K,U,M,T,B)),M=T,U=P,K=A,I=H);(U!==0||I&&K!==0)&&(R=8*z++,this._updateRectangle(L,R,K,U,M,x.cols,B))}L.count=z}updateCursor(p){const x=this._verticesCursor,L=p.cursor;if(!L||L.style==="block")return void(x.count=0);let B,T=0;L.style!=="bar"&&L.style!=="outline"||(B=8*T++,this._addRectangleFloat(x.attributes,B,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(B=8*T++,this._addRectangleFloat(x.attributes,B,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(B=8*T++,this._addRectangleFloat(x.attributes,B,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),B=8*T++,this._addRectangleFloat(x.attributes,B,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),x.count=T}_updateRectangle(p,x,L,B,T,M,U){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:u=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:u=(16777215&L)<<8;break;default:u=this._themeService.colors.foreground.rgba}else switch(50331648&B){case 16777216:case 33554432:u=this._themeService.colors.ansi[255&B].rgba;break;case 50331648:u=(16777215&B)<<8;break;default:u=this._themeService.colors.background.rgba}p.attributes.length<x+4&&(p.attributes=(0,g.expandFloat32Array)(p.attributes,this._terminal.rows*this._terminal.cols*8)),r=T*this._dimensions.device.cell.width,h=U*this._dimensions.device.cell.height,o=(u>>24&255)/255,c=(u>>16&255)/255,m=(u>>8&255)/255,C=1,this._addRectangle(p.attributes,x,r,h,(M-T)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o,c,m,C)}_addRectangle(p,x,L,B,T,M,U,K,I,q){p[x]=L/this._dimensions.device.canvas.width,p[x+1]=B/this._dimensions.device.canvas.height,p[x+2]=T/this._dimensions.device.canvas.width,p[x+3]=M/this._dimensions.device.canvas.height,p[x+4]=U,p[x+5]=K,p[x+6]=I,p[x+7]=q}_addRectangleFloat(p,x,L,B,T,M,U){p[x]=L/this._dimensions.device.canvas.width,p[x+1]=B/this._dimensions.device.canvas.height,p[x+2]=T/this._dimensions.device.canvas.width,p[x+3]=M/this._dimensions.device.canvas.height,p[x+4]=U[0],p[x+5]=U[1],p[x+6]=U[2],p[x+7]=U[3]}_colorToFloat32Array(p){return new Float32Array([(p.rgba>>24&255)/255,(p.rgba>>16&255)/255,(p.rgba>>8&255)/255,(255&p.rgba)/255])}}n.RectangleRenderer=S},310:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderModel=n.COMBINED_CHAR_BIT_MASK=n.RENDER_MODEL_EXT_OFFSET=n.RENDER_MODEL_FG_OFFSET=n.RENDER_MODEL_BG_OFFSET=n.RENDER_MODEL_INDICIES_PER_CELL=void 0;const _=f(296);n.RENDER_MODEL_INDICIES_PER_CELL=4,n.RENDER_MODEL_BG_OFFSET=1,n.RENDER_MODEL_FG_OFFSET=2,n.RENDER_MODEL_EXT_OFFSET=3,n.COMBINED_CHAR_BIT_MASK=2147483648,n.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,_.createSelectionRenderModel)()}resize(v,l){const g=v*l*n.RENDER_MODEL_INDICIES_PER_CELL;g!==this.cells.length&&(this.cells=new Uint32Array(g),this.lineLengths=new Uint32Array(l))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const _=f(820),v=f(274),l=f(627),g=f(457),b=f(56),y=f(374),u=f(345),r=f(859),h=f(147),o=f(782),c=f(855),m=f(965),C=f(742),S=f(310),w=f(733);class p extends r.Disposable{constructor(T,M,U,K,I,q,P,A,H){super(),this._terminal=T,this._characterJoinerService=M,this._charSizeService=U,this._coreBrowserService=K,this._coreService=I,this._decorationService=q,this._optionsService=P,this._themeService=A,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new S.RenderModel,this._workCell=new o.CellData,this._workCell2=new o.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new u.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new u.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new u.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new u.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new u.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new v.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new w.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,P,this._themeService)],this.dimensions=(0,y.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(P.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const R={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",R),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextlost",(z=>{console.log("webglcontextlost event received"),z.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(z)}),3e3)}))),this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextrestored",(z=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,l.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((z,V)=>this._setCanvasDevicePixelDimensions(z,V))),this.register(this._coreBrowserService.onWindowChange((z=>{this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,z,((V,J)=>this._setCanvasDevicePixelDimensions(V,J)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var z;for(const V of this._renderLayers)V.dispose();(z=this._canvas.parentElement)==null||z.removeChild(this._canvas),(0,l.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var T;return(T=this._charAtlas)==null?void 0:T.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(T,M){var U,K,I,q;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const P of this._renderLayers)P.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(U=this._rectangleRenderer.value)==null||U.setDimensions(this.dimensions),(K=this._rectangleRenderer.value)==null||K.handleResize(),(I=this._glyphRenderer.value)==null||I.setDimensions(this.dimensions),(q=this._glyphRenderer.value)==null||q.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var T;for(const M of this._renderLayers)M.handleBlur(this._terminal);(T=this._cursorBlinkStateManager.value)==null||T.pause(),this._requestRedrawViewport()}handleFocus(){var T;for(const M of this._renderLayers)M.handleFocus(this._terminal);(T=this._cursorBlinkStateManager.value)==null||T.resume(),this._requestRedrawViewport()}handleSelectionChanged(T,M,U){for(const K of this._renderLayers)K.handleSelectionChanged(this._terminal,T,M,U);this._model.selection.update(this._core,T,M,U),this._requestRedrawViewport()}handleCursorMove(){var T;for(const M of this._renderLayers)M.handleCursorMove(this._terminal);(T=this._cursorBlinkStateManager.value)==null||T.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new C.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new m.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var M;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const T=(0,l.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==T&&(this._onChangeTextureAtlas.fire(T.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,u.forwardEvent)(T.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,u.forwardEvent)(T.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=T,this._charAtlas.warmUp(),(M=this._glyphRenderer.value)==null||M.setAtlas(this._charAtlas)}_clearModel(T){var M;this._model.clear(),T&&((M=this._glyphRenderer.value)==null||M.clear())}clearTextureAtlas(){var T;(T=this._charAtlas)==null||T.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var T;this._clearModel(!0);for(const M of this._renderLayers)M.reset(this._terminal);(T=this._cursorBlinkStateManager.value)==null||T.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(T){return-1}deregisterCharacterJoiner(T){return!1}renderRows(T,M){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const U of this._renderLayers)U.handleGridChanged(this._terminal,T,M);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(T,M),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new g.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(T,M){const U=this._core;let K,I,q,P,A,H,R,z,V,J,he,ue,W,N,ne=this._workCell;T=L(T,U.rows-1,0),M=L(M,U.rows-1,0);const re=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,_e=re-U.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,U.cols-1);let xe=-1;const pe=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Ne=!1;for(I=T;I<=M;I++)for(q=I+U.buffer.ydisp,P=U.buffer.lines.get(q),this._model.lineLengths[I]=0,A=this._characterJoinerService.getJoinedCharacters(q),W=0;W<U.cols;W++)if(K=this._cellColorResolver.result.bg,P.loadCell(W,ne),W===0&&(K=this._cellColorResolver.result.bg),H=!1,R=W,A.length>0&&W===A[0][0]&&(H=!0,z=A.shift(),ne=new x(ne,P.translateToString(!0,z[0],z[1]),z[1]-z[0]),R=z[1]-1),V=ne.getChars(),J=ne.getCode(),ue=(I*U.cols+W)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(ne,W,q,this.dimensions.device.cell.width),pe&&q===re&&(W===fe&&(this._model.cursor={x:fe,y:_e,width:ne.getWidth(),style:this._coreBrowserService.isFocused?U.options.cursorStyle||"block":U.options.cursorInactiveStyle,cursorWidth:U.options.cursorWidth,dpr:this._devicePixelRatio},xe=fe+ne.getWidth()-1),W>=fe&&W<=xe&&(this._coreBrowserService.isFocused&&(U.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&U.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),J!==c.NULL_CELL_CODE&&(this._model.lineLengths[I]=W+1),(this._model.cells[ue]!==J||this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Ne=!0,V.length>1&&(J|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[ue]=J,this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,he=ne.getWidth(),this._glyphRenderer.value.updateCell(W,I,J,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,V,he,K),H))for(ne=this._workCell,W++;W<R;W++)N=(I*U.cols+W)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell(W,I,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0,0),this._model.cells[N]=c.NULL_CELL_CODE,this._model.cells[N+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[N+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[N+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Ne&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(T,M){this._canvas.width===T&&this._canvas.height===M||(this._canvas.width=T,this._canvas.height=M,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const T=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:T,end:T})}}n.WebglRenderer=p;class x extends h.AttributeData{constructor(T,M,U){super(),this.content=0,this.combinedData="",this.fg=T.fg,this.bg=T.bg,this.combinedData=M,this._width=U}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(T){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(B,T,M=0){return Math.max(Math.min(B,T),M)}n.JoinedCellData=x},381:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const _=f(374);function v(l,g,b){const y=(0,_.throwIfFalsy)(l.createShader(g));if(l.shaderSource(y,b),l.compileShader(y),l.getShaderParameter(y,l.COMPILE_STATUS))return y;console.error(l.getShaderInfoLog(y)),l.deleteShader(y)}n.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),n.createProgram=function(l,g,b){const y=(0,_.throwIfFalsy)(l.createProgram());if(l.attachShader(y,(0,_.throwIfFalsy)(v(l,l.VERTEX_SHADER,g))),l.attachShader(y,(0,_.throwIfFalsy)(v(l,l.FRAGMENT_SHADER,b))),l.linkProgram(y),l.getProgramParameter(y,l.LINK_STATUS))return y;console.error(l.getProgramInfoLog(y)),l.deleteProgram(y)},n.createShader=v,n.expandFloat32Array=function(l,g){const b=Math.min(2*l.length,g),y=new Float32Array(b);for(let u=0;u<l.length;u++)y[u]=l[u];return y},n.GLTexture=class{constructor(l){this.texture=l,this.version=-1}}},592:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const _=f(627),v=f(237),l=f(374),g=f(859);class b extends g.Disposable{constructor(u,r,h,o,c,m,C,S){super(),this._container=r,this._alpha=c,this._coreBrowserService=m,this._optionsService=C,this._themeService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((w=>{this._refreshCharAtlas(u,w),this.reset(u)}))),this.register((0,g.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,l.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(u){}handleFocus(u){}handleCursorMove(u){}handleGridChanged(u,r,h){}handleSelectionChanged(u,r,h,o=!1){}_setTransparency(u,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(u,this._themeService.colors),this.handleGridChanged(u,0,u.rows-1)}_refreshCharAtlas(u,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,_.acquireTextureAtlas)(u,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(u,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(u,this._themeService.colors)}_fillBottomLineAtCells(u,r,h=1){this._ctx.fillRect(u*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(u,r,h,o){this._alpha?this._ctx.clearRect(u*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(u*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(u,r,h,o){this._ctx.font=this._getFont(u,!1,!1),this._ctx.textBaseline=v.TEXT_BASELINE,this._clipCell(h,o,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(u,r,h){this._ctx.beginPath(),this._ctx.rect(u*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(u,r,h){return`${h?"italic":""} ${r?u.options.fontWeightBold:u.options.fontWeight} ${u.options.fontSize*this._coreBrowserService.dpr}px ${u.options.fontFamily}`}}n.BaseRenderLayer=b},733:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const _=f(197),v=f(237),l=f(592);class g extends l.BaseRenderLayer{constructor(y,u,r,h,o,c,m){super(r,y,"link",u,!0,o,c,m),this.register(h.onShowLinkUnderline((C=>this._handleShowLinkUnderline(C)))),this.register(h.onHideLinkUnderline((C=>this._handleHideLinkUnderline(C))))}resize(y,u){super.resize(y,u),this._state=void 0}reset(y){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const y=this._state.y2-this._state.y1-1;y>0&&this._clearCells(0,this._state.y1+1,this._state.cols,y),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(y){if(y.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:y.fg!==void 0&&(0,_.is256Color)(y.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[y.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,y.y1===y.y2)this._fillBottomLineAtCells(y.x1,y.y1,y.x2-y.x1);else{this._fillBottomLineAtCells(y.x1,y.y1,y.cols-y.x1);for(let u=y.y1+1;u<y.y2;u++)this._fillBottomLineAtCells(0,u,y.cols);this._fillBottomLineAtCells(0,y.y2,y.x2)}this._state=y}_handleHideLinkUnderline(y){this._clearCurrentLink()}}n.LinkRenderLayer=g},820:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(f,_,v,l){f.addEventListener(_,v,l);let g=!1;return{dispose:()=>{g||(g=!0,f.removeEventListener(_,v,l))}}}},274:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const _=f(855),v=f(160),l=f(374);let g,b=0,y=0,u=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(c,m,C,S,w,p){this._terminal=c,this._optionService=m,this._selectionRenderModel=C,this._decorationService=S,this._coreBrowserService=w,this._themeService=p,this.result={fg:0,bg:0,ext:0}}resolve(c,m,C,S){if(this.result.bg=c.bg,this.result.fg=c.fg,this.result.ext=268435456&c.bg?c.extended.ext:0,y=0,b=0,r=!1,u=!1,h=!1,g=this._themeService.colors,o=0,c.getCode()!==_.NULL_CELL_CODE&&c.extended.underlineStyle===4){const w=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=m*S%(2*Math.round(w))}if(this._decorationService.forEachDecorationAtCell(m,C,"bottom",(w=>{w.backgroundColorRGB&&(y=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(b=w.foregroundColorRGB.rgba>>8&16777215,u=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,m,C),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}y=v.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else y=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,g.selectionForeground&&(b=g.selectionForeground.rgba>>8&16777215,u=!0),(0,l.treatGlyphAsBackgroundColor)(c.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}b=v.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}u=!0}}this._decorationService.forEachDecorationAtCell(m,C,"top",(w=>{w.backgroundColorRGB&&(y=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(b=w.foregroundColorRGB.rgba>>8&16777215,u=!0)})),r&&(y=h?-16777216&c.bg&-134217729|y|50331648:-16777216&c.bg|y|50331648),u&&(b=-16777216&c.fg&-67108865|b|50331648),67108864&this.result.fg&&(r&&!u&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,u=!0),!r&&u&&(y=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),g=void 0,this.result.bg=r?y:this.result.bg,this.result.fg=u?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const _=f(509),v=f(197),l=[];n.acquireTextureAtlas=function(g,b,y,u,r,h,o,c){const m=(0,v.generateConfig)(u,r,h,o,b,y,c);for(let w=0;w<l.length;w++){const p=l[w],x=p.ownedBy.indexOf(g);if(x>=0){if((0,v.configEquals)(p.config,m))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),l.splice(w,1)):p.ownedBy.splice(x,1);break}}for(let w=0;w<l.length;w++){const p=l[w];if((0,v.configEquals)(p.config,m))return p.ownedBy.push(g),p.atlas}const C=g._core,S={atlas:new _.TextureAtlas(document,m,C.unicodeService),config:m,ownedBy:[g]};return l.push(S),S.atlas},n.removeTerminalFromCache=function(g){for(let b=0;b<l.length;b++){const y=l[b].ownedBy.indexOf(g);if(y!==-1){l[b].ownedBy.length===1?(l[b].atlas.dispose(),l.splice(b,1)):l[b].ownedBy.splice(y,1);break}}}},197:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const _=f(160);n.generateConfig=function(v,l,g,b,y,u,r){const h={foreground:u.foreground,background:u.background,cursor:_.NULL_COLOR,cursorAccent:_.NULL_COLOR,selectionForeground:_.NULL_COLOR,selectionBackgroundTransparent:_.NULL_COLOR,selectionBackgroundOpaque:_.NULL_COLOR,selectionInactiveBackgroundTransparent:_.NULL_COLOR,selectionInactiveBackgroundOpaque:_.NULL_COLOR,ansi:u.ansi.slice(),contrastCache:u.contrastCache,halfContrastCache:u.halfContrastCache};return{customGlyphs:y.customGlyphs,devicePixelRatio:r,letterSpacing:y.letterSpacing,lineHeight:y.lineHeight,deviceCellWidth:v,deviceCellHeight:l,deviceCharWidth:g,deviceCharHeight:b,fontFamily:y.fontFamily,fontSize:y.fontSize,fontWeight:y.fontWeight,fontWeightBold:y.fontWeightBold,allowTransparency:y.allowTransparency,drawBoldTextInBrightColors:y.drawBoldTextInBrightColors,minimumContrastRatio:y.minimumContrastRatio,colors:h}},n.configEquals=function(v,l){for(let g=0;g<v.colors.ansi.length;g++)if(v.colors.ansi[g].rgba!==l.colors.ansi[g].rgba)return!1;return v.devicePixelRatio===l.devicePixelRatio&&v.customGlyphs===l.customGlyphs&&v.lineHeight===l.lineHeight&&v.letterSpacing===l.letterSpacing&&v.fontFamily===l.fontFamily&&v.fontSize===l.fontSize&&v.fontWeight===l.fontWeight&&v.fontWeightBold===l.fontWeightBold&&v.allowTransparency===l.allowTransparency&&v.deviceCharWidth===l.deviceCharWidth&&v.deviceCharHeight===l.deviceCharHeight&&v.drawBoldTextInBrightColors===l.drawBoldTextInBrightColors&&v.minimumContrastRatio===l.minimumContrastRatio&&v.colors.foreground.rgba===l.colors.foreground.rgba&&v.colors.background.rgba===l.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const _=f(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},457:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(f,_){this._renderCallback=f,this._coreBrowserService=_,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(f=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,_>0)return void this._restartInterval(_)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(_)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),f)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const _=f(374);n.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const v={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};n.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(u,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(u,r)=>`M${.5-u},0 L${.5-u},1 M${.5+u},0 L${.5+u},1`},"╒":{1:(u,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(u,r)=>`M${.5-u},1 L${.5-u},.5 L1,.5 M${.5+u},.5 L${.5+u},1`},"╔":{1:(u,r)=>`M1,${.5-r} L${.5-u},${.5-r} L${.5-u},1 M1,${.5+r} L${.5+u},${.5+r} L${.5+u},1`},"╕":{1:(u,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(u,r)=>`M${.5+u},1 L${.5+u},.5 L0,.5 M${.5-u},.5 L${.5-u},1`},"╗":{1:(u,r)=>`M0,${.5+r} L${.5-u},${.5+r} L${.5-u},1 M0,${.5-r} L${.5+u},${.5-r} L${.5+u},1`},"╘":{1:(u,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(u,r)=>`M1,.5 L${.5-u},.5 L${.5-u},0 M${.5+u},.5 L${.5+u},0`},"╚":{1:(u,r)=>`M1,${.5-r} L${.5+u},${.5-r} L${.5+u},0 M1,${.5+r} L${.5-u},${.5+r} L${.5-u},0`},"╛":{1:(u,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(u,r)=>`M0,.5 L${.5+u},.5 L${.5+u},0 M${.5-u},.5 L${.5-u},0`},"╝":{1:(u,r)=>`M0,${.5-r} L${.5-u},${.5-r} L${.5-u},0 M0,${.5+r} L${.5+u},${.5+r} L${.5+u},0`},"╞":{1:(u,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(u,r)=>`M${.5-u},0 L${.5-u},1 M${.5+u},0 L${.5+u},1 M${.5+u},.5 L1,.5`},"╠":{1:(u,r)=>`M${.5-u},0 L${.5-u},1 M1,${.5+r} L${.5+u},${.5+r} L${.5+u},1 M1,${.5-r} L${.5+u},${.5-r} L${.5+u},0`},"╡":{1:(u,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(u,r)=>`M0,.5 L${.5-u},.5 M${.5-u},0 L${.5-u},1 M${.5+u},0 L${.5+u},1`},"╣":{1:(u,r)=>`M${.5+u},0 L${.5+u},1 M0,${.5+r} L${.5-u},${.5+r} L${.5-u},1 M0,${.5-r} L${.5-u},${.5-r} L${.5-u},0`},"╤":{1:(u,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(u,r)=>`M0,.5 L1,.5 M${.5-u},.5 L${.5-u},1 M${.5+u},.5 L${.5+u},1`},"╦":{1:(u,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-u},${.5+r} L${.5-u},1 M1,${.5+r} L${.5+u},${.5+r} L${.5+u},1`},"╧":{1:(u,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(u,r)=>`M0,.5 L1,.5 M${.5-u},.5 L${.5-u},0 M${.5+u},.5 L${.5+u},0`},"╩":{1:(u,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-u},${.5-r} L${.5-u},0 M1,${.5-r} L${.5+u},${.5-r} L${.5+u},0`},"╪":{1:(u,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(u,r)=>`M0,.5 L1,.5 M${.5-u},0 L${.5-u},1 M${.5+u},0 L${.5+u},1`},"╬":{1:(u,r)=>`M0,${.5+r} L${.5-u},${.5+r} L${.5-u},1 M1,${.5+r} L${.5+u},${.5+r} L${.5+u},1 M0,${.5-r} L${.5-u},${.5-r} L${.5-u},0 M1,${.5-r} L${.5+u},${.5-r} L${.5+u},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(u,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(u,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(u,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(u,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,1,.5`}},n.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.tryDrawCustomChar=function(u,r,h,o,c,m,C,S){const w=n.blockElementDefinitions[r];if(w)return(function(B,T,M,U,K,I){for(let q=0;q<T.length;q++){const P=T[q],A=K/8,H=I/8;B.fillRect(M+P.x*A,U+P.y*H,P.w*A,P.h*H)}})(u,w,h,o,c,m),!0;const p=v[r];if(p)return(function(B,T,M,U,K,I){let q=l.get(T);q||(q=new Map,l.set(T,q));const P=B.fillStyle;if(typeof P!="string")throw new Error(`Unexpected fillStyle type "${P}"`);let A=q.get(P);if(!A){const H=T[0].length,R=T.length,z=B.canvas.ownerDocument.createElement("canvas");z.width=H,z.height=R;const V=(0,_.throwIfFalsy)(z.getContext("2d")),J=new ImageData(H,R);let he,ue,W,N;if(P.startsWith("#"))he=parseInt(P.slice(1,3),16),ue=parseInt(P.slice(3,5),16),W=parseInt(P.slice(5,7),16),N=P.length>7&&parseInt(P.slice(7,9),16)||1;else{if(!P.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${P}" when drawing pattern glyph`);[he,ue,W,N]=P.substring(5,P.length-1).split(",").map((ne=>parseFloat(ne)))}for(let ne=0;ne<R;ne++)for(let re=0;re<H;re++)J.data[4*(ne*H+re)]=he,J.data[4*(ne*H+re)+1]=ue,J.data[4*(ne*H+re)+2]=W,J.data[4*(ne*H+re)+3]=T[ne][re]*(255*N);V.putImageData(J,0,0),A=(0,_.throwIfFalsy)(B.createPattern(z,null)),q.set(P,A)}B.fillStyle=A,B.fillRect(M,U,K,I)})(u,p,h,o,c,m),!0;const x=n.boxDrawingDefinitions[r];if(x)return(function(B,T,M,U,K,I,q){B.strokeStyle=B.fillStyle;for(const[P,A]of Object.entries(T)){let H;B.beginPath(),B.lineWidth=q*Number.parseInt(P),H=typeof A=="function"?A(.15,.15/I*K):A;for(const R of H.split(" ")){const z=R[0],V=b[z];if(!V){console.error(`Could not find drawing instructions for "${z}"`);continue}const J=R.substring(1).split(",");J[0]&&J[1]&&V(B,y(J,K,I,M,U,!0,q))}B.stroke(),B.closePath()}})(u,x,h,o,c,m,S),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(B,T,M,U,K,I,q,P){const A=new Path2D;A.rect(M,U,K,I),B.clip(A),B.beginPath();const H=q/12;B.lineWidth=P*H;for(const R of T.d.split(" ")){const z=R[0],V=b[z];if(!V){console.error(`Could not find drawing instructions for "${z}"`);continue}const J=R.substring(1).split(",");J[0]&&J[1]&&V(B,y(J,K,I,M,U,!1,P,(T.leftPadding??0)*(H/2),(T.rightPadding??0)*(H/2)))}T.type===1?(B.strokeStyle=B.fillStyle,B.stroke()):B.fill(),B.closePath()})(u,L,h,o,c,m,C,S),!0)};const l=new Map;function g(u,r,h=0){return Math.max(Math.min(u,r),h)}const b={C:(u,r)=>u.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(u,r)=>u.lineTo(r[0],r[1]),M:(u,r)=>u.moveTo(r[0],r[1])};function y(u,r,h,o,c,m,C,S=0,w=0){const p=u.map((x=>parseFloat(x)||parseInt(x)));if(p.length<2)throw new Error("Too few arguments for instruction");for(let x=0;x<p.length;x+=2)p[x]*=r-S*C-w*C,m&&p[x]!==0&&(p[x]=g(Math.round(p[x]+.5)-.5,r,0)),p[x]+=o+S*C;for(let x=1;x<p.length;x+=2)p[x]*=h,m&&p[x]!==0&&(p[x]=g(Math.round(p[x]+.5)-.5,h,0)),p[x]+=c;return p}},56:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const _=f(859);n.observeDevicePixelDimensions=function(v,l,g){let b=new l.ResizeObserver((y=>{const u=y.find((o=>o.target===v));if(!u)return;if(!("devicePixelContentBoxSize"in u))return b==null||b.disconnect(),void(b=void 0);const r=u.devicePixelContentBoxSize[0].inlineSize,h=u.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&g(r,h)}));try{b.observe(v,{box:["device-pixel-content-box"]})}catch{b.disconnect(),b=void 0}return(0,_.toDisposable)((()=>b==null?void 0:b.disconnect()))}},374:(F,n)=>{function f(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=f,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=_,n.allowRescaling=function(v,l,g,b){return l===1&&g>Math.ceil(1.5*b)&&v!==void 0&&v>255&&!_(v)&&!f(v)&&!(function(y){return 57344<=y&&y<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return f(v)||(function(l){return 9472<=l&&l<=9631})(v)},n.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}}}},n.computeNextVariantOffset=function(v,l,g=0){return(v-(2*Math.round(l)-g))%(2*Math.round(l))}},296:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.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(v,l,g,b=!1){if(this.selectionStart=l,this.selectionEnd=g,!l||!g||l[0]===g[0]&&l[1]===g[1])return void this.clear();const y=v.buffers.active.ydisp,u=l[1]-y,r=g[1]-y,h=Math.max(u,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=u,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=g[0])}isCellSelected(v,l,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&g>=this.viewportCappedStartRow&&l<this.endCol&&g<=this.viewportCappedEndRow:l<this.startCol&&g>=this.viewportCappedStartRow&&l>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol)}}n.createSelectionRenderModel=function(){return new f}},509:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const _=f(237),v=f(860),l=f(374),g=f(160),b=f(345),y=f(485),u=f(385),r=f(147),h=f(855),o={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let c;class m{get pages(){return this._pages}constructor(x,L,B){this._document=x,this._config=L,this._unicodeService=B,this._didWarmUp=!1,this._cacheMap=new y.FourKeyMap,this._cacheMapCombined=new y.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=w(x,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,l.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const x of this.pages)x.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const x=new u.IdleTaskQueue;for(let L=33;L<126;L++)x.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const B=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,B)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const x of this._pages)x.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const L=this._pages.filter((q=>2*q.canvas.width<=(m.maxTextureSize||4096))).sort(((q,P)=>P.canvas.width!==q.canvas.width?P.canvas.width-q.canvas.width:P.percentageUsed-q.percentageUsed));let B=-1,T=0;for(let q=0;q<L.length;q++)if(L[q].canvas.width!==T)B=q,T=L[q].canvas.width;else if(q-B==3)break;const M=L.slice(B,B+4),U=M.map((q=>q.glyphs[0].texturePage)).sort(((q,P)=>q>P?1:-1)),K=this.pages.length-M.length,I=this._mergePages(M,K);I.version++;for(let q=U.length-1;q>=0;q--)this._deletePage(U[q]);this.pages.push(I),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(I.canvas)}const x=new C(this._document,this._textureSize);return this._pages.push(x),this._activePages.push(x),this._onAddTextureAtlasCanvas.fire(x.canvas),x}_mergePages(x,L){const B=2*x[0].canvas.width,T=new C(this._document,B,x);for(const[M,U]of x.entries()){const K=M*U.canvas.width%B,I=Math.floor(M/2)*U.canvas.height;T.ctx.drawImage(U.canvas,K,I);for(const P of U.glyphs)P.texturePage=L,P.sizeClipSpace.x=P.size.x/B,P.sizeClipSpace.y=P.size.y/B,P.texturePosition.x+=K,P.texturePosition.y+=I,P.texturePositionClipSpace.x=P.texturePosition.x/B,P.texturePositionClipSpace.y=P.texturePosition.y/B;this._onRemoveTextureAtlasCanvas.fire(U.canvas);const q=this._activePages.indexOf(U);q!==-1&&this._activePages.splice(q,1)}return T}_deletePage(x){this._pages.splice(x,1);for(let L=x;L<this._pages.length;L++){const B=this._pages[L];for(const T of B.glyphs)T.texturePage--;B.version++}}getRasterizedGlyphCombinedChar(x,L,B,T,M){return this._getFromCacheMap(this._cacheMapCombined,x,L,B,T,M)}getRasterizedGlyph(x,L,B,T,M){return this._getFromCacheMap(this._cacheMap,x,L,B,T,M)}_getFromCacheMap(x,L,B,T,M,U=!1){return c=x.get(L,B,T,M),c||(c=this._drawToCache(L,B,T,M,U),x.set(L,B,T,M,c)),c}_getColorFromAnsiIndex(x){if(x>=this._config.colors.ansi.length)throw new Error("No color found for idx "+x);return this._config.colors.ansi[x]}_getBackgroundColor(x,L,B,T){if(this._config.allowTransparency)return g.NULL_COLOR;let M;switch(x){case 16777216:case 33554432:M=this._getColorFromAnsiIndex(L);break;case 50331648:const U=r.AttributeData.toColorRGB(L);M=g.channels.toColor(U[0],U[1],U[2]);break;default:M=B?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return M}_getForegroundColor(x,L,B,T,M,U,K,I,q,P){const A=this._getMinimumContrastColor(x,L,B,T,M,U,K,q,I,P);if(A)return A;let H;switch(M){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&q&&U<8&&(U+=8),H=this._getColorFromAnsiIndex(U);break;case 50331648:const R=r.AttributeData.toColorRGB(U);H=g.channels.toColor(R[0],R[1],R[2]);break;default:H=K?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=g.color.opaque(H)),I&&(H=g.color.multiplyOpacity(H,_.DIM_OPACITY)),H}_resolveBackgroundRgba(x,L,B){switch(x){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return B?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(x,L,B,T){switch(x){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&T&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return B?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(x,L,B,T,M,U,K,I,q,P){if(this._config.minimumContrastRatio===1||P)return;const A=this._getContrastCache(q),H=A.getColor(x,T);if(H!==void 0)return H||void 0;const R=this._resolveBackgroundRgba(L,B,K),z=this._resolveForegroundRgba(M,U,K,I),V=g.rgba.ensureContrastRatio(R,z,this._config.minimumContrastRatio/(q?2:1));if(!V)return void A.setColor(x,T,null);const J=g.channels.toColor(V>>24&255,V>>16&255,V>>8&255);return A.setColor(x,T,J),J}_getContrastCache(x){return x?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(x,L,B,T,M=!1){const U=typeof x=="number"?String.fromCharCode(x):x,K=Math.min(this._config.deviceCellWidth*Math.max(U.length,2)+4,this._textureSize);this._tmpCanvas.width<K&&(this._tmpCanvas.width=K);const I=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<I&&(this._tmpCanvas.height=I),this._tmpCtx.save(),this._workAttributeData.fg=B,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=T,this._workAttributeData.isInvisible())return o;const q=!!this._workAttributeData.isBold(),P=!!this._workAttributeData.isInverse(),A=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),R=!!this._workAttributeData.isUnderline(),z=!!this._workAttributeData.isStrikethrough(),V=!!this._workAttributeData.isOverline();let J=this._workAttributeData.getFgColor(),he=this._workAttributeData.getFgColorMode(),ue=this._workAttributeData.getBgColor(),W=this._workAttributeData.getBgColorMode();if(P){const ve=J;J=ue,ue=ve;const Ce=he;he=W,W=Ce}const N=this._getBackgroundColor(W,ue,P,A);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=N.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ne=q?this._config.fontWeightBold:this._config.fontWeight,re=H?"italic":"";this._tmpCtx.font=`${re} ${ne} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=_.TEXT_BASELINE;const _e=U.length===1&&(0,l.isPowerlineGlyph)(U.charCodeAt(0)),fe=U.length===1&&(0,l.isRestrictedPowerlineGlyph)(U.charCodeAt(0)),xe=this._getForegroundColor(L,W,ue,B,he,J,P,A,q,(0,l.treatGlyphAsBackgroundColor)(U.charCodeAt(0)));this._tmpCtx.fillStyle=xe.css;const pe=fe?0:4;let Ne=!1;this._config.customGlyphs!==!1&&(Ne=(0,v.tryDrawCustomChar)(this._tmpCtx,U,pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Qe,be=!_e;if(Qe=typeof x=="number"?this._unicodeService.wcwidth(x):this._unicodeService.getStringCellWidth(x),R){this._tmpCtx.save();const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=ve%2==1?.5:0;if(this._tmpCtx.lineWidth=ve,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let et=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&et<8&&(et+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(et).css}this._tmpCtx.beginPath();const Ze=pe,Fe=Math.ceil(pe+this._config.deviceCharHeight)-Ce-(M?2*ve:0),Ft=Fe+ve,ht=Fe+2*ve;let wt=this._workAttributeData.getUnderlineVariantOffset();for(let et=0;et<Qe;et++){this._tmpCtx.save();const qe=Ze+et*this._config.deviceCellWidth,Re=Ze+(et+1)*this._config.deviceCellWidth,Jt=qe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(qe,Fe),this._tmpCtx.lineTo(Re,Fe),this._tmpCtx.moveTo(qe,ht),this._tmpCtx.lineTo(Re,ht);break;case 3:const dt=ve<=1?ht:Math.ceil(pe+this._config.deviceCharHeight-ve/2)-Ce,Ot=ve<=1?Fe:Math.ceil(pe+this._config.deviceCharHeight+ve/2)-Ce,bt=new Path2D;bt.rect(qe,Fe,this._config.deviceCellWidth,ht-Fe),this._tmpCtx.clip(bt),this._tmpCtx.moveTo(qe-this._config.deviceCellWidth/2,Ft),this._tmpCtx.bezierCurveTo(qe-this._config.deviceCellWidth/2,Ot,qe,Ot,qe,Ft),this._tmpCtx.bezierCurveTo(qe,dt,Jt,dt,Jt,Ft),this._tmpCtx.bezierCurveTo(Jt,Ot,Re,Ot,Re,Ft),this._tmpCtx.bezierCurveTo(Re,dt,Re+this._config.deviceCellWidth/2,dt,Re+this._config.deviceCellWidth/2,Ft);break;case 4:const ys=wt===0?0:wt>=ve?2*ve-wt:ve-wt;wt>=ve||ys===0?(this._tmpCtx.setLineDash([Math.round(ve),Math.round(ve)]),this._tmpCtx.moveTo(qe+ys,Fe),this._tmpCtx.lineTo(Re,Fe)):(this._tmpCtx.setLineDash([Math.round(ve),Math.round(ve)]),this._tmpCtx.moveTo(qe,Fe),this._tmpCtx.lineTo(qe+ys,Fe),this._tmpCtx.moveTo(qe+ys+ve,Fe),this._tmpCtx.lineTo(Re,Fe)),wt=(0,l.computeNextVariantOffset)(Re-qe,ve,wt);break;case 5:const _a=.6,va=.3,Ri=Re-qe,ts=Math.floor(_a*Ri),is=Math.floor(va*Ri),ci=Ri-ts-is;this._tmpCtx.setLineDash([ts,is,ci]),this._tmpCtx.moveTo(qe,Fe),this._tmpCtx.lineTo(Re,Fe);break;default:this._tmpCtx.moveTo(qe,Fe),this._tmpCtx.lineTo(Re,Fe)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Ne&&this._config.fontSize>=12&&!this._config.allowTransparency&&U!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const et=this._tmpCtx.measureText(U);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in et&&et.actualBoundingBoxDescent>0){this._tmpCtx.save();const qe=new Path2D;qe.rect(Ze,Fe-Math.ceil(ve/2),this._config.deviceCellWidth*Qe,ht-Fe+Math.ceil(ve/2)),this._tmpCtx.clip(qe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=N.css,this._tmpCtx.strokeText(U,pe,pe+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(V){const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=ve%2==1?.5:0;this._tmpCtx.lineWidth=ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(pe,pe+Ce),this._tmpCtx.lineTo(pe+this._config.deviceCharWidth*Qe,pe+Ce),this._tmpCtx.stroke()}if(Ne||this._tmpCtx.fillText(U,pe,pe+this._config.deviceCharHeight),U==="_"&&!this._config.allowTransparency){let ve=S(this._tmpCtx.getImageData(pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight),N,xe,be);if(ve)for(let Ce=1;Ce<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=N.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(U,pe,pe+this._config.deviceCharHeight-Ce),ve=S(this._tmpCtx.getImageData(pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight),N,xe,be),ve);Ce++);}if(z){const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ce=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(pe,pe+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.lineTo(pe+this._config.deviceCharWidth*Qe,pe+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.stroke()}this._tmpCtx.restore();const Bt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let si;if(si=this._config.allowTransparency?(function(ve){for(let Ce=0;Ce<ve.data.length;Ce+=4)if(ve.data[Ce+3]>0)return!1;return!0})(Bt):S(Bt,N,xe,be),si)return o;const Be=this._findGlyphBoundingBox(Bt,this._workBoundingBox,K,fe,Ne,pe);let Ae,De;for(;;){if(this._activePages.length===0){const ve=this._createNewPage();Ae=ve,De=ve.currentRow,De.height=Be.size.y;break}Ae=this._activePages[this._activePages.length-1],De=Ae.currentRow;for(const ve of this._activePages)Be.size.y<=ve.currentRow.height&&(Ae=ve,De=ve.currentRow);for(let ve=this._activePages.length-1;ve>=0;ve--)for(const Ce of this._activePages[ve].fixedRows)Ce.height<=De.height&&Be.size.y<=Ce.height&&(Ae=this._activePages[ve],De=Ce);if(De.y+Be.size.y>=Ae.canvas.height||De.height>Be.size.y+2){let ve=!1;if(Ae.currentRow.y+Ae.currentRow.height+Be.size.y>=Ae.canvas.height){let Ce;for(const Ze of this._activePages)if(Ze.currentRow.y+Ze.currentRow.height+Be.size.y<Ze.canvas.height){Ce=Ze;break}if(Ce)Ae=Ce;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&De.y+Be.size.y<=Ae.canvas.height&&De.height>=Be.size.y&&De.x+Be.size.x<=Ae.canvas.width)ve=!0;else{const Ze=this._createNewPage();Ae=Ze,De=Ze.currentRow,De.height=Be.size.y,ve=!0}}ve||(Ae.currentRow.height>0&&Ae.fixedRows.push(Ae.currentRow),De={x:0,y:Ae.currentRow.y+Ae.currentRow.height,height:Be.size.y},Ae.fixedRows.push(De),Ae.currentRow={x:0,y:De.y+De.height,height:0})}if(De.x+Be.size.x<=Ae.canvas.width)break;De===Ae.currentRow?(De.x=0,De.y+=De.height,De.height=0):Ae.fixedRows.splice(Ae.fixedRows.indexOf(De),1)}return Be.texturePage=this._pages.indexOf(Ae),Be.texturePosition.x=De.x,Be.texturePosition.y=De.y,Be.texturePositionClipSpace.x=De.x/Ae.canvas.width,Be.texturePositionClipSpace.y=De.y/Ae.canvas.height,Be.sizeClipSpace.x/=Ae.canvas.width,Be.sizeClipSpace.y/=Ae.canvas.height,De.height=Math.max(De.height,Be.size.y),De.x+=Be.size.x,Ae.ctx.putImageData(Bt,Be.texturePosition.x-this._workBoundingBox.left,Be.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Be.size.x,Be.size.y),Ae.addGlyph(Be),Ae.version++,Be}_findGlyphBoundingBox(x,L,B,T,M,U){L.top=0;const K=T?this._config.deviceCellHeight:this._tmpCanvas.height,I=T?this._config.deviceCellWidth:B;let q=!1;for(let P=0;P<K;P++){for(let A=0;A<I;A++){const H=P*this._tmpCanvas.width*4+4*A+3;if(x.data[H]!==0){L.top=P,q=!0;break}}if(q)break}L.left=0,q=!1;for(let P=0;P<U+I;P++){for(let A=0;A<K;A++){const H=A*this._tmpCanvas.width*4+4*P+3;if(x.data[H]!==0){L.left=P,q=!0;break}}if(q)break}L.right=I,q=!1;for(let P=U+I-1;P>=U;P--){for(let A=0;A<K;A++){const H=A*this._tmpCanvas.width*4+4*P+3;if(x.data[H]!==0){L.right=P,q=!0;break}}if(q)break}L.bottom=K,q=!1;for(let P=K-1;P>=0;P--){for(let A=0;A<I;A++){const H=P*this._tmpCanvas.width*4+4*A+3;if(x.data[H]!==0){L.bottom=P,q=!0;break}}if(q)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+U+(T||M?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+U+(T||M?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=m;class C{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(x){this._glyphs.push(x),this._usedPixels+=x.size.x*x.size.y}constructor(x,L,B){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],B)for(const T of B)this._glyphs.push(...T.glyphs),this._usedPixels+=T._usedPixels;this.canvas=w(x,L,L),this.ctx=(0,l.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function S(p,x,L,B){const T=x.rgba>>>24,M=x.rgba>>>16&255,U=x.rgba>>>8&255,K=L.rgba>>>24,I=L.rgba>>>16&255,q=L.rgba>>>8&255,P=Math.floor((Math.abs(T-K)+Math.abs(M-I)+Math.abs(U-q))/12);let A=!0;for(let H=0;H<p.data.length;H+=4)p.data[H]===T&&p.data[H+1]===M&&p.data[H+2]===U||B&&Math.abs(p.data[H]-T)+Math.abs(p.data[H+1]-M)+Math.abs(p.data[H+2]-U)<P?p.data[H+3]=0:A=!1;return A}function w(p,x,L){const B=p.createElement("canvas");return B.width=x,B.height=L,B}},160:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let f=0,_=0,v=0,l=0;var g,b,y,u,r;function h(c){const m=c.toString(16);return m.length<2?"0"+m:m}function o(c,m){return c<m?(m+.05)/(c+.05):(c+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(m,C,S,w){return w!==void 0?`#${h(m)}${h(C)}${h(S)}${h(w)}`:`#${h(m)}${h(C)}${h(S)}`},c.toRgba=function(m,C,S,w=255){return(m<<24|C<<16|S<<8|w)>>>0},c.toColor=function(m,C,S,w){return{css:c.toCss(m,C,S,w),rgba:c.toRgba(m,C,S,w)}}})(g||(n.channels=g={})),(function(c){function m(C,S){return l=Math.round(255*S),[f,_,v]=r.toChannels(C.rgba),{css:g.toCss(f,_,v,l),rgba:g.toRgba(f,_,v,l)}}c.blend=function(C,S){if(l=(255&S.rgba)/255,l===1)return{css:S.css,rgba:S.rgba};const w=S.rgba>>24&255,p=S.rgba>>16&255,x=S.rgba>>8&255,L=C.rgba>>24&255,B=C.rgba>>16&255,T=C.rgba>>8&255;return f=L+Math.round((w-L)*l),_=B+Math.round((p-B)*l),v=T+Math.round((x-T)*l),{css:g.toCss(f,_,v),rgba:g.toRgba(f,_,v)}},c.isOpaque=function(C){return(255&C.rgba)==255},c.ensureContrastRatio=function(C,S,w){const p=r.ensureContrastRatio(C.rgba,S.rgba,w);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(C){const S=(255|C.rgba)>>>0;return[f,_,v]=r.toChannels(S),{css:g.toCss(f,_,v),rgba:S}},c.opacity=m,c.multiplyOpacity=function(C,S){return l=255&C.rgba,m(C,l*S/255)},c.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(b||(n.color=b={})),(function(c){let m,C;try{const S=document.createElement("canvas");S.width=1,S.height=1;const w=S.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",C=m.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return f=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),g.toColor(f,_,v);case 5:return f=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),l=parseInt(S.slice(4,5).repeat(2),16),g.toColor(f,_,v,l);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const w=S.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]),_=parseInt(w[2]),v=parseInt(w[3]),l=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(f,_,v,l);if(!m||!C)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=C,m.fillStyle=S,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[f,_,v,l]=m.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(f,_,v,l),css:S}}})(y||(n.css=y={})),(function(c){function m(C,S,w){const p=C/255,x=S/255,L=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(C){return m(C>>16&255,C>>8&255,255&C)},c.relativeLuminance2=m})(u||(n.rgb=u={})),(function(c){function m(S,w,p){const x=S>>24&255,L=S>>16&255,B=S>>8&255;let T=w>>24&255,M=w>>16&255,U=w>>8&255,K=o(u.relativeLuminance2(T,M,U),u.relativeLuminance2(x,L,B));for(;K<p&&(T>0||M>0||U>0);)T-=Math.max(0,Math.ceil(.1*T)),M-=Math.max(0,Math.ceil(.1*M)),U-=Math.max(0,Math.ceil(.1*U)),K=o(u.relativeLuminance2(T,M,U),u.relativeLuminance2(x,L,B));return(T<<24|M<<16|U<<8|255)>>>0}function C(S,w,p){const x=S>>24&255,L=S>>16&255,B=S>>8&255;let T=w>>24&255,M=w>>16&255,U=w>>8&255,K=o(u.relativeLuminance2(T,M,U),u.relativeLuminance2(x,L,B));for(;K<p&&(T<255||M<255||U<255);)T=Math.min(255,T+Math.ceil(.1*(255-T))),M=Math.min(255,M+Math.ceil(.1*(255-M))),U=Math.min(255,U+Math.ceil(.1*(255-U))),K=o(u.relativeLuminance2(T,M,U),u.relativeLuminance2(x,L,B));return(T<<24|M<<16|U<<8|255)>>>0}c.blend=function(S,w){if(l=(255&w)/255,l===1)return w;const p=w>>24&255,x=w>>16&255,L=w>>8&255,B=S>>24&255,T=S>>16&255,M=S>>8&255;return f=B+Math.round((p-B)*l),_=T+Math.round((x-T)*l),v=M+Math.round((L-M)*l),g.toRgba(f,_,v)},c.ensureContrastRatio=function(S,w,p){const x=u.relativeLuminance(S>>8),L=u.relativeLuminance(w>>8);if(o(x,L)<p){if(L<x){const M=m(S,w,p),U=o(x,u.relativeLuminance(M>>8));if(U<p){const K=C(S,w,p);return U>o(x,u.relativeLuminance(K>>8))?M:K}return M}const B=C(S,w,p),T=o(x,u.relativeLuminance(B>>8));if(T<p){const M=m(S,w,p);return T>o(x,u.relativeLuminance(M>>8))?B:M}return B}},c.reduceLuminance=m,c.increaseLuminance=C,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.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 _=0;_<this._listeners.length;_++)if(this._listeners[_]===f)return void this._listeners.splice(_,1)}}})),this._event}fire(f,_){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,f,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(f,_){return f((v=>_.fire(v)))},n.runAndSubscribe=function(f,_){return _(void 0),f((v=>_(v)))}},859:(F,n)=>{function f(_){for(const v of _)v.dispose();_.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},n.toDisposable=function(_){return{dispose:_}},n.disposeArray=f,n.getDisposeArrayDisposable=function(_){return{dispose:()=>f(_)}}},485:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class f{constructor(){this._data={}}set(v,l,g){this._data[v]||(this._data[v]={}),this._data[v][l]=g}get(v,l){return this._data[v]?this._data[v][l]:void 0}clear(){this._data={}}}n.TwoKeyMap=f,n.FourKeyMap=class{constructor(){this._data=new f}set(_,v,l,g,b){this._data.get(_,v)||this._data.set(_,v,new f),this._data.get(_,v).set(l,g,b)}get(_,v,l,g){var b;return(b=this._data.get(_,v))==null?void 0:b.get(l,g)}clear(){this._data.clear()}}},399:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const f=n.isNode?"node":navigator.userAgent,_=n.isNode?"node":navigator.platform;n.isFirefox=f.includes("Firefox"),n.isLegacyEdge=f.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(f),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=f.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),n.isIpad=_==="iPad",n.isIphone=_==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),n.isLinux=_.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(f)},385:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const _=f(399);class v{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let y=0,u=0,r=b.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),u=Math.max(y,u),h=b.timeRemaining(),1.5*u>h)return r-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-y))}ms`),void this._start();r=h}this.clear()}}class l extends v{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const y=Date.now()+b;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=l,n.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:l,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},147:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class f{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new f;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}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}}n.AttributeData=f;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,g=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=g}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=_},782:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const _=f(133),v=f(855),l=f(147);class g extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const u=new g;return u.setFromCharData(y),u}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let u=!1;if(y[v.CHAR_DATA_CHAR_INDEX].length>2)u=!0;else if(y[v.CHAR_DATA_CHAR_INDEX].length===2){const r=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|y[v.CHAR_DATA_WIDTH_INDEX]<<22:u=!0}else u=!0}else this.content=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[v.CHAR_DATA_WIDTH_INDEX]<<22;u&&(this.combinedData=y[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=g},855:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},133:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(f){return f>65535?(f-=65536,String.fromCharCode(55296+(f>>10))+String.fromCharCode(f%1024+56320)):String.fromCharCode(f)},n.utf32ToString=function(f,_=0,v=f.length){let l="";for(let g=_;g<v;++g){let b=f[g];b>65535?(b-=65536,l+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):l+=String.fromCharCode(b)}return l},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(f,_){const v=f.length;if(!v)return 0;let l=0,g=0;if(this._interim){const b=f.charCodeAt(g++);56320<=b&&b<=57343?_[l++]=1024*(this._interim-55296)+b-56320+65536:(_[l++]=this._interim,_[l++]=b),this._interim=0}for(let b=g;b<v;++b){const y=f.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=v)return this._interim=y,l;const u=f.charCodeAt(b);56320<=u&&u<=57343?_[l++]=1024*(y-55296)+u-56320+65536:(_[l++]=y,_[l++]=u)}else y!==65279&&(_[l++]=y)}return l}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(f,_){const v=f.length;if(!v)return 0;let l,g,b,y,u=0,r=0,h=0;if(this.interim[0]){let m=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let S,w=0;for(;(S=63&this.interim[++w])&&w<4;)C<<=6,C|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=p-w;for(;h<x;){if(h>=v)return 0;if(S=f[h++],(192&S)!=128){h--,m=!0;break}this.interim[w++]=S,C<<=6,C|=63&S}m||(p===2?C<128?h--:_[u++]=C:p===3?C<2048||C>=55296&&C<=57343||C===65279||(_[u++]=C):C<65536||C>1114111||(_[u++]=C)),this.interim.fill(0)}const o=v-4;let c=h;for(;c<v;){for(;!(!(c<o)||128&(l=f[c])||128&(g=f[c+1])||128&(b=f[c+2])||128&(y=f[c+3]));)_[u++]=l,_[u++]=g,_[u++]=b,_[u++]=y,c+=4;if(l=f[c++],l<128)_[u++]=l;else if((224&l)==192){if(c>=v)return this.interim[0]=l,u;if(g=f[c++],(192&g)!=128){c--;continue}if(r=(31&l)<<6|63&g,r<128){c--;continue}_[u++]=r}else if((240&l)==224){if(c>=v)return this.interim[0]=l,u;if(g=f[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,u;if(b=f[c++],(192&b)!=128){c--;continue}if(r=(15&l)<<12|(63&g)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;_[u++]=r}else if((248&l)==240){if(c>=v)return this.interim[0]=l,u;if(g=f[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,u;if(b=f[c++],(192&b)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,this.interim[2]=b,u;if(y=f[c++],(192&y)!=128){c--;continue}if(r=(7&l)<<18|(63&g)<<12|(63&b)<<6|63&y,r<65536||r>1114111)continue;_[u++]=r}}return u}}},776:function(F,n,f){var _=this&&this.__decorate||function(r,h,o,c){var m,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(S=(C<3?m(S):C>3?m(h,o,S):m(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const l=f(859),g=f(97),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let y,u=n.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=u=_([v(0,g.IOptionsService)],u),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const c=o.value;o.value=function(...m){if(y.logLevel!==g.LogLevelEnum.TRACE)return c.apply(this,m);y.trace(`GlyphRenderer#${c.name}(${m.map((S=>JSON.stringify(S))).join(", ")})`);const C=c.apply(this,m);return y.trace(`GlyphRenderer#${c.name} return`,C),C}}},726:(F,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const f="di$target",_="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[_]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const l=function(g,b,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(u,r,h){r[f]===r?r[_].push({id:u,index:h}):(r[_]=[{id:u,index:h}],r[f]=r)})(l,g,y)};return l.toString=()=>v,n.serviceRegistry.set(v,l),l}},97:(F,n,f)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const _=f(726);var v;n.IBufferService=(0,_.createDecorator)("BufferService"),n.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),n.ICoreService=(0,_.createDecorator)("CoreService"),n.ICharsetService=(0,_.createDecorator)("CharsetService"),n.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,_.createDecorator)("LogService"),n.IOptionsService=(0,_.createDecorator)("OptionsService"),n.IOscLinkService=(0,_.createDecorator)("OscLinkService"),n.IUnicodeService=(0,_.createDecorator)("UnicodeService"),n.IDecorationService=(0,_.createDecorator)("DecorationService")}},j={};function Z(F){var n=j[F];if(n!==void 0)return n.exports;var f=j[F]={exports:{}};return G[F].call(f.exports,f,f.exports,Z),f.exports}var se={};return(()=>{var F=se;Object.defineProperty(F,"__esModule",{value:!0}),F.WebglAddon=void 0;const n=Z(345),f=Z(859),_=Z(399),v=Z(666),l=Z(776);class g extends f.Disposable{constructor(y){if(_.isSafari&&(0,_.getSafariVersion)()<16){const u={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",u))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=y,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(y){const u=y._core;if(!y.element)return void this.register(u.onWillOpen((()=>this.activate(y))));this._terminal=y;const r=u.coreService,h=u.optionsService,o=u,c=o._renderService,m=o._characterJoinerService,C=o._charSizeService,S=o._coreBrowserService,w=o._decorationService,p=o._logService,x=o._themeService;(0,l.setTraceLogger)(p),this._renderer=this.register(new v.WebglRenderer(y,m,C,S,r,w,h,x,this._preserveDrawingBuffer)),this.register((0,n.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,n.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),c.setRenderer(this._renderer),this.register((0,f.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(y.cols,y.rows)})))}get textureAtlas(){var y;return(y=this._renderer)==null?void 0:y.textureAtlas}clearTextureAtlas(){var y;(y=this._renderer)==null||y.clearTextureAtlas()}}F.WebglAddon=g})(),se})()))})(Uo)),Uo.exports}var eg=Jv(),Io={exports:{}},sf;function tg(){return sf||(sf=1,(function(O,Y){(function(G,j){O.exports=j()})(self,(()=>(()=>{var G={6:(F,n)=>{function f(v){try{const l=new URL(v),g=l.password&&l.username?`${l.protocol}//${l.username}:${l.password}@${l.host}`:l.username?`${l.protocol}//${l.username}@${l.host}`:`${l.protocol}//${l.host}`;return v.toLocaleLowerCase().startsWith(g.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(n,"__esModule",{value:!0}),n.LinkComputer=n.WebLinkProvider=void 0,n.WebLinkProvider=class{constructor(v,l,g,b={}){this._terminal=v,this._regex=l,this._handler=g,this._options=b}provideLinks(v,l){const g=_.computeLink(v,this._regex,this._terminal,this._handler);l(this._addCallbacks(g))}_addCallbacks(v){return v.map((l=>(l.leave=this._options.leave,l.hover=(g,b)=>{if(this._options.hover){const{range:y}=l;this._options.hover(g,b,y)}},l)))}};class _{static computeLink(l,g,b,y){const u=new RegExp(g.source,(g.flags||"")+"g"),[r,h]=_._getWindowedLineStrings(l-1,b),o=r.join("");let c;const m=[];for(;c=u.exec(o);){const C=c[0];if(!f(C))continue;const[S,w]=_._mapStrIdx(b,h,0,c.index),[p,x]=_._mapStrIdx(b,S,w,C.length);if(S===-1||w===-1||p===-1||x===-1)continue;const L={start:{x:w+1,y:S+1},end:{x,y:p+1}};m.push({range:L,text:C,activate:y})}return m}static _getWindowedLineStrings(l,g){let b,y=l,u=l,r=0,h="";const o=[];if(b=g.buffer.active.getLine(l)){const c=b.translateToString(!0);if(b.isWrapped&&c[0]!==" "){for(r=0;(b=g.buffer.active.getLine(--y))&&r<2048&&(h=b.translateToString(!0),r+=h.length,o.push(h),b.isWrapped&&h.indexOf(" ")===-1););o.reverse()}for(o.push(c),r=0;(b=g.buffer.active.getLine(++u))&&b.isWrapped&&r<2048&&(h=b.translateToString(!0),r+=h.length,o.push(h),h.indexOf(" ")===-1););}return[o,y]}static _mapStrIdx(l,g,b,y){const u=l.buffer.active,r=u.getNullCell();let h=b;for(;y;){const o=u.getLine(g);if(!o)return[-1,-1];for(let c=h;c<o.length;++c){o.getCell(c,r);const m=r.getChars();if(r.getWidth()&&(y-=m.length||1,c===o.length-1&&m==="")){const C=u.getLine(g+1);C&&C.isWrapped&&(C.getCell(0,r),r.getWidth()===2&&(y+=1))}if(y<0)return[g,c]}g++,h=0}return[g,h]}}n.LinkComputer=_}},j={};function Z(F){var n=j[F];if(n!==void 0)return n.exports;var f=j[F]={exports:{}};return G[F](f,f.exports,Z),f.exports}var se={};return(()=>{var F=se;Object.defineProperty(F,"__esModule",{value:!0}),F.WebLinksAddon=void 0;const n=Z(6),f=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function _(v,l){const g=window.open();if(g){try{g.opener=null}catch{}g.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}F.WebLinksAddon=class{constructor(v=_,l={}){this._handler=v,this._options=l}activate(v){this._terminal=v;const l=this._options,g=l.urlRegex||f;this._linkProvider=this._terminal.registerLinkProvider(new n.WebLinkProvider(this._terminal,g,this._handler,l))}dispose(){var v;(v=this._linkProvider)==null||v.dispose()}}})(),se})()))})(Io)),Io.exports}var ig=tg();const sg={background:"#09090b",foreground:"#e4e4e7",cursor:"#f97316",cursorAccent:"#09090b",selectionBackground:"#3f3f46",selectionInactiveBackground:"#27272a",black:"#27272a",red:"#f87171",green:"#86efac",yellow:"#fde68a",blue:"#93c5fd",magenta:"#f0abfc",cyan:"#67e8f9",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#fca5a5",brightGreen:"#bbf7d0",brightYellow:"#fef3c7",brightBlue:"#bfdbfe",brightMagenta:"#f5d0fe",brightCyan:"#a5f3fc",brightWhite:"#fafafa"},rg='"JetBrains Mono", ui-monospace, "SF Mono", "Menlo", monospace';function uf({sessionId:O,onExit:Y}){const G=de.useRef(null);return de.useEffect(()=>{var l;if(!G.current)return;const j=new Kv.Terminal({fontFamily:rg,fontSize:13,fontWeight:400,fontWeightBold:600,lineHeight:1.35,letterSpacing:0,cursorBlink:!0,cursorStyle:"block",cursorWidth:1,scrollback:8e3,smoothScrollDuration:80,drawBoldTextInBrightColors:!1,minimumContrastRatio:1,allowProposedApi:!0,theme:sg}),Z=new Zv.FitAddon;j.loadAddon(Z),j.loadAddon(new ig.WebLinksAddon),j.open(G.current);let se=null;try{se=new eg.WebglAddon,se.onContextLoss(()=>{se==null||se.dispose(),se=null}),j.loadAddon(se)}catch{}requestAnimationFrame(()=>{try{Z.fit()}catch{}});const F=new WebSocket(Hv(`/api/sessions/${encodeURIComponent(O)}/pty`));F.binaryType="arraybuffer";let n=!1;F.onmessage=g=>{if(typeof g.data=="string"){try{const y=JSON.parse(g.data);if(y.type==="hello"){n=!0;const u=Z.proposeDimensions();u&&F.send(JSON.stringify({type:"resize",cols:u.cols,rows:u.rows}))}else y.type==="exit"&&(Y==null||Y({exitCode:y.exitCode}))}catch{}return}const b=g.data instanceof ArrayBuffer?new Uint8Array(g.data):g.data;j.write(b)},F.onclose=()=>{j.write(`\r
|
|
114
|
+
}`)),this.register((0,v.toDisposable)((()=>T.deleteProgram(this._program)))),this._projectionLocation=(0,_.throwIfFalsy)(T.getUniformLocation(this._program,"u_projection")),this._vertexArrayObject=T.createVertexArray(),T.bindVertexArray(this._vertexArrayObject);const M=new Float32Array([0,0,1,0,0,1,1,1]),U=T.createBuffer();this.register((0,v.toDisposable)((()=>T.deleteBuffer(U)))),T.bindBuffer(T.ARRAY_BUFFER,U),T.bufferData(T.ARRAY_BUFFER,M,T.STATIC_DRAW),T.enableVertexAttribArray(3),T.vertexAttribPointer(3,2,this._gl.FLOAT,!1,0,0);const K=new Uint8Array([0,1,2,3]),I=T.createBuffer();this.register((0,v.toDisposable)((()=>T.deleteBuffer(I)))),T.bindBuffer(T.ELEMENT_ARRAY_BUFFER,I),T.bufferData(T.ELEMENT_ARRAY_BUFFER,K,T.STATIC_DRAW),this._attributesBuffer=(0,_.throwIfFalsy)(T.createBuffer()),this.register((0,v.toDisposable)((()=>T.deleteBuffer(this._attributesBuffer)))),T.bindBuffer(T.ARRAY_BUFFER,this._attributesBuffer),T.enableVertexAttribArray(0),T.vertexAttribPointer(0,2,T.FLOAT,!1,b,0),T.vertexAttribDivisor(0,1),T.enableVertexAttribArray(1),T.vertexAttribPointer(1,2,T.FLOAT,!1,b,2*Float32Array.BYTES_PER_ELEMENT),T.vertexAttribDivisor(1,1),T.enableVertexAttribArray(2),T.vertexAttribPointer(2,4,T.FLOAT,!1,b,4*Float32Array.BYTES_PER_ELEMENT),T.vertexAttribDivisor(2,1),this._updateCachedColors(O.colors),this.register(this._themeService.onChangeColors((q=>{this._updateCachedColors(q),this._updateViewportRectangle()})))}renderBackgrounds(){this._renderVertices(this._vertices)}renderCursor(){this._renderVertices(this._verticesCursor)}_renderVertices(p){const x=this._gl;x.useProgram(this._program),x.bindVertexArray(this._vertexArrayObject),x.uniformMatrix4fv(this._projectionLocation,!1,g.PROJECTION_MATRIX),x.bindBuffer(x.ARRAY_BUFFER,this._attributesBuffer),x.bufferData(x.ARRAY_BUFFER,p.attributes,x.DYNAMIC_DRAW),x.drawElementsInstanced(this._gl.TRIANGLE_STRIP,4,x.UNSIGNED_BYTE,0,p.count)}handleResize(){this._updateViewportRectangle()}setDimensions(p){this._dimensions=p}_updateCachedColors(p){this._bgFloat=this._colorToFloat32Array(p.background),this._cursorFloat=this._colorToFloat32Array(p.cursor)}_updateViewportRectangle(){this._addRectangleFloat(this._vertices.attributes,0,0,0,this._terminal.cols*this._dimensions.device.cell.width,this._terminal.rows*this._dimensions.device.cell.height,this._bgFloat)}updateBackgrounds(p){const x=this._terminal,L=this._vertices;let O,T,M,U,K,I,q,F,R,H,D,z=1;for(O=0;O<x.rows;O++){for(M=-1,U=0,K=0,I=!1,T=0;T<x.cols;T++)q=(O*x.cols+T)*l.RENDER_MODEL_INDICIES_PER_CELL,F=p.cells[q+l.RENDER_MODEL_BG_OFFSET],R=p.cells[q+l.RENDER_MODEL_FG_OFFSET],H=!!(67108864&R),(F!==U||R!==K&&(I||H))&&((U!==0||I&&K!==0)&&(D=8*z++,this._updateRectangle(L,D,K,U,M,T,O)),M=T,U=F,K=R,I=H);(U!==0||I&&K!==0)&&(D=8*z++,this._updateRectangle(L,D,K,U,M,x.cols,O))}L.count=z}updateCursor(p){const x=this._verticesCursor,L=p.cursor;if(!L||L.style==="block")return void(x.count=0);let O,T=0;L.style!=="bar"&&L.style!=="outline"||(O=8*T++,this._addRectangleFloat(x.attributes,O,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.style==="bar"?L.dpr*L.cursorWidth:L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),L.style!=="underline"&&L.style!=="outline"||(O=8*T++,this._addRectangleFloat(x.attributes,O,L.x*this._dimensions.device.cell.width,(L.y+1)*this._dimensions.device.cell.height-L.dpr,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat)),L.style==="outline"&&(O=8*T++,this._addRectangleFloat(x.attributes,O,L.x*this._dimensions.device.cell.width,L.y*this._dimensions.device.cell.height,L.width*this._dimensions.device.cell.width,L.dpr,this._cursorFloat),O=8*T++,this._addRectangleFloat(x.attributes,O,(L.x+L.width)*this._dimensions.device.cell.width-L.dpr,L.y*this._dimensions.device.cell.height,L.dpr,this._dimensions.device.cell.height,this._cursorFloat)),x.count=T}_updateRectangle(p,x,L,O,T,M,U){if(67108864&L)switch(50331648&L){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&L].rgba;break;case 50331648:d=(16777215&L)<<8;break;default:d=this._themeService.colors.foreground.rgba}else switch(50331648&O){case 16777216:case 33554432:d=this._themeService.colors.ansi[255&O].rgba;break;case 50331648:d=(16777215&O)<<8;break;default:d=this._themeService.colors.background.rgba}p.attributes.length<x+4&&(p.attributes=(0,g.expandFloat32Array)(p.attributes,this._terminal.rows*this._terminal.cols*8)),r=T*this._dimensions.device.cell.width,h=U*this._dimensions.device.cell.height,o=(d>>24&255)/255,c=(d>>16&255)/255,m=(d>>8&255)/255,C=1,this._addRectangle(p.attributes,x,r,h,(M-T)*this._dimensions.device.cell.width,this._dimensions.device.cell.height,o,c,m,C)}_addRectangle(p,x,L,O,T,M,U,K,I,q){p[x]=L/this._dimensions.device.canvas.width,p[x+1]=O/this._dimensions.device.canvas.height,p[x+2]=T/this._dimensions.device.canvas.width,p[x+3]=M/this._dimensions.device.canvas.height,p[x+4]=U,p[x+5]=K,p[x+6]=I,p[x+7]=q}_addRectangleFloat(p,x,L,O,T,M,U){p[x]=L/this._dimensions.device.canvas.width,p[x+1]=O/this._dimensions.device.canvas.height,p[x+2]=T/this._dimensions.device.canvas.width,p[x+3]=M/this._dimensions.device.canvas.height,p[x+4]=U[0],p[x+5]=U[1],p[x+6]=U[2],p[x+7]=U[3]}_colorToFloat32Array(p){return new Float32Array([(p.rgba>>24&255)/255,(p.rgba>>16&255)/255,(p.rgba>>8&255)/255,(255&p.rgba)/255])}}n.RectangleRenderer=S},310:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.RenderModel=n.COMBINED_CHAR_BIT_MASK=n.RENDER_MODEL_EXT_OFFSET=n.RENDER_MODEL_FG_OFFSET=n.RENDER_MODEL_BG_OFFSET=n.RENDER_MODEL_INDICIES_PER_CELL=void 0;const _=u(296);n.RENDER_MODEL_INDICIES_PER_CELL=4,n.RENDER_MODEL_BG_OFFSET=1,n.RENDER_MODEL_FG_OFFSET=2,n.RENDER_MODEL_EXT_OFFSET=3,n.COMBINED_CHAR_BIT_MASK=2147483648,n.RenderModel=class{constructor(){this.cells=new Uint32Array(0),this.lineLengths=new Uint32Array(0),this.selection=(0,_.createSelectionRenderModel)()}resize(v,l){const g=v*l*n.RENDER_MODEL_INDICIES_PER_CELL;g!==this.cells.length&&(this.cells=new Uint32Array(g),this.lineLengths=new Uint32Array(l))}clear(){this.cells.fill(0,0),this.lineLengths.fill(0,0)}}},666:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.JoinedCellData=n.WebglRenderer=void 0;const _=u(820),v=u(274),l=u(627),g=u(457),b=u(56),y=u(374),d=u(345),r=u(859),h=u(147),o=u(782),c=u(855),m=u(965),C=u(742),S=u(310),w=u(733);class p extends r.Disposable{constructor(T,M,U,K,I,q,F,R,H){super(),this._terminal=T,this._characterJoinerService=M,this._charSizeService=U,this._coreBrowserService=K,this._coreService=I,this._decorationService=q,this._optionsService=F,this._themeService=R,this._cursorBlinkStateManager=new r.MutableDisposable,this._charAtlasDisposable=this.register(new r.MutableDisposable),this._observerDisposable=this.register(new r.MutableDisposable),this._model=new S.RenderModel,this._workCell=new o.CellData,this._workCell2=new o.CellData,this._rectangleRenderer=this.register(new r.MutableDisposable),this._glyphRenderer=this.register(new r.MutableDisposable),this._onChangeTextureAtlas=this.register(new d.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new d.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new d.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onRequestRedraw=this.register(new d.EventEmitter),this.onRequestRedraw=this._onRequestRedraw.event,this._onContextLoss=this.register(new d.EventEmitter),this.onContextLoss=this._onContextLoss.event,this.register(this._themeService.onChangeColors((()=>this._handleColorChange()))),this._cellColorResolver=new v.CellColorResolver(this._terminal,this._optionsService,this._model.selection,this._decorationService,this._coreBrowserService,this._themeService),this._core=this._terminal._core,this._renderLayers=[new w.LinkRenderLayer(this._core.screenElement,2,this._terminal,this._core.linkifier,this._coreBrowserService,F,this._themeService)],this.dimensions=(0,y.createRenderDimensions)(),this._devicePixelRatio=this._coreBrowserService.dpr,this._updateDimensions(),this._updateCursorBlink(),this.register(F.onOptionChange((()=>this._handleOptionsChanged()))),this._canvas=this._coreBrowserService.mainDocument.createElement("canvas");const D={antialias:!1,depth:!1,preserveDrawingBuffer:H};if(this._gl=this._canvas.getContext("webgl2",D),!this._gl)throw new Error("WebGL2 not supported "+this._gl);this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextlost",(z=>{console.log("webglcontextlost event received"),z.preventDefault(),this._contextRestorationTimeout=setTimeout((()=>{this._contextRestorationTimeout=void 0,console.warn("webgl context not restored; firing onContextLoss"),this._onContextLoss.fire(z)}),3e3)}))),this.register((0,_.addDisposableDomListener)(this._canvas,"webglcontextrestored",(z=>{console.warn("webglcontextrestored event received"),clearTimeout(this._contextRestorationTimeout),this._contextRestorationTimeout=void 0,(0,l.removeTerminalFromCache)(this._terminal),this._initializeWebGLState(),this._requestRedrawViewport()}))),this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,this._coreBrowserService.window,((z,V)=>this._setCanvasDevicePixelDimensions(z,V))),this.register(this._coreBrowserService.onWindowChange((z=>{this._observerDisposable.value=(0,b.observeDevicePixelDimensions)(this._canvas,z,((V,J)=>this._setCanvasDevicePixelDimensions(V,J)))}))),this._core.screenElement.appendChild(this._canvas),[this._rectangleRenderer.value,this._glyphRenderer.value]=this._initializeWebGLState(),this._isAttached=this._coreBrowserService.window.document.body.contains(this._core.screenElement),this.register((0,r.toDisposable)((()=>{var z;for(const V of this._renderLayers)V.dispose();(z=this._canvas.parentElement)==null||z.removeChild(this._canvas),(0,l.removeTerminalFromCache)(this._terminal)})))}get textureAtlas(){var T;return(T=this._charAtlas)==null?void 0:T.pages[0].canvas}_handleColorChange(){this._refreshCharAtlas(),this._clearModel(!0)}handleDevicePixelRatioChange(){this._devicePixelRatio!==this._coreBrowserService.dpr&&(this._devicePixelRatio=this._coreBrowserService.dpr,this.handleResize(this._terminal.cols,this._terminal.rows))}handleResize(T,M){var U,K,I,q;this._updateDimensions(),this._model.resize(this._terminal.cols,this._terminal.rows);for(const F of this._renderLayers)F.resize(this._terminal,this.dimensions);this._canvas.width=this.dimensions.device.canvas.width,this._canvas.height=this.dimensions.device.canvas.height,this._canvas.style.width=`${this.dimensions.css.canvas.width}px`,this._canvas.style.height=`${this.dimensions.css.canvas.height}px`,this._core.screenElement.style.width=`${this.dimensions.css.canvas.width}px`,this._core.screenElement.style.height=`${this.dimensions.css.canvas.height}px`,(U=this._rectangleRenderer.value)==null||U.setDimensions(this.dimensions),(K=this._rectangleRenderer.value)==null||K.handleResize(),(I=this._glyphRenderer.value)==null||I.setDimensions(this.dimensions),(q=this._glyphRenderer.value)==null||q.handleResize(),this._refreshCharAtlas(),this._clearModel(!1)}handleCharSizeChanged(){this.handleResize(this._terminal.cols,this._terminal.rows)}handleBlur(){var T;for(const M of this._renderLayers)M.handleBlur(this._terminal);(T=this._cursorBlinkStateManager.value)==null||T.pause(),this._requestRedrawViewport()}handleFocus(){var T;for(const M of this._renderLayers)M.handleFocus(this._terminal);(T=this._cursorBlinkStateManager.value)==null||T.resume(),this._requestRedrawViewport()}handleSelectionChanged(T,M,U){for(const K of this._renderLayers)K.handleSelectionChanged(this._terminal,T,M,U);this._model.selection.update(this._core,T,M,U),this._requestRedrawViewport()}handleCursorMove(){var T;for(const M of this._renderLayers)M.handleCursorMove(this._terminal);(T=this._cursorBlinkStateManager.value)==null||T.restartBlinkAnimation()}_handleOptionsChanged(){this._updateDimensions(),this._refreshCharAtlas(),this._updateCursorBlink()}_initializeWebGLState(){return this._rectangleRenderer.value=new C.RectangleRenderer(this._terminal,this._gl,this.dimensions,this._themeService),this._glyphRenderer.value=new m.GlyphRenderer(this._terminal,this._gl,this.dimensions,this._optionsService),this.handleCharSizeChanged(),[this._rectangleRenderer.value,this._glyphRenderer.value]}_refreshCharAtlas(){var M;if(this.dimensions.device.char.width<=0&&this.dimensions.device.char.height<=0)return void(this._isAttached=!1);const T=(0,l.acquireTextureAtlas)(this._terminal,this._optionsService.rawOptions,this._themeService.colors,this.dimensions.device.cell.width,this.dimensions.device.cell.height,this.dimensions.device.char.width,this.dimensions.device.char.height,this._coreBrowserService.dpr);this._charAtlas!==T&&(this._onChangeTextureAtlas.fire(T.pages[0].canvas),this._charAtlasDisposable.value=(0,r.getDisposeArrayDisposable)([(0,d.forwardEvent)(T.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas),(0,d.forwardEvent)(T.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)])),this._charAtlas=T,this._charAtlas.warmUp(),(M=this._glyphRenderer.value)==null||M.setAtlas(this._charAtlas)}_clearModel(T){var M;this._model.clear(),T&&((M=this._glyphRenderer.value)==null||M.clear())}clearTextureAtlas(){var T;(T=this._charAtlas)==null||T.clearTexture(),this._clearModel(!0),this._requestRedrawViewport()}clear(){var T;this._clearModel(!0);for(const M of this._renderLayers)M.reset(this._terminal);(T=this._cursorBlinkStateManager.value)==null||T.restartBlinkAnimation(),this._updateCursorBlink()}registerCharacterJoiner(T){return-1}deregisterCharacterJoiner(T){return!1}renderRows(T,M){if(!this._isAttached){if(!(this._coreBrowserService.window.document.body.contains(this._core.screenElement)&&this._charSizeService.width&&this._charSizeService.height))return;this._updateDimensions(),this._refreshCharAtlas(),this._isAttached=!0}for(const U of this._renderLayers)U.handleGridChanged(this._terminal,T,M);this._glyphRenderer.value&&this._rectangleRenderer.value&&(this._glyphRenderer.value.beginFrame()?(this._clearModel(!0),this._updateModel(0,this._terminal.rows-1)):this._updateModel(T,M),this._rectangleRenderer.value.renderBackgrounds(),this._glyphRenderer.value.render(this._model),this._cursorBlinkStateManager.value&&!this._cursorBlinkStateManager.value.isCursorVisible||this._rectangleRenderer.value.renderCursor())}_updateCursorBlink(){this._terminal.options.cursorBlink?this._cursorBlinkStateManager.value=new g.CursorBlinkStateManager((()=>{this._requestRedrawCursor()}),this._coreBrowserService):this._cursorBlinkStateManager.clear(),this._requestRedrawCursor()}_updateModel(T,M){const U=this._core;let K,I,q,F,R,H,D,z,V,J,he,ue,$,N,ne=this._workCell;T=L(T,U.rows-1,0),M=L(M,U.rows-1,0);const re=this._terminal.buffer.active.baseY+this._terminal.buffer.active.cursorY,_e=re-U.buffer.ydisp,fe=Math.min(this._terminal.buffer.active.cursorX,U.cols-1);let xe=-1;const pe=this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden&&(!this._cursorBlinkStateManager.value||this._cursorBlinkStateManager.value.isCursorVisible);this._model.cursor=void 0;let Ne=!1;for(I=T;I<=M;I++)for(q=I+U.buffer.ydisp,F=U.buffer.lines.get(q),this._model.lineLengths[I]=0,R=this._characterJoinerService.getJoinedCharacters(q),$=0;$<U.cols;$++)if(K=this._cellColorResolver.result.bg,F.loadCell($,ne),$===0&&(K=this._cellColorResolver.result.bg),H=!1,D=$,R.length>0&&$===R[0][0]&&(H=!0,z=R.shift(),ne=new x(ne,F.translateToString(!0,z[0],z[1]),z[1]-z[0]),D=z[1]-1),V=ne.getChars(),J=ne.getCode(),ue=(I*U.cols+$)*S.RENDER_MODEL_INDICIES_PER_CELL,this._cellColorResolver.resolve(ne,$,q,this.dimensions.device.cell.width),pe&&q===re&&($===fe&&(this._model.cursor={x:fe,y:_e,width:ne.getWidth(),style:this._coreBrowserService.isFocused?U.options.cursorStyle||"block":U.options.cursorInactiveStyle,cursorWidth:U.options.cursorWidth,dpr:this._devicePixelRatio},xe=fe+ne.getWidth()-1),$>=fe&&$<=xe&&(this._coreBrowserService.isFocused&&(U.options.cursorStyle||"block")==="block"||this._coreBrowserService.isFocused===!1&&U.options.cursorInactiveStyle==="block")&&(this._cellColorResolver.result.fg=50331648|this._themeService.colors.cursorAccent.rgba>>8&16777215,this._cellColorResolver.result.bg=50331648|this._themeService.colors.cursor.rgba>>8&16777215)),J!==c.NULL_CELL_CODE&&(this._model.lineLengths[I]=$+1),(this._model.cells[ue]!==J||this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]!==this._cellColorResolver.result.bg||this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]!==this._cellColorResolver.result.fg||this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]!==this._cellColorResolver.result.ext)&&(Ne=!0,V.length>1&&(J|=S.COMBINED_CHAR_BIT_MASK),this._model.cells[ue]=J,this._model.cells[ue+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[ue+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[ue+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext,he=ne.getWidth(),this._glyphRenderer.value.updateCell($,I,J,this._cellColorResolver.result.bg,this._cellColorResolver.result.fg,this._cellColorResolver.result.ext,V,he,K),H))for(ne=this._workCell,$++;$<D;$++)N=(I*U.cols+$)*S.RENDER_MODEL_INDICIES_PER_CELL,this._glyphRenderer.value.updateCell($,I,c.NULL_CELL_CODE,0,0,0,c.NULL_CELL_CHAR,0,0),this._model.cells[N]=c.NULL_CELL_CODE,this._model.cells[N+S.RENDER_MODEL_BG_OFFSET]=this._cellColorResolver.result.bg,this._model.cells[N+S.RENDER_MODEL_FG_OFFSET]=this._cellColorResolver.result.fg,this._model.cells[N+S.RENDER_MODEL_EXT_OFFSET]=this._cellColorResolver.result.ext;Ne&&this._rectangleRenderer.value.updateBackgrounds(this._model),this._rectangleRenderer.value.updateCursor(this._model)}_updateDimensions(){this._charSizeService.width&&this._charSizeService.height&&(this.dimensions.device.char.width=Math.floor(this._charSizeService.width*this._devicePixelRatio),this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*this._devicePixelRatio),this.dimensions.device.cell.height=Math.floor(this.dimensions.device.char.height*this._optionsService.rawOptions.lineHeight),this.dimensions.device.char.top=this._optionsService.rawOptions.lineHeight===1?0:Math.round((this.dimensions.device.cell.height-this.dimensions.device.char.height)/2),this.dimensions.device.cell.width=this.dimensions.device.char.width+Math.round(this._optionsService.rawOptions.letterSpacing),this.dimensions.device.char.left=Math.floor(this._optionsService.rawOptions.letterSpacing/2),this.dimensions.device.canvas.height=this._terminal.rows*this.dimensions.device.cell.height,this.dimensions.device.canvas.width=this._terminal.cols*this.dimensions.device.cell.width,this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/this._devicePixelRatio),this.dimensions.css.canvas.width=Math.round(this.dimensions.device.canvas.width/this._devicePixelRatio),this.dimensions.css.cell.height=this.dimensions.device.cell.height/this._devicePixelRatio,this.dimensions.css.cell.width=this.dimensions.device.cell.width/this._devicePixelRatio)}_setCanvasDevicePixelDimensions(T,M){this._canvas.width===T&&this._canvas.height===M||(this._canvas.width=T,this._canvas.height=M,this._requestRedrawViewport())}_requestRedrawViewport(){this._onRequestRedraw.fire({start:0,end:this._terminal.rows-1})}_requestRedrawCursor(){const T=this._terminal.buffer.active.cursorY;this._onRequestRedraw.fire({start:T,end:T})}}n.WebglRenderer=p;class x extends h.AttributeData{constructor(T,M,U){super(),this.content=0,this.combinedData="",this.fg=T.fg,this.bg=T.bg,this.combinedData=M,this._width=U}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(T){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}function L(O,T,M=0){return Math.max(Math.min(O,T),M)}n.JoinedCellData=x},381:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.GLTexture=n.expandFloat32Array=n.createShader=n.createProgram=n.PROJECTION_MATRIX=void 0;const _=u(374);function v(l,g,b){const y=(0,_.throwIfFalsy)(l.createShader(g));if(l.shaderSource(y,b),l.compileShader(y),l.getShaderParameter(y,l.COMPILE_STATUS))return y;console.error(l.getShaderInfoLog(y)),l.deleteShader(y)}n.PROJECTION_MATRIX=new Float32Array([2,0,0,0,0,-2,0,0,0,0,1,0,-1,1,0,1]),n.createProgram=function(l,g,b){const y=(0,_.throwIfFalsy)(l.createProgram());if(l.attachShader(y,(0,_.throwIfFalsy)(v(l,l.VERTEX_SHADER,g))),l.attachShader(y,(0,_.throwIfFalsy)(v(l,l.FRAGMENT_SHADER,b))),l.linkProgram(y),l.getProgramParameter(y,l.LINK_STATUS))return y;console.error(l.getProgramInfoLog(y)),l.deleteProgram(y)},n.createShader=v,n.expandFloat32Array=function(l,g){const b=Math.min(2*l.length,g),y=new Float32Array(b);for(let d=0;d<l.length;d++)y[d]=l[d];return y},n.GLTexture=class{constructor(l){this.texture=l,this.version=-1}}},592:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.BaseRenderLayer=void 0;const _=u(627),v=u(237),l=u(374),g=u(859);class b extends g.Disposable{constructor(d,r,h,o,c,m,C,S){super(),this._container=r,this._alpha=c,this._coreBrowserService=m,this._optionsService=C,this._themeService=S,this._deviceCharWidth=0,this._deviceCharHeight=0,this._deviceCellWidth=0,this._deviceCellHeight=0,this._deviceCharLeft=0,this._deviceCharTop=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add(`xterm-${h}-layer`),this._canvas.style.zIndex=o.toString(),this._initCanvas(),this._container.appendChild(this._canvas),this.register(this._themeService.onChangeColors((w=>{this._refreshCharAtlas(d,w),this.reset(d)}))),this.register((0,g.toDisposable)((()=>{this._canvas.remove()})))}_initCanvas(){this._ctx=(0,l.throwIfFalsy)(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()}handleBlur(d){}handleFocus(d){}handleCursorMove(d){}handleGridChanged(d,r,h){}handleSelectionChanged(d,r,h,o=!1){}_setTransparency(d,r){if(r===this._alpha)return;const h=this._canvas;this._alpha=r,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,h),this._refreshCharAtlas(d,this._themeService.colors),this.handleGridChanged(d,0,d.rows-1)}_refreshCharAtlas(d,r){this._deviceCharWidth<=0&&this._deviceCharHeight<=0||(this._charAtlas=(0,_.acquireTextureAtlas)(d,this._optionsService.rawOptions,r,this._deviceCellWidth,this._deviceCellHeight,this._deviceCharWidth,this._deviceCharHeight,this._coreBrowserService.dpr),this._charAtlas.warmUp())}resize(d,r){this._deviceCellWidth=r.device.cell.width,this._deviceCellHeight=r.device.cell.height,this._deviceCharWidth=r.device.char.width,this._deviceCharHeight=r.device.char.height,this._deviceCharLeft=r.device.char.left,this._deviceCharTop=r.device.char.top,this._canvas.width=r.device.canvas.width,this._canvas.height=r.device.canvas.height,this._canvas.style.width=`${r.css.canvas.width}px`,this._canvas.style.height=`${r.css.canvas.height}px`,this._alpha||this._clearAll(),this._refreshCharAtlas(d,this._themeService.colors)}_fillBottomLineAtCells(d,r,h=1){this._ctx.fillRect(d*this._deviceCellWidth,(r+1)*this._deviceCellHeight-this._coreBrowserService.dpr-1,h*this._deviceCellWidth,this._coreBrowserService.dpr)}_clearAll(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))}_clearCells(d,r,h,o){this._alpha?this._ctx.clearRect(d*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight):(this._ctx.fillStyle=this._themeService.colors.background.css,this._ctx.fillRect(d*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,o*this._deviceCellHeight))}_fillCharTrueColor(d,r,h,o){this._ctx.font=this._getFont(d,!1,!1),this._ctx.textBaseline=v.TEXT_BASELINE,this._clipCell(h,o,r.getWidth()),this._ctx.fillText(r.getChars(),h*this._deviceCellWidth+this._deviceCharLeft,o*this._deviceCellHeight+this._deviceCharTop+this._deviceCharHeight)}_clipCell(d,r,h){this._ctx.beginPath(),this._ctx.rect(d*this._deviceCellWidth,r*this._deviceCellHeight,h*this._deviceCellWidth,this._deviceCellHeight),this._ctx.clip()}_getFont(d,r,h){return`${h?"italic":""} ${r?d.options.fontWeightBold:d.options.fontWeight} ${d.options.fontSize*this._coreBrowserService.dpr}px ${d.options.fontFamily}`}}n.BaseRenderLayer=b},733:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.LinkRenderLayer=void 0;const _=u(197),v=u(237),l=u(592);class g extends l.BaseRenderLayer{constructor(y,d,r,h,o,c,m){super(r,y,"link",d,!0,o,c,m),this.register(h.onShowLinkUnderline((C=>this._handleShowLinkUnderline(C)))),this.register(h.onHideLinkUnderline((C=>this._handleHideLinkUnderline(C))))}resize(y,d){super.resize(y,d),this._state=void 0}reset(y){this._clearCurrentLink()}_clearCurrentLink(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);const y=this._state.y2-this._state.y1-1;y>0&&this._clearCells(0,this._state.y1+1,this._state.cols,y),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}}_handleShowLinkUnderline(y){if(y.fg===v.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._themeService.colors.background.css:y.fg!==void 0&&(0,_.is256Color)(y.fg)?this._ctx.fillStyle=this._themeService.colors.ansi[y.fg].css:this._ctx.fillStyle=this._themeService.colors.foreground.css,y.y1===y.y2)this._fillBottomLineAtCells(y.x1,y.y1,y.x2-y.x1);else{this._fillBottomLineAtCells(y.x1,y.y1,y.cols-y.x1);for(let d=y.y1+1;d<y.y2;d++)this._fillBottomLineAtCells(0,d,y.cols);this._fillBottomLineAtCells(0,y.y2,y.x2)}this._state=y}_handleHideLinkUnderline(y){this._clearCurrentLink()}}n.LinkRenderLayer=g},820:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.addDisposableDomListener=void 0,n.addDisposableDomListener=function(u,_,v,l){u.addEventListener(_,v,l);let g=!1;return{dispose:()=>{g||(g=!0,u.removeEventListener(_,v,l))}}}},274:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellColorResolver=void 0;const _=u(855),v=u(160),l=u(374);let g,b=0,y=0,d=!1,r=!1,h=!1,o=0;n.CellColorResolver=class{constructor(c,m,C,S,w,p){this._terminal=c,this._optionService=m,this._selectionRenderModel=C,this._decorationService=S,this._coreBrowserService=w,this._themeService=p,this.result={fg:0,bg:0,ext:0}}resolve(c,m,C,S){if(this.result.bg=c.bg,this.result.fg=c.fg,this.result.ext=268435456&c.bg?c.extended.ext:0,y=0,b=0,r=!1,d=!1,h=!1,g=this._themeService.colors,o=0,c.getCode()!==_.NULL_CELL_CODE&&c.extended.underlineStyle===4){const w=Math.max(1,Math.floor(this._optionService.rawOptions.fontSize*this._coreBrowserService.dpr/15));o=m*S%(2*Math.round(w))}if(this._decorationService.forEachDecorationAtCell(m,C,"bottom",(w=>{w.backgroundColorRGB&&(y=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(b=w.foregroundColorRGB.rgba>>8&16777215,d=!0)})),h=this._selectionRenderModel.isCellSelected(this._terminal,m,C),h){if(67108864&this.result.fg||(50331648&this.result.bg)!=0){if(67108864&this.result.fg)switch(50331648&this.result.fg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:y=(16777215&this.result.fg)<<8|255;break;default:y=this._themeService.colors.foreground.rgba}else switch(50331648&this.result.bg){case 16777216:case 33554432:y=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:y=(16777215&this.result.bg)<<8|255}y=v.rgba.blend(y,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}else y=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;if(r=!0,g.selectionForeground&&(b=g.selectionForeground.rgba>>8&16777215,d=!0),(0,l.treatGlyphAsBackgroundColor)(c.getCode())){if(67108864&this.result.fg&&(50331648&this.result.bg)==0)b=(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba>>8&16777215;else{if(67108864&this.result.fg)switch(50331648&this.result.bg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.bg].rgba;break;case 50331648:b=(16777215&this.result.bg)<<8|255}else switch(50331648&this.result.fg){case 16777216:case 33554432:b=this._themeService.colors.ansi[255&this.result.fg].rgba;break;case 50331648:b=(16777215&this.result.fg)<<8|255;break;default:b=this._themeService.colors.foreground.rgba}b=v.rgba.blend(b,4294967040&(this._coreBrowserService.isFocused?g.selectionBackgroundOpaque:g.selectionInactiveBackgroundOpaque).rgba|128)>>8&16777215}d=!0}}this._decorationService.forEachDecorationAtCell(m,C,"top",(w=>{w.backgroundColorRGB&&(y=w.backgroundColorRGB.rgba>>8&16777215,r=!0),w.foregroundColorRGB&&(b=w.foregroundColorRGB.rgba>>8&16777215,d=!0)})),r&&(y=h?-16777216&c.bg&-134217729|y|50331648:-16777216&c.bg|y|50331648),d&&(b=-16777216&c.fg&-67108865|b|50331648),67108864&this.result.fg&&(r&&!d&&(b=(50331648&this.result.bg)==0?-134217728&this.result.fg|16777215&g.background.rgba>>8|50331648:-134217728&this.result.fg|67108863&this.result.bg,d=!0),!r&&d&&(y=(50331648&this.result.fg)==0?-67108864&this.result.bg|16777215&g.foreground.rgba>>8|50331648:-67108864&this.result.bg|67108863&this.result.fg,r=!0)),g=void 0,this.result.bg=r?y:this.result.bg,this.result.fg=d?b:this.result.fg,this.result.ext&=536870911,this.result.ext|=o<<29&3758096384}}},627:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.removeTerminalFromCache=n.acquireTextureAtlas=void 0;const _=u(509),v=u(197),l=[];n.acquireTextureAtlas=function(g,b,y,d,r,h,o,c){const m=(0,v.generateConfig)(d,r,h,o,b,y,c);for(let w=0;w<l.length;w++){const p=l[w],x=p.ownedBy.indexOf(g);if(x>=0){if((0,v.configEquals)(p.config,m))return p.atlas;p.ownedBy.length===1?(p.atlas.dispose(),l.splice(w,1)):p.ownedBy.splice(x,1);break}}for(let w=0;w<l.length;w++){const p=l[w];if((0,v.configEquals)(p.config,m))return p.ownedBy.push(g),p.atlas}const C=g._core,S={atlas:new _.TextureAtlas(document,m,C.unicodeService),config:m,ownedBy:[g]};return l.push(S),S.atlas},n.removeTerminalFromCache=function(g){for(let b=0;b<l.length;b++){const y=l[b].ownedBy.indexOf(g);if(y!==-1){l[b].ownedBy.length===1?(l[b].atlas.dispose(),l.splice(b,1)):l[b].ownedBy.splice(y,1);break}}}},197:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.is256Color=n.configEquals=n.generateConfig=void 0;const _=u(160);n.generateConfig=function(v,l,g,b,y,d,r){const h={foreground:d.foreground,background:d.background,cursor:_.NULL_COLOR,cursorAccent:_.NULL_COLOR,selectionForeground:_.NULL_COLOR,selectionBackgroundTransparent:_.NULL_COLOR,selectionBackgroundOpaque:_.NULL_COLOR,selectionInactiveBackgroundTransparent:_.NULL_COLOR,selectionInactiveBackgroundOpaque:_.NULL_COLOR,ansi:d.ansi.slice(),contrastCache:d.contrastCache,halfContrastCache:d.halfContrastCache};return{customGlyphs:y.customGlyphs,devicePixelRatio:r,letterSpacing:y.letterSpacing,lineHeight:y.lineHeight,deviceCellWidth:v,deviceCellHeight:l,deviceCharWidth:g,deviceCharHeight:b,fontFamily:y.fontFamily,fontSize:y.fontSize,fontWeight:y.fontWeight,fontWeightBold:y.fontWeightBold,allowTransparency:y.allowTransparency,drawBoldTextInBrightColors:y.drawBoldTextInBrightColors,minimumContrastRatio:y.minimumContrastRatio,colors:h}},n.configEquals=function(v,l){for(let g=0;g<v.colors.ansi.length;g++)if(v.colors.ansi[g].rgba!==l.colors.ansi[g].rgba)return!1;return v.devicePixelRatio===l.devicePixelRatio&&v.customGlyphs===l.customGlyphs&&v.lineHeight===l.lineHeight&&v.letterSpacing===l.letterSpacing&&v.fontFamily===l.fontFamily&&v.fontSize===l.fontSize&&v.fontWeight===l.fontWeight&&v.fontWeightBold===l.fontWeightBold&&v.allowTransparency===l.allowTransparency&&v.deviceCharWidth===l.deviceCharWidth&&v.deviceCharHeight===l.deviceCharHeight&&v.drawBoldTextInBrightColors===l.drawBoldTextInBrightColors&&v.minimumContrastRatio===l.minimumContrastRatio&&v.colors.foreground.rgba===l.colors.foreground.rgba&&v.colors.background.rgba===l.colors.background.rgba},n.is256Color=function(v){return(50331648&v)==16777216||(50331648&v)==33554432}},237:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TEXT_BASELINE=n.DIM_OPACITY=n.INVERTED_DEFAULT_COLOR=void 0;const _=u(399);n.INVERTED_DEFAULT_COLOR=257,n.DIM_OPACITY=.5,n.TEXT_BASELINE=_.isFirefox||_.isLegacyEdge?"bottom":"ideographic"},457:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CursorBlinkStateManager=void 0,n.CursorBlinkStateManager=class{constructor(u,_){this._renderCallback=u,this._coreBrowserService=_,this.isCursorVisible=!0,this._coreBrowserService.isFocused&&this._restartInterval()}get isPaused(){return!(this._blinkStartTimeout||this._blinkInterval)}dispose(){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}restartBlinkAnimation(){this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))))}_restartInterval(u=600){this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout=this._coreBrowserService.window.setTimeout((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);if(this._animationTimeRestarted=void 0,_>0)return void this._restartInterval(_)}this.isCursorVisible=!1,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0})),this._blinkInterval=this._coreBrowserService.window.setInterval((()=>{if(this._animationTimeRestarted){const _=600-(Date.now()-this._animationTimeRestarted);return this._animationTimeRestarted=void 0,void this._restartInterval(_)}this.isCursorVisible=!this.isCursorVisible,this._animationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>{this._renderCallback(),this._animationFrame=void 0}))}),600)}),u)}pause(){this.isCursorVisible=!0,this._blinkInterval&&(this._coreBrowserService.window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(this._coreBrowserService.window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}resume(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()}}},860:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.tryDrawCustomChar=n.powerlineDefinitions=n.boxDrawingDefinitions=n.blockElementDefinitions=void 0;const _=u(374);n.blockElementDefinitions={"▀":[{x:0,y:0,w:8,h:4}],"▁":[{x:0,y:7,w:8,h:1}],"▂":[{x:0,y:6,w:8,h:2}],"▃":[{x:0,y:5,w:8,h:3}],"▄":[{x:0,y:4,w:8,h:4}],"▅":[{x:0,y:3,w:8,h:5}],"▆":[{x:0,y:2,w:8,h:6}],"▇":[{x:0,y:1,w:8,h:7}],"█":[{x:0,y:0,w:8,h:8}],"▉":[{x:0,y:0,w:7,h:8}],"▊":[{x:0,y:0,w:6,h:8}],"▋":[{x:0,y:0,w:5,h:8}],"▌":[{x:0,y:0,w:4,h:8}],"▍":[{x:0,y:0,w:3,h:8}],"▎":[{x:0,y:0,w:2,h:8}],"▏":[{x:0,y:0,w:1,h:8}],"▐":[{x:4,y:0,w:4,h:8}],"▔":[{x:0,y:0,w:8,h:1}],"▕":[{x:7,y:0,w:1,h:8}],"▖":[{x:0,y:4,w:4,h:4}],"▗":[{x:4,y:4,w:4,h:4}],"▘":[{x:0,y:0,w:4,h:4}],"▙":[{x:0,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"▚":[{x:0,y:0,w:4,h:4},{x:4,y:4,w:4,h:4}],"▛":[{x:0,y:0,w:4,h:8},{x:4,y:0,w:4,h:4}],"▜":[{x:0,y:0,w:8,h:4},{x:4,y:0,w:4,h:8}],"▝":[{x:4,y:0,w:4,h:4}],"▞":[{x:4,y:0,w:4,h:4},{x:0,y:4,w:4,h:4}],"▟":[{x:4,y:0,w:4,h:8},{x:0,y:4,w:8,h:4}],"🭰":[{x:1,y:0,w:1,h:8}],"🭱":[{x:2,y:0,w:1,h:8}],"🭲":[{x:3,y:0,w:1,h:8}],"🭳":[{x:4,y:0,w:1,h:8}],"🭴":[{x:5,y:0,w:1,h:8}],"🭵":[{x:6,y:0,w:1,h:8}],"🭶":[{x:0,y:1,w:8,h:1}],"🭷":[{x:0,y:2,w:8,h:1}],"🭸":[{x:0,y:3,w:8,h:1}],"🭹":[{x:0,y:4,w:8,h:1}],"🭺":[{x:0,y:5,w:8,h:1}],"🭻":[{x:0,y:6,w:8,h:1}],"🭼":[{x:0,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🭽":[{x:0,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭾":[{x:7,y:0,w:1,h:8},{x:0,y:0,w:8,h:1}],"🭿":[{x:7,y:0,w:1,h:8},{x:0,y:7,w:8,h:1}],"🮀":[{x:0,y:0,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮁":[{x:0,y:0,w:8,h:1},{x:0,y:2,w:8,h:1},{x:0,y:4,w:8,h:1},{x:0,y:7,w:8,h:1}],"🮂":[{x:0,y:0,w:8,h:2}],"🮃":[{x:0,y:0,w:8,h:3}],"🮄":[{x:0,y:0,w:8,h:5}],"🮅":[{x:0,y:0,w:8,h:6}],"🮆":[{x:0,y:0,w:8,h:7}],"🮇":[{x:6,y:0,w:2,h:8}],"🮈":[{x:5,y:0,w:3,h:8}],"🮉":[{x:3,y:0,w:5,h:8}],"🮊":[{x:2,y:0,w:6,h:8}],"🮋":[{x:1,y:0,w:7,h:8}],"🮕":[{x:0,y:0,w:2,h:2},{x:4,y:0,w:2,h:2},{x:2,y:2,w:2,h:2},{x:6,y:2,w:2,h:2},{x:0,y:4,w:2,h:2},{x:4,y:4,w:2,h:2},{x:2,y:6,w:2,h:2},{x:6,y:6,w:2,h:2}],"🮖":[{x:2,y:0,w:2,h:2},{x:6,y:0,w:2,h:2},{x:0,y:2,w:2,h:2},{x:4,y:2,w:2,h:2},{x:2,y:4,w:2,h:2},{x:6,y:4,w:2,h:2},{x:0,y:6,w:2,h:2},{x:4,y:6,w:2,h:2}],"🮗":[{x:0,y:2,w:8,h:2},{x:0,y:6,w:8,h:2}]};const v={"░":[[1,0,0,0],[0,0,0,0],[0,0,1,0],[0,0,0,0]],"▒":[[1,0],[0,0],[0,1],[0,0]],"▓":[[0,1],[1,1],[1,0],[1,1]]};n.boxDrawingDefinitions={"─":{1:"M0,.5 L1,.5"},"━":{3:"M0,.5 L1,.5"},"│":{1:"M.5,0 L.5,1"},"┃":{3:"M.5,0 L.5,1"},"┌":{1:"M0.5,1 L.5,.5 L1,.5"},"┏":{3:"M0.5,1 L.5,.5 L1,.5"},"┐":{1:"M0,.5 L.5,.5 L.5,1"},"┓":{3:"M0,.5 L.5,.5 L.5,1"},"└":{1:"M.5,0 L.5,.5 L1,.5"},"┗":{3:"M.5,0 L.5,.5 L1,.5"},"┘":{1:"M.5,0 L.5,.5 L0,.5"},"┛":{3:"M.5,0 L.5,.5 L0,.5"},"├":{1:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┣":{3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"┤":{1:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┫":{3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"┬":{1:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┳":{3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"┴":{1:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┻":{3:"M0,.5 L1,.5 M.5,.5 L.5,0"},"┼":{1:"M0,.5 L1,.5 M.5,0 L.5,1"},"╋":{3:"M0,.5 L1,.5 M.5,0 L.5,1"},"╴":{1:"M.5,.5 L0,.5"},"╸":{3:"M.5,.5 L0,.5"},"╵":{1:"M.5,.5 L.5,0"},"╹":{3:"M.5,.5 L.5,0"},"╶":{1:"M.5,.5 L1,.5"},"╺":{3:"M.5,.5 L1,.5"},"╷":{1:"M.5,.5 L.5,1"},"╻":{3:"M.5,.5 L.5,1"},"═":{1:(d,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"║":{1:(d,r)=>`M${.5-d},0 L${.5-d},1 M${.5+d},0 L${.5+d},1`},"╒":{1:(d,r)=>`M.5,1 L.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╓":{1:(d,r)=>`M${.5-d},1 L${.5-d},.5 L1,.5 M${.5+d},.5 L${.5+d},1`},"╔":{1:(d,r)=>`M1,${.5-r} L${.5-d},${.5-r} L${.5-d},1 M1,${.5+r} L${.5+d},${.5+r} L${.5+d},1`},"╕":{1:(d,r)=>`M0,${.5-r} L.5,${.5-r} L.5,1 M0,${.5+r} L.5,${.5+r}`},"╖":{1:(d,r)=>`M${.5+d},1 L${.5+d},.5 L0,.5 M${.5-d},.5 L${.5-d},1`},"╗":{1:(d,r)=>`M0,${.5+r} L${.5-d},${.5+r} L${.5-d},1 M0,${.5-r} L${.5+d},${.5-r} L${.5+d},1`},"╘":{1:(d,r)=>`M.5,0 L.5,${.5+r} L1,${.5+r} M.5,${.5-r} L1,${.5-r}`},"╙":{1:(d,r)=>`M1,.5 L${.5-d},.5 L${.5-d},0 M${.5+d},.5 L${.5+d},0`},"╚":{1:(d,r)=>`M1,${.5-r} L${.5+d},${.5-r} L${.5+d},0 M1,${.5+r} L${.5-d},${.5+r} L${.5-d},0`},"╛":{1:(d,r)=>`M0,${.5+r} L.5,${.5+r} L.5,0 M0,${.5-r} L.5,${.5-r}`},"╜":{1:(d,r)=>`M0,.5 L${.5+d},.5 L${.5+d},0 M${.5-d},.5 L${.5-d},0`},"╝":{1:(d,r)=>`M0,${.5-r} L${.5-d},${.5-r} L${.5-d},0 M0,${.5+r} L${.5+d},${.5+r} L${.5+d},0`},"╞":{1:(d,r)=>`M.5,0 L.5,1 M.5,${.5-r} L1,${.5-r} M.5,${.5+r} L1,${.5+r}`},"╟":{1:(d,r)=>`M${.5-d},0 L${.5-d},1 M${.5+d},0 L${.5+d},1 M${.5+d},.5 L1,.5`},"╠":{1:(d,r)=>`M${.5-d},0 L${.5-d},1 M1,${.5+r} L${.5+d},${.5+r} L${.5+d},1 M1,${.5-r} L${.5+d},${.5-r} L${.5+d},0`},"╡":{1:(d,r)=>`M.5,0 L.5,1 M0,${.5-r} L.5,${.5-r} M0,${.5+r} L.5,${.5+r}`},"╢":{1:(d,r)=>`M0,.5 L${.5-d},.5 M${.5-d},0 L${.5-d},1 M${.5+d},0 L${.5+d},1`},"╣":{1:(d,r)=>`M${.5+d},0 L${.5+d},1 M0,${.5+r} L${.5-d},${.5+r} L${.5-d},1 M0,${.5-r} L${.5-d},${.5-r} L${.5-d},0`},"╤":{1:(d,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r} M.5,${.5+r} L.5,1`},"╥":{1:(d,r)=>`M0,.5 L1,.5 M${.5-d},.5 L${.5-d},1 M${.5+d},.5 L${.5+d},1`},"╦":{1:(d,r)=>`M0,${.5-r} L1,${.5-r} M0,${.5+r} L${.5-d},${.5+r} L${.5-d},1 M1,${.5+r} L${.5+d},${.5+r} L${.5+d},1`},"╧":{1:(d,r)=>`M.5,0 L.5,${.5-r} M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╨":{1:(d,r)=>`M0,.5 L1,.5 M${.5-d},.5 L${.5-d},0 M${.5+d},.5 L${.5+d},0`},"╩":{1:(d,r)=>`M0,${.5+r} L1,${.5+r} M0,${.5-r} L${.5-d},${.5-r} L${.5-d},0 M1,${.5-r} L${.5+d},${.5-r} L${.5+d},0`},"╪":{1:(d,r)=>`M.5,0 L.5,1 M0,${.5-r} L1,${.5-r} M0,${.5+r} L1,${.5+r}`},"╫":{1:(d,r)=>`M0,.5 L1,.5 M${.5-d},0 L${.5-d},1 M${.5+d},0 L${.5+d},1`},"╬":{1:(d,r)=>`M0,${.5+r} L${.5-d},${.5+r} L${.5-d},1 M1,${.5+r} L${.5+d},${.5+r} L${.5+d},1 M0,${.5-r} L${.5-d},${.5-r} L${.5-d},0 M1,${.5-r} L${.5+d},${.5-r} L${.5+d},0`},"╱":{1:"M1,0 L0,1"},"╲":{1:"M0,0 L1,1"},"╳":{1:"M1,0 L0,1 M0,0 L1,1"},"╼":{1:"M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"╽":{1:"M.5,.5 L.5,0",3:"M.5,.5 L.5,1"},"╾":{1:"M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"╿":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┍":{1:"M.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┎":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┑":{1:"M.5,.5 L.5,1",3:"M.5,.5 L0,.5"},"┒":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┕":{1:"M.5,.5 L.5,0",3:"M.5,.5 L1,.5"},"┖":{1:"M.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┙":{1:"M.5,.5 L.5,0",3:"M.5,.5 L0,.5"},"┚":{1:"M.5,.5 L0,.5",3:"M.5,.5 L.5,0"},"┝":{1:"M.5,0 L.5,1",3:"M.5,.5 L1,.5"},"┞":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L.5,0"},"┟":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L.5,1"},"┠":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1"},"┡":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"┢":{1:"M.5,.5 L.5,0",3:"M0.5,1 L.5,.5 L1,.5"},"┥":{1:"M.5,0 L.5,1",3:"M.5,.5 L0,.5"},"┦":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"┧":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L.5,1"},"┨":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1"},"┩":{1:"M.5,.5 L.5,1",3:"M.5,0 L.5,.5 L0,.5"},"┪":{1:"M.5,.5 L.5,0",3:"M0,.5 L.5,.5 L.5,1"},"┭":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┮":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,.5 L1,.5"},"┯":{1:"M.5,.5 L.5,1",3:"M0,.5 L1,.5"},"┰":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"┱":{1:"M.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"┲":{1:"M.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"┵":{1:"M.5,0 L.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┶":{1:"M.5,0 L.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┷":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5"},"┸":{1:"M0,.5 L1,.5",3:"M.5,.5 L.5,0"},"┹":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"┺":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,.5 L1,.5"},"┽":{1:"M.5,0 L.5,1 M.5,.5 L1,.5",3:"M.5,.5 L0,.5"},"┾":{1:"M.5,0 L.5,1 M.5,.5 L0,.5",3:"M.5,.5 L1,.5"},"┿":{1:"M.5,0 L.5,1",3:"M0,.5 L1,.5"},"╀":{1:"M0,.5 L1,.5 M.5,.5 L.5,1",3:"M.5,.5 L.5,0"},"╁":{1:"M.5,.5 L.5,0 M0,.5 L1,.5",3:"M.5,.5 L.5,1"},"╂":{1:"M0,.5 L1,.5",3:"M.5,0 L.5,1"},"╃":{1:"M0.5,1 L.5,.5 L1,.5",3:"M.5,0 L.5,.5 L0,.5"},"╄":{1:"M0,.5 L.5,.5 L.5,1",3:"M.5,0 L.5,.5 L1,.5"},"╅":{1:"M.5,0 L.5,.5 L1,.5",3:"M0,.5 L.5,.5 L.5,1"},"╆":{1:"M.5,0 L.5,.5 L0,.5",3:"M0.5,1 L.5,.5 L1,.5"},"╇":{1:"M.5,.5 L.5,1",3:"M.5,.5 L.5,0 M0,.5 L1,.5"},"╈":{1:"M.5,.5 L.5,0",3:"M0,.5 L1,.5 M.5,.5 L.5,1"},"╉":{1:"M.5,.5 L1,.5",3:"M.5,0 L.5,1 M.5,.5 L0,.5"},"╊":{1:"M.5,.5 L0,.5",3:"M.5,0 L.5,1 M.5,.5 L1,.5"},"╌":{1:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"╍":{3:"M.1,.5 L.4,.5 M.6,.5 L.9,.5"},"┄":{1:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┅":{3:"M.0667,.5 L.2667,.5 M.4,.5 L.6,.5 M.7333,.5 L.9333,.5"},"┈":{1:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"┉":{3:"M.05,.5 L.2,.5 M.3,.5 L.45,.5 M.55,.5 L.7,.5 M.8,.5 L.95,.5"},"╎":{1:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"╏":{3:"M.5,.1 L.5,.4 M.5,.6 L.5,.9"},"┆":{1:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┇":{3:"M.5,.0667 L.5,.2667 M.5,.4 L.5,.6 M.5,.7333 L.5,.9333"},"┊":{1:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"┋":{3:"M.5,.05 L.5,.2 M.5,.3 L.5,.45 L.5,.55 M.5,.7 L.5,.95"},"╭":{1:(d,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,1,.5`},"╮":{1:(d,r)=>`M.5,1 L.5,${.5+r/.15*.5} C.5,${.5+r/.15*.5},.5,.5,0,.5`},"╯":{1:(d,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,0,.5`},"╰":{1:(d,r)=>`M.5,0 L.5,${.5-r/.15*.5} C.5,${.5-r/.15*.5},.5,.5,1,.5`}},n.powerlineDefinitions={"":{d:"M0,0 L1,.5 L0,1",type:0,rightPadding:2},"":{d:"M-1,-.5 L1,.5 L-1,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1,0 L0,.5 L1,1",type:0,leftPadding:2},"":{d:"M2,-.5 L0,.5 L2,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M0,0 L0,1 C0.552,1,1,0.776,1,.5 C1,0.224,0.552,0,0,0",type:0,rightPadding:1},"":{d:"M.2,1 C.422,1,.8,.826,.78,.5 C.8,.174,0.422,0,.2,0",type:1,rightPadding:1},"":{d:"M1,0 L1,1 C0.448,1,0,0.776,0,.5 C0,0.224,0.448,0,1,0",type:0,leftPadding:1},"":{d:"M.8,1 C0.578,1,0.2,.826,.22,.5 C0.2,0.174,0.578,0,0.8,0",type:1,leftPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L-.5,1.5",type:0},"":{d:"M-.5,-.5 L1.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M1.5,-.5 L-.5,1.5 L1.5,1.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5 L-.5,-.5",type:0},"":{d:"M1.5,-.5 L-.5,1.5",type:1,leftPadding:1,rightPadding:1},"":{d:"M-.5,-.5 L1.5,1.5 L1.5,-.5",type:0}},n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.powerlineDefinitions[""]=n.powerlineDefinitions[""],n.tryDrawCustomChar=function(d,r,h,o,c,m,C,S){const w=n.blockElementDefinitions[r];if(w)return(function(O,T,M,U,K,I){for(let q=0;q<T.length;q++){const F=T[q],R=K/8,H=I/8;O.fillRect(M+F.x*R,U+F.y*H,F.w*R,F.h*H)}})(d,w,h,o,c,m),!0;const p=v[r];if(p)return(function(O,T,M,U,K,I){let q=l.get(T);q||(q=new Map,l.set(T,q));const F=O.fillStyle;if(typeof F!="string")throw new Error(`Unexpected fillStyle type "${F}"`);let R=q.get(F);if(!R){const H=T[0].length,D=T.length,z=O.canvas.ownerDocument.createElement("canvas");z.width=H,z.height=D;const V=(0,_.throwIfFalsy)(z.getContext("2d")),J=new ImageData(H,D);let he,ue,$,N;if(F.startsWith("#"))he=parseInt(F.slice(1,3),16),ue=parseInt(F.slice(3,5),16),$=parseInt(F.slice(5,7),16),N=F.length>7&&parseInt(F.slice(7,9),16)||1;else{if(!F.startsWith("rgba"))throw new Error(`Unexpected fillStyle color format "${F}" when drawing pattern glyph`);[he,ue,$,N]=F.substring(5,F.length-1).split(",").map((ne=>parseFloat(ne)))}for(let ne=0;ne<D;ne++)for(let re=0;re<H;re++)J.data[4*(ne*H+re)]=he,J.data[4*(ne*H+re)+1]=ue,J.data[4*(ne*H+re)+2]=$,J.data[4*(ne*H+re)+3]=T[ne][re]*(255*N);V.putImageData(J,0,0),R=(0,_.throwIfFalsy)(O.createPattern(z,null)),q.set(F,R)}O.fillStyle=R,O.fillRect(M,U,K,I)})(d,p,h,o,c,m),!0;const x=n.boxDrawingDefinitions[r];if(x)return(function(O,T,M,U,K,I,q){O.strokeStyle=O.fillStyle;for(const[F,R]of Object.entries(T)){let H;O.beginPath(),O.lineWidth=q*Number.parseInt(F),H=typeof R=="function"?R(.15,.15/I*K):R;for(const D of H.split(" ")){const z=D[0],V=b[z];if(!V){console.error(`Could not find drawing instructions for "${z}"`);continue}const J=D.substring(1).split(",");J[0]&&J[1]&&V(O,y(J,K,I,M,U,!0,q))}O.stroke(),O.closePath()}})(d,x,h,o,c,m,S),!0;const L=n.powerlineDefinitions[r];return!!L&&((function(O,T,M,U,K,I,q,F){const R=new Path2D;R.rect(M,U,K,I),O.clip(R),O.beginPath();const H=q/12;O.lineWidth=F*H;for(const D of T.d.split(" ")){const z=D[0],V=b[z];if(!V){console.error(`Could not find drawing instructions for "${z}"`);continue}const J=D.substring(1).split(",");J[0]&&J[1]&&V(O,y(J,K,I,M,U,!1,F,(T.leftPadding??0)*(H/2),(T.rightPadding??0)*(H/2)))}T.type===1?(O.strokeStyle=O.fillStyle,O.stroke()):O.fill(),O.closePath()})(d,L,h,o,c,m,C,S),!0)};const l=new Map;function g(d,r,h=0){return Math.max(Math.min(d,r),h)}const b={C:(d,r)=>d.bezierCurveTo(r[0],r[1],r[2],r[3],r[4],r[5]),L:(d,r)=>d.lineTo(r[0],r[1]),M:(d,r)=>d.moveTo(r[0],r[1])};function y(d,r,h,o,c,m,C,S=0,w=0){const p=d.map((x=>parseFloat(x)||parseInt(x)));if(p.length<2)throw new Error("Too few arguments for instruction");for(let x=0;x<p.length;x+=2)p[x]*=r-S*C-w*C,m&&p[x]!==0&&(p[x]=g(Math.round(p[x]+.5)-.5,r,0)),p[x]+=o+S*C;for(let x=1;x<p.length;x+=2)p[x]*=h,m&&p[x]!==0&&(p[x]=g(Math.round(p[x]+.5)-.5,h,0)),p[x]+=c;return p}},56:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.observeDevicePixelDimensions=void 0;const _=u(859);n.observeDevicePixelDimensions=function(v,l,g){let b=new l.ResizeObserver((y=>{const d=y.find((o=>o.target===v));if(!d)return;if(!("devicePixelContentBoxSize"in d))return b==null||b.disconnect(),void(b=void 0);const r=d.devicePixelContentBoxSize[0].inlineSize,h=d.devicePixelContentBoxSize[0].blockSize;r>0&&h>0&&g(r,h)}));try{b.observe(v,{box:["device-pixel-content-box"]})}catch{b.disconnect(),b=void 0}return(0,_.toDisposable)((()=>b==null?void 0:b.disconnect()))}},374:(P,n)=>{function u(v){return 57508<=v&&v<=57558}function _(v){return v>=128512&&v<=128591||v>=127744&&v<=128511||v>=128640&&v<=128767||v>=9728&&v<=9983||v>=9984&&v<=10175||v>=65024&&v<=65039||v>=129280&&v<=129535||v>=127462&&v<=127487}Object.defineProperty(n,"__esModule",{value:!0}),n.computeNextVariantOffset=n.createRenderDimensions=n.treatGlyphAsBackgroundColor=n.allowRescaling=n.isEmoji=n.isRestrictedPowerlineGlyph=n.isPowerlineGlyph=n.throwIfFalsy=void 0,n.throwIfFalsy=function(v){if(!v)throw new Error("value must not be falsy");return v},n.isPowerlineGlyph=u,n.isRestrictedPowerlineGlyph=function(v){return 57520<=v&&v<=57527},n.isEmoji=_,n.allowRescaling=function(v,l,g,b){return l===1&&g>Math.ceil(1.5*b)&&v!==void 0&&v>255&&!_(v)&&!u(v)&&!(function(y){return 57344<=y&&y<=63743})(v)},n.treatGlyphAsBackgroundColor=function(v){return u(v)||(function(l){return 9472<=l&&l<=9631})(v)},n.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}}}},n.computeNextVariantOffset=function(v,l,g=0){return(v-(2*Math.round(l)-g))%(2*Math.round(l))}},296:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createSelectionRenderModel=void 0;class u{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(v,l,g,b=!1){if(this.selectionStart=l,this.selectionEnd=g,!l||!g||l[0]===g[0]&&l[1]===g[1])return void this.clear();const y=v.buffers.active.ydisp,d=l[1]-y,r=g[1]-y,h=Math.max(d,0),o=Math.min(r,v.rows-1);h>=v.rows||o<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=b,this.viewportStartRow=d,this.viewportEndRow=r,this.viewportCappedStartRow=h,this.viewportCappedEndRow=o,this.startCol=l[0],this.endCol=g[0])}isCellSelected(v,l,g){return!!this.hasSelection&&(g-=v.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?l>=this.startCol&&g>=this.viewportCappedStartRow&&l<this.endCol&&g<=this.viewportCappedEndRow:l<this.startCol&&g>=this.viewportCappedStartRow&&l>=this.endCol&&g<=this.viewportCappedEndRow:g>this.viewportStartRow&&g<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportEndRow&&l<this.endCol||this.viewportStartRow<this.viewportEndRow&&g===this.viewportStartRow&&l>=this.startCol)}}n.createSelectionRenderModel=function(){return new u}},509:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.TextureAtlas=void 0;const _=u(237),v=u(860),l=u(374),g=u(160),b=u(345),y=u(485),d=u(385),r=u(147),h=u(855),o={texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},offset:{x:0,y:0},size:{x:0,y:0},sizeClipSpace:{x:0,y:0}};let c;class m{get pages(){return this._pages}constructor(x,L,O){this._document=x,this._config=L,this._unicodeService=O,this._didWarmUp=!1,this._cacheMap=new y.FourKeyMap,this._cacheMapCombined=new y.FourKeyMap,this._pages=[],this._activePages=[],this._workBoundingBox={top:0,left:0,bottom:0,right:0},this._workAttributeData=new r.AttributeData,this._textureSize=512,this._onAddTextureAtlasCanvas=new b.EventEmitter,this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=new b.EventEmitter,this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._requestClearModel=!1,this._createNewPage(),this._tmpCanvas=w(x,4*this._config.deviceCellWidth+4,this._config.deviceCellHeight+4),this._tmpCtx=(0,l.throwIfFalsy)(this._tmpCanvas.getContext("2d",{alpha:this._config.allowTransparency,willReadFrequently:!0}))}dispose(){for(const x of this.pages)x.canvas.remove();this._onAddTextureAtlasCanvas.dispose()}warmUp(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)}_doWarmUp(){const x=new d.IdleTaskQueue;for(let L=33;L<126;L++)x.enqueue((()=>{if(!this._cacheMap.get(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT)){const O=this._drawToCache(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT);this._cacheMap.set(L,h.DEFAULT_COLOR,h.DEFAULT_COLOR,h.DEFAULT_EXT,O)}}))}beginFrame(){return this._requestClearModel}clearTexture(){if(this._pages[0].currentRow.x!==0||this._pages[0].currentRow.y!==0){for(const x of this._pages)x.clear();this._cacheMap.clear(),this._cacheMapCombined.clear(),this._didWarmUp=!1}}_createNewPage(){if(m.maxAtlasPages&&this._pages.length>=Math.max(4,m.maxAtlasPages)){const L=this._pages.filter((q=>2*q.canvas.width<=(m.maxTextureSize||4096))).sort(((q,F)=>F.canvas.width!==q.canvas.width?F.canvas.width-q.canvas.width:F.percentageUsed-q.percentageUsed));let O=-1,T=0;for(let q=0;q<L.length;q++)if(L[q].canvas.width!==T)O=q,T=L[q].canvas.width;else if(q-O==3)break;const M=L.slice(O,O+4),U=M.map((q=>q.glyphs[0].texturePage)).sort(((q,F)=>q>F?1:-1)),K=this.pages.length-M.length,I=this._mergePages(M,K);I.version++;for(let q=U.length-1;q>=0;q--)this._deletePage(U[q]);this.pages.push(I),this._requestClearModel=!0,this._onAddTextureAtlasCanvas.fire(I.canvas)}const x=new C(this._document,this._textureSize);return this._pages.push(x),this._activePages.push(x),this._onAddTextureAtlasCanvas.fire(x.canvas),x}_mergePages(x,L){const O=2*x[0].canvas.width,T=new C(this._document,O,x);for(const[M,U]of x.entries()){const K=M*U.canvas.width%O,I=Math.floor(M/2)*U.canvas.height;T.ctx.drawImage(U.canvas,K,I);for(const F of U.glyphs)F.texturePage=L,F.sizeClipSpace.x=F.size.x/O,F.sizeClipSpace.y=F.size.y/O,F.texturePosition.x+=K,F.texturePosition.y+=I,F.texturePositionClipSpace.x=F.texturePosition.x/O,F.texturePositionClipSpace.y=F.texturePosition.y/O;this._onRemoveTextureAtlasCanvas.fire(U.canvas);const q=this._activePages.indexOf(U);q!==-1&&this._activePages.splice(q,1)}return T}_deletePage(x){this._pages.splice(x,1);for(let L=x;L<this._pages.length;L++){const O=this._pages[L];for(const T of O.glyphs)T.texturePage--;O.version++}}getRasterizedGlyphCombinedChar(x,L,O,T,M){return this._getFromCacheMap(this._cacheMapCombined,x,L,O,T,M)}getRasterizedGlyph(x,L,O,T,M){return this._getFromCacheMap(this._cacheMap,x,L,O,T,M)}_getFromCacheMap(x,L,O,T,M,U=!1){return c=x.get(L,O,T,M),c||(c=this._drawToCache(L,O,T,M,U),x.set(L,O,T,M,c)),c}_getColorFromAnsiIndex(x){if(x>=this._config.colors.ansi.length)throw new Error("No color found for idx "+x);return this._config.colors.ansi[x]}_getBackgroundColor(x,L,O,T){if(this._config.allowTransparency)return g.NULL_COLOR;let M;switch(x){case 16777216:case 33554432:M=this._getColorFromAnsiIndex(L);break;case 50331648:const U=r.AttributeData.toColorRGB(L);M=g.channels.toColor(U[0],U[1],U[2]);break;default:M=O?g.color.opaque(this._config.colors.foreground):this._config.colors.background}return M}_getForegroundColor(x,L,O,T,M,U,K,I,q,F){const R=this._getMinimumContrastColor(x,L,O,T,M,U,K,q,I,F);if(R)return R;let H;switch(M){case 16777216:case 33554432:this._config.drawBoldTextInBrightColors&&q&&U<8&&(U+=8),H=this._getColorFromAnsiIndex(U);break;case 50331648:const D=r.AttributeData.toColorRGB(U);H=g.channels.toColor(D[0],D[1],D[2]);break;default:H=K?this._config.colors.background:this._config.colors.foreground}return this._config.allowTransparency&&(H=g.color.opaque(H)),I&&(H=g.color.multiplyOpacity(H,_.DIM_OPACITY)),H}_resolveBackgroundRgba(x,L,O){switch(x){case 16777216:case 33554432:return this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return O?this._config.colors.foreground.rgba:this._config.colors.background.rgba}}_resolveForegroundRgba(x,L,O,T){switch(x){case 16777216:case 33554432:return this._config.drawBoldTextInBrightColors&&T&&L<8&&(L+=8),this._getColorFromAnsiIndex(L).rgba;case 50331648:return L<<8;default:return O?this._config.colors.background.rgba:this._config.colors.foreground.rgba}}_getMinimumContrastColor(x,L,O,T,M,U,K,I,q,F){if(this._config.minimumContrastRatio===1||F)return;const R=this._getContrastCache(q),H=R.getColor(x,T);if(H!==void 0)return H||void 0;const D=this._resolveBackgroundRgba(L,O,K),z=this._resolveForegroundRgba(M,U,K,I),V=g.rgba.ensureContrastRatio(D,z,this._config.minimumContrastRatio/(q?2:1));if(!V)return void R.setColor(x,T,null);const J=g.channels.toColor(V>>24&255,V>>16&255,V>>8&255);return R.setColor(x,T,J),J}_getContrastCache(x){return x?this._config.colors.halfContrastCache:this._config.colors.contrastCache}_drawToCache(x,L,O,T,M=!1){const U=typeof x=="number"?String.fromCharCode(x):x,K=Math.min(this._config.deviceCellWidth*Math.max(U.length,2)+4,this._textureSize);this._tmpCanvas.width<K&&(this._tmpCanvas.width=K);const I=Math.min(this._config.deviceCellHeight+8,this._textureSize);if(this._tmpCanvas.height<I&&(this._tmpCanvas.height=I),this._tmpCtx.save(),this._workAttributeData.fg=O,this._workAttributeData.bg=L,this._workAttributeData.extended.ext=T,this._workAttributeData.isInvisible())return o;const q=!!this._workAttributeData.isBold(),F=!!this._workAttributeData.isInverse(),R=!!this._workAttributeData.isDim(),H=!!this._workAttributeData.isItalic(),D=!!this._workAttributeData.isUnderline(),z=!!this._workAttributeData.isStrikethrough(),V=!!this._workAttributeData.isOverline();let J=this._workAttributeData.getFgColor(),he=this._workAttributeData.getFgColorMode(),ue=this._workAttributeData.getBgColor(),$=this._workAttributeData.getBgColorMode();if(F){const ve=J;J=ue,ue=ve;const Ce=he;he=$,$=Ce}const N=this._getBackgroundColor($,ue,F,R);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=N.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.globalCompositeOperation="source-over";const ne=q?this._config.fontWeightBold:this._config.fontWeight,re=H?"italic":"";this._tmpCtx.font=`${re} ${ne} ${this._config.fontSize*this._config.devicePixelRatio}px ${this._config.fontFamily}`,this._tmpCtx.textBaseline=_.TEXT_BASELINE;const _e=U.length===1&&(0,l.isPowerlineGlyph)(U.charCodeAt(0)),fe=U.length===1&&(0,l.isRestrictedPowerlineGlyph)(U.charCodeAt(0)),xe=this._getForegroundColor(L,$,ue,O,he,J,F,R,q,(0,l.treatGlyphAsBackgroundColor)(U.charCodeAt(0)));this._tmpCtx.fillStyle=xe.css;const pe=fe?0:4;let Ne=!1;this._config.customGlyphs!==!1&&(Ne=(0,v.tryDrawCustomChar)(this._tmpCtx,U,pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight,this._config.fontSize,this._config.devicePixelRatio));let Qe,be=!_e;if(Qe=typeof x=="number"?this._unicodeService.wcwidth(x):this._unicodeService.getStringCellWidth(x),D){this._tmpCtx.save();const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=ve%2==1?.5:0;if(this._tmpCtx.lineWidth=ve,this._workAttributeData.isUnderlineColorDefault())this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle;else if(this._workAttributeData.isUnderlineColorRGB())be=!1,this._tmpCtx.strokeStyle=`rgb(${r.AttributeData.toColorRGB(this._workAttributeData.getUnderlineColor()).join(",")})`;else{be=!1;let et=this._workAttributeData.getUnderlineColor();this._config.drawBoldTextInBrightColors&&this._workAttributeData.isBold()&&et<8&&(et+=8),this._tmpCtx.strokeStyle=this._getColorFromAnsiIndex(et).css}this._tmpCtx.beginPath();const Ze=pe,Fe=Math.ceil(pe+this._config.deviceCharHeight)-Ce-(M?2*ve:0),Ft=Fe+ve,ht=Fe+2*ve;let wt=this._workAttributeData.getUnderlineVariantOffset();for(let et=0;et<Qe;et++){this._tmpCtx.save();const qe=Ze+et*this._config.deviceCellWidth,Re=Ze+(et+1)*this._config.deviceCellWidth,Jt=qe+this._config.deviceCellWidth/2;switch(this._workAttributeData.extended.underlineStyle){case 2:this._tmpCtx.moveTo(qe,Fe),this._tmpCtx.lineTo(Re,Fe),this._tmpCtx.moveTo(qe,ht),this._tmpCtx.lineTo(Re,ht);break;case 3:const dt=ve<=1?ht:Math.ceil(pe+this._config.deviceCharHeight-ve/2)-Ce,Ot=ve<=1?Fe:Math.ceil(pe+this._config.deviceCharHeight+ve/2)-Ce,bt=new Path2D;bt.rect(qe,Fe,this._config.deviceCellWidth,ht-Fe),this._tmpCtx.clip(bt),this._tmpCtx.moveTo(qe-this._config.deviceCellWidth/2,Ft),this._tmpCtx.bezierCurveTo(qe-this._config.deviceCellWidth/2,Ot,qe,Ot,qe,Ft),this._tmpCtx.bezierCurveTo(qe,dt,Jt,dt,Jt,Ft),this._tmpCtx.bezierCurveTo(Jt,Ot,Re,Ot,Re,Ft),this._tmpCtx.bezierCurveTo(Re,dt,Re+this._config.deviceCellWidth/2,dt,Re+this._config.deviceCellWidth/2,Ft);break;case 4:const ys=wt===0?0:wt>=ve?2*ve-wt:ve-wt;wt>=ve||ys===0?(this._tmpCtx.setLineDash([Math.round(ve),Math.round(ve)]),this._tmpCtx.moveTo(qe+ys,Fe),this._tmpCtx.lineTo(Re,Fe)):(this._tmpCtx.setLineDash([Math.round(ve),Math.round(ve)]),this._tmpCtx.moveTo(qe,Fe),this._tmpCtx.lineTo(qe+ys,Fe),this._tmpCtx.moveTo(qe+ys+ve,Fe),this._tmpCtx.lineTo(Re,Fe)),wt=(0,l.computeNextVariantOffset)(Re-qe,ve,wt);break;case 5:const _a=.6,va=.3,Ri=Re-qe,is=Math.floor(_a*Ri),ss=Math.floor(va*Ri),ci=Ri-is-ss;this._tmpCtx.setLineDash([is,ss,ci]),this._tmpCtx.moveTo(qe,Fe),this._tmpCtx.lineTo(Re,Fe);break;default:this._tmpCtx.moveTo(qe,Fe),this._tmpCtx.lineTo(Re,Fe)}this._tmpCtx.stroke(),this._tmpCtx.restore()}if(this._tmpCtx.restore(),!Ne&&this._config.fontSize>=12&&!this._config.allowTransparency&&U!==" "){this._tmpCtx.save(),this._tmpCtx.textBaseline="alphabetic";const et=this._tmpCtx.measureText(U);if(this._tmpCtx.restore(),"actualBoundingBoxDescent"in et&&et.actualBoundingBoxDescent>0){this._tmpCtx.save();const qe=new Path2D;qe.rect(Ze,Fe-Math.ceil(ve/2),this._config.deviceCellWidth*Qe,ht-Fe+Math.ceil(ve/2)),this._tmpCtx.clip(qe),this._tmpCtx.lineWidth=3*this._config.devicePixelRatio,this._tmpCtx.strokeStyle=N.css,this._tmpCtx.strokeText(U,pe,pe+this._config.deviceCharHeight),this._tmpCtx.restore()}}}if(V){const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/15)),Ce=ve%2==1?.5:0;this._tmpCtx.lineWidth=ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(pe,pe+Ce),this._tmpCtx.lineTo(pe+this._config.deviceCharWidth*Qe,pe+Ce),this._tmpCtx.stroke()}if(Ne||this._tmpCtx.fillText(U,pe,pe+this._config.deviceCharHeight),U==="_"&&!this._config.allowTransparency){let ve=S(this._tmpCtx.getImageData(pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight),N,xe,be);if(ve)for(let Ce=1;Ce<=5&&(this._tmpCtx.save(),this._tmpCtx.fillStyle=N.css,this._tmpCtx.fillRect(0,0,this._tmpCanvas.width,this._tmpCanvas.height),this._tmpCtx.restore(),this._tmpCtx.fillText(U,pe,pe+this._config.deviceCharHeight-Ce),ve=S(this._tmpCtx.getImageData(pe,pe,this._config.deviceCellWidth,this._config.deviceCellHeight),N,xe,be),ve);Ce++);}if(z){const ve=Math.max(1,Math.floor(this._config.fontSize*this._config.devicePixelRatio/10)),Ce=this._tmpCtx.lineWidth%2==1?.5:0;this._tmpCtx.lineWidth=ve,this._tmpCtx.strokeStyle=this._tmpCtx.fillStyle,this._tmpCtx.beginPath(),this._tmpCtx.moveTo(pe,pe+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.lineTo(pe+this._config.deviceCharWidth*Qe,pe+Math.floor(this._config.deviceCharHeight/2)-Ce),this._tmpCtx.stroke()}this._tmpCtx.restore();const Bt=this._tmpCtx.getImageData(0,0,this._tmpCanvas.width,this._tmpCanvas.height);let si;if(si=this._config.allowTransparency?(function(ve){for(let Ce=0;Ce<ve.data.length;Ce+=4)if(ve.data[Ce+3]>0)return!1;return!0})(Bt):S(Bt,N,xe,be),si)return o;const Be=this._findGlyphBoundingBox(Bt,this._workBoundingBox,K,fe,Ne,pe);let Ae,De;for(;;){if(this._activePages.length===0){const ve=this._createNewPage();Ae=ve,De=ve.currentRow,De.height=Be.size.y;break}Ae=this._activePages[this._activePages.length-1],De=Ae.currentRow;for(const ve of this._activePages)Be.size.y<=ve.currentRow.height&&(Ae=ve,De=ve.currentRow);for(let ve=this._activePages.length-1;ve>=0;ve--)for(const Ce of this._activePages[ve].fixedRows)Ce.height<=De.height&&Be.size.y<=Ce.height&&(Ae=this._activePages[ve],De=Ce);if(De.y+Be.size.y>=Ae.canvas.height||De.height>Be.size.y+2){let ve=!1;if(Ae.currentRow.y+Ae.currentRow.height+Be.size.y>=Ae.canvas.height){let Ce;for(const Ze of this._activePages)if(Ze.currentRow.y+Ze.currentRow.height+Be.size.y<Ze.canvas.height){Ce=Ze;break}if(Ce)Ae=Ce;else if(m.maxAtlasPages&&this._pages.length>=m.maxAtlasPages&&De.y+Be.size.y<=Ae.canvas.height&&De.height>=Be.size.y&&De.x+Be.size.x<=Ae.canvas.width)ve=!0;else{const Ze=this._createNewPage();Ae=Ze,De=Ze.currentRow,De.height=Be.size.y,ve=!0}}ve||(Ae.currentRow.height>0&&Ae.fixedRows.push(Ae.currentRow),De={x:0,y:Ae.currentRow.y+Ae.currentRow.height,height:Be.size.y},Ae.fixedRows.push(De),Ae.currentRow={x:0,y:De.y+De.height,height:0})}if(De.x+Be.size.x<=Ae.canvas.width)break;De===Ae.currentRow?(De.x=0,De.y+=De.height,De.height=0):Ae.fixedRows.splice(Ae.fixedRows.indexOf(De),1)}return Be.texturePage=this._pages.indexOf(Ae),Be.texturePosition.x=De.x,Be.texturePosition.y=De.y,Be.texturePositionClipSpace.x=De.x/Ae.canvas.width,Be.texturePositionClipSpace.y=De.y/Ae.canvas.height,Be.sizeClipSpace.x/=Ae.canvas.width,Be.sizeClipSpace.y/=Ae.canvas.height,De.height=Math.max(De.height,Be.size.y),De.x+=Be.size.x,Ae.ctx.putImageData(Bt,Be.texturePosition.x-this._workBoundingBox.left,Be.texturePosition.y-this._workBoundingBox.top,this._workBoundingBox.left,this._workBoundingBox.top,Be.size.x,Be.size.y),Ae.addGlyph(Be),Ae.version++,Be}_findGlyphBoundingBox(x,L,O,T,M,U){L.top=0;const K=T?this._config.deviceCellHeight:this._tmpCanvas.height,I=T?this._config.deviceCellWidth:O;let q=!1;for(let F=0;F<K;F++){for(let R=0;R<I;R++){const H=F*this._tmpCanvas.width*4+4*R+3;if(x.data[H]!==0){L.top=F,q=!0;break}}if(q)break}L.left=0,q=!1;for(let F=0;F<U+I;F++){for(let R=0;R<K;R++){const H=R*this._tmpCanvas.width*4+4*F+3;if(x.data[H]!==0){L.left=F,q=!0;break}}if(q)break}L.right=I,q=!1;for(let F=U+I-1;F>=U;F--){for(let R=0;R<K;R++){const H=R*this._tmpCanvas.width*4+4*F+3;if(x.data[H]!==0){L.right=F,q=!0;break}}if(q)break}L.bottom=K,q=!1;for(let F=K-1;F>=0;F--){for(let R=0;R<I;R++){const H=F*this._tmpCanvas.width*4+4*R+3;if(x.data[H]!==0){L.bottom=F,q=!0;break}}if(q)break}return{texturePage:0,texturePosition:{x:0,y:0},texturePositionClipSpace:{x:0,y:0},size:{x:L.right-L.left+1,y:L.bottom-L.top+1},sizeClipSpace:{x:L.right-L.left+1,y:L.bottom-L.top+1},offset:{x:-L.left+U+(T||M?Math.floor((this._config.deviceCellWidth-this._config.deviceCharWidth)/2):0),y:-L.top+U+(T||M?this._config.lineHeight===1?0:Math.round((this._config.deviceCellHeight-this._config.deviceCharHeight)/2):0)}}}}n.TextureAtlas=m;class C{get percentageUsed(){return this._usedPixels/(this.canvas.width*this.canvas.height)}get glyphs(){return this._glyphs}addGlyph(x){this._glyphs.push(x),this._usedPixels+=x.size.x*x.size.y}constructor(x,L,O){if(this._usedPixels=0,this._glyphs=[],this.version=0,this.currentRow={x:0,y:0,height:0},this.fixedRows=[],O)for(const T of O)this._glyphs.push(...T.glyphs),this._usedPixels+=T._usedPixels;this.canvas=w(x,L,L),this.ctx=(0,l.throwIfFalsy)(this.canvas.getContext("2d",{alpha:!0}))}clear(){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.currentRow.x=0,this.currentRow.y=0,this.currentRow.height=0,this.fixedRows.length=0,this.version++}}function S(p,x,L,O){const T=x.rgba>>>24,M=x.rgba>>>16&255,U=x.rgba>>>8&255,K=L.rgba>>>24,I=L.rgba>>>16&255,q=L.rgba>>>8&255,F=Math.floor((Math.abs(T-K)+Math.abs(M-I)+Math.abs(U-q))/12);let R=!0;for(let H=0;H<p.data.length;H+=4)p.data[H]===T&&p.data[H+1]===M&&p.data[H+2]===U||O&&Math.abs(p.data[H]-T)+Math.abs(p.data[H+1]-M)+Math.abs(p.data[H+2]-U)<F?p.data[H+3]=0:R=!1;return R}function w(p,x,L){const O=p.createElement("canvas");return O.width=x,O.height=L,O}},160:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.contrastRatio=n.toPaddedHex=n.rgba=n.rgb=n.css=n.color=n.channels=n.NULL_COLOR=void 0;let u=0,_=0,v=0,l=0;var g,b,y,d,r;function h(c){const m=c.toString(16);return m.length<2?"0"+m:m}function o(c,m){return c<m?(m+.05)/(c+.05):(c+.05)/(m+.05)}n.NULL_COLOR={css:"#00000000",rgba:0},(function(c){c.toCss=function(m,C,S,w){return w!==void 0?`#${h(m)}${h(C)}${h(S)}${h(w)}`:`#${h(m)}${h(C)}${h(S)}`},c.toRgba=function(m,C,S,w=255){return(m<<24|C<<16|S<<8|w)>>>0},c.toColor=function(m,C,S,w){return{css:c.toCss(m,C,S,w),rgba:c.toRgba(m,C,S,w)}}})(g||(n.channels=g={})),(function(c){function m(C,S){return l=Math.round(255*S),[u,_,v]=r.toChannels(C.rgba),{css:g.toCss(u,_,v,l),rgba:g.toRgba(u,_,v,l)}}c.blend=function(C,S){if(l=(255&S.rgba)/255,l===1)return{css:S.css,rgba:S.rgba};const w=S.rgba>>24&255,p=S.rgba>>16&255,x=S.rgba>>8&255,L=C.rgba>>24&255,O=C.rgba>>16&255,T=C.rgba>>8&255;return u=L+Math.round((w-L)*l),_=O+Math.round((p-O)*l),v=T+Math.round((x-T)*l),{css:g.toCss(u,_,v),rgba:g.toRgba(u,_,v)}},c.isOpaque=function(C){return(255&C.rgba)==255},c.ensureContrastRatio=function(C,S,w){const p=r.ensureContrastRatio(C.rgba,S.rgba,w);if(p)return g.toColor(p>>24&255,p>>16&255,p>>8&255)},c.opaque=function(C){const S=(255|C.rgba)>>>0;return[u,_,v]=r.toChannels(S),{css:g.toCss(u,_,v),rgba:S}},c.opacity=m,c.multiplyOpacity=function(C,S){return l=255&C.rgba,m(C,l*S/255)},c.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}})(b||(n.color=b={})),(function(c){let m,C;try{const S=document.createElement("canvas");S.width=1,S.height=1;const w=S.getContext("2d",{willReadFrequently:!0});w&&(m=w,m.globalCompositeOperation="copy",C=m.createLinearGradient(0,0,1,1))}catch{}c.toColor=function(S){if(S.match(/#[\da-f]{3,8}/i))switch(S.length){case 4:return u=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),g.toColor(u,_,v);case 5:return u=parseInt(S.slice(1,2).repeat(2),16),_=parseInt(S.slice(2,3).repeat(2),16),v=parseInt(S.slice(3,4).repeat(2),16),l=parseInt(S.slice(4,5).repeat(2),16),g.toColor(u,_,v,l);case 7:return{css:S,rgba:(parseInt(S.slice(1),16)<<8|255)>>>0};case 9:return{css:S,rgba:parseInt(S.slice(1),16)>>>0}}const w=S.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 u=parseInt(w[1]),_=parseInt(w[2]),v=parseInt(w[3]),l=Math.round(255*(w[5]===void 0?1:parseFloat(w[5]))),g.toColor(u,_,v,l);if(!m||!C)throw new Error("css.toColor: Unsupported css format");if(m.fillStyle=C,m.fillStyle=S,typeof m.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(m.fillRect(0,0,1,1),[u,_,v,l]=m.getImageData(0,0,1,1).data,l!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:g.toRgba(u,_,v,l),css:S}}})(y||(n.css=y={})),(function(c){function m(C,S,w){const p=C/255,x=S/255,L=w/255;return .2126*(p<=.03928?p/12.92:Math.pow((p+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))}c.relativeLuminance=function(C){return m(C>>16&255,C>>8&255,255&C)},c.relativeLuminance2=m})(d||(n.rgb=d={})),(function(c){function m(S,w,p){const x=S>>24&255,L=S>>16&255,O=S>>8&255;let T=w>>24&255,M=w>>16&255,U=w>>8&255,K=o(d.relativeLuminance2(T,M,U),d.relativeLuminance2(x,L,O));for(;K<p&&(T>0||M>0||U>0);)T-=Math.max(0,Math.ceil(.1*T)),M-=Math.max(0,Math.ceil(.1*M)),U-=Math.max(0,Math.ceil(.1*U)),K=o(d.relativeLuminance2(T,M,U),d.relativeLuminance2(x,L,O));return(T<<24|M<<16|U<<8|255)>>>0}function C(S,w,p){const x=S>>24&255,L=S>>16&255,O=S>>8&255;let T=w>>24&255,M=w>>16&255,U=w>>8&255,K=o(d.relativeLuminance2(T,M,U),d.relativeLuminance2(x,L,O));for(;K<p&&(T<255||M<255||U<255);)T=Math.min(255,T+Math.ceil(.1*(255-T))),M=Math.min(255,M+Math.ceil(.1*(255-M))),U=Math.min(255,U+Math.ceil(.1*(255-U))),K=o(d.relativeLuminance2(T,M,U),d.relativeLuminance2(x,L,O));return(T<<24|M<<16|U<<8|255)>>>0}c.blend=function(S,w){if(l=(255&w)/255,l===1)return w;const p=w>>24&255,x=w>>16&255,L=w>>8&255,O=S>>24&255,T=S>>16&255,M=S>>8&255;return u=O+Math.round((p-O)*l),_=T+Math.round((x-T)*l),v=M+Math.round((L-M)*l),g.toRgba(u,_,v)},c.ensureContrastRatio=function(S,w,p){const x=d.relativeLuminance(S>>8),L=d.relativeLuminance(w>>8);if(o(x,L)<p){if(L<x){const M=m(S,w,p),U=o(x,d.relativeLuminance(M>>8));if(U<p){const K=C(S,w,p);return U>o(x,d.relativeLuminance(K>>8))?M:K}return M}const O=C(S,w,p),T=o(x,d.relativeLuminance(O>>8));if(T<p){const M=m(S,w,p);return T>o(x,d.relativeLuminance(M>>8))?O:M}return O}},c.reduceLuminance=m,c.increaseLuminance=C,c.toChannels=function(S){return[S>>24&255,S>>16&255,S>>8&255,255&S]}})(r||(n.rgba=r={})),n.toPaddedHex=h,n.contrastRatio=o},345:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.runAndSubscribe=n.forwardEvent=n.EventEmitter=void 0,n.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=u=>(this._listeners.push(u),{dispose:()=>{if(!this._disposed){for(let _=0;_<this._listeners.length;_++)if(this._listeners[_]===u)return void this._listeners.splice(_,1)}}})),this._event}fire(u,_){const v=[];for(let l=0;l<this._listeners.length;l++)v.push(this._listeners[l]);for(let l=0;l<v.length;l++)v[l].call(void 0,u,_)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},n.forwardEvent=function(u,_){return u((v=>_.fire(v)))},n.runAndSubscribe=function(u,_){return _(void 0),u((v=>_(v)))}},859:(P,n)=>{function u(_){for(const v of _)v.dispose();_.length=0}Object.defineProperty(n,"__esModule",{value:!0}),n.getDisposeArrayDisposable=n.disposeArray=n.toDisposable=n.MutableDisposable=n.Disposable=void 0,n.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const _ of this._disposables)_.dispose();this._disposables.length=0}register(_){return this._disposables.push(_),_}unregister(_){const v=this._disposables.indexOf(_);v!==-1&&this._disposables.splice(v,1)}},n.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(_){var v;this._isDisposed||_===this._value||((v=this._value)==null||v.dispose(),this._value=_)}clear(){this.value=void 0}dispose(){var _;this._isDisposed=!0,(_=this._value)==null||_.dispose(),this._value=void 0}},n.toDisposable=function(_){return{dispose:_}},n.disposeArray=u,n.getDisposeArrayDisposable=function(_){return{dispose:()=>u(_)}}},485:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.FourKeyMap=n.TwoKeyMap=void 0;class u{constructor(){this._data={}}set(v,l,g){this._data[v]||(this._data[v]={}),this._data[v][l]=g}get(v,l){return this._data[v]?this._data[v][l]:void 0}clear(){this._data={}}}n.TwoKeyMap=u,n.FourKeyMap=class{constructor(){this._data=new u}set(_,v,l,g,b){this._data.get(_,v)||this._data.set(_,v,new u),this._data.get(_,v).set(l,g,b)}get(_,v,l,g){var b;return(b=this._data.get(_,v))==null?void 0:b.get(l,g)}clear(){this._data.clear()}}},399:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.isChromeOS=n.isLinux=n.isWindows=n.isIphone=n.isIpad=n.isMac=n.getSafariVersion=n.isSafari=n.isLegacyEdge=n.isFirefox=n.isNode=void 0,n.isNode=typeof process<"u"&&"title"in process;const u=n.isNode?"node":navigator.userAgent,_=n.isNode?"node":navigator.platform;n.isFirefox=u.includes("Firefox"),n.isLegacyEdge=u.includes("Edge"),n.isSafari=/^((?!chrome|android).)*safari/i.test(u),n.getSafariVersion=function(){if(!n.isSafari)return 0;const v=u.match(/Version\/(\d+)/);return v===null||v.length<2?0:parseInt(v[1])},n.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(_),n.isIpad=_==="iPad",n.isIphone=_==="iPhone",n.isWindows=["Windows","Win16","Win32","WinCE"].includes(_),n.isLinux=_.indexOf("Linux")>=0,n.isChromeOS=/\bCrOS\b/.test(u)},385:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.DebouncedIdleTask=n.IdleTaskQueue=n.PriorityTaskQueue=void 0;const _=u(399);class v{constructor(){this._tasks=[],this._i=0}enqueue(b){this._tasks.push(b),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(b){this._idleCallback=void 0;let y=0,d=0,r=b.timeRemaining(),h=0;for(;this._i<this._tasks.length;){if(y=Date.now(),this._tasks[this._i]()||this._i++,y=Math.max(1,Date.now()-y),d=Math.max(y,d),h=b.timeRemaining(),1.5*d>h)return r-y<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(r-y))}ms`),void this._start();r=h}this.clear()}}class l extends v{_requestCallback(b){return setTimeout((()=>b(this._createDeadline(16))))}_cancelCallback(b){clearTimeout(b)}_createDeadline(b){const y=Date.now()+b;return{timeRemaining:()=>Math.max(0,y-Date.now())}}}n.PriorityTaskQueue=l,n.IdleTaskQueue=!_.isNode&&"requestIdleCallback"in window?class extends v{_requestCallback(g){return requestIdleCallback(g)}_cancelCallback(g){cancelIdleCallback(g)}}:l,n.DebouncedIdleTask=class{constructor(){this._queue=new n.IdleTaskQueue}set(g){this._queue.clear(),this._queue.enqueue(g)}flush(){this._queue.flush()}}},147:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.ExtendedAttrs=n.AttributeData=void 0;class u{constructor(){this.fg=0,this.bg=0,this.extended=new _}static toColorRGB(l){return[l>>>16&255,l>>>8&255,255&l]}static fromColorRGB(l){return(255&l[0])<<16|(255&l[1])<<8|255&l[2]}clone(){const l=new u;return l.fg=this.fg,l.bg=this.bg,l.extended=this.extended.clone(),l}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}}n.AttributeData=u;class _{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(l){this._ext=l}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(l){this._ext&=-469762049,this._ext|=l<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(l){this._ext&=-67108864,this._ext|=67108863&l}get urlId(){return this._urlId}set urlId(l){this._urlId=l}get underlineVariantOffset(){const l=(3758096384&this._ext)>>29;return l<0?4294967288^l:l}set underlineVariantOffset(l){this._ext&=536870911,this._ext|=l<<29&3758096384}constructor(l=0,g=0){this._ext=0,this._urlId=0,this._ext=l,this._urlId=g}clone(){return new _(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}n.ExtendedAttrs=_},782:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.CellData=void 0;const _=u(133),v=u(855),l=u(147);class g extends l.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new l.ExtendedAttrs,this.combinedData=""}static fromCharData(y){const d=new g;return d.setFromCharData(y),d}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,_.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(y){this.fg=y[v.CHAR_DATA_ATTR_INDEX],this.bg=0;let d=!1;if(y[v.CHAR_DATA_CHAR_INDEX].length>2)d=!0;else if(y[v.CHAR_DATA_CHAR_INDEX].length===2){const r=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=r&&r<=56319){const h=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=h&&h<=57343?this.content=1024*(r-55296)+h-56320+65536|y[v.CHAR_DATA_WIDTH_INDEX]<<22:d=!0}else d=!0}else this.content=y[v.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|y[v.CHAR_DATA_WIDTH_INDEX]<<22;d&&(this.combinedData=y[v.CHAR_DATA_CHAR_INDEX],this.content=2097152|y[v.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}n.CellData=g},855:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.WHITESPACE_CELL_CODE=n.WHITESPACE_CELL_WIDTH=n.WHITESPACE_CELL_CHAR=n.NULL_CELL_CODE=n.NULL_CELL_WIDTH=n.NULL_CELL_CHAR=n.CHAR_DATA_CODE_INDEX=n.CHAR_DATA_WIDTH_INDEX=n.CHAR_DATA_CHAR_INDEX=n.CHAR_DATA_ATTR_INDEX=n.DEFAULT_EXT=n.DEFAULT_ATTR=n.DEFAULT_COLOR=void 0,n.DEFAULT_COLOR=0,n.DEFAULT_ATTR=256|n.DEFAULT_COLOR<<9,n.DEFAULT_EXT=0,n.CHAR_DATA_ATTR_INDEX=0,n.CHAR_DATA_CHAR_INDEX=1,n.CHAR_DATA_WIDTH_INDEX=2,n.CHAR_DATA_CODE_INDEX=3,n.NULL_CELL_CHAR="",n.NULL_CELL_WIDTH=1,n.NULL_CELL_CODE=0,n.WHITESPACE_CELL_CHAR=" ",n.WHITESPACE_CELL_WIDTH=1,n.WHITESPACE_CELL_CODE=32},133:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.Utf8ToUtf32=n.StringToUtf32=n.utf32ToString=n.stringFromCodePoint=void 0,n.stringFromCodePoint=function(u){return u>65535?(u-=65536,String.fromCharCode(55296+(u>>10))+String.fromCharCode(u%1024+56320)):String.fromCharCode(u)},n.utf32ToString=function(u,_=0,v=u.length){let l="";for(let g=_;g<v;++g){let b=u[g];b>65535?(b-=65536,l+=String.fromCharCode(55296+(b>>10))+String.fromCharCode(b%1024+56320)):l+=String.fromCharCode(b)}return l},n.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(u,_){const v=u.length;if(!v)return 0;let l=0,g=0;if(this._interim){const b=u.charCodeAt(g++);56320<=b&&b<=57343?_[l++]=1024*(this._interim-55296)+b-56320+65536:(_[l++]=this._interim,_[l++]=b),this._interim=0}for(let b=g;b<v;++b){const y=u.charCodeAt(b);if(55296<=y&&y<=56319){if(++b>=v)return this._interim=y,l;const d=u.charCodeAt(b);56320<=d&&d<=57343?_[l++]=1024*(y-55296)+d-56320+65536:(_[l++]=y,_[l++]=d)}else y!==65279&&(_[l++]=y)}return l}},n.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(u,_){const v=u.length;if(!v)return 0;let l,g,b,y,d=0,r=0,h=0;if(this.interim[0]){let m=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let S,w=0;for(;(S=63&this.interim[++w])&&w<4;)C<<=6,C|=S;const p=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=p-w;for(;h<x;){if(h>=v)return 0;if(S=u[h++],(192&S)!=128){h--,m=!0;break}this.interim[w++]=S,C<<=6,C|=63&S}m||(p===2?C<128?h--:_[d++]=C:p===3?C<2048||C>=55296&&C<=57343||C===65279||(_[d++]=C):C<65536||C>1114111||(_[d++]=C)),this.interim.fill(0)}const o=v-4;let c=h;for(;c<v;){for(;!(!(c<o)||128&(l=u[c])||128&(g=u[c+1])||128&(b=u[c+2])||128&(y=u[c+3]));)_[d++]=l,_[d++]=g,_[d++]=b,_[d++]=y,c+=4;if(l=u[c++],l<128)_[d++]=l;else if((224&l)==192){if(c>=v)return this.interim[0]=l,d;if(g=u[c++],(192&g)!=128){c--;continue}if(r=(31&l)<<6|63&g,r<128){c--;continue}_[d++]=r}else if((240&l)==224){if(c>=v)return this.interim[0]=l,d;if(g=u[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,d;if(b=u[c++],(192&b)!=128){c--;continue}if(r=(15&l)<<12|(63&g)<<6|63&b,r<2048||r>=55296&&r<=57343||r===65279)continue;_[d++]=r}else if((248&l)==240){if(c>=v)return this.interim[0]=l,d;if(g=u[c++],(192&g)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,d;if(b=u[c++],(192&b)!=128){c--;continue}if(c>=v)return this.interim[0]=l,this.interim[1]=g,this.interim[2]=b,d;if(y=u[c++],(192&y)!=128){c--;continue}if(r=(7&l)<<18|(63&g)<<12|(63&b)<<6|63&y,r<65536||r>1114111)continue;_[d++]=r}}return d}}},776:function(P,n,u){var _=this&&this.__decorate||function(r,h,o,c){var m,C=arguments.length,S=C<3?h:c===null?c=Object.getOwnPropertyDescriptor(h,o):c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(r,h,o,c);else for(var w=r.length-1;w>=0;w--)(m=r[w])&&(S=(C<3?m(S):C>3?m(h,o,S):m(h,o))||S);return C>3&&S&&Object.defineProperty(h,o,S),S},v=this&&this.__param||function(r,h){return function(o,c){h(o,c,r)}};Object.defineProperty(n,"__esModule",{value:!0}),n.traceCall=n.setTraceLogger=n.LogService=void 0;const l=u(859),g=u(97),b={trace:g.LogLevelEnum.TRACE,debug:g.LogLevelEnum.DEBUG,info:g.LogLevelEnum.INFO,warn:g.LogLevelEnum.WARN,error:g.LogLevelEnum.ERROR,off:g.LogLevelEnum.OFF};let y,d=n.LogService=class extends l.Disposable{get logLevel(){return this._logLevel}constructor(r){super(),this._optionsService=r,this._logLevel=g.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),y=this}_updateLogLevel(){this._logLevel=b[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(r){for(let h=0;h<r.length;h++)typeof r[h]=="function"&&(r[h]=r[h]())}_log(r,h,o){this._evalLazyOptionalParams(o),r.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+h,...o)}trace(r,...h){var o;this._logLevel<=g.LogLevelEnum.TRACE&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.trace.bind(this._optionsService.options.logger))??console.log,r,h)}debug(r,...h){var o;this._logLevel<=g.LogLevelEnum.DEBUG&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.debug.bind(this._optionsService.options.logger))??console.log,r,h)}info(r,...h){var o;this._logLevel<=g.LogLevelEnum.INFO&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.info.bind(this._optionsService.options.logger))??console.info,r,h)}warn(r,...h){var o;this._logLevel<=g.LogLevelEnum.WARN&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.warn.bind(this._optionsService.options.logger))??console.warn,r,h)}error(r,...h){var o;this._logLevel<=g.LogLevelEnum.ERROR&&this._log(((o=this._optionsService.options.logger)==null?void 0:o.error.bind(this._optionsService.options.logger))??console.error,r,h)}};n.LogService=d=_([v(0,g.IOptionsService)],d),n.setTraceLogger=function(r){y=r},n.traceCall=function(r,h,o){if(typeof o.value!="function")throw new Error("not supported");const c=o.value;o.value=function(...m){if(y.logLevel!==g.LogLevelEnum.TRACE)return c.apply(this,m);y.trace(`GlyphRenderer#${c.name}(${m.map((S=>JSON.stringify(S))).join(", ")})`);const C=c.apply(this,m);return y.trace(`GlyphRenderer#${c.name} return`,C),C}}},726:(P,n)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.createDecorator=n.getServiceDependencies=n.serviceRegistry=void 0;const u="di$target",_="di$dependencies";n.serviceRegistry=new Map,n.getServiceDependencies=function(v){return v[_]||[]},n.createDecorator=function(v){if(n.serviceRegistry.has(v))return n.serviceRegistry.get(v);const l=function(g,b,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(d,r,h){r[u]===r?r[_].push({id:d,index:h}):(r[_]=[{id:d,index:h}],r[u]=r)})(l,g,y)};return l.toString=()=>v,n.serviceRegistry.set(v,l),l}},97:(P,n,u)=>{Object.defineProperty(n,"__esModule",{value:!0}),n.IDecorationService=n.IUnicodeService=n.IOscLinkService=n.IOptionsService=n.ILogService=n.LogLevelEnum=n.IInstantiationService=n.ICharsetService=n.ICoreService=n.ICoreMouseService=n.IBufferService=void 0;const _=u(726);var v;n.IBufferService=(0,_.createDecorator)("BufferService"),n.ICoreMouseService=(0,_.createDecorator)("CoreMouseService"),n.ICoreService=(0,_.createDecorator)("CoreService"),n.ICharsetService=(0,_.createDecorator)("CharsetService"),n.IInstantiationService=(0,_.createDecorator)("InstantiationService"),(function(l){l[l.TRACE=0]="TRACE",l[l.DEBUG=1]="DEBUG",l[l.INFO=2]="INFO",l[l.WARN=3]="WARN",l[l.ERROR=4]="ERROR",l[l.OFF=5]="OFF"})(v||(n.LogLevelEnum=v={})),n.ILogService=(0,_.createDecorator)("LogService"),n.IOptionsService=(0,_.createDecorator)("OptionsService"),n.IOscLinkService=(0,_.createDecorator)("OscLinkService"),n.IUnicodeService=(0,_.createDecorator)("UnicodeService"),n.IDecorationService=(0,_.createDecorator)("DecorationService")}},j={};function Z(P){var n=j[P];if(n!==void 0)return n.exports;var u=j[P]={exports:{}};return W[P].call(u.exports,u,u.exports,Z),u.exports}var ie={};return(()=>{var P=ie;Object.defineProperty(P,"__esModule",{value:!0}),P.WebglAddon=void 0;const n=Z(345),u=Z(859),_=Z(399),v=Z(666),l=Z(776);class g extends u.Disposable{constructor(y){if(_.isSafari&&(0,_.getSafariVersion)()<16){const d={antialias:!1,depth:!1,preserveDrawingBuffer:!0};if(!document.createElement("canvas").getContext("webgl2",d))throw new Error("Webgl2 is only supported on Safari 16 and above")}super(),this._preserveDrawingBuffer=y,this._onChangeTextureAtlas=this.register(new n.EventEmitter),this.onChangeTextureAtlas=this._onChangeTextureAtlas.event,this._onAddTextureAtlasCanvas=this.register(new n.EventEmitter),this.onAddTextureAtlasCanvas=this._onAddTextureAtlasCanvas.event,this._onRemoveTextureAtlasCanvas=this.register(new n.EventEmitter),this.onRemoveTextureAtlasCanvas=this._onRemoveTextureAtlasCanvas.event,this._onContextLoss=this.register(new n.EventEmitter),this.onContextLoss=this._onContextLoss.event}activate(y){const d=y._core;if(!y.element)return void this.register(d.onWillOpen((()=>this.activate(y))));this._terminal=y;const r=d.coreService,h=d.optionsService,o=d,c=o._renderService,m=o._characterJoinerService,C=o._charSizeService,S=o._coreBrowserService,w=o._decorationService,p=o._logService,x=o._themeService;(0,l.setTraceLogger)(p),this._renderer=this.register(new v.WebglRenderer(y,m,C,S,r,w,h,x,this._preserveDrawingBuffer)),this.register((0,n.forwardEvent)(this._renderer.onContextLoss,this._onContextLoss)),this.register((0,n.forwardEvent)(this._renderer.onChangeTextureAtlas,this._onChangeTextureAtlas)),this.register((0,n.forwardEvent)(this._renderer.onAddTextureAtlasCanvas,this._onAddTextureAtlasCanvas)),this.register((0,n.forwardEvent)(this._renderer.onRemoveTextureAtlasCanvas,this._onRemoveTextureAtlasCanvas)),c.setRenderer(this._renderer),this.register((0,u.toDisposable)((()=>{const L=this._terminal._core._renderService;L.setRenderer(this._terminal._core._createRenderer()),L.handleResize(y.cols,y.rows)})))}get textureAtlas(){var y;return(y=this._renderer)==null?void 0:y.textureAtlas}clearTextureAtlas(){var y;(y=this._renderer)==null||y.clearTextureAtlas()}}P.WebglAddon=g})(),ie})()))})(Uo)),Uo.exports}var sg=ig(),Io={exports:{}},rf;function rg(){return rf||(rf=1,(function(B,Y){(function(W,j){B.exports=j()})(self,(()=>(()=>{var W={6:(P,n)=>{function u(v){try{const l=new URL(v),g=l.password&&l.username?`${l.protocol}//${l.username}:${l.password}@${l.host}`:l.username?`${l.protocol}//${l.username}@${l.host}`:`${l.protocol}//${l.host}`;return v.toLocaleLowerCase().startsWith(g.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(n,"__esModule",{value:!0}),n.LinkComputer=n.WebLinkProvider=void 0,n.WebLinkProvider=class{constructor(v,l,g,b={}){this._terminal=v,this._regex=l,this._handler=g,this._options=b}provideLinks(v,l){const g=_.computeLink(v,this._regex,this._terminal,this._handler);l(this._addCallbacks(g))}_addCallbacks(v){return v.map((l=>(l.leave=this._options.leave,l.hover=(g,b)=>{if(this._options.hover){const{range:y}=l;this._options.hover(g,b,y)}},l)))}};class _{static computeLink(l,g,b,y){const d=new RegExp(g.source,(g.flags||"")+"g"),[r,h]=_._getWindowedLineStrings(l-1,b),o=r.join("");let c;const m=[];for(;c=d.exec(o);){const C=c[0];if(!u(C))continue;const[S,w]=_._mapStrIdx(b,h,0,c.index),[p,x]=_._mapStrIdx(b,S,w,C.length);if(S===-1||w===-1||p===-1||x===-1)continue;const L={start:{x:w+1,y:S+1},end:{x,y:p+1}};m.push({range:L,text:C,activate:y})}return m}static _getWindowedLineStrings(l,g){let b,y=l,d=l,r=0,h="";const o=[];if(b=g.buffer.active.getLine(l)){const c=b.translateToString(!0);if(b.isWrapped&&c[0]!==" "){for(r=0;(b=g.buffer.active.getLine(--y))&&r<2048&&(h=b.translateToString(!0),r+=h.length,o.push(h),b.isWrapped&&h.indexOf(" ")===-1););o.reverse()}for(o.push(c),r=0;(b=g.buffer.active.getLine(++d))&&b.isWrapped&&r<2048&&(h=b.translateToString(!0),r+=h.length,o.push(h),h.indexOf(" ")===-1););}return[o,y]}static _mapStrIdx(l,g,b,y){const d=l.buffer.active,r=d.getNullCell();let h=b;for(;y;){const o=d.getLine(g);if(!o)return[-1,-1];for(let c=h;c<o.length;++c){o.getCell(c,r);const m=r.getChars();if(r.getWidth()&&(y-=m.length||1,c===o.length-1&&m==="")){const C=d.getLine(g+1);C&&C.isWrapped&&(C.getCell(0,r),r.getWidth()===2&&(y+=1))}if(y<0)return[g,c]}g++,h=0}return[g,h]}}n.LinkComputer=_}},j={};function Z(P){var n=j[P];if(n!==void 0)return n.exports;var u=j[P]={exports:{}};return W[P](u,u.exports,Z),u.exports}var ie={};return(()=>{var P=ie;Object.defineProperty(P,"__esModule",{value:!0}),P.WebLinksAddon=void 0;const n=Z(6),u=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function _(v,l){const g=window.open();if(g){try{g.opener=null}catch{}g.location.href=l}else console.warn("Opening link blocked as opener could not be cleared")}P.WebLinksAddon=class{constructor(v=_,l={}){this._handler=v,this._options=l}activate(v){this._terminal=v;const l=this._options,g=l.urlRegex||u;this._linkProvider=this._terminal.registerLinkProvider(new n.WebLinkProvider(this._terminal,g,this._handler,l))}dispose(){var v;(v=this._linkProvider)==null||v.dispose()}}})(),ie})()))})(Io)),Io.exports}var ng=rg();const ag={background:"#09090b",foreground:"#e4e4e7",cursor:"#f97316",cursorAccent:"#09090b",selectionBackground:"#3f3f46",selectionInactiveBackground:"#27272a",black:"#27272a",red:"#f87171",green:"#86efac",yellow:"#fde68a",blue:"#93c5fd",magenta:"#f0abfc",cyan:"#67e8f9",white:"#e4e4e7",brightBlack:"#52525b",brightRed:"#fca5a5",brightGreen:"#bbf7d0",brightYellow:"#fef3c7",brightBlue:"#bfdbfe",brightMagenta:"#f5d0fe",brightCyan:"#a5f3fc",brightWhite:"#fafafa"},lg='"JetBrains Mono", ui-monospace, "SF Mono", "Menlo", monospace';function ff({sessionId:B,onExit:Y}){const W=de.useRef(null);return de.useEffect(()=>{var l;if(!W.current)return;const j=new Jv.Terminal({fontFamily:lg,fontSize:13,fontWeight:400,fontWeightBold:600,lineHeight:1.35,letterSpacing:0,cursorBlink:!0,cursorStyle:"block",cursorWidth:1,scrollback:8e3,smoothScrollDuration:80,drawBoldTextInBrightColors:!1,minimumContrastRatio:1,allowProposedApi:!0,theme:ag}),Z=new tg.FitAddon;j.loadAddon(Z),j.loadAddon(new ng.WebLinksAddon),j.open(W.current);let ie=null;try{ie=new sg.WebglAddon,ie.onContextLoss(()=>{ie==null||ie.dispose(),ie=null}),j.loadAddon(ie)}catch{}requestAnimationFrame(()=>{try{Z.fit()}catch{}});const P=new WebSocket(Iv(`/api/sessions/${encodeURIComponent(B)}/pty`));P.binaryType="arraybuffer";let n=!1;P.onmessage=g=>{if(typeof g.data=="string"){try{const y=JSON.parse(g.data);if(y.type==="hello"){n=!0;const d=Z.proposeDimensions();d&&P.send(JSON.stringify({type:"resize",cols:d.cols,rows:d.rows}))}else y.type==="exit"&&(Y==null||Y({exitCode:y.exitCode}))}catch{}return}const b=g.data instanceof ArrayBuffer?new Uint8Array(g.data):g.data;j.write(b)},P.onclose=()=>{j.write(`\r
|
|
115
115
|
\x1B[38;5;245m[connection closed]\x1B[0m\r
|
|
116
|
-
`)},
|
|
116
|
+
`)},P.onerror=()=>{j.write(`\r
|
|
117
117
|
\x1B[38;5;167m[websocket error]\x1B[0m\r
|
|
118
|
-
`)};const f=j.onData(g=>{F.readyState===WebSocket.OPEN&&F.send(JSON.stringify({type:"input",data:g}))}),_=()=>{try{if(Z.fit(),F.readyState===WebSocket.OPEN&&n){const g=Z.proposeDimensions();g&&F.send(JSON.stringify({type:"resize",cols:g.cols,rows:g.rows}))}}catch{}},v=new ResizeObserver(_);return v.observe(G.current),typeof document<"u"&&((l=document.fonts)!=null&&l.ready)&&document.fonts.ready.then(()=>{try{Z.fit()}catch{}}),()=>{v.disconnect(),f.dispose();try{F.close()}catch{}try{se==null||se.dispose()}catch{}j.dispose()}},[O,Y]),D.jsx("div",{ref:G,className:"h-full w-full"})}const ng={queued:"bg-zinc-500",assigning:"bg-blue-300 animate-pulse",running:"bg-blue-400 animate-pulse",completed:"bg-green-500",pr_open:"bg-amber-400",pr_closed:"bg-rose-500",merged:"bg-orange-500",cleaned:"bg-zinc-600",failed:"bg-red-500"};function ag({status:O}){return D.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${ng[O]}`,"aria-label":O})}const lg={queued:"neutral",assigning:"blue",running:"blue",completed:"green",pr_open:"amber",pr_closed:"red",merged:"orange",cleaned:"neutral",failed:"red"};function og({taskId:O}){const{navigate:Y}=es(),[G,j]=de.useState(null),[Z,se]=de.useState([]),[F,n]=de.useState(null);de.useEffect(()=>{let _=!1;const v=async()=>{try{const[g,b]=await Promise.all([st.task(O),st.sessions()]);if(_)return;j(g),se(b)}catch(g){_||n(g)}};v();const l=setInterval(v,4e3);return()=>{_=!0,clearInterval(l)}},[O]);const f=Z.find(_=>_.taskId===O&&_.status==="running");return F?D.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-12 text-red-300",children:["Failed to load: ",F.message]}):G?D.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-6 flex flex-col gap-4 h-[calc(100vh-65px)]",children:[D.jsxs("div",{className:"flex items-center gap-3",children:[D.jsx(Xe,{variant:"ghost",onClick:()=>Y("/"),children:"← Back"}),D.jsx(ag,{status:G.status}),D.jsxs("span",{className:"font-mono text-xs text-zinc-500",children:["#",G.id]}),D.jsx("h1",{className:"text-lg font-semibold text-zinc-100 truncate",children:G.issueTitle}),D.jsx(Ji,{tone:lg[G.status],children:cf[G.status]})]}),D.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-zinc-500",children:[D.jsxs("span",{className:"font-mono",children:[G.kind==="review"?"PR":"issue"," ",G.repoSlug,"#",G.issueNumber]}),D.jsx("span",{children:"·"}),D.jsxs("span",{children:["branch ",D.jsx("code",{className:"text-zinc-300",children:G.branch})]}),D.jsx("span",{children:"·"}),D.jsxs("span",{children:["agent ",D.jsx("code",{className:"text-zinc-300",children:G.agent})]}),D.jsx("span",{children:"·"}),D.jsxs("span",{children:["kind ",D.jsx("code",{className:"text-zinc-300",children:G.kind})]}),G.prUrl&&D.jsxs(D.Fragment,{children:[D.jsx("span",{children:"·"}),D.jsx("a",{className:"text-orange-400 hover:underline",href:G.prUrl,target:"_blank",rel:"noreferrer",children:G.prUrl.replace("https://github.com/","")})]}),G.exitCode!==null&&D.jsxs(D.Fragment,{children:[D.jsx("span",{children:"·"}),D.jsxs("span",{children:["exit ",G.exitCode]})]}),D.jsx("span",{className:"ml-auto"}),f?D.jsxs("div",{className:"flex items-center gap-2",children:[G.status==="running"&&D.jsx(Xe,{variant:"ghost",onClick:async()=>{try{j(await st.markDone(G.id))}catch(_){alert(_.message)}},children:"Mark done"}),D.jsx(Xe,{variant:"danger",onClick:async()=>{if(confirm("Send SIGTERM to this session?"))try{await st.killSession(f.id)}catch(_){alert(_.message)}},children:"Kill session"})]}):D.jsxs("div",{className:"flex items-center gap-2",children:[G.status!=="queued"&&G.status!=="running"&&D.jsx(Xe,{onClick:async()=>{try{await st.retryTask(G.id),j(await st.task(G.id))}catch(_){alert(_.message)}},children:"Resume"}),(G.status==="completed"||G.status==="failed"||G.status==="merged"||G.status==="pr_open"||G.status==="pr_closed"||G.status==="cleaned")&&D.jsx(Xe,{variant:"ghost",onClick:async()=>{if(confirm("Remove the worktree for this task?"))try{await st.cleanupTask(G.id),Y("/")}catch(_){alert(_.message)}},children:"Cleanup worktree"})]})]}),D.jsxs("div",{className:"flex-1 min-h-[400px] overflow-hidden rounded-xl border border-zinc-800 bg-zinc-950 shadow-[0_0_0_1px_rgba(255,255,255,0.02)_inset,0_20px_60px_-20px_rgba(0,0,0,0.6)]",children:[D.jsxs("div",{className:"flex items-center gap-1.5 border-b border-zinc-800/80 px-3 py-2",children:[D.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),D.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),D.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),D.jsxs("span",{className:"ml-3 text-[11px] font-mono text-zinc-500 truncate",children:[G.repoSlug," · ",G.branch]})]}),D.jsx("div",{className:"h-[calc(100%-37px)] p-3",children:f?D.jsx(uf,{sessionId:f.id}):D.jsx("div",{className:"h-full flex items-center justify-center text-sm text-zinc-500",children:G.status==="queued"?"Waiting in queue — terminal will attach when the task starts.":"No live session for this task. Output is preserved at ~/.tono/logs/task-"+G.id+".log."})})]})]}):D.jsx("div",{className:"mx-auto max-w-4xl px-6 py-12 text-zinc-500",children:"Loading…"})}function cg({sessionId:O}){const{navigate:Y}=es(),[G,j]=de.useState(null),[Z,se]=de.useState(null);return de.useEffect(()=>{let F=!1;const n=async()=>{try{const _=await st.sessions();if(F)return;j(_.find(v=>v.id===O)??null)}catch(_){F||se(_.message)}};n();const f=setInterval(n,4e3);return()=>{F=!0,clearInterval(f)}},[O]),Z?D.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-12 text-red-300",children:["Failed to load: ",Z]}):G?D.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-6 flex flex-col gap-4 h-[calc(100vh-65px)]",children:[D.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[D.jsx(Xe,{variant:"ghost",onClick:()=>Y("/"),children:"← Back"}),D.jsx(Ji,{tone:G.status==="running"?"blue":"neutral",children:G.status}),D.jsx("h1",{className:"text-base font-medium text-zinc-100",children:"Shell"}),D.jsx("span",{className:"text-xs text-zinc-500 font-mono truncate",children:G.label??"—"}),D.jsx("span",{className:"ml-auto"}),G.status==="running"&&D.jsx(Xe,{variant:"danger",onClick:async()=>{if(confirm("Close this shell?"))try{await st.killSession(G.id)}catch(F){alert(F.message)}},children:"Close shell"})]}),D.jsxs("div",{className:"flex-1 min-h-[400px] overflow-hidden rounded-xl border border-zinc-800 bg-zinc-950 shadow-[0_0_0_1px_rgba(255,255,255,0.02)_inset,0_20px_60px_-20px_rgba(0,0,0,0.6)]",children:[D.jsxs("div",{className:"flex items-center gap-1.5 border-b border-zinc-800/80 px-3 py-2",children:[D.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),D.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),D.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),D.jsx("span",{className:"ml-3 text-[11px] font-mono text-zinc-500 truncate",children:G.label??`shell · pid ${G.pid}`})]}),D.jsx("div",{className:"h-[calc(100%-37px)] p-3",children:D.jsx(uf,{sessionId:G.id})})]})]}):D.jsx("div",{className:"mx-auto max-w-4xl px-6 py-12 text-zinc-500",children:"Loading shell…"})}function hg(){const[O,Y]=de.useState(null),[G,j]=de.useState(""),[Z,se]=de.useState(""),[F,n]=de.useState(!0),[f,_]=de.useState(null),v=de.useCallback(async()=>{n(!0),_(null);try{const b=await st.rawConfig();se(b.path),j(b.content),Y(JSON.parse(b.content))}catch(b){_(b.message)}finally{n(!1)}},[]);de.useEffect(()=>{v()},[v]);const l=de.useCallback(async b=>{if(!O)throw new Error("config not loaded");const y=b(O),u=JSON.stringify(y,null,2);await st.saveRawConfig(u),Y(y),j(u)},[O]),g=de.useCallback(async b=>{await st.saveRawConfig(b),j(b),Y(JSON.parse(b))},[]);return{cfg:O,rawText:G,path:Z,loading:F,loadError:f,save:l,saveRaw:g,reload:v}}function oi({title:O,action:Y,children:G}){return D.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 backdrop-blur-sm",children:[(O||Y)&&D.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-800 px-4 py-3",children:[D.jsx("div",{className:"text-sm font-medium text-zinc-200",children:O}),Y]}),D.jsx("div",{className:"p-4",children:G})]})}function Pt({className:O="",...Y}){return D.jsx("input",{className:`w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-1.5 text-sm text-zinc-100 placeholder:text-zinc-500 outline-none focus:border-zinc-500 disabled:opacity-50 ${O}`,...Y})}function Ct({label:O,hint:Y,children:G}){return D.jsxs("label",{className:"block",children:[D.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[D.jsx("span",{className:"text-xs uppercase tracking-wide text-zinc-400",children:O}),Y&&D.jsx("span",{className:"text-[11px] text-zinc-500",children:Y})]}),G]})}function ug({cfg:O,save:Y}){const[G,j]=de.useState(O.server.host),[Z,se]=de.useState(String(O.server.port)),[F,n]=de.useState(!1),[f,_]=de.useState(null);de.useEffect(()=>{j(O.server.host),se(String(O.server.port))},[O.server.host,O.server.port]);const v=G!==O.server.host||Z!==String(O.server.port),l=async()=>{_(null);const g=Number(Z);if(!Number.isInteger(g)||g<1||g>65535){_("port must be 1–65535");return}n(!0);try{await Y(b=>({...b,server:{host:G,port:g}}))}catch(b){_(b.message)}finally{n(!1)}};return D.jsxs(oi,{title:"Server",action:D.jsx(Xe,{disabled:!v||F,onClick:l,children:F?"Saving…":"Save"}),children:[D.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[D.jsx(Ct,{label:"Host",hint:"0.0.0.0 = LAN, 127.0.0.1 = local only",children:D.jsx(Pt,{value:G,onChange:g=>j(g.target.value)})}),D.jsx(Ct,{label:"Port",children:D.jsx(Pt,{type:"number",min:1,max:65535,value:Z,onChange:g=>se(g.target.value)})})]}),f&&D.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300 whitespace-pre-wrap",children:f}),D.jsx("p",{className:"mt-3 text-[11px] text-zinc-500",children:"Restart the gateway after changing host or port."})]})}function dg({cfg:O,save:Y}){const[G,j]=de.useState(String(O.github.pollIntervalSeconds)),[Z,se]=de.useState(!1),[F,n]=de.useState(null);de.useEffect(()=>{j(String(O.github.pollIntervalSeconds))},[O.github.pollIntervalSeconds]);const f=Number(G)!==O.github.pollIntervalSeconds,_=async()=>{n(null);const v=Number(G);if(!Number.isInteger(v)||v<10||v>3600){n("poll interval must be 10–3600 seconds");return}se(!0);try{await Y(l=>({...l,github:{...l.github,pollIntervalSeconds:v}}))}catch(l){n(l.message)}finally{se(!1)}};return D.jsxs(oi,{title:"GitHub",action:D.jsx(Xe,{disabled:!f||Z,onClick:_,children:Z?"Saving…":"Save"}),children:[D.jsx(Ct,{label:"Poll interval (seconds)",hint:"how often the poller checks for newly-labeled issues and PRs",children:D.jsx(Pt,{type:"number",min:10,max:3600,value:G,onChange:v=>j(v.target.value)})}),D.jsxs("p",{className:"mt-3 text-[11px] text-zinc-500",children:["Trigger labels are convention-based. Each agent listens for ",D.jsx("code",{children:"tono-<name>"})," on issues and"," ",D.jsx("code",{children:"tono-<name>-review"})," on PRs."]}),F&&D.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:F})]})}function fg({cfg:O,save:Y}){const[G,j]=de.useState(O.workspaces.root),[Z,se]=de.useState(!1),[F,n]=de.useState(null);de.useEffect(()=>j(O.workspaces.root),[O.workspaces.root]);const f=G!==O.workspaces.root,_=async()=>{if(n(null),!G.trim()){n("workspace root must not be empty");return}se(!0);try{await Y(v=>({...v,workspaces:{root:G.trim()}}))}catch(v){n(v.message)}finally{se(!1)}};return D.jsxs(oi,{title:"Workspaces",action:D.jsx(Xe,{disabled:!f||Z,onClick:_,children:Z?"Saving…":"Save"}),children:[D.jsx(Ct,{label:"Root path",hint:"bare clones land at <root>/.bare/, worktrees at <root>/<owner>__<repo>__issue-N/",children:D.jsx(Pt,{value:G,onChange:v=>j(v.target.value),placeholder:"~/.tono/workspaces"})}),F&&D.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:F})]})}const _g=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/;function vg({cfg:O,agents:Y,save:G}){return D.jsxs(oi,{title:D.jsxs("span",{className:"flex items-center gap-2",children:["Repos",D.jsx("span",{className:"text-xs text-zinc-500",children:O.repos.length})]}),children:[D.jsxs("div",{className:"space-y-2",children:[O.repos.map((j,Z)=>D.jsx(mg,{repo:j,agents:Y,onSave:async se=>{await G(F=>({...F,repos:F.repos.map((n,f)=>f===Z?se:n)}))},onRemove:async()=>{confirm(`Remove ${j.slug}?`)&&await G(se=>({...se,repos:se.repos.filter((F,n)=>n!==Z)}))}},`${j.slug}-${Z}`)),O.repos.length===0&&D.jsx("div",{className:"rounded-md border border-dashed border-zinc-800 px-4 py-6 text-center text-sm text-zinc-500",children:"No repos yet. Add one below."}),D.jsx(Sg,{agents:Y,existing:O.repos.map(j=>j.slug),onAdd:async j=>{await G(Z=>({...Z,repos:[...Z.repos,j]}))}})]}),D.jsxs("p",{className:"mt-3 text-[11px] text-zinc-500",children:["Each enrolled agent listens for ",D.jsx("code",{children:"tono-<name>"})," on issues and"," ",D.jsx("code",{children:"tono-<name>-review"})," on pull requests."]})]})}function rf(O){return O==="claude-code"?"claude":O}function nf(O,Y){return O&&O.length>0?O:Y}function gg(O,Y){return O.defaultAgent&&Y.includes(O.defaultAgent)?O.defaultAgent:Y.length===1?Y[0]:null}function mg({repo:O,agents:Y,onSave:G,onRemove:j}){const[Z,se]=de.useState(!1),[F,n]=de.useState(O.path??""),[f,_]=de.useState(O.baseBranch),[v,l]=de.useState(new Set(nf(O.agents,Y))),[g,b]=de.useState(O.defaultAgent??""),[y,u]=de.useState(!1),[r,h]=de.useState(null);if(!Z){const m=nf(O.agents,Y),C=gg(O,m);return D.jsxs("div",{className:"rounded-md border border-zinc-800 bg-zinc-900/40 px-3 py-2 min-w-0",children:[D.jsxs("div",{className:"flex items-start justify-between gap-2",children:[D.jsx("code",{className:"text-zinc-100 text-sm break-all",children:O.slug}),D.jsxs("div",{className:"shrink-0 flex items-center gap-2",children:[D.jsx(Xe,{variant:"ghost",onClick:()=>se(!0),children:"Edit"}),D.jsx(Xe,{variant:"danger",onClick:j,children:"Remove"})]})]}),D.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-zinc-400",children:[D.jsxs("span",{children:["base ",D.jsx("span",{className:"text-zinc-200",children:O.baseBranch})]}),D.jsx("span",{className:"text-zinc-600",children:"·"}),D.jsxs("span",{children:["agents ",D.jsx("span",{className:"text-zinc-200",children:m.join(", ")||"(none)"})]}),O.agents===void 0&&D.jsx("span",{className:"text-[10px] text-zinc-500 uppercase",children:"all"}),D.jsx("span",{className:"text-zinc-600",children:"·"}),D.jsxs("span",{children:["default"," ",D.jsx("span",{className:"text-zinc-200",children:C??"(none — bare labels ignored)"}),C&&!O.defaultAgent&&D.jsx("span",{className:"ml-1 text-[10px] text-zinc-500 uppercase",children:"only enrolled"})]})]}),D.jsx("div",{className:"mt-1 text-xs text-zinc-500 font-mono break-all",children:O.path??D.jsx("span",{className:"italic",children:"tono will bare-clone via gh"})}),m.length>0&&D.jsx("div",{className:"mt-1 flex flex-wrap gap-1 text-[10px] text-zinc-500",children:m.map(S=>D.jsxs("span",{children:[D.jsxs("code",{className:"text-zinc-300",children:["tono-",rf(S)]})," / ",D.jsxs("code",{className:"text-zinc-300",children:["tono-",rf(S),"-review"]})]},S))})]})}const o=async()=>{if(h(null),!f.trim()){h("base branch is required");return}if(v.size===0){h("at least one agent must be enrolled");return}u(!0);try{const m=Y.filter(w=>v.has(w)),C=m.length===Y.length,S=m.length>1&&g&&v.has(g);await G({slug:O.slug,baseBranch:f.trim(),...F.trim()?{path:F.trim()}:{},...C?{}:{agents:m},...S?{defaultAgent:g}:{}}),se(!1)}catch(m){h(m.message)}finally{u(!1)}},c=Y.filter(m=>v.has(m));return D.jsxs("div",{className:"rounded-md border border-zinc-700 bg-zinc-900/60 p-3 space-y-3",children:[D.jsxs("div",{className:"flex items-center justify-between",children:[D.jsx("code",{className:"text-sm text-zinc-100",children:O.slug}),D.jsx("span",{className:"text-[11px] text-zinc-500",children:"slug isn't editable; remove and re-add to rename"})]}),D.jsx(Ct,{label:"Path to local clone",hint:"optional; blank = bare-clone via gh",children:D.jsx(Pt,{value:F,onChange:m=>n(m.target.value),placeholder:"/Users/me/code/repo (or leave blank)"})}),D.jsx(Ct,{label:"Base branch",children:D.jsx(Pt,{value:f,onChange:m=>_(m.target.value)})}),D.jsx(df,{agents:Y,enrolled:v,onToggle:m=>{const C=new Set(v);C.has(m)?C.delete(m):C.add(m),l(C)}}),c.length>1&&D.jsx(pg,{enrolled:c,value:g,onChange:b}),r&&D.jsx("div",{className:"rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:r}),D.jsxs("div",{className:"flex justify-end gap-2",children:[D.jsx(Xe,{variant:"ghost",disabled:y,onClick:()=>se(!1),children:"Cancel"}),D.jsx(Xe,{disabled:y,onClick:o,children:y?"Saving…":"Save"})]})]})}function pg({enrolled:O,value:Y,onChange:G}){return D.jsx(Ct,{label:"Default agent",hint:"handles bare `tono` and `tono-review` labels",children:D.jsxs("select",{value:Y,onChange:j=>G(j.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm",children:[D.jsx("option",{value:"",children:"(no default — bare labels ignored)"}),O.map(j=>D.jsx("option",{value:j,children:j},j))]})})}function df({agents:O,enrolled:Y,onToggle:G}){return D.jsxs("div",{children:[D.jsx("div",{className:"text-xs text-zinc-400 mb-1",children:"Enrolled agents"}),D.jsx("div",{className:"flex flex-wrap gap-3",children:O.length===0?D.jsx("span",{className:"text-xs text-zinc-500 italic",children:"no agents declared in config"}):O.map(j=>D.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-zinc-200",children:[D.jsx("input",{type:"checkbox",checked:Y.has(j),onChange:()=>G(j),className:"h-4 w-4 accent-orange-500"}),D.jsx("span",{children:j})]},j))})]})}function Sg({agents:O,existing:Y,onAdd:G}){const[j,Z]=de.useState(""),[se,F]=de.useState(""),[n,f]=de.useState("main"),[_,v]=de.useState(new Set(O)),[l,g]=de.useState(!1),[b,y]=de.useState(null),u=async()=>{y(null);const r=j.trim();if(!_g.test(r)){y("slug must be owner/repo");return}if(Y.includes(r)){y("repo is already configured");return}if(_.size===0){y("at least one agent must be enrolled");return}g(!0);try{const h=O.filter(c=>_.has(c)),o=h.length===O.length;await G({slug:r,baseBranch:n.trim()||"main",...se.trim()?{path:se.trim()}:{},...o?{}:{agents:h}}),Z(""),F(""),f("main"),v(new Set(O))}catch(h){y(h.message)}finally{g(!1)}};return D.jsxs("div",{className:"rounded-md border border-dashed border-zinc-700 bg-zinc-900/30 p-3 space-y-3",children:[D.jsx("div",{className:"text-xs uppercase tracking-wide text-zinc-400",children:"Add a repo"}),D.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[D.jsx(Ct,{label:"Slug",hint:"owner/repo on GitHub",children:D.jsx(Pt,{value:j,onChange:r=>Z(r.target.value),placeholder:"loopedautomation/mono"})}),D.jsx(Ct,{label:"Path to local clone",hint:"optional; blank = tono bare-clones",children:D.jsx(Pt,{value:se,onChange:r=>F(r.target.value),placeholder:"(blank = bare-clone via gh)"})})]}),D.jsx(Ct,{label:"Base branch",children:D.jsx(Pt,{value:n,onChange:r=>f(r.target.value),placeholder:"main"})}),D.jsx(df,{agents:O,enrolled:_,onToggle:r=>{const h=new Set(_);h.has(r)?h.delete(r):h.add(r),v(h)}}),b&&D.jsx("div",{className:"rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:b}),D.jsx("div",{className:"flex justify-end",children:D.jsx(Xe,{disabled:l||!j.trim(),onClick:u,children:l?"Adding…":"+ Add repo"})})]})}function af({className:O="",...Y}){return D.jsx("textarea",{className:`w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-mono text-zinc-100 placeholder:text-zinc-500 outline-none focus:border-zinc-500 disabled:opacity-50 resize-y ${O}`,...Y})}const lf={command:"",args:[],concurrency:{implement:1,review:2},promptTemplates:{implement:"",review:""}};function bg({name:O,cfg:Y,save:G}){var p,x,L,B;const j=Y.agents[O]??lf,[Z,se]=de.useState(j.command),[F,n]=de.useState(j.args.join(" ")),[f,_]=de.useState(String(j.concurrency.implement)),[v,l]=de.useState(String(j.concurrency.review)),[g,b]=de.useState(((p=j.promptTemplates)==null?void 0:p.implement)??""),[y,u]=de.useState(((x=j.promptTemplates)==null?void 0:x.review)??""),[r,h]=de.useState(!1),[o,c]=de.useState(null);de.useEffect(()=>{var M,U;const T=Y.agents[O]??lf;se(T.command),n(T.args.join(" ")),_(String(T.concurrency.implement)),l(String(T.concurrency.review)),b(((M=T.promptTemplates)==null?void 0:M.implement)??""),u(((U=T.promptTemplates)==null?void 0:U.review)??"")},[Y.agents,O]);const m=F.length===0?[]:F.split(/\s+/).filter(Boolean),C=Z!==j.command||m.join(" ")!==j.args.join(" ")||Number(f)!==j.concurrency.implement||Number(v)!==j.concurrency.review||g!==(((L=j.promptTemplates)==null?void 0:L.implement)??"")||y!==(((B=j.promptTemplates)==null?void 0:B.review)??""),S=async()=>{if(c(null),!Z.trim()){c("command is required");return}if(!g.trim()||!y.trim()){c("both prompt templates are required");return}const T=Number(f),M=Number(v);if(!Number.isInteger(T)||T<0||T>32||!Number.isInteger(M)||M<0||M>32){c("concurrency must be 0–32");return}h(!0);try{await G(U=>({...U,agents:{...U.agents,[O]:{command:Z.trim(),args:m,concurrency:{implement:T,review:M},promptTemplates:{implement:g,review:y}}}}))}catch(U){c(U.message)}finally{h(!1)}},w=O==="claude-code"?"claude":O;return D.jsxs(oi,{title:D.jsxs("span",{className:"flex items-center gap-2",children:[D.jsxs("span",{children:["Agent ",D.jsx("code",{className:"text-zinc-400 text-xs",children:O})]}),D.jsxs("span",{className:"text-[10px] text-zinc-500",children:["implement: ",D.jsxs("code",{className:"text-zinc-300",children:["tono-",w]})," · review: ",D.jsxs("code",{className:"text-zinc-300 ml-1",children:["tono-",w,"-review"]})]})]}),action:D.jsx(Xe,{disabled:!C||r,onClick:S,children:r?"Saving…":"Save"}),children:[D.jsxs("div",{className:"space-y-3",children:[D.jsx(Ct,{label:"Command",hint:"must be on $PATH",children:D.jsx(Pt,{value:Z,onChange:T=>se(T.target.value),placeholder:"claude"})}),D.jsx(Ct,{label:"Args",hint:"space-separated; use {prompt} placeholder if the CLI takes prompt as a flag",children:D.jsx(Pt,{value:F,onChange:T=>n(T.target.value),placeholder:"--dangerously-skip-permissions"})}),D.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[D.jsx(Ct,{label:"Concurrency (implement)",hint:"max simultaneous issue tasks",children:D.jsx(Pt,{type:"number",min:0,max:32,value:f,onChange:T=>_(T.target.value)})}),D.jsx(Ct,{label:"Concurrency (review)",hint:"max simultaneous PR reviews",children:D.jsx(Pt,{type:"number",min:0,max:32,value:v,onChange:T=>l(T.target.value)})})]}),D.jsx(Ct,{label:"Implement prompt template",hint:"placeholders: {issueNumber} {issueTitle} {issueBody} {repoSlug} {baseBranch} {branch}",children:D.jsx(af,{value:g,onChange:T=>b(T.target.value),rows:8,placeholder:"You are working on..."})}),D.jsx(Ct,{label:"Review prompt template",hint:"placeholders include {prUrl} for the PR being reviewed",children:D.jsx(af,{value:y,onChange:T=>u(T.target.value),rows:8,placeholder:"You are reviewing PR #{issueNumber}..."})})]}),o&&D.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:o})]})}const Po='You are working on GitHub issue #{issueNumber} in {repoSlug}.\n\nTitle: {issueTitle}\n\n{issueBody}\n\nImplement the changes needed to resolve this issue. The current branch is {branch}, based on {baseBranch}. When implementation is complete, commit with a clear message, push the branch with `git push -u origin {branch}`, and open a pull request with `gh pr create --base {baseBranch} --fill`. If the issue is unclear or unsafe to proceed, leave a comment on the issue explaining why with `gh issue comment {issueNumber} --body "<reason>"` and stop.',Fo=`You are reviewing GitHub PR #{issueNumber} in {repoSlug}: "{issueTitle}".
|
|
118
|
+
`)};const u=j.onData(g=>{P.readyState===WebSocket.OPEN&&P.send(JSON.stringify({type:"input",data:g}))}),_=()=>{try{if(Z.fit(),P.readyState===WebSocket.OPEN&&n){const g=Z.proposeDimensions();g&&P.send(JSON.stringify({type:"resize",cols:g.cols,rows:g.rows}))}}catch{}},v=new ResizeObserver(_);return v.observe(W.current),typeof document<"u"&&((l=document.fonts)!=null&&l.ready)&&document.fonts.ready.then(()=>{try{Z.fit()}catch{}}),()=>{v.disconnect(),u.dispose();try{P.close()}catch{}try{ie==null||ie.dispose()}catch{}j.dispose()}},[B,Y]),A.jsx("div",{ref:W,className:"h-full w-full"})}const og={queued:"bg-zinc-500",assigning:"bg-blue-300 animate-pulse",running:"bg-blue-400 animate-pulse",completed:"bg-green-500",pr_open:"bg-amber-400",pr_closed:"bg-rose-500",merged:"bg-orange-500",cleaned:"bg-zinc-600",failed:"bg-red-500"};function cg({status:B}){return A.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${og[B]}`,"aria-label":B})}const hg={queued:"neutral",assigning:"blue",running:"blue",completed:"green",pr_open:"amber",pr_closed:"red",merged:"orange",cleaned:"neutral",failed:"red"};function ug({taskId:B}){const{navigate:Y}=ts(),[W,j]=de.useState(null),[Z,ie]=de.useState([]),[P,n]=de.useState(null);de.useEffect(()=>{let _=!1;const v=async()=>{try{const[g,b]=await Promise.all([tt.task(B),tt.sessions()]);if(_)return;j(g),ie(b)}catch(g){_||n(g)}};v();const l=setInterval(v,4e3);return()=>{_=!0,clearInterval(l)}},[B]);const u=Z.find(_=>_.taskId===B&&_.status==="running");return P?A.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-12 text-red-300",children:["Failed to load: ",P.message]}):W?A.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-6 flex flex-col gap-4 h-[calc(100vh-65px)]",children:[A.jsxs("div",{className:"flex items-center gap-3",children:[A.jsx(Xe,{variant:"ghost",onClick:()=>Y("/"),children:"← Back"}),A.jsx(cg,{status:W.status}),A.jsxs("span",{className:"font-mono text-xs text-zinc-500",children:["#",W.id]}),A.jsx("h1",{className:"text-lg font-semibold text-zinc-100 truncate",children:W.issueTitle}),A.jsx(es,{tone:hg[W.status],children:uf[W.status]})]}),A.jsxs("div",{className:"flex flex-wrap items-center gap-3 text-xs text-zinc-500",children:[A.jsxs("span",{className:"font-mono",children:[W.kind==="review"?"PR":"issue"," ",W.repoSlug,"#",W.issueNumber]}),A.jsx("span",{children:"·"}),A.jsxs("span",{children:["branch ",A.jsx("code",{className:"text-zinc-300",children:W.branch})]}),A.jsx("span",{children:"·"}),A.jsxs("span",{children:["agent ",A.jsx("code",{className:"text-zinc-300",children:W.agent})]}),A.jsx("span",{children:"·"}),A.jsxs("span",{children:["kind ",A.jsx("code",{className:"text-zinc-300",children:W.kind})]}),W.workerHostname&&A.jsxs(A.Fragment,{children:[A.jsx("span",{children:"·"}),A.jsxs("button",{onClick:()=>Y("/workers"),className:"hover:text-zinc-200 transition",title:"View worker details",children:["worker ",A.jsx("code",{className:"text-zinc-300",children:W.workerHostname})]})]}),W.prUrl&&A.jsxs(A.Fragment,{children:[A.jsx("span",{children:"·"}),A.jsx("a",{className:"text-orange-400 hover:underline",href:W.prUrl,target:"_blank",rel:"noreferrer",children:W.prUrl.replace("https://github.com/","")})]}),W.exitCode!==null&&A.jsxs(A.Fragment,{children:[A.jsx("span",{children:"·"}),A.jsxs("span",{children:["exit ",W.exitCode]})]}),A.jsx("span",{className:"ml-auto"}),u?A.jsxs("div",{className:"flex items-center gap-2",children:[W.status==="running"&&A.jsx(Xe,{variant:"ghost",onClick:async()=>{try{j(await tt.markDone(W.id))}catch(_){alert(_.message)}},children:"Mark done"}),A.jsx(Xe,{variant:"danger",onClick:async()=>{if(confirm("Send SIGTERM to this session?"))try{await tt.killSession(u.id)}catch(_){alert(_.message)}},children:"Kill session"})]}):A.jsxs("div",{className:"flex items-center gap-2",children:[W.status!=="queued"&&W.status!=="running"&&A.jsx(Xe,{onClick:async()=>{try{await tt.retryTask(W.id),j(await tt.task(W.id))}catch(_){alert(_.message)}},children:"Resume"}),(W.status==="completed"||W.status==="failed"||W.status==="merged"||W.status==="pr_open"||W.status==="pr_closed"||W.status==="cleaned")&&A.jsx(Xe,{variant:"ghost",onClick:async()=>{if(confirm("Remove the worktree for this task?"))try{await tt.cleanupTask(W.id),Y("/")}catch(_){alert(_.message)}},children:"Cleanup worktree"})]})]}),A.jsxs("div",{className:"flex-1 min-h-[400px] overflow-hidden rounded-xl border border-zinc-800 bg-zinc-950 shadow-[0_0_0_1px_rgba(255,255,255,0.02)_inset,0_20px_60px_-20px_rgba(0,0,0,0.6)]",children:[A.jsxs("div",{className:"flex items-center gap-1.5 border-b border-zinc-800/80 px-3 py-2",children:[A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),A.jsxs("span",{className:"ml-3 text-[11px] font-mono text-zinc-500 truncate",children:[W.repoSlug," · ",W.branch,W.workerHostname&&A.jsxs(A.Fragment,{children:[" · ",A.jsx("span",{className:"text-zinc-400",children:W.workerHostname})]})]})]}),A.jsx("div",{className:"h-[calc(100%-37px)] p-3",children:u?A.jsx(ff,{sessionId:u.id}):A.jsx("div",{className:"h-full flex items-center justify-center text-sm text-zinc-500",children:W.status==="queued"?"Waiting in queue — terminal will attach when the task starts.":"No live session for this task. Output is preserved at ~/.tono/logs/task-"+W.id+".log."})})]})]}):A.jsx("div",{className:"mx-auto max-w-4xl px-6 py-12 text-zinc-500",children:"Loading…"})}function dg({sessionId:B}){const{navigate:Y}=ts(),[W,j]=de.useState(null),[Z,ie]=de.useState(null);return de.useEffect(()=>{let P=!1;const n=async()=>{try{const _=await tt.sessions();if(P)return;j(_.find(v=>v.id===B)??null)}catch(_){P||ie(_.message)}};n();const u=setInterval(n,4e3);return()=>{P=!0,clearInterval(u)}},[B]),Z?A.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-12 text-red-300",children:["Failed to load: ",Z]}):W?A.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-6 flex flex-col gap-4 h-[calc(100vh-65px)]",children:[A.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[A.jsx(Xe,{variant:"ghost",onClick:()=>Y("/"),children:"← Back"}),A.jsx(es,{tone:W.status==="running"?"blue":"neutral",children:W.status}),A.jsx("h1",{className:"text-base font-medium text-zinc-100",children:"Shell"}),A.jsx("span",{className:"text-xs text-zinc-500 font-mono truncate",children:W.label??"—"}),A.jsx("span",{className:"ml-auto"}),W.status==="running"&&A.jsx(Xe,{variant:"danger",onClick:async()=>{if(confirm("Close this shell?"))try{await tt.killSession(W.id)}catch(P){alert(P.message)}},children:"Close shell"})]}),A.jsxs("div",{className:"flex-1 min-h-[400px] overflow-hidden rounded-xl border border-zinc-800 bg-zinc-950 shadow-[0_0_0_1px_rgba(255,255,255,0.02)_inset,0_20px_60px_-20px_rgba(0,0,0,0.6)]",children:[A.jsxs("div",{className:"flex items-center gap-1.5 border-b border-zinc-800/80 px-3 py-2",children:[A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),A.jsx("span",{className:"h-2.5 w-2.5 rounded-full bg-zinc-700"}),A.jsx("span",{className:"ml-3 text-[11px] font-mono text-zinc-500 truncate",children:W.label??`shell · pid ${W.pid}`})]}),A.jsx("div",{className:"h-[calc(100%-37px)] p-3",children:A.jsx(ff,{sessionId:W.id})})]})]}):A.jsx("div",{className:"mx-auto max-w-4xl px-6 py-12 text-zinc-500",children:"Loading shell…"})}function fg(){const[B,Y]=de.useState(null),[W,j]=de.useState(""),[Z,ie]=de.useState(""),[P,n]=de.useState(!0),[u,_]=de.useState(null),v=de.useCallback(async()=>{n(!0),_(null);try{const b=await tt.rawConfig();ie(b.path),j(b.content),Y(JSON.parse(b.content))}catch(b){_(b.message)}finally{n(!1)}},[]);de.useEffect(()=>{v()},[v]);const l=de.useCallback(async b=>{if(!B)throw new Error("config not loaded");const y=b(B),d=JSON.stringify(y,null,2);await tt.saveRawConfig(d),Y(y),j(d)},[B]),g=de.useCallback(async b=>{await tt.saveRawConfig(b),j(b),Y(JSON.parse(b))},[]);return{cfg:B,rawText:W,path:Z,loading:P,loadError:u,save:l,saveRaw:g,reload:v}}function oi({title:B,action:Y,children:W}){return A.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 backdrop-blur-sm",children:[(B||Y)&&A.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-800 px-4 py-3",children:[A.jsx("div",{className:"text-sm font-medium text-zinc-200",children:B}),Y]}),A.jsx("div",{className:"p-4",children:W})]})}function Pt({className:B="",...Y}){return A.jsx("input",{className:`w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-1.5 text-sm text-zinc-100 placeholder:text-zinc-500 outline-none focus:border-zinc-500 disabled:opacity-50 ${B}`,...Y})}function Ct({label:B,hint:Y,children:W}){return A.jsxs("label",{className:"block",children:[A.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2",children:[A.jsx("span",{className:"text-xs uppercase tracking-wide text-zinc-400",children:B}),Y&&A.jsx("span",{className:"text-[11px] text-zinc-500",children:Y})]}),W]})}function _g({cfg:B,save:Y}){const[W,j]=de.useState(B.server.host),[Z,ie]=de.useState(String(B.server.port)),[P,n]=de.useState(!1),[u,_]=de.useState(null);de.useEffect(()=>{j(B.server.host),ie(String(B.server.port))},[B.server.host,B.server.port]);const v=W!==B.server.host||Z!==String(B.server.port),l=async()=>{_(null);const g=Number(Z);if(!Number.isInteger(g)||g<1||g>65535){_("port must be 1–65535");return}n(!0);try{await Y(b=>({...b,server:{host:W,port:g}}))}catch(b){_(b.message)}finally{n(!1)}};return A.jsxs(oi,{title:"Server",action:A.jsx(Xe,{disabled:!v||P,onClick:l,children:P?"Saving…":"Save"}),children:[A.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[A.jsx(Ct,{label:"Host",hint:"0.0.0.0 = LAN, 127.0.0.1 = local only",children:A.jsx(Pt,{value:W,onChange:g=>j(g.target.value)})}),A.jsx(Ct,{label:"Port",children:A.jsx(Pt,{type:"number",min:1,max:65535,value:Z,onChange:g=>ie(g.target.value)})})]}),u&&A.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300 whitespace-pre-wrap",children:u}),A.jsx("p",{className:"mt-3 text-[11px] text-zinc-500",children:"Restart the gateway after changing host or port."})]})}function vg({cfg:B,save:Y}){const[W,j]=de.useState(String(B.github.pollIntervalSeconds)),[Z,ie]=de.useState(!1),[P,n]=de.useState(null);de.useEffect(()=>{j(String(B.github.pollIntervalSeconds))},[B.github.pollIntervalSeconds]);const u=Number(W)!==B.github.pollIntervalSeconds,_=async()=>{n(null);const v=Number(W);if(!Number.isInteger(v)||v<10||v>3600){n("poll interval must be 10–3600 seconds");return}ie(!0);try{await Y(l=>({...l,github:{...l.github,pollIntervalSeconds:v}}))}catch(l){n(l.message)}finally{ie(!1)}};return A.jsxs(oi,{title:"GitHub",action:A.jsx(Xe,{disabled:!u||Z,onClick:_,children:Z?"Saving…":"Save"}),children:[A.jsx(Ct,{label:"Poll interval (seconds)",hint:"how often the poller checks for newly-labeled issues and PRs",children:A.jsx(Pt,{type:"number",min:10,max:3600,value:W,onChange:v=>j(v.target.value)})}),A.jsxs("p",{className:"mt-3 text-[11px] text-zinc-500",children:["Trigger labels are convention-based. Each agent listens for ",A.jsx("code",{children:"tono-<name>"})," on issues and"," ",A.jsx("code",{children:"tono-<name>-review"})," on PRs."]}),P&&A.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:P})]})}function gg({cfg:B,save:Y}){const[W,j]=de.useState(B.workspaces.root),[Z,ie]=de.useState(!1),[P,n]=de.useState(null);de.useEffect(()=>j(B.workspaces.root),[B.workspaces.root]);const u=W!==B.workspaces.root,_=async()=>{if(n(null),!W.trim()){n("workspace root must not be empty");return}ie(!0);try{await Y(v=>({...v,workspaces:{root:W.trim()}}))}catch(v){n(v.message)}finally{ie(!1)}};return A.jsxs(oi,{title:"Workspaces",action:A.jsx(Xe,{disabled:!u||Z,onClick:_,children:Z?"Saving…":"Save"}),children:[A.jsx(Ct,{label:"Root path",hint:"bare clones land at <root>/.bare/, worktrees at <root>/<owner>__<repo>__issue-N/",children:A.jsx(Pt,{value:W,onChange:v=>j(v.target.value),placeholder:"~/.tono/workspaces"})}),P&&A.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:P})]})}const mg=/^[A-Za-z0-9._-]+\/[A-Za-z0-9._-]+$/;function pg({cfg:B,agents:Y,save:W}){return A.jsxs(oi,{title:A.jsxs("span",{className:"flex items-center gap-2",children:["Repos",A.jsx("span",{className:"text-xs text-zinc-500",children:B.repos.length})]}),children:[A.jsxs("div",{className:"space-y-2",children:[B.repos.map((j,Z)=>A.jsx(bg,{repo:j,agents:Y,onSave:async ie=>{await W(P=>({...P,repos:P.repos.map((n,u)=>u===Z?ie:n)}))},onRemove:async()=>{confirm(`Remove ${j.slug}?`)&&await W(ie=>({...ie,repos:ie.repos.filter((P,n)=>n!==Z)}))}},`${j.slug}-${Z}`)),B.repos.length===0&&A.jsx("div",{className:"rounded-md border border-dashed border-zinc-800 px-4 py-6 text-center text-sm text-zinc-500",children:"No repos yet. Add one below."}),A.jsx(Cg,{agents:Y,existing:B.repos.map(j=>j.slug),onAdd:async j=>{await W(Z=>({...Z,repos:[...Z.repos,j]}))}})]}),A.jsxs("p",{className:"mt-3 text-[11px] text-zinc-500",children:["Each enrolled agent listens for ",A.jsx("code",{children:"tono-<name>"})," on issues and"," ",A.jsx("code",{children:"tono-<name>-review"})," on pull requests."]})]})}function nf(B){return B==="claude-code"?"claude":B}function af(B,Y){return B&&B.length>0?B:Y}function Sg(B,Y){return B.defaultAgent&&Y.includes(B.defaultAgent)?B.defaultAgent:Y.length===1?Y[0]:null}function bg({repo:B,agents:Y,onSave:W,onRemove:j}){const[Z,ie]=de.useState(!1),[P,n]=de.useState(B.path??""),[u,_]=de.useState(B.baseBranch),[v,l]=de.useState(new Set(af(B.agents,Y))),[g,b]=de.useState(B.defaultAgent??""),[y,d]=de.useState(!1),[r,h]=de.useState(null);if(!Z){const m=af(B.agents,Y),C=Sg(B,m);return A.jsxs("div",{className:"rounded-md border border-zinc-800 bg-zinc-900/40 px-3 py-2 min-w-0",children:[A.jsxs("div",{className:"flex items-start justify-between gap-2",children:[A.jsx("code",{className:"text-zinc-100 text-sm break-all",children:B.slug}),A.jsxs("div",{className:"shrink-0 flex items-center gap-2",children:[A.jsx(Xe,{variant:"ghost",onClick:()=>ie(!0),children:"Edit"}),A.jsx(Xe,{variant:"danger",onClick:j,children:"Remove"})]})]}),A.jsxs("div",{className:"mt-1 flex flex-wrap items-center gap-x-2 gap-y-0.5 text-xs text-zinc-400",children:[A.jsxs("span",{children:["base ",A.jsx("span",{className:"text-zinc-200",children:B.baseBranch})]}),A.jsx("span",{className:"text-zinc-600",children:"·"}),A.jsxs("span",{children:["agents ",A.jsx("span",{className:"text-zinc-200",children:m.join(", ")||"(none)"})]}),B.agents===void 0&&A.jsx("span",{className:"text-[10px] text-zinc-500 uppercase",children:"all"}),A.jsx("span",{className:"text-zinc-600",children:"·"}),A.jsxs("span",{children:["default"," ",A.jsx("span",{className:"text-zinc-200",children:C??"(none — bare labels ignored)"}),C&&!B.defaultAgent&&A.jsx("span",{className:"ml-1 text-[10px] text-zinc-500 uppercase",children:"only enrolled"})]})]}),A.jsx("div",{className:"mt-1 text-xs text-zinc-500 font-mono break-all",children:B.path??A.jsx("span",{className:"italic",children:"tono will bare-clone via gh"})}),m.length>0&&A.jsx("div",{className:"mt-1 flex flex-wrap gap-1 text-[10px] text-zinc-500",children:m.map(S=>A.jsxs("span",{children:[A.jsxs("code",{className:"text-zinc-300",children:["tono-",nf(S)]})," / ",A.jsxs("code",{className:"text-zinc-300",children:["tono-",nf(S),"-review"]})]},S))})]})}const o=async()=>{if(h(null),!u.trim()){h("base branch is required");return}if(v.size===0){h("at least one agent must be enrolled");return}d(!0);try{const m=Y.filter(w=>v.has(w)),C=m.length===Y.length,S=m.length>1&&g&&v.has(g);await W({slug:B.slug,baseBranch:u.trim(),...P.trim()?{path:P.trim()}:{},...C?{}:{agents:m},...S?{defaultAgent:g}:{}}),ie(!1)}catch(m){h(m.message)}finally{d(!1)}},c=Y.filter(m=>v.has(m));return A.jsxs("div",{className:"rounded-md border border-zinc-700 bg-zinc-900/60 p-3 space-y-3",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("code",{className:"text-sm text-zinc-100",children:B.slug}),A.jsx("span",{className:"text-[11px] text-zinc-500",children:"slug isn't editable; remove and re-add to rename"})]}),A.jsx(Ct,{label:"Path to local clone",hint:"optional; blank = bare-clone via gh",children:A.jsx(Pt,{value:P,onChange:m=>n(m.target.value),placeholder:"/Users/me/code/repo (or leave blank)"})}),A.jsx(Ct,{label:"Base branch",children:A.jsx(Pt,{value:u,onChange:m=>_(m.target.value)})}),A.jsx(_f,{agents:Y,enrolled:v,onToggle:m=>{const C=new Set(v);C.has(m)?C.delete(m):C.add(m),l(C)}}),c.length>1&&A.jsx(yg,{enrolled:c,value:g,onChange:b}),r&&A.jsx("div",{className:"rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:r}),A.jsxs("div",{className:"flex justify-end gap-2",children:[A.jsx(Xe,{variant:"ghost",disabled:y,onClick:()=>ie(!1),children:"Cancel"}),A.jsx(Xe,{disabled:y,onClick:o,children:y?"Saving…":"Save"})]})]})}function yg({enrolled:B,value:Y,onChange:W}){return A.jsx(Ct,{label:"Default agent",hint:"handles bare `tono` and `tono-review` labels",children:A.jsxs("select",{value:Y,onChange:j=>W(j.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm",children:[A.jsx("option",{value:"",children:"(no default — bare labels ignored)"}),B.map(j=>A.jsx("option",{value:j,children:j},j))]})})}function _f({agents:B,enrolled:Y,onToggle:W}){return A.jsxs("div",{children:[A.jsx("div",{className:"text-xs text-zinc-400 mb-1",children:"Enrolled agents"}),A.jsx("div",{className:"flex flex-wrap gap-3",children:B.length===0?A.jsx("span",{className:"text-xs text-zinc-500 italic",children:"no agents declared in config"}):B.map(j=>A.jsxs("label",{className:"flex items-center gap-1.5 text-sm text-zinc-200",children:[A.jsx("input",{type:"checkbox",checked:Y.has(j),onChange:()=>W(j),className:"h-4 w-4 accent-orange-500"}),A.jsx("span",{children:j})]},j))})]})}function Cg({agents:B,existing:Y,onAdd:W}){const[j,Z]=de.useState(""),[ie,P]=de.useState(""),[n,u]=de.useState("main"),[_,v]=de.useState(new Set(B)),[l,g]=de.useState(!1),[b,y]=de.useState(null),d=async()=>{y(null);const r=j.trim();if(!mg.test(r)){y("slug must be owner/repo");return}if(Y.includes(r)){y("repo is already configured");return}if(_.size===0){y("at least one agent must be enrolled");return}g(!0);try{const h=B.filter(c=>_.has(c)),o=h.length===B.length;await W({slug:r,baseBranch:n.trim()||"main",...ie.trim()?{path:ie.trim()}:{},...o?{}:{agents:h}}),Z(""),P(""),u("main"),v(new Set(B))}catch(h){y(h.message)}finally{g(!1)}};return A.jsxs("div",{className:"rounded-md border border-dashed border-zinc-700 bg-zinc-900/30 p-3 space-y-3",children:[A.jsx("div",{className:"text-xs uppercase tracking-wide text-zinc-400",children:"Add a repo"}),A.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[A.jsx(Ct,{label:"Slug",hint:"owner/repo on GitHub",children:A.jsx(Pt,{value:j,onChange:r=>Z(r.target.value),placeholder:"loopedautomation/mono"})}),A.jsx(Ct,{label:"Path to local clone",hint:"optional; blank = tono bare-clones",children:A.jsx(Pt,{value:ie,onChange:r=>P(r.target.value),placeholder:"(blank = bare-clone via gh)"})})]}),A.jsx(Ct,{label:"Base branch",children:A.jsx(Pt,{value:n,onChange:r=>u(r.target.value),placeholder:"main"})}),A.jsx(_f,{agents:B,enrolled:_,onToggle:r=>{const h=new Set(_);h.has(r)?h.delete(r):h.add(r),v(h)}}),b&&A.jsx("div",{className:"rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:b}),A.jsx("div",{className:"flex justify-end",children:A.jsx(Xe,{disabled:l||!j.trim(),onClick:d,children:l?"Adding…":"+ Add repo"})})]})}function lf({className:B="",...Y}){return A.jsx("textarea",{className:`w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm font-mono text-zinc-100 placeholder:text-zinc-500 outline-none focus:border-zinc-500 disabled:opacity-50 resize-y ${B}`,...Y})}const of={command:"",args:[],concurrency:{implement:1,review:2},promptTemplates:{implement:"",review:""}};function xg({name:B,cfg:Y,save:W}){var p,x,L,O;const j=Y.agents[B]??of,[Z,ie]=de.useState(j.command),[P,n]=de.useState(j.args.join(" ")),[u,_]=de.useState(String(j.concurrency.implement)),[v,l]=de.useState(String(j.concurrency.review)),[g,b]=de.useState(((p=j.promptTemplates)==null?void 0:p.implement)??""),[y,d]=de.useState(((x=j.promptTemplates)==null?void 0:x.review)??""),[r,h]=de.useState(!1),[o,c]=de.useState(null);de.useEffect(()=>{var M,U;const T=Y.agents[B]??of;ie(T.command),n(T.args.join(" ")),_(String(T.concurrency.implement)),l(String(T.concurrency.review)),b(((M=T.promptTemplates)==null?void 0:M.implement)??""),d(((U=T.promptTemplates)==null?void 0:U.review)??"")},[Y.agents,B]);const m=P.length===0?[]:P.split(/\s+/).filter(Boolean),C=Z!==j.command||m.join(" ")!==j.args.join(" ")||Number(u)!==j.concurrency.implement||Number(v)!==j.concurrency.review||g!==(((L=j.promptTemplates)==null?void 0:L.implement)??"")||y!==(((O=j.promptTemplates)==null?void 0:O.review)??""),S=async()=>{if(c(null),!Z.trim()){c("command is required");return}if(!g.trim()||!y.trim()){c("both prompt templates are required");return}const T=Number(u),M=Number(v);if(!Number.isInteger(T)||T<0||T>32||!Number.isInteger(M)||M<0||M>32){c("concurrency must be 0–32");return}h(!0);try{await W(U=>({...U,agents:{...U.agents,[B]:{command:Z.trim(),args:m,concurrency:{implement:T,review:M},promptTemplates:{implement:g,review:y}}}}))}catch(U){c(U.message)}finally{h(!1)}},w=B==="claude-code"?"claude":B;return A.jsxs(oi,{title:A.jsxs("span",{className:"flex items-center gap-2",children:[A.jsxs("span",{children:["Agent ",A.jsx("code",{className:"text-zinc-400 text-xs",children:B})]}),A.jsxs("span",{className:"text-[10px] text-zinc-500",children:["implement: ",A.jsxs("code",{className:"text-zinc-300",children:["tono-",w]})," · review: ",A.jsxs("code",{className:"text-zinc-300 ml-1",children:["tono-",w,"-review"]})]})]}),action:A.jsx(Xe,{disabled:!C||r,onClick:S,children:r?"Saving…":"Save"}),children:[A.jsxs("div",{className:"space-y-3",children:[A.jsx(Ct,{label:"Command",hint:"must be on $PATH",children:A.jsx(Pt,{value:Z,onChange:T=>ie(T.target.value),placeholder:"claude"})}),A.jsx(Ct,{label:"Args",hint:"space-separated; use {prompt} placeholder if the CLI takes prompt as a flag",children:A.jsx(Pt,{value:P,onChange:T=>n(T.target.value),placeholder:"--dangerously-skip-permissions"})}),A.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:[A.jsx(Ct,{label:"Concurrency (implement)",hint:"max simultaneous issue tasks",children:A.jsx(Pt,{type:"number",min:0,max:32,value:u,onChange:T=>_(T.target.value)})}),A.jsx(Ct,{label:"Concurrency (review)",hint:"max simultaneous PR reviews",children:A.jsx(Pt,{type:"number",min:0,max:32,value:v,onChange:T=>l(T.target.value)})})]}),A.jsx(Ct,{label:"Implement prompt template",hint:"placeholders: {issueNumber} {issueTitle} {issueBody} {repoSlug} {baseBranch} {branch}",children:A.jsx(lf,{value:g,onChange:T=>b(T.target.value),rows:8,placeholder:"You are working on..."})}),A.jsx(Ct,{label:"Review prompt template",hint:"placeholders include {prUrl} for the PR being reviewed",children:A.jsx(lf,{value:y,onChange:T=>d(T.target.value),rows:8,placeholder:"You are reviewing PR #{issueNumber}..."})})]}),o&&A.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:o})]})}const Po='You are working on GitHub issue #{issueNumber} in {repoSlug}.\n\nTitle: {issueTitle}\n\n{issueBody}\n\nImplement the changes needed to resolve this issue. The current branch is {branch}, based on {baseBranch}. When implementation is complete, commit with a clear message, push the branch with `git push -u origin {branch}`, and open a pull request with `gh pr create --base {baseBranch} --fill`. If the issue is unclear or unsafe to proceed, leave a comment on the issue explaining why with `gh issue comment {issueNumber} --body "<reason>"` and stop.',Fo=`You are reviewing GitHub PR #{issueNumber} in {repoSlug}: "{issueTitle}".
|
|
119
119
|
PR URL: {prUrl}
|
|
120
120
|
The PR's head branch ({branch}) is checked out at the current working directory.
|
|
121
121
|
|
|
@@ -126,4 +126,4 @@ Read the diff (\`gh pr diff {issueNumber}\`) and inspect the changed files. Form
|
|
|
126
126
|
|
|
127
127
|
When done, post your review with \`gh pr review {issueNumber} --comment --body "<review body>"\` (use --request-changes if blocking, or --approve if good to merge). For inline file/line comments use \`gh api repos/{repoSlug}/pulls/{issueNumber}/comments\`.
|
|
128
128
|
|
|
129
|
-
Do not push commits. Do not create new PRs.`,of=[{type:"claude-code",label:"Claude Code",defaults:{command:"claude",args:["--dangerously-skip-permissions"],concurrency:{implement:2,review:4},promptTemplates:{implement:Po,review:Fo}}},{type:"codex",label:"Codex CLI",defaults:{command:"codex",args:[],concurrency:{implement:1,review:2},promptTemplates:{implement:Po,review:Fo}}},{type:"opencode",label:"OpenCode",defaults:{command:"opencode",args:["run","{prompt}"],concurrency:{implement:1,review:2},promptTemplates:{implement:Po,review:Fo}}}];function yg({cfg:O,save:Y}){var v;const G=de.useMemo(()=>of.filter(l=>!O.agents[l.type]),[O.agents]),[j,Z]=de.useState(((v=G[0])==null?void 0:v.type)??""),[se,F]=de.useState(!1),[n,f]=de.useState(null);if(G.length===0)return null;j&&!G.find(l=>l.type===j)&&Z(G[0].type);const _=async()=>{f(null);const l=of.find(g=>g.type===j);if(l){F(!0);try{await Y(g=>({...g,agents:{...g.agents,[l.type]:l.defaults}}))}catch(g){f(g.message)}finally{F(!1)}}};return D.jsxs(oi,{title:"Add agent",children:[D.jsxs("div",{className:"flex items-end gap-3",children:[D.jsxs("div",{className:"flex-1",children:[D.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:"Agent type"}),D.jsx("select",{value:j,onChange:l=>Z(l.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm",children:G.map(l=>D.jsxs("option",{value:l.type,children:[l.label," (",l.type,")"]},l.type))})]}),D.jsx(Xe,{disabled:se||!j,onClick:_,children:se?"Adding…":"+ Add"})]}),D.jsxs("p",{className:"mt-2 text-[11px] text-zinc-500",children:["Adds the agent with default ",D.jsx("code",{className:"text-zinc-300",children:"command"}),", ",D.jsx("code",{className:"text-zinc-300",children:"args"}),", concurrency, and prompt templates. Edit the new section below to tune. The CLI must exist on ",D.jsx("code",{className:"text-zinc-300",children:"$PATH"})," for tono to spawn it."]}),n&&D.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:n})]})}function Cg({initial:O,path:Y,onSave:G}){const[j,Z]=de.useState(O),[se,F]=de.useState(!1),[n,f]=de.useState(null),[_,v]=de.useState(null),l=de.useRef(null);de.useEffect(()=>{Z(O)},[O]);const g=j!==O,b=async()=>{F(!0),f(null);try{await G(j),v(new Date)}catch(u){f(u.message)}finally{F(!1)}},y=u=>{if(u.key==="Tab"){u.preventDefault();const r=l.current;if(!r)return;const{selectionStart:h,selectionEnd:o}=r,c=j.slice(0,h)+" "+j.slice(o);Z(c),requestAnimationFrame(()=>{r.selectionStart=r.selectionEnd=h+2})}(u.metaKey||u.ctrlKey)&&u.key==="s"&&(u.preventDefault(),g&&!se&&b())};return D.jsxs(oi,{title:D.jsxs(D.Fragment,{children:["Raw JSON ",D.jsx("span",{className:"text-xs text-zinc-500 font-mono",children:Y})]}),action:D.jsxs("div",{className:"flex items-center gap-2",children:[_&&!g&&!n&&D.jsxs("span",{className:"text-xs text-green-400",children:["saved ",_.toLocaleTimeString()]}),g&&D.jsx("span",{className:"text-xs text-amber-400",children:"unsaved"}),D.jsx(Xe,{variant:"ghost",disabled:!g||se,onClick:()=>Z(O),children:"Revert"}),D.jsx(Xe,{disabled:!g||se,onClick:b,children:se?"Saving…":"Save"})]}),children:[n&&D.jsx("div",{className:"mb-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-sm text-red-300 whitespace-pre-wrap font-mono",children:n}),D.jsx("textarea",{ref:l,value:j,onChange:u=>Z(u.target.value),onKeyDown:y,spellCheck:!1,className:"w-full min-h-[60vh] rounded-md border border-zinc-800 bg-zinc-950 p-3 font-mono text-sm text-zinc-100 outline-none focus:border-zinc-600 resize-y"}),D.jsx("p",{className:"mt-2 text-[11px] text-zinc-500",children:"Validates against the schema on save. ⌘S to save."})]})}function xg(){const{cfg:O,rawText:Y,path:G,loading:j,loadError:Z,save:se,saveRaw:F}=hg(),[n,f]=de.useState(!1);if(j)return D.jsx("div",{className:"mx-auto max-w-4xl px-6 py-12 text-zinc-500",children:"Loading…"});if(Z||!O)return D.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-12 text-red-300",children:["Failed to load config: ",Z??"unknown error"]});const _=Object.keys(O.agents);return D.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-6 space-y-4",children:[D.jsxs("div",{className:"flex items-center justify-between",children:[D.jsx("h1",{className:"text-base font-semibold text-zinc-200",children:"Config"}),D.jsxs(Xe,{variant:"ghost",onClick:()=>f(v=>!v),children:[n?"Hide":"Show"," raw JSON"]})]}),D.jsx(ug,{cfg:O,save:se}),D.jsx(dg,{cfg:O,save:se}),D.jsx(fg,{cfg:O,save:se}),D.jsx(vg,{cfg:O,agents:_,save:se}),_.map(v=>D.jsx(bg,{name:v,cfg:O,save:se},v)),D.jsx(yg,{cfg:O,save:se}),n&&D.jsx(Cg,{initial:Y,path:G,onSave:F}),D.jsxs("p",{className:"text-[11px] text-zinc-500",children:["Edits write directly to ",D.jsx("code",{className:"text-zinc-300",children:G}),". Schema-validated on save. Trigger labels are convention-based: ",D.jsx("code",{className:"text-zinc-300",children:"tono-<agent>"})," for issues,"," ",D.jsx("code",{className:"text-zinc-300",children:"tono-<agent>-review"})," for PRs. Server host / port require ",D.jsx("code",{className:"text-zinc-300",children:"tono gateway restart"}),"."]})]})}function wg(O){if(!O)return"—";const Y=Date.now()-Date.parse(O);return Y<5e3?"just now":Y<6e4?`${Math.round(Y/1e3)}s ago`:Y<36e5?`${Math.round(Y/6e4)}m ago`:Y<864e5?`${Math.round(Y/36e5)}h ago`:`${Math.round(Y/864e5)}d ago`}function Eg(O){const Y=new Map;for(const G of O)if(!(!G.connected||!G.capacity))for(const[j,Z]of Object.entries(G.capacity.byAgent)){if(!Z)continue;let se=Y.get(j);se||(se={agent:j,freeImplement:0,freeReview:0,workersWithAgent:0},Y.set(j,se)),se.freeImplement+=Z.implement,se.freeReview+=Z.review,se.workersWithAgent+=1}return[...Y.values()].sort((G,j)=>G.agent.localeCompare(j.agent))}function Lg({worker:O}){const{navigate:Y}=es(),G=O.hostname==="(local)",j=wg(O.lastSeenAt),Z=O.capabilities?Object.entries(O.capabilities.agents).sort((n,f)=>n[0].localeCompare(f[0])):[],se=n=>{var f;return((f=O.capacity)==null?void 0:f.byAgent[n])??null},F=O.runningSessions.length;return D.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 backdrop-blur-sm",children:[D.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-800 px-4 py-3",children:[D.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[D.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${O.connected?"bg-green-400":"bg-zinc-600"}`,"aria-hidden":"true"}),D.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:O.hostname}),G&&D.jsx(Ji,{tone:"neutral",children:"embedded"}),O.tonoVersion&&D.jsxs("span",{className:"text-[11px] text-zinc-500 font-mono",children:["v",O.tonoVersion]})]}),D.jsx(Ji,{tone:O.connected?"green":"neutral",children:O.connected?"connected":"offline"})]}),D.jsxs("div",{className:"p-4 space-y-3",children:[D.jsxs("div",{className:"grid grid-cols-2 gap-x-4 gap-y-1 text-xs",children:[D.jsx("div",{className:"text-zinc-500",children:"last heartbeat"}),D.jsx("div",{className:"text-zinc-300 text-right font-mono",children:j}),D.jsx("div",{className:"text-zinc-500",children:"platform"}),D.jsxs("div",{className:"text-zinc-300 text-right font-mono",children:[O.os??"?","/",O.arch??"?"]}),D.jsx("div",{className:"text-zinc-500",children:"worker id"}),D.jsx("div",{className:"text-zinc-300 text-right font-mono truncate",children:O.id.slice(0,8)})]}),D.jsxs("div",{className:"border-t border-zinc-800 pt-3 space-y-2",children:[D.jsx("div",{className:"text-[11px] uppercase tracking-wide text-zinc-500",children:"agents · capacity (free)"}),Z.length===0?D.jsx("div",{className:"text-xs text-zinc-500",children:"no agents advertised"}):D.jsx("div",{className:"space-y-1",children:Z.map(([n,f])=>{const _=se(n);return D.jsxs("div",{className:"flex items-center justify-between gap-2 text-xs",children:[D.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[D.jsx("span",{className:"text-zinc-200 font-mono truncate",children:n}),f.version&&D.jsx("span",{className:"text-zinc-500 truncate",children:f.version})]}),D.jsx("div",{className:"font-mono text-zinc-400 whitespace-nowrap",children:_?D.jsxs(D.Fragment,{children:["impl ",D.jsx("span",{className:"text-zinc-200",children:_.implement}),D.jsx("span",{className:"mx-1 text-zinc-600",children:"·"}),"rev ",D.jsx("span",{className:"text-zinc-200",children:_.review})]}):D.jsx("span",{className:"text-zinc-600",children:"—"})})]},n)})})]}),O.connected&&D.jsxs("div",{className:"border-t border-zinc-800 pt-3",children:[D.jsxs("div",{className:"text-[11px] uppercase tracking-wide text-zinc-500 mb-2",children:["running (",F,")"]}),F===0?D.jsx("div",{className:"text-xs text-zinc-500",children:"idle"}):D.jsx("div",{className:"flex flex-wrap gap-1",children:O.runningSessions.map(n=>D.jsxs("button",{onClick:()=>Y(`/tasks/${n.taskId}`),className:"text-xs font-mono px-2 py-0.5 rounded border border-zinc-700 bg-zinc-800/40 text-zinc-300 hover:border-zinc-600 hover:bg-zinc-800 transition",children:["#",n.taskId]},n.sessionId))})]})]})]})}function Ag({workers:O}){const Y=de.useMemo(()=>Eg(O),[O]),G=O.filter(Z=>Z.connected).length,j=O.length;return G===0?D.jsx(oi,{title:"Capacity",children:D.jsxs("div",{className:"text-sm text-zinc-400",children:["No workers connected."," ",j>0?`${j} worker(s) registered but currently offline.`:"Run `tono start` (single-machine) or `tono worker start --gateway <host>:<port>` on another machine."]})}):D.jsxs(oi,{title:"Total free capacity",children:[D.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-3",children:Y.map(Z=>D.jsxs("div",{className:"flex items-center justify-between rounded border border-zinc-800 bg-zinc-900/30 px-3 py-2",children:[D.jsxs("div",{className:"min-w-0",children:[D.jsx("div",{className:"text-sm font-mono text-zinc-200 truncate",children:Z.agent}),D.jsxs("div",{className:"text-[11px] text-zinc-500",children:["across ",Z.workersWithAgent," worker",Z.workersWithAgent===1?"":"s"]})]}),D.jsxs("div",{className:"text-right whitespace-nowrap",children:[D.jsxs("div",{className:"text-sm",children:[D.jsx("span",{className:"text-zinc-400",children:"implement "}),D.jsx("span",{className:"font-mono text-zinc-100",children:Z.freeImplement})]}),D.jsxs("div",{className:"text-sm",children:[D.jsx("span",{className:"text-zinc-400",children:"review "}),D.jsx("span",{className:"font-mono text-zinc-100",children:Z.freeReview})]})]})]},Z.agent))}),D.jsxs("div",{className:"mt-3 text-xs text-zinc-500",children:[G," of ",j," worker",j===1?"":"s"," connected. Capacity is summed across all workers; the scheduler dispatches each task to a worker that has free slots for the (agent, kind)."]})]})}function Rg(){const{data:O,error:Y}=bs(st.workers,3e3),G=O??[],j=de.useMemo(()=>[...G].sort((Z,se)=>Z.connected!==se.connected?Z.connected?-1:1:Z.hostname==="(local)"&&se.hostname!=="(local)"?-1:se.hostname==="(local)"&&Z.hostname!=="(local)"?1:Z.hostname.localeCompare(se.hostname)),[G]);return D.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-6 space-y-6",children:[D.jsx("div",{className:"flex items-center justify-between gap-4",children:D.jsxs("div",{children:[D.jsx("h1",{className:"text-xl font-semibold text-zinc-100",children:"Workers"}),D.jsx("p",{className:"text-sm text-zinc-500",children:"Machines connected to this gateway and the agent capacity they advertise."})]})}),Y&&D.jsxs("div",{className:"rounded-md border border-red-900/60 bg-red-950/40 px-3 py-2 text-sm text-red-300",children:["failed to load workers: ",Y.message]}),D.jsx(Ag,{workers:j}),j.length===0?D.jsx(oi,{children:D.jsxs("div",{className:"text-sm text-zinc-400",children:["No workers have connected yet. The embedded worker should appear within a few seconds of starting the gateway. To add capacity from another machine on your tailnet, run:",D.jsx("pre",{className:"mt-3 rounded bg-zinc-900 p-3 text-xs text-zinc-300 overflow-x-auto",children:"tono worker start --gateway <gateway-host>:7040"})]})}):D.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:j.map(Z=>D.jsx(Lg,{worker:Z},Z.id))})]})}function Dg(){const{path:O}=es();let Y;const G=O.match(/^\/tasks\/(\d+)\/?$/),j=O.match(/^\/shells\/([^/]+)\/?$/);return G?Y=D.jsx(og,{taskId:Number(G[1])}):j?Y=D.jsx(cg,{sessionId:decodeURIComponent(j[1])}):O.startsWith("/workers")?Y=D.jsx(Rg,{}):O.startsWith("/config")||O.startsWith("/settings")?Y=D.jsx(xg,{}):Y=D.jsx(Xv,{}),D.jsxs("div",{className:"min-h-screen flex flex-col",children:[D.jsx(Uv,{}),D.jsx("main",{className:"flex-1",children:Y})]})}const ff=document.getElementById("root");if(!ff)throw new Error("No #root element");Nv.createRoot(ff).render(D.jsx(de.StrictMode,{children:D.jsx(Dg,{})}));
|
|
129
|
+
Do not push commits. Do not create new PRs.`,cf=[{type:"claude-code",label:"Claude Code",defaults:{command:"claude",args:["--dangerously-skip-permissions"],concurrency:{implement:2,review:4},promptTemplates:{implement:Po,review:Fo}}},{type:"codex",label:"Codex CLI",defaults:{command:"codex",args:[],concurrency:{implement:1,review:2},promptTemplates:{implement:Po,review:Fo}}},{type:"opencode",label:"OpenCode",defaults:{command:"opencode",args:["run","{prompt}"],concurrency:{implement:1,review:2},promptTemplates:{implement:Po,review:Fo}}}];function wg({cfg:B,save:Y}){var v;const W=de.useMemo(()=>cf.filter(l=>!B.agents[l.type]),[B.agents]),[j,Z]=de.useState(((v=W[0])==null?void 0:v.type)??""),[ie,P]=de.useState(!1),[n,u]=de.useState(null);if(W.length===0)return null;j&&!W.find(l=>l.type===j)&&Z(W[0].type);const _=async()=>{u(null);const l=cf.find(g=>g.type===j);if(l){P(!0);try{await Y(g=>({...g,agents:{...g.agents,[l.type]:l.defaults}}))}catch(g){u(g.message)}finally{P(!1)}}};return A.jsxs(oi,{title:"Add agent",children:[A.jsxs("div",{className:"flex items-end gap-3",children:[A.jsxs("div",{className:"flex-1",children:[A.jsx("label",{className:"block text-xs text-zinc-400 mb-1",children:"Agent type"}),A.jsx("select",{value:j,onChange:l=>Z(l.target.value),className:"w-full rounded-md border border-zinc-700 bg-zinc-900 px-3 py-2 text-sm",children:W.map(l=>A.jsxs("option",{value:l.type,children:[l.label," (",l.type,")"]},l.type))})]}),A.jsx(Xe,{disabled:ie||!j,onClick:_,children:ie?"Adding…":"+ Add"})]}),A.jsxs("p",{className:"mt-2 text-[11px] text-zinc-500",children:["Adds the agent with default ",A.jsx("code",{className:"text-zinc-300",children:"command"}),", ",A.jsx("code",{className:"text-zinc-300",children:"args"}),", concurrency, and prompt templates. Edit the new section below to tune. The CLI must exist on ",A.jsx("code",{className:"text-zinc-300",children:"$PATH"})," for tono to spawn it."]}),n&&A.jsx("div",{className:"mt-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-xs text-red-300",children:n})]})}function Eg({initial:B,path:Y,onSave:W}){const[j,Z]=de.useState(B),[ie,P]=de.useState(!1),[n,u]=de.useState(null),[_,v]=de.useState(null),l=de.useRef(null);de.useEffect(()=>{Z(B)},[B]);const g=j!==B,b=async()=>{P(!0),u(null);try{await W(j),v(new Date)}catch(d){u(d.message)}finally{P(!1)}},y=d=>{if(d.key==="Tab"){d.preventDefault();const r=l.current;if(!r)return;const{selectionStart:h,selectionEnd:o}=r,c=j.slice(0,h)+" "+j.slice(o);Z(c),requestAnimationFrame(()=>{r.selectionStart=r.selectionEnd=h+2})}(d.metaKey||d.ctrlKey)&&d.key==="s"&&(d.preventDefault(),g&&!ie&&b())};return A.jsxs(oi,{title:A.jsxs(A.Fragment,{children:["Raw JSON ",A.jsx("span",{className:"text-xs text-zinc-500 font-mono",children:Y})]}),action:A.jsxs("div",{className:"flex items-center gap-2",children:[_&&!g&&!n&&A.jsxs("span",{className:"text-xs text-green-400",children:["saved ",_.toLocaleTimeString()]}),g&&A.jsx("span",{className:"text-xs text-amber-400",children:"unsaved"}),A.jsx(Xe,{variant:"ghost",disabled:!g||ie,onClick:()=>Z(B),children:"Revert"}),A.jsx(Xe,{disabled:!g||ie,onClick:b,children:ie?"Saving…":"Save"})]}),children:[n&&A.jsx("div",{className:"mb-3 rounded-md border border-red-900 bg-red-950/40 px-3 py-2 text-sm text-red-300 whitespace-pre-wrap font-mono",children:n}),A.jsx("textarea",{ref:l,value:j,onChange:d=>Z(d.target.value),onKeyDown:y,spellCheck:!1,className:"w-full min-h-[60vh] rounded-md border border-zinc-800 bg-zinc-950 p-3 font-mono text-sm text-zinc-100 outline-none focus:border-zinc-600 resize-y"}),A.jsx("p",{className:"mt-2 text-[11px] text-zinc-500",children:"Validates against the schema on save. ⌘S to save."})]})}function Lg(){const{cfg:B,rawText:Y,path:W,loading:j,loadError:Z,save:ie,saveRaw:P}=fg(),[n,u]=de.useState(!1);if(j)return A.jsx("div",{className:"mx-auto max-w-4xl px-6 py-12 text-zinc-500",children:"Loading…"});if(Z||!B)return A.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-12 text-red-300",children:["Failed to load config: ",Z??"unknown error"]});const _=Object.keys(B.agents);return A.jsxs("div",{className:"mx-auto max-w-4xl px-6 py-6 space-y-4",children:[A.jsxs("div",{className:"flex items-center justify-between",children:[A.jsx("h1",{className:"text-base font-semibold text-zinc-200",children:"Config"}),A.jsxs(Xe,{variant:"ghost",onClick:()=>u(v=>!v),children:[n?"Hide":"Show"," raw JSON"]})]}),A.jsx(_g,{cfg:B,save:ie}),A.jsx(vg,{cfg:B,save:ie}),A.jsx(gg,{cfg:B,save:ie}),A.jsx(pg,{cfg:B,agents:_,save:ie}),_.map(v=>A.jsx(xg,{name:v,cfg:B,save:ie},v)),A.jsx(wg,{cfg:B,save:ie}),n&&A.jsx(Eg,{initial:Y,path:W,onSave:P}),A.jsxs("p",{className:"text-[11px] text-zinc-500",children:["Edits write directly to ",A.jsx("code",{className:"text-zinc-300",children:W}),". Schema-validated on save. Trigger labels are convention-based: ",A.jsx("code",{className:"text-zinc-300",children:"tono-<agent>"})," for issues,"," ",A.jsx("code",{className:"text-zinc-300",children:"tono-<agent>-review"})," for PRs. Server host / port require ",A.jsx("code",{className:"text-zinc-300",children:"tono gateway restart"}),"."]})]})}function hf(B){if(!B)return"—";const Y=Date.now()-Date.parse(B);return Y<5e3?"just now":Y<6e4?`${Math.round(Y/1e3)}s ago`:Y<36e5?`${Math.round(Y/6e4)}m ago`:Y<864e5?`${Math.round(Y/36e5)}h ago`:`${Math.round(Y/864e5)}d ago`}function vf(B){const Y=new Map;for(const W of B){if(W.status!=="running"&&W.status!=="assigning"||!W.assignedWorkerId)continue;const j=`${W.assignedWorkerId}|${W.agent}|${W.kind}`;Y.set(j,(Y.get(j)??0)+1)}return Y}function qo(B,Y,W){var P;const j=(P=B.capacity)==null?void 0:P.byAgent[Y],Z=W.get(`${B.id}|${Y}|implement`)??0,ie=W.get(`${B.id}|${Y}|review`)??0;return j?{totalImplement:j.implement+Z,totalReview:j.review+ie,runningImplement:Z,runningReview:ie}:null}function Ag({worker:B,active:Y}){const{navigate:W}=ts(),j=B.hostname==="(local)",Z=B.capabilities?Object.entries(B.capabilities.agents).sort((n,u)=>n[0].localeCompare(u[0])):[];let ie=0,P=0;for(const[n]of Z){const u=qo(B,n,Y);u&&(ie+=u.runningImplement+u.runningReview,P+=u.totalImplement+u.totalReview)}return A.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 backdrop-blur-sm",children:[A.jsxs("div",{className:"flex items-center justify-between border-b border-zinc-800 px-4 py-3",children:[A.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[A.jsx("span",{className:`inline-block h-2 w-2 rounded-full ${B.connected?"bg-green-400":"bg-zinc-600"}`,"aria-hidden":"true"}),A.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:B.hostname}),j&&A.jsx(es,{tone:"neutral",children:"embedded"})]}),A.jsx(es,{tone:B.connected?"green":"neutral",children:B.connected?"connected":"offline"})]}),A.jsxs("div",{className:"p-4 space-y-3",children:[A.jsx("div",{className:"text-sm text-zinc-300",children:B.connected?A.jsxs(A.Fragment,{children:[A.jsx("span",{className:"font-mono text-zinc-100",children:ie}),A.jsx("span",{className:"text-zinc-500",children:" of "}),A.jsx("span",{className:"font-mono text-zinc-100",children:P}),A.jsx("span",{className:"text-zinc-500",children:" slots in use"})]}):A.jsxs("span",{className:"text-zinc-500",children:["offline · last heartbeat ",hf(B.lastSeenAt)]})}),Z.length>0&&B.connected&&A.jsx("div",{className:"space-y-1.5",children:Z.map(([n,u])=>{const _=qo(B,n,Y),v=_?_.runningImplement+_.runningReview:0,l=_?_.totalImplement+_.totalReview:0,g=_?[_.totalImplement>0?`${_.runningImplement}/${_.totalImplement} impl`:null,_.totalReview>0?`${_.runningReview}/${_.totalReview} review`:null].filter(Boolean).join(" · "):null;return A.jsxs("div",{className:"flex items-center justify-between gap-2 text-xs",children:[A.jsxs("div",{className:"flex items-baseline gap-2 min-w-0",children:[A.jsx("span",{className:"font-mono text-zinc-200 truncate",children:n}),u.version&&A.jsx("span",{className:"text-zinc-600 truncate",children:u.version})]}),A.jsxs("div",{className:"font-mono whitespace-nowrap",children:[A.jsx("span",{className:"text-zinc-100",children:v}),A.jsx("span",{className:"text-zinc-600",children:" / "}),A.jsx("span",{className:"text-zinc-100",children:l}),g&&A.jsx("span",{className:"ml-2 text-zinc-500",children:g})]})]},n)})}),B.connected&&B.runningSessions.length>0&&A.jsxs("div",{className:"border-t border-zinc-800 pt-3",children:[A.jsx("div",{className:"text-[11px] uppercase tracking-wide text-zinc-500 mb-1.5",children:"running"}),A.jsx("div",{className:"flex flex-wrap gap-1",children:B.runningSessions.map(n=>A.jsxs("button",{onClick:()=>W(`/tasks/${n.taskId}`),className:"text-xs font-mono px-2 py-0.5 rounded border border-zinc-700 bg-zinc-800/40 text-zinc-300 hover:border-zinc-600 hover:bg-zinc-800 transition",children:["#",n.taskId]},n.sessionId))})]}),A.jsxs("div",{className:"border-t border-zinc-800 pt-3 text-[11px] text-zinc-500 flex items-center justify-between gap-2",children:[A.jsxs("span",{children:[B.os??"?","/",B.arch??"?",B.tonoVersion&&A.jsxs(A.Fragment,{children:[" · v",B.tonoVersion]})," · ",A.jsx("span",{className:"font-mono",children:B.id.slice(0,8)})]}),B.connected&&A.jsxs("span",{children:["seen ",hf(B.lastSeenAt)]})]})]})]})}function Rg(B,Y){const W=new Map;for(const j of B)if(!(!j.connected||!j.capacity))for(const Z of Object.keys(j.capacity.byAgent)){const ie=qo(j,Z,Y);if(!ie)continue;let P=W.get(Z);P||(P={agent:Z,running:0,total:0,runningImpl:0,totalImpl:0,runningReview:0,totalReview:0,workersOffering:0},W.set(Z,P)),P.runningImpl+=ie.runningImplement,P.totalImpl+=ie.totalImplement,P.runningReview+=ie.runningReview,P.totalReview+=ie.totalReview,P.running+=ie.runningImplement+ie.runningReview,P.total+=ie.totalImplement+ie.totalReview,P.workersOffering+=1}return[...W.values()].sort((j,Z)=>j.agent.localeCompare(Z.agent))}function Dg({workers:B,tasks:Y}){const W=de.useMemo(()=>vf(Y),[Y]),j=de.useMemo(()=>Rg(B,W),[B,W]),Z=B.filter(u=>u.connected).length,ie=B.length,P=j.reduce((u,_)=>u+_.running,0),n=j.reduce((u,_)=>u+_.total,0);return Z===0?A.jsx(oi,{title:"Capacity",children:A.jsxs("div",{className:"text-sm text-zinc-400",children:["No workers connected."," ",ie>0?`${ie} worker(s) registered but currently offline.`:"Run `tono start` (single-machine) or `tono worker start --gateway <host>:<port>` on another machine."]})}):A.jsxs(oi,{title:"Capacity",children:[A.jsxs("div",{className:"text-base text-zinc-100 mb-3",children:[A.jsx("span",{className:"font-mono",children:P}),A.jsx("span",{className:"text-zinc-500",children:" of "}),A.jsx("span",{className:"font-mono",children:n}),A.jsx("span",{className:"text-zinc-400",children:" slots in use"}),A.jsxs("span",{className:"text-zinc-500 text-sm",children:[" ","across ",Z," ",Z===1?"worker":"workers"]})]}),A.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-2",children:j.map(u=>A.jsxs("div",{className:"flex items-center justify-between rounded border border-zinc-800 bg-zinc-900/30 px-3 py-2 text-sm",children:[A.jsxs("div",{className:"min-w-0",children:[A.jsx("div",{className:"font-mono text-zinc-200 truncate",children:u.agent}),A.jsxs("div",{className:"text-[11px] text-zinc-500",children:[u.totalImpl>0&&A.jsxs(A.Fragment,{children:[u.runningImpl,"/",u.totalImpl," impl"]}),u.totalImpl>0&&u.totalReview>0&&" · ",u.totalReview>0&&A.jsxs(A.Fragment,{children:[u.runningReview,"/",u.totalReview," review"]})]})]}),A.jsxs("div",{className:"text-right font-mono whitespace-nowrap",children:[A.jsx("span",{className:"text-zinc-100",children:u.running}),A.jsx("span",{className:"text-zinc-600",children:" / "}),A.jsx("span",{className:"text-zinc-100",children:u.total})]})]},u.agent))})]})}function Tg(){const{data:B,error:Y}=Ji(tt.workers,3e3),{data:W}=Ji(tt.tasks,3e3),j=B??[],Z=W??[],ie=de.useMemo(()=>vf(Z),[Z]),P=de.useMemo(()=>[...j].sort((n,u)=>n.connected!==u.connected?n.connected?-1:1:n.hostname==="(local)"&&u.hostname!=="(local)"?-1:u.hostname==="(local)"&&n.hostname!=="(local)"?1:n.hostname.localeCompare(u.hostname)),[j]);return A.jsxs("div",{className:"mx-auto max-w-6xl px-6 py-6 space-y-6",children:[A.jsx("div",{className:"flex items-center justify-between gap-4",children:A.jsxs("div",{children:[A.jsx("h1",{className:"text-xl font-semibold text-zinc-100",children:"Workers"}),A.jsx("p",{className:"text-sm text-zinc-500",children:"Machines connected to this gateway and the slots they're offering."})]})}),Y&&A.jsxs("div",{className:"rounded-md border border-red-900/60 bg-red-950/40 px-3 py-2 text-sm text-red-300",children:["failed to load workers: ",Y.message]}),A.jsx(Dg,{workers:P,tasks:Z}),P.length===0?A.jsx(oi,{children:A.jsxs("div",{className:"text-sm text-zinc-400",children:["No workers have connected yet. The embedded worker should appear within a few seconds of starting the gateway. To add capacity from another machine on your tailnet, run:",A.jsx("pre",{className:"mt-3 rounded bg-zinc-900 p-3 text-xs text-zinc-300 overflow-x-auto",children:"tono worker start --gateway <gateway-host>:7040"})]})}):A.jsx("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:P.map(n=>A.jsx(Ag,{worker:n,active:ie},n.id))})]})}function Mg(){const{path:B}=ts();let Y;const W=B.match(/^\/tasks\/(\d+)\/?$/),j=B.match(/^\/shells\/([^/]+)\/?$/);return W?Y=A.jsx(ug,{taskId:Number(W[1])}):j?Y=A.jsx(dg,{sessionId:decodeURIComponent(j[1])}):B.startsWith("/workers")?Y=A.jsx(Tg,{}):B.startsWith("/config")||B.startsWith("/settings")?Y=A.jsx(Lg,{}):Y=A.jsx(Qv,{}),A.jsxs("div",{className:"min-h-screen flex flex-col",children:[A.jsx(Fv,{}),A.jsx("main",{className:"flex-1",children:Y})]})}const gf=document.getElementById("root");if(!gf)throw new Error("No #root element");Uv.createRoot(gf).render(A.jsx(de.StrictMode,{children:A.jsx(Mg,{})}));
|