codex-lens 0.1.12 → 0.1.13
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.
|
@@ -14,7 +14,7 @@ var Mu=Object.defineProperty;var Ou=(e,t,r)=>t in e?Mu(e,t,{enumerable:!0,config
|
|
|
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 Ju=ve,Zu=Symbol.for("react.element"),eh=Symbol.for("react.fragment"),th=Object.prototype.hasOwnProperty,rh=Ju.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ih={key:!0,ref:!0,__self:!0,__source:!0};function xa(e,t,r){var i,a={},d=null,y=null;r!==void 0&&(d=""+r),t.key!==void 0&&(d=""+t.key),t.ref!==void 0&&(y=t.ref);for(i in t)th.call(t,i)&&!ih.hasOwnProperty(i)&&(a[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)a[i]===void 0&&(a[i]=t[i]);return{$$typeof:Zu,type:e,key:d,ref:y,props:a,_owner:rh.current}}bs.Fragment=eh;bs.jsx=xa;bs.jsxs=xa;va.exports=bs;var
|
|
17
|
+
*/var Ju=ve,Zu=Symbol.for("react.element"),eh=Symbol.for("react.fragment"),th=Object.prototype.hasOwnProperty,rh=Ju.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,ih={key:!0,ref:!0,__self:!0,__source:!0};function xa(e,t,r){var i,a={},d=null,y=null;r!==void 0&&(d=""+r),t.key!==void 0&&(d=""+t.key),t.ref!==void 0&&(y=t.ref);for(i in t)th.call(t,i)&&!ih.hasOwnProperty(i)&&(a[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)a[i]===void 0&&(a[i]=t[i]);return{$$typeof:Zu,type:e,key:d,ref:y,props:a,_owner:rh.current}}bs.Fragment=eh;bs.jsx=xa;bs.jsxs=xa;va.exports=bs;var G=va.exports,La={exports:{}},je={},Da={exports:{}},Ra={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.min.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var Mu=Object.defineProperty;var Ou=(e,t,r)=>t in e?Mu(e,t,{enumerable:!0,config
|
|
|
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
|
-
*/(function(e){function t(H,b){var D=H.length;H.push(b);e:for(;0<D;){var
|
|
25
|
+
*/(function(e){function t(H,b){var D=H.length;H.push(b);e:for(;0<D;){var P=D-1>>>1,B=H[P];if(0<a(B,b))H[P]=b,H[D]=B,D=P;else break e}}function r(H){return H.length===0?null:H[0]}function i(H){if(H.length===0)return null;var b=H[0],D=H.pop();if(D!==b){H[0]=D;e:for(var P=0,B=H.length,z=B>>>1;P<z;){var V=2*(P+1)-1,Q=H[V],Y=V+1,O=H[Y];if(0>a(Q,D))Y<B&&0>a(O,Q)?(H[P]=O,H[Y]=D,P=Y):(H[P]=Q,H[V]=D,P=V);else if(Y<B&&0>a(O,D))H[P]=O,H[Y]=D,P=Y;else break e}}return b}function a(H,b){var D=H.sortIndex-b.sortIndex;return D!==0?D:H.id-b.id}if(typeof performance=="object"&&typeof performance.now=="function"){var d=performance;e.unstable_now=function(){return d.now()}}else{var y=Date,o=y.now();e.unstable_now=function(){return y.now()-o}}var c=[],f=[],m=1,h=null,p=3,S=!1,E=!1,v=!1,u=typeof setTimeout=="function"?setTimeout:null,l=typeof clearTimeout=="function"?clearTimeout:null,s=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function n(H){for(var b=r(f);b!==null;){if(b.callback===null)i(f);else if(b.startTime<=H)i(f),b.sortIndex=b.expirationTime,t(c,b);else break;b=r(f)}}function _(H){if(v=!1,n(H),!E)if(r(c)!==null)E=!0,K(C);else{var b=r(f);b!==null&&q(_,b.startTime-H)}}function C(H,b){E=!1,v&&(v=!1,l(g),g=-1),S=!0;var D=p;try{for(n(b),h=r(c);h!==null&&(!(h.expirationTime>b)||H&&!A());){var P=h.callback;if(typeof P=="function"){h.callback=null,p=h.priorityLevel;var B=P(h.expirationTime<=b);b=e.unstable_now(),typeof B=="function"?h.callback=B:h===r(c)&&i(c),n(b)}else i(c);h=r(c)}if(h!==null)var z=!0;else{var V=r(f);V!==null&&q(_,V.startTime-b),z=!1}return z}finally{h=null,p=D,S=!1}}var w=!1,k=null,g=-1,L=5,R=-1;function A(){return!(e.unstable_now()-R<L)}function M(){if(k!==null){var H=e.unstable_now();R=H;var b=!0;try{b=k(!0,H)}finally{b?T():(w=!1,k=null)}}else w=!1}var T;if(typeof s=="function")T=function(){s(M)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,W=N.port2;N.port1.onmessage=M,T=function(){W.postMessage(null)}}else T=function(){u(M,0)};function K(H){k=H,w||(w=!0,T())}function q(H,b){g=u(function(){H(e.unstable_now())},b)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(H){H.callback=null},e.unstable_continueExecution=function(){E||S||(E=!0,K(C))},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):L=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return p},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(H){switch(p){case 1:case 2:case 3:var b=3;break;default:b=p}var D=p;p=b;try{return H()}finally{p=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(H,b){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var D=p;p=H;try{return b()}finally{p=D}},e.unstable_scheduleCallback=function(H,b,D){var P=e.unstable_now();switch(typeof D=="object"&&D!==null?(D=D.delay,D=typeof D=="number"&&0<D?P+D:P):D=P,H){case 1:var B=-1;break;case 2:B=250;break;case 5:B=1073741823;break;case 4:B=1e4;break;default:B=5e3}return B=D+B,H={id:m++,callback:b,priorityLevel:H,startTime:D,expirationTime:B,sortIndex:-1},D>P?(H.sortIndex=D,t(f,H),r(c)===null&&H===r(f)&&(v?(l(g),g=-1):v=!0,q(_,D-P))):(H.sortIndex=B,t(c,H),E||S||(E=!0,K(C))),H},e.unstable_shouldYield=A,e.unstable_wrapCallback=function(H){var b=p;return function(){var D=p;p=b;try{return H.apply(this,arguments)}finally{p=D}}}})(Ra);Da.exports=Ra;var sh=Da.exports;/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,21 +30,21 @@ var Mu=Object.defineProperty;var Ou=(e,t,r)=>t in e?Mu(e,t,{enumerable:!0,config
|
|
|
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 nh=ve,ze=sh;function
|
|
33
|
+
*/var nh=ve,ze=sh;function U(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);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."}var Ta=new Set,ri={};function er(e,t){Cr(e,t),Cr(e+"Capture",t)}function Cr(e,t){for(ri[e]=t,e=0;e<t.length;e++)Ta.add(t[e])}var pt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Sn=Object.prototype.hasOwnProperty,oh=/^[: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]*$/,ul={},hl={};function lh(e){return Sn.call(hl,e)?!0:Sn.call(ul,e)?!1:oh.test(e)?hl[e]=!0:(ul[e]=!0,!1)}function ah(e,t,r,i){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return i?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function ch(e,t,r,i){if(t===null||typeof t>"u"||ah(e,t,r,i))return!0;if(i)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Pe(e,t,r,i,a,d,y){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=a,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=y}var Ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ee[e]=new Pe(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ee[t]=new Pe(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ee[e]=new Pe(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ee[e]=new Pe(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){Ee[e]=new Pe(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ee[e]=new Pe(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ee[e]=new Pe(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ee[e]=new Pe(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ee[e]=new Pe(e,5,!1,e.toLowerCase(),null,!1,!1)});var vo=/[\-:]([a-z])/g;function go(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(vo,go);Ee[t]=new Pe(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(vo,go);Ee[t]=new Pe(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(vo,go);Ee[t]=new Pe(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ee[e]=new Pe(e,1,!1,e.toLowerCase(),null,!1,!1)});Ee.xlinkHref=new Pe("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ee[e]=new Pe(e,1,!1,e.toLowerCase(),null,!0,!0)});function mo(e,t,r,i){var a=Ee.hasOwnProperty(t)?Ee[t]:null;(a!==null?a.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(ch(t,r,a,i)&&(r=null),i||a===null?lh(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):a.mustUseProperty?e[a.propertyName]=r===null?a.type===3?!1:"":r:(t=a.attributeName,i=a.attributeNamespace,r===null?e.removeAttribute(t):(a=a.type,r=a===3||a===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var St=nh.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Li=Symbol.for("react.element"),ir=Symbol.for("react.portal"),sr=Symbol.for("react.fragment"),So=Symbol.for("react.strict_mode"),yn=Symbol.for("react.profiler"),Pa=Symbol.for("react.provider"),Aa=Symbol.for("react.context"),yo=Symbol.for("react.forward_ref"),Cn=Symbol.for("react.suspense"),wn=Symbol.for("react.suspense_list"),Co=Symbol.for("react.memo"),Et=Symbol.for("react.lazy"),Ba=Symbol.for("react.offscreen"),dl=Symbol.iterator;function Or(e){return e===null||typeof e!="object"?null:(e=dl&&e[dl]||e["@@iterator"],typeof e=="function"?e:null)}var he=Object.assign,Vs;function Ur(e){if(Vs===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);Vs=t&&t[1]||""}return`
|
|
34
34
|
`+Vs+e}var qs=!1;function Gs(e,t){if(!e||qs)return"";qs=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(f){var i=f}Reflect.construct(e,[],t)}else{try{t.call()}catch(f){i=f}e.call(t.prototype)}else{try{throw Error()}catch(f){i=f}e()}}catch(f){if(f&&i&&typeof f.stack=="string"){for(var a=f.stack.split(`
|
|
35
35
|
`),d=i.stack.split(`
|
|
36
36
|
`),y=a.length-1,o=d.length-1;1<=y&&0<=o&&a[y]!==d[o];)o--;for(;1<=y&&0<=o;y--,o--)if(a[y]!==d[o]){if(y!==1||o!==1)do if(y--,o--,0>o||a[y]!==d[o]){var c=`
|
|
37
|
-
`+a[y].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=y&&0<=o);break}}}finally{qs=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ur(e):""}function uh(e){switch(e.tag){case 5:return Ur(e.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return e=Gs(e.type,!1),e;case 11:return e=Gs(e.type.render,!1),e;case 1:return e=Gs(e.type,!0),e;default:return""}}function En(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sr:return"Fragment";case ir:return"Portal";case yn:return"Profiler";case So:return"StrictMode";case Cn:return"Suspense";case wn:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Aa:return(e.displayName||"Context")+".Consumer";case Pa:return(e._context.displayName||"Context")+".Provider";case yo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Co:return t=e.displayName||null,t!==null?t:En(e.type)||"Memo";case Et:t=e._payload,e=e._init;try{return En(e(t))}catch{}}return null}function hh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return En(t);case 8:return t===So?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ma(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dh(e){var t=Ma(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(y){i=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Di(e){e._valueTracker||(e._valueTracker=dh(e))}function Oa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Ma(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function ts(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}}function kn(e,t){var r=t.checked;return ue({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function fl(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=Ht(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ia(e,t){t=t.checked,t!=null&&mo(e,"checked",t,!1)}function bn(e,t){Ia(e,t);var r=Ht(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xn(e,t.type,r):t.hasOwnProperty("defaultValue")&&xn(e,t.type,Ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _l(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function xn(e,t,r){(t!=="number"||ts(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var $r=Array.isArray;function pr(e,t,r,i){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&i&&(e[r].defaultSelected=!0)}else{for(r=""+Ht(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Ln(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(j(91));return ue({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pl(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(j(92));if($r(r)){if(1<r.length)throw Error(j(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ht(r)}}function Ha(e,t){var r=Ht(t.value),i=Ht(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function vl(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Na(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Na(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ri,Fa=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ri=Ri||document.createElement("div"),Ri.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ri.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ii(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var qr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fh=["Webkit","ms","Moz","O"];Object.keys(qr).forEach(function(e){fh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qr[t]=qr[e]})});function Wa(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||qr.hasOwnProperty(e)&&qr[e]?(""+t).trim():t+"px"}function za(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,a=Wa(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,a):e[r]=a}}var _h=ue({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Rn(e,t){if(t){if(_h[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(j(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(j(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(j(61))}if(t.style!=null&&typeof t.style!="object")throw Error(j(62))}}function Tn(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Pn=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var An=null,vr=null,gr=null;function gl(e){if(e=wi(e)){if(typeof An!="function")throw Error(j(280));var t=e.stateNode;t&&(t=Ts(t),An(e.stateNode,e.type,t))}}function ja(e){vr?gr?gr.push(e):gr=[e]:vr=e}function Ua(){if(vr){var e=vr,t=gr;if(gr=vr=null,gl(e),t)for(e=0;e<t.length;e++)gl(t[e])}}function $a(e,t){return e(t)}function Ka(){}var Xs=!1;function Va(e,t,r){if(Xs)return e(t,r);Xs=!0;try{return $a(e,t,r)}finally{Xs=!1,(vr!==null||gr!==null)&&(Ka(),Ua())}}function si(e,t){var r=e.stateNode;if(r===null)return null;var i=Ts(r);if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(j(231,t,typeof r));return r}var Bn=!1;if(pt)try{var Ir={};Object.defineProperty(Ir,"passive",{get:function(){Bn=!0}}),window.addEventListener("test",Ir,Ir),window.removeEventListener("test",Ir,Ir)}catch{Bn=!1}function ph(e,t,r,i,a,d,y,o,c){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(m){this.onError(m)}}var Gr=!1,rs=null,is=!1,Mn=null,vh={onError:function(e){Gr=!0,rs=e}};function gh(e,t,r,i,a,d,y,o,c){Gr=!1,rs=null,ph.apply(vh,arguments)}function mh(e,t,r,i,a,d,y,o,c){if(gh.apply(this,arguments),Gr){if(Gr){var f=rs;Gr=!1,rs=null}else throw Error(j(198));is||(is=!0,Mn=f)}}function tr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function qa(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 ml(e){if(tr(e)!==e)throw Error(j(188))}function Sh(e){var t=e.alternate;if(!t){if(t=tr(e),t===null)throw Error(j(188));return t!==e?null:e}for(var r=e,i=t;;){var a=r.return;if(a===null)break;var d=a.alternate;if(d===null){if(i=a.return,i!==null){r=i;continue}break}if(a.child===d.child){for(d=a.child;d;){if(d===r)return ml(a),e;if(d===i)return ml(a),t;d=d.sibling}throw Error(j(188))}if(r.return!==i.return)r=a,i=d;else{for(var y=!1,o=a.child;o;){if(o===r){y=!0,r=a,i=d;break}if(o===i){y=!0,i=a,r=d;break}o=o.sibling}if(!y){for(o=d.child;o;){if(o===r){y=!0,r=d,i=a;break}if(o===i){y=!0,i=d,r=a;break}o=o.sibling}if(!y)throw Error(j(189))}}if(r.alternate!==i)throw Error(j(190))}if(r.tag!==3)throw Error(j(188));return r.stateNode.current===r?e:t}function Ga(e){return e=Sh(e),e!==null?Xa(e):null}function Xa(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Xa(e);if(t!==null)return t;e=e.sibling}return null}var Qa=ze.unstable_scheduleCallback,Sl=ze.unstable_cancelCallback,yh=ze.unstable_shouldYield,Ch=ze.unstable_requestPaint,_e=ze.unstable_now,wh=ze.unstable_getCurrentPriorityLevel,Eo=ze.unstable_ImmediatePriority,Ya=ze.unstable_UserBlockingPriority,ss=ze.unstable_NormalPriority,Eh=ze.unstable_LowPriority,Ja=ze.unstable_IdlePriority,xs=null,at=null;function kh(e){if(at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(xs,e,void 0,(e.current.flags&128)===128)}catch{}}var tt=Math.clz32?Math.clz32:Lh,bh=Math.log,xh=Math.LN2;function Lh(e){return e>>>=0,e===0?32:31-(bh(e)/xh|0)|0}var Ti=64,Pi=4194304;function Kr(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ns(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,d=e.pingedLanes,y=r&268435455;if(y!==0){var o=y&~a;o!==0?i=Kr(o):(d&=y,d!==0&&(i=Kr(d)))}else y=r&~a,y!==0?i=Kr(y):d!==0&&(i=Kr(d));if(i===0)return 0;if(t!==0&&t!==i&&!(t&a)&&(a=i&-i,d=t&-t,a>=d||a===16&&(d&4194240)!==0))return t;if(i&4&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-tt(t),a=1<<r,i|=e[r],t&=~a;return i}function Dh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rh(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,d=e.pendingLanes;0<d;){var y=31-tt(d),o=1<<y,c=a[y];c===-1?(!(o&r)||o&i)&&(a[y]=Dh(o,t)):c<=t&&(e.expiredLanes|=o),d&=~o}}function On(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Za(){var e=Ti;return Ti<<=1,!(Ti&4194240)&&(Ti=64),e}function Qs(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function yi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=r}function Th(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-tt(r),d=1<<a;t[a]=0,i[a]=-1,e[a]=-1,r&=~d}}function ko(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-tt(r),a=1<<i;a&t|e[i]&t&&(e[i]|=t),r&=~a}}var re=0;function ec(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var tc,bo,rc,ic,sc,In=!1,Ai=[],Rt=null,Tt=null,Pt=null,ni=new Map,oi=new Map,bt=[],Ph="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 submit".split(" ");function yl(e,t){switch(e){case"focusin":case"focusout":Rt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":ni.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":oi.delete(t.pointerId)}}function Hr(e,t,r,i,a,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:d,targetContainers:[a]},t!==null&&(t=wi(t),t!==null&&bo(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Ah(e,t,r,i,a){switch(t){case"focusin":return Rt=Hr(Rt,e,t,r,i,a),!0;case"dragenter":return Tt=Hr(Tt,e,t,r,i,a),!0;case"mouseover":return Pt=Hr(Pt,e,t,r,i,a),!0;case"pointerover":var d=a.pointerId;return ni.set(d,Hr(ni.get(d)||null,e,t,r,i,a)),!0;case"gotpointercapture":return d=a.pointerId,oi.set(d,Hr(oi.get(d)||null,e,t,r,i,a)),!0}return!1}function nc(e){var t=$t(e.target);if(t!==null){var r=tr(t);if(r!==null){if(t=r.tag,t===13){if(t=qa(r),t!==null){e.blockedOn=t,sc(e.priority,function(){rc(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ki(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Hn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Pn=i,r.target.dispatchEvent(i),Pn=null}else return t=wi(r),t!==null&&bo(t),e.blockedOn=r,!1;t.shift()}return!0}function Cl(e,t,r){Ki(e)&&r.delete(t)}function Bh(){In=!1,Rt!==null&&Ki(Rt)&&(Rt=null),Tt!==null&&Ki(Tt)&&(Tt=null),Pt!==null&&Ki(Pt)&&(Pt=null),ni.forEach(Cl),oi.forEach(Cl)}function Nr(e,t){e.blockedOn===t&&(e.blockedOn=null,In||(In=!0,ze.unstable_scheduleCallback(ze.unstable_NormalPriority,Bh)))}function li(e){function t(a){return Nr(a,e)}if(0<Ai.length){Nr(Ai[0],e);for(var r=1;r<Ai.length;r++){var i=Ai[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Rt!==null&&Nr(Rt,e),Tt!==null&&Nr(Tt,e),Pt!==null&&Nr(Pt,e),ni.forEach(t),oi.forEach(t),r=0;r<bt.length;r++)i=bt[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<bt.length&&(r=bt[0],r.blockedOn===null);)nc(r),r.blockedOn===null&&bt.shift()}var mr=St.ReactCurrentBatchConfig,os=!0;function Mh(e,t,r,i){var a=re,d=mr.transition;mr.transition=null;try{re=1,xo(e,t,r,i)}finally{re=a,mr.transition=d}}function Oh(e,t,r,i){var a=re,d=mr.transition;mr.transition=null;try{re=4,xo(e,t,r,i)}finally{re=a,mr.transition=d}}function xo(e,t,r,i){if(os){var a=Hn(e,t,r,i);if(a===null)ln(e,t,i,ls,r),yl(e,i);else if(Ah(a,e,t,r,i))i.stopPropagation();else if(yl(e,i),t&4&&-1<Ph.indexOf(e)){for(;a!==null;){var d=wi(a);if(d!==null&&tc(d),d=Hn(e,t,r,i),d===null&&ln(e,t,i,ls,r),d===a)break;a=d}a!==null&&i.stopPropagation()}else ln(e,t,i,null,r)}}var ls=null;function Hn(e,t,r,i){if(ls=null,e=wo(i),e=$t(e),e!==null)if(t=tr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=qa(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ls=e,null}function oc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(wh()){case Eo:return 1;case Ya:return 4;case ss:case Eh:return 16;case Ja:return 536870912;default:return 16}default:return 16}}var Lt=null,Lo=null,Vi=null;function lc(){if(Vi)return Vi;var e,t=Lo,r=t.length,i,a="value"in Lt?Lt.value:Lt.textContent,d=a.length;for(e=0;e<r&&t[e]===a[e];e++);var y=r-e;for(i=1;i<=y&&t[r-i]===a[d-i];i++);return Vi=a.slice(e,1<i?1-i:void 0)}function qi(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 Bi(){return!0}function wl(){return!1}function Ue(e){function t(r,i,a,d,y){this._reactName=r,this._targetInst=a,this.type=i,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(d):d[o]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Bi:wl,this.isPropagationStopped=wl,this}return ue(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Bi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Bi)},persist:function(){},isPersistent:Bi}),t}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=Ue(Rr),Ci=ue({},Rr,{view:0,detail:0}),Ih=Ue(Ci),Ys,Js,Fr,Ls=ue({},Ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ro,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!==Fr&&(Fr&&e.type==="mousemove"?(Ys=e.screenX-Fr.screenX,Js=e.screenY-Fr.screenY):Js=Ys=0,Fr=e),Ys)},movementY:function(e){return"movementY"in e?e.movementY:Js}}),El=Ue(Ls),Hh=ue({},Ls,{dataTransfer:0}),Nh=Ue(Hh),Fh=ue({},Ci,{relatedTarget:0}),Zs=Ue(Fh),Wh=ue({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),zh=Ue(Wh),jh=ue({},Rr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Uh=Ue(jh),$h=ue({},Rr,{data:0}),kl=Ue($h),Kh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vh={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"},qh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qh[e])?!!t[e]:!1}function Ro(){return Gh}var Xh=ue({},Ci,{key:function(e){if(e.key){var t=Kh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ro,charCode:function(e){return e.type==="keypress"?qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qh=Ue(Xh),Yh=ue({},Ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bl=Ue(Yh),Jh=ue({},Ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ro}),Zh=Ue(Jh),ed=ue({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),td=Ue(ed),rd=ue({},Ls,{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}),id=Ue(rd),sd=[9,13,27,32],To=pt&&"CompositionEvent"in window,Xr=null;pt&&"documentMode"in document&&(Xr=document.documentMode);var nd=pt&&"TextEvent"in window&&!Xr,ac=pt&&(!To||Xr&&8<Xr&&11>=Xr),xl=" ",Ll=!1;function cc(e,t){switch(e){case"keyup":return sd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nr=!1;function od(e,t){switch(e){case"compositionend":return uc(t);case"keypress":return t.which!==32?null:(Ll=!0,xl);case"textInput":return e=t.data,e===xl&&Ll?null:e;default:return null}}function ld(e,t){if(nr)return e==="compositionend"||!To&&cc(e,t)?(e=lc(),Vi=Lo=Lt=null,nr=!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 ac&&t.locale!=="ko"?null:t.data;default:return null}}var ad={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 Dl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ad[e.type]:t==="textarea"}function hc(e,t,r,i){ja(i),t=as(t,"onChange"),0<t.length&&(r=new Do("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Qr=null,ai=null;function cd(e){wc(e,0)}function Ds(e){var t=ar(e);if(Oa(t))return e}function ud(e,t){if(e==="change")return t}var dc=!1;if(pt){var en;if(pt){var tn="oninput"in document;if(!tn){var Rl=document.createElement("div");Rl.setAttribute("oninput","return;"),tn=typeof Rl.oninput=="function"}en=tn}else en=!1;dc=en&&(!document.documentMode||9<document.documentMode)}function Tl(){Qr&&(Qr.detachEvent("onpropertychange",fc),ai=Qr=null)}function fc(e){if(e.propertyName==="value"&&Ds(ai)){var t=[];hc(t,ai,e,wo(e)),Va(cd,t)}}function hd(e,t,r){e==="focusin"?(Tl(),Qr=t,ai=r,Qr.attachEvent("onpropertychange",fc)):e==="focusout"&&Tl()}function dd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ds(ai)}function fd(e,t){if(e==="click")return Ds(t)}function _d(e,t){if(e==="input"||e==="change")return Ds(t)}function pd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var it=typeof Object.is=="function"?Object.is:pd;function ci(e,t){if(it(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var a=r[i];if(!Sn.call(t,a)||!it(e[a],t[a]))return!1}return!0}function Pl(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Al(e,t){var r=Pl(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Pl(r)}}function _c(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_c(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pc(){for(var e=window,t=ts();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ts(e.document)}return t}function Po(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")}function vd(e){var t=pc(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&_c(r.ownerDocument.documentElement,r)){if(i!==null&&Po(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,d=Math.min(i.start,a);i=i.end===void 0?d:Math.min(i.end,a),!e.extend&&d>i&&(a=i,i=d,d=a),a=Al(r,d);var y=Al(r,i);a&&y&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),d>i?(e.addRange(t),e.extend(y.node,y.offset)):(t.setEnd(y.node,y.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gd=pt&&"documentMode"in document&&11>=document.documentMode,or=null,Nn=null,Yr=null,Fn=!1;function Bl(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Fn||or==null||or!==ts(i)||(i=or,"selectionStart"in i&&Po(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Yr&&ci(Yr,i)||(Yr=i,i=as(Nn,"onSelect"),0<i.length&&(t=new Do("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=or)))}function Mi(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var lr={animationend:Mi("Animation","AnimationEnd"),animationiteration:Mi("Animation","AnimationIteration"),animationstart:Mi("Animation","AnimationStart"),transitionend:Mi("Transition","TransitionEnd")},rn={},vc={};pt&&(vc=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function Rs(e){if(rn[e])return rn[e];if(!lr[e])return e;var t=lr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in vc)return rn[e]=t[r];return e}var gc=Rs("animationend"),mc=Rs("animationiteration"),Sc=Rs("animationstart"),yc=Rs("transitionend"),Cc=new Map,Ml="abort auxClick 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(" ");function Ft(e,t){Cc.set(e,t),er(t,[e])}for(var sn=0;sn<Ml.length;sn++){var nn=Ml[sn],md=nn.toLowerCase(),Sd=nn[0].toUpperCase()+nn.slice(1);Ft(md,"on"+Sd)}Ft(gc,"onAnimationEnd");Ft(mc,"onAnimationIteration");Ft(Sc,"onAnimationStart");Ft("dblclick","onDoubleClick");Ft("focusin","onFocus");Ft("focusout","onBlur");Ft(yc,"onTransitionEnd");Cr("onMouseEnter",["mouseout","mouseover"]);Cr("onMouseLeave",["mouseout","mouseover"]);Cr("onPointerEnter",["pointerout","pointerover"]);Cr("onPointerLeave",["pointerout","pointerover"]);er("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));er("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));er("onBeforeInput",["compositionend","keypress","textInput","paste"]);er("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));er("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));er("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),yd=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vr));function Ol(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,mh(i,t,void 0,e),e.currentTarget=null}function wc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],a=i.event;i=i.listeners;e:{var d=void 0;if(t)for(var y=i.length-1;0<=y;y--){var o=i[y],c=o.instance,f=o.currentTarget;if(o=o.listener,c!==d&&a.isPropagationStopped())break e;Ol(a,o,f),d=c}else for(y=0;y<i.length;y++){if(o=i[y],c=o.instance,f=o.currentTarget,o=o.listener,c!==d&&a.isPropagationStopped())break e;Ol(a,o,f),d=c}}}if(is)throw e=Mn,is=!1,Mn=null,e}function se(e,t){var r=t[$n];r===void 0&&(r=t[$n]=new Set);var i=e+"__bubble";r.has(i)||(Ec(t,e,2,!1),r.add(i))}function on(e,t,r){var i=0;t&&(i|=4),Ec(r,e,i,t)}var Oi="_reactListening"+Math.random().toString(36).slice(2);function ui(e){if(!e[Oi]){e[Oi]=!0,Ta.forEach(function(r){r!=="selectionchange"&&(yd.has(r)||on(r,!1,e),on(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oi]||(t[Oi]=!0,on("selectionchange",!1,t))}}function Ec(e,t,r,i){switch(oc(t)){case 1:var a=Mh;break;case 4:a=Oh;break;default:a=xo}r=a.bind(null,t,r,e),a=void 0,!Bn||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function ln(e,t,r,i,a){var d=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var y=i.tag;if(y===3||y===4){var o=i.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(y===4)for(y=i.return;y!==null;){var c=y.tag;if((c===3||c===4)&&(c=y.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;y=y.return}for(;o!==null;){if(y=$t(o),y===null)return;if(c=y.tag,c===5||c===6){i=d=y;continue e}o=o.parentNode}}i=i.return}Va(function(){var f=d,m=wo(r),h=[];e:{var p=Cc.get(e);if(p!==void 0){var S=Do,E=e;switch(e){case"keypress":if(qi(r)===0)break e;case"keydown":case"keyup":S=Qh;break;case"focusin":E="focus",S=Zs;break;case"focusout":E="blur",S=Zs;break;case"beforeblur":case"afterblur":S=Zs;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=El;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=Nh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=Zh;break;case gc:case mc:case Sc:S=zh;break;case yc:S=td;break;case"scroll":S=Ih;break;case"wheel":S=id;break;case"copy":case"cut":case"paste":S=Uh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=bl}var v=(t&4)!==0,u=!v&&e==="scroll",l=v?p!==null?p+"Capture":null:p;v=[];for(var s=f,n;s!==null;){n=s;var _=n.stateNode;if(n.tag===5&&_!==null&&(n=_,l!==null&&(_=si(s,l),_!=null&&v.push(hi(s,_,n)))),u)break;s=s.return}0<v.length&&(p=new S(p,E,null,r,m),h.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",p&&r!==Pn&&(E=r.relatedTarget||r.fromElement)&&($t(E)||E[vt]))break e;if((S||p)&&(p=m.window===m?m:(p=m.ownerDocument)?p.defaultView||p.parentWindow:window,S?(E=r.relatedTarget||r.toElement,S=f,E=E?$t(E):null,E!==null&&(u=tr(E),E!==u||E.tag!==5&&E.tag!==6)&&(E=null)):(S=null,E=f),S!==E)){if(v=El,_="onMouseLeave",l="onMouseEnter",s="mouse",(e==="pointerout"||e==="pointerover")&&(v=bl,_="onPointerLeave",l="onPointerEnter",s="pointer"),u=S==null?p:ar(S),n=E==null?p:ar(E),p=new v(_,s+"leave",S,r,m),p.target=u,p.relatedTarget=n,_=null,$t(m)===f&&(v=new v(l,s+"enter",E,r,m),v.target=n,v.relatedTarget=u,_=v),u=_,S&&E)t:{for(v=S,l=E,s=0,n=v;n;n=rr(n))s++;for(n=0,_=l;_;_=rr(_))n++;for(;0<s-n;)v=rr(v),s--;for(;0<n-s;)l=rr(l),n--;for(;s--;){if(v===l||l!==null&&v===l.alternate)break t;v=rr(v),l=rr(l)}v=null}else v=null;S!==null&&Il(h,p,S,v,!1),E!==null&&u!==null&&Il(h,u,E,v,!0)}}e:{if(p=f?ar(f):window,S=p.nodeName&&p.nodeName.toLowerCase(),S==="select"||S==="input"&&p.type==="file")var C=ud;else if(Dl(p))if(dc)C=_d;else{C=dd;var w=hd}else(S=p.nodeName)&&S.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=fd);if(C&&(C=C(e,f))){hc(h,C,r,m);break e}w&&w(e,p,f),e==="focusout"&&(w=p._wrapperState)&&w.controlled&&p.type==="number"&&xn(p,"number",p.value)}switch(w=f?ar(f):window,e){case"focusin":(Dl(w)||w.contentEditable==="true")&&(or=w,Nn=f,Yr=null);break;case"focusout":Yr=Nn=or=null;break;case"mousedown":Fn=!0;break;case"contextmenu":case"mouseup":case"dragend":Fn=!1,Bl(h,r,m);break;case"selectionchange":if(gd)break;case"keydown":case"keyup":Bl(h,r,m)}var k;if(To)e:{switch(e){case"compositionstart":var g="onCompositionStart";break e;case"compositionend":g="onCompositionEnd";break e;case"compositionupdate":g="onCompositionUpdate";break e}g=void 0}else nr?cc(e,r)&&(g="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(g="onCompositionStart");g&&(ac&&r.locale!=="ko"&&(nr||g!=="onCompositionStart"?g==="onCompositionEnd"&&nr&&(k=lc()):(Lt=m,Lo="value"in Lt?Lt.value:Lt.textContent,nr=!0)),w=as(f,g),0<w.length&&(g=new kl(g,e,null,r,m),h.push({event:g,listeners:w}),k?g.data=k:(k=uc(r),k!==null&&(g.data=k)))),(k=nd?od(e,r):ld(e,r))&&(f=as(f,"onBeforeInput"),0<f.length&&(m=new kl("onBeforeInput","beforeinput",null,r,m),h.push({event:m,listeners:f}),m.data=k))}wc(h,t)})}function hi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function as(e,t){for(var r=t+"Capture",i=[];e!==null;){var a=e,d=a.stateNode;a.tag===5&&d!==null&&(a=d,d=si(e,r),d!=null&&i.unshift(hi(e,d,a)),d=si(e,t),d!=null&&i.push(hi(e,d,a))),e=e.return}return i}function rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Il(e,t,r,i,a){for(var d=t._reactName,y=[];r!==null&&r!==i;){var o=r,c=o.alternate,f=o.stateNode;if(c!==null&&c===i)break;o.tag===5&&f!==null&&(o=f,a?(c=si(r,d),c!=null&&y.unshift(hi(r,c,o))):a||(c=si(r,d),c!=null&&y.push(hi(r,c,o)))),r=r.return}y.length!==0&&e.push({event:t,listeners:y})}var Cd=/\r\n?/g,wd=/\u0000|\uFFFD/g;function Hl(e){return(typeof e=="string"?e:""+e).replace(Cd,`
|
|
38
|
-
`).replace(wd,"")}function Ii(e,t,r){if(t=Hl(t),Hl(e)!==t&&r)throw Error(j(425))}function cs(){}var Wn=null,zn=null;function jn(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Un=typeof setTimeout=="function"?setTimeout:void 0,Ed=typeof clearTimeout=="function"?clearTimeout:void 0,Nl=typeof Promise=="function"?Promise:void 0,kd=typeof queueMicrotask=="function"?queueMicrotask:typeof Nl<"u"?function(e){return Nl.resolve(null).then(e).catch(bd)}:Un;function bd(e){setTimeout(function(){throw e})}function an(e,t){var r=t,i=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(i===0){e.removeChild(a),li(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=a}while(r);li(t)}function At(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==="$?")break;if(t==="/$")return null}}return e}function Fl(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Tr=Math.random().toString(36).slice(2),lt="__reactFiber$"+Tr,di="__reactProps$"+Tr,vt="__reactContainer$"+Tr,$n="__reactEvents$"+Tr,xd="__reactListeners$"+Tr,Ld="__reactHandles$"+Tr;function $t(e){var t=e[lt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vt]||r[lt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Fl(e);e!==null;){if(r=e[lt])return r;e=Fl(e)}return t}e=r,r=e.parentNode}return null}function wi(e){return e=e[lt]||e[vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ar(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(j(33))}function Ts(e){return e[di]||null}var Kn=[],cr=-1;function Wt(e){return{current:e}}function ne(e){0>cr||(e.current=Kn[cr],Kn[cr]=null,cr--)}function ie(e,t){cr++,Kn[cr]=e.current,e.current=t}var Nt={},Le=Wt(Nt),Oe=Wt(!1),Xt=Nt;function wr(e,t){var r=e.type.contextTypes;if(!r)return Nt;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},d;for(d in r)a[d]=t[d];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ie(e){return e=e.childContextTypes,e!=null}function us(){ne(Oe),ne(Le)}function Wl(e,t,r){if(Le.current!==Nt)throw Error(j(168));ie(Le,t),ie(Oe,r)}function kc(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(j(108,hh(e)||"Unknown",a));return ue({},r,i)}function hs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nt,Xt=Le.current,ie(Le,e),ie(Oe,Oe.current),!0}function zl(e,t,r){var i=e.stateNode;if(!i)throw Error(j(169));r?(e=kc(e,t,Xt),i.__reactInternalMemoizedMergedChildContext=e,ne(Oe),ne(Le),ie(Le,e)):ne(Oe),ie(Oe,r)}var ht=null,Ps=!1,cn=!1;function bc(e){ht===null?ht=[e]:ht.push(e)}function Dd(e){Ps=!0,bc(e)}function zt(){if(!cn&&ht!==null){cn=!0;var e=0,t=re;try{var r=ht;for(re=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}ht=null,Ps=!1}catch(a){throw ht!==null&&(ht=ht.slice(e+1)),Qa(Eo,zt),a}finally{re=t,cn=!1}}return null}var ur=[],hr=0,ds=null,fs=0,Ke=[],Ve=0,Qt=null,dt=1,ft="";function jt(e,t){ur[hr++]=fs,ur[hr++]=ds,ds=e,fs=t}function xc(e,t,r){Ke[Ve++]=dt,Ke[Ve++]=ft,Ke[Ve++]=Qt,Qt=e;var i=dt;e=ft;var a=32-tt(i)-1;i&=~(1<<a),r+=1;var d=32-tt(t)+a;if(30<d){var y=a-a%5;d=(i&(1<<y)-1).toString(32),i>>=y,a-=y,dt=1<<32-tt(t)+a|r<<a|i,ft=d+e}else dt=1<<d|r<<a|i,ft=e}function Ao(e){e.return!==null&&(jt(e,1),xc(e,1,0))}function Bo(e){for(;e===ds;)ds=ur[--hr],ur[hr]=null,fs=ur[--hr],ur[hr]=null;for(;e===Qt;)Qt=Ke[--Ve],Ke[Ve]=null,ft=Ke[--Ve],Ke[Ve]=null,dt=Ke[--Ve],Ke[Ve]=null}var We=null,Fe=null,oe=!1,et=null;function Lc(e,t){var r=qe(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function jl(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,We=e,Fe=At(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,We=e,Fe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Qt!==null?{id:dt,overflow:ft}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=qe(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,We=e,Fe=null,!0):!1;default:return!1}}function Vn(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qn(e){if(oe){var t=Fe;if(t){var r=t;if(!jl(e,t)){if(Vn(e))throw Error(j(418));t=At(r.nextSibling);var i=We;t&&jl(e,t)?Lc(i,r):(e.flags=e.flags&-4097|2,oe=!1,We=e)}}else{if(Vn(e))throw Error(j(418));e.flags=e.flags&-4097|2,oe=!1,We=e}}}function Ul(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;We=e}function Hi(e){if(e!==We)return!1;if(!oe)return Ul(e),oe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jn(e.type,e.memoizedProps)),t&&(t=Fe)){if(Vn(e))throw Dc(),Error(j(418));for(;t;)Lc(e,t),t=At(t.nextSibling)}if(Ul(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(j(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Fe=At(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Fe=null}}else Fe=We?At(e.stateNode.nextSibling):null;return!0}function Dc(){for(var e=Fe;e;)e=At(e.nextSibling)}function Er(){Fe=We=null,oe=!1}function Mo(e){et===null?et=[e]:et.push(e)}var Rd=St.ReactCurrentBatchConfig;function Wr(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(j(309));var i=r.stateNode}if(!i)throw Error(j(147,e));var a=i,d=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===d?t.ref:(t=function(y){var o=a.refs;y===null?delete o[d]:o[d]=y},t._stringRef=d,t)}if(typeof e!="string")throw Error(j(284));if(!r._owner)throw Error(j(290,e))}return e}function Ni(e,t){throw e=Object.prototype.toString.call(t),Error(j(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $l(e){var t=e._init;return t(e._payload)}function Rc(e){function t(l,s){if(e){var n=l.deletions;n===null?(l.deletions=[s],l.flags|=16):n.push(s)}}function r(l,s){if(!e)return null;for(;s!==null;)t(l,s),s=s.sibling;return null}function i(l,s){for(l=new Map;s!==null;)s.key!==null?l.set(s.key,s):l.set(s.index,s),s=s.sibling;return l}function a(l,s){return l=It(l,s),l.index=0,l.sibling=null,l}function d(l,s,n){return l.index=n,e?(n=l.alternate,n!==null?(n=n.index,n<s?(l.flags|=2,s):n):(l.flags|=2,s)):(l.flags|=1048576,s)}function y(l){return e&&l.alternate===null&&(l.flags|=2),l}function o(l,s,n,_){return s===null||s.tag!==6?(s=vn(n,l.mode,_),s.return=l,s):(s=a(s,n),s.return=l,s)}function c(l,s,n,_){var C=n.type;return C===sr?m(l,s,n.props.children,_,n.key):s!==null&&(s.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Et&&$l(C)===s.type)?(_=a(s,n.props),_.ref=Wr(l,s,n),_.return=l,_):(_=es(n.type,n.key,n.props,null,l.mode,_),_.ref=Wr(l,s,n),_.return=l,_)}function f(l,s,n,_){return s===null||s.tag!==4||s.stateNode.containerInfo!==n.containerInfo||s.stateNode.implementation!==n.implementation?(s=gn(n,l.mode,_),s.return=l,s):(s=a(s,n.children||[]),s.return=l,s)}function m(l,s,n,_,C){return s===null||s.tag!==7?(s=Gt(n,l.mode,_,C),s.return=l,s):(s=a(s,n),s.return=l,s)}function h(l,s,n){if(typeof s=="string"&&s!==""||typeof s=="number")return s=vn(""+s,l.mode,n),s.return=l,s;if(typeof s=="object"&&s!==null){switch(s.$$typeof){case Li:return n=es(s.type,s.key,s.props,null,l.mode,n),n.ref=Wr(l,null,s),n.return=l,n;case ir:return s=gn(s,l.mode,n),s.return=l,s;case Et:var _=s._init;return h(l,_(s._payload),n)}if($r(s)||Or(s))return s=Gt(s,l.mode,n,null),s.return=l,s;Ni(l,s)}return null}function p(l,s,n,_){var C=s!==null?s.key:null;if(typeof n=="string"&&n!==""||typeof n=="number")return C!==null?null:o(l,s,""+n,_);if(typeof n=="object"&&n!==null){switch(n.$$typeof){case Li:return n.key===C?c(l,s,n,_):null;case ir:return n.key===C?f(l,s,n,_):null;case Et:return C=n._init,p(l,s,C(n._payload),_)}if($r(n)||Or(n))return C!==null?null:m(l,s,n,_,null);Ni(l,n)}return null}function S(l,s,n,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return l=l.get(n)||null,o(s,l,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Li:return l=l.get(_.key===null?n:_.key)||null,c(s,l,_,C);case ir:return l=l.get(_.key===null?n:_.key)||null,f(s,l,_,C);case Et:var w=_._init;return S(l,s,n,w(_._payload),C)}if($r(_)||Or(_))return l=l.get(n)||null,m(s,l,_,C,null);Ni(s,_)}return null}function E(l,s,n,_){for(var C=null,w=null,k=s,g=s=0,x=null;k!==null&&g<n.length;g++){k.index>g?(x=k,k=null):x=k.sibling;var T=p(l,k,n[g],_);if(T===null){k===null&&(k=x);break}e&&k&&T.alternate===null&&t(l,k),s=d(T,s,g),w===null?C=T:w.sibling=T,w=T,k=x}if(g===n.length)return r(l,k),oe&&jt(l,g),C;if(k===null){for(;g<n.length;g++)k=h(l,n[g],_),k!==null&&(s=d(k,s,g),w===null?C=k:w.sibling=k,w=k);return oe&&jt(l,g),C}for(k=i(l,k);g<n.length;g++)x=S(k,l,g,n[g],_),x!==null&&(e&&x.alternate!==null&&k.delete(x.key===null?g:x.key),s=d(x,s,g),w===null?C=x:w.sibling=x,w=x);return e&&k.forEach(function(B){return t(l,B)}),oe&&jt(l,g),C}function v(l,s,n,_){var C=Or(n);if(typeof C!="function")throw Error(j(150));if(n=C.call(n),n==null)throw Error(j(151));for(var w=C=null,k=s,g=s=0,x=null,T=n.next();k!==null&&!T.done;g++,T=n.next()){k.index>g?(x=k,k=null):x=k.sibling;var B=p(l,k,T.value,_);if(B===null){k===null&&(k=x);break}e&&k&&B.alternate===null&&t(l,k),s=d(B,s,g),w===null?C=B:w.sibling=B,w=B,k=x}if(T.done)return r(l,k),oe&&jt(l,g),C;if(k===null){for(;!T.done;g++,T=n.next())T=h(l,T.value,_),T!==null&&(s=d(T,s,g),w===null?C=T:w.sibling=T,w=T);return oe&&jt(l,g),C}for(k=i(l,k);!T.done;g++,T=n.next())T=S(k,l,g,T.value,_),T!==null&&(e&&T.alternate!==null&&k.delete(T.key===null?g:T.key),s=d(T,s,g),w===null?C=T:w.sibling=T,w=T);return e&&k.forEach(function(O){return t(l,O)}),oe&&jt(l,g),C}function u(l,s,n,_){if(typeof n=="object"&&n!==null&&n.type===sr&&n.key===null&&(n=n.props.children),typeof n=="object"&&n!==null){switch(n.$$typeof){case Li:e:{for(var C=n.key,w=s;w!==null;){if(w.key===C){if(C=n.type,C===sr){if(w.tag===7){r(l,w.sibling),s=a(w,n.props.children),s.return=l,l=s;break e}}else if(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Et&&$l(C)===w.type){r(l,w.sibling),s=a(w,n.props),s.ref=Wr(l,w,n),s.return=l,l=s;break e}r(l,w);break}else t(l,w);w=w.sibling}n.type===sr?(s=Gt(n.props.children,l.mode,_,n.key),s.return=l,l=s):(_=es(n.type,n.key,n.props,null,l.mode,_),_.ref=Wr(l,s,n),_.return=l,l=_)}return y(l);case ir:e:{for(w=n.key;s!==null;){if(s.key===w)if(s.tag===4&&s.stateNode.containerInfo===n.containerInfo&&s.stateNode.implementation===n.implementation){r(l,s.sibling),s=a(s,n.children||[]),s.return=l,l=s;break e}else{r(l,s);break}else t(l,s);s=s.sibling}s=gn(n,l.mode,_),s.return=l,l=s}return y(l);case Et:return w=n._init,u(l,s,w(n._payload),_)}if($r(n))return E(l,s,n,_);if(Or(n))return v(l,s,n,_);Ni(l,n)}return typeof n=="string"&&n!==""||typeof n=="number"?(n=""+n,s!==null&&s.tag===6?(r(l,s.sibling),s=a(s,n),s.return=l,l=s):(r(l,s),s=vn(n,l.mode,_),s.return=l,l=s),y(l)):r(l,s)}return u}var kr=Rc(!0),Tc=Rc(!1),_s=Wt(null),ps=null,dr=null,Oo=null;function Io(){Oo=dr=ps=null}function Ho(e){var t=_s.current;ne(_s),e._currentValue=t}function Gn(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function Sr(e,t){ps=e,Oo=dr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Me=!0),e.firstContext=null)}function Xe(e){var t=e._currentValue;if(Oo!==e)if(e={context:e,memoizedValue:t,next:null},dr===null){if(ps===null)throw Error(j(308));dr=e,ps.dependencies={lanes:0,firstContext:e}}else dr=dr.next=e;return t}var Kt=null;function No(e){Kt===null?Kt=[e]:Kt.push(e)}function Pc(e,t,r,i){var a=t.interleaved;return a===null?(r.next=r,No(t)):(r.next=a.next,a.next=r),t.interleaved=r,gt(e,i)}function gt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var kt=!1;function Fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ac(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bt(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,te&2){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,gt(e,r)}return a=i.interleaved,a===null?(t.next=t,No(i)):(t.next=a.next,a.next=t),i.interleaved=t,gt(e,r)}function Gi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,ko(e,r)}}function Kl(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var a=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var y={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};d===null?a=d=y:d=d.next=y,r=r.next}while(r!==null);d===null?a=d=t:d=d.next=t}else a=d=t;r={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:d,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function vs(e,t,r,i){var a=e.updateQueue;kt=!1;var d=a.firstBaseUpdate,y=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,f=c.next;c.next=null,y===null?d=f:y.next=f,y=c;var m=e.alternate;m!==null&&(m=m.updateQueue,o=m.lastBaseUpdate,o!==y&&(o===null?m.firstBaseUpdate=f:o.next=f,m.lastBaseUpdate=c))}if(d!==null){var h=a.baseState;y=0,m=f=c=null,o=d;do{var p=o.lane,S=o.eventTime;if((i&p)===p){m!==null&&(m=m.next={eventTime:S,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var E=e,v=o;switch(p=t,S=r,v.tag){case 1:if(E=v.payload,typeof E=="function"){h=E.call(S,h,p);break e}h=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=v.payload,p=typeof E=="function"?E.call(S,h,p):E,p==null)break e;h=ue({},h,p);break e;case 2:kt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[o]:p.push(o))}else S={eventTime:S,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},m===null?(f=m=S,c=h):m=m.next=S,y|=p;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(m===null&&(c=h),a.baseState=c,a.firstBaseUpdate=f,a.lastBaseUpdate=m,t=a.shared.interleaved,t!==null){a=t;do y|=a.lane,a=a.next;while(a!==t)}else d===null&&(a.shared.lanes=0);Jt|=y,e.lanes=y,e.memoizedState=h}}function Vl(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=r,typeof a!="function")throw Error(j(191,a));a.call(i)}}}var Ei={},ct=Wt(Ei),fi=Wt(Ei),_i=Wt(Ei);function Vt(e){if(e===Ei)throw Error(j(174));return e}function Wo(e,t){switch(ie(_i,t),ie(fi,e),ie(ct,Ei),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Dn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Dn(t,e)}ne(ct),ie(ct,t)}function br(){ne(ct),ne(fi),ne(_i)}function Bc(e){Vt(_i.current);var t=Vt(ct.current),r=Dn(t,e.type);t!==r&&(ie(fi,e),ie(ct,r))}function zo(e){fi.current===e&&(ne(ct),ne(fi))}var ae=Wt(0);function gs(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 un=[];function jo(){for(var e=0;e<un.length;e++)un[e]._workInProgressVersionPrimary=null;un.length=0}var Xi=St.ReactCurrentDispatcher,hn=St.ReactCurrentBatchConfig,Yt=0,ce=null,ge=null,Se=null,ms=!1,Jr=!1,pi=0,Td=0;function ke(){throw Error(j(321))}function Uo(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!it(e[r],t[r]))return!1;return!0}function $o(e,t,r,i,a,d){if(Yt=d,ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xi.current=e===null||e.memoizedState===null?Md:Od,e=r(i,a),Jr){d=0;do{if(Jr=!1,pi=0,25<=d)throw Error(j(301));d+=1,Se=ge=null,t.updateQueue=null,Xi.current=Id,e=r(i,a)}while(Jr)}if(Xi.current=Ss,t=ge!==null&&ge.next!==null,Yt=0,Se=ge=ce=null,ms=!1,t)throw Error(j(300));return e}function Ko(){var e=pi!==0;return pi=0,e}function ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?ce.memoizedState=Se=e:Se=Se.next=e,Se}function Qe(){if(ge===null){var e=ce.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Se===null?ce.memoizedState:Se.next;if(t!==null)Se=t,ge=e;else{if(e===null)throw Error(j(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Se===null?ce.memoizedState=Se=e:Se=Se.next=e}return Se}function vi(e,t){return typeof t=="function"?t(e):t}function dn(e){var t=Qe(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var i=ge,a=i.baseQueue,d=r.pending;if(d!==null){if(a!==null){var y=a.next;a.next=d.next,d.next=y}i.baseQueue=a=d,r.pending=null}if(a!==null){d=a.next,i=i.baseState;var o=y=null,c=null,f=d;do{var m=f.lane;if((Yt&m)===m)c!==null&&(c=c.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),i=f.hasEagerState?f.eagerState:e(i,f.action);else{var h={lane:m,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};c===null?(o=c=h,y=i):c=c.next=h,ce.lanes|=m,Jt|=m}f=f.next}while(f!==null&&f!==d);c===null?y=i:c.next=o,it(i,t.memoizedState)||(Me=!0),t.memoizedState=i,t.baseState=y,t.baseQueue=c,r.lastRenderedState=i}if(e=r.interleaved,e!==null){a=e;do d=a.lane,ce.lanes|=d,Jt|=d,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function fn(e){var t=Qe(),r=t.queue;if(r===null)throw Error(j(311));r.lastRenderedReducer=e;var i=r.dispatch,a=r.pending,d=t.memoizedState;if(a!==null){r.pending=null;var y=a=a.next;do d=e(d,y.action),y=y.next;while(y!==a);it(d,t.memoizedState)||(Me=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),r.lastRenderedState=d}return[d,i]}function Mc(){}function Oc(e,t){var r=ce,i=Qe(),a=t(),d=!it(i.memoizedState,a);if(d&&(i.memoizedState=a,Me=!0),i=i.queue,Vo(Nc.bind(null,r,i,e),[e]),i.getSnapshot!==t||d||Se!==null&&Se.memoizedState.tag&1){if(r.flags|=2048,gi(9,Hc.bind(null,r,i,a,t),void 0,null),ye===null)throw Error(j(349));Yt&30||Ic(r,t,a)}return a}function Ic(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Hc(e,t,r,i){t.value=r,t.getSnapshot=i,Fc(t)&&Wc(e)}function Nc(e,t,r){return r(function(){Fc(t)&&Wc(e)})}function Fc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!it(e,r)}catch{return!0}}function Wc(e){var t=gt(e,1);t!==null&&rt(t,e,1,-1)}function ql(e){var t=ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t.queue=e,e=e.dispatch=Bd.bind(null,ce,e),[t.memoizedState,e]}function gi(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=ce.updateQueue,t===null?(t={lastEffect:null,stores:null},ce.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function zc(){return Qe().memoizedState}function Qi(e,t,r,i){var a=ot();ce.flags|=e,a.memoizedState=gi(1|t,r,void 0,i===void 0?null:i)}function As(e,t,r,i){var a=Qe();i=i===void 0?null:i;var d=void 0;if(ge!==null){var y=ge.memoizedState;if(d=y.destroy,i!==null&&Uo(i,y.deps)){a.memoizedState=gi(t,r,d,i);return}}ce.flags|=e,a.memoizedState=gi(1|t,r,d,i)}function Gl(e,t){return Qi(8390656,8,e,t)}function Vo(e,t){return As(2048,8,e,t)}function jc(e,t){return As(4,2,e,t)}function Uc(e,t){return As(4,4,e,t)}function $c(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kc(e,t,r){return r=r!=null?r.concat([e]):null,As(4,4,$c.bind(null,t,e),r)}function qo(){}function Vc(e,t){var r=Qe();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Uo(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function qc(e,t){var r=Qe();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Uo(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function Gc(e,t,r){return Yt&21?(it(r,t)||(r=Za(),ce.lanes|=r,Jt|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Me=!0),e.memoizedState=r)}function Pd(e,t){var r=re;re=r!==0&&4>r?r:4,e(!0);var i=hn.transition;hn.transition={};try{e(!1),t()}finally{re=r,hn.transition=i}}function Xc(){return Qe().memoizedState}function Ad(e,t,r){var i=Ot(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Qc(e))Yc(t,r);else if(r=Pc(e,t,r,i),r!==null){var a=Re();rt(r,e,i,a),Jc(r,t,i)}}function Bd(e,t,r){var i=Ot(e),a={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Qc(e))Yc(t,a);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,o=d(y,r);if(a.hasEagerState=!0,a.eagerState=o,it(o,y)){var c=t.interleaved;c===null?(a.next=a,No(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=Pc(e,t,a,i),r!==null&&(a=Re(),rt(r,e,i,a),Jc(r,t,i))}}function Qc(e){var t=e.alternate;return e===ce||t!==null&&t===ce}function Yc(e,t){Jr=ms=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Jc(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,ko(e,r)}}var Ss={readContext:Xe,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useInsertionEffect:ke,useLayoutEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useMutableSource:ke,useSyncExternalStore:ke,useId:ke,unstable_isNewReconciler:!1},Md={readContext:Xe,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:Xe,useEffect:Gl,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Qi(4194308,4,$c.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Qi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qi(4,2,e,t)},useMemo:function(e,t){var r=ot();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=ot();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Ad.bind(null,ce,e),[i.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:ql,useDebugValue:qo,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=ql(!1),t=e[0];return e=Pd.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ce,a=ot();if(oe){if(r===void 0)throw Error(j(407));r=r()}else{if(r=t(),ye===null)throw Error(j(349));Yt&30||Ic(i,t,r)}a.memoizedState=r;var d={value:r,getSnapshot:t};return a.queue=d,Gl(Nc.bind(null,i,d,e),[e]),i.flags|=2048,gi(9,Hc.bind(null,i,d,r,t),void 0,null),r},useId:function(){var e=ot(),t=ye.identifierPrefix;if(oe){var r=ft,i=dt;r=(i&~(1<<32-tt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=pi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Td++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Od={readContext:Xe,useCallback:Vc,useContext:Xe,useEffect:Vo,useImperativeHandle:Kc,useInsertionEffect:jc,useLayoutEffect:Uc,useMemo:qc,useReducer:dn,useRef:zc,useState:function(){return dn(vi)},useDebugValue:qo,useDeferredValue:function(e){var t=Qe();return Gc(t,ge.memoizedState,e)},useTransition:function(){var e=dn(vi)[0],t=Qe().memoizedState;return[e,t]},useMutableSource:Mc,useSyncExternalStore:Oc,useId:Xc,unstable_isNewReconciler:!1},Id={readContext:Xe,useCallback:Vc,useContext:Xe,useEffect:Vo,useImperativeHandle:Kc,useInsertionEffect:jc,useLayoutEffect:Uc,useMemo:qc,useReducer:fn,useRef:zc,useState:function(){return fn(vi)},useDebugValue:qo,useDeferredValue:function(e){var t=Qe();return ge===null?t.memoizedState=e:Gc(t,ge.memoizedState,e)},useTransition:function(){var e=fn(vi)[0],t=Qe().memoizedState;return[e,t]},useMutableSource:Mc,useSyncExternalStore:Oc,useId:Xc,unstable_isNewReconciler:!1};function Je(e,t){if(e&&e.defaultProps){t=ue({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Xn(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:ue({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Bs={isMounted:function(e){return(e=e._reactInternals)?tr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Re(),a=Ot(e),d=_t(i,a);d.payload=t,r!=null&&(d.callback=r),t=Bt(e,d,a),t!==null&&(rt(t,e,a,i),Gi(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Re(),a=Ot(e),d=_t(i,a);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=Bt(e,d,a),t!==null&&(rt(t,e,a,i),Gi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Re(),i=Ot(e),a=_t(r,i);a.tag=2,t!=null&&(a.callback=t),t=Bt(e,a,i),t!==null&&(rt(t,e,i,r),Gi(t,e,i))}};function Xl(e,t,r,i,a,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,y):t.prototype&&t.prototype.isPureReactComponent?!ci(r,i)||!ci(a,d):!0}function Zc(e,t,r){var i=!1,a=Nt,d=t.contextType;return typeof d=="object"&&d!==null?d=Xe(d):(a=Ie(t)?Xt:Le.current,i=t.contextTypes,d=(i=i!=null)?wr(e,a):Nt),t=new t(r,d),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Bs,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=d),t}function Ql(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Qn(e,t,r,i){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},Fo(e);var d=t.contextType;typeof d=="object"&&d!==null?a.context=Xe(d):(d=Ie(t)?Xt:Le.current,a.context=wr(e,d)),a.state=e.memoizedState,d=t.getDerivedStateFromProps,typeof d=="function"&&(Xn(e,t,d,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Bs.enqueueReplaceState(a,a.state,null),vs(e,r,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function xr(e,t){try{var r="",i=t;do r+=uh(i),i=i.return;while(i);var a=r}catch(d){a=`
|
|
37
|
+
`+a[y].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=y&&0<=o);break}}}finally{qs=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Ur(e):""}function uh(e){switch(e.tag){case 5:return Ur(e.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return e=Gs(e.type,!1),e;case 11:return e=Gs(e.type.render,!1),e;case 1:return e=Gs(e.type,!0),e;default:return""}}function En(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case sr:return"Fragment";case ir:return"Portal";case yn:return"Profiler";case So:return"StrictMode";case Cn:return"Suspense";case wn:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Aa:return(e.displayName||"Context")+".Consumer";case Pa:return(e._context.displayName||"Context")+".Provider";case yo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Co:return t=e.displayName||null,t!==null?t:En(e.type)||"Memo";case Et:t=e._payload,e=e._init;try{return En(e(t))}catch{}}return null}function hh(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return En(t);case 8:return t===So?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function Ht(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ma(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function dh(e){var t=Ma(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var a=r.get,d=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(y){i=""+y,d.call(this,y)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(y){i=""+y},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Di(e){e._valueTracker||(e._valueTracker=dh(e))}function Oa(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Ma(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function ts(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}}function kn(e,t){var r=t.checked;return he({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function fl(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=Ht(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ia(e,t){t=t.checked,t!=null&&mo(e,"checked",t,!1)}function bn(e,t){Ia(e,t);var r=Ht(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?xn(e,t.type,r):t.hasOwnProperty("defaultValue")&&xn(e,t.type,Ht(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function _l(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function xn(e,t,r){(t!=="number"||ts(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var $r=Array.isArray;function pr(e,t,r,i){if(e=e.options,t){t={};for(var a=0;a<r.length;a++)t["$"+r[a]]=!0;for(r=0;r<e.length;r++)a=t.hasOwnProperty("$"+e[r].value),e[r].selected!==a&&(e[r].selected=a),a&&i&&(e[r].defaultSelected=!0)}else{for(r=""+Ht(r),t=null,a=0;a<e.length;a++){if(e[a].value===r){e[a].selected=!0,i&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Ln(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(U(91));return he({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function pl(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(U(92));if($r(r)){if(1<r.length)throw Error(U(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Ht(r)}}function Ha(e,t){var r=Ht(t.value),i=Ht(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function vl(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Na(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Dn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Na(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Ri,Fa=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,a){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,a)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Ri=Ri||document.createElement("div"),Ri.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Ri.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ii(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var qr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},fh=["Webkit","ms","Moz","O"];Object.keys(qr).forEach(function(e){fh.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),qr[t]=qr[e]})});function Wa(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||qr.hasOwnProperty(e)&&qr[e]?(""+t).trim():t+"px"}function za(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,a=Wa(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,a):e[r]=a}}var _h=he({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Rn(e,t){if(t){if(_h[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(U(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(U(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(U(61))}if(t.style!=null&&typeof t.style!="object")throw Error(U(62))}}function Tn(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Pn=null;function wo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var An=null,vr=null,gr=null;function gl(e){if(e=wi(e)){if(typeof An!="function")throw Error(U(280));var t=e.stateNode;t&&(t=Ts(t),An(e.stateNode,e.type,t))}}function ja(e){vr?gr?gr.push(e):gr=[e]:vr=e}function Ua(){if(vr){var e=vr,t=gr;if(gr=vr=null,gl(e),t)for(e=0;e<t.length;e++)gl(t[e])}}function $a(e,t){return e(t)}function Ka(){}var Xs=!1;function Va(e,t,r){if(Xs)return e(t,r);Xs=!0;try{return $a(e,t,r)}finally{Xs=!1,(vr!==null||gr!==null)&&(Ka(),Ua())}}function si(e,t){var r=e.stateNode;if(r===null)return null;var i=Ts(r);if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(U(231,t,typeof r));return r}var Bn=!1;if(pt)try{var Ir={};Object.defineProperty(Ir,"passive",{get:function(){Bn=!0}}),window.addEventListener("test",Ir,Ir),window.removeEventListener("test",Ir,Ir)}catch{Bn=!1}function ph(e,t,r,i,a,d,y,o,c){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(m){this.onError(m)}}var Gr=!1,rs=null,is=!1,Mn=null,vh={onError:function(e){Gr=!0,rs=e}};function gh(e,t,r,i,a,d,y,o,c){Gr=!1,rs=null,ph.apply(vh,arguments)}function mh(e,t,r,i,a,d,y,o,c){if(gh.apply(this,arguments),Gr){if(Gr){var f=rs;Gr=!1,rs=null}else throw Error(U(198));is||(is=!0,Mn=f)}}function tr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function qa(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 ml(e){if(tr(e)!==e)throw Error(U(188))}function Sh(e){var t=e.alternate;if(!t){if(t=tr(e),t===null)throw Error(U(188));return t!==e?null:e}for(var r=e,i=t;;){var a=r.return;if(a===null)break;var d=a.alternate;if(d===null){if(i=a.return,i!==null){r=i;continue}break}if(a.child===d.child){for(d=a.child;d;){if(d===r)return ml(a),e;if(d===i)return ml(a),t;d=d.sibling}throw Error(U(188))}if(r.return!==i.return)r=a,i=d;else{for(var y=!1,o=a.child;o;){if(o===r){y=!0,r=a,i=d;break}if(o===i){y=!0,i=a,r=d;break}o=o.sibling}if(!y){for(o=d.child;o;){if(o===r){y=!0,r=d,i=a;break}if(o===i){y=!0,i=d,r=a;break}o=o.sibling}if(!y)throw Error(U(189))}}if(r.alternate!==i)throw Error(U(190))}if(r.tag!==3)throw Error(U(188));return r.stateNode.current===r?e:t}function Ga(e){return e=Sh(e),e!==null?Xa(e):null}function Xa(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Xa(e);if(t!==null)return t;e=e.sibling}return null}var Qa=ze.unstable_scheduleCallback,Sl=ze.unstable_cancelCallback,yh=ze.unstable_shouldYield,Ch=ze.unstable_requestPaint,_e=ze.unstable_now,wh=ze.unstable_getCurrentPriorityLevel,Eo=ze.unstable_ImmediatePriority,Ya=ze.unstable_UserBlockingPriority,ss=ze.unstable_NormalPriority,Eh=ze.unstable_LowPriority,Ja=ze.unstable_IdlePriority,xs=null,at=null;function kh(e){if(at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(xs,e,void 0,(e.current.flags&128)===128)}catch{}}var tt=Math.clz32?Math.clz32:Lh,bh=Math.log,xh=Math.LN2;function Lh(e){return e>>>=0,e===0?32:31-(bh(e)/xh|0)|0}var Ti=64,Pi=4194304;function Kr(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ns(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,d=e.pingedLanes,y=r&268435455;if(y!==0){var o=y&~a;o!==0?i=Kr(o):(d&=y,d!==0&&(i=Kr(d)))}else y=r&~a,y!==0?i=Kr(y):d!==0&&(i=Kr(d));if(i===0)return 0;if(t!==0&&t!==i&&!(t&a)&&(a=i&-i,d=t&-t,a>=d||a===16&&(d&4194240)!==0))return t;if(i&4&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-tt(t),a=1<<r,i|=e[r],t&=~a;return i}function Dh(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Rh(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,a=e.expirationTimes,d=e.pendingLanes;0<d;){var y=31-tt(d),o=1<<y,c=a[y];c===-1?(!(o&r)||o&i)&&(a[y]=Dh(o,t)):c<=t&&(e.expiredLanes|=o),d&=~o}}function On(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Za(){var e=Ti;return Ti<<=1,!(Ti&4194240)&&(Ti=64),e}function Qs(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function yi(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-tt(t),e[t]=r}function Th(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var i=e.eventTimes;for(e=e.expirationTimes;0<r;){var a=31-tt(r),d=1<<a;t[a]=0,i[a]=-1,e[a]=-1,r&=~d}}function ko(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-tt(r),a=1<<i;a&t|e[i]&t&&(e[i]|=t),r&=~a}}var re=0;function ec(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var tc,bo,rc,ic,sc,In=!1,Ai=[],Rt=null,Tt=null,Pt=null,ni=new Map,oi=new Map,bt=[],Ph="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 submit".split(" ");function yl(e,t){switch(e){case"focusin":case"focusout":Rt=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":ni.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":oi.delete(t.pointerId)}}function Hr(e,t,r,i,a,d){return e===null||e.nativeEvent!==d?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:d,targetContainers:[a]},t!==null&&(t=wi(t),t!==null&&bo(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Ah(e,t,r,i,a){switch(t){case"focusin":return Rt=Hr(Rt,e,t,r,i,a),!0;case"dragenter":return Tt=Hr(Tt,e,t,r,i,a),!0;case"mouseover":return Pt=Hr(Pt,e,t,r,i,a),!0;case"pointerover":var d=a.pointerId;return ni.set(d,Hr(ni.get(d)||null,e,t,r,i,a)),!0;case"gotpointercapture":return d=a.pointerId,oi.set(d,Hr(oi.get(d)||null,e,t,r,i,a)),!0}return!1}function nc(e){var t=$t(e.target);if(t!==null){var r=tr(t);if(r!==null){if(t=r.tag,t===13){if(t=qa(r),t!==null){e.blockedOn=t,sc(e.priority,function(){rc(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ki(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=Hn(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);Pn=i,r.target.dispatchEvent(i),Pn=null}else return t=wi(r),t!==null&&bo(t),e.blockedOn=r,!1;t.shift()}return!0}function Cl(e,t,r){Ki(e)&&r.delete(t)}function Bh(){In=!1,Rt!==null&&Ki(Rt)&&(Rt=null),Tt!==null&&Ki(Tt)&&(Tt=null),Pt!==null&&Ki(Pt)&&(Pt=null),ni.forEach(Cl),oi.forEach(Cl)}function Nr(e,t){e.blockedOn===t&&(e.blockedOn=null,In||(In=!0,ze.unstable_scheduleCallback(ze.unstable_NormalPriority,Bh)))}function li(e){function t(a){return Nr(a,e)}if(0<Ai.length){Nr(Ai[0],e);for(var r=1;r<Ai.length;r++){var i=Ai[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Rt!==null&&Nr(Rt,e),Tt!==null&&Nr(Tt,e),Pt!==null&&Nr(Pt,e),ni.forEach(t),oi.forEach(t),r=0;r<bt.length;r++)i=bt[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<bt.length&&(r=bt[0],r.blockedOn===null);)nc(r),r.blockedOn===null&&bt.shift()}var mr=St.ReactCurrentBatchConfig,os=!0;function Mh(e,t,r,i){var a=re,d=mr.transition;mr.transition=null;try{re=1,xo(e,t,r,i)}finally{re=a,mr.transition=d}}function Oh(e,t,r,i){var a=re,d=mr.transition;mr.transition=null;try{re=4,xo(e,t,r,i)}finally{re=a,mr.transition=d}}function xo(e,t,r,i){if(os){var a=Hn(e,t,r,i);if(a===null)ln(e,t,i,ls,r),yl(e,i);else if(Ah(a,e,t,r,i))i.stopPropagation();else if(yl(e,i),t&4&&-1<Ph.indexOf(e)){for(;a!==null;){var d=wi(a);if(d!==null&&tc(d),d=Hn(e,t,r,i),d===null&&ln(e,t,i,ls,r),d===a)break;a=d}a!==null&&i.stopPropagation()}else ln(e,t,i,null,r)}}var ls=null;function Hn(e,t,r,i){if(ls=null,e=wo(i),e=$t(e),e!==null)if(t=tr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=qa(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ls=e,null}function oc(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(wh()){case Eo:return 1;case Ya:return 4;case ss:case Eh:return 16;case Ja:return 536870912;default:return 16}default:return 16}}var Lt=null,Lo=null,Vi=null;function lc(){if(Vi)return Vi;var e,t=Lo,r=t.length,i,a="value"in Lt?Lt.value:Lt.textContent,d=a.length;for(e=0;e<r&&t[e]===a[e];e++);var y=r-e;for(i=1;i<=y&&t[r-i]===a[d-i];i++);return Vi=a.slice(e,1<i?1-i:void 0)}function qi(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 Bi(){return!0}function wl(){return!1}function Ue(e){function t(r,i,a,d,y){this._reactName=r,this._targetInst=a,this.type=i,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var o in e)e.hasOwnProperty(o)&&(r=e[o],this[o]=r?r(d):d[o]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?Bi:wl,this.isPropagationStopped=wl,this}return he(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=Bi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Bi)},persist:function(){},isPersistent:Bi}),t}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Do=Ue(Rr),Ci=he({},Rr,{view:0,detail:0}),Ih=Ue(Ci),Ys,Js,Fr,Ls=he({},Ci,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ro,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!==Fr&&(Fr&&e.type==="mousemove"?(Ys=e.screenX-Fr.screenX,Js=e.screenY-Fr.screenY):Js=Ys=0,Fr=e),Ys)},movementY:function(e){return"movementY"in e?e.movementY:Js}}),El=Ue(Ls),Hh=he({},Ls,{dataTransfer:0}),Nh=Ue(Hh),Fh=he({},Ci,{relatedTarget:0}),Zs=Ue(Fh),Wh=he({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),zh=Ue(Wh),jh=he({},Rr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Uh=Ue(jh),$h=he({},Rr,{data:0}),kl=Ue($h),Kh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vh={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"},qh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Gh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=qh[e])?!!t[e]:!1}function Ro(){return Gh}var Xh=he({},Ci,{key:function(e){if(e.key){var t=Kh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=qi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Vh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ro,charCode:function(e){return e.type==="keypress"?qi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?qi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qh=Ue(Xh),Yh=he({},Ls,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bl=Ue(Yh),Jh=he({},Ci,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ro}),Zh=Ue(Jh),ed=he({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),td=Ue(ed),rd=he({},Ls,{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}),id=Ue(rd),sd=[9,13,27,32],To=pt&&"CompositionEvent"in window,Xr=null;pt&&"documentMode"in document&&(Xr=document.documentMode);var nd=pt&&"TextEvent"in window&&!Xr,ac=pt&&(!To||Xr&&8<Xr&&11>=Xr),xl=" ",Ll=!1;function cc(e,t){switch(e){case"keyup":return sd.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function uc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var nr=!1;function od(e,t){switch(e){case"compositionend":return uc(t);case"keypress":return t.which!==32?null:(Ll=!0,xl);case"textInput":return e=t.data,e===xl&&Ll?null:e;default:return null}}function ld(e,t){if(nr)return e==="compositionend"||!To&&cc(e,t)?(e=lc(),Vi=Lo=Lt=null,nr=!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 ac&&t.locale!=="ko"?null:t.data;default:return null}}var ad={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 Dl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ad[e.type]:t==="textarea"}function hc(e,t,r,i){ja(i),t=as(t,"onChange"),0<t.length&&(r=new Do("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Qr=null,ai=null;function cd(e){wc(e,0)}function Ds(e){var t=ar(e);if(Oa(t))return e}function ud(e,t){if(e==="change")return t}var dc=!1;if(pt){var en;if(pt){var tn="oninput"in document;if(!tn){var Rl=document.createElement("div");Rl.setAttribute("oninput","return;"),tn=typeof Rl.oninput=="function"}en=tn}else en=!1;dc=en&&(!document.documentMode||9<document.documentMode)}function Tl(){Qr&&(Qr.detachEvent("onpropertychange",fc),ai=Qr=null)}function fc(e){if(e.propertyName==="value"&&Ds(ai)){var t=[];hc(t,ai,e,wo(e)),Va(cd,t)}}function hd(e,t,r){e==="focusin"?(Tl(),Qr=t,ai=r,Qr.attachEvent("onpropertychange",fc)):e==="focusout"&&Tl()}function dd(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ds(ai)}function fd(e,t){if(e==="click")return Ds(t)}function _d(e,t){if(e==="input"||e==="change")return Ds(t)}function pd(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var it=typeof Object.is=="function"?Object.is:pd;function ci(e,t){if(it(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var a=r[i];if(!Sn.call(t,a)||!it(e[a],t[a]))return!1}return!0}function Pl(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Al(e,t){var r=Pl(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Pl(r)}}function _c(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?_c(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function pc(){for(var e=window,t=ts();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=ts(e.document)}return t}function Po(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")}function vd(e){var t=pc(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&_c(r.ownerDocument.documentElement,r)){if(i!==null&&Po(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var a=r.textContent.length,d=Math.min(i.start,a);i=i.end===void 0?d:Math.min(i.end,a),!e.extend&&d>i&&(a=i,i=d,d=a),a=Al(r,d);var y=Al(r,i);a&&y&&(e.rangeCount!==1||e.anchorNode!==a.node||e.anchorOffset!==a.offset||e.focusNode!==y.node||e.focusOffset!==y.offset)&&(t=t.createRange(),t.setStart(a.node,a.offset),e.removeAllRanges(),d>i?(e.addRange(t),e.extend(y.node,y.offset)):(t.setEnd(y.node,y.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var gd=pt&&"documentMode"in document&&11>=document.documentMode,or=null,Nn=null,Yr=null,Fn=!1;function Bl(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Fn||or==null||or!==ts(i)||(i=or,"selectionStart"in i&&Po(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Yr&&ci(Yr,i)||(Yr=i,i=as(Nn,"onSelect"),0<i.length&&(t=new Do("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=or)))}function Mi(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var lr={animationend:Mi("Animation","AnimationEnd"),animationiteration:Mi("Animation","AnimationIteration"),animationstart:Mi("Animation","AnimationStart"),transitionend:Mi("Transition","TransitionEnd")},rn={},vc={};pt&&(vc=document.createElement("div").style,"AnimationEvent"in window||(delete lr.animationend.animation,delete lr.animationiteration.animation,delete lr.animationstart.animation),"TransitionEvent"in window||delete lr.transitionend.transition);function Rs(e){if(rn[e])return rn[e];if(!lr[e])return e;var t=lr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in vc)return rn[e]=t[r];return e}var gc=Rs("animationend"),mc=Rs("animationiteration"),Sc=Rs("animationstart"),yc=Rs("transitionend"),Cc=new Map,Ml="abort auxClick 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(" ");function Ft(e,t){Cc.set(e,t),er(t,[e])}for(var sn=0;sn<Ml.length;sn++){var nn=Ml[sn],md=nn.toLowerCase(),Sd=nn[0].toUpperCase()+nn.slice(1);Ft(md,"on"+Sd)}Ft(gc,"onAnimationEnd");Ft(mc,"onAnimationIteration");Ft(Sc,"onAnimationStart");Ft("dblclick","onDoubleClick");Ft("focusin","onFocus");Ft("focusout","onBlur");Ft(yc,"onTransitionEnd");Cr("onMouseEnter",["mouseout","mouseover"]);Cr("onMouseLeave",["mouseout","mouseover"]);Cr("onPointerEnter",["pointerout","pointerover"]);Cr("onPointerLeave",["pointerout","pointerover"]);er("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));er("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));er("onBeforeInput",["compositionend","keypress","textInput","paste"]);er("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));er("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));er("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),yd=new Set("cancel close invalid load scroll toggle".split(" ").concat(Vr));function Ol(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,mh(i,t,void 0,e),e.currentTarget=null}function wc(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],a=i.event;i=i.listeners;e:{var d=void 0;if(t)for(var y=i.length-1;0<=y;y--){var o=i[y],c=o.instance,f=o.currentTarget;if(o=o.listener,c!==d&&a.isPropagationStopped())break e;Ol(a,o,f),d=c}else for(y=0;y<i.length;y++){if(o=i[y],c=o.instance,f=o.currentTarget,o=o.listener,c!==d&&a.isPropagationStopped())break e;Ol(a,o,f),d=c}}}if(is)throw e=Mn,is=!1,Mn=null,e}function ne(e,t){var r=t[$n];r===void 0&&(r=t[$n]=new Set);var i=e+"__bubble";r.has(i)||(Ec(t,e,2,!1),r.add(i))}function on(e,t,r){var i=0;t&&(i|=4),Ec(r,e,i,t)}var Oi="_reactListening"+Math.random().toString(36).slice(2);function ui(e){if(!e[Oi]){e[Oi]=!0,Ta.forEach(function(r){r!=="selectionchange"&&(yd.has(r)||on(r,!1,e),on(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Oi]||(t[Oi]=!0,on("selectionchange",!1,t))}}function Ec(e,t,r,i){switch(oc(t)){case 1:var a=Mh;break;case 4:a=Oh;break;default:a=xo}r=a.bind(null,t,r,e),a=void 0,!Bn||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),i?a!==void 0?e.addEventListener(t,r,{capture:!0,passive:a}):e.addEventListener(t,r,!0):a!==void 0?e.addEventListener(t,r,{passive:a}):e.addEventListener(t,r,!1)}function ln(e,t,r,i,a){var d=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var y=i.tag;if(y===3||y===4){var o=i.stateNode.containerInfo;if(o===a||o.nodeType===8&&o.parentNode===a)break;if(y===4)for(y=i.return;y!==null;){var c=y.tag;if((c===3||c===4)&&(c=y.stateNode.containerInfo,c===a||c.nodeType===8&&c.parentNode===a))return;y=y.return}for(;o!==null;){if(y=$t(o),y===null)return;if(c=y.tag,c===5||c===6){i=d=y;continue e}o=o.parentNode}}i=i.return}Va(function(){var f=d,m=wo(r),h=[];e:{var p=Cc.get(e);if(p!==void 0){var S=Do,E=e;switch(e){case"keypress":if(qi(r)===0)break e;case"keydown":case"keyup":S=Qh;break;case"focusin":E="focus",S=Zs;break;case"focusout":E="blur",S=Zs;break;case"beforeblur":case"afterblur":S=Zs;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":S=El;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=Nh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=Zh;break;case gc:case mc:case Sc:S=zh;break;case yc:S=td;break;case"scroll":S=Ih;break;case"wheel":S=id;break;case"copy":case"cut":case"paste":S=Uh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=bl}var v=(t&4)!==0,u=!v&&e==="scroll",l=v?p!==null?p+"Capture":null:p;v=[];for(var s=f,n;s!==null;){n=s;var _=n.stateNode;if(n.tag===5&&_!==null&&(n=_,l!==null&&(_=si(s,l),_!=null&&v.push(hi(s,_,n)))),u)break;s=s.return}0<v.length&&(p=new S(p,E,null,r,m),h.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",p&&r!==Pn&&(E=r.relatedTarget||r.fromElement)&&($t(E)||E[vt]))break e;if((S||p)&&(p=m.window===m?m:(p=m.ownerDocument)?p.defaultView||p.parentWindow:window,S?(E=r.relatedTarget||r.toElement,S=f,E=E?$t(E):null,E!==null&&(u=tr(E),E!==u||E.tag!==5&&E.tag!==6)&&(E=null)):(S=null,E=f),S!==E)){if(v=El,_="onMouseLeave",l="onMouseEnter",s="mouse",(e==="pointerout"||e==="pointerover")&&(v=bl,_="onPointerLeave",l="onPointerEnter",s="pointer"),u=S==null?p:ar(S),n=E==null?p:ar(E),p=new v(_,s+"leave",S,r,m),p.target=u,p.relatedTarget=n,_=null,$t(m)===f&&(v=new v(l,s+"enter",E,r,m),v.target=n,v.relatedTarget=u,_=v),u=_,S&&E)t:{for(v=S,l=E,s=0,n=v;n;n=rr(n))s++;for(n=0,_=l;_;_=rr(_))n++;for(;0<s-n;)v=rr(v),s--;for(;0<n-s;)l=rr(l),n--;for(;s--;){if(v===l||l!==null&&v===l.alternate)break t;v=rr(v),l=rr(l)}v=null}else v=null;S!==null&&Il(h,p,S,v,!1),E!==null&&u!==null&&Il(h,u,E,v,!0)}}e:{if(p=f?ar(f):window,S=p.nodeName&&p.nodeName.toLowerCase(),S==="select"||S==="input"&&p.type==="file")var C=ud;else if(Dl(p))if(dc)C=_d;else{C=dd;var w=hd}else(S=p.nodeName)&&S.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=fd);if(C&&(C=C(e,f))){hc(h,C,r,m);break e}w&&w(e,p,f),e==="focusout"&&(w=p._wrapperState)&&w.controlled&&p.type==="number"&&xn(p,"number",p.value)}switch(w=f?ar(f):window,e){case"focusin":(Dl(w)||w.contentEditable==="true")&&(or=w,Nn=f,Yr=null);break;case"focusout":Yr=Nn=or=null;break;case"mousedown":Fn=!0;break;case"contextmenu":case"mouseup":case"dragend":Fn=!1,Bl(h,r,m);break;case"selectionchange":if(gd)break;case"keydown":case"keyup":Bl(h,r,m)}var k;if(To)e:{switch(e){case"compositionstart":var g="onCompositionStart";break e;case"compositionend":g="onCompositionEnd";break e;case"compositionupdate":g="onCompositionUpdate";break e}g=void 0}else nr?cc(e,r)&&(g="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(g="onCompositionStart");g&&(ac&&r.locale!=="ko"&&(nr||g!=="onCompositionStart"?g==="onCompositionEnd"&&nr&&(k=lc()):(Lt=m,Lo="value"in Lt?Lt.value:Lt.textContent,nr=!0)),w=as(f,g),0<w.length&&(g=new kl(g,e,null,r,m),h.push({event:g,listeners:w}),k?g.data=k:(k=uc(r),k!==null&&(g.data=k)))),(k=nd?od(e,r):ld(e,r))&&(f=as(f,"onBeforeInput"),0<f.length&&(m=new kl("onBeforeInput","beforeinput",null,r,m),h.push({event:m,listeners:f}),m.data=k))}wc(h,t)})}function hi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function as(e,t){for(var r=t+"Capture",i=[];e!==null;){var a=e,d=a.stateNode;a.tag===5&&d!==null&&(a=d,d=si(e,r),d!=null&&i.unshift(hi(e,d,a)),d=si(e,t),d!=null&&i.push(hi(e,d,a))),e=e.return}return i}function rr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Il(e,t,r,i,a){for(var d=t._reactName,y=[];r!==null&&r!==i;){var o=r,c=o.alternate,f=o.stateNode;if(c!==null&&c===i)break;o.tag===5&&f!==null&&(o=f,a?(c=si(r,d),c!=null&&y.unshift(hi(r,c,o))):a||(c=si(r,d),c!=null&&y.push(hi(r,c,o)))),r=r.return}y.length!==0&&e.push({event:t,listeners:y})}var Cd=/\r\n?/g,wd=/\u0000|\uFFFD/g;function Hl(e){return(typeof e=="string"?e:""+e).replace(Cd,`
|
|
38
|
+
`).replace(wd,"")}function Ii(e,t,r){if(t=Hl(t),Hl(e)!==t&&r)throw Error(U(425))}function cs(){}var Wn=null,zn=null;function jn(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Un=typeof setTimeout=="function"?setTimeout:void 0,Ed=typeof clearTimeout=="function"?clearTimeout:void 0,Nl=typeof Promise=="function"?Promise:void 0,kd=typeof queueMicrotask=="function"?queueMicrotask:typeof Nl<"u"?function(e){return Nl.resolve(null).then(e).catch(bd)}:Un;function bd(e){setTimeout(function(){throw e})}function an(e,t){var r=t,i=0;do{var a=r.nextSibling;if(e.removeChild(r),a&&a.nodeType===8)if(r=a.data,r==="/$"){if(i===0){e.removeChild(a),li(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=a}while(r);li(t)}function At(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==="$?")break;if(t==="/$")return null}}return e}function Fl(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var Tr=Math.random().toString(36).slice(2),lt="__reactFiber$"+Tr,di="__reactProps$"+Tr,vt="__reactContainer$"+Tr,$n="__reactEvents$"+Tr,xd="__reactListeners$"+Tr,Ld="__reactHandles$"+Tr;function $t(e){var t=e[lt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[vt]||r[lt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Fl(e);e!==null;){if(r=e[lt])return r;e=Fl(e)}return t}e=r,r=e.parentNode}return null}function wi(e){return e=e[lt]||e[vt],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function ar(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(U(33))}function Ts(e){return e[di]||null}var Kn=[],cr=-1;function Wt(e){return{current:e}}function oe(e){0>cr||(e.current=Kn[cr],Kn[cr]=null,cr--)}function se(e,t){cr++,Kn[cr]=e.current,e.current=t}var Nt={},Le=Wt(Nt),Oe=Wt(!1),Xt=Nt;function wr(e,t){var r=e.type.contextTypes;if(!r)return Nt;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var a={},d;for(d in r)a[d]=t[d];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ie(e){return e=e.childContextTypes,e!=null}function us(){oe(Oe),oe(Le)}function Wl(e,t,r){if(Le.current!==Nt)throw Error(U(168));se(Le,t),se(Oe,r)}function kc(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var a in i)if(!(a in t))throw Error(U(108,hh(e)||"Unknown",a));return he({},r,i)}function hs(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Nt,Xt=Le.current,se(Le,e),se(Oe,Oe.current),!0}function zl(e,t,r){var i=e.stateNode;if(!i)throw Error(U(169));r?(e=kc(e,t,Xt),i.__reactInternalMemoizedMergedChildContext=e,oe(Oe),oe(Le),se(Le,e)):oe(Oe),se(Oe,r)}var ht=null,Ps=!1,cn=!1;function bc(e){ht===null?ht=[e]:ht.push(e)}function Dd(e){Ps=!0,bc(e)}function zt(){if(!cn&&ht!==null){cn=!0;var e=0,t=re;try{var r=ht;for(re=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}ht=null,Ps=!1}catch(a){throw ht!==null&&(ht=ht.slice(e+1)),Qa(Eo,zt),a}finally{re=t,cn=!1}}return null}var ur=[],hr=0,ds=null,fs=0,Ke=[],Ve=0,Qt=null,dt=1,ft="";function jt(e,t){ur[hr++]=fs,ur[hr++]=ds,ds=e,fs=t}function xc(e,t,r){Ke[Ve++]=dt,Ke[Ve++]=ft,Ke[Ve++]=Qt,Qt=e;var i=dt;e=ft;var a=32-tt(i)-1;i&=~(1<<a),r+=1;var d=32-tt(t)+a;if(30<d){var y=a-a%5;d=(i&(1<<y)-1).toString(32),i>>=y,a-=y,dt=1<<32-tt(t)+a|r<<a|i,ft=d+e}else dt=1<<d|r<<a|i,ft=e}function Ao(e){e.return!==null&&(jt(e,1),xc(e,1,0))}function Bo(e){for(;e===ds;)ds=ur[--hr],ur[hr]=null,fs=ur[--hr],ur[hr]=null;for(;e===Qt;)Qt=Ke[--Ve],Ke[Ve]=null,ft=Ke[--Ve],Ke[Ve]=null,dt=Ke[--Ve],Ke[Ve]=null}var We=null,Fe=null,le=!1,et=null;function Lc(e,t){var r=qe(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function jl(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,We=e,Fe=At(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,We=e,Fe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Qt!==null?{id:dt,overflow:ft}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=qe(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,We=e,Fe=null,!0):!1;default:return!1}}function Vn(e){return(e.mode&1)!==0&&(e.flags&128)===0}function qn(e){if(le){var t=Fe;if(t){var r=t;if(!jl(e,t)){if(Vn(e))throw Error(U(418));t=At(r.nextSibling);var i=We;t&&jl(e,t)?Lc(i,r):(e.flags=e.flags&-4097|2,le=!1,We=e)}}else{if(Vn(e))throw Error(U(418));e.flags=e.flags&-4097|2,le=!1,We=e}}}function Ul(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;We=e}function Hi(e){if(e!==We)return!1;if(!le)return Ul(e),le=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!jn(e.type,e.memoizedProps)),t&&(t=Fe)){if(Vn(e))throw Dc(),Error(U(418));for(;t;)Lc(e,t),t=At(t.nextSibling)}if(Ul(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(U(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){Fe=At(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}Fe=null}}else Fe=We?At(e.stateNode.nextSibling):null;return!0}function Dc(){for(var e=Fe;e;)e=At(e.nextSibling)}function Er(){Fe=We=null,le=!1}function Mo(e){et===null?et=[e]:et.push(e)}var Rd=St.ReactCurrentBatchConfig;function Wr(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(U(309));var i=r.stateNode}if(!i)throw Error(U(147,e));var a=i,d=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===d?t.ref:(t=function(y){var o=a.refs;y===null?delete o[d]:o[d]=y},t._stringRef=d,t)}if(typeof e!="string")throw Error(U(284));if(!r._owner)throw Error(U(290,e))}return e}function Ni(e,t){throw e=Object.prototype.toString.call(t),Error(U(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $l(e){var t=e._init;return t(e._payload)}function Rc(e){function t(l,s){if(e){var n=l.deletions;n===null?(l.deletions=[s],l.flags|=16):n.push(s)}}function r(l,s){if(!e)return null;for(;s!==null;)t(l,s),s=s.sibling;return null}function i(l,s){for(l=new Map;s!==null;)s.key!==null?l.set(s.key,s):l.set(s.index,s),s=s.sibling;return l}function a(l,s){return l=It(l,s),l.index=0,l.sibling=null,l}function d(l,s,n){return l.index=n,e?(n=l.alternate,n!==null?(n=n.index,n<s?(l.flags|=2,s):n):(l.flags|=2,s)):(l.flags|=1048576,s)}function y(l){return e&&l.alternate===null&&(l.flags|=2),l}function o(l,s,n,_){return s===null||s.tag!==6?(s=vn(n,l.mode,_),s.return=l,s):(s=a(s,n),s.return=l,s)}function c(l,s,n,_){var C=n.type;return C===sr?m(l,s,n.props.children,_,n.key):s!==null&&(s.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Et&&$l(C)===s.type)?(_=a(s,n.props),_.ref=Wr(l,s,n),_.return=l,_):(_=es(n.type,n.key,n.props,null,l.mode,_),_.ref=Wr(l,s,n),_.return=l,_)}function f(l,s,n,_){return s===null||s.tag!==4||s.stateNode.containerInfo!==n.containerInfo||s.stateNode.implementation!==n.implementation?(s=gn(n,l.mode,_),s.return=l,s):(s=a(s,n.children||[]),s.return=l,s)}function m(l,s,n,_,C){return s===null||s.tag!==7?(s=Gt(n,l.mode,_,C),s.return=l,s):(s=a(s,n),s.return=l,s)}function h(l,s,n){if(typeof s=="string"&&s!==""||typeof s=="number")return s=vn(""+s,l.mode,n),s.return=l,s;if(typeof s=="object"&&s!==null){switch(s.$$typeof){case Li:return n=es(s.type,s.key,s.props,null,l.mode,n),n.ref=Wr(l,null,s),n.return=l,n;case ir:return s=gn(s,l.mode,n),s.return=l,s;case Et:var _=s._init;return h(l,_(s._payload),n)}if($r(s)||Or(s))return s=Gt(s,l.mode,n,null),s.return=l,s;Ni(l,s)}return null}function p(l,s,n,_){var C=s!==null?s.key:null;if(typeof n=="string"&&n!==""||typeof n=="number")return C!==null?null:o(l,s,""+n,_);if(typeof n=="object"&&n!==null){switch(n.$$typeof){case Li:return n.key===C?c(l,s,n,_):null;case ir:return n.key===C?f(l,s,n,_):null;case Et:return C=n._init,p(l,s,C(n._payload),_)}if($r(n)||Or(n))return C!==null?null:m(l,s,n,_,null);Ni(l,n)}return null}function S(l,s,n,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return l=l.get(n)||null,o(s,l,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Li:return l=l.get(_.key===null?n:_.key)||null,c(s,l,_,C);case ir:return l=l.get(_.key===null?n:_.key)||null,f(s,l,_,C);case Et:var w=_._init;return S(l,s,n,w(_._payload),C)}if($r(_)||Or(_))return l=l.get(n)||null,m(s,l,_,C,null);Ni(s,_)}return null}function E(l,s,n,_){for(var C=null,w=null,k=s,g=s=0,L=null;k!==null&&g<n.length;g++){k.index>g?(L=k,k=null):L=k.sibling;var R=p(l,k,n[g],_);if(R===null){k===null&&(k=L);break}e&&k&&R.alternate===null&&t(l,k),s=d(R,s,g),w===null?C=R:w.sibling=R,w=R,k=L}if(g===n.length)return r(l,k),le&&jt(l,g),C;if(k===null){for(;g<n.length;g++)k=h(l,n[g],_),k!==null&&(s=d(k,s,g),w===null?C=k:w.sibling=k,w=k);return le&&jt(l,g),C}for(k=i(l,k);g<n.length;g++)L=S(k,l,g,n[g],_),L!==null&&(e&&L.alternate!==null&&k.delete(L.key===null?g:L.key),s=d(L,s,g),w===null?C=L:w.sibling=L,w=L);return e&&k.forEach(function(A){return t(l,A)}),le&&jt(l,g),C}function v(l,s,n,_){var C=Or(n);if(typeof C!="function")throw Error(U(150));if(n=C.call(n),n==null)throw Error(U(151));for(var w=C=null,k=s,g=s=0,L=null,R=n.next();k!==null&&!R.done;g++,R=n.next()){k.index>g?(L=k,k=null):L=k.sibling;var A=p(l,k,R.value,_);if(A===null){k===null&&(k=L);break}e&&k&&A.alternate===null&&t(l,k),s=d(A,s,g),w===null?C=A:w.sibling=A,w=A,k=L}if(R.done)return r(l,k),le&&jt(l,g),C;if(k===null){for(;!R.done;g++,R=n.next())R=h(l,R.value,_),R!==null&&(s=d(R,s,g),w===null?C=R:w.sibling=R,w=R);return le&&jt(l,g),C}for(k=i(l,k);!R.done;g++,R=n.next())R=S(k,l,g,R.value,_),R!==null&&(e&&R.alternate!==null&&k.delete(R.key===null?g:R.key),s=d(R,s,g),w===null?C=R:w.sibling=R,w=R);return e&&k.forEach(function(M){return t(l,M)}),le&&jt(l,g),C}function u(l,s,n,_){if(typeof n=="object"&&n!==null&&n.type===sr&&n.key===null&&(n=n.props.children),typeof n=="object"&&n!==null){switch(n.$$typeof){case Li:e:{for(var C=n.key,w=s;w!==null;){if(w.key===C){if(C=n.type,C===sr){if(w.tag===7){r(l,w.sibling),s=a(w,n.props.children),s.return=l,l=s;break e}}else if(w.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Et&&$l(C)===w.type){r(l,w.sibling),s=a(w,n.props),s.ref=Wr(l,w,n),s.return=l,l=s;break e}r(l,w);break}else t(l,w);w=w.sibling}n.type===sr?(s=Gt(n.props.children,l.mode,_,n.key),s.return=l,l=s):(_=es(n.type,n.key,n.props,null,l.mode,_),_.ref=Wr(l,s,n),_.return=l,l=_)}return y(l);case ir:e:{for(w=n.key;s!==null;){if(s.key===w)if(s.tag===4&&s.stateNode.containerInfo===n.containerInfo&&s.stateNode.implementation===n.implementation){r(l,s.sibling),s=a(s,n.children||[]),s.return=l,l=s;break e}else{r(l,s);break}else t(l,s);s=s.sibling}s=gn(n,l.mode,_),s.return=l,l=s}return y(l);case Et:return w=n._init,u(l,s,w(n._payload),_)}if($r(n))return E(l,s,n,_);if(Or(n))return v(l,s,n,_);Ni(l,n)}return typeof n=="string"&&n!==""||typeof n=="number"?(n=""+n,s!==null&&s.tag===6?(r(l,s.sibling),s=a(s,n),s.return=l,l=s):(r(l,s),s=vn(n,l.mode,_),s.return=l,l=s),y(l)):r(l,s)}return u}var kr=Rc(!0),Tc=Rc(!1),_s=Wt(null),ps=null,dr=null,Oo=null;function Io(){Oo=dr=ps=null}function Ho(e){var t=_s.current;oe(_s),e._currentValue=t}function Gn(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function Sr(e,t){ps=e,Oo=dr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Me=!0),e.firstContext=null)}function Xe(e){var t=e._currentValue;if(Oo!==e)if(e={context:e,memoizedValue:t,next:null},dr===null){if(ps===null)throw Error(U(308));dr=e,ps.dependencies={lanes:0,firstContext:e}}else dr=dr.next=e;return t}var Kt=null;function No(e){Kt===null?Kt=[e]:Kt.push(e)}function Pc(e,t,r,i){var a=t.interleaved;return a===null?(r.next=r,No(t)):(r.next=a.next,a.next=r),t.interleaved=r,gt(e,i)}function gt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var kt=!1;function Fo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ac(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Bt(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,te&2){var a=i.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),i.pending=t,gt(e,r)}return a=i.interleaved,a===null?(t.next=t,No(i)):(t.next=a.next,a.next=t),i.interleaved=t,gt(e,r)}function Gi(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,ko(e,r)}}function Kl(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var a=null,d=null;if(r=r.firstBaseUpdate,r!==null){do{var y={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};d===null?a=d=y:d=d.next=y,r=r.next}while(r!==null);d===null?a=d=t:d=d.next=t}else a=d=t;r={baseState:i.baseState,firstBaseUpdate:a,lastBaseUpdate:d,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function vs(e,t,r,i){var a=e.updateQueue;kt=!1;var d=a.firstBaseUpdate,y=a.lastBaseUpdate,o=a.shared.pending;if(o!==null){a.shared.pending=null;var c=o,f=c.next;c.next=null,y===null?d=f:y.next=f,y=c;var m=e.alternate;m!==null&&(m=m.updateQueue,o=m.lastBaseUpdate,o!==y&&(o===null?m.firstBaseUpdate=f:o.next=f,m.lastBaseUpdate=c))}if(d!==null){var h=a.baseState;y=0,m=f=c=null,o=d;do{var p=o.lane,S=o.eventTime;if((i&p)===p){m!==null&&(m=m.next={eventTime:S,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var E=e,v=o;switch(p=t,S=r,v.tag){case 1:if(E=v.payload,typeof E=="function"){h=E.call(S,h,p);break e}h=E;break e;case 3:E.flags=E.flags&-65537|128;case 0:if(E=v.payload,p=typeof E=="function"?E.call(S,h,p):E,p==null)break e;h=he({},h,p);break e;case 2:kt=!0}}o.callback!==null&&o.lane!==0&&(e.flags|=64,p=a.effects,p===null?a.effects=[o]:p.push(o))}else S={eventTime:S,lane:p,tag:o.tag,payload:o.payload,callback:o.callback,next:null},m===null?(f=m=S,c=h):m=m.next=S,y|=p;if(o=o.next,o===null){if(o=a.shared.pending,o===null)break;p=o,o=p.next,p.next=null,a.lastBaseUpdate=p,a.shared.pending=null}}while(!0);if(m===null&&(c=h),a.baseState=c,a.firstBaseUpdate=f,a.lastBaseUpdate=m,t=a.shared.interleaved,t!==null){a=t;do y|=a.lane,a=a.next;while(a!==t)}else d===null&&(a.shared.lanes=0);Jt|=y,e.lanes=y,e.memoizedState=h}}function Vl(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],a=i.callback;if(a!==null){if(i.callback=null,i=r,typeof a!="function")throw Error(U(191,a));a.call(i)}}}var Ei={},ct=Wt(Ei),fi=Wt(Ei),_i=Wt(Ei);function Vt(e){if(e===Ei)throw Error(U(174));return e}function Wo(e,t){switch(se(_i,t),se(fi,e),se(ct,Ei),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Dn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Dn(t,e)}oe(ct),se(ct,t)}function br(){oe(ct),oe(fi),oe(_i)}function Bc(e){Vt(_i.current);var t=Vt(ct.current),r=Dn(t,e.type);t!==r&&(se(fi,e),se(ct,r))}function zo(e){fi.current===e&&(oe(ct),oe(fi))}var ce=Wt(0);function gs(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 un=[];function jo(){for(var e=0;e<un.length;e++)un[e]._workInProgressVersionPrimary=null;un.length=0}var Xi=St.ReactCurrentDispatcher,hn=St.ReactCurrentBatchConfig,Yt=0,ue=null,ge=null,Se=null,ms=!1,Jr=!1,pi=0,Td=0;function ke(){throw Error(U(321))}function Uo(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!it(e[r],t[r]))return!1;return!0}function $o(e,t,r,i,a,d){if(Yt=d,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Xi.current=e===null||e.memoizedState===null?Md:Od,e=r(i,a),Jr){d=0;do{if(Jr=!1,pi=0,25<=d)throw Error(U(301));d+=1,Se=ge=null,t.updateQueue=null,Xi.current=Id,e=r(i,a)}while(Jr)}if(Xi.current=Ss,t=ge!==null&&ge.next!==null,Yt=0,Se=ge=ue=null,ms=!1,t)throw Error(U(300));return e}function Ko(){var e=pi!==0;return pi=0,e}function ot(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Se===null?ue.memoizedState=Se=e:Se=Se.next=e,Se}function Qe(){if(ge===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=ge.next;var t=Se===null?ue.memoizedState:Se.next;if(t!==null)Se=t,ge=e;else{if(e===null)throw Error(U(310));ge=e,e={memoizedState:ge.memoizedState,baseState:ge.baseState,baseQueue:ge.baseQueue,queue:ge.queue,next:null},Se===null?ue.memoizedState=Se=e:Se=Se.next=e}return Se}function vi(e,t){return typeof t=="function"?t(e):t}function dn(e){var t=Qe(),r=t.queue;if(r===null)throw Error(U(311));r.lastRenderedReducer=e;var i=ge,a=i.baseQueue,d=r.pending;if(d!==null){if(a!==null){var y=a.next;a.next=d.next,d.next=y}i.baseQueue=a=d,r.pending=null}if(a!==null){d=a.next,i=i.baseState;var o=y=null,c=null,f=d;do{var m=f.lane;if((Yt&m)===m)c!==null&&(c=c.next={lane:0,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null}),i=f.hasEagerState?f.eagerState:e(i,f.action);else{var h={lane:m,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};c===null?(o=c=h,y=i):c=c.next=h,ue.lanes|=m,Jt|=m}f=f.next}while(f!==null&&f!==d);c===null?y=i:c.next=o,it(i,t.memoizedState)||(Me=!0),t.memoizedState=i,t.baseState=y,t.baseQueue=c,r.lastRenderedState=i}if(e=r.interleaved,e!==null){a=e;do d=a.lane,ue.lanes|=d,Jt|=d,a=a.next;while(a!==e)}else a===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function fn(e){var t=Qe(),r=t.queue;if(r===null)throw Error(U(311));r.lastRenderedReducer=e;var i=r.dispatch,a=r.pending,d=t.memoizedState;if(a!==null){r.pending=null;var y=a=a.next;do d=e(d,y.action),y=y.next;while(y!==a);it(d,t.memoizedState)||(Me=!0),t.memoizedState=d,t.baseQueue===null&&(t.baseState=d),r.lastRenderedState=d}return[d,i]}function Mc(){}function Oc(e,t){var r=ue,i=Qe(),a=t(),d=!it(i.memoizedState,a);if(d&&(i.memoizedState=a,Me=!0),i=i.queue,Vo(Nc.bind(null,r,i,e),[e]),i.getSnapshot!==t||d||Se!==null&&Se.memoizedState.tag&1){if(r.flags|=2048,gi(9,Hc.bind(null,r,i,a,t),void 0,null),ye===null)throw Error(U(349));Yt&30||Ic(r,t,a)}return a}function Ic(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Hc(e,t,r,i){t.value=r,t.getSnapshot=i,Fc(t)&&Wc(e)}function Nc(e,t,r){return r(function(){Fc(t)&&Wc(e)})}function Fc(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!it(e,r)}catch{return!0}}function Wc(e){var t=gt(e,1);t!==null&&rt(t,e,1,-1)}function ql(e){var t=ot();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vi,lastRenderedState:e},t.queue=e,e=e.dispatch=Bd.bind(null,ue,e),[t.memoizedState,e]}function gi(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function zc(){return Qe().memoizedState}function Qi(e,t,r,i){var a=ot();ue.flags|=e,a.memoizedState=gi(1|t,r,void 0,i===void 0?null:i)}function As(e,t,r,i){var a=Qe();i=i===void 0?null:i;var d=void 0;if(ge!==null){var y=ge.memoizedState;if(d=y.destroy,i!==null&&Uo(i,y.deps)){a.memoizedState=gi(t,r,d,i);return}}ue.flags|=e,a.memoizedState=gi(1|t,r,d,i)}function Gl(e,t){return Qi(8390656,8,e,t)}function Vo(e,t){return As(2048,8,e,t)}function jc(e,t){return As(4,2,e,t)}function Uc(e,t){return As(4,4,e,t)}function $c(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kc(e,t,r){return r=r!=null?r.concat([e]):null,As(4,4,$c.bind(null,t,e),r)}function qo(){}function Vc(e,t){var r=Qe();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Uo(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function qc(e,t){var r=Qe();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Uo(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function Gc(e,t,r){return Yt&21?(it(r,t)||(r=Za(),ue.lanes|=r,Jt|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Me=!0),e.memoizedState=r)}function Pd(e,t){var r=re;re=r!==0&&4>r?r:4,e(!0);var i=hn.transition;hn.transition={};try{e(!1),t()}finally{re=r,hn.transition=i}}function Xc(){return Qe().memoizedState}function Ad(e,t,r){var i=Ot(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Qc(e))Yc(t,r);else if(r=Pc(e,t,r,i),r!==null){var a=Re();rt(r,e,i,a),Jc(r,t,i)}}function Bd(e,t,r){var i=Ot(e),a={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Qc(e))Yc(t,a);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var y=t.lastRenderedState,o=d(y,r);if(a.hasEagerState=!0,a.eagerState=o,it(o,y)){var c=t.interleaved;c===null?(a.next=a,No(t)):(a.next=c.next,c.next=a),t.interleaved=a;return}}catch{}finally{}r=Pc(e,t,a,i),r!==null&&(a=Re(),rt(r,e,i,a),Jc(r,t,i))}}function Qc(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function Yc(e,t){Jr=ms=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Jc(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,ko(e,r)}}var Ss={readContext:Xe,useCallback:ke,useContext:ke,useEffect:ke,useImperativeHandle:ke,useInsertionEffect:ke,useLayoutEffect:ke,useMemo:ke,useReducer:ke,useRef:ke,useState:ke,useDebugValue:ke,useDeferredValue:ke,useTransition:ke,useMutableSource:ke,useSyncExternalStore:ke,useId:ke,unstable_isNewReconciler:!1},Md={readContext:Xe,useCallback:function(e,t){return ot().memoizedState=[e,t===void 0?null:t],e},useContext:Xe,useEffect:Gl,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Qi(4194308,4,$c.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Qi(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qi(4,2,e,t)},useMemo:function(e,t){var r=ot();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=ot();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=Ad.bind(null,ue,e),[i.memoizedState,e]},useRef:function(e){var t=ot();return e={current:e},t.memoizedState=e},useState:ql,useDebugValue:qo,useDeferredValue:function(e){return ot().memoizedState=e},useTransition:function(){var e=ql(!1),t=e[0];return e=Pd.bind(null,e[1]),ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ue,a=ot();if(le){if(r===void 0)throw Error(U(407));r=r()}else{if(r=t(),ye===null)throw Error(U(349));Yt&30||Ic(i,t,r)}a.memoizedState=r;var d={value:r,getSnapshot:t};return a.queue=d,Gl(Nc.bind(null,i,d,e),[e]),i.flags|=2048,gi(9,Hc.bind(null,i,d,r,t),void 0,null),r},useId:function(){var e=ot(),t=ye.identifierPrefix;if(le){var r=ft,i=dt;r=(i&~(1<<32-tt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=pi++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Td++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Od={readContext:Xe,useCallback:Vc,useContext:Xe,useEffect:Vo,useImperativeHandle:Kc,useInsertionEffect:jc,useLayoutEffect:Uc,useMemo:qc,useReducer:dn,useRef:zc,useState:function(){return dn(vi)},useDebugValue:qo,useDeferredValue:function(e){var t=Qe();return Gc(t,ge.memoizedState,e)},useTransition:function(){var e=dn(vi)[0],t=Qe().memoizedState;return[e,t]},useMutableSource:Mc,useSyncExternalStore:Oc,useId:Xc,unstable_isNewReconciler:!1},Id={readContext:Xe,useCallback:Vc,useContext:Xe,useEffect:Vo,useImperativeHandle:Kc,useInsertionEffect:jc,useLayoutEffect:Uc,useMemo:qc,useReducer:fn,useRef:zc,useState:function(){return fn(vi)},useDebugValue:qo,useDeferredValue:function(e){var t=Qe();return ge===null?t.memoizedState=e:Gc(t,ge.memoizedState,e)},useTransition:function(){var e=fn(vi)[0],t=Qe().memoizedState;return[e,t]},useMutableSource:Mc,useSyncExternalStore:Oc,useId:Xc,unstable_isNewReconciler:!1};function Je(e,t){if(e&&e.defaultProps){t=he({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Xn(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:he({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Bs={isMounted:function(e){return(e=e._reactInternals)?tr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=Re(),a=Ot(e),d=_t(i,a);d.payload=t,r!=null&&(d.callback=r),t=Bt(e,d,a),t!==null&&(rt(t,e,a,i),Gi(t,e,a))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=Re(),a=Ot(e),d=_t(i,a);d.tag=1,d.payload=t,r!=null&&(d.callback=r),t=Bt(e,d,a),t!==null&&(rt(t,e,a,i),Gi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Re(),i=Ot(e),a=_t(r,i);a.tag=2,t!=null&&(a.callback=t),t=Bt(e,a,i),t!==null&&(rt(t,e,i,r),Gi(t,e,i))}};function Xl(e,t,r,i,a,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,d,y):t.prototype&&t.prototype.isPureReactComponent?!ci(r,i)||!ci(a,d):!0}function Zc(e,t,r){var i=!1,a=Nt,d=t.contextType;return typeof d=="object"&&d!==null?d=Xe(d):(a=Ie(t)?Xt:Le.current,i=t.contextTypes,d=(i=i!=null)?wr(e,a):Nt),t=new t(r,d),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Bs,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=a,e.__reactInternalMemoizedMaskedChildContext=d),t}function Ql(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Bs.enqueueReplaceState(t,t.state,null)}function Qn(e,t,r,i){var a=e.stateNode;a.props=r,a.state=e.memoizedState,a.refs={},Fo(e);var d=t.contextType;typeof d=="object"&&d!==null?a.context=Xe(d):(d=Ie(t)?Xt:Le.current,a.context=wr(e,d)),a.state=e.memoizedState,d=t.getDerivedStateFromProps,typeof d=="function"&&(Xn(e,t,d,r),a.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof a.getSnapshotBeforeUpdate=="function"||typeof a.UNSAFE_componentWillMount!="function"&&typeof a.componentWillMount!="function"||(t=a.state,typeof a.componentWillMount=="function"&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount=="function"&&a.UNSAFE_componentWillMount(),t!==a.state&&Bs.enqueueReplaceState(a,a.state,null),vs(e,r,a,i),a.state=e.memoizedState),typeof a.componentDidMount=="function"&&(e.flags|=4194308)}function xr(e,t){try{var r="",i=t;do r+=uh(i),i=i.return;while(i);var a=r}catch(d){a=`
|
|
39
39
|
Error generating stack: `+d.message+`
|
|
40
|
-
`+d.stack}return{value:e,source:t,stack:a,digest:null}}function _n(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Yn(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Hd=typeof WeakMap=="function"?WeakMap:Map;function eu(e,t,r){r=_t(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Cs||(Cs=!0,lo=i),Yn(e,t)},r}function tu(e,t,r){r=_t(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=t.value;r.payload=function(){return i(a)},r.callback=function(){Yn(e,t)}}var d=e.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(r.callback=function(){Yn(e,t),typeof i!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var y=t.stack;this.componentDidCatch(t.value,{componentStack:y!==null?y:""})}),r}function Yl(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Hd;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(r)||(a.add(r),e=Yd.bind(null,e,t,r),t.then(e,e))}function Jl(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Zl(e,t,r,i,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=_t(-1,1),t.tag=2,Bt(r,t,1))),r.lanes|=1),e)}var Nd=St.ReactCurrentOwner,Me=!1;function De(e,t,r,i){t.child=e===null?Tc(t,null,r,i):kr(t,e.child,r,i)}function ea(e,t,r,i,a){r=r.render;var d=t.ref;return Sr(t,a),i=$o(e,t,r,i,d,a),r=Ko(),e!==null&&!Me?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,mt(e,t,a)):(oe&&r&&Ao(t),t.flags|=1,De(e,t,i,a),t.child)}function ta(e,t,r,i,a){if(e===null){var d=r.type;return typeof d=="function"&&!tl(d)&&d.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=d,ru(e,t,d,i,a)):(e=es(r.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!(e.lanes&a)){var y=d.memoizedProps;if(r=r.compare,r=r!==null?r:ci,r(y,i)&&e.ref===t.ref)return mt(e,t,a)}return t.flags|=1,e=It(d,i),e.ref=t.ref,e.return=t,t.child=e}function ru(e,t,r,i,a){if(e!==null){var d=e.memoizedProps;if(ci(d,i)&&e.ref===t.ref)if(Me=!1,t.pendingProps=i=d,(e.lanes&a)!==0)e.flags&131072&&(Me=!0);else return t.lanes=e.lanes,mt(e,t,a)}return Jn(e,t,r,i,a)}function iu(e,t,r){var i=t.pendingProps,a=i.children,d=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ie(_r,Ne),Ne|=r;else{if(!(r&1073741824))return e=d!==null?d.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ie(_r,Ne),Ne|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=d!==null?d.baseLanes:r,ie(_r,Ne),Ne|=i}else d!==null?(i=d.baseLanes|r,t.memoizedState=null):i=r,ie(_r,Ne),Ne|=i;return De(e,t,a,r),t.child}function su(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Jn(e,t,r,i,a){var d=Ie(r)?Xt:Le.current;return d=wr(t,d),Sr(t,a),r=$o(e,t,r,i,d,a),i=Ko(),e!==null&&!Me?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,mt(e,t,a)):(oe&&i&&Ao(t),t.flags|=1,De(e,t,r,a),t.child)}function ra(e,t,r,i,a){if(Ie(r)){var d=!0;hs(t)}else d=!1;if(Sr(t,a),t.stateNode===null)Yi(e,t),Zc(t,r,i),Qn(t,r,i,a),i=!0;else if(e===null){var y=t.stateNode,o=t.memoizedProps;y.props=o;var c=y.context,f=r.contextType;typeof f=="object"&&f!==null?f=Xe(f):(f=Ie(r)?Xt:Le.current,f=wr(t,f));var m=r.getDerivedStateFromProps,h=typeof m=="function"||typeof y.getSnapshotBeforeUpdate=="function";h||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(o!==i||c!==f)&&Ql(t,y,i,f),kt=!1;var p=t.memoizedState;y.state=p,vs(t,i,y,a),c=t.memoizedState,o!==i||p!==c||Oe.current||kt?(typeof m=="function"&&(Xn(t,r,m,i),c=t.memoizedState),(o=kt||Xl(t,r,o,i,p,c,f))?(h||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(t.flags|=4194308)):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),y.props=i,y.state=c,y.context=f,i=o):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{y=t.stateNode,Ac(e,t),o=t.memoizedProps,f=t.type===t.elementType?o:Je(t.type,o),y.props=f,h=t.pendingProps,p=y.context,c=r.contextType,typeof c=="object"&&c!==null?c=Xe(c):(c=Ie(r)?Xt:Le.current,c=wr(t,c));var S=r.getDerivedStateFromProps;(m=typeof S=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(o!==h||p!==c)&&Ql(t,y,i,c),kt=!1,p=t.memoizedState,y.state=p,vs(t,i,y,a);var E=t.memoizedState;o!==h||p!==E||Oe.current||kt?(typeof S=="function"&&(Xn(t,r,S,i),E=t.memoizedState),(f=kt||Xl(t,r,f,i,p,E,c)||!1)?(m||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(i,E,c),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(i,E,c)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=E),y.props=i,y.state=E,y.context=c,i=f):(typeof y.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),i=!1)}return Zn(e,t,r,i,d,a)}function Zn(e,t,r,i,a,d){su(e,t);var y=(t.flags&128)!==0;if(!i&&!y)return a&&zl(t,r,!1),mt(e,t,d);i=t.stateNode,Nd.current=t;var o=y&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&y?(t.child=kr(t,e.child,null,d),t.child=kr(t,null,o,d)):De(e,t,o,d),t.memoizedState=i.state,a&&zl(t,r,!0),t.child}function nu(e){var t=e.stateNode;t.pendingContext?Wl(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Wl(e,t.context,!1),Wo(e,t.containerInfo)}function ia(e,t,r,i,a){return Er(),Mo(a),t.flags|=256,De(e,t,r,i),t.child}var eo={dehydrated:null,treeContext:null,retryLane:0};function to(e){return{baseLanes:e,cachePool:null,transitions:null}}function ou(e,t,r){var i=t.pendingProps,a=ae.current,d=!1,y=(t.flags&128)!==0,o;if((o=y)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(d=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),ie(ae,a&1),e===null)return qn(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(y=i.children,e=i.fallback,d?(i=t.mode,d=t.child,y={mode:"hidden",children:y},!(i&1)&&d!==null?(d.childLanes=0,d.pendingProps=y):d=Is(y,i,0,null),e=Gt(e,i,r,null),d.return=t,e.return=t,d.sibling=e,t.child=d,t.child.memoizedState=to(r),t.memoizedState=eo,e):Go(t,y));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return Fd(e,t,y,i,o,a,r);if(d){d=i.fallback,y=t.mode,a=e.child,o=a.sibling;var c={mode:"hidden",children:i.children};return!(y&1)&&t.child!==a?(i=t.child,i.childLanes=0,i.pendingProps=c,t.deletions=null):(i=It(a,c),i.subtreeFlags=a.subtreeFlags&14680064),o!==null?d=It(o,d):(d=Gt(d,y,r,null),d.flags|=2),d.return=t,i.return=t,i.sibling=d,t.child=i,i=d,d=t.child,y=e.child.memoizedState,y=y===null?to(r):{baseLanes:y.baseLanes|r,cachePool:null,transitions:y.transitions},d.memoizedState=y,d.childLanes=e.childLanes&~r,t.memoizedState=eo,i}return d=e.child,e=d.sibling,i=It(d,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Go(e,t){return t=Is({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fi(e,t,r,i){return i!==null&&Mo(i),kr(t,e.child,null,r),e=Go(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fd(e,t,r,i,a,d,y){if(r)return t.flags&256?(t.flags&=-257,i=_n(Error(j(422))),Fi(e,t,y,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(d=i.fallback,a=t.mode,i=Is({mode:"visible",children:i.children},a,0,null),d=Gt(d,a,y,null),d.flags|=2,i.return=t,d.return=t,i.sibling=d,t.child=i,t.mode&1&&kr(t,e.child,null,y),t.child.memoizedState=to(y),t.memoizedState=eo,d);if(!(t.mode&1))return Fi(e,t,y,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var o=i.dgst;return i=o,d=Error(j(419)),i=_n(d,i,void 0),Fi(e,t,y,i)}if(o=(y&e.childLanes)!==0,Me||o){if(i=ye,i!==null){switch(y&-y){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(i.suspendedLanes|y)?0:a,a!==0&&a!==d.retryLane&&(d.retryLane=a,gt(e,a),rt(i,e,a,-1))}return el(),i=_n(Error(j(421))),Fi(e,t,y,i)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=Jd.bind(null,e),a._reactRetry=t,null):(e=d.treeContext,Fe=At(a.nextSibling),We=t,oe=!0,et=null,e!==null&&(Ke[Ve++]=dt,Ke[Ve++]=ft,Ke[Ve++]=Qt,dt=e.id,ft=e.overflow,Qt=t),t=Go(t,i.children),t.flags|=4096,t)}function sa(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Gn(e.return,t,r)}function pn(e,t,r,i,a){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:a}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=i,d.tail=r,d.tailMode=a)}function lu(e,t,r){var i=t.pendingProps,a=i.revealOrder,d=i.tail;if(De(e,t,i.children,r),i=ae.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sa(e,r,t);else if(e.tag===19)sa(e,r,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}i&=1}if(ie(ae,i),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&gs(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),pn(t,!1,a,r,d);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&gs(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}pn(t,!0,r,null,d);break;case"together":pn(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Jt|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(j(153));if(t.child!==null){for(e=t.child,r=It(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=It(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Wd(e,t,r){switch(t.tag){case 3:nu(t),Er();break;case 5:Bc(t);break;case 1:Ie(t.type)&&hs(t);break;case 4:Wo(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,a=t.memoizedProps.value;ie(_s,i._currentValue),i._currentValue=a;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ie(ae,ae.current&1),t.flags|=128,null):r&t.child.childLanes?ou(e,t,r):(ie(ae,ae.current&1),e=mt(e,t,r),e!==null?e.sibling:null);ie(ae,ae.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return lu(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),ie(ae,ae.current),i)break;return null;case 22:case 23:return t.lanes=0,iu(e,t,r)}return mt(e,t,r)}var au,ro,cu,uu;au=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};ro=function(){};cu=function(e,t,r,i){var a=e.memoizedProps;if(a!==i){e=t.stateNode,Vt(ct.current);var d=null;switch(r){case"input":a=kn(e,a),i=kn(e,i),d=[];break;case"select":a=ue({},a,{value:void 0}),i=ue({},i,{value:void 0}),d=[];break;case"textarea":a=Ln(e,a),i=Ln(e,i),d=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=cs)}Rn(r,i);var y;r=null;for(f in a)if(!i.hasOwnProperty(f)&&a.hasOwnProperty(f)&&a[f]!=null)if(f==="style"){var o=a[f];for(y in o)o.hasOwnProperty(y)&&(r||(r={}),r[y]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ri.hasOwnProperty(f)?d||(d=[]):(d=d||[]).push(f,null));for(f in i){var c=i[f];if(o=a!=null?a[f]:void 0,i.hasOwnProperty(f)&&c!==o&&(c!=null||o!=null))if(f==="style")if(o){for(y in o)!o.hasOwnProperty(y)||c&&c.hasOwnProperty(y)||(r||(r={}),r[y]="");for(y in c)c.hasOwnProperty(y)&&o[y]!==c[y]&&(r||(r={}),r[y]=c[y])}else r||(d||(d=[]),d.push(f,r)),r=c;else f==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(d=d||[]).push(f,c)):f==="children"?typeof c!="string"&&typeof c!="number"||(d=d||[]).push(f,""+c):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ri.hasOwnProperty(f)?(c!=null&&f==="onScroll"&&se("scroll",e),d||o===c||(d=[])):(d=d||[]).push(f,c))}r&&(d=d||[]).push("style",r);var f=d;(t.updateQueue=f)&&(t.flags|=4)}};uu=function(e,t,r,i){r!==i&&(t.flags|=4)};function zr(e,t){if(!oe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function be(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function zd(e,t,r){var i=t.pendingProps;switch(Bo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(t),null;case 1:return Ie(t.type)&&us(),be(t),null;case 3:return i=t.stateNode,br(),ne(Oe),ne(Le),jo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,et!==null&&(uo(et),et=null))),ro(e,t),be(t),null;case 5:zo(t);var a=Vt(_i.current);if(r=t.type,e!==null&&t.stateNode!=null)cu(e,t,r,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(j(166));return be(t),null}if(e=Vt(ct.current),Hi(t)){i=t.stateNode,r=t.type;var d=t.memoizedProps;switch(i[lt]=t,i[di]=d,e=(t.mode&1)!==0,r){case"dialog":se("cancel",i),se("close",i);break;case"iframe":case"object":case"embed":se("load",i);break;case"video":case"audio":for(a=0;a<Vr.length;a++)se(Vr[a],i);break;case"source":se("error",i);break;case"img":case"image":case"link":se("error",i),se("load",i);break;case"details":se("toggle",i);break;case"input":fl(i,d),se("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!d.multiple},se("invalid",i);break;case"textarea":pl(i,d),se("invalid",i)}Rn(r,d),a=null;for(var y in d)if(d.hasOwnProperty(y)){var o=d[y];y==="children"?typeof o=="string"?i.textContent!==o&&(d.suppressHydrationWarning!==!0&&Ii(i.textContent,o,e),a=["children",o]):typeof o=="number"&&i.textContent!==""+o&&(d.suppressHydrationWarning!==!0&&Ii(i.textContent,o,e),a=["children",""+o]):ri.hasOwnProperty(y)&&o!=null&&y==="onScroll"&&se("scroll",i)}switch(r){case"input":Di(i),_l(i,d,!0);break;case"textarea":Di(i),vl(i);break;case"select":case"option":break;default:typeof d.onClick=="function"&&(i.onclick=cs)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{y=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Na(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=y.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=y.createElement(r,{is:i.is}):(e=y.createElement(r),r==="select"&&(y=e,i.multiple?y.multiple=!0:i.size&&(y.size=i.size))):e=y.createElementNS(e,r),e[lt]=t,e[di]=i,au(e,t,!1,!1),t.stateNode=e;e:{switch(y=Tn(r,i),r){case"dialog":se("cancel",e),se("close",e),a=i;break;case"iframe":case"object":case"embed":se("load",e),a=i;break;case"video":case"audio":for(a=0;a<Vr.length;a++)se(Vr[a],e);a=i;break;case"source":se("error",e),a=i;break;case"img":case"image":case"link":se("error",e),se("load",e),a=i;break;case"details":se("toggle",e),a=i;break;case"input":fl(e,i),a=kn(e,i),se("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=ue({},i,{value:void 0}),se("invalid",e);break;case"textarea":pl(e,i),a=Ln(e,i),se("invalid",e);break;default:a=i}Rn(r,a),o=a;for(d in o)if(o.hasOwnProperty(d)){var c=o[d];d==="style"?za(e,c):d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Fa(e,c)):d==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&ii(e,c):typeof c=="number"&&ii(e,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ri.hasOwnProperty(d)?c!=null&&d==="onScroll"&&se("scroll",e):c!=null&&mo(e,d,c,y))}switch(r){case"input":Di(e),_l(e,i,!1);break;case"textarea":Di(e),vl(e);break;case"option":i.value!=null&&e.setAttribute("value",""+Ht(i.value));break;case"select":e.multiple=!!i.multiple,d=i.value,d!=null?pr(e,!!i.multiple,d,!1):i.defaultValue!=null&&pr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=cs)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return be(t),null;case 6:if(e&&t.stateNode!=null)uu(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(j(166));if(r=Vt(_i.current),Vt(ct.current),Hi(t)){if(i=t.stateNode,r=t.memoizedProps,i[lt]=t,(d=i.nodeValue!==r)&&(e=We,e!==null))switch(e.tag){case 3:Ii(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ii(i.nodeValue,r,(e.mode&1)!==0)}d&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[lt]=t,t.stateNode=i}return be(t),null;case 13:if(ne(ae),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(oe&&Fe!==null&&t.mode&1&&!(t.flags&128))Dc(),Er(),t.flags|=98560,d=!1;else if(d=Hi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!d)throw Error(j(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(j(317));d[lt]=t}else Er(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;be(t),d=!1}else et!==null&&(uo(et),et=null),d=!0;if(!d)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||ae.current&1?me===0&&(me=3):el())),t.updateQueue!==null&&(t.flags|=4),be(t),null);case 4:return br(),ro(e,t),e===null&&ui(t.stateNode.containerInfo),be(t),null;case 10:return Ho(t.type._context),be(t),null;case 17:return Ie(t.type)&&us(),be(t),null;case 19:if(ne(ae),d=t.memoizedState,d===null)return be(t),null;if(i=(t.flags&128)!==0,y=d.rendering,y===null)if(i)zr(d,!1);else{if(me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(y=gs(e),y!==null){for(t.flags|=128,zr(d,!1),i=y.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)d=r,e=i,d.flags&=14680066,y=d.alternate,y===null?(d.childLanes=0,d.lanes=e,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=y.childLanes,d.lanes=y.lanes,d.child=y.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=y.memoizedProps,d.memoizedState=y.memoizedState,d.updateQueue=y.updateQueue,d.type=y.type,e=y.dependencies,d.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ie(ae,ae.current&1|2),t.child}e=e.sibling}d.tail!==null&&_e()>Lr&&(t.flags|=128,i=!0,zr(d,!1),t.lanes=4194304)}else{if(!i)if(e=gs(y),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),zr(d,!0),d.tail===null&&d.tailMode==="hidden"&&!y.alternate&&!oe)return be(t),null}else 2*_e()-d.renderingStartTime>Lr&&r!==1073741824&&(t.flags|=128,i=!0,zr(d,!1),t.lanes=4194304);d.isBackwards?(y.sibling=t.child,t.child=y):(r=d.last,r!==null?r.sibling=y:t.child=y,d.last=y)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=_e(),t.sibling=null,r=ae.current,ie(ae,i?r&1|2:r&1),t):(be(t),null);case 22:case 23:return Zo(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Ne&1073741824&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),null;case 24:return null;case 25:return null}throw Error(j(156,t.tag))}function jd(e,t){switch(Bo(t),t.tag){case 1:return Ie(t.type)&&us(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return br(),ne(Oe),ne(Le),jo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zo(t),null;case 13:if(ne(ae),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(j(340));Er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ae),null;case 4:return br(),null;case 10:return Ho(t.type._context),null;case 22:case 23:return Zo(),null;case 24:return null;default:return null}}var Wi=!1,xe=!1,Ud=typeof WeakSet=="function"?WeakSet:Set,G=null;function fr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){fe(e,t,i)}else r.current=null}function io(e,t,r){try{r()}catch(i){fe(e,t,i)}}var na=!1;function $d(e,t){if(Wn=os,e=pc(),Po(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var y=0,o=-1,c=-1,f=0,m=0,h=e,p=null;t:for(;;){for(var S;h!==r||a!==0&&h.nodeType!==3||(o=y+a),h!==d||i!==0&&h.nodeType!==3||(c=y+i),h.nodeType===3&&(y+=h.nodeValue.length),(S=h.firstChild)!==null;)p=h,h=S;for(;;){if(h===e)break t;if(p===r&&++f===a&&(o=y),p===d&&++m===i&&(c=y),(S=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=S}r=o===-1||c===-1?null:{start:o,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(zn={focusedElem:e,selectionRange:r},os=!1,G=t;G!==null;)if(t=G,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,G=e;else for(;G!==null;){t=G;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var v=E.memoizedProps,u=E.memoizedState,l=t.stateNode,s=l.getSnapshotBeforeUpdate(t.elementType===t.type?v:Je(t.type,v),u);l.__reactInternalSnapshotBeforeUpdate=s}break;case 3:var n=t.stateNode.containerInfo;n.nodeType===1?n.textContent="":n.nodeType===9&&n.documentElement&&n.removeChild(n.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(j(163))}}catch(_){fe(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,G=e;break}G=t.return}return E=na,na=!1,E}function Zr(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var d=a.destroy;a.destroy=void 0,d!==void 0&&io(t,r,d)}a=a.next}while(a!==i)}}function Ms(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function so(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function hu(e){var t=e.alternate;t!==null&&(e.alternate=null,hu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lt],delete t[di],delete t[$n],delete t[xd],delete t[Ld])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function du(e){return e.tag===5||e.tag===3||e.tag===4}function oa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||du(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.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 no(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=cs));else if(i!==4&&(e=e.child,e!==null))for(no(e,t,r),e=e.sibling;e!==null;)no(e,t,r),e=e.sibling}function oo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(oo(e,t,r),e=e.sibling;e!==null;)oo(e,t,r),e=e.sibling}var Ce=null,Ze=!1;function wt(e,t,r){for(r=r.child;r!==null;)fu(e,t,r),r=r.sibling}function fu(e,t,r){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(xs,r)}catch{}switch(r.tag){case 5:xe||fr(r,t);case 6:var i=Ce,a=Ze;Ce=null,wt(e,t,r),Ce=i,Ze=a,Ce!==null&&(Ze?(e=Ce,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ce.removeChild(r.stateNode));break;case 18:Ce!==null&&(Ze?(e=Ce,r=r.stateNode,e.nodeType===8?an(e.parentNode,r):e.nodeType===1&&an(e,r),li(e)):an(Ce,r.stateNode));break;case 4:i=Ce,a=Ze,Ce=r.stateNode.containerInfo,Ze=!0,wt(e,t,r),Ce=i,Ze=a;break;case 0:case 11:case 14:case 15:if(!xe&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var d=a,y=d.destroy;d=d.tag,y!==void 0&&(d&2||d&4)&&io(r,t,y),a=a.next}while(a!==i)}wt(e,t,r);break;case 1:if(!xe&&(fr(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(o){fe(r,t,o)}wt(e,t,r);break;case 21:wt(e,t,r);break;case 22:r.mode&1?(xe=(i=xe)||r.memoizedState!==null,wt(e,t,r),xe=i):wt(e,t,r);break;default:wt(e,t,r)}}function la(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ud),t.forEach(function(i){var a=Zd.bind(null,e,i);r.has(i)||(r.add(i),i.then(a,a))})}}function Ye(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i];try{var d=e,y=t,o=y;e:for(;o!==null;){switch(o.tag){case 5:Ce=o.stateNode,Ze=!1;break e;case 3:Ce=o.stateNode.containerInfo,Ze=!0;break e;case 4:Ce=o.stateNode.containerInfo,Ze=!0;break e}o=o.return}if(Ce===null)throw Error(j(160));fu(d,y,a),Ce=null,Ze=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(f){fe(a,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_u(t,e),t=t.sibling}function _u(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ye(t,e),nt(e),i&4){try{Zr(3,e,e.return),Ms(3,e)}catch(v){fe(e,e.return,v)}try{Zr(5,e,e.return)}catch(v){fe(e,e.return,v)}}break;case 1:Ye(t,e),nt(e),i&512&&r!==null&&fr(r,r.return);break;case 5:if(Ye(t,e),nt(e),i&512&&r!==null&&fr(r,r.return),e.flags&32){var a=e.stateNode;try{ii(a,"")}catch(v){fe(e,e.return,v)}}if(i&4&&(a=e.stateNode,a!=null)){var d=e.memoizedProps,y=r!==null?r.memoizedProps:d,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&d.type==="radio"&&d.name!=null&&Ia(a,d),Tn(o,y);var f=Tn(o,d);for(y=0;y<c.length;y+=2){var m=c[y],h=c[y+1];m==="style"?za(a,h):m==="dangerouslySetInnerHTML"?Fa(a,h):m==="children"?ii(a,h):mo(a,m,h,f)}switch(o){case"input":bn(a,d);break;case"textarea":Ha(a,d);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!d.multiple;var S=d.value;S!=null?pr(a,!!d.multiple,S,!1):p!==!!d.multiple&&(d.defaultValue!=null?pr(a,!!d.multiple,d.defaultValue,!0):pr(a,!!d.multiple,d.multiple?[]:"",!1))}a[di]=d}catch(v){fe(e,e.return,v)}}break;case 6:if(Ye(t,e),nt(e),i&4){if(e.stateNode===null)throw Error(j(162));a=e.stateNode,d=e.memoizedProps;try{a.nodeValue=d}catch(v){fe(e,e.return,v)}}break;case 3:if(Ye(t,e),nt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(v){fe(e,e.return,v)}break;case 4:Ye(t,e),nt(e);break;case 13:Ye(t,e),nt(e),a=e.child,a.flags&8192&&(d=a.memoizedState!==null,a.stateNode.isHidden=d,!d||a.alternate!==null&&a.alternate.memoizedState!==null||(Yo=_e())),i&4&&la(e);break;case 22:if(m=r!==null&&r.memoizedState!==null,e.mode&1?(xe=(f=xe)||m,Ye(t,e),xe=f):Ye(t,e),nt(e),i&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!m&&e.mode&1)for(G=e,m=e.child;m!==null;){for(h=G=m;G!==null;){switch(p=G,S=p.child,p.tag){case 0:case 11:case 14:case 15:Zr(4,p,p.return);break;case 1:fr(p,p.return);var E=p.stateNode;if(typeof E.componentWillUnmount=="function"){i=p,r=p.return;try{t=i,E.props=t.memoizedProps,E.state=t.memoizedState,E.componentWillUnmount()}catch(v){fe(i,r,v)}}break;case 5:fr(p,p.return);break;case 22:if(p.memoizedState!==null){ca(h);continue}}S!==null?(S.return=p,G=S):ca(h)}m=m.sibling}e:for(m=null,h=e;;){if(h.tag===5){if(m===null){m=h;try{a=h.stateNode,f?(d=a.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none"):(o=h.stateNode,c=h.memoizedProps.style,y=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=Wa("display",y))}catch(v){fe(e,e.return,v)}}}else if(h.tag===6){if(m===null)try{h.stateNode.nodeValue=f?"":h.memoizedProps}catch(v){fe(e,e.return,v)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;m===h&&(m=null),h=h.return}m===h&&(m=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Ye(t,e),nt(e),i&4&&la(e);break;case 21:break;default:Ye(t,e),nt(e)}}function nt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(du(r)){var i=r;break e}r=r.return}throw Error(j(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(ii(a,""),i.flags&=-33);var d=oa(e);oo(e,d,a);break;case 3:case 4:var y=i.stateNode.containerInfo,o=oa(e);no(e,o,y);break;default:throw Error(j(161))}}catch(c){fe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kd(e,t,r){G=e,pu(e)}function pu(e,t,r){for(var i=(e.mode&1)!==0;G!==null;){var a=G,d=a.child;if(a.tag===22&&i){var y=a.memoizedState!==null||Wi;if(!y){var o=a.alternate,c=o!==null&&o.memoizedState!==null||xe;o=Wi;var f=xe;if(Wi=y,(xe=c)&&!f)for(G=a;G!==null;)y=G,c=y.child,y.tag===22&&y.memoizedState!==null?ua(a):c!==null?(c.return=y,G=c):ua(a);for(;d!==null;)G=d,pu(d),d=d.sibling;G=a,Wi=o,xe=f}aa(e)}else a.subtreeFlags&8772&&d!==null?(d.return=a,G=d):aa(e)}}function aa(e){for(;G!==null;){var t=G;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:xe||Ms(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!xe)if(r===null)i.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Je(t.type,r.memoizedProps);i.componentDidUpdate(a,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var d=t.updateQueue;d!==null&&Vl(t,d,i);break;case 3:var y=t.updateQueue;if(y!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Vl(t,y,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var m=f.memoizedState;if(m!==null){var h=m.dehydrated;h!==null&&li(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(j(163))}xe||t.flags&512&&so(t)}catch(p){fe(t,t.return,p)}}if(t===e){G=null;break}if(r=t.sibling,r!==null){r.return=t.return,G=r;break}G=t.return}}function ca(e){for(;G!==null;){var t=G;if(t===e){G=null;break}var r=t.sibling;if(r!==null){r.return=t.return,G=r;break}G=t.return}}function ua(e){for(;G!==null;){var t=G;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ms(4,t)}catch(c){fe(t,r,c)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var a=t.return;try{i.componentDidMount()}catch(c){fe(t,a,c)}}var d=t.return;try{so(t)}catch(c){fe(t,d,c)}break;case 5:var y=t.return;try{so(t)}catch(c){fe(t,y,c)}}}catch(c){fe(t,t.return,c)}if(t===e){G=null;break}var o=t.sibling;if(o!==null){o.return=t.return,G=o;break}G=t.return}}var Vd=Math.ceil,ys=St.ReactCurrentDispatcher,Xo=St.ReactCurrentOwner,Ge=St.ReactCurrentBatchConfig,te=0,ye=null,pe=null,we=0,Ne=0,_r=Wt(0),me=0,mi=null,Jt=0,Os=0,Qo=0,ei=null,Be=null,Yo=0,Lr=1/0,ut=null,Cs=!1,lo=null,Mt=null,zi=!1,Dt=null,ws=0,ti=0,ao=null,Ji=-1,Zi=0;function Re(){return te&6?_e():Ji!==-1?Ji:Ji=_e()}function Ot(e){return e.mode&1?te&2&&we!==0?we&-we:Rd.transition!==null?(Zi===0&&(Zi=Za()),Zi):(e=re,e!==0||(e=window.event,e=e===void 0?16:oc(e.type)),e):1}function rt(e,t,r,i){if(50<ti)throw ti=0,ao=null,Error(j(185));yi(e,r,i),(!(te&2)||e!==ye)&&(e===ye&&(!(te&2)&&(Os|=r),me===4&&xt(e,we)),He(e,i),r===1&&te===0&&!(t.mode&1)&&(Lr=_e()+500,Ps&&zt()))}function He(e,t){var r=e.callbackNode;Rh(e,t);var i=ns(e,e===ye?we:0);if(i===0)r!==null&&Sl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Sl(r),t===1)e.tag===0?Dd(ha.bind(null,e)):bc(ha.bind(null,e)),kd(function(){!(te&6)&&zt()}),r=null;else{switch(ec(i)){case 1:r=Eo;break;case 4:r=Ya;break;case 16:r=ss;break;case 536870912:r=Ja;break;default:r=ss}r=Eu(r,vu.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function vu(e,t){if(Ji=-1,Zi=0,te&6)throw Error(j(327));var r=e.callbackNode;if(yr()&&e.callbackNode!==r)return null;var i=ns(e,e===ye?we:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=Es(e,i);else{t=i;var a=te;te|=2;var d=mu();(ye!==e||we!==t)&&(ut=null,Lr=_e()+500,qt(e,t));do try{Xd();break}catch(o){gu(e,o)}while(!0);Io(),ys.current=d,te=a,pe!==null?t=0:(ye=null,we=0,t=me)}if(t!==0){if(t===2&&(a=On(e),a!==0&&(i=a,t=co(e,a))),t===1)throw r=mi,qt(e,0),xt(e,i),He(e,_e()),r;if(t===6)xt(e,i);else{if(a=e.current.alternate,!(i&30)&&!qd(a)&&(t=Es(e,i),t===2&&(d=On(e),d!==0&&(i=d,t=co(e,d))),t===1))throw r=mi,qt(e,0),xt(e,i),He(e,_e()),r;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(j(345));case 2:Ut(e,Be,ut);break;case 3:if(xt(e,i),(i&130023424)===i&&(t=Yo+500-_e(),10<t)){if(ns(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Re(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Un(Ut.bind(null,e,Be,ut),t);break}Ut(e,Be,ut);break;case 4:if(xt(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var y=31-tt(i);d=1<<y,y=t[y],y>a&&(a=y),i&=~d}if(i=a,i=_e()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Vd(i/1960))-i,10<i){e.timeoutHandle=Un(Ut.bind(null,e,Be,ut),i);break}Ut(e,Be,ut);break;case 5:Ut(e,Be,ut);break;default:throw Error(j(329))}}}return He(e,_e()),e.callbackNode===r?vu.bind(null,e):null}function co(e,t){var r=ei;return e.current.memoizedState.isDehydrated&&(qt(e,t).flags|=256),e=Es(e,t),e!==2&&(t=Be,Be=r,t!==null&&uo(t)),e}function uo(e){Be===null?Be=e:Be.push.apply(Be,e)}function qd(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var a=r[i],d=a.getSnapshot;a=a.value;try{if(!it(d(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 xt(e,t){for(t&=~Qo,t&=~Os,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-tt(t),i=1<<r;e[r]=-1,t&=~i}}function ha(e){if(te&6)throw Error(j(327));yr();var t=ns(e,0);if(!(t&1))return He(e,_e()),null;var r=Es(e,t);if(e.tag!==0&&r===2){var i=On(e);i!==0&&(t=i,r=co(e,i))}if(r===1)throw r=mi,qt(e,0),xt(e,t),He(e,_e()),r;if(r===6)throw Error(j(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ut(e,Be,ut),He(e,_e()),null}function Jo(e,t){var r=te;te|=1;try{return e(t)}finally{te=r,te===0&&(Lr=_e()+500,Ps&&zt())}}function Zt(e){Dt!==null&&Dt.tag===0&&!(te&6)&&yr();var t=te;te|=1;var r=Ge.transition,i=re;try{if(Ge.transition=null,re=1,e)return e()}finally{re=i,Ge.transition=r,te=t,!(te&6)&&zt()}}function Zo(){Ne=_r.current,ne(_r)}function qt(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Ed(r)),pe!==null)for(r=pe.return;r!==null;){var i=r;switch(Bo(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&us();break;case 3:br(),ne(Oe),ne(Le),jo();break;case 5:zo(i);break;case 4:br();break;case 13:ne(ae);break;case 19:ne(ae);break;case 10:Ho(i.type._context);break;case 22:case 23:Zo()}r=r.return}if(ye=e,pe=e=It(e.current,null),we=Ne=t,me=0,mi=null,Qo=Os=Jt=0,Be=ei=null,Kt!==null){for(t=0;t<Kt.length;t++)if(r=Kt[t],i=r.interleaved,i!==null){r.interleaved=null;var a=i.next,d=r.pending;if(d!==null){var y=d.next;d.next=a,i.next=y}r.pending=i}Kt=null}return e}function gu(e,t){do{var r=pe;try{if(Io(),Xi.current=Ss,ms){for(var i=ce.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}ms=!1}if(Yt=0,Se=ge=ce=null,Jr=!1,pi=0,Xo.current=null,r===null||r.return===null){me=1,mi=t,pe=null;break}e:{var d=e,y=r.return,o=r,c=t;if(t=we,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=c,m=o,h=m.tag;if(!(m.mode&1)&&(h===0||h===11||h===15)){var p=m.alternate;p?(m.updateQueue=p.updateQueue,m.memoizedState=p.memoizedState,m.lanes=p.lanes):(m.updateQueue=null,m.memoizedState=null)}var S=Jl(y);if(S!==null){S.flags&=-257,Zl(S,y,o,d,t),S.mode&1&&Yl(d,f,t),t=S,c=f;var E=t.updateQueue;if(E===null){var v=new Set;v.add(c),t.updateQueue=v}else E.add(c);break e}else{if(!(t&1)){Yl(d,f,t),el();break e}c=Error(j(426))}}else if(oe&&o.mode&1){var u=Jl(y);if(u!==null){!(u.flags&65536)&&(u.flags|=256),Zl(u,y,o,d,t),Mo(xr(c,o));break e}}d=c=xr(c,o),me!==4&&(me=2),ei===null?ei=[d]:ei.push(d),d=y;do{switch(d.tag){case 3:d.flags|=65536,t&=-t,d.lanes|=t;var l=eu(d,c,t);Kl(d,l);break e;case 1:o=c;var s=d.type,n=d.stateNode;if(!(d.flags&128)&&(typeof s.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(Mt===null||!Mt.has(n)))){d.flags|=65536,t&=-t,d.lanes|=t;var _=tu(d,o,t);Kl(d,_);break e}}d=d.return}while(d!==null)}yu(r)}catch(C){t=C,pe===r&&r!==null&&(pe=r=r.return);continue}break}while(!0)}function mu(){var e=ys.current;return ys.current=Ss,e===null?Ss:e}function el(){(me===0||me===3||me===2)&&(me=4),ye===null||!(Jt&268435455)&&!(Os&268435455)||xt(ye,we)}function Es(e,t){var r=te;te|=2;var i=mu();(ye!==e||we!==t)&&(ut=null,qt(e,t));do try{Gd();break}catch(a){gu(e,a)}while(!0);if(Io(),te=r,ys.current=i,pe!==null)throw Error(j(261));return ye=null,we=0,me}function Gd(){for(;pe!==null;)Su(pe)}function Xd(){for(;pe!==null&&!yh();)Su(pe)}function Su(e){var t=wu(e.alternate,e,Ne);e.memoizedProps=e.pendingProps,t===null?yu(e):pe=t,Xo.current=null}function yu(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=jd(r,t),r!==null){r.flags&=32767,pe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{me=6,pe=null;return}}else if(r=zd(r,t,Ne),r!==null){pe=r;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);me===0&&(me=5)}function Ut(e,t,r){var i=re,a=Ge.transition;try{Ge.transition=null,re=1,Qd(e,t,r,i)}finally{Ge.transition=a,re=i}return null}function Qd(e,t,r,i){do yr();while(Dt!==null);if(te&6)throw Error(j(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(j(177));e.callbackNode=null,e.callbackPriority=0;var d=r.lanes|r.childLanes;if(Th(e,d),e===ye&&(pe=ye=null,we=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||zi||(zi=!0,Eu(ss,function(){return yr(),null})),d=(r.flags&15990)!==0,r.subtreeFlags&15990||d){d=Ge.transition,Ge.transition=null;var y=re;re=1;var o=te;te|=4,Xo.current=null,$d(e,r),_u(r,e),vd(zn),os=!!Wn,zn=Wn=null,e.current=r,Kd(r),Ch(),te=o,re=y,Ge.transition=d}else e.current=r;if(zi&&(zi=!1,Dt=e,ws=a),d=e.pendingLanes,d===0&&(Mt=null),kh(r.stateNode),He(e,_e()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],i(a.value,{componentStack:a.stack,digest:a.digest});if(Cs)throw Cs=!1,e=lo,lo=null,e;return ws&1&&e.tag!==0&&yr(),d=e.pendingLanes,d&1?e===ao?ti++:(ti=0,ao=e):ti=0,zt(),null}function yr(){if(Dt!==null){var e=ec(ws),t=Ge.transition,r=re;try{if(Ge.transition=null,re=16>e?16:e,Dt===null)var i=!1;else{if(e=Dt,Dt=null,ws=0,te&6)throw Error(j(331));var a=te;for(te|=4,G=e.current;G!==null;){var d=G,y=d.child;if(G.flags&16){var o=d.deletions;if(o!==null){for(var c=0;c<o.length;c++){var f=o[c];for(G=f;G!==null;){var m=G;switch(m.tag){case 0:case 11:case 15:Zr(8,m,d)}var h=m.child;if(h!==null)h.return=m,G=h;else for(;G!==null;){m=G;var p=m.sibling,S=m.return;if(hu(m),m===f){G=null;break}if(p!==null){p.return=S,G=p;break}G=S}}}var E=d.alternate;if(E!==null){var v=E.child;if(v!==null){E.child=null;do{var u=v.sibling;v.sibling=null,v=u}while(v!==null)}}G=d}}if(d.subtreeFlags&2064&&y!==null)y.return=d,G=y;else e:for(;G!==null;){if(d=G,d.flags&2048)switch(d.tag){case 0:case 11:case 15:Zr(9,d,d.return)}var l=d.sibling;if(l!==null){l.return=d.return,G=l;break e}G=d.return}}var s=e.current;for(G=s;G!==null;){y=G;var n=y.child;if(y.subtreeFlags&2064&&n!==null)n.return=y,G=n;else e:for(y=s;G!==null;){if(o=G,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Ms(9,o)}}catch(C){fe(o,o.return,C)}if(o===y){G=null;break e}var _=o.sibling;if(_!==null){_.return=o.return,G=_;break e}G=o.return}}if(te=a,zt(),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(xs,e)}catch{}i=!0}return i}finally{re=r,Ge.transition=t}}return!1}function da(e,t,r){t=xr(r,t),t=eu(e,t,1),e=Bt(e,t,1),t=Re(),e!==null&&(yi(e,1,t),He(e,t))}function fe(e,t,r){if(e.tag===3)da(e,e,r);else for(;t!==null;){if(t.tag===3){da(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Mt===null||!Mt.has(i))){e=xr(r,e),e=tu(t,e,1),t=Bt(t,e,1),e=Re(),t!==null&&(yi(t,1,e),He(t,e));break}}t=t.return}}function Yd(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&r,ye===e&&(we&r)===r&&(me===4||me===3&&(we&130023424)===we&&500>_e()-Yo?qt(e,0):Qo|=r),He(e,t)}function Cu(e,t){t===0&&(e.mode&1?(t=Pi,Pi<<=1,!(Pi&130023424)&&(Pi=4194304)):t=1);var r=Re();e=gt(e,t),e!==null&&(yi(e,t,r),He(e,r))}function Jd(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Cu(e,r)}function Zd(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(j(314))}i!==null&&i.delete(t),Cu(e,r)}var wu;wu=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Oe.current)Me=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Me=!1,Wd(e,t,r);Me=!!(e.flags&131072)}else Me=!1,oe&&t.flags&1048576&&xc(t,fs,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Yi(e,t),e=t.pendingProps;var a=wr(t,Le.current);Sr(t,r),a=$o(null,t,i,e,a,r);var d=Ko();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ie(i)?(d=!0,hs(t)):d=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Fo(t),a.updater=Bs,t.stateNode=a,a._reactInternals=t,Qn(t,i,e,r),t=Zn(null,t,i,!0,d,r)):(t.tag=0,oe&&d&&Ao(t),De(null,t,a,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Yi(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=tf(i),e=Je(i,e),a){case 0:t=Jn(null,t,i,e,r);break e;case 1:t=ra(null,t,i,e,r);break e;case 11:t=ea(null,t,i,e,r);break e;case 14:t=ta(null,t,i,Je(i.type,e),r);break e}throw Error(j(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Je(i,a),Jn(e,t,i,a,r);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Je(i,a),ra(e,t,i,a,r);case 3:e:{if(nu(t),e===null)throw Error(j(387));i=t.pendingProps,d=t.memoizedState,a=d.element,Ac(e,t),vs(t,i,null,r);var y=t.memoizedState;if(i=y.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){a=xr(Error(j(423)),t),t=ia(e,t,i,r,a);break e}else if(i!==a){a=xr(Error(j(424)),t),t=ia(e,t,i,r,a);break e}else for(Fe=At(t.stateNode.containerInfo.firstChild),We=t,oe=!0,et=null,r=Tc(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Er(),i===a){t=mt(e,t,r);break e}De(e,t,i,r)}t=t.child}return t;case 5:return Bc(t),e===null&&qn(t),i=t.type,a=t.pendingProps,d=e!==null?e.memoizedProps:null,y=a.children,jn(i,a)?y=null:d!==null&&jn(i,d)&&(t.flags|=32),su(e,t),De(e,t,y,r),t.child;case 6:return e===null&&qn(t),null;case 13:return ou(e,t,r);case 4:return Wo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=kr(t,null,i,r):De(e,t,i,r),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Je(i,a),ea(e,t,i,a,r);case 7:return De(e,t,t.pendingProps,r),t.child;case 8:return De(e,t,t.pendingProps.children,r),t.child;case 12:return De(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,d=t.memoizedProps,y=a.value,ie(_s,i._currentValue),i._currentValue=y,d!==null)if(it(d.value,y)){if(d.children===a.children&&!Oe.current){t=mt(e,t,r);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var o=d.dependencies;if(o!==null){y=d.child;for(var c=o.firstContext;c!==null;){if(c.context===i){if(d.tag===1){c=_t(-1,r&-r),c.tag=2;var f=d.updateQueue;if(f!==null){f=f.shared;var m=f.pending;m===null?c.next=c:(c.next=m.next,m.next=c),f.pending=c}}d.lanes|=r,c=d.alternate,c!==null&&(c.lanes|=r),Gn(d.return,r,t),o.lanes|=r;break}c=c.next}}else if(d.tag===10)y=d.type===t.type?null:d.child;else if(d.tag===18){if(y=d.return,y===null)throw Error(j(341));y.lanes|=r,o=y.alternate,o!==null&&(o.lanes|=r),Gn(y,r,t),y=d.sibling}else y=d.child;if(y!==null)y.return=d;else for(y=d;y!==null;){if(y===t){y=null;break}if(d=y.sibling,d!==null){d.return=y.return,y=d;break}y=y.return}d=y}De(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Sr(t,r),a=Xe(a),i=i(a),t.flags|=1,De(e,t,i,r),t.child;case 14:return i=t.type,a=Je(i,t.pendingProps),a=Je(i.type,a),ta(e,t,i,a,r);case 15:return ru(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Je(i,a),Yi(e,t),t.tag=1,Ie(i)?(e=!0,hs(t)):e=!1,Sr(t,r),Zc(t,i,a),Qn(t,i,a,r),Zn(null,t,i,!0,e,r);case 19:return lu(e,t,r);case 22:return iu(e,t,r)}throw Error(j(156,t.tag))};function Eu(e,t){return Qa(e,t)}function ef(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qe(e,t,r,i){return new ef(e,t,r,i)}function tl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tf(e){if(typeof e=="function")return tl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yo)return 11;if(e===Co)return 14}return 2}function It(e,t){var r=e.alternate;return r===null?(r=qe(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function es(e,t,r,i,a,d){var y=2;if(i=e,typeof e=="function")tl(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case sr:return Gt(r.children,a,d,t);case So:y=8,a|=8;break;case yn:return e=qe(12,r,t,a|2),e.elementType=yn,e.lanes=d,e;case Cn:return e=qe(13,r,t,a),e.elementType=Cn,e.lanes=d,e;case wn:return e=qe(19,r,t,a),e.elementType=wn,e.lanes=d,e;case Ba:return Is(r,a,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pa:y=10;break e;case Aa:y=9;break e;case yo:y=11;break e;case Co:y=14;break e;case Et:y=16,i=null;break e}throw Error(j(130,e==null?e:typeof e,""))}return t=qe(y,r,t,a),t.elementType=e,t.type=i,t.lanes=d,t}function Gt(e,t,r,i){return e=qe(7,e,i,t),e.lanes=r,e}function Is(e,t,r,i){return e=qe(22,e,i,t),e.elementType=Ba,e.lanes=r,e.stateNode={isHidden:!1},e}function vn(e,t,r){return e=qe(6,e,null,t),e.lanes=r,e}function gn(e,t,r){return t=qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rf(e,t,r,i,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qs(0),this.expirationTimes=Qs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qs(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function rl(e,t,r,i,a,d,y,o,c){return e=new rf(e,t,r,o,c),t===1?(t=1,d===!0&&(t|=8)):t=0,d=qe(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fo(d),e}function sf(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ir,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function ku(e){if(!e)return Nt;e=e._reactInternals;e:{if(tr(e)!==e||e.tag!==1)throw Error(j(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ie(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(j(171))}if(e.tag===1){var r=e.type;if(Ie(r))return kc(e,r,t)}return t}function bu(e,t,r,i,a,d,y,o,c){return e=rl(r,i,!0,e,a,d,y,o,c),e.context=ku(null),r=e.current,i=Re(),a=Ot(r),d=_t(i,a),d.callback=t??null,Bt(r,d,a),e.current.lanes=a,yi(e,a,i),He(e,i),e}function Hs(e,t,r,i){var a=t.current,d=Re(),y=Ot(a);return r=ku(r),t.context===null?t.context=r:t.pendingContext=r,t=_t(d,y),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Bt(a,t,y),e!==null&&(rt(e,a,y,d),Gi(e,a,y)),y}function ks(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function fa(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function il(e,t){fa(e,t),(e=e.alternate)&&fa(e,t)}function nf(){return null}var xu=typeof reportError=="function"?reportError:function(e){console.error(e)};function sl(e){this._internalRoot=e}Ns.prototype.render=sl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(j(409));Hs(e,t,null,null)};Ns.prototype.unmount=sl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zt(function(){Hs(null,e,null,null)}),t[vt]=null}};function Ns(e){this._internalRoot=e}Ns.prototype.unstable_scheduleHydration=function(e){if(e){var t=ic();e={blockedOn:null,target:e,priority:t};for(var r=0;r<bt.length&&t!==0&&t<bt[r].priority;r++);bt.splice(r,0,e),r===0&&nc(e)}};function nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function _a(){}function of(e,t,r,i,a){if(a){if(typeof i=="function"){var d=i;i=function(){var f=ks(y);d.call(f)}}var y=bu(t,i,e,0,null,!1,!1,"",_a);return e._reactRootContainer=y,e[vt]=y.current,ui(e.nodeType===8?e.parentNode:e),Zt(),y}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var o=i;i=function(){var f=ks(c);o.call(f)}}var c=rl(e,0,!1,null,null,!1,!1,"",_a);return e._reactRootContainer=c,e[vt]=c.current,ui(e.nodeType===8?e.parentNode:e),Zt(function(){Hs(t,c,r,i)}),c}function Ws(e,t,r,i,a){var d=r._reactRootContainer;if(d){var y=d;if(typeof a=="function"){var o=a;a=function(){var c=ks(y);o.call(c)}}Hs(t,y,e,a)}else y=of(r,t,e,a,i);return ks(y)}tc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Kr(t.pendingLanes);r!==0&&(ko(t,r|1),He(t,_e()),!(te&6)&&(Lr=_e()+500,zt()))}break;case 13:Zt(function(){var i=gt(e,1);if(i!==null){var a=Re();rt(i,e,1,a)}}),il(e,1)}};bo=function(e){if(e.tag===13){var t=gt(e,134217728);if(t!==null){var r=Re();rt(t,e,134217728,r)}il(e,134217728)}};rc=function(e){if(e.tag===13){var t=Ot(e),r=gt(e,t);if(r!==null){var i=Re();rt(r,e,t,i)}il(e,t)}};ic=function(){return re};sc=function(e,t){var r=re;try{return re=e,t()}finally{re=r}};An=function(e,t,r){switch(t){case"input":if(bn(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var a=Ts(i);if(!a)throw Error(j(90));Oa(i),bn(i,a)}}}break;case"textarea":Ha(e,r);break;case"select":t=r.value,t!=null&&pr(e,!!r.multiple,t,!1)}};$a=Jo;Ka=Zt;var lf={usingClientEntryPoint:!1,Events:[wi,ar,Ts,ja,Ua,Jo]},jr={findFiberByHostInstance:$t,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},af={bundleType:jr.bundleType,version:jr.version,rendererPackageName:jr.rendererPackageName,rendererConfig:jr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:St.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ga(e),e===null?null:e.stateNode},findFiberByHostInstance:jr.findFiberByHostInstance||nf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ji=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ji.isDisabled&&ji.supportsFiber)try{xs=ji.inject(af),at=ji}catch{}}je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lf;je.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nl(t))throw Error(j(200));return sf(e,t,null,r)};je.createRoot=function(e,t){if(!nl(e))throw Error(j(299));var r=!1,i="",a=xu;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=rl(e,1,!1,null,null,r,!1,i,a),e[vt]=t.current,ui(e.nodeType===8?e.parentNode:e),new sl(t)};je.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return 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=Ga(t),e=e===null?null:e.stateNode,e};je.flushSync=function(e){return Zt(e)};je.hydrate=function(e,t,r){if(!Fs(t))throw Error(j(200));return Ws(null,e,t,!0,r)};je.hydrateRoot=function(e,t,r){if(!nl(e))throw Error(j(405));var i=r!=null&&r.hydratedSources||null,a=!1,d="",y=xu;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onRecoverableError!==void 0&&(y=r.onRecoverableError)),t=bu(t,null,e,1,r??null,a,!1,d,y),e[vt]=t.current,ui(e),i)for(e=0;e<i.length;e++)r=i[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new Ns(t)};je.render=function(e,t,r){if(!Fs(t))throw Error(j(200));return Ws(null,e,t,!1,r)};je.unmountComponentAtNode=function(e){if(!Fs(e))throw Error(j(40));return e._reactRootContainer?(Zt(function(){Ws(null,null,e,!1,function(){e._reactRootContainer=null,e[vt]=null})}),!0):!1};je.unstable_batchedUpdates=Jo;je.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Fs(r))throw Error(j(200));if(e==null||e._reactInternals===void 0)throw Error(j(38));return Ws(e,t,r,!1,i)};je.version="18.3.1-next-f1338f8080-20240426";function Lu(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Lu)}catch(e){console.error(e)}}Lu(),La.exports=je;var cf=La.exports,Du,pa=cf;Du=pa.createRoot,pa.hydrateRoot;var Ru={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(globalThis,()=>(()=>{var r={4567:function(y,o,c){var f=this&&this.__decorate||function(s,n,_,C){var w,k=arguments.length,g=k<3?n:C===null?C=Object.getOwnPropertyDescriptor(n,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,n,_,C);else for(var x=s.length-1;x>=0;x--)(w=s[x])&&(g=(k<3?w(g):k>3?w(n,_,g):w(n,_))||g);return k>3&&g&&Object.defineProperty(n,_,g),g},m=this&&this.__param||function(s,n){return function(_,C){n(_,C,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const h=c(9042),p=c(9924),S=c(844),E=c(4725),v=c(2585),u=c(3656);let l=o.AccessibilityManager=class extends S.Disposable{constructor(s,n,_,C){super(),this._terminal=s,this._coreBrowserService=_,this._renderService=C,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let w=0;w<this._terminal.rows;w++)this._rowElements[w]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[w]);if(this._topBoundaryFocusListener=w=>this._handleBoundaryFocus(w,0),this._bottomBoundaryFocusListener=w=>this._handleBoundaryFocus(w,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(w=>this._handleResize(w.rows))),this.register(this._terminal.onRender(w=>this._refreshRows(w.start,w.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(w=>this._handleChar(w))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
40
|
+
`+d.stack}return{value:e,source:t,stack:a,digest:null}}function _n(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Yn(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Hd=typeof WeakMap=="function"?WeakMap:Map;function eu(e,t,r){r=_t(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Cs||(Cs=!0,lo=i),Yn(e,t)},r}function tu(e,t,r){r=_t(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var a=t.value;r.payload=function(){return i(a)},r.callback=function(){Yn(e,t)}}var d=e.stateNode;return d!==null&&typeof d.componentDidCatch=="function"&&(r.callback=function(){Yn(e,t),typeof i!="function"&&(Mt===null?Mt=new Set([this]):Mt.add(this));var y=t.stack;this.componentDidCatch(t.value,{componentStack:y!==null?y:""})}),r}function Yl(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Hd;var a=new Set;i.set(t,a)}else a=i.get(t),a===void 0&&(a=new Set,i.set(t,a));a.has(r)||(a.add(r),e=Yd.bind(null,e,t,r),t.then(e,e))}function Jl(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Zl(e,t,r,i,a){return e.mode&1?(e.flags|=65536,e.lanes=a,e):(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=_t(-1,1),t.tag=2,Bt(r,t,1))),r.lanes|=1),e)}var Nd=St.ReactCurrentOwner,Me=!1;function De(e,t,r,i){t.child=e===null?Tc(t,null,r,i):kr(t,e.child,r,i)}function ea(e,t,r,i,a){r=r.render;var d=t.ref;return Sr(t,a),i=$o(e,t,r,i,d,a),r=Ko(),e!==null&&!Me?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,mt(e,t,a)):(le&&r&&Ao(t),t.flags|=1,De(e,t,i,a),t.child)}function ta(e,t,r,i,a){if(e===null){var d=r.type;return typeof d=="function"&&!tl(d)&&d.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=d,ru(e,t,d,i,a)):(e=es(r.type,null,i,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(d=e.child,!(e.lanes&a)){var y=d.memoizedProps;if(r=r.compare,r=r!==null?r:ci,r(y,i)&&e.ref===t.ref)return mt(e,t,a)}return t.flags|=1,e=It(d,i),e.ref=t.ref,e.return=t,t.child=e}function ru(e,t,r,i,a){if(e!==null){var d=e.memoizedProps;if(ci(d,i)&&e.ref===t.ref)if(Me=!1,t.pendingProps=i=d,(e.lanes&a)!==0)e.flags&131072&&(Me=!0);else return t.lanes=e.lanes,mt(e,t,a)}return Jn(e,t,r,i,a)}function iu(e,t,r){var i=t.pendingProps,a=i.children,d=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},se(_r,Ne),Ne|=r;else{if(!(r&1073741824))return e=d!==null?d.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,se(_r,Ne),Ne|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=d!==null?d.baseLanes:r,se(_r,Ne),Ne|=i}else d!==null?(i=d.baseLanes|r,t.memoizedState=null):i=r,se(_r,Ne),Ne|=i;return De(e,t,a,r),t.child}function su(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Jn(e,t,r,i,a){var d=Ie(r)?Xt:Le.current;return d=wr(t,d),Sr(t,a),r=$o(e,t,r,i,d,a),i=Ko(),e!==null&&!Me?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a,mt(e,t,a)):(le&&i&&Ao(t),t.flags|=1,De(e,t,r,a),t.child)}function ra(e,t,r,i,a){if(Ie(r)){var d=!0;hs(t)}else d=!1;if(Sr(t,a),t.stateNode===null)Yi(e,t),Zc(t,r,i),Qn(t,r,i,a),i=!0;else if(e===null){var y=t.stateNode,o=t.memoizedProps;y.props=o;var c=y.context,f=r.contextType;typeof f=="object"&&f!==null?f=Xe(f):(f=Ie(r)?Xt:Le.current,f=wr(t,f));var m=r.getDerivedStateFromProps,h=typeof m=="function"||typeof y.getSnapshotBeforeUpdate=="function";h||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(o!==i||c!==f)&&Ql(t,y,i,f),kt=!1;var p=t.memoizedState;y.state=p,vs(t,i,y,a),c=t.memoizedState,o!==i||p!==c||Oe.current||kt?(typeof m=="function"&&(Xn(t,r,m,i),c=t.memoizedState),(o=kt||Xl(t,r,o,i,p,c,f))?(h||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(t.flags|=4194308)):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),y.props=i,y.state=c,y.context=f,i=o):(typeof y.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{y=t.stateNode,Ac(e,t),o=t.memoizedProps,f=t.type===t.elementType?o:Je(t.type,o),y.props=f,h=t.pendingProps,p=y.context,c=r.contextType,typeof c=="object"&&c!==null?c=Xe(c):(c=Ie(r)?Xt:Le.current,c=wr(t,c));var S=r.getDerivedStateFromProps;(m=typeof S=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(o!==h||p!==c)&&Ql(t,y,i,c),kt=!1,p=t.memoizedState,y.state=p,vs(t,i,y,a);var E=t.memoizedState;o!==h||p!==E||Oe.current||kt?(typeof S=="function"&&(Xn(t,r,S,i),E=t.memoizedState),(f=kt||Xl(t,r,f,i,p,E,c)||!1)?(m||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(i,E,c),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(i,E,c)),typeof y.componentDidUpdate=="function"&&(t.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof y.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=E),y.props=i,y.state=E,y.context=c,i=f):(typeof y.componentDidUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),i=!1)}return Zn(e,t,r,i,d,a)}function Zn(e,t,r,i,a,d){su(e,t);var y=(t.flags&128)!==0;if(!i&&!y)return a&&zl(t,r,!1),mt(e,t,d);i=t.stateNode,Nd.current=t;var o=y&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&y?(t.child=kr(t,e.child,null,d),t.child=kr(t,null,o,d)):De(e,t,o,d),t.memoizedState=i.state,a&&zl(t,r,!0),t.child}function nu(e){var t=e.stateNode;t.pendingContext?Wl(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Wl(e,t.context,!1),Wo(e,t.containerInfo)}function ia(e,t,r,i,a){return Er(),Mo(a),t.flags|=256,De(e,t,r,i),t.child}var eo={dehydrated:null,treeContext:null,retryLane:0};function to(e){return{baseLanes:e,cachePool:null,transitions:null}}function ou(e,t,r){var i=t.pendingProps,a=ce.current,d=!1,y=(t.flags&128)!==0,o;if((o=y)||(o=e!==null&&e.memoizedState===null?!1:(a&2)!==0),o?(d=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(a|=1),se(ce,a&1),e===null)return qn(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(y=i.children,e=i.fallback,d?(i=t.mode,d=t.child,y={mode:"hidden",children:y},!(i&1)&&d!==null?(d.childLanes=0,d.pendingProps=y):d=Is(y,i,0,null),e=Gt(e,i,r,null),d.return=t,e.return=t,d.sibling=e,t.child=d,t.child.memoizedState=to(r),t.memoizedState=eo,e):Go(t,y));if(a=e.memoizedState,a!==null&&(o=a.dehydrated,o!==null))return Fd(e,t,y,i,o,a,r);if(d){d=i.fallback,y=t.mode,a=e.child,o=a.sibling;var c={mode:"hidden",children:i.children};return!(y&1)&&t.child!==a?(i=t.child,i.childLanes=0,i.pendingProps=c,t.deletions=null):(i=It(a,c),i.subtreeFlags=a.subtreeFlags&14680064),o!==null?d=It(o,d):(d=Gt(d,y,r,null),d.flags|=2),d.return=t,i.return=t,i.sibling=d,t.child=i,i=d,d=t.child,y=e.child.memoizedState,y=y===null?to(r):{baseLanes:y.baseLanes|r,cachePool:null,transitions:y.transitions},d.memoizedState=y,d.childLanes=e.childLanes&~r,t.memoizedState=eo,i}return d=e.child,e=d.sibling,i=It(d,{mode:"visible",children:i.children}),!(t.mode&1)&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Go(e,t){return t=Is({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Fi(e,t,r,i){return i!==null&&Mo(i),kr(t,e.child,null,r),e=Go(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Fd(e,t,r,i,a,d,y){if(r)return t.flags&256?(t.flags&=-257,i=_n(Error(U(422))),Fi(e,t,y,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(d=i.fallback,a=t.mode,i=Is({mode:"visible",children:i.children},a,0,null),d=Gt(d,a,y,null),d.flags|=2,i.return=t,d.return=t,i.sibling=d,t.child=i,t.mode&1&&kr(t,e.child,null,y),t.child.memoizedState=to(y),t.memoizedState=eo,d);if(!(t.mode&1))return Fi(e,t,y,null);if(a.data==="$!"){if(i=a.nextSibling&&a.nextSibling.dataset,i)var o=i.dgst;return i=o,d=Error(U(419)),i=_n(d,i,void 0),Fi(e,t,y,i)}if(o=(y&e.childLanes)!==0,Me||o){if(i=ye,i!==null){switch(y&-y){case 4:a=2;break;case 16:a=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}a=a&(i.suspendedLanes|y)?0:a,a!==0&&a!==d.retryLane&&(d.retryLane=a,gt(e,a),rt(i,e,a,-1))}return el(),i=_n(Error(U(421))),Fi(e,t,y,i)}return a.data==="$?"?(t.flags|=128,t.child=e.child,t=Jd.bind(null,e),a._reactRetry=t,null):(e=d.treeContext,Fe=At(a.nextSibling),We=t,le=!0,et=null,e!==null&&(Ke[Ve++]=dt,Ke[Ve++]=ft,Ke[Ve++]=Qt,dt=e.id,ft=e.overflow,Qt=t),t=Go(t,i.children),t.flags|=4096,t)}function sa(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),Gn(e.return,t,r)}function pn(e,t,r,i,a){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:a}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=i,d.tail=r,d.tailMode=a)}function lu(e,t,r){var i=t.pendingProps,a=i.revealOrder,d=i.tail;if(De(e,t,i.children,r),i=ce.current,i&2)i=i&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&sa(e,r,t);else if(e.tag===19)sa(e,r,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}i&=1}if(se(ce,i),!(t.mode&1))t.memoizedState=null;else switch(a){case"forwards":for(r=t.child,a=null;r!==null;)e=r.alternate,e!==null&&gs(e)===null&&(a=r),r=r.sibling;r=a,r===null?(a=t.child,t.child=null):(a=r.sibling,r.sibling=null),pn(t,!1,a,r,d);break;case"backwards":for(r=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&gs(e)===null){t.child=a;break}e=a.sibling,a.sibling=r,r=a,a=e}pn(t,!0,r,null,d);break;case"together":pn(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Yi(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function mt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Jt|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(U(153));if(t.child!==null){for(e=t.child,r=It(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=It(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Wd(e,t,r){switch(t.tag){case 3:nu(t),Er();break;case 5:Bc(t);break;case 1:Ie(t.type)&&hs(t);break;case 4:Wo(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,a=t.memoizedProps.value;se(_s,i._currentValue),i._currentValue=a;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(se(ce,ce.current&1),t.flags|=128,null):r&t.child.childLanes?ou(e,t,r):(se(ce,ce.current&1),e=mt(e,t,r),e!==null?e.sibling:null);se(ce,ce.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return lu(e,t,r);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),se(ce,ce.current),i)break;return null;case 22:case 23:return t.lanes=0,iu(e,t,r)}return mt(e,t,r)}var au,ro,cu,uu;au=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};ro=function(){};cu=function(e,t,r,i){var a=e.memoizedProps;if(a!==i){e=t.stateNode,Vt(ct.current);var d=null;switch(r){case"input":a=kn(e,a),i=kn(e,i),d=[];break;case"select":a=he({},a,{value:void 0}),i=he({},i,{value:void 0}),d=[];break;case"textarea":a=Ln(e,a),i=Ln(e,i),d=[];break;default:typeof a.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=cs)}Rn(r,i);var y;r=null;for(f in a)if(!i.hasOwnProperty(f)&&a.hasOwnProperty(f)&&a[f]!=null)if(f==="style"){var o=a[f];for(y in o)o.hasOwnProperty(y)&&(r||(r={}),r[y]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(ri.hasOwnProperty(f)?d||(d=[]):(d=d||[]).push(f,null));for(f in i){var c=i[f];if(o=a!=null?a[f]:void 0,i.hasOwnProperty(f)&&c!==o&&(c!=null||o!=null))if(f==="style")if(o){for(y in o)!o.hasOwnProperty(y)||c&&c.hasOwnProperty(y)||(r||(r={}),r[y]="");for(y in c)c.hasOwnProperty(y)&&o[y]!==c[y]&&(r||(r={}),r[y]=c[y])}else r||(d||(d=[]),d.push(f,r)),r=c;else f==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,o=o?o.__html:void 0,c!=null&&o!==c&&(d=d||[]).push(f,c)):f==="children"?typeof c!="string"&&typeof c!="number"||(d=d||[]).push(f,""+c):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(ri.hasOwnProperty(f)?(c!=null&&f==="onScroll"&&ne("scroll",e),d||o===c||(d=[])):(d=d||[]).push(f,c))}r&&(d=d||[]).push("style",r);var f=d;(t.updateQueue=f)&&(t.flags|=4)}};uu=function(e,t,r,i){r!==i&&(t.flags|=4)};function zr(e,t){if(!le)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function be(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags&14680064,i|=a.flags&14680064,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)r|=a.lanes|a.childLanes,i|=a.subtreeFlags,i|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function zd(e,t,r){var i=t.pendingProps;switch(Bo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return be(t),null;case 1:return Ie(t.type)&&us(),be(t),null;case 3:return i=t.stateNode,br(),oe(Oe),oe(Le),jo(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Hi(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,et!==null&&(uo(et),et=null))),ro(e,t),be(t),null;case 5:zo(t);var a=Vt(_i.current);if(r=t.type,e!==null&&t.stateNode!=null)cu(e,t,r,i,a),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(U(166));return be(t),null}if(e=Vt(ct.current),Hi(t)){i=t.stateNode,r=t.type;var d=t.memoizedProps;switch(i[lt]=t,i[di]=d,e=(t.mode&1)!==0,r){case"dialog":ne("cancel",i),ne("close",i);break;case"iframe":case"object":case"embed":ne("load",i);break;case"video":case"audio":for(a=0;a<Vr.length;a++)ne(Vr[a],i);break;case"source":ne("error",i);break;case"img":case"image":case"link":ne("error",i),ne("load",i);break;case"details":ne("toggle",i);break;case"input":fl(i,d),ne("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!d.multiple},ne("invalid",i);break;case"textarea":pl(i,d),ne("invalid",i)}Rn(r,d),a=null;for(var y in d)if(d.hasOwnProperty(y)){var o=d[y];y==="children"?typeof o=="string"?i.textContent!==o&&(d.suppressHydrationWarning!==!0&&Ii(i.textContent,o,e),a=["children",o]):typeof o=="number"&&i.textContent!==""+o&&(d.suppressHydrationWarning!==!0&&Ii(i.textContent,o,e),a=["children",""+o]):ri.hasOwnProperty(y)&&o!=null&&y==="onScroll"&&ne("scroll",i)}switch(r){case"input":Di(i),_l(i,d,!0);break;case"textarea":Di(i),vl(i);break;case"select":case"option":break;default:typeof d.onClick=="function"&&(i.onclick=cs)}i=a,t.updateQueue=i,i!==null&&(t.flags|=4)}else{y=a.nodeType===9?a:a.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Na(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=y.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=y.createElement(r,{is:i.is}):(e=y.createElement(r),r==="select"&&(y=e,i.multiple?y.multiple=!0:i.size&&(y.size=i.size))):e=y.createElementNS(e,r),e[lt]=t,e[di]=i,au(e,t,!1,!1),t.stateNode=e;e:{switch(y=Tn(r,i),r){case"dialog":ne("cancel",e),ne("close",e),a=i;break;case"iframe":case"object":case"embed":ne("load",e),a=i;break;case"video":case"audio":for(a=0;a<Vr.length;a++)ne(Vr[a],e);a=i;break;case"source":ne("error",e),a=i;break;case"img":case"image":case"link":ne("error",e),ne("load",e),a=i;break;case"details":ne("toggle",e),a=i;break;case"input":fl(e,i),a=kn(e,i),ne("invalid",e);break;case"option":a=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},a=he({},i,{value:void 0}),ne("invalid",e);break;case"textarea":pl(e,i),a=Ln(e,i),ne("invalid",e);break;default:a=i}Rn(r,a),o=a;for(d in o)if(o.hasOwnProperty(d)){var c=o[d];d==="style"?za(e,c):d==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Fa(e,c)):d==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&ii(e,c):typeof c=="number"&&ii(e,""+c):d!=="suppressContentEditableWarning"&&d!=="suppressHydrationWarning"&&d!=="autoFocus"&&(ri.hasOwnProperty(d)?c!=null&&d==="onScroll"&&ne("scroll",e):c!=null&&mo(e,d,c,y))}switch(r){case"input":Di(e),_l(e,i,!1);break;case"textarea":Di(e),vl(e);break;case"option":i.value!=null&&e.setAttribute("value",""+Ht(i.value));break;case"select":e.multiple=!!i.multiple,d=i.value,d!=null?pr(e,!!i.multiple,d,!1):i.defaultValue!=null&&pr(e,!!i.multiple,i.defaultValue,!0);break;default:typeof a.onClick=="function"&&(e.onclick=cs)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return be(t),null;case 6:if(e&&t.stateNode!=null)uu(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(U(166));if(r=Vt(_i.current),Vt(ct.current),Hi(t)){if(i=t.stateNode,r=t.memoizedProps,i[lt]=t,(d=i.nodeValue!==r)&&(e=We,e!==null))switch(e.tag){case 3:Ii(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Ii(i.nodeValue,r,(e.mode&1)!==0)}d&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[lt]=t,t.stateNode=i}return be(t),null;case 13:if(oe(ce),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(le&&Fe!==null&&t.mode&1&&!(t.flags&128))Dc(),Er(),t.flags|=98560,d=!1;else if(d=Hi(t),i!==null&&i.dehydrated!==null){if(e===null){if(!d)throw Error(U(318));if(d=t.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(U(317));d[lt]=t}else Er(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;be(t),d=!1}else et!==null&&(uo(et),et=null),d=!0;if(!d)return t.flags&65536?t:null}return t.flags&128?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,t.mode&1&&(e===null||ce.current&1?me===0&&(me=3):el())),t.updateQueue!==null&&(t.flags|=4),be(t),null);case 4:return br(),ro(e,t),e===null&&ui(t.stateNode.containerInfo),be(t),null;case 10:return Ho(t.type._context),be(t),null;case 17:return Ie(t.type)&&us(),be(t),null;case 19:if(oe(ce),d=t.memoizedState,d===null)return be(t),null;if(i=(t.flags&128)!==0,y=d.rendering,y===null)if(i)zr(d,!1);else{if(me!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(y=gs(e),y!==null){for(t.flags|=128,zr(d,!1),i=y.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)d=r,e=i,d.flags&=14680066,y=d.alternate,y===null?(d.childLanes=0,d.lanes=e,d.child=null,d.subtreeFlags=0,d.memoizedProps=null,d.memoizedState=null,d.updateQueue=null,d.dependencies=null,d.stateNode=null):(d.childLanes=y.childLanes,d.lanes=y.lanes,d.child=y.child,d.subtreeFlags=0,d.deletions=null,d.memoizedProps=y.memoizedProps,d.memoizedState=y.memoizedState,d.updateQueue=y.updateQueue,d.type=y.type,e=y.dependencies,d.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return se(ce,ce.current&1|2),t.child}e=e.sibling}d.tail!==null&&_e()>Lr&&(t.flags|=128,i=!0,zr(d,!1),t.lanes=4194304)}else{if(!i)if(e=gs(y),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),zr(d,!0),d.tail===null&&d.tailMode==="hidden"&&!y.alternate&&!le)return be(t),null}else 2*_e()-d.renderingStartTime>Lr&&r!==1073741824&&(t.flags|=128,i=!0,zr(d,!1),t.lanes=4194304);d.isBackwards?(y.sibling=t.child,t.child=y):(r=d.last,r!==null?r.sibling=y:t.child=y,d.last=y)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=_e(),t.sibling=null,r=ce.current,se(ce,i?r&1|2:r&1),t):(be(t),null);case 22:case 23:return Zo(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Ne&1073741824&&(be(t),t.subtreeFlags&6&&(t.flags|=8192)):be(t),null;case 24:return null;case 25:return null}throw Error(U(156,t.tag))}function jd(e,t){switch(Bo(t),t.tag){case 1:return Ie(t.type)&&us(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return br(),oe(Oe),oe(Le),jo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return zo(t),null;case 13:if(oe(ce),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(U(340));Er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return oe(ce),null;case 4:return br(),null;case 10:return Ho(t.type._context),null;case 22:case 23:return Zo(),null;case 24:return null;default:return null}}var Wi=!1,xe=!1,Ud=typeof WeakSet=="function"?WeakSet:Set,X=null;function fr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){fe(e,t,i)}else r.current=null}function io(e,t,r){try{r()}catch(i){fe(e,t,i)}}var na=!1;function $d(e,t){if(Wn=os,e=pc(),Po(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,d=i.focusNode;i=i.focusOffset;try{r.nodeType,d.nodeType}catch{r=null;break e}var y=0,o=-1,c=-1,f=0,m=0,h=e,p=null;t:for(;;){for(var S;h!==r||a!==0&&h.nodeType!==3||(o=y+a),h!==d||i!==0&&h.nodeType!==3||(c=y+i),h.nodeType===3&&(y+=h.nodeValue.length),(S=h.firstChild)!==null;)p=h,h=S;for(;;){if(h===e)break t;if(p===r&&++f===a&&(o=y),p===d&&++m===i&&(c=y),(S=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=S}r=o===-1||c===-1?null:{start:o,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(zn={focusedElem:e,selectionRange:r},os=!1,X=t;X!==null;)if(t=X,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,X=e;else for(;X!==null;){t=X;try{var E=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(E!==null){var v=E.memoizedProps,u=E.memoizedState,l=t.stateNode,s=l.getSnapshotBeforeUpdate(t.elementType===t.type?v:Je(t.type,v),u);l.__reactInternalSnapshotBeforeUpdate=s}break;case 3:var n=t.stateNode.containerInfo;n.nodeType===1?n.textContent="":n.nodeType===9&&n.documentElement&&n.removeChild(n.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(U(163))}}catch(_){fe(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,X=e;break}X=t.return}return E=na,na=!1,E}function Zr(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var a=i=i.next;do{if((a.tag&e)===e){var d=a.destroy;a.destroy=void 0,d!==void 0&&io(t,r,d)}a=a.next}while(a!==i)}}function Ms(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function so(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function hu(e){var t=e.alternate;t!==null&&(e.alternate=null,hu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[lt],delete t[di],delete t[$n],delete t[xd],delete t[Ld])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function du(e){return e.tag===5||e.tag===3||e.tag===4}function oa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||du(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.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 no(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=cs));else if(i!==4&&(e=e.child,e!==null))for(no(e,t,r),e=e.sibling;e!==null;)no(e,t,r),e=e.sibling}function oo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(oo(e,t,r),e=e.sibling;e!==null;)oo(e,t,r),e=e.sibling}var Ce=null,Ze=!1;function wt(e,t,r){for(r=r.child;r!==null;)fu(e,t,r),r=r.sibling}function fu(e,t,r){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(xs,r)}catch{}switch(r.tag){case 5:xe||fr(r,t);case 6:var i=Ce,a=Ze;Ce=null,wt(e,t,r),Ce=i,Ze=a,Ce!==null&&(Ze?(e=Ce,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ce.removeChild(r.stateNode));break;case 18:Ce!==null&&(Ze?(e=Ce,r=r.stateNode,e.nodeType===8?an(e.parentNode,r):e.nodeType===1&&an(e,r),li(e)):an(Ce,r.stateNode));break;case 4:i=Ce,a=Ze,Ce=r.stateNode.containerInfo,Ze=!0,wt(e,t,r),Ce=i,Ze=a;break;case 0:case 11:case 14:case 15:if(!xe&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){a=i=i.next;do{var d=a,y=d.destroy;d=d.tag,y!==void 0&&(d&2||d&4)&&io(r,t,y),a=a.next}while(a!==i)}wt(e,t,r);break;case 1:if(!xe&&(fr(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(o){fe(r,t,o)}wt(e,t,r);break;case 21:wt(e,t,r);break;case 22:r.mode&1?(xe=(i=xe)||r.memoizedState!==null,wt(e,t,r),xe=i):wt(e,t,r);break;default:wt(e,t,r)}}function la(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Ud),t.forEach(function(i){var a=Zd.bind(null,e,i);r.has(i)||(r.add(i),i.then(a,a))})}}function Ye(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var a=r[i];try{var d=e,y=t,o=y;e:for(;o!==null;){switch(o.tag){case 5:Ce=o.stateNode,Ze=!1;break e;case 3:Ce=o.stateNode.containerInfo,Ze=!0;break e;case 4:Ce=o.stateNode.containerInfo,Ze=!0;break e}o=o.return}if(Ce===null)throw Error(U(160));fu(d,y,a),Ce=null,Ze=!1;var c=a.alternate;c!==null&&(c.return=null),a.return=null}catch(f){fe(a,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)_u(t,e),t=t.sibling}function _u(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ye(t,e),nt(e),i&4){try{Zr(3,e,e.return),Ms(3,e)}catch(v){fe(e,e.return,v)}try{Zr(5,e,e.return)}catch(v){fe(e,e.return,v)}}break;case 1:Ye(t,e),nt(e),i&512&&r!==null&&fr(r,r.return);break;case 5:if(Ye(t,e),nt(e),i&512&&r!==null&&fr(r,r.return),e.flags&32){var a=e.stateNode;try{ii(a,"")}catch(v){fe(e,e.return,v)}}if(i&4&&(a=e.stateNode,a!=null)){var d=e.memoizedProps,y=r!==null?r.memoizedProps:d,o=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{o==="input"&&d.type==="radio"&&d.name!=null&&Ia(a,d),Tn(o,y);var f=Tn(o,d);for(y=0;y<c.length;y+=2){var m=c[y],h=c[y+1];m==="style"?za(a,h):m==="dangerouslySetInnerHTML"?Fa(a,h):m==="children"?ii(a,h):mo(a,m,h,f)}switch(o){case"input":bn(a,d);break;case"textarea":Ha(a,d);break;case"select":var p=a._wrapperState.wasMultiple;a._wrapperState.wasMultiple=!!d.multiple;var S=d.value;S!=null?pr(a,!!d.multiple,S,!1):p!==!!d.multiple&&(d.defaultValue!=null?pr(a,!!d.multiple,d.defaultValue,!0):pr(a,!!d.multiple,d.multiple?[]:"",!1))}a[di]=d}catch(v){fe(e,e.return,v)}}break;case 6:if(Ye(t,e),nt(e),i&4){if(e.stateNode===null)throw Error(U(162));a=e.stateNode,d=e.memoizedProps;try{a.nodeValue=d}catch(v){fe(e,e.return,v)}}break;case 3:if(Ye(t,e),nt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{li(t.containerInfo)}catch(v){fe(e,e.return,v)}break;case 4:Ye(t,e),nt(e);break;case 13:Ye(t,e),nt(e),a=e.child,a.flags&8192&&(d=a.memoizedState!==null,a.stateNode.isHidden=d,!d||a.alternate!==null&&a.alternate.memoizedState!==null||(Yo=_e())),i&4&&la(e);break;case 22:if(m=r!==null&&r.memoizedState!==null,e.mode&1?(xe=(f=xe)||m,Ye(t,e),xe=f):Ye(t,e),nt(e),i&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!m&&e.mode&1)for(X=e,m=e.child;m!==null;){for(h=X=m;X!==null;){switch(p=X,S=p.child,p.tag){case 0:case 11:case 14:case 15:Zr(4,p,p.return);break;case 1:fr(p,p.return);var E=p.stateNode;if(typeof E.componentWillUnmount=="function"){i=p,r=p.return;try{t=i,E.props=t.memoizedProps,E.state=t.memoizedState,E.componentWillUnmount()}catch(v){fe(i,r,v)}}break;case 5:fr(p,p.return);break;case 22:if(p.memoizedState!==null){ca(h);continue}}S!==null?(S.return=p,X=S):ca(h)}m=m.sibling}e:for(m=null,h=e;;){if(h.tag===5){if(m===null){m=h;try{a=h.stateNode,f?(d=a.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none"):(o=h.stateNode,c=h.memoizedProps.style,y=c!=null&&c.hasOwnProperty("display")?c.display:null,o.style.display=Wa("display",y))}catch(v){fe(e,e.return,v)}}}else if(h.tag===6){if(m===null)try{h.stateNode.nodeValue=f?"":h.memoizedProps}catch(v){fe(e,e.return,v)}}else if((h.tag!==22&&h.tag!==23||h.memoizedState===null||h===e)&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;h.sibling===null;){if(h.return===null||h.return===e)break e;m===h&&(m=null),h=h.return}m===h&&(m=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:Ye(t,e),nt(e),i&4&&la(e);break;case 21:break;default:Ye(t,e),nt(e)}}function nt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(du(r)){var i=r;break e}r=r.return}throw Error(U(160))}switch(i.tag){case 5:var a=i.stateNode;i.flags&32&&(ii(a,""),i.flags&=-33);var d=oa(e);oo(e,d,a);break;case 3:case 4:var y=i.stateNode.containerInfo,o=oa(e);no(e,o,y);break;default:throw Error(U(161))}}catch(c){fe(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Kd(e,t,r){X=e,pu(e)}function pu(e,t,r){for(var i=(e.mode&1)!==0;X!==null;){var a=X,d=a.child;if(a.tag===22&&i){var y=a.memoizedState!==null||Wi;if(!y){var o=a.alternate,c=o!==null&&o.memoizedState!==null||xe;o=Wi;var f=xe;if(Wi=y,(xe=c)&&!f)for(X=a;X!==null;)y=X,c=y.child,y.tag===22&&y.memoizedState!==null?ua(a):c!==null?(c.return=y,X=c):ua(a);for(;d!==null;)X=d,pu(d),d=d.sibling;X=a,Wi=o,xe=f}aa(e)}else a.subtreeFlags&8772&&d!==null?(d.return=a,X=d):aa(e)}}function aa(e){for(;X!==null;){var t=X;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:xe||Ms(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!xe)if(r===null)i.componentDidMount();else{var a=t.elementType===t.type?r.memoizedProps:Je(t.type,r.memoizedProps);i.componentDidUpdate(a,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var d=t.updateQueue;d!==null&&Vl(t,d,i);break;case 3:var y=t.updateQueue;if(y!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Vl(t,y,r)}break;case 5:var o=t.stateNode;if(r===null&&t.flags&4){r=o;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&r.focus();break;case"img":c.src&&(r.src=c.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var f=t.alternate;if(f!==null){var m=f.memoizedState;if(m!==null){var h=m.dehydrated;h!==null&&li(h)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(U(163))}xe||t.flags&512&&so(t)}catch(p){fe(t,t.return,p)}}if(t===e){X=null;break}if(r=t.sibling,r!==null){r.return=t.return,X=r;break}X=t.return}}function ca(e){for(;X!==null;){var t=X;if(t===e){X=null;break}var r=t.sibling;if(r!==null){r.return=t.return,X=r;break}X=t.return}}function ua(e){for(;X!==null;){var t=X;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{Ms(4,t)}catch(c){fe(t,r,c)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var a=t.return;try{i.componentDidMount()}catch(c){fe(t,a,c)}}var d=t.return;try{so(t)}catch(c){fe(t,d,c)}break;case 5:var y=t.return;try{so(t)}catch(c){fe(t,y,c)}}}catch(c){fe(t,t.return,c)}if(t===e){X=null;break}var o=t.sibling;if(o!==null){o.return=t.return,X=o;break}X=t.return}}var Vd=Math.ceil,ys=St.ReactCurrentDispatcher,Xo=St.ReactCurrentOwner,Ge=St.ReactCurrentBatchConfig,te=0,ye=null,pe=null,we=0,Ne=0,_r=Wt(0),me=0,mi=null,Jt=0,Os=0,Qo=0,ei=null,Be=null,Yo=0,Lr=1/0,ut=null,Cs=!1,lo=null,Mt=null,zi=!1,Dt=null,ws=0,ti=0,ao=null,Ji=-1,Zi=0;function Re(){return te&6?_e():Ji!==-1?Ji:Ji=_e()}function Ot(e){return e.mode&1?te&2&&we!==0?we&-we:Rd.transition!==null?(Zi===0&&(Zi=Za()),Zi):(e=re,e!==0||(e=window.event,e=e===void 0?16:oc(e.type)),e):1}function rt(e,t,r,i){if(50<ti)throw ti=0,ao=null,Error(U(185));yi(e,r,i),(!(te&2)||e!==ye)&&(e===ye&&(!(te&2)&&(Os|=r),me===4&&xt(e,we)),He(e,i),r===1&&te===0&&!(t.mode&1)&&(Lr=_e()+500,Ps&&zt()))}function He(e,t){var r=e.callbackNode;Rh(e,t);var i=ns(e,e===ye?we:0);if(i===0)r!==null&&Sl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&Sl(r),t===1)e.tag===0?Dd(ha.bind(null,e)):bc(ha.bind(null,e)),kd(function(){!(te&6)&&zt()}),r=null;else{switch(ec(i)){case 1:r=Eo;break;case 4:r=Ya;break;case 16:r=ss;break;case 536870912:r=Ja;break;default:r=ss}r=Eu(r,vu.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function vu(e,t){if(Ji=-1,Zi=0,te&6)throw Error(U(327));var r=e.callbackNode;if(yr()&&e.callbackNode!==r)return null;var i=ns(e,e===ye?we:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=Es(e,i);else{t=i;var a=te;te|=2;var d=mu();(ye!==e||we!==t)&&(ut=null,Lr=_e()+500,qt(e,t));do try{Xd();break}catch(o){gu(e,o)}while(!0);Io(),ys.current=d,te=a,pe!==null?t=0:(ye=null,we=0,t=me)}if(t!==0){if(t===2&&(a=On(e),a!==0&&(i=a,t=co(e,a))),t===1)throw r=mi,qt(e,0),xt(e,i),He(e,_e()),r;if(t===6)xt(e,i);else{if(a=e.current.alternate,!(i&30)&&!qd(a)&&(t=Es(e,i),t===2&&(d=On(e),d!==0&&(i=d,t=co(e,d))),t===1))throw r=mi,qt(e,0),xt(e,i),He(e,_e()),r;switch(e.finishedWork=a,e.finishedLanes=i,t){case 0:case 1:throw Error(U(345));case 2:Ut(e,Be,ut);break;case 3:if(xt(e,i),(i&130023424)===i&&(t=Yo+500-_e(),10<t)){if(ns(e,0)!==0)break;if(a=e.suspendedLanes,(a&i)!==i){Re(),e.pingedLanes|=e.suspendedLanes&a;break}e.timeoutHandle=Un(Ut.bind(null,e,Be,ut),t);break}Ut(e,Be,ut);break;case 4:if(xt(e,i),(i&4194240)===i)break;for(t=e.eventTimes,a=-1;0<i;){var y=31-tt(i);d=1<<y,y=t[y],y>a&&(a=y),i&=~d}if(i=a,i=_e()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Vd(i/1960))-i,10<i){e.timeoutHandle=Un(Ut.bind(null,e,Be,ut),i);break}Ut(e,Be,ut);break;case 5:Ut(e,Be,ut);break;default:throw Error(U(329))}}}return He(e,_e()),e.callbackNode===r?vu.bind(null,e):null}function co(e,t){var r=ei;return e.current.memoizedState.isDehydrated&&(qt(e,t).flags|=256),e=Es(e,t),e!==2&&(t=Be,Be=r,t!==null&&uo(t)),e}function uo(e){Be===null?Be=e:Be.push.apply(Be,e)}function qd(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var a=r[i],d=a.getSnapshot;a=a.value;try{if(!it(d(),a))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 xt(e,t){for(t&=~Qo,t&=~Os,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-tt(t),i=1<<r;e[r]=-1,t&=~i}}function ha(e){if(te&6)throw Error(U(327));yr();var t=ns(e,0);if(!(t&1))return He(e,_e()),null;var r=Es(e,t);if(e.tag!==0&&r===2){var i=On(e);i!==0&&(t=i,r=co(e,i))}if(r===1)throw r=mi,qt(e,0),xt(e,t),He(e,_e()),r;if(r===6)throw Error(U(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Ut(e,Be,ut),He(e,_e()),null}function Jo(e,t){var r=te;te|=1;try{return e(t)}finally{te=r,te===0&&(Lr=_e()+500,Ps&&zt())}}function Zt(e){Dt!==null&&Dt.tag===0&&!(te&6)&&yr();var t=te;te|=1;var r=Ge.transition,i=re;try{if(Ge.transition=null,re=1,e)return e()}finally{re=i,Ge.transition=r,te=t,!(te&6)&&zt()}}function Zo(){Ne=_r.current,oe(_r)}function qt(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Ed(r)),pe!==null)for(r=pe.return;r!==null;){var i=r;switch(Bo(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&us();break;case 3:br(),oe(Oe),oe(Le),jo();break;case 5:zo(i);break;case 4:br();break;case 13:oe(ce);break;case 19:oe(ce);break;case 10:Ho(i.type._context);break;case 22:case 23:Zo()}r=r.return}if(ye=e,pe=e=It(e.current,null),we=Ne=t,me=0,mi=null,Qo=Os=Jt=0,Be=ei=null,Kt!==null){for(t=0;t<Kt.length;t++)if(r=Kt[t],i=r.interleaved,i!==null){r.interleaved=null;var a=i.next,d=r.pending;if(d!==null){var y=d.next;d.next=a,i.next=y}r.pending=i}Kt=null}return e}function gu(e,t){do{var r=pe;try{if(Io(),Xi.current=Ss,ms){for(var i=ue.memoizedState;i!==null;){var a=i.queue;a!==null&&(a.pending=null),i=i.next}ms=!1}if(Yt=0,Se=ge=ue=null,Jr=!1,pi=0,Xo.current=null,r===null||r.return===null){me=1,mi=t,pe=null;break}e:{var d=e,y=r.return,o=r,c=t;if(t=we,o.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=c,m=o,h=m.tag;if(!(m.mode&1)&&(h===0||h===11||h===15)){var p=m.alternate;p?(m.updateQueue=p.updateQueue,m.memoizedState=p.memoizedState,m.lanes=p.lanes):(m.updateQueue=null,m.memoizedState=null)}var S=Jl(y);if(S!==null){S.flags&=-257,Zl(S,y,o,d,t),S.mode&1&&Yl(d,f,t),t=S,c=f;var E=t.updateQueue;if(E===null){var v=new Set;v.add(c),t.updateQueue=v}else E.add(c);break e}else{if(!(t&1)){Yl(d,f,t),el();break e}c=Error(U(426))}}else if(le&&o.mode&1){var u=Jl(y);if(u!==null){!(u.flags&65536)&&(u.flags|=256),Zl(u,y,o,d,t),Mo(xr(c,o));break e}}d=c=xr(c,o),me!==4&&(me=2),ei===null?ei=[d]:ei.push(d),d=y;do{switch(d.tag){case 3:d.flags|=65536,t&=-t,d.lanes|=t;var l=eu(d,c,t);Kl(d,l);break e;case 1:o=c;var s=d.type,n=d.stateNode;if(!(d.flags&128)&&(typeof s.getDerivedStateFromError=="function"||n!==null&&typeof n.componentDidCatch=="function"&&(Mt===null||!Mt.has(n)))){d.flags|=65536,t&=-t,d.lanes|=t;var _=tu(d,o,t);Kl(d,_);break e}}d=d.return}while(d!==null)}yu(r)}catch(C){t=C,pe===r&&r!==null&&(pe=r=r.return);continue}break}while(!0)}function mu(){var e=ys.current;return ys.current=Ss,e===null?Ss:e}function el(){(me===0||me===3||me===2)&&(me=4),ye===null||!(Jt&268435455)&&!(Os&268435455)||xt(ye,we)}function Es(e,t){var r=te;te|=2;var i=mu();(ye!==e||we!==t)&&(ut=null,qt(e,t));do try{Gd();break}catch(a){gu(e,a)}while(!0);if(Io(),te=r,ys.current=i,pe!==null)throw Error(U(261));return ye=null,we=0,me}function Gd(){for(;pe!==null;)Su(pe)}function Xd(){for(;pe!==null&&!yh();)Su(pe)}function Su(e){var t=wu(e.alternate,e,Ne);e.memoizedProps=e.pendingProps,t===null?yu(e):pe=t,Xo.current=null}function yu(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=jd(r,t),r!==null){r.flags&=32767,pe=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{me=6,pe=null;return}}else if(r=zd(r,t,Ne),r!==null){pe=r;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);me===0&&(me=5)}function Ut(e,t,r){var i=re,a=Ge.transition;try{Ge.transition=null,re=1,Qd(e,t,r,i)}finally{Ge.transition=a,re=i}return null}function Qd(e,t,r,i){do yr();while(Dt!==null);if(te&6)throw Error(U(327));r=e.finishedWork;var a=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(U(177));e.callbackNode=null,e.callbackPriority=0;var d=r.lanes|r.childLanes;if(Th(e,d),e===ye&&(pe=ye=null,we=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||zi||(zi=!0,Eu(ss,function(){return yr(),null})),d=(r.flags&15990)!==0,r.subtreeFlags&15990||d){d=Ge.transition,Ge.transition=null;var y=re;re=1;var o=te;te|=4,Xo.current=null,$d(e,r),_u(r,e),vd(zn),os=!!Wn,zn=Wn=null,e.current=r,Kd(r),Ch(),te=o,re=y,Ge.transition=d}else e.current=r;if(zi&&(zi=!1,Dt=e,ws=a),d=e.pendingLanes,d===0&&(Mt=null),kh(r.stateNode),He(e,_e()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)a=t[r],i(a.value,{componentStack:a.stack,digest:a.digest});if(Cs)throw Cs=!1,e=lo,lo=null,e;return ws&1&&e.tag!==0&&yr(),d=e.pendingLanes,d&1?e===ao?ti++:(ti=0,ao=e):ti=0,zt(),null}function yr(){if(Dt!==null){var e=ec(ws),t=Ge.transition,r=re;try{if(Ge.transition=null,re=16>e?16:e,Dt===null)var i=!1;else{if(e=Dt,Dt=null,ws=0,te&6)throw Error(U(331));var a=te;for(te|=4,X=e.current;X!==null;){var d=X,y=d.child;if(X.flags&16){var o=d.deletions;if(o!==null){for(var c=0;c<o.length;c++){var f=o[c];for(X=f;X!==null;){var m=X;switch(m.tag){case 0:case 11:case 15:Zr(8,m,d)}var h=m.child;if(h!==null)h.return=m,X=h;else for(;X!==null;){m=X;var p=m.sibling,S=m.return;if(hu(m),m===f){X=null;break}if(p!==null){p.return=S,X=p;break}X=S}}}var E=d.alternate;if(E!==null){var v=E.child;if(v!==null){E.child=null;do{var u=v.sibling;v.sibling=null,v=u}while(v!==null)}}X=d}}if(d.subtreeFlags&2064&&y!==null)y.return=d,X=y;else e:for(;X!==null;){if(d=X,d.flags&2048)switch(d.tag){case 0:case 11:case 15:Zr(9,d,d.return)}var l=d.sibling;if(l!==null){l.return=d.return,X=l;break e}X=d.return}}var s=e.current;for(X=s;X!==null;){y=X;var n=y.child;if(y.subtreeFlags&2064&&n!==null)n.return=y,X=n;else e:for(y=s;X!==null;){if(o=X,o.flags&2048)try{switch(o.tag){case 0:case 11:case 15:Ms(9,o)}}catch(C){fe(o,o.return,C)}if(o===y){X=null;break e}var _=o.sibling;if(_!==null){_.return=o.return,X=_;break e}X=o.return}}if(te=a,zt(),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(xs,e)}catch{}i=!0}return i}finally{re=r,Ge.transition=t}}return!1}function da(e,t,r){t=xr(r,t),t=eu(e,t,1),e=Bt(e,t,1),t=Re(),e!==null&&(yi(e,1,t),He(e,t))}function fe(e,t,r){if(e.tag===3)da(e,e,r);else for(;t!==null;){if(t.tag===3){da(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Mt===null||!Mt.has(i))){e=xr(r,e),e=tu(t,e,1),t=Bt(t,e,1),e=Re(),t!==null&&(yi(t,1,e),He(t,e));break}}t=t.return}}function Yd(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=Re(),e.pingedLanes|=e.suspendedLanes&r,ye===e&&(we&r)===r&&(me===4||me===3&&(we&130023424)===we&&500>_e()-Yo?qt(e,0):Qo|=r),He(e,t)}function Cu(e,t){t===0&&(e.mode&1?(t=Pi,Pi<<=1,!(Pi&130023424)&&(Pi=4194304)):t=1);var r=Re();e=gt(e,t),e!==null&&(yi(e,t,r),He(e,r))}function Jd(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),Cu(e,r)}function Zd(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,a=e.memoizedState;a!==null&&(r=a.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(U(314))}i!==null&&i.delete(t),Cu(e,r)}var wu;wu=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Oe.current)Me=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return Me=!1,Wd(e,t,r);Me=!!(e.flags&131072)}else Me=!1,le&&t.flags&1048576&&xc(t,fs,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Yi(e,t),e=t.pendingProps;var a=wr(t,Le.current);Sr(t,r),a=$o(null,t,i,e,a,r);var d=Ko();return t.flags|=1,typeof a=="object"&&a!==null&&typeof a.render=="function"&&a.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ie(i)?(d=!0,hs(t)):d=!1,t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,Fo(t),a.updater=Bs,t.stateNode=a,a._reactInternals=t,Qn(t,i,e,r),t=Zn(null,t,i,!0,d,r)):(t.tag=0,le&&d&&Ao(t),De(null,t,a,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Yi(e,t),e=t.pendingProps,a=i._init,i=a(i._payload),t.type=i,a=t.tag=tf(i),e=Je(i,e),a){case 0:t=Jn(null,t,i,e,r);break e;case 1:t=ra(null,t,i,e,r);break e;case 11:t=ea(null,t,i,e,r);break e;case 14:t=ta(null,t,i,Je(i.type,e),r);break e}throw Error(U(306,i,""))}return t;case 0:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Je(i,a),Jn(e,t,i,a,r);case 1:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Je(i,a),ra(e,t,i,a,r);case 3:e:{if(nu(t),e===null)throw Error(U(387));i=t.pendingProps,d=t.memoizedState,a=d.element,Ac(e,t),vs(t,i,null,r);var y=t.memoizedState;if(i=y.element,d.isDehydrated)if(d={element:i,isDehydrated:!1,cache:y.cache,pendingSuspenseBoundaries:y.pendingSuspenseBoundaries,transitions:y.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){a=xr(Error(U(423)),t),t=ia(e,t,i,r,a);break e}else if(i!==a){a=xr(Error(U(424)),t),t=ia(e,t,i,r,a);break e}else for(Fe=At(t.stateNode.containerInfo.firstChild),We=t,le=!0,et=null,r=Tc(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Er(),i===a){t=mt(e,t,r);break e}De(e,t,i,r)}t=t.child}return t;case 5:return Bc(t),e===null&&qn(t),i=t.type,a=t.pendingProps,d=e!==null?e.memoizedProps:null,y=a.children,jn(i,a)?y=null:d!==null&&jn(i,d)&&(t.flags|=32),su(e,t),De(e,t,y,r),t.child;case 6:return e===null&&qn(t),null;case 13:return ou(e,t,r);case 4:return Wo(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=kr(t,null,i,r):De(e,t,i,r),t.child;case 11:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Je(i,a),ea(e,t,i,a,r);case 7:return De(e,t,t.pendingProps,r),t.child;case 8:return De(e,t,t.pendingProps.children,r),t.child;case 12:return De(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,a=t.pendingProps,d=t.memoizedProps,y=a.value,se(_s,i._currentValue),i._currentValue=y,d!==null)if(it(d.value,y)){if(d.children===a.children&&!Oe.current){t=mt(e,t,r);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var o=d.dependencies;if(o!==null){y=d.child;for(var c=o.firstContext;c!==null;){if(c.context===i){if(d.tag===1){c=_t(-1,r&-r),c.tag=2;var f=d.updateQueue;if(f!==null){f=f.shared;var m=f.pending;m===null?c.next=c:(c.next=m.next,m.next=c),f.pending=c}}d.lanes|=r,c=d.alternate,c!==null&&(c.lanes|=r),Gn(d.return,r,t),o.lanes|=r;break}c=c.next}}else if(d.tag===10)y=d.type===t.type?null:d.child;else if(d.tag===18){if(y=d.return,y===null)throw Error(U(341));y.lanes|=r,o=y.alternate,o!==null&&(o.lanes|=r),Gn(y,r,t),y=d.sibling}else y=d.child;if(y!==null)y.return=d;else for(y=d;y!==null;){if(y===t){y=null;break}if(d=y.sibling,d!==null){d.return=y.return,y=d;break}y=y.return}d=y}De(e,t,a.children,r),t=t.child}return t;case 9:return a=t.type,i=t.pendingProps.children,Sr(t,r),a=Xe(a),i=i(a),t.flags|=1,De(e,t,i,r),t.child;case 14:return i=t.type,a=Je(i,t.pendingProps),a=Je(i.type,a),ta(e,t,i,a,r);case 15:return ru(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,a=t.pendingProps,a=t.elementType===i?a:Je(i,a),Yi(e,t),t.tag=1,Ie(i)?(e=!0,hs(t)):e=!1,Sr(t,r),Zc(t,i,a),Qn(t,i,a,r),Zn(null,t,i,!0,e,r);case 19:return lu(e,t,r);case 22:return iu(e,t,r)}throw Error(U(156,t.tag))};function Eu(e,t){return Qa(e,t)}function ef(e,t,r,i){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function qe(e,t,r,i){return new ef(e,t,r,i)}function tl(e){return e=e.prototype,!(!e||!e.isReactComponent)}function tf(e){if(typeof e=="function")return tl(e)?1:0;if(e!=null){if(e=e.$$typeof,e===yo)return 11;if(e===Co)return 14}return 2}function It(e,t){var r=e.alternate;return r===null?(r=qe(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function es(e,t,r,i,a,d){var y=2;if(i=e,typeof e=="function")tl(e)&&(y=1);else if(typeof e=="string")y=5;else e:switch(e){case sr:return Gt(r.children,a,d,t);case So:y=8,a|=8;break;case yn:return e=qe(12,r,t,a|2),e.elementType=yn,e.lanes=d,e;case Cn:return e=qe(13,r,t,a),e.elementType=Cn,e.lanes=d,e;case wn:return e=qe(19,r,t,a),e.elementType=wn,e.lanes=d,e;case Ba:return Is(r,a,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Pa:y=10;break e;case Aa:y=9;break e;case yo:y=11;break e;case Co:y=14;break e;case Et:y=16,i=null;break e}throw Error(U(130,e==null?e:typeof e,""))}return t=qe(y,r,t,a),t.elementType=e,t.type=i,t.lanes=d,t}function Gt(e,t,r,i){return e=qe(7,e,i,t),e.lanes=r,e}function Is(e,t,r,i){return e=qe(22,e,i,t),e.elementType=Ba,e.lanes=r,e.stateNode={isHidden:!1},e}function vn(e,t,r){return e=qe(6,e,null,t),e.lanes=r,e}function gn(e,t,r){return t=qe(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function rf(e,t,r,i,a){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qs(0),this.expirationTimes=Qs(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qs(0),this.identifierPrefix=i,this.onRecoverableError=a,this.mutableSourceEagerHydrationData=null}function rl(e,t,r,i,a,d,y,o,c){return e=new rf(e,t,r,o,c),t===1?(t=1,d===!0&&(t|=8)):t=0,d=qe(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fo(d),e}function sf(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:ir,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function ku(e){if(!e)return Nt;e=e._reactInternals;e:{if(tr(e)!==e||e.tag!==1)throw Error(U(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ie(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(U(171))}if(e.tag===1){var r=e.type;if(Ie(r))return kc(e,r,t)}return t}function bu(e,t,r,i,a,d,y,o,c){return e=rl(r,i,!0,e,a,d,y,o,c),e.context=ku(null),r=e.current,i=Re(),a=Ot(r),d=_t(i,a),d.callback=t??null,Bt(r,d,a),e.current.lanes=a,yi(e,a,i),He(e,i),e}function Hs(e,t,r,i){var a=t.current,d=Re(),y=Ot(a);return r=ku(r),t.context===null?t.context=r:t.pendingContext=r,t=_t(d,y),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Bt(a,t,y),e!==null&&(rt(e,a,y,d),Gi(e,a,y)),y}function ks(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function fa(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function il(e,t){fa(e,t),(e=e.alternate)&&fa(e,t)}function nf(){return null}var xu=typeof reportError=="function"?reportError:function(e){console.error(e)};function sl(e){this._internalRoot=e}Ns.prototype.render=sl.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(U(409));Hs(e,t,null,null)};Ns.prototype.unmount=sl.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zt(function(){Hs(null,e,null,null)}),t[vt]=null}};function Ns(e){this._internalRoot=e}Ns.prototype.unstable_scheduleHydration=function(e){if(e){var t=ic();e={blockedOn:null,target:e,priority:t};for(var r=0;r<bt.length&&t!==0&&t<bt[r].priority;r++);bt.splice(r,0,e),r===0&&nc(e)}};function nl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Fs(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function _a(){}function of(e,t,r,i,a){if(a){if(typeof i=="function"){var d=i;i=function(){var f=ks(y);d.call(f)}}var y=bu(t,i,e,0,null,!1,!1,"",_a);return e._reactRootContainer=y,e[vt]=y.current,ui(e.nodeType===8?e.parentNode:e),Zt(),y}for(;a=e.lastChild;)e.removeChild(a);if(typeof i=="function"){var o=i;i=function(){var f=ks(c);o.call(f)}}var c=rl(e,0,!1,null,null,!1,!1,"",_a);return e._reactRootContainer=c,e[vt]=c.current,ui(e.nodeType===8?e.parentNode:e),Zt(function(){Hs(t,c,r,i)}),c}function Ws(e,t,r,i,a){var d=r._reactRootContainer;if(d){var y=d;if(typeof a=="function"){var o=a;a=function(){var c=ks(y);o.call(c)}}Hs(t,y,e,a)}else y=of(r,t,e,a,i);return ks(y)}tc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Kr(t.pendingLanes);r!==0&&(ko(t,r|1),He(t,_e()),!(te&6)&&(Lr=_e()+500,zt()))}break;case 13:Zt(function(){var i=gt(e,1);if(i!==null){var a=Re();rt(i,e,1,a)}}),il(e,1)}};bo=function(e){if(e.tag===13){var t=gt(e,134217728);if(t!==null){var r=Re();rt(t,e,134217728,r)}il(e,134217728)}};rc=function(e){if(e.tag===13){var t=Ot(e),r=gt(e,t);if(r!==null){var i=Re();rt(r,e,t,i)}il(e,t)}};ic=function(){return re};sc=function(e,t){var r=re;try{return re=e,t()}finally{re=r}};An=function(e,t,r){switch(t){case"input":if(bn(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var a=Ts(i);if(!a)throw Error(U(90));Oa(i),bn(i,a)}}}break;case"textarea":Ha(e,r);break;case"select":t=r.value,t!=null&&pr(e,!!r.multiple,t,!1)}};$a=Jo;Ka=Zt;var lf={usingClientEntryPoint:!1,Events:[wi,ar,Ts,ja,Ua,Jo]},jr={findFiberByHostInstance:$t,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},af={bundleType:jr.bundleType,version:jr.version,rendererPackageName:jr.rendererPackageName,rendererConfig:jr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:St.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Ga(e),e===null?null:e.stateNode},findFiberByHostInstance:jr.findFiberByHostInstance||nf,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ji=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ji.isDisabled&&ji.supportsFiber)try{xs=ji.inject(af),at=ji}catch{}}je.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lf;je.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!nl(t))throw Error(U(200));return sf(e,t,null,r)};je.createRoot=function(e,t){if(!nl(e))throw Error(U(299));var r=!1,i="",a=xu;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=rl(e,1,!1,null,null,r,!1,i,a),e[vt]=t.current,ui(e.nodeType===8?e.parentNode:e),new sl(t)};je.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(U(188)):(e=Object.keys(e).join(","),Error(U(268,e)));return e=Ga(t),e=e===null?null:e.stateNode,e};je.flushSync=function(e){return Zt(e)};je.hydrate=function(e,t,r){if(!Fs(t))throw Error(U(200));return Ws(null,e,t,!0,r)};je.hydrateRoot=function(e,t,r){if(!nl(e))throw Error(U(405));var i=r!=null&&r.hydratedSources||null,a=!1,d="",y=xu;if(r!=null&&(r.unstable_strictMode===!0&&(a=!0),r.identifierPrefix!==void 0&&(d=r.identifierPrefix),r.onRecoverableError!==void 0&&(y=r.onRecoverableError)),t=bu(t,null,e,1,r??null,a,!1,d,y),e[vt]=t.current,ui(e),i)for(e=0;e<i.length;e++)r=i[e],a=r._getVersion,a=a(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,a]:t.mutableSourceEagerHydrationData.push(r,a);return new Ns(t)};je.render=function(e,t,r){if(!Fs(t))throw Error(U(200));return Ws(null,e,t,!1,r)};je.unmountComponentAtNode=function(e){if(!Fs(e))throw Error(U(40));return e._reactRootContainer?(Zt(function(){Ws(null,null,e,!1,function(){e._reactRootContainer=null,e[vt]=null})}),!0):!1};je.unstable_batchedUpdates=Jo;je.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!Fs(r))throw Error(U(200));if(e==null||e._reactInternals===void 0)throw Error(U(38));return Ws(e,t,r,!1,i)};je.version="18.3.1-next-f1338f8080-20240426";function Lu(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Lu)}catch(e){console.error(e)}}Lu(),La.exports=je;var cf=La.exports,Du,pa=cf;Du=pa.createRoot,pa.hydrateRoot;var Ru={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(globalThis,()=>(()=>{var r={4567:function(y,o,c){var f=this&&this.__decorate||function(s,n,_,C){var w,k=arguments.length,g=k<3?n:C===null?C=Object.getOwnPropertyDescriptor(n,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,n,_,C);else for(var L=s.length-1;L>=0;L--)(w=s[L])&&(g=(k<3?w(g):k>3?w(n,_,g):w(n,_))||g);return k>3&&g&&Object.defineProperty(n,_,g),g},m=this&&this.__param||function(s,n){return function(_,C){n(_,C,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const h=c(9042),p=c(9924),S=c(844),E=c(4725),v=c(2585),u=c(3656);let l=o.AccessibilityManager=class extends S.Disposable{constructor(s,n,_,C){super(),this._terminal=s,this._coreBrowserService=_,this._renderService=C,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let w=0;w<this._terminal.rows;w++)this._rowElements[w]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[w]);if(this._topBoundaryFocusListener=w=>this._handleBoundaryFocus(w,0),this._bottomBoundaryFocusListener=w=>this._handleBoundaryFocus(w,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new p.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(w=>this._handleResize(w.rows))),this.register(this._terminal.onRender(w=>this._refreshRows(w.start,w.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(w=>this._handleChar(w))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
41
41
|
`))),this.register(this._terminal.onA11yTab(w=>this._handleTab(w))),this.register(this._terminal.onKey(w=>this._handleKey(w.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,u.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,S.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(s){for(let n=0;n<s;n++)this._handleChar(" ")}_handleChar(s){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==s&&(this._charsToAnnounce+=s):this._charsToAnnounce+=s,s===`
|
|
42
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(s){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(s)||this._charsToConsume.push(s)}_refreshRows(s,n){this._liveRegionDebouncer.refresh(s,n,this._terminal.rows)}_renderRows(s,n){const _=this._terminal.buffer,C=_.lines.length.toString();for(let w=s;w<=n;w++){const k=_.lines.get(_.ydisp+w),g=[],x=(k==null?void 0:k.translateToString(!0,void 0,void 0,g))||"",T=(_.ydisp+w+1).toString(),B=this._rowElements[w];B&&(x.length===0?(B.innerText=" ",this._rowColumns.set(B,[0,1])):(B.textContent=x,this._rowColumns.set(B,g)),B.setAttribute("aria-posinset",T),B.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(s,n){const _=s.target,C=this._rowElements[n===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(n===0?"1":`${this._terminal.buffer.lines.length}`)||s.relatedTarget!==C)return;let w,k;if(n===0?(w=_,k=this._rowElements.pop(),this._rowContainer.removeChild(k)):(w=this._rowElements.shift(),k=_,this._rowContainer.removeChild(w)),w.removeEventListener("focus",this._topBoundaryFocusListener),k.removeEventListener("focus",this._bottomBoundaryFocusListener),n===0){const g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{const g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(n===0?-1:1),this._rowElements[n===0?1:this._rowElements.length-2].focus(),s.preventDefault(),s.stopImmediatePropagation()}_handleSelectionChange(){var x;if(this._rowElements.length===0)return;const s=document.getSelection();if(!s)return;if(s.isCollapsed)return void(this._rowContainer.contains(s.anchorNode)&&this._terminal.clearSelection());if(!s.anchorNode||!s.focusNode)return void console.error("anchorNode and/or focusNode are null");let n={node:s.anchorNode,offset:s.anchorOffset},_={node:s.focusNode,offset:s.focusOffset};if((n.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||n.node===_.node&&n.offset>_.offset)&&([n,_]=[_,n]),n.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(n={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(n.node))return;const C=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:C,offset:((x=C.textContent)==null?void 0:x.length)??0}),!this._rowContainer.contains(_.node))return;const w=({node:T,offset:B})=>{const O=T instanceof Text?T.parentNode:T;let P=parseInt(O==null?void 0:O.getAttribute("aria-posinset"),10)-1;if(isNaN(P))return console.warn("row is invalid. Race condition?"),null;const N=this._rowColumns.get(O);if(!N)return console.warn("columns is null. Race condition?"),null;let W=B<N.length?N[B]:N.slice(-1)[0]+1;return W>=this._terminal.cols&&(++P,W=0),{row:P,column:W}},k=w(n),g=w(_);if(k&&g){if(k.row>g.row||k.row===g.row&&k.column>=g.column)throw new Error("invalid range");this._terminal.select(k.column,k.row,(g.row-k.row)*this._terminal.cols-k.column+g.column)}}_handleResize(s){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let n=this._rowContainer.children.length;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);for(;this._rowElements.length>s;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const s=this._coreBrowserService.mainDocument.createElement("div");return s.setAttribute("role","listitem"),s.tabIndex=-1,this._refreshRowDimensions(s),s}_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 s=0;s<this._terminal.rows;s++)this._refreshRowDimensions(this._rowElements[s])}}_refreshRowDimensions(s){s.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=l=f([m(1,v.IInstantiationService),m(2,E.ICoreBrowserService),m(3,E.IRenderService)],l)},3614:(y,o)=>{function c(p){return p.replace(/\r?\n/g,"\r")}function f(p,S){return S?"\x1B[200~"+p+"\x1B[201~":p}function m(p,S,E,v){p=f(p=c(p),E.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(p,!0),S.value=""}function h(p,S,E){const v=E.getBoundingClientRect(),u=p.clientX-v.left-10,l=p.clientY-v.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${u}px`,S.style.top=`${l}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=c,o.bracketTextForPaste=f,o.copyHandler=function(p,S){p.clipboardData&&p.clipboardData.setData("text/plain",S.selectionText),p.preventDefault()},o.handlePasteEvent=function(p,S,E,v){p.stopPropagation(),p.clipboardData&&m(p.clipboardData.getData("text/plain"),S,E,v)},o.paste=m,o.moveTextAreaUnderMouseCursor=h,o.rightClickHandler=function(p,S,E,v,u){h(p,S,E),u&&v.rightClickSelect(p),S.value=v.selectionText,S.select()}},7239:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const f=c(1505);o.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(m,h,p){this._css.set(m,h,p)}getCss(m,h){return this._css.get(m,h)}setColor(m,h,p){this._color.set(m,h,p)}getColor(m,h){return this._color.get(m,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,f,m,h){c.addEventListener(f,m,h);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(f,m,h))}}}},3551:function(y,o,c){var f=this&&this.__decorate||function(l,s,n,_){var C,w=arguments.length,k=w<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,n):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,s,n,_);else for(var g=l.length-1;g>=0;g--)(C=l[g])&&(k=(w<3?C(k):w>3?C(s,n,k):C(s,n))||k);return w>3&&k&&Object.defineProperty(s,n,k),k},m=this&&this.__param||function(l,s){return function(n,_){s(n,_,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const h=c(3656),p=c(8460),S=c(844),E=c(2585),v=c(4725);let u=o.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(l,s,n,_,C){super(),this._element=l,this._mouseService=s,this._renderService=n,this._bufferService=_,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)(()=>{var w;this._lastMouseEvent=void 0,(w=this._activeProviderReplies)==null||w.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(l){this._lastMouseEvent=l;const s=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const n=l.composedPath();for(let _=0;_<n.length;_++){const C=n[_];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,s){var _,C;this._activeProviderReplies&&s||((_=this._activeProviderReplies)==null||_.forEach(w=>{w==null||w.forEach(k=>{k.link.dispose&&k.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=l.y);let n=!1;for(const[w,k]of this._linkProviderService.linkProviders.entries())s?(C=this._activeProviderReplies)!=null&&C.get(w)&&(n=this._checkLinkProviderResult(w,l,n)):k.provideLinks(l.y,g=>{var T,B;if(this._isMouseOut)return;const x=g==null?void 0:g.map(O=>({link:O}));(T=this._activeProviderReplies)==null||T.set(w,x),n=this._checkLinkProviderResult(w,l,n),((B=this._activeProviderReplies)==null?void 0:B.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)})}_removeIntersectingLinks(l,s){const n=new Set;for(let _=0;_<s.size;_++){const C=s.get(_);if(C)for(let w=0;w<C.length;w++){const k=C[w],g=k.link.range.start.y<l?0:k.link.range.start.x,x=k.link.range.end.y>l?this._bufferService.cols:k.link.range.end.x;for(let T=g;T<=x;T++){if(n.has(T)){C.splice(w--,1);break}n.add(T)}}}}_checkLinkProviderResult(l,s,n){var w;if(!this._activeProviderReplies)return n;const _=this._activeProviderReplies.get(l);let C=!1;for(let k=0;k<l;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(C=!0);if(!C&&_){const k=_.find(g=>this._linkAtPosition(g.link,s));k&&(n=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let k=0;k<this._activeProviderReplies.size;k++){const g=(w=this._activeProviderReplies.get(k))==null?void 0:w.find(x=>this._linkAtPosition(x.link,s));if(g){n=!0,this._handleNewLink(g);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._currentLink)return;const s=this._positionFromMouseEvent(l,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,s){this._currentLink&&this._lastMouseEvent&&(!l||!s||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._lastMouseEvent)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(l.link,s)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var n,_;return(_=(n=this._currentLink)==null?void 0:n.state)==null?void 0:_.decorations.pointerCursor},set:n=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",n))}},underline:{get:()=>{var n,_;return(_=(n=this._currentLink)==null?void 0:n.state)==null?void 0:_.decorations.underline},set:n=>{var _,C,w;(_=this._currentLink)!=null&&_.state&&((w=(C=this._currentLink)==null?void 0:C.state)==null?void 0:w.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,n))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(n=>{if(!this._currentLink)return;const _=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(_,C),this._lastMouseEvent)){const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._askForLink(w,!1)}})))}_linkHover(l,s,n){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&l.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(n,s.text)}_fireUnderlineEvent(l,s){const n=l.range,_=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-_-1,n.end.x,n.end.y-_-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(l,s,n){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&l.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(n,s.text)}_linkAtPosition(l,s){const n=l.range.start.y*this._bufferService.cols+l.range.start.x,_=l.range.end.y*this._bufferService.cols+l.range.end.x,C=s.y*this._bufferService.cols+s.x;return n<=C&&C<=_}_positionFromMouseEvent(l,s,n){const _=n.getCoords(l,s,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,s,n,_,C){return{x1:l,y1:s,x2:n,y2:_,cols:this._bufferService.cols,fg:C}}};o.Linkifier=u=f([m(1,v.IMouseService),m(2,v.IRenderService),m(3,E.IBufferService),m(4,v.ILinkProviderService)],u)},9042:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(y,o,c){var f=this&&this.__decorate||function(v,u,l,s){var n,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,l,s);else for(var w=v.length-1;w>=0;w--)(n=v[w])&&(C=(_<3?n(C):_>3?n(u,l,C):n(u,l))||C);return _>3&&C&&Object.defineProperty(u,l,C),C},m=this&&this.__param||function(v,u){return function(l,s){u(l,s,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const h=c(511),p=c(2585);let S=o.OscLinkProvider=class{constructor(v,u,l){this._bufferService=v,this._optionsService=u,this._oscLinkService=l}provideLinks(v,u){var x;const l=this._bufferService.buffer.lines.get(v-1);if(!l)return void u(void 0);const s=[],n=this._optionsService.rawOptions.linkHandler,_=new h.CellData,C=l.getTrimmedLength();let w=-1,k=-1,g=!1;for(let T=0;T<C;T++)if(k!==-1||l.hasContent(T)){if(l.loadCell(T,_),_.hasExtendedAttrs()&&_.extended.urlId){if(k===-1){k=T,w=_.extended.urlId;continue}g=_.extended.urlId!==w}else k!==-1&&(g=!0);if(g||k!==-1&&T===C-1){const B=(x=this._oscLinkService.getLinkData(w))==null?void 0:x.uri;if(B){const O={start:{x:k+1,y:v},end:{x:T+(g||T!==C-1?0:1),y:v}};let P=!1;if(!(n!=null&&n.allowNonHttpProtocols))try{const N=new URL(B);["http:","https:"].includes(N.protocol)||(P=!0)}catch{P=!0}P||s.push({text:B,range:O,activate:(N,W)=>n?n.activate(N,W,O):E(0,W),hover:(N,W)=>{var U;return(U=n==null?void 0:n.hover)==null?void 0:U.call(n,N,W,O)},leave:(N,W)=>{var U;return(U=n==null?void 0:n.leave)==null?void 0:U.call(n,N,W,O)}})}g=!1,_.hasExtendedAttrs()&&_.extended.urlId?(k=T,w=_.extended.urlId):(k=-1,w=-1)}}u(s)}};function E(v,u){if(confirm(`Do you want to navigate to ${u}?
|
|
42
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=h.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(s){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(s)||this._charsToConsume.push(s)}_refreshRows(s,n){this._liveRegionDebouncer.refresh(s,n,this._terminal.rows)}_renderRows(s,n){const _=this._terminal.buffer,C=_.lines.length.toString();for(let w=s;w<=n;w++){const k=_.lines.get(_.ydisp+w),g=[],L=(k==null?void 0:k.translateToString(!0,void 0,void 0,g))||"",R=(_.ydisp+w+1).toString(),A=this._rowElements[w];A&&(L.length===0?(A.innerText=" ",this._rowColumns.set(A,[0,1])):(A.textContent=L,this._rowColumns.set(A,g)),A.setAttribute("aria-posinset",R),A.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(s,n){const _=s.target,C=this._rowElements[n===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(n===0?"1":`${this._terminal.buffer.lines.length}`)||s.relatedTarget!==C)return;let w,k;if(n===0?(w=_,k=this._rowElements.pop(),this._rowContainer.removeChild(k)):(w=this._rowElements.shift(),k=_,this._rowContainer.removeChild(w)),w.removeEventListener("focus",this._topBoundaryFocusListener),k.removeEventListener("focus",this._bottomBoundaryFocusListener),n===0){const g=this._createAccessibilityTreeNode();this._rowElements.unshift(g),this._rowContainer.insertAdjacentElement("afterbegin",g)}else{const g=this._createAccessibilityTreeNode();this._rowElements.push(g),this._rowContainer.appendChild(g)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(n===0?-1:1),this._rowElements[n===0?1:this._rowElements.length-2].focus(),s.preventDefault(),s.stopImmediatePropagation()}_handleSelectionChange(){var L;if(this._rowElements.length===0)return;const s=document.getSelection();if(!s)return;if(s.isCollapsed)return void(this._rowContainer.contains(s.anchorNode)&&this._terminal.clearSelection());if(!s.anchorNode||!s.focusNode)return void console.error("anchorNode and/or focusNode are null");let n={node:s.anchorNode,offset:s.anchorOffset},_={node:s.focusNode,offset:s.focusOffset};if((n.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||n.node===_.node&&n.offset>_.offset)&&([n,_]=[_,n]),n.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(n={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(n.node))return;const C=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:C,offset:((L=C.textContent)==null?void 0:L.length)??0}),!this._rowContainer.contains(_.node))return;const w=({node:R,offset:A})=>{const M=R instanceof Text?R.parentNode:R;let T=parseInt(M==null?void 0:M.getAttribute("aria-posinset"),10)-1;if(isNaN(T))return console.warn("row is invalid. Race condition?"),null;const N=this._rowColumns.get(M);if(!N)return console.warn("columns is null. Race condition?"),null;let W=A<N.length?N[A]:N.slice(-1)[0]+1;return W>=this._terminal.cols&&(++T,W=0),{row:T,column:W}},k=w(n),g=w(_);if(k&&g){if(k.row>g.row||k.row===g.row&&k.column>=g.column)throw new Error("invalid range");this._terminal.select(k.column,k.row,(g.row-k.row)*this._terminal.cols-k.column+g.column)}}_handleResize(s){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let n=this._rowContainer.children.length;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);for(;this._rowElements.length>s;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const s=this._coreBrowserService.mainDocument.createElement("div");return s.setAttribute("role","listitem"),s.tabIndex=-1,this._refreshRowDimensions(s),s}_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 s=0;s<this._terminal.rows;s++)this._refreshRowDimensions(this._rowElements[s])}}_refreshRowDimensions(s){s.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=l=f([m(1,v.IInstantiationService),m(2,E.ICoreBrowserService),m(3,E.IRenderService)],l)},3614:(y,o)=>{function c(p){return p.replace(/\r?\n/g,"\r")}function f(p,S){return S?"\x1B[200~"+p+"\x1B[201~":p}function m(p,S,E,v){p=f(p=c(p),E.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),E.triggerDataEvent(p,!0),S.value=""}function h(p,S,E){const v=E.getBoundingClientRect(),u=p.clientX-v.left-10,l=p.clientY-v.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${u}px`,S.style.top=`${l}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=c,o.bracketTextForPaste=f,o.copyHandler=function(p,S){p.clipboardData&&p.clipboardData.setData("text/plain",S.selectionText),p.preventDefault()},o.handlePasteEvent=function(p,S,E,v){p.stopPropagation(),p.clipboardData&&m(p.clipboardData.getData("text/plain"),S,E,v)},o.paste=m,o.moveTextAreaUnderMouseCursor=h,o.rightClickHandler=function(p,S,E,v,u){h(p,S,E),u&&v.rightClickSelect(p),S.value=v.selectionText,S.select()}},7239:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const f=c(1505);o.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(m,h,p){this._css.set(m,h,p)}getCss(m,h){return this._css.get(m,h)}setColor(m,h,p){this._color.set(m,h,p)}getColor(m,h){return this._color.get(m,h)}clear(){this._color.clear(),this._css.clear()}}},3656:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,f,m,h){c.addEventListener(f,m,h);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(f,m,h))}}}},3551:function(y,o,c){var f=this&&this.__decorate||function(l,s,n,_){var C,w=arguments.length,k=w<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,n):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,s,n,_);else for(var g=l.length-1;g>=0;g--)(C=l[g])&&(k=(w<3?C(k):w>3?C(s,n,k):C(s,n))||k);return w>3&&k&&Object.defineProperty(s,n,k),k},m=this&&this.__param||function(l,s){return function(n,_){s(n,_,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const h=c(3656),p=c(8460),S=c(844),E=c(2585),v=c(4725);let u=o.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(l,s,n,_,C){super(),this._element=l,this._mouseService=s,this._renderService=n,this._bufferService=_,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)(()=>{var w;this._lastMouseEvent=void 0,(w=this._activeProviderReplies)==null||w.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,h.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,h.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,h.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(l){this._lastMouseEvent=l;const s=this._positionFromMouseEvent(l,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const n=l.composedPath();for(let _=0;_<n.length;_++){const C=n[_];if(C.classList.contains("xterm"))break;if(C.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(l){if(this._activeLine!==l.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(l,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,l)||(this._clearCurrentLink(),this._askForLink(l,!0))}_askForLink(l,s){var _,C;this._activeProviderReplies&&s||((_=this._activeProviderReplies)==null||_.forEach(w=>{w==null||w.forEach(k=>{k.link.dispose&&k.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=l.y);let n=!1;for(const[w,k]of this._linkProviderService.linkProviders.entries())s?(C=this._activeProviderReplies)!=null&&C.get(w)&&(n=this._checkLinkProviderResult(w,l,n)):k.provideLinks(l.y,g=>{var R,A;if(this._isMouseOut)return;const L=g==null?void 0:g.map(M=>({link:M}));(R=this._activeProviderReplies)==null||R.set(w,L),n=this._checkLinkProviderResult(w,l,n),((A=this._activeProviderReplies)==null?void 0:A.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(l.y,this._activeProviderReplies)})}_removeIntersectingLinks(l,s){const n=new Set;for(let _=0;_<s.size;_++){const C=s.get(_);if(C)for(let w=0;w<C.length;w++){const k=C[w],g=k.link.range.start.y<l?0:k.link.range.start.x,L=k.link.range.end.y>l?this._bufferService.cols:k.link.range.end.x;for(let R=g;R<=L;R++){if(n.has(R)){C.splice(w--,1);break}n.add(R)}}}}_checkLinkProviderResult(l,s,n){var w;if(!this._activeProviderReplies)return n;const _=this._activeProviderReplies.get(l);let C=!1;for(let k=0;k<l;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(C=!0);if(!C&&_){const k=_.find(g=>this._linkAtPosition(g.link,s));k&&(n=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let k=0;k<this._activeProviderReplies.size;k++){const g=(w=this._activeProviderReplies.get(k))==null?void 0:w.find(L=>this._linkAtPosition(L.link,s));if(g){n=!0,this._handleNewLink(g);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(l){if(!this._currentLink)return;const s=this._positionFromMouseEvent(l,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(l,this._currentLink.link.text)}_clearCurrentLink(l,s){this._currentLink&&this._lastMouseEvent&&(!l||!s||this._currentLink.link.range.start.y>=l&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,S.disposeArray)(this._linkCacheDisposables))}_handleNewLink(l){if(!this._lastMouseEvent)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(l.link,s)&&(this._currentLink=l,this._currentLink.state={decorations:{underline:l.link.decorations===void 0||l.link.decorations.underline,pointerCursor:l.link.decorations===void 0||l.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,l.link,this._lastMouseEvent),l.link.decorations={},Object.defineProperties(l.link.decorations,{pointerCursor:{get:()=>{var n,_;return(_=(n=this._currentLink)==null?void 0:n.state)==null?void 0:_.decorations.pointerCursor},set:n=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",n))}},underline:{get:()=>{var n,_;return(_=(n=this._currentLink)==null?void 0:n.state)==null?void 0:_.decorations.underline},set:n=>{var _,C,w;(_=this._currentLink)!=null&&_.state&&((w=(C=this._currentLink)==null?void 0:C.state)==null?void 0:w.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(l.link,n))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(n=>{if(!this._currentLink)return;const _=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(_,C),this._lastMouseEvent)){const w=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);w&&this._askForLink(w,!1)}})))}_linkHover(l,s,n){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&l.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(n,s.text)}_fireUnderlineEvent(l,s){const n=l.range,_=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-_-1,n.end.x,n.end.y-_-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(l,s,n){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&l.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(n,s.text)}_linkAtPosition(l,s){const n=l.range.start.y*this._bufferService.cols+l.range.start.x,_=l.range.end.y*this._bufferService.cols+l.range.end.x,C=s.y*this._bufferService.cols+s.x;return n<=C&&C<=_}_positionFromMouseEvent(l,s,n){const _=n.getCoords(l,s,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(l,s,n,_,C){return{x1:l,y1:s,x2:n,y2:_,cols:this._bufferService.cols,fg:C}}};o.Linkifier=u=f([m(1,v.IMouseService),m(2,v.IRenderService),m(3,E.IBufferService),m(4,v.ILinkProviderService)],u)},9042:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(y,o,c){var f=this&&this.__decorate||function(v,u,l,s){var n,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,l,s);else for(var w=v.length-1;w>=0;w--)(n=v[w])&&(C=(_<3?n(C):_>3?n(u,l,C):n(u,l))||C);return _>3&&C&&Object.defineProperty(u,l,C),C},m=this&&this.__param||function(v,u){return function(l,s){u(l,s,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const h=c(511),p=c(2585);let S=o.OscLinkProvider=class{constructor(v,u,l){this._bufferService=v,this._optionsService=u,this._oscLinkService=l}provideLinks(v,u){var L;const l=this._bufferService.buffer.lines.get(v-1);if(!l)return void u(void 0);const s=[],n=this._optionsService.rawOptions.linkHandler,_=new h.CellData,C=l.getTrimmedLength();let w=-1,k=-1,g=!1;for(let R=0;R<C;R++)if(k!==-1||l.hasContent(R)){if(l.loadCell(R,_),_.hasExtendedAttrs()&&_.extended.urlId){if(k===-1){k=R,w=_.extended.urlId;continue}g=_.extended.urlId!==w}else k!==-1&&(g=!0);if(g||k!==-1&&R===C-1){const A=(L=this._oscLinkService.getLinkData(w))==null?void 0:L.uri;if(A){const M={start:{x:k+1,y:v},end:{x:R+(g||R!==C-1?0:1),y:v}};let T=!1;if(!(n!=null&&n.allowNonHttpProtocols))try{const N=new URL(A);["http:","https:"].includes(N.protocol)||(T=!0)}catch{T=!0}T||s.push({text:A,range:M,activate:(N,W)=>n?n.activate(N,W,M):E(0,W),hover:(N,W)=>{var K;return(K=n==null?void 0:n.hover)==null?void 0:K.call(n,N,W,M)},leave:(N,W)=>{var K;return(K=n==null?void 0:n.leave)==null?void 0:K.call(n,N,W,M)}})}g=!1,_.hasExtendedAttrs()&&_.extended.urlId?(k=R,w=_.extended.urlId):(k=-1,w=-1)}}u(s)}};function E(v,u){if(confirm(`Do you want to navigate to ${u}?
|
|
43
43
|
|
|
44
|
-
WARNING: This link could potentially be dangerous`)){const l=window.open();if(l){try{l.opener=null}catch{}l.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=S=f([m(0,p.IBufferService),m(1,p.IOptionsService),m(2,p.IOscLinkService)],S)},6193:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,f){this._renderCallback=c,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(c,f,m){this._rowCount=m,c=c!==void 0?c:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,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 c=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const f=c(3614),m=c(3656),h=c(3551),p=c(9042),S=c(3730),E=c(1680),v=c(3107),u=c(5744),l=c(2950),s=c(1296),n=c(428),_=c(4269),C=c(5114),w=c(8934),k=c(3230),g=c(9312),x=c(4725),T=c(6731),B=c(8055),O=c(8969),P=c(8460),N=c(844),W=c(6114),U=c(8437),q=c(2584),H=c(7399),b=c(5941),D=c(9074),A=c(2585),M=c(5435),z=c(4567),$=c(779);class Y extends O.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(R={}){super(R),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new N.MutableDisposable),this._onCursorMove=this.register(new P.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new P.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new P.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new P.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new P.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new P.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new P.EventEmitter),this._onBlur=this.register(new P.EventEmitter),this._onA11yCharEmitter=this.register(new P.EventEmitter),this._onA11yTabEmitter=this.register(new P.EventEmitter),this._onWillOpen=this.register(new P.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(D.DecorationService),this._instantiationService.setService(A.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance($.LinkProviderService),this._instantiationService.setService(x.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((L,F)=>this.refresh(L,F))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(L=>this._reportWindowsOptions(L))),this.register(this._inputHandler.onColor(L=>this._handleColorEvent(L))),this.register((0,P.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,P.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,P.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,P.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(L=>this._afterResize(L.cols,L.rows))),this.register((0,N.toDisposable)(()=>{var L,F;this._customKeyEventHandler=void 0,(F=(L=this.element)==null?void 0:L.parentNode)==null||F.removeChild(this.element)}))}_handleColorEvent(R){if(this._themeService)for(const L of R){let F,I="";switch(L.index){case 256:F="foreground",I="10";break;case 257:F="background",I="11";break;case 258:F="cursor",I="12";break;default:F="ansi",I="4;"+L.index}switch(L.type){case 0:const K=B.color.toColorRGB(F==="ansi"?this._themeService.colors.ansi[L.index]:this._themeService.colors[F]);this.coreService.triggerDataEvent(`${q.C0.ESC}]${I};${(0,b.toRgbString)(K)}${q.C1_ESCAPED.ST}`);break;case 1:if(F==="ansi")this._themeService.modifyColors(V=>V.ansi[L.index]=B.channels.toColor(...L.color));else{const V=F;this._themeService.modifyColors(Z=>Z[V]=B.channels.toColor(...L.color))}break;case 2:this._themeService.restoreColor(L.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(R){R?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(z.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(R){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var R;return(R=this.textarea)==null?void 0:R.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 R=this.buffer.ybase+this.buffer.y,L=this.buffer.lines.get(R);if(!L)return;const F=Math.min(this.buffer.x,this.cols-1),I=this._renderService.dimensions.css.cell.height,K=L.getWidth(F),V=this._renderService.dimensions.css.cell.width*K,Z=this.buffer.y*this._renderService.dimensions.css.cell.height,he=F*this._renderService.dimensions.css.cell.width;this.textarea.style.left=he+"px",this.textarea.style.top=Z+"px",this.textarea.style.width=V+"px",this.textarea.style.height=I+"px",this.textarea.style.lineHeight=I+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",L=>{this.hasSelection()&&(0,f.copyHandler)(L,this._selectionService)}));const R=L=>(0,f.handlePasteEvent)(L,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",R)),this.register((0,m.addDisposableDomListener)(this.element,"paste",R)),W.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",L=>{L.button===2&&(0,f.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",L=>{(0,f.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),W.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",L=>{L.button===1&&(0,f.moveTextAreaUnderMouseCursor)(L,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",R=>this._keyUp(R),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",R=>this._keyDown(R),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",R=>this._keyPress(R),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",R=>this._compositionHelper.compositionupdate(R))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,m.addDisposableDomListener)(this.textarea,"input",R=>this._inputEvent(R),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(R){var F;if(!R)throw new Error("Terminal requires a parent element.");if(R.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((F=this.element)==null?void 0:F.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=R.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"),R.appendChild(this.element);const L=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),L.appendChild(this._viewportElement),this._viewportScrollArea=this._document.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=this._document.createElement("div"),this.screenElement.classList.add("xterm-screen"),this.register((0,m.addDisposableDomListener)(this.screenElement,"mousemove",I=>this.updateCursorStyle(I))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),L.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),W.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,R.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(x.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",I=>this._handleTextAreaFocus(I))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(n.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(x.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(T.ThemeService),this._instantiationService.setService(x.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(x.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(x.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(I=>this._onRender.fire(I))),this.onResize(I=>this._renderService.resize(I.cols,I.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(l.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(w.MouseService),this._instantiationService.setService(x.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(L);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(I=>this.scrollLines(I.amount,I.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(g.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(x.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(I=>this.scrollLines(I.amount,I.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(I=>this._renderService.handleSelectionChanged(I.start,I.end,I.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(I=>{this.textarea.value=I,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(I=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",I=>this._selectionService.handleMouseDown(I))),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(z.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",I=>this._handleScreenReaderModeOptionChange(I))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",I=>{!this._overviewRulerRenderer&&I&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(s.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const R=this,L=this.element;function F(V){const Z=R._mouseService.getMouseReportCoords(V,R.screenElement);if(!Z)return!1;let he,de;switch(V.overrideType||V.type){case"mousemove":de=32,V.buttons===void 0?(he=3,V.button!==void 0&&(he=V.button<3?V.button:3)):he=1&V.buttons?0:4&V.buttons?1:2&V.buttons?2:3;break;case"mouseup":de=0,he=V.button<3?V.button:3;break;case"mousedown":de=1,he=V.button<3?V.button:3;break;case"wheel":if(R._customWheelEventHandler&&R._customWheelEventHandler(V)===!1||R.viewport.getLinesScrolled(V)===0)return!1;de=V.deltaY<0?0:1,he=4;break;default:return!1}return!(de===void 0||he===void 0||he>4)&&R.coreMouseService.triggerMouseEvent({col:Z.col,row:Z.row,x:Z.x,y:Z.y,button:he,action:de,ctrl:V.ctrlKey,alt:V.altKey,shift:V.shiftKey})}const I={mouseup:null,wheel:null,mousedrag:null,mousemove:null},K={mouseup:V=>(F(V),V.buttons||(this._document.removeEventListener("mouseup",I.mouseup),I.mousedrag&&this._document.removeEventListener("mousemove",I.mousedrag)),this.cancel(V)),wheel:V=>(F(V),this.cancel(V,!0)),mousedrag:V=>{V.buttons&&F(V)},mousemove:V=>{V.buttons||F(V)}};this.register(this.coreMouseService.onProtocolChange(V=>{V?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(V)),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&V?I.mousemove||(L.addEventListener("mousemove",K.mousemove),I.mousemove=K.mousemove):(L.removeEventListener("mousemove",I.mousemove),I.mousemove=null),16&V?I.wheel||(L.addEventListener("wheel",K.wheel,{passive:!1}),I.wheel=K.wheel):(L.removeEventListener("wheel",I.wheel),I.wheel=null),2&V?I.mouseup||(I.mouseup=K.mouseup):(this._document.removeEventListener("mouseup",I.mouseup),I.mouseup=null),4&V?I.mousedrag||(I.mousedrag=K.mousedrag):(this._document.removeEventListener("mousemove",I.mousedrag),I.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(L,"mousedown",V=>{if(V.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(V))return F(V),I.mouseup&&this._document.addEventListener("mouseup",I.mouseup),I.mousedrag&&this._document.addEventListener("mousemove",I.mousedrag),this.cancel(V)})),this.register((0,m.addDisposableDomListener)(L,"wheel",V=>{if(!I.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(V)===!1)return!1;if(!this.buffer.hasScrollback){const Z=this.viewport.getLinesScrolled(V);if(Z===0)return;const he=q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(V.deltaY<0?"A":"B");let de="";for(let Ae=0;Ae<Math.abs(Z);Ae++)de+=he;return this.coreService.triggerDataEvent(de,!0),this.cancel(V,!0)}return this.viewport.handleWheel(V)?this.cancel(V):void 0}},{passive:!1})),this.register((0,m.addDisposableDomListener)(L,"touchstart",V=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(V),this.cancel(V)},{passive:!0})),this.register((0,m.addDisposableDomListener)(L,"touchmove",V=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(V)?void 0:this.cancel(V)},{passive:!1}))}refresh(R,L){var F;(F=this._renderService)==null||F.refreshRows(R,L)}updateCursorStyle(R){var L;(L=this._selectionService)!=null&&L.shouldColumnSelect(R)?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(R,L,F=0){var I;F===1?(super.scrollLines(R,L,F),this.refresh(0,this.rows-1)):(I=this.viewport)==null||I.scrollLines(R)}paste(R){(0,f.paste)(R,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(R){this._customKeyEventHandler=R}attachCustomWheelEventHandler(R){this._customWheelEventHandler=R}registerLinkProvider(R){return this._linkProviderService.registerLinkProvider(R)}registerCharacterJoiner(R){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const L=this._characterJoinerService.register(R);return this.refresh(0,this.rows-1),L}deregisterCharacterJoiner(R){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(R)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(R){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+R)}registerDecoration(R){return this._decorationService.registerDecoration(R)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(R,L,F){this._selectionService.setSelection(R,L,F)}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 R;(R=this._selectionService)==null||R.clearSelection()}selectAll(){var R;(R=this._selectionService)==null||R.selectAll()}selectLines(R,L){var F;(F=this._selectionService)==null||F.selectLines(R,L)}_keyDown(R){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1)return!1;const L=this.browser.isMac&&this.options.macOptionIsMeta&&R.altKey;if(!L&&!this._compositionHelper.keydown(R))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;L||R.key!=="Dead"&&R.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const F=(0,H.evaluateKeyboardEvent)(R,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(R),F.type===3||F.type===2){const I=this.rows-1;return this.scrollLines(F.type===2?-I:I),this.cancel(R,!0)}return F.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,R)||(F.cancel&&this.cancel(R,!0),!F.key||!!(R.key&&!R.ctrlKey&&!R.altKey&&!R.metaKey&&R.key.length===1&&R.key.charCodeAt(0)>=65&&R.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(F.key!==q.C0.ETX&&F.key!==q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:F.key,domEvent:R}),this._showCursor(),this.coreService.triggerDataEvent(F.key,!0),!this.optionsService.rawOptions.screenReaderMode||R.altKey||R.ctrlKey?this.cancel(R,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(R,L){const F=R.isMac&&!this.options.macOptionIsMeta&&L.altKey&&!L.ctrlKey&&!L.metaKey||R.isWindows&&L.altKey&&L.ctrlKey&&!L.metaKey||R.isWindows&&L.getModifierState("AltGraph");return L.type==="keypress"?F:F&&(!L.keyCode||L.keyCode>47)}_keyUp(R){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1||(function(L){return L.keyCode===16||L.keyCode===17||L.keyCode===18}(R)||this.focus(),this.updateCursorStyle(R),this._keyPressHandled=!1)}_keyPress(R){let L;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(R)===!1)return!1;if(this.cancel(R),R.charCode)L=R.charCode;else if(R.which===null||R.which===void 0)L=R.keyCode;else{if(R.which===0||R.charCode===0)return!1;L=R.which}return!(!L||(R.altKey||R.ctrlKey||R.metaKey)&&!this._isThirdLevelShift(this.browser,R)||(L=String.fromCharCode(L),this._onKey.fire({key:L,domEvent:R}),this._showCursor(),this.coreService.triggerDataEvent(L,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(R){if(R.data&&R.inputType==="insertText"&&(!R.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const L=R.data;return this.coreService.triggerDataEvent(L,!0),this.cancel(R),!0}return!1}resize(R,L){R!==this.cols||L!==this.rows?super.resize(R,L):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(R,L){var F,I;(F=this._charSizeService)==null||F.measure(),(I=this.viewport)==null||I.syncScrollArea(!0)}clear(){var R;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 L=1;L<this.rows;L++)this.buffer.lines.push(this.buffer.getBlankLine(U.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(R=this.viewport)==null||R.reset(),this.refresh(0,this.rows-1)}}reset(){var L,F;this.options.rows=this.rows,this.options.cols=this.cols;const R=this._customKeyEventHandler;this._setup(),super.reset(),(L=this._selectionService)==null||L.reset(),this._decorationService.reset(),(F=this.viewport)==null||F.reset(),this._customKeyEventHandler=R,this.refresh(0,this.rows-1)}clearTextureAtlas(){var R;(R=this._renderService)==null||R.clearTextureAtlas()}_reportFocus(){var R;(R=this.element)!=null&&R.classList.contains("focus")?this.coreService.triggerDataEvent(q.C0.ESC+"[I"):this.coreService.triggerDataEvent(q.C0.ESC+"[O")}_reportWindowsOptions(R){if(this._renderService)switch(R){case M.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const L=this._renderService.dimensions.css.canvas.width.toFixed(0),F=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[4;${F};${L}t`);break;case M.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const I=this._renderService.dimensions.css.cell.width.toFixed(0),K=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[6;${K};${I}t`)}}cancel(R,L){if(this.options.cancelEvents||L)return R.preventDefault(),R.stopPropagation(),!1}}o.Terminal=Y},9924:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,f=1e3){this._renderCallback=c,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,f,m){this._rowCount=m,c=c!==void 0?c:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=h-this._lastRefreshMs,S=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,f)}}},1680:function(y,o,c){var f=this&&this.__decorate||function(l,s,n,_){var C,w=arguments.length,k=w<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,n):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,s,n,_);else for(var g=l.length-1;g>=0;g--)(C=l[g])&&(k=(w<3?C(k):w>3?C(s,n,k):C(s,n))||k);return w>3&&k&&Object.defineProperty(s,n,k),k},m=this&&this.__param||function(l,s){return function(n,_){s(n,_,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const h=c(3656),p=c(4725),S=c(8460),E=c(844),v=c(2585);let u=o.Viewport=class extends E.Disposable{constructor(l,s,n,_,C,w,k,g){super(),this._viewportElement=l,this._scrollArea=s,this._bufferService=n,this._optionsService=_,this._charSizeService=C,this._renderService=w,this._coreBrowserService=k,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 S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(x=>this._activeBuffer=x.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(x=>this._renderDimensions=x)),this._handleThemeChange(g.colors),this.register(g.onChangeColors(x=>this._handleThemeChange(x))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(l){this._viewportElement.style.backgroundColor=l.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(l){if(l)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 s=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==s&&(this._lastRecordedBufferHeight=s,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const l=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==l&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=l),this._refreshAnimationFrame=null}syncScrollArea(l=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(l);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(l)}_handleScroll(l){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 s=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:s,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const l=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(l*(this._smoothScrollState.target-this._smoothScrollState.origin)),l<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(l,s){const n=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(s<0&&this._viewportElement.scrollTop!==0||s>0&&n<this._lastRecordedBufferHeight)||(l.cancelable&&l.preventDefault(),!1)}handleWheel(l){const s=this._getPixelsScrolled(l);return s!==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+s:this._smoothScrollState.target+=s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=s,this._bubbleScroll(l,s))}scrollLines(l){if(l!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const s=l*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!1})}_getPixelsScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let s=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_LINE?s*=this._currentRowHeight:l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._currentRowHeight*this._bufferService.rows),s}getBufferElements(l,s){var g;let n,_="";const C=[],w=s??this._bufferService.buffer.lines.length,k=this._bufferService.buffer.lines;for(let x=l;x<w;x++){const T=k.get(x);if(!T)continue;const B=(g=k.get(x+1))==null?void 0:g.isWrapped;if(_+=T.translateToString(!B),!B||x===k.length-1){const O=document.createElement("div");O.textContent=_,C.push(O),_.length>0&&(n=O),_=""}}return{bufferElements:C,cursorElement:n}}getLinesScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let s=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(s/=this._currentRowHeight+0,this._wheelPartialScroll+=s,s=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._bufferService.rows),s}_applyScrollModifier(l,s){const n=this._optionsService.rawOptions.fastScrollModifier;return n==="alt"&&s.altKey||n==="ctrl"&&s.ctrlKey||n==="shift"&&s.shiftKey?l*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:l*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(l){this._lastTouchY=l.touches[0].pageY}handleTouchMove(l){const s=this._lastTouchY-l.touches[0].pageY;return this._lastTouchY=l.touches[0].pageY,s!==0&&(this._viewportElement.scrollTop+=s,this._bubbleScroll(l,s))}};o.Viewport=u=f([m(2,v.IBufferService),m(3,v.IOptionsService),m(4,p.ICharSizeService),m(5,p.IRenderService),m(6,p.ICoreBrowserService),m(7,p.IThemeService)],u)},3107:function(y,o,c){var f=this&&this.__decorate||function(v,u,l,s){var n,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,l,s);else for(var w=v.length-1;w>=0;w--)(n=v[w])&&(C=(_<3?n(C):_>3?n(u,l,C):n(u,l))||C);return _>3&&C&&Object.defineProperty(u,l,C),C},m=this&&this.__param||function(v,u){return function(l,s){u(l,s,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const h=c(4725),p=c(844),S=c(2585);let E=o.BufferDecorationRenderer=class extends p.Disposable{constructor(v,u,l,s,n){super(),this._screenElement=v,this._bufferService=u,this._coreBrowserService=l,this._decorationService=s,this._renderService=n,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(_=>this._removeDecoration(_))),this.register((0,p.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const v of this._decorationService.decorations)this._renderDecoration(v);this._dimensionsChanged=!1}_renderDecoration(v){this._refreshStyle(v),this._dimensionsChanged&&this._refreshXPosition(v)}_createElement(v){var s;const u=this._coreBrowserService.mainDocument.createElement("div");u.classList.add("xterm-decoration"),u.classList.toggle("xterm-decoration-top-layer",((s=v==null?void 0:v.options)==null?void 0:s.layer)==="top"),u.style.width=`${Math.round((v.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,u.style.height=(v.options.height||1)*this._renderService.dimensions.css.cell.height+"px",u.style.top=(v.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",u.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const l=v.options.x??0;return l&&l>this._bufferService.cols&&(u.style.display="none"),this._refreshXPosition(v,u),u}_refreshStyle(v){const u=v.marker.line-this._bufferService.buffers.active.ydisp;if(u<0||u>=this._bufferService.rows)v.element&&(v.element.style.display="none",v.onRenderEmitter.fire(v.element));else{let l=this._decorationElements.get(v);l||(l=this._createElement(v),v.element=l,this._decorationElements.set(v,l),this._container.appendChild(l),v.onDispose(()=>{this._decorationElements.delete(v),l.remove()})),l.style.top=u*this._renderService.dimensions.css.cell.height+"px",l.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(l)}}_refreshXPosition(v,u=v.element){if(!u)return;const l=v.options.x??0;(v.options.anchor||"left")==="right"?u.style.right=l?l*this._renderService.dimensions.css.cell.width+"px":"":u.style.left=l?l*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(v){var u;(u=this._decorationElements.get(v))==null||u.remove(),this._decorationElements.delete(v),v.dispose()}};o.BufferDecorationRenderer=E=f([m(1,S.IBufferService),m(2,h.ICoreBrowserService),m(3,S.IDecorationService),m(4,h.IRenderService)],E)},5871:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.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(c){if(c.options.overviewRulerOptions){for(const f of this._zones)if(f.color===c.options.overviewRulerOptions.color&&f.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,c.marker.line))return;if(this._lineAdjacentToZone(f,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(f,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,f){return f>=c.startBufferLine&&f<=c.endBufferLine}_lineAdjacentToZone(c,f,m){return f>=c.startBufferLine-this._linePadding[m||"full"]&&f<=c.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(c,f){c.startBufferLine=Math.min(c.startBufferLine,f),c.endBufferLine=Math.max(c.endBufferLine,f)}}},5744:function(y,o,c){var f=this&&this.__decorate||function(n,_,C,w){var k,g=arguments.length,x=g<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,C):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(n,_,C,w);else for(var T=n.length-1;T>=0;T--)(k=n[T])&&(x=(g<3?k(x):g>3?k(_,C,x):k(_,C))||x);return g>3&&x&&Object.defineProperty(_,C,x),x},m=this&&this.__param||function(n,_){return function(C,w){_(C,w,n)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const h=c(5871),p=c(4725),S=c(844),E=c(2585),v={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0};let s=o.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(n,_,C,w,k,g,x){var B;super(),this._viewportElement=n,this._screenElement=_,this._bufferService=C,this._decorationService=w,this._renderService=k,this._optionsService=g,this._coreBrowserService=x,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(B=this._viewportElement.parentElement)==null||B.insertBefore(this._canvas,this._viewportElement);const T=this._canvas.getContext("2d");if(!T)throw new Error("Ctx cannot be null");this._ctx=T,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)(()=>{var O;(O=this._canvas)==null||O.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 n=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=n,u.center=_,u.right=n,this._refreshDrawHeightConstants(),l.full=0,l.left=0,l.center=u.left,l.right=u.left+u.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const n=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(n,12),6)*this._coreBrowserService.dpr);v.left=_,v.center=_,v.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const n=this._colorZoneStore.zones;for(const _ of n)_.position!=="full"&&this._renderColorZone(_);for(const _ of n)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(n){this._ctx.fillStyle=n.color,this._ctx.fillRect(l[n.position||"full"],Math.round((this._canvas.height-1)*(n.startBufferLine/this._bufferService.buffers.active.lines.length)-v[n.position||"full"]/2),u[n.position||"full"],Math.round((this._canvas.height-1)*((n.endBufferLine-n.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[n.position||"full"]))}_queueRefresh(n,_){this._shouldUpdateDimensions=n||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};o.OverviewRulerRenderer=s=f([m(2,E.IBufferService),m(3,E.IDecorationService),m(4,p.IRenderService),m(5,E.IOptionsService),m(6,p.ICoreBrowserService)],s)},2950:function(y,o,c){var f=this&&this.__decorate||function(v,u,l,s){var n,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,l,s);else for(var w=v.length-1;w>=0;w--)(n=v[w])&&(C=(_<3?n(C):_>3?n(u,l,C):n(u,l))||C);return _>3&&C&&Object.defineProperty(u,l,C),C},m=this&&this.__param||function(v,u){return function(l,s){u(l,s,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const h=c(4725),p=c(2585),S=c(2584);let E=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,u,l,s,n,_){this._textarea=v,this._compositionView=u,this._bufferService=l,this._optionsService=s,this._coreService=n,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(v){this._compositionView.textContent=v.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(v){if(this._isComposing||this._isSendingComposition){if(v.keyCode===229||v.keyCode===16||v.keyCode===17||v.keyCode===18)return!1;this._finalizeComposition(!1)}return v.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(v){if(this._compositionView.classList.remove("active"),this._isComposing=!1,v){const u={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let l;this._isSendingComposition=!1,u.start+=this._dataAlreadySent.length,l=this._isComposing?this._textarea.value.substring(u.start,u.end):this._textarea.value.substring(u.start),l.length>0&&this._coreService.triggerDataEvent(l,!0)}},0)}else{this._isSendingComposition=!1;const u=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(u,!0)}}_handleAnyTextareaChanges(){const v=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const u=this._textarea.value,l=u.replace(v,"");this._dataAlreadySent=l,u.length>v.length?this._coreService.triggerDataEvent(l,!0):u.length<v.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):u.length===v.length&&u!==v&&this._coreService.triggerDataEvent(u,!0)}},0)}updateCompositionElements(v){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const u=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),l=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,n=u*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=n+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=l+"px",this._compositionView.style.lineHeight=l+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=n+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}v||setTimeout(()=>this.updateCompositionElements(!0),0)}}};o.CompositionHelper=E=f([m(2,p.IBufferService),m(3,p.IOptionsService),m(4,p.ICoreService),m(5,h.IRenderService)],E)},9806:(y,o)=>{function c(f,m,h){const p=h.getBoundingClientRect(),S=f.getComputedStyle(h),E=parseInt(S.getPropertyValue("padding-left")),v=parseInt(S.getPropertyValue("padding-top"));return[m.clientX-p.left-E,m.clientY-p.top-v]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(f,m,h,p,S,E,v,u,l){if(!E)return;const s=c(f,m,h);return s?(s[0]=Math.ceil((s[0]+(l?v/2:0))/v),s[1]=Math.ceil(s[1]/u),s[0]=Math.min(Math.max(s[0],1),p+(l?1:0)),s[1]=Math.min(Math.max(s[1],1),S),s):void 0}},9504:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const f=c(2584);function m(u,l,s,n){const _=u-h(u,s),C=l-h(l,s),w=Math.abs(_-C)-function(k,g,x){let T=0;const B=k-h(k,x),O=g-h(g,x);for(let P=0;P<Math.abs(B-O);P++){const N=p(k,g)==="A"?-1:1,W=x.buffer.lines.get(B+N*P);W!=null&&W.isWrapped&&T++}return T}(u,l,s);return v(w,E(p(u,l),n))}function h(u,l){let s=0,n=l.buffer.lines.get(u),_=n==null?void 0:n.isWrapped;for(;_&&u>=0&&u<l.rows;)s++,n=l.buffer.lines.get(--u),_=n==null?void 0:n.isWrapped;return s}function p(u,l){return u>l?"A":"B"}function S(u,l,s,n,_,C){let w=u,k=l,g="";for(;w!==s||k!==n;)w+=_?1:-1,_&&w>C.cols-1?(g+=C.buffer.translateBufferLineToString(k,!1,u,w),w=0,u=0,k++):!_&&w<0&&(g+=C.buffer.translateBufferLineToString(k,!1,0,u+1),w=C.cols-1,u=w,k--);return g+C.buffer.translateBufferLineToString(k,!1,u,w)}function E(u,l){const s=l?"O":"[";return f.C0.ESC+s+u}function v(u,l){u=Math.floor(u);let s="";for(let n=0;n<u;n++)s+=l;return s}o.moveToCellSequence=function(u,l,s,n){const _=s.buffer.x,C=s.buffer.y;if(!s.buffer.hasScrollback)return function(g,x,T,B,O,P){return m(x,B,O,P).length===0?"":v(S(g,x,g,x-h(x,O),!1,O).length,E("D",P))}(_,C,0,l,s,n)+m(C,l,s,n)+function(g,x,T,B,O,P){let N;N=m(x,B,O,P).length>0?B-h(B,O):x;const W=B,U=function(q,H,b,D,A,M){let z;return z=m(b,D,A,M).length>0?D-h(D,A):H,q<b&&z<=D||q>=b&&z<D?"C":"D"}(g,x,T,B,O,P);return v(S(g,N,T,W,U==="C",O).length,E(U,P))}(_,C,u,l,s,n);let w;if(C===l)return w=_>u?"D":"C",v(Math.abs(_-u),E(w,n));w=C>l?"D":"C";const k=Math.abs(C-l);return v(function(g,x){return x.cols-g}(C>l?u:_,s)+(k-1)*s.cols+1+((C>l?_:u)-1),E(w,n))}},1296:function(y,o,c){var f=this&&this.__decorate||function(P,N,W,U){var q,H=arguments.length,b=H<3?N:U===null?U=Object.getOwnPropertyDescriptor(N,W):U;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(P,N,W,U);else for(var D=P.length-1;D>=0;D--)(q=P[D])&&(b=(H<3?q(b):H>3?q(N,W,b):q(N,W))||b);return H>3&&b&&Object.defineProperty(N,W,b),b},m=this&&this.__param||function(P,N){return function(W,U){N(W,U,P)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const h=c(3787),p=c(2550),S=c(2223),E=c(6171),v=c(6052),u=c(4725),l=c(8055),s=c(8460),n=c(844),_=c(2585),C="xterm-dom-renderer-owner-",w="xterm-rows",k="xterm-fg-",g="xterm-bg-",x="xterm-focus",T="xterm-selection";let B=1,O=o.DomRenderer=class extends n.Disposable{constructor(P,N,W,U,q,H,b,D,A,M,z,$,Y){super(),this._terminal=P,this._document=N,this._element=W,this._screenElement=U,this._viewportElement=q,this._helperContainer=H,this._linkifier2=b,this._charSizeService=A,this._optionsService=M,this._bufferService=z,this._coreBrowserService=$,this._themeService=Y,this._terminalClass=B++,this._rowElements=[],this._selectionRenderModel=(0,v.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new s.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(w),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(T),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Q=>this._injectCss(Q))),this._injectCss(this._themeService.colors),this._rowFactory=D.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Q=>this._handleLinkHover(Q))),this.register(this._linkifier2.onHideLinkUnderline(Q=>this._handleLinkLeave(Q))),this.register((0,n.toDisposable)(()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const P=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*P,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*P),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/P),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/P),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 W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const N=`${this._terminalSelector} .${w} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=N,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(P){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let N=`${this._terminalSelector} .${w} { color: ${P.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;N+=`${this._terminalSelector} .${w} .xterm-dim { color: ${l.color.multiplyOpacity(P.foreground,.5).css};}`,N+=`${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 W=`blink_underline_${this._terminalClass}`,U=`blink_bar_${this._terminalClass}`,q=`blink_block_${this._terminalClass}`;N+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,N+=`@keyframes ${U} { 50% { box-shadow: none; }}`,N+=`@keyframes ${q} { 0% { background-color: ${P.cursor.css}; color: ${P.cursorAccent.css}; } 50% { background-color: inherit; color: ${P.cursor.css}; }}`,N+=`${this._terminalSelector} .${w}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${w}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${U} 1s step-end infinite;}${this._terminalSelector} .${w}.${x} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block { background-color: ${P.cursor.css}; color: ${P.cursorAccent.css};}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${P.cursor.css} !important; color: ${P.cursorAccent.css} !important;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${P.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${P.cursor.css} inset;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${P.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,N+=`${this._terminalSelector} .${T} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${T} div { position: absolute; background-color: ${P.selectionBackgroundOpaque.css};}${this._terminalSelector} .${T} div { position: absolute; background-color: ${P.selectionInactiveBackgroundOpaque.css};}`;for(const[H,b]of P.ansi.entries())N+=`${this._terminalSelector} .${k}${H} { color: ${b.css}; }${this._terminalSelector} .${k}${H}.xterm-dim { color: ${l.color.multiplyOpacity(b,.5).css}; }${this._terminalSelector} .${g}${H} { background-color: ${b.css}; }`;N+=`${this._terminalSelector} .${k}${S.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(P.background).css}; }${this._terminalSelector} .${k}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(P.background),.5).css}; }${this._terminalSelector} .${g}${S.INVERTED_DEFAULT_COLOR} { background-color: ${P.foreground.css}; }`,this._themeStyleElement.textContent=N}_setDefaultSpacing(){const P=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${P}px`,this._rowFactory.defaultSpacing=P}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(P,N){for(let W=this._rowElements.length;W<=N;W++){const U=this._document.createElement("div");this._rowContainer.appendChild(U),this._rowElements.push(U)}for(;this._rowElements.length>N;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(P,N){this._refreshRowElements(P,N),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(P,N,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(P,N,W),this.renderRows(0,this._bufferService.rows-1),!P||!N)return;this._selectionRenderModel.update(this._terminal,P,N,W);const U=this._selectionRenderModel.viewportStartRow,q=this._selectionRenderModel.viewportEndRow,H=this._selectionRenderModel.viewportCappedStartRow,b=this._selectionRenderModel.viewportCappedEndRow;if(H>=this._bufferService.rows||b<0)return;const D=this._document.createDocumentFragment();if(W){const A=P[0]>N[0];D.appendChild(this._createSelectionElement(H,A?N[0]:P[0],A?P[0]:N[0],b-H+1))}else{const A=U===H?P[0]:0,M=H===q?N[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(H,A,M));const z=b-H-1;if(D.appendChild(this._createSelectionElement(H+1,0,this._bufferService.cols,z)),H!==b){const $=q===b?N[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(b,0,$))}}this._selectionContainer.appendChild(D)}_createSelectionElement(P,N,W,U=1){const q=this._document.createElement("div"),H=N*this.dimensions.css.cell.width;let b=this.dimensions.css.cell.width*(W-N);return H+b>this.dimensions.css.canvas.width&&(b=this.dimensions.css.canvas.width-H),q.style.height=U*this.dimensions.css.cell.height+"px",q.style.top=P*this.dimensions.css.cell.height+"px",q.style.left=`${H}px`,q.style.width=`${b}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 P of this._rowElements)P.replaceChildren()}renderRows(P,N){const W=this._bufferService.buffer,U=W.ybase+W.y,q=Math.min(W.x,this._bufferService.cols-1),H=this._optionsService.rawOptions.cursorBlink,b=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;for(let A=P;A<=N;A++){const M=A+W.ydisp,z=this._rowElements[A],$=W.lines.get(M);if(!z||!$)break;z.replaceChildren(...this._rowFactory.createRow($,M,M===U,b,D,q,H,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(P){this._setCellUnderline(P.x1,P.x2,P.y1,P.y2,P.cols,!0)}_handleLinkLeave(P){this._setCellUnderline(P.x1,P.x2,P.y1,P.y2,P.cols,!1)}_setCellUnderline(P,N,W,U,q,H){W<0&&(P=0),U<0&&(N=0);const b=this._bufferService.rows-1;W=Math.max(Math.min(W,b),0),U=Math.max(Math.min(U,b),0),q=Math.min(q,this._bufferService.cols);const D=this._bufferService.buffer,A=D.ybase+D.y,M=Math.min(D.x,q-1),z=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,Y=this._optionsService.rawOptions.cursorInactiveStyle;for(let Q=W;Q<=U;++Q){const R=Q+D.ydisp,L=this._rowElements[Q],F=D.lines.get(R);if(!L||!F)break;L.replaceChildren(...this._rowFactory.createRow(F,R,R===A,$,Y,M,z,this.dimensions.css.cell.width,this._widthCache,H?Q===W?P:0:-1,H?(Q===U?N:q)-1:-1))}}};o.DomRenderer=O=f([m(7,_.IInstantiationService),m(8,u.ICharSizeService),m(9,_.IOptionsService),m(10,_.IBufferService),m(11,u.ICoreBrowserService),m(12,u.IThemeService)],O)},3787:function(y,o,c){var f=this&&this.__decorate||function(w,k,g,x){var T,B=arguments.length,O=B<3?k:x===null?x=Object.getOwnPropertyDescriptor(k,g):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(w,k,g,x);else for(var P=w.length-1;P>=0;P--)(T=w[P])&&(O=(B<3?T(O):B>3?T(k,g,O):T(k,g))||O);return B>3&&O&&Object.defineProperty(k,g,O),O},m=this&&this.__param||function(w,k){return function(g,x){k(g,x,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const h=c(2223),p=c(643),S=c(511),E=c(2585),v=c(8055),u=c(4725),l=c(4269),s=c(6171),n=c(3734);let _=o.DomRendererRowFactory=class{constructor(w,k,g,x,T,B,O){this._document=w,this._characterJoinerService=k,this._optionsService=g,this._coreBrowserService=x,this._coreService=T,this._decorationService=B,this._themeService=O,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(w,k,g){this._selectionStart=w,this._selectionEnd=k,this._columnSelectMode=g}createRow(w,k,g,x,T,B,O,P,N,W,U){const q=[],H=this._characterJoinerService.getJoinedCharacters(k),b=this._themeService.colors;let D,A=w.getNoBgTrimmedLength();g&&A<B+1&&(A=B+1);let M=0,z="",$=0,Y=0,Q=0,R=!1,L=0,F=!1,I=0;const K=[],V=W!==-1&&U!==-1;for(let Z=0;Z<A;Z++){w.loadCell(Z,this._workCell);let he=this._workCell.getWidth();if(he===0)continue;let de=!1,Ae=Z,J=this._workCell;if(H.length>0&&Z===H[0][0]){de=!0;const le=H.shift();J=new l.JoinedCellData(this._workCell,w.translateToString(!0,le[0],le[1]),le[1]-le[0]),Ae=le[1]-1,he=J.getWidth()}const Pr=this._isCellInSelection(Z,k),zs=g&&Z===B,js=V&&Z>=W&&Z<=U;let Us=!1;this._decorationService.forEachDecorationAtCell(Z,k,void 0,le=>{Us=!0});let ki=J.getChars()||p.WHITESPACE_CELL_CHAR;if(ki===" "&&(J.isUnderline()||J.isOverline())&&(ki=" "),I=he*P-N.get(ki,J.isBold(),J.isItalic()),D){if(M&&(Pr&&F||!Pr&&!F&&J.bg===$)&&(Pr&&F&&b.selectionForeground||J.fg===Y)&&J.extended.ext===Q&&js===R&&I===L&&!zs&&!de&&!Us){J.isInvisible()?z+=p.WHITESPACE_CELL_CHAR:z+=ki,M++;continue}M&&(D.textContent=z),D=this._document.createElement("span"),M=0,z=""}else D=this._document.createElement("span");if($=J.bg,Y=J.fg,Q=J.extended.ext,R=js,L=I,F=Pr,de&&B>=Z&&B<=Ae&&(B=Z),!this._coreService.isCursorHidden&&zs&&this._coreService.isCursorInitialized){if(K.push("xterm-cursor"),this._coreBrowserService.isFocused)O&&K.push("xterm-cursor-blink"),K.push(x==="bar"?"xterm-cursor-bar":x==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(T)switch(T){case"outline":K.push("xterm-cursor-outline");break;case"block":K.push("xterm-cursor-block");break;case"bar":K.push("xterm-cursor-bar");break;case"underline":K.push("xterm-cursor-underline")}}if(J.isBold()&&K.push("xterm-bold"),J.isItalic()&&K.push("xterm-italic"),J.isDim()&&K.push("xterm-dim"),z=J.isInvisible()?p.WHITESPACE_CELL_CHAR:J.getChars()||p.WHITESPACE_CELL_CHAR,J.isUnderline()&&(K.push(`xterm-underline-${J.extended.underlineStyle}`),z===" "&&(z=" "),!J.isUnderlineColorDefault()))if(J.isUnderlineColorRGB())D.style.textDecorationColor=`rgb(${n.AttributeData.toColorRGB(J.getUnderlineColor()).join(",")})`;else{let le=J.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&J.isBold()&&le<8&&(le+=8),D.style.textDecorationColor=b.ansi[le].css}J.isOverline()&&(K.push("xterm-overline"),z===" "&&(z=" ")),J.isStrikethrough()&&K.push("xterm-strikethrough"),js&&(D.style.textDecoration="underline");let $e=J.getFgColor(),Ar=J.getFgColorMode(),st=J.getBgColor(),Br=J.getBgColorMode();const $s=!!J.isInverse();if($s){const le=$e;$e=st,st=le;const Bu=Ar;Ar=Br,Br=Bu}let yt,bi,Ct,Mr=!1;switch(this._decorationService.forEachDecorationAtCell(Z,k,void 0,le=>{le.options.layer!=="top"&&Mr||(le.backgroundColorRGB&&(Br=50331648,st=le.backgroundColorRGB.rgba>>8&16777215,yt=le.backgroundColorRGB),le.foregroundColorRGB&&(Ar=50331648,$e=le.foregroundColorRGB.rgba>>8&16777215,bi=le.foregroundColorRGB),Mr=le.options.layer==="top")}),!Mr&&Pr&&(yt=this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque,st=yt.rgba>>8&16777215,Br=50331648,Mr=!0,b.selectionForeground&&(Ar=50331648,$e=b.selectionForeground.rgba>>8&16777215,bi=b.selectionForeground)),Mr&&K.push("xterm-decoration-top"),Br){case 16777216:case 33554432:Ct=b.ansi[st],K.push(`xterm-bg-${st}`);break;case 50331648:Ct=v.channels.toColor(st>>16,st>>8&255,255&st),this._addStyle(D,`background-color:#${C((st>>>0).toString(16),"0",6)}`);break;default:$s?(Ct=b.foreground,K.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Ct=b.background}switch(yt||J.isDim()&&(yt=v.color.multiplyOpacity(Ct,.5)),Ar){case 16777216:case 33554432:J.isBold()&&$e<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&($e+=8),this._applyMinimumContrast(D,Ct,b.ansi[$e],J,yt,void 0)||K.push(`xterm-fg-${$e}`);break;case 50331648:const le=v.channels.toColor($e>>16&255,$e>>8&255,255&$e);this._applyMinimumContrast(D,Ct,le,J,yt,bi)||this._addStyle(D,`color:#${C($e.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(D,Ct,b.foreground,J,yt,bi)||$s&&K.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}K.length&&(D.className=K.join(" "),K.length=0),zs||de||Us?D.textContent=z:M++,I!==this.defaultSpacing&&(D.style.letterSpacing=`${I}px`),q.push(D),Z=Ae}return D&&M&&(D.textContent=z),q}_applyMinimumContrast(w,k,g,x,T,B){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,s.treatGlyphAsBackgroundColor)(x.getCode()))return!1;const O=this._getContrastCache(x);let P;if(T||B||(P=O.getColor(k.rgba,g.rgba)),P===void 0){const N=this._optionsService.rawOptions.minimumContrastRatio/(x.isDim()?2:1);P=v.color.ensureContrastRatio(T||k,B||g,N),O.setColor((T||k).rgba,(B||g).rgba,P??null)}return!!P&&(this._addStyle(w,`color:${P.css}`),!0)}_getContrastCache(w){return w.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(w,k){w.setAttribute("style",`${w.getAttribute("style")||""}${k};`)}_isCellInSelection(w,k){const g=this._selectionStart,x=this._selectionEnd;return!(!g||!x)&&(this._columnSelectMode?g[0]<=x[0]?w>=g[0]&&k>=g[1]&&w<x[0]&&k<=x[1]:w<g[0]&&k>=g[1]&&w>=x[0]&&k<=x[1]:k>g[1]&&k<x[1]||g[1]===x[1]&&k===g[1]&&w>=g[0]&&w<x[0]||g[1]<x[1]&&k===x[1]&&w<x[0]||g[1]<x[1]&&k===g[1]&&w>=g[0])}};function C(w,k,g){for(;w.length<g;)w=k+w;return w}o.DomRendererRowFactory=_=f([m(1,u.ICharacterJoinerService),m(2,E.IOptionsService),m(3,u.ICoreBrowserService),m(4,E.ICoreService),m(5,E.IDecorationService),m(6,u.IThemeService)],_)},2550:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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 m=c.createElement("span");m.classList.add("xterm-char-measure-element");const h=c.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const S=c.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[m,h,p,S],this._container.appendChild(m),this._container.appendChild(h),this._container.appendChild(p),this._container.appendChild(S),f.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(c,f,m,h){c===this._font&&f===this._fontSize&&m===this._weight&&h===this._weightBold||(this._font=c,this._fontSize=f,this._weight=m,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(c,f,m){let h=0;if(!f&&!m&&c.length===1&&(h=c.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const E=this._measure(c,0);return E>0&&(this._flat[h]=E),E}let p=c;f&&(p+="B"),m&&(p+="I");let S=this._holey.get(p);if(S===void 0){let E=0;f&&(E|=1),m&&(E|=2),S=this._measure(c,E),S>0&&this._holey.set(p,S)}return S}_measure(c,f){const m=this._measureElements[f];return m.textContent=c.repeat(32),m.offsetWidth/32}}},2223:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const f=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(y,o)=>{function c(m){return 57508<=m&&m<=57558}function f(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},o.isEmoji=f,o.allowRescaling=function(m,h,p,S){return h===1&&p>Math.ceil(1.5*S)&&m!==void 0&&m>255&&!f(m)&&!c(m)&&!function(E){return 57344<=E&&E<=63743}(m)},o.treatGlyphAsBackgroundColor=function(m){return c(m)||function(h){return 9472<=h&&h<=9631}(m)},o.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}}}},o.computeNextVariantOffset=function(m,h,p=0){return(m-(2*Math.round(h)-p))%(2*Math.round(h))}},6052:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class c{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(m,h,p,S=!1){if(this.selectionStart=h,this.selectionEnd=p,!h||!p||h[0]===p[0]&&h[1]===p[1])return void this.clear();const E=m.buffers.active.ydisp,v=h[1]-E,u=p[1]-E,l=Math.max(v,0),s=Math.min(u,m.rows-1);l>=m.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=v,this.viewportEndRow=u,this.viewportCappedStartRow=l,this.viewportCappedEndRow=s,this.startCol=h[0],this.endCol=p[0])}isCellSelected(m,h,p){return!!this.hasSelection&&(p-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&p>=this.viewportCappedStartRow&&h<this.endCol&&p<=this.viewportCappedEndRow:h<this.startCol&&p>=this.viewportCappedStartRow&&h>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&h>=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,f=this.selectionEnd;return!(!c||!f)&&(c[1]>f[1]||c[1]===f[1]&&c[0]>f[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(y,o,c){var f=this&&this.__decorate||function(s,n,_,C){var w,k=arguments.length,g=k<3?n:C===null?C=Object.getOwnPropertyDescriptor(n,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,n,_,C);else for(var x=s.length-1;x>=0;x--)(w=s[x])&&(g=(k<3?w(g):k>3?w(n,_,g):w(n,_))||g);return k>3&&g&&Object.defineProperty(n,_,g),g},m=this&&this.__param||function(s,n){return function(_,C){n(_,C,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const h=c(2585),p=c(8460),S=c(844);let E=o.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(s,n,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new l(this._optionsService))}catch{this._measureStrategy=this.register(new u(s,n,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const s=this._measureStrategy.measure();s.width===this.width&&s.height===this.height||(this.width=s.width,this.height=s.height,this._onCharSizeChange.fire())}};o.CharSizeService=E=f([m(2,h.IOptionsService)],E);class v extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(n,_){n!==void 0&&n>0&&_!==void 0&&_>0&&(this._result.width=n,this._result.height=_)}}class u extends v{constructor(n,_,C){super(),this._document=n,this._parentElement=_,this._optionsService=C,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class l extends v{constructor(n){super(),this._optionsService=n,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const n=this._ctx.measureText("W");return this._validateAndSet(n.width,n.fontBoundingBoxAscent+n.fontBoundingBoxDescent),this._result}}},4269:function(y,o,c){var f=this&&this.__decorate||function(l,s,n,_){var C,w=arguments.length,k=w<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,n):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,s,n,_);else for(var g=l.length-1;g>=0;g--)(C=l[g])&&(k=(w<3?C(k):w>3?C(s,n,k):C(s,n))||k);return w>3&&k&&Object.defineProperty(s,n,k),k},m=this&&this.__param||function(l,s){return function(n,_){s(n,_,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const h=c(3734),p=c(643),S=c(511),E=c(2585);class v extends h.AttributeData{constructor(s,n,_){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=n,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(s){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=v;let u=o.CharacterJoinerService=class Tu{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(s){const n={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(n),n.id}deregister(s){for(let n=0;n<this._characterJoiners.length;n++)if(this._characterJoiners[n].id===s)return this._characterJoiners.splice(n,1),!0;return!1}getJoinedCharacters(s){if(this._characterJoiners.length===0)return[];const n=this._bufferService.buffer.lines.get(s);if(!n||n.length===0)return[];const _=[],C=n.translateToString(!0);let w=0,k=0,g=0,x=n.getFg(0),T=n.getBg(0);for(let B=0;B<n.getTrimmedLength();B++)if(n.loadCell(B,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==x||this._workCell.bg!==T){if(B-w>1){const O=this._getJoinedRanges(C,g,k,n,w);for(let P=0;P<O.length;P++)_.push(O[P])}w=B,g=k,x=this._workCell.fg,T=this._workCell.bg}k+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-w>1){const B=this._getJoinedRanges(C,g,k,n,w);for(let O=0;O<B.length;O++)_.push(B[O])}return _}_getJoinedRanges(s,n,_,C,w){const k=s.substring(n,_);let g=[];try{g=this._characterJoiners[0].handler(k)}catch(x){console.error(x)}for(let x=1;x<this._characterJoiners.length;x++)try{const T=this._characterJoiners[x].handler(k);for(let B=0;B<T.length;B++)Tu._mergeRanges(g,T[B])}catch(T){console.error(T)}return this._stringRangesToCellRanges(g,C,w),g}_stringRangesToCellRanges(s,n,_){let C=0,w=!1,k=0,g=s[C];if(g){for(let x=_;x<this._bufferService.cols;x++){const T=n.getWidth(x),B=n.getString(x).length||p.WHITESPACE_CELL_CHAR.length;if(T!==0){if(!w&&g[0]<=k&&(g[0]=x,w=!0),g[1]<=k){if(g[1]=x,g=s[++C],!g)break;g[0]<=k?(g[0]=x,w=!0):w=!1}k+=B}}g&&(g[1]=this._bufferService.cols)}}static _mergeRanges(s,n){let _=!1;for(let C=0;C<s.length;C++){const w=s[C];if(_){if(n[1]<=w[0])return s[C-1][1]=n[1],s;if(n[1]<=w[1])return s[C-1][1]=Math.max(n[1],w[1]),s.splice(C,1),s;s.splice(C,1),C--}else{if(n[1]<=w[0])return s.splice(C,0,n),s;if(n[1]<=w[1])return w[0]=Math.min(n[0],w[0]),s;n[0]<w[1]&&(w[0]=Math.min(n[0],w[0]),_=!0)}}return _?s[s.length-1][1]=n[1]:s.push(n),s}};o.CharacterJoinerService=u=f([m(0,E.IBufferService)],u)},5114:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const f=c(844),m=c(8460),h=c(3656);class p extends f.Disposable{constructor(v,u,l){super(),this._textarea=v,this._window=u,this.mainDocument=l,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this.register((0,m.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(v){this._window!==v&&(this._window=v,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}}o.CoreBrowserService=p;class S extends f.Disposable{constructor(v){super(),this._parentWindow=v,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)(()=>this.clearListener()))}setWindow(v){this._parentWindow=v,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)==null||v.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:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const f=c(844);class m extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const S=this.linkProviders.indexOf(p);S!==-1&&this.linkProviders.splice(S,1)}}}}o.LinkProviderService=m},8934:function(y,o,c){var f=this&&this.__decorate||function(E,v,u,l){var s,n=arguments.length,_=n<3?v:l===null?l=Object.getOwnPropertyDescriptor(v,u):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(E,v,u,l);else for(var C=E.length-1;C>=0;C--)(s=E[C])&&(_=(n<3?s(_):n>3?s(v,u,_):s(v,u))||_);return n>3&&_&&Object.defineProperty(v,u,_),_},m=this&&this.__param||function(E,v){return function(u,l){v(u,l,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const h=c(4725),p=c(9806);let S=o.MouseService=class{constructor(E,v){this._renderService=E,this._charSizeService=v}getCoords(E,v,u,l,s){return(0,p.getCoords)(window,E,v,u,l,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,s)}getMouseReportCoords(E,v){const u=(0,p.getCoordsRelativeToElement)(window,E,v);if(this._charSizeService.hasValidSize)return u[0]=Math.min(Math.max(u[0],0),this._renderService.dimensions.css.canvas.width-1),u[1]=Math.min(Math.max(u[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(u[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(u[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(u[0]),y:Math.floor(u[1])}}};o.MouseService=S=f([m(0,h.IRenderService),m(1,h.ICharSizeService)],S)},3230:function(y,o,c){var f=this&&this.__decorate||function(s,n,_,C){var w,k=arguments.length,g=k<3?n:C===null?C=Object.getOwnPropertyDescriptor(n,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,n,_,C);else for(var x=s.length-1;x>=0;x--)(w=s[x])&&(g=(k<3?w(g):k>3?w(n,_,g):w(n,_))||g);return k>3&&g&&Object.defineProperty(n,_,g),g},m=this&&this.__param||function(s,n){return function(_,C){n(_,C,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const h=c(6193),p=c(4725),S=c(8460),E=c(844),v=c(7226),u=c(2585);let l=o.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(s,n,_,C,w,k,g,x){super(),this._rowCount=s,this._charSizeService=C,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new E.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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer((T,B)=>this._renderRows(T,B),g),this.register(this._renderDebouncer),this.register(g.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(k.onResize(()=>this._fullRefresh())),this.register(k.buffers.onBufferActivate(()=>{var T;return(T=this._renderer.value)==null?void 0:T.clear()})),this.register(_.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(w.onDecorationRegistered(()=>this._fullRefresh())),this.register(w.onDecorationRemoved(()=>this._fullRefresh())),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(k.cols,k.rows),this._fullRefresh()})),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(k.buffer.y,k.buffer.y,!0))),this.register(x.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(g.window,n),this.register(g.onWindowChange(T=>this._registerIntersectionObserver(T,n)))}_registerIntersectionObserver(s,n){if("IntersectionObserver"in s){const _=new s.IntersectionObserver(C=>this._handleIntersectionChange(C[C.length-1]),{threshold:0});_.observe(n),this._observerDisposable.value=(0,E.toDisposable)(()=>_.disconnect())}}_handleIntersectionChange(s){this._isPaused=s.isIntersecting===void 0?s.intersectionRatio===0:!s.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(s,n,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(s,n,this._rowCount))}_renderRows(s,n){this._renderer.value&&(s=Math.min(s,this._rowCount-1),n=Math.min(n,this._rowCount-1),this._renderer.value.renderRows(s,n),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:s,end:n}),this._onRender.fire({start:s,end:n}),this._isNextRenderRedrawOnly=!0)}resize(s,n){this._rowCount=n,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(s){this._renderer.value=s,this._renderer.value&&(this._renderer.value.onRequestRedraw(n=>this.refreshRows(n.start,n.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(s){return this._renderDebouncer.addRefreshCallback(s)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var s,n;this._renderer.value&&((n=(s=this._renderer.value).clearTextureAtlas)==null||n.call(s),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(s,n){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(s,n)}):this._renderer.value.handleResize(s,n),this._fullRefresh())}handleCharSizeChanged(){var s;(s=this._renderer.value)==null||s.handleCharSizeChanged()}handleBlur(){var s;(s=this._renderer.value)==null||s.handleBlur()}handleFocus(){var s;(s=this._renderer.value)==null||s.handleFocus()}handleSelectionChanged(s,n,_){var C;this._selectionState.start=s,this._selectionState.end=n,this._selectionState.columnSelectMode=_,(C=this._renderer.value)==null||C.handleSelectionChanged(s,n,_)}handleCursorMove(){var s;(s=this._renderer.value)==null||s.handleCursorMove()}clear(){var s;(s=this._renderer.value)==null||s.clear()}};o.RenderService=l=f([m(2,u.IOptionsService),m(3,p.ICharSizeService),m(4,u.IDecorationService),m(5,u.IBufferService),m(6,p.ICoreBrowserService),m(7,p.IThemeService)],l)},9312:function(y,o,c){var f=this&&this.__decorate||function(g,x,T,B){var O,P=arguments.length,N=P<3?x:B===null?B=Object.getOwnPropertyDescriptor(x,T):B;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,x,T,B);else for(var W=g.length-1;W>=0;W--)(O=g[W])&&(N=(P<3?O(N):P>3?O(x,T,N):O(x,T))||N);return P>3&&N&&Object.defineProperty(x,T,N),N},m=this&&this.__param||function(g,x){return function(T,B){x(T,B,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const h=c(9806),p=c(9504),S=c(456),E=c(4725),v=c(8460),u=c(844),l=c(6114),s=c(4841),n=c(511),_=c(2585),C=" ",w=new RegExp(C,"g");let k=o.SelectionService=class extends u.Disposable{constructor(g,x,T,B,O,P,N,W,U){super(),this._element=g,this._screenElement=x,this._linkifier=T,this._bufferService=B,this._coreService=O,this._mouseService=P,this._optionsService=N,this._renderService=W,this._coreBrowserService=U,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new n.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new v.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new v.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new v.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new v.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 S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,u.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 g=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;return!(!g||!x||g[0]===x[0]&&g[1]===x[1])}get selectionText(){const g=this._model.finalSelectionStart,x=this._model.finalSelectionEnd;if(!g||!x)return"";const T=this._bufferService.buffer,B=[];if(this._activeSelectionMode===3){if(g[0]===x[0])return"";const O=g[0]<x[0]?g[0]:x[0],P=g[0]<x[0]?x[0]:g[0];for(let N=g[1];N<=x[1];N++){const W=T.translateBufferLineToString(N,!0,O,P);B.push(W)}}else{const O=g[1]===x[1]?x[0]:void 0;B.push(T.translateBufferLineToString(g[1],!0,g[0],O));for(let P=g[1]+1;P<=x[1]-1;P++){const N=T.lines.get(P),W=T.translateBufferLineToString(P,!0);N!=null&&N.isWrapped?B[B.length-1]+=W:B.push(W)}if(g[1]!==x[1]){const P=T.lines.get(x[1]),N=T.translateBufferLineToString(x[1],!0,0,x[0]);P&&P.isWrapped?B[B.length-1]+=N:B.push(N)}}return B.map(O=>O.replace(w," ")).join(l.isWindows?`\r
|
|
44
|
+
WARNING: This link could potentially be dangerous`)){const l=window.open();if(l){try{l.opener=null}catch{}l.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=S=f([m(0,p.IBufferService),m(1,p.IOptionsService),m(2,p.IOscLinkService)],S)},6193:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.RenderDebouncer=void 0,o.RenderDebouncer=class{constructor(c,f){this._renderCallback=c,this._coreBrowserService=f,this._refreshCallbacks=[]}dispose(){this._animationFrame&&(this._coreBrowserService.window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)}addRefreshCallback(c){return this._refreshCallbacks.push(c),this._animationFrame||(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh())),this._animationFrame}refresh(c,f,m){this._rowCount=m,c=c!==void 0?c:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f,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 c=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,f),this._runRefreshCallbacks()}_runRefreshCallbacks(){for(const c of this._refreshCallbacks)c(0);this._refreshCallbacks=[]}}},3236:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Terminal=void 0;const f=c(3614),m=c(3656),h=c(3551),p=c(9042),S=c(3730),E=c(1680),v=c(3107),u=c(5744),l=c(2950),s=c(1296),n=c(428),_=c(4269),C=c(5114),w=c(8934),k=c(3230),g=c(9312),L=c(4725),R=c(6731),A=c(8055),M=c(8969),T=c(8460),N=c(844),W=c(6114),K=c(8437),q=c(2584),H=c(7399),b=c(5941),D=c(9074),P=c(2585),B=c(5435),z=c(4567),V=c(779);class Q extends M.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(O={}){super(O),this.browser=W,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new N.MutableDisposable),this._onCursorMove=this.register(new T.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new T.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new T.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new T.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new T.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new T.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new T.EventEmitter),this._onBlur=this.register(new T.EventEmitter),this._onA11yCharEmitter=this.register(new T.EventEmitter),this._onA11yTabEmitter=this.register(new T.EventEmitter),this._onWillOpen=this.register(new T.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(D.DecorationService),this._instantiationService.setService(P.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(V.LinkProviderService),this._instantiationService.setService(L.ILinkProviderService,this._linkProviderService),this._linkProviderService.registerLinkProvider(this._instantiationService.createInstance(S.OscLinkProvider)),this.register(this._inputHandler.onRequestBell(()=>this._onBell.fire())),this.register(this._inputHandler.onRequestRefreshRows((x,F)=>this.refresh(x,F))),this.register(this._inputHandler.onRequestSendFocus(()=>this._reportFocus())),this.register(this._inputHandler.onRequestReset(()=>this.reset())),this.register(this._inputHandler.onRequestWindowsOptionsReport(x=>this._reportWindowsOptions(x))),this.register(this._inputHandler.onColor(x=>this._handleColorEvent(x))),this.register((0,T.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,T.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,T.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,T.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize(x=>this._afterResize(x.cols,x.rows))),this.register((0,N.toDisposable)(()=>{var x,F;this._customKeyEventHandler=void 0,(F=(x=this.element)==null?void 0:x.parentNode)==null||F.removeChild(this.element)}))}_handleColorEvent(O){if(this._themeService)for(const x of O){let F,I="";switch(x.index){case 256:F="foreground",I="10";break;case 257:F="background",I="11";break;case 258:F="cursor",I="12";break;default:F="ansi",I="4;"+x.index}switch(x.type){case 0:const $=A.color.toColorRGB(F==="ansi"?this._themeService.colors.ansi[x.index]:this._themeService.colors[F]);this.coreService.triggerDataEvent(`${q.C0.ESC}]${I};${(0,b.toRgbString)($)}${q.C1_ESCAPED.ST}`);break;case 1:if(F==="ansi")this._themeService.modifyColors(j=>j.ansi[x.index]=A.channels.toColor(...x.color));else{const j=F;this._themeService.modifyColors(Z=>Z[j]=A.channels.toColor(...x.color))}break;case 2:this._themeService.restoreColor(x.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(O){O?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(z.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(O){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var O;return(O=this.textarea)==null?void 0:O.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 O=this.buffer.ybase+this.buffer.y,x=this.buffer.lines.get(O);if(!x)return;const F=Math.min(this.buffer.x,this.cols-1),I=this._renderService.dimensions.css.cell.height,$=x.getWidth(F),j=this._renderService.dimensions.css.cell.width*$,Z=this.buffer.y*this._renderService.dimensions.css.cell.height,ie=F*this._renderService.dimensions.css.cell.width;this.textarea.style.left=ie+"px",this.textarea.style.top=Z+"px",this.textarea.style.width=j+"px",this.textarea.style.height=I+"px",this.textarea.style.lineHeight=I+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,m.addDisposableDomListener)(this.element,"copy",x=>{this.hasSelection()&&(0,f.copyHandler)(x,this._selectionService)}));const O=x=>(0,f.handlePasteEvent)(x,this.textarea,this.coreService,this.optionsService);this.register((0,m.addDisposableDomListener)(this.textarea,"paste",O)),this.register((0,m.addDisposableDomListener)(this.element,"paste",O)),W.isFirefox?this.register((0,m.addDisposableDomListener)(this.element,"mousedown",x=>{x.button===2&&(0,f.rightClickHandler)(x,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,m.addDisposableDomListener)(this.element,"contextmenu",x=>{(0,f.rightClickHandler)(x,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),W.isLinux&&this.register((0,m.addDisposableDomListener)(this.element,"auxclick",x=>{x.button===1&&(0,f.moveTextAreaUnderMouseCursor)(x,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,m.addDisposableDomListener)(this.textarea,"keyup",O=>this._keyUp(O),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keydown",O=>this._keyDown(O),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"keypress",O=>this._keyPress(O),!0)),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionupdate",O=>this._compositionHelper.compositionupdate(O))),this.register((0,m.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,m.addDisposableDomListener)(this.textarea,"input",O=>this._inputEvent(O),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(O){var F;if(!O)throw new Error("Terminal requires a parent element.");if(O.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((F=this.element)==null?void 0:F.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=O.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"),O.appendChild(this.element);const x=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),x.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,m.addDisposableDomListener)(this.screenElement,"mousemove",I=>this.updateCursorStyle(I))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),x.appendChild(this.screenElement),this.textarea=this._document.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",p.promptLabel),W.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,O.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(L.ICoreBrowserService,this._coreBrowserService),this.register((0,m.addDisposableDomListener)(this.textarea,"focus",I=>this._handleTextAreaFocus(I))),this.register((0,m.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(n.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(L.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(R.ThemeService),this._instantiationService.setService(L.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(L.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(L.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(I=>this._onRender.fire(I))),this.onResize(I=>this._renderService.resize(I.cols,I.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(l.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(w.MouseService),this._instantiationService.setService(L.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(h.Linkifier,this.screenElement)),this.element.appendChild(x);try{this._onWillOpen.fire(this.element)}catch{}this._renderService.hasRenderer()||this._renderService.setRenderer(this._createRenderer()),this.viewport=this._instantiationService.createInstance(E.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(I=>this.scrollLines(I.amount,I.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(g.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(L.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(I=>this.scrollLines(I.amount,I.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(I=>this._renderService.handleSelectionChanged(I.start,I.end,I.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(I=>{this.textarea.value=I,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(I=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,m.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,m.addDisposableDomListener)(this.element,"mousedown",I=>this._selectionService.handleMouseDown(I))),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(z.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",I=>this._handleScreenReaderModeOptionChange(I))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",I=>{!this._overviewRulerRenderer&&I&&this._viewportElement&&this.screenElement&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement)))}),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()}_createRenderer(){return this._instantiationService.createInstance(s.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const O=this,x=this.element;function F(j){const Z=O._mouseService.getMouseReportCoords(j,O.screenElement);if(!Z)return!1;let ie,de;switch(j.overrideType||j.type){case"mousemove":de=32,j.buttons===void 0?(ie=3,j.button!==void 0&&(ie=j.button<3?j.button:3)):ie=1&j.buttons?0:4&j.buttons?1:2&j.buttons?2:3;break;case"mouseup":de=0,ie=j.button<3?j.button:3;break;case"mousedown":de=1,ie=j.button<3?j.button:3;break;case"wheel":if(O._customWheelEventHandler&&O._customWheelEventHandler(j)===!1||O.viewport.getLinesScrolled(j)===0)return!1;de=j.deltaY<0?0:1,ie=4;break;default:return!1}return!(de===void 0||ie===void 0||ie>4)&&O.coreMouseService.triggerMouseEvent({col:Z.col,row:Z.row,x:Z.x,y:Z.y,button:ie,action:de,ctrl:j.ctrlKey,alt:j.altKey,shift:j.shiftKey})}const I={mouseup:null,wheel:null,mousedrag:null,mousemove:null},$={mouseup:j=>(F(j),j.buttons||(this._document.removeEventListener("mouseup",I.mouseup),I.mousedrag&&this._document.removeEventListener("mousemove",I.mousedrag)),this.cancel(j)),wheel:j=>(F(j),this.cancel(j,!0)),mousedrag:j=>{j.buttons&&F(j)},mousemove:j=>{j.buttons||F(j)}};this.register(this.coreMouseService.onProtocolChange(j=>{j?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(j)),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&j?I.mousemove||(x.addEventListener("mousemove",$.mousemove),I.mousemove=$.mousemove):(x.removeEventListener("mousemove",I.mousemove),I.mousemove=null),16&j?I.wheel||(x.addEventListener("wheel",$.wheel,{passive:!1}),I.wheel=$.wheel):(x.removeEventListener("wheel",I.wheel),I.wheel=null),2&j?I.mouseup||(I.mouseup=$.mouseup):(this._document.removeEventListener("mouseup",I.mouseup),I.mouseup=null),4&j?I.mousedrag||(I.mousedrag=$.mousedrag):(this._document.removeEventListener("mousemove",I.mousedrag),I.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,m.addDisposableDomListener)(x,"mousedown",j=>{if(j.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(j))return F(j),I.mouseup&&this._document.addEventListener("mouseup",I.mouseup),I.mousedrag&&this._document.addEventListener("mousemove",I.mousedrag),this.cancel(j)})),this.register((0,m.addDisposableDomListener)(x,"wheel",j=>{if(!I.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(j)===!1)return!1;if(!this.buffer.hasScrollback){const Z=this.viewport.getLinesScrolled(j);if(Z===0)return;const ie=q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(j.deltaY<0?"A":"B");let de="";for(let Ae=0;Ae<Math.abs(Z);Ae++)de+=ie;return this.coreService.triggerDataEvent(de,!0),this.cancel(j,!0)}return this.viewport.handleWheel(j)?this.cancel(j):void 0}},{passive:!1})),this.register((0,m.addDisposableDomListener)(x,"touchstart",j=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(j),this.cancel(j)},{passive:!0})),this.register((0,m.addDisposableDomListener)(x,"touchmove",j=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(j)?void 0:this.cancel(j)},{passive:!1}))}refresh(O,x){var F;(F=this._renderService)==null||F.refreshRows(O,x)}updateCursorStyle(O){var x;(x=this._selectionService)!=null&&x.shouldColumnSelect(O)?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(O,x,F=0){var I;F===1?(super.scrollLines(O,x,F),this.refresh(0,this.rows-1)):(I=this.viewport)==null||I.scrollLines(O)}paste(O){(0,f.paste)(O,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(O){this._customKeyEventHandler=O}attachCustomWheelEventHandler(O){this._customWheelEventHandler=O}registerLinkProvider(O){return this._linkProviderService.registerLinkProvider(O)}registerCharacterJoiner(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const x=this._characterJoinerService.register(O);return this.refresh(0,this.rows-1),x}deregisterCharacterJoiner(O){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(O)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(O){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+O)}registerDecoration(O){return this._decorationService.registerDecoration(O)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(O,x,F){this._selectionService.setSelection(O,x,F)}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 O;(O=this._selectionService)==null||O.clearSelection()}selectAll(){var O;(O=this._selectionService)==null||O.selectAll()}selectLines(O,x){var F;(F=this._selectionService)==null||F.selectLines(O,x)}_keyDown(O){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;const x=this.browser.isMac&&this.options.macOptionIsMeta&&O.altKey;if(!x&&!this._compositionHelper.keydown(O))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;x||O.key!=="Dead"&&O.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const F=(0,H.evaluateKeyboardEvent)(O,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(O),F.type===3||F.type===2){const I=this.rows-1;return this.scrollLines(F.type===2?-I:I),this.cancel(O,!0)}return F.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,O)||(F.cancel&&this.cancel(O,!0),!F.key||!!(O.key&&!O.ctrlKey&&!O.altKey&&!O.metaKey&&O.key.length===1&&O.key.charCodeAt(0)>=65&&O.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(F.key!==q.C0.ETX&&F.key!==q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:F.key,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(F.key,!0),!this.optionsService.rawOptions.screenReaderMode||O.altKey||O.ctrlKey?this.cancel(O,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(O,x){const F=O.isMac&&!this.options.macOptionIsMeta&&x.altKey&&!x.ctrlKey&&!x.metaKey||O.isWindows&&x.altKey&&x.ctrlKey&&!x.metaKey||O.isWindows&&x.getModifierState("AltGraph");return x.type==="keypress"?F:F&&(!x.keyCode||x.keyCode>47)}_keyUp(O){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1||(function(x){return x.keyCode===16||x.keyCode===17||x.keyCode===18}(O)||this.focus(),this.updateCursorStyle(O),this._keyPressHandled=!1)}_keyPress(O){let x;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(O)===!1)return!1;if(this.cancel(O),O.charCode)x=O.charCode;else if(O.which===null||O.which===void 0)x=O.keyCode;else{if(O.which===0||O.charCode===0)return!1;x=O.which}return!(!x||(O.altKey||O.ctrlKey||O.metaKey)&&!this._isThirdLevelShift(this.browser,O)||(x=String.fromCharCode(x),this._onKey.fire({key:x,domEvent:O}),this._showCursor(),this.coreService.triggerDataEvent(x,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(O){if(O.data&&O.inputType==="insertText"&&(!O.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const x=O.data;return this.coreService.triggerDataEvent(x,!0),this.cancel(O),!0}return!1}resize(O,x){O!==this.cols||x!==this.rows?super.resize(O,x):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(O,x){var F,I;(F=this._charSizeService)==null||F.measure(),(I=this.viewport)==null||I.syncScrollArea(!0)}clear(){var O;if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.clearAllMarkers(),this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(let x=1;x<this.rows;x++)this.buffer.lines.push(this.buffer.getBlankLine(K.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(O=this.viewport)==null||O.reset(),this.refresh(0,this.rows-1)}}reset(){var x,F;this.options.rows=this.rows,this.options.cols=this.cols;const O=this._customKeyEventHandler;this._setup(),super.reset(),(x=this._selectionService)==null||x.reset(),this._decorationService.reset(),(F=this.viewport)==null||F.reset(),this._customKeyEventHandler=O,this.refresh(0,this.rows-1)}clearTextureAtlas(){var O;(O=this._renderService)==null||O.clearTextureAtlas()}_reportFocus(){var O;(O=this.element)!=null&&O.classList.contains("focus")?this.coreService.triggerDataEvent(q.C0.ESC+"[I"):this.coreService.triggerDataEvent(q.C0.ESC+"[O")}_reportWindowsOptions(O){if(this._renderService)switch(O){case B.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const x=this._renderService.dimensions.css.canvas.width.toFixed(0),F=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[4;${F};${x}t`);break;case B.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const I=this._renderService.dimensions.css.cell.width.toFixed(0),$=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[6;${$};${I}t`)}}cancel(O,x){if(this.options.cancelEvents||x)return O.preventDefault(),O.stopPropagation(),!1}}o.Terminal=Q},9924:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TimeBasedDebouncer=void 0,o.TimeBasedDebouncer=class{constructor(c,f=1e3){this._renderCallback=c,this._debounceThresholdMS=f,this._lastRefreshMs=0,this._additionalRefreshRequested=!1}dispose(){this._refreshTimeoutID&&clearTimeout(this._refreshTimeoutID)}refresh(c,f,m){this._rowCount=m,c=c!==void 0?c:0,f=f!==void 0?f:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,c):c,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,f):f;const h=Date.now();if(h-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=h,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=h-this._lastRefreshMs,S=this._debounceThresholdMS-p;this._additionalRefreshRequested=!0,this._refreshTimeoutID=window.setTimeout(()=>{this._lastRefreshMs=Date.now(),this._innerRefresh(),this._additionalRefreshRequested=!1,this._refreshTimeoutID=void 0},S)}}_innerRefresh(){if(this._rowStart===void 0||this._rowEnd===void 0||this._rowCount===void 0)return;const c=Math.max(this._rowStart,0),f=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._renderCallback(c,f)}}},1680:function(y,o,c){var f=this&&this.__decorate||function(l,s,n,_){var C,w=arguments.length,k=w<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,n):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,s,n,_);else for(var g=l.length-1;g>=0;g--)(C=l[g])&&(k=(w<3?C(k):w>3?C(s,n,k):C(s,n))||k);return w>3&&k&&Object.defineProperty(s,n,k),k},m=this&&this.__param||function(l,s){return function(n,_){s(n,_,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Viewport=void 0;const h=c(3656),p=c(4725),S=c(8460),E=c(844),v=c(2585);let u=o.Viewport=class extends E.Disposable{constructor(l,s,n,_,C,w,k,g){super(),this._viewportElement=l,this._scrollArea=s,this._bufferService=n,this._optionsService=_,this._charSizeService=C,this._renderService=w,this._coreBrowserService=k,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 S.EventEmitter),this.onRequestScrollLines=this._onRequestScrollLines.event,this.scrollBarWidth=this._viewportElement.offsetWidth-this._scrollArea.offsetWidth||15,this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(L=>this._renderDimensions=L)),this._handleThemeChange(g.colors),this.register(g.onChangeColors(L=>this._handleThemeChange(L))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(l){this._viewportElement.style.backgroundColor=l.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(l){if(l)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 s=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==s&&(this._lastRecordedBufferHeight=s,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const l=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==l&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=l),this._refreshAnimationFrame=null}syncScrollArea(l=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(l);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(l)}_handleScroll(l){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 s=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:s,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const l=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(l*(this._smoothScrollState.target-this._smoothScrollState.origin)),l<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(l,s){const n=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(s<0&&this._viewportElement.scrollTop!==0||s>0&&n<this._lastRecordedBufferHeight)||(l.cancelable&&l.preventDefault(),!1)}handleWheel(l){const s=this._getPixelsScrolled(l);return s!==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+s:this._smoothScrollState.target+=s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()):this._viewportElement.scrollTop+=s,this._bubbleScroll(l,s))}scrollLines(l){if(l!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const s=l*this._currentRowHeight;this._smoothScrollState.startTime=Date.now(),this._smoothScrollPercent()<1?(this._smoothScrollState.origin=this._viewportElement.scrollTop,this._smoothScrollState.target=this._smoothScrollState.origin+s,this._smoothScrollState.target=Math.max(Math.min(this._smoothScrollState.target,this._viewportElement.scrollHeight),0),this._smoothScroll()):this._clearSmoothScrollState()}else this._onRequestScrollLines.fire({amount:l,suppressScrollEvent:!1})}_getPixelsScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let s=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_LINE?s*=this._currentRowHeight:l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._currentRowHeight*this._bufferService.rows),s}getBufferElements(l,s){var g;let n,_="";const C=[],w=s??this._bufferService.buffer.lines.length,k=this._bufferService.buffer.lines;for(let L=l;L<w;L++){const R=k.get(L);if(!R)continue;const A=(g=k.get(L+1))==null?void 0:g.isWrapped;if(_+=R.translateToString(!A),!A||L===k.length-1){const M=document.createElement("div");M.textContent=_,C.push(M),_.length>0&&(n=M),_=""}}return{bufferElements:C,cursorElement:n}}getLinesScrolled(l){if(l.deltaY===0||l.shiftKey)return 0;let s=this._applyScrollModifier(l.deltaY,l);return l.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(s/=this._currentRowHeight+0,this._wheelPartialScroll+=s,s=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):l.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._bufferService.rows),s}_applyScrollModifier(l,s){const n=this._optionsService.rawOptions.fastScrollModifier;return n==="alt"&&s.altKey||n==="ctrl"&&s.ctrlKey||n==="shift"&&s.shiftKey?l*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:l*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(l){this._lastTouchY=l.touches[0].pageY}handleTouchMove(l){const s=this._lastTouchY-l.touches[0].pageY;return this._lastTouchY=l.touches[0].pageY,s!==0&&(this._viewportElement.scrollTop+=s,this._bubbleScroll(l,s))}};o.Viewport=u=f([m(2,v.IBufferService),m(3,v.IOptionsService),m(4,p.ICharSizeService),m(5,p.IRenderService),m(6,p.ICoreBrowserService),m(7,p.IThemeService)],u)},3107:function(y,o,c){var f=this&&this.__decorate||function(v,u,l,s){var n,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,l,s);else for(var w=v.length-1;w>=0;w--)(n=v[w])&&(C=(_<3?n(C):_>3?n(u,l,C):n(u,l))||C);return _>3&&C&&Object.defineProperty(u,l,C),C},m=this&&this.__param||function(v,u){return function(l,s){u(l,s,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferDecorationRenderer=void 0;const h=c(4725),p=c(844),S=c(2585);let E=o.BufferDecorationRenderer=class extends p.Disposable{constructor(v,u,l,s,n){super(),this._screenElement=v,this._bufferService=u,this._coreBrowserService=l,this._decorationService=s,this._renderService=n,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(_=>this._removeDecoration(_))),this.register((0,p.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const v of this._decorationService.decorations)this._renderDecoration(v);this._dimensionsChanged=!1}_renderDecoration(v){this._refreshStyle(v),this._dimensionsChanged&&this._refreshXPosition(v)}_createElement(v){var s;const u=this._coreBrowserService.mainDocument.createElement("div");u.classList.add("xterm-decoration"),u.classList.toggle("xterm-decoration-top-layer",((s=v==null?void 0:v.options)==null?void 0:s.layer)==="top"),u.style.width=`${Math.round((v.options.width||1)*this._renderService.dimensions.css.cell.width)}px`,u.style.height=(v.options.height||1)*this._renderService.dimensions.css.cell.height+"px",u.style.top=(v.marker.line-this._bufferService.buffers.active.ydisp)*this._renderService.dimensions.css.cell.height+"px",u.style.lineHeight=`${this._renderService.dimensions.css.cell.height}px`;const l=v.options.x??0;return l&&l>this._bufferService.cols&&(u.style.display="none"),this._refreshXPosition(v,u),u}_refreshStyle(v){const u=v.marker.line-this._bufferService.buffers.active.ydisp;if(u<0||u>=this._bufferService.rows)v.element&&(v.element.style.display="none",v.onRenderEmitter.fire(v.element));else{let l=this._decorationElements.get(v);l||(l=this._createElement(v),v.element=l,this._decorationElements.set(v,l),this._container.appendChild(l),v.onDispose(()=>{this._decorationElements.delete(v),l.remove()})),l.style.top=u*this._renderService.dimensions.css.cell.height+"px",l.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(l)}}_refreshXPosition(v,u=v.element){if(!u)return;const l=v.options.x??0;(v.options.anchor||"left")==="right"?u.style.right=l?l*this._renderService.dimensions.css.cell.width+"px":"":u.style.left=l?l*this._renderService.dimensions.css.cell.width+"px":""}_removeDecoration(v){var u;(u=this._decorationElements.get(v))==null||u.remove(),this._decorationElements.delete(v),v.dispose()}};o.BufferDecorationRenderer=E=f([m(1,S.IBufferService),m(2,h.ICoreBrowserService),m(3,S.IDecorationService),m(4,h.IRenderService)],E)},5871:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorZoneStore=void 0,o.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(c){if(c.options.overviewRulerOptions){for(const f of this._zones)if(f.color===c.options.overviewRulerOptions.color&&f.position===c.options.overviewRulerOptions.position){if(this._lineIntersectsZone(f,c.marker.line))return;if(this._lineAdjacentToZone(f,c.marker.line,c.options.overviewRulerOptions.position))return void this._addLineToZone(f,c.marker.line)}if(this._zonePoolIndex<this._zonePool.length)return this._zonePool[this._zonePoolIndex].color=c.options.overviewRulerOptions.color,this._zonePool[this._zonePoolIndex].position=c.options.overviewRulerOptions.position,this._zonePool[this._zonePoolIndex].startBufferLine=c.marker.line,this._zonePool[this._zonePoolIndex].endBufferLine=c.marker.line,void this._zones.push(this._zonePool[this._zonePoolIndex++]);this._zones.push({color:c.options.overviewRulerOptions.color,position:c.options.overviewRulerOptions.position,startBufferLine:c.marker.line,endBufferLine:c.marker.line}),this._zonePool.push(this._zones[this._zones.length-1]),this._zonePoolIndex++}}setPadding(c){this._linePadding=c}_lineIntersectsZone(c,f){return f>=c.startBufferLine&&f<=c.endBufferLine}_lineAdjacentToZone(c,f,m){return f>=c.startBufferLine-this._linePadding[m||"full"]&&f<=c.endBufferLine+this._linePadding[m||"full"]}_addLineToZone(c,f){c.startBufferLine=Math.min(c.startBufferLine,f),c.endBufferLine=Math.max(c.endBufferLine,f)}}},5744:function(y,o,c){var f=this&&this.__decorate||function(n,_,C,w){var k,g=arguments.length,L=g<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,C):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(n,_,C,w);else for(var R=n.length-1;R>=0;R--)(k=n[R])&&(L=(g<3?k(L):g>3?k(_,C,L):k(_,C))||L);return g>3&&L&&Object.defineProperty(_,C,L),L},m=this&&this.__param||function(n,_){return function(C,w){_(C,w,n)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OverviewRulerRenderer=void 0;const h=c(5871),p=c(4725),S=c(844),E=c(2585),v={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},l={full:0,left:0,center:0,right:0};let s=o.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(n,_,C,w,k,g,L){var A;super(),this._viewportElement=n,this._screenElement=_,this._bufferService=C,this._decorationService=w,this._renderService=k,this._optionsService=g,this._coreBrowserService=L,this._colorZoneStore=new h.ColorZoneStore,this._shouldUpdateDimensions=!0,this._shouldUpdateAnchor=!0,this._lastKnownBufferLength=0,this._canvas=this._coreBrowserService.mainDocument.createElement("canvas"),this._canvas.classList.add("xterm-decoration-overview-ruler"),this._refreshCanvasDimensions(),(A=this._viewportElement.parentElement)==null||A.insertBefore(this._canvas,this._viewportElement);const R=this._canvas.getContext("2d");if(!R)throw new Error("Ctx cannot be null");this._ctx=R,this._registerDecorationListeners(),this._registerBufferChangeListeners(),this._registerDimensionChangeListeners(),this.register((0,S.toDisposable)(()=>{var M;(M=this._canvas)==null||M.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 n=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=n,u.center=_,u.right=n,this._refreshDrawHeightConstants(),l.full=0,l.left=0,l.center=u.left,l.right=u.left+u.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const n=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(n,12),6)*this._coreBrowserService.dpr);v.left=_,v.center=_,v.right=_}_refreshColorZonePadding(){this._colorZoneStore.setPadding({full:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.full),left:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.left),center:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.center),right:Math.floor(this._bufferService.buffers.active.lines.length/(this._canvas.height-1)*v.right)}),this._lastKnownBufferLength=this._bufferService.buffers.normal.lines.length}_refreshCanvasDimensions(){this._canvas.style.width=`${this._width}px`,this._canvas.width=Math.round(this._width*this._coreBrowserService.dpr),this._canvas.style.height=`${this._screenElement.clientHeight}px`,this._canvas.height=Math.round(this._screenElement.clientHeight*this._coreBrowserService.dpr),this._refreshDrawConstants(),this._refreshColorZonePadding()}_refreshDecorations(){this._shouldUpdateDimensions&&this._refreshCanvasDimensions(),this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height),this._colorZoneStore.clear();for(const _ of this._decorationService.decorations)this._colorZoneStore.addDecoration(_);this._ctx.lineWidth=1;const n=this._colorZoneStore.zones;for(const _ of n)_.position!=="full"&&this._renderColorZone(_);for(const _ of n)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(n){this._ctx.fillStyle=n.color,this._ctx.fillRect(l[n.position||"full"],Math.round((this._canvas.height-1)*(n.startBufferLine/this._bufferService.buffers.active.lines.length)-v[n.position||"full"]/2),u[n.position||"full"],Math.round((this._canvas.height-1)*((n.endBufferLine-n.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[n.position||"full"]))}_queueRefresh(n,_){this._shouldUpdateDimensions=n||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};o.OverviewRulerRenderer=s=f([m(2,E.IBufferService),m(3,E.IDecorationService),m(4,p.IRenderService),m(5,E.IOptionsService),m(6,p.ICoreBrowserService)],s)},2950:function(y,o,c){var f=this&&this.__decorate||function(v,u,l,s){var n,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,l):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,l,s);else for(var w=v.length-1;w>=0;w--)(n=v[w])&&(C=(_<3?n(C):_>3?n(u,l,C):n(u,l))||C);return _>3&&C&&Object.defineProperty(u,l,C),C},m=this&&this.__param||function(v,u){return function(l,s){u(l,s,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CompositionHelper=void 0;const h=c(4725),p=c(2585),S=c(2584);let E=o.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,u,l,s,n,_){this._textarea=v,this._compositionView=u,this._bufferService=l,this._optionsService=s,this._coreService=n,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(v){this._compositionView.textContent=v.data,this.updateCompositionElements(),setTimeout(()=>{this._compositionPosition.end=this._textarea.value.length},0)}compositionend(){this._finalizeComposition(!0)}keydown(v){if(this._isComposing||this._isSendingComposition){if(v.keyCode===229||v.keyCode===16||v.keyCode===17||v.keyCode===18)return!1;this._finalizeComposition(!1)}return v.keyCode!==229||(this._handleAnyTextareaChanges(),!1)}_finalizeComposition(v){if(this._compositionView.classList.remove("active"),this._isComposing=!1,v){const u={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(()=>{if(this._isSendingComposition){let l;this._isSendingComposition=!1,u.start+=this._dataAlreadySent.length,l=this._isComposing?this._textarea.value.substring(u.start,u.end):this._textarea.value.substring(u.start),l.length>0&&this._coreService.triggerDataEvent(l,!0)}},0)}else{this._isSendingComposition=!1;const u=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(u,!0)}}_handleAnyTextareaChanges(){const v=this._textarea.value;setTimeout(()=>{if(!this._isComposing){const u=this._textarea.value,l=u.replace(v,"");this._dataAlreadySent=l,u.length>v.length?this._coreService.triggerDataEvent(l,!0):u.length<v.length?this._coreService.triggerDataEvent(`${S.C0.DEL}`,!0):u.length===v.length&&u!==v&&this._coreService.triggerDataEvent(u,!0)}},0)}updateCompositionElements(v){if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){const u=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),l=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,n=u*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=n+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=l+"px",this._compositionView.style.lineHeight=l+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=n+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(_.width,1)+"px",this._textarea.style.height=Math.max(_.height,1)+"px",this._textarea.style.lineHeight=_.height+"px"}v||setTimeout(()=>this.updateCompositionElements(!0),0)}}};o.CompositionHelper=E=f([m(2,p.IBufferService),m(3,p.IOptionsService),m(4,p.ICoreService),m(5,h.IRenderService)],E)},9806:(y,o)=>{function c(f,m,h){const p=h.getBoundingClientRect(),S=f.getComputedStyle(h),E=parseInt(S.getPropertyValue("padding-left")),v=parseInt(S.getPropertyValue("padding-top"));return[m.clientX-p.left-E,m.clientY-p.top-v]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(f,m,h,p,S,E,v,u,l){if(!E)return;const s=c(f,m,h);return s?(s[0]=Math.ceil((s[0]+(l?v/2:0))/v),s[1]=Math.ceil(s[1]/u),s[0]=Math.min(Math.max(s[0],1),p+(l?1:0)),s[1]=Math.min(Math.max(s[1],1),S),s):void 0}},9504:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const f=c(2584);function m(u,l,s,n){const _=u-h(u,s),C=l-h(l,s),w=Math.abs(_-C)-function(k,g,L){let R=0;const A=k-h(k,L),M=g-h(g,L);for(let T=0;T<Math.abs(A-M);T++){const N=p(k,g)==="A"?-1:1,W=L.buffer.lines.get(A+N*T);W!=null&&W.isWrapped&&R++}return R}(u,l,s);return v(w,E(p(u,l),n))}function h(u,l){let s=0,n=l.buffer.lines.get(u),_=n==null?void 0:n.isWrapped;for(;_&&u>=0&&u<l.rows;)s++,n=l.buffer.lines.get(--u),_=n==null?void 0:n.isWrapped;return s}function p(u,l){return u>l?"A":"B"}function S(u,l,s,n,_,C){let w=u,k=l,g="";for(;w!==s||k!==n;)w+=_?1:-1,_&&w>C.cols-1?(g+=C.buffer.translateBufferLineToString(k,!1,u,w),w=0,u=0,k++):!_&&w<0&&(g+=C.buffer.translateBufferLineToString(k,!1,0,u+1),w=C.cols-1,u=w,k--);return g+C.buffer.translateBufferLineToString(k,!1,u,w)}function E(u,l){const s=l?"O":"[";return f.C0.ESC+s+u}function v(u,l){u=Math.floor(u);let s="";for(let n=0;n<u;n++)s+=l;return s}o.moveToCellSequence=function(u,l,s,n){const _=s.buffer.x,C=s.buffer.y;if(!s.buffer.hasScrollback)return function(g,L,R,A,M,T){return m(L,A,M,T).length===0?"":v(S(g,L,g,L-h(L,M),!1,M).length,E("D",T))}(_,C,0,l,s,n)+m(C,l,s,n)+function(g,L,R,A,M,T){let N;N=m(L,A,M,T).length>0?A-h(A,M):L;const W=A,K=function(q,H,b,D,P,B){let z;return z=m(b,D,P,B).length>0?D-h(D,P):H,q<b&&z<=D||q>=b&&z<D?"C":"D"}(g,L,R,A,M,T);return v(S(g,N,R,W,K==="C",M).length,E(K,T))}(_,C,u,l,s,n);let w;if(C===l)return w=_>u?"D":"C",v(Math.abs(_-u),E(w,n));w=C>l?"D":"C";const k=Math.abs(C-l);return v(function(g,L){return L.cols-g}(C>l?u:_,s)+(k-1)*s.cols+1+((C>l?_:u)-1),E(w,n))}},1296:function(y,o,c){var f=this&&this.__decorate||function(T,N,W,K){var q,H=arguments.length,b=H<3?N:K===null?K=Object.getOwnPropertyDescriptor(N,W):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(T,N,W,K);else for(var D=T.length-1;D>=0;D--)(q=T[D])&&(b=(H<3?q(b):H>3?q(N,W,b):q(N,W))||b);return H>3&&b&&Object.defineProperty(N,W,b),b},m=this&&this.__param||function(T,N){return function(W,K){N(W,K,T)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRenderer=void 0;const h=c(3787),p=c(2550),S=c(2223),E=c(6171),v=c(6052),u=c(4725),l=c(8055),s=c(8460),n=c(844),_=c(2585),C="xterm-dom-renderer-owner-",w="xterm-rows",k="xterm-fg-",g="xterm-bg-",L="xterm-focus",R="xterm-selection";let A=1,M=o.DomRenderer=class extends n.Disposable{constructor(T,N,W,K,q,H,b,D,P,B,z,V,Q){super(),this._terminal=T,this._document=N,this._element=W,this._screenElement=K,this._viewportElement=q,this._helperContainer=H,this._linkifier2=b,this._charSizeService=P,this._optionsService=B,this._bufferService=z,this._coreBrowserService=V,this._themeService=Q,this._terminalClass=A++,this._rowElements=[],this._selectionRenderModel=(0,v.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new s.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(w),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(R),this._selectionContainer.setAttribute("aria-hidden","true"),this.dimensions=(0,E.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Y=>this._injectCss(Y))),this._injectCss(this._themeService.colors),this._rowFactory=D.createInstance(h.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Y=>this._handleLinkHover(Y))),this.register(this._linkifier2.onHideLinkUnderline(Y=>this._handleLinkLeave(Y))),this.register((0,n.toDisposable)(()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const T=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*T,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*T),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/T),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/T),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 W of this._rowElements)W.style.width=`${this.dimensions.css.canvas.width}px`,W.style.height=`${this.dimensions.css.cell.height}px`,W.style.lineHeight=`${this.dimensions.css.cell.height}px`,W.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const N=`${this._terminalSelector} .${w} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=N,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(T){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let N=`${this._terminalSelector} .${w} { color: ${T.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;N+=`${this._terminalSelector} .${w} .xterm-dim { color: ${l.color.multiplyOpacity(T.foreground,.5).css};}`,N+=`${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 W=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,q=`blink_block_${this._terminalClass}`;N+=`@keyframes ${W} { 50% { border-bottom-style: hidden; }}`,N+=`@keyframes ${K} { 50% { box-shadow: none; }}`,N+=`@keyframes ${q} { 0% { background-color: ${T.cursor.css}; color: ${T.cursorAccent.css}; } 50% { background-color: inherit; color: ${T.cursor.css}; }}`,N+=`${this._terminalSelector} .${w}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${W} 1s step-end infinite;}${this._terminalSelector} .${w}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${w}.${L} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block { background-color: ${T.cursor.css}; color: ${T.cursorAccent.css};}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${T.cursor.css} !important; color: ${T.cursorAccent.css} !important;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${T.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${T.cursor.css} inset;}${this._terminalSelector} .${w} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${T.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,N+=`${this._terminalSelector} .${R} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${R} div { position: absolute; background-color: ${T.selectionBackgroundOpaque.css};}${this._terminalSelector} .${R} div { position: absolute; background-color: ${T.selectionInactiveBackgroundOpaque.css};}`;for(const[H,b]of T.ansi.entries())N+=`${this._terminalSelector} .${k}${H} { color: ${b.css}; }${this._terminalSelector} .${k}${H}.xterm-dim { color: ${l.color.multiplyOpacity(b,.5).css}; }${this._terminalSelector} .${g}${H} { background-color: ${b.css}; }`;N+=`${this._terminalSelector} .${k}${S.INVERTED_DEFAULT_COLOR} { color: ${l.color.opaque(T.background).css}; }${this._terminalSelector} .${k}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${l.color.multiplyOpacity(l.color.opaque(T.background),.5).css}; }${this._terminalSelector} .${g}${S.INVERTED_DEFAULT_COLOR} { background-color: ${T.foreground.css}; }`,this._themeStyleElement.textContent=N}_setDefaultSpacing(){const T=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${T}px`,this._rowFactory.defaultSpacing=T}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(T,N){for(let W=this._rowElements.length;W<=N;W++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>N;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(T,N){this._refreshRowElements(T,N),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(L),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(L),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(T,N,W){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(T,N,W),this.renderRows(0,this._bufferService.rows-1),!T||!N)return;this._selectionRenderModel.update(this._terminal,T,N,W);const K=this._selectionRenderModel.viewportStartRow,q=this._selectionRenderModel.viewportEndRow,H=this._selectionRenderModel.viewportCappedStartRow,b=this._selectionRenderModel.viewportCappedEndRow;if(H>=this._bufferService.rows||b<0)return;const D=this._document.createDocumentFragment();if(W){const P=T[0]>N[0];D.appendChild(this._createSelectionElement(H,P?N[0]:T[0],P?T[0]:N[0],b-H+1))}else{const P=K===H?T[0]:0,B=H===q?N[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(H,P,B));const z=b-H-1;if(D.appendChild(this._createSelectionElement(H+1,0,this._bufferService.cols,z)),H!==b){const V=q===b?N[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(b,0,V))}}this._selectionContainer.appendChild(D)}_createSelectionElement(T,N,W,K=1){const q=this._document.createElement("div"),H=N*this.dimensions.css.cell.width;let b=this.dimensions.css.cell.width*(W-N);return H+b>this.dimensions.css.canvas.width&&(b=this.dimensions.css.canvas.width-H),q.style.height=K*this.dimensions.css.cell.height+"px",q.style.top=T*this.dimensions.css.cell.height+"px",q.style.left=`${H}px`,q.style.width=`${b}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 T of this._rowElements)T.replaceChildren()}renderRows(T,N){const W=this._bufferService.buffer,K=W.ybase+W.y,q=Math.min(W.x,this._bufferService.cols-1),H=this._optionsService.rawOptions.cursorBlink,b=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;for(let P=T;P<=N;P++){const B=P+W.ydisp,z=this._rowElements[P],V=W.lines.get(B);if(!z||!V)break;z.replaceChildren(...this._rowFactory.createRow(V,B,B===K,b,D,q,H,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${C}${this._terminalClass}`}_handleLinkHover(T){this._setCellUnderline(T.x1,T.x2,T.y1,T.y2,T.cols,!0)}_handleLinkLeave(T){this._setCellUnderline(T.x1,T.x2,T.y1,T.y2,T.cols,!1)}_setCellUnderline(T,N,W,K,q,H){W<0&&(T=0),K<0&&(N=0);const b=this._bufferService.rows-1;W=Math.max(Math.min(W,b),0),K=Math.max(Math.min(K,b),0),q=Math.min(q,this._bufferService.cols);const D=this._bufferService.buffer,P=D.ybase+D.y,B=Math.min(D.x,q-1),z=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,Q=this._optionsService.rawOptions.cursorInactiveStyle;for(let Y=W;Y<=K;++Y){const O=Y+D.ydisp,x=this._rowElements[Y],F=D.lines.get(O);if(!x||!F)break;x.replaceChildren(...this._rowFactory.createRow(F,O,O===P,V,Q,B,z,this.dimensions.css.cell.width,this._widthCache,H?Y===W?T:0:-1,H?(Y===K?N:q)-1:-1))}}};o.DomRenderer=M=f([m(7,_.IInstantiationService),m(8,u.ICharSizeService),m(9,_.IOptionsService),m(10,_.IBufferService),m(11,u.ICoreBrowserService),m(12,u.IThemeService)],M)},3787:function(y,o,c){var f=this&&this.__decorate||function(w,k,g,L){var R,A=arguments.length,M=A<3?k:L===null?L=Object.getOwnPropertyDescriptor(k,g):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(w,k,g,L);else for(var T=w.length-1;T>=0;T--)(R=w[T])&&(M=(A<3?R(M):A>3?R(k,g,M):R(k,g))||M);return A>3&&M&&Object.defineProperty(k,g,M),M},m=this&&this.__param||function(w,k){return function(g,L){k(g,L,w)}};Object.defineProperty(o,"__esModule",{value:!0}),o.DomRendererRowFactory=void 0;const h=c(2223),p=c(643),S=c(511),E=c(2585),v=c(8055),u=c(4725),l=c(4269),s=c(6171),n=c(3734);let _=o.DomRendererRowFactory=class{constructor(w,k,g,L,R,A,M){this._document=w,this._characterJoinerService=k,this._optionsService=g,this._coreBrowserService=L,this._coreService=R,this._decorationService=A,this._themeService=M,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(w,k,g){this._selectionStart=w,this._selectionEnd=k,this._columnSelectMode=g}createRow(w,k,g,L,R,A,M,T,N,W,K){const q=[],H=this._characterJoinerService.getJoinedCharacters(k),b=this._themeService.colors;let D,P=w.getNoBgTrimmedLength();g&&P<A+1&&(P=A+1);let B=0,z="",V=0,Q=0,Y=0,O=!1,x=0,F=!1,I=0;const $=[],j=W!==-1&&K!==-1;for(let Z=0;Z<P;Z++){w.loadCell(Z,this._workCell);let ie=this._workCell.getWidth();if(ie===0)continue;let de=!1,Ae=Z,J=this._workCell;if(H.length>0&&Z===H[0][0]){de=!0;const ae=H.shift();J=new l.JoinedCellData(this._workCell,w.translateToString(!0,ae[0],ae[1]),ae[1]-ae[0]),Ae=ae[1]-1,ie=J.getWidth()}const Pr=this._isCellInSelection(Z,k),zs=g&&Z===A,js=j&&Z>=W&&Z<=K;let Us=!1;this._decorationService.forEachDecorationAtCell(Z,k,void 0,ae=>{Us=!0});let ki=J.getChars()||p.WHITESPACE_CELL_CHAR;if(ki===" "&&(J.isUnderline()||J.isOverline())&&(ki=" "),I=ie*T-N.get(ki,J.isBold(),J.isItalic()),D){if(B&&(Pr&&F||!Pr&&!F&&J.bg===V)&&(Pr&&F&&b.selectionForeground||J.fg===Q)&&J.extended.ext===Y&&js===O&&I===x&&!zs&&!de&&!Us){J.isInvisible()?z+=p.WHITESPACE_CELL_CHAR:z+=ki,B++;continue}B&&(D.textContent=z),D=this._document.createElement("span"),B=0,z=""}else D=this._document.createElement("span");if(V=J.bg,Q=J.fg,Y=J.extended.ext,O=js,x=I,F=Pr,de&&A>=Z&&A<=Ae&&(A=Z),!this._coreService.isCursorHidden&&zs&&this._coreService.isCursorInitialized){if($.push("xterm-cursor"),this._coreBrowserService.isFocused)M&&$.push("xterm-cursor-blink"),$.push(L==="bar"?"xterm-cursor-bar":L==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(R)switch(R){case"outline":$.push("xterm-cursor-outline");break;case"block":$.push("xterm-cursor-block");break;case"bar":$.push("xterm-cursor-bar");break;case"underline":$.push("xterm-cursor-underline")}}if(J.isBold()&&$.push("xterm-bold"),J.isItalic()&&$.push("xterm-italic"),J.isDim()&&$.push("xterm-dim"),z=J.isInvisible()?p.WHITESPACE_CELL_CHAR:J.getChars()||p.WHITESPACE_CELL_CHAR,J.isUnderline()&&($.push(`xterm-underline-${J.extended.underlineStyle}`),z===" "&&(z=" "),!J.isUnderlineColorDefault()))if(J.isUnderlineColorRGB())D.style.textDecorationColor=`rgb(${n.AttributeData.toColorRGB(J.getUnderlineColor()).join(",")})`;else{let ae=J.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&J.isBold()&&ae<8&&(ae+=8),D.style.textDecorationColor=b.ansi[ae].css}J.isOverline()&&($.push("xterm-overline"),z===" "&&(z=" ")),J.isStrikethrough()&&$.push("xterm-strikethrough"),js&&(D.style.textDecoration="underline");let $e=J.getFgColor(),Ar=J.getFgColorMode(),st=J.getBgColor(),Br=J.getBgColorMode();const $s=!!J.isInverse();if($s){const ae=$e;$e=st,st=ae;const Bu=Ar;Ar=Br,Br=Bu}let yt,bi,Ct,Mr=!1;switch(this._decorationService.forEachDecorationAtCell(Z,k,void 0,ae=>{ae.options.layer!=="top"&&Mr||(ae.backgroundColorRGB&&(Br=50331648,st=ae.backgroundColorRGB.rgba>>8&16777215,yt=ae.backgroundColorRGB),ae.foregroundColorRGB&&(Ar=50331648,$e=ae.foregroundColorRGB.rgba>>8&16777215,bi=ae.foregroundColorRGB),Mr=ae.options.layer==="top")}),!Mr&&Pr&&(yt=this._coreBrowserService.isFocused?b.selectionBackgroundOpaque:b.selectionInactiveBackgroundOpaque,st=yt.rgba>>8&16777215,Br=50331648,Mr=!0,b.selectionForeground&&(Ar=50331648,$e=b.selectionForeground.rgba>>8&16777215,bi=b.selectionForeground)),Mr&&$.push("xterm-decoration-top"),Br){case 16777216:case 33554432:Ct=b.ansi[st],$.push(`xterm-bg-${st}`);break;case 50331648:Ct=v.channels.toColor(st>>16,st>>8&255,255&st),this._addStyle(D,`background-color:#${C((st>>>0).toString(16),"0",6)}`);break;default:$s?(Ct=b.foreground,$.push(`xterm-bg-${h.INVERTED_DEFAULT_COLOR}`)):Ct=b.background}switch(yt||J.isDim()&&(yt=v.color.multiplyOpacity(Ct,.5)),Ar){case 16777216:case 33554432:J.isBold()&&$e<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&($e+=8),this._applyMinimumContrast(D,Ct,b.ansi[$e],J,yt,void 0)||$.push(`xterm-fg-${$e}`);break;case 50331648:const ae=v.channels.toColor($e>>16&255,$e>>8&255,255&$e);this._applyMinimumContrast(D,Ct,ae,J,yt,bi)||this._addStyle(D,`color:#${C($e.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(D,Ct,b.foreground,J,yt,bi)||$s&&$.push(`xterm-fg-${h.INVERTED_DEFAULT_COLOR}`)}$.length&&(D.className=$.join(" "),$.length=0),zs||de||Us?D.textContent=z:B++,I!==this.defaultSpacing&&(D.style.letterSpacing=`${I}px`),q.push(D),Z=Ae}return D&&B&&(D.textContent=z),q}_applyMinimumContrast(w,k,g,L,R,A){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,s.treatGlyphAsBackgroundColor)(L.getCode()))return!1;const M=this._getContrastCache(L);let T;if(R||A||(T=M.getColor(k.rgba,g.rgba)),T===void 0){const N=this._optionsService.rawOptions.minimumContrastRatio/(L.isDim()?2:1);T=v.color.ensureContrastRatio(R||k,A||g,N),M.setColor((R||k).rgba,(A||g).rgba,T??null)}return!!T&&(this._addStyle(w,`color:${T.css}`),!0)}_getContrastCache(w){return w.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(w,k){w.setAttribute("style",`${w.getAttribute("style")||""}${k};`)}_isCellInSelection(w,k){const g=this._selectionStart,L=this._selectionEnd;return!(!g||!L)&&(this._columnSelectMode?g[0]<=L[0]?w>=g[0]&&k>=g[1]&&w<L[0]&&k<=L[1]:w<g[0]&&k>=g[1]&&w>=L[0]&&k<=L[1]:k>g[1]&&k<L[1]||g[1]===L[1]&&k===g[1]&&w>=g[0]&&w<L[0]||g[1]<L[1]&&k===L[1]&&w<L[0]||g[1]<L[1]&&k===g[1]&&w>=g[0])}};function C(w,k,g){for(;w.length<g;)w=k+w;return w}o.DomRendererRowFactory=_=f([m(1,u.ICharacterJoinerService),m(2,E.IOptionsService),m(3,u.ICoreBrowserService),m(4,E.ICoreService),m(5,E.IDecorationService),m(6,u.IThemeService)],_)},2550:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WidthCache=void 0,o.WidthCache=class{constructor(c,f){this._flat=new Float32Array(256),this._font="",this._fontSize=0,this._weight="normal",this._weightBold="bold",this._measureElements=[],this._container=c.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 m=c.createElement("span");m.classList.add("xterm-char-measure-element");const h=c.createElement("span");h.classList.add("xterm-char-measure-element"),h.style.fontWeight="bold";const p=c.createElement("span");p.classList.add("xterm-char-measure-element"),p.style.fontStyle="italic";const S=c.createElement("span");S.classList.add("xterm-char-measure-element"),S.style.fontWeight="bold",S.style.fontStyle="italic",this._measureElements=[m,h,p,S],this._container.appendChild(m),this._container.appendChild(h),this._container.appendChild(p),this._container.appendChild(S),f.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(c,f,m,h){c===this._font&&f===this._fontSize&&m===this._weight&&h===this._weightBold||(this._font=c,this._fontSize=f,this._weight=m,this._weightBold=h,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${m}`,this._measureElements[1].style.fontWeight=`${h}`,this._measureElements[2].style.fontWeight=`${m}`,this._measureElements[3].style.fontWeight=`${h}`,this.clear())}get(c,f,m){let h=0;if(!f&&!m&&c.length===1&&(h=c.charCodeAt(0))<256){if(this._flat[h]!==-9999)return this._flat[h];const E=this._measure(c,0);return E>0&&(this._flat[h]=E),E}let p=c;f&&(p+="B"),m&&(p+="I");let S=this._holey.get(p);if(S===void 0){let E=0;f&&(E|=1),m&&(E|=2),S=this._measure(c,E),S>0&&this._holey.set(p,S)}return S}_measure(c,f){const m=this._measureElements[f];return m.textContent=c.repeat(32),m.offsetWidth/32}}},2223:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.TEXT_BASELINE=o.DIM_OPACITY=o.INVERTED_DEFAULT_COLOR=void 0;const f=c(6114);o.INVERTED_DEFAULT_COLOR=257,o.DIM_OPACITY=.5,o.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(y,o)=>{function c(m){return 57508<=m&&m<=57558}function f(m){return m>=128512&&m<=128591||m>=127744&&m<=128511||m>=128640&&m<=128767||m>=9728&&m<=9983||m>=9984&&m<=10175||m>=65024&&m<=65039||m>=129280&&m<=129535||m>=127462&&m<=127487}Object.defineProperty(o,"__esModule",{value:!0}),o.computeNextVariantOffset=o.createRenderDimensions=o.treatGlyphAsBackgroundColor=o.allowRescaling=o.isEmoji=o.isRestrictedPowerlineGlyph=o.isPowerlineGlyph=o.throwIfFalsy=void 0,o.throwIfFalsy=function(m){if(!m)throw new Error("value must not be falsy");return m},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(m){return 57520<=m&&m<=57527},o.isEmoji=f,o.allowRescaling=function(m,h,p,S){return h===1&&p>Math.ceil(1.5*S)&&m!==void 0&&m>255&&!f(m)&&!c(m)&&!function(E){return 57344<=E&&E<=63743}(m)},o.treatGlyphAsBackgroundColor=function(m){return c(m)||function(h){return 9472<=h&&h<=9631}(m)},o.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}}}},o.computeNextVariantOffset=function(m,h,p=0){return(m-(2*Math.round(h)-p))%(2*Math.round(h))}},6052:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createSelectionRenderModel=void 0;class c{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(m,h,p,S=!1){if(this.selectionStart=h,this.selectionEnd=p,!h||!p||h[0]===p[0]&&h[1]===p[1])return void this.clear();const E=m.buffers.active.ydisp,v=h[1]-E,u=p[1]-E,l=Math.max(v,0),s=Math.min(u,m.rows-1);l>=m.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=v,this.viewportEndRow=u,this.viewportCappedStartRow=l,this.viewportCappedEndRow=s,this.startCol=h[0],this.endCol=p[0])}isCellSelected(m,h,p){return!!this.hasSelection&&(p-=m.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?h>=this.startCol&&p>=this.viewportCappedStartRow&&h<this.endCol&&p<=this.viewportCappedEndRow:h<this.startCol&&p>=this.viewportCappedStartRow&&h>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&h>=this.startCol&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&h<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&h>=this.startCol)}}o.createSelectionRenderModel=function(){return new c}},456:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionModel=void 0,o.SelectionModel=class{constructor(c){this._bufferService=c,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 c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?c%this._bufferService.cols==0?[this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)-1]:[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[c,this.selectionStart[1]]}if(this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]){const c=this.selectionStart[0]+this.selectionStartLength;return c>this._bufferService.cols?[c%this._bufferService.cols,this.selectionStart[1]+Math.floor(c/this._bufferService.cols)]:[Math.max(c,this.selectionEnd[0]),this.selectionEnd[1]]}return this.selectionEnd}}areSelectionValuesReversed(){const c=this.selectionStart,f=this.selectionEnd;return!(!c||!f)&&(c[1]>f[1]||c[1]===f[1]&&c[0]>f[0])}handleTrim(c){return this.selectionStart&&(this.selectionStart[1]-=c),this.selectionEnd&&(this.selectionEnd[1]-=c),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)}}},428:function(y,o,c){var f=this&&this.__decorate||function(s,n,_,C){var w,k=arguments.length,g=k<3?n:C===null?C=Object.getOwnPropertyDescriptor(n,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,n,_,C);else for(var L=s.length-1;L>=0;L--)(w=s[L])&&(g=(k<3?w(g):k>3?w(n,_,g):w(n,_))||g);return k>3&&g&&Object.defineProperty(n,_,g),g},m=this&&this.__param||function(s,n){return function(_,C){n(_,C,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharSizeService=void 0;const h=c(2585),p=c(8460),S=c(844);let E=o.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(s,n,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new l(this._optionsService))}catch{this._measureStrategy=this.register(new u(s,n,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],()=>this.measure()))}measure(){const s=this._measureStrategy.measure();s.width===this.width&&s.height===this.height||(this.width=s.width,this.height=s.height,this._onCharSizeChange.fire())}};o.CharSizeService=E=f([m(2,h.IOptionsService)],E);class v extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(n,_){n!==void 0&&n>0&&_!==void 0&&_>0&&(this._result.width=n,this._result.height=_)}}class u extends v{constructor(n,_,C){super(),this._document=n,this._parentElement=_,this._optionsService=C,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class l extends v{constructor(n){super(),this._optionsService=n,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const n=this._ctx.measureText("W");return this._validateAndSet(n.width,n.fontBoundingBoxAscent+n.fontBoundingBoxDescent),this._result}}},4269:function(y,o,c){var f=this&&this.__decorate||function(l,s,n,_){var C,w=arguments.length,k=w<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,n):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(l,s,n,_);else for(var g=l.length-1;g>=0;g--)(C=l[g])&&(k=(w<3?C(k):w>3?C(s,n,k):C(s,n))||k);return w>3&&k&&Object.defineProperty(s,n,k),k},m=this&&this.__param||function(l,s){return function(n,_){s(n,_,l)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CharacterJoinerService=o.JoinedCellData=void 0;const h=c(3734),p=c(643),S=c(511),E=c(2585);class v extends h.AttributeData{constructor(s,n,_){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=n,this._width=_}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(s){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=v;let u=o.CharacterJoinerService=class Tu{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(s){const n={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(n),n.id}deregister(s){for(let n=0;n<this._characterJoiners.length;n++)if(this._characterJoiners[n].id===s)return this._characterJoiners.splice(n,1),!0;return!1}getJoinedCharacters(s){if(this._characterJoiners.length===0)return[];const n=this._bufferService.buffer.lines.get(s);if(!n||n.length===0)return[];const _=[],C=n.translateToString(!0);let w=0,k=0,g=0,L=n.getFg(0),R=n.getBg(0);for(let A=0;A<n.getTrimmedLength();A++)if(n.loadCell(A,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==L||this._workCell.bg!==R){if(A-w>1){const M=this._getJoinedRanges(C,g,k,n,w);for(let T=0;T<M.length;T++)_.push(M[T])}w=A,g=k,L=this._workCell.fg,R=this._workCell.bg}k+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-w>1){const A=this._getJoinedRanges(C,g,k,n,w);for(let M=0;M<A.length;M++)_.push(A[M])}return _}_getJoinedRanges(s,n,_,C,w){const k=s.substring(n,_);let g=[];try{g=this._characterJoiners[0].handler(k)}catch(L){console.error(L)}for(let L=1;L<this._characterJoiners.length;L++)try{const R=this._characterJoiners[L].handler(k);for(let A=0;A<R.length;A++)Tu._mergeRanges(g,R[A])}catch(R){console.error(R)}return this._stringRangesToCellRanges(g,C,w),g}_stringRangesToCellRanges(s,n,_){let C=0,w=!1,k=0,g=s[C];if(g){for(let L=_;L<this._bufferService.cols;L++){const R=n.getWidth(L),A=n.getString(L).length||p.WHITESPACE_CELL_CHAR.length;if(R!==0){if(!w&&g[0]<=k&&(g[0]=L,w=!0),g[1]<=k){if(g[1]=L,g=s[++C],!g)break;g[0]<=k?(g[0]=L,w=!0):w=!1}k+=A}}g&&(g[1]=this._bufferService.cols)}}static _mergeRanges(s,n){let _=!1;for(let C=0;C<s.length;C++){const w=s[C];if(_){if(n[1]<=w[0])return s[C-1][1]=n[1],s;if(n[1]<=w[1])return s[C-1][1]=Math.max(n[1],w[1]),s.splice(C,1),s;s.splice(C,1),C--}else{if(n[1]<=w[0])return s.splice(C,0,n),s;if(n[1]<=w[1])return w[0]=Math.min(n[0],w[0]),s;n[0]<w[1]&&(w[0]=Math.min(n[0],w[0]),_=!0)}}return _?s[s.length-1][1]=n[1]:s.push(n),s}};o.CharacterJoinerService=u=f([m(0,E.IBufferService)],u)},5114:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const f=c(844),m=c(8460),h=c(3656);class p extends f.Disposable{constructor(v,u,l){super(),this._textarea=v,this._window=u,this.mainDocument=l,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new m.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this.register((0,m.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(v){this._window!==v&&(this._window=v,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}}o.CoreBrowserService=p;class S extends f.Disposable{constructor(v){super(),this._parentWindow=v,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new m.EventEmitter),this.onDprChange=this._onDprChange.event,this._outerListener=()=>this._setDprAndFireIfDiffers(),this._currentDevicePixelRatio=this._parentWindow.devicePixelRatio,this._updateDpr(),this._setWindowResizeListener(),this.register((0,f.toDisposable)(()=>this.clearListener()))}setWindow(v){this._parentWindow=v,this._setWindowResizeListener(),this._setDprAndFireIfDiffers()}_setWindowResizeListener(){this._windowResizeListener.value=(0,h.addDisposableDomListener)(this._parentWindow,"resize",()=>this._setDprAndFireIfDiffers())}_setDprAndFireIfDiffers(){this._parentWindow.devicePixelRatio!==this._currentDevicePixelRatio&&this._onDprChange.fire(this._parentWindow.devicePixelRatio),this._updateDpr()}_updateDpr(){var v;this._outerListener&&((v=this._resolutionMediaMatchList)==null||v.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:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.LinkProviderService=void 0;const f=c(844);class m extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(p){return this.linkProviders.push(p),{dispose:()=>{const S=this.linkProviders.indexOf(p);S!==-1&&this.linkProviders.splice(S,1)}}}}o.LinkProviderService=m},8934:function(y,o,c){var f=this&&this.__decorate||function(E,v,u,l){var s,n=arguments.length,_=n<3?v:l===null?l=Object.getOwnPropertyDescriptor(v,u):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(E,v,u,l);else for(var C=E.length-1;C>=0;C--)(s=E[C])&&(_=(n<3?s(_):n>3?s(v,u,_):s(v,u))||_);return n>3&&_&&Object.defineProperty(v,u,_),_},m=this&&this.__param||function(E,v){return function(u,l){v(u,l,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.MouseService=void 0;const h=c(4725),p=c(9806);let S=o.MouseService=class{constructor(E,v){this._renderService=E,this._charSizeService=v}getCoords(E,v,u,l,s){return(0,p.getCoords)(window,E,v,u,l,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,s)}getMouseReportCoords(E,v){const u=(0,p.getCoordsRelativeToElement)(window,E,v);if(this._charSizeService.hasValidSize)return u[0]=Math.min(Math.max(u[0],0),this._renderService.dimensions.css.canvas.width-1),u[1]=Math.min(Math.max(u[1],0),this._renderService.dimensions.css.canvas.height-1),{col:Math.floor(u[0]/this._renderService.dimensions.css.cell.width),row:Math.floor(u[1]/this._renderService.dimensions.css.cell.height),x:Math.floor(u[0]),y:Math.floor(u[1])}}};o.MouseService=S=f([m(0,h.IRenderService),m(1,h.ICharSizeService)],S)},3230:function(y,o,c){var f=this&&this.__decorate||function(s,n,_,C){var w,k=arguments.length,g=k<3?n:C===null?C=Object.getOwnPropertyDescriptor(n,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,n,_,C);else for(var L=s.length-1;L>=0;L--)(w=s[L])&&(g=(k<3?w(g):k>3?w(n,_,g):w(n,_))||g);return k>3&&g&&Object.defineProperty(n,_,g),g},m=this&&this.__param||function(s,n){return function(_,C){n(_,C,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.RenderService=void 0;const h=c(6193),p=c(4725),S=c(8460),E=c(844),v=c(7226),u=c(2585);let l=o.RenderService=class extends E.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(s,n,_,C,w,k,g,L){super(),this._rowCount=s,this._charSizeService=C,this._renderer=this.register(new E.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new E.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 S.EventEmitter),this.onDimensionsChange=this._onDimensionsChange.event,this._onRenderedViewportChange=this.register(new S.EventEmitter),this.onRenderedViewportChange=this._onRenderedViewportChange.event,this._onRender=this.register(new S.EventEmitter),this.onRender=this._onRender.event,this._onRefreshRequest=this.register(new S.EventEmitter),this.onRefreshRequest=this._onRefreshRequest.event,this._renderDebouncer=new h.RenderDebouncer((R,A)=>this._renderRows(R,A),g),this.register(this._renderDebouncer),this.register(g.onDprChange(()=>this.handleDevicePixelRatioChange())),this.register(k.onResize(()=>this._fullRefresh())),this.register(k.buffers.onBufferActivate(()=>{var R;return(R=this._renderer.value)==null?void 0:R.clear()})),this.register(_.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(w.onDecorationRegistered(()=>this._fullRefresh())),this.register(w.onDecorationRemoved(()=>this._fullRefresh())),this.register(_.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(k.cols,k.rows),this._fullRefresh()})),this.register(_.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(k.buffer.y,k.buffer.y,!0))),this.register(L.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(g.window,n),this.register(g.onWindowChange(R=>this._registerIntersectionObserver(R,n)))}_registerIntersectionObserver(s,n){if("IntersectionObserver"in s){const _=new s.IntersectionObserver(C=>this._handleIntersectionChange(C[C.length-1]),{threshold:0});_.observe(n),this._observerDisposable.value=(0,E.toDisposable)(()=>_.disconnect())}}_handleIntersectionChange(s){this._isPaused=s.isIntersecting===void 0?s.intersectionRatio===0:!s.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(s,n,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(s,n,this._rowCount))}_renderRows(s,n){this._renderer.value&&(s=Math.min(s,this._rowCount-1),n=Math.min(n,this._rowCount-1),this._renderer.value.renderRows(s,n),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:s,end:n}),this._onRender.fire({start:s,end:n}),this._isNextRenderRedrawOnly=!0)}resize(s,n){this._rowCount=n,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(s){this._renderer.value=s,this._renderer.value&&(this._renderer.value.onRequestRedraw(n=>this.refreshRows(n.start,n.end,!0)),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(s){return this._renderDebouncer.addRefreshCallback(s)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var s,n;this._renderer.value&&((n=(s=this._renderer.value).clearTextureAtlas)==null||n.call(s),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(s,n){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(s,n)}):this._renderer.value.handleResize(s,n),this._fullRefresh())}handleCharSizeChanged(){var s;(s=this._renderer.value)==null||s.handleCharSizeChanged()}handleBlur(){var s;(s=this._renderer.value)==null||s.handleBlur()}handleFocus(){var s;(s=this._renderer.value)==null||s.handleFocus()}handleSelectionChanged(s,n,_){var C;this._selectionState.start=s,this._selectionState.end=n,this._selectionState.columnSelectMode=_,(C=this._renderer.value)==null||C.handleSelectionChanged(s,n,_)}handleCursorMove(){var s;(s=this._renderer.value)==null||s.handleCursorMove()}clear(){var s;(s=this._renderer.value)==null||s.clear()}};o.RenderService=l=f([m(2,u.IOptionsService),m(3,p.ICharSizeService),m(4,u.IDecorationService),m(5,u.IBufferService),m(6,p.ICoreBrowserService),m(7,p.IThemeService)],l)},9312:function(y,o,c){var f=this&&this.__decorate||function(g,L,R,A){var M,T=arguments.length,N=T<3?L:A===null?A=Object.getOwnPropertyDescriptor(L,R):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(g,L,R,A);else for(var W=g.length-1;W>=0;W--)(M=g[W])&&(N=(T<3?M(N):T>3?M(L,R,N):M(L,R))||N);return T>3&&N&&Object.defineProperty(L,R,N),N},m=this&&this.__param||function(g,L){return function(R,A){L(R,A,g)}};Object.defineProperty(o,"__esModule",{value:!0}),o.SelectionService=void 0;const h=c(9806),p=c(9504),S=c(456),E=c(4725),v=c(8460),u=c(844),l=c(6114),s=c(4841),n=c(511),_=c(2585),C=" ",w=new RegExp(C,"g");let k=o.SelectionService=class extends u.Disposable{constructor(g,L,R,A,M,T,N,W,K){super(),this._element=g,this._screenElement=L,this._linkifier=R,this._bufferService=A,this._coreService=M,this._mouseService=T,this._optionsService=N,this._renderService=W,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new n.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new v.EventEmitter),this.onLinuxMouseSelection=this._onLinuxMouseSelection.event,this._onRedrawRequest=this.register(new v.EventEmitter),this.onRequestRedraw=this._onRedrawRequest.event,this._onSelectionChange=this.register(new v.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onRequestScrollLines=this.register(new v.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 S.SelectionModel(this._bufferService),this._activeSelectionMode=0,this.register((0,u.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 g=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;return!(!g||!L||g[0]===L[0]&&g[1]===L[1])}get selectionText(){const g=this._model.finalSelectionStart,L=this._model.finalSelectionEnd;if(!g||!L)return"";const R=this._bufferService.buffer,A=[];if(this._activeSelectionMode===3){if(g[0]===L[0])return"";const M=g[0]<L[0]?g[0]:L[0],T=g[0]<L[0]?L[0]:g[0];for(let N=g[1];N<=L[1];N++){const W=R.translateBufferLineToString(N,!0,M,T);A.push(W)}}else{const M=g[1]===L[1]?L[0]:void 0;A.push(R.translateBufferLineToString(g[1],!0,g[0],M));for(let T=g[1]+1;T<=L[1]-1;T++){const N=R.lines.get(T),W=R.translateBufferLineToString(T,!0);N!=null&&N.isWrapped?A[A.length-1]+=W:A.push(W)}if(g[1]!==L[1]){const T=R.lines.get(L[1]),N=R.translateBufferLineToString(L[1],!0,0,L[0]);T&&T.isWrapped?A[A.length-1]+=N:A.push(N)}}return A.map(M=>M.replace(w," ")).join(l.isWindows?`\r
|
|
45
45
|
`:`
|
|
46
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(g){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),l.isLinux&&g&&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(g){const x=this._getMouseBufferCoords(g),T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!!(T&&B&&x)&&this._areCoordsInSelection(x,T,B)}isCellInSelection(g,x){const T=this._model.finalSelectionStart,B=this._model.finalSelectionEnd;return!(!T||!B)&&this._areCoordsInSelection([g,x],T,B)}_areCoordsInSelection(g,x,T){return g[1]>x[1]&&g[1]<T[1]||x[1]===T[1]&&g[1]===x[1]&&g[0]>=x[0]&&g[0]<T[0]||x[1]<T[1]&&g[1]===T[1]&&g[0]<T[0]||x[1]<T[1]&&g[1]===x[1]&&g[0]>=x[0]}_selectWordAtCursor(g,x){var O,P;const T=(P=(O=this._linkifier.currentLink)==null?void 0:O.link)==null?void 0:P.range;if(T)return this._model.selectionStart=[T.start.x-1,T.start.y-1],this._model.selectionStartLength=(0,s.getRangeLength)(T,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const B=this._getMouseBufferCoords(g);return!!B&&(this._selectWordAt(B,x),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(g,x){this._model.clearSelection(),g=Math.max(g,0),x=Math.min(x,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,x],this.refresh(),this._onSelectionChange.fire()}_handleTrim(g){this._model.handleTrim(g)&&this.refresh()}_getMouseBufferCoords(g){const x=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(x)return x[0]--,x[1]--,x[1]+=this._bufferService.buffer.ydisp,x}_getMouseEventScrollAmount(g){let x=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,g,this._screenElement)[1];const T=this._renderService.dimensions.css.canvas.height;return x>=0&&x<=T?0:(x>T&&(x-=T),x=Math.min(Math.max(x,-50),50),x/=50,x/Math.abs(x)+Math.round(14*x))}shouldForceSelection(g){return l.isMac?g.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:g.shiftKey}handleMouseDown(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._handleIncrementalClick(g):g.detail===1?this._handleSingleClick(g):g.detail===2?this._handleDoubleClick(g):g.detail===3&&this._handleTripleClick(g),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(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))}_handleSingleClick(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),!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(g){this._selectWordAtCursor(g,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(g){const x=this._getMouseBufferCoords(g);x&&(this._activeSelectionMode=2,this._selectLineAt(x[1]))}shouldColumnSelect(g){return g.altKey&&!(l.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(g){if(g.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(g),!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(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const T=this._bufferService.buffer;if(this._model.selectionEnd[1]<T.lines.length){const B=T.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 g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}}_handleMouseUp(g){const x=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&x<500&&g.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const T=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(T&&T[0]!==void 0&&T[1]!==void 0){const B=(0,p.moveToCellSequence)(T[0]-1,T[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(B,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const g=this._model.finalSelectionStart,x=this._model.finalSelectionEnd,T=!(!g||!x||g[0]===x[0]&&g[1]===x[1]);T?g&&x&&(this._oldSelectionStart&&this._oldSelectionEnd&&g[0]===this._oldSelectionStart[0]&&g[1]===this._oldSelectionStart[1]&&x[0]===this._oldSelectionEnd[0]&&x[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(g,x,T)):this._oldHasSelection&&this._fireOnSelectionChange(g,x,T)}_fireOnSelectionChange(g,x,T){this._oldSelectionStart=g,this._oldSelectionEnd=x,this._oldHasSelection=T,this._onSelectionChange.fire()}_handleBufferActivate(g){this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim(x=>this._handleTrim(x))}_convertViewportColToCharacterIndex(g,x){let T=x;for(let B=0;x>=B;B++){const O=g.loadCell(B,this._workCell).getChars().length;this._workCell.getWidth()===0?T--:O>1&&x!==B&&(T+=O-1)}return T}setSelection(g,x,T){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,x],this._model.selectionStartLength=T,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(g){this._isClickInSelection(g)||(this._selectWordAtCursor(g,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(g,x,T=!0,B=!0){if(g[0]>=this._bufferService.cols)return;const O=this._bufferService.buffer,P=O.lines.get(g[1]);if(!P)return;const N=O.translateBufferLineToString(g[1],!1);let W=this._convertViewportColToCharacterIndex(P,g[0]),U=W;const q=g[0]-W;let H=0,b=0,D=0,A=0;if(N.charAt(W)===" "){for(;W>0&&N.charAt(W-1)===" ";)W--;for(;U<N.length&&N.charAt(U+1)===" ";)U++}else{let $=g[0],Y=g[0];P.getWidth($)===0&&(H++,$--),P.getWidth(Y)===2&&(b++,Y++);const Q=P.getString(Y).length;for(Q>1&&(A+=Q-1,U+=Q-1);$>0&&W>0&&!this._isCharWordSeparator(P.loadCell($-1,this._workCell));){P.loadCell($-1,this._workCell);const R=this._workCell.getChars().length;this._workCell.getWidth()===0?(H++,$--):R>1&&(D+=R-1,W-=R-1),W--,$--}for(;Y<P.length&&U+1<N.length&&!this._isCharWordSeparator(P.loadCell(Y+1,this._workCell));){P.loadCell(Y+1,this._workCell);const R=this._workCell.getChars().length;this._workCell.getWidth()===2?(b++,Y++):R>1&&(A+=R-1,U+=R-1),U++,Y++}}U++;let M=W+q-H+D,z=Math.min(this._bufferService.cols,U-W+H+b-D-A);if(x||N.slice(W,U).trim()!==""){if(T&&M===0&&P.getCodePoint(0)!==32){const $=O.lines.get(g[1]-1);if($&&P.isWrapped&&$.getCodePoint(this._bufferService.cols-1)!==32){const Y=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(Y){const Q=this._bufferService.cols-Y.start;M-=Q,z+=Q}}}if(B&&M+z===this._bufferService.cols&&P.getCodePoint(this._bufferService.cols-1)!==32){const $=O.lines.get(g[1]+1);if($!=null&&$.isWrapped&&$.getCodePoint(0)!==32){const Y=this._getWordAt([0,g[1]+1],!1,!1,!0);Y&&(z+=Y.length)}}return{start:M,length:z}}}_selectWordAt(g,x){const T=this._getWordAt(g,x);if(T){for(;T.start<0;)T.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[T.start,g[1]],this._model.selectionStartLength=T.length}}_selectToWordAt(g){const x=this._getWordAt(g,!0);if(x){let T=g[1];for(;x.start<0;)x.start+=this._bufferService.cols,T--;if(!this._model.areSelectionValuesReversed())for(;x.start+x.length>this._bufferService.cols;)x.length-=this._bufferService.cols,T++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?x.start:x.start+x.length,T]}}_isCharWordSeparator(g){return g.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(g.getChars())>=0}_selectLineAt(g){const x=this._bufferService.buffer.getWrappedRangeForLine(g),T={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,s.getRangeLength)(T,this._bufferService.cols)}};o.SelectionService=k=f([m(3,_.IBufferService),m(4,_.ICoreService),m(5,E.IMouseService),m(6,_.IOptionsService),m(7,E.IRenderService),m(8,E.ICoreBrowserService)],k)},4725:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const f=c(8343);o.ICharSizeService=(0,f.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),o.IMouseService=(0,f.createDecorator)("MouseService"),o.IRenderService=(0,f.createDecorator)("RenderService"),o.ISelectionService=(0,f.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,f.createDecorator)("ThemeService"),o.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(y,o,c){var f=this&&this.__decorate||function(k,g,x,T){var B,O=arguments.length,P=O<3?g:T===null?T=Object.getOwnPropertyDescriptor(g,x):T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(k,g,x,T);else for(var N=k.length-1;N>=0;N--)(B=k[N])&&(P=(O<3?B(P):O>3?B(g,x,P):B(g,x))||P);return O>3&&P&&Object.defineProperty(g,x,P),P},m=this&&this.__param||function(k,g){return function(x,T){g(x,T,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const h=c(7239),p=c(8055),S=c(8460),E=c(844),v=c(2585),u=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),s=p.css.toColor("#ffffff"),n=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const k=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],g=[0,95,135,175,215,255];for(let x=0;x<216;x++){const T=g[x/36%6|0],B=g[x/6%6|0],O=g[x%6];k.push({css:p.channels.toCss(T,B,O),rgba:p.channels.toRgba(T,B,O)})}for(let x=0;x<24;x++){const T=8+10*x;k.push({css:p.channels.toCss(T,T,T),rgba:p.channels.toRgba(T,T,T)})}return k})());let C=o.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:u,background:l,cursor:s,cursorAccent:n,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(l,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(l,_),ansi:o.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(k={}){const g=this._colors;if(g.foreground=w(k.foreground,u),g.background=w(k.background,l),g.cursor=w(k.cursor,s),g.cursorAccent=w(k.cursorAccent,n),g.selectionBackgroundTransparent=w(k.selectionBackground,_),g.selectionBackgroundOpaque=p.color.blend(g.background,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundTransparent=w(k.selectionInactiveBackground,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundOpaque=p.color.blend(g.background,g.selectionInactiveBackgroundTransparent),g.selectionForeground=k.selectionForeground?w(k.selectionForeground,p.NULL_COLOR):void 0,g.selectionForeground===p.NULL_COLOR&&(g.selectionForeground=void 0),p.color.isOpaque(g.selectionBackgroundTransparent)&&(g.selectionBackgroundTransparent=p.color.opacity(g.selectionBackgroundTransparent,.3)),p.color.isOpaque(g.selectionInactiveBackgroundTransparent)&&(g.selectionInactiveBackgroundTransparent=p.color.opacity(g.selectionInactiveBackgroundTransparent,.3)),g.ansi=o.DEFAULT_ANSI_COLORS.slice(),g.ansi[0]=w(k.black,o.DEFAULT_ANSI_COLORS[0]),g.ansi[1]=w(k.red,o.DEFAULT_ANSI_COLORS[1]),g.ansi[2]=w(k.green,o.DEFAULT_ANSI_COLORS[2]),g.ansi[3]=w(k.yellow,o.DEFAULT_ANSI_COLORS[3]),g.ansi[4]=w(k.blue,o.DEFAULT_ANSI_COLORS[4]),g.ansi[5]=w(k.magenta,o.DEFAULT_ANSI_COLORS[5]),g.ansi[6]=w(k.cyan,o.DEFAULT_ANSI_COLORS[6]),g.ansi[7]=w(k.white,o.DEFAULT_ANSI_COLORS[7]),g.ansi[8]=w(k.brightBlack,o.DEFAULT_ANSI_COLORS[8]),g.ansi[9]=w(k.brightRed,o.DEFAULT_ANSI_COLORS[9]),g.ansi[10]=w(k.brightGreen,o.DEFAULT_ANSI_COLORS[10]),g.ansi[11]=w(k.brightYellow,o.DEFAULT_ANSI_COLORS[11]),g.ansi[12]=w(k.brightBlue,o.DEFAULT_ANSI_COLORS[12]),g.ansi[13]=w(k.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),g.ansi[14]=w(k.brightCyan,o.DEFAULT_ANSI_COLORS[14]),g.ansi[15]=w(k.brightWhite,o.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const x=Math.min(g.ansi.length-16,k.extendedAnsi.length);for(let T=0;T<x;T++)g.ansi[T+16]=w(k.extendedAnsi[T],o.DEFAULT_ANSI_COLORS[T+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(k){this._restoreColor(k),this._onChangeColors.fire(this.colors)}_restoreColor(k){if(k!==void 0)switch(k){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[k]=this._restoreColors.ansi[k]}else for(let g=0;g<this._restoreColors.ansi.length;++g)this._colors.ansi[g]=this._restoreColors.ansi[g]}modifyColors(k){k(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 w(k,g){if(k!==void 0)try{return p.css.toColor(k)}catch{}return g}o.ThemeService=C=f([m(0,v.IOptionsService)],C)},6349:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const f=c(8460),m=c(844);class h extends m.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.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(S){if(this._maxLength===S)return;const E=new Array(S);for(let v=0;v<Math.min(S,this.length);v++)E[v]=this._array[this._getCyclicIndex(v)];this._array=E,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let E=this._length;E<S;E++)this._array[E]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,E){this._array[this._getCyclicIndex(S)]=E}push(S){this._array[this._getCyclicIndex(this._length)]=S,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(S,E,...v){if(E){for(let u=S;u<this._length-E;u++)this._array[this._getCyclicIndex(u)]=this._array[this._getCyclicIndex(u+E)];this._length-=E,this.onDeleteEmitter.fire({index:S,amount:E})}for(let u=this._length-1;u>=S;u--)this._array[this._getCyclicIndex(u+v.length)]=this._array[this._getCyclicIndex(u)];for(let u=0;u<v.length;u++)this._array[this._getCyclicIndex(S+u)]=v[u];if(v.length&&this.onInsertEmitter.fire({index:S,amount:v.length}),this._length+v.length>this._maxLength){const u=this._length+v.length-this._maxLength;this._startIndex+=u,this._length=this._maxLength,this.onTrimEmitter.fire(u)}else this._length+=v.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,E,v){if(!(E<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(let l=E-1;l>=0;l--)this.set(S+l+v,this.get(S+l));const u=S+E+v-this._length;if(u>0)for(this._length+=u;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let u=0;u<E;u++)this.set(S+u+v,this.get(S+u))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}o.CircularList=h},1439:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(f,m=5){if(typeof f!="object")return f;const h=Array.isArray(f)?[]:{};for(const p in f)h[p]=m<=1?f[p]:f[p]&&c(f[p],m-1);return h}},8055:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let c=0,f=0,m=0,h=0;var p,S,E,v,u;function l(n){const _=n.toString(16);return _.length<2?"0"+_:_}function s(n,_){return n<_?(_+.05)/(n+.05):(n+.05)/(_+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},function(n){n.toCss=function(_,C,w,k){return k!==void 0?`#${l(_)}${l(C)}${l(w)}${l(k)}`:`#${l(_)}${l(C)}${l(w)}`},n.toRgba=function(_,C,w,k=255){return(_<<24|C<<16|w<<8|k)>>>0},n.toColor=function(_,C,w,k){return{css:n.toCss(_,C,w,k),rgba:n.toRgba(_,C,w,k)}}}(p||(o.channels=p={})),function(n){function _(C,w){return h=Math.round(255*w),[c,f,m]=u.toChannels(C.rgba),{css:p.toCss(c,f,m,h),rgba:p.toRgba(c,f,m,h)}}n.blend=function(C,w){if(h=(255&w.rgba)/255,h===1)return{css:w.css,rgba:w.rgba};const k=w.rgba>>24&255,g=w.rgba>>16&255,x=w.rgba>>8&255,T=C.rgba>>24&255,B=C.rgba>>16&255,O=C.rgba>>8&255;return c=T+Math.round((k-T)*h),f=B+Math.round((g-B)*h),m=O+Math.round((x-O)*h),{css:p.toCss(c,f,m),rgba:p.toRgba(c,f,m)}},n.isOpaque=function(C){return(255&C.rgba)==255},n.ensureContrastRatio=function(C,w,k){const g=u.ensureContrastRatio(C.rgba,w.rgba,k);if(g)return p.toColor(g>>24&255,g>>16&255,g>>8&255)},n.opaque=function(C){const w=(255|C.rgba)>>>0;return[c,f,m]=u.toChannels(w),{css:p.toCss(c,f,m),rgba:w}},n.opacity=_,n.multiplyOpacity=function(C,w){return h=255&C.rgba,_(C,h*w/255)},n.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}}(S||(o.color=S={})),function(n){let _,C;try{const w=document.createElement("canvas");w.width=1,w.height=1;const k=w.getContext("2d",{willReadFrequently:!0});k&&(_=k,_.globalCompositeOperation="copy",C=_.createLinearGradient(0,0,1,1))}catch{}n.toColor=function(w){if(w.match(/#[\da-f]{3,8}/i))switch(w.length){case 4:return c=parseInt(w.slice(1,2).repeat(2),16),f=parseInt(w.slice(2,3).repeat(2),16),m=parseInt(w.slice(3,4).repeat(2),16),p.toColor(c,f,m);case 5:return c=parseInt(w.slice(1,2).repeat(2),16),f=parseInt(w.slice(2,3).repeat(2),16),m=parseInt(w.slice(3,4).repeat(2),16),h=parseInt(w.slice(4,5).repeat(2),16),p.toColor(c,f,m,h);case 7:return{css:w,rgba:(parseInt(w.slice(1),16)<<8|255)>>>0};case 9:return{css:w,rgba:parseInt(w.slice(1),16)>>>0}}const k=w.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return c=parseInt(k[1]),f=parseInt(k[2]),m=parseInt(k[3]),h=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),p.toColor(c,f,m,h);if(!_||!C)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=C,_.fillStyle=w,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[c,f,m,h]=_.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,f,m,h),css:w}}}(E||(o.css=E={})),function(n){function _(C,w,k){const g=C/255,x=w/255,T=k/255;return .2126*(g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4))+.7152*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.0722*(T<=.03928?T/12.92:Math.pow((T+.055)/1.055,2.4))}n.relativeLuminance=function(C){return _(C>>16&255,C>>8&255,255&C)},n.relativeLuminance2=_}(v||(o.rgb=v={})),function(n){function _(w,k,g){const x=w>>24&255,T=w>>16&255,B=w>>8&255;let O=k>>24&255,P=k>>16&255,N=k>>8&255,W=s(v.relativeLuminance2(O,P,N),v.relativeLuminance2(x,T,B));for(;W<g&&(O>0||P>0||N>0);)O-=Math.max(0,Math.ceil(.1*O)),P-=Math.max(0,Math.ceil(.1*P)),N-=Math.max(0,Math.ceil(.1*N)),W=s(v.relativeLuminance2(O,P,N),v.relativeLuminance2(x,T,B));return(O<<24|P<<16|N<<8|255)>>>0}function C(w,k,g){const x=w>>24&255,T=w>>16&255,B=w>>8&255;let O=k>>24&255,P=k>>16&255,N=k>>8&255,W=s(v.relativeLuminance2(O,P,N),v.relativeLuminance2(x,T,B));for(;W<g&&(O<255||P<255||N<255);)O=Math.min(255,O+Math.ceil(.1*(255-O))),P=Math.min(255,P+Math.ceil(.1*(255-P))),N=Math.min(255,N+Math.ceil(.1*(255-N))),W=s(v.relativeLuminance2(O,P,N),v.relativeLuminance2(x,T,B));return(O<<24|P<<16|N<<8|255)>>>0}n.blend=function(w,k){if(h=(255&k)/255,h===1)return k;const g=k>>24&255,x=k>>16&255,T=k>>8&255,B=w>>24&255,O=w>>16&255,P=w>>8&255;return c=B+Math.round((g-B)*h),f=O+Math.round((x-O)*h),m=P+Math.round((T-P)*h),p.toRgba(c,f,m)},n.ensureContrastRatio=function(w,k,g){const x=v.relativeLuminance(w>>8),T=v.relativeLuminance(k>>8);if(s(x,T)<g){if(T<x){const P=_(w,k,g),N=s(x,v.relativeLuminance(P>>8));if(N<g){const W=C(w,k,g);return N>s(x,v.relativeLuminance(W>>8))?P:W}return P}const B=C(w,k,g),O=s(x,v.relativeLuminance(B>>8));if(O<g){const P=_(w,k,g);return O>s(x,v.relativeLuminance(P>>8))?B:P}return B}},n.reduceLuminance=_,n.increaseLuminance=C,n.toChannels=function(w){return[w>>24&255,w>>16&255,w>>8&255,255&w]}}(u||(o.rgba=u={})),o.toPaddedHex=l,o.contrastRatio=s},8969:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const f=c(844),m=c(2585),h=c(4348),p=c(7866),S=c(744),E=c(7302),v=c(6975),u=c(8460),l=c(1753),s=c(1480),n=c(7994),_=c(9282),C=c(5435),w=c(5981),k=c(2660);let g=!1;class x extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new u.EventEmitter),this._onScroll.event(B=>{var O;(O=this._onScrollApi)==null||O.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 O in B)this.optionsService.options[O]=B[O]}constructor(B){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new u.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new u.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new u.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new u.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new E.OptionsService(B)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(l.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(s.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(n.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(m.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,u.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,u.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,u.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,u.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(O=>{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(O=>{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 w.WriteBuffer((O,P)=>this._inputHandler.parse(O,P))),this.register((0,u.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(B,O){this._writeBuffer.write(B,O)}writeSync(B,O){this._logService.logLevel<=m.LogLevelEnum.WARN&&!g&&(this._logService.warn("writeSync is unreliable and will be removed soon."),g=!0),this._writeBuffer.writeSync(B,O)}input(B,O=!0){this.coreService.triggerDataEvent(B,O)}resize(B,O){isNaN(B)||isNaN(O)||(B=Math.max(B,S.MINIMUM_COLS),O=Math.max(O,S.MINIMUM_ROWS),this._bufferService.resize(B,O))}scroll(B,O=!1){this._bufferService.scroll(B,O)}scrollLines(B,O,P){this._bufferService.scrollLines(B,O,P)}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 O=B-this._bufferService.buffer.ydisp;O!==0&&this.scrollLines(O)}registerEscHandler(B,O){return this._inputHandler.registerEscHandler(B,O)}registerDcsHandler(B,O){return this._inputHandler.registerDcsHandler(B,O)}registerCsiHandler(B,O){return this._inputHandler.registerCsiHandler(B,O)}registerOscHandler(B,O){return this._inputHandler.registerOscHandler(B,O)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let B=!1;const O=this.optionsService.rawOptions.windowsPty;O&&O.buildNumber!==void 0&&O.buildNumber!==void 0?B=O.backend==="conpty"&&O.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(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),B.push(this.registerCsiHandler({final:"H"},()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)(()=>{for(const O of B)O.dispose()})}}}o.CoreTerminal=x},8460:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===c)return void this._listeners.splice(f,1)}}})),this._event}fire(c,f){const m=[];for(let h=0;h<this._listeners.length;h++)m.push(this._listeners[h]);for(let h=0;h<m.length;h++)m[h].call(void 0,c,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(c,f){return c(m=>f.fire(m))},o.runAndSubscribe=function(c,f){return f(void 0),c(m=>f(m))}},5435:function(y,o,c){var f=this&&this.__decorate||function(H,b,D,A){var M,z=arguments.length,$=z<3?b:A===null?A=Object.getOwnPropertyDescriptor(b,D):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(H,b,D,A);else for(var Y=H.length-1;Y>=0;Y--)(M=H[Y])&&($=(z<3?M($):z>3?M(b,D,$):M(b,D))||$);return z>3&&$&&Object.defineProperty(b,D,$),$},m=this&&this.__param||function(H,b){return function(D,A){b(D,A,H)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const h=c(2584),p=c(7116),S=c(2015),E=c(844),v=c(482),u=c(8437),l=c(8460),s=c(643),n=c(511),_=c(3734),C=c(2585),w=c(1480),k=c(6242),g=c(6351),x=c(5941),T={"(":0,")":1,"*":2,"+":3,"-":1,".":2},B=131072;function O(H,b){if(H>24)return b.setWinLines||!1;switch(H){case 1:return!!b.restoreWin;case 2:return!!b.minimizeWin;case 3:return!!b.setWinPosition;case 4:return!!b.setWinSizePixels;case 5:return!!b.raiseWin;case 6:return!!b.lowerWin;case 7:return!!b.refreshWin;case 8:return!!b.setWinSizeChars;case 9:return!!b.maximizeWin;case 10:return!!b.fullscreenWin;case 11:return!!b.getWinState;case 13:return!!b.getWinPosition;case 14:return!!b.getWinSizePixels;case 15:return!!b.getScreenSizePixels;case 16:return!!b.getCellSizePixels;case 18:return!!b.getWinSizeChars;case 19:return!!b.getScreenSizeChars;case 20:return!!b.getIconTitle;case 21:return!!b.getWinTitle;case 22:return!!b.pushTitle;case 23:return!!b.popTitle;case 24:return!!b.setWinLines}return!1}var P;(function(H){H[H.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",H[H.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(P||(o.WindowsOptionsReportType=P={}));let N=0;class W extends E.Disposable{getAttrData(){return this._curAttrData}constructor(b,D,A,M,z,$,Y,Q,R=new S.EscapeSequenceParser){super(),this._bufferService=b,this._charsetService=D,this._coreService=A,this._logService=M,this._optionsService=z,this._oscLinkService=$,this._coreMouseService=Y,this._unicodeService=Q,this._parser=R,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.Utf8ToUtf32,this._workCell=new n.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new l.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new l.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new l.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new l.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new l.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new l.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new l.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new l.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new l.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new l.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new l.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new U(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._parser.setCsiHandlerFallback((L,F)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:F.toArray()})}),this._parser.setEscHandlerFallback(L=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(L)})}),this._parser.setExecuteHandlerFallback(L=>{this._logService.debug("Unknown EXECUTE code: ",{code:L})}),this._parser.setOscHandlerFallback((L,F,I)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:F,data:I})}),this._parser.setDcsHandlerFallback((L,F,I)=>{F==="HOOK"&&(I=I.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:F,payload:I})}),this._parser.setPrintHandler((L,F,I)=>this.print(L,F,I)),this._parser.registerCsiHandler({final:"@"},L=>this.insertChars(L)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},L=>this.scrollLeft(L)),this._parser.registerCsiHandler({final:"A"},L=>this.cursorUp(L)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},L=>this.scrollRight(L)),this._parser.registerCsiHandler({final:"B"},L=>this.cursorDown(L)),this._parser.registerCsiHandler({final:"C"},L=>this.cursorForward(L)),this._parser.registerCsiHandler({final:"D"},L=>this.cursorBackward(L)),this._parser.registerCsiHandler({final:"E"},L=>this.cursorNextLine(L)),this._parser.registerCsiHandler({final:"F"},L=>this.cursorPrecedingLine(L)),this._parser.registerCsiHandler({final:"G"},L=>this.cursorCharAbsolute(L)),this._parser.registerCsiHandler({final:"H"},L=>this.cursorPosition(L)),this._parser.registerCsiHandler({final:"I"},L=>this.cursorForwardTab(L)),this._parser.registerCsiHandler({final:"J"},L=>this.eraseInDisplay(L,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},L=>this.eraseInDisplay(L,!0)),this._parser.registerCsiHandler({final:"K"},L=>this.eraseInLine(L,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},L=>this.eraseInLine(L,!0)),this._parser.registerCsiHandler({final:"L"},L=>this.insertLines(L)),this._parser.registerCsiHandler({final:"M"},L=>this.deleteLines(L)),this._parser.registerCsiHandler({final:"P"},L=>this.deleteChars(L)),this._parser.registerCsiHandler({final:"S"},L=>this.scrollUp(L)),this._parser.registerCsiHandler({final:"T"},L=>this.scrollDown(L)),this._parser.registerCsiHandler({final:"X"},L=>this.eraseChars(L)),this._parser.registerCsiHandler({final:"Z"},L=>this.cursorBackwardTab(L)),this._parser.registerCsiHandler({final:"`"},L=>this.charPosAbsolute(L)),this._parser.registerCsiHandler({final:"a"},L=>this.hPositionRelative(L)),this._parser.registerCsiHandler({final:"b"},L=>this.repeatPrecedingCharacter(L)),this._parser.registerCsiHandler({final:"c"},L=>this.sendDeviceAttributesPrimary(L)),this._parser.registerCsiHandler({prefix:">",final:"c"},L=>this.sendDeviceAttributesSecondary(L)),this._parser.registerCsiHandler({final:"d"},L=>this.linePosAbsolute(L)),this._parser.registerCsiHandler({final:"e"},L=>this.vPositionRelative(L)),this._parser.registerCsiHandler({final:"f"},L=>this.hVPosition(L)),this._parser.registerCsiHandler({final:"g"},L=>this.tabClear(L)),this._parser.registerCsiHandler({final:"h"},L=>this.setMode(L)),this._parser.registerCsiHandler({prefix:"?",final:"h"},L=>this.setModePrivate(L)),this._parser.registerCsiHandler({final:"l"},L=>this.resetMode(L)),this._parser.registerCsiHandler({prefix:"?",final:"l"},L=>this.resetModePrivate(L)),this._parser.registerCsiHandler({final:"m"},L=>this.charAttributes(L)),this._parser.registerCsiHandler({final:"n"},L=>this.deviceStatus(L)),this._parser.registerCsiHandler({prefix:"?",final:"n"},L=>this.deviceStatusPrivate(L)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},L=>this.softReset(L)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},L=>this.setCursorStyle(L)),this._parser.registerCsiHandler({final:"r"},L=>this.setScrollRegion(L)),this._parser.registerCsiHandler({final:"s"},L=>this.saveCursor(L)),this._parser.registerCsiHandler({final:"t"},L=>this.windowOptions(L)),this._parser.registerCsiHandler({final:"u"},L=>this.restoreCursor(L)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},L=>this.insertColumns(L)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},L=>this.deleteColumns(L)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},L=>this.selectProtected(L)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},L=>this.requestMode(L,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},L=>this.requestMode(L,!1)),this._parser.setExecuteHandler(h.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(h.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(h.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(h.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(h.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(h.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(h.C1.IND,()=>this.index()),this._parser.setExecuteHandler(h.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(h.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new k.OscHandler(L=>(this.setTitle(L),this.setIconName(L),!0))),this._parser.registerOscHandler(1,new k.OscHandler(L=>this.setIconName(L))),this._parser.registerOscHandler(2,new k.OscHandler(L=>this.setTitle(L))),this._parser.registerOscHandler(4,new k.OscHandler(L=>this.setOrReportIndexedColor(L))),this._parser.registerOscHandler(8,new k.OscHandler(L=>this.setHyperlink(L))),this._parser.registerOscHandler(10,new k.OscHandler(L=>this.setOrReportFgColor(L))),this._parser.registerOscHandler(11,new k.OscHandler(L=>this.setOrReportBgColor(L))),this._parser.registerOscHandler(12,new k.OscHandler(L=>this.setOrReportCursorColor(L))),this._parser.registerOscHandler(104,new k.OscHandler(L=>this.restoreIndexedColor(L))),this._parser.registerOscHandler(110,new k.OscHandler(L=>this.restoreFgColor(L))),this._parser.registerOscHandler(111,new k.OscHandler(L=>this.restoreBgColor(L))),this._parser.registerOscHandler(112,new k.OscHandler(L=>this.restoreCursorColor(L))),this._parser.registerEscHandler({final:"7"},()=>this.saveCursor()),this._parser.registerEscHandler({final:"8"},()=>this.restoreCursor()),this._parser.registerEscHandler({final:"D"},()=>this.index()),this._parser.registerEscHandler({final:"E"},()=>this.nextLine()),this._parser.registerEscHandler({final:"H"},()=>this.tabSet()),this._parser.registerEscHandler({final:"M"},()=>this.reverseIndex()),this._parser.registerEscHandler({final:"="},()=>this.keypadApplicationMode()),this._parser.registerEscHandler({final:">"},()=>this.keypadNumericMode()),this._parser.registerEscHandler({final:"c"},()=>this.fullReset()),this._parser.registerEscHandler({final:"n"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"o"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"|"},()=>this.setgLevel(3)),this._parser.registerEscHandler({final:"}"},()=>this.setgLevel(2)),this._parser.registerEscHandler({final:"~"},()=>this.setgLevel(1)),this._parser.registerEscHandler({intermediates:"%",final:"@"},()=>this.selectDefaultCharset()),this._parser.registerEscHandler({intermediates:"%",final:"G"},()=>this.selectDefaultCharset());for(const L in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:L},()=>this.selectCharset("("+L)),this._parser.registerEscHandler({intermediates:")",final:L},()=>this.selectCharset(")"+L)),this._parser.registerEscHandler({intermediates:"*",final:L},()=>this.selectCharset("*"+L)),this._parser.registerEscHandler({intermediates:"+",final:L},()=>this.selectCharset("+"+L)),this._parser.registerEscHandler({intermediates:"-",final:L},()=>this.selectCharset("-"+L)),this._parser.registerEscHandler({intermediates:".",final:L},()=>this.selectCharset("."+L)),this._parser.registerEscHandler({intermediates:"/",final:L},()=>this.selectCharset("/"+L));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(L=>(this._logService.error("Parsing error: ",L),L)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new g.DcsHandler((L,F)=>this.requestStatusString(L,F)))}_preserveStack(b,D,A,M){this._parseStack.paused=!0,this._parseStack.cursorStartX=b,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=A,this._parseStack.position=M}_logSlowResolvingAsync(b){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([b,new Promise((D,A)=>setTimeout(()=>A("#SLOW_TIMEOUT"),5e3))]).catch(D=>{if(D!=="#SLOW_TIMEOUT")throw D;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(b,D){let A,M=this._activeBuffer.x,z=this._activeBuffer.y,$=0;const Y=this._parseStack.paused;if(Y){if(A=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(A),A;M=this._parseStack.cursorStartX,z=this._parseStack.cursorStartY,this._parseStack.paused=!1,b.length>B&&($=this._parseStack.position+B)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof b=="string"?` "${b}"`:` "${Array.prototype.map.call(b,L=>String.fromCharCode(L)).join("")}"`),typeof b=="string"?b.split("").map(L=>L.charCodeAt(0)):b),this._parseBuffer.length<b.length&&this._parseBuffer.length<B&&(this._parseBuffer=new Uint32Array(Math.min(b.length,B))),Y||this._dirtyRowTracker.clearRange(),b.length>B)for(let L=$;L<b.length;L+=B){const F=L+B<b.length?L+B:b.length,I=typeof b=="string"?this._stringDecoder.decode(b.substring(L,F),this._parseBuffer):this._utf8Decoder.decode(b.subarray(L,F),this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,I))return this._preserveStack(M,z,I,L),this._logSlowResolvingAsync(A),A}else if(!Y){const L=typeof b=="string"?this._stringDecoder.decode(b,this._parseBuffer):this._utf8Decoder.decode(b,this._parseBuffer);if(A=this._parser.parse(this._parseBuffer,L))return this._preserveStack(M,z,L,0),this._logSlowResolvingAsync(A),A}this._activeBuffer.x===M&&this._activeBuffer.y===z||this._onCursorMove.fire();const Q=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),R=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);R<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(R,this._bufferService.rows-1),Math.min(Q,this._bufferService.rows-1))}print(b,D,A){let M,z;const $=this._charsetService.charset,Y=this._optionsService.rawOptions.screenReaderMode,Q=this._bufferService.cols,R=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,F=this._curAttrData;let I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&A-D>0&&I.getWidth(this._activeBuffer.x-1)===2&&I.setCellFromCodepoint(this._activeBuffer.x-1,0,1,F);let K=this._parser.precedingJoinState;for(let V=D;V<A;++V){if(M=b[V],M<127&&$){const Ae=$[String.fromCharCode(M)];Ae&&(M=Ae.charCodeAt(0))}const Z=this._unicodeService.charProperties(M,K);z=w.UnicodeService.extractWidth(Z);const he=w.UnicodeService.extractShouldJoin(Z),de=he?w.UnicodeService.extractWidth(K):0;if(K=Z,Y&&this._onA11yChar.fire((0,v.stringFromCodePoint)(M)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+z-de>Q){if(R){const Ae=I;let J=this._activeBuffer.x-de;for(this._activeBuffer.x=de,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),I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),de>0&&I instanceof u.BufferLine&&I.copyCellsFrom(Ae,J,0,de,!1);J<Q;)Ae.setCellFromCodepoint(J++,0,1,F)}else if(this._activeBuffer.x=Q-1,z===2)continue}if(he&&this._activeBuffer.x){const Ae=I.getWidth(this._activeBuffer.x-1)?1:2;I.addCodepointToCell(this._activeBuffer.x-Ae,M,z);for(let J=z-de;--J>=0;)I.setCellFromCodepoint(this._activeBuffer.x++,0,0,F)}else if(L&&(I.insertCells(this._activeBuffer.x,z-de,this._activeBuffer.getNullCell(F)),I.getWidth(Q-1)===2&&I.setCellFromCodepoint(Q-1,s.NULL_CELL_CODE,s.NULL_CELL_WIDTH,F)),I.setCellFromCodepoint(this._activeBuffer.x++,M,z,F),z>0)for(;--z;)I.setCellFromCodepoint(this._activeBuffer.x++,0,0,F)}this._parser.precedingJoinState=K,this._activeBuffer.x<Q&&A-D>0&&I.getWidth(this._activeBuffer.x)===0&&!I.hasContent(this._activeBuffer.x)&&I.setCellFromCodepoint(this._activeBuffer.x,0,1,F),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(b,D){return b.final!=="t"||b.prefix||b.intermediates?this._parser.registerCsiHandler(b,D):this._parser.registerCsiHandler(b,A=>!O(A.params[0],this._optionsService.rawOptions.windowOptions)||D(A))}registerDcsHandler(b,D){return this._parser.registerDcsHandler(b,new g.DcsHandler(D))}registerEscHandler(b,D){return this._parser.registerEscHandler(b,D)}registerOscHandler(b,D){return this._parser.registerOscHandler(b,new k.OscHandler(D))}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 b;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&&((b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&b.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);D.hasWidth(this._activeBuffer.x)&&!D.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const b=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-b),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(b=this._bufferService.cols-1){this._activeBuffer.x=Math.min(b,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(b,D){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=b,this._activeBuffer.y=this._activeBuffer.scrollTop+D):(this._activeBuffer.x=b,this._activeBuffer.y=D),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(b,D){this._restrictCursor(),this._setCursor(this._activeBuffer.x+b,this._activeBuffer.y+D)}cursorUp(b){const D=this._activeBuffer.y-this._activeBuffer.scrollTop;return D>=0?this._moveCursor(0,-Math.min(D,b.params[0]||1)):this._moveCursor(0,-(b.params[0]||1)),!0}cursorDown(b){const D=this._activeBuffer.scrollBottom-this._activeBuffer.y;return D>=0?this._moveCursor(0,Math.min(D,b.params[0]||1)):this._moveCursor(0,b.params[0]||1),!0}cursorForward(b){return this._moveCursor(b.params[0]||1,0),!0}cursorBackward(b){return this._moveCursor(-(b.params[0]||1),0),!0}cursorNextLine(b){return this.cursorDown(b),this._activeBuffer.x=0,!0}cursorPrecedingLine(b){return this.cursorUp(b),this._activeBuffer.x=0,!0}cursorCharAbsolute(b){return this._setCursor((b.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(b){return this._setCursor(b.length>=2?(b.params[1]||1)-1:0,(b.params[0]||1)-1),!0}charPosAbsolute(b){return this._setCursor((b.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(b){return this._moveCursor(b.params[0]||1,0),!0}linePosAbsolute(b){return this._setCursor(this._activeBuffer.x,(b.params[0]||1)-1),!0}vPositionRelative(b){return this._moveCursor(0,b.params[0]||1),!0}hVPosition(b){return this.cursorPosition(b),!0}tabClear(b){const D=b.params[0];return D===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:D===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(b){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=b.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(b){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=b.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(b){const D=b.params[0];return D===1&&(this._curAttrData.bg|=536870912),D!==2&&D!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(b,D,A,M=!1,z=!1){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);$.replaceCells(D,A,this._activeBuffer.getNullCell(this._eraseAttrData()),z),M&&($.isWrapped=!1)}_resetBufferLine(b,D=!1){const A=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);A&&(A.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),D),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+b),A.isWrapped=!1)}eraseInDisplay(b,D=!1){let A;switch(this._restrictCursor(this._bufferService.cols),b.params[0]){case 0:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);A<this._bufferService.rows;A++)this._resetBufferLine(A,D);this._dirtyRowTracker.markDirty(A);break;case 1:for(A=this._activeBuffer.y,this._dirtyRowTracker.markDirty(A),this._eraseInBufferLine(A,0,this._activeBuffer.x+1,!0,D),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(A+1).isWrapped=!1);A--;)this._resetBufferLine(A,D);this._dirtyRowTracker.markDirty(0);break;case 2:for(A=this._bufferService.rows,this._dirtyRowTracker.markDirty(A-1);A--;)this._resetBufferLine(A,D);this._dirtyRowTracker.markDirty(0);break;case 3:const M=this._activeBuffer.lines.length-this._bufferService.rows;M>0&&(this._activeBuffer.lines.trimStart(M),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-M,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-M,0),this._onScroll.fire(0))}return!0}eraseInLine(b,D=!1){switch(this._restrictCursor(this._bufferService.cols),b.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,D);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,D)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(b){this._restrictCursor();let D=b.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y,M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,z=this._bufferService.rows-1+this._activeBuffer.ybase-M+1;for(;D--;)this._activeBuffer.lines.splice(z-1,1),this._activeBuffer.lines.splice(A,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(b){this._restrictCursor();let D=b.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const A=this._activeBuffer.ybase+this._activeBuffer.y;let M;for(M=this._bufferService.rows-1-this._activeBuffer.scrollBottom,M=this._bufferService.rows-1+this._activeBuffer.ybase-M;D--;)this._activeBuffer.lines.splice(A,1),this._activeBuffer.lines.splice(M,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(b){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.insertCells(this._activeBuffer.x,b.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(b){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.deleteCells(this._activeBuffer.x,b.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(b){let D=b.params[0]||1;for(;D--;)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(b){let D=b.params[0]||1;for(;D--;)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(u.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(b){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=b.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);M.deleteCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(b){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=b.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);M.insertCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(b){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=b.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);M.insertCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(b){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=b.params[0]||1;for(let A=this._activeBuffer.scrollTop;A<=this._activeBuffer.scrollBottom;++A){const M=this._activeBuffer.lines.get(this._activeBuffer.ybase+A);M.deleteCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),M.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(b){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(b.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(b){const D=this._parser.precedingJoinState;if(!D)return!0;const A=b.params[0]||1,M=w.UnicodeService.extractWidth(D),z=this._activeBuffer.x-M,$=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(z),Y=new Uint32Array($.length*A);let Q=0;for(let L=0;L<$.length;){const F=$.codePointAt(L)||0;Y[Q++]=F,L+=F>65535?2:1}let R=Q;for(let L=1;L<A;++L)Y.copyWithin(R,0,Q),R+=Q;return this.print(Y,0,R),!0}sendDeviceAttributesPrimary(b){return b.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(b){return b.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(b.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(b){return(this._optionsService.rawOptions.termName+"").indexOf(b)===0}setMode(b){for(let D=0;D<b.length;D++)switch(b.params[D]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(b){for(let D=0;D<b.length;D++)switch(b.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(b){for(let D=0;D<b.length;D++)switch(b.params[D]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(b){for(let D=0;D<b.length;D++)switch(b.params[D]){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(),b.params[D]===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(b,D){const A=this._coreService.decPrivateModes,{activeProtocol:M,activeEncoding:z}=this._coreMouseService,$=this._coreService,{buffers:Y,cols:Q}=this._bufferService,{active:R,alt:L}=Y,F=this._optionsService.rawOptions,I=he=>he?1:2,K=b.params[0];return V=K,Z=D?K===2?4:K===4?I($.modes.insertMode):K===12?3:K===20?I(F.convertEol):0:K===1?I(A.applicationCursorKeys):K===3?F.windowOptions.setWinLines?Q===80?2:Q===132?1:0:0:K===6?I(A.origin):K===7?I(A.wraparound):K===8?3:K===9?I(M==="X10"):K===12?I(F.cursorBlink):K===25?I(!$.isCursorHidden):K===45?I(A.reverseWraparound):K===66?I(A.applicationKeypad):K===67?4:K===1e3?I(M==="VT200"):K===1002?I(M==="DRAG"):K===1003?I(M==="ANY"):K===1004?I(A.sendFocus):K===1005?4:K===1006?I(z==="SGR"):K===1015?4:K===1016?I(z==="SGR_PIXELS"):K===1048?1:K===47||K===1047||K===1049?I(R===L):K===2004?I(A.bracketedPasteMode):0,$.triggerDataEvent(`${h.C0.ESC}[${D?"":"?"}${V};${Z}$y`),!0;var V,Z}_updateAttrColor(b,D,A,M,z){return D===2?(b|=50331648,b&=-16777216,b|=_.AttributeData.fromColorRGB([A,M,z])):D===5&&(b&=-50331904,b|=33554432|255&A),b}_extractColor(b,D,A){const M=[0,0,-1,0,0,0];let z=0,$=0;do{if(M[$+z]=b.params[D+$],b.hasSubParams(D+$)){const Y=b.getSubParams(D+$);let Q=0;do M[1]===5&&(z=1),M[$+Q+1+z]=Y[Q];while(++Q<Y.length&&Q+$+1+z<M.length);break}if(M[1]===5&&$+z>=2||M[1]===2&&$+z>=5)break;M[1]&&(z=1)}while(++$+D<b.length&&$+z<M.length);for(let Y=2;Y<M.length;++Y)M[Y]===-1&&(M[Y]=0);switch(M[0]){case 38:A.fg=this._updateAttrColor(A.fg,M[1],M[3],M[4],M[5]);break;case 48:A.bg=this._updateAttrColor(A.bg,M[1],M[3],M[4],M[5]);break;case 58:A.extended=A.extended.clone(),A.extended.underlineColor=this._updateAttrColor(A.extended.underlineColor,M[1],M[3],M[4],M[5])}return $}_processUnderline(b,D){D.extended=D.extended.clone(),(!~b||b>5)&&(b=1),D.extended.underlineStyle=b,D.fg|=268435456,b===0&&(D.fg&=-268435457),D.updateExtended()}_processSGR0(b){b.fg=u.DEFAULT_ATTR_DATA.fg,b.bg=u.DEFAULT_ATTR_DATA.bg,b.extended=b.extended.clone(),b.extended.underlineStyle=0,b.extended.underlineColor&=-67108864,b.updateExtended()}charAttributes(b){if(b.length===1&&b.params[0]===0)return this._processSGR0(this._curAttrData),!0;const D=b.length;let A;const M=this._curAttrData;for(let z=0;z<D;z++)A=b.params[z],A>=30&&A<=37?(M.fg&=-50331904,M.fg|=16777216|A-30):A>=40&&A<=47?(M.bg&=-50331904,M.bg|=16777216|A-40):A>=90&&A<=97?(M.fg&=-50331904,M.fg|=16777224|A-90):A>=100&&A<=107?(M.bg&=-50331904,M.bg|=16777224|A-100):A===0?this._processSGR0(M):A===1?M.fg|=134217728:A===3?M.bg|=67108864:A===4?(M.fg|=268435456,this._processUnderline(b.hasSubParams(z)?b.getSubParams(z)[0]:1,M)):A===5?M.fg|=536870912:A===7?M.fg|=67108864:A===8?M.fg|=1073741824:A===9?M.fg|=2147483648:A===2?M.bg|=134217728:A===21?this._processUnderline(2,M):A===22?(M.fg&=-134217729,M.bg&=-134217729):A===23?M.bg&=-67108865:A===24?(M.fg&=-268435457,this._processUnderline(0,M)):A===25?M.fg&=-536870913:A===27?M.fg&=-67108865:A===28?M.fg&=-1073741825:A===29?M.fg&=2147483647:A===39?(M.fg&=-67108864,M.fg|=16777215&u.DEFAULT_ATTR_DATA.fg):A===49?(M.bg&=-67108864,M.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):A===38||A===48||A===58?z+=this._extractColor(b,z,M):A===53?M.bg|=1073741824:A===55?M.bg&=-1073741825:A===59?(M.extended=M.extended.clone(),M.extended.underlineColor=-1,M.updateExtended()):A===100?(M.fg&=-67108864,M.fg|=16777215&u.DEFAULT_ATTR_DATA.fg,M.bg&=-67108864,M.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",A);return!0}deviceStatus(b){switch(b.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const D=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${D};${A}R`)}return!0}deviceStatusPrivate(b){if(b.params[0]===6){const D=this._activeBuffer.y+1,A=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${D};${A}R`)}return!0}softReset(b){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=u.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(b){const D=b.params[0]||1;switch(D){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 A=D%2==1;return this._optionsService.options.cursorBlink=A,!0}setScrollRegion(b){const D=b.params[0]||1;let A;return(b.length<2||(A=b.params[1])>this._bufferService.rows||A===0)&&(A=this._bufferService.rows),A>D&&(this._activeBuffer.scrollTop=D-1,this._activeBuffer.scrollBottom=A-1,this._setCursor(0,0)),!0}windowOptions(b){if(!O(b.params[0],this._optionsService.rawOptions.windowOptions))return!0;const D=b.length>1?b.params[1]:0;switch(b.params[0]){case 14:D!==2&&this._onRequestWindowsOptionsReport.fire(P.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(P.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:D!==0&&D!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),D!==0&&D!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:D!==0&&D!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),D!==0&&D!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(b){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(b){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(b){return this._windowTitle=b,this._onTitleChange.fire(b),!0}setIconName(b){return this._iconName=b,!0}setOrReportIndexedColor(b){const D=[],A=b.split(";");for(;A.length>1;){const M=A.shift(),z=A.shift();if(/^\d+$/.exec(M)){const $=parseInt(M);if(q($))if(z==="?")D.push({type:0,index:$});else{const Y=(0,x.parseColor)(z);Y&&D.push({type:1,index:$,color:Y})}}}return D.length&&this._onColor.fire(D),!0}setHyperlink(b){const D=b.split(";");return!(D.length<2)&&(D[1]?this._createHyperlink(D[0],D[1]):!D[0]&&this._finishHyperlink())}_createHyperlink(b,D){this._getCurrentLinkId()&&this._finishHyperlink();const A=b.split(":");let M;const z=A.findIndex($=>$.startsWith("id="));return z!==-1&&(M=A[z].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:M,uri:D}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(b,D){const A=b.split(";");for(let M=0;M<A.length&&!(D>=this._specialColors.length);++M,++D)if(A[M]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const z=(0,x.parseColor)(A[M]);z&&this._onColor.fire([{type:1,index:this._specialColors[D],color:z}])}return!0}setOrReportFgColor(b){return this._setOrReportSpecialColor(b,0)}setOrReportBgColor(b){return this._setOrReportSpecialColor(b,1)}setOrReportCursorColor(b){return this._setOrReportSpecialColor(b,2)}restoreIndexedColor(b){if(!b)return this._onColor.fire([{type:2}]),!0;const D=[],A=b.split(";");for(let M=0;M<A.length;++M)if(/^\d+$/.exec(A[M])){const z=parseInt(A[M]);q(z)&&D.push({type:2,index:z})}return D.length&&this._onColor.fire(D),!0}restoreFgColor(b){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(b){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(b){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(b){return b.length!==2?(this.selectDefaultCharset(),!0):(b[0]==="/"||this._charsetService.setgCharset(T[b[0]],p.CHARSETS[b[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const b=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,b,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=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(b){return this._charsetService.setgLevel(b),!0}screenAlignmentPattern(){const b=new n.CellData;b.content=4194373,b.fg=this._curAttrData.fg,b.bg=this._curAttrData.bg,this._setCursor(0,0);for(let D=0;D<this._bufferService.rows;++D){const A=this._activeBuffer.ybase+this._activeBuffer.y+D,M=this._activeBuffer.lines.get(A);M&&(M.fill(b),M.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(b,D){const A=this._bufferService.buffer,M=this._optionsService.rawOptions;return(z=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${z}${h.C0.ESC}\\`),!0))(b==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:b==='"p'?'P1$r61;1"p':b==="r"?`P1$r${A.scrollTop+1};${A.scrollBottom+1}r`:b==="m"?"P1$r0m":b===" q"?`P1$r${{block:2,underline:4,bar:6}[M.cursorStyle]-(M.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(b,D){this._dirtyRowTracker.markRangeDirty(b,D)}}o.InputHandler=W;let U=class{constructor(H){this._bufferService=H,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(H){H<this.start?this.start=H:H>this.end&&(this.end=H)}markRangeDirty(H,b){H>b&&(N=H,H=b,b=N),H<this.start&&(this.start=H),b>this.end&&(this.end=b)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function q(H){return 0<=H&&H<256}U=f([m(0,C.IBufferService)],U)},844:(y,o)=>{function c(f){for(const m of f)m.dispose();f.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const m=this._disposables.indexOf(f);m!==-1&&this._disposables.splice(m,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var m;this._isDisposed||f===this._value||((m=this._value)==null||m.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},o.toDisposable=function(f){return{dispose:f}},o.disposeArray=c,o.getDisposeArrayDisposable=function(f){return{dispose:()=>c(f)}}},1505:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(m,h,p){this._data[m]||(this._data[m]={}),this._data[m][h]=p}get(m,h){return this._data[m]?this._data[m][h]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(f,m,h,p,S){this._data.get(f,m)||this._data.set(f,m,new c),this._data.get(f,m).set(h,p,S)}get(f,m,h,p){var S;return(S=this._data.get(f,m))==null?void 0:S.get(h,p)}clear(){this._data.clear()}}},6114:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const c=o.isNode?"node":navigator.userAgent,f=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const m=c.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),o.isIpad=f==="iPad",o.isIphone=f==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),o.isLinux=f.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(c=this._search(this._getKey(f)),this._array.splice(c,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const m=this._getKey(f);if(m===void 0||(c=this._search(m),c===-1)||this._getKey(this._array[c])!==m)return!1;do if(this._array[c]===f)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===m);return!1}*getKeyIterator(f){if(this._array.length!==0&&(c=this._search(f),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===f))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===f)}forEachByKey(f,m){if(this._array.length!==0&&(c=this._search(f),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===f))do m(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===f)}values(){return[...this._array].values()}_search(f){let m=0,h=this._array.length-1;for(;h>=m;){let p=m+h>>1;const S=this._getKey(this._array[p]);if(S>f)h=p-1;else{if(!(S<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}m=p+1}}return m}}},7226:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const f=c(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),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(S){this._idleCallback=void 0;let E=0,v=0,u=S.timeRemaining(),l=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),v=Math.max(E,v),l=S.timeRemaining(),1.5*v>l)return u-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(u-E))}ms`),void this._start();u=l}this.clear()}}class h extends m{_requestCallback(S){return setTimeout(()=>S(this._createDeadline(16)))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const E=Date.now()+S;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}o.PriorityTaskQueue=h,o.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:h,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const f=c(643);o.updateWindowsModeWrappedState=function(m){const h=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),p=h==null?void 0:h.get(m.cols-1),S=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);S&&p&&(S.isWrapped=p[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&p[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new c;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=c;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,p=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=f},9092:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const f=c(6349),m=c(7226),h=c(3734),p=c(8437),S=c(4634),E=c(511),v=c(643),u=c(4863),l=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(s,n,_){this._hasScrollback=s,this._optionsService=n,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(s){return s?(this._nullCell.fg=s.fg,this._nullCell.bg=s.bg,this._nullCell.extended=s.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(s){return s?(this._whitespaceCell.fg=s.fg,this._whitespaceCell.bg=s.bg,this._whitespaceCell.extended=s.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(s,n){return new p.BufferLine(this._bufferService.cols,this.getNullCell(s),n)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const s=this.ybase+this.y-this.ydisp;return s>=0&&s<this._rows}_getCorrectBufferLength(s){if(!this._hasScrollback)return s;const n=s+this._optionsService.rawOptions.scrollback;return n>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:n}fillViewportRows(s){if(this.lines.length===0){s===void 0&&(s=p.DEFAULT_ATTR_DATA);let n=this._rows;for(;n--;)this.lines.push(this.getBlankLine(s))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(s,n){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let C=0;const w=this._getCorrectBufferLength(n);if(w>this.lines.maxLength&&(this.lines.maxLength=w),this.lines.length>0){if(this._cols<s)for(let g=0;g<this.lines.length;g++)C+=+this.lines.get(g).resize(s,_);let k=0;if(this._rows<n)for(let g=this._rows;g<n;g++)this.lines.length<n+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(s,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+k+1?(this.ybase--,k++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(s,_)));else for(let g=this._rows;g>n;g--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(w<this.lines.maxLength){const g=this.lines.length-w;g>0&&(this.lines.trimStart(g),this.ybase=Math.max(this.ybase-g,0),this.ydisp=Math.max(this.ydisp-g,0),this.savedY=Math.max(this.savedY-g,0)),this.lines.maxLength=w}this.x=Math.min(this.x,s-1),this.y=Math.min(this.y,n-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,s-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(s,n),this._cols>s))for(let k=0;k<this.lines.length;k++)C+=+this.lines.get(k).resize(s,_);this._cols=s,this._rows=n,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let s=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,s=!1);let n=0;for(;this._memoryCleanupPosition<this.lines.length;)if(n+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),n>100)return!0;return s}get _isReflowEnabled(){const s=this._optionsService.rawOptions.windowsPty;return s&&s.buildNumber?this._hasScrollback&&s.backend==="conpty"&&s.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(s,n){this._cols!==s&&(s>this._cols?this._reflowLarger(s,n):this._reflowSmaller(s,n))}_reflowLarger(s,n){const _=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,s,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const C=(0,S.reflowLargerCreateNewLayout)(this.lines,_);(0,S.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(s,n,C.countRemoved)}}_reflowLargerAdjustViewport(s,n,_){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let w=_;for(;w-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new p.BufferLine(s,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(s,n){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),C=[];let w=0;for(let k=this.lines.length-1;k>=0;k--){let g=this.lines.get(k);if(!g||!g.isWrapped&&g.getTrimmedLength()<=s)continue;const x=[g];for(;g.isWrapped&&k>0;)g=this.lines.get(--k),x.unshift(g);const T=this.ybase+this.y;if(T>=k&&T<k+x.length)continue;const B=x[x.length-1].getTrimmedLength(),O=(0,S.reflowSmallerGetNewLineLengths)(x,this._cols,s),P=O.length-x.length;let N;N=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+P):Math.max(0,this.lines.length-this.lines.maxLength+P);const W=[];for(let A=0;A<P;A++){const M=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);W.push(M)}W.length>0&&(C.push({start:k+x.length+w,newLines:W}),w+=W.length),x.push(...W);let U=O.length-1,q=O[U];q===0&&(U--,q=O[U]);let H=x.length-P-1,b=B;for(;H>=0;){const A=Math.min(b,q);if(x[U]===void 0)break;if(x[U].copyCellsFrom(x[H],b-A,q-A,A,!0),q-=A,q===0&&(U--,q=O[U]),b-=A,b===0){H--;const M=Math.max(H,0);b=(0,S.getWrappedLineTrimmedLength)(x,M,this._cols)}}for(let A=0;A<x.length;A++)O[A]<s&&x[A].setCell(O[A],_);let D=P-N;for(;D-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+w)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+P,this.ybase+n-1)}if(C.length>0){const k=[],g=[];for(let U=0;U<this.lines.length;U++)g.push(this.lines.get(U));const x=this.lines.length;let T=x-1,B=0,O=C[B];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+w);let P=0;for(let U=Math.min(this.lines.maxLength-1,x+w-1);U>=0;U--)if(O&&O.start>T+P){for(let q=O.newLines.length-1;q>=0;q--)this.lines.set(U--,O.newLines[q]);U++,k.push({index:T+1,amount:O.newLines.length}),P+=O.newLines.length,O=C[++B]}else this.lines.set(U,g[T--]);let N=0;for(let U=k.length-1;U>=0;U--)k[U].index+=N,this.lines.onInsertEmitter.fire(k[U]),N+=k[U].amount;const W=Math.max(0,x+w-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(s,n,_=0,C){const w=this.lines.get(s);return w?w.translateToString(n,_,C):""}getWrappedRangeForLine(s){let n=s,_=s;for(;n>0&&this.lines.get(n).isWrapped;)n--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:n,last:_}}setupTabStops(s){for(s!=null?this.tabs[s]||(s=this.prevStop(s)):(this.tabs={},s=0);s<this._cols;s+=this._optionsService.rawOptions.tabStopWidth)this.tabs[s]=!0}prevStop(s){for(s==null&&(s=this.x);!this.tabs[--s]&&s>0;);return s>=this._cols?this._cols-1:s<0?0:s}nextStop(s){for(s==null&&(s=this.x);!this.tabs[++s]&&s<this._cols;);return s>=this._cols?this._cols-1:s<0?0:s}clearMarkers(s){this._isClearing=!0;for(let n=0;n<this.markers.length;n++)this.markers[n].line===s&&(this.markers[n].dispose(),this.markers.splice(n--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let s=0;s<this.markers.length;s++)this.markers[s].dispose(),this.markers.splice(s--,1);this._isClearing=!1}addMarker(s){const n=new u.Marker(s);return this.markers.push(n),n.register(this.lines.onTrim(_=>{n.line-=_,n.line<0&&n.dispose()})),n.register(this.lines.onInsert(_=>{n.line>=_.index&&(n.line+=_.amount)})),n.register(this.lines.onDelete(_=>{n.line>=_.index&&n.line<_.index+_.amount&&n.dispose(),n.line>_.index&&(n.line-=_.amount)})),n.register(n.onDispose(()=>this._removeMarker(n))),n}_removeMarker(s){this._isClearing||this.markers.splice(this.markers.indexOf(s),1)}}},8437:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const f=c(3734),m=c(511),h=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class E{constructor(u,l,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*u);const n=l||m.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<u;++_)this.setCell(_,n);this.length=u}get(u){const l=this._data[3*u+0],s=2097151&l;return[this._data[3*u+1],2097152&l?this._combined[u]:s?(0,p.stringFromCodePoint)(s):"",l>>22,2097152&l?this._combined[u].charCodeAt(this._combined[u].length-1):s]}set(u,l){this._data[3*u+1]=l[h.CHAR_DATA_ATTR_INDEX],l[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[u]=l[1],this._data[3*u+0]=2097152|u|l[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*u+0]=l[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|l[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(u){return this._data[3*u+0]>>22}hasWidth(u){return 12582912&this._data[3*u+0]}getFg(u){return this._data[3*u+1]}getBg(u){return this._data[3*u+2]}hasContent(u){return 4194303&this._data[3*u+0]}getCodePoint(u){const l=this._data[3*u+0];return 2097152&l?this._combined[u].charCodeAt(this._combined[u].length-1):2097151&l}isCombined(u){return 2097152&this._data[3*u+0]}getString(u){const l=this._data[3*u+0];return 2097152&l?this._combined[u]:2097151&l?(0,p.stringFromCodePoint)(2097151&l):""}isProtected(u){return 536870912&this._data[3*u+2]}loadCell(u,l){return S=3*u,l.content=this._data[S+0],l.fg=this._data[S+1],l.bg=this._data[S+2],2097152&l.content&&(l.combinedData=this._combined[u]),268435456&l.bg&&(l.extended=this._extendedAttrs[u]),l}setCell(u,l){2097152&l.content&&(this._combined[u]=l.combinedData),268435456&l.bg&&(this._extendedAttrs[u]=l.extended),this._data[3*u+0]=l.content,this._data[3*u+1]=l.fg,this._data[3*u+2]=l.bg}setCellFromCodepoint(u,l,s,n){268435456&n.bg&&(this._extendedAttrs[u]=n.extended),this._data[3*u+0]=l|s<<22,this._data[3*u+1]=n.fg,this._data[3*u+2]=n.bg}addCodepointToCell(u,l,s){let n=this._data[3*u+0];2097152&n?this._combined[u]+=(0,p.stringFromCodePoint)(l):2097151&n?(this._combined[u]=(0,p.stringFromCodePoint)(2097151&n)+(0,p.stringFromCodePoint)(l),n&=-2097152,n|=2097152):n=l|4194304,s&&(n&=-12582913,n|=s<<22),this._data[3*u+0]=n}insertCells(u,l,s){if((u%=this.length)&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,s),l<this.length-u){const n=new m.CellData;for(let _=this.length-u-l-1;_>=0;--_)this.setCell(u+l+_,this.loadCell(u+_,n));for(let _=0;_<l;++_)this.setCell(u+_,s)}else for(let n=u;n<this.length;++n)this.setCell(n,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(u,l,s){if(u%=this.length,l<this.length-u){const n=new m.CellData;for(let _=0;_<this.length-u-l;++_)this.setCell(u+_,this.loadCell(u+l+_,n));for(let _=this.length-l;_<this.length;++_)this.setCell(_,s)}else for(let n=u;n<this.length;++n)this.setCell(n,s);u&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,s),this.getWidth(u)!==0||this.hasContent(u)||this.setCellFromCodepoint(u,0,1,s)}replaceCells(u,l,s,n=!1){if(n)for(u&&this.getWidth(u-1)===2&&!this.isProtected(u-1)&&this.setCellFromCodepoint(u-1,0,1,s),l<this.length&&this.getWidth(l-1)===2&&!this.isProtected(l)&&this.setCellFromCodepoint(l,0,1,s);u<l&&u<this.length;)this.isProtected(u)||this.setCell(u,s),u++;else for(u&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,s),l<this.length&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l,0,1,s);u<l&&u<this.length;)this.setCell(u++,s)}resize(u,l){if(u===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const s=3*u;if(u>this.length){if(this._data.buffer.byteLength>=4*s)this._data=new Uint32Array(this._data.buffer,0,s);else{const n=new Uint32Array(s);n.set(this._data),this._data=n}for(let n=this.length;n<u;++n)this.setCell(n,l)}else{this._data=this._data.subarray(0,s);const n=Object.keys(this._combined);for(let C=0;C<n.length;C++){const w=parseInt(n[C],10);w>=u&&delete this._combined[w]}const _=Object.keys(this._extendedAttrs);for(let C=0;C<_.length;C++){const w=parseInt(_[C],10);w>=u&&delete this._extendedAttrs[w]}}return this.length=u,4*s*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const u=new Uint32Array(this._data.length);return u.set(this._data),this._data=u,1}return 0}fill(u,l=!1){if(l)for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,u);else{this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,u)}}copyFrom(u){this.length!==u.length?this._data=new Uint32Array(u._data):this._data.set(u._data),this.length=u.length,this._combined={};for(const l in u._combined)this._combined[l]=u._combined[l];this._extendedAttrs={};for(const l in u._extendedAttrs)this._extendedAttrs[l]=u._extendedAttrs[l];this.isWrapped=u.isWrapped}clone(){const u=new E(0);u._data=new Uint32Array(this._data),u.length=this.length;for(const l in this._combined)u._combined[l]=this._combined[l];for(const l in this._extendedAttrs)u._extendedAttrs[l]=this._extendedAttrs[l];return u.isWrapped=this.isWrapped,u}getTrimmedLength(){for(let u=this.length-1;u>=0;--u)if(4194303&this._data[3*u+0])return u+(this._data[3*u+0]>>22);return 0}getNoBgTrimmedLength(){for(let u=this.length-1;u>=0;--u)if(4194303&this._data[3*u+0]||50331648&this._data[3*u+2])return u+(this._data[3*u+0]>>22);return 0}copyCellsFrom(u,l,s,n,_){const C=u._data;if(_)for(let k=n-1;k>=0;k--){for(let g=0;g<3;g++)this._data[3*(s+k)+g]=C[3*(l+k)+g];268435456&C[3*(l+k)+2]&&(this._extendedAttrs[s+k]=u._extendedAttrs[l+k])}else for(let k=0;k<n;k++){for(let g=0;g<3;g++)this._data[3*(s+k)+g]=C[3*(l+k)+g];268435456&C[3*(l+k)+2]&&(this._extendedAttrs[s+k]=u._extendedAttrs[l+k])}const w=Object.keys(u._combined);for(let k=0;k<w.length;k++){const g=parseInt(w[k],10);g>=l&&(this._combined[g-l+s]=u._combined[g])}}translateToString(u,l,s,n){l=l??0,s=s??this.length,u&&(s=Math.min(s,this.getTrimmedLength())),n&&(n.length=0);let _="";for(;l<s;){const C=this._data[3*l+0],w=2097151&C,k=2097152&C?this._combined[l]:w?(0,p.stringFromCodePoint)(w):h.WHITESPACE_CELL_CHAR;if(_+=k,n)for(let g=0;g<k.length;++g)n.push(l);l+=C>>22||1}return n&&n.push(l),_}}o.BufferLine=E},4841:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,f){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return f*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(y,o)=>{function c(f,m,h){if(m===f.length-1)return f[m].getTrimmedLength();const p=!f[m].hasContent(h-1)&&f[m].getWidth(h-1)===1,S=f[m+1].getWidth(0)===2;return p&&S?h-1:h}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(f,m,h,p,S){const E=[];for(let v=0;v<f.length-1;v++){let u=v,l=f.get(++u);if(!l.isWrapped)continue;const s=[f.get(v)];for(;u<f.length&&l.isWrapped;)s.push(l),l=f.get(++u);if(p>=v&&p<u){v+=s.length-1;continue}let n=0,_=c(s,n,m),C=1,w=0;for(;C<s.length;){const g=c(s,C,m),x=g-w,T=h-_,B=Math.min(x,T);s[n].copyCellsFrom(s[C],w,_,B,!1),_+=B,_===h&&(n++,_=0),w+=B,w===g&&(C++,w=0),_===0&&n!==0&&s[n-1].getWidth(h-1)===2&&(s[n].copyCellsFrom(s[n-1],h-1,_++,1,!1),s[n-1].setCell(h-1,S))}s[n].replaceCells(_,h,S);let k=0;for(let g=s.length-1;g>0&&(g>n||s[g].getTrimmedLength()===0);g--)k++;k>0&&(E.push(v+s.length-k),E.push(k)),v+=s.length-1}return E},o.reflowLargerCreateNewLayout=function(f,m){const h=[];let p=0,S=m[p],E=0;for(let v=0;v<f.length;v++)if(S===v){const u=m[++p];f.onDeleteEmitter.fire({index:v-E,amount:u}),v+=u-1,E+=u,S=m[++p]}else h.push(v);return{layout:h,countRemoved:E}},o.reflowLargerApplyNewLayout=function(f,m){const h=[];for(let p=0;p<m.length;p++)h.push(f.get(m[p]));for(let p=0;p<h.length;p++)f.set(p,h[p]);f.length=m.length},o.reflowSmallerGetNewLineLengths=function(f,m,h){const p=[],S=f.map((l,s)=>c(f,s,m)).reduce((l,s)=>l+s);let E=0,v=0,u=0;for(;u<S;){if(S-u<h){p.push(S-u);break}E+=h;const l=c(f,v,m);E>l&&(E-=l,v++);const s=f[v].getWidth(E-1)===2;s&&E--;const n=s?h-1:h;p.push(n),u+=n}return p},o.getWrappedLineTrimmedLength=c},5295:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const f=c(8460),m=c(844),h=c(9092);class p extends m.Disposable{constructor(E,v){super(),this._optionsService=E,this._bufferService=v,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),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(E,v){this._normal.resize(E,v),this._alt.resize(E,v),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}o.BufferSet=p},511:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const f=c(482),m=c(643),h=c(3734);class p extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const v=new p;return v.setFromCharData(E),v}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const u=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=u&&u<=56319){const l=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=l&&l<=57343?this.content=1024*(u-55296)+l-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=p},643:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const f=c(8460),m=c(844);class h{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}o.Marker=h,h._nextId=1},7116:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.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:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(y,o)=>{var c,f,m;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
47
|
-
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""}(c||(o.C0=c={})),function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""}(f||(o.C1=f={})),function(h){h.ST=`${c.ESC}\\`}(m||(o.C1_ESCAPED=m={}))},7399:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const f=c(2584),m={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:["'",'"']};o.evaluateKeyboardEvent=function(h,p,S,E){const v={type:0,cancel:!1,key:void 0},u=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?v.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?v.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?v.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(v.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:v.key=h.ctrlKey?"\b":f.C0.DEL,h.altKey&&(v.key=f.C0.ESC+v.key);break;case 9:if(h.shiftKey){v.key=f.C0.ESC+"[Z";break}v.key=f.C0.HT,v.cancel=!0;break;case 13:v.key=h.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,v.cancel=!0;break;case 27:v.key=f.C0.ESC,h.altKey&&(v.key=f.C0.ESC+f.C0.ESC),v.cancel=!0;break;case 37:if(h.metaKey)break;u?(v.key=f.C0.ESC+"[1;"+(u+1)+"D",v.key===f.C0.ESC+"[1;3D"&&(v.key=f.C0.ESC+(S?"b":"[1;5D"))):v.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(h.metaKey)break;u?(v.key=f.C0.ESC+"[1;"+(u+1)+"C",v.key===f.C0.ESC+"[1;3C"&&(v.key=f.C0.ESC+(S?"f":"[1;5C"))):v.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(h.metaKey)break;u?(v.key=f.C0.ESC+"[1;"+(u+1)+"A",S||v.key!==f.C0.ESC+"[1;3A"||(v.key=f.C0.ESC+"[1;5A")):v.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(h.metaKey)break;u?(v.key=f.C0.ESC+"[1;"+(u+1)+"B",S||v.key!==f.C0.ESC+"[1;3B"||(v.key=f.C0.ESC+"[1;5B")):v.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(v.key=f.C0.ESC+"[2~");break;case 46:v.key=u?f.C0.ESC+"[3;"+(u+1)+"~":f.C0.ESC+"[3~";break;case 36:v.key=u?f.C0.ESC+"[1;"+(u+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:v.key=u?f.C0.ESC+"[1;"+(u+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:h.shiftKey?v.type=2:h.ctrlKey?v.key=f.C0.ESC+"[5;"+(u+1)+"~":v.key=f.C0.ESC+"[5~";break;case 34:h.shiftKey?v.type=3:h.ctrlKey?v.key=f.C0.ESC+"[6;"+(u+1)+"~":v.key=f.C0.ESC+"[6~";break;case 112:v.key=u?f.C0.ESC+"[1;"+(u+1)+"P":f.C0.ESC+"OP";break;case 113:v.key=u?f.C0.ESC+"[1;"+(u+1)+"Q":f.C0.ESC+"OQ";break;case 114:v.key=u?f.C0.ESC+"[1;"+(u+1)+"R":f.C0.ESC+"OR";break;case 115:v.key=u?f.C0.ESC+"[1;"+(u+1)+"S":f.C0.ESC+"OS";break;case 116:v.key=u?f.C0.ESC+"[15;"+(u+1)+"~":f.C0.ESC+"[15~";break;case 117:v.key=u?f.C0.ESC+"[17;"+(u+1)+"~":f.C0.ESC+"[17~";break;case 118:v.key=u?f.C0.ESC+"[18;"+(u+1)+"~":f.C0.ESC+"[18~";break;case 119:v.key=u?f.C0.ESC+"[19;"+(u+1)+"~":f.C0.ESC+"[19~";break;case 120:v.key=u?f.C0.ESC+"[20;"+(u+1)+"~":f.C0.ESC+"[20~";break;case 121:v.key=u?f.C0.ESC+"[21;"+(u+1)+"~":f.C0.ESC+"[21~";break;case 122:v.key=u?f.C0.ESC+"[23;"+(u+1)+"~":f.C0.ESC+"[23~";break;case 123:v.key=u?f.C0.ESC+"[24;"+(u+1)+"~":f.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(S&&!E||!h.altKey||h.metaKey)!S||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?v.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(v.key=f.C0.US),h.key==="@"&&(v.key=f.C0.NUL)):h.keyCode===65&&(v.type=1);else{const l=m[h.keyCode],s=l==null?void 0:l[h.shiftKey?1:0];if(s)v.key=f.C0.ESC+s;else if(h.keyCode>=65&&h.keyCode<=90){const n=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(n);h.shiftKey&&(_=_.toUpperCase()),v.key=f.C0.ESC+_}else if(h.keyCode===32)v.key=f.C0.ESC+(h.ctrlKey?f.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let n=h.code.slice(3,4);h.shiftKey||(n=n.toLowerCase()),v.key=f.C0.ESC+n,v.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?v.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?v.key=f.C0.NUL:h.keyCode>=51&&h.keyCode<=55?v.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?v.key=f.C0.DEL:h.keyCode===219?v.key=f.C0.ESC:h.keyCode===220?v.key=f.C0.FS:h.keyCode===221&&(v.key=f.C0.GS)}return v}},482:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},o.utf32ToString=function(c,f=0,m=c.length){let h="";for(let p=f;p<m;++p){let S=c[p];S>65535?(S-=65536,h+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):h+=String.fromCharCode(S)}return h},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,f){const m=c.length;if(!m)return 0;let h=0,p=0;if(this._interim){const S=c.charCodeAt(p++);56320<=S&&S<=57343?f[h++]=1024*(this._interim-55296)+S-56320+65536:(f[h++]=this._interim,f[h++]=S),this._interim=0}for(let S=p;S<m;++S){const E=c.charCodeAt(S);if(55296<=E&&E<=56319){if(++S>=m)return this._interim=E,h;const v=c.charCodeAt(S);56320<=v&&v<=57343?f[h++]=1024*(E-55296)+v-56320+65536:(f[h++]=E,f[h++]=v)}else E!==65279&&(f[h++]=E)}return h}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,f){const m=c.length;if(!m)return 0;let h,p,S,E,v=0,u=0,l=0;if(this.interim[0]){let _=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let w,k=0;for(;(w=63&this.interim[++k])&&k<4;)C<<=6,C|=w;const g=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,x=g-k;for(;l<x;){if(l>=m)return 0;if(w=c[l++],(192&w)!=128){l--,_=!0;break}this.interim[k++]=w,C<<=6,C|=63&w}_||(g===2?C<128?l--:f[v++]=C:g===3?C<2048||C>=55296&&C<=57343||C===65279||(f[v++]=C):C<65536||C>1114111||(f[v++]=C)),this.interim.fill(0)}const s=m-4;let n=l;for(;n<m;){for(;!(!(n<s)||128&(h=c[n])||128&(p=c[n+1])||128&(S=c[n+2])||128&(E=c[n+3]));)f[v++]=h,f[v++]=p,f[v++]=S,f[v++]=E,n+=4;if(h=c[n++],h<128)f[v++]=h;else if((224&h)==192){if(n>=m)return this.interim[0]=h,v;if(p=c[n++],(192&p)!=128){n--;continue}if(u=(31&h)<<6|63&p,u<128){n--;continue}f[v++]=u}else if((240&h)==224){if(n>=m)return this.interim[0]=h,v;if(p=c[n++],(192&p)!=128){n--;continue}if(n>=m)return this.interim[0]=h,this.interim[1]=p,v;if(S=c[n++],(192&S)!=128){n--;continue}if(u=(15&h)<<12|(63&p)<<6|63&S,u<2048||u>=55296&&u<=57343||u===65279)continue;f[v++]=u}else if((248&h)==240){if(n>=m)return this.interim[0]=h,v;if(p=c[n++],(192&p)!=128){n--;continue}if(n>=m)return this.interim[0]=h,this.interim[1]=p,v;if(S=c[n++],(192&S)!=128){n--;continue}if(n>=m)return this.interim[0]=h,this.interim[1]=p,this.interim[2]=S,v;if(E=c[n++],(192&E)!=128){n--;continue}if(u=(7&h)<<18|(63&p)<<12|(63&S)<<6|63&E,u<65536||u>1114111)continue;f[v++]=u}}return v}}},225:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const f=c(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;o.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let S=0;S<m.length;++S)p.fill(0,m[S][0],m[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?p[S]:function(E,v){let u,l=0,s=v.length-1;if(E<v[0][0]||E>v[s][1])return!1;for(;s>=l;)if(u=l+s>>1,E>v[u][1])l=u+1;else{if(!(E<v[u][0]))return!0;s=u-1}return!1}(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,E){let v=this.wcwidth(S),u=v===0&&E!==0;if(u){const l=f.UnicodeService.extractWidth(E);l===0?u=!1:l>v&&(v=l)}return f.UnicodeService.createPropertyValue(0,v,u)}}},5981:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const f=c(8460),m=c(844);class h extends m.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let v;for(this._isSyncWriting=!0;v=this._writeBuffer.shift();){this._action(v);const u=this._callbacks.shift();u&&u()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,E){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+=S.length,this._writeBuffer.push(S),this._callbacks.push(E),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(E)}_innerWrite(S=0,E=!0){const v=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const u=this._writeBuffer[this._bufferOffset],l=this._action(u,E);if(l){const n=_=>Date.now()-v>=12?setTimeout(()=>this._innerWrite(0,_)):this._innerWrite(v,_);return void l.catch(_=>(queueMicrotask(()=>{throw _}),Promise.resolve(!1))).then(n)}const s=this._callbacks[this._bufferOffset];if(s&&s(),this._bufferOffset++,this._pendingData-=u.length,Date.now()-v>=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()}}o.WriteBuffer=h},5941:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const c=/^([\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})$/,f=/^[\da-f]+$/;function m(h,p){const S=h.toString(16),E=S.length<2?"0"+S:S;switch(p){case 4:return S[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}o.parseColor=function(h){if(!h)return;let p=h.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const S=c.exec(p);if(S){const E=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/E*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/E*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/E*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),f.exec(p)&&[3,6,9,12].includes(p.length))){const S=p.length/3,E=[0,0,0];for(let v=0;v<3;++v){const u=parseInt(p.slice(S*v,S*v+S),16);E[v]=S===1?u<<4:S===2?u:S===3?u>>4:u>>8}return E}},o.toRgbString=function(h,p=16){const[S,E,v]=h;return`rgb:${m(S,p)}/${m(E,p)}/${m(v,p)}`}},5770:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const f=c(482),m=c(8742),h=c(5770),p=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(E,v){this._handlers[E]===void 0&&(this._handlers[E]=[]);const u=this._handlers[E];return u.push(v),{dispose:()=>{const l=u.indexOf(v);l!==-1&&u.splice(l,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(E,v){if(this.reset(),this._ident=E,this._active=this._handlers[E]||p,this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].hook(v);else this._handlerFb(this._ident,"HOOK",v)}put(E,v,u){if(this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].put(E,v,u);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(E,v,u))}unhook(E,v=!0){if(this._active.length){let u=!1,l=this._active.length-1,s=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,u=v,s=this._stack.fallThrough,this._stack.paused=!1),!s&&u===!1){for(;l>=0&&(u=this._active[l].unhook(E),u!==!0);l--)if(u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,u;l--}for(;l>=0;l--)if(u=this._active[l].unhook(!1),u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,u}else this._handlerFb(this._ident,"UNHOOK",E);this._active=p,this._ident=0}};const S=new m.Params;S.addParam(0),o.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=S,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():S,this._data="",this._hitLimit=!1}put(E,v,u){this._hitLimit||(this._data+=(0,f.utf32ToString)(E,v,u),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let v=!1;if(this._hitLimit)v=!1;else if(E&&(v=this._handler(this._data,this._params),v instanceof Promise))return v.then(u=>(this._params=S,this._data="",this._hitLimit=!1,u));return this._params=S,this._data="",this._hitLimit=!1,v}}},2015:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const f=c(844),m=c(8742),h=c(6242),p=c(6351);class S{constructor(l){this.table=new Uint8Array(l)}setDefault(l,s){this.table.fill(l<<4|s)}add(l,s,n,_){this.table[s<<8|l]=n<<4|_}addMany(l,s,n,_){for(let C=0;C<l.length;C++)this.table[s<<8|l[C]]=n<<4|_}}o.TransitionTable=S;const E=160;o.VT500_TRANSITION_TABLE=function(){const u=new S(4095),l=Array.apply(null,Array(256)).map((k,g)=>g),s=(k,g)=>l.slice(k,g),n=s(32,127),_=s(0,24);_.push(25),_.push.apply(_,s(28,32));const C=s(0,14);let w;for(w in u.setDefault(1,0),u.addMany(n,0,2,0),C)u.addMany([24,26,153,154],w,3,0),u.addMany(s(128,144),w,3,0),u.addMany(s(144,152),w,3,0),u.add(156,w,0,0),u.add(27,w,11,1),u.add(157,w,4,8),u.addMany([152,158,159],w,0,7),u.add(155,w,11,3),u.add(144,w,11,9);return u.addMany(_,0,3,0),u.addMany(_,1,3,1),u.add(127,1,0,1),u.addMany(_,8,0,8),u.addMany(_,3,3,3),u.add(127,3,0,3),u.addMany(_,4,3,4),u.add(127,4,0,4),u.addMany(_,6,3,6),u.addMany(_,5,3,5),u.add(127,5,0,5),u.addMany(_,2,3,2),u.add(127,2,0,2),u.add(93,1,4,8),u.addMany(n,8,5,8),u.add(127,8,5,8),u.addMany([156,27,24,26,7],8,6,0),u.addMany(s(28,32),8,0,8),u.addMany([88,94,95],1,0,7),u.addMany(n,7,0,7),u.addMany(_,7,0,7),u.add(156,7,0,0),u.add(127,7,0,7),u.add(91,1,11,3),u.addMany(s(64,127),3,7,0),u.addMany(s(48,60),3,8,4),u.addMany([60,61,62,63],3,9,4),u.addMany(s(48,60),4,8,4),u.addMany(s(64,127),4,7,0),u.addMany([60,61,62,63],4,0,6),u.addMany(s(32,64),6,0,6),u.add(127,6,0,6),u.addMany(s(64,127),6,0,0),u.addMany(s(32,48),3,9,5),u.addMany(s(32,48),5,9,5),u.addMany(s(48,64),5,0,6),u.addMany(s(64,127),5,7,0),u.addMany(s(32,48),4,9,5),u.addMany(s(32,48),1,9,2),u.addMany(s(32,48),2,9,2),u.addMany(s(48,127),2,10,0),u.addMany(s(48,80),1,10,0),u.addMany(s(81,88),1,10,0),u.addMany([89,90,92],1,10,0),u.addMany(s(96,127),1,10,0),u.add(80,1,11,9),u.addMany(_,9,0,9),u.add(127,9,0,9),u.addMany(s(28,32),9,0,9),u.addMany(s(32,48),9,9,12),u.addMany(s(48,60),9,8,10),u.addMany([60,61,62,63],9,9,10),u.addMany(_,11,0,11),u.addMany(s(32,128),11,0,11),u.addMany(s(28,32),11,0,11),u.addMany(_,10,0,10),u.add(127,10,0,10),u.addMany(s(28,32),10,0,10),u.addMany(s(48,60),10,8,10),u.addMany([60,61,62,63],10,0,11),u.addMany(s(32,48),10,9,12),u.addMany(_,12,0,12),u.add(127,12,0,12),u.addMany(s(28,32),12,0,12),u.addMany(s(32,48),12,9,12),u.addMany(s(48,64),12,0,11),u.addMany(s(64,127),12,12,13),u.addMany(s(64,127),10,12,13),u.addMany(s(64,127),9,12,13),u.addMany(_,13,13,13),u.addMany(n,13,13,13),u.add(127,13,0,13),u.addMany([27,156,24,26],13,14,0),u.add(E,0,2,0),u.add(E,8,5,8),u.add(E,6,0,6),u.add(E,11,0,11),u.add(E,13,13,13),u}();class v extends f.Disposable{constructor(l=o.VT500_TRANSITION_TABLE){super(),this._transitions=l,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(s,n,_)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,n)=>{},this._escHandlerFb=s=>{},this._errorHandlerFb=s=>s,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(l,s=[64,126]){let n=0;if(l.prefix){if(l.prefix.length>1)throw new Error("only one byte as prefix supported");if(n=l.prefix.charCodeAt(0),n&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(l.intermediates){if(l.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<l.intermediates.length;++C){const w=l.intermediates.charCodeAt(C);if(32>w||w>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=w}}if(l.final.length!==1)throw new Error("final must be a single byte");const _=l.final.charCodeAt(0);if(s[0]>_||_>s[1])throw new Error(`final must be in range ${s[0]} .. ${s[1]}`);return n<<=8,n|=_,n}identToString(l){const s=[];for(;l;)s.push(String.fromCharCode(255&l)),l>>=8;return s.reverse().join("")}setPrintHandler(l){this._printHandler=l}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(l,s){const n=this._identifier(l,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);const _=this._escHandlers[n];return _.push(s),{dispose:()=>{const C=_.indexOf(s);C!==-1&&_.splice(C,1)}}}clearEscHandler(l){this._escHandlers[this._identifier(l,[48,126])]&&delete this._escHandlers[this._identifier(l,[48,126])]}setEscHandlerFallback(l){this._escHandlerFb=l}setExecuteHandler(l,s){this._executeHandlers[l.charCodeAt(0)]=s}clearExecuteHandler(l){this._executeHandlers[l.charCodeAt(0)]&&delete this._executeHandlers[l.charCodeAt(0)]}setExecuteHandlerFallback(l){this._executeHandlerFb=l}registerCsiHandler(l,s){const n=this._identifier(l);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);const _=this._csiHandlers[n];return _.push(s),{dispose:()=>{const C=_.indexOf(s);C!==-1&&_.splice(C,1)}}}clearCsiHandler(l){this._csiHandlers[this._identifier(l)]&&delete this._csiHandlers[this._identifier(l)]}setCsiHandlerFallback(l){this._csiHandlerFb=l}registerDcsHandler(l,s){return this._dcsParser.registerHandler(this._identifier(l),s)}clearDcsHandler(l){this._dcsParser.clearHandler(this._identifier(l))}setDcsHandlerFallback(l){this._dcsParser.setHandlerFallback(l)}registerOscHandler(l,s){return this._oscParser.registerHandler(l,s)}clearOscHandler(l){this._oscParser.clearHandler(l)}setOscHandlerFallback(l){this._oscParser.setHandlerFallback(l)}setErrorHandler(l){this._errorHandler=l}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(l,s,n,_,C){this._parseStack.state=l,this._parseStack.handlers=s,this._parseStack.handlerPos=n,this._parseStack.transition=_,this._parseStack.chunkPos=C}parse(l,s,n){let _,C=0,w=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const g=this._parseStack.handlers;let x=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&x>-1){for(;x>=0&&(_=g[x](this._params),_!==!0);x--)if(_ instanceof Promise)return this._parseStack.handlerPos=x,_}this._parseStack.handlers=[];break;case 4:if(n===!1&&x>-1){for(;x>=0&&(_=g[x](),_!==!0);x--)if(_ instanceof Promise)return this._parseStack.handlerPos=x,_}this._parseStack.handlers=[];break;case 6:if(C=l[this._parseStack.chunkPos],_=this._dcsParser.unhook(C!==24&&C!==26,n),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=l[this._parseStack.chunkPos],_=this._oscParser.end(C!==24&&C!==26,n),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,k=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let g=k;g<s;++g){switch(C=l[g],w=this._transitions.table[this.currentState<<8|(C<160?C:E)],w>>4){case 2:for(let P=g+1;;++P){if(P>=s||(C=l[P])<32||C>126&&C<E){this._printHandler(l,g,P),g=P-1;break}if(++P>=s||(C=l[P])<32||C>126&&C<E){this._printHandler(l,g,P),g=P-1;break}if(++P>=s||(C=l[P])<32||C>126&&C<E){this._printHandler(l,g,P),g=P-1;break}if(++P>=s||(C=l[P])<32||C>126&&C<E){this._printHandler(l,g,P),g=P-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:g,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 T=x?x.length-1:-1;for(;T>=0&&(_=x[T](this._params),_!==!0);T--)if(_ instanceof Promise)return this._preserveStack(3,x,T,w,g),_;T<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(++g<s&&(C=l[g])>47&&C<60);g--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const B=this._escHandlers[this._collect<<8|C];let O=B?B.length-1:-1;for(;O>=0&&(_=B[O](),_!==!0);O--)if(_ instanceof Promise)return this._preserveStack(4,B,O,w,g),_;O<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 P=g+1;;++P)if(P>=s||(C=l[P])===24||C===26||C===27||C>127&&C<E){this._dcsParser.put(l,g,P),g=P-1;break}break;case 14:if(_=this._dcsParser.unhook(C!==24&&C!==26),_)return this._preserveStack(6,[],0,w,g),_;C===27&&(w|=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 P=g+1;;P++)if(P>=s||(C=l[P])<32||C>127&&C<E){this._oscParser.put(l,g,P),g=P-1;break}break;case 6:if(_=this._oscParser.end(C!==24&&C!==26),_)return this._preserveStack(5,[],0,w,g),_;C===27&&(w|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&w}}}o.EscapeSequenceParser=v},6242:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const f=c(5770),m=c(482),h=[];o.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,S){this._handlers[p]===void 0&&(this._handlers[p]=[]);const E=this._handlers[p];return E.push(S),{dispose:()=>{const v=E.indexOf(S);v!==-1&&E.splice(v,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,S,E){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(p,S,E);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(p,S,E))}start(){this.reset(),this._state=1}put(p,S,E){if(this._state!==3){if(this._state===1)for(;S<E;){const v=p[S++];if(v===59){this._state=2,this._start();break}if(v<48||57<v)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+v-48}this._state===2&&E-S>0&&this._put(p,S,E)}}end(p,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,v=this._active.length-1,u=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,E=S,u=this._stack.fallThrough,this._stack.paused=!1),!u&&E===!1){for(;v>=0&&(E=this._active[v].end(p),E!==!0);v--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,E;v--}for(;v>=0;v--)if(E=this._active[v].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",p);this._active=h,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,S,E){this._hitLimit||(this._data+=(0,m.utf32ToString)(p,S,E),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let S=!1;if(this._hitLimit)S=!1;else if(p&&(S=this._handler(this._data),S instanceof Promise))return S.then(E=>(this._data="",this._hitLimit=!1,E));return this._data="",this._hitLimit=!1,S}}},8742:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const c=2147483647;class f{static fromArray(h){const p=new f;if(!h.length)return p;for(let S=Array.isArray(h[0])?1:0;S<h.length;++S){const E=h[S];if(Array.isArray(E))for(let v=0;v<E.length;++v)p.addSubParam(E[v]);else p.addParam(E)}return p}constructor(h=32,p=32){if(this.maxLength=h,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new f(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let p=0;p<this.length;++p){h.push(this.params[p]);const S=this._subParamsIdx[p]>>8,E=255&this._subParamsIdx[p];E-S>0&&h.push(Array.prototype.slice.call(this._subParams,S,E))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>c?c:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>c?c:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const p=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-p>0?this._subParams.subarray(p,S):null}getSubParamsAll(){const h={};for(let p=0;p<this.length;++p){const S=this._subParamsIdx[p]>>8,E=255&this._subParamsIdx[p];E-S>0&&(h[p]=this._subParams.slice(S,E))}return h}addDigit(h){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,E=S[p-1];S[p-1]=~E?Math.min(10*E+h,c):h}}o.Params=f},5741:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,f){const m={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(m),f.dispose=()=>this._wrappedAddonDispose(m),f.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let f=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===c){f=m;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(f,1)}}},8771:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const f=c(3785),m=c(511);o.BufferApiView=class{constructor(h,p){this._buffer=h,this.type=p}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const p=this._buffer.lines.get(h);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new m.CellData}}},3785:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const f=c(511);o.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,h){if(!(m<0||m>=this._line.length))return h?(this._line.loadCell(m,h),h):this._line.loadCell(m,new f.CellData)}translateToString(m,h,p){return this._line.translateToString(m,h,p)}}},8285:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const f=c(8771),m=c(8460),h=c(844);class p extends h.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.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)}}o.BufferNamespaceApi=p},7975:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,f){return this._core.registerCsiHandler(c,m=>f(m.toArray()))}addCsiHandler(c,f){return this.registerCsiHandler(c,f)}registerDcsHandler(c,f){return this._core.registerDcsHandler(c,(m,h)=>f(m,h.toArray()))}addDcsHandler(c,f){return this.registerDcsHandler(c,f)}registerEscHandler(c,f){return this._core.registerEscHandler(c,f)}addEscHandler(c,f){return this.registerEscHandler(c,f)}registerOscHandler(c,f){return this._core.registerOscHandler(c,f)}addOscHandler(c,f){return this.registerOscHandler(c,f)}}},7090:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(y,o,c){var f=this&&this.__decorate||function(u,l,s,n){var _,C=arguments.length,w=C<3?l:n===null?n=Object.getOwnPropertyDescriptor(l,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(u,l,s,n);else for(var k=u.length-1;k>=0;k--)(_=u[k])&&(w=(C<3?_(w):C>3?_(l,s,w):_(l,s))||w);return C>3&&w&&Object.defineProperty(l,s,w),w},m=this&&this.__param||function(u,l){return function(s,n){l(s,n,u)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const h=c(8460),p=c(844),S=c(5295),E=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let v=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(u){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(u.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(u.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(u,this))}resize(u,l){this.cols=u,this.rows=l,this.buffers.resize(u,l),this._onResize.fire({cols:u,rows:l})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(u,l=!1){const s=this.buffer;let n;n=this._cachedBlankLine,n&&n.length===this.cols&&n.getFg(0)===u.fg&&n.getBg(0)===u.bg||(n=s.getBlankLine(u,l),this._cachedBlankLine=n),n.isWrapped=l;const _=s.ybase+s.scrollTop,C=s.ybase+s.scrollBottom;if(s.scrollTop===0){const w=s.lines.isFull;C===s.lines.length-1?w?s.lines.recycle().copyFrom(n):s.lines.push(n.clone()):s.lines.splice(C+1,0,n.clone()),w?this.isUserScrolling&&(s.ydisp=Math.max(s.ydisp-1,0)):(s.ybase++,this.isUserScrolling||s.ydisp++)}else{const w=C-_+1;s.lines.shiftElements(_+1,w-1,-1),s.lines.set(C,n.clone())}this.isUserScrolling||(s.ydisp=s.ybase),this._onScroll.fire(s.ydisp)}scrollLines(u,l,s){const n=this.buffer;if(u<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else u+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);const _=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+u,n.ybase),0),_!==n.ydisp&&(l||this._onScroll.fire(n.ydisp))}};o.BufferService=v=f([m(0,E.IOptionsService)],v)},7994:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,f){this._charsets[c]=f,this.glevel===c&&(this.charset=f)}}},1753:function(y,o,c){var f=this&&this.__decorate||function(n,_,C,w){var k,g=arguments.length,x=g<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,C):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(n,_,C,w);else for(var T=n.length-1;T>=0;T--)(k=n[T])&&(x=(g<3?k(x):g>3?k(_,C,x):k(_,C))||x);return g>3&&x&&Object.defineProperty(_,C,x),x},m=this&&this.__param||function(n,_){return function(C,w){_(C,w,n)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const h=c(2585),p=c(8460),S=c(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:n=>n.button!==4&&n.action===1&&(n.ctrl=!1,n.alt=!1,n.shift=!1,!0)},VT200:{events:19,restrict:n=>n.action!==32},DRAG:{events:23,restrict:n=>n.action!==32||n.button!==3},ANY:{events:31,restrict:n=>!0}};function v(n,_){let C=(n.ctrl?16:0)|(n.shift?4:0)|(n.alt?8:0);return n.button===4?(C|=64,C|=n.action):(C|=3&n.button,4&n.button&&(C|=64),8&n.button&&(C|=128),n.action===32?C|=32:n.action!==0||_||(C|=3)),C}const u=String.fromCharCode,l={DEFAULT:n=>{const _=[v(n,!1)+32,n.col+32,n.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${u(_[0])}${u(_[1])}${u(_[2])}`},SGR:n=>{const _=n.action===0&&n.button!==4?"m":"M";return`\x1B[<${v(n,!0)};${n.col};${n.row}${_}`},SGR_PIXELS:n=>{const _=n.action===0&&n.button!==4?"m":"M";return`\x1B[<${v(n,!0)};${n.x};${n.y}${_}`}};let s=o.CoreMouseService=class extends S.Disposable{constructor(n,_){super(),this._bufferService=n,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(E))this.addProtocol(C,E[C]);for(const C of Object.keys(l))this.addEncoding(C,l[C]);this.reset()}addProtocol(n,_){this._protocols[n]=_}addEncoding(n,_){this._encodings[n]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(n){if(!this._protocols[n])throw new Error(`unknown protocol "${n}"`);this._activeProtocol=n,this._onProtocolChange.fire(this._protocols[n].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(n){if(!this._encodings[n])throw new Error(`unknown encoding "${n}"`);this._activeEncoding=n}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(n){if(n.col<0||n.col>=this._bufferService.cols||n.row<0||n.row>=this._bufferService.rows||n.button===4&&n.action===32||n.button===3&&n.action!==32||n.button!==4&&(n.action===2||n.action===3)||(n.col++,n.row++,n.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,n,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(n))return!1;const _=this._encodings[this._activeEncoding](n);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=n,!0}explainEvents(n){return{down:!!(1&n),up:!!(2&n),drag:!!(4&n),move:!!(8&n),wheel:!!(16&n)}}_equalEvents(n,_,C){if(C){if(n.x!==_.x||n.y!==_.y)return!1}else if(n.col!==_.col||n.row!==_.row)return!1;return n.button===_.button&&n.action===_.action&&n.ctrl===_.ctrl&&n.alt===_.alt&&n.shift===_.shift}};o.CoreMouseService=s=f([m(0,h.IBufferService),m(1,h.ICoreService)],s)},6975:function(y,o,c){var f=this&&this.__decorate||function(s,n,_,C){var w,k=arguments.length,g=k<3?n:C===null?C=Object.getOwnPropertyDescriptor(n,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,n,_,C);else for(var x=s.length-1;x>=0;x--)(w=s[x])&&(g=(k<3?w(g):k>3?w(n,_,g):w(n,_))||g);return k>3&&g&&Object.defineProperty(n,_,g),g},m=this&&this.__param||function(s,n){return function(_,C){n(_,C,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const h=c(1439),p=c(8460),S=c(844),E=c(2585),v=Object.freeze({insertMode:!1}),u=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let l=o.CoreService=class extends S.Disposable{constructor(s,n,_){super(),this._bufferService=s,this._logService=n,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(u)}reset(){this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(u)}triggerDataEvent(s,n=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;n&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),n&&this._onUserInput.fire(),this._logService.debug(`sending data "${s}"`,()=>s.split("").map(C=>C.charCodeAt(0))),this._onData.fire(s)}triggerBinaryEvent(s){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${s}"`,()=>s.split("").map(n=>n.charCodeAt(0))),this._onBinary.fire(s))}};o.CoreService=l=f([m(0,E.IBufferService),m(1,E.ILogService),m(2,E.IOptionsService)],l)},9074:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const f=c(8055),m=c(8460),h=c(844),p=c(6106);let S=0,E=0;class v extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList(s=>s==null?void 0:s.marker.line),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)(()=>this.reset()))}registerDecoration(s){if(s.marker.isDisposed)return;const n=new u(s);if(n){const _=n.marker.onDispose(()=>n.dispose());n.onDispose(()=>{n&&(this._decorations.delete(n)&&this._onDecorationRemoved.fire(n),_.dispose())}),this._decorations.insert(n),this._onDecorationRegistered.fire(n)}return n}reset(){for(const s of this._decorations.values())s.dispose();this._decorations.clear()}*getDecorationsAtCell(s,n,_){let C=0,w=0;for(const k of this._decorations.getKeyIterator(n))C=k.options.x??0,w=C+(k.options.width??1),s>=C&&s<w&&(!_||(k.options.layer??"bottom")===_)&&(yield k)}forEachDecorationAtCell(s,n,_,C){this._decorations.forEachByKey(n,w=>{S=w.options.x??0,E=S+(w.options.width??1),s>=S&&s<E&&(!_||(w.options.layer??"bottom")===_)&&C(w)})}}o.DecorationService=v;class u extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(s){super(),this.options=s,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=s.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const f=c(2585),m=c(8343);class h{constructor(...S){this._entries=new Map;for(const[E,v]of S)this.set(E,v)}set(S,E){const v=this._entries.get(S);return this._entries.set(S,E),v}forEach(S){for(const[E,v]of this._entries.entries())S(E,v)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}o.ServiceCollection=h,o.InstantiationService=class{constructor(){this._services=new h,this._services.set(f.IInstantiationService,this)}setService(p,S){this._services.set(p,S)}getService(p){return this._services.get(p)}createInstance(p,...S){const E=(0,m.getServiceDependencies)(p).sort((l,s)=>l.index-s.index),v=[];for(const l of E){const s=this._services.get(l.id);if(!s)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${l.id}.`);v.push(s)}const u=E.length>0?E[0].index:S.length;if(S.length!==u)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${u+1} conflicts with ${S.length} static arguments`);return new p(...S,...v)}}},7866:function(y,o,c){var f=this&&this.__decorate||function(u,l,s,n){var _,C=arguments.length,w=C<3?l:n===null?n=Object.getOwnPropertyDescriptor(l,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(u,l,s,n);else for(var k=u.length-1;k>=0;k--)(_=u[k])&&(w=(C<3?_(w):C>3?_(l,s,w):_(l,s))||w);return C>3&&w&&Object.defineProperty(l,s,w),w},m=this&&this.__param||function(u,l){return function(s,n){l(s,n,u)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const h=c(844),p=c(2585),S={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let E,v=o.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(u){super(),this._optionsService=u,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),E=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(u){for(let l=0;l<u.length;l++)typeof u[l]=="function"&&(u[l]=u[l]())}_log(u,l,s){this._evalLazyOptionalParams(s),u.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+l,...s)}trace(u,...l){var s;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.trace.bind(this._optionsService.options.logger))??console.log,u,l)}debug(u,...l){var s;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.debug.bind(this._optionsService.options.logger))??console.log,u,l)}info(u,...l){var s;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.info.bind(this._optionsService.options.logger))??console.info,u,l)}warn(u,...l){var s;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.warn.bind(this._optionsService.options.logger))??console.warn,u,l)}error(u,...l){var s;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.error.bind(this._optionsService.options.logger))??console.error,u,l)}};o.LogService=v=f([m(0,p.IOptionsService)],v),o.setTraceLogger=function(u){E=u},o.traceCall=function(u,l,s){if(typeof s.value!="function")throw new Error("not supported");const n=s.value;s.value=function(..._){if(E.logLevel!==p.LogLevelEnum.TRACE)return n.apply(this,_);E.trace(`GlyphRenderer#${n.name}(${_.map(w=>JSON.stringify(w)).join(", ")})`);const C=n.apply(this,_);return E.trace(`GlyphRenderer#${n.name} return`,C),C}}},7302:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const f=c(8460),m=c(844),h=c(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends m.Disposable{constructor(v){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const u={...o.DEFAULT_OPTIONS};for(const l in v)if(l in u)try{const s=v[l];u[l]=this._sanitizeAndValidateOption(l,s)}catch(s){console.error(s)}this.rawOptions=u,this.options={...u},this._setupOptions(),this.register((0,m.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(v,u){return this.onOptionChange(l=>{l===v&&u(this.rawOptions[v])})}onMultipleOptionChange(v,u){return this.onOptionChange(l=>{v.indexOf(l)!==-1&&u()})}_setupOptions(){const v=l=>{if(!(l in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);return this.rawOptions[l]},u=(l,s)=>{if(!(l in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);s=this._sanitizeAndValidateOption(l,s),this.rawOptions[l]!==s&&(this.rawOptions[l]=s,this._onOptionChange.fire(l))};for(const l in this.rawOptions){const s={get:v.bind(this,l),set:u.bind(this,l)};Object.defineProperty(this.options,l,s)}}_sanitizeAndValidateOption(v,u){switch(v){case"cursorStyle":if(u||(u=o.DEFAULT_OPTIONS[v]),!function(l){return l==="block"||l==="underline"||l==="bar"}(u))throw new Error(`"${u}" is not a valid value for ${v}`);break;case"wordSeparator":u||(u=o.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof u=="number"&&1<=u&&u<=1e3)break;u=p.includes(u)?u:o.DEFAULT_OPTIONS[v];break;case"cursorWidth":u=Math.floor(u);case"lineHeight":case"tabStopWidth":if(u<1)throw new Error(`${v} cannot be less than 1, value: ${u}`);break;case"minimumContrastRatio":u=Math.max(1,Math.min(21,Math.round(10*u)/10));break;case"scrollback":if((u=Math.min(u,4294967295))<0)throw new Error(`${v} cannot be less than 0, value: ${u}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(u<=0)throw new Error(`${v} cannot be less than or equal to 0, value: ${u}`);break;case"rows":case"cols":if(!u&&u!==0)throw new Error(`${v} must be numeric, value: ${u}`);break;case"windowsPty":u=u??{}}return u}}o.OptionsService=S},2660:function(y,o,c){var f=this&&this.__decorate||function(S,E,v,u){var l,s=arguments.length,n=s<3?E:u===null?u=Object.getOwnPropertyDescriptor(E,v):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(S,E,v,u);else for(var _=S.length-1;_>=0;_--)(l=S[_])&&(n=(s<3?l(n):s>3?l(E,v,n):l(E,v))||n);return s>3&&n&&Object.defineProperty(E,v,n),n},m=this&&this.__param||function(S,E){return function(v,u){E(v,u,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const h=c(2585);let p=o.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const E=this._bufferService.buffer;if(S.id===void 0){const _=E.addMarker(E.ybase+E.y),C={data:S,id:this._nextId++,lines:[_]};return _.onDispose(()=>this._removeMarkerFromLink(C,_)),this._dataByLinkId.set(C.id,C),C.id}const v=S,u=this._getEntryIdKey(v),l=this._entriesWithId.get(u);if(l)return this.addLineToLink(l.id,E.ybase+E.y),l.id;const s=E.addMarker(E.ybase+E.y),n={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(n,s)),this._entriesWithId.set(n.key,n),this._dataByLinkId.set(n.id,n),n.id}addLineToLink(S,E){const v=this._dataByLinkId.get(S);if(v&&v.lines.every(u=>u.line!==E)){const u=this._bufferService.buffer.addMarker(E);v.lines.push(u),u.onDispose(()=>this._removeMarkerFromLink(v,u))}}getLinkData(S){var E;return(E=this._dataByLinkId.get(S))==null?void 0:E.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,E){const v=S.lines.indexOf(E);v!==-1&&(S.lines.splice(v,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};o.OscLinkService=p=f([m(0,h.IBufferService)],p)},8343:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",f="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(m){return m[f]||[]},o.createDecorator=function(m){if(o.serviceRegistry.has(m))return o.serviceRegistry.get(m);const h=function(p,S,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,u,l){u[c]===u?u[f].push({id:v,index:l}):(u[f]=[{id:v,index:l}],u[c]=u)})(h,p,E)};return h.toString=()=>m,o.serviceRegistry.set(m,h),h}},2585:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const f=c(8343);var m;o.IBufferService=(0,f.createDecorator)("BufferService"),o.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),o.ICoreService=(0,f.createDecorator)("CoreService"),o.ICharsetService=(0,f.createDecorator)("CharsetService"),o.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"}(m||(o.LogLevelEnum=m={})),o.ILogService=(0,f.createDecorator)("LogService"),o.IOptionsService=(0,f.createDecorator)("OptionsService"),o.IOscLinkService=(0,f.createDecorator)("OscLinkService"),o.IUnicodeService=(0,f.createDecorator)("UnicodeService"),o.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const f=c(8460),m=c(225);class h{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,E,v=!1){return(16777215&S)<<3|(3&E)<<1|(v?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const S=new m.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let E=0,v=0;const u=S.length;for(let l=0;l<u;++l){let s=S.charCodeAt(l);if(55296<=s&&s<=56319){if(++l>=u)return E+this.wcwidth(s);const C=S.charCodeAt(l);56320<=C&&C<=57343?s=1024*(s-55296)+C-56320+65536:E+=this.wcwidth(C)}const n=this.charProperties(s,v);let _=h.extractWidth(n);h.extractShouldJoin(n)&&(_-=h.extractWidth(v)),E+=_,v=n}return E}charProperties(S,E){return this._activeProvider.charProperties(S,E)}}o.UnicodeService=h}},i={};function a(y){var o=i[y];if(o!==void 0)return o.exports;var c=i[y]={exports:{}};return r[y].call(c.exports,c,c.exports,a),c.exports}var d={};return(()=>{var y=d;Object.defineProperty(y,"__esModule",{value:!0}),y.Terminal=void 0;const o=a(9042),c=a(3236),f=a(844),m=a(5741),h=a(8285),p=a(7975),S=a(7090),E=["cols","rows"];class v extends f.Disposable{constructor(l){super(),this._core=this.register(new c.Terminal(l)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const s=_=>this._core.options[_],n=(_,C)=>{this._checkReadonlyOptions(_),this._core.options[_]=C};for(const _ in this._core.options){const C={get:s.bind(this,_),set:n.bind(this,_)};Object.defineProperty(this._publicOptions,_,C)}}_checkReadonlyOptions(l){if(E.includes(l))throw new Error(`Option "${l}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const l=this._core.coreService.decPrivateModes;let s="none";switch(this._core.coreMouseService.activeProtocol){case"X10":s="x10";break;case"VT200":s="vt200";break;case"DRAG":s="drag";break;case"ANY":s="any"}return{applicationCursorKeysMode:l.applicationCursorKeys,applicationKeypadMode:l.applicationKeypad,bracketedPasteMode:l.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:s,originMode:l.origin,reverseWraparoundMode:l.reverseWraparound,sendFocusMode:l.sendFocus,wraparoundMode:l.wraparound}}get options(){return this._publicOptions}set options(l){for(const s in l)this._publicOptions[s]=l[s]}blur(){this._core.blur()}focus(){this._core.focus()}input(l,s=!0){this._core.input(l,s)}resize(l,s){this._verifyIntegers(l,s),this._core.resize(l,s)}open(l){this._core.open(l)}attachCustomKeyEventHandler(l){this._core.attachCustomKeyEventHandler(l)}attachCustomWheelEventHandler(l){this._core.attachCustomWheelEventHandler(l)}registerLinkProvider(l){return this._core.registerLinkProvider(l)}registerCharacterJoiner(l){return this._checkProposedApi(),this._core.registerCharacterJoiner(l)}deregisterCharacterJoiner(l){this._checkProposedApi(),this._core.deregisterCharacterJoiner(l)}registerMarker(l=0){return this._verifyIntegers(l),this._core.registerMarker(l)}registerDecoration(l){return this._checkProposedApi(),this._verifyPositiveIntegers(l.x??0,l.width??0,l.height??0),this._core.registerDecoration(l)}hasSelection(){return this._core.hasSelection()}select(l,s,n){this._verifyIntegers(l,s,n),this._core.select(l,s,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(l,s){this._verifyIntegers(l,s),this._core.selectLines(l,s)}dispose(){super.dispose()}scrollLines(l){this._verifyIntegers(l),this._core.scrollLines(l)}scrollPages(l){this._verifyIntegers(l),this._core.scrollPages(l)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(l){this._verifyIntegers(l),this._core.scrollToLine(l)}clear(){this._core.clear()}write(l,s){this._core.write(l,s)}writeln(l,s){this._core.write(l),this._core.write(`\r
|
|
48
|
-
`,s)}paste(l){this._core.paste(l)}refresh(l,s){this._verifyIntegers(l,s),this._core.refresh(l,s)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(l){this._addonManager.loadAddon(this,l)}static get strings(){return o}_verifyIntegers(...l){for(const s of l)if(s===1/0||isNaN(s)||s%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...l){for(const s of l)if(s&&(s===1/0||isNaN(s)||s%1!=0||s<0))throw new Error("This API only accepts positive integers")}}y.Terminal=v})(),d})())})(Ru);var uf=Ru.exports,Pu={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(a){this._terminal=a}dispose(){}fit(){const a=this.proposeDimensions();if(!a||!this._terminal||isNaN(a.cols)||isNaN(a.rows))return;const d=this._terminal._core;this._terminal.rows===a.rows&&this._terminal.cols===a.cols||(d._renderService.clear(),this._terminal.resize(a.cols,a.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const a=this._terminal._core,d=a._renderService.dimensions;if(d.css.cell.width===0||d.css.cell.height===0)return;const y=this._terminal.options.scrollback===0?0:a.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),f=Math.max(0,parseInt(o.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),h=c-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),p=f-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-y;return{cols:Math.max(2,Math.floor(p/d.css.cell.width)),rows:Math.max(1,Math.floor(h/d.css.cell.height))}}}})(),r})())})(Pu);var hf=Pu.exports,Au={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={6:(y,o)=>{function c(m){try{const h=new URL(m),p=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return m.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(m,h,p,S={}){this._terminal=m,this._regex=h,this._handler=p,this._options=S}provideLinks(m,h){const p=f.computeLink(m,this._regex,this._terminal,this._handler);h(this._addCallbacks(p))}_addCallbacks(m){return m.map(h=>(h.leave=this._options.leave,h.hover=(p,S)=>{if(this._options.hover){const{range:E}=h;this._options.hover(p,S,E)}},h))}};class f{static computeLink(h,p,S,E){const v=new RegExp(p.source,(p.flags||"")+"g"),[u,l]=f._getWindowedLineStrings(h-1,S),s=u.join("");let n;const _=[];for(;n=v.exec(s);){const C=n[0];if(!c(C))continue;const[w,k]=f._mapStrIdx(S,l,0,n.index),[g,
|
|
46
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(g){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),l.isLinux&&g&&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(g){const L=this._getMouseBufferCoords(g),R=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!!(R&&A&&L)&&this._areCoordsInSelection(L,R,A)}isCellInSelection(g,L){const R=this._model.finalSelectionStart,A=this._model.finalSelectionEnd;return!(!R||!A)&&this._areCoordsInSelection([g,L],R,A)}_areCoordsInSelection(g,L,R){return g[1]>L[1]&&g[1]<R[1]||L[1]===R[1]&&g[1]===L[1]&&g[0]>=L[0]&&g[0]<R[0]||L[1]<R[1]&&g[1]===R[1]&&g[0]<R[0]||L[1]<R[1]&&g[1]===L[1]&&g[0]>=L[0]}_selectWordAtCursor(g,L){var M,T;const R=(T=(M=this._linkifier.currentLink)==null?void 0:M.link)==null?void 0:T.range;if(R)return this._model.selectionStart=[R.start.x-1,R.start.y-1],this._model.selectionStartLength=(0,s.getRangeLength)(R,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const A=this._getMouseBufferCoords(g);return!!A&&(this._selectWordAt(A,L),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(g,L){this._model.clearSelection(),g=Math.max(g,0),L=Math.min(L,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,g],this._model.selectionEnd=[this._bufferService.cols,L],this.refresh(),this._onSelectionChange.fire()}_handleTrim(g){this._model.handleTrim(g)&&this.refresh()}_getMouseBufferCoords(g){const L=this._mouseService.getCoords(g,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(L)return L[0]--,L[1]--,L[1]+=this._bufferService.buffer.ydisp,L}_getMouseEventScrollAmount(g){let L=(0,h.getCoordsRelativeToElement)(this._coreBrowserService.window,g,this._screenElement)[1];const R=this._renderService.dimensions.css.canvas.height;return L>=0&&L<=R?0:(L>R&&(L-=R),L=Math.min(Math.max(L,-50),50),L/=50,L/Math.abs(L)+Math.round(14*L))}shouldForceSelection(g){return l.isMac?g.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:g.shiftKey}handleMouseDown(g){if(this._mouseDownTimeStamp=g.timeStamp,(g.button!==2||!this.hasSelection)&&g.button===0){if(!this._enabled){if(!this.shouldForceSelection(g))return;g.stopPropagation()}g.preventDefault(),this._dragScrollAmount=0,this._enabled&&g.shiftKey?this._handleIncrementalClick(g):g.detail===1?this._handleSingleClick(g):g.detail===2?this._handleDoubleClick(g):g.detail===3&&this._handleTripleClick(g),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(g){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(g))}_handleSingleClick(g){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(g)?3:0,this._model.selectionStart=this._getMouseBufferCoords(g),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const L=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);L&&L.length!==this._model.selectionStart[0]&&L.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(g){this._selectWordAtCursor(g,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(g){const L=this._getMouseBufferCoords(g);L&&(this._activeSelectionMode=2,this._selectLineAt(L[1]))}shouldColumnSelect(g){return g.altKey&&!(l.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(g){if(g.stopImmediatePropagation(),!this._model.selectionStart)return;const L=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(g),!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(g),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const R=this._bufferService.buffer;if(this._model.selectionEnd[1]<R.lines.length){const A=R.lines.get(this._model.selectionEnd[1]);A&&A.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}L&&L[0]===this._model.selectionEnd[0]&&L[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 g=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(g.ydisp+this._bufferService.rows,g.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=g.ydisp),this.refresh()}}_handleMouseUp(g){const L=g.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&L<500&&g.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const R=this._mouseService.getCoords(g,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(R&&R[0]!==void 0&&R[1]!==void 0){const A=(0,p.moveToCellSequence)(R[0]-1,R[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(A,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const g=this._model.finalSelectionStart,L=this._model.finalSelectionEnd,R=!(!g||!L||g[0]===L[0]&&g[1]===L[1]);R?g&&L&&(this._oldSelectionStart&&this._oldSelectionEnd&&g[0]===this._oldSelectionStart[0]&&g[1]===this._oldSelectionStart[1]&&L[0]===this._oldSelectionEnd[0]&&L[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(g,L,R)):this._oldHasSelection&&this._fireOnSelectionChange(g,L,R)}_fireOnSelectionChange(g,L,R){this._oldSelectionStart=g,this._oldSelectionEnd=L,this._oldHasSelection=R,this._onSelectionChange.fire()}_handleBufferActivate(g){this.clearSelection(),this._trimListener.dispose(),this._trimListener=g.activeBuffer.lines.onTrim(L=>this._handleTrim(L))}_convertViewportColToCharacterIndex(g,L){let R=L;for(let A=0;L>=A;A++){const M=g.loadCell(A,this._workCell).getChars().length;this._workCell.getWidth()===0?R--:M>1&&L!==A&&(R+=M-1)}return R}setSelection(g,L,R){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[g,L],this._model.selectionStartLength=R,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(g){this._isClickInSelection(g)||(this._selectWordAtCursor(g,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(g,L,R=!0,A=!0){if(g[0]>=this._bufferService.cols)return;const M=this._bufferService.buffer,T=M.lines.get(g[1]);if(!T)return;const N=M.translateBufferLineToString(g[1],!1);let W=this._convertViewportColToCharacterIndex(T,g[0]),K=W;const q=g[0]-W;let H=0,b=0,D=0,P=0;if(N.charAt(W)===" "){for(;W>0&&N.charAt(W-1)===" ";)W--;for(;K<N.length&&N.charAt(K+1)===" ";)K++}else{let V=g[0],Q=g[0];T.getWidth(V)===0&&(H++,V--),T.getWidth(Q)===2&&(b++,Q++);const Y=T.getString(Q).length;for(Y>1&&(P+=Y-1,K+=Y-1);V>0&&W>0&&!this._isCharWordSeparator(T.loadCell(V-1,this._workCell));){T.loadCell(V-1,this._workCell);const O=this._workCell.getChars().length;this._workCell.getWidth()===0?(H++,V--):O>1&&(D+=O-1,W-=O-1),W--,V--}for(;Q<T.length&&K+1<N.length&&!this._isCharWordSeparator(T.loadCell(Q+1,this._workCell));){T.loadCell(Q+1,this._workCell);const O=this._workCell.getChars().length;this._workCell.getWidth()===2?(b++,Q++):O>1&&(P+=O-1,K+=O-1),K++,Q++}}K++;let B=W+q-H+D,z=Math.min(this._bufferService.cols,K-W+H+b-D-P);if(L||N.slice(W,K).trim()!==""){if(R&&B===0&&T.getCodePoint(0)!==32){const V=M.lines.get(g[1]-1);if(V&&T.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const Q=this._getWordAt([this._bufferService.cols-1,g[1]-1],!1,!0,!1);if(Q){const Y=this._bufferService.cols-Q.start;B-=Y,z+=Y}}}if(A&&B+z===this._bufferService.cols&&T.getCodePoint(this._bufferService.cols-1)!==32){const V=M.lines.get(g[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const Q=this._getWordAt([0,g[1]+1],!1,!1,!0);Q&&(z+=Q.length)}}return{start:B,length:z}}}_selectWordAt(g,L){const R=this._getWordAt(g,L);if(R){for(;R.start<0;)R.start+=this._bufferService.cols,g[1]--;this._model.selectionStart=[R.start,g[1]],this._model.selectionStartLength=R.length}}_selectToWordAt(g){const L=this._getWordAt(g,!0);if(L){let R=g[1];for(;L.start<0;)L.start+=this._bufferService.cols,R--;if(!this._model.areSelectionValuesReversed())for(;L.start+L.length>this._bufferService.cols;)L.length-=this._bufferService.cols,R++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?L.start:L.start+L.length,R]}}_isCharWordSeparator(g){return g.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(g.getChars())>=0}_selectLineAt(g){const L=this._bufferService.buffer.getWrappedRangeForLine(g),R={start:{x:0,y:L.first},end:{x:this._bufferService.cols-1,y:L.last}};this._model.selectionStart=[0,L.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,s.getRangeLength)(R,this._bufferService.cols)}};o.SelectionService=k=f([m(3,_.IBufferService),m(4,_.ICoreService),m(5,E.IMouseService),m(6,_.IOptionsService),m(7,E.IRenderService),m(8,E.ICoreBrowserService)],k)},4725:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const f=c(8343);o.ICharSizeService=(0,f.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),o.IMouseService=(0,f.createDecorator)("MouseService"),o.IRenderService=(0,f.createDecorator)("RenderService"),o.ISelectionService=(0,f.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,f.createDecorator)("ThemeService"),o.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(y,o,c){var f=this&&this.__decorate||function(k,g,L,R){var A,M=arguments.length,T=M<3?g:R===null?R=Object.getOwnPropertyDescriptor(g,L):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(k,g,L,R);else for(var N=k.length-1;N>=0;N--)(A=k[N])&&(T=(M<3?A(T):M>3?A(g,L,T):A(g,L))||T);return M>3&&T&&Object.defineProperty(g,L,T),T},m=this&&this.__param||function(k,g){return function(L,R){g(L,R,k)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const h=c(7239),p=c(8055),S=c(8460),E=c(844),v=c(2585),u=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),s=p.css.toColor("#ffffff"),n=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const k=[p.css.toColor("#2e3436"),p.css.toColor("#cc0000"),p.css.toColor("#4e9a06"),p.css.toColor("#c4a000"),p.css.toColor("#3465a4"),p.css.toColor("#75507b"),p.css.toColor("#06989a"),p.css.toColor("#d3d7cf"),p.css.toColor("#555753"),p.css.toColor("#ef2929"),p.css.toColor("#8ae234"),p.css.toColor("#fce94f"),p.css.toColor("#729fcf"),p.css.toColor("#ad7fa8"),p.css.toColor("#34e2e2"),p.css.toColor("#eeeeec")],g=[0,95,135,175,215,255];for(let L=0;L<216;L++){const R=g[L/36%6|0],A=g[L/6%6|0],M=g[L%6];k.push({css:p.channels.toCss(R,A,M),rgba:p.channels.toRgba(R,A,M)})}for(let L=0;L<24;L++){const R=8+10*L;k.push({css:p.channels.toCss(R,R,R),rgba:p.channels.toRgba(R,R,R)})}return k})());let C=o.ThemeService=class extends E.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new h.ColorContrastCache,this._halfContrastCache=new h.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:u,background:l,cursor:s,cursorAccent:n,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(l,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(l,_),ansi:o.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(k={}){const g=this._colors;if(g.foreground=w(k.foreground,u),g.background=w(k.background,l),g.cursor=w(k.cursor,s),g.cursorAccent=w(k.cursorAccent,n),g.selectionBackgroundTransparent=w(k.selectionBackground,_),g.selectionBackgroundOpaque=p.color.blend(g.background,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundTransparent=w(k.selectionInactiveBackground,g.selectionBackgroundTransparent),g.selectionInactiveBackgroundOpaque=p.color.blend(g.background,g.selectionInactiveBackgroundTransparent),g.selectionForeground=k.selectionForeground?w(k.selectionForeground,p.NULL_COLOR):void 0,g.selectionForeground===p.NULL_COLOR&&(g.selectionForeground=void 0),p.color.isOpaque(g.selectionBackgroundTransparent)&&(g.selectionBackgroundTransparent=p.color.opacity(g.selectionBackgroundTransparent,.3)),p.color.isOpaque(g.selectionInactiveBackgroundTransparent)&&(g.selectionInactiveBackgroundTransparent=p.color.opacity(g.selectionInactiveBackgroundTransparent,.3)),g.ansi=o.DEFAULT_ANSI_COLORS.slice(),g.ansi[0]=w(k.black,o.DEFAULT_ANSI_COLORS[0]),g.ansi[1]=w(k.red,o.DEFAULT_ANSI_COLORS[1]),g.ansi[2]=w(k.green,o.DEFAULT_ANSI_COLORS[2]),g.ansi[3]=w(k.yellow,o.DEFAULT_ANSI_COLORS[3]),g.ansi[4]=w(k.blue,o.DEFAULT_ANSI_COLORS[4]),g.ansi[5]=w(k.magenta,o.DEFAULT_ANSI_COLORS[5]),g.ansi[6]=w(k.cyan,o.DEFAULT_ANSI_COLORS[6]),g.ansi[7]=w(k.white,o.DEFAULT_ANSI_COLORS[7]),g.ansi[8]=w(k.brightBlack,o.DEFAULT_ANSI_COLORS[8]),g.ansi[9]=w(k.brightRed,o.DEFAULT_ANSI_COLORS[9]),g.ansi[10]=w(k.brightGreen,o.DEFAULT_ANSI_COLORS[10]),g.ansi[11]=w(k.brightYellow,o.DEFAULT_ANSI_COLORS[11]),g.ansi[12]=w(k.brightBlue,o.DEFAULT_ANSI_COLORS[12]),g.ansi[13]=w(k.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),g.ansi[14]=w(k.brightCyan,o.DEFAULT_ANSI_COLORS[14]),g.ansi[15]=w(k.brightWhite,o.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const L=Math.min(g.ansi.length-16,k.extendedAnsi.length);for(let R=0;R<L;R++)g.ansi[R+16]=w(k.extendedAnsi[R],o.DEFAULT_ANSI_COLORS[R+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(k){this._restoreColor(k),this._onChangeColors.fire(this.colors)}_restoreColor(k){if(k!==void 0)switch(k){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[k]=this._restoreColors.ansi[k]}else for(let g=0;g<this._restoreColors.ansi.length;++g)this._colors.ansi[g]=this._restoreColors.ansi[g]}modifyColors(k){k(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 w(k,g){if(k!==void 0)try{return p.css.toColor(k)}catch{}return g}o.ThemeService=C=f([m(0,v.IOptionsService)],C)},6349:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const f=c(8460),m=c(844);class h extends m.Disposable{constructor(S){super(),this._maxLength=S,this.onDeleteEmitter=this.register(new f.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new f.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new f.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(S){if(this._maxLength===S)return;const E=new Array(S);for(let v=0;v<Math.min(S,this.length);v++)E[v]=this._array[this._getCyclicIndex(v)];this._array=E,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let E=this._length;E<S;E++)this._array[E]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,E){this._array[this._getCyclicIndex(S)]=E}push(S){this._array[this._getCyclicIndex(this._length)]=S,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(S,E,...v){if(E){for(let u=S;u<this._length-E;u++)this._array[this._getCyclicIndex(u)]=this._array[this._getCyclicIndex(u+E)];this._length-=E,this.onDeleteEmitter.fire({index:S,amount:E})}for(let u=this._length-1;u>=S;u--)this._array[this._getCyclicIndex(u+v.length)]=this._array[this._getCyclicIndex(u)];for(let u=0;u<v.length;u++)this._array[this._getCyclicIndex(S+u)]=v[u];if(v.length&&this.onInsertEmitter.fire({index:S,amount:v.length}),this._length+v.length>this._maxLength){const u=this._length+v.length-this._maxLength;this._startIndex+=u,this._length=this._maxLength,this.onTrimEmitter.fire(u)}else this._length+=v.length}trimStart(S){S>this._length&&(S=this._length),this._startIndex+=S,this._length-=S,this.onTrimEmitter.fire(S)}shiftElements(S,E,v){if(!(E<=0)){if(S<0||S>=this._length)throw new Error("start argument out of range");if(S+v<0)throw new Error("Cannot shift elements in list beyond index 0");if(v>0){for(let l=E-1;l>=0;l--)this.set(S+l+v,this.get(S+l));const u=S+E+v-this._length;if(u>0)for(this._length+=u;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let u=0;u<E;u++)this.set(S+u+v,this.get(S+u))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}o.CircularList=h},1439:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(f,m=5){if(typeof f!="object")return f;const h=Array.isArray(f)?[]:{};for(const p in f)h[p]=m<=1?f[p]:f[p]&&c(f[p],m-1);return h}},8055:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let c=0,f=0,m=0,h=0;var p,S,E,v,u;function l(n){const _=n.toString(16);return _.length<2?"0"+_:_}function s(n,_){return n<_?(_+.05)/(n+.05):(n+.05)/(_+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},function(n){n.toCss=function(_,C,w,k){return k!==void 0?`#${l(_)}${l(C)}${l(w)}${l(k)}`:`#${l(_)}${l(C)}${l(w)}`},n.toRgba=function(_,C,w,k=255){return(_<<24|C<<16|w<<8|k)>>>0},n.toColor=function(_,C,w,k){return{css:n.toCss(_,C,w,k),rgba:n.toRgba(_,C,w,k)}}}(p||(o.channels=p={})),function(n){function _(C,w){return h=Math.round(255*w),[c,f,m]=u.toChannels(C.rgba),{css:p.toCss(c,f,m,h),rgba:p.toRgba(c,f,m,h)}}n.blend=function(C,w){if(h=(255&w.rgba)/255,h===1)return{css:w.css,rgba:w.rgba};const k=w.rgba>>24&255,g=w.rgba>>16&255,L=w.rgba>>8&255,R=C.rgba>>24&255,A=C.rgba>>16&255,M=C.rgba>>8&255;return c=R+Math.round((k-R)*h),f=A+Math.round((g-A)*h),m=M+Math.round((L-M)*h),{css:p.toCss(c,f,m),rgba:p.toRgba(c,f,m)}},n.isOpaque=function(C){return(255&C.rgba)==255},n.ensureContrastRatio=function(C,w,k){const g=u.ensureContrastRatio(C.rgba,w.rgba,k);if(g)return p.toColor(g>>24&255,g>>16&255,g>>8&255)},n.opaque=function(C){const w=(255|C.rgba)>>>0;return[c,f,m]=u.toChannels(w),{css:p.toCss(c,f,m),rgba:w}},n.opacity=_,n.multiplyOpacity=function(C,w){return h=255&C.rgba,_(C,h*w/255)},n.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}}(S||(o.color=S={})),function(n){let _,C;try{const w=document.createElement("canvas");w.width=1,w.height=1;const k=w.getContext("2d",{willReadFrequently:!0});k&&(_=k,_.globalCompositeOperation="copy",C=_.createLinearGradient(0,0,1,1))}catch{}n.toColor=function(w){if(w.match(/#[\da-f]{3,8}/i))switch(w.length){case 4:return c=parseInt(w.slice(1,2).repeat(2),16),f=parseInt(w.slice(2,3).repeat(2),16),m=parseInt(w.slice(3,4).repeat(2),16),p.toColor(c,f,m);case 5:return c=parseInt(w.slice(1,2).repeat(2),16),f=parseInt(w.slice(2,3).repeat(2),16),m=parseInt(w.slice(3,4).repeat(2),16),h=parseInt(w.slice(4,5).repeat(2),16),p.toColor(c,f,m,h);case 7:return{css:w,rgba:(parseInt(w.slice(1),16)<<8|255)>>>0};case 9:return{css:w,rgba:parseInt(w.slice(1),16)>>>0}}const k=w.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(k)return c=parseInt(k[1]),f=parseInt(k[2]),m=parseInt(k[3]),h=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),p.toColor(c,f,m,h);if(!_||!C)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=C,_.fillStyle=w,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[c,f,m,h]=_.getImageData(0,0,1,1).data,h!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,f,m,h),css:w}}}(E||(o.css=E={})),function(n){function _(C,w,k){const g=C/255,L=w/255,R=k/255;return .2126*(g<=.03928?g/12.92:Math.pow((g+.055)/1.055,2.4))+.7152*(L<=.03928?L/12.92:Math.pow((L+.055)/1.055,2.4))+.0722*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))}n.relativeLuminance=function(C){return _(C>>16&255,C>>8&255,255&C)},n.relativeLuminance2=_}(v||(o.rgb=v={})),function(n){function _(w,k,g){const L=w>>24&255,R=w>>16&255,A=w>>8&255;let M=k>>24&255,T=k>>16&255,N=k>>8&255,W=s(v.relativeLuminance2(M,T,N),v.relativeLuminance2(L,R,A));for(;W<g&&(M>0||T>0||N>0);)M-=Math.max(0,Math.ceil(.1*M)),T-=Math.max(0,Math.ceil(.1*T)),N-=Math.max(0,Math.ceil(.1*N)),W=s(v.relativeLuminance2(M,T,N),v.relativeLuminance2(L,R,A));return(M<<24|T<<16|N<<8|255)>>>0}function C(w,k,g){const L=w>>24&255,R=w>>16&255,A=w>>8&255;let M=k>>24&255,T=k>>16&255,N=k>>8&255,W=s(v.relativeLuminance2(M,T,N),v.relativeLuminance2(L,R,A));for(;W<g&&(M<255||T<255||N<255);)M=Math.min(255,M+Math.ceil(.1*(255-M))),T=Math.min(255,T+Math.ceil(.1*(255-T))),N=Math.min(255,N+Math.ceil(.1*(255-N))),W=s(v.relativeLuminance2(M,T,N),v.relativeLuminance2(L,R,A));return(M<<24|T<<16|N<<8|255)>>>0}n.blend=function(w,k){if(h=(255&k)/255,h===1)return k;const g=k>>24&255,L=k>>16&255,R=k>>8&255,A=w>>24&255,M=w>>16&255,T=w>>8&255;return c=A+Math.round((g-A)*h),f=M+Math.round((L-M)*h),m=T+Math.round((R-T)*h),p.toRgba(c,f,m)},n.ensureContrastRatio=function(w,k,g){const L=v.relativeLuminance(w>>8),R=v.relativeLuminance(k>>8);if(s(L,R)<g){if(R<L){const T=_(w,k,g),N=s(L,v.relativeLuminance(T>>8));if(N<g){const W=C(w,k,g);return N>s(L,v.relativeLuminance(W>>8))?T:W}return T}const A=C(w,k,g),M=s(L,v.relativeLuminance(A>>8));if(M<g){const T=_(w,k,g);return M>s(L,v.relativeLuminance(T>>8))?A:T}return A}},n.reduceLuminance=_,n.increaseLuminance=C,n.toChannels=function(w){return[w>>24&255,w>>16&255,w>>8&255,255&w]}}(u||(o.rgba=u={})),o.toPaddedHex=l,o.contrastRatio=s},8969:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const f=c(844),m=c(2585),h=c(4348),p=c(7866),S=c(744),E=c(7302),v=c(6975),u=c(8460),l=c(1753),s=c(1480),n=c(7994),_=c(9282),C=c(5435),w=c(5981),k=c(2660);let g=!1;class L extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new u.EventEmitter),this._onScroll.event(A=>{var M;(M=this._onScrollApi)==null||M.fire(A.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(A){for(const M in A)this.optionsService.options[M]=A[M]}constructor(A){super(),this._windowsWrappingHeuristics=this.register(new f.MutableDisposable),this._onBinary=this.register(new u.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new u.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new u.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new u.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new u.EventEmitter),this._instantiationService=new h.InstantiationService,this.optionsService=this.register(new E.OptionsService(A)),this._instantiationService.setService(m.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(m.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(m.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.CoreService)),this._instantiationService.setService(m.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(l.CoreMouseService)),this._instantiationService.setService(m.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(s.UnicodeService)),this._instantiationService.setService(m.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(n.CharsetService),this._instantiationService.setService(m.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(m.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,u.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,u.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,u.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,u.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(M=>{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(M=>{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 w.WriteBuffer((M,T)=>this._inputHandler.parse(M,T))),this.register((0,u.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(A,M){this._writeBuffer.write(A,M)}writeSync(A,M){this._logService.logLevel<=m.LogLevelEnum.WARN&&!g&&(this._logService.warn("writeSync is unreliable and will be removed soon."),g=!0),this._writeBuffer.writeSync(A,M)}input(A,M=!0){this.coreService.triggerDataEvent(A,M)}resize(A,M){isNaN(A)||isNaN(M)||(A=Math.max(A,S.MINIMUM_COLS),M=Math.max(M,S.MINIMUM_ROWS),this._bufferService.resize(A,M))}scroll(A,M=!1){this._bufferService.scroll(A,M)}scrollLines(A,M,T){this._bufferService.scrollLines(A,M,T)}scrollPages(A){this.scrollLines(A*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(A){const M=A-this._bufferService.buffer.ydisp;M!==0&&this.scrollLines(M)}registerEscHandler(A,M){return this._inputHandler.registerEscHandler(A,M)}registerDcsHandler(A,M){return this._inputHandler.registerDcsHandler(A,M)}registerCsiHandler(A,M){return this._inputHandler.registerCsiHandler(A,M)}registerOscHandler(A,M){return this._inputHandler.registerOscHandler(A,M)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let A=!1;const M=this.optionsService.rawOptions.windowsPty;M&&M.buildNumber!==void 0&&M.buildNumber!==void 0?A=M.backend==="conpty"&&M.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(A=!0),A?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const A=[];A.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),A.push(this.registerCsiHandler({final:"H"},()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)(()=>{for(const M of A)M.dispose()})}}}o.CoreTerminal=L},8460:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let f=0;f<this._listeners.length;f++)if(this._listeners[f]===c)return void this._listeners.splice(f,1)}}})),this._event}fire(c,f){const m=[];for(let h=0;h<this._listeners.length;h++)m.push(this._listeners[h]);for(let h=0;h<m.length;h++)m[h].call(void 0,c,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(c,f){return c(m=>f.fire(m))},o.runAndSubscribe=function(c,f){return f(void 0),c(m=>f(m))}},5435:function(y,o,c){var f=this&&this.__decorate||function(H,b,D,P){var B,z=arguments.length,V=z<3?b:P===null?P=Object.getOwnPropertyDescriptor(b,D):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(H,b,D,P);else for(var Q=H.length-1;Q>=0;Q--)(B=H[Q])&&(V=(z<3?B(V):z>3?B(b,D,V):B(b,D))||V);return z>3&&V&&Object.defineProperty(b,D,V),V},m=this&&this.__param||function(H,b){return function(D,P){b(D,P,H)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const h=c(2584),p=c(7116),S=c(2015),E=c(844),v=c(482),u=c(8437),l=c(8460),s=c(643),n=c(511),_=c(3734),C=c(2585),w=c(1480),k=c(6242),g=c(6351),L=c(5941),R={"(":0,")":1,"*":2,"+":3,"-":1,".":2},A=131072;function M(H,b){if(H>24)return b.setWinLines||!1;switch(H){case 1:return!!b.restoreWin;case 2:return!!b.minimizeWin;case 3:return!!b.setWinPosition;case 4:return!!b.setWinSizePixels;case 5:return!!b.raiseWin;case 6:return!!b.lowerWin;case 7:return!!b.refreshWin;case 8:return!!b.setWinSizeChars;case 9:return!!b.maximizeWin;case 10:return!!b.fullscreenWin;case 11:return!!b.getWinState;case 13:return!!b.getWinPosition;case 14:return!!b.getWinSizePixels;case 15:return!!b.getScreenSizePixels;case 16:return!!b.getCellSizePixels;case 18:return!!b.getWinSizeChars;case 19:return!!b.getScreenSizeChars;case 20:return!!b.getIconTitle;case 21:return!!b.getWinTitle;case 22:return!!b.pushTitle;case 23:return!!b.popTitle;case 24:return!!b.setWinLines}return!1}var T;(function(H){H[H.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",H[H.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(T||(o.WindowsOptionsReportType=T={}));let N=0;class W extends E.Disposable{getAttrData(){return this._curAttrData}constructor(b,D,P,B,z,V,Q,Y,O=new S.EscapeSequenceParser){super(),this._bufferService=b,this._charsetService=D,this._coreService=P,this._logService=B,this._optionsService=z,this._oscLinkService=V,this._coreMouseService=Q,this._unicodeService=Y,this._parser=O,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.Utf8ToUtf32,this._workCell=new n.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new l.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new l.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new l.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new l.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new l.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new l.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new l.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new l.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new l.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new l.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new l.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new l.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new l.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 K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(x=>this._activeBuffer=x.activeBuffer)),this._parser.setCsiHandlerFallback((x,F)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(x),params:F.toArray()})}),this._parser.setEscHandlerFallback(x=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(x)})}),this._parser.setExecuteHandlerFallback(x=>{this._logService.debug("Unknown EXECUTE code: ",{code:x})}),this._parser.setOscHandlerFallback((x,F,I)=>{this._logService.debug("Unknown OSC code: ",{identifier:x,action:F,data:I})}),this._parser.setDcsHandlerFallback((x,F,I)=>{F==="HOOK"&&(I=I.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(x),action:F,payload:I})}),this._parser.setPrintHandler((x,F,I)=>this.print(x,F,I)),this._parser.registerCsiHandler({final:"@"},x=>this.insertChars(x)),this._parser.registerCsiHandler({intermediates:" ",final:"@"},x=>this.scrollLeft(x)),this._parser.registerCsiHandler({final:"A"},x=>this.cursorUp(x)),this._parser.registerCsiHandler({intermediates:" ",final:"A"},x=>this.scrollRight(x)),this._parser.registerCsiHandler({final:"B"},x=>this.cursorDown(x)),this._parser.registerCsiHandler({final:"C"},x=>this.cursorForward(x)),this._parser.registerCsiHandler({final:"D"},x=>this.cursorBackward(x)),this._parser.registerCsiHandler({final:"E"},x=>this.cursorNextLine(x)),this._parser.registerCsiHandler({final:"F"},x=>this.cursorPrecedingLine(x)),this._parser.registerCsiHandler({final:"G"},x=>this.cursorCharAbsolute(x)),this._parser.registerCsiHandler({final:"H"},x=>this.cursorPosition(x)),this._parser.registerCsiHandler({final:"I"},x=>this.cursorForwardTab(x)),this._parser.registerCsiHandler({final:"J"},x=>this.eraseInDisplay(x,!1)),this._parser.registerCsiHandler({prefix:"?",final:"J"},x=>this.eraseInDisplay(x,!0)),this._parser.registerCsiHandler({final:"K"},x=>this.eraseInLine(x,!1)),this._parser.registerCsiHandler({prefix:"?",final:"K"},x=>this.eraseInLine(x,!0)),this._parser.registerCsiHandler({final:"L"},x=>this.insertLines(x)),this._parser.registerCsiHandler({final:"M"},x=>this.deleteLines(x)),this._parser.registerCsiHandler({final:"P"},x=>this.deleteChars(x)),this._parser.registerCsiHandler({final:"S"},x=>this.scrollUp(x)),this._parser.registerCsiHandler({final:"T"},x=>this.scrollDown(x)),this._parser.registerCsiHandler({final:"X"},x=>this.eraseChars(x)),this._parser.registerCsiHandler({final:"Z"},x=>this.cursorBackwardTab(x)),this._parser.registerCsiHandler({final:"`"},x=>this.charPosAbsolute(x)),this._parser.registerCsiHandler({final:"a"},x=>this.hPositionRelative(x)),this._parser.registerCsiHandler({final:"b"},x=>this.repeatPrecedingCharacter(x)),this._parser.registerCsiHandler({final:"c"},x=>this.sendDeviceAttributesPrimary(x)),this._parser.registerCsiHandler({prefix:">",final:"c"},x=>this.sendDeviceAttributesSecondary(x)),this._parser.registerCsiHandler({final:"d"},x=>this.linePosAbsolute(x)),this._parser.registerCsiHandler({final:"e"},x=>this.vPositionRelative(x)),this._parser.registerCsiHandler({final:"f"},x=>this.hVPosition(x)),this._parser.registerCsiHandler({final:"g"},x=>this.tabClear(x)),this._parser.registerCsiHandler({final:"h"},x=>this.setMode(x)),this._parser.registerCsiHandler({prefix:"?",final:"h"},x=>this.setModePrivate(x)),this._parser.registerCsiHandler({final:"l"},x=>this.resetMode(x)),this._parser.registerCsiHandler({prefix:"?",final:"l"},x=>this.resetModePrivate(x)),this._parser.registerCsiHandler({final:"m"},x=>this.charAttributes(x)),this._parser.registerCsiHandler({final:"n"},x=>this.deviceStatus(x)),this._parser.registerCsiHandler({prefix:"?",final:"n"},x=>this.deviceStatusPrivate(x)),this._parser.registerCsiHandler({intermediates:"!",final:"p"},x=>this.softReset(x)),this._parser.registerCsiHandler({intermediates:" ",final:"q"},x=>this.setCursorStyle(x)),this._parser.registerCsiHandler({final:"r"},x=>this.setScrollRegion(x)),this._parser.registerCsiHandler({final:"s"},x=>this.saveCursor(x)),this._parser.registerCsiHandler({final:"t"},x=>this.windowOptions(x)),this._parser.registerCsiHandler({final:"u"},x=>this.restoreCursor(x)),this._parser.registerCsiHandler({intermediates:"'",final:"}"},x=>this.insertColumns(x)),this._parser.registerCsiHandler({intermediates:"'",final:"~"},x=>this.deleteColumns(x)),this._parser.registerCsiHandler({intermediates:'"',final:"q"},x=>this.selectProtected(x)),this._parser.registerCsiHandler({intermediates:"$",final:"p"},x=>this.requestMode(x,!0)),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},x=>this.requestMode(x,!1)),this._parser.setExecuteHandler(h.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(h.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(h.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(h.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(h.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(h.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(h.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(h.C1.IND,()=>this.index()),this._parser.setExecuteHandler(h.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(h.C1.HTS,()=>this.tabSet()),this._parser.registerOscHandler(0,new k.OscHandler(x=>(this.setTitle(x),this.setIconName(x),!0))),this._parser.registerOscHandler(1,new k.OscHandler(x=>this.setIconName(x))),this._parser.registerOscHandler(2,new k.OscHandler(x=>this.setTitle(x))),this._parser.registerOscHandler(4,new k.OscHandler(x=>this.setOrReportIndexedColor(x))),this._parser.registerOscHandler(8,new k.OscHandler(x=>this.setHyperlink(x))),this._parser.registerOscHandler(10,new k.OscHandler(x=>this.setOrReportFgColor(x))),this._parser.registerOscHandler(11,new k.OscHandler(x=>this.setOrReportBgColor(x))),this._parser.registerOscHandler(12,new k.OscHandler(x=>this.setOrReportCursorColor(x))),this._parser.registerOscHandler(104,new k.OscHandler(x=>this.restoreIndexedColor(x))),this._parser.registerOscHandler(110,new k.OscHandler(x=>this.restoreFgColor(x))),this._parser.registerOscHandler(111,new k.OscHandler(x=>this.restoreBgColor(x))),this._parser.registerOscHandler(112,new k.OscHandler(x=>this.restoreCursorColor(x))),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 x in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:x},()=>this.selectCharset("("+x)),this._parser.registerEscHandler({intermediates:")",final:x},()=>this.selectCharset(")"+x)),this._parser.registerEscHandler({intermediates:"*",final:x},()=>this.selectCharset("*"+x)),this._parser.registerEscHandler({intermediates:"+",final:x},()=>this.selectCharset("+"+x)),this._parser.registerEscHandler({intermediates:"-",final:x},()=>this.selectCharset("-"+x)),this._parser.registerEscHandler({intermediates:".",final:x},()=>this.selectCharset("."+x)),this._parser.registerEscHandler({intermediates:"/",final:x},()=>this.selectCharset("/"+x));this._parser.registerEscHandler({intermediates:"#",final:"8"},()=>this.screenAlignmentPattern()),this._parser.setErrorHandler(x=>(this._logService.error("Parsing error: ",x),x)),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new g.DcsHandler((x,F)=>this.requestStatusString(x,F)))}_preserveStack(b,D,P,B){this._parseStack.paused=!0,this._parseStack.cursorStartX=b,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=P,this._parseStack.position=B}_logSlowResolvingAsync(b){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([b,new Promise((D,P)=>setTimeout(()=>P("#SLOW_TIMEOUT"),5e3))]).catch(D=>{if(D!=="#SLOW_TIMEOUT")throw D;console.warn("async parser handler taking longer than 5000 ms")})}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(b,D){let P,B=this._activeBuffer.x,z=this._activeBuffer.y,V=0;const Q=this._parseStack.paused;if(Q){if(P=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(P),P;B=this._parseStack.cursorStartX,z=this._parseStack.cursorStartY,this._parseStack.paused=!1,b.length>A&&(V=this._parseStack.position+A)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof b=="string"?` "${b}"`:` "${Array.prototype.map.call(b,x=>String.fromCharCode(x)).join("")}"`),typeof b=="string"?b.split("").map(x=>x.charCodeAt(0)):b),this._parseBuffer.length<b.length&&this._parseBuffer.length<A&&(this._parseBuffer=new Uint32Array(Math.min(b.length,A))),Q||this._dirtyRowTracker.clearRange(),b.length>A)for(let x=V;x<b.length;x+=A){const F=x+A<b.length?x+A:b.length,I=typeof b=="string"?this._stringDecoder.decode(b.substring(x,F),this._parseBuffer):this._utf8Decoder.decode(b.subarray(x,F),this._parseBuffer);if(P=this._parser.parse(this._parseBuffer,I))return this._preserveStack(B,z,I,x),this._logSlowResolvingAsync(P),P}else if(!Q){const x=typeof b=="string"?this._stringDecoder.decode(b,this._parseBuffer):this._utf8Decoder.decode(b,this._parseBuffer);if(P=this._parser.parse(this._parseBuffer,x))return this._preserveStack(B,z,x,0),this._logSlowResolvingAsync(P),P}this._activeBuffer.x===B&&this._activeBuffer.y===z||this._onCursorMove.fire();const Y=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),O=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);O<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(O,this._bufferService.rows-1),Math.min(Y,this._bufferService.rows-1))}print(b,D,P){let B,z;const V=this._charsetService.charset,Q=this._optionsService.rawOptions.screenReaderMode,Y=this._bufferService.cols,O=this._coreService.decPrivateModes.wraparound,x=this._coreService.modes.insertMode,F=this._curAttrData;let I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&P-D>0&&I.getWidth(this._activeBuffer.x-1)===2&&I.setCellFromCodepoint(this._activeBuffer.x-1,0,1,F);let $=this._parser.precedingJoinState;for(let j=D;j<P;++j){if(B=b[j],B<127&&V){const Ae=V[String.fromCharCode(B)];Ae&&(B=Ae.charCodeAt(0))}const Z=this._unicodeService.charProperties(B,$);z=w.UnicodeService.extractWidth(Z);const ie=w.UnicodeService.extractShouldJoin(Z),de=ie?w.UnicodeService.extractWidth($):0;if($=Z,Q&&this._onA11yChar.fire((0,v.stringFromCodePoint)(B)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+z-de>Y){if(O){const Ae=I;let J=this._activeBuffer.x-de;for(this._activeBuffer.x=de,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),I=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),de>0&&I instanceof u.BufferLine&&I.copyCellsFrom(Ae,J,0,de,!1);J<Y;)Ae.setCellFromCodepoint(J++,0,1,F)}else if(this._activeBuffer.x=Y-1,z===2)continue}if(ie&&this._activeBuffer.x){const Ae=I.getWidth(this._activeBuffer.x-1)?1:2;I.addCodepointToCell(this._activeBuffer.x-Ae,B,z);for(let J=z-de;--J>=0;)I.setCellFromCodepoint(this._activeBuffer.x++,0,0,F)}else if(x&&(I.insertCells(this._activeBuffer.x,z-de,this._activeBuffer.getNullCell(F)),I.getWidth(Y-1)===2&&I.setCellFromCodepoint(Y-1,s.NULL_CELL_CODE,s.NULL_CELL_WIDTH,F)),I.setCellFromCodepoint(this._activeBuffer.x++,B,z,F),z>0)for(;--z;)I.setCellFromCodepoint(this._activeBuffer.x++,0,0,F)}this._parser.precedingJoinState=$,this._activeBuffer.x<Y&&P-D>0&&I.getWidth(this._activeBuffer.x)===0&&!I.hasContent(this._activeBuffer.x)&&I.setCellFromCodepoint(this._activeBuffer.x,0,1,F),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(b,D){return b.final!=="t"||b.prefix||b.intermediates?this._parser.registerCsiHandler(b,D):this._parser.registerCsiHandler(b,P=>!M(P.params[0],this._optionsService.rawOptions.windowOptions)||D(P))}registerDcsHandler(b,D){return this._parser.registerDcsHandler(b,new g.DcsHandler(D))}registerEscHandler(b,D){return this._parser.registerEscHandler(b,D)}registerOscHandler(b,D){return this._parser.registerOscHandler(b,new k.OscHandler(D))}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 b;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&&((b=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&b.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);D.hasWidth(this._activeBuffer.x)&&!D.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const b=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-b),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(b=this._bufferService.cols-1){this._activeBuffer.x=Math.min(b,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(b,D){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=b,this._activeBuffer.y=this._activeBuffer.scrollTop+D):(this._activeBuffer.x=b,this._activeBuffer.y=D),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(b,D){this._restrictCursor(),this._setCursor(this._activeBuffer.x+b,this._activeBuffer.y+D)}cursorUp(b){const D=this._activeBuffer.y-this._activeBuffer.scrollTop;return D>=0?this._moveCursor(0,-Math.min(D,b.params[0]||1)):this._moveCursor(0,-(b.params[0]||1)),!0}cursorDown(b){const D=this._activeBuffer.scrollBottom-this._activeBuffer.y;return D>=0?this._moveCursor(0,Math.min(D,b.params[0]||1)):this._moveCursor(0,b.params[0]||1),!0}cursorForward(b){return this._moveCursor(b.params[0]||1,0),!0}cursorBackward(b){return this._moveCursor(-(b.params[0]||1),0),!0}cursorNextLine(b){return this.cursorDown(b),this._activeBuffer.x=0,!0}cursorPrecedingLine(b){return this.cursorUp(b),this._activeBuffer.x=0,!0}cursorCharAbsolute(b){return this._setCursor((b.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(b){return this._setCursor(b.length>=2?(b.params[1]||1)-1:0,(b.params[0]||1)-1),!0}charPosAbsolute(b){return this._setCursor((b.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(b){return this._moveCursor(b.params[0]||1,0),!0}linePosAbsolute(b){return this._setCursor(this._activeBuffer.x,(b.params[0]||1)-1),!0}vPositionRelative(b){return this._moveCursor(0,b.params[0]||1),!0}hVPosition(b){return this.cursorPosition(b),!0}tabClear(b){const D=b.params[0];return D===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:D===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(b){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=b.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(b){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=b.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(b){const D=b.params[0];return D===1&&(this._curAttrData.bg|=536870912),D!==2&&D!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(b,D,P,B=!1,z=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);V.replaceCells(D,P,this._activeBuffer.getNullCell(this._eraseAttrData()),z),B&&(V.isWrapped=!1)}_resetBufferLine(b,D=!1){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+b);P&&(P.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),D),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+b),P.isWrapped=!1)}eraseInDisplay(b,D=!1){let P;switch(this._restrictCursor(this._bufferService.cols),b.params[0]){case 0:for(P=this._activeBuffer.y,this._dirtyRowTracker.markDirty(P),this._eraseInBufferLine(P++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);P<this._bufferService.rows;P++)this._resetBufferLine(P,D);this._dirtyRowTracker.markDirty(P);break;case 1:for(P=this._activeBuffer.y,this._dirtyRowTracker.markDirty(P),this._eraseInBufferLine(P,0,this._activeBuffer.x+1,!0,D),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(P+1).isWrapped=!1);P--;)this._resetBufferLine(P,D);this._dirtyRowTracker.markDirty(0);break;case 2:for(P=this._bufferService.rows,this._dirtyRowTracker.markDirty(P-1);P--;)this._resetBufferLine(P,D);this._dirtyRowTracker.markDirty(0);break;case 3:const B=this._activeBuffer.lines.length-this._bufferService.rows;B>0&&(this._activeBuffer.lines.trimStart(B),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-B,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-B,0),this._onScroll.fire(0))}return!0}eraseInLine(b,D=!1){switch(this._restrictCursor(this._bufferService.cols),b.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,D);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,D);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,D)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(b){this._restrictCursor();let D=b.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const P=this._activeBuffer.ybase+this._activeBuffer.y,B=this._bufferService.rows-1-this._activeBuffer.scrollBottom,z=this._bufferService.rows-1+this._activeBuffer.ybase-B+1;for(;D--;)this._activeBuffer.lines.splice(z-1,1),this._activeBuffer.lines.splice(P,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(b){this._restrictCursor();let D=b.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const P=this._activeBuffer.ybase+this._activeBuffer.y;let B;for(B=this._bufferService.rows-1-this._activeBuffer.scrollBottom,B=this._bufferService.rows-1+this._activeBuffer.ybase-B;D--;)this._activeBuffer.lines.splice(P,1),this._activeBuffer.lines.splice(B,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(b){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.insertCells(this._activeBuffer.x,b.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(b){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.deleteCells(this._activeBuffer.x,b.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(b){let D=b.params[0]||1;for(;D--;)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(b){let D=b.params[0]||1;for(;D--;)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(u.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(b){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=b.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);B.deleteCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),B.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(b){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=b.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);B.insertCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),B.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(b){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=b.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);B.insertCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),B.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(b){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=b.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const B=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);B.deleteCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),B.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(b){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(b.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(b){const D=this._parser.precedingJoinState;if(!D)return!0;const P=b.params[0]||1,B=w.UnicodeService.extractWidth(D),z=this._activeBuffer.x-B,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(z),Q=new Uint32Array(V.length*P);let Y=0;for(let x=0;x<V.length;){const F=V.codePointAt(x)||0;Q[Y++]=F,x+=F>65535?2:1}let O=Y;for(let x=1;x<P;++x)Q.copyWithin(O,0,Y),O+=Y;return this.print(Q,0,O),!0}sendDeviceAttributesPrimary(b){return b.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(h.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(h.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(b){return b.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(h.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(h.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(b.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(h.C0.ESC+"[>83;40003;0c")),!0}_is(b){return(this._optionsService.rawOptions.termName+"").indexOf(b)===0}setMode(b){for(let D=0;D<b.length;D++)switch(b.params[D]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(b){for(let D=0;D<b.length;D++)switch(b.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),this._charsetService.setgCharset(1,p.DEFAULT_CHARSET),this._charsetService.setgCharset(2,p.DEFAULT_CHARSET),this._charsetService.setgCharset(3,p.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(b){for(let D=0;D<b.length;D++)switch(b.params[D]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(b){for(let D=0;D<b.length;D++)switch(b.params[D]){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(),b.params[D]===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(b,D){const P=this._coreService.decPrivateModes,{activeProtocol:B,activeEncoding:z}=this._coreMouseService,V=this._coreService,{buffers:Q,cols:Y}=this._bufferService,{active:O,alt:x}=Q,F=this._optionsService.rawOptions,I=ie=>ie?1:2,$=b.params[0];return j=$,Z=D?$===2?4:$===4?I(V.modes.insertMode):$===12?3:$===20?I(F.convertEol):0:$===1?I(P.applicationCursorKeys):$===3?F.windowOptions.setWinLines?Y===80?2:Y===132?1:0:0:$===6?I(P.origin):$===7?I(P.wraparound):$===8?3:$===9?I(B==="X10"):$===12?I(F.cursorBlink):$===25?I(!V.isCursorHidden):$===45?I(P.reverseWraparound):$===66?I(P.applicationKeypad):$===67?4:$===1e3?I(B==="VT200"):$===1002?I(B==="DRAG"):$===1003?I(B==="ANY"):$===1004?I(P.sendFocus):$===1005?4:$===1006?I(z==="SGR"):$===1015?4:$===1016?I(z==="SGR_PIXELS"):$===1048?1:$===47||$===1047||$===1049?I(O===x):$===2004?I(P.bracketedPasteMode):0,V.triggerDataEvent(`${h.C0.ESC}[${D?"":"?"}${j};${Z}$y`),!0;var j,Z}_updateAttrColor(b,D,P,B,z){return D===2?(b|=50331648,b&=-16777216,b|=_.AttributeData.fromColorRGB([P,B,z])):D===5&&(b&=-50331904,b|=33554432|255&P),b}_extractColor(b,D,P){const B=[0,0,-1,0,0,0];let z=0,V=0;do{if(B[V+z]=b.params[D+V],b.hasSubParams(D+V)){const Q=b.getSubParams(D+V);let Y=0;do B[1]===5&&(z=1),B[V+Y+1+z]=Q[Y];while(++Y<Q.length&&Y+V+1+z<B.length);break}if(B[1]===5&&V+z>=2||B[1]===2&&V+z>=5)break;B[1]&&(z=1)}while(++V+D<b.length&&V+z<B.length);for(let Q=2;Q<B.length;++Q)B[Q]===-1&&(B[Q]=0);switch(B[0]){case 38:P.fg=this._updateAttrColor(P.fg,B[1],B[3],B[4],B[5]);break;case 48:P.bg=this._updateAttrColor(P.bg,B[1],B[3],B[4],B[5]);break;case 58:P.extended=P.extended.clone(),P.extended.underlineColor=this._updateAttrColor(P.extended.underlineColor,B[1],B[3],B[4],B[5])}return V}_processUnderline(b,D){D.extended=D.extended.clone(),(!~b||b>5)&&(b=1),D.extended.underlineStyle=b,D.fg|=268435456,b===0&&(D.fg&=-268435457),D.updateExtended()}_processSGR0(b){b.fg=u.DEFAULT_ATTR_DATA.fg,b.bg=u.DEFAULT_ATTR_DATA.bg,b.extended=b.extended.clone(),b.extended.underlineStyle=0,b.extended.underlineColor&=-67108864,b.updateExtended()}charAttributes(b){if(b.length===1&&b.params[0]===0)return this._processSGR0(this._curAttrData),!0;const D=b.length;let P;const B=this._curAttrData;for(let z=0;z<D;z++)P=b.params[z],P>=30&&P<=37?(B.fg&=-50331904,B.fg|=16777216|P-30):P>=40&&P<=47?(B.bg&=-50331904,B.bg|=16777216|P-40):P>=90&&P<=97?(B.fg&=-50331904,B.fg|=16777224|P-90):P>=100&&P<=107?(B.bg&=-50331904,B.bg|=16777224|P-100):P===0?this._processSGR0(B):P===1?B.fg|=134217728:P===3?B.bg|=67108864:P===4?(B.fg|=268435456,this._processUnderline(b.hasSubParams(z)?b.getSubParams(z)[0]:1,B)):P===5?B.fg|=536870912:P===7?B.fg|=67108864:P===8?B.fg|=1073741824:P===9?B.fg|=2147483648:P===2?B.bg|=134217728:P===21?this._processUnderline(2,B):P===22?(B.fg&=-134217729,B.bg&=-134217729):P===23?B.bg&=-67108865:P===24?(B.fg&=-268435457,this._processUnderline(0,B)):P===25?B.fg&=-536870913:P===27?B.fg&=-67108865:P===28?B.fg&=-1073741825:P===29?B.fg&=2147483647:P===39?(B.fg&=-67108864,B.fg|=16777215&u.DEFAULT_ATTR_DATA.fg):P===49?(B.bg&=-67108864,B.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):P===38||P===48||P===58?z+=this._extractColor(b,z,B):P===53?B.bg|=1073741824:P===55?B.bg&=-1073741825:P===59?(B.extended=B.extended.clone(),B.extended.underlineColor=-1,B.updateExtended()):P===100?(B.fg&=-67108864,B.fg|=16777215&u.DEFAULT_ATTR_DATA.fg,B.bg&=-67108864,B.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",P);return!0}deviceStatus(b){switch(b.params[0]){case 5:this._coreService.triggerDataEvent(`${h.C0.ESC}[0n`);break;case 6:const D=this._activeBuffer.y+1,P=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[${D};${P}R`)}return!0}deviceStatusPrivate(b){if(b.params[0]===6){const D=this._activeBuffer.y+1,P=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${h.C0.ESC}[?${D};${P}R`)}return!0}softReset(b){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=u.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(b){const D=b.params[0]||1;switch(D){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 P=D%2==1;return this._optionsService.options.cursorBlink=P,!0}setScrollRegion(b){const D=b.params[0]||1;let P;return(b.length<2||(P=b.params[1])>this._bufferService.rows||P===0)&&(P=this._bufferService.rows),P>D&&(this._activeBuffer.scrollTop=D-1,this._activeBuffer.scrollBottom=P-1,this._setCursor(0,0)),!0}windowOptions(b){if(!M(b.params[0],this._optionsService.rawOptions.windowOptions))return!0;const D=b.length>1?b.params[1]:0;switch(b.params[0]){case 14:D!==2&&this._onRequestWindowsOptionsReport.fire(T.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(T.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${h.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:D!==0&&D!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),D!==0&&D!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:D!==0&&D!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),D!==0&&D!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(b){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(b){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(b){return this._windowTitle=b,this._onTitleChange.fire(b),!0}setIconName(b){return this._iconName=b,!0}setOrReportIndexedColor(b){const D=[],P=b.split(";");for(;P.length>1;){const B=P.shift(),z=P.shift();if(/^\d+$/.exec(B)){const V=parseInt(B);if(q(V))if(z==="?")D.push({type:0,index:V});else{const Q=(0,L.parseColor)(z);Q&&D.push({type:1,index:V,color:Q})}}}return D.length&&this._onColor.fire(D),!0}setHyperlink(b){const D=b.split(";");return!(D.length<2)&&(D[1]?this._createHyperlink(D[0],D[1]):!D[0]&&this._finishHyperlink())}_createHyperlink(b,D){this._getCurrentLinkId()&&this._finishHyperlink();const P=b.split(":");let B;const z=P.findIndex(V=>V.startsWith("id="));return z!==-1&&(B=P[z].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:B,uri:D}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(b,D){const P=b.split(";");for(let B=0;B<P.length&&!(D>=this._specialColors.length);++B,++D)if(P[B]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const z=(0,L.parseColor)(P[B]);z&&this._onColor.fire([{type:1,index:this._specialColors[D],color:z}])}return!0}setOrReportFgColor(b){return this._setOrReportSpecialColor(b,0)}setOrReportBgColor(b){return this._setOrReportSpecialColor(b,1)}setOrReportCursorColor(b){return this._setOrReportSpecialColor(b,2)}restoreIndexedColor(b){if(!b)return this._onColor.fire([{type:2}]),!0;const D=[],P=b.split(";");for(let B=0;B<P.length;++B)if(/^\d+$/.exec(P[B])){const z=parseInt(P[B]);q(z)&&D.push({type:2,index:z})}return D.length&&this._onColor.fire(D),!0}restoreFgColor(b){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(b){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(b){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,p.DEFAULT_CHARSET),!0}selectCharset(b){return b.length!==2?(this.selectDefaultCharset(),!0):(b[0]==="/"||this._charsetService.setgCharset(R[b[0]],p.CHARSETS[b[1]]||p.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const b=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,b,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=u.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=u.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(b){return this._charsetService.setgLevel(b),!0}screenAlignmentPattern(){const b=new n.CellData;b.content=4194373,b.fg=this._curAttrData.fg,b.bg=this._curAttrData.bg,this._setCursor(0,0);for(let D=0;D<this._bufferService.rows;++D){const P=this._activeBuffer.ybase+this._activeBuffer.y+D,B=this._activeBuffer.lines.get(P);B&&(B.fill(b),B.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(b,D){const P=this._bufferService.buffer,B=this._optionsService.rawOptions;return(z=>(this._coreService.triggerDataEvent(`${h.C0.ESC}${z}${h.C0.ESC}\\`),!0))(b==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:b==='"p'?'P1$r61;1"p':b==="r"?`P1$r${P.scrollTop+1};${P.scrollBottom+1}r`:b==="m"?"P1$r0m":b===" q"?`P1$r${{block:2,underline:4,bar:6}[B.cursorStyle]-(B.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(b,D){this._dirtyRowTracker.markRangeDirty(b,D)}}o.InputHandler=W;let K=class{constructor(H){this._bufferService=H,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(H){H<this.start?this.start=H:H>this.end&&(this.end=H)}markRangeDirty(H,b){H>b&&(N=H,H=b,b=N),H<this.start&&(this.start=H),b>this.end&&(this.end=b)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function q(H){return 0<=H&&H<256}K=f([m(0,C.IBufferService)],K)},844:(y,o)=>{function c(f){for(const m of f)m.dispose();f.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const f of this._disposables)f.dispose();this._disposables.length=0}register(f){return this._disposables.push(f),f}unregister(f){const m=this._disposables.indexOf(f);m!==-1&&this._disposables.splice(m,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var m;this._isDisposed||f===this._value||((m=this._value)==null||m.dispose(),this._value=f)}clear(){this.value=void 0}dispose(){var f;this._isDisposed=!0,(f=this._value)==null||f.dispose(),this._value=void 0}},o.toDisposable=function(f){return{dispose:f}},o.disposeArray=c,o.getDisposeArrayDisposable=function(f){return{dispose:()=>c(f)}}},1505:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(m,h,p){this._data[m]||(this._data[m]={}),this._data[m][h]=p}get(m,h){return this._data[m]?this._data[m][h]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(f,m,h,p,S){this._data.get(f,m)||this._data.set(f,m,new c),this._data.get(f,m).set(h,p,S)}get(f,m,h,p){var S;return(S=this._data.get(f,m))==null?void 0:S.get(h,p)}clear(){this._data.clear()}}},6114:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const c=o.isNode?"node":navigator.userAgent,f=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const m=c.match(/Version\/(\d+)/);return m===null||m.length<2?0:parseInt(m[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),o.isIpad=f==="iPad",o.isIphone=f==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),o.isLinux=f.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(f){this._getKey=f,this._array=[]}clear(){this._array.length=0}insert(f){this._array.length!==0?(c=this._search(this._getKey(f)),this._array.splice(c,0,f)):this._array.push(f)}delete(f){if(this._array.length===0)return!1;const m=this._getKey(f);if(m===void 0||(c=this._search(m),c===-1)||this._getKey(this._array[c])!==m)return!1;do if(this._array[c]===f)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===m);return!1}*getKeyIterator(f){if(this._array.length!==0&&(c=this._search(f),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===f))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===f)}forEachByKey(f,m){if(this._array.length!==0&&(c=this._search(f),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===f))do m(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===f)}values(){return[...this._array].values()}_search(f){let m=0,h=this._array.length-1;for(;h>=m;){let p=m+h>>1;const S=this._getKey(this._array[p]);if(S>f)h=p-1;else{if(!(S<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}m=p+1}}return m}}},7226:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const f=c(6114);class m{constructor(){this._tasks=[],this._i=0}enqueue(S){this._tasks.push(S),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(S){this._idleCallback=void 0;let E=0,v=0,u=S.timeRemaining(),l=0;for(;this._i<this._tasks.length;){if(E=Date.now(),this._tasks[this._i]()||this._i++,E=Math.max(1,Date.now()-E),v=Math.max(E,v),l=S.timeRemaining(),1.5*v>l)return u-E<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(u-E))}ms`),void this._start();u=l}this.clear()}}class h extends m{_requestCallback(S){return setTimeout(()=>S(this._createDeadline(16)))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const E=Date.now()+S;return{timeRemaining:()=>Math.max(0,E-Date.now())}}}o.PriorityTaskQueue=h,o.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends m{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:h,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const f=c(643);o.updateWindowsModeWrappedState=function(m){const h=m.buffer.lines.get(m.buffer.ybase+m.buffer.y-1),p=h==null?void 0:h.get(m.cols-1),S=m.buffer.lines.get(m.buffer.ybase+m.buffer.y);S&&p&&(S.isWrapped=p[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&p[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(h){return[h>>>16&255,h>>>8&255,255&h]}static fromColorRGB(h){return(255&h[0])<<16|(255&h[1])<<8|255&h[2]}clone(){const h=new c;return h.fg=this.fg,h.bg=this.bg,h.extended=this.extended.clone(),h}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=c;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(h){this._ext=h}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(h){this._ext&=-469762049,this._ext|=h<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(h){this._ext&=-67108864,this._ext|=67108863&h}get urlId(){return this._urlId}set urlId(h){this._urlId=h}get underlineVariantOffset(){const h=(3758096384&this._ext)>>29;return h<0?4294967288^h:h}set underlineVariantOffset(h){this._ext&=536870911,this._ext|=h<<29&3758096384}constructor(h=0,p=0){this._ext=0,this._urlId=0,this._ext=h,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=f},9092:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const f=c(6349),m=c(7226),h=c(3734),p=c(8437),S=c(4634),E=c(511),v=c(643),u=c(4863),l=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(s,n,_){this._hasScrollback=s,this._optionsService=n,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=l.DEFAULT_CHARSET,this.markers=[],this._nullCell=E.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=E.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new m.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(s){return s?(this._nullCell.fg=s.fg,this._nullCell.bg=s.bg,this._nullCell.extended=s.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new h.ExtendedAttrs),this._nullCell}getWhitespaceCell(s){return s?(this._whitespaceCell.fg=s.fg,this._whitespaceCell.bg=s.bg,this._whitespaceCell.extended=s.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new h.ExtendedAttrs),this._whitespaceCell}getBlankLine(s,n){return new p.BufferLine(this._bufferService.cols,this.getNullCell(s),n)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const s=this.ybase+this.y-this.ydisp;return s>=0&&s<this._rows}_getCorrectBufferLength(s){if(!this._hasScrollback)return s;const n=s+this._optionsService.rawOptions.scrollback;return n>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:n}fillViewportRows(s){if(this.lines.length===0){s===void 0&&(s=p.DEFAULT_ATTR_DATA);let n=this._rows;for(;n--;)this.lines.push(this.getBlankLine(s))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new f.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(s,n){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let C=0;const w=this._getCorrectBufferLength(n);if(w>this.lines.maxLength&&(this.lines.maxLength=w),this.lines.length>0){if(this._cols<s)for(let g=0;g<this.lines.length;g++)C+=+this.lines.get(g).resize(s,_);let k=0;if(this._rows<n)for(let g=this._rows;g<n;g++)this.lines.length<n+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(s,_)):this.ybase>0&&this.lines.length<=this.ybase+this.y+k+1?(this.ybase--,k++,this.ydisp>0&&this.ydisp--):this.lines.push(new p.BufferLine(s,_)));else for(let g=this._rows;g>n;g--)this.lines.length>n+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(w<this.lines.maxLength){const g=this.lines.length-w;g>0&&(this.lines.trimStart(g),this.ybase=Math.max(this.ybase-g,0),this.ydisp=Math.max(this.ydisp-g,0),this.savedY=Math.max(this.savedY-g,0)),this.lines.maxLength=w}this.x=Math.min(this.x,s-1),this.y=Math.min(this.y,n-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,s-1),this.scrollTop=0}if(this.scrollBottom=n-1,this._isReflowEnabled&&(this._reflow(s,n),this._cols>s))for(let k=0;k<this.lines.length;k++)C+=+this.lines.get(k).resize(s,_);this._cols=s,this._rows=n,this._memoryCleanupQueue.clear(),C>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue(()=>this._batchedMemoryCleanup()))}_batchedMemoryCleanup(){let s=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,s=!1);let n=0;for(;this._memoryCleanupPosition<this.lines.length;)if(n+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),n>100)return!0;return s}get _isReflowEnabled(){const s=this._optionsService.rawOptions.windowsPty;return s&&s.buildNumber?this._hasScrollback&&s.backend==="conpty"&&s.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(s,n){this._cols!==s&&(s>this._cols?this._reflowLarger(s,n):this._reflowSmaller(s,n))}_reflowLarger(s,n){const _=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,s,this.ybase+this.y,this.getNullCell(p.DEFAULT_ATTR_DATA));if(_.length>0){const C=(0,S.reflowLargerCreateNewLayout)(this.lines,_);(0,S.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(s,n,C.countRemoved)}}_reflowLargerAdjustViewport(s,n,_){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let w=_;for(;w-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<n&&this.lines.push(new p.BufferLine(s,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-_,0)}_reflowSmaller(s,n){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),C=[];let w=0;for(let k=this.lines.length-1;k>=0;k--){let g=this.lines.get(k);if(!g||!g.isWrapped&&g.getTrimmedLength()<=s)continue;const L=[g];for(;g.isWrapped&&k>0;)g=this.lines.get(--k),L.unshift(g);const R=this.ybase+this.y;if(R>=k&&R<k+L.length)continue;const A=L[L.length-1].getTrimmedLength(),M=(0,S.reflowSmallerGetNewLineLengths)(L,this._cols,s),T=M.length-L.length;let N;N=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+T):Math.max(0,this.lines.length-this.lines.maxLength+T);const W=[];for(let P=0;P<T;P++){const B=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);W.push(B)}W.length>0&&(C.push({start:k+L.length+w,newLines:W}),w+=W.length),L.push(...W);let K=M.length-1,q=M[K];q===0&&(K--,q=M[K]);let H=L.length-T-1,b=A;for(;H>=0;){const P=Math.min(b,q);if(L[K]===void 0)break;if(L[K].copyCellsFrom(L[H],b-P,q-P,P,!0),q-=P,q===0&&(K--,q=M[K]),b-=P,b===0){H--;const B=Math.max(H,0);b=(0,S.getWrappedLineTrimmedLength)(L,B,this._cols)}}for(let P=0;P<L.length;P++)M[P]<s&&L[P].setCell(M[P],_);let D=T-N;for(;D-- >0;)this.ybase===0?this.y<n-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+w)-n&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+T,this.ybase+n-1)}if(C.length>0){const k=[],g=[];for(let K=0;K<this.lines.length;K++)g.push(this.lines.get(K));const L=this.lines.length;let R=L-1,A=0,M=C[A];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+w);let T=0;for(let K=Math.min(this.lines.maxLength-1,L+w-1);K>=0;K--)if(M&&M.start>R+T){for(let q=M.newLines.length-1;q>=0;q--)this.lines.set(K--,M.newLines[q]);K++,k.push({index:R+1,amount:M.newLines.length}),T+=M.newLines.length,M=C[++A]}else this.lines.set(K,g[R--]);let N=0;for(let K=k.length-1;K>=0;K--)k[K].index+=N,this.lines.onInsertEmitter.fire(k[K]),N+=k[K].amount;const W=Math.max(0,L+w-this.lines.maxLength);W>0&&this.lines.onTrimEmitter.fire(W)}}translateBufferLineToString(s,n,_=0,C){const w=this.lines.get(s);return w?w.translateToString(n,_,C):""}getWrappedRangeForLine(s){let n=s,_=s;for(;n>0&&this.lines.get(n).isWrapped;)n--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:n,last:_}}setupTabStops(s){for(s!=null?this.tabs[s]||(s=this.prevStop(s)):(this.tabs={},s=0);s<this._cols;s+=this._optionsService.rawOptions.tabStopWidth)this.tabs[s]=!0}prevStop(s){for(s==null&&(s=this.x);!this.tabs[--s]&&s>0;);return s>=this._cols?this._cols-1:s<0?0:s}nextStop(s){for(s==null&&(s=this.x);!this.tabs[++s]&&s<this._cols;);return s>=this._cols?this._cols-1:s<0?0:s}clearMarkers(s){this._isClearing=!0;for(let n=0;n<this.markers.length;n++)this.markers[n].line===s&&(this.markers[n].dispose(),this.markers.splice(n--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let s=0;s<this.markers.length;s++)this.markers[s].dispose(),this.markers.splice(s--,1);this._isClearing=!1}addMarker(s){const n=new u.Marker(s);return this.markers.push(n),n.register(this.lines.onTrim(_=>{n.line-=_,n.line<0&&n.dispose()})),n.register(this.lines.onInsert(_=>{n.line>=_.index&&(n.line+=_.amount)})),n.register(this.lines.onDelete(_=>{n.line>=_.index&&n.line<_.index+_.amount&&n.dispose(),n.line>_.index&&(n.line-=_.amount)})),n.register(n.onDispose(()=>this._removeMarker(n))),n}_removeMarker(s){this._isClearing||this.markers.splice(this.markers.indexOf(s),1)}}},8437:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const f=c(3734),m=c(511),h=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class E{constructor(u,l,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*u);const n=l||m.CellData.fromCharData([0,h.NULL_CELL_CHAR,h.NULL_CELL_WIDTH,h.NULL_CELL_CODE]);for(let _=0;_<u;++_)this.setCell(_,n);this.length=u}get(u){const l=this._data[3*u+0],s=2097151&l;return[this._data[3*u+1],2097152&l?this._combined[u]:s?(0,p.stringFromCodePoint)(s):"",l>>22,2097152&l?this._combined[u].charCodeAt(this._combined[u].length-1):s]}set(u,l){this._data[3*u+1]=l[h.CHAR_DATA_ATTR_INDEX],l[h.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[u]=l[1],this._data[3*u+0]=2097152|u|l[h.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*u+0]=l[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|l[h.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(u){return this._data[3*u+0]>>22}hasWidth(u){return 12582912&this._data[3*u+0]}getFg(u){return this._data[3*u+1]}getBg(u){return this._data[3*u+2]}hasContent(u){return 4194303&this._data[3*u+0]}getCodePoint(u){const l=this._data[3*u+0];return 2097152&l?this._combined[u].charCodeAt(this._combined[u].length-1):2097151&l}isCombined(u){return 2097152&this._data[3*u+0]}getString(u){const l=this._data[3*u+0];return 2097152&l?this._combined[u]:2097151&l?(0,p.stringFromCodePoint)(2097151&l):""}isProtected(u){return 536870912&this._data[3*u+2]}loadCell(u,l){return S=3*u,l.content=this._data[S+0],l.fg=this._data[S+1],l.bg=this._data[S+2],2097152&l.content&&(l.combinedData=this._combined[u]),268435456&l.bg&&(l.extended=this._extendedAttrs[u]),l}setCell(u,l){2097152&l.content&&(this._combined[u]=l.combinedData),268435456&l.bg&&(this._extendedAttrs[u]=l.extended),this._data[3*u+0]=l.content,this._data[3*u+1]=l.fg,this._data[3*u+2]=l.bg}setCellFromCodepoint(u,l,s,n){268435456&n.bg&&(this._extendedAttrs[u]=n.extended),this._data[3*u+0]=l|s<<22,this._data[3*u+1]=n.fg,this._data[3*u+2]=n.bg}addCodepointToCell(u,l,s){let n=this._data[3*u+0];2097152&n?this._combined[u]+=(0,p.stringFromCodePoint)(l):2097151&n?(this._combined[u]=(0,p.stringFromCodePoint)(2097151&n)+(0,p.stringFromCodePoint)(l),n&=-2097152,n|=2097152):n=l|4194304,s&&(n&=-12582913,n|=s<<22),this._data[3*u+0]=n}insertCells(u,l,s){if((u%=this.length)&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,s),l<this.length-u){const n=new m.CellData;for(let _=this.length-u-l-1;_>=0;--_)this.setCell(u+l+_,this.loadCell(u+_,n));for(let _=0;_<l;++_)this.setCell(u+_,s)}else for(let n=u;n<this.length;++n)this.setCell(n,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(u,l,s){if(u%=this.length,l<this.length-u){const n=new m.CellData;for(let _=0;_<this.length-u-l;++_)this.setCell(u+_,this.loadCell(u+l+_,n));for(let _=this.length-l;_<this.length;++_)this.setCell(_,s)}else for(let n=u;n<this.length;++n)this.setCell(n,s);u&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,s),this.getWidth(u)!==0||this.hasContent(u)||this.setCellFromCodepoint(u,0,1,s)}replaceCells(u,l,s,n=!1){if(n)for(u&&this.getWidth(u-1)===2&&!this.isProtected(u-1)&&this.setCellFromCodepoint(u-1,0,1,s),l<this.length&&this.getWidth(l-1)===2&&!this.isProtected(l)&&this.setCellFromCodepoint(l,0,1,s);u<l&&u<this.length;)this.isProtected(u)||this.setCell(u,s),u++;else for(u&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,s),l<this.length&&this.getWidth(l-1)===2&&this.setCellFromCodepoint(l,0,1,s);u<l&&u<this.length;)this.setCell(u++,s)}resize(u,l){if(u===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const s=3*u;if(u>this.length){if(this._data.buffer.byteLength>=4*s)this._data=new Uint32Array(this._data.buffer,0,s);else{const n=new Uint32Array(s);n.set(this._data),this._data=n}for(let n=this.length;n<u;++n)this.setCell(n,l)}else{this._data=this._data.subarray(0,s);const n=Object.keys(this._combined);for(let C=0;C<n.length;C++){const w=parseInt(n[C],10);w>=u&&delete this._combined[w]}const _=Object.keys(this._extendedAttrs);for(let C=0;C<_.length;C++){const w=parseInt(_[C],10);w>=u&&delete this._extendedAttrs[w]}}return this.length=u,4*s*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const u=new Uint32Array(this._data.length);return u.set(this._data),this._data=u,1}return 0}fill(u,l=!1){if(l)for(let s=0;s<this.length;++s)this.isProtected(s)||this.setCell(s,u);else{this._combined={},this._extendedAttrs={};for(let s=0;s<this.length;++s)this.setCell(s,u)}}copyFrom(u){this.length!==u.length?this._data=new Uint32Array(u._data):this._data.set(u._data),this.length=u.length,this._combined={};for(const l in u._combined)this._combined[l]=u._combined[l];this._extendedAttrs={};for(const l in u._extendedAttrs)this._extendedAttrs[l]=u._extendedAttrs[l];this.isWrapped=u.isWrapped}clone(){const u=new E(0);u._data=new Uint32Array(this._data),u.length=this.length;for(const l in this._combined)u._combined[l]=this._combined[l];for(const l in this._extendedAttrs)u._extendedAttrs[l]=this._extendedAttrs[l];return u.isWrapped=this.isWrapped,u}getTrimmedLength(){for(let u=this.length-1;u>=0;--u)if(4194303&this._data[3*u+0])return u+(this._data[3*u+0]>>22);return 0}getNoBgTrimmedLength(){for(let u=this.length-1;u>=0;--u)if(4194303&this._data[3*u+0]||50331648&this._data[3*u+2])return u+(this._data[3*u+0]>>22);return 0}copyCellsFrom(u,l,s,n,_){const C=u._data;if(_)for(let k=n-1;k>=0;k--){for(let g=0;g<3;g++)this._data[3*(s+k)+g]=C[3*(l+k)+g];268435456&C[3*(l+k)+2]&&(this._extendedAttrs[s+k]=u._extendedAttrs[l+k])}else for(let k=0;k<n;k++){for(let g=0;g<3;g++)this._data[3*(s+k)+g]=C[3*(l+k)+g];268435456&C[3*(l+k)+2]&&(this._extendedAttrs[s+k]=u._extendedAttrs[l+k])}const w=Object.keys(u._combined);for(let k=0;k<w.length;k++){const g=parseInt(w[k],10);g>=l&&(this._combined[g-l+s]=u._combined[g])}}translateToString(u,l,s,n){l=l??0,s=s??this.length,u&&(s=Math.min(s,this.getTrimmedLength())),n&&(n.length=0);let _="";for(;l<s;){const C=this._data[3*l+0],w=2097151&C,k=2097152&C?this._combined[l]:w?(0,p.stringFromCodePoint)(w):h.WHITESPACE_CELL_CHAR;if(_+=k,n)for(let g=0;g<k.length;++g)n.push(l);l+=C>>22||1}return n&&n.push(l),_}}o.BufferLine=E},4841:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,f){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return f*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(y,o)=>{function c(f,m,h){if(m===f.length-1)return f[m].getTrimmedLength();const p=!f[m].hasContent(h-1)&&f[m].getWidth(h-1)===1,S=f[m+1].getWidth(0)===2;return p&&S?h-1:h}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(f,m,h,p,S){const E=[];for(let v=0;v<f.length-1;v++){let u=v,l=f.get(++u);if(!l.isWrapped)continue;const s=[f.get(v)];for(;u<f.length&&l.isWrapped;)s.push(l),l=f.get(++u);if(p>=v&&p<u){v+=s.length-1;continue}let n=0,_=c(s,n,m),C=1,w=0;for(;C<s.length;){const g=c(s,C,m),L=g-w,R=h-_,A=Math.min(L,R);s[n].copyCellsFrom(s[C],w,_,A,!1),_+=A,_===h&&(n++,_=0),w+=A,w===g&&(C++,w=0),_===0&&n!==0&&s[n-1].getWidth(h-1)===2&&(s[n].copyCellsFrom(s[n-1],h-1,_++,1,!1),s[n-1].setCell(h-1,S))}s[n].replaceCells(_,h,S);let k=0;for(let g=s.length-1;g>0&&(g>n||s[g].getTrimmedLength()===0);g--)k++;k>0&&(E.push(v+s.length-k),E.push(k)),v+=s.length-1}return E},o.reflowLargerCreateNewLayout=function(f,m){const h=[];let p=0,S=m[p],E=0;for(let v=0;v<f.length;v++)if(S===v){const u=m[++p];f.onDeleteEmitter.fire({index:v-E,amount:u}),v+=u-1,E+=u,S=m[++p]}else h.push(v);return{layout:h,countRemoved:E}},o.reflowLargerApplyNewLayout=function(f,m){const h=[];for(let p=0;p<m.length;p++)h.push(f.get(m[p]));for(let p=0;p<h.length;p++)f.set(p,h[p]);f.length=m.length},o.reflowSmallerGetNewLineLengths=function(f,m,h){const p=[],S=f.map((l,s)=>c(f,s,m)).reduce((l,s)=>l+s);let E=0,v=0,u=0;for(;u<S;){if(S-u<h){p.push(S-u);break}E+=h;const l=c(f,v,m);E>l&&(E-=l,v++);const s=f[v].getWidth(E-1)===2;s&&E--;const n=s?h-1:h;p.push(n),u+=n}return p},o.getWrappedLineTrimmedLength=c},5295:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const f=c(8460),m=c(844),h=c(9092);class p extends m.Disposable{constructor(E,v){super(),this._optionsService=E,this._bufferService=v,this._onBufferActivate=this.register(new f.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.resize(this._bufferService.cols,this._bufferService.rows))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",()=>this.setupTabStops()))}reset(){this._normal=new h.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new h.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(E){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(E),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(E,v){this._normal.resize(E,v),this._alt.resize(E,v),this.setupTabStops(E)}setupTabStops(E){this._normal.setupTabStops(E),this._alt.setupTabStops(E)}}o.BufferSet=p},511:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const f=c(482),m=c(643),h=c(3734);class p extends h.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new h.ExtendedAttrs,this.combinedData=""}static fromCharData(E){const v=new p;return v.setFromCharData(E),v}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,f.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(E){this.fg=E[m.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(E[m.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(E[m.CHAR_DATA_CHAR_INDEX].length===2){const u=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=u&&u<=56319){const l=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=l&&l<=57343?this.content=1024*(u-55296)+l-56320+65536|E[m.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=E[m.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[m.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=E[m.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[m.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=p},643:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const f=c(8460),m=c(844);class h{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=h._nextId++,this._onDispose=this.register(new f.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,m.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}o.Marker=h,h._nextId=1},7116:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.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:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(y,o)=>{var c,f,m;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,function(h){h.NUL="\0",h.SOH="",h.STX="",h.ETX="",h.EOT="",h.ENQ="",h.ACK="",h.BEL="\x07",h.BS="\b",h.HT=" ",h.LF=`
|
|
47
|
+
`,h.VT="\v",h.FF="\f",h.CR="\r",h.SO="",h.SI="",h.DLE="",h.DC1="",h.DC2="",h.DC3="",h.DC4="",h.NAK="",h.SYN="",h.ETB="",h.CAN="",h.EM="",h.SUB="",h.ESC="\x1B",h.FS="",h.GS="",h.RS="",h.US="",h.SP=" ",h.DEL=""}(c||(o.C0=c={})),function(h){h.PAD="",h.HOP="",h.BPH="",h.NBH="",h.IND="",h.NEL="
",h.SSA="",h.ESA="",h.HTS="",h.HTJ="",h.VTS="",h.PLD="",h.PLU="",h.RI="",h.SS2="",h.SS3="",h.DCS="",h.PU1="",h.PU2="",h.STS="",h.CCH="",h.MW="",h.SPA="",h.EPA="",h.SOS="",h.SGCI="",h.SCI="",h.CSI="",h.ST="",h.OSC="",h.PM="",h.APC=""}(f||(o.C1=f={})),function(h){h.ST=`${c.ESC}\\`}(m||(o.C1_ESCAPED=m={}))},7399:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const f=c(2584),m={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:["'",'"']};o.evaluateKeyboardEvent=function(h,p,S,E){const v={type:0,cancel:!1,key:void 0},u=(h.shiftKey?1:0)|(h.altKey?2:0)|(h.ctrlKey?4:0)|(h.metaKey?8:0);switch(h.keyCode){case 0:h.key==="UIKeyInputUpArrow"?v.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":h.key==="UIKeyInputLeftArrow"?v.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":h.key==="UIKeyInputRightArrow"?v.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":h.key==="UIKeyInputDownArrow"&&(v.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:v.key=h.ctrlKey?"\b":f.C0.DEL,h.altKey&&(v.key=f.C0.ESC+v.key);break;case 9:if(h.shiftKey){v.key=f.C0.ESC+"[Z";break}v.key=f.C0.HT,v.cancel=!0;break;case 13:v.key=h.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,v.cancel=!0;break;case 27:v.key=f.C0.ESC,h.altKey&&(v.key=f.C0.ESC+f.C0.ESC),v.cancel=!0;break;case 37:if(h.metaKey)break;u?(v.key=f.C0.ESC+"[1;"+(u+1)+"D",v.key===f.C0.ESC+"[1;3D"&&(v.key=f.C0.ESC+(S?"b":"[1;5D"))):v.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(h.metaKey)break;u?(v.key=f.C0.ESC+"[1;"+(u+1)+"C",v.key===f.C0.ESC+"[1;3C"&&(v.key=f.C0.ESC+(S?"f":"[1;5C"))):v.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(h.metaKey)break;u?(v.key=f.C0.ESC+"[1;"+(u+1)+"A",S||v.key!==f.C0.ESC+"[1;3A"||(v.key=f.C0.ESC+"[1;5A")):v.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(h.metaKey)break;u?(v.key=f.C0.ESC+"[1;"+(u+1)+"B",S||v.key!==f.C0.ESC+"[1;3B"||(v.key=f.C0.ESC+"[1;5B")):v.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:h.shiftKey||h.ctrlKey||(v.key=f.C0.ESC+"[2~");break;case 46:v.key=u?f.C0.ESC+"[3;"+(u+1)+"~":f.C0.ESC+"[3~";break;case 36:v.key=u?f.C0.ESC+"[1;"+(u+1)+"H":p?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:v.key=u?f.C0.ESC+"[1;"+(u+1)+"F":p?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:h.shiftKey?v.type=2:h.ctrlKey?v.key=f.C0.ESC+"[5;"+(u+1)+"~":v.key=f.C0.ESC+"[5~";break;case 34:h.shiftKey?v.type=3:h.ctrlKey?v.key=f.C0.ESC+"[6;"+(u+1)+"~":v.key=f.C0.ESC+"[6~";break;case 112:v.key=u?f.C0.ESC+"[1;"+(u+1)+"P":f.C0.ESC+"OP";break;case 113:v.key=u?f.C0.ESC+"[1;"+(u+1)+"Q":f.C0.ESC+"OQ";break;case 114:v.key=u?f.C0.ESC+"[1;"+(u+1)+"R":f.C0.ESC+"OR";break;case 115:v.key=u?f.C0.ESC+"[1;"+(u+1)+"S":f.C0.ESC+"OS";break;case 116:v.key=u?f.C0.ESC+"[15;"+(u+1)+"~":f.C0.ESC+"[15~";break;case 117:v.key=u?f.C0.ESC+"[17;"+(u+1)+"~":f.C0.ESC+"[17~";break;case 118:v.key=u?f.C0.ESC+"[18;"+(u+1)+"~":f.C0.ESC+"[18~";break;case 119:v.key=u?f.C0.ESC+"[19;"+(u+1)+"~":f.C0.ESC+"[19~";break;case 120:v.key=u?f.C0.ESC+"[20;"+(u+1)+"~":f.C0.ESC+"[20~";break;case 121:v.key=u?f.C0.ESC+"[21;"+(u+1)+"~":f.C0.ESC+"[21~";break;case 122:v.key=u?f.C0.ESC+"[23;"+(u+1)+"~":f.C0.ESC+"[23~";break;case 123:v.key=u?f.C0.ESC+"[24;"+(u+1)+"~":f.C0.ESC+"[24~";break;default:if(!h.ctrlKey||h.shiftKey||h.altKey||h.metaKey)if(S&&!E||!h.altKey||h.metaKey)!S||h.altKey||h.ctrlKey||h.shiftKey||!h.metaKey?h.key&&!h.ctrlKey&&!h.altKey&&!h.metaKey&&h.keyCode>=48&&h.key.length===1?v.key=h.key:h.key&&h.ctrlKey&&(h.key==="_"&&(v.key=f.C0.US),h.key==="@"&&(v.key=f.C0.NUL)):h.keyCode===65&&(v.type=1);else{const l=m[h.keyCode],s=l==null?void 0:l[h.shiftKey?1:0];if(s)v.key=f.C0.ESC+s;else if(h.keyCode>=65&&h.keyCode<=90){const n=h.ctrlKey?h.keyCode-64:h.keyCode+32;let _=String.fromCharCode(n);h.shiftKey&&(_=_.toUpperCase()),v.key=f.C0.ESC+_}else if(h.keyCode===32)v.key=f.C0.ESC+(h.ctrlKey?f.C0.NUL:" ");else if(h.key==="Dead"&&h.code.startsWith("Key")){let n=h.code.slice(3,4);h.shiftKey||(n=n.toLowerCase()),v.key=f.C0.ESC+n,v.cancel=!0}}else h.keyCode>=65&&h.keyCode<=90?v.key=String.fromCharCode(h.keyCode-64):h.keyCode===32?v.key=f.C0.NUL:h.keyCode>=51&&h.keyCode<=55?v.key=String.fromCharCode(h.keyCode-51+27):h.keyCode===56?v.key=f.C0.DEL:h.keyCode===219?v.key=f.C0.ESC:h.keyCode===220?v.key=f.C0.FS:h.keyCode===221&&(v.key=f.C0.GS)}return v}},482:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},o.utf32ToString=function(c,f=0,m=c.length){let h="";for(let p=f;p<m;++p){let S=c[p];S>65535?(S-=65536,h+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):h+=String.fromCharCode(S)}return h},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,f){const m=c.length;if(!m)return 0;let h=0,p=0;if(this._interim){const S=c.charCodeAt(p++);56320<=S&&S<=57343?f[h++]=1024*(this._interim-55296)+S-56320+65536:(f[h++]=this._interim,f[h++]=S),this._interim=0}for(let S=p;S<m;++S){const E=c.charCodeAt(S);if(55296<=E&&E<=56319){if(++S>=m)return this._interim=E,h;const v=c.charCodeAt(S);56320<=v&&v<=57343?f[h++]=1024*(E-55296)+v-56320+65536:(f[h++]=E,f[h++]=v)}else E!==65279&&(f[h++]=E)}return h}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,f){const m=c.length;if(!m)return 0;let h,p,S,E,v=0,u=0,l=0;if(this.interim[0]){let _=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let w,k=0;for(;(w=63&this.interim[++k])&&k<4;)C<<=6,C|=w;const g=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,L=g-k;for(;l<L;){if(l>=m)return 0;if(w=c[l++],(192&w)!=128){l--,_=!0;break}this.interim[k++]=w,C<<=6,C|=63&w}_||(g===2?C<128?l--:f[v++]=C:g===3?C<2048||C>=55296&&C<=57343||C===65279||(f[v++]=C):C<65536||C>1114111||(f[v++]=C)),this.interim.fill(0)}const s=m-4;let n=l;for(;n<m;){for(;!(!(n<s)||128&(h=c[n])||128&(p=c[n+1])||128&(S=c[n+2])||128&(E=c[n+3]));)f[v++]=h,f[v++]=p,f[v++]=S,f[v++]=E,n+=4;if(h=c[n++],h<128)f[v++]=h;else if((224&h)==192){if(n>=m)return this.interim[0]=h,v;if(p=c[n++],(192&p)!=128){n--;continue}if(u=(31&h)<<6|63&p,u<128){n--;continue}f[v++]=u}else if((240&h)==224){if(n>=m)return this.interim[0]=h,v;if(p=c[n++],(192&p)!=128){n--;continue}if(n>=m)return this.interim[0]=h,this.interim[1]=p,v;if(S=c[n++],(192&S)!=128){n--;continue}if(u=(15&h)<<12|(63&p)<<6|63&S,u<2048||u>=55296&&u<=57343||u===65279)continue;f[v++]=u}else if((248&h)==240){if(n>=m)return this.interim[0]=h,v;if(p=c[n++],(192&p)!=128){n--;continue}if(n>=m)return this.interim[0]=h,this.interim[1]=p,v;if(S=c[n++],(192&S)!=128){n--;continue}if(n>=m)return this.interim[0]=h,this.interim[1]=p,this.interim[2]=S,v;if(E=c[n++],(192&E)!=128){n--;continue}if(u=(7&h)<<18|(63&p)<<12|(63&S)<<6|63&E,u<65536||u>1114111)continue;f[v++]=u}}return v}}},225:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const f=c(1480),m=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],h=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;o.UnicodeV6=class{constructor(){if(this.version="6",!p){p=new Uint8Array(65536),p.fill(1),p[0]=0,p.fill(0,1,32),p.fill(0,127,160),p.fill(2,4352,4448),p[9001]=2,p[9002]=2,p.fill(2,11904,42192),p[12351]=1,p.fill(2,44032,55204),p.fill(2,63744,64256),p.fill(2,65040,65050),p.fill(2,65072,65136),p.fill(2,65280,65377),p.fill(2,65504,65511);for(let S=0;S<m.length;++S)p.fill(0,m[S][0],m[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?p[S]:function(E,v){let u,l=0,s=v.length-1;if(E<v[0][0]||E>v[s][1])return!1;for(;s>=l;)if(u=l+s>>1,E>v[u][1])l=u+1;else{if(!(E<v[u][0]))return!0;s=u-1}return!1}(S,h)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,E){let v=this.wcwidth(S),u=v===0&&E!==0;if(u){const l=f.UnicodeService.extractWidth(E);l===0?u=!1:l>v&&(v=l)}return f.UnicodeService.createPropertyValue(0,v,u)}}},5981:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const f=c(8460),m=c(844);class h extends m.Disposable{constructor(S){super(),this._action=S,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new f.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(S,E){if(E!==void 0&&this._syncCalls>E)return void(this._syncCalls=0);if(this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let v;for(this._isSyncWriting=!0;v=this._writeBuffer.shift();){this._action(v);const u=this._callbacks.shift();u&&u()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(S,E){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+=S.length,this._writeBuffer.push(S),this._callbacks.push(E),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(E)}_innerWrite(S=0,E=!0){const v=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const u=this._writeBuffer[this._bufferOffset],l=this._action(u,E);if(l){const n=_=>Date.now()-v>=12?setTimeout(()=>this._innerWrite(0,_)):this._innerWrite(v,_);return void l.catch(_=>(queueMicrotask(()=>{throw _}),Promise.resolve(!1))).then(n)}const s=this._callbacks[this._bufferOffset];if(s&&s(),this._bufferOffset++,this._pendingData-=u.length,Date.now()-v>=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()}}o.WriteBuffer=h},5941:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const c=/^([\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})$/,f=/^[\da-f]+$/;function m(h,p){const S=h.toString(16),E=S.length<2?"0"+S:S;switch(p){case 4:return S[0];case 8:return E;case 12:return(E+E).slice(0,3);default:return E+E}}o.parseColor=function(h){if(!h)return;let p=h.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const S=c.exec(p);if(S){const E=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/E*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/E*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/E*255)]}}else if(p.indexOf("#")===0&&(p=p.slice(1),f.exec(p)&&[3,6,9,12].includes(p.length))){const S=p.length/3,E=[0,0,0];for(let v=0;v<3;++v){const u=parseInt(p.slice(S*v,S*v+S),16);E[v]=S===1?u<<4:S===2?u:S===3?u>>4:u>>8}return E}},o.toRgbString=function(h,p=16){const[S,E,v]=h;return`rgb:${m(S,p)}/${m(E,p)}/${m(v,p)}`}},5770:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const f=c(482),m=c(8742),h=c(5770),p=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=p,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=p}registerHandler(E,v){this._handlers[E]===void 0&&(this._handlers[E]=[]);const u=this._handlers[E];return u.push(v),{dispose:()=>{const l=u.indexOf(v);l!==-1&&u.splice(l,1)}}}clearHandler(E){this._handlers[E]&&delete this._handlers[E]}setHandlerFallback(E){this._handlerFb=E}reset(){if(this._active.length)for(let E=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;E>=0;--E)this._active[E].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(E,v){if(this.reset(),this._ident=E,this._active=this._handlers[E]||p,this._active.length)for(let u=this._active.length-1;u>=0;u--)this._active[u].hook(v);else this._handlerFb(this._ident,"HOOK",v)}put(E,v,u){if(this._active.length)for(let l=this._active.length-1;l>=0;l--)this._active[l].put(E,v,u);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(E,v,u))}unhook(E,v=!0){if(this._active.length){let u=!1,l=this._active.length-1,s=!1;if(this._stack.paused&&(l=this._stack.loopPosition-1,u=v,s=this._stack.fallThrough,this._stack.paused=!1),!s&&u===!1){for(;l>=0&&(u=this._active[l].unhook(E),u!==!0);l--)if(u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!1,u;l--}for(;l>=0;l--)if(u=this._active[l].unhook(!1),u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=l,this._stack.fallThrough=!0,u}else this._handlerFb(this._ident,"UNHOOK",E);this._active=p,this._ident=0}};const S=new m.Params;S.addParam(0),o.DcsHandler=class{constructor(E){this._handler=E,this._data="",this._params=S,this._hitLimit=!1}hook(E){this._params=E.length>1||E.params[0]?E.clone():S,this._data="",this._hitLimit=!1}put(E,v,u){this._hitLimit||(this._data+=(0,f.utf32ToString)(E,v,u),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(E){let v=!1;if(this._hitLimit)v=!1;else if(E&&(v=this._handler(this._data,this._params),v instanceof Promise))return v.then(u=>(this._params=S,this._data="",this._hitLimit=!1,u));return this._params=S,this._data="",this._hitLimit=!1,v}}},2015:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const f=c(844),m=c(8742),h=c(6242),p=c(6351);class S{constructor(l){this.table=new Uint8Array(l)}setDefault(l,s){this.table.fill(l<<4|s)}add(l,s,n,_){this.table[s<<8|l]=n<<4|_}addMany(l,s,n,_){for(let C=0;C<l.length;C++)this.table[s<<8|l[C]]=n<<4|_}}o.TransitionTable=S;const E=160;o.VT500_TRANSITION_TABLE=function(){const u=new S(4095),l=Array.apply(null,Array(256)).map((k,g)=>g),s=(k,g)=>l.slice(k,g),n=s(32,127),_=s(0,24);_.push(25),_.push.apply(_,s(28,32));const C=s(0,14);let w;for(w in u.setDefault(1,0),u.addMany(n,0,2,0),C)u.addMany([24,26,153,154],w,3,0),u.addMany(s(128,144),w,3,0),u.addMany(s(144,152),w,3,0),u.add(156,w,0,0),u.add(27,w,11,1),u.add(157,w,4,8),u.addMany([152,158,159],w,0,7),u.add(155,w,11,3),u.add(144,w,11,9);return u.addMany(_,0,3,0),u.addMany(_,1,3,1),u.add(127,1,0,1),u.addMany(_,8,0,8),u.addMany(_,3,3,3),u.add(127,3,0,3),u.addMany(_,4,3,4),u.add(127,4,0,4),u.addMany(_,6,3,6),u.addMany(_,5,3,5),u.add(127,5,0,5),u.addMany(_,2,3,2),u.add(127,2,0,2),u.add(93,1,4,8),u.addMany(n,8,5,8),u.add(127,8,5,8),u.addMany([156,27,24,26,7],8,6,0),u.addMany(s(28,32),8,0,8),u.addMany([88,94,95],1,0,7),u.addMany(n,7,0,7),u.addMany(_,7,0,7),u.add(156,7,0,0),u.add(127,7,0,7),u.add(91,1,11,3),u.addMany(s(64,127),3,7,0),u.addMany(s(48,60),3,8,4),u.addMany([60,61,62,63],3,9,4),u.addMany(s(48,60),4,8,4),u.addMany(s(64,127),4,7,0),u.addMany([60,61,62,63],4,0,6),u.addMany(s(32,64),6,0,6),u.add(127,6,0,6),u.addMany(s(64,127),6,0,0),u.addMany(s(32,48),3,9,5),u.addMany(s(32,48),5,9,5),u.addMany(s(48,64),5,0,6),u.addMany(s(64,127),5,7,0),u.addMany(s(32,48),4,9,5),u.addMany(s(32,48),1,9,2),u.addMany(s(32,48),2,9,2),u.addMany(s(48,127),2,10,0),u.addMany(s(48,80),1,10,0),u.addMany(s(81,88),1,10,0),u.addMany([89,90,92],1,10,0),u.addMany(s(96,127),1,10,0),u.add(80,1,11,9),u.addMany(_,9,0,9),u.add(127,9,0,9),u.addMany(s(28,32),9,0,9),u.addMany(s(32,48),9,9,12),u.addMany(s(48,60),9,8,10),u.addMany([60,61,62,63],9,9,10),u.addMany(_,11,0,11),u.addMany(s(32,128),11,0,11),u.addMany(s(28,32),11,0,11),u.addMany(_,10,0,10),u.add(127,10,0,10),u.addMany(s(28,32),10,0,10),u.addMany(s(48,60),10,8,10),u.addMany([60,61,62,63],10,0,11),u.addMany(s(32,48),10,9,12),u.addMany(_,12,0,12),u.add(127,12,0,12),u.addMany(s(28,32),12,0,12),u.addMany(s(32,48),12,9,12),u.addMany(s(48,64),12,0,11),u.addMany(s(64,127),12,12,13),u.addMany(s(64,127),10,12,13),u.addMany(s(64,127),9,12,13),u.addMany(_,13,13,13),u.addMany(n,13,13,13),u.add(127,13,0,13),u.addMany([27,156,24,26],13,14,0),u.add(E,0,2,0),u.add(E,8,5,8),u.add(E,6,0,6),u.add(E,11,0,11),u.add(E,13,13,13),u}();class v extends f.Disposable{constructor(l=o.VT500_TRANSITION_TABLE){super(),this._transitions=l,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new m.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(s,n,_)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,n)=>{},this._escHandlerFb=s=>{},this._errorHandlerFb=s=>s,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,f.toDisposable)(()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)})),this._oscParser=this.register(new h.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(l,s=[64,126]){let n=0;if(l.prefix){if(l.prefix.length>1)throw new Error("only one byte as prefix supported");if(n=l.prefix.charCodeAt(0),n&&60>n||n>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(l.intermediates){if(l.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<l.intermediates.length;++C){const w=l.intermediates.charCodeAt(C);if(32>w||w>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");n<<=8,n|=w}}if(l.final.length!==1)throw new Error("final must be a single byte");const _=l.final.charCodeAt(0);if(s[0]>_||_>s[1])throw new Error(`final must be in range ${s[0]} .. ${s[1]}`);return n<<=8,n|=_,n}identToString(l){const s=[];for(;l;)s.push(String.fromCharCode(255&l)),l>>=8;return s.reverse().join("")}setPrintHandler(l){this._printHandler=l}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(l,s){const n=this._identifier(l,[48,126]);this._escHandlers[n]===void 0&&(this._escHandlers[n]=[]);const _=this._escHandlers[n];return _.push(s),{dispose:()=>{const C=_.indexOf(s);C!==-1&&_.splice(C,1)}}}clearEscHandler(l){this._escHandlers[this._identifier(l,[48,126])]&&delete this._escHandlers[this._identifier(l,[48,126])]}setEscHandlerFallback(l){this._escHandlerFb=l}setExecuteHandler(l,s){this._executeHandlers[l.charCodeAt(0)]=s}clearExecuteHandler(l){this._executeHandlers[l.charCodeAt(0)]&&delete this._executeHandlers[l.charCodeAt(0)]}setExecuteHandlerFallback(l){this._executeHandlerFb=l}registerCsiHandler(l,s){const n=this._identifier(l);this._csiHandlers[n]===void 0&&(this._csiHandlers[n]=[]);const _=this._csiHandlers[n];return _.push(s),{dispose:()=>{const C=_.indexOf(s);C!==-1&&_.splice(C,1)}}}clearCsiHandler(l){this._csiHandlers[this._identifier(l)]&&delete this._csiHandlers[this._identifier(l)]}setCsiHandlerFallback(l){this._csiHandlerFb=l}registerDcsHandler(l,s){return this._dcsParser.registerHandler(this._identifier(l),s)}clearDcsHandler(l){this._dcsParser.clearHandler(this._identifier(l))}setDcsHandlerFallback(l){this._dcsParser.setHandlerFallback(l)}registerOscHandler(l,s){return this._oscParser.registerHandler(l,s)}clearOscHandler(l){this._oscParser.clearHandler(l)}setOscHandlerFallback(l){this._oscParser.setHandlerFallback(l)}setErrorHandler(l){this._errorHandler=l}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(l,s,n,_,C){this._parseStack.state=l,this._parseStack.handlers=s,this._parseStack.handlerPos=n,this._parseStack.transition=_,this._parseStack.chunkPos=C}parse(l,s,n){let _,C=0,w=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(n===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const g=this._parseStack.handlers;let L=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(n===!1&&L>-1){for(;L>=0&&(_=g[L](this._params),_!==!0);L--)if(_ instanceof Promise)return this._parseStack.handlerPos=L,_}this._parseStack.handlers=[];break;case 4:if(n===!1&&L>-1){for(;L>=0&&(_=g[L](),_!==!0);L--)if(_ instanceof Promise)return this._parseStack.handlerPos=L,_}this._parseStack.handlers=[];break;case 6:if(C=l[this._parseStack.chunkPos],_=this._dcsParser.unhook(C!==24&&C!==26,n),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=l[this._parseStack.chunkPos],_=this._oscParser.end(C!==24&&C!==26,n),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,k=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let g=k;g<s;++g){switch(C=l[g],w=this._transitions.table[this.currentState<<8|(C<160?C:E)],w>>4){case 2:for(let T=g+1;;++T){if(T>=s||(C=l[T])<32||C>126&&C<E){this._printHandler(l,g,T),g=T-1;break}if(++T>=s||(C=l[T])<32||C>126&&C<E){this._printHandler(l,g,T),g=T-1;break}if(++T>=s||(C=l[T])<32||C>126&&C<E){this._printHandler(l,g,T),g=T-1;break}if(++T>=s||(C=l[T])<32||C>126&&C<E){this._printHandler(l,g,T),g=T-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:g,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const L=this._csiHandlers[this._collect<<8|C];let R=L?L.length-1:-1;for(;R>=0&&(_=L[R](this._params),_!==!0);R--)if(_ instanceof Promise)return this._preserveStack(3,L,R,w,g),_;R<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(++g<s&&(C=l[g])>47&&C<60);g--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const A=this._escHandlers[this._collect<<8|C];let M=A?A.length-1:-1;for(;M>=0&&(_=A[M](),_!==!0);M--)if(_ instanceof Promise)return this._preserveStack(4,A,M,w,g),_;M<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 T=g+1;;++T)if(T>=s||(C=l[T])===24||C===26||C===27||C>127&&C<E){this._dcsParser.put(l,g,T),g=T-1;break}break;case 14:if(_=this._dcsParser.unhook(C!==24&&C!==26),_)return this._preserveStack(6,[],0,w,g),_;C===27&&(w|=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 T=g+1;;T++)if(T>=s||(C=l[T])<32||C>127&&C<E){this._oscParser.put(l,g,T),g=T-1;break}break;case 6:if(_=this._oscParser.end(C!==24&&C!==26),_)return this._preserveStack(5,[],0,w,g),_;C===27&&(w|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&w}}}o.EscapeSequenceParser=v},6242:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const f=c(5770),m=c(482),h=[];o.OscParser=class{constructor(){this._state=0,this._active=h,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(p,S){this._handlers[p]===void 0&&(this._handlers[p]=[]);const E=this._handlers[p];return E.push(S),{dispose:()=>{const v=E.indexOf(S);v!==-1&&E.splice(v,1)}}}clearHandler(p){this._handlers[p]&&delete this._handlers[p]}setHandlerFallback(p){this._handlerFb=p}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=h}reset(){if(this._state===2)for(let p=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;p>=0;--p)this._active[p].end(!1);this._stack.paused=!1,this._active=h,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||h,this._active.length)for(let p=this._active.length-1;p>=0;p--)this._active[p].start();else this._handlerFb(this._id,"START")}_put(p,S,E){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(p,S,E);else this._handlerFb(this._id,"PUT",(0,m.utf32ToString)(p,S,E))}start(){this.reset(),this._state=1}put(p,S,E){if(this._state!==3){if(this._state===1)for(;S<E;){const v=p[S++];if(v===59){this._state=2,this._start();break}if(v<48||57<v)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+v-48}this._state===2&&E-S>0&&this._put(p,S,E)}}end(p,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let E=!1,v=this._active.length-1,u=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,E=S,u=this._stack.fallThrough,this._stack.paused=!1),!u&&E===!1){for(;v>=0&&(E=this._active[v].end(p),E!==!0);v--)if(E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,E;v--}for(;v>=0;v--)if(E=this._active[v].end(!1),E instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,E}else this._handlerFb(this._id,"END",p);this._active=h,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,S,E){this._hitLimit||(this._data+=(0,m.utf32ToString)(p,S,E),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(p){let S=!1;if(this._hitLimit)S=!1;else if(p&&(S=this._handler(this._data),S instanceof Promise))return S.then(E=>(this._data="",this._hitLimit=!1,E));return this._data="",this._hitLimit=!1,S}}},8742:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const c=2147483647;class f{static fromArray(h){const p=new f;if(!h.length)return p;for(let S=Array.isArray(h[0])?1:0;S<h.length;++S){const E=h[S];if(Array.isArray(E))for(let v=0;v<E.length;++v)p.addSubParam(E[v]);else p.addParam(E)}return p}constructor(h=32,p=32){if(this.maxLength=h,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(h),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(h),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const h=new f(this.maxLength,this.maxSubParamsLength);return h.params.set(this.params),h.length=this.length,h._subParams.set(this._subParams),h._subParamsLength=this._subParamsLength,h._subParamsIdx.set(this._subParamsIdx),h._rejectDigits=this._rejectDigits,h._rejectSubDigits=this._rejectSubDigits,h._digitIsSub=this._digitIsSub,h}toArray(){const h=[];for(let p=0;p<this.length;++p){h.push(this.params[p]);const S=this._subParamsIdx[p]>>8,E=255&this._subParamsIdx[p];E-S>0&&h.push(Array.prototype.slice.call(this._subParams,S,E))}return h}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(h){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=h>c?c:h}}addSubParam(h){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(h<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=h>c?c:h,this._subParamsIdx[this.length-1]++}}hasSubParams(h){return(255&this._subParamsIdx[h])-(this._subParamsIdx[h]>>8)>0}getSubParams(h){const p=this._subParamsIdx[h]>>8,S=255&this._subParamsIdx[h];return S-p>0?this._subParams.subarray(p,S):null}getSubParamsAll(){const h={};for(let p=0;p<this.length;++p){const S=this._subParamsIdx[p]>>8,E=255&this._subParamsIdx[p];E-S>0&&(h[p]=this._subParams.slice(S,E))}return h}addDigit(h){let p;if(this._rejectDigits||!(p=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,E=S[p-1];S[p-1]=~E?Math.min(10*E+h,c):h}}o.Params=f},5741:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,f){const m={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(m),f.dispose=()=>this._wrappedAddonDispose(m),f.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let f=-1;for(let m=0;m<this._addons.length;m++)if(this._addons[m]===c){f=m;break}if(f===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(f,1)}}},8771:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const f=c(3785),m=c(511);o.BufferApiView=class{constructor(h,p){this._buffer=h,this.type=p}init(h){return this._buffer=h,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(h){const p=this._buffer.lines.get(h);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new m.CellData}}},3785:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const f=c(511);o.BufferLineApiView=class{constructor(m){this._line=m}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(m,h){if(!(m<0||m>=this._line.length))return h?(this._line.loadCell(m,h),h):this._line.loadCell(m,new f.CellData)}translateToString(m,h,p){return this._line.translateToString(m,h,p)}}},8285:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const f=c(8771),m=c(8460),h=c(844);class p extends h.Disposable{constructor(E){super(),this._core=E,this._onBufferChange=this.register(new m.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new f.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new f.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)}}o.BufferNamespaceApi=p},7975:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,f){return this._core.registerCsiHandler(c,m=>f(m.toArray()))}addCsiHandler(c,f){return this.registerCsiHandler(c,f)}registerDcsHandler(c,f){return this._core.registerDcsHandler(c,(m,h)=>f(m,h.toArray()))}addDcsHandler(c,f){return this.registerDcsHandler(c,f)}registerEscHandler(c,f){return this._core.registerEscHandler(c,f)}addEscHandler(c,f){return this.registerEscHandler(c,f)}registerOscHandler(c,f){return this._core.registerOscHandler(c,f)}addOscHandler(c,f){return this.registerOscHandler(c,f)}}},7090:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(y,o,c){var f=this&&this.__decorate||function(u,l,s,n){var _,C=arguments.length,w=C<3?l:n===null?n=Object.getOwnPropertyDescriptor(l,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(u,l,s,n);else for(var k=u.length-1;k>=0;k--)(_=u[k])&&(w=(C<3?_(w):C>3?_(l,s,w):_(l,s))||w);return C>3&&w&&Object.defineProperty(l,s,w),w},m=this&&this.__param||function(u,l){return function(s,n){l(s,n,u)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const h=c(8460),p=c(844),S=c(5295),E=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let v=o.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(u){super(),this.isUserScrolling=!1,this._onResize=this.register(new h.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new h.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(u.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(u.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(u,this))}resize(u,l){this.cols=u,this.rows=l,this.buffers.resize(u,l),this._onResize.fire({cols:u,rows:l})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(u,l=!1){const s=this.buffer;let n;n=this._cachedBlankLine,n&&n.length===this.cols&&n.getFg(0)===u.fg&&n.getBg(0)===u.bg||(n=s.getBlankLine(u,l),this._cachedBlankLine=n),n.isWrapped=l;const _=s.ybase+s.scrollTop,C=s.ybase+s.scrollBottom;if(s.scrollTop===0){const w=s.lines.isFull;C===s.lines.length-1?w?s.lines.recycle().copyFrom(n):s.lines.push(n.clone()):s.lines.splice(C+1,0,n.clone()),w?this.isUserScrolling&&(s.ydisp=Math.max(s.ydisp-1,0)):(s.ybase++,this.isUserScrolling||s.ydisp++)}else{const w=C-_+1;s.lines.shiftElements(_+1,w-1,-1),s.lines.set(C,n.clone())}this.isUserScrolling||(s.ydisp=s.ybase),this._onScroll.fire(s.ydisp)}scrollLines(u,l,s){const n=this.buffer;if(u<0){if(n.ydisp===0)return;this.isUserScrolling=!0}else u+n.ydisp>=n.ybase&&(this.isUserScrolling=!1);const _=n.ydisp;n.ydisp=Math.max(Math.min(n.ydisp+u,n.ybase),0),_!==n.ydisp&&(l||this._onScroll.fire(n.ydisp))}};o.BufferService=v=f([m(0,E.IOptionsService)],v)},7994:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,f){this._charsets[c]=f,this.glevel===c&&(this.charset=f)}}},1753:function(y,o,c){var f=this&&this.__decorate||function(n,_,C,w){var k,g=arguments.length,L=g<3?_:w===null?w=Object.getOwnPropertyDescriptor(_,C):w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(n,_,C,w);else for(var R=n.length-1;R>=0;R--)(k=n[R])&&(L=(g<3?k(L):g>3?k(_,C,L):k(_,C))||L);return g>3&&L&&Object.defineProperty(_,C,L),L},m=this&&this.__param||function(n,_){return function(C,w){_(C,w,n)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const h=c(2585),p=c(8460),S=c(844),E={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:n=>n.button!==4&&n.action===1&&(n.ctrl=!1,n.alt=!1,n.shift=!1,!0)},VT200:{events:19,restrict:n=>n.action!==32},DRAG:{events:23,restrict:n=>n.action!==32||n.button!==3},ANY:{events:31,restrict:n=>!0}};function v(n,_){let C=(n.ctrl?16:0)|(n.shift?4:0)|(n.alt?8:0);return n.button===4?(C|=64,C|=n.action):(C|=3&n.button,4&n.button&&(C|=64),8&n.button&&(C|=128),n.action===32?C|=32:n.action!==0||_||(C|=3)),C}const u=String.fromCharCode,l={DEFAULT:n=>{const _=[v(n,!1)+32,n.col+32,n.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${u(_[0])}${u(_[1])}${u(_[2])}`},SGR:n=>{const _=n.action===0&&n.button!==4?"m":"M";return`\x1B[<${v(n,!0)};${n.col};${n.row}${_}`},SGR_PIXELS:n=>{const _=n.action===0&&n.button!==4?"m":"M";return`\x1B[<${v(n,!0)};${n.x};${n.y}${_}`}};let s=o.CoreMouseService=class extends S.Disposable{constructor(n,_){super(),this._bufferService=n,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(E))this.addProtocol(C,E[C]);for(const C of Object.keys(l))this.addEncoding(C,l[C]);this.reset()}addProtocol(n,_){this._protocols[n]=_}addEncoding(n,_){this._encodings[n]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(n){if(!this._protocols[n])throw new Error(`unknown protocol "${n}"`);this._activeProtocol=n,this._onProtocolChange.fire(this._protocols[n].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(n){if(!this._encodings[n])throw new Error(`unknown encoding "${n}"`);this._activeEncoding=n}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(n){if(n.col<0||n.col>=this._bufferService.cols||n.row<0||n.row>=this._bufferService.rows||n.button===4&&n.action===32||n.button===3&&n.action!==32||n.button!==4&&(n.action===2||n.action===3)||(n.col++,n.row++,n.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,n,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(n))return!1;const _=this._encodings[this._activeEncoding](n);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=n,!0}explainEvents(n){return{down:!!(1&n),up:!!(2&n),drag:!!(4&n),move:!!(8&n),wheel:!!(16&n)}}_equalEvents(n,_,C){if(C){if(n.x!==_.x||n.y!==_.y)return!1}else if(n.col!==_.col||n.row!==_.row)return!1;return n.button===_.button&&n.action===_.action&&n.ctrl===_.ctrl&&n.alt===_.alt&&n.shift===_.shift}};o.CoreMouseService=s=f([m(0,h.IBufferService),m(1,h.ICoreService)],s)},6975:function(y,o,c){var f=this&&this.__decorate||function(s,n,_,C){var w,k=arguments.length,g=k<3?n:C===null?C=Object.getOwnPropertyDescriptor(n,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(s,n,_,C);else for(var L=s.length-1;L>=0;L--)(w=s[L])&&(g=(k<3?w(g):k>3?w(n,_,g):w(n,_))||g);return k>3&&g&&Object.defineProperty(n,_,g),g},m=this&&this.__param||function(s,n){return function(_,C){n(_,C,s)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const h=c(1439),p=c(8460),S=c(844),E=c(2585),v=Object.freeze({insertMode:!1}),u=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let l=o.CoreService=class extends S.Disposable{constructor(s,n,_){super(),this._bufferService=s,this._logService=n,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(u)}reset(){this.modes=(0,h.clone)(v),this.decPrivateModes=(0,h.clone)(u)}triggerDataEvent(s,n=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;n&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),n&&this._onUserInput.fire(),this._logService.debug(`sending data "${s}"`,()=>s.split("").map(C=>C.charCodeAt(0))),this._onData.fire(s)}triggerBinaryEvent(s){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${s}"`,()=>s.split("").map(n=>n.charCodeAt(0))),this._onBinary.fire(s))}};o.CoreService=l=f([m(0,E.IBufferService),m(1,E.ILogService),m(2,E.IOptionsService)],l)},9074:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const f=c(8055),m=c(8460),h=c(844),p=c(6106);let S=0,E=0;class v extends h.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new p.SortedList(s=>s==null?void 0:s.marker.line),this._onDecorationRegistered=this.register(new m.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new m.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,h.toDisposable)(()=>this.reset()))}registerDecoration(s){if(s.marker.isDisposed)return;const n=new u(s);if(n){const _=n.marker.onDispose(()=>n.dispose());n.onDispose(()=>{n&&(this._decorations.delete(n)&&this._onDecorationRemoved.fire(n),_.dispose())}),this._decorations.insert(n),this._onDecorationRegistered.fire(n)}return n}reset(){for(const s of this._decorations.values())s.dispose();this._decorations.clear()}*getDecorationsAtCell(s,n,_){let C=0,w=0;for(const k of this._decorations.getKeyIterator(n))C=k.options.x??0,w=C+(k.options.width??1),s>=C&&s<w&&(!_||(k.options.layer??"bottom")===_)&&(yield k)}forEachDecorationAtCell(s,n,_,C){this._decorations.forEachByKey(n,w=>{S=w.options.x??0,E=S+(w.options.width??1),s>=S&&s<E&&(!_||(w.options.layer??"bottom")===_)&&C(w)})}}o.DecorationService=v;class u extends h.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=f.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=f.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(s){super(),this.options=s,this.onRenderEmitter=this.register(new m.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new m.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=s.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const f=c(2585),m=c(8343);class h{constructor(...S){this._entries=new Map;for(const[E,v]of S)this.set(E,v)}set(S,E){const v=this._entries.get(S);return this._entries.set(S,E),v}forEach(S){for(const[E,v]of this._entries.entries())S(E,v)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}o.ServiceCollection=h,o.InstantiationService=class{constructor(){this._services=new h,this._services.set(f.IInstantiationService,this)}setService(p,S){this._services.set(p,S)}getService(p){return this._services.get(p)}createInstance(p,...S){const E=(0,m.getServiceDependencies)(p).sort((l,s)=>l.index-s.index),v=[];for(const l of E){const s=this._services.get(l.id);if(!s)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${l.id}.`);v.push(s)}const u=E.length>0?E[0].index:S.length;if(S.length!==u)throw new Error(`[createInstance] First service dependency of ${p.name} at position ${u+1} conflicts with ${S.length} static arguments`);return new p(...S,...v)}}},7866:function(y,o,c){var f=this&&this.__decorate||function(u,l,s,n){var _,C=arguments.length,w=C<3?l:n===null?n=Object.getOwnPropertyDescriptor(l,s):n;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(u,l,s,n);else for(var k=u.length-1;k>=0;k--)(_=u[k])&&(w=(C<3?_(w):C>3?_(l,s,w):_(l,s))||w);return C>3&&w&&Object.defineProperty(l,s,w),w},m=this&&this.__param||function(u,l){return function(s,n){l(s,n,u)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const h=c(844),p=c(2585),S={trace:p.LogLevelEnum.TRACE,debug:p.LogLevelEnum.DEBUG,info:p.LogLevelEnum.INFO,warn:p.LogLevelEnum.WARN,error:p.LogLevelEnum.ERROR,off:p.LogLevelEnum.OFF};let E,v=o.LogService=class extends h.Disposable{get logLevel(){return this._logLevel}constructor(u){super(),this._optionsService=u,this._logLevel=p.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),E=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(u){for(let l=0;l<u.length;l++)typeof u[l]=="function"&&(u[l]=u[l]())}_log(u,l,s){this._evalLazyOptionalParams(s),u.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+l,...s)}trace(u,...l){var s;this._logLevel<=p.LogLevelEnum.TRACE&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.trace.bind(this._optionsService.options.logger))??console.log,u,l)}debug(u,...l){var s;this._logLevel<=p.LogLevelEnum.DEBUG&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.debug.bind(this._optionsService.options.logger))??console.log,u,l)}info(u,...l){var s;this._logLevel<=p.LogLevelEnum.INFO&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.info.bind(this._optionsService.options.logger))??console.info,u,l)}warn(u,...l){var s;this._logLevel<=p.LogLevelEnum.WARN&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.warn.bind(this._optionsService.options.logger))??console.warn,u,l)}error(u,...l){var s;this._logLevel<=p.LogLevelEnum.ERROR&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.error.bind(this._optionsService.options.logger))??console.error,u,l)}};o.LogService=v=f([m(0,p.IOptionsService)],v),o.setTraceLogger=function(u){E=u},o.traceCall=function(u,l,s){if(typeof s.value!="function")throw new Error("not supported");const n=s.value;s.value=function(..._){if(E.logLevel!==p.LogLevelEnum.TRACE)return n.apply(this,_);E.trace(`GlyphRenderer#${n.name}(${_.map(w=>JSON.stringify(w)).join(", ")})`);const C=n.apply(this,_);return E.trace(`GlyphRenderer#${n.name} return`,C),C}}},7302:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const f=c(8460),m=c(844),h=c(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:h.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const p=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends m.Disposable{constructor(v){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const u={...o.DEFAULT_OPTIONS};for(const l in v)if(l in u)try{const s=v[l];u[l]=this._sanitizeAndValidateOption(l,s)}catch(s){console.error(s)}this.rawOptions=u,this.options={...u},this._setupOptions(),this.register((0,m.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(v,u){return this.onOptionChange(l=>{l===v&&u(this.rawOptions[v])})}onMultipleOptionChange(v,u){return this.onOptionChange(l=>{v.indexOf(l)!==-1&&u()})}_setupOptions(){const v=l=>{if(!(l in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);return this.rawOptions[l]},u=(l,s)=>{if(!(l in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${l}"`);s=this._sanitizeAndValidateOption(l,s),this.rawOptions[l]!==s&&(this.rawOptions[l]=s,this._onOptionChange.fire(l))};for(const l in this.rawOptions){const s={get:v.bind(this,l),set:u.bind(this,l)};Object.defineProperty(this.options,l,s)}}_sanitizeAndValidateOption(v,u){switch(v){case"cursorStyle":if(u||(u=o.DEFAULT_OPTIONS[v]),!function(l){return l==="block"||l==="underline"||l==="bar"}(u))throw new Error(`"${u}" is not a valid value for ${v}`);break;case"wordSeparator":u||(u=o.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof u=="number"&&1<=u&&u<=1e3)break;u=p.includes(u)?u:o.DEFAULT_OPTIONS[v];break;case"cursorWidth":u=Math.floor(u);case"lineHeight":case"tabStopWidth":if(u<1)throw new Error(`${v} cannot be less than 1, value: ${u}`);break;case"minimumContrastRatio":u=Math.max(1,Math.min(21,Math.round(10*u)/10));break;case"scrollback":if((u=Math.min(u,4294967295))<0)throw new Error(`${v} cannot be less than 0, value: ${u}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(u<=0)throw new Error(`${v} cannot be less than or equal to 0, value: ${u}`);break;case"rows":case"cols":if(!u&&u!==0)throw new Error(`${v} must be numeric, value: ${u}`);break;case"windowsPty":u=u??{}}return u}}o.OptionsService=S},2660:function(y,o,c){var f=this&&this.__decorate||function(S,E,v,u){var l,s=arguments.length,n=s<3?E:u===null?u=Object.getOwnPropertyDescriptor(E,v):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(S,E,v,u);else for(var _=S.length-1;_>=0;_--)(l=S[_])&&(n=(s<3?l(n):s>3?l(E,v,n):l(E,v))||n);return s>3&&n&&Object.defineProperty(E,v,n),n},m=this&&this.__param||function(S,E){return function(v,u){E(v,u,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const h=c(2585);let p=o.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const E=this._bufferService.buffer;if(S.id===void 0){const _=E.addMarker(E.ybase+E.y),C={data:S,id:this._nextId++,lines:[_]};return _.onDispose(()=>this._removeMarkerFromLink(C,_)),this._dataByLinkId.set(C.id,C),C.id}const v=S,u=this._getEntryIdKey(v),l=this._entriesWithId.get(u);if(l)return this.addLineToLink(l.id,E.ybase+E.y),l.id;const s=E.addMarker(E.ybase+E.y),n={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(n,s)),this._entriesWithId.set(n.key,n),this._dataByLinkId.set(n.id,n),n.id}addLineToLink(S,E){const v=this._dataByLinkId.get(S);if(v&&v.lines.every(u=>u.line!==E)){const u=this._bufferService.buffer.addMarker(E);v.lines.push(u),u.onDispose(()=>this._removeMarkerFromLink(v,u))}}getLinkData(S){var E;return(E=this._dataByLinkId.get(S))==null?void 0:E.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,E){const v=S.lines.indexOf(E);v!==-1&&(S.lines.splice(v,1),S.lines.length===0&&(S.data.id!==void 0&&this._entriesWithId.delete(S.key),this._dataByLinkId.delete(S.id)))}};o.OscLinkService=p=f([m(0,h.IBufferService)],p)},8343:(y,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",f="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(m){return m[f]||[]},o.createDecorator=function(m){if(o.serviceRegistry.has(m))return o.serviceRegistry.get(m);const h=function(p,S,E){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,u,l){u[c]===u?u[f].push({id:v,index:l}):(u[f]=[{id:v,index:l}],u[c]=u)})(h,p,E)};return h.toString=()=>m,o.serviceRegistry.set(m,h),h}},2585:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const f=c(8343);var m;o.IBufferService=(0,f.createDecorator)("BufferService"),o.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),o.ICoreService=(0,f.createDecorator)("CoreService"),o.ICharsetService=(0,f.createDecorator)("CharsetService"),o.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(h){h[h.TRACE=0]="TRACE",h[h.DEBUG=1]="DEBUG",h[h.INFO=2]="INFO",h[h.WARN=3]="WARN",h[h.ERROR=4]="ERROR",h[h.OFF=5]="OFF"}(m||(o.LogLevelEnum=m={})),o.ILogService=(0,f.createDecorator)("LogService"),o.IOptionsService=(0,f.createDecorator)("OptionsService"),o.IOscLinkService=(0,f.createDecorator)("OscLinkService"),o.IUnicodeService=(0,f.createDecorator)("UnicodeService"),o.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(y,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const f=c(8460),m=c(225);class h{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,E,v=!1){return(16777215&S)<<3|(3&E)<<1|(v?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new f.EventEmitter,this.onChange=this._onChange.event;const S=new m.UnicodeV6;this.register(S),this._active=S.version,this._activeProvider=S}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(S){if(!this._providers[S])throw new Error(`unknown Unicode version "${S}"`);this._active=S,this._activeProvider=this._providers[S],this._onChange.fire(S)}register(S){this._providers[S.version]=S}wcwidth(S){return this._activeProvider.wcwidth(S)}getStringCellWidth(S){let E=0,v=0;const u=S.length;for(let l=0;l<u;++l){let s=S.charCodeAt(l);if(55296<=s&&s<=56319){if(++l>=u)return E+this.wcwidth(s);const C=S.charCodeAt(l);56320<=C&&C<=57343?s=1024*(s-55296)+C-56320+65536:E+=this.wcwidth(C)}const n=this.charProperties(s,v);let _=h.extractWidth(n);h.extractShouldJoin(n)&&(_-=h.extractWidth(v)),E+=_,v=n}return E}charProperties(S,E){return this._activeProvider.charProperties(S,E)}}o.UnicodeService=h}},i={};function a(y){var o=i[y];if(o!==void 0)return o.exports;var c=i[y]={exports:{}};return r[y].call(c.exports,c,c.exports,a),c.exports}var d={};return(()=>{var y=d;Object.defineProperty(y,"__esModule",{value:!0}),y.Terminal=void 0;const o=a(9042),c=a(3236),f=a(844),m=a(5741),h=a(8285),p=a(7975),S=a(7090),E=["cols","rows"];class v extends f.Disposable{constructor(l){super(),this._core=this.register(new c.Terminal(l)),this._addonManager=this.register(new m.AddonManager),this._publicOptions={...this._core.options};const s=_=>this._core.options[_],n=(_,C)=>{this._checkReadonlyOptions(_),this._core.options[_]=C};for(const _ in this._core.options){const C={get:s.bind(this,_),set:n.bind(this,_)};Object.defineProperty(this._publicOptions,_,C)}}_checkReadonlyOptions(l){if(E.includes(l))throw new Error(`Option "${l}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new S.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new h.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const l=this._core.coreService.decPrivateModes;let s="none";switch(this._core.coreMouseService.activeProtocol){case"X10":s="x10";break;case"VT200":s="vt200";break;case"DRAG":s="drag";break;case"ANY":s="any"}return{applicationCursorKeysMode:l.applicationCursorKeys,applicationKeypadMode:l.applicationKeypad,bracketedPasteMode:l.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:s,originMode:l.origin,reverseWraparoundMode:l.reverseWraparound,sendFocusMode:l.sendFocus,wraparoundMode:l.wraparound}}get options(){return this._publicOptions}set options(l){for(const s in l)this._publicOptions[s]=l[s]}blur(){this._core.blur()}focus(){this._core.focus()}input(l,s=!0){this._core.input(l,s)}resize(l,s){this._verifyIntegers(l,s),this._core.resize(l,s)}open(l){this._core.open(l)}attachCustomKeyEventHandler(l){this._core.attachCustomKeyEventHandler(l)}attachCustomWheelEventHandler(l){this._core.attachCustomWheelEventHandler(l)}registerLinkProvider(l){return this._core.registerLinkProvider(l)}registerCharacterJoiner(l){return this._checkProposedApi(),this._core.registerCharacterJoiner(l)}deregisterCharacterJoiner(l){this._checkProposedApi(),this._core.deregisterCharacterJoiner(l)}registerMarker(l=0){return this._verifyIntegers(l),this._core.registerMarker(l)}registerDecoration(l){return this._checkProposedApi(),this._verifyPositiveIntegers(l.x??0,l.width??0,l.height??0),this._core.registerDecoration(l)}hasSelection(){return this._core.hasSelection()}select(l,s,n){this._verifyIntegers(l,s,n),this._core.select(l,s,n)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(l,s){this._verifyIntegers(l,s),this._core.selectLines(l,s)}dispose(){super.dispose()}scrollLines(l){this._verifyIntegers(l),this._core.scrollLines(l)}scrollPages(l){this._verifyIntegers(l),this._core.scrollPages(l)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(l){this._verifyIntegers(l),this._core.scrollToLine(l)}clear(){this._core.clear()}write(l,s){this._core.write(l,s)}writeln(l,s){this._core.write(l),this._core.write(`\r
|
|
48
|
+
`,s)}paste(l){this._core.paste(l)}refresh(l,s){this._verifyIntegers(l,s),this._core.refresh(l,s)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(l){this._addonManager.loadAddon(this,l)}static get strings(){return o}_verifyIntegers(...l){for(const s of l)if(s===1/0||isNaN(s)||s%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...l){for(const s of l)if(s&&(s===1/0||isNaN(s)||s%1!=0||s<0))throw new Error("This API only accepts positive integers")}}y.Terminal=v})(),d})())})(Ru);var uf=Ru.exports,Pu={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={};return(()=>{var i=r;Object.defineProperty(i,"__esModule",{value:!0}),i.FitAddon=void 0,i.FitAddon=class{activate(a){this._terminal=a}dispose(){}fit(){const a=this.proposeDimensions();if(!a||!this._terminal||isNaN(a.cols)||isNaN(a.rows))return;const d=this._terminal._core;this._terminal.rows===a.rows&&this._terminal.cols===a.cols||(d._renderService.clear(),this._terminal.resize(a.cols,a.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const a=this._terminal._core,d=a._renderService.dimensions;if(d.css.cell.width===0||d.css.cell.height===0)return;const y=this._terminal.options.scrollback===0?0:a.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),f=Math.max(0,parseInt(o.getPropertyValue("width"))),m=window.getComputedStyle(this._terminal.element),h=c-(parseInt(m.getPropertyValue("padding-top"))+parseInt(m.getPropertyValue("padding-bottom"))),p=f-(parseInt(m.getPropertyValue("padding-right"))+parseInt(m.getPropertyValue("padding-left")))-y;return{cols:Math.max(2,Math.floor(p/d.css.cell.width)),rows:Math.max(1,Math.floor(h/d.css.cell.height))}}}})(),r})())})(Pu);var hf=Pu.exports,Au={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={6:(y,o)=>{function c(m){try{const h=new URL(m),p=h.password&&h.username?`${h.protocol}//${h.username}:${h.password}@${h.host}`:h.username?`${h.protocol}//${h.username}@${h.host}`:`${h.protocol}//${h.host}`;return m.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(m,h,p,S={}){this._terminal=m,this._regex=h,this._handler=p,this._options=S}provideLinks(m,h){const p=f.computeLink(m,this._regex,this._terminal,this._handler);h(this._addCallbacks(p))}_addCallbacks(m){return m.map(h=>(h.leave=this._options.leave,h.hover=(p,S)=>{if(this._options.hover){const{range:E}=h;this._options.hover(p,S,E)}},h))}};class f{static computeLink(h,p,S,E){const v=new RegExp(p.source,(p.flags||"")+"g"),[u,l]=f._getWindowedLineStrings(h-1,S),s=u.join("");let n;const _=[];for(;n=v.exec(s);){const C=n[0];if(!c(C))continue;const[w,k]=f._mapStrIdx(S,l,0,n.index),[g,L]=f._mapStrIdx(S,w,k,C.length);if(w===-1||k===-1||g===-1||L===-1)continue;const R={start:{x:k+1,y:w+1},end:{x:L,y:g+1}};_.push({range:R,text:C,activate:E})}return _}static _getWindowedLineStrings(h,p){let S,E=h,v=h,u=0,l="";const s=[];if(S=p.buffer.active.getLine(h)){const n=S.translateToString(!0);if(S.isWrapped&&n[0]!==" "){for(u=0;(S=p.buffer.active.getLine(--E))&&u<2048&&(l=S.translateToString(!0),u+=l.length,s.push(l),S.isWrapped&&l.indexOf(" ")===-1););s.reverse()}for(s.push(n),u=0;(S=p.buffer.active.getLine(++v))&&S.isWrapped&&u<2048&&(l=S.translateToString(!0),u+=l.length,s.push(l),l.indexOf(" ")===-1););}return[s,E]}static _mapStrIdx(h,p,S,E){const v=h.buffer.active,u=v.getNullCell();let l=S;for(;E;){const s=v.getLine(p);if(!s)return[-1,-1];for(let n=l;n<s.length;++n){s.getCell(n,u);const _=u.getChars();if(u.getWidth()&&(E-=_.length||1,n===s.length-1&&_==="")){const C=v.getLine(p+1);C&&C.isWrapped&&(C.getCell(0,u),u.getWidth()===2&&(E+=1))}if(E<0)return[p,n]}p++,l=0}return[p,l]}}o.LinkComputer=f}},i={};function a(y){var o=i[y];if(o!==void 0)return o.exports;var c=i[y]={exports:{}};return r[y](c,c.exports,a),c.exports}var d={};return(()=>{var y=d;Object.defineProperty(y,"__esModule",{value:!0}),y.WebLinksAddon=void 0;const o=a(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function f(m,h){const p=window.open();if(p){try{p.opener=null}catch{}p.location.href=h}else console.warn("Opening link blocked as opener could not be cleared")}y.WebLinksAddon=class{constructor(m=f,h={}){this._handler=m,this._options=h}activate(m){this._terminal=m;const h=this._options,p=h.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,h))}dispose(){var m;(m=this._linkProvider)==null||m.dispose()}}})(),d})())})(Au);var df=Au.exports;const ff=[{label:"↑",seq:"\x1B[A"},{label:"↓",seq:"\x1B[B"},{label:"←",seq:"\x1B[D"},{label:"→",seq:"\x1B[C"},{label:"Enter",seq:"\r"},{label:"Tab",seq:" "},{label:"Esc",seq:"\x1B"},{label:"Ctrl+C",seq:""}];class _f extends mn.Component{constructor(r){super(r);ol(this,"handleVirtualKey",r=>{var i;this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:r})),(i=this.terminal)==null||i.focus()});this.containerRef=mn.createRef(),this.terminal=null,this.fitAddon=null,this.ws=null,this.resizeObserver=null,this._writeBuffer="",this._writeTimer=null}componentDidMount(){this.initTerminal(),this.connectWebSocket(),this.setupResizeObserver()}componentWillUnmount(){this._writeTimer&&cancelAnimationFrame(this._writeTimer),this.ws&&(this.ws.close(),this.ws=null),this.resizeObserver&&this.resizeObserver.disconnect(),this.terminal&&this.terminal.dispose()}initTerminal(){this.terminal=new uf.Terminal({cursorBlink:!0,cursorStyle:"bar",fontSize:13,fontFamily:'Menlo, Monaco, "Courier New", monospace',theme:{background:"#0a0a0a",foreground:"#d4d4d4",cursor:"#d4d4d4",selectionBackground:"#264f78"},scrollback:3e3,allowProposedApi:!0}),this.fitAddon=new hf.FitAddon,this.terminal.loadAddon(this.fitAddon),this.terminal.loadAddon(new df.WebLinksAddon),this.terminal.open(this.containerRef.current),requestAnimationFrame(()=>{this.fitAddon&&(this.fitAddon.fit(),this.terminal.focus())}),this.terminal.onData(r=>{this.ws&&this.ws.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({type:"input",data:r}))})}connectWebSocket(){const r=window.location.protocol==="https:"?"wss:":"ws:",i=window.location.hostname,a=window.location.port==="5173"?"5174":window.location.port,d=`${r}//${i}:${a}/ws/terminal`;this.ws=new WebSocket(d),this.ws.onopen=()=>{console.log("[Terminal] Connected to PTY service"),this.sendResize()},this.ws.onmessage=y=>{try{const o=JSON.parse(y.data);o.type==="data"?this._throttledWrite(o.data):o.type==="exit"?(this._flushWrite(),this.terminal&&this.terminal.write(`\r
|
|
49
49
|
[Process exited with code ${o.exitCode??"?"}]\r
|
|
50
|
-
`)):o.type==="state"&&!o.running&&this.terminal&&this._flushWrite()}catch(o){console.error("[Terminal] Parse error:",o)}},this.ws.onclose=()=>{console.log("[Terminal] Disconnected, reconnecting in 3s..."),setTimeout(()=>{this.containerRef.current&&this.connectWebSocket()},3e3)},this.ws.onerror=y=>{console.error("[Terminal] WebSocket error:",y)}}sendResize(){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.terminal&&this.ws.send(JSON.stringify({type:"resize",cols:this.terminal.cols,rows:this.terminal.rows}))}setupResizeObserver(){this.containerRef.current&&(this.resizeObserver=new ResizeObserver(()=>{this._resizeTimer&&clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(()=>{if(this.fitAddon&&this.containerRef.current)try{this.fitAddon.fit(),this.sendResize()}catch{}},150)}),this.resizeObserver.observe(this.containerRef.current))}_throttledWrite(r){this._writeBuffer+=r,this._writeTimer||(this._writeTimer=requestAnimationFrame(()=>{this._flushWrite()}))}_flushWrite(){if(this._writeTimer&&(cancelAnimationFrame(this._writeTimer),this._writeTimer=null),!this._writeBuffer||!this.terminal)return;const r=32768;if(this._writeBuffer.length<=r){const i=this._writeBuffer;this._writeBuffer="",this.terminal.write(i)}else{const i=this._writeBuffer.slice(0,r);this._writeBuffer=this._writeBuffer.slice(r),this.terminal.write(i),this._writeTimer=requestAnimationFrame(()=>{this._flushWrite()})}}render(){return X.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",background:"#0a0a0a"},children:[X.jsx("div",{ref:this.containerRef,style:{flex:1,overflow:"hidden",padding:"4px 8px"}}),X.jsx("div",{style:{display:"flex",gap:"4px",padding:"8px",background:"#111",borderTop:"1px solid #222",flexWrap:"wrap"},children:ff.map(r=>X.jsx("button",{onClick:()=>this.handleVirtualKey(r.seq),style:{padding:"8px 12px",border:"1px solid #333",borderRadius:"4px",background:"#1a1a1a",color:"#ccc",fontSize:"13px",fontFamily:"Menlo, Monaco, monospace",cursor:"pointer",minWidth:"44px",minHeight:"44px"},children:r.label},r.label))})]})}}function pf(){const[e,t]=ve.useState([]),[r,i]=ve.useState([]),[a,d]=ve.useState(null),[y,o]=ve.useState([]),[c,f]=ve.useState("disconnected"),[m,h]=ve.useState(null),[p,S]=ve.useState("idle"),[E,v]=ve.useState(null),[u,l]=ve.useState(!1),[s,n]=ve.useState(null),[_,C]=ve.useState(null),[w,k]=ve.useState(!1),g=ve.useRef(null);ve.useEffect(()=>(x(),O(),document.addEventListener("click",T),document.addEventListener("keydown",B),()=>{document.removeEventListener("click",T),document.removeEventListener("keydown",B),g.current&&g.current.close()}),[]);async function x(){try{const R=window.location.port==="5173"?"5174":window.location.port,L=window.location.protocol==="https:"?"https:":"http:",F=await fetch(`${L}//${window.location.hostname}:${R}/api/status`);if(F.ok){const I=await F.json();n(I.version),C(I.latestVersion),k(I.hasUpdate)}}catch(R){console.error("Failed to fetch status:",R)}}function T(){h(null)}function B(R){if(R.ctrlKey&&R.shiftKey&&R.key==="Enter"){R.preventDefault(),N();return}if(p==="running"&&R.ctrlKey&&R.key==="Enter"){R.preventDefault(),U();return}if(p==="running"&&R.ctrlKey&&R.key==="z"){R.preventDefault(),l(!0);return}a&&(R.ctrlKey&&R.key==="w"?(R.preventDefault(),D(a)):R.ctrlKey&&R.key==="Tab"&&(R.preventDefault(),R.shiftKey?$():z()))}function O(){const R=window.location.protocol==="https:"?"wss:":"ws:",L=window.location.hostname,F=window.location.port==="5173"?"5174":window.location.port,I=`${R}//${L}:${F}/ws`,K=new WebSocket(I);K.onopen=()=>{console.log("Connected to Codex Viewer"),f("connected"),K.send(JSON.stringify({type:"get_task_status"}))},K.onclose=()=>{console.log("Disconnected from Codex Viewer"),f("disconnected"),setTimeout(O,3e3)},K.onerror=V=>{console.error("WebSocket error:",V)},K.onmessage=V=>{try{const Z=JSON.parse(V.data);P(Z)}catch(Z){console.error("Failed to parse message:",Z)}},g.current=K}function P(R){switch(R.type){case"file_change":H(R.data);break;case"file_tree":t(R.data);break;case"file_content":q(R.data);break;case"task_status":S(R.data.status),v(R.data.taskId);break;case"task_started":S("running"),v(R.data.taskId),alert(`任务已创建,快照包含 ${R.data.filesCount} 个文件`);break;case"task_rolled_back":S("idle"),v(null),i([]),d(null),alert(`已撤回 ${R.data.restoredCount} 个文件`),l(!1);break;case"task_completed":S("idle"),v(null),alert("任务已完成,修改已保留");break;case"connected":console.log("Server confirmed connection");break;default:console.log("Unknown message type:",R.type)}}function N(){var R;p!=="running"&&((R=g.current)==null?void 0:R.readyState)===WebSocket.OPEN&&g.current.send(JSON.stringify({type:"start_task"}))}function W(){var R;p==="running"&&((R=g.current)==null?void 0:R.readyState)===WebSocket.OPEN&&g.current.send(JSON.stringify({type:"rollback_task"}))}function U(){var R;p==="running"&&((R=g.current)==null?void 0:R.readyState)===WebSocket.OPEN&&g.current.send(JSON.stringify({type:"complete_task"}))}function q(R){const L=R.path.split(/[/\\]/).pop();i(F=>{const I=F.find(K=>K.path===R.path);if(I)return d(I.id),F;{const K={id:Date.now().toString(),path:R.path,name:L,content:R.content,diff:R.diff||null,isDiff:!!R.diff};return d(K.id),[...F,K]}})}function H(R){R.path.split(/[/\\]/).pop();const L=r.find(F=>F.path===R.path);L&&(i(F=>F.map(I=>I.path===R.path?{...I,content:R.newContent,diff:R.diff,isDiff:!0}:I)),a===L.id&&d(L.id)),o(F=>{const I=F.filter(K=>K.path!==R.path);return[{path:R.path,time:Date.now(),diff:R.diff},...I].slice(0,10)})}function b(R){var F;const L=r.find(I=>I.path===R);if(L){d(L.id);return}((F=g.current)==null?void 0:F.readyState)===WebSocket.OPEN&&g.current.send(JSON.stringify({type:"open_file",data:R}))}function D(R){const L=r.findIndex(I=>I.id===R),F=r.filter(I=>I.id!==R);r.length===1?(i([]),d(null)):(a===R&&(L>=F.length?d(F[F.length-1].id):d(F[L].id)),i(F))}function A(R){const L=r.find(F=>F.id===R);i(L?[L]:[]),d(R)}function M(){i([]),d(null)}function z(){if(r.length<=1)return;const L=(r.findIndex(F=>F.id===a)+1)%r.length;d(r[L].id)}function $(){if(r.length<=1)return;const L=(r.findIndex(F=>F.id===a)-1+r.length)%r.length;d(r[L].id)}function Y(R,L){R.preventDefault(),h({x:R.clientX,y:R.clientY,tabId:L})}const Q=r.find(R=>R.id===a);return X.jsxs("div",{className:"app-container",children:[X.jsx(Sf,{files:e,recentChanges:y,activeFile:(Q==null?void 0:Q.path)||null,onFileClick:b}),X.jsxs("div",{className:"panel middle-panel",children:[X.jsx(vf,{taskStatus:p,onStartTask:N,onRollback:()=>l(!0),onComplete:U}),X.jsx(gf,{tabs:r,activeTabId:a,onTabClick:d,onTabClose:D,onContextMenu:Y}),X.jsx("div",{className:"panel-content code-panel",children:Q?Q.isDiff&&Q.diff?X.jsx("div",{className:"diff-container",children:Q.diff.map((R,L)=>X.jsx("div",{className:`diff-line ${R.added?"added":R.removed?"removed":""}`,children:R.content},L))}):X.jsx("pre",{className:"code-content",children:Q.content}):X.jsx("div",{className:"empty-state",children:"双击左侧文件查看内容..."})}),u&&X.jsx("div",{className:"modal-overlay",onClick:()=>l(!1),children:X.jsxs("div",{className:"modal-content",onClick:R=>R.stopPropagation(),children:[X.jsx("div",{className:"modal-title",children:"确认撤回"}),X.jsx("div",{className:"modal-body",children:"确定要撤回所有修改吗?此操作将把项目恢复到任务开始前的状态,且无法撤销。"}),X.jsxs("div",{className:"modal-buttons",children:[X.jsx("button",{className:"modal-btn modal-btn-cancel",onClick:()=>l(!1),children:"取消"}),X.jsx("button",{className:"modal-btn modal-btn-danger",onClick:W,children:"确认撤回"})]})]})})]}),m&&X.jsx(mf,{x:m.x,y:m.y,onClose:()=>h(null),onCloseTab:()=>{D(m.tabId),h(null)},onCloseOtherTabs:()=>{A(m.tabId),h(null)},onCloseAllTabs:()=>{M(),h(null)}}),X.jsxs("div",{className:"panel right-panel",children:[X.jsxs("div",{className:"panel-header",children:[X.jsx("span",{children:"Codex 终端"}),X.jsx("span",{className:`ws-status ${c}`}),X.jsxs("span",{className:"version-info",children:[s&&X.jsxs("span",{className:"version-number",children:["v",s]}),w&&_&&X.jsx("span",{className:"update-badge",title:`可用版本: ${_}`,children:"更新可用"})]})]}),X.jsx("div",{className:"terminal-wrapper",children:X.jsx(_f,{})})]})]})}function vf({taskStatus:e,onStartTask:t,onRollback:r,onComplete:i}){return X.jsxs("div",{className:"task-bar",children:[X.jsx("div",{className:`task-status ${e}`,children:e==="idle"?"空闲":"任务进行中"}),X.jsx("div",{className:"task-buttons",children:e==="idle"?X.jsx("button",{className:"task-btn task-btn-start",disabled:!0,title:"快照功能暂时禁用",children:"开始任务"}):X.jsxs(X.Fragment,{children:[X.jsx("button",{className:"task-btn task-btn-rollback",onClick:r,title:"Ctrl+Z",children:"撤回"}),X.jsx("button",{className:"task-btn task-btn-complete",onClick:i,title:"Ctrl+Enter",children:"完成"})]})})]})}function gf({tabs:e,activeTabId:t,onTabClick:r,onTabClose:i,onContextMenu:a}){return X.jsx("div",{className:"tab-bar",children:e.map(d=>X.jsxs("div",{className:`tab ${t===d.id?"active":""}`,onClick:()=>r(d.id),onContextMenu:y=>a(y,d.id),children:[X.jsx("span",{className:"tab-name",children:d.name}),X.jsx("button",{className:"tab-close",onClick:y=>{y.stopPropagation(),i(d.id)},children:"×"})]},d.id))})}function mf({x:e,y:t,onClose:r,onCloseTab:i,onCloseOtherTabs:a,onCloseAllTabs:d}){return X.jsxs("div",{className:"context-menu",style:{left:e,top:t},onClick:y=>y.stopPropagation(),children:[X.jsx("div",{className:"context-menu-item",onClick:i,children:"关闭标签页"}),X.jsx("div",{className:"context-menu-item",onClick:a,children:"关闭其他标签页"}),X.jsx("div",{className:"context-menu-item",onClick:d,children:"关闭全部标签页"})]})}function Sf({files:e,recentChanges:t,activeFile:r,onFileClick:i}){const[a,d]=ve.useState({}),[y,o]=ve.useState(null);function c(S){d(E=>({...E,[S]:!E[S]}))}function f(S,E){S.preventDefault(),S.stopPropagation(),o({x:S.clientX,y:S.clientY,item:E})}function m(){var S;(S=y==null?void 0:y.item)!=null&&S.path&&navigator.clipboard.writeText(y.item.path).then(()=>{console.log("Path copied:",y.item.path)}).catch(E=>{console.error("Failed to copy path:",E)}),o(null)}function h(){var S;(S=y==null?void 0:y.item)!=null&&S.path&&fetch("/api/open-in-explorer",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:y.item.path})}).catch(E=>{console.error("Failed to open in explorer:",E)}),o(null)}function p(S,E=0){return S.map((v,u)=>{const l=v.type==="directory",s=a[v.path],n=8+E*16;return X.jsxs(mn.Fragment,{children:[X.jsxs("div",{className:`file-item ${r===v.path?"active":""}`,onClick:()=>l?c(v.path):null,onDoubleClick:()=>!l&&i(v.path),onContextMenu:_=>f(_,v),style:{paddingLeft:`${n}px`},children:[X.jsx("span",{className:"file-icon",children:l?s?"📂":"📁":yf(v.type)}),X.jsx("span",{className:"file-name",children:v.name})]}),l&&s&&v.children&&p(v.children,E+1)]},v.path)})}return X.jsxs("div",{className:"panel left-panel",onClick:()=>o(null),children:[X.jsx("div",{className:"panel-header",children:"文件浏览器"}),X.jsxs("div",{className:"panel-content",children:[t.length>0&&X.jsxs("div",{className:"section",children:[X.jsx("div",{className:"section-title",children:"最近修改"}),t.map((S,E)=>X.jsxs("div",{className:`file-item ${r===S.path?"active":""}`,onDoubleClick:()=>i(S.path),children:[X.jsx("span",{className:"file-icon",children:"📝"}),X.jsx("span",{className:"file-name",children:S.path.split(/[/\\]/).pop()})]},E))]}),X.jsxs("div",{className:"section",children:[X.jsx("div",{className:"section-title",children:"项目文件"}),e.length===0?X.jsx("div",{className:"empty-state",children:t.length===0?"等待文件变化...":"暂无其他文件"}):p(e)]})]}),y&&X.jsxs("div",{className:"file-context-menu",style:{left:y.x,top:y.y},onClick:S=>S.stopPropagation(),children:[X.jsx("div",{className:"context-menu-item",onClick:m,children:"复制文件路径"}),X.jsx("div",{className:"context-menu-item",onClick:h,children:"在文件资源管理器中打开"})]})]})}function yf(e){switch(e){case"directory":return"📁";case"file":return"📄";default:return"📄"}}const Cf=document.getElementById("root"),wf=Du(Cf);wf.render(X.jsx(pf,{}));
|
|
50
|
+
`)):o.type==="state"&&!o.running&&this.terminal&&this._flushWrite()}catch(o){console.error("[Terminal] Parse error:",o)}},this.ws.onclose=()=>{console.log("[Terminal] Disconnected, reconnecting in 3s..."),setTimeout(()=>{this.containerRef.current&&this.connectWebSocket()},3e3)},this.ws.onerror=y=>{console.error("[Terminal] WebSocket error:",y)}}sendResize(){this.ws&&this.ws.readyState===WebSocket.OPEN&&this.terminal&&this.ws.send(JSON.stringify({type:"resize",cols:this.terminal.cols,rows:this.terminal.rows}))}setupResizeObserver(){this.containerRef.current&&(this.resizeObserver=new ResizeObserver(()=>{this._resizeTimer&&clearTimeout(this._resizeTimer),this._resizeTimer=setTimeout(()=>{if(this.fitAddon&&this.containerRef.current)try{this.fitAddon.fit(),this.sendResize()}catch{}},150)}),this.resizeObserver.observe(this.containerRef.current))}_throttledWrite(r){this._writeBuffer+=r,this._writeTimer||(this._writeTimer=requestAnimationFrame(()=>{this._flushWrite()}))}_flushWrite(){if(this._writeTimer&&(cancelAnimationFrame(this._writeTimer),this._writeTimer=null),!this._writeBuffer||!this.terminal)return;const r=32768;if(this._writeBuffer.length<=r){const i=this._writeBuffer;this._writeBuffer="",this.terminal.write(i)}else{const i=this._writeBuffer.slice(0,r);this._writeBuffer=this._writeBuffer.slice(r),this.terminal.write(i),this._writeTimer=requestAnimationFrame(()=>{this._flushWrite()})}}render(){return G.jsxs("div",{style:{height:"100%",display:"flex",flexDirection:"column",background:"#0a0a0a"},children:[G.jsx("div",{ref:this.containerRef,style:{flex:1,overflow:"hidden",padding:"4px 8px"}}),G.jsx("div",{style:{display:"flex",gap:"4px",padding:"8px",background:"#111",borderTop:"1px solid #222",flexWrap:"wrap"},children:ff.map(r=>G.jsx("button",{onClick:()=>this.handleVirtualKey(r.seq),style:{padding:"8px 12px",border:"1px solid #333",borderRadius:"4px",background:"#1a1a1a",color:"#ccc",fontSize:"13px",fontFamily:"Menlo, Monaco, monospace",cursor:"pointer",minWidth:"44px",minHeight:"44px"},children:r.label},r.label))})]})}}function pf(){const[e,t]=ve.useState([]),[r,i]=ve.useState([]),[a,d]=ve.useState(null),[y,o]=ve.useState([]),[c,f]=ve.useState("disconnected"),[m,h]=ve.useState(null),[p,S]=ve.useState("idle"),[E,v]=ve.useState(null),[u,l]=ve.useState(!1),[s,n]=ve.useState(null),[_,C]=ve.useState(null),[w,k]=ve.useState(!1),g=ve.useRef(null);ve.useEffect(()=>(L(),M(),document.addEventListener("click",R),document.addEventListener("keydown",A),()=>{document.removeEventListener("click",R),document.removeEventListener("keydown",A),g.current&&g.current.close()}),[]);async function L(){try{const x=window.location.port==="5173"?"5174":window.location.port,F=window.location.protocol==="https:"?"https:":"http:",I=await fetch(`${F}//${window.location.hostname}:${x}/api/status`);if(I.ok){const $=await I.json();n($.version),C($.latestVersion),k($.hasUpdate)}}catch(x){console.error("Failed to fetch status:",x)}}function R(){h(null)}function A(x){if(x.ctrlKey&&x.shiftKey&&x.key==="Enter"){x.preventDefault(),N();return}if(p==="running"&&x.ctrlKey&&x.key==="Enter"){x.preventDefault(),K();return}if(p==="running"&&x.ctrlKey&&x.key==="z"){x.preventDefault(),l(!0);return}a&&(x.ctrlKey&&x.key==="w"?(x.preventDefault(),D(a)):x.ctrlKey&&x.key==="Tab"&&(x.preventDefault(),x.shiftKey?Q():V()))}function M(){const x=window.location.protocol==="https:"?"wss:":"ws:",F=window.location.hostname,I=window.location.port==="5173"?"5174":window.location.port,$=`${x}//${F}:${I}/ws`,j=new WebSocket($);j.onopen=()=>{console.log("Connected to Codex Viewer"),f("connected"),j.send(JSON.stringify({type:"get_task_status"}))},j.onclose=()=>{console.log("Disconnected from Codex Viewer"),f("disconnected"),setTimeout(M,3e3)},j.onerror=Z=>{console.error("WebSocket error:",Z)},j.onmessage=Z=>{try{const ie=JSON.parse(Z.data);T(ie)}catch(ie){console.error("Failed to parse message:",ie)}},g.current=j}function T(x){switch(x.type){case"file_change":H(x.data);break;case"file_tree":t(x.data);break;case"file_content":q(x.data);break;case"task_status":S(x.data.status),v(x.data.taskId);break;case"task_started":S("running"),v(x.data.taskId),alert(`任务已创建,快照包含 ${x.data.filesCount} 个文件`);break;case"task_rolled_back":S("idle"),v(null),i([]),d(null),alert(`已撤回 ${x.data.restoredCount} 个文件`),l(!1);break;case"task_completed":S("idle"),v(null),alert("任务已完成,修改已保留");break;case"connected":console.log("Server confirmed connection");break;default:console.log("Unknown message type:",x.type)}}function N(){var x;p!=="running"&&((x=g.current)==null?void 0:x.readyState)===WebSocket.OPEN&&g.current.send(JSON.stringify({type:"start_task"}))}function W(){var x;p==="running"&&((x=g.current)==null?void 0:x.readyState)===WebSocket.OPEN&&g.current.send(JSON.stringify({type:"rollback_task"}))}function K(){var x;p==="running"&&((x=g.current)==null?void 0:x.readyState)===WebSocket.OPEN&&g.current.send(JSON.stringify({type:"complete_task"}))}function q(x){const F=x.path.split(/[/\\]/).pop();i(I=>{const $=I.find(j=>j.path===x.path);if($)return d($.id),I;{const j={id:Date.now().toString(),path:x.path,name:F,content:x.content,diff:x.diff||null,isDiff:!!x.diff};return d(j.id),[...I,j]}})}function H(x){const F=x.path.split(/[/\\]/).pop();i(I=>{const $=I.find(j=>j.path===x.path);if($){const j={...$,content:x.newContent,diff:x.diff,isDiff:!0};return d($.id),I.map(Z=>Z.path===x.path?j:Z)}else{const j={id:Date.now().toString(),path:x.path,name:F,content:x.newContent,diff:x.diff,isDiff:!0};return d(j.id),[...I,j]}}),o(I=>{const $=I.filter(j=>j.path!==x.path);return[{path:x.path,time:Date.now(),diff:x.diff},...$].slice(0,10)})}function b(x){var I;const F=r.find($=>$.path===x);if(F){d(F.id);return}((I=g.current)==null?void 0:I.readyState)===WebSocket.OPEN&&g.current.send(JSON.stringify({type:"open_file",data:x}))}function D(x){const F=r.findIndex($=>$.id===x),I=r.filter($=>$.id!==x);r.length===1?(i([]),d(null)):(a===x&&(F>=I.length?d(I[I.length-1].id):d(I[F].id)),i(I))}function P(x){const F=r.find(I=>I.id===x);i(F?[F]:[]),d(x)}function B(){i([]),d(null)}function z(){i(x=>x.map(F=>({...F,diff:null,isDiff:!1})))}function V(){if(r.length<=1)return;const F=(r.findIndex(I=>I.id===a)+1)%r.length;d(r[F].id)}function Q(){if(r.length<=1)return;const F=(r.findIndex(I=>I.id===a)-1+r.length)%r.length;d(r[F].id)}function Y(x,F){x.preventDefault(),h({x:x.clientX,y:x.clientY,tabId:F})}const O=r.find(x=>x.id===a);return G.jsxs("div",{className:"app-container",children:[G.jsx(Sf,{files:e,recentChanges:y,activeFile:(O==null?void 0:O.path)||null,onFileClick:b}),G.jsxs("div",{className:"panel middle-panel",children:[G.jsx(vf,{taskStatus:p,onStartTask:N,onRollback:()=>l(!0),onComplete:K,onClearDiff:z}),G.jsx(gf,{tabs:r,activeTabId:a,onTabClick:d,onTabClose:D,onContextMenu:Y}),G.jsx("div",{className:"panel-content code-panel",children:O?O.isDiff&&O.diff?G.jsx("div",{className:"diff-container",children:O.diff.map((x,F)=>G.jsx("div",{className:`diff-line ${x.added?"added":x.removed?"removed":""}`,children:x.content},F))}):G.jsx("pre",{className:"code-content",children:O.content}):G.jsx("div",{className:"empty-state",children:"双击左侧文件查看内容..."})}),u&&G.jsx("div",{className:"modal-overlay",onClick:()=>l(!1),children:G.jsxs("div",{className:"modal-content",onClick:x=>x.stopPropagation(),children:[G.jsx("div",{className:"modal-title",children:"确认撤回"}),G.jsx("div",{className:"modal-body",children:"确定要撤回所有修改吗?此操作将把项目恢复到任务开始前的状态,且无法撤销。"}),G.jsxs("div",{className:"modal-buttons",children:[G.jsx("button",{className:"modal-btn modal-btn-cancel",onClick:()=>l(!1),children:"取消"}),G.jsx("button",{className:"modal-btn modal-btn-danger",onClick:W,children:"确认撤回"})]})]})})]}),m&&G.jsx(mf,{x:m.x,y:m.y,onClose:()=>h(null),onCloseTab:()=>{D(m.tabId),h(null)},onCloseOtherTabs:()=>{P(m.tabId),h(null)},onCloseAllTabs:()=>{B(),h(null)}}),G.jsxs("div",{className:"panel right-panel",children:[G.jsxs("div",{className:"panel-header",children:[G.jsx("span",{children:"Codex 终端"}),G.jsx("span",{className:`ws-status ${c}`}),G.jsxs("span",{className:"version-info",children:[s&&G.jsxs("span",{className:"version-number",children:["v",s]}),w&&_&&G.jsx("span",{className:"update-badge",title:`可用版本: ${_}`,children:"更新可用"})]})]}),G.jsx("div",{className:"terminal-wrapper",children:G.jsx(_f,{})})]})]})}function vf({taskStatus:e,onStartTask:t,onRollback:r,onComplete:i,onClearDiff:a}){return G.jsxs("div",{className:"task-bar",children:[G.jsx("div",{className:"task-buttons-left",children:G.jsx("button",{className:"task-btn task-btn-clear",onClick:a,title:"清空所有 diff 显示",children:"清空 diff"})}),G.jsx("div",{className:`task-status ${e}`,children:e==="idle"?"空闲":"任务进行中"}),G.jsx("div",{className:"task-buttons",children:e==="idle"?G.jsx("button",{className:"task-btn task-btn-start",disabled:!0,title:"快照功能暂时禁用",children:"开始任务"}):G.jsxs(G.Fragment,{children:[G.jsx("button",{className:"task-btn task-btn-rollback",onClick:r,title:"Ctrl+Z",children:"撤回"}),G.jsx("button",{className:"task-btn task-btn-complete",onClick:i,title:"Ctrl+Enter",children:"完成"})]})})]})}function gf({tabs:e,activeTabId:t,onTabClick:r,onTabClose:i,onContextMenu:a}){return G.jsx("div",{className:"tab-bar",children:e.map(d=>G.jsxs("div",{className:`tab ${t===d.id?"active":""}`,onClick:()=>r(d.id),onContextMenu:y=>a(y,d.id),children:[G.jsx("span",{className:"tab-name",children:d.name}),G.jsx("button",{className:"tab-close",onClick:y=>{y.stopPropagation(),i(d.id)},children:"×"})]},d.id))})}function mf({x:e,y:t,onClose:r,onCloseTab:i,onCloseOtherTabs:a,onCloseAllTabs:d}){return G.jsxs("div",{className:"context-menu",style:{left:e,top:t},onClick:y=>y.stopPropagation(),children:[G.jsx("div",{className:"context-menu-item",onClick:i,children:"关闭标签页"}),G.jsx("div",{className:"context-menu-item",onClick:a,children:"关闭其他标签页"}),G.jsx("div",{className:"context-menu-item",onClick:d,children:"关闭全部标签页"})]})}function Sf({files:e,recentChanges:t,activeFile:r,onFileClick:i}){const[a,d]=ve.useState({}),[y,o]=ve.useState(null);function c(S){d(E=>({...E,[S]:!E[S]}))}function f(S,E){S.preventDefault(),S.stopPropagation(),o({x:S.clientX,y:S.clientY,item:E})}function m(){var S;(S=y==null?void 0:y.item)!=null&&S.path&&navigator.clipboard.writeText(y.item.path).then(()=>{console.log("Path copied:",y.item.path)}).catch(E=>{console.error("Failed to copy path:",E)}),o(null)}function h(){var S;(S=y==null?void 0:y.item)!=null&&S.path&&fetch("/api/open-in-explorer",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:y.item.path})}).catch(E=>{console.error("Failed to open in explorer:",E)}),o(null)}function p(S,E=0){return S.map((v,u)=>{const l=v.type==="directory",s=a[v.path],n=8+E*16;return G.jsxs(mn.Fragment,{children:[G.jsxs("div",{className:`file-item ${r===v.path?"active":""}`,onClick:()=>l?c(v.path):null,onDoubleClick:()=>!l&&i(v.path),onContextMenu:_=>f(_,v),style:{paddingLeft:`${n}px`},children:[G.jsx("span",{className:"file-icon",children:l?s?"📂":"📁":yf(v.type)}),G.jsx("span",{className:"file-name",children:v.name})]}),l&&s&&v.children&&p(v.children,E+1)]},v.path)})}return G.jsxs("div",{className:"panel left-panel",onClick:()=>o(null),children:[G.jsx("div",{className:"panel-header",children:"文件浏览器"}),G.jsxs("div",{className:"panel-content",children:[t.length>0&&G.jsxs("div",{className:"section",children:[G.jsx("div",{className:"section-title",children:"最近修改"}),t.map((S,E)=>G.jsxs("div",{className:`file-item ${r===S.path?"active":""}`,onDoubleClick:()=>i(S.path),children:[G.jsx("span",{className:"file-icon",children:"📝"}),G.jsx("span",{className:"file-name",children:S.path.split(/[/\\]/).pop()})]},E))]}),G.jsxs("div",{className:"section",children:[G.jsx("div",{className:"section-title",children:"项目文件"}),e.length===0?G.jsx("div",{className:"empty-state",children:t.length===0?"等待文件变化...":"暂无其他文件"}):p(e)]})]}),y&&G.jsxs("div",{className:"file-context-menu",style:{left:y.x,top:y.y},onClick:S=>S.stopPropagation(),children:[G.jsx("div",{className:"context-menu-item",onClick:m,children:"复制文件路径"}),G.jsx("div",{className:"context-menu-item",onClick:h,children:"在文件资源管理器中打开"})]})]})}function yf(e){switch(e){case"directory":return"📁";case"file":return"📄";default:return"📄"}}const Cf=document.getElementById("root"),wf=Du(Cf);wf.render(G.jsx(pf,{}));
|