paneful 0.8.3 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const h of n)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function r(n){const h={};return n.integrity&&(h.integrity=n.integrity),n.referrerPolicy&&(h.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?h.credentials="include":n.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function i(n){if(n.ep)return;n.ep=!0;const h=r(n);fetch(n.href,h)}})();function
|
|
1
|
+
(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const n of document.querySelectorAll('link[rel="modulepreload"]'))i(n);new MutationObserver(n=>{for(const h of n)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&i(m)}).observe(document,{childList:!0,subtree:!0});function r(n){const h={};return n.integrity&&(h.integrity=n.integrity),n.referrerPolicy&&(h.referrerPolicy=n.referrerPolicy),n.crossOrigin==="use-credentials"?h.credentials="include":n.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function i(n){if(n.ep)return;n.ep=!0;const h=r(n);fetch(n.href,h)}})();function cc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var uc={exports:{}},qs={},hc={exports:{}},ie={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react.production.min.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Bi=Symbol.for("react.element"),
|
|
9
|
+
*/var Bi=Symbol.for("react.element"),Fh=Symbol.for("react.portal"),zh=Symbol.for("react.fragment"),Wh=Symbol.for("react.strict_mode"),Uh=Symbol.for("react.profiler"),$h=Symbol.for("react.provider"),Kh=Symbol.for("react.context"),Vh=Symbol.for("react.forward_ref"),qh=Symbol.for("react.suspense"),Gh=Symbol.for("react.memo"),Xh=Symbol.for("react.lazy"),Ka=Symbol.iterator;function Qh(e){return e===null||typeof e!="object"?null:(e=Ka&&e[Ka]||e["@@iterator"],typeof e=="function"?e:null)}var dc={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},fc=Object.assign,pc={};function Fr(e,t,r){this.props=e,this.context=t,this.refs=pc,this.updater=r||dc}Fr.prototype.isReactComponent={};Fr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Fr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function _c(){}_c.prototype=Fr.prototype;function Vo(e,t,r){this.props=e,this.context=t,this.refs=pc,this.updater=r||dc}var qo=Vo.prototype=new _c;qo.constructor=Vo;fc(qo,Fr.prototype);qo.isPureReactComponent=!0;var Va=Array.isArray,vc=Object.prototype.hasOwnProperty,Go={current:null},gc={key:!0,ref:!0,__self:!0,__source:!0};function mc(e,t,r){var i,n={},h=null,m=null;if(t!=null)for(i in t.ref!==void 0&&(m=t.ref),t.key!==void 0&&(h=""+t.key),t)vc.call(t,i)&&!gc.hasOwnProperty(i)&&(n[i]=t[i]);var a=arguments.length-2;if(a===1)n.children=r;else if(1<a){for(var c=Array(a),f=0;f<a;f++)c[f]=arguments[f+2];n.children=c}if(e&&e.defaultProps)for(i in a=e.defaultProps,a)n[i]===void 0&&(n[i]=a[i]);return{$$typeof:Bi,type:e,key:h,ref:m,props:n,_owner:Go.current}}function Yh(e,t){return{$$typeof:Bi,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Xo(e){return typeof e=="object"&&e!==null&&e.$$typeof===Bi}function Jh(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var qa=/\/+/g;function _n(e,t){return typeof e=="object"&&e!==null&&e.key!=null?Jh(""+e.key):t.toString(36)}function cs(e,t,r,i,n){var h=typeof e;(h==="undefined"||h==="boolean")&&(e=null);var m=!1;if(e===null)m=!0;else switch(h){case"string":case"number":m=!0;break;case"object":switch(e.$$typeof){case Bi:case Fh:m=!0}}if(m)return m=e,n=n(m),e=i===""?"."+_n(m,0):i,Va(n)?(r="",e!=null&&(r=e.replace(qa,"$&/")+"/"),cs(n,t,r,"",function(f){return f})):n!=null&&(Xo(n)&&(n=Yh(n,r+(!n.key||m&&m.key===n.key?"":(""+n.key).replace(qa,"$&/")+"/")+e)),t.push(n)),1;if(m=0,i=i===""?".":i+":",Va(e))for(var a=0;a<e.length;a++){h=e[a];var c=i+_n(h,a);m+=cs(h,t,r,c,n)}else if(c=Qh(e),typeof c=="function")for(e=c.call(e),a=0;!(h=e.next()).done;)h=h.value,c=i+_n(h,a++),m+=cs(h,t,r,c,n);else if(h==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return m}function $i(e,t,r){if(e==null)return e;var i=[],n=0;return cs(e,i,"","",function(h){return t.call(r,h,n++)}),i}function Zh(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var Ne={current:null},us={transition:null},ed={ReactCurrentDispatcher:Ne,ReactCurrentBatchConfig:us,ReactCurrentOwner:Go};function Sc(){throw Error("act(...) is not supported in production builds of React.")}ie.Children={map:$i,forEach:function(e,t,r){$i(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return $i(e,function(){t++}),t},toArray:function(e){return $i(e,function(t){return t})||[]},only:function(e){if(!Xo(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ie.Component=Fr;ie.Fragment=zh;ie.Profiler=Uh;ie.PureComponent=Vo;ie.StrictMode=Wh;ie.Suspense=qh;ie.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ed;ie.act=Sc;ie.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=fc({},e.props),n=e.key,h=e.ref,m=e._owner;if(t!=null){if(t.ref!==void 0&&(h=t.ref,m=Go.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(c in t)vc.call(t,c)&&!gc.hasOwnProperty(c)&&(i[c]=t[c]===void 0&&a!==void 0?a[c]:t[c])}var c=arguments.length-2;if(c===1)i.children=r;else if(1<c){a=Array(c);for(var f=0;f<c;f++)a[f]=arguments[f+2];i.children=a}return{$$typeof:Bi,type:e.type,key:n,ref:h,props:i,_owner:m}};ie.createContext=function(e){return e={$$typeof:Kh,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:$h,_context:e},e.Consumer=e};ie.createElement=mc;ie.createFactory=function(e){var t=mc.bind(null,e);return t.type=e,t};ie.createRef=function(){return{current:null}};ie.forwardRef=function(e){return{$$typeof:Vh,render:e}};ie.isValidElement=Xo;ie.lazy=function(e){return{$$typeof:Xh,_payload:{_status:-1,_result:e},_init:Zh}};ie.memo=function(e,t){return{$$typeof:Gh,type:e,compare:t===void 0?null:t}};ie.startTransition=function(e){var t=us.transition;us.transition={};try{e()}finally{us.transition=t}};ie.unstable_act=Sc;ie.useCallback=function(e,t){return Ne.current.useCallback(e,t)};ie.useContext=function(e){return Ne.current.useContext(e)};ie.useDebugValue=function(){};ie.useDeferredValue=function(e){return Ne.current.useDeferredValue(e)};ie.useEffect=function(e,t){return Ne.current.useEffect(e,t)};ie.useId=function(){return Ne.current.useId()};ie.useImperativeHandle=function(e,t,r){return Ne.current.useImperativeHandle(e,t,r)};ie.useInsertionEffect=function(e,t){return Ne.current.useInsertionEffect(e,t)};ie.useLayoutEffect=function(e,t){return Ne.current.useLayoutEffect(e,t)};ie.useMemo=function(e,t){return Ne.current.useMemo(e,t)};ie.useReducer=function(e,t,r){return Ne.current.useReducer(e,t,r)};ie.useRef=function(e){return Ne.current.useRef(e)};ie.useState=function(e){return Ne.current.useState(e)};ie.useSyncExternalStore=function(e,t,r){return Ne.current.useSyncExternalStore(e,t,r)};ie.useTransition=function(){return Ne.current.useTransition()};ie.version="18.3.1";hc.exports=ie;var Q=hc.exports;const yc=cc(Q);/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.production.min.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var td=Q,rd=Symbol.for("react.element"),id=Symbol.for("react.fragment"),sd=Object.prototype.hasOwnProperty,nd=td.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,od={key:!0,ref:!0,__self:!0,__source:!0};function wc(e,t,r){var i,n={},h=null,m=null;r!==void 0&&(h=""+r),t.key!==void 0&&(h=""+t.key),t.ref!==void 0&&(m=t.ref);for(i in t)sd.call(t,i)&&!od.hasOwnProperty(i)&&(n[i]=t[i]);if(e&&e.defaultProps)for(i in t=e.defaultProps,t)n[i]===void 0&&(n[i]=t[i]);return{$$typeof:rd,type:e,key:h,ref:m,props:n,_owner:nd.current}}qs.Fragment=id;qs.jsx=wc;qs.jsxs=wc;uc.exports=qs;var A=uc.exports,Wn={},Cc={exports:{}},Qe={},xc={exports:{}},kc={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.min.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/(function(e){function t(j,E){var D=j.length;j.push(E);e:for(;0<D;){var P=D-1>>>1,O=j[P];if(0<n(O,E))j[P]=E,j[D]=O,D=P;else break e}}function r(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var E=j[0],D=j.pop();if(D!==E){j[0]=D;e:for(var P=0,O=j.length,W=O>>>1;P<W;){var V=2*(P+1)-1,J=j[V],Z=V+1,I=j[Z];if(0>n(J,D))Z<O&&0>n(I,J)?(j[P]=I,j[Z]=D,P=Z):(j[P]=J,j[V]=D,P=V);else if(Z<O&&0>n(I,D))j[P]=I,j[Z]=D,P=Z;else break e}}return E}function n(j,E){var D=j.sortIndex-E.sortIndex;return D!==0?D:j.id-E.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var m=Date,a=m.now();e.unstable_now=function(){return m.now()-a}}var c=[],f=[],g=1,d=null,
|
|
25
|
+
*/(function(e){function t(j,E){var D=j.length;j.push(E);e:for(;0<D;){var P=D-1>>>1,O=j[P];if(0<n(O,E))j[P]=E,j[D]=O,D=P;else break e}}function r(j){return j.length===0?null:j[0]}function i(j){if(j.length===0)return null;var E=j[0],D=j.pop();if(D!==E){j[0]=D;e:for(var P=0,O=j.length,W=O>>>1;P<W;){var V=2*(P+1)-1,J=j[V],Z=V+1,I=j[Z];if(0>n(J,D))Z<O&&0>n(I,J)?(j[P]=I,j[Z]=D,P=Z):(j[P]=J,j[V]=D,P=V);else if(Z<O&&0>n(I,D))j[P]=I,j[Z]=D,P=Z;else break e}}return E}function n(j,E){var D=j.sortIndex-E.sortIndex;return D!==0?D:j.id-E.id}if(typeof performance=="object"&&typeof performance.now=="function"){var h=performance;e.unstable_now=function(){return h.now()}}else{var m=Date,a=m.now();e.unstable_now=function(){return m.now()-a}}var c=[],f=[],g=1,d=null,_=3,S=!1,w=!1,v=!1,u=typeof setTimeout=="function"?setTimeout:null,o=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 l(j){for(var E=r(f);E!==null;){if(E.callback===null)i(f);else if(E.startTime<=j)i(f),E.sortIndex=E.expirationTime,t(c,E);else break;E=r(f)}}function p(j){if(v=!1,l(j),!w)if(r(c)!==null)w=!0,K(C);else{var E=r(f);E!==null&&q(p,E.startTime-j)}}function C(j,E){w=!1,v&&(v=!1,o(y),y=-1),S=!0;var D=_;try{for(l(E),d=r(c);d!==null&&(!(d.expirationTime>E)||j&&!M());){var P=d.callback;if(typeof P=="function"){d.callback=null,_=d.priorityLevel;var O=P(d.expirationTime<=E);E=e.unstable_now(),typeof O=="function"?d.callback=O:d===r(c)&&i(c),l(E)}else i(c);d=r(c)}if(d!==null)var W=!0;else{var V=r(f);V!==null&&q(p,V.startTime-E),W=!1}return W}finally{d=null,_=D,S=!1}}var x=!1,k=null,y=-1,b=5,R=-1;function M(){return!(e.unstable_now()-R<b)}function B(){if(k!==null){var j=e.unstable_now();R=j;var E=!0;try{E=k(!0,j)}finally{E?T():(x=!1,k=null)}}else x=!1}var T;if(typeof s=="function")T=function(){s(B)};else if(typeof MessageChannel<"u"){var N=new MessageChannel,F=N.port2;N.port1.onmessage=B,T=function(){F.postMessage(null)}}else T=function(){u(B,0)};function K(j){k=j,x||(x=!0,T())}function q(j,E){y=u(function(){j(e.unstable_now())},E)}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(j){j.callback=null},e.unstable_continueExecution=function(){w||S||(w=!0,K(C))},e.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):b=0<j?Math.floor(1e3/j):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_getFirstCallbackNode=function(){return r(c)},e.unstable_next=function(j){switch(_){case 1:case 2:case 3:var E=3;break;default:E=_}var D=_;_=E;try{return j()}finally{_=D}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(j,E){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var D=_;_=j;try{return E()}finally{_=D}},e.unstable_scheduleCallback=function(j,E,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,j){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=D+O,j={id:g++,callback:E,priorityLevel:j,startTime:D,expirationTime:O,sortIndex:-1},D>P?(j.sortIndex=D,t(f,j),r(c)===null&&j===r(f)&&(v?(o(y),y=-1):v=!0,q(p,D-P))):(j.sortIndex=O,t(c,j),w||S||(w=!0,K(C))),j},e.unstable_shouldYield=M,e.unstable_wrapCallback=function(j){var E=_;return function(){var D=_;_=E;try{return j.apply(this,arguments)}finally{_=D}}}})(kc);xc.exports=kc;var ad=xc.exports;/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.min.js
|
|
28
28
|
*
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var
|
|
33
|
+
*/var ld=Q,Xe=ad;function $(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 Ec=new Set,gi={};function ur(e,t){Mr(e,t),Mr(e+"Capture",t)}function Mr(e,t){for(gi[e]=t,e=0;e<t.length;e++)Ec.add(t[e])}var kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Un=Object.prototype.hasOwnProperty,cd=/^[: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]*$/,Ga={},Xa={};function ud(e){return Un.call(Xa,e)?!0:Un.call(Ga,e)?!1:cd.test(e)?Xa[e]=!0:(Ga[e]=!0,!1)}function hd(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 dd(e,t,r,i){if(t===null||typeof t>"u"||hd(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 He(e,t,r,i,n,h,m){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=i,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=h,this.removeEmptyString=m}var Pe={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Pe[e]=new He(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Pe[t]=new He(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Pe[e]=new He(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Pe[e]=new He(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){Pe[e]=new He(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Pe[e]=new He(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Pe[e]=new He(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Pe[e]=new He(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Pe[e]=new He(e,5,!1,e.toLowerCase(),null,!1,!1)});var Qo=/[\-:]([a-z])/g;function Yo(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(Qo,Yo);Pe[t]=new He(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(Qo,Yo);Pe[t]=new He(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(Qo,Yo);Pe[t]=new He(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Pe[e]=new He(e,1,!1,e.toLowerCase(),null,!1,!1)});Pe.xlinkHref=new He("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Pe[e]=new He(e,1,!1,e.toLowerCase(),null,!0,!0)});function Jo(e,t,r,i){var n=Pe.hasOwnProperty(t)?Pe[t]:null;(n!==null?n.type!==0:i||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(dd(t,r,n,i)&&(r=null),i||n===null?ud(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):n.mustUseProperty?e[n.propertyName]=r===null?n.type===3?!1:"":r:(t=n.attributeName,i=n.attributeNamespace,r===null?e.removeAttribute(t):(n=n.type,r=n===3||n===4&&r===!0?"":""+r,i?e.setAttributeNS(i,t,r):e.setAttribute(t,r))))}var Dt=ld.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Ki=Symbol.for("react.element"),fr=Symbol.for("react.portal"),pr=Symbol.for("react.fragment"),Zo=Symbol.for("react.strict_mode"),$n=Symbol.for("react.profiler"),bc=Symbol.for("react.provider"),Lc=Symbol.for("react.context"),ea=Symbol.for("react.forward_ref"),Kn=Symbol.for("react.suspense"),Vn=Symbol.for("react.suspense_list"),ta=Symbol.for("react.memo"),Mt=Symbol.for("react.lazy"),Dc=Symbol.for("react.offscreen"),Qa=Symbol.iterator;function qr(e){return e===null||typeof e!="object"?null:(e=Qa&&e[Qa]||e["@@iterator"],typeof e=="function"?e:null)}var me=Object.assign,vn;function ri(e){if(vn===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);vn=t&&t[1]||""}return`
|
|
34
34
|
`+vn+e}var gn=!1;function mn(e,t){if(!e||gn)return"";gn=!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 n=f.stack.split(`
|
|
35
35
|
`),h=i.stack.split(`
|
|
36
36
|
`),m=n.length-1,a=h.length-1;1<=m&&0<=a&&n[m]!==h[a];)a--;for(;1<=m&&0<=a;m--,a--)if(n[m]!==h[a]){if(m!==1||a!==1)do if(m--,a--,0>a||n[m]!==h[a]){var c=`
|
|
37
|
-
`+n[m].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=m&&0<=a);break}}}finally{gn=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ri(e):""}function dd(e){switch(e.tag){case 5:return ri(e.type);case 16:return ri("Lazy");case 13:return ri("Suspense");case 19:return ri("SuspenseList");case 0:case 2:case 15:return e=mn(e.type,!1),e;case 11:return e=mn(e.type.render,!1),e;case 1:return e=mn(e.type,!0),e;default:return""}}function qn(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 pr:return"Fragment";case fr:return"Portal";case $n:return"Profiler";case Jo:return"StrictMode";case Kn:return"Suspense";case Vn:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case bc:return(e.displayName||"Context")+".Consumer";case Ec:return(e._context.displayName||"Context")+".Provider";case Zo:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ea:return t=e.displayName||null,t!==null?t:qn(e.type)||"Memo";case Mt:t=e._payload,e=e._init;try{return qn(e(t))}catch{}}return null}function fd(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 qn(t);case 8:return t===Jo?"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 Vt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Dc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function pd(e){var t=Dc(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 n=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(m){i=""+m,h.call(this,m)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(m){i=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vi(e){e._valueTracker||(e._valueTracker=pd(e))}function Rc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Dc(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Cs(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 Gn(e,t){var r=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Qa(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=Vt(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 Tc(e,t){t=t.checked,t!=null&&Yo(e,"checked",t,!1)}function Xn(e,t){Tc(e,t);var r=Vt(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")?Qn(e,t.type,r):t.hasOwnProperty("defaultValue")&&Qn(e,t.type,Vt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ya(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 Qn(e,t,r){(t!=="number"||Cs(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ii=Array.isArray;function br(e,t,r,i){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&i&&(e[r].defaultSelected=!0)}else{for(r=""+Vt(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,i&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Yn(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ja(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error($(92));if(ii(r)){if(1<r.length)throw Error($(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Vt(r)}}function Pc(e,t){var r=Vt(t.value),i=Vt(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 Za(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Mc(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 Jn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Mc(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qi,Ac=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qi=qi||document.createElement("div"),qi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mi(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var oi={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},_d=["Webkit","ms","Moz","O"];Object.keys(oi).forEach(function(e){_d.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),oi[t]=oi[e]})});function Oc(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||oi.hasOwnProperty(e)&&oi[e]?(""+t).trim():t+"px"}function Bc(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,n=Oc(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,n):e[r]=n}}var vd=me({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 Zn(e,t){if(t){if(vd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function eo(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 to=null;function ta(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ro=null,Lr=null,Dr=null;function el(e){if(e=Ni(e)){if(typeof ro!="function")throw Error($(280));var t=e.stateNode;t&&(t=Js(t),ro(e.stateNode,e.type,t))}}function Ic(e){Lr?Dr?Dr.push(e):Dr=[e]:Lr=e}function jc(){if(Lr){var e=Lr,t=Dr;if(Dr=Lr=null,el(e),t)for(e=0;e<t.length;e++)el(t[e])}}function Nc(e,t){return e(t)}function Hc(){}var Sn=!1;function Fc(e,t,r){if(Sn)return e(t,r);Sn=!0;try{return Nc(e,t,r)}finally{Sn=!1,(Lr!==null||Dr!==null)&&(Hc(),jc())}}function Si(e,t){var r=e.stateNode;if(r===null)return null;var i=Js(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($(231,t,typeof r));return r}var io=!1;if(kt)try{var Gr={};Object.defineProperty(Gr,"passive",{get:function(){io=!0}}),window.addEventListener("test",Gr,Gr),window.removeEventListener("test",Gr,Gr)}catch{io=!1}function gd(e,t,r,i,n,h,m,a,c){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(g){this.onError(g)}}var ai=!1,xs=null,ks=!1,so=null,md={onError:function(e){ai=!0,xs=e}};function Sd(e,t,r,i,n,h,m,a,c){ai=!1,xs=null,gd.apply(md,arguments)}function yd(e,t,r,i,n,h,m,a,c){if(Sd.apply(this,arguments),ai){if(ai){var f=xs;ai=!1,xs=null}else throw Error($(198));ks||(ks=!0,so=f)}}function hr(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 zc(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 tl(e){if(hr(e)!==e)throw Error($(188))}function wd(e){var t=e.alternate;if(!t){if(t=hr(e),t===null)throw Error($(188));return t!==e?null:e}for(var r=e,i=t;;){var n=r.return;if(n===null)break;var h=n.alternate;if(h===null){if(i=n.return,i!==null){r=i;continue}break}if(n.child===h.child){for(h=n.child;h;){if(h===r)return tl(n),e;if(h===i)return tl(n),t;h=h.sibling}throw Error($(188))}if(r.return!==i.return)r=n,i=h;else{for(var m=!1,a=n.child;a;){if(a===r){m=!0,r=n,i=h;break}if(a===i){m=!0,i=n,r=h;break}a=a.sibling}if(!m){for(a=h.child;a;){if(a===r){m=!0,r=h,i=n;break}if(a===i){m=!0,i=h,r=n;break}a=a.sibling}if(!m)throw Error($(189))}}if(r.alternate!==i)throw Error($(190))}if(r.tag!==3)throw Error($(188));return r.stateNode.current===r?e:t}function Wc(e){return e=wd(e),e!==null?Uc(e):null}function Uc(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Uc(e);if(t!==null)return t;e=e.sibling}return null}var $c=Xe.unstable_scheduleCallback,rl=Xe.unstable_cancelCallback,Cd=Xe.unstable_shouldYield,xd=Xe.unstable_requestPaint,we=Xe.unstable_now,kd=Xe.unstable_getCurrentPriorityLevel,ra=Xe.unstable_ImmediatePriority,Kc=Xe.unstable_UserBlockingPriority,Es=Xe.unstable_NormalPriority,Ed=Xe.unstable_LowPriority,Vc=Xe.unstable_IdlePriority,Gs=null,gt=null;function bd(e){if(gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Gs,e,void 0,(e.current.flags&128)===128)}catch{}}var ut=Math.clz32?Math.clz32:Rd,Ld=Math.log,Dd=Math.LN2;function Rd(e){return e>>>=0,e===0?32:31-(Ld(e)/Dd|0)|0}var Gi=64,Xi=4194304;function si(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 bs(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,n=e.suspendedLanes,h=e.pingedLanes,m=r&268435455;if(m!==0){var a=m&~n;a!==0?i=si(a):(h&=m,h!==0&&(i=si(h)))}else m=r&~n,m!==0?i=si(m):h!==0&&(i=si(h));if(i===0)return 0;if(t!==0&&t!==i&&!(t&n)&&(n=i&-i,h=t&-t,n>=h||n===16&&(h&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-ut(t),n=1<<r,i|=e[r],t&=~n;return i}function Td(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 Pd(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,n=e.expirationTimes,h=e.pendingLanes;0<h;){var m=31-ut(h),a=1<<m,c=n[m];c===-1?(!(a&r)||a&i)&&(n[m]=Td(a,t)):c<=t&&(e.expiredLanes|=a),h&=~a}}function no(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function qc(){var e=Gi;return Gi<<=1,!(Gi&4194240)&&(Gi=64),e}function yn(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ii(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ut(t),e[t]=r}function Md(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 n=31-ut(r),h=1<<n;t[n]=0,i[n]=-1,e[n]=-1,r&=~h}}function ia(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-ut(r),n=1<<i;n&t|e[i]&t&&(e[i]|=t),r&=~n}}var le=0;function Gc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Xc,sa,Qc,Yc,Jc,oo=!1,Qi=[],Nt=null,Ht=null,Ft=null,yi=new Map,wi=new Map,Ot=[],Ad="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 il(e,t){switch(e){case"focusin":case"focusout":Nt=null;break;case"dragenter":case"dragleave":Ht=null;break;case"mouseover":case"mouseout":Ft=null;break;case"pointerover":case"pointerout":yi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wi.delete(t.pointerId)}}function Xr(e,t,r,i,n,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:h,targetContainers:[n]},t!==null&&(t=Ni(t),t!==null&&sa(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Od(e,t,r,i,n){switch(t){case"focusin":return Nt=Xr(Nt,e,t,r,i,n),!0;case"dragenter":return Ht=Xr(Ht,e,t,r,i,n),!0;case"mouseover":return Ft=Xr(Ft,e,t,r,i,n),!0;case"pointerover":var h=n.pointerId;return yi.set(h,Xr(yi.get(h)||null,e,t,r,i,n)),!0;case"gotpointercapture":return h=n.pointerId,wi.set(h,Xr(wi.get(h)||null,e,t,r,i,n)),!0}return!1}function Zc(e){var t=Zt(e.target);if(t!==null){var r=hr(t);if(r!==null){if(t=r.tag,t===13){if(t=zc(r),t!==null){e.blockedOn=t,Jc(e.priority,function(){Qc(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 hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=ao(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);to=i,r.target.dispatchEvent(i),to=null}else return t=Ni(r),t!==null&&sa(t),e.blockedOn=r,!1;t.shift()}return!0}function sl(e,t,r){hs(e)&&r.delete(t)}function Bd(){oo=!1,Nt!==null&&hs(Nt)&&(Nt=null),Ht!==null&&hs(Ht)&&(Ht=null),Ft!==null&&hs(Ft)&&(Ft=null),yi.forEach(sl),wi.forEach(sl)}function Qr(e,t){e.blockedOn===t&&(e.blockedOn=null,oo||(oo=!0,Xe.unstable_scheduleCallback(Xe.unstable_NormalPriority,Bd)))}function Ci(e){function t(n){return Qr(n,e)}if(0<Qi.length){Qr(Qi[0],e);for(var r=1;r<Qi.length;r++){var i=Qi[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Nt!==null&&Qr(Nt,e),Ht!==null&&Qr(Ht,e),Ft!==null&&Qr(Ft,e),yi.forEach(t),wi.forEach(t),r=0;r<Ot.length;r++)i=Ot[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<Ot.length&&(r=Ot[0],r.blockedOn===null);)Zc(r),r.blockedOn===null&&Ot.shift()}var Rr=Dt.ReactCurrentBatchConfig,Ls=!0;function Id(e,t,r,i){var n=le,h=Rr.transition;Rr.transition=null;try{le=1,na(e,t,r,i)}finally{le=n,Rr.transition=h}}function jd(e,t,r,i){var n=le,h=Rr.transition;Rr.transition=null;try{le=4,na(e,t,r,i)}finally{le=n,Rr.transition=h}}function na(e,t,r,i){if(Ls){var n=ao(e,t,r,i);if(n===null)Tn(e,t,i,Ds,r),il(e,i);else if(Od(n,e,t,r,i))i.stopPropagation();else if(il(e,i),t&4&&-1<Ad.indexOf(e)){for(;n!==null;){var h=Ni(n);if(h!==null&&Xc(h),h=ao(e,t,r,i),h===null&&Tn(e,t,i,Ds,r),h===n)break;n=h}n!==null&&i.stopPropagation()}else Tn(e,t,i,null,r)}}var Ds=null;function ao(e,t,r,i){if(Ds=null,e=ta(i),e=Zt(e),e!==null)if(t=hr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=zc(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 Ds=e,null}function eu(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(kd()){case ra:return 1;case Kc:return 4;case Es:case Ed:return 16;case Vc:return 536870912;default:return 16}default:return 16}}var It=null,oa=null,ds=null;function tu(){if(ds)return ds;var e,t=oa,r=t.length,i,n="value"in It?It.value:It.textContent,h=n.length;for(e=0;e<r&&t[e]===n[e];e++);var m=r-e;for(i=1;i<=m&&t[r-i]===n[h-i];i++);return ds=n.slice(e,1<i?1-i:void 0)}function fs(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 Yi(){return!0}function nl(){return!1}function Ye(e){function t(r,i,n,h,m){this._reactName=r,this._targetInst=n,this.type=i,this.nativeEvent=h,this.target=m,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(h):h[a]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Yi:nl,this.isPropagationStopped=nl,this}return me(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=Yi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Yi)},persist:function(){},isPersistent:Yi}),t}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},aa=Ye(zr),ji=me({},zr,{view:0,detail:0}),Nd=Ye(ji),wn,Cn,Yr,Xs=me({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:la,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!==Yr&&(Yr&&e.type==="mousemove"?(wn=e.screenX-Yr.screenX,Cn=e.screenY-Yr.screenY):Cn=wn=0,Yr=e),wn)},movementY:function(e){return"movementY"in e?e.movementY:Cn}}),ol=Ye(Xs),Hd=me({},Xs,{dataTransfer:0}),Fd=Ye(Hd),zd=me({},ji,{relatedTarget:0}),xn=Ye(zd),Wd=me({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),Ud=Ye(Wd),$d=me({},zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Kd=Ye($d),Vd=me({},zr,{data:0}),al=Ye(Vd),qd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Gd={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Xd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Qd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Xd[e])?!!t[e]:!1}function la(){return Qd}var Yd=me({},ji,{key:function(e){if(e.key){var t=qd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Gd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:la,charCode:function(e){return e.type==="keypress"?fs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Jd=Ye(Yd),Zd=me({},Xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ll=Ye(Zd),ef=me({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:la}),tf=Ye(ef),rf=me({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),sf=Ye(rf),nf=me({},Xs,{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}),of=Ye(nf),af=[9,13,27,32],ca=kt&&"CompositionEvent"in window,li=null;kt&&"documentMode"in document&&(li=document.documentMode);var lf=kt&&"TextEvent"in window&&!li,ru=kt&&(!ca||li&&8<li&&11>=li),cl=" ",ul=!1;function iu(e,t){switch(e){case"keyup":return af.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function su(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _r=!1;function cf(e,t){switch(e){case"compositionend":return su(t);case"keypress":return t.which!==32?null:(ul=!0,cl);case"textInput":return e=t.data,e===cl&&ul?null:e;default:return null}}function uf(e,t){if(_r)return e==="compositionend"||!ca&&iu(e,t)?(e=tu(),ds=oa=It=null,_r=!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 ru&&t.locale!=="ko"?null:t.data;default:return null}}var hf={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 hl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hf[e.type]:t==="textarea"}function nu(e,t,r,i){Ic(i),t=Rs(t,"onChange"),0<t.length&&(r=new aa("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var ci=null,xi=null;function df(e){vu(e,0)}function Qs(e){var t=mr(e);if(Rc(t))return e}function ff(e,t){if(e==="change")return t}var ou=!1;if(kt){var kn;if(kt){var En="oninput"in document;if(!En){var dl=document.createElement("div");dl.setAttribute("oninput","return;"),En=typeof dl.oninput=="function"}kn=En}else kn=!1;ou=kn&&(!document.documentMode||9<document.documentMode)}function fl(){ci&&(ci.detachEvent("onpropertychange",au),xi=ci=null)}function au(e){if(e.propertyName==="value"&&Qs(xi)){var t=[];nu(t,xi,e,ta(e)),Fc(df,t)}}function pf(e,t,r){e==="focusin"?(fl(),ci=t,xi=r,ci.attachEvent("onpropertychange",au)):e==="focusout"&&fl()}function _f(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qs(xi)}function vf(e,t){if(e==="click")return Qs(t)}function gf(e,t){if(e==="input"||e==="change")return Qs(t)}function mf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dt=typeof Object.is=="function"?Object.is:mf;function ki(e,t){if(dt(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 n=r[i];if(!Un.call(t,n)||!dt(e[n],t[n]))return!1}return!0}function pl(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function _l(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 lu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?lu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function cu(){for(var e=window,t=Cs();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Cs(e.document)}return t}function ua(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 Sf(e){var t=cu(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&lu(r.ownerDocument.documentElement,r)){if(i!==null&&ua(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 n=r.textContent.length,h=Math.min(i.start,n);i=i.end===void 0?h:Math.min(i.end,n),!e.extend&&h>i&&(n=i,i=h,h=n),n=_l(r,h);var m=_l(r,i);n&&m&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),h>i?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.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 yf=kt&&"documentMode"in document&&11>=document.documentMode,vr=null,lo=null,ui=null,co=!1;function vl(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;co||vr==null||vr!==Cs(i)||(i=vr,"selectionStart"in i&&ua(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}),ui&&ki(ui,i)||(ui=i,i=Rs(lo,"onSelect"),0<i.length&&(t=new aa("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=vr)))}function Ji(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var gr={animationend:Ji("Animation","AnimationEnd"),animationiteration:Ji("Animation","AnimationIteration"),animationstart:Ji("Animation","AnimationStart"),transitionend:Ji("Transition","TransitionEnd")},bn={},uu={};kt&&(uu=document.createElement("div").style,"AnimationEvent"in window||(delete gr.animationend.animation,delete gr.animationiteration.animation,delete gr.animationstart.animation),"TransitionEvent"in window||delete gr.transitionend.transition);function Ys(e){if(bn[e])return bn[e];if(!gr[e])return e;var t=gr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in uu)return bn[e]=t[r];return e}var hu=Ys("animationend"),du=Ys("animationiteration"),fu=Ys("animationstart"),pu=Ys("transitionend"),_u=new Map,gl="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 Gt(e,t){_u.set(e,t),ur(t,[e])}for(var Ln=0;Ln<gl.length;Ln++){var Dn=gl[Ln],wf=Dn.toLowerCase(),Cf=Dn[0].toUpperCase()+Dn.slice(1);Gt(wf,"on"+Cf)}Gt(hu,"onAnimationEnd");Gt(du,"onAnimationIteration");Gt(fu,"onAnimationStart");Gt("dblclick","onDoubleClick");Gt("focusin","onFocus");Gt("focusout","onBlur");Gt(pu,"onTransitionEnd");Mr("onMouseEnter",["mouseout","mouseover"]);Mr("onMouseLeave",["mouseout","mouseover"]);Mr("onPointerEnter",["pointerout","pointerover"]);Mr("onPointerLeave",["pointerout","pointerover"]);ur("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ur("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ur("onBeforeInput",["compositionend","keypress","textInput","paste"]);ur("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ur("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ur("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ni="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(" "),xf=new Set("cancel close invalid load scroll toggle".split(" ").concat(ni));function ml(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,yd(i,t,void 0,e),e.currentTarget=null}function vu(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],n=i.event;i=i.listeners;e:{var h=void 0;if(t)for(var m=i.length-1;0<=m;m--){var a=i[m],c=a.instance,f=a.currentTarget;if(a=a.listener,c!==h&&n.isPropagationStopped())break e;ml(n,a,f),h=c}else for(m=0;m<i.length;m++){if(a=i[m],c=a.instance,f=a.currentTarget,a=a.listener,c!==h&&n.isPropagationStopped())break e;ml(n,a,f),h=c}}}if(ks)throw e=so,ks=!1,so=null,e}function he(e,t){var r=t[_o];r===void 0&&(r=t[_o]=new Set);var i=e+"__bubble";r.has(i)||(gu(t,e,2,!1),r.add(i))}function Rn(e,t,r){var i=0;t&&(i|=4),gu(r,e,i,t)}var Zi="_reactListening"+Math.random().toString(36).slice(2);function Ei(e){if(!e[Zi]){e[Zi]=!0,kc.forEach(function(r){r!=="selectionchange"&&(xf.has(r)||Rn(r,!1,e),Rn(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zi]||(t[Zi]=!0,Rn("selectionchange",!1,t))}}function gu(e,t,r,i){switch(eu(t)){case 1:var n=Id;break;case 4:n=jd;break;default:n=na}r=n.bind(null,t,r,e),n=void 0,!io||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),i?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function Tn(e,t,r,i,n){var h=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var m=i.tag;if(m===3||m===4){var a=i.stateNode.containerInfo;if(a===n||a.nodeType===8&&a.parentNode===n)break;if(m===4)for(m=i.return;m!==null;){var c=m.tag;if((c===3||c===4)&&(c=m.stateNode.containerInfo,c===n||c.nodeType===8&&c.parentNode===n))return;m=m.return}for(;a!==null;){if(m=Zt(a),m===null)return;if(c=m.tag,c===5||c===6){i=h=m;continue e}a=a.parentNode}}i=i.return}Fc(function(){var f=h,g=ta(r),d=[];e:{var p=_u.get(e);if(p!==void 0){var S=aa,w=e;switch(e){case"keypress":if(fs(r)===0)break e;case"keydown":case"keyup":S=Jd;break;case"focusin":w="focus",S=xn;break;case"focusout":w="blur",S=xn;break;case"beforeblur":case"afterblur":S=xn;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=ol;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=Fd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=tf;break;case hu:case du:case fu:S=Ud;break;case pu:S=sf;break;case"scroll":S=Nd;break;case"wheel":S=of;break;case"copy":case"cut":case"paste":S=Kd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=ll}var v=(t&4)!==0,u=!v&&e==="scroll",o=v?p!==null?p+"Capture":null:p;v=[];for(var s=f,l;s!==null;){l=s;var _=l.stateNode;if(l.tag===5&&_!==null&&(l=_,o!==null&&(_=Si(s,o),_!=null&&v.push(bi(s,_,l)))),u)break;s=s.return}0<v.length&&(p=new S(p,w,null,r,g),d.push({event:p,listeners:v}))}}if(!(t&7)){e:{if(p=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",p&&r!==to&&(w=r.relatedTarget||r.fromElement)&&(Zt(w)||w[Et]))break e;if((S||p)&&(p=g.window===g?g:(p=g.ownerDocument)?p.defaultView||p.parentWindow:window,S?(w=r.relatedTarget||r.toElement,S=f,w=w?Zt(w):null,w!==null&&(u=hr(w),w!==u||w.tag!==5&&w.tag!==6)&&(w=null)):(S=null,w=f),S!==w)){if(v=ol,_="onMouseLeave",o="onMouseEnter",s="mouse",(e==="pointerout"||e==="pointerover")&&(v=ll,_="onPointerLeave",o="onPointerEnter",s="pointer"),u=S==null?p:mr(S),l=w==null?p:mr(w),p=new v(_,s+"leave",S,r,g),p.target=u,p.relatedTarget=l,_=null,Zt(g)===f&&(v=new v(o,s+"enter",w,r,g),v.target=l,v.relatedTarget=u,_=v),u=_,S&&w)t:{for(v=S,o=w,s=0,l=v;l;l=dr(l))s++;for(l=0,_=o;_;_=dr(_))l++;for(;0<s-l;)v=dr(v),s--;for(;0<l-s;)o=dr(o),l--;for(;s--;){if(v===o||o!==null&&v===o.alternate)break t;v=dr(v),o=dr(o)}v=null}else v=null;S!==null&&Sl(d,p,S,v,!1),w!==null&&u!==null&&Sl(d,u,w,v,!0)}}e:{if(p=f?mr(f):window,S=p.nodeName&&p.nodeName.toLowerCase(),S==="select"||S==="input"&&p.type==="file")var C=ff;else if(hl(p))if(ou)C=gf;else{C=_f;var x=pf}else(S=p.nodeName)&&S.toLowerCase()==="input"&&(p.type==="checkbox"||p.type==="radio")&&(C=vf);if(C&&(C=C(e,f))){nu(d,C,r,g);break e}x&&x(e,p,f),e==="focusout"&&(x=p._wrapperState)&&x.controlled&&p.type==="number"&&Qn(p,"number",p.value)}switch(x=f?mr(f):window,e){case"focusin":(hl(x)||x.contentEditable==="true")&&(vr=x,lo=f,ui=null);break;case"focusout":ui=lo=vr=null;break;case"mousedown":co=!0;break;case"contextmenu":case"mouseup":case"dragend":co=!1,vl(d,r,g);break;case"selectionchange":if(yf)break;case"keydown":case"keyup":vl(d,r,g)}var k;if(ca)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else _r?iu(e,r)&&(y="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(y="onCompositionStart");y&&(ru&&r.locale!=="ko"&&(_r||y!=="onCompositionStart"?y==="onCompositionEnd"&&_r&&(k=tu()):(It=g,oa="value"in It?It.value:It.textContent,_r=!0)),x=Rs(f,y),0<x.length&&(y=new al(y,e,null,r,g),d.push({event:y,listeners:x}),k?y.data=k:(k=su(r),k!==null&&(y.data=k)))),(k=lf?cf(e,r):uf(e,r))&&(f=Rs(f,"onBeforeInput"),0<f.length&&(g=new al("onBeforeInput","beforeinput",null,r,g),d.push({event:g,listeners:f}),g.data=k))}vu(d,t)})}function bi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Rs(e,t){for(var r=t+"Capture",i=[];e!==null;){var n=e,h=n.stateNode;n.tag===5&&h!==null&&(n=h,h=Si(e,r),h!=null&&i.unshift(bi(e,h,n)),h=Si(e,t),h!=null&&i.push(bi(e,h,n))),e=e.return}return i}function dr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Sl(e,t,r,i,n){for(var h=t._reactName,m=[];r!==null&&r!==i;){var a=r,c=a.alternate,f=a.stateNode;if(c!==null&&c===i)break;a.tag===5&&f!==null&&(a=f,n?(c=Si(r,h),c!=null&&m.unshift(bi(r,c,a))):n||(c=Si(r,h),c!=null&&m.push(bi(r,c,a)))),r=r.return}m.length!==0&&e.push({event:t,listeners:m})}var kf=/\r\n?/g,Ef=/\u0000|\uFFFD/g;function yl(e){return(typeof e=="string"?e:""+e).replace(kf,`
|
|
38
|
-
`).replace(Ef,"")}function es(e,t,r){if(t=yl(t),yl(e)!==t&&r)throw Error($(425))}function Ts(){}var uo=null,ho=null;function fo(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 po=typeof setTimeout=="function"?setTimeout:void 0,bf=typeof clearTimeout=="function"?clearTimeout:void 0,wl=typeof Promise=="function"?Promise:void 0,Lf=typeof queueMicrotask=="function"?queueMicrotask:typeof wl<"u"?function(e){return wl.resolve(null).then(e).catch(Df)}:po;function Df(e){setTimeout(function(){throw e})}function Pn(e,t){var r=t,i=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(i===0){e.removeChild(n),Ci(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=n}while(r);Ci(t)}function zt(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 Cl(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 Wr=Math.random().toString(36).slice(2),vt="__reactFiber$"+Wr,Li="__reactProps$"+Wr,Et="__reactContainer$"+Wr,_o="__reactEvents$"+Wr,Rf="__reactListeners$"+Wr,Tf="__reactHandles$"+Wr;function Zt(e){var t=e[vt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Et]||r[vt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Cl(e);e!==null;){if(r=e[vt])return r;e=Cl(e)}return t}e=r,r=e.parentNode}return null}function Ni(e){return e=e[vt]||e[Et],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Js(e){return e[Li]||null}var vo=[],Sr=-1;function Xt(e){return{current:e}}function fe(e){0>Sr||(e.current=vo[Sr],vo[Sr]=null,Sr--)}function ue(e,t){Sr++,vo[Sr]=e.current,e.current=t}var qt={},Be=Xt(qt),Ue=Xt(!1),nr=qt;function Ar(e,t){var r=e.type.contextTypes;if(!r)return qt;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var n={},h;for(h in r)n[h]=t[h];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function $e(e){return e=e.childContextTypes,e!=null}function Ps(){fe(Ue),fe(Be)}function xl(e,t,r){if(Be.current!==qt)throw Error($(168));ue(Be,t),ue(Ue,r)}function mu(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var n in i)if(!(n in t))throw Error($(108,fd(e)||"Unknown",n));return me({},r,i)}function Ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,nr=Be.current,ue(Be,e),ue(Ue,Ue.current),!0}function kl(e,t,r){var i=e.stateNode;if(!i)throw Error($(169));r?(e=mu(e,t,nr),i.__reactInternalMemoizedMergedChildContext=e,fe(Ue),fe(Be),ue(Be,e)):fe(Ue),ue(Ue,r)}var yt=null,Zs=!1,Mn=!1;function Su(e){yt===null?yt=[e]:yt.push(e)}function Pf(e){Zs=!0,Su(e)}function Qt(){if(!Mn&&yt!==null){Mn=!0;var e=0,t=le;try{var r=yt;for(le=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}yt=null,Zs=!1}catch(n){throw yt!==null&&(yt=yt.slice(e+1)),$c(ra,Qt),n}finally{le=t,Mn=!1}}return null}var yr=[],wr=0,As=null,Os=0,et=[],tt=0,or=null,wt=1,Ct="";function Yt(e,t){yr[wr++]=Os,yr[wr++]=As,As=e,Os=t}function yu(e,t,r){et[tt++]=wt,et[tt++]=Ct,et[tt++]=or,or=e;var i=wt;e=Ct;var n=32-ut(i)-1;i&=~(1<<n),r+=1;var h=32-ut(t)+n;if(30<h){var m=n-n%5;h=(i&(1<<m)-1).toString(32),i>>=m,n-=m,wt=1<<32-ut(t)+n|r<<n|i,Ct=h+e}else wt=1<<h|r<<n|i,Ct=e}function ha(e){e.return!==null&&(Yt(e,1),yu(e,1,0))}function da(e){for(;e===As;)As=yr[--wr],yr[wr]=null,Os=yr[--wr],yr[wr]=null;for(;e===or;)or=et[--tt],et[tt]=null,Ct=et[--tt],et[tt]=null,wt=et[--tt],et[tt]=null}var Ge=null,qe=null,pe=!1,ct=null;function wu(e,t){var r=rt(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 El(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,Ge=e,qe=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=or!==null?{id:wt,overflow:Ct}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=rt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ge=e,qe=null,!0):!1;default:return!1}}function go(e){return(e.mode&1)!==0&&(e.flags&128)===0}function mo(e){if(pe){var t=qe;if(t){var r=t;if(!El(e,t)){if(go(e))throw Error($(418));t=zt(r.nextSibling);var i=Ge;t&&El(e,t)?wu(i,r):(e.flags=e.flags&-4097|2,pe=!1,Ge=e)}}else{if(go(e))throw Error($(418));e.flags=e.flags&-4097|2,pe=!1,Ge=e}}}function bl(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function ts(e){if(e!==Ge)return!1;if(!pe)return bl(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!fo(e.type,e.memoizedProps)),t&&(t=qe)){if(go(e))throw Cu(),Error($(418));for(;t;)wu(e,t),t=zt(t.nextSibling)}if(bl(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){qe=zt(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}qe=null}}else qe=Ge?zt(e.stateNode.nextSibling):null;return!0}function Cu(){for(var e=qe;e;)e=zt(e.nextSibling)}function Or(){qe=Ge=null,pe=!1}function fa(e){ct===null?ct=[e]:ct.push(e)}var Mf=Dt.ReactCurrentBatchConfig;function Jr(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($(309));var i=r.stateNode}if(!i)throw Error($(147,e));var n=i,h=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===h?t.ref:(t=function(m){var a=n.refs;m===null?delete a[h]:a[h]=m},t._stringRef=h,t)}if(typeof e!="string")throw Error($(284));if(!r._owner)throw Error($(290,e))}return e}function rs(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ll(e){var t=e._init;return t(e._payload)}function xu(e){function t(o,s){if(e){var l=o.deletions;l===null?(o.deletions=[s],o.flags|=16):l.push(s)}}function r(o,s){if(!e)return null;for(;s!==null;)t(o,s),s=s.sibling;return null}function i(o,s){for(o=new Map;s!==null;)s.key!==null?o.set(s.key,s):o.set(s.index,s),s=s.sibling;return o}function n(o,s){return o=Kt(o,s),o.index=0,o.sibling=null,o}function h(o,s,l){return o.index=l,e?(l=o.alternate,l!==null?(l=l.index,l<s?(o.flags|=2,s):l):(o.flags|=2,s)):(o.flags|=1048576,s)}function m(o){return e&&o.alternate===null&&(o.flags|=2),o}function a(o,s,l,_){return s===null||s.tag!==6?(s=Hn(l,o.mode,_),s.return=o,s):(s=n(s,l),s.return=o,s)}function c(o,s,l,_){var C=l.type;return C===pr?g(o,s,l.props.children,_,l.key):s!==null&&(s.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Mt&&Ll(C)===s.type)?(_=n(s,l.props),_.ref=Jr(o,s,l),_.return=o,_):(_=ys(l.type,l.key,l.props,null,o.mode,_),_.ref=Jr(o,s,l),_.return=o,_)}function f(o,s,l,_){return s===null||s.tag!==4||s.stateNode.containerInfo!==l.containerInfo||s.stateNode.implementation!==l.implementation?(s=Fn(l,o.mode,_),s.return=o,s):(s=n(s,l.children||[]),s.return=o,s)}function g(o,s,l,_,C){return s===null||s.tag!==7?(s=ir(l,o.mode,_,C),s.return=o,s):(s=n(s,l),s.return=o,s)}function d(o,s,l){if(typeof s=="string"&&s!==""||typeof s=="number")return s=Hn(""+s,o.mode,l),s.return=o,s;if(typeof s=="object"&&s!==null){switch(s.$$typeof){case Ki:return l=ys(s.type,s.key,s.props,null,o.mode,l),l.ref=Jr(o,null,s),l.return=o,l;case fr:return s=Fn(s,o.mode,l),s.return=o,s;case Mt:var _=s._init;return d(o,_(s._payload),l)}if(ii(s)||qr(s))return s=ir(s,o.mode,l,null),s.return=o,s;rs(o,s)}return null}function p(o,s,l,_){var C=s!==null?s.key:null;if(typeof l=="string"&&l!==""||typeof l=="number")return C!==null?null:a(o,s,""+l,_);if(typeof l=="object"&&l!==null){switch(l.$$typeof){case Ki:return l.key===C?c(o,s,l,_):null;case fr:return l.key===C?f(o,s,l,_):null;case Mt:return C=l._init,p(o,s,C(l._payload),_)}if(ii(l)||qr(l))return C!==null?null:g(o,s,l,_,null);rs(o,l)}return null}function S(o,s,l,_,C){if(typeof _=="string"&&_!==""||typeof _=="number")return o=o.get(l)||null,a(s,o,""+_,C);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Ki:return o=o.get(_.key===null?l:_.key)||null,c(s,o,_,C);case fr:return o=o.get(_.key===null?l:_.key)||null,f(s,o,_,C);case Mt:var x=_._init;return S(o,s,l,x(_._payload),C)}if(ii(_)||qr(_))return o=o.get(l)||null,g(s,o,_,C,null);rs(s,_)}return null}function w(o,s,l,_){for(var C=null,x=null,k=s,y=s=0,b=null;k!==null&&y<l.length;y++){k.index>y?(b=k,k=null):b=k.sibling;var R=p(o,k,l[y],_);if(R===null){k===null&&(k=b);break}e&&k&&R.alternate===null&&t(o,k),s=h(R,s,y),x===null?C=R:x.sibling=R,x=R,k=b}if(y===l.length)return r(o,k),pe&&Yt(o,y),C;if(k===null){for(;y<l.length;y++)k=d(o,l[y],_),k!==null&&(s=h(k,s,y),x===null?C=k:x.sibling=k,x=k);return pe&&Yt(o,y),C}for(k=i(o,k);y<l.length;y++)b=S(k,o,y,l[y],_),b!==null&&(e&&b.alternate!==null&&k.delete(b.key===null?y:b.key),s=h(b,s,y),x===null?C=b:x.sibling=b,x=b);return e&&k.forEach(function(M){return t(o,M)}),pe&&Yt(o,y),C}function v(o,s,l,_){var C=qr(l);if(typeof C!="function")throw Error($(150));if(l=C.call(l),l==null)throw Error($(151));for(var x=C=null,k=s,y=s=0,b=null,R=l.next();k!==null&&!R.done;y++,R=l.next()){k.index>y?(b=k,k=null):b=k.sibling;var M=p(o,k,R.value,_);if(M===null){k===null&&(k=b);break}e&&k&&M.alternate===null&&t(o,k),s=h(M,s,y),x===null?C=M:x.sibling=M,x=M,k=b}if(R.done)return r(o,k),pe&&Yt(o,y),C;if(k===null){for(;!R.done;y++,R=l.next())R=d(o,R.value,_),R!==null&&(s=h(R,s,y),x===null?C=R:x.sibling=R,x=R);return pe&&Yt(o,y),C}for(k=i(o,k);!R.done;y++,R=l.next())R=S(k,o,y,R.value,_),R!==null&&(e&&R.alternate!==null&&k.delete(R.key===null?y:R.key),s=h(R,s,y),x===null?C=R:x.sibling=R,x=R);return e&&k.forEach(function(B){return t(o,B)}),pe&&Yt(o,y),C}function u(o,s,l,_){if(typeof l=="object"&&l!==null&&l.type===pr&&l.key===null&&(l=l.props.children),typeof l=="object"&&l!==null){switch(l.$$typeof){case Ki:e:{for(var C=l.key,x=s;x!==null;){if(x.key===C){if(C=l.type,C===pr){if(x.tag===7){r(o,x.sibling),s=n(x,l.props.children),s.return=o,o=s;break e}}else if(x.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Mt&&Ll(C)===x.type){r(o,x.sibling),s=n(x,l.props),s.ref=Jr(o,x,l),s.return=o,o=s;break e}r(o,x);break}else t(o,x);x=x.sibling}l.type===pr?(s=ir(l.props.children,o.mode,_,l.key),s.return=o,o=s):(_=ys(l.type,l.key,l.props,null,o.mode,_),_.ref=Jr(o,s,l),_.return=o,o=_)}return m(o);case fr:e:{for(x=l.key;s!==null;){if(s.key===x)if(s.tag===4&&s.stateNode.containerInfo===l.containerInfo&&s.stateNode.implementation===l.implementation){r(o,s.sibling),s=n(s,l.children||[]),s.return=o,o=s;break e}else{r(o,s);break}else t(o,s);s=s.sibling}s=Fn(l,o.mode,_),s.return=o,o=s}return m(o);case Mt:return x=l._init,u(o,s,x(l._payload),_)}if(ii(l))return w(o,s,l,_);if(qr(l))return v(o,s,l,_);rs(o,l)}return typeof l=="string"&&l!==""||typeof l=="number"?(l=""+l,s!==null&&s.tag===6?(r(o,s.sibling),s=n(s,l),s.return=o,o=s):(r(o,s),s=Hn(l,o.mode,_),s.return=o,o=s),m(o)):r(o,s)}return u}var Br=xu(!0),ku=xu(!1),Bs=Xt(null),Is=null,Cr=null,pa=null;function _a(){pa=Cr=Is=null}function va(e){var t=Bs.current;fe(Bs),e._currentValue=t}function So(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 Tr(e,t){Is=e,pa=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(We=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(pa!==e)if(e={context:e,memoizedValue:t,next:null},Cr===null){if(Is===null)throw Error($(308));Cr=e,Is.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var er=null;function ga(e){er===null?er=[e]:er.push(e)}function Eu(e,t,r,i){var n=t.interleaved;return n===null?(r.next=r,ga(t)):(r.next=n.next,n.next=r),t.interleaved=r,bt(e,i)}function bt(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 At=!1;function ma(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bu(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 xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wt(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,ae&2){var n=i.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),i.pending=t,bt(e,r)}return n=i.interleaved,n===null?(t.next=t,ga(i)):(t.next=n.next,n.next=t),i.interleaved=t,bt(e,r)}function ps(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,ia(e,r)}}function Dl(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var n=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var m={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};h===null?n=h=m:h=h.next=m,r=r.next}while(r!==null);h===null?n=h=t:h=h.next=t}else n=h=t;r={baseState:i.baseState,firstBaseUpdate:n,lastBaseUpdate:h,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 js(e,t,r,i){var n=e.updateQueue;At=!1;var h=n.firstBaseUpdate,m=n.lastBaseUpdate,a=n.shared.pending;if(a!==null){n.shared.pending=null;var c=a,f=c.next;c.next=null,m===null?h=f:m.next=f,m=c;var g=e.alternate;g!==null&&(g=g.updateQueue,a=g.lastBaseUpdate,a!==m&&(a===null?g.firstBaseUpdate=f:a.next=f,g.lastBaseUpdate=c))}if(h!==null){var d=n.baseState;m=0,g=f=c=null,a=h;do{var p=a.lane,S=a.eventTime;if((i&p)===p){g!==null&&(g=g.next={eventTime:S,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,v=a;switch(p=t,S=r,v.tag){case 1:if(w=v.payload,typeof w=="function"){d=w.call(S,d,p);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,p=typeof w=="function"?w.call(S,d,p):w,p==null)break e;d=me({},d,p);break e;case 2:At=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=n.effects,p===null?n.effects=[a]:p.push(a))}else S={eventTime:S,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},g===null?(f=g=S,c=d):g=g.next=S,m|=p;if(a=a.next,a===null){if(a=n.shared.pending,a===null)break;p=a,a=p.next,p.next=null,n.lastBaseUpdate=p,n.shared.pending=null}}while(!0);if(g===null&&(c=d),n.baseState=c,n.firstBaseUpdate=f,n.lastBaseUpdate=g,t=n.shared.interleaved,t!==null){n=t;do m|=n.lane,n=n.next;while(n!==t)}else h===null&&(n.shared.lanes=0);lr|=m,e.lanes=m,e.memoizedState=d}}function Rl(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],n=i.callback;if(n!==null){if(i.callback=null,i=r,typeof n!="function")throw Error($(191,n));n.call(i)}}}var Hi={},mt=Xt(Hi),Di=Xt(Hi),Ri=Xt(Hi);function tr(e){if(e===Hi)throw Error($(174));return e}function Sa(e,t){switch(ue(Ri,t),ue(Di,e),ue(mt,Hi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jn(t,e)}fe(mt),ue(mt,t)}function Ir(){fe(mt),fe(Di),fe(Ri)}function Lu(e){tr(Ri.current);var t=tr(mt.current),r=Jn(t,e.type);t!==r&&(ue(Di,e),ue(mt,r))}function ya(e){Di.current===e&&(fe(mt),fe(Di))}var ve=Xt(0);function Ns(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 An=[];function wa(){for(var e=0;e<An.length;e++)An[e]._workInProgressVersionPrimary=null;An.length=0}var _s=Dt.ReactCurrentDispatcher,On=Dt.ReactCurrentBatchConfig,ar=0,ge=null,xe=null,Ee=null,Hs=!1,hi=!1,Ti=0,Af=0;function Me(){throw Error($(321))}function Ca(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!dt(e[r],t[r]))return!1;return!0}function xa(e,t,r,i,n,h){if(ar=h,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_s.current=e===null||e.memoizedState===null?jf:Nf,e=r(i,n),hi){h=0;do{if(hi=!1,Ti=0,25<=h)throw Error($(301));h+=1,Ee=xe=null,t.updateQueue=null,_s.current=Hf,e=r(i,n)}while(hi)}if(_s.current=Fs,t=xe!==null&&xe.next!==null,ar=0,Ee=xe=ge=null,Hs=!1,t)throw Error($(300));return e}function ka(){var e=Ti!==0;return Ti=0,e}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?ge.memoizedState=Ee=e:Ee=Ee.next=e,Ee}function nt(){if(xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=xe.next;var t=Ee===null?ge.memoizedState:Ee.next;if(t!==null)Ee=t,xe=e;else{if(e===null)throw Error($(310));xe=e,e={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},Ee===null?ge.memoizedState=Ee=e:Ee=Ee.next=e}return Ee}function Pi(e,t){return typeof t=="function"?t(e):t}function Bn(e){var t=nt(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var i=xe,n=i.baseQueue,h=r.pending;if(h!==null){if(n!==null){var m=n.next;n.next=h.next,h.next=m}i.baseQueue=n=h,r.pending=null}if(n!==null){h=n.next,i=i.baseState;var a=m=null,c=null,f=h;do{var g=f.lane;if((ar&g)===g)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 d={lane:g,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};c===null?(a=c=d,m=i):c=c.next=d,ge.lanes|=g,lr|=g}f=f.next}while(f!==null&&f!==h);c===null?m=i:c.next=a,dt(i,t.memoizedState)||(We=!0),t.memoizedState=i,t.baseState=m,t.baseQueue=c,r.lastRenderedState=i}if(e=r.interleaved,e!==null){n=e;do h=n.lane,ge.lanes|=h,lr|=h,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function In(e){var t=nt(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var i=r.dispatch,n=r.pending,h=t.memoizedState;if(n!==null){r.pending=null;var m=n=n.next;do h=e(h,m.action),m=m.next;while(m!==n);dt(h,t.memoizedState)||(We=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,i]}function Du(){}function Ru(e,t){var r=ge,i=nt(),n=t(),h=!dt(i.memoizedState,n);if(h&&(i.memoizedState=n,We=!0),i=i.queue,Ea(Mu.bind(null,r,i,e),[e]),i.getSnapshot!==t||h||Ee!==null&&Ee.memoizedState.tag&1){if(r.flags|=2048,Mi(9,Pu.bind(null,r,i,n,t),void 0,null),be===null)throw Error($(349));ar&30||Tu(r,t,n)}return n}function Tu(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Pu(e,t,r,i){t.value=r,t.getSnapshot=i,Au(t)&&Ou(e)}function Mu(e,t,r){return r(function(){Au(t)&&Ou(e)})}function Au(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!dt(e,r)}catch{return!0}}function Ou(e){var t=bt(e,1);t!==null&&ht(t,e,1,-1)}function Tl(e){var t=_t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:e},t.queue=e,e=e.dispatch=If.bind(null,ge,e),[t.memoizedState,e]}function Mi(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.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 Bu(){return nt().memoizedState}function vs(e,t,r,i){var n=_t();ge.flags|=e,n.memoizedState=Mi(1|t,r,void 0,i===void 0?null:i)}function en(e,t,r,i){var n=nt();i=i===void 0?null:i;var h=void 0;if(xe!==null){var m=xe.memoizedState;if(h=m.destroy,i!==null&&Ca(i,m.deps)){n.memoizedState=Mi(t,r,h,i);return}}ge.flags|=e,n.memoizedState=Mi(1|t,r,h,i)}function Pl(e,t){return vs(8390656,8,e,t)}function Ea(e,t){return en(2048,8,e,t)}function Iu(e,t){return en(4,2,e,t)}function ju(e,t){return en(4,4,e,t)}function Nu(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 Hu(e,t,r){return r=r!=null?r.concat([e]):null,en(4,4,Nu.bind(null,t,e),r)}function ba(){}function Fu(e,t){var r=nt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Ca(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function zu(e,t){var r=nt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&Ca(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function Wu(e,t,r){return ar&21?(dt(r,t)||(r=qc(),ge.lanes|=r,lr|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,We=!0),e.memoizedState=r)}function Of(e,t){var r=le;le=r!==0&&4>r?r:4,e(!0);var i=On.transition;On.transition={};try{e(!1),t()}finally{le=r,On.transition=i}}function Uu(){return nt().memoizedState}function Bf(e,t,r){var i=$t(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},$u(e))Ku(t,r);else if(r=Eu(e,t,r,i),r!==null){var n=je();ht(r,e,i,n),Vu(r,t,i)}}function If(e,t,r){var i=$t(e),n={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if($u(e))Ku(t,n);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var m=t.lastRenderedState,a=h(m,r);if(n.hasEagerState=!0,n.eagerState=a,dt(a,m)){var c=t.interleaved;c===null?(n.next=n,ga(t)):(n.next=c.next,c.next=n),t.interleaved=n;return}}catch{}finally{}r=Eu(e,t,n,i),r!==null&&(n=je(),ht(r,e,i,n),Vu(r,t,i))}}function $u(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Ku(e,t){hi=Hs=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function Vu(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,ia(e,r)}}var Fs={readContext:st,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useInsertionEffect:Me,useLayoutEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useMutableSource:Me,useSyncExternalStore:Me,useId:Me,unstable_isNewReconciler:!1},jf={readContext:st,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Pl,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,vs(4194308,4,Nu.bind(null,t,e),r)},useLayoutEffect:function(e,t){return vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return vs(4,2,e,t)},useMemo:function(e,t){var r=_t();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=_t();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=Bf.bind(null,ge,e),[i.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:Tl,useDebugValue:ba,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=Tl(!1),t=e[0];return e=Of.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ge,n=_t();if(pe){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),be===null)throw Error($(349));ar&30||Tu(i,t,r)}n.memoizedState=r;var h={value:r,getSnapshot:t};return n.queue=h,Pl(Mu.bind(null,i,h,e),[e]),i.flags|=2048,Mi(9,Pu.bind(null,i,h,r,t),void 0,null),r},useId:function(){var e=_t(),t=be.identifierPrefix;if(pe){var r=Ct,i=wt;r=(i&~(1<<32-ut(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ti++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Af++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Nf={readContext:st,useCallback:Fu,useContext:st,useEffect:Ea,useImperativeHandle:Hu,useInsertionEffect:Iu,useLayoutEffect:ju,useMemo:zu,useReducer:Bn,useRef:Bu,useState:function(){return Bn(Pi)},useDebugValue:ba,useDeferredValue:function(e){var t=nt();return Wu(t,xe.memoizedState,e)},useTransition:function(){var e=Bn(Pi)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Du,useSyncExternalStore:Ru,useId:Uu,unstable_isNewReconciler:!1},Hf={readContext:st,useCallback:Fu,useContext:st,useEffect:Ea,useImperativeHandle:Hu,useInsertionEffect:Iu,useLayoutEffect:ju,useMemo:zu,useReducer:In,useRef:Bu,useState:function(){return In(Pi)},useDebugValue:ba,useDeferredValue:function(e){var t=nt();return xe===null?t.memoizedState=e:Wu(t,xe.memoizedState,e)},useTransition:function(){var e=In(Pi)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Du,useSyncExternalStore:Ru,useId:Uu,unstable_isNewReconciler:!1};function at(e,t){if(e&&e.defaultProps){t=me({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function yo(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:me({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var tn={isMounted:function(e){return(e=e._reactInternals)?hr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=je(),n=$t(e),h=xt(i,n);h.payload=t,r!=null&&(h.callback=r),t=Wt(e,h,n),t!==null&&(ht(t,e,n,i),ps(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=je(),n=$t(e),h=xt(i,n);h.tag=1,h.payload=t,r!=null&&(h.callback=r),t=Wt(e,h,n),t!==null&&(ht(t,e,n,i),ps(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=je(),i=$t(e),n=xt(r,i);n.tag=2,t!=null&&(n.callback=t),t=Wt(e,n,i),t!==null&&(ht(t,e,i,r),ps(t,e,i))}};function Ml(e,t,r,i,n,h,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,h,m):t.prototype&&t.prototype.isPureReactComponent?!ki(r,i)||!ki(n,h):!0}function qu(e,t,r){var i=!1,n=qt,h=t.contextType;return typeof h=="object"&&h!==null?h=st(h):(n=$e(t)?nr:Be.current,i=t.contextTypes,h=(i=i!=null)?Ar(e,n):qt),t=new t(r,h),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=tn,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=h),t}function Al(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&&tn.enqueueReplaceState(t,t.state,null)}function wo(e,t,r,i){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},ma(e);var h=t.contextType;typeof h=="object"&&h!==null?n.context=st(h):(h=$e(t)?nr:Be.current,n.context=Ar(e,h)),n.state=e.memoizedState,h=t.getDerivedStateFromProps,typeof h=="function"&&(yo(e,t,h,r),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&tn.enqueueReplaceState(n,n.state,null),js(e,r,n,i),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function jr(e,t){try{var r="",i=t;do r+=dd(i),i=i.return;while(i);var n=r}catch(h){n=`
|
|
37
|
+
`+n[m].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=m&&0<=a);break}}}finally{gn=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?ri(e):""}function fd(e){switch(e.tag){case 5:return ri(e.type);case 16:return ri("Lazy");case 13:return ri("Suspense");case 19:return ri("SuspenseList");case 0:case 2:case 15:return e=mn(e.type,!1),e;case 11:return e=mn(e.type.render,!1),e;case 1:return e=mn(e.type,!0),e;default:return""}}function qn(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 pr:return"Fragment";case fr:return"Portal";case $n:return"Profiler";case Zo:return"StrictMode";case Kn:return"Suspense";case Vn:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Lc:return(e.displayName||"Context")+".Consumer";case bc:return(e._context.displayName||"Context")+".Provider";case ea:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ta:return t=e.displayName||null,t!==null?t:qn(e.type)||"Memo";case Mt:t=e._payload,e=e._init;try{return qn(e(t))}catch{}}return null}function pd(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 qn(t);case 8:return t===Zo?"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 Vt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Rc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _d(e){var t=Rc(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 n=r.get,h=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(m){i=""+m,h.call(this,m)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(m){i=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vi(e){e._valueTracker||(e._valueTracker=_d(e))}function Tc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=Rc(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Cs(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 Gn(e,t){var r=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Ya(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=Vt(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 Pc(e,t){t=t.checked,t!=null&&Jo(e,"checked",t,!1)}function Xn(e,t){Pc(e,t);var r=Vt(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")?Qn(e,t.type,r):t.hasOwnProperty("defaultValue")&&Qn(e,t.type,Vt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ja(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 Qn(e,t,r){(t!=="number"||Cs(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var ii=Array.isArray;function br(e,t,r,i){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&i&&(e[r].defaultSelected=!0)}else{for(r=""+Vt(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,i&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Yn(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error($(91));return me({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Za(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error($(92));if(ii(r)){if(1<r.length)throw Error($(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:Vt(r)}}function Mc(e,t){var r=Vt(t.value),i=Vt(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 el(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function Ac(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 Jn(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?Ac(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var qi,Oc=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,n)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(qi=qi||document.createElement("div"),qi.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=qi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function mi(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var oi={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},vd=["Webkit","ms","Moz","O"];Object.keys(oi).forEach(function(e){vd.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),oi[t]=oi[e]})});function Bc(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||oi.hasOwnProperty(e)&&oi[e]?(""+t).trim():t+"px"}function Ic(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,n=Bc(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,n):e[r]=n}}var gd=me({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 Zn(e,t){if(t){if(gd[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error($(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error($(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error($(61))}if(t.style!=null&&typeof t.style!="object")throw Error($(62))}}function eo(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 to=null;function ra(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ro=null,Lr=null,Dr=null;function tl(e){if(e=Ni(e)){if(typeof ro!="function")throw Error($(280));var t=e.stateNode;t&&(t=Js(t),ro(e.stateNode,e.type,t))}}function jc(e){Lr?Dr?Dr.push(e):Dr=[e]:Lr=e}function Nc(){if(Lr){var e=Lr,t=Dr;if(Dr=Lr=null,tl(e),t)for(e=0;e<t.length;e++)tl(t[e])}}function Hc(e,t){return e(t)}function Fc(){}var Sn=!1;function zc(e,t,r){if(Sn)return e(t,r);Sn=!0;try{return Hc(e,t,r)}finally{Sn=!1,(Lr!==null||Dr!==null)&&(Fc(),Nc())}}function Si(e,t){var r=e.stateNode;if(r===null)return null;var i=Js(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($(231,t,typeof r));return r}var io=!1;if(kt)try{var Gr={};Object.defineProperty(Gr,"passive",{get:function(){io=!0}}),window.addEventListener("test",Gr,Gr),window.removeEventListener("test",Gr,Gr)}catch{io=!1}function md(e,t,r,i,n,h,m,a,c){var f=Array.prototype.slice.call(arguments,3);try{t.apply(r,f)}catch(g){this.onError(g)}}var ai=!1,xs=null,ks=!1,so=null,Sd={onError:function(e){ai=!0,xs=e}};function yd(e,t,r,i,n,h,m,a,c){ai=!1,xs=null,md.apply(Sd,arguments)}function wd(e,t,r,i,n,h,m,a,c){if(yd.apply(this,arguments),ai){if(ai){var f=xs;ai=!1,xs=null}else throw Error($(198));ks||(ks=!0,so=f)}}function hr(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 Wc(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 rl(e){if(hr(e)!==e)throw Error($(188))}function Cd(e){var t=e.alternate;if(!t){if(t=hr(e),t===null)throw Error($(188));return t!==e?null:e}for(var r=e,i=t;;){var n=r.return;if(n===null)break;var h=n.alternate;if(h===null){if(i=n.return,i!==null){r=i;continue}break}if(n.child===h.child){for(h=n.child;h;){if(h===r)return rl(n),e;if(h===i)return rl(n),t;h=h.sibling}throw Error($(188))}if(r.return!==i.return)r=n,i=h;else{for(var m=!1,a=n.child;a;){if(a===r){m=!0,r=n,i=h;break}if(a===i){m=!0,i=n,r=h;break}a=a.sibling}if(!m){for(a=h.child;a;){if(a===r){m=!0,r=h,i=n;break}if(a===i){m=!0,i=h,r=n;break}a=a.sibling}if(!m)throw Error($(189))}}if(r.alternate!==i)throw Error($(190))}if(r.tag!==3)throw Error($(188));return r.stateNode.current===r?e:t}function Uc(e){return e=Cd(e),e!==null?$c(e):null}function $c(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=$c(e);if(t!==null)return t;e=e.sibling}return null}var Kc=Xe.unstable_scheduleCallback,il=Xe.unstable_cancelCallback,xd=Xe.unstable_shouldYield,kd=Xe.unstable_requestPaint,we=Xe.unstable_now,Ed=Xe.unstable_getCurrentPriorityLevel,ia=Xe.unstable_ImmediatePriority,Vc=Xe.unstable_UserBlockingPriority,Es=Xe.unstable_NormalPriority,bd=Xe.unstable_LowPriority,qc=Xe.unstable_IdlePriority,Gs=null,gt=null;function Ld(e){if(gt&&typeof gt.onCommitFiberRoot=="function")try{gt.onCommitFiberRoot(Gs,e,void 0,(e.current.flags&128)===128)}catch{}}var ut=Math.clz32?Math.clz32:Td,Dd=Math.log,Rd=Math.LN2;function Td(e){return e>>>=0,e===0?32:31-(Dd(e)/Rd|0)|0}var Gi=64,Xi=4194304;function si(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 bs(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,n=e.suspendedLanes,h=e.pingedLanes,m=r&268435455;if(m!==0){var a=m&~n;a!==0?i=si(a):(h&=m,h!==0&&(i=si(h)))}else m=r&~n,m!==0?i=si(m):h!==0&&(i=si(h));if(i===0)return 0;if(t!==0&&t!==i&&!(t&n)&&(n=i&-i,h=t&-t,n>=h||n===16&&(h&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-ut(t),n=1<<r,i|=e[r],t&=~n;return i}function Pd(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 Md(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,n=e.expirationTimes,h=e.pendingLanes;0<h;){var m=31-ut(h),a=1<<m,c=n[m];c===-1?(!(a&r)||a&i)&&(n[m]=Pd(a,t)):c<=t&&(e.expiredLanes|=a),h&=~a}}function no(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function Gc(){var e=Gi;return Gi<<=1,!(Gi&4194240)&&(Gi=64),e}function yn(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function Ii(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ut(t),e[t]=r}function Ad(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 n=31-ut(r),h=1<<n;t[n]=0,i[n]=-1,e[n]=-1,r&=~h}}function sa(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-ut(r),n=1<<i;n&t|e[i]&t&&(e[i]|=t),r&=~n}}var le=0;function Xc(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var Qc,na,Yc,Jc,Zc,oo=!1,Qi=[],Nt=null,Ht=null,Ft=null,yi=new Map,wi=new Map,Ot=[],Od="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 sl(e,t){switch(e){case"focusin":case"focusout":Nt=null;break;case"dragenter":case"dragleave":Ht=null;break;case"mouseover":case"mouseout":Ft=null;break;case"pointerover":case"pointerout":yi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":wi.delete(t.pointerId)}}function Xr(e,t,r,i,n,h){return e===null||e.nativeEvent!==h?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:h,targetContainers:[n]},t!==null&&(t=Ni(t),t!==null&&na(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Bd(e,t,r,i,n){switch(t){case"focusin":return Nt=Xr(Nt,e,t,r,i,n),!0;case"dragenter":return Ht=Xr(Ht,e,t,r,i,n),!0;case"mouseover":return Ft=Xr(Ft,e,t,r,i,n),!0;case"pointerover":var h=n.pointerId;return yi.set(h,Xr(yi.get(h)||null,e,t,r,i,n)),!0;case"gotpointercapture":return h=n.pointerId,wi.set(h,Xr(wi.get(h)||null,e,t,r,i,n)),!0}return!1}function eu(e){var t=Zt(e.target);if(t!==null){var r=hr(t);if(r!==null){if(t=r.tag,t===13){if(t=Wc(r),t!==null){e.blockedOn=t,Zc(e.priority,function(){Yc(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 hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=ao(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);to=i,r.target.dispatchEvent(i),to=null}else return t=Ni(r),t!==null&&na(t),e.blockedOn=r,!1;t.shift()}return!0}function nl(e,t,r){hs(e)&&r.delete(t)}function Id(){oo=!1,Nt!==null&&hs(Nt)&&(Nt=null),Ht!==null&&hs(Ht)&&(Ht=null),Ft!==null&&hs(Ft)&&(Ft=null),yi.forEach(nl),wi.forEach(nl)}function Qr(e,t){e.blockedOn===t&&(e.blockedOn=null,oo||(oo=!0,Xe.unstable_scheduleCallback(Xe.unstable_NormalPriority,Id)))}function Ci(e){function t(n){return Qr(n,e)}if(0<Qi.length){Qr(Qi[0],e);for(var r=1;r<Qi.length;r++){var i=Qi[r];i.blockedOn===e&&(i.blockedOn=null)}}for(Nt!==null&&Qr(Nt,e),Ht!==null&&Qr(Ht,e),Ft!==null&&Qr(Ft,e),yi.forEach(t),wi.forEach(t),r=0;r<Ot.length;r++)i=Ot[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<Ot.length&&(r=Ot[0],r.blockedOn===null);)eu(r),r.blockedOn===null&&Ot.shift()}var Rr=Dt.ReactCurrentBatchConfig,Ls=!0;function jd(e,t,r,i){var n=le,h=Rr.transition;Rr.transition=null;try{le=1,oa(e,t,r,i)}finally{le=n,Rr.transition=h}}function Nd(e,t,r,i){var n=le,h=Rr.transition;Rr.transition=null;try{le=4,oa(e,t,r,i)}finally{le=n,Rr.transition=h}}function oa(e,t,r,i){if(Ls){var n=ao(e,t,r,i);if(n===null)Tn(e,t,i,Ds,r),sl(e,i);else if(Bd(n,e,t,r,i))i.stopPropagation();else if(sl(e,i),t&4&&-1<Od.indexOf(e)){for(;n!==null;){var h=Ni(n);if(h!==null&&Qc(h),h=ao(e,t,r,i),h===null&&Tn(e,t,i,Ds,r),h===n)break;n=h}n!==null&&i.stopPropagation()}else Tn(e,t,i,null,r)}}var Ds=null;function ao(e,t,r,i){if(Ds=null,e=ra(i),e=Zt(e),e!==null)if(t=hr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Wc(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 Ds=e,null}function tu(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(Ed()){case ia:return 1;case Vc:return 4;case Es:case bd:return 16;case qc:return 536870912;default:return 16}default:return 16}}var It=null,aa=null,ds=null;function ru(){if(ds)return ds;var e,t=aa,r=t.length,i,n="value"in It?It.value:It.textContent,h=n.length;for(e=0;e<r&&t[e]===n[e];e++);var m=r-e;for(i=1;i<=m&&t[r-i]===n[h-i];i++);return ds=n.slice(e,1<i?1-i:void 0)}function fs(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 Yi(){return!0}function ol(){return!1}function Ye(e){function t(r,i,n,h,m){this._reactName=r,this._targetInst=n,this.type=i,this.nativeEvent=h,this.target=m,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(r=e[a],this[a]=r?r(h):h[a]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Yi:ol,this.isPropagationStopped=ol,this}return me(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=Yi)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=Yi)},persist:function(){},isPersistent:Yi}),t}var zr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},la=Ye(zr),ji=me({},zr,{view:0,detail:0}),Hd=Ye(ji),wn,Cn,Yr,Xs=me({},ji,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ca,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!==Yr&&(Yr&&e.type==="mousemove"?(wn=e.screenX-Yr.screenX,Cn=e.screenY-Yr.screenY):Cn=wn=0,Yr=e),wn)},movementY:function(e){return"movementY"in e?e.movementY:Cn}}),al=Ye(Xs),Fd=me({},Xs,{dataTransfer:0}),zd=Ye(Fd),Wd=me({},ji,{relatedTarget:0}),xn=Ye(Wd),Ud=me({},zr,{animationName:0,elapsedTime:0,pseudoElement:0}),$d=Ye(Ud),Kd=me({},zr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vd=Ye(Kd),qd=me({},zr,{data:0}),ll=Ye(qd),Gd={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Xd={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"},Qd={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Yd(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Qd[e])?!!t[e]:!1}function ca(){return Yd}var Jd=me({},ji,{key:function(e){if(e.key){var t=Gd[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Xd[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ca,charCode:function(e){return e.type==="keypress"?fs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Zd=Ye(Jd),ef=me({},Xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),cl=Ye(ef),tf=me({},ji,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ca}),rf=Ye(tf),sf=me({},zr,{propertyName:0,elapsedTime:0,pseudoElement:0}),nf=Ye(sf),of=me({},Xs,{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}),af=Ye(of),lf=[9,13,27,32],ua=kt&&"CompositionEvent"in window,li=null;kt&&"documentMode"in document&&(li=document.documentMode);var cf=kt&&"TextEvent"in window&&!li,iu=kt&&(!ua||li&&8<li&&11>=li),ul=" ",hl=!1;function su(e,t){switch(e){case"keyup":return lf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _r=!1;function uf(e,t){switch(e){case"compositionend":return nu(t);case"keypress":return t.which!==32?null:(hl=!0,ul);case"textInput":return e=t.data,e===ul&&hl?null:e;default:return null}}function hf(e,t){if(_r)return e==="compositionend"||!ua&&su(e,t)?(e=ru(),ds=aa=It=null,_r=!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 iu&&t.locale!=="ko"?null:t.data;default:return null}}var df={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"?!!df[e.type]:t==="textarea"}function ou(e,t,r,i){jc(i),t=Rs(t,"onChange"),0<t.length&&(r=new la("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var ci=null,xi=null;function ff(e){gu(e,0)}function Qs(e){var t=mr(e);if(Tc(t))return e}function pf(e,t){if(e==="change")return t}var au=!1;if(kt){var kn;if(kt){var En="oninput"in document;if(!En){var fl=document.createElement("div");fl.setAttribute("oninput","return;"),En=typeof fl.oninput=="function"}kn=En}else kn=!1;au=kn&&(!document.documentMode||9<document.documentMode)}function pl(){ci&&(ci.detachEvent("onpropertychange",lu),xi=ci=null)}function lu(e){if(e.propertyName==="value"&&Qs(xi)){var t=[];ou(t,xi,e,ra(e)),zc(ff,t)}}function _f(e,t,r){e==="focusin"?(pl(),ci=t,xi=r,ci.attachEvent("onpropertychange",lu)):e==="focusout"&&pl()}function vf(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Qs(xi)}function gf(e,t){if(e==="click")return Qs(t)}function mf(e,t){if(e==="input"||e==="change")return Qs(t)}function Sf(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var dt=typeof Object.is=="function"?Object.is:Sf;function ki(e,t){if(dt(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 n=r[i];if(!Un.call(t,n)||!dt(e[n],t[n]))return!1}return!0}function _l(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function vl(e,t){var r=_l(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=_l(r)}}function cu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?cu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function uu(){for(var e=window,t=Cs();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Cs(e.document)}return t}function ha(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function yf(e){var t=uu(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&cu(r.ownerDocument.documentElement,r)){if(i!==null&&ha(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 n=r.textContent.length,h=Math.min(i.start,n);i=i.end===void 0?h:Math.min(i.end,n),!e.extend&&h>i&&(n=i,i=h,h=n),n=vl(r,h);var m=vl(r,i);n&&m&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==m.node||e.focusOffset!==m.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),h>i?(e.addRange(t),e.extend(m.node,m.offset)):(t.setEnd(m.node,m.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 wf=kt&&"documentMode"in document&&11>=document.documentMode,vr=null,lo=null,ui=null,co=!1;function gl(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;co||vr==null||vr!==Cs(i)||(i=vr,"selectionStart"in i&&ha(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}),ui&&ki(ui,i)||(ui=i,i=Rs(lo,"onSelect"),0<i.length&&(t=new la("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=vr)))}function Ji(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var gr={animationend:Ji("Animation","AnimationEnd"),animationiteration:Ji("Animation","AnimationIteration"),animationstart:Ji("Animation","AnimationStart"),transitionend:Ji("Transition","TransitionEnd")},bn={},hu={};kt&&(hu=document.createElement("div").style,"AnimationEvent"in window||(delete gr.animationend.animation,delete gr.animationiteration.animation,delete gr.animationstart.animation),"TransitionEvent"in window||delete gr.transitionend.transition);function Ys(e){if(bn[e])return bn[e];if(!gr[e])return e;var t=gr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in hu)return bn[e]=t[r];return e}var du=Ys("animationend"),fu=Ys("animationiteration"),pu=Ys("animationstart"),_u=Ys("transitionend"),vu=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 Gt(e,t){vu.set(e,t),ur(t,[e])}for(var Ln=0;Ln<ml.length;Ln++){var Dn=ml[Ln],Cf=Dn.toLowerCase(),xf=Dn[0].toUpperCase()+Dn.slice(1);Gt(Cf,"on"+xf)}Gt(du,"onAnimationEnd");Gt(fu,"onAnimationIteration");Gt(pu,"onAnimationStart");Gt("dblclick","onDoubleClick");Gt("focusin","onFocus");Gt("focusout","onBlur");Gt(_u,"onTransitionEnd");Mr("onMouseEnter",["mouseout","mouseover"]);Mr("onMouseLeave",["mouseout","mouseover"]);Mr("onPointerEnter",["pointerout","pointerover"]);Mr("onPointerLeave",["pointerout","pointerover"]);ur("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ur("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ur("onBeforeInput",["compositionend","keypress","textInput","paste"]);ur("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ur("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ur("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ni="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(" "),kf=new Set("cancel close invalid load scroll toggle".split(" ").concat(ni));function Sl(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,wd(i,t,void 0,e),e.currentTarget=null}function gu(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],n=i.event;i=i.listeners;e:{var h=void 0;if(t)for(var m=i.length-1;0<=m;m--){var a=i[m],c=a.instance,f=a.currentTarget;if(a=a.listener,c!==h&&n.isPropagationStopped())break e;Sl(n,a,f),h=c}else for(m=0;m<i.length;m++){if(a=i[m],c=a.instance,f=a.currentTarget,a=a.listener,c!==h&&n.isPropagationStopped())break e;Sl(n,a,f),h=c}}}if(ks)throw e=so,ks=!1,so=null,e}function he(e,t){var r=t[_o];r===void 0&&(r=t[_o]=new Set);var i=e+"__bubble";r.has(i)||(mu(t,e,2,!1),r.add(i))}function Rn(e,t,r){var i=0;t&&(i|=4),mu(r,e,i,t)}var Zi="_reactListening"+Math.random().toString(36).slice(2);function Ei(e){if(!e[Zi]){e[Zi]=!0,Ec.forEach(function(r){r!=="selectionchange"&&(kf.has(r)||Rn(r,!1,e),Rn(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zi]||(t[Zi]=!0,Rn("selectionchange",!1,t))}}function mu(e,t,r,i){switch(tu(t)){case 1:var n=jd;break;case 4:n=Nd;break;default:n=oa}r=n.bind(null,t,r,e),n=void 0,!io||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),i?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function Tn(e,t,r,i,n){var h=i;if(!(t&1)&&!(t&2)&&i!==null)e:for(;;){if(i===null)return;var m=i.tag;if(m===3||m===4){var a=i.stateNode.containerInfo;if(a===n||a.nodeType===8&&a.parentNode===n)break;if(m===4)for(m=i.return;m!==null;){var c=m.tag;if((c===3||c===4)&&(c=m.stateNode.containerInfo,c===n||c.nodeType===8&&c.parentNode===n))return;m=m.return}for(;a!==null;){if(m=Zt(a),m===null)return;if(c=m.tag,c===5||c===6){i=h=m;continue e}a=a.parentNode}}i=i.return}zc(function(){var f=h,g=ra(r),d=[];e:{var _=vu.get(e);if(_!==void 0){var S=la,w=e;switch(e){case"keypress":if(fs(r)===0)break e;case"keydown":case"keyup":S=Zd;break;case"focusin":w="focus",S=xn;break;case"focusout":w="blur",S=xn;break;case"beforeblur":case"afterblur":S=xn;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=al;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":S=zd;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":S=rf;break;case du:case fu:case pu:S=$d;break;case _u:S=nf;break;case"scroll":S=Hd;break;case"wheel":S=af;break;case"copy":case"cut":case"paste":S=Vd;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":S=cl}var v=(t&4)!==0,u=!v&&e==="scroll",o=v?_!==null?_+"Capture":null:_;v=[];for(var s=f,l;s!==null;){l=s;var p=l.stateNode;if(l.tag===5&&p!==null&&(l=p,o!==null&&(p=Si(s,o),p!=null&&v.push(bi(s,p,l)))),u)break;s=s.return}0<v.length&&(_=new S(_,w,null,r,g),d.push({event:_,listeners:v}))}}if(!(t&7)){e:{if(_=e==="mouseover"||e==="pointerover",S=e==="mouseout"||e==="pointerout",_&&r!==to&&(w=r.relatedTarget||r.fromElement)&&(Zt(w)||w[Et]))break e;if((S||_)&&(_=g.window===g?g:(_=g.ownerDocument)?_.defaultView||_.parentWindow:window,S?(w=r.relatedTarget||r.toElement,S=f,w=w?Zt(w):null,w!==null&&(u=hr(w),w!==u||w.tag!==5&&w.tag!==6)&&(w=null)):(S=null,w=f),S!==w)){if(v=al,p="onMouseLeave",o="onMouseEnter",s="mouse",(e==="pointerout"||e==="pointerover")&&(v=cl,p="onPointerLeave",o="onPointerEnter",s="pointer"),u=S==null?_:mr(S),l=w==null?_:mr(w),_=new v(p,s+"leave",S,r,g),_.target=u,_.relatedTarget=l,p=null,Zt(g)===f&&(v=new v(o,s+"enter",w,r,g),v.target=l,v.relatedTarget=u,p=v),u=p,S&&w)t:{for(v=S,o=w,s=0,l=v;l;l=dr(l))s++;for(l=0,p=o;p;p=dr(p))l++;for(;0<s-l;)v=dr(v),s--;for(;0<l-s;)o=dr(o),l--;for(;s--;){if(v===o||o!==null&&v===o.alternate)break t;v=dr(v),o=dr(o)}v=null}else v=null;S!==null&&yl(d,_,S,v,!1),w!==null&&u!==null&&yl(d,u,w,v,!0)}}e:{if(_=f?mr(f):window,S=_.nodeName&&_.nodeName.toLowerCase(),S==="select"||S==="input"&&_.type==="file")var C=pf;else if(dl(_))if(au)C=mf;else{C=vf;var x=_f}else(S=_.nodeName)&&S.toLowerCase()==="input"&&(_.type==="checkbox"||_.type==="radio")&&(C=gf);if(C&&(C=C(e,f))){ou(d,C,r,g);break e}x&&x(e,_,f),e==="focusout"&&(x=_._wrapperState)&&x.controlled&&_.type==="number"&&Qn(_,"number",_.value)}switch(x=f?mr(f):window,e){case"focusin":(dl(x)||x.contentEditable==="true")&&(vr=x,lo=f,ui=null);break;case"focusout":ui=lo=vr=null;break;case"mousedown":co=!0;break;case"contextmenu":case"mouseup":case"dragend":co=!1,gl(d,r,g);break;case"selectionchange":if(wf)break;case"keydown":case"keyup":gl(d,r,g)}var k;if(ua)e:{switch(e){case"compositionstart":var y="onCompositionStart";break e;case"compositionend":y="onCompositionEnd";break e;case"compositionupdate":y="onCompositionUpdate";break e}y=void 0}else _r?su(e,r)&&(y="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(y="onCompositionStart");y&&(iu&&r.locale!=="ko"&&(_r||y!=="onCompositionStart"?y==="onCompositionEnd"&&_r&&(k=ru()):(It=g,aa="value"in It?It.value:It.textContent,_r=!0)),x=Rs(f,y),0<x.length&&(y=new ll(y,e,null,r,g),d.push({event:y,listeners:x}),k?y.data=k:(k=nu(r),k!==null&&(y.data=k)))),(k=cf?uf(e,r):hf(e,r))&&(f=Rs(f,"onBeforeInput"),0<f.length&&(g=new ll("onBeforeInput","beforeinput",null,r,g),d.push({event:g,listeners:f}),g.data=k))}gu(d,t)})}function bi(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Rs(e,t){for(var r=t+"Capture",i=[];e!==null;){var n=e,h=n.stateNode;n.tag===5&&h!==null&&(n=h,h=Si(e,r),h!=null&&i.unshift(bi(e,h,n)),h=Si(e,t),h!=null&&i.push(bi(e,h,n))),e=e.return}return i}function dr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function yl(e,t,r,i,n){for(var h=t._reactName,m=[];r!==null&&r!==i;){var a=r,c=a.alternate,f=a.stateNode;if(c!==null&&c===i)break;a.tag===5&&f!==null&&(a=f,n?(c=Si(r,h),c!=null&&m.unshift(bi(r,c,a))):n||(c=Si(r,h),c!=null&&m.push(bi(r,c,a)))),r=r.return}m.length!==0&&e.push({event:t,listeners:m})}var Ef=/\r\n?/g,bf=/\u0000|\uFFFD/g;function wl(e){return(typeof e=="string"?e:""+e).replace(Ef,`
|
|
38
|
+
`).replace(bf,"")}function es(e,t,r){if(t=wl(t),wl(e)!==t&&r)throw Error($(425))}function Ts(){}var uo=null,ho=null;function fo(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 po=typeof setTimeout=="function"?setTimeout:void 0,Lf=typeof clearTimeout=="function"?clearTimeout:void 0,Cl=typeof Promise=="function"?Promise:void 0,Df=typeof queueMicrotask=="function"?queueMicrotask:typeof Cl<"u"?function(e){return Cl.resolve(null).then(e).catch(Rf)}:po;function Rf(e){setTimeout(function(){throw e})}function Pn(e,t){var r=t,i=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(i===0){e.removeChild(n),Ci(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=n}while(r);Ci(t)}function zt(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 xl(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 Wr=Math.random().toString(36).slice(2),vt="__reactFiber$"+Wr,Li="__reactProps$"+Wr,Et="__reactContainer$"+Wr,_o="__reactEvents$"+Wr,Tf="__reactListeners$"+Wr,Pf="__reactHandles$"+Wr;function Zt(e){var t=e[vt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Et]||r[vt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=xl(e);e!==null;){if(r=e[vt])return r;e=xl(e)}return t}e=r,r=e.parentNode}return null}function Ni(e){return e=e[vt]||e[Et],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function mr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error($(33))}function Js(e){return e[Li]||null}var vo=[],Sr=-1;function Xt(e){return{current:e}}function fe(e){0>Sr||(e.current=vo[Sr],vo[Sr]=null,Sr--)}function ue(e,t){Sr++,vo[Sr]=e.current,e.current=t}var qt={},Be=Xt(qt),Ue=Xt(!1),nr=qt;function Ar(e,t){var r=e.type.contextTypes;if(!r)return qt;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var n={},h;for(h in r)n[h]=t[h];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function $e(e){return e=e.childContextTypes,e!=null}function Ps(){fe(Ue),fe(Be)}function kl(e,t,r){if(Be.current!==qt)throw Error($(168));ue(Be,t),ue(Ue,r)}function Su(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var n in i)if(!(n in t))throw Error($(108,pd(e)||"Unknown",n));return me({},r,i)}function Ms(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qt,nr=Be.current,ue(Be,e),ue(Ue,Ue.current),!0}function El(e,t,r){var i=e.stateNode;if(!i)throw Error($(169));r?(e=Su(e,t,nr),i.__reactInternalMemoizedMergedChildContext=e,fe(Ue),fe(Be),ue(Be,e)):fe(Ue),ue(Ue,r)}var yt=null,Zs=!1,Mn=!1;function yu(e){yt===null?yt=[e]:yt.push(e)}function Mf(e){Zs=!0,yu(e)}function Qt(){if(!Mn&&yt!==null){Mn=!0;var e=0,t=le;try{var r=yt;for(le=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}yt=null,Zs=!1}catch(n){throw yt!==null&&(yt=yt.slice(e+1)),Kc(ia,Qt),n}finally{le=t,Mn=!1}}return null}var yr=[],wr=0,As=null,Os=0,et=[],tt=0,or=null,wt=1,Ct="";function Yt(e,t){yr[wr++]=Os,yr[wr++]=As,As=e,Os=t}function wu(e,t,r){et[tt++]=wt,et[tt++]=Ct,et[tt++]=or,or=e;var i=wt;e=Ct;var n=32-ut(i)-1;i&=~(1<<n),r+=1;var h=32-ut(t)+n;if(30<h){var m=n-n%5;h=(i&(1<<m)-1).toString(32),i>>=m,n-=m,wt=1<<32-ut(t)+n|r<<n|i,Ct=h+e}else wt=1<<h|r<<n|i,Ct=e}function da(e){e.return!==null&&(Yt(e,1),wu(e,1,0))}function fa(e){for(;e===As;)As=yr[--wr],yr[wr]=null,Os=yr[--wr],yr[wr]=null;for(;e===or;)or=et[--tt],et[tt]=null,Ct=et[--tt],et[tt]=null,wt=et[--tt],et[tt]=null}var Ge=null,qe=null,pe=!1,ct=null;function Cu(e,t){var r=rt(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 bl(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,Ge=e,qe=zt(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ge=e,qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=or!==null?{id:wt,overflow:Ct}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=rt(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,Ge=e,qe=null,!0):!1;default:return!1}}function go(e){return(e.mode&1)!==0&&(e.flags&128)===0}function mo(e){if(pe){var t=qe;if(t){var r=t;if(!bl(e,t)){if(go(e))throw Error($(418));t=zt(r.nextSibling);var i=Ge;t&&bl(e,t)?Cu(i,r):(e.flags=e.flags&-4097|2,pe=!1,Ge=e)}}else{if(go(e))throw Error($(418));e.flags=e.flags&-4097|2,pe=!1,Ge=e}}}function Ll(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ge=e}function ts(e){if(e!==Ge)return!1;if(!pe)return Ll(e),pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!fo(e.type,e.memoizedProps)),t&&(t=qe)){if(go(e))throw xu(),Error($(418));for(;t;)Cu(e,t),t=zt(t.nextSibling)}if(Ll(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error($(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){qe=zt(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}qe=null}}else qe=Ge?zt(e.stateNode.nextSibling):null;return!0}function xu(){for(var e=qe;e;)e=zt(e.nextSibling)}function Or(){qe=Ge=null,pe=!1}function pa(e){ct===null?ct=[e]:ct.push(e)}var Af=Dt.ReactCurrentBatchConfig;function Jr(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($(309));var i=r.stateNode}if(!i)throw Error($(147,e));var n=i,h=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===h?t.ref:(t=function(m){var a=n.refs;m===null?delete a[h]:a[h]=m},t._stringRef=h,t)}if(typeof e!="string")throw Error($(284));if(!r._owner)throw Error($(290,e))}return e}function rs(e,t){throw e=Object.prototype.toString.call(t),Error($(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Dl(e){var t=e._init;return t(e._payload)}function ku(e){function t(o,s){if(e){var l=o.deletions;l===null?(o.deletions=[s],o.flags|=16):l.push(s)}}function r(o,s){if(!e)return null;for(;s!==null;)t(o,s),s=s.sibling;return null}function i(o,s){for(o=new Map;s!==null;)s.key!==null?o.set(s.key,s):o.set(s.index,s),s=s.sibling;return o}function n(o,s){return o=Kt(o,s),o.index=0,o.sibling=null,o}function h(o,s,l){return o.index=l,e?(l=o.alternate,l!==null?(l=l.index,l<s?(o.flags|=2,s):l):(o.flags|=2,s)):(o.flags|=1048576,s)}function m(o){return e&&o.alternate===null&&(o.flags|=2),o}function a(o,s,l,p){return s===null||s.tag!==6?(s=Hn(l,o.mode,p),s.return=o,s):(s=n(s,l),s.return=o,s)}function c(o,s,l,p){var C=l.type;return C===pr?g(o,s,l.props.children,p,l.key):s!==null&&(s.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Mt&&Dl(C)===s.type)?(p=n(s,l.props),p.ref=Jr(o,s,l),p.return=o,p):(p=ys(l.type,l.key,l.props,null,o.mode,p),p.ref=Jr(o,s,l),p.return=o,p)}function f(o,s,l,p){return s===null||s.tag!==4||s.stateNode.containerInfo!==l.containerInfo||s.stateNode.implementation!==l.implementation?(s=Fn(l,o.mode,p),s.return=o,s):(s=n(s,l.children||[]),s.return=o,s)}function g(o,s,l,p,C){return s===null||s.tag!==7?(s=ir(l,o.mode,p,C),s.return=o,s):(s=n(s,l),s.return=o,s)}function d(o,s,l){if(typeof s=="string"&&s!==""||typeof s=="number")return s=Hn(""+s,o.mode,l),s.return=o,s;if(typeof s=="object"&&s!==null){switch(s.$$typeof){case Ki:return l=ys(s.type,s.key,s.props,null,o.mode,l),l.ref=Jr(o,null,s),l.return=o,l;case fr:return s=Fn(s,o.mode,l),s.return=o,s;case Mt:var p=s._init;return d(o,p(s._payload),l)}if(ii(s)||qr(s))return s=ir(s,o.mode,l,null),s.return=o,s;rs(o,s)}return null}function _(o,s,l,p){var C=s!==null?s.key:null;if(typeof l=="string"&&l!==""||typeof l=="number")return C!==null?null:a(o,s,""+l,p);if(typeof l=="object"&&l!==null){switch(l.$$typeof){case Ki:return l.key===C?c(o,s,l,p):null;case fr:return l.key===C?f(o,s,l,p):null;case Mt:return C=l._init,_(o,s,C(l._payload),p)}if(ii(l)||qr(l))return C!==null?null:g(o,s,l,p,null);rs(o,l)}return null}function S(o,s,l,p,C){if(typeof p=="string"&&p!==""||typeof p=="number")return o=o.get(l)||null,a(s,o,""+p,C);if(typeof p=="object"&&p!==null){switch(p.$$typeof){case Ki:return o=o.get(p.key===null?l:p.key)||null,c(s,o,p,C);case fr:return o=o.get(p.key===null?l:p.key)||null,f(s,o,p,C);case Mt:var x=p._init;return S(o,s,l,x(p._payload),C)}if(ii(p)||qr(p))return o=o.get(l)||null,g(s,o,p,C,null);rs(s,p)}return null}function w(o,s,l,p){for(var C=null,x=null,k=s,y=s=0,b=null;k!==null&&y<l.length;y++){k.index>y?(b=k,k=null):b=k.sibling;var R=_(o,k,l[y],p);if(R===null){k===null&&(k=b);break}e&&k&&R.alternate===null&&t(o,k),s=h(R,s,y),x===null?C=R:x.sibling=R,x=R,k=b}if(y===l.length)return r(o,k),pe&&Yt(o,y),C;if(k===null){for(;y<l.length;y++)k=d(o,l[y],p),k!==null&&(s=h(k,s,y),x===null?C=k:x.sibling=k,x=k);return pe&&Yt(o,y),C}for(k=i(o,k);y<l.length;y++)b=S(k,o,y,l[y],p),b!==null&&(e&&b.alternate!==null&&k.delete(b.key===null?y:b.key),s=h(b,s,y),x===null?C=b:x.sibling=b,x=b);return e&&k.forEach(function(M){return t(o,M)}),pe&&Yt(o,y),C}function v(o,s,l,p){var C=qr(l);if(typeof C!="function")throw Error($(150));if(l=C.call(l),l==null)throw Error($(151));for(var x=C=null,k=s,y=s=0,b=null,R=l.next();k!==null&&!R.done;y++,R=l.next()){k.index>y?(b=k,k=null):b=k.sibling;var M=_(o,k,R.value,p);if(M===null){k===null&&(k=b);break}e&&k&&M.alternate===null&&t(o,k),s=h(M,s,y),x===null?C=M:x.sibling=M,x=M,k=b}if(R.done)return r(o,k),pe&&Yt(o,y),C;if(k===null){for(;!R.done;y++,R=l.next())R=d(o,R.value,p),R!==null&&(s=h(R,s,y),x===null?C=R:x.sibling=R,x=R);return pe&&Yt(o,y),C}for(k=i(o,k);!R.done;y++,R=l.next())R=S(k,o,y,R.value,p),R!==null&&(e&&R.alternate!==null&&k.delete(R.key===null?y:R.key),s=h(R,s,y),x===null?C=R:x.sibling=R,x=R);return e&&k.forEach(function(B){return t(o,B)}),pe&&Yt(o,y),C}function u(o,s,l,p){if(typeof l=="object"&&l!==null&&l.type===pr&&l.key===null&&(l=l.props.children),typeof l=="object"&&l!==null){switch(l.$$typeof){case Ki:e:{for(var C=l.key,x=s;x!==null;){if(x.key===C){if(C=l.type,C===pr){if(x.tag===7){r(o,x.sibling),s=n(x,l.props.children),s.return=o,o=s;break e}}else if(x.elementType===C||typeof C=="object"&&C!==null&&C.$$typeof===Mt&&Dl(C)===x.type){r(o,x.sibling),s=n(x,l.props),s.ref=Jr(o,x,l),s.return=o,o=s;break e}r(o,x);break}else t(o,x);x=x.sibling}l.type===pr?(s=ir(l.props.children,o.mode,p,l.key),s.return=o,o=s):(p=ys(l.type,l.key,l.props,null,o.mode,p),p.ref=Jr(o,s,l),p.return=o,o=p)}return m(o);case fr:e:{for(x=l.key;s!==null;){if(s.key===x)if(s.tag===4&&s.stateNode.containerInfo===l.containerInfo&&s.stateNode.implementation===l.implementation){r(o,s.sibling),s=n(s,l.children||[]),s.return=o,o=s;break e}else{r(o,s);break}else t(o,s);s=s.sibling}s=Fn(l,o.mode,p),s.return=o,o=s}return m(o);case Mt:return x=l._init,u(o,s,x(l._payload),p)}if(ii(l))return w(o,s,l,p);if(qr(l))return v(o,s,l,p);rs(o,l)}return typeof l=="string"&&l!==""||typeof l=="number"?(l=""+l,s!==null&&s.tag===6?(r(o,s.sibling),s=n(s,l),s.return=o,o=s):(r(o,s),s=Hn(l,o.mode,p),s.return=o,o=s),m(o)):r(o,s)}return u}var Br=ku(!0),Eu=ku(!1),Bs=Xt(null),Is=null,Cr=null,_a=null;function va(){_a=Cr=Is=null}function ga(e){var t=Bs.current;fe(Bs),e._currentValue=t}function So(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 Tr(e,t){Is=e,_a=Cr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(We=!0),e.firstContext=null)}function st(e){var t=e._currentValue;if(_a!==e)if(e={context:e,memoizedValue:t,next:null},Cr===null){if(Is===null)throw Error($(308));Cr=e,Is.dependencies={lanes:0,firstContext:e}}else Cr=Cr.next=e;return t}var er=null;function ma(e){er===null?er=[e]:er.push(e)}function bu(e,t,r,i){var n=t.interleaved;return n===null?(r.next=r,ma(t)):(r.next=n.next,n.next=r),t.interleaved=r,bt(e,i)}function bt(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 At=!1;function Sa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Lu(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 xt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Wt(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,ae&2){var n=i.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),i.pending=t,bt(e,r)}return n=i.interleaved,n===null?(t.next=t,ma(i)):(t.next=n.next,n.next=t),i.interleaved=t,bt(e,r)}function ps(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,sa(e,r)}}function Rl(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var n=null,h=null;if(r=r.firstBaseUpdate,r!==null){do{var m={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};h===null?n=h=m:h=h.next=m,r=r.next}while(r!==null);h===null?n=h=t:h=h.next=t}else n=h=t;r={baseState:i.baseState,firstBaseUpdate:n,lastBaseUpdate:h,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 js(e,t,r,i){var n=e.updateQueue;At=!1;var h=n.firstBaseUpdate,m=n.lastBaseUpdate,a=n.shared.pending;if(a!==null){n.shared.pending=null;var c=a,f=c.next;c.next=null,m===null?h=f:m.next=f,m=c;var g=e.alternate;g!==null&&(g=g.updateQueue,a=g.lastBaseUpdate,a!==m&&(a===null?g.firstBaseUpdate=f:a.next=f,g.lastBaseUpdate=c))}if(h!==null){var d=n.baseState;m=0,g=f=c=null,a=h;do{var _=a.lane,S=a.eventTime;if((i&_)===_){g!==null&&(g=g.next={eventTime:S,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,v=a;switch(_=t,S=r,v.tag){case 1:if(w=v.payload,typeof w=="function"){d=w.call(S,d,_);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,_=typeof w=="function"?w.call(S,d,_):w,_==null)break e;d=me({},d,_);break e;case 2:At=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,_=n.effects,_===null?n.effects=[a]:_.push(a))}else S={eventTime:S,lane:_,tag:a.tag,payload:a.payload,callback:a.callback,next:null},g===null?(f=g=S,c=d):g=g.next=S,m|=_;if(a=a.next,a===null){if(a=n.shared.pending,a===null)break;_=a,a=_.next,_.next=null,n.lastBaseUpdate=_,n.shared.pending=null}}while(!0);if(g===null&&(c=d),n.baseState=c,n.firstBaseUpdate=f,n.lastBaseUpdate=g,t=n.shared.interleaved,t!==null){n=t;do m|=n.lane,n=n.next;while(n!==t)}else h===null&&(n.shared.lanes=0);lr|=m,e.lanes=m,e.memoizedState=d}}function Tl(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],n=i.callback;if(n!==null){if(i.callback=null,i=r,typeof n!="function")throw Error($(191,n));n.call(i)}}}var Hi={},mt=Xt(Hi),Di=Xt(Hi),Ri=Xt(Hi);function tr(e){if(e===Hi)throw Error($(174));return e}function ya(e,t){switch(ue(Ri,t),ue(Di,e),ue(mt,Hi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Jn(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Jn(t,e)}fe(mt),ue(mt,t)}function Ir(){fe(mt),fe(Di),fe(Ri)}function Du(e){tr(Ri.current);var t=tr(mt.current),r=Jn(t,e.type);t!==r&&(ue(Di,e),ue(mt,r))}function wa(e){Di.current===e&&(fe(mt),fe(Di))}var ve=Xt(0);function Ns(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 An=[];function Ca(){for(var e=0;e<An.length;e++)An[e]._workInProgressVersionPrimary=null;An.length=0}var _s=Dt.ReactCurrentDispatcher,On=Dt.ReactCurrentBatchConfig,ar=0,ge=null,xe=null,Ee=null,Hs=!1,hi=!1,Ti=0,Of=0;function Me(){throw Error($(321))}function xa(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!dt(e[r],t[r]))return!1;return!0}function ka(e,t,r,i,n,h){if(ar=h,ge=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_s.current=e===null||e.memoizedState===null?Nf:Hf,e=r(i,n),hi){h=0;do{if(hi=!1,Ti=0,25<=h)throw Error($(301));h+=1,Ee=xe=null,t.updateQueue=null,_s.current=Ff,e=r(i,n)}while(hi)}if(_s.current=Fs,t=xe!==null&&xe.next!==null,ar=0,Ee=xe=ge=null,Hs=!1,t)throw Error($(300));return e}function Ea(){var e=Ti!==0;return Ti=0,e}function _t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ee===null?ge.memoizedState=Ee=e:Ee=Ee.next=e,Ee}function nt(){if(xe===null){var e=ge.alternate;e=e!==null?e.memoizedState:null}else e=xe.next;var t=Ee===null?ge.memoizedState:Ee.next;if(t!==null)Ee=t,xe=e;else{if(e===null)throw Error($(310));xe=e,e={memoizedState:xe.memoizedState,baseState:xe.baseState,baseQueue:xe.baseQueue,queue:xe.queue,next:null},Ee===null?ge.memoizedState=Ee=e:Ee=Ee.next=e}return Ee}function Pi(e,t){return typeof t=="function"?t(e):t}function Bn(e){var t=nt(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var i=xe,n=i.baseQueue,h=r.pending;if(h!==null){if(n!==null){var m=n.next;n.next=h.next,h.next=m}i.baseQueue=n=h,r.pending=null}if(n!==null){h=n.next,i=i.baseState;var a=m=null,c=null,f=h;do{var g=f.lane;if((ar&g)===g)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 d={lane:g,action:f.action,hasEagerState:f.hasEagerState,eagerState:f.eagerState,next:null};c===null?(a=c=d,m=i):c=c.next=d,ge.lanes|=g,lr|=g}f=f.next}while(f!==null&&f!==h);c===null?m=i:c.next=a,dt(i,t.memoizedState)||(We=!0),t.memoizedState=i,t.baseState=m,t.baseQueue=c,r.lastRenderedState=i}if(e=r.interleaved,e!==null){n=e;do h=n.lane,ge.lanes|=h,lr|=h,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function In(e){var t=nt(),r=t.queue;if(r===null)throw Error($(311));r.lastRenderedReducer=e;var i=r.dispatch,n=r.pending,h=t.memoizedState;if(n!==null){r.pending=null;var m=n=n.next;do h=e(h,m.action),m=m.next;while(m!==n);dt(h,t.memoizedState)||(We=!0),t.memoizedState=h,t.baseQueue===null&&(t.baseState=h),r.lastRenderedState=h}return[h,i]}function Ru(){}function Tu(e,t){var r=ge,i=nt(),n=t(),h=!dt(i.memoizedState,n);if(h&&(i.memoizedState=n,We=!0),i=i.queue,ba(Au.bind(null,r,i,e),[e]),i.getSnapshot!==t||h||Ee!==null&&Ee.memoizedState.tag&1){if(r.flags|=2048,Mi(9,Mu.bind(null,r,i,n,t),void 0,null),be===null)throw Error($(349));ar&30||Pu(r,t,n)}return n}function Pu(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function Mu(e,t,r,i){t.value=r,t.getSnapshot=i,Ou(t)&&Bu(e)}function Au(e,t,r){return r(function(){Ou(t)&&Bu(e)})}function Ou(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!dt(e,r)}catch{return!0}}function Bu(e){var t=bt(e,1);t!==null&&ht(t,e,1,-1)}function Pl(e){var t=_t();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Pi,lastRenderedState:e},t.queue=e,e=e.dispatch=jf.bind(null,ge,e),[t.memoizedState,e]}function Mi(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=ge.updateQueue,t===null?(t={lastEffect:null,stores:null},ge.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 Iu(){return nt().memoizedState}function vs(e,t,r,i){var n=_t();ge.flags|=e,n.memoizedState=Mi(1|t,r,void 0,i===void 0?null:i)}function en(e,t,r,i){var n=nt();i=i===void 0?null:i;var h=void 0;if(xe!==null){var m=xe.memoizedState;if(h=m.destroy,i!==null&&xa(i,m.deps)){n.memoizedState=Mi(t,r,h,i);return}}ge.flags|=e,n.memoizedState=Mi(1|t,r,h,i)}function Ml(e,t){return vs(8390656,8,e,t)}function ba(e,t){return en(2048,8,e,t)}function ju(e,t){return en(4,2,e,t)}function Nu(e,t){return en(4,4,e,t)}function Hu(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 Fu(e,t,r){return r=r!=null?r.concat([e]):null,en(4,4,Hu.bind(null,t,e),r)}function La(){}function zu(e,t){var r=nt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&xa(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function Wu(e,t){var r=nt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&xa(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function Uu(e,t,r){return ar&21?(dt(r,t)||(r=Gc(),ge.lanes|=r,lr|=r,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,We=!0),e.memoizedState=r)}function Bf(e,t){var r=le;le=r!==0&&4>r?r:4,e(!0);var i=On.transition;On.transition={};try{e(!1),t()}finally{le=r,On.transition=i}}function $u(){return nt().memoizedState}function If(e,t,r){var i=$t(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},Ku(e))Vu(t,r);else if(r=bu(e,t,r,i),r!==null){var n=je();ht(r,e,i,n),qu(r,t,i)}}function jf(e,t,r){var i=$t(e),n={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(Ku(e))Vu(t,n);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=t.lastRenderedReducer,h!==null))try{var m=t.lastRenderedState,a=h(m,r);if(n.hasEagerState=!0,n.eagerState=a,dt(a,m)){var c=t.interleaved;c===null?(n.next=n,ma(t)):(n.next=c.next,c.next=n),t.interleaved=n;return}}catch{}finally{}r=bu(e,t,n,i),r!==null&&(n=je(),ht(r,e,i,n),qu(r,t,i))}}function Ku(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Vu(e,t){hi=Hs=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function qu(e,t,r){if(r&4194240){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,sa(e,r)}}var Fs={readContext:st,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useInsertionEffect:Me,useLayoutEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useMutableSource:Me,useSyncExternalStore:Me,useId:Me,unstable_isNewReconciler:!1},Nf={readContext:st,useCallback:function(e,t){return _t().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Ml,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,vs(4194308,4,Hu.bind(null,t,e),r)},useLayoutEffect:function(e,t){return vs(4194308,4,e,t)},useInsertionEffect:function(e,t){return vs(4,2,e,t)},useMemo:function(e,t){var r=_t();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=_t();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=If.bind(null,ge,e),[i.memoizedState,e]},useRef:function(e){var t=_t();return e={current:e},t.memoizedState=e},useState:Pl,useDebugValue:La,useDeferredValue:function(e){return _t().memoizedState=e},useTransition:function(){var e=Pl(!1),t=e[0];return e=Bf.bind(null,e[1]),_t().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=ge,n=_t();if(pe){if(r===void 0)throw Error($(407));r=r()}else{if(r=t(),be===null)throw Error($(349));ar&30||Pu(i,t,r)}n.memoizedState=r;var h={value:r,getSnapshot:t};return n.queue=h,Ml(Au.bind(null,i,h,e),[e]),i.flags|=2048,Mi(9,Mu.bind(null,i,h,r,t),void 0,null),r},useId:function(){var e=_t(),t=be.identifierPrefix;if(pe){var r=Ct,i=wt;r=(i&~(1<<32-ut(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ti++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=Of++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Hf={readContext:st,useCallback:zu,useContext:st,useEffect:ba,useImperativeHandle:Fu,useInsertionEffect:ju,useLayoutEffect:Nu,useMemo:Wu,useReducer:Bn,useRef:Iu,useState:function(){return Bn(Pi)},useDebugValue:La,useDeferredValue:function(e){var t=nt();return Uu(t,xe.memoizedState,e)},useTransition:function(){var e=Bn(Pi)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Ru,useSyncExternalStore:Tu,useId:$u,unstable_isNewReconciler:!1},Ff={readContext:st,useCallback:zu,useContext:st,useEffect:ba,useImperativeHandle:Fu,useInsertionEffect:ju,useLayoutEffect:Nu,useMemo:Wu,useReducer:In,useRef:Iu,useState:function(){return In(Pi)},useDebugValue:La,useDeferredValue:function(e){var t=nt();return xe===null?t.memoizedState=e:Uu(t,xe.memoizedState,e)},useTransition:function(){var e=In(Pi)[0],t=nt().memoizedState;return[e,t]},useMutableSource:Ru,useSyncExternalStore:Tu,useId:$u,unstable_isNewReconciler:!1};function at(e,t){if(e&&e.defaultProps){t=me({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function yo(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:me({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var tn={isMounted:function(e){return(e=e._reactInternals)?hr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=je(),n=$t(e),h=xt(i,n);h.payload=t,r!=null&&(h.callback=r),t=Wt(e,h,n),t!==null&&(ht(t,e,n,i),ps(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=je(),n=$t(e),h=xt(i,n);h.tag=1,h.payload=t,r!=null&&(h.callback=r),t=Wt(e,h,n),t!==null&&(ht(t,e,n,i),ps(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=je(),i=$t(e),n=xt(r,i);n.tag=2,t!=null&&(n.callback=t),t=Wt(e,n,i),t!==null&&(ht(t,e,i,r),ps(t,e,i))}};function Al(e,t,r,i,n,h,m){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,h,m):t.prototype&&t.prototype.isPureReactComponent?!ki(r,i)||!ki(n,h):!0}function Gu(e,t,r){var i=!1,n=qt,h=t.contextType;return typeof h=="object"&&h!==null?h=st(h):(n=$e(t)?nr:Be.current,i=t.contextTypes,h=(i=i!=null)?Ar(e,n):qt),t=new t(r,h),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=tn,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=h),t}function Ol(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&&tn.enqueueReplaceState(t,t.state,null)}function wo(e,t,r,i){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},Sa(e);var h=t.contextType;typeof h=="object"&&h!==null?n.context=st(h):(h=$e(t)?nr:Be.current,n.context=Ar(e,h)),n.state=e.memoizedState,h=t.getDerivedStateFromProps,typeof h=="function"&&(yo(e,t,h,r),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&tn.enqueueReplaceState(n,n.state,null),js(e,r,n,i),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function jr(e,t){try{var r="",i=t;do r+=fd(i),i=i.return;while(i);var n=r}catch(h){n=`
|
|
39
39
|
Error generating stack: `+h.message+`
|
|
40
|
-
`+h.stack}return{value:e,source:t,stack:n,digest:null}}function jn(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Co(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var Ff=typeof WeakMap=="function"?WeakMap:Map;function Gu(e,t,r){r=xt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Ws||(Ws=!0,Mo=i),Co(e,t)},r}function Xu(e,t,r){r=xt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var n=t.value;r.payload=function(){return i(n)},r.callback=function(){Co(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(r.callback=function(){Co(e,t),typeof i!="function"&&(Ut===null?Ut=new Set([this]):Ut.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),r}function Ol(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new Ff;var n=new Set;i.set(t,n)}else n=i.get(t),n===void 0&&(n=new Set,i.set(t,n));n.has(r)||(n.add(r),e=ep.bind(null,e,t,r),t.then(e,e))}function Bl(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 Il(e,t,r,i,n){return e.mode&1?(e.flags|=65536,e.lanes=n,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=xt(-1,1),t.tag=2,Wt(r,t,1))),r.lanes|=1),e)}var zf=Dt.ReactCurrentOwner,We=!1;function Ie(e,t,r,i){t.child=e===null?ku(t,null,r,i):Br(t,e.child,r,i)}function jl(e,t,r,i,n){r=r.render;var h=t.ref;return Tr(t,n),i=xa(e,t,r,i,h,n),r=ka(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Lt(e,t,n)):(pe&&r&&ha(t),t.flags|=1,Ie(e,t,i,n),t.child)}function Nl(e,t,r,i,n){if(e===null){var h=r.type;return typeof h=="function"&&!Oa(h)&&h.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=h,Qu(e,t,h,i,n)):(e=ys(r.type,null,i,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!(e.lanes&n)){var m=h.memoizedProps;if(r=r.compare,r=r!==null?r:ki,r(m,i)&&e.ref===t.ref)return Lt(e,t,n)}return t.flags|=1,e=Kt(h,i),e.ref=t.ref,e.return=t,t.child=e}function Qu(e,t,r,i,n){if(e!==null){var h=e.memoizedProps;if(ki(h,i)&&e.ref===t.ref)if(We=!1,t.pendingProps=i=h,(e.lanes&n)!==0)e.flags&131072&&(We=!0);else return t.lanes=e.lanes,Lt(e,t,n)}return xo(e,t,r,i,n)}function Yu(e,t,r){var i=t.pendingProps,n=i.children,h=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(kr,Ve),Ve|=r;else{if(!(r&1073741824))return e=h!==null?h.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue(kr,Ve),Ve|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=h!==null?h.baseLanes:r,ue(kr,Ve),Ve|=i}else h!==null?(i=h.baseLanes|r,t.memoizedState=null):i=r,ue(kr,Ve),Ve|=i;return Ie(e,t,n,r),t.child}function Ju(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function xo(e,t,r,i,n){var h=$e(r)?nr:Be.current;return h=Ar(t,h),Tr(t,n),r=xa(e,t,r,i,h,n),i=ka(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Lt(e,t,n)):(pe&&i&&ha(t),t.flags|=1,Ie(e,t,r,n),t.child)}function Hl(e,t,r,i,n){if($e(r)){var h=!0;Ms(t)}else h=!1;if(Tr(t,n),t.stateNode===null)gs(e,t),qu(t,r,i),wo(t,r,i,n),i=!0;else if(e===null){var m=t.stateNode,a=t.memoizedProps;m.props=a;var c=m.context,f=r.contextType;typeof f=="object"&&f!==null?f=st(f):(f=$e(r)?nr:Be.current,f=Ar(t,f));var g=r.getDerivedStateFromProps,d=typeof g=="function"||typeof m.getSnapshotBeforeUpdate=="function";d||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(a!==i||c!==f)&&Al(t,m,i,f),At=!1;var p=t.memoizedState;m.state=p,js(t,i,m,n),c=t.memoizedState,a!==i||p!==c||Ue.current||At?(typeof g=="function"&&(yo(t,r,g,i),c=t.memoizedState),(a=At||Ml(t,r,a,i,p,c,f))?(d||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),m.props=i,m.state=c,m.context=f,i=a):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{m=t.stateNode,bu(e,t),a=t.memoizedProps,f=t.type===t.elementType?a:at(t.type,a),m.props=f,d=t.pendingProps,p=m.context,c=r.contextType,typeof c=="object"&&c!==null?c=st(c):(c=$e(r)?nr:Be.current,c=Ar(t,c));var S=r.getDerivedStateFromProps;(g=typeof S=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(a!==d||p!==c)&&Al(t,m,i,c),At=!1,p=t.memoizedState,m.state=p,js(t,i,m,n);var w=t.memoizedState;a!==d||p!==w||Ue.current||At?(typeof S=="function"&&(yo(t,r,S,i),w=t.memoizedState),(f=At||Ml(t,r,f,i,p,w,c)||!1)?(g||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(i,w,c),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(i,w,c)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=w),m.props=i,m.state=w,m.context=c,i=f):(typeof m.componentDidUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),i=!1)}return ko(e,t,r,i,h,n)}function ko(e,t,r,i,n,h){Ju(e,t);var m=(t.flags&128)!==0;if(!i&&!m)return n&&kl(t,r,!1),Lt(e,t,h);i=t.stateNode,zf.current=t;var a=m&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&m?(t.child=Br(t,e.child,null,h),t.child=Br(t,null,a,h)):Ie(e,t,a,h),t.memoizedState=i.state,n&&kl(t,r,!0),t.child}function Zu(e){var t=e.stateNode;t.pendingContext?xl(e,t.pendingContext,t.pendingContext!==t.context):t.context&&xl(e,t.context,!1),Sa(e,t.containerInfo)}function Fl(e,t,r,i,n){return Or(),fa(n),t.flags|=256,Ie(e,t,r,i),t.child}var Eo={dehydrated:null,treeContext:null,retryLane:0};function bo(e){return{baseLanes:e,cachePool:null,transitions:null}}function eh(e,t,r){var i=t.pendingProps,n=ve.current,h=!1,m=(t.flags&128)!==0,a;if((a=m)||(a=e!==null&&e.memoizedState===null?!1:(n&2)!==0),a?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),ue(ve,n&1),e===null)return mo(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):(m=i.children,e=i.fallback,h?(i=t.mode,h=t.child,m={mode:"hidden",children:m},!(i&1)&&h!==null?(h.childLanes=0,h.pendingProps=m):h=nn(m,i,0,null),e=ir(e,i,r,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=bo(r),t.memoizedState=Eo,e):La(t,m));if(n=e.memoizedState,n!==null&&(a=n.dehydrated,a!==null))return Wf(e,t,m,i,a,n,r);if(h){h=i.fallback,m=t.mode,n=e.child,a=n.sibling;var c={mode:"hidden",children:i.children};return!(m&1)&&t.child!==n?(i=t.child,i.childLanes=0,i.pendingProps=c,t.deletions=null):(i=Kt(n,c),i.subtreeFlags=n.subtreeFlags&14680064),a!==null?h=Kt(a,h):(h=ir(h,m,r,null),h.flags|=2),h.return=t,i.return=t,i.sibling=h,t.child=i,i=h,h=t.child,m=e.child.memoizedState,m=m===null?bo(r):{baseLanes:m.baseLanes|r,cachePool:null,transitions:m.transitions},h.memoizedState=m,h.childLanes=e.childLanes&~r,t.memoizedState=Eo,i}return h=e.child,e=h.sibling,i=Kt(h,{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 La(e,t){return t=nn({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function is(e,t,r,i){return i!==null&&fa(i),Br(t,e.child,null,r),e=La(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wf(e,t,r,i,n,h,m){if(r)return t.flags&256?(t.flags&=-257,i=jn(Error($(422))),is(e,t,m,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=i.fallback,n=t.mode,i=nn({mode:"visible",children:i.children},n,0,null),h=ir(h,n,m,null),h.flags|=2,i.return=t,h.return=t,i.sibling=h,t.child=i,t.mode&1&&Br(t,e.child,null,m),t.child.memoizedState=bo(m),t.memoizedState=Eo,h);if(!(t.mode&1))return is(e,t,m,null);if(n.data==="$!"){if(i=n.nextSibling&&n.nextSibling.dataset,i)var a=i.dgst;return i=a,h=Error($(419)),i=jn(h,i,void 0),is(e,t,m,i)}if(a=(m&e.childLanes)!==0,We||a){if(i=be,i!==null){switch(m&-m){case 4:n=2;break;case 16:n=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:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(i.suspendedLanes|m)?0:n,n!==0&&n!==h.retryLane&&(h.retryLane=n,bt(e,n),ht(i,e,n,-1))}return Aa(),i=jn(Error($(421))),is(e,t,m,i)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=tp.bind(null,e),n._reactRetry=t,null):(e=h.treeContext,qe=zt(n.nextSibling),Ge=t,pe=!0,ct=null,e!==null&&(et[tt++]=wt,et[tt++]=Ct,et[tt++]=or,wt=e.id,Ct=e.overflow,or=t),t=La(t,i.children),t.flags|=4096,t)}function zl(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),So(e.return,t,r)}function Nn(e,t,r,i,n){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:n}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=r,h.tailMode=n)}function th(e,t,r){var i=t.pendingProps,n=i.revealOrder,h=i.tail;if(Ie(e,t,i.children,r),i=ve.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&&zl(e,r,t);else if(e.tag===19)zl(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(ue(ve,i),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&Ns(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),Nn(t,!1,n,r,h);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Ns(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}Nn(t,!0,r,null,h);break;case"together":Nn(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),lr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,r=Kt(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Kt(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function Uf(e,t,r){switch(t.tag){case 3:Zu(t),Or();break;case 5:Lu(t);break;case 1:$e(t.type)&&Ms(t);break;case 4:Sa(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,n=t.memoizedProps.value;ue(Bs,i._currentValue),i._currentValue=n;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ue(ve,ve.current&1),t.flags|=128,null):r&t.child.childLanes?eh(e,t,r):(ue(ve,ve.current&1),e=Lt(e,t,r),e!==null?e.sibling:null);ue(ve,ve.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return th(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),ue(ve,ve.current),i)break;return null;case 22:case 23:return t.lanes=0,Yu(e,t,r)}return Lt(e,t,r)}var rh,Lo,ih,sh;rh=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}};Lo=function(){};ih=function(e,t,r,i){var n=e.memoizedProps;if(n!==i){e=t.stateNode,tr(mt.current);var h=null;switch(r){case"input":n=Gn(e,n),i=Gn(e,i),h=[];break;case"select":n=me({},n,{value:void 0}),i=me({},i,{value:void 0}),h=[];break;case"textarea":n=Yn(e,n),i=Yn(e,i),h=[];break;default:typeof n.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Ts)}Zn(r,i);var m;r=null;for(f in n)if(!i.hasOwnProperty(f)&&n.hasOwnProperty(f)&&n[f]!=null)if(f==="style"){var a=n[f];for(m in a)a.hasOwnProperty(m)&&(r||(r={}),r[m]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(gi.hasOwnProperty(f)?h||(h=[]):(h=h||[]).push(f,null));for(f in i){var c=i[f];if(a=n!=null?n[f]:void 0,i.hasOwnProperty(f)&&c!==a&&(c!=null||a!=null))if(f==="style")if(a){for(m in a)!a.hasOwnProperty(m)||c&&c.hasOwnProperty(m)||(r||(r={}),r[m]="");for(m in c)c.hasOwnProperty(m)&&a[m]!==c[m]&&(r||(r={}),r[m]=c[m])}else r||(h||(h=[]),h.push(f,r)),r=c;else f==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(h=h||[]).push(f,c)):f==="children"?typeof c!="string"&&typeof c!="number"||(h=h||[]).push(f,""+c):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(gi.hasOwnProperty(f)?(c!=null&&f==="onScroll"&&he("scroll",e),h||a===c||(h=[])):(h=h||[]).push(f,c))}r&&(h=h||[]).push("style",r);var f=h;(t.updateQueue=f)&&(t.flags|=4)}};sh=function(e,t,r,i){r!==i&&(t.flags|=4)};function Zr(e,t){if(!pe)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 Ae(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,i|=n.subtreeFlags&14680064,i|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,i|=n.subtreeFlags,i|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function $f(e,t,r){var i=t.pendingProps;switch(da(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(t),null;case 1:return $e(t.type)&&Ps(),Ae(t),null;case 3:return i=t.stateNode,Ir(),fe(Ue),fe(Be),wa(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ts(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ct!==null&&(Bo(ct),ct=null))),Lo(e,t),Ae(t),null;case 5:ya(t);var n=tr(Ri.current);if(r=t.type,e!==null&&t.stateNode!=null)ih(e,t,r,i,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error($(166));return Ae(t),null}if(e=tr(mt.current),ts(t)){i=t.stateNode,r=t.type;var h=t.memoizedProps;switch(i[vt]=t,i[Li]=h,e=(t.mode&1)!==0,r){case"dialog":he("cancel",i),he("close",i);break;case"iframe":case"object":case"embed":he("load",i);break;case"video":case"audio":for(n=0;n<ni.length;n++)he(ni[n],i);break;case"source":he("error",i);break;case"img":case"image":case"link":he("error",i),he("load",i);break;case"details":he("toggle",i);break;case"input":Qa(i,h),he("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!h.multiple},he("invalid",i);break;case"textarea":Ja(i,h),he("invalid",i)}Zn(r,h),n=null;for(var m in h)if(h.hasOwnProperty(m)){var a=h[m];m==="children"?typeof a=="string"?i.textContent!==a&&(h.suppressHydrationWarning!==!0&&es(i.textContent,a,e),n=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(h.suppressHydrationWarning!==!0&&es(i.textContent,a,e),n=["children",""+a]):gi.hasOwnProperty(m)&&a!=null&&m==="onScroll"&&he("scroll",i)}switch(r){case"input":Vi(i),Ya(i,h,!0);break;case"textarea":Vi(i),Za(i);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(i.onclick=Ts)}i=n,t.updateQueue=i,i!==null&&(t.flags|=4)}else{m=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Mc(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=m.createElement(r,{is:i.is}):(e=m.createElement(r),r==="select"&&(m=e,i.multiple?m.multiple=!0:i.size&&(m.size=i.size))):e=m.createElementNS(e,r),e[vt]=t,e[Li]=i,rh(e,t,!1,!1),t.stateNode=e;e:{switch(m=eo(r,i),r){case"dialog":he("cancel",e),he("close",e),n=i;break;case"iframe":case"object":case"embed":he("load",e),n=i;break;case"video":case"audio":for(n=0;n<ni.length;n++)he(ni[n],e);n=i;break;case"source":he("error",e),n=i;break;case"img":case"image":case"link":he("error",e),he("load",e),n=i;break;case"details":he("toggle",e),n=i;break;case"input":Qa(e,i),n=Gn(e,i),he("invalid",e);break;case"option":n=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},n=me({},i,{value:void 0}),he("invalid",e);break;case"textarea":Ja(e,i),n=Yn(e,i),he("invalid",e);break;default:n=i}Zn(r,n),a=n;for(h in a)if(a.hasOwnProperty(h)){var c=a[h];h==="style"?Bc(e,c):h==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Ac(e,c)):h==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&mi(e,c):typeof c=="number"&&mi(e,""+c):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(gi.hasOwnProperty(h)?c!=null&&h==="onScroll"&&he("scroll",e):c!=null&&Yo(e,h,c,m))}switch(r){case"input":Vi(e),Ya(e,i,!1);break;case"textarea":Vi(e),Za(e);break;case"option":i.value!=null&&e.setAttribute("value",""+Vt(i.value));break;case"select":e.multiple=!!i.multiple,h=i.value,h!=null?br(e,!!i.multiple,h,!1):i.defaultValue!=null&&br(e,!!i.multiple,i.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Ts)}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 Ae(t),null;case 6:if(e&&t.stateNode!=null)sh(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error($(166));if(r=tr(Ri.current),tr(mt.current),ts(t)){if(i=t.stateNode,r=t.memoizedProps,i[vt]=t,(h=i.nodeValue!==r)&&(e=Ge,e!==null))switch(e.tag){case 3:es(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&es(i.nodeValue,r,(e.mode&1)!==0)}h&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[vt]=t,t.stateNode=i}return Ae(t),null;case 13:if(fe(ve),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&qe!==null&&t.mode&1&&!(t.flags&128))Cu(),Or(),t.flags|=98560,h=!1;else if(h=ts(t),i!==null&&i.dehydrated!==null){if(e===null){if(!h)throw Error($(318));if(h=t.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error($(317));h[vt]=t}else Or(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ae(t),h=!1}else ct!==null&&(Bo(ct),ct=null),h=!0;if(!h)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||ve.current&1?ke===0&&(ke=3):Aa())),t.updateQueue!==null&&(t.flags|=4),Ae(t),null);case 4:return Ir(),Lo(e,t),e===null&&Ei(t.stateNode.containerInfo),Ae(t),null;case 10:return va(t.type._context),Ae(t),null;case 17:return $e(t.type)&&Ps(),Ae(t),null;case 19:if(fe(ve),h=t.memoizedState,h===null)return Ae(t),null;if(i=(t.flags&128)!==0,m=h.rendering,m===null)if(i)Zr(h,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(m=Ns(e),m!==null){for(t.flags|=128,Zr(h,!1),i=m.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)h=r,e=i,h.flags&=14680066,m=h.alternate,m===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=m.childLanes,h.lanes=m.lanes,h.child=m.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=m.memoizedProps,h.memoizedState=m.memoizedState,h.updateQueue=m.updateQueue,h.type=m.type,e=m.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ue(ve,ve.current&1|2),t.child}e=e.sibling}h.tail!==null&&we()>Nr&&(t.flags|=128,i=!0,Zr(h,!1),t.lanes=4194304)}else{if(!i)if(e=Ns(m),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Zr(h,!0),h.tail===null&&h.tailMode==="hidden"&&!m.alternate&&!pe)return Ae(t),null}else 2*we()-h.renderingStartTime>Nr&&r!==1073741824&&(t.flags|=128,i=!0,Zr(h,!1),t.lanes=4194304);h.isBackwards?(m.sibling=t.child,t.child=m):(r=h.last,r!==null?r.sibling=m:t.child=m,h.last=m)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=we(),t.sibling=null,r=ve.current,ue(ve,i?r&1|2:r&1),t):(Ae(t),null);case 22:case 23:return Ma(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Ve&1073741824&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function Kf(e,t){switch(da(t),t.tag){case 1:return $e(t.type)&&Ps(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ir(),fe(Ue),fe(Be),wa(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return ya(t),null;case 13:if(fe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Or()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(ve),null;case 4:return Ir(),null;case 10:return va(t.type._context),null;case 22:case 23:return Ma(),null;case 24:return null;default:return null}}var ss=!1,Oe=!1,Vf=typeof WeakSet=="function"?WeakSet:Set,Y=null;function xr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Se(e,t,i)}else r.current=null}function Do(e,t,r){try{r()}catch(i){Se(e,t,i)}}var Wl=!1;function qf(e,t){if(uo=Ls,e=cu(),ua(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 n=i.anchorOffset,h=i.focusNode;i=i.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var m=0,a=-1,c=-1,f=0,g=0,d=e,p=null;t:for(;;){for(var S;d!==r||n!==0&&d.nodeType!==3||(a=m+n),d!==h||i!==0&&d.nodeType!==3||(c=m+i),d.nodeType===3&&(m+=d.nodeValue.length),(S=d.firstChild)!==null;)p=d,d=S;for(;;){if(d===e)break t;if(p===r&&++f===n&&(a=m),p===h&&++g===i&&(c=m),(S=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=S}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(ho={focusedElem:e,selectionRange:r},Ls=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,u=w.memoizedState,o=t.stateNode,s=o.getSnapshotBeforeUpdate(t.elementType===t.type?v:at(t.type,v),u);o.__reactInternalSnapshotBeforeUpdate=s}break;case 3:var l=t.stateNode.containerInfo;l.nodeType===1?l.textContent="":l.nodeType===9&&l.documentElement&&l.removeChild(l.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(_){Se(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return w=Wl,Wl=!1,w}function di(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var n=i=i.next;do{if((n.tag&e)===e){var h=n.destroy;n.destroy=void 0,h!==void 0&&Do(t,r,h)}n=n.next}while(n!==i)}}function rn(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 Ro(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 nh(e){var t=e.alternate;t!==null&&(e.alternate=null,nh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vt],delete t[Li],delete t[_o],delete t[Rf],delete t[Tf])),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 oh(e){return e.tag===5||e.tag===3||e.tag===4}function Ul(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||oh(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 To(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=Ts));else if(i!==4&&(e=e.child,e!==null))for(To(e,t,r),e=e.sibling;e!==null;)To(e,t,r),e=e.sibling}function Po(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(Po(e,t,r),e=e.sibling;e!==null;)Po(e,t,r),e=e.sibling}var Le=null,lt=!1;function Pt(e,t,r){for(r=r.child;r!==null;)ah(e,t,r),r=r.sibling}function ah(e,t,r){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Gs,r)}catch{}switch(r.tag){case 5:Oe||xr(r,t);case 6:var i=Le,n=lt;Le=null,Pt(e,t,r),Le=i,lt=n,Le!==null&&(lt?(e=Le,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Le.removeChild(r.stateNode));break;case 18:Le!==null&&(lt?(e=Le,r=r.stateNode,e.nodeType===8?Pn(e.parentNode,r):e.nodeType===1&&Pn(e,r),Ci(e)):Pn(Le,r.stateNode));break;case 4:i=Le,n=lt,Le=r.stateNode.containerInfo,lt=!0,Pt(e,t,r),Le=i,lt=n;break;case 0:case 11:case 14:case 15:if(!Oe&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){n=i=i.next;do{var h=n,m=h.destroy;h=h.tag,m!==void 0&&(h&2||h&4)&&Do(r,t,m),n=n.next}while(n!==i)}Pt(e,t,r);break;case 1:if(!Oe&&(xr(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(a){Se(r,t,a)}Pt(e,t,r);break;case 21:Pt(e,t,r);break;case 22:r.mode&1?(Oe=(i=Oe)||r.memoizedState!==null,Pt(e,t,r),Oe=i):Pt(e,t,r);break;default:Pt(e,t,r)}}function $l(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new Vf),t.forEach(function(i){var n=rp.bind(null,e,i);r.has(i)||(r.add(i),i.then(n,n))})}}function ot(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var n=r[i];try{var h=e,m=t,a=m;e:for(;a!==null;){switch(a.tag){case 5:Le=a.stateNode,lt=!1;break e;case 3:Le=a.stateNode.containerInfo,lt=!0;break e;case 4:Le=a.stateNode.containerInfo,lt=!0;break e}a=a.return}if(Le===null)throw Error($(160));ah(h,m,n),Le=null,lt=!1;var c=n.alternate;c!==null&&(c.return=null),n.return=null}catch(f){Se(n,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)lh(t,e),t=t.sibling}function lh(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ot(t,e),pt(e),i&4){try{di(3,e,e.return),rn(3,e)}catch(v){Se(e,e.return,v)}try{di(5,e,e.return)}catch(v){Se(e,e.return,v)}}break;case 1:ot(t,e),pt(e),i&512&&r!==null&&xr(r,r.return);break;case 5:if(ot(t,e),pt(e),i&512&&r!==null&&xr(r,r.return),e.flags&32){var n=e.stateNode;try{mi(n,"")}catch(v){Se(e,e.return,v)}}if(i&4&&(n=e.stateNode,n!=null)){var h=e.memoizedProps,m=r!==null?r.memoizedProps:h,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&h.type==="radio"&&h.name!=null&&Tc(n,h),eo(a,m);var f=eo(a,h);for(m=0;m<c.length;m+=2){var g=c[m],d=c[m+1];g==="style"?Bc(n,d):g==="dangerouslySetInnerHTML"?Ac(n,d):g==="children"?mi(n,d):Yo(n,g,d,f)}switch(a){case"input":Xn(n,h);break;case"textarea":Pc(n,h);break;case"select":var p=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!h.multiple;var S=h.value;S!=null?br(n,!!h.multiple,S,!1):p!==!!h.multiple&&(h.defaultValue!=null?br(n,!!h.multiple,h.defaultValue,!0):br(n,!!h.multiple,h.multiple?[]:"",!1))}n[Li]=h}catch(v){Se(e,e.return,v)}}break;case 6:if(ot(t,e),pt(e),i&4){if(e.stateNode===null)throw Error($(162));n=e.stateNode,h=e.memoizedProps;try{n.nodeValue=h}catch(v){Se(e,e.return,v)}}break;case 3:if(ot(t,e),pt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Ci(t.containerInfo)}catch(v){Se(e,e.return,v)}break;case 4:ot(t,e),pt(e);break;case 13:ot(t,e),pt(e),n=e.child,n.flags&8192&&(h=n.memoizedState!==null,n.stateNode.isHidden=h,!h||n.alternate!==null&&n.alternate.memoizedState!==null||(Ta=we())),i&4&&$l(e);break;case 22:if(g=r!==null&&r.memoizedState!==null,e.mode&1?(Oe=(f=Oe)||g,ot(t,e),Oe=f):ot(t,e),pt(e),i&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!g&&e.mode&1)for(Y=e,g=e.child;g!==null;){for(d=Y=g;Y!==null;){switch(p=Y,S=p.child,p.tag){case 0:case 11:case 14:case 15:di(4,p,p.return);break;case 1:xr(p,p.return);var w=p.stateNode;if(typeof w.componentWillUnmount=="function"){i=p,r=p.return;try{t=i,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){Se(i,r,v)}}break;case 5:xr(p,p.return);break;case 22:if(p.memoizedState!==null){Vl(d);continue}}S!==null?(S.return=p,Y=S):Vl(d)}g=g.sibling}e:for(g=null,d=e;;){if(d.tag===5){if(g===null){g=d;try{n=d.stateNode,f?(h=n.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(a=d.stateNode,c=d.memoizedProps.style,m=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=Oc("display",m))}catch(v){Se(e,e.return,v)}}}else if(d.tag===6){if(g===null)try{d.stateNode.nodeValue=f?"":d.memoizedProps}catch(v){Se(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;g===d&&(g=null),d=d.return}g===d&&(g=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ot(t,e),pt(e),i&4&&$l(e);break;case 21:break;default:ot(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(oh(r)){var i=r;break e}r=r.return}throw Error($(160))}switch(i.tag){case 5:var n=i.stateNode;i.flags&32&&(mi(n,""),i.flags&=-33);var h=Ul(e);Po(e,h,n);break;case 3:case 4:var m=i.stateNode.containerInfo,a=Ul(e);To(e,a,m);break;default:throw Error($(161))}}catch(c){Se(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gf(e,t,r){Y=e,ch(e)}function ch(e,t,r){for(var i=(e.mode&1)!==0;Y!==null;){var n=Y,h=n.child;if(n.tag===22&&i){var m=n.memoizedState!==null||ss;if(!m){var a=n.alternate,c=a!==null&&a.memoizedState!==null||Oe;a=ss;var f=Oe;if(ss=m,(Oe=c)&&!f)for(Y=n;Y!==null;)m=Y,c=m.child,m.tag===22&&m.memoizedState!==null?ql(n):c!==null?(c.return=m,Y=c):ql(n);for(;h!==null;)Y=h,ch(h),h=h.sibling;Y=n,ss=a,Oe=f}Kl(e)}else n.subtreeFlags&8772&&h!==null?(h.return=n,Y=h):Kl(e)}}function Kl(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||rn(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Oe)if(r===null)i.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:at(t.type,r.memoizedProps);i.componentDidUpdate(n,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var h=t.updateQueue;h!==null&&Rl(t,h,i);break;case 3:var m=t.updateQueue;if(m!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Rl(t,m,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;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 g=f.memoizedState;if(g!==null){var d=g.dehydrated;d!==null&&Ci(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}Oe||t.flags&512&&Ro(t)}catch(p){Se(t,t.return,p)}}if(t===e){Y=null;break}if(r=t.sibling,r!==null){r.return=t.return,Y=r;break}Y=t.return}}function Vl(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Y=r;break}Y=t.return}}function ql(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{rn(4,t)}catch(c){Se(t,r,c)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var n=t.return;try{i.componentDidMount()}catch(c){Se(t,n,c)}}var h=t.return;try{Ro(t)}catch(c){Se(t,h,c)}break;case 5:var m=t.return;try{Ro(t)}catch(c){Se(t,m,c)}}}catch(c){Se(t,t.return,c)}if(t===e){Y=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Y=a;break}Y=t.return}}var Xf=Math.ceil,zs=Dt.ReactCurrentDispatcher,Da=Dt.ReactCurrentOwner,it=Dt.ReactCurrentBatchConfig,ae=0,be=null,Ce=null,Te=0,Ve=0,kr=Xt(0),ke=0,Ai=null,lr=0,sn=0,Ra=0,fi=null,ze=null,Ta=0,Nr=1/0,St=null,Ws=!1,Mo=null,Ut=null,ns=!1,jt=null,Us=0,pi=0,Ao=null,ms=-1,Ss=0;function je(){return ae&6?we():ms!==-1?ms:ms=we()}function $t(e){return e.mode&1?ae&2&&Te!==0?Te&-Te:Mf.transition!==null?(Ss===0&&(Ss=qc()),Ss):(e=le,e!==0||(e=window.event,e=e===void 0?16:eu(e.type)),e):1}function ht(e,t,r,i){if(50<pi)throw pi=0,Ao=null,Error($(185));Ii(e,r,i),(!(ae&2)||e!==be)&&(e===be&&(!(ae&2)&&(sn|=r),ke===4&&Bt(e,Te)),Ke(e,i),r===1&&ae===0&&!(t.mode&1)&&(Nr=we()+500,Zs&&Qt()))}function Ke(e,t){var r=e.callbackNode;Pd(e,t);var i=bs(e,e===be?Te:0);if(i===0)r!==null&&rl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&rl(r),t===1)e.tag===0?Pf(Gl.bind(null,e)):Su(Gl.bind(null,e)),Lf(function(){!(ae&6)&&Qt()}),r=null;else{switch(Gc(i)){case 1:r=ra;break;case 4:r=Kc;break;case 16:r=Es;break;case 536870912:r=Vc;break;default:r=Es}r=gh(r,uh.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function uh(e,t){if(ms=-1,Ss=0,ae&6)throw Error($(327));var r=e.callbackNode;if(Pr()&&e.callbackNode!==r)return null;var i=bs(e,e===be?Te:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=$s(e,i);else{t=i;var n=ae;ae|=2;var h=dh();(be!==e||Te!==t)&&(St=null,Nr=we()+500,rr(e,t));do try{Jf();break}catch(a){hh(e,a)}while(!0);_a(),zs.current=h,ae=n,Ce!==null?t=0:(be=null,Te=0,t=ke)}if(t!==0){if(t===2&&(n=no(e),n!==0&&(i=n,t=Oo(e,n))),t===1)throw r=Ai,rr(e,0),Bt(e,i),Ke(e,we()),r;if(t===6)Bt(e,i);else{if(n=e.current.alternate,!(i&30)&&!Qf(n)&&(t=$s(e,i),t===2&&(h=no(e),h!==0&&(i=h,t=Oo(e,h))),t===1))throw r=Ai,rr(e,0),Bt(e,i),Ke(e,we()),r;switch(e.finishedWork=n,e.finishedLanes=i,t){case 0:case 1:throw Error($(345));case 2:Jt(e,ze,St);break;case 3:if(Bt(e,i),(i&130023424)===i&&(t=Ta+500-we(),10<t)){if(bs(e,0)!==0)break;if(n=e.suspendedLanes,(n&i)!==i){je(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=po(Jt.bind(null,e,ze,St),t);break}Jt(e,ze,St);break;case 4:if(Bt(e,i),(i&4194240)===i)break;for(t=e.eventTimes,n=-1;0<i;){var m=31-ut(i);h=1<<m,m=t[m],m>n&&(n=m),i&=~h}if(i=n,i=we()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Xf(i/1960))-i,10<i){e.timeoutHandle=po(Jt.bind(null,e,ze,St),i);break}Jt(e,ze,St);break;case 5:Jt(e,ze,St);break;default:throw Error($(329))}}}return Ke(e,we()),e.callbackNode===r?uh.bind(null,e):null}function Oo(e,t){var r=fi;return e.current.memoizedState.isDehydrated&&(rr(e,t).flags|=256),e=$s(e,t),e!==2&&(t=ze,ze=r,t!==null&&Bo(t)),e}function Bo(e){ze===null?ze=e:ze.push.apply(ze,e)}function Qf(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 n=r[i],h=n.getSnapshot;n=n.value;try{if(!dt(h(),n))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 Bt(e,t){for(t&=~Ra,t&=~sn,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-ut(t),i=1<<r;e[r]=-1,t&=~i}}function Gl(e){if(ae&6)throw Error($(327));Pr();var t=bs(e,0);if(!(t&1))return Ke(e,we()),null;var r=$s(e,t);if(e.tag!==0&&r===2){var i=no(e);i!==0&&(t=i,r=Oo(e,i))}if(r===1)throw r=Ai,rr(e,0),Bt(e,t),Ke(e,we()),r;if(r===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Jt(e,ze,St),Ke(e,we()),null}function Pa(e,t){var r=ae;ae|=1;try{return e(t)}finally{ae=r,ae===0&&(Nr=we()+500,Zs&&Qt())}}function cr(e){jt!==null&&jt.tag===0&&!(ae&6)&&Pr();var t=ae;ae|=1;var r=it.transition,i=le;try{if(it.transition=null,le=1,e)return e()}finally{le=i,it.transition=r,ae=t,!(ae&6)&&Qt()}}function Ma(){Ve=kr.current,fe(kr)}function rr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,bf(r)),Ce!==null)for(r=Ce.return;r!==null;){var i=r;switch(da(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Ps();break;case 3:Ir(),fe(Ue),fe(Be),wa();break;case 5:ya(i);break;case 4:Ir();break;case 13:fe(ve);break;case 19:fe(ve);break;case 10:va(i.type._context);break;case 22:case 23:Ma()}r=r.return}if(be=e,Ce=e=Kt(e.current,null),Te=Ve=t,ke=0,Ai=null,Ra=sn=lr=0,ze=fi=null,er!==null){for(t=0;t<er.length;t++)if(r=er[t],i=r.interleaved,i!==null){r.interleaved=null;var n=i.next,h=r.pending;if(h!==null){var m=h.next;h.next=n,i.next=m}r.pending=i}er=null}return e}function hh(e,t){do{var r=Ce;try{if(_a(),_s.current=Fs,Hs){for(var i=ge.memoizedState;i!==null;){var n=i.queue;n!==null&&(n.pending=null),i=i.next}Hs=!1}if(ar=0,Ee=xe=ge=null,hi=!1,Ti=0,Da.current=null,r===null||r.return===null){ke=1,Ai=t,Ce=null;break}e:{var h=e,m=r.return,a=r,c=t;if(t=Te,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=c,g=a,d=g.tag;if(!(g.mode&1)&&(d===0||d===11||d===15)){var p=g.alternate;p?(g.updateQueue=p.updateQueue,g.memoizedState=p.memoizedState,g.lanes=p.lanes):(g.updateQueue=null,g.memoizedState=null)}var S=Bl(m);if(S!==null){S.flags&=-257,Il(S,m,a,h,t),S.mode&1&&Ol(h,f,t),t=S,c=f;var w=t.updateQueue;if(w===null){var v=new Set;v.add(c),t.updateQueue=v}else w.add(c);break e}else{if(!(t&1)){Ol(h,f,t),Aa();break e}c=Error($(426))}}else if(pe&&a.mode&1){var u=Bl(m);if(u!==null){!(u.flags&65536)&&(u.flags|=256),Il(u,m,a,h,t),fa(jr(c,a));break e}}h=c=jr(c,a),ke!==4&&(ke=2),fi===null?fi=[h]:fi.push(h),h=m;do{switch(h.tag){case 3:h.flags|=65536,t&=-t,h.lanes|=t;var o=Gu(h,c,t);Dl(h,o);break e;case 1:a=c;var s=h.type,l=h.stateNode;if(!(h.flags&128)&&(typeof s.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Ut===null||!Ut.has(l)))){h.flags|=65536,t&=-t,h.lanes|=t;var _=Xu(h,a,t);Dl(h,_);break e}}h=h.return}while(h!==null)}ph(r)}catch(C){t=C,Ce===r&&r!==null&&(Ce=r=r.return);continue}break}while(!0)}function dh(){var e=zs.current;return zs.current=Fs,e===null?Fs:e}function Aa(){(ke===0||ke===3||ke===2)&&(ke=4),be===null||!(lr&268435455)&&!(sn&268435455)||Bt(be,Te)}function $s(e,t){var r=ae;ae|=2;var i=dh();(be!==e||Te!==t)&&(St=null,rr(e,t));do try{Yf();break}catch(n){hh(e,n)}while(!0);if(_a(),ae=r,zs.current=i,Ce!==null)throw Error($(261));return be=null,Te=0,ke}function Yf(){for(;Ce!==null;)fh(Ce)}function Jf(){for(;Ce!==null&&!Cd();)fh(Ce)}function fh(e){var t=vh(e.alternate,e,Ve);e.memoizedProps=e.pendingProps,t===null?ph(e):Ce=t,Da.current=null}function ph(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Kf(r,t),r!==null){r.flags&=32767,Ce=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,Ce=null;return}}else if(r=$f(r,t,Ve),r!==null){Ce=r;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);ke===0&&(ke=5)}function Jt(e,t,r){var i=le,n=it.transition;try{it.transition=null,le=1,Zf(e,t,r,i)}finally{it.transition=n,le=i}return null}function Zf(e,t,r,i){do Pr();while(jt!==null);if(ae&6)throw Error($(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var h=r.lanes|r.childLanes;if(Md(e,h),e===be&&(Ce=be=null,Te=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ns||(ns=!0,gh(Es,function(){return Pr(),null})),h=(r.flags&15990)!==0,r.subtreeFlags&15990||h){h=it.transition,it.transition=null;var m=le;le=1;var a=ae;ae|=4,Da.current=null,qf(e,r),lh(r,e),Sf(ho),Ls=!!uo,ho=uo=null,e.current=r,Gf(r),xd(),ae=a,le=m,it.transition=h}else e.current=r;if(ns&&(ns=!1,jt=e,Us=n),h=e.pendingLanes,h===0&&(Ut=null),bd(r.stateNode),Ke(e,we()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],i(n.value,{componentStack:n.stack,digest:n.digest});if(Ws)throw Ws=!1,e=Mo,Mo=null,e;return Us&1&&e.tag!==0&&Pr(),h=e.pendingLanes,h&1?e===Ao?pi++:(pi=0,Ao=e):pi=0,Qt(),null}function Pr(){if(jt!==null){var e=Gc(Us),t=it.transition,r=le;try{if(it.transition=null,le=16>e?16:e,jt===null)var i=!1;else{if(e=jt,jt=null,Us=0,ae&6)throw Error($(331));var n=ae;for(ae|=4,Y=e.current;Y!==null;){var h=Y,m=h.child;if(Y.flags&16){var a=h.deletions;if(a!==null){for(var c=0;c<a.length;c++){var f=a[c];for(Y=f;Y!==null;){var g=Y;switch(g.tag){case 0:case 11:case 15:di(8,g,h)}var d=g.child;if(d!==null)d.return=g,Y=d;else for(;Y!==null;){g=Y;var p=g.sibling,S=g.return;if(nh(g),g===f){Y=null;break}if(p!==null){p.return=S,Y=p;break}Y=S}}}var w=h.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var u=v.sibling;v.sibling=null,v=u}while(v!==null)}}Y=h}}if(h.subtreeFlags&2064&&m!==null)m.return=h,Y=m;else e:for(;Y!==null;){if(h=Y,h.flags&2048)switch(h.tag){case 0:case 11:case 15:di(9,h,h.return)}var o=h.sibling;if(o!==null){o.return=h.return,Y=o;break e}Y=h.return}}var s=e.current;for(Y=s;Y!==null;){m=Y;var l=m.child;if(m.subtreeFlags&2064&&l!==null)l.return=m,Y=l;else e:for(m=s;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:rn(9,a)}}catch(C){Se(a,a.return,C)}if(a===m){Y=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,Y=_;break e}Y=a.return}}if(ae=n,Qt(),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Gs,e)}catch{}i=!0}return i}finally{le=r,it.transition=t}}return!1}function Xl(e,t,r){t=jr(r,t),t=Gu(e,t,1),e=Wt(e,t,1),t=je(),e!==null&&(Ii(e,1,t),Ke(e,t))}function Se(e,t,r){if(e.tag===3)Xl(e,e,r);else for(;t!==null;){if(t.tag===3){Xl(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ut===null||!Ut.has(i))){e=jr(r,e),e=Xu(t,e,1),t=Wt(t,e,1),e=je(),t!==null&&(Ii(t,1,e),Ke(t,e));break}}t=t.return}}function ep(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=je(),e.pingedLanes|=e.suspendedLanes&r,be===e&&(Te&r)===r&&(ke===4||ke===3&&(Te&130023424)===Te&&500>we()-Ta?rr(e,0):Ra|=r),Ke(e,t)}function _h(e,t){t===0&&(e.mode&1?(t=Xi,Xi<<=1,!(Xi&130023424)&&(Xi=4194304)):t=1);var r=je();e=bt(e,t),e!==null&&(Ii(e,t,r),Ke(e,r))}function tp(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),_h(e,r)}function rp(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:i=e.stateNode;break;default:throw Error($(314))}i!==null&&i.delete(t),_h(e,r)}var vh;vh=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)We=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return We=!1,Uf(e,t,r);We=!!(e.flags&131072)}else We=!1,pe&&t.flags&1048576&&yu(t,Os,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;gs(e,t),e=t.pendingProps;var n=Ar(t,Be.current);Tr(t,r),n=xa(null,t,i,e,n,r);var h=ka();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$e(i)?(h=!0,Ms(t)):h=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,ma(t),n.updater=tn,t.stateNode=n,n._reactInternals=t,wo(t,i,e,r),t=ko(null,t,i,!0,h,r)):(t.tag=0,pe&&h&&ha(t),Ie(null,t,n,r),t=t.child),t;case 16:i=t.elementType;e:{switch(gs(e,t),e=t.pendingProps,n=i._init,i=n(i._payload),t.type=i,n=t.tag=sp(i),e=at(i,e),n){case 0:t=xo(null,t,i,e,r);break e;case 1:t=Hl(null,t,i,e,r);break e;case 11:t=jl(null,t,i,e,r);break e;case 14:t=Nl(null,t,i,at(i.type,e),r);break e}throw Error($(306,i,""))}return t;case 0:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:at(i,n),xo(e,t,i,n,r);case 1:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:at(i,n),Hl(e,t,i,n,r);case 3:e:{if(Zu(t),e===null)throw Error($(387));i=t.pendingProps,h=t.memoizedState,n=h.element,bu(e,t),js(t,i,null,r);var m=t.memoizedState;if(i=m.element,h.isDehydrated)if(h={element:i,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){n=jr(Error($(423)),t),t=Fl(e,t,i,r,n);break e}else if(i!==n){n=jr(Error($(424)),t),t=Fl(e,t,i,r,n);break e}else for(qe=zt(t.stateNode.containerInfo.firstChild),Ge=t,pe=!0,ct=null,r=ku(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Or(),i===n){t=Lt(e,t,r);break e}Ie(e,t,i,r)}t=t.child}return t;case 5:return Lu(t),e===null&&mo(t),i=t.type,n=t.pendingProps,h=e!==null?e.memoizedProps:null,m=n.children,fo(i,n)?m=null:h!==null&&fo(i,h)&&(t.flags|=32),Ju(e,t),Ie(e,t,m,r),t.child;case 6:return e===null&&mo(t),null;case 13:return eh(e,t,r);case 4:return Sa(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Br(t,null,i,r):Ie(e,t,i,r),t.child;case 11:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:at(i,n),jl(e,t,i,n,r);case 7:return Ie(e,t,t.pendingProps,r),t.child;case 8:return Ie(e,t,t.pendingProps.children,r),t.child;case 12:return Ie(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,n=t.pendingProps,h=t.memoizedProps,m=n.value,ue(Bs,i._currentValue),i._currentValue=m,h!==null)if(dt(h.value,m)){if(h.children===n.children&&!Ue.current){t=Lt(e,t,r);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var a=h.dependencies;if(a!==null){m=h.child;for(var c=a.firstContext;c!==null;){if(c.context===i){if(h.tag===1){c=xt(-1,r&-r),c.tag=2;var f=h.updateQueue;if(f!==null){f=f.shared;var g=f.pending;g===null?c.next=c:(c.next=g.next,g.next=c),f.pending=c}}h.lanes|=r,c=h.alternate,c!==null&&(c.lanes|=r),So(h.return,r,t),a.lanes|=r;break}c=c.next}}else if(h.tag===10)m=h.type===t.type?null:h.child;else if(h.tag===18){if(m=h.return,m===null)throw Error($(341));m.lanes|=r,a=m.alternate,a!==null&&(a.lanes|=r),So(m,r,t),m=h.sibling}else m=h.child;if(m!==null)m.return=h;else for(m=h;m!==null;){if(m===t){m=null;break}if(h=m.sibling,h!==null){h.return=m.return,m=h;break}m=m.return}h=m}Ie(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,i=t.pendingProps.children,Tr(t,r),n=st(n),i=i(n),t.flags|=1,Ie(e,t,i,r),t.child;case 14:return i=t.type,n=at(i,t.pendingProps),n=at(i.type,n),Nl(e,t,i,n,r);case 15:return Qu(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:at(i,n),gs(e,t),t.tag=1,$e(i)?(e=!0,Ms(t)):e=!1,Tr(t,r),qu(t,i,n),wo(t,i,n,r),ko(null,t,i,!0,e,r);case 19:return th(e,t,r);case 22:return Yu(e,t,r)}throw Error($(156,t.tag))};function gh(e,t){return $c(e,t)}function ip(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 rt(e,t,r,i){return new ip(e,t,r,i)}function Oa(e){return e=e.prototype,!(!e||!e.isReactComponent)}function sp(e){if(typeof e=="function")return Oa(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zo)return 11;if(e===ea)return 14}return 2}function Kt(e,t){var r=e.alternate;return r===null?(r=rt(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 ys(e,t,r,i,n,h){var m=2;if(i=e,typeof e=="function")Oa(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case pr:return ir(r.children,n,h,t);case Jo:m=8,n|=8;break;case $n:return e=rt(12,r,t,n|2),e.elementType=$n,e.lanes=h,e;case Kn:return e=rt(13,r,t,n),e.elementType=Kn,e.lanes=h,e;case Vn:return e=rt(19,r,t,n),e.elementType=Vn,e.lanes=h,e;case Lc:return nn(r,n,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ec:m=10;break e;case bc:m=9;break e;case Zo:m=11;break e;case ea:m=14;break e;case Mt:m=16,i=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=rt(m,r,t,n),t.elementType=e,t.type=i,t.lanes=h,t}function ir(e,t,r,i){return e=rt(7,e,i,t),e.lanes=r,e}function nn(e,t,r,i){return e=rt(22,e,i,t),e.elementType=Lc,e.lanes=r,e.stateNode={isHidden:!1},e}function Hn(e,t,r){return e=rt(6,e,null,t),e.lanes=r,e}function Fn(e,t,r){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function np(e,t,r,i,n){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=yn(0),this.expirationTimes=yn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yn(0),this.identifierPrefix=i,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Ba(e,t,r,i,n,h,m,a,c){return e=new np(e,t,r,a,c),t===1?(t=1,h===!0&&(t|=8)):t=0,h=rt(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},ma(h),e}function op(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fr,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function mh(e){if(!e)return qt;e=e._reactInternals;e:{if(hr(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($e(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var r=e.type;if($e(r))return mu(e,r,t)}return t}function Sh(e,t,r,i,n,h,m,a,c){return e=Ba(r,i,!0,e,n,h,m,a,c),e.context=mh(null),r=e.current,i=je(),n=$t(r),h=xt(i,n),h.callback=t??null,Wt(r,h,n),e.current.lanes=n,Ii(e,n,i),Ke(e,i),e}function on(e,t,r,i){var n=t.current,h=je(),m=$t(n);return r=mh(r),t.context===null?t.context=r:t.pendingContext=r,t=xt(h,m),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Wt(n,t,m),e!==null&&(ht(e,n,m,h),ps(e,n,m)),m}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 Ql(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function Ia(e,t){Ql(e,t),(e=e.alternate)&&Ql(e,t)}function ap(){return null}var yh=typeof reportError=="function"?reportError:function(e){console.error(e)};function ja(e){this._internalRoot=e}an.prototype.render=ja.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));on(e,t,null,null)};an.prototype.unmount=ja.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cr(function(){on(null,e,null,null)}),t[Et]=null}};function an(e){this._internalRoot=e}an.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yc();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ot.length&&t!==0&&t<Ot[r].priority;r++);Ot.splice(r,0,e),r===0&&Zc(e)}};function Na(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ln(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Yl(){}function lp(e,t,r,i,n){if(n){if(typeof i=="function"){var h=i;i=function(){var f=Ks(m);h.call(f)}}var m=Sh(t,i,e,0,null,!1,!1,"",Yl);return e._reactRootContainer=m,e[Et]=m.current,Ei(e.nodeType===8?e.parentNode:e),cr(),m}for(;n=e.lastChild;)e.removeChild(n);if(typeof i=="function"){var a=i;i=function(){var f=Ks(c);a.call(f)}}var c=Ba(e,0,!1,null,null,!1,!1,"",Yl);return e._reactRootContainer=c,e[Et]=c.current,Ei(e.nodeType===8?e.parentNode:e),cr(function(){on(t,c,r,i)}),c}function cn(e,t,r,i,n){var h=r._reactRootContainer;if(h){var m=h;if(typeof n=="function"){var a=n;n=function(){var c=Ks(m);a.call(c)}}on(t,m,e,n)}else m=lp(r,t,e,n,i);return Ks(m)}Xc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=si(t.pendingLanes);r!==0&&(ia(t,r|1),Ke(t,we()),!(ae&6)&&(Nr=we()+500,Qt()))}break;case 13:cr(function(){var i=bt(e,1);if(i!==null){var n=je();ht(i,e,1,n)}}),Ia(e,1)}};sa=function(e){if(e.tag===13){var t=bt(e,134217728);if(t!==null){var r=je();ht(t,e,134217728,r)}Ia(e,134217728)}};Qc=function(e){if(e.tag===13){var t=$t(e),r=bt(e,t);if(r!==null){var i=je();ht(r,e,t,i)}Ia(e,t)}};Yc=function(){return le};Jc=function(e,t){var r=le;try{return le=e,t()}finally{le=r}};ro=function(e,t,r){switch(t){case"input":if(Xn(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 n=Js(i);if(!n)throw Error($(90));Rc(i),Xn(i,n)}}}break;case"textarea":Pc(e,r);break;case"select":t=r.value,t!=null&&br(e,!!r.multiple,t,!1)}};Nc=Pa;Hc=cr;var cp={usingClientEntryPoint:!1,Events:[Ni,mr,Js,Ic,jc,Pa]},ei={findFiberByHostInstance:Zt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},up={bundleType:ei.bundleType,version:ei.version,rendererPackageName:ei.rendererPackageName,rendererConfig:ei.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Dt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Wc(e),e===null?null:e.stateNode},findFiberByHostInstance:ei.findFiberByHostInstance||ap,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 os=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!os.isDisabled&&os.supportsFiber)try{Gs=os.inject(up),gt=os}catch{}}Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=cp;Qe.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Na(t))throw Error($(200));return op(e,t,null,r)};Qe.createRoot=function(e,t){if(!Na(e))throw Error($(299));var r=!1,i="",n=yh;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=Ba(e,1,!1,null,null,r,!1,i,n),e[Et]=t.current,Ei(e.nodeType===8?e.parentNode:e),new ja(t)};Qe.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($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Wc(t),e=e===null?null:e.stateNode,e};Qe.flushSync=function(e){return cr(e)};Qe.hydrate=function(e,t,r){if(!ln(t))throw Error($(200));return cn(null,e,t,!0,r)};Qe.hydrateRoot=function(e,t,r){if(!Na(e))throw Error($(405));var i=r!=null&&r.hydratedSources||null,n=!1,h="",m=yh;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(h=r.identifierPrefix),r.onRecoverableError!==void 0&&(m=r.onRecoverableError)),t=Sh(t,null,e,1,r??null,n,!1,h,m),e[Et]=t.current,Ei(e),i)for(e=0;e<i.length;e++)r=i[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new an(t)};Qe.render=function(e,t,r){if(!ln(t))throw Error($(200));return cn(null,e,t,!1,r)};Qe.unmountComponentAtNode=function(e){if(!ln(e))throw Error($(40));return e._reactRootContainer?(cr(function(){cn(null,null,e,!1,function(){e._reactRootContainer=null,e[Et]=null})}),!0):!1};Qe.unstable_batchedUpdates=Pa;Qe.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!ln(r))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return cn(e,t,r,!1,i)};Qe.version="18.3.1-next-f1338f8080-20240426";function wh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wh)}catch(e){console.error(e)}}wh(),wc.exports=Qe;var hp=wc.exports,Jl=hp;Wn.createRoot=Jl.createRoot,Wn.hydrateRoot=Jl.hydrateRoot;const dp={},Zl=e=>{let t;const r=new Set,i=(g,d)=>{const p=typeof g=="function"?g(t):g;if(!Object.is(p,t)){const S=t;t=d??(typeof p!="object"||p===null)?p:Object.assign({},t,p),r.forEach(w=>w(t,S))}},n=()=>t,c={setState:i,getState:n,getInitialState:()=>f,subscribe:g=>(r.add(g),()=>r.delete(g)),destroy:()=>{(dp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},f=t=e(i,n,c);return c},fp=e=>e?Zl(e):Zl;var Ch={exports:{}},xh={},kh={exports:{}},Eh={};/**
|
|
40
|
+
`+h.stack}return{value:e,source:t,stack:n,digest:null}}function jn(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function Co(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var zf=typeof WeakMap=="function"?WeakMap:Map;function Xu(e,t,r){r=xt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){Ws||(Ws=!0,Mo=i),Co(e,t)},r}function Qu(e,t,r){r=xt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var n=t.value;r.payload=function(){return i(n)},r.callback=function(){Co(e,t)}}var h=e.stateNode;return h!==null&&typeof h.componentDidCatch=="function"&&(r.callback=function(){Co(e,t),typeof i!="function"&&(Ut===null?Ut=new Set([this]):Ut.add(this));var m=t.stack;this.componentDidCatch(t.value,{componentStack:m!==null?m:""})}),r}function Bl(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new zf;var n=new Set;i.set(t,n)}else n=i.get(t),n===void 0&&(n=new Set,i.set(t,n));n.has(r)||(n.add(r),e=tp.bind(null,e,t,r),t.then(e,e))}function Il(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 jl(e,t,r,i,n){return e.mode&1?(e.flags|=65536,e.lanes=n,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=xt(-1,1),t.tag=2,Wt(r,t,1))),r.lanes|=1),e)}var Wf=Dt.ReactCurrentOwner,We=!1;function Ie(e,t,r,i){t.child=e===null?Eu(t,null,r,i):Br(t,e.child,r,i)}function Nl(e,t,r,i,n){r=r.render;var h=t.ref;return Tr(t,n),i=ka(e,t,r,i,h,n),r=Ea(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Lt(e,t,n)):(pe&&r&&da(t),t.flags|=1,Ie(e,t,i,n),t.child)}function Hl(e,t,r,i,n){if(e===null){var h=r.type;return typeof h=="function"&&!Ba(h)&&h.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=h,Yu(e,t,h,i,n)):(e=ys(r.type,null,i,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(h=e.child,!(e.lanes&n)){var m=h.memoizedProps;if(r=r.compare,r=r!==null?r:ki,r(m,i)&&e.ref===t.ref)return Lt(e,t,n)}return t.flags|=1,e=Kt(h,i),e.ref=t.ref,e.return=t,t.child=e}function Yu(e,t,r,i,n){if(e!==null){var h=e.memoizedProps;if(ki(h,i)&&e.ref===t.ref)if(We=!1,t.pendingProps=i=h,(e.lanes&n)!==0)e.flags&131072&&(We=!0);else return t.lanes=e.lanes,Lt(e,t,n)}return xo(e,t,r,i,n)}function Ju(e,t,r){var i=t.pendingProps,n=i.children,h=e!==null?e.memoizedState:null;if(i.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ue(kr,Ve),Ve|=r;else{if(!(r&1073741824))return e=h!==null?h.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ue(kr,Ve),Ve|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=h!==null?h.baseLanes:r,ue(kr,Ve),Ve|=i}else h!==null?(i=h.baseLanes|r,t.memoizedState=null):i=r,ue(kr,Ve),Ve|=i;return Ie(e,t,n,r),t.child}function Zu(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function xo(e,t,r,i,n){var h=$e(r)?nr:Be.current;return h=Ar(t,h),Tr(t,n),r=ka(e,t,r,i,h,n),i=Ea(),e!==null&&!We?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Lt(e,t,n)):(pe&&i&&da(t),t.flags|=1,Ie(e,t,r,n),t.child)}function Fl(e,t,r,i,n){if($e(r)){var h=!0;Ms(t)}else h=!1;if(Tr(t,n),t.stateNode===null)gs(e,t),Gu(t,r,i),wo(t,r,i,n),i=!0;else if(e===null){var m=t.stateNode,a=t.memoizedProps;m.props=a;var c=m.context,f=r.contextType;typeof f=="object"&&f!==null?f=st(f):(f=$e(r)?nr:Be.current,f=Ar(t,f));var g=r.getDerivedStateFromProps,d=typeof g=="function"||typeof m.getSnapshotBeforeUpdate=="function";d||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(a!==i||c!==f)&&Ol(t,m,i,f),At=!1;var _=t.memoizedState;m.state=_,js(t,i,m,n),c=t.memoizedState,a!==i||_!==c||Ue.current||At?(typeof g=="function"&&(yo(t,r,g,i),c=t.memoizedState),(a=At||Al(t,r,a,i,_,c,f))?(d||typeof m.UNSAFE_componentWillMount!="function"&&typeof m.componentWillMount!="function"||(typeof m.componentWillMount=="function"&&m.componentWillMount(),typeof m.UNSAFE_componentWillMount=="function"&&m.UNSAFE_componentWillMount()),typeof m.componentDidMount=="function"&&(t.flags|=4194308)):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=c),m.props=i,m.state=c,m.context=f,i=a):(typeof m.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{m=t.stateNode,Lu(e,t),a=t.memoizedProps,f=t.type===t.elementType?a:at(t.type,a),m.props=f,d=t.pendingProps,_=m.context,c=r.contextType,typeof c=="object"&&c!==null?c=st(c):(c=$e(r)?nr:Be.current,c=Ar(t,c));var S=r.getDerivedStateFromProps;(g=typeof S=="function"||typeof m.getSnapshotBeforeUpdate=="function")||typeof m.UNSAFE_componentWillReceiveProps!="function"&&typeof m.componentWillReceiveProps!="function"||(a!==d||_!==c)&&Ol(t,m,i,c),At=!1,_=t.memoizedState,m.state=_,js(t,i,m,n);var w=t.memoizedState;a!==d||_!==w||Ue.current||At?(typeof S=="function"&&(yo(t,r,S,i),w=t.memoizedState),(f=At||Al(t,r,f,i,_,w,c)||!1)?(g||typeof m.UNSAFE_componentWillUpdate!="function"&&typeof m.componentWillUpdate!="function"||(typeof m.componentWillUpdate=="function"&&m.componentWillUpdate(i,w,c),typeof m.UNSAFE_componentWillUpdate=="function"&&m.UNSAFE_componentWillUpdate(i,w,c)),typeof m.componentDidUpdate=="function"&&(t.flags|=4),typeof m.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof m.componentDidUpdate!="function"||a===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=w),m.props=i,m.state=w,m.context=c,i=f):(typeof m.componentDidUpdate!="function"||a===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof m.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),i=!1)}return ko(e,t,r,i,h,n)}function ko(e,t,r,i,n,h){Zu(e,t);var m=(t.flags&128)!==0;if(!i&&!m)return n&&El(t,r,!1),Lt(e,t,h);i=t.stateNode,Wf.current=t;var a=m&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&m?(t.child=Br(t,e.child,null,h),t.child=Br(t,null,a,h)):Ie(e,t,a,h),t.memoizedState=i.state,n&&El(t,r,!0),t.child}function eh(e){var t=e.stateNode;t.pendingContext?kl(e,t.pendingContext,t.pendingContext!==t.context):t.context&&kl(e,t.context,!1),ya(e,t.containerInfo)}function zl(e,t,r,i,n){return Or(),pa(n),t.flags|=256,Ie(e,t,r,i),t.child}var Eo={dehydrated:null,treeContext:null,retryLane:0};function bo(e){return{baseLanes:e,cachePool:null,transitions:null}}function th(e,t,r){var i=t.pendingProps,n=ve.current,h=!1,m=(t.flags&128)!==0,a;if((a=m)||(a=e!==null&&e.memoizedState===null?!1:(n&2)!==0),a?(h=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),ue(ve,n&1),e===null)return mo(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):(m=i.children,e=i.fallback,h?(i=t.mode,h=t.child,m={mode:"hidden",children:m},!(i&1)&&h!==null?(h.childLanes=0,h.pendingProps=m):h=nn(m,i,0,null),e=ir(e,i,r,null),h.return=t,e.return=t,h.sibling=e,t.child=h,t.child.memoizedState=bo(r),t.memoizedState=Eo,e):Da(t,m));if(n=e.memoizedState,n!==null&&(a=n.dehydrated,a!==null))return Uf(e,t,m,i,a,n,r);if(h){h=i.fallback,m=t.mode,n=e.child,a=n.sibling;var c={mode:"hidden",children:i.children};return!(m&1)&&t.child!==n?(i=t.child,i.childLanes=0,i.pendingProps=c,t.deletions=null):(i=Kt(n,c),i.subtreeFlags=n.subtreeFlags&14680064),a!==null?h=Kt(a,h):(h=ir(h,m,r,null),h.flags|=2),h.return=t,i.return=t,i.sibling=h,t.child=i,i=h,h=t.child,m=e.child.memoizedState,m=m===null?bo(r):{baseLanes:m.baseLanes|r,cachePool:null,transitions:m.transitions},h.memoizedState=m,h.childLanes=e.childLanes&~r,t.memoizedState=Eo,i}return h=e.child,e=h.sibling,i=Kt(h,{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 Da(e,t){return t=nn({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function is(e,t,r,i){return i!==null&&pa(i),Br(t,e.child,null,r),e=Da(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Uf(e,t,r,i,n,h,m){if(r)return t.flags&256?(t.flags&=-257,i=jn(Error($(422))),is(e,t,m,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(h=i.fallback,n=t.mode,i=nn({mode:"visible",children:i.children},n,0,null),h=ir(h,n,m,null),h.flags|=2,i.return=t,h.return=t,i.sibling=h,t.child=i,t.mode&1&&Br(t,e.child,null,m),t.child.memoizedState=bo(m),t.memoizedState=Eo,h);if(!(t.mode&1))return is(e,t,m,null);if(n.data==="$!"){if(i=n.nextSibling&&n.nextSibling.dataset,i)var a=i.dgst;return i=a,h=Error($(419)),i=jn(h,i,void 0),is(e,t,m,i)}if(a=(m&e.childLanes)!==0,We||a){if(i=be,i!==null){switch(m&-m){case 4:n=2;break;case 16:n=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:n=32;break;case 536870912:n=268435456;break;default:n=0}n=n&(i.suspendedLanes|m)?0:n,n!==0&&n!==h.retryLane&&(h.retryLane=n,bt(e,n),ht(i,e,n,-1))}return Oa(),i=jn(Error($(421))),is(e,t,m,i)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=rp.bind(null,e),n._reactRetry=t,null):(e=h.treeContext,qe=zt(n.nextSibling),Ge=t,pe=!0,ct=null,e!==null&&(et[tt++]=wt,et[tt++]=Ct,et[tt++]=or,wt=e.id,Ct=e.overflow,or=t),t=Da(t,i.children),t.flags|=4096,t)}function Wl(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),So(e.return,t,r)}function Nn(e,t,r,i,n){var h=e.memoizedState;h===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:n}:(h.isBackwards=t,h.rendering=null,h.renderingStartTime=0,h.last=i,h.tail=r,h.tailMode=n)}function rh(e,t,r){var i=t.pendingProps,n=i.revealOrder,h=i.tail;if(Ie(e,t,i.children,r),i=ve.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&&Wl(e,r,t);else if(e.tag===19)Wl(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(ue(ve,i),!(t.mode&1))t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&Ns(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),Nn(t,!1,n,r,h);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&Ns(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}Nn(t,!0,r,null,h);break;case"together":Nn(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function gs(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),lr|=t.lanes,!(r&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error($(153));if(t.child!==null){for(e=t.child,r=Kt(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Kt(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function $f(e,t,r){switch(t.tag){case 3:eh(t),Or();break;case 5:Du(t);break;case 1:$e(t.type)&&Ms(t);break;case 4:ya(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,n=t.memoizedProps.value;ue(Bs,i._currentValue),i._currentValue=n;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(ue(ve,ve.current&1),t.flags|=128,null):r&t.child.childLanes?th(e,t,r):(ue(ve,ve.current&1),e=Lt(e,t,r),e!==null?e.sibling:null);ue(ve,ve.current&1);break;case 19:if(i=(r&t.childLanes)!==0,e.flags&128){if(i)return rh(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),ue(ve,ve.current),i)break;return null;case 22:case 23:return t.lanes=0,Ju(e,t,r)}return Lt(e,t,r)}var ih,Lo,sh,nh;ih=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}};Lo=function(){};sh=function(e,t,r,i){var n=e.memoizedProps;if(n!==i){e=t.stateNode,tr(mt.current);var h=null;switch(r){case"input":n=Gn(e,n),i=Gn(e,i),h=[];break;case"select":n=me({},n,{value:void 0}),i=me({},i,{value:void 0}),h=[];break;case"textarea":n=Yn(e,n),i=Yn(e,i),h=[];break;default:typeof n.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=Ts)}Zn(r,i);var m;r=null;for(f in n)if(!i.hasOwnProperty(f)&&n.hasOwnProperty(f)&&n[f]!=null)if(f==="style"){var a=n[f];for(m in a)a.hasOwnProperty(m)&&(r||(r={}),r[m]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(gi.hasOwnProperty(f)?h||(h=[]):(h=h||[]).push(f,null));for(f in i){var c=i[f];if(a=n!=null?n[f]:void 0,i.hasOwnProperty(f)&&c!==a&&(c!=null||a!=null))if(f==="style")if(a){for(m in a)!a.hasOwnProperty(m)||c&&c.hasOwnProperty(m)||(r||(r={}),r[m]="");for(m in c)c.hasOwnProperty(m)&&a[m]!==c[m]&&(r||(r={}),r[m]=c[m])}else r||(h||(h=[]),h.push(f,r)),r=c;else f==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(h=h||[]).push(f,c)):f==="children"?typeof c!="string"&&typeof c!="number"||(h=h||[]).push(f,""+c):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(gi.hasOwnProperty(f)?(c!=null&&f==="onScroll"&&he("scroll",e),h||a===c||(h=[])):(h=h||[]).push(f,c))}r&&(h=h||[]).push("style",r);var f=h;(t.updateQueue=f)&&(t.flags|=4)}};nh=function(e,t,r,i){r!==i&&(t.flags|=4)};function Zr(e,t){if(!pe)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 Ae(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,i|=n.subtreeFlags&14680064,i|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,i|=n.subtreeFlags,i|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Kf(e,t,r){var i=t.pendingProps;switch(fa(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ae(t),null;case 1:return $e(t.type)&&Ps(),Ae(t),null;case 3:return i=t.stateNode,Ir(),fe(Ue),fe(Be),Ca(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(ts(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ct!==null&&(Bo(ct),ct=null))),Lo(e,t),Ae(t),null;case 5:wa(t);var n=tr(Ri.current);if(r=t.type,e!==null&&t.stateNode!=null)sh(e,t,r,i,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error($(166));return Ae(t),null}if(e=tr(mt.current),ts(t)){i=t.stateNode,r=t.type;var h=t.memoizedProps;switch(i[vt]=t,i[Li]=h,e=(t.mode&1)!==0,r){case"dialog":he("cancel",i),he("close",i);break;case"iframe":case"object":case"embed":he("load",i);break;case"video":case"audio":for(n=0;n<ni.length;n++)he(ni[n],i);break;case"source":he("error",i);break;case"img":case"image":case"link":he("error",i),he("load",i);break;case"details":he("toggle",i);break;case"input":Ya(i,h),he("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!h.multiple},he("invalid",i);break;case"textarea":Za(i,h),he("invalid",i)}Zn(r,h),n=null;for(var m in h)if(h.hasOwnProperty(m)){var a=h[m];m==="children"?typeof a=="string"?i.textContent!==a&&(h.suppressHydrationWarning!==!0&&es(i.textContent,a,e),n=["children",a]):typeof a=="number"&&i.textContent!==""+a&&(h.suppressHydrationWarning!==!0&&es(i.textContent,a,e),n=["children",""+a]):gi.hasOwnProperty(m)&&a!=null&&m==="onScroll"&&he("scroll",i)}switch(r){case"input":Vi(i),Ja(i,h,!0);break;case"textarea":Vi(i),el(i);break;case"select":case"option":break;default:typeof h.onClick=="function"&&(i.onclick=Ts)}i=n,t.updateQueue=i,i!==null&&(t.flags|=4)}else{m=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=Ac(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=m.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=m.createElement(r,{is:i.is}):(e=m.createElement(r),r==="select"&&(m=e,i.multiple?m.multiple=!0:i.size&&(m.size=i.size))):e=m.createElementNS(e,r),e[vt]=t,e[Li]=i,ih(e,t,!1,!1),t.stateNode=e;e:{switch(m=eo(r,i),r){case"dialog":he("cancel",e),he("close",e),n=i;break;case"iframe":case"object":case"embed":he("load",e),n=i;break;case"video":case"audio":for(n=0;n<ni.length;n++)he(ni[n],e);n=i;break;case"source":he("error",e),n=i;break;case"img":case"image":case"link":he("error",e),he("load",e),n=i;break;case"details":he("toggle",e),n=i;break;case"input":Ya(e,i),n=Gn(e,i),he("invalid",e);break;case"option":n=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},n=me({},i,{value:void 0}),he("invalid",e);break;case"textarea":Za(e,i),n=Yn(e,i),he("invalid",e);break;default:n=i}Zn(r,n),a=n;for(h in a)if(a.hasOwnProperty(h)){var c=a[h];h==="style"?Ic(e,c):h==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,c!=null&&Oc(e,c)):h==="children"?typeof c=="string"?(r!=="textarea"||c!=="")&&mi(e,c):typeof c=="number"&&mi(e,""+c):h!=="suppressContentEditableWarning"&&h!=="suppressHydrationWarning"&&h!=="autoFocus"&&(gi.hasOwnProperty(h)?c!=null&&h==="onScroll"&&he("scroll",e):c!=null&&Jo(e,h,c,m))}switch(r){case"input":Vi(e),Ja(e,i,!1);break;case"textarea":Vi(e),el(e);break;case"option":i.value!=null&&e.setAttribute("value",""+Vt(i.value));break;case"select":e.multiple=!!i.multiple,h=i.value,h!=null?br(e,!!i.multiple,h,!1):i.defaultValue!=null&&br(e,!!i.multiple,i.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Ts)}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 Ae(t),null;case 6:if(e&&t.stateNode!=null)nh(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error($(166));if(r=tr(Ri.current),tr(mt.current),ts(t)){if(i=t.stateNode,r=t.memoizedProps,i[vt]=t,(h=i.nodeValue!==r)&&(e=Ge,e!==null))switch(e.tag){case 3:es(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&es(i.nodeValue,r,(e.mode&1)!==0)}h&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[vt]=t,t.stateNode=i}return Ae(t),null;case 13:if(fe(ve),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(pe&&qe!==null&&t.mode&1&&!(t.flags&128))xu(),Or(),t.flags|=98560,h=!1;else if(h=ts(t),i!==null&&i.dehydrated!==null){if(e===null){if(!h)throw Error($(318));if(h=t.memoizedState,h=h!==null?h.dehydrated:null,!h)throw Error($(317));h[vt]=t}else Or(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Ae(t),h=!1}else ct!==null&&(Bo(ct),ct=null),h=!0;if(!h)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||ve.current&1?ke===0&&(ke=3):Oa())),t.updateQueue!==null&&(t.flags|=4),Ae(t),null);case 4:return Ir(),Lo(e,t),e===null&&Ei(t.stateNode.containerInfo),Ae(t),null;case 10:return ga(t.type._context),Ae(t),null;case 17:return $e(t.type)&&Ps(),Ae(t),null;case 19:if(fe(ve),h=t.memoizedState,h===null)return Ae(t),null;if(i=(t.flags&128)!==0,m=h.rendering,m===null)if(i)Zr(h,!1);else{if(ke!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(m=Ns(e),m!==null){for(t.flags|=128,Zr(h,!1),i=m.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)h=r,e=i,h.flags&=14680066,m=h.alternate,m===null?(h.childLanes=0,h.lanes=e,h.child=null,h.subtreeFlags=0,h.memoizedProps=null,h.memoizedState=null,h.updateQueue=null,h.dependencies=null,h.stateNode=null):(h.childLanes=m.childLanes,h.lanes=m.lanes,h.child=m.child,h.subtreeFlags=0,h.deletions=null,h.memoizedProps=m.memoizedProps,h.memoizedState=m.memoizedState,h.updateQueue=m.updateQueue,h.type=m.type,e=m.dependencies,h.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return ue(ve,ve.current&1|2),t.child}e=e.sibling}h.tail!==null&&we()>Nr&&(t.flags|=128,i=!0,Zr(h,!1),t.lanes=4194304)}else{if(!i)if(e=Ns(m),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),Zr(h,!0),h.tail===null&&h.tailMode==="hidden"&&!m.alternate&&!pe)return Ae(t),null}else 2*we()-h.renderingStartTime>Nr&&r!==1073741824&&(t.flags|=128,i=!0,Zr(h,!1),t.lanes=4194304);h.isBackwards?(m.sibling=t.child,t.child=m):(r=h.last,r!==null?r.sibling=m:t.child=m,h.last=m)}return h.tail!==null?(t=h.tail,h.rendering=t,h.tail=t.sibling,h.renderingStartTime=we(),t.sibling=null,r=ve.current,ue(ve,i?r&1|2:r&1),t):(Ae(t),null);case 22:case 23:return Aa(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&t.mode&1?Ve&1073741824&&(Ae(t),t.subtreeFlags&6&&(t.flags|=8192)):Ae(t),null;case 24:return null;case 25:return null}throw Error($(156,t.tag))}function Vf(e,t){switch(fa(t),t.tag){case 1:return $e(t.type)&&Ps(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ir(),fe(Ue),fe(Be),Ca(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wa(t),null;case 13:if(fe(ve),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error($(340));Or()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return fe(ve),null;case 4:return Ir(),null;case 10:return ga(t.type._context),null;case 22:case 23:return Aa(),null;case 24:return null;default:return null}}var ss=!1,Oe=!1,qf=typeof WeakSet=="function"?WeakSet:Set,Y=null;function xr(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Se(e,t,i)}else r.current=null}function Do(e,t,r){try{r()}catch(i){Se(e,t,i)}}var Ul=!1;function Gf(e,t){if(uo=Ls,e=uu(),ha(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 n=i.anchorOffset,h=i.focusNode;i=i.focusOffset;try{r.nodeType,h.nodeType}catch{r=null;break e}var m=0,a=-1,c=-1,f=0,g=0,d=e,_=null;t:for(;;){for(var S;d!==r||n!==0&&d.nodeType!==3||(a=m+n),d!==h||i!==0&&d.nodeType!==3||(c=m+i),d.nodeType===3&&(m+=d.nodeValue.length),(S=d.firstChild)!==null;)_=d,d=S;for(;;){if(d===e)break t;if(_===r&&++f===n&&(a=m),_===h&&++g===i&&(c=m),(S=d.nextSibling)!==null)break;d=_,_=d.parentNode}d=S}r=a===-1||c===-1?null:{start:a,end:c}}else r=null}r=r||{start:0,end:0}}else r=null;for(ho={focusedElem:e,selectionRange:r},Ls=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,u=w.memoizedState,o=t.stateNode,s=o.getSnapshotBeforeUpdate(t.elementType===t.type?v:at(t.type,v),u);o.__reactInternalSnapshotBeforeUpdate=s}break;case 3:var l=t.stateNode.containerInfo;l.nodeType===1?l.textContent="":l.nodeType===9&&l.documentElement&&l.removeChild(l.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error($(163))}}catch(p){Se(t,t.return,p)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return w=Ul,Ul=!1,w}function di(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var n=i=i.next;do{if((n.tag&e)===e){var h=n.destroy;n.destroy=void 0,h!==void 0&&Do(t,r,h)}n=n.next}while(n!==i)}}function rn(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 Ro(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 oh(e){var t=e.alternate;t!==null&&(e.alternate=null,oh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[vt],delete t[Li],delete t[_o],delete t[Tf],delete t[Pf])),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 ah(e){return e.tag===5||e.tag===3||e.tag===4}function $l(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ah(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.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 To(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=Ts));else if(i!==4&&(e=e.child,e!==null))for(To(e,t,r),e=e.sibling;e!==null;)To(e,t,r),e=e.sibling}function Po(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(Po(e,t,r),e=e.sibling;e!==null;)Po(e,t,r),e=e.sibling}var Le=null,lt=!1;function Pt(e,t,r){for(r=r.child;r!==null;)lh(e,t,r),r=r.sibling}function lh(e,t,r){if(gt&&typeof gt.onCommitFiberUnmount=="function")try{gt.onCommitFiberUnmount(Gs,r)}catch{}switch(r.tag){case 5:Oe||xr(r,t);case 6:var i=Le,n=lt;Le=null,Pt(e,t,r),Le=i,lt=n,Le!==null&&(lt?(e=Le,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Le.removeChild(r.stateNode));break;case 18:Le!==null&&(lt?(e=Le,r=r.stateNode,e.nodeType===8?Pn(e.parentNode,r):e.nodeType===1&&Pn(e,r),Ci(e)):Pn(Le,r.stateNode));break;case 4:i=Le,n=lt,Le=r.stateNode.containerInfo,lt=!0,Pt(e,t,r),Le=i,lt=n;break;case 0:case 11:case 14:case 15:if(!Oe&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){n=i=i.next;do{var h=n,m=h.destroy;h=h.tag,m!==void 0&&(h&2||h&4)&&Do(r,t,m),n=n.next}while(n!==i)}Pt(e,t,r);break;case 1:if(!Oe&&(xr(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(a){Se(r,t,a)}Pt(e,t,r);break;case 21:Pt(e,t,r);break;case 22:r.mode&1?(Oe=(i=Oe)||r.memoizedState!==null,Pt(e,t,r),Oe=i):Pt(e,t,r);break;default:Pt(e,t,r)}}function Kl(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new qf),t.forEach(function(i){var n=ip.bind(null,e,i);r.has(i)||(r.add(i),i.then(n,n))})}}function ot(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var n=r[i];try{var h=e,m=t,a=m;e:for(;a!==null;){switch(a.tag){case 5:Le=a.stateNode,lt=!1;break e;case 3:Le=a.stateNode.containerInfo,lt=!0;break e;case 4:Le=a.stateNode.containerInfo,lt=!0;break e}a=a.return}if(Le===null)throw Error($(160));lh(h,m,n),Le=null,lt=!1;var c=n.alternate;c!==null&&(c.return=null),n.return=null}catch(f){Se(n,t,f)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)ch(t,e),t=t.sibling}function ch(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ot(t,e),pt(e),i&4){try{di(3,e,e.return),rn(3,e)}catch(v){Se(e,e.return,v)}try{di(5,e,e.return)}catch(v){Se(e,e.return,v)}}break;case 1:ot(t,e),pt(e),i&512&&r!==null&&xr(r,r.return);break;case 5:if(ot(t,e),pt(e),i&512&&r!==null&&xr(r,r.return),e.flags&32){var n=e.stateNode;try{mi(n,"")}catch(v){Se(e,e.return,v)}}if(i&4&&(n=e.stateNode,n!=null)){var h=e.memoizedProps,m=r!==null?r.memoizedProps:h,a=e.type,c=e.updateQueue;if(e.updateQueue=null,c!==null)try{a==="input"&&h.type==="radio"&&h.name!=null&&Pc(n,h),eo(a,m);var f=eo(a,h);for(m=0;m<c.length;m+=2){var g=c[m],d=c[m+1];g==="style"?Ic(n,d):g==="dangerouslySetInnerHTML"?Oc(n,d):g==="children"?mi(n,d):Jo(n,g,d,f)}switch(a){case"input":Xn(n,h);break;case"textarea":Mc(n,h);break;case"select":var _=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!h.multiple;var S=h.value;S!=null?br(n,!!h.multiple,S,!1):_!==!!h.multiple&&(h.defaultValue!=null?br(n,!!h.multiple,h.defaultValue,!0):br(n,!!h.multiple,h.multiple?[]:"",!1))}n[Li]=h}catch(v){Se(e,e.return,v)}}break;case 6:if(ot(t,e),pt(e),i&4){if(e.stateNode===null)throw Error($(162));n=e.stateNode,h=e.memoizedProps;try{n.nodeValue=h}catch(v){Se(e,e.return,v)}}break;case 3:if(ot(t,e),pt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Ci(t.containerInfo)}catch(v){Se(e,e.return,v)}break;case 4:ot(t,e),pt(e);break;case 13:ot(t,e),pt(e),n=e.child,n.flags&8192&&(h=n.memoizedState!==null,n.stateNode.isHidden=h,!h||n.alternate!==null&&n.alternate.memoizedState!==null||(Pa=we())),i&4&&Kl(e);break;case 22:if(g=r!==null&&r.memoizedState!==null,e.mode&1?(Oe=(f=Oe)||g,ot(t,e),Oe=f):ot(t,e),pt(e),i&8192){if(f=e.memoizedState!==null,(e.stateNode.isHidden=f)&&!g&&e.mode&1)for(Y=e,g=e.child;g!==null;){for(d=Y=g;Y!==null;){switch(_=Y,S=_.child,_.tag){case 0:case 11:case 14:case 15:di(4,_,_.return);break;case 1:xr(_,_.return);var w=_.stateNode;if(typeof w.componentWillUnmount=="function"){i=_,r=_.return;try{t=i,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){Se(i,r,v)}}break;case 5:xr(_,_.return);break;case 22:if(_.memoizedState!==null){ql(d);continue}}S!==null?(S.return=_,Y=S):ql(d)}g=g.sibling}e:for(g=null,d=e;;){if(d.tag===5){if(g===null){g=d;try{n=d.stateNode,f?(h=n.style,typeof h.setProperty=="function"?h.setProperty("display","none","important"):h.display="none"):(a=d.stateNode,c=d.memoizedProps.style,m=c!=null&&c.hasOwnProperty("display")?c.display:null,a.style.display=Bc("display",m))}catch(v){Se(e,e.return,v)}}}else if(d.tag===6){if(g===null)try{d.stateNode.nodeValue=f?"":d.memoizedProps}catch(v){Se(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;g===d&&(g=null),d=d.return}g===d&&(g=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ot(t,e),pt(e),i&4&&Kl(e);break;case 21:break;default:ot(t,e),pt(e)}}function pt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(ah(r)){var i=r;break e}r=r.return}throw Error($(160))}switch(i.tag){case 5:var n=i.stateNode;i.flags&32&&(mi(n,""),i.flags&=-33);var h=$l(e);Po(e,h,n);break;case 3:case 4:var m=i.stateNode.containerInfo,a=$l(e);To(e,a,m);break;default:throw Error($(161))}}catch(c){Se(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Xf(e,t,r){Y=e,uh(e)}function uh(e,t,r){for(var i=(e.mode&1)!==0;Y!==null;){var n=Y,h=n.child;if(n.tag===22&&i){var m=n.memoizedState!==null||ss;if(!m){var a=n.alternate,c=a!==null&&a.memoizedState!==null||Oe;a=ss;var f=Oe;if(ss=m,(Oe=c)&&!f)for(Y=n;Y!==null;)m=Y,c=m.child,m.tag===22&&m.memoizedState!==null?Gl(n):c!==null?(c.return=m,Y=c):Gl(n);for(;h!==null;)Y=h,uh(h),h=h.sibling;Y=n,ss=a,Oe=f}Vl(e)}else n.subtreeFlags&8772&&h!==null?(h.return=n,Y=h):Vl(e)}}function Vl(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var r=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Oe||rn(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!Oe)if(r===null)i.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:at(t.type,r.memoizedProps);i.componentDidUpdate(n,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var h=t.updateQueue;h!==null&&Tl(t,h,i);break;case 3:var m=t.updateQueue;if(m!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Tl(t,m,r)}break;case 5:var a=t.stateNode;if(r===null&&t.flags&4){r=a;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 g=f.memoizedState;if(g!==null){var d=g.dehydrated;d!==null&&Ci(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error($(163))}Oe||t.flags&512&&Ro(t)}catch(_){Se(t,t.return,_)}}if(t===e){Y=null;break}if(r=t.sibling,r!==null){r.return=t.return,Y=r;break}Y=t.return}}function ql(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var r=t.sibling;if(r!==null){r.return=t.return,Y=r;break}Y=t.return}}function Gl(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{rn(4,t)}catch(c){Se(t,r,c)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var n=t.return;try{i.componentDidMount()}catch(c){Se(t,n,c)}}var h=t.return;try{Ro(t)}catch(c){Se(t,h,c)}break;case 5:var m=t.return;try{Ro(t)}catch(c){Se(t,m,c)}}}catch(c){Se(t,t.return,c)}if(t===e){Y=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Y=a;break}Y=t.return}}var Qf=Math.ceil,zs=Dt.ReactCurrentDispatcher,Ra=Dt.ReactCurrentOwner,it=Dt.ReactCurrentBatchConfig,ae=0,be=null,Ce=null,Te=0,Ve=0,kr=Xt(0),ke=0,Ai=null,lr=0,sn=0,Ta=0,fi=null,ze=null,Pa=0,Nr=1/0,St=null,Ws=!1,Mo=null,Ut=null,ns=!1,jt=null,Us=0,pi=0,Ao=null,ms=-1,Ss=0;function je(){return ae&6?we():ms!==-1?ms:ms=we()}function $t(e){return e.mode&1?ae&2&&Te!==0?Te&-Te:Af.transition!==null?(Ss===0&&(Ss=Gc()),Ss):(e=le,e!==0||(e=window.event,e=e===void 0?16:tu(e.type)),e):1}function ht(e,t,r,i){if(50<pi)throw pi=0,Ao=null,Error($(185));Ii(e,r,i),(!(ae&2)||e!==be)&&(e===be&&(!(ae&2)&&(sn|=r),ke===4&&Bt(e,Te)),Ke(e,i),r===1&&ae===0&&!(t.mode&1)&&(Nr=we()+500,Zs&&Qt()))}function Ke(e,t){var r=e.callbackNode;Md(e,t);var i=bs(e,e===be?Te:0);if(i===0)r!==null&&il(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&il(r),t===1)e.tag===0?Mf(Xl.bind(null,e)):yu(Xl.bind(null,e)),Df(function(){!(ae&6)&&Qt()}),r=null;else{switch(Xc(i)){case 1:r=ia;break;case 4:r=Vc;break;case 16:r=Es;break;case 536870912:r=qc;break;default:r=Es}r=mh(r,hh.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function hh(e,t){if(ms=-1,Ss=0,ae&6)throw Error($(327));var r=e.callbackNode;if(Pr()&&e.callbackNode!==r)return null;var i=bs(e,e===be?Te:0);if(i===0)return null;if(i&30||i&e.expiredLanes||t)t=$s(e,i);else{t=i;var n=ae;ae|=2;var h=fh();(be!==e||Te!==t)&&(St=null,Nr=we()+500,rr(e,t));do try{Zf();break}catch(a){dh(e,a)}while(!0);va(),zs.current=h,ae=n,Ce!==null?t=0:(be=null,Te=0,t=ke)}if(t!==0){if(t===2&&(n=no(e),n!==0&&(i=n,t=Oo(e,n))),t===1)throw r=Ai,rr(e,0),Bt(e,i),Ke(e,we()),r;if(t===6)Bt(e,i);else{if(n=e.current.alternate,!(i&30)&&!Yf(n)&&(t=$s(e,i),t===2&&(h=no(e),h!==0&&(i=h,t=Oo(e,h))),t===1))throw r=Ai,rr(e,0),Bt(e,i),Ke(e,we()),r;switch(e.finishedWork=n,e.finishedLanes=i,t){case 0:case 1:throw Error($(345));case 2:Jt(e,ze,St);break;case 3:if(Bt(e,i),(i&130023424)===i&&(t=Pa+500-we(),10<t)){if(bs(e,0)!==0)break;if(n=e.suspendedLanes,(n&i)!==i){je(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=po(Jt.bind(null,e,ze,St),t);break}Jt(e,ze,St);break;case 4:if(Bt(e,i),(i&4194240)===i)break;for(t=e.eventTimes,n=-1;0<i;){var m=31-ut(i);h=1<<m,m=t[m],m>n&&(n=m),i&=~h}if(i=n,i=we()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Qf(i/1960))-i,10<i){e.timeoutHandle=po(Jt.bind(null,e,ze,St),i);break}Jt(e,ze,St);break;case 5:Jt(e,ze,St);break;default:throw Error($(329))}}}return Ke(e,we()),e.callbackNode===r?hh.bind(null,e):null}function Oo(e,t){var r=fi;return e.current.memoizedState.isDehydrated&&(rr(e,t).flags|=256),e=$s(e,t),e!==2&&(t=ze,ze=r,t!==null&&Bo(t)),e}function Bo(e){ze===null?ze=e:ze.push.apply(ze,e)}function Yf(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 n=r[i],h=n.getSnapshot;n=n.value;try{if(!dt(h(),n))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 Bt(e,t){for(t&=~Ta,t&=~sn,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-ut(t),i=1<<r;e[r]=-1,t&=~i}}function Xl(e){if(ae&6)throw Error($(327));Pr();var t=bs(e,0);if(!(t&1))return Ke(e,we()),null;var r=$s(e,t);if(e.tag!==0&&r===2){var i=no(e);i!==0&&(t=i,r=Oo(e,i))}if(r===1)throw r=Ai,rr(e,0),Bt(e,t),Ke(e,we()),r;if(r===6)throw Error($(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Jt(e,ze,St),Ke(e,we()),null}function Ma(e,t){var r=ae;ae|=1;try{return e(t)}finally{ae=r,ae===0&&(Nr=we()+500,Zs&&Qt())}}function cr(e){jt!==null&&jt.tag===0&&!(ae&6)&&Pr();var t=ae;ae|=1;var r=it.transition,i=le;try{if(it.transition=null,le=1,e)return e()}finally{le=i,it.transition=r,ae=t,!(ae&6)&&Qt()}}function Aa(){Ve=kr.current,fe(kr)}function rr(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,Lf(r)),Ce!==null)for(r=Ce.return;r!==null;){var i=r;switch(fa(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&Ps();break;case 3:Ir(),fe(Ue),fe(Be),Ca();break;case 5:wa(i);break;case 4:Ir();break;case 13:fe(ve);break;case 19:fe(ve);break;case 10:ga(i.type._context);break;case 22:case 23:Aa()}r=r.return}if(be=e,Ce=e=Kt(e.current,null),Te=Ve=t,ke=0,Ai=null,Ta=sn=lr=0,ze=fi=null,er!==null){for(t=0;t<er.length;t++)if(r=er[t],i=r.interleaved,i!==null){r.interleaved=null;var n=i.next,h=r.pending;if(h!==null){var m=h.next;h.next=n,i.next=m}r.pending=i}er=null}return e}function dh(e,t){do{var r=Ce;try{if(va(),_s.current=Fs,Hs){for(var i=ge.memoizedState;i!==null;){var n=i.queue;n!==null&&(n.pending=null),i=i.next}Hs=!1}if(ar=0,Ee=xe=ge=null,hi=!1,Ti=0,Ra.current=null,r===null||r.return===null){ke=1,Ai=t,Ce=null;break}e:{var h=e,m=r.return,a=r,c=t;if(t=Te,a.flags|=32768,c!==null&&typeof c=="object"&&typeof c.then=="function"){var f=c,g=a,d=g.tag;if(!(g.mode&1)&&(d===0||d===11||d===15)){var _=g.alternate;_?(g.updateQueue=_.updateQueue,g.memoizedState=_.memoizedState,g.lanes=_.lanes):(g.updateQueue=null,g.memoizedState=null)}var S=Il(m);if(S!==null){S.flags&=-257,jl(S,m,a,h,t),S.mode&1&&Bl(h,f,t),t=S,c=f;var w=t.updateQueue;if(w===null){var v=new Set;v.add(c),t.updateQueue=v}else w.add(c);break e}else{if(!(t&1)){Bl(h,f,t),Oa();break e}c=Error($(426))}}else if(pe&&a.mode&1){var u=Il(m);if(u!==null){!(u.flags&65536)&&(u.flags|=256),jl(u,m,a,h,t),pa(jr(c,a));break e}}h=c=jr(c,a),ke!==4&&(ke=2),fi===null?fi=[h]:fi.push(h),h=m;do{switch(h.tag){case 3:h.flags|=65536,t&=-t,h.lanes|=t;var o=Xu(h,c,t);Rl(h,o);break e;case 1:a=c;var s=h.type,l=h.stateNode;if(!(h.flags&128)&&(typeof s.getDerivedStateFromError=="function"||l!==null&&typeof l.componentDidCatch=="function"&&(Ut===null||!Ut.has(l)))){h.flags|=65536,t&=-t,h.lanes|=t;var p=Qu(h,a,t);Rl(h,p);break e}}h=h.return}while(h!==null)}_h(r)}catch(C){t=C,Ce===r&&r!==null&&(Ce=r=r.return);continue}break}while(!0)}function fh(){var e=zs.current;return zs.current=Fs,e===null?Fs:e}function Oa(){(ke===0||ke===3||ke===2)&&(ke=4),be===null||!(lr&268435455)&&!(sn&268435455)||Bt(be,Te)}function $s(e,t){var r=ae;ae|=2;var i=fh();(be!==e||Te!==t)&&(St=null,rr(e,t));do try{Jf();break}catch(n){dh(e,n)}while(!0);if(va(),ae=r,zs.current=i,Ce!==null)throw Error($(261));return be=null,Te=0,ke}function Jf(){for(;Ce!==null;)ph(Ce)}function Zf(){for(;Ce!==null&&!xd();)ph(Ce)}function ph(e){var t=gh(e.alternate,e,Ve);e.memoizedProps=e.pendingProps,t===null?_h(e):Ce=t,Ra.current=null}function _h(e){var t=e;do{var r=t.alternate;if(e=t.return,t.flags&32768){if(r=Vf(r,t),r!==null){r.flags&=32767,Ce=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ke=6,Ce=null;return}}else if(r=Kf(r,t,Ve),r!==null){Ce=r;return}if(t=t.sibling,t!==null){Ce=t;return}Ce=t=e}while(t!==null);ke===0&&(ke=5)}function Jt(e,t,r){var i=le,n=it.transition;try{it.transition=null,le=1,ep(e,t,r,i)}finally{it.transition=n,le=i}return null}function ep(e,t,r,i){do Pr();while(jt!==null);if(ae&6)throw Error($(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error($(177));e.callbackNode=null,e.callbackPriority=0;var h=r.lanes|r.childLanes;if(Ad(e,h),e===be&&(Ce=be=null,Te=0),!(r.subtreeFlags&2064)&&!(r.flags&2064)||ns||(ns=!0,mh(Es,function(){return Pr(),null})),h=(r.flags&15990)!==0,r.subtreeFlags&15990||h){h=it.transition,it.transition=null;var m=le;le=1;var a=ae;ae|=4,Ra.current=null,Gf(e,r),ch(r,e),yf(ho),Ls=!!uo,ho=uo=null,e.current=r,Xf(r),kd(),ae=a,le=m,it.transition=h}else e.current=r;if(ns&&(ns=!1,jt=e,Us=n),h=e.pendingLanes,h===0&&(Ut=null),Ld(r.stateNode),Ke(e,we()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],i(n.value,{componentStack:n.stack,digest:n.digest});if(Ws)throw Ws=!1,e=Mo,Mo=null,e;return Us&1&&e.tag!==0&&Pr(),h=e.pendingLanes,h&1?e===Ao?pi++:(pi=0,Ao=e):pi=0,Qt(),null}function Pr(){if(jt!==null){var e=Xc(Us),t=it.transition,r=le;try{if(it.transition=null,le=16>e?16:e,jt===null)var i=!1;else{if(e=jt,jt=null,Us=0,ae&6)throw Error($(331));var n=ae;for(ae|=4,Y=e.current;Y!==null;){var h=Y,m=h.child;if(Y.flags&16){var a=h.deletions;if(a!==null){for(var c=0;c<a.length;c++){var f=a[c];for(Y=f;Y!==null;){var g=Y;switch(g.tag){case 0:case 11:case 15:di(8,g,h)}var d=g.child;if(d!==null)d.return=g,Y=d;else for(;Y!==null;){g=Y;var _=g.sibling,S=g.return;if(oh(g),g===f){Y=null;break}if(_!==null){_.return=S,Y=_;break}Y=S}}}var w=h.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var u=v.sibling;v.sibling=null,v=u}while(v!==null)}}Y=h}}if(h.subtreeFlags&2064&&m!==null)m.return=h,Y=m;else e:for(;Y!==null;){if(h=Y,h.flags&2048)switch(h.tag){case 0:case 11:case 15:di(9,h,h.return)}var o=h.sibling;if(o!==null){o.return=h.return,Y=o;break e}Y=h.return}}var s=e.current;for(Y=s;Y!==null;){m=Y;var l=m.child;if(m.subtreeFlags&2064&&l!==null)l.return=m,Y=l;else e:for(m=s;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:rn(9,a)}}catch(C){Se(a,a.return,C)}if(a===m){Y=null;break e}var p=a.sibling;if(p!==null){p.return=a.return,Y=p;break e}Y=a.return}}if(ae=n,Qt(),gt&&typeof gt.onPostCommitFiberRoot=="function")try{gt.onPostCommitFiberRoot(Gs,e)}catch{}i=!0}return i}finally{le=r,it.transition=t}}return!1}function Ql(e,t,r){t=jr(r,t),t=Xu(e,t,1),e=Wt(e,t,1),t=je(),e!==null&&(Ii(e,1,t),Ke(e,t))}function Se(e,t,r){if(e.tag===3)Ql(e,e,r);else for(;t!==null;){if(t.tag===3){Ql(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(Ut===null||!Ut.has(i))){e=jr(r,e),e=Qu(t,e,1),t=Wt(t,e,1),e=je(),t!==null&&(Ii(t,1,e),Ke(t,e));break}}t=t.return}}function tp(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=je(),e.pingedLanes|=e.suspendedLanes&r,be===e&&(Te&r)===r&&(ke===4||ke===3&&(Te&130023424)===Te&&500>we()-Pa?rr(e,0):Ta|=r),Ke(e,t)}function vh(e,t){t===0&&(e.mode&1?(t=Xi,Xi<<=1,!(Xi&130023424)&&(Xi=4194304)):t=1);var r=je();e=bt(e,t),e!==null&&(Ii(e,t,r),Ke(e,r))}function rp(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),vh(e,r)}function ip(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:i=e.stateNode;break;default:throw Error($(314))}i!==null&&i.delete(t),vh(e,r)}var gh;gh=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ue.current)We=!0;else{if(!(e.lanes&r)&&!(t.flags&128))return We=!1,$f(e,t,r);We=!!(e.flags&131072)}else We=!1,pe&&t.flags&1048576&&wu(t,Os,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;gs(e,t),e=t.pendingProps;var n=Ar(t,Be.current);Tr(t,r),n=ka(null,t,i,e,n,r);var h=Ea();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,$e(i)?(h=!0,Ms(t)):h=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,Sa(t),n.updater=tn,t.stateNode=n,n._reactInternals=t,wo(t,i,e,r),t=ko(null,t,i,!0,h,r)):(t.tag=0,pe&&h&&da(t),Ie(null,t,n,r),t=t.child),t;case 16:i=t.elementType;e:{switch(gs(e,t),e=t.pendingProps,n=i._init,i=n(i._payload),t.type=i,n=t.tag=np(i),e=at(i,e),n){case 0:t=xo(null,t,i,e,r);break e;case 1:t=Fl(null,t,i,e,r);break e;case 11:t=Nl(null,t,i,e,r);break e;case 14:t=Hl(null,t,i,at(i.type,e),r);break e}throw Error($(306,i,""))}return t;case 0:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:at(i,n),xo(e,t,i,n,r);case 1:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:at(i,n),Fl(e,t,i,n,r);case 3:e:{if(eh(t),e===null)throw Error($(387));i=t.pendingProps,h=t.memoizedState,n=h.element,Lu(e,t),js(t,i,null,r);var m=t.memoizedState;if(i=m.element,h.isDehydrated)if(h={element:i,isDehydrated:!1,cache:m.cache,pendingSuspenseBoundaries:m.pendingSuspenseBoundaries,transitions:m.transitions},t.updateQueue.baseState=h,t.memoizedState=h,t.flags&256){n=jr(Error($(423)),t),t=zl(e,t,i,r,n);break e}else if(i!==n){n=jr(Error($(424)),t),t=zl(e,t,i,r,n);break e}else for(qe=zt(t.stateNode.containerInfo.firstChild),Ge=t,pe=!0,ct=null,r=Eu(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Or(),i===n){t=Lt(e,t,r);break e}Ie(e,t,i,r)}t=t.child}return t;case 5:return Du(t),e===null&&mo(t),i=t.type,n=t.pendingProps,h=e!==null?e.memoizedProps:null,m=n.children,fo(i,n)?m=null:h!==null&&fo(i,h)&&(t.flags|=32),Zu(e,t),Ie(e,t,m,r),t.child;case 6:return e===null&&mo(t),null;case 13:return th(e,t,r);case 4:return ya(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=Br(t,null,i,r):Ie(e,t,i,r),t.child;case 11:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:at(i,n),Nl(e,t,i,n,r);case 7:return Ie(e,t,t.pendingProps,r),t.child;case 8:return Ie(e,t,t.pendingProps.children,r),t.child;case 12:return Ie(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,n=t.pendingProps,h=t.memoizedProps,m=n.value,ue(Bs,i._currentValue),i._currentValue=m,h!==null)if(dt(h.value,m)){if(h.children===n.children&&!Ue.current){t=Lt(e,t,r);break e}}else for(h=t.child,h!==null&&(h.return=t);h!==null;){var a=h.dependencies;if(a!==null){m=h.child;for(var c=a.firstContext;c!==null;){if(c.context===i){if(h.tag===1){c=xt(-1,r&-r),c.tag=2;var f=h.updateQueue;if(f!==null){f=f.shared;var g=f.pending;g===null?c.next=c:(c.next=g.next,g.next=c),f.pending=c}}h.lanes|=r,c=h.alternate,c!==null&&(c.lanes|=r),So(h.return,r,t),a.lanes|=r;break}c=c.next}}else if(h.tag===10)m=h.type===t.type?null:h.child;else if(h.tag===18){if(m=h.return,m===null)throw Error($(341));m.lanes|=r,a=m.alternate,a!==null&&(a.lanes|=r),So(m,r,t),m=h.sibling}else m=h.child;if(m!==null)m.return=h;else for(m=h;m!==null;){if(m===t){m=null;break}if(h=m.sibling,h!==null){h.return=m.return,m=h;break}m=m.return}h=m}Ie(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,i=t.pendingProps.children,Tr(t,r),n=st(n),i=i(n),t.flags|=1,Ie(e,t,i,r),t.child;case 14:return i=t.type,n=at(i,t.pendingProps),n=at(i.type,n),Hl(e,t,i,n,r);case 15:return Yu(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,n=t.pendingProps,n=t.elementType===i?n:at(i,n),gs(e,t),t.tag=1,$e(i)?(e=!0,Ms(t)):e=!1,Tr(t,r),Gu(t,i,n),wo(t,i,n,r),ko(null,t,i,!0,e,r);case 19:return rh(e,t,r);case 22:return Ju(e,t,r)}throw Error($(156,t.tag))};function mh(e,t){return Kc(e,t)}function sp(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 rt(e,t,r,i){return new sp(e,t,r,i)}function Ba(e){return e=e.prototype,!(!e||!e.isReactComponent)}function np(e){if(typeof e=="function")return Ba(e)?1:0;if(e!=null){if(e=e.$$typeof,e===ea)return 11;if(e===ta)return 14}return 2}function Kt(e,t){var r=e.alternate;return r===null?(r=rt(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 ys(e,t,r,i,n,h){var m=2;if(i=e,typeof e=="function")Ba(e)&&(m=1);else if(typeof e=="string")m=5;else e:switch(e){case pr:return ir(r.children,n,h,t);case Zo:m=8,n|=8;break;case $n:return e=rt(12,r,t,n|2),e.elementType=$n,e.lanes=h,e;case Kn:return e=rt(13,r,t,n),e.elementType=Kn,e.lanes=h,e;case Vn:return e=rt(19,r,t,n),e.elementType=Vn,e.lanes=h,e;case Dc:return nn(r,n,h,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case bc:m=10;break e;case Lc:m=9;break e;case ea:m=11;break e;case ta:m=14;break e;case Mt:m=16,i=null;break e}throw Error($(130,e==null?e:typeof e,""))}return t=rt(m,r,t,n),t.elementType=e,t.type=i,t.lanes=h,t}function ir(e,t,r,i){return e=rt(7,e,i,t),e.lanes=r,e}function nn(e,t,r,i){return e=rt(22,e,i,t),e.elementType=Dc,e.lanes=r,e.stateNode={isHidden:!1},e}function Hn(e,t,r){return e=rt(6,e,null,t),e.lanes=r,e}function Fn(e,t,r){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function op(e,t,r,i,n){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=yn(0),this.expirationTimes=yn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=yn(0),this.identifierPrefix=i,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function Ia(e,t,r,i,n,h,m,a,c){return e=new op(e,t,r,a,c),t===1?(t=1,h===!0&&(t|=8)):t=0,h=rt(3,null,null,t),e.current=h,h.stateNode=e,h.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},Sa(h),e}function ap(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fr,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function Sh(e){if(!e)return qt;e=e._reactInternals;e:{if(hr(e)!==e||e.tag!==1)throw Error($(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if($e(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error($(171))}if(e.tag===1){var r=e.type;if($e(r))return Su(e,r,t)}return t}function yh(e,t,r,i,n,h,m,a,c){return e=Ia(r,i,!0,e,n,h,m,a,c),e.context=Sh(null),r=e.current,i=je(),n=$t(r),h=xt(i,n),h.callback=t??null,Wt(r,h,n),e.current.lanes=n,Ii(e,n,i),Ke(e,i),e}function on(e,t,r,i){var n=t.current,h=je(),m=$t(n);return r=Sh(r),t.context===null?t.context=r:t.pendingContext=r,t=xt(h,m),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=Wt(n,t,m),e!==null&&(ht(e,n,m,h),ps(e,n,m)),m}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 Yl(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function ja(e,t){Yl(e,t),(e=e.alternate)&&Yl(e,t)}function lp(){return null}var wh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Na(e){this._internalRoot=e}an.prototype.render=Na.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error($(409));on(e,t,null,null)};an.prototype.unmount=Na.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cr(function(){on(null,e,null,null)}),t[Et]=null}};function an(e){this._internalRoot=e}an.prototype.unstable_scheduleHydration=function(e){if(e){var t=Jc();e={blockedOn:null,target:e,priority:t};for(var r=0;r<Ot.length&&t!==0&&t<Ot[r].priority;r++);Ot.splice(r,0,e),r===0&&eu(e)}};function Ha(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ln(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Jl(){}function cp(e,t,r,i,n){if(n){if(typeof i=="function"){var h=i;i=function(){var f=Ks(m);h.call(f)}}var m=yh(t,i,e,0,null,!1,!1,"",Jl);return e._reactRootContainer=m,e[Et]=m.current,Ei(e.nodeType===8?e.parentNode:e),cr(),m}for(;n=e.lastChild;)e.removeChild(n);if(typeof i=="function"){var a=i;i=function(){var f=Ks(c);a.call(f)}}var c=Ia(e,0,!1,null,null,!1,!1,"",Jl);return e._reactRootContainer=c,e[Et]=c.current,Ei(e.nodeType===8?e.parentNode:e),cr(function(){on(t,c,r,i)}),c}function cn(e,t,r,i,n){var h=r._reactRootContainer;if(h){var m=h;if(typeof n=="function"){var a=n;n=function(){var c=Ks(m);a.call(c)}}on(t,m,e,n)}else m=cp(r,t,e,n,i);return Ks(m)}Qc=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=si(t.pendingLanes);r!==0&&(sa(t,r|1),Ke(t,we()),!(ae&6)&&(Nr=we()+500,Qt()))}break;case 13:cr(function(){var i=bt(e,1);if(i!==null){var n=je();ht(i,e,1,n)}}),ja(e,1)}};na=function(e){if(e.tag===13){var t=bt(e,134217728);if(t!==null){var r=je();ht(t,e,134217728,r)}ja(e,134217728)}};Yc=function(e){if(e.tag===13){var t=$t(e),r=bt(e,t);if(r!==null){var i=je();ht(r,e,t,i)}ja(e,t)}};Jc=function(){return le};Zc=function(e,t){var r=le;try{return le=e,t()}finally{le=r}};ro=function(e,t,r){switch(t){case"input":if(Xn(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 n=Js(i);if(!n)throw Error($(90));Tc(i),Xn(i,n)}}}break;case"textarea":Mc(e,r);break;case"select":t=r.value,t!=null&&br(e,!!r.multiple,t,!1)}};Hc=Ma;Fc=cr;var up={usingClientEntryPoint:!1,Events:[Ni,mr,Js,jc,Nc,Ma]},ei={findFiberByHostInstance:Zt,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},hp={bundleType:ei.bundleType,version:ei.version,rendererPackageName:ei.rendererPackageName,rendererConfig:ei.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Dt.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Uc(e),e===null?null:e.stateNode},findFiberByHostInstance:ei.findFiberByHostInstance||lp,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 os=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!os.isDisabled&&os.supportsFiber)try{Gs=os.inject(hp),gt=os}catch{}}Qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=up;Qe.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Ha(t))throw Error($(200));return ap(e,t,null,r)};Qe.createRoot=function(e,t){if(!Ha(e))throw Error($(299));var r=!1,i="",n=wh;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=Ia(e,1,!1,null,null,r,!1,i,n),e[Et]=t.current,Ei(e.nodeType===8?e.parentNode:e),new Na(t)};Qe.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($(188)):(e=Object.keys(e).join(","),Error($(268,e)));return e=Uc(t),e=e===null?null:e.stateNode,e};Qe.flushSync=function(e){return cr(e)};Qe.hydrate=function(e,t,r){if(!ln(t))throw Error($(200));return cn(null,e,t,!0,r)};Qe.hydrateRoot=function(e,t,r){if(!Ha(e))throw Error($(405));var i=r!=null&&r.hydratedSources||null,n=!1,h="",m=wh;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(h=r.identifierPrefix),r.onRecoverableError!==void 0&&(m=r.onRecoverableError)),t=yh(t,null,e,1,r??null,n,!1,h,m),e[Et]=t.current,Ei(e),i)for(e=0;e<i.length;e++)r=i[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new an(t)};Qe.render=function(e,t,r){if(!ln(t))throw Error($(200));return cn(null,e,t,!1,r)};Qe.unmountComponentAtNode=function(e){if(!ln(e))throw Error($(40));return e._reactRootContainer?(cr(function(){cn(null,null,e,!1,function(){e._reactRootContainer=null,e[Et]=null})}),!0):!1};Qe.unstable_batchedUpdates=Ma;Qe.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!ln(r))throw Error($(200));if(e==null||e._reactInternals===void 0)throw Error($(38));return cn(e,t,r,!1,i)};Qe.version="18.3.1-next-f1338f8080-20240426";function Ch(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Ch)}catch(e){console.error(e)}}Ch(),Cc.exports=Qe;var dp=Cc.exports,Zl=dp;Wn.createRoot=Zl.createRoot,Wn.hydrateRoot=Zl.hydrateRoot;const fp={},ec=e=>{let t;const r=new Set,i=(g,d)=>{const _=typeof g=="function"?g(t):g;if(!Object.is(_,t)){const S=t;t=d??(typeof _!="object"||_===null)?_:Object.assign({},t,_),r.forEach(w=>w(t,S))}},n=()=>t,c={setState:i,getState:n,getInitialState:()=>f,subscribe:g=>(r.add(g),()=>r.delete(g)),destroy:()=>{(fp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),r.clear()}},f=t=e(i,n,c);return c},pp=e=>e?ec(e):ec;var xh={exports:{}},kh={},Eh={exports:{}},bh={};/**
|
|
41
41
|
* @license React
|
|
42
42
|
* use-sync-external-store-shim.production.js
|
|
43
43
|
*
|
|
@@ -45,7 +45,7 @@ Error generating stack: `+h.message+`
|
|
|
45
45
|
*
|
|
46
46
|
* This source code is licensed under the MIT license found in the
|
|
47
47
|
* LICENSE file in the root directory of this source tree.
|
|
48
|
-
*/var Hr=Q;function
|
|
48
|
+
*/var Hr=Q;function _p(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vp=typeof Object.is=="function"?Object.is:_p,gp=Hr.useState,mp=Hr.useEffect,Sp=Hr.useLayoutEffect,yp=Hr.useDebugValue;function wp(e,t){var r=t(),i=gp({inst:{value:r,getSnapshot:t}}),n=i[0].inst,h=i[1];return Sp(function(){n.value=r,n.getSnapshot=t,zn(n)&&h({inst:n})},[e,r,t]),mp(function(){return zn(n)&&h({inst:n}),e(function(){zn(n)&&h({inst:n})})},[e]),yp(r),r}function zn(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!vp(e,r)}catch{return!0}}function Cp(e,t){return t()}var xp=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?Cp:wp;bh.useSyncExternalStore=Hr.useSyncExternalStore!==void 0?Hr.useSyncExternalStore:xp;Eh.exports=bh;var kp=Eh.exports;/**
|
|
49
49
|
* @license React
|
|
50
50
|
* use-sync-external-store-shim/with-selector.production.js
|
|
51
51
|
*
|
|
@@ -53,21 +53,21 @@ Error generating stack: `+h.message+`
|
|
|
53
53
|
*
|
|
54
54
|
* This source code is licensed under the MIT license found in the
|
|
55
55
|
* LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/var un=Q,kp=xp;function Ep(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bp=typeof Object.is=="function"?Object.is:Ep,Lp=kp.useSyncExternalStore,Dp=un.useRef,Rp=un.useEffect,Tp=un.useMemo,Pp=un.useDebugValue;xh.useSyncExternalStoreWithSelector=function(e,t,r,i,n){var h=Dp(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=Tp(function(){function c(S){if(!f){if(f=!0,g=S,S=i(S),n!==void 0&&m.hasValue){var w=m.value;if(n(w,S))return d=w}return d=S}if(w=d,bp(g,S))return w;var v=i(S);return n!==void 0&&n(w,v)?(g=S,w):(g=S,d=v)}var f=!1,g,d,p=r===void 0?null:r;return[function(){return c(t())},p===null?void 0:function(){return c(p())}]},[t,r,i,n]);var a=Lp(e,h[0],h[1]);return Rp(function(){m.hasValue=!0,m.value=a},[a]),Pp(a),a};Ch.exports=xh;var Mp=Ch.exports;const Ap=lc(Mp),bh={},{useDebugValue:Op}=Sc,{useSyncExternalStoreWithSelector:Bp}=Ap;let ec=!1;const Ip=e=>e;function jp(e,t=Ip,r){(bh?"production":void 0)!=="production"&&r&&!ec&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),ec=!0);const i=Bp(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return Op(i),i}const tc=e=>{(bh?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?fp(e):e,r=(i,n)=>jp(t,i,n);return Object.assign(r,t),r},Fi=e=>e?tc(e):tc,Re=Fi((e,t)=>({sessions:{},createSession:(r,i)=>e(n=>({sessions:{...n.sessions,[r]:{terminalId:r,projectId:i,terminal:null,title:"Terminal",alive:!0}}})),setTerminalInstance:(r,i)=>e(n=>{const h=n.sessions[r];return h?{sessions:{...n.sessions,[r]:{...h,terminal:i}}}:n}),setTitle:(r,i)=>e(n=>{const h=n.sessions[r];return h?{sessions:{...n.sessions,[r]:{...h,title:i}}}:n}),markDead:r=>e(i=>{const n=i.sessions[r];return n?{sessions:{...i.sessions,[r]:{...n,alive:!1}}}:i}),removeSession:r=>e(i=>{const{[r]:n,...h}=i.sessions;return{sessions:h}}),getSession:r=>t().sessions[r],getProjectSessions:r=>Object.values(t().sessions).filter(i=>i.projectId===r)}));let as=null,ti=null;function _i(e){ti=ti?{...ti,...e}:{...e},as&&clearTimeout(as),as=setTimeout(()=>{const t=ti;ti=null,as=null,fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).catch(()=>{})},300)}const de=Fi()((e,t)=>({projects:{},activeProjectId:null,setActiveProject:r=>{e({activeProjectId:r}),_i({activeProjectId:r})},addProject:r=>e(i=>({projects:{...i.projects,[r.id]:r},activeProjectId:i.activeProjectId??r.id})),removeProject:r=>e(i=>{const{[r]:n,...h}=i.projects,m=i.activeProjectId===r?Object.keys(h)[0]??null:i.activeProjectId;return{projects:h,activeProjectId:m}}),addTerminalToProject:(r,i)=>e(n=>{const h=n.projects[r];return!h||h.terminalIds.includes(i)?n:{projects:{...n.projects,[r]:{...h,terminalIds:[...h.terminalIds,i]}}}}),removeTerminalFromProject:(r,i)=>e(n=>{const h=n.projects[r];return h?{projects:{...n.projects,[r]:{...h,terminalIds:h.terminalIds.filter(m=>m!==i)}}}:n}),clearProjectTerminals:r=>e(i=>{const n=i.projects[r];return n?{projects:{...i.projects,[r]:{...n,terminalIds:[]}}}:i}),getActiveProject:()=>{const{projects:r,activeProjectId:i}=t();return i?r[i]??null:null},hydrateFromServer:async()=>{try{const[r,i]=await Promise.all([fetch("/api/projects"),fetch("/api/settings")]),n=await r.json(),h=await i.json(),m={};for(const c of n)m[c.id]={id:c.id,name:c.name,cwd:c.cwd,terminalIds:[]};const a=h.activeProjectId&&m[h.activeProjectId]?h.activeProjectId:Object.keys(m)[0]??null;e({projects:m,activeProjectId:a})}catch{}}})),Np=.1,Hp=.9,Fp=16,zp={background:"#0a0a0f",foreground:"#ececf1",cursor:"#ececf1",cursorAccent:"#0a0a0f",selectionBackground:"#5b5bd640",selectionForeground:"#ececf1",black:"#1a1a24",red:"#e5484d",green:"#30a46c",yellow:"#f5d90a",blue:"#5b5bd6",magenta:"#ab4aba",cyan:"#12a594",white:"#ececf1",brightBlack:"#6b6b80",brightRed:"#ff6369",brightGreen:"#3dd68c",brightYellow:"#ffef5c",brightBlue:"#849dff",brightMagenta:"#d19dff",brightCyan:"#0ac5b3",brightWhite:"#ffffff"},Wp={background:"#ffffff",foreground:"#1a1a2e",cursor:"#1a1a2e",cursorAccent:"#ffffff",selectionBackground:"#5b5bd630",selectionForeground:"#1a1a2e",black:"#1a1a2e",red:"#dc3545",green:"#1a8f5c",yellow:"#b58900",blue:"#5b5bd6",magenta:"#9b3bb0",cyan:"#0f8a7e",white:"#f5f5f7",brightBlack:"#8888a0",brightRed:"#e5484d",brightGreen:"#30a46c",brightYellow:"#d4a017",brightBlue:"#6e6ee6",brightMagenta:"#ab4aba",brightCyan:"#12a594",brightWhite:"#ffffff"};function ye(e){return e?e.type==="leaf"?[e.terminalId]:[...ye(e.first),...ye(e.second)]:[]}function Io(e,t){if(e.type==="leaf")return null;const r=ye(e.first),i=ye(e.second);return r.includes(t)||i.includes(t)?e.direction:Io(e.first,t)??Io(e.second,t)}function Up(e,t,r,i){if(!e)return{type:"leaf",terminalId:r};const n=i??(Io(e,t)==="vertical"?"horizontal":"vertical");return jo(e,t,r,n)}function jo(e,t,r,i){return e.type==="leaf"?e.terminalId===t?{type:"split",direction:i,ratio:.5,first:e,second:{type:"leaf",terminalId:r}}:e:{...e,first:jo(e.first,t,r,i),second:jo(e.second,t,r,i)}}function Vs(e,t){if(!e)return null;if(e.type==="leaf")return e.terminalId===t?null:e;const r=ye(e.first),i=ye(e.second);if(e.first.type==="leaf"&&e.first.terminalId===t)return e.second;if(e.second.type==="leaf"&&e.second.terminalId===t)return e.first;if(r.includes(t)){const n=Vs(e.first,t);return n?{...e,first:n}:e.second}if(i.includes(t)){const n=Vs(e.second,t);return n?{...e,second:n}:e.first}return e}function No(e,t,r){const i=Math.max(Np,Math.min(Hp,r));if(t.length===0)return e.type==="split"?{...e,ratio:i}:e;if(e.type==="leaf")return e;const[n,...h]=t;return n===0?{...e,first:No(e.first,h,i)}:{...e,second:No(e.second,h,i)}}function Ho(e,t,r){return e.type==="leaf"?e.terminalId===t?{...e,terminalId:r}:e.terminalId===r?{...e,terminalId:t}:e:{...e,first:Ho(e.first,t,r),second:Ho(e.second,t,r)}}function $p(e,t,r,i){const n=Vs(e,t);return n?Fo(n,r,t,i==="left"||i==="right"?"vertical":"horizontal",i==="left"||i==="top"):null}function Fo(e,t,r,i,n){if(e.type==="leaf"){if(e.terminalId===t){const h={type:"leaf",terminalId:r};return{type:"split",direction:i,ratio:.5,first:n?h:e,second:n?e:h}}return e}return{...e,first:Fo(e.first,t,r,i,n),second:Fo(e.second,t,r,i,n)}}const vi=["even-horizontal","even-vertical","main-left","main-top","grid"];function Oi(e,t){if(e.length===0)return null;if(e.length===1)return{type:"leaf",terminalId:e[0]};switch(t){case"even-horizontal":return sr(e,"horizontal");case"even-vertical":return sr(e,"vertical");case"main-left":return rc(e,"vertical");case"main-top":return rc(e,"horizontal");case"grid":return Kp(e)}}function sr(e,t){if(e.length===1)return{type:"leaf",terminalId:e[0]};if(e.length===2)return{type:"split",direction:t,ratio:.5,first:{type:"leaf",terminalId:e[0]},second:{type:"leaf",terminalId:e[1]}};const r=1/e.length;return{type:"split",direction:t,ratio:r,first:{type:"leaf",terminalId:e[0]},second:sr(e.slice(1),t)}}function rc(e,t,r){const[i,...n]=e,m=sr(n,t==="vertical"?"horizontal":"vertical");return{type:"split",direction:t,ratio:.6,first:{type:"leaf",terminalId:i},second:m}}function Kp(e){if(e.length<=2)return sr(e,"vertical");const t=Math.ceil(e.length/2),r=e.slice(0,t),i=e.slice(t);return{type:"split",direction:"horizontal",ratio:.5,first:sr(r,"vertical"),second:i.length>0?sr(i,"vertical"):{type:"leaf",terminalId:r[r.length-1]}}}function ic(e,t,r){const i=ye(e),n=i.indexOf(t);return n===-1?null:r==="left"||r==="up"?n>0?i[n-1]:null:n<i.length-1?i[n+1]:null}const oe=Fi((e,t)=>({layouts:{},currentPresetIndex:0,getLayout:r=>t().layouts[r]??null,setLayout:(r,i)=>e(n=>({layouts:{...n.layouts,[r]:i}})),addPaneToProject:(r,i,n,h)=>e(m=>{const a=m.layouts[r]??null,c=Up(a,i,n,h);return{layouts:{...m.layouts,[r]:c}}}),removePaneFromProject:(r,i)=>e(n=>{const h=n.layouts[r];if(!h)return n;const m=Vs(h,i);return{layouts:{...n.layouts,[r]:m}}}),resizePaneInProject:(r,i,n)=>e(h=>{const m=h.layouts[r];if(!m)return h;const a=No(m,i,n);return{layouts:{...h.layouts,[r]:a}}}),swapPanesInProject:(r,i,n)=>e(h=>{const m=h.layouts[r];if(!m)return h;const a=Ho(m,i,n);return{layouts:{...h.layouts,[r]:a}}}),movePaneInProject:(r,i,n,h)=>e(m=>{const a=m.layouts[r];if(!a)return m;const c=$p(a,i,n,h);return{layouts:{...m.layouts,[r]:c}}}),applyPresetToProject:(r,i)=>e(n=>{const h=vi[n.currentPresetIndex],m=Oi(i,h);return{layouts:{...n.layouts,[r]:m}}}),cyclePreset:(r,i)=>e(n=>{const h=(n.currentPresetIndex+1)%vi.length,m=vi[h],a=Oi(i,m);return{currentPresetIndex:h,layouts:{...n.layouts,[r]:a}}}),removeProjectLayout:r=>e(i=>{const{[r]:n,...h}=i.layouts;return{layouts:h}})}));function ws(e){document.documentElement.setAttribute("data-theme",e)}function Vp(e){return e==="system"?window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":e}const Lh=localStorage.getItem("paneful:theme")||"system";ws(Lh);function ls(e){const{theme:t,sidebarWidth:r,editorSyncEnabled:i}=e();_i({ui:{theme:t,sidebarWidth:r,editorSyncEnabled:i}})}const te=Fi((e,t)=>({focusedTerminalId:null,sidebarOpen:!0,sidebarWidth:224,draggingTerminalId:null,dropTarget:null,connectionStatus:"connecting",editorSyncEnabled:!0,theme:Lh,setFocusedTerminal:r=>e({focusedTerminalId:r}),toggleSidebar:()=>e(r=>({sidebarOpen:!r.sidebarOpen})),setSidebarOpen:r=>e({sidebarOpen:r}),setSidebarWidth:r=>{const i=Math.min(400,Math.max(160,r));e({sidebarWidth:i}),ls(t)},setDragging:r=>e({draggingTerminalId:r}),setDropTarget:r=>e({dropTarget:r}),setConnectionStatus:r=>e({connectionStatus:r}),toggleEditorSync:()=>{e(r=>({editorSyncEnabled:!r.editorSyncEnabled})),ls(t)},setTheme:r=>{localStorage.setItem("paneful:theme",r),ws(r),e({theme:r}),ls(t)},cycleTheme:()=>{const r=["system","light","dark"],i=t().theme,n=r[(r.indexOf(i)+1)%r.length];localStorage.setItem("paneful:theme",n),ws(n),e({theme:n}),ls(t)},hydrateFromServer:async()=>{try{const i=await(await fetch("/api/settings")).json();if(i.ui){const{theme:n,sidebarWidth:h,editorSyncEnabled:m}=i.ui;n&&(localStorage.setItem("paneful:theme",n),ws(n)),e({...n?{theme:n}:{},...h!==void 0?{sidebarWidth:h}:{},...m!==void 0?{editorSyncEnabled:m}:{}})}}catch{}}}));var Dh={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(globalThis,()=>(()=>{var r={4567:function(m,a,c){var f=this&&this.__decorate||function(s,l,_,C){var x,k=arguments.length,y=k<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,l,_,C);else for(var b=s.length-1;b>=0;b--)(x=s[b])&&(y=(k<3?x(y):k>3?x(l,_,y):x(l,_))||y);return k>3&&y&&Object.defineProperty(l,_,y),y},g=this&&this.__param||function(s,l){return function(_,C){l(_,C,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const d=c(9042),p=c(9924),S=c(844),w=c(4725),v=c(2585),u=c(3656);let o=a.AccessibilityManager=class extends S.Disposable{constructor(s,l,_,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 x=0;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);if(this._topBoundaryFocusListener=x=>this._handleBoundaryFocus(x,0),this._bottomBoundaryFocusListener=x=>this._handleBoundaryFocus(x,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(x=>this._handleResize(x.rows))),this.register(this._terminal.onRender(x=>this._refreshRows(x.start,x.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(x=>this._handleChar(x))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
56
|
+
*/var un=Q,Ep=kp;function bp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lp=typeof Object.is=="function"?Object.is:bp,Dp=Ep.useSyncExternalStore,Rp=un.useRef,Tp=un.useEffect,Pp=un.useMemo,Mp=un.useDebugValue;kh.useSyncExternalStoreWithSelector=function(e,t,r,i,n){var h=Rp(null);if(h.current===null){var m={hasValue:!1,value:null};h.current=m}else m=h.current;h=Pp(function(){function c(S){if(!f){if(f=!0,g=S,S=i(S),n!==void 0&&m.hasValue){var w=m.value;if(n(w,S))return d=w}return d=S}if(w=d,Lp(g,S))return w;var v=i(S);return n!==void 0&&n(w,v)?(g=S,w):(g=S,d=v)}var f=!1,g,d,_=r===void 0?null:r;return[function(){return c(t())},_===null?void 0:function(){return c(_())}]},[t,r,i,n]);var a=Dp(e,h[0],h[1]);return Tp(function(){m.hasValue=!0,m.value=a},[a]),Mp(a),a};xh.exports=kh;var Ap=xh.exports;const Op=cc(Ap),Lh={},{useDebugValue:Bp}=yc,{useSyncExternalStoreWithSelector:Ip}=Op;let tc=!1;const jp=e=>e;function Np(e,t=jp,r){(Lh?"production":void 0)!=="production"&&r&&!tc&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),tc=!0);const i=Ip(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,r);return Bp(i),i}const rc=e=>{(Lh?"production":void 0)!=="production"&&typeof e!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t=typeof e=="function"?pp(e):e,r=(i,n)=>Np(t,i,n);return Object.assign(r,t),r},Fi=e=>e?rc(e):rc,Re=Fi((e,t)=>({sessions:{},createSession:(r,i)=>e(n=>({sessions:{...n.sessions,[r]:{terminalId:r,projectId:i,terminal:null,title:"Terminal",alive:!0}}})),setTerminalInstance:(r,i)=>e(n=>{const h=n.sessions[r];return h?{sessions:{...n.sessions,[r]:{...h,terminal:i}}}:n}),setTitle:(r,i)=>e(n=>{const h=n.sessions[r];return h?{sessions:{...n.sessions,[r]:{...h,title:i}}}:n}),markDead:r=>e(i=>{const n=i.sessions[r];return n?{sessions:{...i.sessions,[r]:{...n,alive:!1}}}:i}),removeSession:r=>e(i=>{const{[r]:n,...h}=i.sessions;return{sessions:h}}),getSession:r=>t().sessions[r],getProjectSessions:r=>Object.values(t().sessions).filter(i=>i.projectId===r)}));let as=null,ti=null;function _i(e){ti=ti?{...ti,...e}:{...e},as&&clearTimeout(as),as=setTimeout(()=>{const t=ti;ti=null,as=null,fetch("/api/settings",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)}).catch(()=>{})},300)}const de=Fi()((e,t)=>({projects:{},activeProjectId:null,setActiveProject:r=>{e({activeProjectId:r}),_i({activeProjectId:r})},addProject:r=>e(i=>({projects:{...i.projects,[r.id]:r},activeProjectId:i.activeProjectId??r.id})),removeProject:r=>e(i=>{const{[r]:n,...h}=i.projects,m=i.activeProjectId===r?Object.keys(h)[0]??null:i.activeProjectId;return{projects:h,activeProjectId:m}}),addTerminalToProject:(r,i)=>e(n=>{const h=n.projects[r];return!h||h.terminalIds.includes(i)?n:{projects:{...n.projects,[r]:{...h,terminalIds:[...h.terminalIds,i]}}}}),removeTerminalFromProject:(r,i)=>e(n=>{const h=n.projects[r];return h?{projects:{...n.projects,[r]:{...h,terminalIds:h.terminalIds.filter(m=>m!==i)}}}:n}),clearProjectTerminals:r=>e(i=>{const n=i.projects[r];return n?{projects:{...i.projects,[r]:{...n,terminalIds:[]}}}:i}),getActiveProject:()=>{const{projects:r,activeProjectId:i}=t();return i?r[i]??null:null},hydrateFromServer:async()=>{try{const[r,i]=await Promise.all([fetch("/api/projects"),fetch("/api/settings")]),n=await r.json(),h=await i.json(),m={};for(const c of n)m[c.id]={id:c.id,name:c.name,cwd:c.cwd,terminalIds:[]};const a=h.activeProjectId&&m[h.activeProjectId]?h.activeProjectId:Object.keys(m)[0]??null;e({projects:m,activeProjectId:a})}catch{}}})),Hp=.1,Fp=.9,zp=16,Wp={background:"#0a0a0f",foreground:"#ececf1",cursor:"#ececf1",cursorAccent:"#0a0a0f",selectionBackground:"#5b5bd640",selectionForeground:"#ececf1",black:"#1a1a24",red:"#e5484d",green:"#30a46c",yellow:"#f5d90a",blue:"#5b5bd6",magenta:"#ab4aba",cyan:"#12a594",white:"#ececf1",brightBlack:"#6b6b80",brightRed:"#ff6369",brightGreen:"#3dd68c",brightYellow:"#ffef5c",brightBlue:"#849dff",brightMagenta:"#d19dff",brightCyan:"#0ac5b3",brightWhite:"#ffffff"},Up={background:"#ffffff",foreground:"#1a1a2e",cursor:"#1a1a2e",cursorAccent:"#ffffff",selectionBackground:"#5b5bd630",selectionForeground:"#1a1a2e",black:"#1a1a2e",red:"#dc3545",green:"#1a8f5c",yellow:"#b58900",blue:"#5b5bd6",magenta:"#9b3bb0",cyan:"#0f8a7e",white:"#d0d0d8",brightBlack:"#8888a0",brightRed:"#e5484d",brightGreen:"#30a46c",brightYellow:"#d4a017",brightBlue:"#6e6ee6",brightMagenta:"#ab4aba",brightCyan:"#12a594",brightWhite:"#d0d0d8"};function ye(e){return e?e.type==="leaf"?[e.terminalId]:[...ye(e.first),...ye(e.second)]:[]}function Io(e,t){if(e.type==="leaf")return null;const r=ye(e.first),i=ye(e.second);return r.includes(t)||i.includes(t)?e.direction:Io(e.first,t)??Io(e.second,t)}function $p(e,t,r,i){if(!e)return{type:"leaf",terminalId:r};const n=i??(Io(e,t)==="vertical"?"horizontal":"vertical");return jo(e,t,r,n)}function jo(e,t,r,i){return e.type==="leaf"?e.terminalId===t?{type:"split",direction:i,ratio:.5,first:e,second:{type:"leaf",terminalId:r}}:e:{...e,first:jo(e.first,t,r,i),second:jo(e.second,t,r,i)}}function Vs(e,t){if(!e)return null;if(e.type==="leaf")return e.terminalId===t?null:e;const r=ye(e.first),i=ye(e.second);if(e.first.type==="leaf"&&e.first.terminalId===t)return e.second;if(e.second.type==="leaf"&&e.second.terminalId===t)return e.first;if(r.includes(t)){const n=Vs(e.first,t);return n?{...e,first:n}:e.second}if(i.includes(t)){const n=Vs(e.second,t);return n?{...e,second:n}:e.first}return e}function No(e,t,r){const i=Math.max(Hp,Math.min(Fp,r));if(t.length===0)return e.type==="split"?{...e,ratio:i}:e;if(e.type==="leaf")return e;const[n,...h]=t;return n===0?{...e,first:No(e.first,h,i)}:{...e,second:No(e.second,h,i)}}function Ho(e,t,r){return e.type==="leaf"?e.terminalId===t?{...e,terminalId:r}:e.terminalId===r?{...e,terminalId:t}:e:{...e,first:Ho(e.first,t,r),second:Ho(e.second,t,r)}}function Kp(e,t,r,i){const n=Vs(e,t);return n?Fo(n,r,t,i==="left"||i==="right"?"vertical":"horizontal",i==="left"||i==="top"):null}function Fo(e,t,r,i,n){if(e.type==="leaf"){if(e.terminalId===t){const h={type:"leaf",terminalId:r};return{type:"split",direction:i,ratio:.5,first:n?h:e,second:n?e:h}}return e}return{...e,first:Fo(e.first,t,r,i,n),second:Fo(e.second,t,r,i,n)}}const vi=["even-horizontal","even-vertical","main-left","main-top","grid"];function Oi(e,t){if(e.length===0)return null;if(e.length===1)return{type:"leaf",terminalId:e[0]};switch(t){case"even-horizontal":return sr(e,"horizontal");case"even-vertical":return sr(e,"vertical");case"main-left":return ic(e,"vertical");case"main-top":return ic(e,"horizontal");case"grid":return Vp(e)}}function sr(e,t){if(e.length===1)return{type:"leaf",terminalId:e[0]};if(e.length===2)return{type:"split",direction:t,ratio:.5,first:{type:"leaf",terminalId:e[0]},second:{type:"leaf",terminalId:e[1]}};const r=1/e.length;return{type:"split",direction:t,ratio:r,first:{type:"leaf",terminalId:e[0]},second:sr(e.slice(1),t)}}function ic(e,t,r){const[i,...n]=e,m=sr(n,t==="vertical"?"horizontal":"vertical");return{type:"split",direction:t,ratio:.6,first:{type:"leaf",terminalId:i},second:m}}function Vp(e){if(e.length<=2)return sr(e,"vertical");const t=Math.ceil(e.length/2),r=e.slice(0,t),i=e.slice(t);return{type:"split",direction:"horizontal",ratio:.5,first:sr(r,"vertical"),second:i.length>0?sr(i,"vertical"):{type:"leaf",terminalId:r[r.length-1]}}}function sc(e,t,r){const i=ye(e),n=i.indexOf(t);return n===-1?null:r==="left"||r==="up"?n>0?i[n-1]:null:n<i.length-1?i[n+1]:null}const oe=Fi((e,t)=>({layouts:{},currentPresetIndex:0,getLayout:r=>t().layouts[r]??null,setLayout:(r,i)=>e(n=>({layouts:{...n.layouts,[r]:i}})),addPaneToProject:(r,i,n,h)=>e(m=>{const a=m.layouts[r]??null,c=$p(a,i,n,h);return{layouts:{...m.layouts,[r]:c}}}),removePaneFromProject:(r,i)=>e(n=>{const h=n.layouts[r];if(!h)return n;const m=Vs(h,i);return{layouts:{...n.layouts,[r]:m}}}),resizePaneInProject:(r,i,n)=>e(h=>{const m=h.layouts[r];if(!m)return h;const a=No(m,i,n);return{layouts:{...h.layouts,[r]:a}}}),swapPanesInProject:(r,i,n)=>e(h=>{const m=h.layouts[r];if(!m)return h;const a=Ho(m,i,n);return{layouts:{...h.layouts,[r]:a}}}),movePaneInProject:(r,i,n,h)=>e(m=>{const a=m.layouts[r];if(!a)return m;const c=Kp(a,i,n,h);return{layouts:{...m.layouts,[r]:c}}}),applyPresetToProject:(r,i)=>e(n=>{const h=vi[n.currentPresetIndex],m=Oi(i,h);return{layouts:{...n.layouts,[r]:m}}}),cyclePreset:(r,i)=>e(n=>{const h=(n.currentPresetIndex+1)%vi.length,m=vi[h],a=Oi(i,m);return{currentPresetIndex:h,layouts:{...n.layouts,[r]:a}}}),removeProjectLayout:r=>e(i=>{const{[r]:n,...h}=i.layouts;return{layouts:h}})}));function ws(e){document.documentElement.setAttribute("data-theme",e)}function zo(e){return e==="system"?window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark":e}const Dh=localStorage.getItem("paneful:theme")||"system";ws(Dh);function ls(e){const{theme:t,sidebarWidth:r,editorSyncEnabled:i}=e();_i({ui:{theme:t,sidebarWidth:r,editorSyncEnabled:i}})}const te=Fi((e,t)=>({focusedTerminalId:null,sidebarOpen:!0,sidebarWidth:224,draggingTerminalId:null,dropTarget:null,connectionStatus:"connecting",editorSyncEnabled:!0,theme:Dh,setFocusedTerminal:r=>e({focusedTerminalId:r}),toggleSidebar:()=>e(r=>({sidebarOpen:!r.sidebarOpen})),setSidebarOpen:r=>e({sidebarOpen:r}),setSidebarWidth:r=>{const i=Math.min(400,Math.max(160,r));e({sidebarWidth:i}),ls(t)},setDragging:r=>e({draggingTerminalId:r}),setDropTarget:r=>e({dropTarget:r}),setConnectionStatus:r=>e({connectionStatus:r}),toggleEditorSync:()=>{e(r=>({editorSyncEnabled:!r.editorSyncEnabled})),ls(t)},setTheme:r=>{localStorage.setItem("paneful:theme",r),ws(r),e({theme:r}),ls(t)},cycleTheme:()=>{const r=["system","light","dark"],i=t().theme,n=r[(r.indexOf(i)+1)%r.length];localStorage.setItem("paneful:theme",n),ws(n),e({theme:n}),ls(t)},hydrateFromServer:async()=>{try{const i=await(await fetch("/api/settings")).json();if(i.ui){const{theme:n,sidebarWidth:h,editorSyncEnabled:m}=i.ui;n&&(localStorage.setItem("paneful:theme",n),ws(n)),e({...n?{theme:n}:{},...h!==void 0?{sidebarWidth:h}:{},...m!==void 0?{editorSyncEnabled:m}:{}})}}catch{}}}));var Rh={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(globalThis,()=>(()=>{var r={4567:function(m,a,c){var f=this&&this.__decorate||function(s,l,p,C){var x,k=arguments.length,y=k<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,l,p,C);else for(var b=s.length-1;b>=0;b--)(x=s[b])&&(y=(k<3?x(y):k>3?x(l,p,y):x(l,p))||y);return k>3&&y&&Object.defineProperty(l,p,y),y},g=this&&this.__param||function(s,l){return function(p,C){l(p,C,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.AccessibilityManager=void 0;const d=c(9042),_=c(9924),S=c(844),w=c(4725),v=c(2585),u=c(3656);let o=a.AccessibilityManager=class extends S.Disposable{constructor(s,l,p,C){super(),this._terminal=s,this._coreBrowserService=p,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 x=0;x<this._terminal.rows;x++)this._rowElements[x]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[x]);if(this._topBoundaryFocusListener=x=>this._handleBoundaryFocus(x,0),this._bottomBoundaryFocusListener=x=>this._handleBoundaryFocus(x,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 _.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(x=>this._handleResize(x.rows))),this.register(this._terminal.onRender(x=>this._refreshRows(x.start,x.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(x=>this._handleChar(x))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
|
57
57
|
`))),this.register(this._terminal.onA11yTab(x=>this._handleTab(x))),this.register(this._terminal.onKey(x=>this._handleKey(x.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 l=0;l<s;l++)this._handleChar(" ")}_handleChar(s){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==s&&(this._charsToAnnounce+=s):this._charsToAnnounce+=s,s===`
|
|
58
|
-
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.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,l){this._liveRegionDebouncer.refresh(s,l,this._terminal.rows)}_renderRows(s,l){const _=this._terminal.buffer,C=_.lines.length.toString();for(let x=s;x<=l;x++){const k=_.lines.get(_.ydisp+x),y=[],b=(k==null?void 0:k.translateToString(!0,void 0,void 0,y))||"",R=(_.ydisp+x+1).toString(),M=this._rowElements[x];M&&(b.length===0?(M.innerText=" ",this._rowColumns.set(M,[0,1])):(M.textContent=b,this._rowColumns.set(M,y)),M.setAttribute("aria-posinset",R),M.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(s,l){const _=s.target,C=this._rowElements[l===0?1:this._rowElements.length-2];if(_.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||s.relatedTarget!==C)return;let x,k;if(l===0?(x=_,k=this._rowElements.pop(),this._rowContainer.removeChild(k)):(x=this._rowElements.shift(),k=_,this._rowContainer.removeChild(x)),x.removeEventListener("focus",this._topBoundaryFocusListener),k.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const y=this._createAccessibilityTreeNode();this._rowElements.unshift(y),this._rowContainer.insertAdjacentElement("afterbegin",y)}else{const y=this._createAccessibilityTreeNode();this._rowElements.push(y),this._rowContainer.appendChild(y)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),s.preventDefault(),s.stopImmediatePropagation()}_handleSelectionChange(){var b;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 l={node:s.anchorNode,offset:s.anchorOffset},_={node:s.focusNode,offset:s.focusOffset};if((l.node.compareDocumentPosition(_.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===_.node&&l.offset>_.offset)&&([l,_]=[_,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const C=this._rowElements.slice(-1)[0];if(_.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(_={node:C,offset:((b=C.textContent)==null?void 0:b.length)??0}),!this._rowContainer.contains(_.node))return;const x=({node:R,offset:M})=>{const B=R instanceof Text?R.parentNode:R;let T=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(T))return console.warn("row is invalid. Race condition?"),null;const N=this._rowColumns.get(B);if(!N)return console.warn("columns is null. Race condition?"),null;let F=M<N.length?N[M]:N.slice(-1)[0]+1;return F>=this._terminal.cols&&(++T,F=0),{row:T,column:F}},k=x(l),y=x(_);if(k&&y){if(k.row>y.row||k.row===y.row&&k.column>=y.column)throw new Error("invalid range");this._terminal.select(k.column,k.row,(y.row-k.row)*this._terminal.cols-k.column+y.column)}}_handleResize(s){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>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`}};a.AccessibilityManager=o=f([g(1,v.IInstantiationService),g(2,w.ICoreBrowserService),g(3,w.IRenderService)],o)},3614:(m,a)=>{function c(p){return p.replace(/\r?\n/g,"\r")}function f(p,S){return S?"\x1B[200~"+p+"\x1B[201~":p}function g(p,S,w,v){p=f(p=c(p),w.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(p,!0),S.value=""}function d(p,S,w){const v=w.getBoundingClientRect(),u=p.clientX-v.left-10,o=p.clientY-v.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${u}px`,S.style.top=`${o}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=c,a.bracketTextForPaste=f,a.copyHandler=function(p,S){p.clipboardData&&p.clipboardData.setData("text/plain",S.selectionText),p.preventDefault()},a.handlePasteEvent=function(p,S,w,v){p.stopPropagation(),p.clipboardData&&g(p.clipboardData.getData("text/plain"),S,w,v)},a.paste=g,a.moveTextAreaUnderMouseCursor=d,a.rightClickHandler=function(p,S,w,v,u){d(p,S,w),u&&v.rightClickSelect(p),S.value=v.selectionText,S.select()}},7239:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const f=c(1505);a.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(g,d,p){this._css.set(g,d,p)}getCss(g,d){return this._css.get(g,d)}setColor(g,d,p){this._color.set(g,d,p)}getColor(g,d){return this._color.get(g,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,f,g,d){c.addEventListener(f,g,d);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(f,g,d))}}}},3551:function(m,a,c){var f=this&&this.__decorate||function(o,s,l,_){var C,x=arguments.length,k=x<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,s,l,_);else for(var y=o.length-1;y>=0;y--)(C=o[y])&&(k=(x<3?C(k):x>3?C(s,l,k):C(s,l))||k);return x>3&&k&&Object.defineProperty(s,l,k),k},g=this&&this.__param||function(o,s){return function(l,_){s(l,_,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const d=c(3656),p=c(8460),S=c(844),w=c(2585),v=c(4725);let u=a.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(o,s,l,_,C){super(),this._element=o,this._mouseService=s,this._renderService=l,this._bufferService=_,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new p.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new p.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)(()=>{var x;this._lastMouseEvent=void 0,(x=this._activeProviderReplies)==null||x.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,d.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(o){this._lastMouseEvent=o;const s=this._positionFromMouseEvent(o,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const l=o.composedPath();for(let _=0;_<l.length;_++){const C=l[_];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(o){if(this._activeLine!==o.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(o,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,o)||(this._clearCurrentLink(),this._askForLink(o,!0))}_askForLink(o,s){var _,C;this._activeProviderReplies&&s||((_=this._activeProviderReplies)==null||_.forEach(x=>{x==null||x.forEach(k=>{k.link.dispose&&k.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=o.y);let l=!1;for(const[x,k]of this._linkProviderService.linkProviders.entries())s?(C=this._activeProviderReplies)!=null&&C.get(x)&&(l=this._checkLinkProviderResult(x,o,l)):k.provideLinks(o.y,y=>{var R,M;if(this._isMouseOut)return;const b=y==null?void 0:y.map(B=>({link:B}));(R=this._activeProviderReplies)==null||R.set(x,b),l=this._checkLinkProviderResult(x,o,l),((M=this._activeProviderReplies)==null?void 0:M.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(o.y,this._activeProviderReplies)})}_removeIntersectingLinks(o,s){const l=new Set;for(let _=0;_<s.size;_++){const C=s.get(_);if(C)for(let x=0;x<C.length;x++){const k=C[x],y=k.link.range.start.y<o?0:k.link.range.start.x,b=k.link.range.end.y>o?this._bufferService.cols:k.link.range.end.x;for(let R=y;R<=b;R++){if(l.has(R)){C.splice(x--,1);break}l.add(R)}}}}_checkLinkProviderResult(o,s,l){var x;if(!this._activeProviderReplies)return l;const _=this._activeProviderReplies.get(o);let C=!1;for(let k=0;k<o;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(C=!0);if(!C&&_){const k=_.find(y=>this._linkAtPosition(y.link,s));k&&(l=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let k=0;k<this._activeProviderReplies.size;k++){const y=(x=this._activeProviderReplies.get(k))==null?void 0:x.find(b=>this._linkAtPosition(b.link,s));if(y){l=!0,this._handleNewLink(y);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(o){if(!this._currentLink)return;const s=this._positionFromMouseEvent(o,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(o,this._currentLink.link.text)}_clearCurrentLink(o,s){this._currentLink&&this._lastMouseEvent&&(!o||!s||this._currentLink.link.range.start.y>=o&&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(o){if(!this._lastMouseEvent)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(o.link,s)&&(this._currentLink=o,this._currentLink.state={decorations:{underline:o.link.decorations===void 0||o.link.decorations.underline,pointerCursor:o.link.decorations===void 0||o.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,o.link,this._lastMouseEvent),o.link.decorations={},Object.defineProperties(o.link.decorations,{pointerCursor:{get:()=>{var l,_;return(_=(l=this._currentLink)==null?void 0:l.state)==null?void 0:_.decorations.pointerCursor},set:l=>{var _;(_=this._currentLink)!=null&&_.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,_;return(_=(l=this._currentLink)==null?void 0:l.state)==null?void 0:_.decorations.underline},set:l=>{var _,C,x;(_=this._currentLink)!=null&&_.state&&((x=(C=this._currentLink)==null?void 0:C.state)==null?void 0:x.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(o.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(l=>{if(!this._currentLink)return;const _=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=_&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(_,C),this._lastMouseEvent)){const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._askForLink(x,!1)}})))}_linkHover(o,s,l){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&o.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(l,s.text)}_fireUnderlineEvent(o,s){const l=o.range,_=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-_-1,l.end.x,l.end.y-_-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(o,s,l){var _;(_=this._currentLink)!=null&&_.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&o.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(l,s.text)}_linkAtPosition(o,s){const l=o.range.start.y*this._bufferService.cols+o.range.start.x,_=o.range.end.y*this._bufferService.cols+o.range.end.x,C=s.y*this._bufferService.cols+s.x;return l<=C&&C<=_}_positionFromMouseEvent(o,s,l){const _=l.getCoords(o,s,this._bufferService.cols,this._bufferService.rows);if(_)return{x:_[0],y:_[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(o,s,l,_,C){return{x1:o,y1:s,x2:l,y2:_,cols:this._bufferService.cols,fg:C}}};a.Linkifier=u=f([g(1,v.IMouseService),g(2,v.IRenderService),g(3,w.IBufferService),g(4,v.ILinkProviderService)],u)},9042:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(m,a,c){var f=this&&this.__decorate||function(v,u,o,s){var l,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,o,s);else for(var x=v.length-1;x>=0;x--)(l=v[x])&&(C=(_<3?l(C):_>3?l(u,o,C):l(u,o))||C);return _>3&&C&&Object.defineProperty(u,o,C),C},g=this&&this.__param||function(v,u){return function(o,s){u(o,s,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const d=c(511),p=c(2585);let S=a.OscLinkProvider=class{constructor(v,u,o){this._bufferService=v,this._optionsService=u,this._oscLinkService=o}provideLinks(v,u){var b;const o=this._bufferService.buffer.lines.get(v-1);if(!o)return void u(void 0);const s=[],l=this._optionsService.rawOptions.linkHandler,_=new d.CellData,C=o.getTrimmedLength();let x=-1,k=-1,y=!1;for(let R=0;R<C;R++)if(k!==-1||o.hasContent(R)){if(o.loadCell(R,_),_.hasExtendedAttrs()&&_.extended.urlId){if(k===-1){k=R,x=_.extended.urlId;continue}y=_.extended.urlId!==x}else k!==-1&&(y=!0);if(y||k!==-1&&R===C-1){const M=(b=this._oscLinkService.getLinkData(x))==null?void 0:b.uri;if(M){const B={start:{x:k+1,y:v},end:{x:R+(y||R!==C-1?0:1),y:v}};let T=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const N=new URL(M);["http:","https:"].includes(N.protocol)||(T=!0)}catch{T=!0}T||s.push({text:M,range:B,activate:(N,F)=>l?l.activate(N,F,B):w(0,F),hover:(N,F)=>{var K;return(K=l==null?void 0:l.hover)==null?void 0:K.call(l,N,F,B)},leave:(N,F)=>{var K;return(K=l==null?void 0:l.leave)==null?void 0:K.call(l,N,F,B)}})}y=!1,_.hasExtendedAttrs()&&_.extended.urlId?(k=R,x=_.extended.urlId):(k=-1,x=-1)}}u(s)}};function w(v,u){if(confirm(`Do you want to navigate to ${u}?
|
|
58
|
+
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=d.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,l){this._liveRegionDebouncer.refresh(s,l,this._terminal.rows)}_renderRows(s,l){const p=this._terminal.buffer,C=p.lines.length.toString();for(let x=s;x<=l;x++){const k=p.lines.get(p.ydisp+x),y=[],b=(k==null?void 0:k.translateToString(!0,void 0,void 0,y))||"",R=(p.ydisp+x+1).toString(),M=this._rowElements[x];M&&(b.length===0?(M.innerText=" ",this._rowColumns.set(M,[0,1])):(M.textContent=b,this._rowColumns.set(M,y)),M.setAttribute("aria-posinset",R),M.setAttribute("aria-setsize",C))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(s,l){const p=s.target,C=this._rowElements[l===0?1:this._rowElements.length-2];if(p.getAttribute("aria-posinset")===(l===0?"1":`${this._terminal.buffer.lines.length}`)||s.relatedTarget!==C)return;let x,k;if(l===0?(x=p,k=this._rowElements.pop(),this._rowContainer.removeChild(k)):(x=this._rowElements.shift(),k=p,this._rowContainer.removeChild(x)),x.removeEventListener("focus",this._topBoundaryFocusListener),k.removeEventListener("focus",this._bottomBoundaryFocusListener),l===0){const y=this._createAccessibilityTreeNode();this._rowElements.unshift(y),this._rowContainer.insertAdjacentElement("afterbegin",y)}else{const y=this._createAccessibilityTreeNode();this._rowElements.push(y),this._rowContainer.appendChild(y)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(l===0?-1:1),this._rowElements[l===0?1:this._rowElements.length-2].focus(),s.preventDefault(),s.stopImmediatePropagation()}_handleSelectionChange(){var b;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 l={node:s.anchorNode,offset:s.anchorOffset},p={node:s.focusNode,offset:s.focusOffset};if((l.node.compareDocumentPosition(p.node)&Node.DOCUMENT_POSITION_PRECEDING||l.node===p.node&&l.offset>p.offset)&&([l,p]=[p,l]),l.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(l={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(l.node))return;const C=this._rowElements.slice(-1)[0];if(p.node.compareDocumentPosition(C)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(p={node:C,offset:((b=C.textContent)==null?void 0:b.length)??0}),!this._rowContainer.contains(p.node))return;const x=({node:R,offset:M})=>{const B=R instanceof Text?R.parentNode:R;let T=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(T))return console.warn("row is invalid. Race condition?"),null;const N=this._rowColumns.get(B);if(!N)return console.warn("columns is null. Race condition?"),null;let F=M<N.length?N[M]:N.slice(-1)[0]+1;return F>=this._terminal.cols&&(++T,F=0),{row:T,column:F}},k=x(l),y=x(p);if(k&&y){if(k.row>y.row||k.row===y.row&&k.column>=y.column)throw new Error("invalid range");this._terminal.select(k.column,k.row,(y.row-k.row)*this._terminal.cols-k.column+y.column)}}_handleResize(s){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let l=this._rowContainer.children.length;l<this._terminal.rows;l++)this._rowElements[l]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[l]);for(;this._rowElements.length>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`}};a.AccessibilityManager=o=f([g(1,v.IInstantiationService),g(2,w.ICoreBrowserService),g(3,w.IRenderService)],o)},3614:(m,a)=>{function c(_){return _.replace(/\r?\n/g,"\r")}function f(_,S){return S?"\x1B[200~"+_+"\x1B[201~":_}function g(_,S,w,v){_=f(_=c(_),w.decPrivateModes.bracketedPasteMode&&v.rawOptions.ignoreBracketedPasteMode!==!0),w.triggerDataEvent(_,!0),S.value=""}function d(_,S,w){const v=w.getBoundingClientRect(),u=_.clientX-v.left-10,o=_.clientY-v.top-10;S.style.width="20px",S.style.height="20px",S.style.left=`${u}px`,S.style.top=`${o}px`,S.style.zIndex="1000",S.focus()}Object.defineProperty(a,"__esModule",{value:!0}),a.rightClickHandler=a.moveTextAreaUnderMouseCursor=a.paste=a.handlePasteEvent=a.copyHandler=a.bracketTextForPaste=a.prepareTextForTerminal=void 0,a.prepareTextForTerminal=c,a.bracketTextForPaste=f,a.copyHandler=function(_,S){_.clipboardData&&_.clipboardData.setData("text/plain",S.selectionText),_.preventDefault()},a.handlePasteEvent=function(_,S,w,v){_.stopPropagation(),_.clipboardData&&g(_.clipboardData.getData("text/plain"),S,w,v)},a.paste=g,a.moveTextAreaUnderMouseCursor=d,a.rightClickHandler=function(_,S,w,v,u){d(_,S,w),u&&v.rightClickSelect(_),S.value=v.selectionText,S.select()}},7239:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorContrastCache=void 0;const f=c(1505);a.ColorContrastCache=class{constructor(){this._color=new f.TwoKeyMap,this._css=new f.TwoKeyMap}setCss(g,d,_){this._css.set(g,d,_)}getCss(g,d){return this._css.get(g,d)}setColor(g,d,_){this._color.set(g,d,_)}getColor(g,d){return this._color.get(g,d)}clear(){this._color.clear(),this._css.clear()}}},3656:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.addDisposableDomListener=void 0,a.addDisposableDomListener=function(c,f,g,d){c.addEventListener(f,g,d);let _=!1;return{dispose:()=>{_||(_=!0,c.removeEventListener(f,g,d))}}}},3551:function(m,a,c){var f=this&&this.__decorate||function(o,s,l,p){var C,x=arguments.length,k=x<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,l):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,s,l,p);else for(var y=o.length-1;y>=0;y--)(C=o[y])&&(k=(x<3?C(k):x>3?C(s,l,k):C(s,l))||k);return x>3&&k&&Object.defineProperty(s,l,k),k},g=this&&this.__param||function(o,s){return function(l,p){s(l,p,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Linkifier=void 0;const d=c(3656),_=c(8460),S=c(844),w=c(2585),v=c(4725);let u=a.Linkifier=class extends S.Disposable{get currentLink(){return this._currentLink}constructor(o,s,l,p,C){super(),this._element=o,this._mouseService=s,this._renderService=l,this._bufferService=p,this._linkProviderService=C,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new _.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new _.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,S.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,S.toDisposable)(()=>{var x;this._lastMouseEvent=void 0,(x=this._activeProviderReplies)==null||x.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,d.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,d.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,d.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(o){this._lastMouseEvent=o;const s=this._positionFromMouseEvent(o,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const l=o.composedPath();for(let p=0;p<l.length;p++){const C=l[p];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(o){if(this._activeLine!==o.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(o,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,o)||(this._clearCurrentLink(),this._askForLink(o,!0))}_askForLink(o,s){var p,C;this._activeProviderReplies&&s||((p=this._activeProviderReplies)==null||p.forEach(x=>{x==null||x.forEach(k=>{k.link.dispose&&k.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=o.y);let l=!1;for(const[x,k]of this._linkProviderService.linkProviders.entries())s?(C=this._activeProviderReplies)!=null&&C.get(x)&&(l=this._checkLinkProviderResult(x,o,l)):k.provideLinks(o.y,y=>{var R,M;if(this._isMouseOut)return;const b=y==null?void 0:y.map(B=>({link:B}));(R=this._activeProviderReplies)==null||R.set(x,b),l=this._checkLinkProviderResult(x,o,l),((M=this._activeProviderReplies)==null?void 0:M.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(o.y,this._activeProviderReplies)})}_removeIntersectingLinks(o,s){const l=new Set;for(let p=0;p<s.size;p++){const C=s.get(p);if(C)for(let x=0;x<C.length;x++){const k=C[x],y=k.link.range.start.y<o?0:k.link.range.start.x,b=k.link.range.end.y>o?this._bufferService.cols:k.link.range.end.x;for(let R=y;R<=b;R++){if(l.has(R)){C.splice(x--,1);break}l.add(R)}}}}_checkLinkProviderResult(o,s,l){var x;if(!this._activeProviderReplies)return l;const p=this._activeProviderReplies.get(o);let C=!1;for(let k=0;k<o;k++)this._activeProviderReplies.has(k)&&!this._activeProviderReplies.get(k)||(C=!0);if(!C&&p){const k=p.find(y=>this._linkAtPosition(y.link,s));k&&(l=!0,this._handleNewLink(k))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!l)for(let k=0;k<this._activeProviderReplies.size;k++){const y=(x=this._activeProviderReplies.get(k))==null?void 0:x.find(b=>this._linkAtPosition(b.link,s));if(y){l=!0,this._handleNewLink(y);break}}return l}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(o){if(!this._currentLink)return;const s=this._positionFromMouseEvent(o,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(o,this._currentLink.link.text)}_clearCurrentLink(o,s){this._currentLink&&this._lastMouseEvent&&(!o||!s||this._currentLink.link.range.start.y>=o&&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(o){if(!this._lastMouseEvent)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(o.link,s)&&(this._currentLink=o,this._currentLink.state={decorations:{underline:o.link.decorations===void 0||o.link.decorations.underline,pointerCursor:o.link.decorations===void 0||o.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,o.link,this._lastMouseEvent),o.link.decorations={},Object.defineProperties(o.link.decorations,{pointerCursor:{get:()=>{var l,p;return(p=(l=this._currentLink)==null?void 0:l.state)==null?void 0:p.decorations.pointerCursor},set:l=>{var p;(p=this._currentLink)!=null&&p.state&&this._currentLink.state.decorations.pointerCursor!==l&&(this._currentLink.state.decorations.pointerCursor=l,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",l))}},underline:{get:()=>{var l,p;return(p=(l=this._currentLink)==null?void 0:l.state)==null?void 0:p.decorations.underline},set:l=>{var p,C,x;(p=this._currentLink)!=null&&p.state&&((x=(C=this._currentLink)==null?void 0:C.state)==null?void 0:x.decorations.underline)!==l&&(this._currentLink.state.decorations.underline=l,this._currentLink.state.isHovered&&this._fireUnderlineEvent(o.link,l))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(l=>{if(!this._currentLink)return;const p=l.start===0?0:l.start+1+this._bufferService.buffer.ydisp,C=this._bufferService.buffer.ydisp+1+l.end;if(this._currentLink.link.range.start.y>=p&&this._currentLink.link.range.end.y<=C&&(this._clearCurrentLink(p,C),this._lastMouseEvent)){const x=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);x&&this._askForLink(x,!1)}})))}_linkHover(o,s,l){var p;(p=this._currentLink)!=null&&p.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&o.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(l,s.text)}_fireUnderlineEvent(o,s){const l=o.range,p=this._bufferService.buffer.ydisp,C=this._createLinkUnderlineEvent(l.start.x-1,l.start.y-p-1,l.end.x,l.end.y-p-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(C)}_linkLeave(o,s,l){var p;(p=this._currentLink)!=null&&p.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&o.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(l,s.text)}_linkAtPosition(o,s){const l=o.range.start.y*this._bufferService.cols+o.range.start.x,p=o.range.end.y*this._bufferService.cols+o.range.end.x,C=s.y*this._bufferService.cols+s.x;return l<=C&&C<=p}_positionFromMouseEvent(o,s,l){const p=l.getCoords(o,s,this._bufferService.cols,this._bufferService.rows);if(p)return{x:p[0],y:p[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(o,s,l,p,C){return{x1:o,y1:s,x2:l,y2:p,cols:this._bufferService.cols,fg:C}}};a.Linkifier=u=f([g(1,v.IMouseService),g(2,v.IRenderService),g(3,w.IBufferService),g(4,v.ILinkProviderService)],u)},9042:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.tooMuchOutput=a.promptLabel=void 0,a.promptLabel="Terminal input",a.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(m,a,c){var f=this&&this.__decorate||function(v,u,o,s){var l,p=arguments.length,C=p<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,o,s);else for(var x=v.length-1;x>=0;x--)(l=v[x])&&(C=(p<3?l(C):p>3?l(u,o,C):l(u,o))||C);return p>3&&C&&Object.defineProperty(u,o,C),C},g=this&&this.__param||function(v,u){return function(o,s){u(o,s,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkProvider=void 0;const d=c(511),_=c(2585);let S=a.OscLinkProvider=class{constructor(v,u,o){this._bufferService=v,this._optionsService=u,this._oscLinkService=o}provideLinks(v,u){var b;const o=this._bufferService.buffer.lines.get(v-1);if(!o)return void u(void 0);const s=[],l=this._optionsService.rawOptions.linkHandler,p=new d.CellData,C=o.getTrimmedLength();let x=-1,k=-1,y=!1;for(let R=0;R<C;R++)if(k!==-1||o.hasContent(R)){if(o.loadCell(R,p),p.hasExtendedAttrs()&&p.extended.urlId){if(k===-1){k=R,x=p.extended.urlId;continue}y=p.extended.urlId!==x}else k!==-1&&(y=!0);if(y||k!==-1&&R===C-1){const M=(b=this._oscLinkService.getLinkData(x))==null?void 0:b.uri;if(M){const B={start:{x:k+1,y:v},end:{x:R+(y||R!==C-1?0:1),y:v}};let T=!1;if(!(l!=null&&l.allowNonHttpProtocols))try{const N=new URL(M);["http:","https:"].includes(N.protocol)||(T=!0)}catch{T=!0}T||s.push({text:M,range:B,activate:(N,F)=>l?l.activate(N,F,B):w(0,F),hover:(N,F)=>{var K;return(K=l==null?void 0:l.hover)==null?void 0:K.call(l,N,F,B)},leave:(N,F)=>{var K;return(K=l==null?void 0:l.leave)==null?void 0:K.call(l,N,F,B)}})}y=!1,p.hasExtendedAttrs()&&p.extended.urlId?(k=R,x=p.extended.urlId):(k=-1,x=-1)}}u(s)}};function w(v,u){if(confirm(`Do you want to navigate to ${u}?
|
|
59
59
|
|
|
60
|
-
WARNING: This link could potentially be dangerous`)){const o=window.open();if(o){try{o.opener=null}catch{}o.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=S=f([g(0,p.IBufferService),g(1,p.IOptionsService),g(2,p.IOscLinkService)],S)},6193:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.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,g){this._rowCount=g,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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const f=c(3614),g=c(3656),d=c(3551),p=c(9042),S=c(3730),w=c(1680),v=c(3107),u=c(5744),o=c(2950),s=c(1296),l=c(428),_=c(4269),C=c(5114),x=c(8934),k=c(3230),y=c(9312),b=c(4725),R=c(6731),M=c(8055),B=c(8969),T=c(8460),N=c(844),F=c(6114),K=c(8437),q=c(2584),j=c(7399),E=c(5941),D=c(9074),P=c(2585),O=c(5435),W=c(4567),V=c(779);class J extends B.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(I={}){super(I),this.browser=F,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(b.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,U)=>this.refresh(L,U))),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,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(L=>this._afterResize(L.cols,L.rows))),this.register((0,N.toDisposable)(()=>{var L,U;this._customKeyEventHandler=void 0,(U=(L=this.element)==null?void 0:L.parentNode)==null||U.removeChild(this.element)}))}_handleColorEvent(I){if(this._themeService)for(const L of I){let U,H="";switch(L.index){case 256:U="foreground",H="10";break;case 257:U="background",H="11";break;case 258:U="cursor",H="12";break;default:U="ansi",H="4;"+L.index}switch(L.type){case 0:const X=M.color.toColorRGB(U==="ansi"?this._themeService.colors.ansi[L.index]:this._themeService.colors[U]);this.coreService.triggerDataEvent(`${q.C0.ESC}]${H};${(0,E.toRgbString)(X)}${q.C1_ESCAPED.ST}`);break;case 1:if(U==="ansi")this._themeService.modifyColors(G=>G.ansi[L.index]=M.channels.toColor(...L.color));else{const G=U;this._themeService.modifyColors(se=>se[G]=M.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(I){I?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(W.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(I){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var I;return(I=this.textarea)==null?void 0:I.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 I=this.buffer.ybase+this.buffer.y,L=this.buffer.lines.get(I);if(!L)return;const U=Math.min(this.buffer.x,this.cols-1),H=this._renderService.dimensions.css.cell.height,X=L.getWidth(U),G=this._renderService.dimensions.css.cell.width*X,se=this.buffer.y*this._renderService.dimensions.css.cell.height,z=U*this._renderService.dimensions.css.cell.width;this.textarea.style.left=z+"px",this.textarea.style.top=se+"px",this.textarea.style.width=G+"px",this.textarea.style.height=H+"px",this.textarea.style.lineHeight=H+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,g.addDisposableDomListener)(this.element,"copy",L=>{this.hasSelection()&&(0,f.copyHandler)(L,this._selectionService)}));const I=L=>(0,f.handlePasteEvent)(L,this.textarea,this.coreService,this.optionsService);this.register((0,g.addDisposableDomListener)(this.textarea,"paste",I)),this.register((0,g.addDisposableDomListener)(this.element,"paste",I)),F.isFirefox?this.register((0,g.addDisposableDomListener)(this.element,"mousedown",L=>{L.button===2&&(0,f.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,g.addDisposableDomListener)(this.element,"contextmenu",L=>{(0,f.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),F.isLinux&&this.register((0,g.addDisposableDomListener)(this.element,"auxclick",L=>{L.button===1&&(0,f.moveTextAreaUnderMouseCursor)(L,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,g.addDisposableDomListener)(this.textarea,"keyup",I=>this._keyUp(I),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keydown",I=>this._keyDown(I),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keypress",I=>this._keyPress(I),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionupdate",I=>this._compositionHelper.compositionupdate(I))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,g.addDisposableDomListener)(this.textarea,"input",I=>this._inputEvent(I),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(I){var U;if(!I)throw new Error("Terminal requires a parent element.");if(I.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((U=this.element)==null?void 0:U.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=I.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"),I.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,g.addDisposableDomListener)(this.screenElement,"mousemove",H=>this.updateCursorStyle(H))),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),F.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,I.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(b.ICoreBrowserService,this._coreBrowserService),this.register((0,g.addDisposableDomListener)(this.textarea,"focus",H=>this._handleTextAreaFocus(H))),this.register((0,g.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(b.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(R.ThemeService),this._instantiationService.setService(b.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(_.CharacterJoinerService),this._instantiationService.setService(b.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(b.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(H=>this._onRender.fire(H))),this.onResize(H=>this._renderService.resize(H.cols,H.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(o.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(x.MouseService),this._instantiationService.setService(b.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(d.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(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(H=>this.scrollLines(H.amount,H.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(y.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(b.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(H=>this.scrollLines(H.amount,H.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(H=>this._renderService.handleSelectionChanged(H.start,H.end,H.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(H=>{this.textarea.value=H,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(H=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,g.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,g.addDisposableDomListener)(this.element,"mousedown",H=>this._selectionService.handleMouseDown(H))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(W.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",H=>this._handleScreenReaderModeOptionChange(H))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",H=>{!this._overviewRulerRenderer&&H&&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 I=this,L=this.element;function U(G){const se=I._mouseService.getMouseReportCoords(G,I.screenElement);if(!se)return!1;let z,re;switch(G.overrideType||G.type){case"mousemove":re=32,G.buttons===void 0?(z=3,G.button!==void 0&&(z=G.button<3?G.button:3)):z=1&G.buttons?0:4&G.buttons?1:2&G.buttons?2:3;break;case"mouseup":re=0,z=G.button<3?G.button:3;break;case"mousedown":re=1,z=G.button<3?G.button:3;break;case"wheel":if(I._customWheelEventHandler&&I._customWheelEventHandler(G)===!1||I.viewport.getLinesScrolled(G)===0)return!1;re=G.deltaY<0?0:1,z=4;break;default:return!1}return!(re===void 0||z===void 0||z>4)&&I.coreMouseService.triggerMouseEvent({col:se.col,row:se.row,x:se.x,y:se.y,button:z,action:re,ctrl:G.ctrlKey,alt:G.altKey,shift:G.shiftKey})}const H={mouseup:null,wheel:null,mousedrag:null,mousemove:null},X={mouseup:G=>(U(G),G.buttons||(this._document.removeEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.removeEventListener("mousemove",H.mousedrag)),this.cancel(G)),wheel:G=>(U(G),this.cancel(G,!0)),mousedrag:G=>{G.buttons&&U(G)},mousemove:G=>{G.buttons||U(G)}};this.register(this.coreMouseService.onProtocolChange(G=>{G?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(G)),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&G?H.mousemove||(L.addEventListener("mousemove",X.mousemove),H.mousemove=X.mousemove):(L.removeEventListener("mousemove",H.mousemove),H.mousemove=null),16&G?H.wheel||(L.addEventListener("wheel",X.wheel,{passive:!1}),H.wheel=X.wheel):(L.removeEventListener("wheel",H.wheel),H.wheel=null),2&G?H.mouseup||(H.mouseup=X.mouseup):(this._document.removeEventListener("mouseup",H.mouseup),H.mouseup=null),4&G?H.mousedrag||(H.mousedrag=X.mousedrag):(this._document.removeEventListener("mousemove",H.mousedrag),H.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,g.addDisposableDomListener)(L,"mousedown",G=>{if(G.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(G))return U(G),H.mouseup&&this._document.addEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.addEventListener("mousemove",H.mousedrag),this.cancel(G)})),this.register((0,g.addDisposableDomListener)(L,"wheel",G=>{if(!H.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(G)===!1)return!1;if(!this.buffer.hasScrollback){const se=this.viewport.getLinesScrolled(G);if(se===0)return;const z=q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(G.deltaY<0?"A":"B");let re="";for(let ne=0;ne<Math.abs(se);ne++)re+=z;return this.coreService.triggerDataEvent(re,!0),this.cancel(G,!0)}return this.viewport.handleWheel(G)?this.cancel(G):void 0}},{passive:!1})),this.register((0,g.addDisposableDomListener)(L,"touchstart",G=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(G),this.cancel(G)},{passive:!0})),this.register((0,g.addDisposableDomListener)(L,"touchmove",G=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(G)?void 0:this.cancel(G)},{passive:!1}))}refresh(I,L){var U;(U=this._renderService)==null||U.refreshRows(I,L)}updateCursorStyle(I){var L;(L=this._selectionService)!=null&&L.shouldColumnSelect(I)?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(I,L,U=0){var H;U===1?(super.scrollLines(I,L,U),this.refresh(0,this.rows-1)):(H=this.viewport)==null||H.scrollLines(I)}paste(I){(0,f.paste)(I,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(I){this._customKeyEventHandler=I}attachCustomWheelEventHandler(I){this._customWheelEventHandler=I}registerLinkProvider(I){return this._linkProviderService.registerLinkProvider(I)}registerCharacterJoiner(I){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const L=this._characterJoinerService.register(I);return this.refresh(0,this.rows-1),L}deregisterCharacterJoiner(I){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(I)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(I){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+I)}registerDecoration(I){return this._decorationService.registerDecoration(I)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(I,L,U){this._selectionService.setSelection(I,L,U)}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 I;(I=this._selectionService)==null||I.clearSelection()}selectAll(){var I;(I=this._selectionService)==null||I.selectAll()}selectLines(I,L){var U;(U=this._selectionService)==null||U.selectLines(I,L)}_keyDown(I){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1)return!1;const L=this.browser.isMac&&this.options.macOptionIsMeta&&I.altKey;if(!L&&!this._compositionHelper.keydown(I))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;L||I.key!=="Dead"&&I.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const U=(0,j.evaluateKeyboardEvent)(I,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(I),U.type===3||U.type===2){const H=this.rows-1;return this.scrollLines(U.type===2?-H:H),this.cancel(I,!0)}return U.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,I)||(U.cancel&&this.cancel(I,!0),!U.key||!!(I.key&&!I.ctrlKey&&!I.altKey&&!I.metaKey&&I.key.length===1&&I.key.charCodeAt(0)>=65&&I.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(U.key!==q.C0.ETX&&U.key!==q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:U.key,domEvent:I}),this._showCursor(),this.coreService.triggerDataEvent(U.key,!0),!this.optionsService.rawOptions.screenReaderMode||I.altKey||I.ctrlKey?this.cancel(I,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(I,L){const U=I.isMac&&!this.options.macOptionIsMeta&&L.altKey&&!L.ctrlKey&&!L.metaKey||I.isWindows&&L.altKey&&L.ctrlKey&&!L.metaKey||I.isWindows&&L.getModifierState("AltGraph");return L.type==="keypress"?U:U&&(!L.keyCode||L.keyCode>47)}_keyUp(I){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1||(function(L){return L.keyCode===16||L.keyCode===17||L.keyCode===18}(I)||this.focus(),this.updateCursorStyle(I),this._keyPressHandled=!1)}_keyPress(I){let L;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1)return!1;if(this.cancel(I),I.charCode)L=I.charCode;else if(I.which===null||I.which===void 0)L=I.keyCode;else{if(I.which===0||I.charCode===0)return!1;L=I.which}return!(!L||(I.altKey||I.ctrlKey||I.metaKey)&&!this._isThirdLevelShift(this.browser,I)||(L=String.fromCharCode(L),this._onKey.fire({key:L,domEvent:I}),this._showCursor(),this.coreService.triggerDataEvent(L,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(I){if(I.data&&I.inputType==="insertText"&&(!I.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const L=I.data;return this.coreService.triggerDataEvent(L,!0),this.cancel(I),!0}return!1}resize(I,L){I!==this.cols||L!==this.rows?super.resize(I,L):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(I,L){var U,H;(U=this._charSizeService)==null||U.measure(),(H=this.viewport)==null||H.syncScrollArea(!0)}clear(){var I;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(K.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(I=this.viewport)==null||I.reset(),this.refresh(0,this.rows-1)}}reset(){var L,U;this.options.rows=this.rows,this.options.cols=this.cols;const I=this._customKeyEventHandler;this._setup(),super.reset(),(L=this._selectionService)==null||L.reset(),this._decorationService.reset(),(U=this.viewport)==null||U.reset(),this._customKeyEventHandler=I,this.refresh(0,this.rows-1)}clearTextureAtlas(){var I;(I=this._renderService)==null||I.clearTextureAtlas()}_reportFocus(){var I;(I=this.element)!=null&&I.classList.contains("focus")?this.coreService.triggerDataEvent(q.C0.ESC+"[I"):this.coreService.triggerDataEvent(q.C0.ESC+"[O")}_reportWindowsOptions(I){if(this._renderService)switch(I){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const L=this._renderService.dimensions.css.canvas.width.toFixed(0),U=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[4;${U};${L}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const H=this._renderService.dimensions.css.cell.width.toFixed(0),X=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[6;${X};${H}t`)}}cancel(I,L){if(this.options.cancelEvents||L)return I.preventDefault(),I.stopPropagation(),!1}}a.Terminal=J},9924:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.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,g){this._rowCount=g,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 d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const p=d-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(m,a,c){var f=this&&this.__decorate||function(o,s,l,_){var C,x=arguments.length,k=x<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,s,l,_);else for(var y=o.length-1;y>=0;y--)(C=o[y])&&(k=(x<3?C(k):x>3?C(s,l,k):C(s,l))||k);return x>3&&k&&Object.defineProperty(s,l,k),k},g=this&&this.__param||function(o,s){return function(l,_){s(l,_,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const d=c(3656),p=c(4725),S=c(8460),w=c(844),v=c(2585);let u=a.Viewport=class extends w.Disposable{constructor(o,s,l,_,C,x,k,y){super(),this._viewportElement=o,this._scrollArea=s,this._bufferService=l,this._optionsService=_,this._charSizeService=C,this._renderService=x,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,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(b=>this._activeBuffer=b.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(b=>this._renderDimensions=b)),this._handleThemeChange(y.colors),this.register(y.onChangeColors(b=>this._handleThemeChange(b))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(o){this._viewportElement.style.backgroundColor=o.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(o){if(o)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._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 o=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==o&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=o),this._refreshAnimationFrame=null}syncScrollArea(o=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(o);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(o)}_handleScroll(o){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const 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 o=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(o*(this._smoothScrollState.target-this._smoothScrollState.origin)),o<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(o,s){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(s<0&&this._viewportElement.scrollTop!==0||s>0&&l<this._lastRecordedBufferHeight)||(o.cancelable&&o.preventDefault(),!1)}handleWheel(o){const s=this._getPixelsScrolled(o);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(o,s))}scrollLines(o){if(o!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const s=o*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:o,suppressScrollEvent:!1})}_getPixelsScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let s=this._applyScrollModifier(o.deltaY,o);return o.deltaMode===WheelEvent.DOM_DELTA_LINE?s*=this._currentRowHeight:o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._currentRowHeight*this._bufferService.rows),s}getBufferElements(o,s){var y;let l,_="";const C=[],x=s??this._bufferService.buffer.lines.length,k=this._bufferService.buffer.lines;for(let b=o;b<x;b++){const R=k.get(b);if(!R)continue;const M=(y=k.get(b+1))==null?void 0:y.isWrapped;if(_+=R.translateToString(!M),!M||b===k.length-1){const B=document.createElement("div");B.textContent=_,C.push(B),_.length>0&&(l=B),_=""}}return{bufferElements:C,cursorElement:l}}getLinesScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let s=this._applyScrollModifier(o.deltaY,o);return o.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):o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._bufferService.rows),s}_applyScrollModifier(o,s){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&s.altKey||l==="ctrl"&&s.ctrlKey||l==="shift"&&s.shiftKey?o*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:o*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(o){this._lastTouchY=o.touches[0].pageY}handleTouchMove(o){const s=this._lastTouchY-o.touches[0].pageY;return this._lastTouchY=o.touches[0].pageY,s!==0&&(this._viewportElement.scrollTop+=s,this._bubbleScroll(o,s))}};a.Viewport=u=f([g(2,v.IBufferService),g(3,v.IOptionsService),g(4,p.ICharSizeService),g(5,p.IRenderService),g(6,p.ICoreBrowserService),g(7,p.IThemeService)],u)},3107:function(m,a,c){var f=this&&this.__decorate||function(v,u,o,s){var l,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,o,s);else for(var x=v.length-1;x>=0;x--)(l=v[x])&&(C=(_<3?l(C):_>3?l(u,o,C):l(u,o))||C);return _>3&&C&&Object.defineProperty(u,o,C),C},g=this&&this.__param||function(v,u){return function(o,s){u(o,s,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const d=c(4725),p=c(844),S=c(2585);let w=a.BufferDecorationRenderer=class extends p.Disposable{constructor(v,u,o,s,l){super(),this._screenElement=v,this._bufferService=u,this._coreBrowserService=o,this._decorationService=s,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(_=>this._removeDecoration(_))),this.register((0,p.toDisposable)(()=>{this._container.remove(),this._decorationElements.clear()}))}_queueRefresh(){this._animationFrame===void 0&&(this._animationFrame=this._renderService.addRefreshCallback(()=>{this._doRefreshDecorations(),this._animationFrame=void 0}))}_doRefreshDecorations(){for(const 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 o=v.options.x??0;return o&&o>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 o=this._decorationElements.get(v);o||(o=this._createElement(v),v.element=o,this._decorationElements.set(v,o),this._container.appendChild(o),v.onDispose(()=>{this._decorationElements.delete(v),o.remove()})),o.style.top=u*this._renderService.dimensions.css.cell.height+"px",o.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(o)}}_refreshXPosition(v,u=v.element){if(!u)return;const o=v.options.x??0;(v.options.anchor||"left")==="right"?u.style.right=o?o*this._renderService.dimensions.css.cell.width+"px":"":u.style.left=o?o*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()}};a.BufferDecorationRenderer=w=f([g(1,S.IBufferService),g(2,d.ICoreBrowserService),g(3,S.IDecorationService),g(4,d.IRenderService)],w)},5871:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.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,g){return f>=c.startBufferLine-this._linePadding[g||"full"]&&f<=c.endBufferLine+this._linePadding[g||"full"]}_addLineToZone(c,f){c.startBufferLine=Math.min(c.startBufferLine,f),c.endBufferLine=Math.max(c.endBufferLine,f)}}},5744:function(m,a,c){var f=this&&this.__decorate||function(l,_,C,x){var k,y=arguments.length,b=y<3?_:x===null?x=Object.getOwnPropertyDescriptor(_,C):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,_,C,x);else for(var R=l.length-1;R>=0;R--)(k=l[R])&&(b=(y<3?k(b):y>3?k(_,C,b):k(_,C))||b);return y>3&&b&&Object.defineProperty(_,C,b),b},g=this&&this.__param||function(l,_){return function(C,x){_(C,x,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const d=c(5871),p=c(4725),S=c(844),w=c(2585),v={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0};let s=a.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,_,C,x,k,y,b){var M;super(),this._viewportElement=l,this._screenElement=_,this._bufferService=C,this._decorationService=x,this._renderService=k,this._optionsService=y,this._coreBrowserService=b,this._colorZoneStore=new d.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(),(M=this._viewportElement.parentElement)==null||M.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 B;(B=this._canvas)==null||B.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const l=Math.floor(this._canvas.width/3),_=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=l,u.center=_,u.right=l,this._refreshDrawHeightConstants(),o.full=0,o.left=0,o.center=u.left,o.right=u.left+u.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,_=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);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 l=this._colorZoneStore.zones;for(const _ of l)_.position!=="full"&&this._renderColorZone(_);for(const _ of l)_.position==="full"&&this._renderColorZone(_);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(o[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-v[l.position||"full"]/2),u[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[l.position||"full"]))}_queueRefresh(l,_){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=_||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};a.OverviewRulerRenderer=s=f([g(2,w.IBufferService),g(3,w.IDecorationService),g(4,p.IRenderService),g(5,w.IOptionsService),g(6,p.ICoreBrowserService)],s)},2950:function(m,a,c){var f=this&&this.__decorate||function(v,u,o,s){var l,_=arguments.length,C=_<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,o,s);else for(var x=v.length-1;x>=0;x--)(l=v[x])&&(C=(_<3?l(C):_>3?l(u,o,C):l(u,o))||C);return _>3&&C&&Object.defineProperty(u,o,C),C},g=this&&this.__param||function(v,u){return function(o,s){u(o,s,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const d=c(4725),p=c(2585),S=c(2584);let w=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,u,o,s,l,_){this._textarea=v,this._compositionView=u,this._bufferService=o,this._optionsService=s,this._coreService=l,this._renderService=_,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0},this._dataAlreadySent=""}compositionstart(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._dataAlreadySent="",this._compositionView.classList.add("active")}compositionupdate(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 o;this._isSendingComposition=!1,u.start+=this._dataAlreadySent.length,o=this._isComposing?this._textarea.value.substring(u.start,u.end):this._textarea.value.substring(u.start),o.length>0&&this._coreService.triggerDataEvent(o,!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,o=u.replace(v,"");this._dataAlreadySent=o,u.length>v.length?this._coreService.triggerDataEvent(o,!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),o=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=u*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=o+"px",this._compositionView.style.lineHeight=o+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const _=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"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)}}};a.CompositionHelper=w=f([g(2,p.IBufferService),g(3,p.IOptionsService),g(4,p.ICoreService),g(5,d.IRenderService)],w)},9806:(m,a)=>{function c(f,g,d){const p=d.getBoundingClientRect(),S=f.getComputedStyle(d),w=parseInt(S.getPropertyValue("padding-left")),v=parseInt(S.getPropertyValue("padding-top"));return[g.clientX-p.left-w,g.clientY-p.top-v]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(f,g,d,p,S,w,v,u,o){if(!w)return;const s=c(f,g,d);return s?(s[0]=Math.ceil((s[0]+(o?v/2:0))/v),s[1]=Math.ceil(s[1]/u),s[0]=Math.min(Math.max(s[0],1),p+(o?1:0)),s[1]=Math.min(Math.max(s[1],1),S),s):void 0}},9504:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=c(2584);function g(u,o,s,l){const _=u-d(u,s),C=o-d(o,s),x=Math.abs(_-C)-function(k,y,b){let R=0;const M=k-d(k,b),B=y-d(y,b);for(let T=0;T<Math.abs(M-B);T++){const N=p(k,y)==="A"?-1:1,F=b.buffer.lines.get(M+N*T);F!=null&&F.isWrapped&&R++}return R}(u,o,s);return v(x,w(p(u,o),l))}function d(u,o){let s=0,l=o.buffer.lines.get(u),_=l==null?void 0:l.isWrapped;for(;_&&u>=0&&u<o.rows;)s++,l=o.buffer.lines.get(--u),_=l==null?void 0:l.isWrapped;return s}function p(u,o){return u>o?"A":"B"}function S(u,o,s,l,_,C){let x=u,k=o,y="";for(;x!==s||k!==l;)x+=_?1:-1,_&&x>C.cols-1?(y+=C.buffer.translateBufferLineToString(k,!1,u,x),x=0,u=0,k++):!_&&x<0&&(y+=C.buffer.translateBufferLineToString(k,!1,0,u+1),x=C.cols-1,u=x,k--);return y+C.buffer.translateBufferLineToString(k,!1,u,x)}function w(u,o){const s=o?"O":"[";return f.C0.ESC+s+u}function v(u,o){u=Math.floor(u);let s="";for(let l=0;l<u;l++)s+=o;return s}a.moveToCellSequence=function(u,o,s,l){const _=s.buffer.x,C=s.buffer.y;if(!s.buffer.hasScrollback)return function(y,b,R,M,B,T){return g(b,M,B,T).length===0?"":v(S(y,b,y,b-d(b,B),!1,B).length,w("D",T))}(_,C,0,o,s,l)+g(C,o,s,l)+function(y,b,R,M,B,T){let N;N=g(b,M,B,T).length>0?M-d(M,B):b;const F=M,K=function(q,j,E,D,P,O){let W;return W=g(E,D,P,O).length>0?D-d(D,P):j,q<E&&W<=D||q>=E&&W<D?"C":"D"}(y,b,R,M,B,T);return v(S(y,N,R,F,K==="C",B).length,w(K,T))}(_,C,u,o,s,l);let x;if(C===o)return x=_>u?"D":"C",v(Math.abs(_-u),w(x,l));x=C>o?"D":"C";const k=Math.abs(C-o);return v(function(y,b){return b.cols-y}(C>o?u:_,s)+(k-1)*s.cols+1+((C>o?_:u)-1),w(x,l))}},1296:function(m,a,c){var f=this&&this.__decorate||function(T,N,F,K){var q,j=arguments.length,E=j<3?N:K===null?K=Object.getOwnPropertyDescriptor(N,F):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(T,N,F,K);else for(var D=T.length-1;D>=0;D--)(q=T[D])&&(E=(j<3?q(E):j>3?q(N,F,E):q(N,F))||E);return j>3&&E&&Object.defineProperty(N,F,E),E},g=this&&this.__param||function(T,N){return function(F,K){N(F,K,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const d=c(3787),p=c(2550),S=c(2223),w=c(6171),v=c(6052),u=c(4725),o=c(8055),s=c(8460),l=c(844),_=c(2585),C="xterm-dom-renderer-owner-",x="xterm-rows",k="xterm-fg-",y="xterm-bg-",b="xterm-focus",R="xterm-selection";let M=1,B=a.DomRenderer=class extends l.Disposable{constructor(T,N,F,K,q,j,E,D,P,O,W,V,J){super(),this._terminal=T,this._document=N,this._element=F,this._screenElement=K,this._viewportElement=q,this._helperContainer=j,this._linkifier2=E,this._charSizeService=P,this._optionsService=O,this._bufferService=W,this._coreBrowserService=V,this._themeService=J,this._terminalClass=M++,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(x),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,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Z=>this._injectCss(Z))),this._injectCss(this._themeService.colors),this._rowFactory=D.createInstance(d.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Z=>this._handleLinkHover(Z))),this.register(this._linkifier2.onHideLinkUnderline(Z=>this._handleLinkLeave(Z))),this.register((0,l.toDisposable)(()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new p.WidthCache(this._document,this._helperContainer),this._widthCache.setFont(this._optionsService.rawOptions.fontFamily,this._optionsService.rawOptions.fontSize,this._optionsService.rawOptions.fontWeight,this._optionsService.rawOptions.fontWeightBold),this._setDefaultSpacing()}_updateDimensions(){const 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 F of this._rowElements)F.style.width=`${this.dimensions.css.canvas.width}px`,F.style.height=`${this.dimensions.css.cell.height}px`,F.style.lineHeight=`${this.dimensions.css.cell.height}px`,F.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const N=`${this._terminalSelector} .${x} 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} .${x} { 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} .${x} .xterm-dim { color: ${o.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 F=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,q=`blink_block_${this._terminalClass}`;N+=`@keyframes ${F} { 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} .${x}.${b} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${F} 1s step-end infinite;}${this._terminalSelector} .${x}.${b} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${x}.${b} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block { background-color: ${T.cursor.css}; color: ${T.cursorAccent.css};}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${T.cursor.css} !important; color: ${T.cursorAccent.css} !important;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${T.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${T.cursor.css} inset;}${this._terminalSelector} .${x} .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[j,E]of T.ansi.entries())N+=`${this._terminalSelector} .${k}${j} { color: ${E.css}; }${this._terminalSelector} .${k}${j}.xterm-dim { color: ${o.color.multiplyOpacity(E,.5).css}; }${this._terminalSelector} .${y}${j} { background-color: ${E.css}; }`;N+=`${this._terminalSelector} .${k}${S.INVERTED_DEFAULT_COLOR} { color: ${o.color.opaque(T.background).css}; }${this._terminalSelector} .${k}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${o.color.multiplyOpacity(o.color.opaque(T.background),.5).css}; }${this._terminalSelector} .${y}${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 F=this._rowElements.length;F<=N;F++){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(b),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(b),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(T,N,F){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(T,N,F),this.renderRows(0,this._bufferService.rows-1),!T||!N)return;this._selectionRenderModel.update(this._terminal,T,N,F);const K=this._selectionRenderModel.viewportStartRow,q=this._selectionRenderModel.viewportEndRow,j=this._selectionRenderModel.viewportCappedStartRow,E=this._selectionRenderModel.viewportCappedEndRow;if(j>=this._bufferService.rows||E<0)return;const D=this._document.createDocumentFragment();if(F){const P=T[0]>N[0];D.appendChild(this._createSelectionElement(j,P?N[0]:T[0],P?T[0]:N[0],E-j+1))}else{const P=K===j?T[0]:0,O=j===q?N[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(j,P,O));const W=E-j-1;if(D.appendChild(this._createSelectionElement(j+1,0,this._bufferService.cols,W)),j!==E){const V=q===E?N[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(E,0,V))}}this._selectionContainer.appendChild(D)}_createSelectionElement(T,N,F,K=1){const q=this._document.createElement("div"),j=N*this.dimensions.css.cell.width;let E=this.dimensions.css.cell.width*(F-N);return j+E>this.dimensions.css.canvas.width&&(E=this.dimensions.css.canvas.width-j),q.style.height=K*this.dimensions.css.cell.height+"px",q.style.top=T*this.dimensions.css.cell.height+"px",q.style.left=`${j}px`,q.style.width=`${E}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 F=this._bufferService.buffer,K=F.ybase+F.y,q=Math.min(F.x,this._bufferService.cols-1),j=this._optionsService.rawOptions.cursorBlink,E=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;for(let P=T;P<=N;P++){const O=P+F.ydisp,W=this._rowElements[P],V=F.lines.get(O);if(!W||!V)break;W.replaceChildren(...this._rowFactory.createRow(V,O,O===K,E,D,q,j,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,F,K,q,j){F<0&&(T=0),K<0&&(N=0);const E=this._bufferService.rows-1;F=Math.max(Math.min(F,E),0),K=Math.max(Math.min(K,E),0),q=Math.min(q,this._bufferService.cols);const D=this._bufferService.buffer,P=D.ybase+D.y,O=Math.min(D.x,q-1),W=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,J=this._optionsService.rawOptions.cursorInactiveStyle;for(let Z=F;Z<=K;++Z){const I=Z+D.ydisp,L=this._rowElements[Z],U=D.lines.get(I);if(!L||!U)break;L.replaceChildren(...this._rowFactory.createRow(U,I,I===P,V,J,O,W,this.dimensions.css.cell.width,this._widthCache,j?Z===F?T:0:-1,j?(Z===K?N:q)-1:-1))}}};a.DomRenderer=B=f([g(7,_.IInstantiationService),g(8,u.ICharSizeService),g(9,_.IOptionsService),g(10,_.IBufferService),g(11,u.ICoreBrowserService),g(12,u.IThemeService)],B)},3787:function(m,a,c){var f=this&&this.__decorate||function(x,k,y,b){var R,M=arguments.length,B=M<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,y):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(x,k,y,b);else for(var T=x.length-1;T>=0;T--)(R=x[T])&&(B=(M<3?R(B):M>3?R(k,y,B):R(k,y))||B);return M>3&&B&&Object.defineProperty(k,y,B),B},g=this&&this.__param||function(x,k){return function(y,b){k(y,b,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const d=c(2223),p=c(643),S=c(511),w=c(2585),v=c(8055),u=c(4725),o=c(4269),s=c(6171),l=c(3734);let _=a.DomRendererRowFactory=class{constructor(x,k,y,b,R,M,B){this._document=x,this._characterJoinerService=k,this._optionsService=y,this._coreBrowserService=b,this._coreService=R,this._decorationService=M,this._themeService=B,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(x,k,y){this._selectionStart=x,this._selectionEnd=k,this._columnSelectMode=y}createRow(x,k,y,b,R,M,B,T,N,F,K){const q=[],j=this._characterJoinerService.getJoinedCharacters(k),E=this._themeService.colors;let D,P=x.getNoBgTrimmedLength();y&&P<M+1&&(P=M+1);let O=0,W="",V=0,J=0,Z=0,I=!1,L=0,U=!1,H=0;const X=[],G=F!==-1&&K!==-1;for(let se=0;se<P;se++){x.loadCell(se,this._workCell);let z=this._workCell.getWidth();if(z===0)continue;let re=!1,ne=se,ee=this._workCell;if(j.length>0&&se===j[0][0]){re=!0;const _e=j.shift();ee=new o.JoinedCellData(this._workCell,x.translateToString(!0,_e[0],_e[1]),_e[1]-_e[0]),ne=_e[1]-1,z=ee.getWidth()}const Fe=this._isCellInSelection(se,k),Ur=y&&se===M,dn=G&&se>=F&&se<=K;let fn=!1;this._decorationService.forEachDecorationAtCell(se,k,void 0,_e=>{fn=!0});let Wi=ee.getChars()||p.WHITESPACE_CELL_CHAR;if(Wi===" "&&(ee.isUnderline()||ee.isOverline())&&(Wi=" "),H=z*T-N.get(Wi,ee.isBold(),ee.isItalic()),D){if(O&&(Fe&&U||!Fe&&!U&&ee.bg===V)&&(Fe&&U&&E.selectionForeground||ee.fg===J)&&ee.extended.ext===Z&&dn===I&&H===L&&!Ur&&!re&&!fn){ee.isInvisible()?W+=p.WHITESPACE_CELL_CHAR:W+=Wi,O++;continue}O&&(D.textContent=W),D=this._document.createElement("span"),O=0,W=""}else D=this._document.createElement("span");if(V=ee.bg,J=ee.fg,Z=ee.extended.ext,I=dn,L=H,U=Fe,re&&M>=se&&M<=ne&&(M=se),!this._coreService.isCursorHidden&&Ur&&this._coreService.isCursorInitialized){if(X.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&X.push("xterm-cursor-blink"),X.push(b==="bar"?"xterm-cursor-bar":b==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(R)switch(R){case"outline":X.push("xterm-cursor-outline");break;case"block":X.push("xterm-cursor-block");break;case"bar":X.push("xterm-cursor-bar");break;case"underline":X.push("xterm-cursor-underline")}}if(ee.isBold()&&X.push("xterm-bold"),ee.isItalic()&&X.push("xterm-italic"),ee.isDim()&&X.push("xterm-dim"),W=ee.isInvisible()?p.WHITESPACE_CELL_CHAR:ee.getChars()||p.WHITESPACE_CELL_CHAR,ee.isUnderline()&&(X.push(`xterm-underline-${ee.extended.underlineStyle}`),W===" "&&(W=" "),!ee.isUnderlineColorDefault()))if(ee.isUnderlineColorRGB())D.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(ee.getUnderlineColor()).join(",")})`;else{let _e=ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ee.isBold()&&_e<8&&(_e+=8),D.style.textDecorationColor=E.ansi[_e].css}ee.isOverline()&&(X.push("xterm-overline"),W===" "&&(W=" ")),ee.isStrikethrough()&&X.push("xterm-strikethrough"),dn&&(D.style.textDecoration="underline");let Je=ee.getFgColor(),$r=ee.getFgColorMode(),ft=ee.getBgColor(),Kr=ee.getBgColorMode();const pn=!!ee.isInverse();if(pn){const _e=Je;Je=ft,ft=_e;const Nh=$r;$r=Kr,Kr=Nh}let Rt,Ui,Tt,Vr=!1;switch(this._decorationService.forEachDecorationAtCell(se,k,void 0,_e=>{_e.options.layer!=="top"&&Vr||(_e.backgroundColorRGB&&(Kr=50331648,ft=_e.backgroundColorRGB.rgba>>8&16777215,Rt=_e.backgroundColorRGB),_e.foregroundColorRGB&&($r=50331648,Je=_e.foregroundColorRGB.rgba>>8&16777215,Ui=_e.foregroundColorRGB),Vr=_e.options.layer==="top")}),!Vr&&Fe&&(Rt=this._coreBrowserService.isFocused?E.selectionBackgroundOpaque:E.selectionInactiveBackgroundOpaque,ft=Rt.rgba>>8&16777215,Kr=50331648,Vr=!0,E.selectionForeground&&($r=50331648,Je=E.selectionForeground.rgba>>8&16777215,Ui=E.selectionForeground)),Vr&&X.push("xterm-decoration-top"),Kr){case 16777216:case 33554432:Tt=E.ansi[ft],X.push(`xterm-bg-${ft}`);break;case 50331648:Tt=v.channels.toColor(ft>>16,ft>>8&255,255&ft),this._addStyle(D,`background-color:#${C((ft>>>0).toString(16),"0",6)}`);break;default:pn?(Tt=E.foreground,X.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):Tt=E.background}switch(Rt||ee.isDim()&&(Rt=v.color.multiplyOpacity(Tt,.5)),$r){case 16777216:case 33554432:ee.isBold()&&Je<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Je+=8),this._applyMinimumContrast(D,Tt,E.ansi[Je],ee,Rt,void 0)||X.push(`xterm-fg-${Je}`);break;case 50331648:const _e=v.channels.toColor(Je>>16&255,Je>>8&255,255&Je);this._applyMinimumContrast(D,Tt,_e,ee,Rt,Ui)||this._addStyle(D,`color:#${C(Je.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(D,Tt,E.foreground,ee,Rt,Ui)||pn&&X.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}X.length&&(D.className=X.join(" "),X.length=0),Ur||re||fn?D.textContent=W:O++,H!==this.defaultSpacing&&(D.style.letterSpacing=`${H}px`),q.push(D),se=ne}return D&&O&&(D.textContent=W),q}_applyMinimumContrast(x,k,y,b,R,M){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,s.treatGlyphAsBackgroundColor)(b.getCode()))return!1;const B=this._getContrastCache(b);let T;if(R||M||(T=B.getColor(k.rgba,y.rgba)),T===void 0){const N=this._optionsService.rawOptions.minimumContrastRatio/(b.isDim()?2:1);T=v.color.ensureContrastRatio(R||k,M||y,N),B.setColor((R||k).rgba,(M||y).rgba,T??null)}return!!T&&(this._addStyle(x,`color:${T.css}`),!0)}_getContrastCache(x){return x.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(x,k){x.setAttribute("style",`${x.getAttribute("style")||""}${k};`)}_isCellInSelection(x,k){const y=this._selectionStart,b=this._selectionEnd;return!(!y||!b)&&(this._columnSelectMode?y[0]<=b[0]?x>=y[0]&&k>=y[1]&&x<b[0]&&k<=b[1]:x<y[0]&&k>=y[1]&&x>=b[0]&&k<=b[1]:k>y[1]&&k<b[1]||y[1]===b[1]&&k===y[1]&&x>=y[0]&&x<b[0]||y[1]<b[1]&&k===b[1]&&x<b[0]||y[1]<b[1]&&k===y[1]&&x>=y[0])}};function C(x,k,y){for(;x.length<y;)x=k+x;return x}a.DomRendererRowFactory=_=f([g(1,u.ICharacterJoinerService),g(2,w.IOptionsService),g(3,u.ICoreBrowserService),g(4,w.ICoreService),g(5,w.IDecorationService),g(6,u.IThemeService)],_)},2550:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.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 g=c.createElement("span");g.classList.add("xterm-char-measure-element");const d=c.createElement("span");d.classList.add("xterm-char-measure-element"),d.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=[g,d,p,S],this._container.appendChild(g),this._container.appendChild(d),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,g,d){c===this._font&&f===this._fontSize&&g===this._weight&&d===this._weightBold||(this._font=c,this._fontSize=f,this._weight=g,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${g}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${g}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(c,f,g){let d=0;if(!f&&!g&&c.length===1&&(d=c.charCodeAt(0))<256){if(this._flat[d]!==-9999)return this._flat[d];const w=this._measure(c,0);return w>0&&(this._flat[d]=w),w}let p=c;f&&(p+="B"),g&&(p+="I");let S=this._holey.get(p);if(S===void 0){let w=0;f&&(w|=1),g&&(w|=2),S=this._measure(c,w),S>0&&this._holey.set(p,S)}return S}_measure(c,f){const g=this._measureElements[f];return g.textContent=c.repeat(32),g.offsetWidth/32}}},2223:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(m,a)=>{function c(g){return 57508<=g&&g<=57558}function f(g){return g>=128512&&g<=128591||g>=127744&&g<=128511||g>=128640&&g<=128767||g>=9728&&g<=9983||g>=9984&&g<=10175||g>=65024&&g<=65039||g>=129280&&g<=129535||g>=127462&&g<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},a.isEmoji=f,a.allowRescaling=function(g,d,p,S){return d===1&&p>Math.ceil(1.5*S)&&g!==void 0&&g>255&&!f(g)&&!c(g)&&!function(w){return 57344<=w&&w<=63743}(g)},a.treatGlyphAsBackgroundColor=function(g){return c(g)||function(d){return 9472<=d&&d<=9631}(g)},a.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}}}},a.computeNextVariantOffset=function(g,d,p=0){return(g-(2*Math.round(d)-p))%(2*Math.round(d))}},6052:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.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(g,d,p,S=!1){if(this.selectionStart=d,this.selectionEnd=p,!d||!p||d[0]===p[0]&&d[1]===p[1])return void this.clear();const w=g.buffers.active.ydisp,v=d[1]-w,u=p[1]-w,o=Math.max(v,0),s=Math.min(u,g.rows-1);o>=g.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=v,this.viewportEndRow=u,this.viewportCappedStartRow=o,this.viewportCappedEndRow=s,this.startCol=d[0],this.endCol=p[0])}isCellSelected(g,d,p){return!!this.hasSelection&&(p-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&p>=this.viewportCappedStartRow&&d<this.endCol&&p<=this.viewportCappedEndRow:d<this.startCol&&p>=this.viewportCappedStartRow&&d>=this.endCol&&p<=this.viewportCappedEndRow:p>this.viewportStartRow&&p<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&p===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&p===this.viewportStartRow&&d>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.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(m,a,c){var f=this&&this.__decorate||function(s,l,_,C){var x,k=arguments.length,y=k<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,l,_,C);else for(var b=s.length-1;b>=0;b--)(x=s[b])&&(y=(k<3?x(y):k>3?x(l,_,y):x(l,_))||y);return k>3&&y&&Object.defineProperty(l,_,y),y},g=this&&this.__param||function(s,l){return function(_,C){l(_,C,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const d=c(2585),p=c(8460),S=c(844);let w=a.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(s,l,_){super(),this._optionsService=_,this.width=0,this.height=0,this._onCharSizeChange=this.register(new p.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new o(this._optionsService))}catch{this._measureStrategy=this.register(new u(s,l,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())}};a.CharSizeService=w=f([g(2,d.IOptionsService)],w);class v extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,_){l!==void 0&&l>0&&_!==void 0&&_>0&&(this._result.width=l,this._result.height=_)}}class u extends v{constructor(l,_,C){super(),this._document=l,this._parentElement=_,this._optionsService=C,this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W".repeat(32),this._measureElement.setAttribute("aria-hidden","true"),this._measureElement.style.whiteSpace="pre",this._measureElement.style.fontKerning="none",this._parentElement.appendChild(this._measureElement)}measure(){return this._measureElement.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._measureElement.style.fontSize=`${this._optionsService.rawOptions.fontSize}px`,this._validateAndSet(Number(this._measureElement.offsetWidth)/32,Number(this._measureElement.offsetHeight)),this._result}}class o extends v{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const _=this._ctx.measureText("W");if(!("width"in _&&"fontBoundingBoxAscent"in _&&"fontBoundingBoxDescent"in _))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(m,a,c){var f=this&&this.__decorate||function(o,s,l,_){var C,x=arguments.length,k=x<3?s:_===null?_=Object.getOwnPropertyDescriptor(s,l):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,s,l,_);else for(var y=o.length-1;y>=0;y--)(C=o[y])&&(k=(x<3?C(k):x>3?C(s,l,k):C(s,l))||k);return x>3&&k&&Object.defineProperty(s,l,k),k},g=this&&this.__param||function(o,s){return function(l,_){s(l,_,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const d=c(3734),p=c(643),S=c(511),w=c(2585);class v extends d.AttributeData{constructor(s,l,_){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=l,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()]}}a.JoinedCellData=v;let u=a.CharacterJoinerService=class Rh{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(s){const l={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(l),l.id}deregister(s){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===s)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(s){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(s);if(!l||l.length===0)return[];const _=[],C=l.translateToString(!0);let x=0,k=0,y=0,b=l.getFg(0),R=l.getBg(0);for(let M=0;M<l.getTrimmedLength();M++)if(l.loadCell(M,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==b||this._workCell.bg!==R){if(M-x>1){const B=this._getJoinedRanges(C,y,k,l,x);for(let T=0;T<B.length;T++)_.push(B[T])}x=M,y=k,b=this._workCell.fg,R=this._workCell.bg}k+=this._workCell.getChars().length||p.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-x>1){const M=this._getJoinedRanges(C,y,k,l,x);for(let B=0;B<M.length;B++)_.push(M[B])}return _}_getJoinedRanges(s,l,_,C,x){const k=s.substring(l,_);let y=[];try{y=this._characterJoiners[0].handler(k)}catch(b){console.error(b)}for(let b=1;b<this._characterJoiners.length;b++)try{const R=this._characterJoiners[b].handler(k);for(let M=0;M<R.length;M++)Rh._mergeRanges(y,R[M])}catch(R){console.error(R)}return this._stringRangesToCellRanges(y,C,x),y}_stringRangesToCellRanges(s,l,_){let C=0,x=!1,k=0,y=s[C];if(y){for(let b=_;b<this._bufferService.cols;b++){const R=l.getWidth(b),M=l.getString(b).length||p.WHITESPACE_CELL_CHAR.length;if(R!==0){if(!x&&y[0]<=k&&(y[0]=b,x=!0),y[1]<=k){if(y[1]=b,y=s[++C],!y)break;y[0]<=k?(y[0]=b,x=!0):x=!1}k+=M}}y&&(y[1]=this._bufferService.cols)}}static _mergeRanges(s,l){let _=!1;for(let C=0;C<s.length;C++){const x=s[C];if(_){if(l[1]<=x[0])return s[C-1][1]=l[1],s;if(l[1]<=x[1])return s[C-1][1]=Math.max(l[1],x[1]),s.splice(C,1),s;s.splice(C,1),C--}else{if(l[1]<=x[0])return s.splice(C,0,l),s;if(l[1]<=x[1])return x[0]=Math.min(l[0],x[0]),s;l[0]<x[1]&&(x[0]=Math.min(l[0],x[0]),_=!0)}}return _?s[s.length-1][1]=l[1]:s.push(l),s}};a.CharacterJoinerService=u=f([g(0,w.IBufferService)],u)},5114:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const f=c(844),g=c(8460),d=c(3656);class p extends f.Disposable{constructor(v,u,o){super(),this._textarea=v,this._window=u,this.mainDocument=o,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new g.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new g.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this.register((0,g.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}}a.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 g.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,d.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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const f=c(844);class g 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)}}}}a.LinkProviderService=g},8934:function(m,a,c){var f=this&&this.__decorate||function(w,v,u,o){var s,l=arguments.length,_=l<3?v:o===null?o=Object.getOwnPropertyDescriptor(v,u):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(w,v,u,o);else for(var C=w.length-1;C>=0;C--)(s=w[C])&&(_=(l<3?s(_):l>3?s(v,u,_):s(v,u))||_);return l>3&&_&&Object.defineProperty(v,u,_),_},g=this&&this.__param||function(w,v){return function(u,o){v(u,o,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const d=c(4725),p=c(9806);let S=a.MouseService=class{constructor(w,v){this._renderService=w,this._charSizeService=v}getCoords(w,v,u,o,s){return(0,p.getCoords)(window,w,v,u,o,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,s)}getMouseReportCoords(w,v){const u=(0,p.getCoordsRelativeToElement)(window,w,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])}}};a.MouseService=S=f([g(0,d.IRenderService),g(1,d.ICharSizeService)],S)},3230:function(m,a,c){var f=this&&this.__decorate||function(s,l,_,C){var x,k=arguments.length,y=k<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,l,_,C);else for(var b=s.length-1;b>=0;b--)(x=s[b])&&(y=(k<3?x(y):k>3?x(l,_,y):x(l,_))||y);return k>3&&y&&Object.defineProperty(l,_,y),y},g=this&&this.__param||function(s,l){return function(_,C){l(_,C,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const d=c(6193),p=c(4725),S=c(8460),w=c(844),v=c(7226),u=c(2585);let o=a.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(s,l,_,C,x,k,y,b){super(),this._rowCount=s,this._charSizeService=C,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new w.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 d.RenderDebouncer((R,M)=>this._renderRows(R,M),y),this.register(this._renderDebouncer),this.register(y.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(x.onDecorationRegistered(()=>this._fullRefresh())),this.register(x.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(b.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(y.window,l),this.register(y.onWindowChange(R=>this._registerIntersectionObserver(R,l)))}_registerIntersectionObserver(s,l){if("IntersectionObserver"in s){const _=new s.IntersectionObserver(C=>this._handleIntersectionChange(C[C.length-1]),{threshold:0});_.observe(l),this._observerDisposable.value=(0,w.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,l,_=!1){this._isPaused?this._needsFullRefresh=!0:(_||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(s,l,this._rowCount))}_renderRows(s,l){this._renderer.value&&(s=Math.min(s,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(s,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:s,end:l}),this._onRender.fire({start:s,end:l}),this._isNextRenderRedrawOnly=!0)}resize(s,l){this._rowCount=l,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(s){this._renderer.value=s,this._renderer.value&&(this._renderer.value.onRequestRedraw(l=>this.refreshRows(l.start,l.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,l;this._renderer.value&&((l=(s=this._renderer.value).clearTextureAtlas)==null||l.call(s),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(s,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var _;return(_=this._renderer.value)==null?void 0:_.handleResize(s,l)}):this._renderer.value.handleResize(s,l),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,l,_){var C;this._selectionState.start=s,this._selectionState.end=l,this._selectionState.columnSelectMode=_,(C=this._renderer.value)==null||C.handleSelectionChanged(s,l,_)}handleCursorMove(){var s;(s=this._renderer.value)==null||s.handleCursorMove()}clear(){var s;(s=this._renderer.value)==null||s.clear()}};a.RenderService=o=f([g(2,u.IOptionsService),g(3,p.ICharSizeService),g(4,u.IDecorationService),g(5,u.IBufferService),g(6,p.ICoreBrowserService),g(7,p.IThemeService)],o)},9312:function(m,a,c){var f=this&&this.__decorate||function(y,b,R,M){var B,T=arguments.length,N=T<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,R):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(y,b,R,M);else for(var F=y.length-1;F>=0;F--)(B=y[F])&&(N=(T<3?B(N):T>3?B(b,R,N):B(b,R))||N);return T>3&&N&&Object.defineProperty(b,R,N),N},g=this&&this.__param||function(y,b){return function(R,M){b(R,M,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const d=c(9806),p=c(9504),S=c(456),w=c(4725),v=c(8460),u=c(844),o=c(6114),s=c(4841),l=c(511),_=c(2585),C=" ",x=new RegExp(C,"g");let k=a.SelectionService=class extends u.Disposable{constructor(y,b,R,M,B,T,N,F,K){super(),this._element=y,this._screenElement=b,this._linkifier=R,this._bufferService=M,this._coreService=B,this._mouseService=T,this._optionsService=N,this._renderService=F,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new 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 y=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;return!(!y||!b||y[0]===b[0]&&y[1]===b[1])}get selectionText(){const y=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;if(!y||!b)return"";const R=this._bufferService.buffer,M=[];if(this._activeSelectionMode===3){if(y[0]===b[0])return"";const B=y[0]<b[0]?y[0]:b[0],T=y[0]<b[0]?b[0]:y[0];for(let N=y[1];N<=b[1];N++){const F=R.translateBufferLineToString(N,!0,B,T);M.push(F)}}else{const B=y[1]===b[1]?b[0]:void 0;M.push(R.translateBufferLineToString(y[1],!0,y[0],B));for(let T=y[1]+1;T<=b[1]-1;T++){const N=R.lines.get(T),F=R.translateBufferLineToString(T,!0);N!=null&&N.isWrapped?M[M.length-1]+=F:M.push(F)}if(y[1]!==b[1]){const T=R.lines.get(b[1]),N=R.translateBufferLineToString(b[1],!0,0,b[0]);T&&T.isWrapped?M[M.length-1]+=N:M.push(N)}}return M.map(B=>B.replace(x," ")).join(o.isWindows?`\r
|
|
60
|
+
WARNING: This link could potentially be dangerous`)){const o=window.open();if(o){try{o.opener=null}catch{}o.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}}a.OscLinkProvider=S=f([g(0,_.IBufferService),g(1,_.IOptionsService),g(2,_.IOscLinkService)],S)},6193:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.RenderDebouncer=void 0,a.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,g){this._rowCount=g,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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Terminal=void 0;const f=c(3614),g=c(3656),d=c(3551),_=c(9042),S=c(3730),w=c(1680),v=c(3107),u=c(5744),o=c(2950),s=c(1296),l=c(428),p=c(4269),C=c(5114),x=c(8934),k=c(3230),y=c(9312),b=c(4725),R=c(6731),M=c(8055),B=c(8969),T=c(8460),N=c(844),F=c(6114),K=c(8437),q=c(2584),j=c(7399),E=c(5941),D=c(9074),P=c(2585),O=c(5435),W=c(4567),V=c(779);class J extends B.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(I={}){super(I),this.browser=F,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(b.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,U)=>this.refresh(L,U))),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,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(L=>this._afterResize(L.cols,L.rows))),this.register((0,N.toDisposable)(()=>{var L,U;this._customKeyEventHandler=void 0,(U=(L=this.element)==null?void 0:L.parentNode)==null||U.removeChild(this.element)}))}_handleColorEvent(I){if(this._themeService)for(const L of I){let U,H="";switch(L.index){case 256:U="foreground",H="10";break;case 257:U="background",H="11";break;case 258:U="cursor",H="12";break;default:U="ansi",H="4;"+L.index}switch(L.type){case 0:const X=M.color.toColorRGB(U==="ansi"?this._themeService.colors.ansi[L.index]:this._themeService.colors[U]);this.coreService.triggerDataEvent(`${q.C0.ESC}]${H};${(0,E.toRgbString)(X)}${q.C1_ESCAPED.ST}`);break;case 1:if(U==="ansi")this._themeService.modifyColors(G=>G.ansi[L.index]=M.channels.toColor(...L.color));else{const G=U;this._themeService.modifyColors(se=>se[G]=M.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(I){I?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(W.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(I){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(q.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var I;return(I=this.textarea)==null?void 0:I.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 I=this.buffer.ybase+this.buffer.y,L=this.buffer.lines.get(I);if(!L)return;const U=Math.min(this.buffer.x,this.cols-1),H=this._renderService.dimensions.css.cell.height,X=L.getWidth(U),G=this._renderService.dimensions.css.cell.width*X,se=this.buffer.y*this._renderService.dimensions.css.cell.height,z=U*this._renderService.dimensions.css.cell.width;this.textarea.style.left=z+"px",this.textarea.style.top=se+"px",this.textarea.style.width=G+"px",this.textarea.style.height=H+"px",this.textarea.style.lineHeight=H+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,g.addDisposableDomListener)(this.element,"copy",L=>{this.hasSelection()&&(0,f.copyHandler)(L,this._selectionService)}));const I=L=>(0,f.handlePasteEvent)(L,this.textarea,this.coreService,this.optionsService);this.register((0,g.addDisposableDomListener)(this.textarea,"paste",I)),this.register((0,g.addDisposableDomListener)(this.element,"paste",I)),F.isFirefox?this.register((0,g.addDisposableDomListener)(this.element,"mousedown",L=>{L.button===2&&(0,f.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})):this.register((0,g.addDisposableDomListener)(this.element,"contextmenu",L=>{(0,f.rightClickHandler)(L,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)})),F.isLinux&&this.register((0,g.addDisposableDomListener)(this.element,"auxclick",L=>{L.button===1&&(0,f.moveTextAreaUnderMouseCursor)(L,this.textarea,this.screenElement)}))}_bindKeys(){this.register((0,g.addDisposableDomListener)(this.textarea,"keyup",I=>this._keyUp(I),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keydown",I=>this._keyDown(I),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"keypress",I=>this._keyPress(I),!0)),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionstart",()=>this._compositionHelper.compositionstart())),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionupdate",I=>this._compositionHelper.compositionupdate(I))),this.register((0,g.addDisposableDomListener)(this.textarea,"compositionend",()=>this._compositionHelper.compositionend())),this.register((0,g.addDisposableDomListener)(this.textarea,"input",I=>this._inputEvent(I),!0)),this.register(this.onRender(()=>this._compositionHelper.updateCompositionElements()))}open(I){var U;if(!I)throw new Error("Terminal requires a parent element.");if(I.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((U=this.element)==null?void 0:U.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=I.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"),I.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,g.addDisposableDomListener)(this.screenElement,"mousemove",H=>this.updateCursorStyle(H))),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",_.promptLabel),F.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,I.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(b.ICoreBrowserService,this._coreBrowserService),this.register((0,g.addDisposableDomListener)(this.textarea,"focus",H=>this._handleTextAreaFocus(H))),this.register((0,g.addDisposableDomListener)(this.textarea,"blur",()=>this._handleTextAreaBlur())),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(l.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(b.ICharSizeService,this._charSizeService),this._themeService=this._instantiationService.createInstance(R.ThemeService),this._instantiationService.setService(b.IThemeService,this._themeService),this._characterJoinerService=this._instantiationService.createInstance(p.CharacterJoinerService),this._instantiationService.setService(b.ICharacterJoinerService,this._characterJoinerService),this._renderService=this.register(this._instantiationService.createInstance(k.RenderService,this.rows,this.screenElement)),this._instantiationService.setService(b.IRenderService,this._renderService),this.register(this._renderService.onRenderedViewportChange(H=>this._onRender.fire(H))),this.onResize(H=>this._renderService.resize(H.cols,H.rows)),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(o.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(x.MouseService),this._instantiationService.setService(b.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(d.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(w.Viewport,this._viewportElement,this._viewportScrollArea),this.viewport.onRequestScrollLines(H=>this.scrollLines(H.amount,H.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(y.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(b.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(H=>this.scrollLines(H.amount,H.suppressScrollEvent))),this.register(this._selectionService.onSelectionChange(()=>this._onSelectionChange.fire())),this.register(this._selectionService.onRequestRedraw(H=>this._renderService.handleSelectionChanged(H.start,H.end,H.columnSelectMode))),this.register(this._selectionService.onLinuxMouseSelection(H=>{this.textarea.value=H,this.textarea.focus(),this.textarea.select()})),this.register(this._onScroll.event(H=>{this.viewport.syncScrollArea(),this._selectionService.refresh()})),this.register((0,g.addDisposableDomListener)(this._viewportElement,"scroll",()=>this._selectionService.refresh())),this.register(this._instantiationService.createInstance(v.BufferDecorationRenderer,this.screenElement)),this.register((0,g.addDisposableDomListener)(this.element,"mousedown",H=>this._selectionService.handleMouseDown(H))),this.coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager.value=this._instantiationService.createInstance(W.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",H=>this._handleScreenReaderModeOptionChange(H))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(u.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",H=>{!this._overviewRulerRenderer&&H&&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 I=this,L=this.element;function U(G){const se=I._mouseService.getMouseReportCoords(G,I.screenElement);if(!se)return!1;let z,re;switch(G.overrideType||G.type){case"mousemove":re=32,G.buttons===void 0?(z=3,G.button!==void 0&&(z=G.button<3?G.button:3)):z=1&G.buttons?0:4&G.buttons?1:2&G.buttons?2:3;break;case"mouseup":re=0,z=G.button<3?G.button:3;break;case"mousedown":re=1,z=G.button<3?G.button:3;break;case"wheel":if(I._customWheelEventHandler&&I._customWheelEventHandler(G)===!1||I.viewport.getLinesScrolled(G)===0)return!1;re=G.deltaY<0?0:1,z=4;break;default:return!1}return!(re===void 0||z===void 0||z>4)&&I.coreMouseService.triggerMouseEvent({col:se.col,row:se.row,x:se.x,y:se.y,button:z,action:re,ctrl:G.ctrlKey,alt:G.altKey,shift:G.shiftKey})}const H={mouseup:null,wheel:null,mousedrag:null,mousemove:null},X={mouseup:G=>(U(G),G.buttons||(this._document.removeEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.removeEventListener("mousemove",H.mousedrag)),this.cancel(G)),wheel:G=>(U(G),this.cancel(G,!0)),mousedrag:G=>{G.buttons&&U(G)},mousemove:G=>{G.buttons||U(G)}};this.register(this.coreMouseService.onProtocolChange(G=>{G?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(G)),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&G?H.mousemove||(L.addEventListener("mousemove",X.mousemove),H.mousemove=X.mousemove):(L.removeEventListener("mousemove",H.mousemove),H.mousemove=null),16&G?H.wheel||(L.addEventListener("wheel",X.wheel,{passive:!1}),H.wheel=X.wheel):(L.removeEventListener("wheel",H.wheel),H.wheel=null),2&G?H.mouseup||(H.mouseup=X.mouseup):(this._document.removeEventListener("mouseup",H.mouseup),H.mouseup=null),4&G?H.mousedrag||(H.mousedrag=X.mousedrag):(this._document.removeEventListener("mousemove",H.mousedrag),H.mousedrag=null)})),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,g.addDisposableDomListener)(L,"mousedown",G=>{if(G.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(G))return U(G),H.mouseup&&this._document.addEventListener("mouseup",H.mouseup),H.mousedrag&&this._document.addEventListener("mousemove",H.mousedrag),this.cancel(G)})),this.register((0,g.addDisposableDomListener)(L,"wheel",G=>{if(!H.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(G)===!1)return!1;if(!this.buffer.hasScrollback){const se=this.viewport.getLinesScrolled(G);if(se===0)return;const z=q.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(G.deltaY<0?"A":"B");let re="";for(let ne=0;ne<Math.abs(se);ne++)re+=z;return this.coreService.triggerDataEvent(re,!0),this.cancel(G,!0)}return this.viewport.handleWheel(G)?this.cancel(G):void 0}},{passive:!1})),this.register((0,g.addDisposableDomListener)(L,"touchstart",G=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(G),this.cancel(G)},{passive:!0})),this.register((0,g.addDisposableDomListener)(L,"touchmove",G=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(G)?void 0:this.cancel(G)},{passive:!1}))}refresh(I,L){var U;(U=this._renderService)==null||U.refreshRows(I,L)}updateCursorStyle(I){var L;(L=this._selectionService)!=null&&L.shouldColumnSelect(I)?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(I,L,U=0){var H;U===1?(super.scrollLines(I,L,U),this.refresh(0,this.rows-1)):(H=this.viewport)==null||H.scrollLines(I)}paste(I){(0,f.paste)(I,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(I){this._customKeyEventHandler=I}attachCustomWheelEventHandler(I){this._customWheelEventHandler=I}registerLinkProvider(I){return this._linkProviderService.registerLinkProvider(I)}registerCharacterJoiner(I){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const L=this._characterJoinerService.register(I);return this.refresh(0,this.rows-1),L}deregisterCharacterJoiner(I){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(I)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(I){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+I)}registerDecoration(I){return this._decorationService.registerDecoration(I)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(I,L,U){this._selectionService.setSelection(I,L,U)}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 I;(I=this._selectionService)==null||I.clearSelection()}selectAll(){var I;(I=this._selectionService)==null||I.selectAll()}selectLines(I,L){var U;(U=this._selectionService)==null||U.selectLines(I,L)}_keyDown(I){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1)return!1;const L=this.browser.isMac&&this.options.macOptionIsMeta&&I.altKey;if(!L&&!this._compositionHelper.keydown(I))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;L||I.key!=="Dead"&&I.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const U=(0,j.evaluateKeyboardEvent)(I,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(I),U.type===3||U.type===2){const H=this.rows-1;return this.scrollLines(U.type===2?-H:H),this.cancel(I,!0)}return U.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,I)||(U.cancel&&this.cancel(I,!0),!U.key||!!(I.key&&!I.ctrlKey&&!I.altKey&&!I.metaKey&&I.key.length===1&&I.key.charCodeAt(0)>=65&&I.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(U.key!==q.C0.ETX&&U.key!==q.C0.CR||(this.textarea.value=""),this._onKey.fire({key:U.key,domEvent:I}),this._showCursor(),this.coreService.triggerDataEvent(U.key,!0),!this.optionsService.rawOptions.screenReaderMode||I.altKey||I.ctrlKey?this.cancel(I,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(I,L){const U=I.isMac&&!this.options.macOptionIsMeta&&L.altKey&&!L.ctrlKey&&!L.metaKey||I.isWindows&&L.altKey&&L.ctrlKey&&!L.metaKey||I.isWindows&&L.getModifierState("AltGraph");return L.type==="keypress"?U:U&&(!L.keyCode||L.keyCode>47)}_keyUp(I){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1||(function(L){return L.keyCode===16||L.keyCode===17||L.keyCode===18}(I)||this.focus(),this.updateCursorStyle(I),this._keyPressHandled=!1)}_keyPress(I){let L;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(I)===!1)return!1;if(this.cancel(I),I.charCode)L=I.charCode;else if(I.which===null||I.which===void 0)L=I.keyCode;else{if(I.which===0||I.charCode===0)return!1;L=I.which}return!(!L||(I.altKey||I.ctrlKey||I.metaKey)&&!this._isThirdLevelShift(this.browser,I)||(L=String.fromCharCode(L),this._onKey.fire({key:L,domEvent:I}),this._showCursor(),this.coreService.triggerDataEvent(L,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(I){if(I.data&&I.inputType==="insertText"&&(!I.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const L=I.data;return this.coreService.triggerDataEvent(L,!0),this.cancel(I),!0}return!1}resize(I,L){I!==this.cols||L!==this.rows?super.resize(I,L):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(I,L){var U,H;(U=this._charSizeService)==null||U.measure(),(H=this.viewport)==null||H.syncScrollArea(!0)}clear(){var I;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(K.DEFAULT_ATTR_DATA));this._onScroll.fire({position:this.buffer.ydisp,source:0}),(I=this.viewport)==null||I.reset(),this.refresh(0,this.rows-1)}}reset(){var L,U;this.options.rows=this.rows,this.options.cols=this.cols;const I=this._customKeyEventHandler;this._setup(),super.reset(),(L=this._selectionService)==null||L.reset(),this._decorationService.reset(),(U=this.viewport)==null||U.reset(),this._customKeyEventHandler=I,this.refresh(0,this.rows-1)}clearTextureAtlas(){var I;(I=this._renderService)==null||I.clearTextureAtlas()}_reportFocus(){var I;(I=this.element)!=null&&I.classList.contains("focus")?this.coreService.triggerDataEvent(q.C0.ESC+"[I"):this.coreService.triggerDataEvent(q.C0.ESC+"[O")}_reportWindowsOptions(I){if(this._renderService)switch(I){case O.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:const L=this._renderService.dimensions.css.canvas.width.toFixed(0),U=this._renderService.dimensions.css.canvas.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[4;${U};${L}t`);break;case O.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:const H=this._renderService.dimensions.css.cell.width.toFixed(0),X=this._renderService.dimensions.css.cell.height.toFixed(0);this.coreService.triggerDataEvent(`${q.C0.ESC}[6;${X};${H}t`)}}cancel(I,L){if(this.options.cancelEvents||L)return I.preventDefault(),I.stopPropagation(),!1}}a.Terminal=J},9924:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TimeBasedDebouncer=void 0,a.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,g){this._rowCount=g,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 d=Date.now();if(d-this._lastRefreshMs>=this._debounceThresholdMS)this._lastRefreshMs=d,this._innerRefresh();else if(!this._additionalRefreshRequested){const _=d-this._lastRefreshMs,S=this._debounceThresholdMS-_;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(m,a,c){var f=this&&this.__decorate||function(o,s,l,p){var C,x=arguments.length,k=x<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,l):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,s,l,p);else for(var y=o.length-1;y>=0;y--)(C=o[y])&&(k=(x<3?C(k):x>3?C(s,l,k):C(s,l))||k);return x>3&&k&&Object.defineProperty(s,l,k),k},g=this&&this.__param||function(o,s){return function(l,p){s(l,p,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.Viewport=void 0;const d=c(3656),_=c(4725),S=c(8460),w=c(844),v=c(2585);let u=a.Viewport=class extends w.Disposable{constructor(o,s,l,p,C,x,k,y){super(),this._viewportElement=o,this._scrollArea=s,this._bufferService=l,this._optionsService=p,this._charSizeService=C,this._renderService=x,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,d.addDisposableDomListener)(this._viewportElement,"scroll",this._handleScroll.bind(this))),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(b=>this._activeBuffer=b.activeBuffer)),this._renderDimensions=this._renderService.dimensions,this.register(this._renderService.onDimensionsChange(b=>this._renderDimensions=b)),this._handleThemeChange(y.colors),this.register(y.onChangeColors(b=>this._handleThemeChange(b))),this.register(this._optionsService.onSpecificOptionChange("scrollback",()=>this.syncScrollArea())),setTimeout(()=>this.syncScrollArea())}_handleThemeChange(o){this._viewportElement.style.backgroundColor=o.background.css}reset(){this._currentRowHeight=0,this._currentDeviceCellHeight=0,this._lastRecordedBufferLength=0,this._lastRecordedViewportHeight=0,this._lastRecordedBufferHeight=0,this._lastTouchY=0,this._lastScrollTop=0,this._coreBrowserService.window.requestAnimationFrame(()=>this.syncScrollArea())}_refresh(o){if(o)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&this._coreBrowserService.window.cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._innerRefresh()))}_innerRefresh(){if(this._charSizeService.height>0){this._currentRowHeight=this._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 o=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==o&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=o),this._refreshAnimationFrame=null}syncScrollArea(o=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(o);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(o)}_handleScroll(o){if(this._lastScrollTop=this._viewportElement.scrollTop,!this._viewportElement.offsetParent)return;if(this._ignoreNextScrollEvent)return this._ignoreNextScrollEvent=!1,void this._onRequestScrollLines.fire({amount:0,suppressScrollEvent:!0});const 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 o=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(o*(this._smoothScrollState.target-this._smoothScrollState.origin)),o<1?this._coreBrowserService.window.requestAnimationFrame(()=>this._smoothScroll()):this._clearSmoothScrollState()}_smoothScrollPercent(){return this._optionsService.rawOptions.smoothScrollDuration&&this._smoothScrollState.startTime?Math.max(Math.min((Date.now()-this._smoothScrollState.startTime)/this._optionsService.rawOptions.smoothScrollDuration,1),0):1}_clearSmoothScrollState(){this._smoothScrollState.startTime=0,this._smoothScrollState.origin=-1,this._smoothScrollState.target=-1}_bubbleScroll(o,s){const l=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(s<0&&this._viewportElement.scrollTop!==0||s>0&&l<this._lastRecordedBufferHeight)||(o.cancelable&&o.preventDefault(),!1)}handleWheel(o){const s=this._getPixelsScrolled(o);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(o,s))}scrollLines(o){if(o!==0)if(this._optionsService.rawOptions.smoothScrollDuration){const s=o*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:o,suppressScrollEvent:!1})}_getPixelsScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let s=this._applyScrollModifier(o.deltaY,o);return o.deltaMode===WheelEvent.DOM_DELTA_LINE?s*=this._currentRowHeight:o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._currentRowHeight*this._bufferService.rows),s}getBufferElements(o,s){var y;let l,p="";const C=[],x=s??this._bufferService.buffer.lines.length,k=this._bufferService.buffer.lines;for(let b=o;b<x;b++){const R=k.get(b);if(!R)continue;const M=(y=k.get(b+1))==null?void 0:y.isWrapped;if(p+=R.translateToString(!M),!M||b===k.length-1){const B=document.createElement("div");B.textContent=p,C.push(B),p.length>0&&(l=B),p=""}}return{bufferElements:C,cursorElement:l}}getLinesScrolled(o){if(o.deltaY===0||o.shiftKey)return 0;let s=this._applyScrollModifier(o.deltaY,o);return o.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):o.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(s*=this._bufferService.rows),s}_applyScrollModifier(o,s){const l=this._optionsService.rawOptions.fastScrollModifier;return l==="alt"&&s.altKey||l==="ctrl"&&s.ctrlKey||l==="shift"&&s.shiftKey?o*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:o*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(o){this._lastTouchY=o.touches[0].pageY}handleTouchMove(o){const s=this._lastTouchY-o.touches[0].pageY;return this._lastTouchY=o.touches[0].pageY,s!==0&&(this._viewportElement.scrollTop+=s,this._bubbleScroll(o,s))}};a.Viewport=u=f([g(2,v.IBufferService),g(3,v.IOptionsService),g(4,_.ICharSizeService),g(5,_.IRenderService),g(6,_.ICoreBrowserService),g(7,_.IThemeService)],u)},3107:function(m,a,c){var f=this&&this.__decorate||function(v,u,o,s){var l,p=arguments.length,C=p<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,o,s);else for(var x=v.length-1;x>=0;x--)(l=v[x])&&(C=(p<3?l(C):p>3?l(u,o,C):l(u,o))||C);return p>3&&C&&Object.defineProperty(u,o,C),C},g=this&&this.__param||function(v,u){return function(o,s){u(o,s,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferDecorationRenderer=void 0;const d=c(4725),_=c(844),S=c(2585);let w=a.BufferDecorationRenderer=class extends _.Disposable{constructor(v,u,o,s,l){super(),this._screenElement=v,this._bufferService=u,this._coreBrowserService=o,this._decorationService=s,this._renderService=l,this._decorationElements=new Map,this._altBufferIsActive=!1,this._dimensionsChanged=!1,this._container=document.createElement("div"),this._container.classList.add("xterm-decoration-container"),this._screenElement.appendChild(this._container),this.register(this._renderService.onRenderedViewportChange(()=>this._doRefreshDecorations())),this.register(this._renderService.onDimensionsChange(()=>{this._dimensionsChanged=!0,this._queueRefresh()})),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._altBufferIsActive=this._bufferService.buffer===this._bufferService.buffers.alt})),this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh())),this.register(this._decorationService.onDecorationRemoved(p=>this._removeDecoration(p))),this.register((0,_.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 o=v.options.x??0;return o&&o>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 o=this._decorationElements.get(v);o||(o=this._createElement(v),v.element=o,this._decorationElements.set(v,o),this._container.appendChild(o),v.onDispose(()=>{this._decorationElements.delete(v),o.remove()})),o.style.top=u*this._renderService.dimensions.css.cell.height+"px",o.style.display=this._altBufferIsActive?"none":"block",v.onRenderEmitter.fire(o)}}_refreshXPosition(v,u=v.element){if(!u)return;const o=v.options.x??0;(v.options.anchor||"left")==="right"?u.style.right=o?o*this._renderService.dimensions.css.cell.width+"px":"":u.style.left=o?o*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()}};a.BufferDecorationRenderer=w=f([g(1,S.IBufferService),g(2,d.ICoreBrowserService),g(3,S.IDecorationService),g(4,d.IRenderService)],w)},5871:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ColorZoneStore=void 0,a.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,g){return f>=c.startBufferLine-this._linePadding[g||"full"]&&f<=c.endBufferLine+this._linePadding[g||"full"]}_addLineToZone(c,f){c.startBufferLine=Math.min(c.startBufferLine,f),c.endBufferLine=Math.max(c.endBufferLine,f)}}},5744:function(m,a,c){var f=this&&this.__decorate||function(l,p,C,x){var k,y=arguments.length,b=y<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,C):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,p,C,x);else for(var R=l.length-1;R>=0;R--)(k=l[R])&&(b=(y<3?k(b):y>3?k(p,C,b):k(p,C))||b);return y>3&&b&&Object.defineProperty(p,C,b),b},g=this&&this.__param||function(l,p){return function(C,x){p(C,x,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OverviewRulerRenderer=void 0;const d=c(5871),_=c(4725),S=c(844),w=c(2585),v={full:0,left:0,center:0,right:0},u={full:0,left:0,center:0,right:0},o={full:0,left:0,center:0,right:0};let s=a.OverviewRulerRenderer=class extends S.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(l,p,C,x,k,y,b){var M;super(),this._viewportElement=l,this._screenElement=p,this._bufferService=C,this._decorationService=x,this._renderService=k,this._optionsService=y,this._coreBrowserService=b,this._colorZoneStore=new d.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(),(M=this._viewportElement.parentElement)==null||M.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 B;(B=this._canvas)==null||B.remove()}))}_registerDecorationListeners(){this.register(this._decorationService.onDecorationRegistered(()=>this._queueRefresh(void 0,!0))),this.register(this._decorationService.onDecorationRemoved(()=>this._queueRefresh(void 0,!0)))}_registerBufferChangeListeners(){this.register(this._renderService.onRenderedViewportChange(()=>this._queueRefresh())),this.register(this._bufferService.buffers.onBufferActivate(()=>{this._canvas.style.display=this._bufferService.buffer===this._bufferService.buffers.alt?"none":"block"})),this.register(this._bufferService.onScroll(()=>{this._lastKnownBufferLength!==this._bufferService.buffers.normal.lines.length&&(this._refreshDrawHeightConstants(),this._refreshColorZonePadding())}))}_registerDimensionChangeListeners(){this.register(this._renderService.onRender(()=>{this._containerHeight&&this._containerHeight===this._screenElement.clientHeight||(this._queueRefresh(!0),this._containerHeight=this._screenElement.clientHeight)})),this.register(this._optionsService.onSpecificOptionChange("overviewRulerWidth",()=>this._queueRefresh(!0))),this.register(this._coreBrowserService.onDprChange(()=>this._queueRefresh(!0))),this._queueRefresh(!0)}_refreshDrawConstants(){const l=Math.floor(this._canvas.width/3),p=Math.ceil(this._canvas.width/3);u.full=this._canvas.width,u.left=l,u.center=p,u.right=l,this._refreshDrawHeightConstants(),o.full=0,o.left=0,o.center=u.left,o.right=u.left+u.center}_refreshDrawHeightConstants(){v.full=Math.round(2*this._coreBrowserService.dpr);const l=this._canvas.height/this._bufferService.buffer.lines.length,p=Math.round(Math.max(Math.min(l,12),6)*this._coreBrowserService.dpr);v.left=p,v.center=p,v.right=p}_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 p of this._decorationService.decorations)this._colorZoneStore.addDecoration(p);this._ctx.lineWidth=1;const l=this._colorZoneStore.zones;for(const p of l)p.position!=="full"&&this._renderColorZone(p);for(const p of l)p.position==="full"&&this._renderColorZone(p);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(l){this._ctx.fillStyle=l.color,this._ctx.fillRect(o[l.position||"full"],Math.round((this._canvas.height-1)*(l.startBufferLine/this._bufferService.buffers.active.lines.length)-v[l.position||"full"]/2),u[l.position||"full"],Math.round((this._canvas.height-1)*((l.endBufferLine-l.startBufferLine)/this._bufferService.buffers.active.lines.length)+v[l.position||"full"]))}_queueRefresh(l,p){this._shouldUpdateDimensions=l||this._shouldUpdateDimensions,this._shouldUpdateAnchor=p||this._shouldUpdateAnchor,this._animationFrame===void 0&&(this._animationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>{this._refreshDecorations(),this._animationFrame=void 0}))}};a.OverviewRulerRenderer=s=f([g(2,w.IBufferService),g(3,w.IDecorationService),g(4,_.IRenderService),g(5,w.IOptionsService),g(6,_.ICoreBrowserService)],s)},2950:function(m,a,c){var f=this&&this.__decorate||function(v,u,o,s){var l,p=arguments.length,C=p<3?u:s===null?s=Object.getOwnPropertyDescriptor(u,o):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(v,u,o,s);else for(var x=v.length-1;x>=0;x--)(l=v[x])&&(C=(p<3?l(C):p>3?l(u,o,C):l(u,o))||C);return p>3&&C&&Object.defineProperty(u,o,C),C},g=this&&this.__param||function(v,u){return function(o,s){u(o,s,v)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CompositionHelper=void 0;const d=c(4725),_=c(2585),S=c(2584);let w=a.CompositionHelper=class{get isComposing(){return this._isComposing}constructor(v,u,o,s,l,p){this._textarea=v,this._compositionView=u,this._bufferService=o,this._optionsService=s,this._coreService=l,this._renderService=p,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 o;this._isSendingComposition=!1,u.start+=this._dataAlreadySent.length,o=this._isComposing?this._textarea.value.substring(u.start,u.end):this._textarea.value.substring(u.start),o.length>0&&this._coreService.triggerDataEvent(o,!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,o=u.replace(v,"");this._dataAlreadySent=o,u.length>v.length?this._coreService.triggerDataEvent(o,!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),o=this._renderService.dimensions.css.cell.height,s=this._bufferService.buffer.y*this._renderService.dimensions.css.cell.height,l=u*this._renderService.dimensions.css.cell.width;this._compositionView.style.left=l+"px",this._compositionView.style.top=s+"px",this._compositionView.style.height=o+"px",this._compositionView.style.lineHeight=o+"px",this._compositionView.style.fontFamily=this._optionsService.rawOptions.fontFamily,this._compositionView.style.fontSize=this._optionsService.rawOptions.fontSize+"px";const p=this._compositionView.getBoundingClientRect();this._textarea.style.left=l+"px",this._textarea.style.top=s+"px",this._textarea.style.width=Math.max(p.width,1)+"px",this._textarea.style.height=Math.max(p.height,1)+"px",this._textarea.style.lineHeight=p.height+"px"}v||setTimeout(()=>this.updateCompositionElements(!0),0)}}};a.CompositionHelper=w=f([g(2,_.IBufferService),g(3,_.IOptionsService),g(4,_.ICoreService),g(5,d.IRenderService)],w)},9806:(m,a)=>{function c(f,g,d){const _=d.getBoundingClientRect(),S=f.getComputedStyle(d),w=parseInt(S.getPropertyValue("padding-left")),v=parseInt(S.getPropertyValue("padding-top"));return[g.clientX-_.left-w,g.clientY-_.top-v]}Object.defineProperty(a,"__esModule",{value:!0}),a.getCoords=a.getCoordsRelativeToElement=void 0,a.getCoordsRelativeToElement=c,a.getCoords=function(f,g,d,_,S,w,v,u,o){if(!w)return;const s=c(f,g,d);return s?(s[0]=Math.ceil((s[0]+(o?v/2:0))/v),s[1]=Math.ceil(s[1]/u),s[0]=Math.min(Math.max(s[0],1),_+(o?1:0)),s[1]=Math.min(Math.max(s[1],1),S),s):void 0}},9504:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.moveToCellSequence=void 0;const f=c(2584);function g(u,o,s,l){const p=u-d(u,s),C=o-d(o,s),x=Math.abs(p-C)-function(k,y,b){let R=0;const M=k-d(k,b),B=y-d(y,b);for(let T=0;T<Math.abs(M-B);T++){const N=_(k,y)==="A"?-1:1,F=b.buffer.lines.get(M+N*T);F!=null&&F.isWrapped&&R++}return R}(u,o,s);return v(x,w(_(u,o),l))}function d(u,o){let s=0,l=o.buffer.lines.get(u),p=l==null?void 0:l.isWrapped;for(;p&&u>=0&&u<o.rows;)s++,l=o.buffer.lines.get(--u),p=l==null?void 0:l.isWrapped;return s}function _(u,o){return u>o?"A":"B"}function S(u,o,s,l,p,C){let x=u,k=o,y="";for(;x!==s||k!==l;)x+=p?1:-1,p&&x>C.cols-1?(y+=C.buffer.translateBufferLineToString(k,!1,u,x),x=0,u=0,k++):!p&&x<0&&(y+=C.buffer.translateBufferLineToString(k,!1,0,u+1),x=C.cols-1,u=x,k--);return y+C.buffer.translateBufferLineToString(k,!1,u,x)}function w(u,o){const s=o?"O":"[";return f.C0.ESC+s+u}function v(u,o){u=Math.floor(u);let s="";for(let l=0;l<u;l++)s+=o;return s}a.moveToCellSequence=function(u,o,s,l){const p=s.buffer.x,C=s.buffer.y;if(!s.buffer.hasScrollback)return function(y,b,R,M,B,T){return g(b,M,B,T).length===0?"":v(S(y,b,y,b-d(b,B),!1,B).length,w("D",T))}(p,C,0,o,s,l)+g(C,o,s,l)+function(y,b,R,M,B,T){let N;N=g(b,M,B,T).length>0?M-d(M,B):b;const F=M,K=function(q,j,E,D,P,O){let W;return W=g(E,D,P,O).length>0?D-d(D,P):j,q<E&&W<=D||q>=E&&W<D?"C":"D"}(y,b,R,M,B,T);return v(S(y,N,R,F,K==="C",B).length,w(K,T))}(p,C,u,o,s,l);let x;if(C===o)return x=p>u?"D":"C",v(Math.abs(p-u),w(x,l));x=C>o?"D":"C";const k=Math.abs(C-o);return v(function(y,b){return b.cols-y}(C>o?u:p,s)+(k-1)*s.cols+1+((C>o?p:u)-1),w(x,l))}},1296:function(m,a,c){var f=this&&this.__decorate||function(T,N,F,K){var q,j=arguments.length,E=j<3?N:K===null?K=Object.getOwnPropertyDescriptor(N,F):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(T,N,F,K);else for(var D=T.length-1;D>=0;D--)(q=T[D])&&(E=(j<3?q(E):j>3?q(N,F,E):q(N,F))||E);return j>3&&E&&Object.defineProperty(N,F,E),E},g=this&&this.__param||function(T,N){return function(F,K){N(F,K,T)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRenderer=void 0;const d=c(3787),_=c(2550),S=c(2223),w=c(6171),v=c(6052),u=c(4725),o=c(8055),s=c(8460),l=c(844),p=c(2585),C="xterm-dom-renderer-owner-",x="xterm-rows",k="xterm-fg-",y="xterm-bg-",b="xterm-focus",R="xterm-selection";let M=1,B=a.DomRenderer=class extends l.Disposable{constructor(T,N,F,K,q,j,E,D,P,O,W,V,J){super(),this._terminal=T,this._document=N,this._element=F,this._screenElement=K,this._viewportElement=q,this._helperContainer=j,this._linkifier2=E,this._charSizeService=P,this._optionsService=O,this._bufferService=W,this._coreBrowserService=V,this._themeService=J,this._terminalClass=M++,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(x),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,w.createRenderDimensions)(),this._updateDimensions(),this.register(this._optionsService.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._themeService.onChangeColors(Z=>this._injectCss(Z))),this._injectCss(this._themeService.colors),this._rowFactory=D.createInstance(d.DomRendererRowFactory,document),this._element.classList.add(C+this._terminalClass),this._screenElement.appendChild(this._rowContainer),this._screenElement.appendChild(this._selectionContainer),this.register(this._linkifier2.onShowLinkUnderline(Z=>this._handleLinkHover(Z))),this.register(this._linkifier2.onHideLinkUnderline(Z=>this._handleLinkLeave(Z))),this.register((0,l.toDisposable)(()=>{this._element.classList.remove(C+this._terminalClass),this._rowContainer.remove(),this._selectionContainer.remove(),this._widthCache.dispose(),this._themeStyleElement.remove(),this._dimensionsStyleElement.remove()})),this._widthCache=new _.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 F of this._rowElements)F.style.width=`${this.dimensions.css.canvas.width}px`,F.style.height=`${this.dimensions.css.cell.height}px`,F.style.lineHeight=`${this.dimensions.css.cell.height}px`,F.style.overflow="hidden";this._dimensionsStyleElement||(this._dimensionsStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));const N=`${this._terminalSelector} .${x} 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} .${x} { 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} .${x} .xterm-dim { color: ${o.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 F=`blink_underline_${this._terminalClass}`,K=`blink_bar_${this._terminalClass}`,q=`blink_block_${this._terminalClass}`;N+=`@keyframes ${F} { 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} .${x}.${b} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${F} 1s step-end infinite;}${this._terminalSelector} .${x}.${b} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${x}.${b} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${q} 1s step-end infinite;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block { background-color: ${T.cursor.css}; color: ${T.cursorAccent.css};}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${T.cursor.css} !important; color: ${T.cursorAccent.css} !important;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${T.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${x} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${T.cursor.css} inset;}${this._terminalSelector} .${x} .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[j,E]of T.ansi.entries())N+=`${this._terminalSelector} .${k}${j} { color: ${E.css}; }${this._terminalSelector} .${k}${j}.xterm-dim { color: ${o.color.multiplyOpacity(E,.5).css}; }${this._terminalSelector} .${y}${j} { background-color: ${E.css}; }`;N+=`${this._terminalSelector} .${k}${S.INVERTED_DEFAULT_COLOR} { color: ${o.color.opaque(T.background).css}; }${this._terminalSelector} .${k}${S.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${o.color.multiplyOpacity(o.color.opaque(T.background),.5).css}; }${this._terminalSelector} .${y}${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 F=this._rowElements.length;F<=N;F++){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(b),this.renderRows(0,this._bufferService.rows-1)}handleFocus(){this._rowContainer.classList.add(b),this.renderRows(this._bufferService.buffer.y,this._bufferService.buffer.y)}handleSelectionChanged(T,N,F){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(T,N,F),this.renderRows(0,this._bufferService.rows-1),!T||!N)return;this._selectionRenderModel.update(this._terminal,T,N,F);const K=this._selectionRenderModel.viewportStartRow,q=this._selectionRenderModel.viewportEndRow,j=this._selectionRenderModel.viewportCappedStartRow,E=this._selectionRenderModel.viewportCappedEndRow;if(j>=this._bufferService.rows||E<0)return;const D=this._document.createDocumentFragment();if(F){const P=T[0]>N[0];D.appendChild(this._createSelectionElement(j,P?N[0]:T[0],P?T[0]:N[0],E-j+1))}else{const P=K===j?T[0]:0,O=j===q?N[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(j,P,O));const W=E-j-1;if(D.appendChild(this._createSelectionElement(j+1,0,this._bufferService.cols,W)),j!==E){const V=q===E?N[0]:this._bufferService.cols;D.appendChild(this._createSelectionElement(E,0,V))}}this._selectionContainer.appendChild(D)}_createSelectionElement(T,N,F,K=1){const q=this._document.createElement("div"),j=N*this.dimensions.css.cell.width;let E=this.dimensions.css.cell.width*(F-N);return j+E>this.dimensions.css.canvas.width&&(E=this.dimensions.css.canvas.width-j),q.style.height=K*this.dimensions.css.cell.height+"px",q.style.top=T*this.dimensions.css.cell.height+"px",q.style.left=`${j}px`,q.style.width=`${E}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 F=this._bufferService.buffer,K=F.ybase+F.y,q=Math.min(F.x,this._bufferService.cols-1),j=this._optionsService.rawOptions.cursorBlink,E=this._optionsService.rawOptions.cursorStyle,D=this._optionsService.rawOptions.cursorInactiveStyle;for(let P=T;P<=N;P++){const O=P+F.ydisp,W=this._rowElements[P],V=F.lines.get(O);if(!W||!V)break;W.replaceChildren(...this._rowFactory.createRow(V,O,O===K,E,D,q,j,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,F,K,q,j){F<0&&(T=0),K<0&&(N=0);const E=this._bufferService.rows-1;F=Math.max(Math.min(F,E),0),K=Math.max(Math.min(K,E),0),q=Math.min(q,this._bufferService.cols);const D=this._bufferService.buffer,P=D.ybase+D.y,O=Math.min(D.x,q-1),W=this._optionsService.rawOptions.cursorBlink,V=this._optionsService.rawOptions.cursorStyle,J=this._optionsService.rawOptions.cursorInactiveStyle;for(let Z=F;Z<=K;++Z){const I=Z+D.ydisp,L=this._rowElements[Z],U=D.lines.get(I);if(!L||!U)break;L.replaceChildren(...this._rowFactory.createRow(U,I,I===P,V,J,O,W,this.dimensions.css.cell.width,this._widthCache,j?Z===F?T:0:-1,j?(Z===K?N:q)-1:-1))}}};a.DomRenderer=B=f([g(7,p.IInstantiationService),g(8,u.ICharSizeService),g(9,p.IOptionsService),g(10,p.IBufferService),g(11,u.ICoreBrowserService),g(12,u.IThemeService)],B)},3787:function(m,a,c){var f=this&&this.__decorate||function(x,k,y,b){var R,M=arguments.length,B=M<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,y):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(x,k,y,b);else for(var T=x.length-1;T>=0;T--)(R=x[T])&&(B=(M<3?R(B):M>3?R(k,y,B):R(k,y))||B);return M>3&&B&&Object.defineProperty(k,y,B),B},g=this&&this.__param||function(x,k){return function(y,b){k(y,b,x)}};Object.defineProperty(a,"__esModule",{value:!0}),a.DomRendererRowFactory=void 0;const d=c(2223),_=c(643),S=c(511),w=c(2585),v=c(8055),u=c(4725),o=c(4269),s=c(6171),l=c(3734);let p=a.DomRendererRowFactory=class{constructor(x,k,y,b,R,M,B){this._document=x,this._characterJoinerService=k,this._optionsService=y,this._coreBrowserService=b,this._coreService=R,this._decorationService=M,this._themeService=B,this._workCell=new S.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(x,k,y){this._selectionStart=x,this._selectionEnd=k,this._columnSelectMode=y}createRow(x,k,y,b,R,M,B,T,N,F,K){const q=[],j=this._characterJoinerService.getJoinedCharacters(k),E=this._themeService.colors;let D,P=x.getNoBgTrimmedLength();y&&P<M+1&&(P=M+1);let O=0,W="",V=0,J=0,Z=0,I=!1,L=0,U=!1,H=0;const X=[],G=F!==-1&&K!==-1;for(let se=0;se<P;se++){x.loadCell(se,this._workCell);let z=this._workCell.getWidth();if(z===0)continue;let re=!1,ne=se,ee=this._workCell;if(j.length>0&&se===j[0][0]){re=!0;const _e=j.shift();ee=new o.JoinedCellData(this._workCell,x.translateToString(!0,_e[0],_e[1]),_e[1]-_e[0]),ne=_e[1]-1,z=ee.getWidth()}const Fe=this._isCellInSelection(se,k),Ur=y&&se===M,dn=G&&se>=F&&se<=K;let fn=!1;this._decorationService.forEachDecorationAtCell(se,k,void 0,_e=>{fn=!0});let Wi=ee.getChars()||_.WHITESPACE_CELL_CHAR;if(Wi===" "&&(ee.isUnderline()||ee.isOverline())&&(Wi=" "),H=z*T-N.get(Wi,ee.isBold(),ee.isItalic()),D){if(O&&(Fe&&U||!Fe&&!U&&ee.bg===V)&&(Fe&&U&&E.selectionForeground||ee.fg===J)&&ee.extended.ext===Z&&dn===I&&H===L&&!Ur&&!re&&!fn){ee.isInvisible()?W+=_.WHITESPACE_CELL_CHAR:W+=Wi,O++;continue}O&&(D.textContent=W),D=this._document.createElement("span"),O=0,W=""}else D=this._document.createElement("span");if(V=ee.bg,J=ee.fg,Z=ee.extended.ext,I=dn,L=H,U=Fe,re&&M>=se&&M<=ne&&(M=se),!this._coreService.isCursorHidden&&Ur&&this._coreService.isCursorInitialized){if(X.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&X.push("xterm-cursor-blink"),X.push(b==="bar"?"xterm-cursor-bar":b==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(R)switch(R){case"outline":X.push("xterm-cursor-outline");break;case"block":X.push("xterm-cursor-block");break;case"bar":X.push("xterm-cursor-bar");break;case"underline":X.push("xterm-cursor-underline")}}if(ee.isBold()&&X.push("xterm-bold"),ee.isItalic()&&X.push("xterm-italic"),ee.isDim()&&X.push("xterm-dim"),W=ee.isInvisible()?_.WHITESPACE_CELL_CHAR:ee.getChars()||_.WHITESPACE_CELL_CHAR,ee.isUnderline()&&(X.push(`xterm-underline-${ee.extended.underlineStyle}`),W===" "&&(W=" "),!ee.isUnderlineColorDefault()))if(ee.isUnderlineColorRGB())D.style.textDecorationColor=`rgb(${l.AttributeData.toColorRGB(ee.getUnderlineColor()).join(",")})`;else{let _e=ee.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&ee.isBold()&&_e<8&&(_e+=8),D.style.textDecorationColor=E.ansi[_e].css}ee.isOverline()&&(X.push("xterm-overline"),W===" "&&(W=" ")),ee.isStrikethrough()&&X.push("xterm-strikethrough"),dn&&(D.style.textDecoration="underline");let Je=ee.getFgColor(),$r=ee.getFgColorMode(),ft=ee.getBgColor(),Kr=ee.getBgColorMode();const pn=!!ee.isInverse();if(pn){const _e=Je;Je=ft,ft=_e;const Hh=$r;$r=Kr,Kr=Hh}let Rt,Ui,Tt,Vr=!1;switch(this._decorationService.forEachDecorationAtCell(se,k,void 0,_e=>{_e.options.layer!=="top"&&Vr||(_e.backgroundColorRGB&&(Kr=50331648,ft=_e.backgroundColorRGB.rgba>>8&16777215,Rt=_e.backgroundColorRGB),_e.foregroundColorRGB&&($r=50331648,Je=_e.foregroundColorRGB.rgba>>8&16777215,Ui=_e.foregroundColorRGB),Vr=_e.options.layer==="top")}),!Vr&&Fe&&(Rt=this._coreBrowserService.isFocused?E.selectionBackgroundOpaque:E.selectionInactiveBackgroundOpaque,ft=Rt.rgba>>8&16777215,Kr=50331648,Vr=!0,E.selectionForeground&&($r=50331648,Je=E.selectionForeground.rgba>>8&16777215,Ui=E.selectionForeground)),Vr&&X.push("xterm-decoration-top"),Kr){case 16777216:case 33554432:Tt=E.ansi[ft],X.push(`xterm-bg-${ft}`);break;case 50331648:Tt=v.channels.toColor(ft>>16,ft>>8&255,255&ft),this._addStyle(D,`background-color:#${C((ft>>>0).toString(16),"0",6)}`);break;default:pn?(Tt=E.foreground,X.push(`xterm-bg-${d.INVERTED_DEFAULT_COLOR}`)):Tt=E.background}switch(Rt||ee.isDim()&&(Rt=v.color.multiplyOpacity(Tt,.5)),$r){case 16777216:case 33554432:ee.isBold()&&Je<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Je+=8),this._applyMinimumContrast(D,Tt,E.ansi[Je],ee,Rt,void 0)||X.push(`xterm-fg-${Je}`);break;case 50331648:const _e=v.channels.toColor(Je>>16&255,Je>>8&255,255&Je);this._applyMinimumContrast(D,Tt,_e,ee,Rt,Ui)||this._addStyle(D,`color:#${C(Je.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(D,Tt,E.foreground,ee,Rt,Ui)||pn&&X.push(`xterm-fg-${d.INVERTED_DEFAULT_COLOR}`)}X.length&&(D.className=X.join(" "),X.length=0),Ur||re||fn?D.textContent=W:O++,H!==this.defaultSpacing&&(D.style.letterSpacing=`${H}px`),q.push(D),se=ne}return D&&O&&(D.textContent=W),q}_applyMinimumContrast(x,k,y,b,R,M){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,s.treatGlyphAsBackgroundColor)(b.getCode()))return!1;const B=this._getContrastCache(b);let T;if(R||M||(T=B.getColor(k.rgba,y.rgba)),T===void 0){const N=this._optionsService.rawOptions.minimumContrastRatio/(b.isDim()?2:1);T=v.color.ensureContrastRatio(R||k,M||y,N),B.setColor((R||k).rgba,(M||y).rgba,T??null)}return!!T&&(this._addStyle(x,`color:${T.css}`),!0)}_getContrastCache(x){return x.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(x,k){x.setAttribute("style",`${x.getAttribute("style")||""}${k};`)}_isCellInSelection(x,k){const y=this._selectionStart,b=this._selectionEnd;return!(!y||!b)&&(this._columnSelectMode?y[0]<=b[0]?x>=y[0]&&k>=y[1]&&x<b[0]&&k<=b[1]:x<y[0]&&k>=y[1]&&x>=b[0]&&k<=b[1]:k>y[1]&&k<b[1]||y[1]===b[1]&&k===y[1]&&x>=y[0]&&x<b[0]||y[1]<b[1]&&k===b[1]&&x<b[0]||y[1]<b[1]&&k===y[1]&&x>=y[0])}};function C(x,k,y){for(;x.length<y;)x=k+x;return x}a.DomRendererRowFactory=p=f([g(1,u.ICharacterJoinerService),g(2,w.IOptionsService),g(3,u.ICoreBrowserService),g(4,w.ICoreService),g(5,w.IDecorationService),g(6,u.IThemeService)],p)},2550:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WidthCache=void 0,a.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 g=c.createElement("span");g.classList.add("xterm-char-measure-element");const d=c.createElement("span");d.classList.add("xterm-char-measure-element"),d.style.fontWeight="bold";const _=c.createElement("span");_.classList.add("xterm-char-measure-element"),_.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=[g,d,_,S],this._container.appendChild(g),this._container.appendChild(d),this._container.appendChild(_),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,g,d){c===this._font&&f===this._fontSize&&g===this._weight&&d===this._weightBold||(this._font=c,this._fontSize=f,this._weight=g,this._weightBold=d,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${g}`,this._measureElements[1].style.fontWeight=`${d}`,this._measureElements[2].style.fontWeight=`${g}`,this._measureElements[3].style.fontWeight=`${d}`,this.clear())}get(c,f,g){let d=0;if(!f&&!g&&c.length===1&&(d=c.charCodeAt(0))<256){if(this._flat[d]!==-9999)return this._flat[d];const w=this._measure(c,0);return w>0&&(this._flat[d]=w),w}let _=c;f&&(_+="B"),g&&(_+="I");let S=this._holey.get(_);if(S===void 0){let w=0;f&&(w|=1),g&&(w|=2),S=this._measure(c,w),S>0&&this._holey.set(_,S)}return S}_measure(c,f){const g=this._measureElements[f];return g.textContent=c.repeat(32),g.offsetWidth/32}}},2223:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.TEXT_BASELINE=a.DIM_OPACITY=a.INVERTED_DEFAULT_COLOR=void 0;const f=c(6114);a.INVERTED_DEFAULT_COLOR=257,a.DIM_OPACITY=.5,a.TEXT_BASELINE=f.isFirefox||f.isLegacyEdge?"bottom":"ideographic"},6171:(m,a)=>{function c(g){return 57508<=g&&g<=57558}function f(g){return g>=128512&&g<=128591||g>=127744&&g<=128511||g>=128640&&g<=128767||g>=9728&&g<=9983||g>=9984&&g<=10175||g>=65024&&g<=65039||g>=129280&&g<=129535||g>=127462&&g<=127487}Object.defineProperty(a,"__esModule",{value:!0}),a.computeNextVariantOffset=a.createRenderDimensions=a.treatGlyphAsBackgroundColor=a.allowRescaling=a.isEmoji=a.isRestrictedPowerlineGlyph=a.isPowerlineGlyph=a.throwIfFalsy=void 0,a.throwIfFalsy=function(g){if(!g)throw new Error("value must not be falsy");return g},a.isPowerlineGlyph=c,a.isRestrictedPowerlineGlyph=function(g){return 57520<=g&&g<=57527},a.isEmoji=f,a.allowRescaling=function(g,d,_,S){return d===1&&_>Math.ceil(1.5*S)&&g!==void 0&&g>255&&!f(g)&&!c(g)&&!function(w){return 57344<=w&&w<=63743}(g)},a.treatGlyphAsBackgroundColor=function(g){return c(g)||function(d){return 9472<=d&&d<=9631}(g)},a.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}}}},a.computeNextVariantOffset=function(g,d,_=0){return(g-(2*Math.round(d)-_))%(2*Math.round(d))}},6052:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.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(g,d,_,S=!1){if(this.selectionStart=d,this.selectionEnd=_,!d||!_||d[0]===_[0]&&d[1]===_[1])return void this.clear();const w=g.buffers.active.ydisp,v=d[1]-w,u=_[1]-w,o=Math.max(v,0),s=Math.min(u,g.rows-1);o>=g.rows||s<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=S,this.viewportStartRow=v,this.viewportEndRow=u,this.viewportCappedStartRow=o,this.viewportCappedEndRow=s,this.startCol=d[0],this.endCol=_[0])}isCellSelected(g,d,_){return!!this.hasSelection&&(_-=g.buffer.active.viewportY,this.columnSelectMode?this.startCol<=this.endCol?d>=this.startCol&&_>=this.viewportCappedStartRow&&d<this.endCol&&_<=this.viewportCappedEndRow:d<this.startCol&&_>=this.viewportCappedStartRow&&d>=this.endCol&&_<=this.viewportCappedEndRow:_>this.viewportStartRow&&_<this.viewportEndRow||this.viewportStartRow===this.viewportEndRow&&_===this.viewportStartRow&&d>=this.startCol&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportEndRow&&d<this.endCol||this.viewportStartRow<this.viewportEndRow&&_===this.viewportStartRow&&d>=this.startCol)}}a.createSelectionRenderModel=function(){return new c}},456:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionModel=void 0,a.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(m,a,c){var f=this&&this.__decorate||function(s,l,p,C){var x,k=arguments.length,y=k<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,l,p,C);else for(var b=s.length-1;b>=0;b--)(x=s[b])&&(y=(k<3?x(y):k>3?x(l,p,y):x(l,p))||y);return k>3&&y&&Object.defineProperty(l,p,y),y},g=this&&this.__param||function(s,l){return function(p,C){l(p,C,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharSizeService=void 0;const d=c(2585),_=c(8460),S=c(844);let w=a.CharSizeService=class extends S.Disposable{get hasValidSize(){return this.width>0&&this.height>0}constructor(s,l,p){super(),this._optionsService=p,this.width=0,this.height=0,this._onCharSizeChange=this.register(new _.EventEmitter),this.onCharSizeChange=this._onCharSizeChange.event;try{this._measureStrategy=this.register(new o(this._optionsService))}catch{this._measureStrategy=this.register(new u(s,l,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())}};a.CharSizeService=w=f([g(2,d.IOptionsService)],w);class v extends S.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(l,p){l!==void 0&&l>0&&p!==void 0&&p>0&&(this._result.width=l,this._result.height=p)}}class u extends v{constructor(l,p,C){super(),this._document=l,this._parentElement=p,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 o extends v{constructor(l){super(),this._optionsService=l,this._canvas=new OffscreenCanvas(100,100),this._ctx=this._canvas.getContext("2d");const p=this._ctx.measureText("W");if(!("width"in p&&"fontBoundingBoxAscent"in p&&"fontBoundingBoxDescent"in p))throw new Error("Required font metrics not supported")}measure(){this._ctx.font=`${this._optionsService.rawOptions.fontSize}px ${this._optionsService.rawOptions.fontFamily}`;const l=this._ctx.measureText("W");return this._validateAndSet(l.width,l.fontBoundingBoxAscent+l.fontBoundingBoxDescent),this._result}}},4269:function(m,a,c){var f=this&&this.__decorate||function(o,s,l,p){var C,x=arguments.length,k=x<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,l):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(o,s,l,p);else for(var y=o.length-1;y>=0;y--)(C=o[y])&&(k=(x<3?C(k):x>3?C(s,l,k):C(s,l))||k);return x>3&&k&&Object.defineProperty(s,l,k),k},g=this&&this.__param||function(o,s){return function(l,p){s(l,p,o)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CharacterJoinerService=a.JoinedCellData=void 0;const d=c(3734),_=c(643),S=c(511),w=c(2585);class v extends d.AttributeData{constructor(s,l,p){super(),this.content=0,this.combinedData="",this.fg=s.fg,this.bg=s.bg,this.combinedData=l,this._width=p}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()]}}a.JoinedCellData=v;let u=a.CharacterJoinerService=class Th{constructor(s){this._bufferService=s,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new S.CellData}register(s){const l={id:this._nextCharacterJoinerId++,handler:s};return this._characterJoiners.push(l),l.id}deregister(s){for(let l=0;l<this._characterJoiners.length;l++)if(this._characterJoiners[l].id===s)return this._characterJoiners.splice(l,1),!0;return!1}getJoinedCharacters(s){if(this._characterJoiners.length===0)return[];const l=this._bufferService.buffer.lines.get(s);if(!l||l.length===0)return[];const p=[],C=l.translateToString(!0);let x=0,k=0,y=0,b=l.getFg(0),R=l.getBg(0);for(let M=0;M<l.getTrimmedLength();M++)if(l.loadCell(M,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==b||this._workCell.bg!==R){if(M-x>1){const B=this._getJoinedRanges(C,y,k,l,x);for(let T=0;T<B.length;T++)p.push(B[T])}x=M,y=k,b=this._workCell.fg,R=this._workCell.bg}k+=this._workCell.getChars().length||_.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-x>1){const M=this._getJoinedRanges(C,y,k,l,x);for(let B=0;B<M.length;B++)p.push(M[B])}return p}_getJoinedRanges(s,l,p,C,x){const k=s.substring(l,p);let y=[];try{y=this._characterJoiners[0].handler(k)}catch(b){console.error(b)}for(let b=1;b<this._characterJoiners.length;b++)try{const R=this._characterJoiners[b].handler(k);for(let M=0;M<R.length;M++)Th._mergeRanges(y,R[M])}catch(R){console.error(R)}return this._stringRangesToCellRanges(y,C,x),y}_stringRangesToCellRanges(s,l,p){let C=0,x=!1,k=0,y=s[C];if(y){for(let b=p;b<this._bufferService.cols;b++){const R=l.getWidth(b),M=l.getString(b).length||_.WHITESPACE_CELL_CHAR.length;if(R!==0){if(!x&&y[0]<=k&&(y[0]=b,x=!0),y[1]<=k){if(y[1]=b,y=s[++C],!y)break;y[0]<=k?(y[0]=b,x=!0):x=!1}k+=M}}y&&(y[1]=this._bufferService.cols)}}static _mergeRanges(s,l){let p=!1;for(let C=0;C<s.length;C++){const x=s[C];if(p){if(l[1]<=x[0])return s[C-1][1]=l[1],s;if(l[1]<=x[1])return s[C-1][1]=Math.max(l[1],x[1]),s.splice(C,1),s;s.splice(C,1),C--}else{if(l[1]<=x[0])return s.splice(C,0,l),s;if(l[1]<=x[1])return x[0]=Math.min(l[0],x[0]),s;l[0]<x[1]&&(x[0]=Math.min(l[0],x[0]),p=!0)}}return p?s[s.length-1][1]=l[1]:s.push(l),s}};a.CharacterJoinerService=u=f([g(0,w.IBufferService)],u)},5114:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreBrowserService=void 0;const f=c(844),g=c(8460),d=c(3656);class _ extends f.Disposable{constructor(v,u,o){super(),this._textarea=v,this._window=u,this.mainDocument=o,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new S(this._window),this._onDprChange=this.register(new g.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new g.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange(s=>this._screenDprMonitor.setWindow(s))),this.register((0,g.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}}a.CoreBrowserService=_;class S extends f.Disposable{constructor(v){super(),this._parentWindow=v,this._windowResizeListener=this.register(new f.MutableDisposable),this._onDprChange=this.register(new g.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,d.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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.LinkProviderService=void 0;const f=c(844);class g extends f.Disposable{constructor(){super(),this.linkProviders=[],this.register((0,f.toDisposable)(()=>this.linkProviders.length=0))}registerLinkProvider(_){return this.linkProviders.push(_),{dispose:()=>{const S=this.linkProviders.indexOf(_);S!==-1&&this.linkProviders.splice(S,1)}}}}a.LinkProviderService=g},8934:function(m,a,c){var f=this&&this.__decorate||function(w,v,u,o){var s,l=arguments.length,p=l<3?v:o===null?o=Object.getOwnPropertyDescriptor(v,u):o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(w,v,u,o);else for(var C=w.length-1;C>=0;C--)(s=w[C])&&(p=(l<3?s(p):l>3?s(v,u,p):s(v,u))||p);return l>3&&p&&Object.defineProperty(v,u,p),p},g=this&&this.__param||function(w,v){return function(u,o){v(u,o,w)}};Object.defineProperty(a,"__esModule",{value:!0}),a.MouseService=void 0;const d=c(4725),_=c(9806);let S=a.MouseService=class{constructor(w,v){this._renderService=w,this._charSizeService=v}getCoords(w,v,u,o,s){return(0,_.getCoords)(window,w,v,u,o,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,s)}getMouseReportCoords(w,v){const u=(0,_.getCoordsRelativeToElement)(window,w,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])}}};a.MouseService=S=f([g(0,d.IRenderService),g(1,d.ICharSizeService)],S)},3230:function(m,a,c){var f=this&&this.__decorate||function(s,l,p,C){var x,k=arguments.length,y=k<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,l,p,C);else for(var b=s.length-1;b>=0;b--)(x=s[b])&&(y=(k<3?x(y):k>3?x(l,p,y):x(l,p))||y);return k>3&&y&&Object.defineProperty(l,p,y),y},g=this&&this.__param||function(s,l){return function(p,C){l(p,C,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.RenderService=void 0;const d=c(6193),_=c(4725),S=c(8460),w=c(844),v=c(7226),u=c(2585);let o=a.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(s,l,p,C,x,k,y,b){super(),this._rowCount=s,this._charSizeService=C,this._renderer=this.register(new w.MutableDisposable),this._pausedResizeTask=new v.DebouncedIdleTask,this._observerDisposable=this.register(new w.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 d.RenderDebouncer((R,M)=>this._renderRows(R,M),y),this.register(this._renderDebouncer),this.register(y.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(p.onOptionChange(()=>this._handleOptionsChanged())),this.register(this._charSizeService.onCharSizeChange(()=>this.handleCharSizeChanged())),this.register(x.onDecorationRegistered(()=>this._fullRefresh())),this.register(x.onDecorationRemoved(()=>this._fullRefresh())),this.register(p.onMultipleOptionChange(["customGlyphs","drawBoldTextInBrightColors","letterSpacing","lineHeight","fontFamily","fontSize","fontWeight","fontWeightBold","minimumContrastRatio","rescaleOverlappingGlyphs"],()=>{this.clear(),this.handleResize(k.cols,k.rows),this._fullRefresh()})),this.register(p.onMultipleOptionChange(["cursorBlink","cursorStyle"],()=>this.refreshRows(k.buffer.y,k.buffer.y,!0))),this.register(b.onChangeColors(()=>this._fullRefresh())),this._registerIntersectionObserver(y.window,l),this.register(y.onWindowChange(R=>this._registerIntersectionObserver(R,l)))}_registerIntersectionObserver(s,l){if("IntersectionObserver"in s){const p=new s.IntersectionObserver(C=>this._handleIntersectionChange(C[C.length-1]),{threshold:0});p.observe(l),this._observerDisposable.value=(0,w.toDisposable)(()=>p.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,l,p=!1){this._isPaused?this._needsFullRefresh=!0:(p||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(s,l,this._rowCount))}_renderRows(s,l){this._renderer.value&&(s=Math.min(s,this._rowCount-1),l=Math.min(l,this._rowCount-1),this._renderer.value.renderRows(s,l),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:s,end:l}),this._onRender.fire({start:s,end:l}),this._isNextRenderRedrawOnly=!0)}resize(s,l){this._rowCount=l,this._fireOnCanvasResize()}_handleOptionsChanged(){this._renderer.value&&(this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize())}_fireOnCanvasResize(){this._renderer.value&&(this._renderer.value.dimensions.css.canvas.width===this._canvasWidth&&this._renderer.value.dimensions.css.canvas.height===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.value.dimensions))}hasRenderer(){return!!this._renderer.value}setRenderer(s){this._renderer.value=s,this._renderer.value&&(this._renderer.value.onRequestRedraw(l=>this.refreshRows(l.start,l.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,l;this._renderer.value&&((l=(s=this._renderer.value).clearTextureAtlas)==null||l.call(s),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(s,l){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set(()=>{var p;return(p=this._renderer.value)==null?void 0:p.handleResize(s,l)}):this._renderer.value.handleResize(s,l),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,l,p){var C;this._selectionState.start=s,this._selectionState.end=l,this._selectionState.columnSelectMode=p,(C=this._renderer.value)==null||C.handleSelectionChanged(s,l,p)}handleCursorMove(){var s;(s=this._renderer.value)==null||s.handleCursorMove()}clear(){var s;(s=this._renderer.value)==null||s.clear()}};a.RenderService=o=f([g(2,u.IOptionsService),g(3,_.ICharSizeService),g(4,u.IDecorationService),g(5,u.IBufferService),g(6,_.ICoreBrowserService),g(7,_.IThemeService)],o)},9312:function(m,a,c){var f=this&&this.__decorate||function(y,b,R,M){var B,T=arguments.length,N=T<3?b:M===null?M=Object.getOwnPropertyDescriptor(b,R):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(y,b,R,M);else for(var F=y.length-1;F>=0;F--)(B=y[F])&&(N=(T<3?B(N):T>3?B(b,R,N):B(b,R))||N);return T>3&&N&&Object.defineProperty(b,R,N),N},g=this&&this.__param||function(y,b){return function(R,M){b(R,M,y)}};Object.defineProperty(a,"__esModule",{value:!0}),a.SelectionService=void 0;const d=c(9806),_=c(9504),S=c(456),w=c(4725),v=c(8460),u=c(844),o=c(6114),s=c(4841),l=c(511),p=c(2585),C=" ",x=new RegExp(C,"g");let k=a.SelectionService=class extends u.Disposable{constructor(y,b,R,M,B,T,N,F,K){super(),this._element=y,this._screenElement=b,this._linkifier=R,this._bufferService=M,this._coreService=B,this._mouseService=T,this._optionsService=N,this._renderService=F,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new l.CellData,this._mouseDownTimeStamp=0,this._oldHasSelection=!1,this._oldSelectionStart=void 0,this._oldSelectionEnd=void 0,this._onLinuxMouseSelection=this.register(new 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 y=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;return!(!y||!b||y[0]===b[0]&&y[1]===b[1])}get selectionText(){const y=this._model.finalSelectionStart,b=this._model.finalSelectionEnd;if(!y||!b)return"";const R=this._bufferService.buffer,M=[];if(this._activeSelectionMode===3){if(y[0]===b[0])return"";const B=y[0]<b[0]?y[0]:b[0],T=y[0]<b[0]?b[0]:y[0];for(let N=y[1];N<=b[1];N++){const F=R.translateBufferLineToString(N,!0,B,T);M.push(F)}}else{const B=y[1]===b[1]?b[0]:void 0;M.push(R.translateBufferLineToString(y[1],!0,y[0],B));for(let T=y[1]+1;T<=b[1]-1;T++){const N=R.lines.get(T),F=R.translateBufferLineToString(T,!0);N!=null&&N.isWrapped?M[M.length-1]+=F:M.push(F)}if(y[1]!==b[1]){const T=R.lines.get(b[1]),N=R.translateBufferLineToString(b[1],!0,0,b[0]);T&&T.isWrapped?M[M.length-1]+=N:M.push(N)}}return M.map(B=>B.replace(x," ")).join(o.isWindows?`\r
|
|
61
61
|
`:`
|
|
62
|
-
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(y){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),o.isLinux&&y&&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(y){const b=this._getMouseBufferCoords(y),R=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!!(R&&M&&b)&&this._areCoordsInSelection(b,R,M)}isCellInSelection(y,b){const R=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!R||!M)&&this._areCoordsInSelection([y,b],R,M)}_areCoordsInSelection(y,b,R){return y[1]>b[1]&&y[1]<R[1]||b[1]===R[1]&&y[1]===b[1]&&y[0]>=b[0]&&y[0]<R[0]||b[1]<R[1]&&y[1]===R[1]&&y[0]<R[0]||b[1]<R[1]&&y[1]===b[1]&&y[0]>=b[0]}_selectWordAtCursor(y,b){var B,T;const R=(T=(B=this._linkifier.currentLink)==null?void 0:B.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 M=this._getMouseBufferCoords(y);return!!M&&(this._selectWordAt(M,b),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(y,b){this._model.clearSelection(),y=Math.max(y,0),b=Math.min(b,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,y],this._model.selectionEnd=[this._bufferService.cols,b],this.refresh(),this._onSelectionChange.fire()}_handleTrim(y){this._model.handleTrim(y)&&this.refresh()}_getMouseBufferCoords(y){const b=this._mouseService.getCoords(y,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(b)return b[0]--,b[1]--,b[1]+=this._bufferService.buffer.ydisp,b}_getMouseEventScrollAmount(y){let b=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,y,this._screenElement)[1];const R=this._renderService.dimensions.css.canvas.height;return b>=0&&b<=R?0:(b>R&&(b-=R),b=Math.min(Math.max(b,-50),50),b/=50,b/Math.abs(b)+Math.round(14*b))}shouldForceSelection(y){return o.isMac?y.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:y.shiftKey}handleMouseDown(y){if(this._mouseDownTimeStamp=y.timeStamp,(y.button!==2||!this.hasSelection)&&y.button===0){if(!this._enabled){if(!this.shouldForceSelection(y))return;y.stopPropagation()}y.preventDefault(),this._dragScrollAmount=0,this._enabled&&y.shiftKey?this._handleIncrementalClick(y):y.detail===1?this._handleSingleClick(y):y.detail===2?this._handleDoubleClick(y):y.detail===3&&this._handleTripleClick(y),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(y){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(y))}_handleSingleClick(y){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(y)?3:0,this._model.selectionStart=this._getMouseBufferCoords(y),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const b=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);b&&b.length!==this._model.selectionStart[0]&&b.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(y){this._selectWordAtCursor(y,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(y){const b=this._getMouseBufferCoords(y);b&&(this._activeSelectionMode=2,this._selectLineAt(b[1]))}shouldColumnSelect(y){return y.altKey&&!(o.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(y){if(y.stopImmediatePropagation(),!this._model.selectionStart)return;const b=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(y),!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(y),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 M=R.lines.get(this._model.selectionEnd[1]);M&&M.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}b&&b[0]===this._model.selectionEnd[0]&&b[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 y=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(y.ydisp+this._bufferService.rows,y.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=y.ydisp),this.refresh()}}_handleMouseUp(y){const b=y.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&b<500&&y.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const R=this._mouseService.getCoords(y,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(R&&R[0]!==void 0&&R[1]!==void 0){const M=(0,p.moveToCellSequence)(R[0]-1,R[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(M,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const y=this._model.finalSelectionStart,b=this._model.finalSelectionEnd,R=!(!y||!b||y[0]===b[0]&&y[1]===b[1]);R?y&&b&&(this._oldSelectionStart&&this._oldSelectionEnd&&y[0]===this._oldSelectionStart[0]&&y[1]===this._oldSelectionStart[1]&&b[0]===this._oldSelectionEnd[0]&&b[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(y,b,R)):this._oldHasSelection&&this._fireOnSelectionChange(y,b,R)}_fireOnSelectionChange(y,b,R){this._oldSelectionStart=y,this._oldSelectionEnd=b,this._oldHasSelection=R,this._onSelectionChange.fire()}_handleBufferActivate(y){this.clearSelection(),this._trimListener.dispose(),this._trimListener=y.activeBuffer.lines.onTrim(b=>this._handleTrim(b))}_convertViewportColToCharacterIndex(y,b){let R=b;for(let M=0;b>=M;M++){const B=y.loadCell(M,this._workCell).getChars().length;this._workCell.getWidth()===0?R--:B>1&&b!==M&&(R+=B-1)}return R}setSelection(y,b,R){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[y,b],this._model.selectionStartLength=R,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(y){this._isClickInSelection(y)||(this._selectWordAtCursor(y,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(y,b,R=!0,M=!0){if(y[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,T=B.lines.get(y[1]);if(!T)return;const N=B.translateBufferLineToString(y[1],!1);let F=this._convertViewportColToCharacterIndex(T,y[0]),K=F;const q=y[0]-F;let j=0,E=0,D=0,P=0;if(N.charAt(F)===" "){for(;F>0&&N.charAt(F-1)===" ";)F--;for(;K<N.length&&N.charAt(K+1)===" ";)K++}else{let V=y[0],J=y[0];T.getWidth(V)===0&&(j++,V--),T.getWidth(J)===2&&(E++,J++);const Z=T.getString(J).length;for(Z>1&&(P+=Z-1,K+=Z-1);V>0&&F>0&&!this._isCharWordSeparator(T.loadCell(V-1,this._workCell));){T.loadCell(V-1,this._workCell);const I=this._workCell.getChars().length;this._workCell.getWidth()===0?(j++,V--):I>1&&(D+=I-1,F-=I-1),F--,V--}for(;J<T.length&&K+1<N.length&&!this._isCharWordSeparator(T.loadCell(J+1,this._workCell));){T.loadCell(J+1,this._workCell);const I=this._workCell.getChars().length;this._workCell.getWidth()===2?(E++,J++):I>1&&(P+=I-1,K+=I-1),K++,J++}}K++;let O=F+q-j+D,W=Math.min(this._bufferService.cols,K-F+j+E-D-P);if(b||N.slice(F,K).trim()!==""){if(R&&O===0&&T.getCodePoint(0)!==32){const V=B.lines.get(y[1]-1);if(V&&T.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const J=this._getWordAt([this._bufferService.cols-1,y[1]-1],!1,!0,!1);if(J){const Z=this._bufferService.cols-J.start;O-=Z,W+=Z}}}if(M&&O+W===this._bufferService.cols&&T.getCodePoint(this._bufferService.cols-1)!==32){const V=B.lines.get(y[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const J=this._getWordAt([0,y[1]+1],!1,!1,!0);J&&(W+=J.length)}}return{start:O,length:W}}}_selectWordAt(y,b){const R=this._getWordAt(y,b);if(R){for(;R.start<0;)R.start+=this._bufferService.cols,y[1]--;this._model.selectionStart=[R.start,y[1]],this._model.selectionStartLength=R.length}}_selectToWordAt(y){const b=this._getWordAt(y,!0);if(b){let R=y[1];for(;b.start<0;)b.start+=this._bufferService.cols,R--;if(!this._model.areSelectionValuesReversed())for(;b.start+b.length>this._bufferService.cols;)b.length-=this._bufferService.cols,R++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?b.start:b.start+b.length,R]}}_isCharWordSeparator(y){return y.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(y.getChars())>=0}_selectLineAt(y){const b=this._bufferService.buffer.getWrappedRangeForLine(y),R={start:{x:0,y:b.first},end:{x:this._bufferService.cols-1,y:b.last}};this._model.selectionStart=[0,b.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,s.getRangeLength)(R,this._bufferService.cols)}};a.SelectionService=k=f([g(3,_.IBufferService),g(4,_.ICoreService),g(5,w.IMouseService),g(6,_.IOptionsService),g(7,w.IRenderService),g(8,w.ICoreBrowserService)],k)},4725:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const f=c(8343);a.ICharSizeService=(0,f.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),a.IMouseService=(0,f.createDecorator)("MouseService"),a.IRenderService=(0,f.createDecorator)("RenderService"),a.ISelectionService=(0,f.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,f.createDecorator)("ThemeService"),a.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(m,a,c){var f=this&&this.__decorate||function(k,y,b,R){var M,B=arguments.length,T=B<3?y:R===null?R=Object.getOwnPropertyDescriptor(y,b):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(k,y,b,R);else for(var N=k.length-1;N>=0;N--)(M=k[N])&&(T=(B<3?M(T):B>3?M(y,b,T):M(y,b))||T);return B>3&&T&&Object.defineProperty(y,b,T),T},g=this&&this.__param||function(k,y){return function(b,R){y(b,R,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const d=c(7239),p=c(8055),S=c(8460),w=c(844),v=c(2585),u=p.css.toColor("#ffffff"),o=p.css.toColor("#000000"),s=p.css.toColor("#ffffff"),l=p.css.toColor("#000000"),_={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.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")],y=[0,95,135,175,215,255];for(let b=0;b<216;b++){const R=y[b/36%6|0],M=y[b/6%6|0],B=y[b%6];k.push({css:p.channels.toCss(R,M,B),rgba:p.channels.toRgba(R,M,B)})}for(let b=0;b<24;b++){const R=8+10*b;k.push({css:p.channels.toCss(R,R,R),rgba:p.channels.toRgba(R,R,R)})}return k})());let C=a.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:u,background:o,cursor:s,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:_,selectionBackgroundOpaque:p.color.blend(o,_),selectionInactiveBackgroundTransparent:_,selectionInactiveBackgroundOpaque:p.color.blend(o,_),ansi:a.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 y=this._colors;if(y.foreground=x(k.foreground,u),y.background=x(k.background,o),y.cursor=x(k.cursor,s),y.cursorAccent=x(k.cursorAccent,l),y.selectionBackgroundTransparent=x(k.selectionBackground,_),y.selectionBackgroundOpaque=p.color.blend(y.background,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundTransparent=x(k.selectionInactiveBackground,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundOpaque=p.color.blend(y.background,y.selectionInactiveBackgroundTransparent),y.selectionForeground=k.selectionForeground?x(k.selectionForeground,p.NULL_COLOR):void 0,y.selectionForeground===p.NULL_COLOR&&(y.selectionForeground=void 0),p.color.isOpaque(y.selectionBackgroundTransparent)&&(y.selectionBackgroundTransparent=p.color.opacity(y.selectionBackgroundTransparent,.3)),p.color.isOpaque(y.selectionInactiveBackgroundTransparent)&&(y.selectionInactiveBackgroundTransparent=p.color.opacity(y.selectionInactiveBackgroundTransparent,.3)),y.ansi=a.DEFAULT_ANSI_COLORS.slice(),y.ansi[0]=x(k.black,a.DEFAULT_ANSI_COLORS[0]),y.ansi[1]=x(k.red,a.DEFAULT_ANSI_COLORS[1]),y.ansi[2]=x(k.green,a.DEFAULT_ANSI_COLORS[2]),y.ansi[3]=x(k.yellow,a.DEFAULT_ANSI_COLORS[3]),y.ansi[4]=x(k.blue,a.DEFAULT_ANSI_COLORS[4]),y.ansi[5]=x(k.magenta,a.DEFAULT_ANSI_COLORS[5]),y.ansi[6]=x(k.cyan,a.DEFAULT_ANSI_COLORS[6]),y.ansi[7]=x(k.white,a.DEFAULT_ANSI_COLORS[7]),y.ansi[8]=x(k.brightBlack,a.DEFAULT_ANSI_COLORS[8]),y.ansi[9]=x(k.brightRed,a.DEFAULT_ANSI_COLORS[9]),y.ansi[10]=x(k.brightGreen,a.DEFAULT_ANSI_COLORS[10]),y.ansi[11]=x(k.brightYellow,a.DEFAULT_ANSI_COLORS[11]),y.ansi[12]=x(k.brightBlue,a.DEFAULT_ANSI_COLORS[12]),y.ansi[13]=x(k.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),y.ansi[14]=x(k.brightCyan,a.DEFAULT_ANSI_COLORS[14]),y.ansi[15]=x(k.brightWhite,a.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const b=Math.min(y.ansi.length-16,k.extendedAnsi.length);for(let R=0;R<b;R++)y.ansi[R+16]=x(k.extendedAnsi[R],a.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 y=0;y<this._restoreColors.ansi.length;++y)this._colors.ansi[y]=this._restoreColors.ansi[y]}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 x(k,y){if(k!==void 0)try{return p.css.toColor(k)}catch{}return y}a.ThemeService=C=f([g(0,v.IOptionsService)],C)},6349:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const f=c(8460),g=c(844);class d extends g.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 w=new Array(S);for(let v=0;v<Math.min(S,this.length);v++)w[v]=this._array[this._getCyclicIndex(v)];this._array=w,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let w=this._length;w<S;w++)this._array[w]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,w){this._array[this._getCyclicIndex(S)]=w}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,w,...v){if(w){for(let u=S;u<this._length-w;u++)this._array[this._getCyclicIndex(u)]=this._array[this._getCyclicIndex(u+w)];this._length-=w,this.onDeleteEmitter.fire({index:S,amount:w})}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,w,v){if(!(w<=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 o=w-1;o>=0;o--)this.set(S+o+v,this.get(S+o));const u=S+w+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<w;u++)this.set(S+u+v,this.get(S+u))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}a.CircularList=d},1439:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(f,g=5){if(typeof f!="object")return f;const d=Array.isArray(f)?[]:{};for(const p in f)d[p]=g<=1?f[p]:f[p]&&c(f[p],g-1);return d}},8055:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,f=0,g=0,d=0;var p,S,w,v,u;function o(l){const _=l.toString(16);return _.length<2?"0"+_:_}function s(l,_){return l<_?(_+.05)/(l+.05):(l+.05)/(_+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(l){l.toCss=function(_,C,x,k){return k!==void 0?`#${o(_)}${o(C)}${o(x)}${o(k)}`:`#${o(_)}${o(C)}${o(x)}`},l.toRgba=function(_,C,x,k=255){return(_<<24|C<<16|x<<8|k)>>>0},l.toColor=function(_,C,x,k){return{css:l.toCss(_,C,x,k),rgba:l.toRgba(_,C,x,k)}}}(p||(a.channels=p={})),function(l){function _(C,x){return d=Math.round(255*x),[c,f,g]=u.toChannels(C.rgba),{css:p.toCss(c,f,g,d),rgba:p.toRgba(c,f,g,d)}}l.blend=function(C,x){if(d=(255&x.rgba)/255,d===1)return{css:x.css,rgba:x.rgba};const k=x.rgba>>24&255,y=x.rgba>>16&255,b=x.rgba>>8&255,R=C.rgba>>24&255,M=C.rgba>>16&255,B=C.rgba>>8&255;return c=R+Math.round((k-R)*d),f=M+Math.round((y-M)*d),g=B+Math.round((b-B)*d),{css:p.toCss(c,f,g),rgba:p.toRgba(c,f,g)}},l.isOpaque=function(C){return(255&C.rgba)==255},l.ensureContrastRatio=function(C,x,k){const y=u.ensureContrastRatio(C.rgba,x.rgba,k);if(y)return p.toColor(y>>24&255,y>>16&255,y>>8&255)},l.opaque=function(C){const x=(255|C.rgba)>>>0;return[c,f,g]=u.toChannels(x),{css:p.toCss(c,f,g),rgba:x}},l.opacity=_,l.multiplyOpacity=function(C,x){return d=255&C.rgba,_(C,d*x/255)},l.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}}(S||(a.color=S={})),function(l){let _,C;try{const x=document.createElement("canvas");x.width=1,x.height=1;const k=x.getContext("2d",{willReadFrequently:!0});k&&(_=k,_.globalCompositeOperation="copy",C=_.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(x){if(x.match(/#[\da-f]{3,8}/i))switch(x.length){case 4:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),g=parseInt(x.slice(3,4).repeat(2),16),p.toColor(c,f,g);case 5:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),g=parseInt(x.slice(3,4).repeat(2),16),d=parseInt(x.slice(4,5).repeat(2),16),p.toColor(c,f,g,d);case 7:return{css:x,rgba:(parseInt(x.slice(1),16)<<8|255)>>>0};case 9:return{css:x,rgba:parseInt(x.slice(1),16)>>>0}}const k=x.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]),g=parseInt(k[3]),d=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),p.toColor(c,f,g,d);if(!_||!C)throw new Error("css.toColor: Unsupported css format");if(_.fillStyle=C,_.fillStyle=x,typeof _.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(_.fillRect(0,0,1,1),[c,f,g,d]=_.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,f,g,d),css:x}}}(w||(a.css=w={})),function(l){function _(C,x,k){const y=C/255,b=x/255,R=k/255;return .2126*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.7152*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.0722*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))}l.relativeLuminance=function(C){return _(C>>16&255,C>>8&255,255&C)},l.relativeLuminance2=_}(v||(a.rgb=v={})),function(l){function _(x,k,y){const b=x>>24&255,R=x>>16&255,M=x>>8&255;let B=k>>24&255,T=k>>16&255,N=k>>8&255,F=s(v.relativeLuminance2(B,T,N),v.relativeLuminance2(b,R,M));for(;F<y&&(B>0||T>0||N>0);)B-=Math.max(0,Math.ceil(.1*B)),T-=Math.max(0,Math.ceil(.1*T)),N-=Math.max(0,Math.ceil(.1*N)),F=s(v.relativeLuminance2(B,T,N),v.relativeLuminance2(b,R,M));return(B<<24|T<<16|N<<8|255)>>>0}function C(x,k,y){const b=x>>24&255,R=x>>16&255,M=x>>8&255;let B=k>>24&255,T=k>>16&255,N=k>>8&255,F=s(v.relativeLuminance2(B,T,N),v.relativeLuminance2(b,R,M));for(;F<y&&(B<255||T<255||N<255);)B=Math.min(255,B+Math.ceil(.1*(255-B))),T=Math.min(255,T+Math.ceil(.1*(255-T))),N=Math.min(255,N+Math.ceil(.1*(255-N))),F=s(v.relativeLuminance2(B,T,N),v.relativeLuminance2(b,R,M));return(B<<24|T<<16|N<<8|255)>>>0}l.blend=function(x,k){if(d=(255&k)/255,d===1)return k;const y=k>>24&255,b=k>>16&255,R=k>>8&255,M=x>>24&255,B=x>>16&255,T=x>>8&255;return c=M+Math.round((y-M)*d),f=B+Math.round((b-B)*d),g=T+Math.round((R-T)*d),p.toRgba(c,f,g)},l.ensureContrastRatio=function(x,k,y){const b=v.relativeLuminance(x>>8),R=v.relativeLuminance(k>>8);if(s(b,R)<y){if(R<b){const T=_(x,k,y),N=s(b,v.relativeLuminance(T>>8));if(N<y){const F=C(x,k,y);return N>s(b,v.relativeLuminance(F>>8))?T:F}return T}const M=C(x,k,y),B=s(b,v.relativeLuminance(M>>8));if(B<y){const T=_(x,k,y);return B>s(b,v.relativeLuminance(T>>8))?M:T}return M}},l.reduceLuminance=_,l.increaseLuminance=C,l.toChannels=function(x){return[x>>24&255,x>>16&255,x>>8&255,255&x]}}(u||(a.rgba=u={})),a.toPaddedHex=o,a.contrastRatio=s},8969:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=c(844),g=c(2585),d=c(4348),p=c(7866),S=c(744),w=c(7302),v=c(6975),u=c(8460),o=c(1753),s=c(1480),l=c(7994),_=c(9282),C=c(5435),x=c(5981),k=c(2660);let y=!1;class b extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new u.EventEmitter),this._onScroll.event(M=>{var B;(B=this._onScrollApi)==null||B.fire(M.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(M){for(const B in M)this.optionsService.options[B]=M[B]}constructor(M){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 d.InstantiationService,this.optionsService=this.register(new w.OptionsService(M)),this._instantiationService.setService(g.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(g.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(g.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.CoreService)),this._instantiationService.setService(g.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(o.CoreMouseService)),this._instantiationService.setService(g.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(s.UnicodeService)),this._instantiationService.setService(g.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(g.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(g.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(B=>{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(B=>{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 x.WriteBuffer((B,T)=>this._inputHandler.parse(B,T))),this.register((0,u.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(M,B){this._writeBuffer.write(M,B)}writeSync(M,B){this._logService.logLevel<=g.LogLevelEnum.WARN&&!y&&(this._logService.warn("writeSync is unreliable and will be removed soon."),y=!0),this._writeBuffer.writeSync(M,B)}input(M,B=!0){this.coreService.triggerDataEvent(M,B)}resize(M,B){isNaN(M)||isNaN(B)||(M=Math.max(M,S.MINIMUM_COLS),B=Math.max(B,S.MINIMUM_ROWS),this._bufferService.resize(M,B))}scroll(M,B=!1){this._bufferService.scroll(M,B)}scrollLines(M,B,T){this._bufferService.scrollLines(M,B,T)}scrollPages(M){this.scrollLines(M*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(M){const B=M-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(M,B){return this._inputHandler.registerEscHandler(M,B)}registerDcsHandler(M,B){return this._inputHandler.registerDcsHandler(M,B)}registerCsiHandler(M,B){return this._inputHandler.registerCsiHandler(M,B)}registerOscHandler(M,B){return this._inputHandler.registerOscHandler(M,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let M=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?M=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(M=!0),M?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const M=[];M.push(this.onLineFeed(_.updateWindowsModeWrappedState.bind(null,this._bufferService))),M.push(this.registerCsiHandler({final:"H"},()=>((0,_.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)(()=>{for(const B of M)B.dispose()})}}}a.CoreTerminal=b},8460:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.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 g=[];for(let d=0;d<this._listeners.length;d++)g.push(this._listeners[d]);for(let d=0;d<g.length;d++)g[d].call(void 0,c,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,f){return c(g=>f.fire(g))},a.runAndSubscribe=function(c,f){return f(void 0),c(g=>f(g))}},5435:function(m,a,c){var f=this&&this.__decorate||function(j,E,D,P){var O,W=arguments.length,V=W<3?E:P===null?P=Object.getOwnPropertyDescriptor(E,D):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(j,E,D,P);else for(var J=j.length-1;J>=0;J--)(O=j[J])&&(V=(W<3?O(V):W>3?O(E,D,V):O(E,D))||V);return W>3&&V&&Object.defineProperty(E,D,V),V},g=this&&this.__param||function(j,E){return function(D,P){E(D,P,j)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const d=c(2584),p=c(7116),S=c(2015),w=c(844),v=c(482),u=c(8437),o=c(8460),s=c(643),l=c(511),_=c(3734),C=c(2585),x=c(1480),k=c(6242),y=c(6351),b=c(5941),R={"(":0,")":1,"*":2,"+":3,"-":1,".":2},M=131072;function B(j,E){if(j>24)return E.setWinLines||!1;switch(j){case 1:return!!E.restoreWin;case 2:return!!E.minimizeWin;case 3:return!!E.setWinPosition;case 4:return!!E.setWinSizePixels;case 5:return!!E.raiseWin;case 6:return!!E.lowerWin;case 7:return!!E.refreshWin;case 8:return!!E.setWinSizeChars;case 9:return!!E.maximizeWin;case 10:return!!E.fullscreenWin;case 11:return!!E.getWinState;case 13:return!!E.getWinPosition;case 14:return!!E.getWinSizePixels;case 15:return!!E.getScreenSizePixels;case 16:return!!E.getCellSizePixels;case 18:return!!E.getWinSizeChars;case 19:return!!E.getScreenSizeChars;case 20:return!!E.getIconTitle;case 21:return!!E.getWinTitle;case 22:return!!E.pushTitle;case 23:return!!E.popTitle;case 24:return!!E.setWinLines}return!1}var T;(function(j){j[j.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",j[j.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(T||(a.WindowsOptionsReportType=T={}));let N=0;class F extends w.Disposable{getAttrData(){return this._curAttrData}constructor(E,D,P,O,W,V,J,Z,I=new S.EscapeSequenceParser){super(),this._bufferService=E,this._charsetService=D,this._coreService=P,this._logService=O,this._optionsService=W,this._oscLinkService=V,this._coreMouseService=J,this._unicodeService=Z,this._parser=I,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.Utf8ToUtf32,this._workCell=new l.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 o.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new o.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new o.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new o.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new o.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new o.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new o.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new o.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new o.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new o.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new o.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._parser.setCsiHandlerFallback((L,U)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:U.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,U,H)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:U,data:H})}),this._parser.setDcsHandlerFallback((L,U,H)=>{U==="HOOK"&&(H=H.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:U,payload:H})}),this._parser.setPrintHandler((L,U,H)=>this.print(L,U,H)),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(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.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 y.DcsHandler((L,U)=>this.requestStatusString(L,U)))}_preserveStack(E,D,P,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=E,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=P,this._parseStack.position=O}_logSlowResolvingAsync(E){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([E,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(E,D){let P,O=this._activeBuffer.x,W=this._activeBuffer.y,V=0;const J=this._parseStack.paused;if(J){if(P=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(P),P;O=this._parseStack.cursorStartX,W=this._parseStack.cursorStartY,this._parseStack.paused=!1,E.length>M&&(V=this._parseStack.position+M)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof E=="string"?` "${E}"`:` "${Array.prototype.map.call(E,L=>String.fromCharCode(L)).join("")}"`),typeof E=="string"?E.split("").map(L=>L.charCodeAt(0)):E),this._parseBuffer.length<E.length&&this._parseBuffer.length<M&&(this._parseBuffer=new Uint32Array(Math.min(E.length,M))),J||this._dirtyRowTracker.clearRange(),E.length>M)for(let L=V;L<E.length;L+=M){const U=L+M<E.length?L+M:E.length,H=typeof E=="string"?this._stringDecoder.decode(E.substring(L,U),this._parseBuffer):this._utf8Decoder.decode(E.subarray(L,U),this._parseBuffer);if(P=this._parser.parse(this._parseBuffer,H))return this._preserveStack(O,W,H,L),this._logSlowResolvingAsync(P),P}else if(!J){const L=typeof E=="string"?this._stringDecoder.decode(E,this._parseBuffer):this._utf8Decoder.decode(E,this._parseBuffer);if(P=this._parser.parse(this._parseBuffer,L))return this._preserveStack(O,W,L,0),this._logSlowResolvingAsync(P),P}this._activeBuffer.x===O&&this._activeBuffer.y===W||this._onCursorMove.fire();const Z=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),I=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);I<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(I,this._bufferService.rows-1),Math.min(Z,this._bufferService.rows-1))}print(E,D,P){let O,W;const V=this._charsetService.charset,J=this._optionsService.rawOptions.screenReaderMode,Z=this._bufferService.cols,I=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,U=this._curAttrData;let H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&P-D>0&&H.getWidth(this._activeBuffer.x-1)===2&&H.setCellFromCodepoint(this._activeBuffer.x-1,0,1,U);let X=this._parser.precedingJoinState;for(let G=D;G<P;++G){if(O=E[G],O<127&&V){const ne=V[String.fromCharCode(O)];ne&&(O=ne.charCodeAt(0))}const se=this._unicodeService.charProperties(O,X);W=x.UnicodeService.extractWidth(se);const z=x.UnicodeService.extractShouldJoin(se),re=z?x.UnicodeService.extractWidth(X):0;if(X=se,J&&this._onA11yChar.fire((0,v.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+W-re>Z){if(I){const ne=H;let ee=this._activeBuffer.x-re;for(this._activeBuffer.x=re,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),H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),re>0&&H instanceof u.BufferLine&&H.copyCellsFrom(ne,ee,0,re,!1);ee<Z;)ne.setCellFromCodepoint(ee++,0,1,U)}else if(this._activeBuffer.x=Z-1,W===2)continue}if(z&&this._activeBuffer.x){const ne=H.getWidth(this._activeBuffer.x-1)?1:2;H.addCodepointToCell(this._activeBuffer.x-ne,O,W);for(let ee=W-re;--ee>=0;)H.setCellFromCodepoint(this._activeBuffer.x++,0,0,U)}else if(L&&(H.insertCells(this._activeBuffer.x,W-re,this._activeBuffer.getNullCell(U)),H.getWidth(Z-1)===2&&H.setCellFromCodepoint(Z-1,s.NULL_CELL_CODE,s.NULL_CELL_WIDTH,U)),H.setCellFromCodepoint(this._activeBuffer.x++,O,W,U),W>0)for(;--W;)H.setCellFromCodepoint(this._activeBuffer.x++,0,0,U)}this._parser.precedingJoinState=X,this._activeBuffer.x<Z&&P-D>0&&H.getWidth(this._activeBuffer.x)===0&&!H.hasContent(this._activeBuffer.x)&&H.setCellFromCodepoint(this._activeBuffer.x,0,1,U),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(E,D){return E.final!=="t"||E.prefix||E.intermediates?this._parser.registerCsiHandler(E,D):this._parser.registerCsiHandler(E,P=>!B(P.params[0],this._optionsService.rawOptions.windowOptions)||D(P))}registerDcsHandler(E,D){return this._parser.registerDcsHandler(E,new y.DcsHandler(D))}registerEscHandler(E,D){return this._parser.registerEscHandler(E,D)}registerOscHandler(E,D){return this._parser.registerOscHandler(E,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 E;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&&((E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&E.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 E=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-E),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(E=this._bufferService.cols-1){this._activeBuffer.x=Math.min(E,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(E,D){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=E,this._activeBuffer.y=this._activeBuffer.scrollTop+D):(this._activeBuffer.x=E,this._activeBuffer.y=D),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(E,D){this._restrictCursor(),this._setCursor(this._activeBuffer.x+E,this._activeBuffer.y+D)}cursorUp(E){const D=this._activeBuffer.y-this._activeBuffer.scrollTop;return D>=0?this._moveCursor(0,-Math.min(D,E.params[0]||1)):this._moveCursor(0,-(E.params[0]||1)),!0}cursorDown(E){const D=this._activeBuffer.scrollBottom-this._activeBuffer.y;return D>=0?this._moveCursor(0,Math.min(D,E.params[0]||1)):this._moveCursor(0,E.params[0]||1),!0}cursorForward(E){return this._moveCursor(E.params[0]||1,0),!0}cursorBackward(E){return this._moveCursor(-(E.params[0]||1),0),!0}cursorNextLine(E){return this.cursorDown(E),this._activeBuffer.x=0,!0}cursorPrecedingLine(E){return this.cursorUp(E),this._activeBuffer.x=0,!0}cursorCharAbsolute(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(E){return this._setCursor(E.length>=2?(E.params[1]||1)-1:0,(E.params[0]||1)-1),!0}charPosAbsolute(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(E){return this._moveCursor(E.params[0]||1,0),!0}linePosAbsolute(E){return this._setCursor(this._activeBuffer.x,(E.params[0]||1)-1),!0}vPositionRelative(E){return this._moveCursor(0,E.params[0]||1),!0}hVPosition(E){return this.cursorPosition(E),!0}tabClear(E){const D=E.params[0];return D===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:D===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=E.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=E.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(E){const D=E.params[0];return D===1&&(this._curAttrData.bg|=536870912),D!==2&&D!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(E,D,P,O=!1,W=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);V.replaceCells(D,P,this._activeBuffer.getNullCell(this._eraseAttrData()),W),O&&(V.isWrapped=!1)}_resetBufferLine(E,D=!1){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);P&&(P.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),D),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+E),P.isWrapped=!1)}eraseInDisplay(E,D=!1){let P;switch(this._restrictCursor(this._bufferService.cols),E.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 O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(E,D=!1){switch(this._restrictCursor(this._bufferService.cols),E.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(E){this._restrictCursor();let D=E.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,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,W=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;D--;)this._activeBuffer.lines.splice(W-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(E){this._restrictCursor();let D=E.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 O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;D--;)this._activeBuffer.lines.splice(P,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(E){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.insertCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(E){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.deleteCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(E){let D=E.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(E){let D=E.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(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=E.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);O.deleteCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=E.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);O.insertCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=E.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);O.insertCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=E.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);O.deleteCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(E){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(E.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(E){const D=this._parser.precedingJoinState;if(!D)return!0;const P=E.params[0]||1,O=x.UnicodeService.extractWidth(D),W=this._activeBuffer.x-O,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(W),J=new Uint32Array(V.length*P);let Z=0;for(let L=0;L<V.length;){const U=V.codePointAt(L)||0;J[Z++]=U,L+=U>65535?2:1}let I=Z;for(let L=1;L<P;++L)J.copyWithin(I,0,Z),I+=Z;return this.print(J,0,I),!0}sendDeviceAttributesPrimary(E){return E.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(E){return E.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(E.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(E){return(this._optionsService.rawOptions.termName+"").indexOf(E)===0}setMode(E){for(let D=0;D<E.length;D++)switch(E.params[D]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(E){for(let D=0;D<E.length;D++)switch(E.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(E){for(let D=0;D<E.length;D++)switch(E.params[D]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(E){for(let D=0;D<E.length;D++)switch(E.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(),E.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(E,D){const P=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:W}=this._coreMouseService,V=this._coreService,{buffers:J,cols:Z}=this._bufferService,{active:I,alt:L}=J,U=this._optionsService.rawOptions,H=z=>z?1:2,X=E.params[0];return G=X,se=D?X===2?4:X===4?H(V.modes.insertMode):X===12?3:X===20?H(U.convertEol):0:X===1?H(P.applicationCursorKeys):X===3?U.windowOptions.setWinLines?Z===80?2:Z===132?1:0:0:X===6?H(P.origin):X===7?H(P.wraparound):X===8?3:X===9?H(O==="X10"):X===12?H(U.cursorBlink):X===25?H(!V.isCursorHidden):X===45?H(P.reverseWraparound):X===66?H(P.applicationKeypad):X===67?4:X===1e3?H(O==="VT200"):X===1002?H(O==="DRAG"):X===1003?H(O==="ANY"):X===1004?H(P.sendFocus):X===1005?4:X===1006?H(W==="SGR"):X===1015?4:X===1016?H(W==="SGR_PIXELS"):X===1048?1:X===47||X===1047||X===1049?H(I===L):X===2004?H(P.bracketedPasteMode):0,V.triggerDataEvent(`${d.C0.ESC}[${D?"":"?"}${G};${se}$y`),!0;var G,se}_updateAttrColor(E,D,P,O,W){return D===2?(E|=50331648,E&=-16777216,E|=_.AttributeData.fromColorRGB([P,O,W])):D===5&&(E&=-50331904,E|=33554432|255&P),E}_extractColor(E,D,P){const O=[0,0,-1,0,0,0];let W=0,V=0;do{if(O[V+W]=E.params[D+V],E.hasSubParams(D+V)){const J=E.getSubParams(D+V);let Z=0;do O[1]===5&&(W=1),O[V+Z+1+W]=J[Z];while(++Z<J.length&&Z+V+1+W<O.length);break}if(O[1]===5&&V+W>=2||O[1]===2&&V+W>=5)break;O[1]&&(W=1)}while(++V+D<E.length&&V+W<O.length);for(let J=2;J<O.length;++J)O[J]===-1&&(O[J]=0);switch(O[0]){case 38:P.fg=this._updateAttrColor(P.fg,O[1],O[3],O[4],O[5]);break;case 48:P.bg=this._updateAttrColor(P.bg,O[1],O[3],O[4],O[5]);break;case 58:P.extended=P.extended.clone(),P.extended.underlineColor=this._updateAttrColor(P.extended.underlineColor,O[1],O[3],O[4],O[5])}return V}_processUnderline(E,D){D.extended=D.extended.clone(),(!~E||E>5)&&(E=1),D.extended.underlineStyle=E,D.fg|=268435456,E===0&&(D.fg&=-268435457),D.updateExtended()}_processSGR0(E){E.fg=u.DEFAULT_ATTR_DATA.fg,E.bg=u.DEFAULT_ATTR_DATA.bg,E.extended=E.extended.clone(),E.extended.underlineStyle=0,E.extended.underlineColor&=-67108864,E.updateExtended()}charAttributes(E){if(E.length===1&&E.params[0]===0)return this._processSGR0(this._curAttrData),!0;const D=E.length;let P;const O=this._curAttrData;for(let W=0;W<D;W++)P=E.params[W],P>=30&&P<=37?(O.fg&=-50331904,O.fg|=16777216|P-30):P>=40&&P<=47?(O.bg&=-50331904,O.bg|=16777216|P-40):P>=90&&P<=97?(O.fg&=-50331904,O.fg|=16777224|P-90):P>=100&&P<=107?(O.bg&=-50331904,O.bg|=16777224|P-100):P===0?this._processSGR0(O):P===1?O.fg|=134217728:P===3?O.bg|=67108864:P===4?(O.fg|=268435456,this._processUnderline(E.hasSubParams(W)?E.getSubParams(W)[0]:1,O)):P===5?O.fg|=536870912:P===7?O.fg|=67108864:P===8?O.fg|=1073741824:P===9?O.fg|=2147483648:P===2?O.bg|=134217728:P===21?this._processUnderline(2,O):P===22?(O.fg&=-134217729,O.bg&=-134217729):P===23?O.bg&=-67108865:P===24?(O.fg&=-268435457,this._processUnderline(0,O)):P===25?O.fg&=-536870913:P===27?O.fg&=-67108865:P===28?O.fg&=-1073741825:P===29?O.fg&=2147483647:P===39?(O.fg&=-67108864,O.fg|=16777215&u.DEFAULT_ATTR_DATA.fg):P===49?(O.bg&=-67108864,O.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):P===38||P===48||P===58?W+=this._extractColor(E,W,O):P===53?O.bg|=1073741824:P===55?O.bg&=-1073741825:P===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):P===100?(O.fg&=-67108864,O.fg|=16777215&u.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",P);return!0}deviceStatus(E){switch(E.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const D=this._activeBuffer.y+1,P=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${D};${P}R`)}return!0}deviceStatusPrivate(E){if(E.params[0]===6){const D=this._activeBuffer.y+1,P=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${D};${P}R`)}return!0}softReset(E){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(E){const D=E.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(E){const D=E.params[0]||1;let P;return(E.length<2||(P=E.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(E){if(!B(E.params[0],this._optionsService.rawOptions.windowOptions))return!0;const D=E.length>1?E.params[1]:0;switch(E.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(`${d.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(E){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(E){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(E){return this._windowTitle=E,this._onTitleChange.fire(E),!0}setIconName(E){return this._iconName=E,!0}setOrReportIndexedColor(E){const D=[],P=E.split(";");for(;P.length>1;){const O=P.shift(),W=P.shift();if(/^\d+$/.exec(O)){const V=parseInt(O);if(q(V))if(W==="?")D.push({type:0,index:V});else{const J=(0,b.parseColor)(W);J&&D.push({type:1,index:V,color:J})}}}return D.length&&this._onColor.fire(D),!0}setHyperlink(E){const D=E.split(";");return!(D.length<2)&&(D[1]?this._createHyperlink(D[0],D[1]):!D[0]&&this._finishHyperlink())}_createHyperlink(E,D){this._getCurrentLinkId()&&this._finishHyperlink();const P=E.split(":");let O;const W=P.findIndex(V=>V.startsWith("id="));return W!==-1&&(O=P[W].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,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(E,D){const P=E.split(";");for(let O=0;O<P.length&&!(D>=this._specialColors.length);++O,++D)if(P[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const W=(0,b.parseColor)(P[O]);W&&this._onColor.fire([{type:1,index:this._specialColors[D],color:W}])}return!0}setOrReportFgColor(E){return this._setOrReportSpecialColor(E,0)}setOrReportBgColor(E){return this._setOrReportSpecialColor(E,1)}setOrReportCursorColor(E){return this._setOrReportSpecialColor(E,2)}restoreIndexedColor(E){if(!E)return this._onColor.fire([{type:2}]),!0;const D=[],P=E.split(";");for(let O=0;O<P.length;++O)if(/^\d+$/.exec(P[O])){const W=parseInt(P[O]);q(W)&&D.push({type:2,index:W})}return D.length&&this._onColor.fire(D),!0}restoreFgColor(E){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(E){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(E){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(E){return E.length!==2?(this.selectDefaultCharset(),!0):(E[0]==="/"||this._charsetService.setgCharset(R[E[0]],p.CHARSETS[E[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 E=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,E,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(E){return this._charsetService.setgLevel(E),!0}screenAlignmentPattern(){const E=new l.CellData;E.content=4194373,E.fg=this._curAttrData.fg,E.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,O=this._activeBuffer.lines.get(P);O&&(O.fill(E),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(E,D){const P=this._bufferService.buffer,O=this._optionsService.rawOptions;return(W=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${W}${d.C0.ESC}\\`),!0))(E==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:E==='"p'?'P1$r61;1"p':E==="r"?`P1$r${P.scrollTop+1};${P.scrollBottom+1}r`:E==="m"?"P1$r0m":E===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(E,D){this._dirtyRowTracker.markRangeDirty(E,D)}}a.InputHandler=F;let K=class{constructor(j){this._bufferService=j,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(j){j<this.start?this.start=j:j>this.end&&(this.end=j)}markRangeDirty(j,E){j>E&&(N=j,j=E,E=N),j<this.start&&(this.start=j),E>this.end&&(this.end=E)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function q(j){return 0<=j&&j<256}K=f([g(0,C.IBufferService)],K)},844:(m,a)=>{function c(f){for(const g of f)g.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.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 g=this._disposables.indexOf(f);g!==-1&&this._disposables.splice(g,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var g;this._isDisposed||f===this._value||((g=this._value)==null||g.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}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=c,a.getDisposeArrayDisposable=function(f){return{dispose:()=>c(f)}}},1505:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(g,d,p){this._data[g]||(this._data[g]={}),this._data[g][d]=p}get(g,d){return this._data[g]?this._data[g][d]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(f,g,d,p,S){this._data.get(f,g)||this._data.set(f,g,new c),this._data.get(f,g).set(d,p,S)}get(f,g,d,p){var S;return(S=this._data.get(f,g))==null?void 0:S.get(d,p)}clear(){this._data.clear()}}},6114:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const g=c.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},6106:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.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 g=this._getKey(f);if(g===void 0||(c=this._search(g),c===-1)||this._getKey(this._array[c])!==g)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])===g);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,g){if(this._array.length!==0&&(c=this._search(f),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===f))do g(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===f)}values(){return[...this._array].values()}_search(f){let g=0,d=this._array.length-1;for(;d>=g;){let p=g+d>>1;const S=this._getKey(this._array[p]);if(S>f)d=p-1;else{if(!(S<f)){for(;p>0&&this._getKey(this._array[p-1])===f;)p--;return p}g=p+1}}return g}}},7226:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=c(6114);class g{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 w=0,v=0,u=S.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),v=Math.max(w,v),o=S.timeRemaining(),1.5*v>o)return u-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(u-w))}ms`),void this._start();u=o}this.clear()}}class d extends g{_requestCallback(S){return setTimeout(()=>S(this._createDeadline(16)))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const w=Date.now()+S;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}a.PriorityTaskQueue=d,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(p){return requestIdleCallback(p)}_cancelCallback(p){cancelIdleCallback(p)}}:d,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(p){this._queue.clear(),this._queue.enqueue(p)}flush(){this._queue.flush()}}},9282:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const f=c(643);a.updateWindowsModeWrappedState=function(g){const d=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),p=d==null?void 0:d.get(g.cols-1),S=g.buffer.lines.get(g.buffer.ybase+g.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:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new c;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}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}}a.AttributeData=c;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,p=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=p}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},9092:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const f=c(6349),g=c(7226),d=c(3734),p=c(8437),S=c(4634),w=c(511),v=c(643),u=c(4863),o=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(s,l,_){this._hasScrollback=s,this._optionsService=l,this._bufferService=_,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=p.DEFAULT_ATTR_DATA.clone(),this.savedCharset=o.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new g.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 d.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 d.ExtendedAttrs),this._whitespaceCell}getBlankLine(s,l){return new p.BufferLine(this._bufferService.cols,this.getNullCell(s),l)}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 l=s+this._optionsService.rawOptions.scrollback;return l>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:l}fillViewportRows(s){if(this.lines.length===0){s===void 0&&(s=p.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)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,l){const _=this.getNullCell(p.DEFAULT_ATTR_DATA);let C=0;const x=this._getCorrectBufferLength(l);if(x>this.lines.maxLength&&(this.lines.maxLength=x),this.lines.length>0){if(this._cols<s)for(let y=0;y<this.lines.length;y++)C+=+this.lines.get(y).resize(s,_);let k=0;if(this._rows<l)for(let y=this._rows;y<l;y++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new p.BufferLine(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 y=this._rows;y>l;y--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(x<this.lines.maxLength){const y=this.lines.length-x;y>0&&(this.lines.trimStart(y),this.ybase=Math.max(this.ybase-y,0),this.ydisp=Math.max(this.ydisp-y,0),this.savedY=Math.max(this.savedY-y,0)),this.lines.maxLength=x}this.x=Math.min(this.x,s-1),this.y=Math.min(this.y,l-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,s-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(s,l),this._cols>s))for(let k=0;k<this.lines.length;k++)C+=+this.lines.get(k).resize(s,_);this._cols=s,this._rows=l,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 l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>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,l){this._cols!==s&&(s>this._cols?this._reflowLarger(s,l):this._reflowSmaller(s,l))}_reflowLarger(s,l){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,l,C.countRemoved)}}_reflowLargerAdjustViewport(s,l,_){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let x=_;for(;x-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&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,l){const _=this.getNullCell(p.DEFAULT_ATTR_DATA),C=[];let x=0;for(let k=this.lines.length-1;k>=0;k--){let y=this.lines.get(k);if(!y||!y.isWrapped&&y.getTrimmedLength()<=s)continue;const b=[y];for(;y.isWrapped&&k>0;)y=this.lines.get(--k),b.unshift(y);const R=this.ybase+this.y;if(R>=k&&R<k+b.length)continue;const M=b[b.length-1].getTrimmedLength(),B=(0,S.reflowSmallerGetNewLineLengths)(b,this._cols,s),T=B.length-b.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 F=[];for(let P=0;P<T;P++){const O=this.getBlankLine(p.DEFAULT_ATTR_DATA,!0);F.push(O)}F.length>0&&(C.push({start:k+b.length+x,newLines:F}),x+=F.length),b.push(...F);let K=B.length-1,q=B[K];q===0&&(K--,q=B[K]);let j=b.length-T-1,E=M;for(;j>=0;){const P=Math.min(E,q);if(b[K]===void 0)break;if(b[K].copyCellsFrom(b[j],E-P,q-P,P,!0),q-=P,q===0&&(K--,q=B[K]),E-=P,E===0){j--;const O=Math.max(j,0);E=(0,S.getWrappedLineTrimmedLength)(b,O,this._cols)}}for(let P=0;P<b.length;P++)B[P]<s&&b[P].setCell(B[P],_);let D=T-N;for(;D-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+x)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+T,this.ybase+l-1)}if(C.length>0){const k=[],y=[];for(let K=0;K<this.lines.length;K++)y.push(this.lines.get(K));const b=this.lines.length;let R=b-1,M=0,B=C[M];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+x);let T=0;for(let K=Math.min(this.lines.maxLength-1,b+x-1);K>=0;K--)if(B&&B.start>R+T){for(let q=B.newLines.length-1;q>=0;q--)this.lines.set(K--,B.newLines[q]);K++,k.push({index:R+1,amount:B.newLines.length}),T+=B.newLines.length,B=C[++M]}else this.lines.set(K,y[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 F=Math.max(0,b+x-this.lines.maxLength);F>0&&this.lines.onTrimEmitter.fire(F)}}translateBufferLineToString(s,l,_=0,C){const x=this.lines.get(s);return x?x.translateToString(l,_,C):""}getWrappedRangeForLine(s){let l=s,_=s;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;_+1<this.lines.length&&this.lines.get(_+1).isWrapped;)_++;return{first:l,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 l=0;l<this.markers.length;l++)this.markers[l].line===s&&(this.markers[l].dispose(),this.markers.splice(l--,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 l=new u.Marker(s);return this.markers.push(l),l.register(this.lines.onTrim(_=>{l.line-=_,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(_=>{l.line>=_.index&&(l.line+=_.amount)})),l.register(this.lines.onDelete(_=>{l.line>=_.index&&l.line<_.index+_.amount&&l.dispose(),l.line>_.index&&(l.line-=_.amount)})),l.register(l.onDispose(()=>this._removeMarker(l))),l}_removeMarker(s){this._isClearing||this.markers.splice(this.markers.indexOf(s),1)}}},8437:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const f=c(3734),g=c(511),d=c(643),p=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class w{constructor(u,o,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*u);const l=o||g.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let _=0;_<u;++_)this.setCell(_,l);this.length=u}get(u){const o=this._data[3*u+0],s=2097151&o;return[this._data[3*u+1],2097152&o?this._combined[u]:s?(0,p.stringFromCodePoint)(s):"",o>>22,2097152&o?this._combined[u].charCodeAt(this._combined[u].length-1):s]}set(u,o){this._data[3*u+1]=o[d.CHAR_DATA_ATTR_INDEX],o[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[u]=o[1],this._data[3*u+0]=2097152|u|o[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*u+0]=o[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[d.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 o=this._data[3*u+0];return 2097152&o?this._combined[u].charCodeAt(this._combined[u].length-1):2097151&o}isCombined(u){return 2097152&this._data[3*u+0]}getString(u){const o=this._data[3*u+0];return 2097152&o?this._combined[u]:2097151&o?(0,p.stringFromCodePoint)(2097151&o):""}isProtected(u){return 536870912&this._data[3*u+2]}loadCell(u,o){return S=3*u,o.content=this._data[S+0],o.fg=this._data[S+1],o.bg=this._data[S+2],2097152&o.content&&(o.combinedData=this._combined[u]),268435456&o.bg&&(o.extended=this._extendedAttrs[u]),o}setCell(u,o){2097152&o.content&&(this._combined[u]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[u]=o.extended),this._data[3*u+0]=o.content,this._data[3*u+1]=o.fg,this._data[3*u+2]=o.bg}setCellFromCodepoint(u,o,s,l){268435456&l.bg&&(this._extendedAttrs[u]=l.extended),this._data[3*u+0]=o|s<<22,this._data[3*u+1]=l.fg,this._data[3*u+2]=l.bg}addCodepointToCell(u,o,s){let l=this._data[3*u+0];2097152&l?this._combined[u]+=(0,p.stringFromCodePoint)(o):2097151&l?(this._combined[u]=(0,p.stringFromCodePoint)(2097151&l)+(0,p.stringFromCodePoint)(o),l&=-2097152,l|=2097152):l=o|4194304,s&&(l&=-12582913,l|=s<<22),this._data[3*u+0]=l}insertCells(u,o,s){if((u%=this.length)&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,s),o<this.length-u){const l=new g.CellData;for(let _=this.length-u-o-1;_>=0;--_)this.setCell(u+o+_,this.loadCell(u+_,l));for(let _=0;_<o;++_)this.setCell(u+_,s)}else for(let l=u;l<this.length;++l)this.setCell(l,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(u,o,s){if(u%=this.length,o<this.length-u){const l=new g.CellData;for(let _=0;_<this.length-u-o;++_)this.setCell(u+_,this.loadCell(u+o+_,l));for(let _=this.length-o;_<this.length;++_)this.setCell(_,s)}else for(let l=u;l<this.length;++l)this.setCell(l,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,o,s,l=!1){if(l)for(u&&this.getWidth(u-1)===2&&!this.isProtected(u-1)&&this.setCellFromCodepoint(u-1,0,1,s),o<this.length&&this.getWidth(o-1)===2&&!this.isProtected(o)&&this.setCellFromCodepoint(o,0,1,s);u<o&&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),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o,0,1,s);u<o&&u<this.length;)this.setCell(u++,s)}resize(u,o){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 l=new Uint32Array(s);l.set(this._data),this._data=l}for(let l=this.length;l<u;++l)this.setCell(l,o)}else{this._data=this._data.subarray(0,s);const l=Object.keys(this._combined);for(let C=0;C<l.length;C++){const x=parseInt(l[C],10);x>=u&&delete this._combined[x]}const _=Object.keys(this._extendedAttrs);for(let C=0;C<_.length;C++){const x=parseInt(_[C],10);x>=u&&delete this._extendedAttrs[x]}}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,o=!1){if(o)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 o in u._combined)this._combined[o]=u._combined[o];this._extendedAttrs={};for(const o in u._extendedAttrs)this._extendedAttrs[o]=u._extendedAttrs[o];this.isWrapped=u.isWrapped}clone(){const u=new w(0);u._data=new Uint32Array(this._data),u.length=this.length;for(const o in this._combined)u._combined[o]=this._combined[o];for(const o in this._extendedAttrs)u._extendedAttrs[o]=this._extendedAttrs[o];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,o,s,l,_){const C=u._data;if(_)for(let k=l-1;k>=0;k--){for(let y=0;y<3;y++)this._data[3*(s+k)+y]=C[3*(o+k)+y];268435456&C[3*(o+k)+2]&&(this._extendedAttrs[s+k]=u._extendedAttrs[o+k])}else for(let k=0;k<l;k++){for(let y=0;y<3;y++)this._data[3*(s+k)+y]=C[3*(o+k)+y];268435456&C[3*(o+k)+2]&&(this._extendedAttrs[s+k]=u._extendedAttrs[o+k])}const x=Object.keys(u._combined);for(let k=0;k<x.length;k++){const y=parseInt(x[k],10);y>=o&&(this._combined[y-o+s]=u._combined[y])}}translateToString(u,o,s,l){o=o??0,s=s??this.length,u&&(s=Math.min(s,this.getTrimmedLength())),l&&(l.length=0);let _="";for(;o<s;){const C=this._data[3*o+0],x=2097151&C,k=2097152&C?this._combined[o]:x?(0,p.stringFromCodePoint)(x):d.WHITESPACE_CELL_CHAR;if(_+=k,l)for(let y=0;y<k.length;++y)l.push(o);o+=C>>22||1}return l&&l.push(o),_}}a.BufferLine=w},4841:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.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:(m,a)=>{function c(f,g,d){if(g===f.length-1)return f[g].getTrimmedLength();const p=!f[g].hasContent(d-1)&&f[g].getWidth(d-1)===1,S=f[g+1].getWidth(0)===2;return p&&S?d-1:d}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(f,g,d,p,S){const w=[];for(let v=0;v<f.length-1;v++){let u=v,o=f.get(++u);if(!o.isWrapped)continue;const s=[f.get(v)];for(;u<f.length&&o.isWrapped;)s.push(o),o=f.get(++u);if(p>=v&&p<u){v+=s.length-1;continue}let l=0,_=c(s,l,g),C=1,x=0;for(;C<s.length;){const y=c(s,C,g),b=y-x,R=d-_,M=Math.min(b,R);s[l].copyCellsFrom(s[C],x,_,M,!1),_+=M,_===d&&(l++,_=0),x+=M,x===y&&(C++,x=0),_===0&&l!==0&&s[l-1].getWidth(d-1)===2&&(s[l].copyCellsFrom(s[l-1],d-1,_++,1,!1),s[l-1].setCell(d-1,S))}s[l].replaceCells(_,d,S);let k=0;for(let y=s.length-1;y>0&&(y>l||s[y].getTrimmedLength()===0);y--)k++;k>0&&(w.push(v+s.length-k),w.push(k)),v+=s.length-1}return w},a.reflowLargerCreateNewLayout=function(f,g){const d=[];let p=0,S=g[p],w=0;for(let v=0;v<f.length;v++)if(S===v){const u=g[++p];f.onDeleteEmitter.fire({index:v-w,amount:u}),v+=u-1,w+=u,S=g[++p]}else d.push(v);return{layout:d,countRemoved:w}},a.reflowLargerApplyNewLayout=function(f,g){const d=[];for(let p=0;p<g.length;p++)d.push(f.get(g[p]));for(let p=0;p<d.length;p++)f.set(p,d[p]);f.length=g.length},a.reflowSmallerGetNewLineLengths=function(f,g,d){const p=[],S=f.map((o,s)=>c(f,s,g)).reduce((o,s)=>o+s);let w=0,v=0,u=0;for(;u<S;){if(S-u<d){p.push(S-u);break}w+=d;const o=c(f,v,g);w>o&&(w-=o,v++);const s=f[v].getWidth(w-1)===2;s&&w--;const l=s?d-1:d;p.push(l),u+=l}return p},a.getWrappedLineTrimmedLength=c},5295:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const f=c(8460),g=c(844),d=c(9092);class p extends g.Disposable{constructor(w,v){super(),this._optionsService=w,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 d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.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(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),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(w,v){this._normal.resize(w,v),this._alt.resize(w,v),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}a.BufferSet=p},511:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=c(482),g=c(643),d=c(3734);class p extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const v=new p;return v.setFromCharData(w),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(w){this.fg=w[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(w[g.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(w[g.CHAR_DATA_CHAR_INDEX].length===2){const u=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=u&&u<=56319){const o=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(u-55296)+o-56320+65536|w[g.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[g.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=w[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=p},643:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const f=c(8460),g=c(844);class d{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=d._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,g.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}a.Marker=d,d._nextId=1},7116:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.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:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(m,a)=>{var c,f,g;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
|
|
63
|
-
`,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(c||(a.C0=c={})),function(d){d.PAD="",d.HOP="",d.BPH="",d.NBH="",d.IND="",d.NEL="
",d.SSA="",d.ESA="",d.HTS="",d.HTJ="",d.VTS="",d.PLD="",d.PLU="",d.RI="",d.SS2="",d.SS3="",d.DCS="",d.PU1="",d.PU2="",d.STS="",d.CCH="",d.MW="",d.SPA="",d.EPA="",d.SOS="",d.SGCI="",d.SCI="",d.CSI="",d.ST="",d.OSC="",d.PM="",d.APC=""}(f||(a.C1=f={})),function(d){d.ST=`${c.ESC}\\`}(g||(a.C1_ESCAPED=g={}))},7399:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const f=c(2584),g={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:["'",'"']};a.evaluateKeyboardEvent=function(d,p,S,w){const v={type:0,cancel:!1,key:void 0},u=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?v.key=p?f.C0.ESC+"OA":f.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?v.key=p?f.C0.ESC+"OD":f.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?v.key=p?f.C0.ESC+"OC":f.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(v.key=p?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:v.key=d.ctrlKey?"\b":f.C0.DEL,d.altKey&&(v.key=f.C0.ESC+v.key);break;case 9:if(d.shiftKey){v.key=f.C0.ESC+"[Z";break}v.key=f.C0.HT,v.cancel=!0;break;case 13:v.key=d.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,v.cancel=!0;break;case 27:v.key=f.C0.ESC,d.altKey&&(v.key=f.C0.ESC+f.C0.ESC),v.cancel=!0;break;case 37:if(d.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(d.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(d.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(d.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:d.shiftKey||d.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:d.shiftKey?v.type=2:d.ctrlKey?v.key=f.C0.ESC+"[5;"+(u+1)+"~":v.key=f.C0.ESC+"[5~";break;case 34:d.shiftKey?v.type=3:d.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(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(S&&!w||!d.altKey||d.metaKey)!S||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?v.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(v.key=f.C0.US),d.key==="@"&&(v.key=f.C0.NUL)):d.keyCode===65&&(v.type=1);else{const o=g[d.keyCode],s=o==null?void 0:o[d.shiftKey?1:0];if(s)v.key=f.C0.ESC+s;else if(d.keyCode>=65&&d.keyCode<=90){const l=d.ctrlKey?d.keyCode-64:d.keyCode+32;let _=String.fromCharCode(l);d.shiftKey&&(_=_.toUpperCase()),v.key=f.C0.ESC+_}else if(d.keyCode===32)v.key=f.C0.ESC+(d.ctrlKey?f.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let l=d.code.slice(3,4);d.shiftKey||(l=l.toLowerCase()),v.key=f.C0.ESC+l,v.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?v.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?v.key=f.C0.NUL:d.keyCode>=51&&d.keyCode<=55?v.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?v.key=f.C0.DEL:d.keyCode===219?v.key=f.C0.ESC:d.keyCode===220?v.key=f.C0.FS:d.keyCode===221&&(v.key=f.C0.GS)}return v}},482:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,f=0,g=c.length){let d="";for(let p=f;p<g;++p){let S=c[p];S>65535?(S-=65536,d+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):d+=String.fromCharCode(S)}return d},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,f){const g=c.length;if(!g)return 0;let d=0,p=0;if(this._interim){const S=c.charCodeAt(p++);56320<=S&&S<=57343?f[d++]=1024*(this._interim-55296)+S-56320+65536:(f[d++]=this._interim,f[d++]=S),this._interim=0}for(let S=p;S<g;++S){const w=c.charCodeAt(S);if(55296<=w&&w<=56319){if(++S>=g)return this._interim=w,d;const v=c.charCodeAt(S);56320<=v&&v<=57343?f[d++]=1024*(w-55296)+v-56320+65536:(f[d++]=w,f[d++]=v)}else w!==65279&&(f[d++]=w)}return d}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,f){const g=c.length;if(!g)return 0;let d,p,S,w,v=0,u=0,o=0;if(this.interim[0]){let _=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let x,k=0;for(;(x=63&this.interim[++k])&&k<4;)C<<=6,C|=x;const y=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,b=y-k;for(;o<b;){if(o>=g)return 0;if(x=c[o++],(192&x)!=128){o--,_=!0;break}this.interim[k++]=x,C<<=6,C|=63&x}_||(y===2?C<128?o--:f[v++]=C:y===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=g-4;let l=o;for(;l<g;){for(;!(!(l<s)||128&(d=c[l])||128&(p=c[l+1])||128&(S=c[l+2])||128&(w=c[l+3]));)f[v++]=d,f[v++]=p,f[v++]=S,f[v++]=w,l+=4;if(d=c[l++],d<128)f[v++]=d;else if((224&d)==192){if(l>=g)return this.interim[0]=d,v;if(p=c[l++],(192&p)!=128){l--;continue}if(u=(31&d)<<6|63&p,u<128){l--;continue}f[v++]=u}else if((240&d)==224){if(l>=g)return this.interim[0]=d,v;if(p=c[l++],(192&p)!=128){l--;continue}if(l>=g)return this.interim[0]=d,this.interim[1]=p,v;if(S=c[l++],(192&S)!=128){l--;continue}if(u=(15&d)<<12|(63&p)<<6|63&S,u<2048||u>=55296&&u<=57343||u===65279)continue;f[v++]=u}else if((248&d)==240){if(l>=g)return this.interim[0]=d,v;if(p=c[l++],(192&p)!=128){l--;continue}if(l>=g)return this.interim[0]=d,this.interim[1]=p,v;if(S=c[l++],(192&S)!=128){l--;continue}if(l>=g)return this.interim[0]=d,this.interim[1]=p,this.interim[2]=S,v;if(w=c[l++],(192&w)!=128){l--;continue}if(u=(7&d)<<18|(63&p)<<12|(63&S)<<6|63&w,u<65536||u>1114111)continue;f[v++]=u}}return v}}},225:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const f=c(1480),g=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],d=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let p;a.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<g.length;++S)p.fill(0,g[S][0],g[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?p[S]:function(w,v){let u,o=0,s=v.length-1;if(w<v[0][0]||w>v[s][1])return!1;for(;s>=o;)if(u=o+s>>1,w>v[u][1])o=u+1;else{if(!(w<v[u][0]))return!0;s=u-1}return!1}(S,d)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,w){let v=this.wcwidth(S),u=v===0&&w!==0;if(u){const o=f.UnicodeService.extractWidth(w);o===0?u=!1:o>v&&(v=o)}return f.UnicodeService.createPropertyValue(0,v,u)}}},5981:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const f=c(8460),g=c(844);class d extends g.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,w){if(w!==void 0&&this._syncCalls>w)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,w){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(w),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(w)}_innerWrite(S=0,w=!0){const v=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const u=this._writeBuffer[this._bufferOffset],o=this._action(u,w);if(o){const l=_=>Date.now()-v>=12?setTimeout(()=>this._innerWrite(0,_)):this._innerWrite(v,_);return void o.catch(_=>(queueMicrotask(()=>{throw _}),Promise.resolve(!1))).then(l)}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()}}a.WriteBuffer=d},5941:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.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 g(d,p){const S=d.toString(16),w=S.length<2?"0"+S:S;switch(p){case 4:return S[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}a.parseColor=function(d){if(!d)return;let p=d.toLowerCase();if(p.indexOf("rgb:")===0){p=p.slice(4);const S=c.exec(p);if(S){const w=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/w*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/w*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/w*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,w=[0,0,0];for(let v=0;v<3;++v){const u=parseInt(p.slice(S*v,S*v+S),16);w[v]=S===1?u<<4:S===2?u:S===3?u>>4:u>>8}return w}},a.toRgbString=function(d,p=16){const[S,w,v]=d;return`rgb:${g(S,p)}/${g(w,p)}/${g(v,p)}`}},5770:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const f=c(482),g=c(8742),d=c(5770),p=[];a.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(w,v){this._handlers[w]===void 0&&(this._handlers[w]=[]);const u=this._handlers[w];return u.push(v),{dispose:()=>{const o=u.indexOf(v);o!==-1&&u.splice(o,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=p,this._ident=0}hook(w,v){if(this.reset(),this._ident=w,this._active=this._handlers[w]||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(w,v,u){if(this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].put(w,v,u);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(w,v,u))}unhook(w,v=!0){if(this._active.length){let u=!1,o=this._active.length-1,s=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,u=v,s=this._stack.fallThrough,this._stack.paused=!1),!s&&u===!1){for(;o>=0&&(u=this._active[o].unhook(w),u!==!0);o--)if(u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,u;o--}for(;o>=0;o--)if(u=this._active[o].unhook(!1),u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,u}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const S=new g.Params;S.addParam(0),a.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=S,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():S,this._data="",this._hitLimit=!1}put(w,v,u){this._hitLimit||(this._data+=(0,f.utf32ToString)(w,v,u),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let v=!1;if(this._hitLimit)v=!1;else if(w&&(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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const f=c(844),g=c(8742),d=c(6242),p=c(6351);class S{constructor(o){this.table=new Uint8Array(o)}setDefault(o,s){this.table.fill(o<<4|s)}add(o,s,l,_){this.table[s<<8|o]=l<<4|_}addMany(o,s,l,_){for(let C=0;C<o.length;C++)this.table[s<<8|o[C]]=l<<4|_}}a.TransitionTable=S;const w=160;a.VT500_TRANSITION_TABLE=function(){const u=new S(4095),o=Array.apply(null,Array(256)).map((k,y)=>y),s=(k,y)=>o.slice(k,y),l=s(32,127),_=s(0,24);_.push(25),_.push.apply(_,s(28,32));const C=s(0,14);let x;for(x in u.setDefault(1,0),u.addMany(l,0,2,0),C)u.addMany([24,26,153,154],x,3,0),u.addMany(s(128,144),x,3,0),u.addMany(s(144,152),x,3,0),u.add(156,x,0,0),u.add(27,x,11,1),u.add(157,x,4,8),u.addMany([152,158,159],x,0,7),u.add(155,x,11,3),u.add(144,x,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(l,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(l,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(l,13,13,13),u.add(127,13,0,13),u.addMany([27,156,24,26],13,14,0),u.add(w,0,2,0),u.add(w,8,5,8),u.add(w,6,0,6),u.add(w,11,0,11),u.add(w,13,13,13),u}();class v extends f.Disposable{constructor(o=a.VT500_TRANSITION_TABLE){super(),this._transitions=o,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new g.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(s,l,_)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,l)=>{},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 d.OscParser),this._dcsParser=this.register(new p.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(o,s=[64,126]){let l=0;if(o.prefix){if(o.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=o.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(o.intermediates){if(o.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<o.intermediates.length;++C){const x=o.intermediates.charCodeAt(C);if(32>x||x>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=x}}if(o.final.length!==1)throw new Error("final must be a single byte");const _=o.final.charCodeAt(0);if(s[0]>_||_>s[1])throw new Error(`final must be in range ${s[0]} .. ${s[1]}`);return l<<=8,l|=_,l}identToString(o){const s=[];for(;o;)s.push(String.fromCharCode(255&o)),o>>=8;return s.reverse().join("")}setPrintHandler(o){this._printHandler=o}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(o,s){const l=this._identifier(o,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const _=this._escHandlers[l];return _.push(s),{dispose:()=>{const C=_.indexOf(s);C!==-1&&_.splice(C,1)}}}clearEscHandler(o){this._escHandlers[this._identifier(o,[48,126])]&&delete this._escHandlers[this._identifier(o,[48,126])]}setEscHandlerFallback(o){this._escHandlerFb=o}setExecuteHandler(o,s){this._executeHandlers[o.charCodeAt(0)]=s}clearExecuteHandler(o){this._executeHandlers[o.charCodeAt(0)]&&delete this._executeHandlers[o.charCodeAt(0)]}setExecuteHandlerFallback(o){this._executeHandlerFb=o}registerCsiHandler(o,s){const l=this._identifier(o);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const _=this._csiHandlers[l];return _.push(s),{dispose:()=>{const C=_.indexOf(s);C!==-1&&_.splice(C,1)}}}clearCsiHandler(o){this._csiHandlers[this._identifier(o)]&&delete this._csiHandlers[this._identifier(o)]}setCsiHandlerFallback(o){this._csiHandlerFb=o}registerDcsHandler(o,s){return this._dcsParser.registerHandler(this._identifier(o),s)}clearDcsHandler(o){this._dcsParser.clearHandler(this._identifier(o))}setDcsHandlerFallback(o){this._dcsParser.setHandlerFallback(o)}registerOscHandler(o,s){return this._oscParser.registerHandler(o,s)}clearOscHandler(o){this._oscParser.clearHandler(o)}setOscHandlerFallback(o){this._oscParser.setHandlerFallback(o)}setErrorHandler(o){this._errorHandler=o}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(o,s,l,_,C){this._parseStack.state=o,this._parseStack.handlers=s,this._parseStack.handlerPos=l,this._parseStack.transition=_,this._parseStack.chunkPos=C}parse(o,s,l){let _,C=0,x=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const y=this._parseStack.handlers;let b=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&b>-1){for(;b>=0&&(_=y[b](this._params),_!==!0);b--)if(_ instanceof Promise)return this._parseStack.handlerPos=b,_}this._parseStack.handlers=[];break;case 4:if(l===!1&&b>-1){for(;b>=0&&(_=y[b](),_!==!0);b--)if(_ instanceof Promise)return this._parseStack.handlerPos=b,_}this._parseStack.handlers=[];break;case 6:if(C=o[this._parseStack.chunkPos],_=this._dcsParser.unhook(C!==24&&C!==26,l),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=o[this._parseStack.chunkPos],_=this._oscParser.end(C!==24&&C!==26,l),_)return _;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,k=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let y=k;y<s;++y){switch(C=o[y],x=this._transitions.table[this.currentState<<8|(C<160?C:w)],x>>4){case 2:for(let T=y+1;;++T){if(T>=s||(C=o[T])<32||C>126&&C<w){this._printHandler(o,y,T),y=T-1;break}if(++T>=s||(C=o[T])<32||C>126&&C<w){this._printHandler(o,y,T),y=T-1;break}if(++T>=s||(C=o[T])<32||C>126&&C<w){this._printHandler(o,y,T),y=T-1;break}if(++T>=s||(C=o[T])<32||C>126&&C<w){this._printHandler(o,y,T),y=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:y,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const b=this._csiHandlers[this._collect<<8|C];let R=b?b.length-1:-1;for(;R>=0&&(_=b[R](this._params),_!==!0);R--)if(_ instanceof Promise)return this._preserveStack(3,b,R,x,y),_;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(++y<s&&(C=o[y])>47&&C<60);y--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const M=this._escHandlers[this._collect<<8|C];let B=M?M.length-1:-1;for(;B>=0&&(_=M[B](),_!==!0);B--)if(_ instanceof Promise)return this._preserveStack(4,M,B,x,y),_;B<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=y+1;;++T)if(T>=s||(C=o[T])===24||C===26||C===27||C>127&&C<w){this._dcsParser.put(o,y,T),y=T-1;break}break;case 14:if(_=this._dcsParser.unhook(C!==24&&C!==26),_)return this._preserveStack(6,[],0,x,y),_;C===27&&(x|=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=y+1;;T++)if(T>=s||(C=o[T])<32||C>127&&C<w){this._oscParser.put(o,y,T),y=T-1;break}break;case 6:if(_=this._oscParser.end(C!==24&&C!==26),_)return this._preserveStack(5,[],0,x,y),_;C===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&x}}}a.EscapeSequenceParser=v},6242:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const f=c(5770),g=c(482),d=[];a.OscParser=class{constructor(){this._state=0,this._active=d,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 w=this._handlers[p];return w.push(S),{dispose:()=>{const v=w.indexOf(S);v!==-1&&w.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=d}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=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,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,w){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(p,S,w);else this._handlerFb(this._id,"PUT",(0,g.utf32ToString)(p,S,w))}start(){this.reset(),this._state=1}put(p,S,w){if(this._state!==3){if(this._state===1)for(;S<w;){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&&w-S>0&&this._put(p,S,w)}}end(p,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,v=this._active.length-1,u=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,w=S,u=this._stack.fallThrough,this._stack.paused=!1),!u&&w===!1){for(;v>=0&&(w=this._active[v].end(p),w!==!0);v--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,w;v--}for(;v>=0;v--)if(w=this._active[v].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",p);this._active=d,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(p){this._handler=p,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(p,S,w){this._hitLimit||(this._data+=(0,g.utf32ToString)(p,S,w),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(w=>(this._data="",this._hitLimit=!1,w));return this._data="",this._hitLimit=!1,S}}},8742:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class f{static fromArray(d){const p=new f;if(!d.length)return p;for(let S=Array.isArray(d[0])?1:0;S<d.length;++S){const w=d[S];if(Array.isArray(w))for(let v=0;v<w.length;++v)p.addSubParam(w[v]);else p.addParam(w)}return p}constructor(d=32,p=32){if(this.maxLength=d,this.maxSubParamsLength=p,p>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(p),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new f(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let p=0;p<this.length;++p){d.push(this.params[p]);const S=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-S>0&&d.push(Array.prototype.slice.call(this._subParams,S,w))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>c?c:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>c?c:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const p=this._subParamsIdx[d]>>8,S=255&this._subParamsIdx[d];return S-p>0?this._subParams.subarray(p,S):null}getSubParamsAll(){const d={};for(let p=0;p<this.length;++p){const S=this._subParamsIdx[p]>>8,w=255&this._subParamsIdx[p];w-S>0&&(d[p]=this._subParams.slice(S,w))}return d}addDigit(d){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,w=S[p-1];S[p-1]=~w?Math.min(10*w+d,c):d}}a.Params=f},5741:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.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 g={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(g),f.dispose=()=>this._wrappedAddonDispose(g),f.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let f=-1;for(let g=0;g<this._addons.length;g++)if(this._addons[g]===c){f=g;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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const f=c(3785),g=c(511);a.BufferApiView=class{constructor(d,p){this._buffer=d,this.type=p}init(d){return this._buffer=d,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(d){const p=this._buffer.lines.get(d);if(p)return new f.BufferLineApiView(p)}getNullCell(){return new g.CellData}}},3785:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const f=c(511);a.BufferLineApiView=class{constructor(g){this._line=g}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(g,d){if(!(g<0||g>=this._line.length))return d?(this._line.loadCell(g,d),d):this._line.loadCell(g,new f.CellData)}translateToString(g,d,p){return this._line.translateToString(g,d,p)}}},8285:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const f=c(8771),g=c(8460),d=c(844);class p extends d.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new g.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)}}a.BufferNamespaceApi=p},7975:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,f){return this._core.registerCsiHandler(c,g=>f(g.toArray()))}addCsiHandler(c,f){return this.registerCsiHandler(c,f)}registerDcsHandler(c,f){return this._core.registerDcsHandler(c,(g,d)=>f(g,d.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:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.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(m,a,c){var f=this&&this.__decorate||function(u,o,s,l){var _,C=arguments.length,x=C<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(u,o,s,l);else for(var k=u.length-1;k>=0;k--)(_=u[k])&&(x=(C<3?_(x):C>3?_(o,s,x):_(o,s))||x);return C>3&&x&&Object.defineProperty(o,s,x),x},g=this&&this.__param||function(u,o){return function(s,l){o(s,l,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const d=c(8460),p=c(844),S=c(5295),w=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let v=a.BufferService=class extends p.Disposable{get buffer(){return this.buffers.active}constructor(u){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(u.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(u.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(u,this))}resize(u,o){this.cols=u,this.rows=o,this.buffers.resize(u,o),this._onResize.fire({cols:u,rows:o})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(u,o=!1){const s=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===u.fg&&l.getBg(0)===u.bg||(l=s.getBlankLine(u,o),this._cachedBlankLine=l),l.isWrapped=o;const _=s.ybase+s.scrollTop,C=s.ybase+s.scrollBottom;if(s.scrollTop===0){const x=s.lines.isFull;C===s.lines.length-1?x?s.lines.recycle().copyFrom(l):s.lines.push(l.clone()):s.lines.splice(C+1,0,l.clone()),x?this.isUserScrolling&&(s.ydisp=Math.max(s.ydisp-1,0)):(s.ybase++,this.isUserScrolling||s.ydisp++)}else{const x=C-_+1;s.lines.shiftElements(_+1,x-1,-1),s.lines.set(C,l.clone())}this.isUserScrolling||(s.ydisp=s.ybase),this._onScroll.fire(s.ydisp)}scrollLines(u,o,s){const l=this.buffer;if(u<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else u+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const _=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+u,l.ybase),0),_!==l.ydisp&&(o||this._onScroll.fire(l.ydisp))}};a.BufferService=v=f([g(0,w.IOptionsService)],v)},7994:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.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(m,a,c){var f=this&&this.__decorate||function(l,_,C,x){var k,y=arguments.length,b=y<3?_:x===null?x=Object.getOwnPropertyDescriptor(_,C):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,_,C,x);else for(var R=l.length-1;R>=0;R--)(k=l[R])&&(b=(y<3?k(b):y>3?k(_,C,b):k(_,C))||b);return y>3&&b&&Object.defineProperty(_,C,b),b},g=this&&this.__param||function(l,_){return function(C,x){_(C,x,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const d=c(2585),p=c(8460),S=c(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function v(l,_){let C=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(C|=64,C|=l.action):(C|=3&l.button,4&l.button&&(C|=64),8&l.button&&(C|=128),l.action===32?C|=32:l.action!==0||_||(C|=3)),C}const u=String.fromCharCode,o={DEFAULT:l=>{const _=[v(l,!1)+32,l.col+32,l.row+32];return _[0]>255||_[1]>255||_[2]>255?"":`\x1B[M${u(_[0])}${u(_[1])}${u(_[2])}`},SGR:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.col};${l.row}${_}`},SGR_PIXELS:l=>{const _=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.x};${l.y}${_}`}};let s=a.CoreMouseService=class extends S.Disposable{constructor(l,_){super(),this._bufferService=l,this._coreService=_,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new p.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(w))this.addProtocol(C,w[C]);for(const C of Object.keys(o))this.addEncoding(C,o[C]);this.reset()}addProtocol(l,_){this._protocols[l]=_}addEncoding(l,_){this._encodings[l]=_}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const _=this._encodings[this._activeEncoding](l);return _&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(_):this._coreService.triggerDataEvent(_,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,_,C){if(C){if(l.x!==_.x||l.y!==_.y)return!1}else if(l.col!==_.col||l.row!==_.row)return!1;return l.button===_.button&&l.action===_.action&&l.ctrl===_.ctrl&&l.alt===_.alt&&l.shift===_.shift}};a.CoreMouseService=s=f([g(0,d.IBufferService),g(1,d.ICoreService)],s)},6975:function(m,a,c){var f=this&&this.__decorate||function(s,l,_,C){var x,k=arguments.length,y=k<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,_):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,l,_,C);else for(var b=s.length-1;b>=0;b--)(x=s[b])&&(y=(k<3?x(y):k>3?x(l,_,y):x(l,_))||y);return k>3&&y&&Object.defineProperty(l,_,y),y},g=this&&this.__param||function(s,l){return function(_,C){l(_,C,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const d=c(1439),p=c(8460),S=c(844),w=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 o=a.CoreService=class extends S.Disposable{constructor(s,l,_){super(),this._bufferService=s,this._logService=l,this._optionsService=_,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new p.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new p.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new p.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new p.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(v),this.decPrivateModes=(0,d.clone)(u)}reset(){this.modes=(0,d.clone)(v),this.decPrivateModes=(0,d.clone)(u)}triggerDataEvent(s,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const _=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&_.ybase!==_.ydisp&&this._onRequestScrollToBottom.fire(),l&&this._onUserInput.fire(),this._logService.debug(`sending data "${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(l=>l.charCodeAt(0))),this._onBinary.fire(s))}};a.CoreService=o=f([g(0,w.IBufferService),g(1,w.ILogService),g(2,w.IOptionsService)],o)},9074:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const f=c(8055),g=c(8460),d=c(844),p=c(6106);let S=0,w=0;class v extends d.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 g.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new g.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>this.reset()))}registerDecoration(s){if(s.marker.isDisposed)return;const l=new u(s);if(l){const _=l.marker.onDispose(()=>l.dispose());l.onDispose(()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),_.dispose())}),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const s of this._decorations.values())s.dispose();this._decorations.clear()}*getDecorationsAtCell(s,l,_){let C=0,x=0;for(const k of this._decorations.getKeyIterator(l))C=k.options.x??0,x=C+(k.options.width??1),s>=C&&s<x&&(!_||(k.options.layer??"bottom")===_)&&(yield k)}forEachDecorationAtCell(s,l,_,C){this._decorations.forEachByKey(l,x=>{S=x.options.x??0,w=S+(x.options.width??1),s>=S&&s<w&&(!_||(x.options.layer??"bottom")===_)&&C(x)})}}a.DecorationService=v;class u extends d.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 g.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new g.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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const f=c(2585),g=c(8343);class d{constructor(...S){this._entries=new Map;for(const[w,v]of S)this.set(w,v)}set(S,w){const v=this._entries.get(S);return this._entries.set(S,w),v}forEach(S){for(const[w,v]of this._entries.entries())S(w,v)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}a.ServiceCollection=d,a.InstantiationService=class{constructor(){this._services=new d,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 w=(0,g.getServiceDependencies)(p).sort((o,s)=>o.index-s.index),v=[];for(const o of w){const s=this._services.get(o.id);if(!s)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${o.id}.`);v.push(s)}const u=w.length>0?w[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(m,a,c){var f=this&&this.__decorate||function(u,o,s,l){var _,C=arguments.length,x=C<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(u,o,s,l);else for(var k=u.length-1;k>=0;k--)(_=u[k])&&(x=(C<3?_(x):C>3?_(o,s,x):_(o,s))||x);return C>3&&x&&Object.defineProperty(o,s,x),x},g=this&&this.__param||function(u,o){return function(s,l){o(s,l,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const d=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 w,v=a.LogService=class extends d.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())),w=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(u){for(let o=0;o<u.length;o++)typeof u[o]=="function"&&(u[o]=u[o]())}_log(u,o,s){this._evalLazyOptionalParams(s),u.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+o,...s)}trace(u,...o){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,o)}debug(u,...o){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,o)}info(u,...o){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,o)}warn(u,...o){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,o)}error(u,...o){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,o)}};a.LogService=v=f([g(0,p.IOptionsService)],v),a.setTraceLogger=function(u){w=u},a.traceCall=function(u,o,s){if(typeof s.value!="function")throw new Error("not supported");const l=s.value;s.value=function(..._){if(w.logLevel!==p.LogLevelEnum.TRACE)return l.apply(this,_);w.trace(`GlyphRenderer#${l.name}(${_.map(x=>JSON.stringify(x)).join(", ")})`);const C=l.apply(this,_);return w.trace(`GlyphRenderer#${l.name} return`,C),C}}},7302:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const f=c(8460),g=c(844),d=c(6114);a.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:d.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 g.Disposable{constructor(v){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const u={...a.DEFAULT_OPTIONS};for(const o in v)if(o in u)try{const s=v[o];u[o]=this._sanitizeAndValidateOption(o,s)}catch(s){console.error(s)}this.rawOptions=u,this.options={...u},this._setupOptions(),this.register((0,g.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(v,u){return this.onOptionChange(o=>{o===v&&u(this.rawOptions[v])})}onMultipleOptionChange(v,u){return this.onOptionChange(o=>{v.indexOf(o)!==-1&&u()})}_setupOptions(){const v=o=>{if(!(o in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);return this.rawOptions[o]},u=(o,s)=>{if(!(o in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);s=this._sanitizeAndValidateOption(o,s),this.rawOptions[o]!==s&&(this.rawOptions[o]=s,this._onOptionChange.fire(o))};for(const o in this.rawOptions){const s={get:v.bind(this,o),set:u.bind(this,o)};Object.defineProperty(this.options,o,s)}}_sanitizeAndValidateOption(v,u){switch(v){case"cursorStyle":if(u||(u=a.DEFAULT_OPTIONS[v]),!function(o){return o==="block"||o==="underline"||o==="bar"}(u))throw new Error(`"${u}" is not a valid value for ${v}`);break;case"wordSeparator":u||(u=a.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof u=="number"&&1<=u&&u<=1e3)break;u=p.includes(u)?u:a.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}}a.OptionsService=S},2660:function(m,a,c){var f=this&&this.__decorate||function(S,w,v,u){var o,s=arguments.length,l=s<3?w:u===null?u=Object.getOwnPropertyDescriptor(w,v):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(S,w,v,u);else for(var _=S.length-1;_>=0;_--)(o=S[_])&&(l=(s<3?o(l):s>3?o(w,v,l):o(w,v))||l);return s>3&&l&&Object.defineProperty(w,v,l),l},g=this&&this.__param||function(S,w){return function(v,u){w(v,u,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const d=c(2585);let p=a.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const w=this._bufferService.buffer;if(S.id===void 0){const _=w.addMarker(w.ybase+w.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),o=this._entriesWithId.get(u);if(o)return this.addLineToLink(o.id,w.ybase+w.y),o.id;const s=w.addMarker(w.ybase+w.y),l={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(l,s)),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(S,w){const v=this._dataByLinkId.get(S);if(v&&v.lines.every(u=>u.line!==w)){const u=this._bufferService.buffer.addMarker(w);v.lines.push(u),u.onDispose(()=>this._removeMarkerFromLink(v,u))}}getLinkData(S){var w;return(w=this._dataByLinkId.get(S))==null?void 0:w.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,w){const v=S.lines.indexOf(w);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)))}};a.OscLinkService=p=f([g(0,d.IBufferService)],p)},8343:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(g){return g[f]||[]},a.createDecorator=function(g){if(a.serviceRegistry.has(g))return a.serviceRegistry.get(g);const d=function(p,S,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,u,o){u[c]===u?u[f].push({id:v,index:o}):(u[f]=[{id:v,index:o}],u[c]=u)})(d,p,w)};return d.toString=()=>g,a.serviceRegistry.set(g,d),d}},2585:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=c(8343);var g;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(g||(a.LogLevelEnum=g={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const f=c(8460),g=c(225);class d{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,w,v=!1){return(16777215&S)<<3|(3&w)<<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 g.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 w=0,v=0;const u=S.length;for(let o=0;o<u;++o){let s=S.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=u)return w+this.wcwidth(s);const C=S.charCodeAt(o);56320<=C&&C<=57343?s=1024*(s-55296)+C-56320+65536:w+=this.wcwidth(C)}const l=this.charProperties(s,v);let _=d.extractWidth(l);d.extractShouldJoin(l)&&(_-=d.extractWidth(v)),w+=_,v=l}return w}charProperties(S,w){return this._activeProvider.charProperties(S,w)}}a.UnicodeService=d}},i={};function n(m){var a=i[m];if(a!==void 0)return a.exports;var c=i[m]={exports:{}};return r[m].call(c.exports,c,c.exports,n),c.exports}var h={};return(()=>{var m=h;Object.defineProperty(m,"__esModule",{value:!0}),m.Terminal=void 0;const a=n(9042),c=n(3236),f=n(844),g=n(5741),d=n(8285),p=n(7975),S=n(7090),w=["cols","rows"];class v extends f.Disposable{constructor(o){super(),this._core=this.register(new c.Terminal(o)),this._addonManager=this.register(new g.AddonManager),this._publicOptions={...this._core.options};const s=_=>this._core.options[_],l=(_,C)=>{this._checkReadonlyOptions(_),this._core.options[_]=C};for(const _ in this._core.options){const C={get:s.bind(this,_),set:l.bind(this,_)};Object.defineProperty(this._publicOptions,_,C)}}_checkReadonlyOptions(o){if(w.includes(o))throw new Error(`Option "${o}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new p.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new 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 d.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const o=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:o.applicationCursorKeys,applicationKeypadMode:o.applicationKeypad,bracketedPasteMode:o.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:s,originMode:o.origin,reverseWraparoundMode:o.reverseWraparound,sendFocusMode:o.sendFocus,wraparoundMode:o.wraparound}}get options(){return this._publicOptions}set options(o){for(const s in o)this._publicOptions[s]=o[s]}blur(){this._core.blur()}focus(){this._core.focus()}input(o,s=!0){this._core.input(o,s)}resize(o,s){this._verifyIntegers(o,s),this._core.resize(o,s)}open(o){this._core.open(o)}attachCustomKeyEventHandler(o){this._core.attachCustomKeyEventHandler(o)}attachCustomWheelEventHandler(o){this._core.attachCustomWheelEventHandler(o)}registerLinkProvider(o){return this._core.registerLinkProvider(o)}registerCharacterJoiner(o){return this._checkProposedApi(),this._core.registerCharacterJoiner(o)}deregisterCharacterJoiner(o){this._checkProposedApi(),this._core.deregisterCharacterJoiner(o)}registerMarker(o=0){return this._verifyIntegers(o),this._core.registerMarker(o)}registerDecoration(o){return this._checkProposedApi(),this._verifyPositiveIntegers(o.x??0,o.width??0,o.height??0),this._core.registerDecoration(o)}hasSelection(){return this._core.hasSelection()}select(o,s,l){this._verifyIntegers(o,s,l),this._core.select(o,s,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(o,s){this._verifyIntegers(o,s),this._core.selectLines(o,s)}dispose(){super.dispose()}scrollLines(o){this._verifyIntegers(o),this._core.scrollLines(o)}scrollPages(o){this._verifyIntegers(o),this._core.scrollPages(o)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(o){this._verifyIntegers(o),this._core.scrollToLine(o)}clear(){this._core.clear()}write(o,s){this._core.write(o,s)}writeln(o,s){this._core.write(o),this._core.write(`\r
|
|
64
|
-
`,s)}paste(o){this._core.paste(o)}refresh(o,s){this._verifyIntegers(o,s),this._core.refresh(o,s)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(o){this._addonManager.loadAddon(this,o)}static get strings(){return a}_verifyIntegers(...o){for(const s of o)if(s===1/0||isNaN(s)||s%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...o){for(const s of o)if(s&&(s===1/0||isNaN(s)||s%1!=0||s<0))throw new Error("This API only accepts positive integers")}}m.Terminal=v})(),h})())})(
|
|
65
|
-
`}),!1;if(
|
|
62
|
+
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(y){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame(()=>this._refresh())),o.isLinux&&y&&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(y){const b=this._getMouseBufferCoords(y),R=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!!(R&&M&&b)&&this._areCoordsInSelection(b,R,M)}isCellInSelection(y,b){const R=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!R||!M)&&this._areCoordsInSelection([y,b],R,M)}_areCoordsInSelection(y,b,R){return y[1]>b[1]&&y[1]<R[1]||b[1]===R[1]&&y[1]===b[1]&&y[0]>=b[0]&&y[0]<R[0]||b[1]<R[1]&&y[1]===R[1]&&y[0]<R[0]||b[1]<R[1]&&y[1]===b[1]&&y[0]>=b[0]}_selectWordAtCursor(y,b){var B,T;const R=(T=(B=this._linkifier.currentLink)==null?void 0:B.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 M=this._getMouseBufferCoords(y);return!!M&&(this._selectWordAt(M,b),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(y,b){this._model.clearSelection(),y=Math.max(y,0),b=Math.min(b,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,y],this._model.selectionEnd=[this._bufferService.cols,b],this.refresh(),this._onSelectionChange.fire()}_handleTrim(y){this._model.handleTrim(y)&&this.refresh()}_getMouseBufferCoords(y){const b=this._mouseService.getCoords(y,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(b)return b[0]--,b[1]--,b[1]+=this._bufferService.buffer.ydisp,b}_getMouseEventScrollAmount(y){let b=(0,d.getCoordsRelativeToElement)(this._coreBrowserService.window,y,this._screenElement)[1];const R=this._renderService.dimensions.css.canvas.height;return b>=0&&b<=R?0:(b>R&&(b-=R),b=Math.min(Math.max(b,-50),50),b/=50,b/Math.abs(b)+Math.round(14*b))}shouldForceSelection(y){return o.isMac?y.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:y.shiftKey}handleMouseDown(y){if(this._mouseDownTimeStamp=y.timeStamp,(y.button!==2||!this.hasSelection)&&y.button===0){if(!this._enabled){if(!this.shouldForceSelection(y))return;y.stopPropagation()}y.preventDefault(),this._dragScrollAmount=0,this._enabled&&y.shiftKey?this._handleIncrementalClick(y):y.detail===1?this._handleSingleClick(y):y.detail===2?this._handleDoubleClick(y):y.detail===3&&this._handleTripleClick(y),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(y){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(y))}_handleSingleClick(y){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(y)?3:0,this._model.selectionStart=this._getMouseBufferCoords(y),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const b=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);b&&b.length!==this._model.selectionStart[0]&&b.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(y){this._selectWordAtCursor(y,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(y){const b=this._getMouseBufferCoords(y);b&&(this._activeSelectionMode=2,this._selectLineAt(b[1]))}shouldColumnSelect(y){return y.altKey&&!(o.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(y){if(y.stopImmediatePropagation(),!this._model.selectionStart)return;const b=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(y),!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(y),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 M=R.lines.get(this._model.selectionEnd[1]);M&&M.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}b&&b[0]===this._model.selectionEnd[0]&&b[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 y=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(y.ydisp+this._bufferService.rows,y.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=y.ydisp),this.refresh()}}_handleMouseUp(y){const b=y.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&b<500&&y.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const R=this._mouseService.getCoords(y,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(R&&R[0]!==void 0&&R[1]!==void 0){const M=(0,_.moveToCellSequence)(R[0]-1,R[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(M,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const y=this._model.finalSelectionStart,b=this._model.finalSelectionEnd,R=!(!y||!b||y[0]===b[0]&&y[1]===b[1]);R?y&&b&&(this._oldSelectionStart&&this._oldSelectionEnd&&y[0]===this._oldSelectionStart[0]&&y[1]===this._oldSelectionStart[1]&&b[0]===this._oldSelectionEnd[0]&&b[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(y,b,R)):this._oldHasSelection&&this._fireOnSelectionChange(y,b,R)}_fireOnSelectionChange(y,b,R){this._oldSelectionStart=y,this._oldSelectionEnd=b,this._oldHasSelection=R,this._onSelectionChange.fire()}_handleBufferActivate(y){this.clearSelection(),this._trimListener.dispose(),this._trimListener=y.activeBuffer.lines.onTrim(b=>this._handleTrim(b))}_convertViewportColToCharacterIndex(y,b){let R=b;for(let M=0;b>=M;M++){const B=y.loadCell(M,this._workCell).getChars().length;this._workCell.getWidth()===0?R--:B>1&&b!==M&&(R+=B-1)}return R}setSelection(y,b,R){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[y,b],this._model.selectionStartLength=R,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(y){this._isClickInSelection(y)||(this._selectWordAtCursor(y,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(y,b,R=!0,M=!0){if(y[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,T=B.lines.get(y[1]);if(!T)return;const N=B.translateBufferLineToString(y[1],!1);let F=this._convertViewportColToCharacterIndex(T,y[0]),K=F;const q=y[0]-F;let j=0,E=0,D=0,P=0;if(N.charAt(F)===" "){for(;F>0&&N.charAt(F-1)===" ";)F--;for(;K<N.length&&N.charAt(K+1)===" ";)K++}else{let V=y[0],J=y[0];T.getWidth(V)===0&&(j++,V--),T.getWidth(J)===2&&(E++,J++);const Z=T.getString(J).length;for(Z>1&&(P+=Z-1,K+=Z-1);V>0&&F>0&&!this._isCharWordSeparator(T.loadCell(V-1,this._workCell));){T.loadCell(V-1,this._workCell);const I=this._workCell.getChars().length;this._workCell.getWidth()===0?(j++,V--):I>1&&(D+=I-1,F-=I-1),F--,V--}for(;J<T.length&&K+1<N.length&&!this._isCharWordSeparator(T.loadCell(J+1,this._workCell));){T.loadCell(J+1,this._workCell);const I=this._workCell.getChars().length;this._workCell.getWidth()===2?(E++,J++):I>1&&(P+=I-1,K+=I-1),K++,J++}}K++;let O=F+q-j+D,W=Math.min(this._bufferService.cols,K-F+j+E-D-P);if(b||N.slice(F,K).trim()!==""){if(R&&O===0&&T.getCodePoint(0)!==32){const V=B.lines.get(y[1]-1);if(V&&T.isWrapped&&V.getCodePoint(this._bufferService.cols-1)!==32){const J=this._getWordAt([this._bufferService.cols-1,y[1]-1],!1,!0,!1);if(J){const Z=this._bufferService.cols-J.start;O-=Z,W+=Z}}}if(M&&O+W===this._bufferService.cols&&T.getCodePoint(this._bufferService.cols-1)!==32){const V=B.lines.get(y[1]+1);if(V!=null&&V.isWrapped&&V.getCodePoint(0)!==32){const J=this._getWordAt([0,y[1]+1],!1,!1,!0);J&&(W+=J.length)}}return{start:O,length:W}}}_selectWordAt(y,b){const R=this._getWordAt(y,b);if(R){for(;R.start<0;)R.start+=this._bufferService.cols,y[1]--;this._model.selectionStart=[R.start,y[1]],this._model.selectionStartLength=R.length}}_selectToWordAt(y){const b=this._getWordAt(y,!0);if(b){let R=y[1];for(;b.start<0;)b.start+=this._bufferService.cols,R--;if(!this._model.areSelectionValuesReversed())for(;b.start+b.length>this._bufferService.cols;)b.length-=this._bufferService.cols,R++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?b.start:b.start+b.length,R]}}_isCharWordSeparator(y){return y.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(y.getChars())>=0}_selectLineAt(y){const b=this._bufferService.buffer.getWrappedRangeForLine(y),R={start:{x:0,y:b.first},end:{x:this._bufferService.cols-1,y:b.last}};this._model.selectionStart=[0,b.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,s.getRangeLength)(R,this._bufferService.cols)}};a.SelectionService=k=f([g(3,p.IBufferService),g(4,p.ICoreService),g(5,w.IMouseService),g(6,p.IOptionsService),g(7,w.IRenderService),g(8,w.ICoreBrowserService)],k)},4725:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ILinkProviderService=a.IThemeService=a.ICharacterJoinerService=a.ISelectionService=a.IRenderService=a.IMouseService=a.ICoreBrowserService=a.ICharSizeService=void 0;const f=c(8343);a.ICharSizeService=(0,f.createDecorator)("CharSizeService"),a.ICoreBrowserService=(0,f.createDecorator)("CoreBrowserService"),a.IMouseService=(0,f.createDecorator)("MouseService"),a.IRenderService=(0,f.createDecorator)("RenderService"),a.ISelectionService=(0,f.createDecorator)("SelectionService"),a.ICharacterJoinerService=(0,f.createDecorator)("CharacterJoinerService"),a.IThemeService=(0,f.createDecorator)("ThemeService"),a.ILinkProviderService=(0,f.createDecorator)("LinkProviderService")},6731:function(m,a,c){var f=this&&this.__decorate||function(k,y,b,R){var M,B=arguments.length,T=B<3?y:R===null?R=Object.getOwnPropertyDescriptor(y,b):R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(k,y,b,R);else for(var N=k.length-1;N>=0;N--)(M=k[N])&&(T=(B<3?M(T):B>3?M(y,b,T):M(y,b))||T);return B>3&&T&&Object.defineProperty(y,b,T),T},g=this&&this.__param||function(k,y){return function(b,R){y(b,R,k)}};Object.defineProperty(a,"__esModule",{value:!0}),a.ThemeService=a.DEFAULT_ANSI_COLORS=void 0;const d=c(7239),_=c(8055),S=c(8460),w=c(844),v=c(2585),u=_.css.toColor("#ffffff"),o=_.css.toColor("#000000"),s=_.css.toColor("#ffffff"),l=_.css.toColor("#000000"),p={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};a.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const k=[_.css.toColor("#2e3436"),_.css.toColor("#cc0000"),_.css.toColor("#4e9a06"),_.css.toColor("#c4a000"),_.css.toColor("#3465a4"),_.css.toColor("#75507b"),_.css.toColor("#06989a"),_.css.toColor("#d3d7cf"),_.css.toColor("#555753"),_.css.toColor("#ef2929"),_.css.toColor("#8ae234"),_.css.toColor("#fce94f"),_.css.toColor("#729fcf"),_.css.toColor("#ad7fa8"),_.css.toColor("#34e2e2"),_.css.toColor("#eeeeec")],y=[0,95,135,175,215,255];for(let b=0;b<216;b++){const R=y[b/36%6|0],M=y[b/6%6|0],B=y[b%6];k.push({css:_.channels.toCss(R,M,B),rgba:_.channels.toRgba(R,M,B)})}for(let b=0;b<24;b++){const R=8+10*b;k.push({css:_.channels.toCss(R,R,R),rgba:_.channels.toRgba(R,R,R)})}return k})());let C=a.ThemeService=class extends w.Disposable{get colors(){return this._colors}constructor(k){super(),this._optionsService=k,this._contrastCache=new d.ColorContrastCache,this._halfContrastCache=new d.ColorContrastCache,this._onChangeColors=this.register(new S.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:u,background:o,cursor:s,cursorAccent:l,selectionForeground:void 0,selectionBackgroundTransparent:p,selectionBackgroundOpaque:_.color.blend(o,p),selectionInactiveBackgroundTransparent:p,selectionInactiveBackgroundOpaque:_.color.blend(o,p),ansi:a.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 y=this._colors;if(y.foreground=x(k.foreground,u),y.background=x(k.background,o),y.cursor=x(k.cursor,s),y.cursorAccent=x(k.cursorAccent,l),y.selectionBackgroundTransparent=x(k.selectionBackground,p),y.selectionBackgroundOpaque=_.color.blend(y.background,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundTransparent=x(k.selectionInactiveBackground,y.selectionBackgroundTransparent),y.selectionInactiveBackgroundOpaque=_.color.blend(y.background,y.selectionInactiveBackgroundTransparent),y.selectionForeground=k.selectionForeground?x(k.selectionForeground,_.NULL_COLOR):void 0,y.selectionForeground===_.NULL_COLOR&&(y.selectionForeground=void 0),_.color.isOpaque(y.selectionBackgroundTransparent)&&(y.selectionBackgroundTransparent=_.color.opacity(y.selectionBackgroundTransparent,.3)),_.color.isOpaque(y.selectionInactiveBackgroundTransparent)&&(y.selectionInactiveBackgroundTransparent=_.color.opacity(y.selectionInactiveBackgroundTransparent,.3)),y.ansi=a.DEFAULT_ANSI_COLORS.slice(),y.ansi[0]=x(k.black,a.DEFAULT_ANSI_COLORS[0]),y.ansi[1]=x(k.red,a.DEFAULT_ANSI_COLORS[1]),y.ansi[2]=x(k.green,a.DEFAULT_ANSI_COLORS[2]),y.ansi[3]=x(k.yellow,a.DEFAULT_ANSI_COLORS[3]),y.ansi[4]=x(k.blue,a.DEFAULT_ANSI_COLORS[4]),y.ansi[5]=x(k.magenta,a.DEFAULT_ANSI_COLORS[5]),y.ansi[6]=x(k.cyan,a.DEFAULT_ANSI_COLORS[6]),y.ansi[7]=x(k.white,a.DEFAULT_ANSI_COLORS[7]),y.ansi[8]=x(k.brightBlack,a.DEFAULT_ANSI_COLORS[8]),y.ansi[9]=x(k.brightRed,a.DEFAULT_ANSI_COLORS[9]),y.ansi[10]=x(k.brightGreen,a.DEFAULT_ANSI_COLORS[10]),y.ansi[11]=x(k.brightYellow,a.DEFAULT_ANSI_COLORS[11]),y.ansi[12]=x(k.brightBlue,a.DEFAULT_ANSI_COLORS[12]),y.ansi[13]=x(k.brightMagenta,a.DEFAULT_ANSI_COLORS[13]),y.ansi[14]=x(k.brightCyan,a.DEFAULT_ANSI_COLORS[14]),y.ansi[15]=x(k.brightWhite,a.DEFAULT_ANSI_COLORS[15]),k.extendedAnsi){const b=Math.min(y.ansi.length-16,k.extendedAnsi.length);for(let R=0;R<b;R++)y.ansi[R+16]=x(k.extendedAnsi[R],a.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 y=0;y<this._restoreColors.ansi.length;++y)this._colors.ansi[y]=this._restoreColors.ansi[y]}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 x(k,y){if(k!==void 0)try{return _.css.toColor(k)}catch{}return y}a.ThemeService=C=f([g(0,v.IOptionsService)],C)},6349:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CircularList=void 0;const f=c(8460),g=c(844);class d extends g.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 w=new Array(S);for(let v=0;v<Math.min(S,this.length);v++)w[v]=this._array[this._getCyclicIndex(v)];this._array=w,this._maxLength=S,this._startIndex=0}get length(){return this._length}set length(S){if(S>this._length)for(let w=this._length;w<S;w++)this._array[w]=void 0;this._length=S}get(S){return this._array[this._getCyclicIndex(S)]}set(S,w){this._array[this._getCyclicIndex(S)]=w}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,w,...v){if(w){for(let u=S;u<this._length-w;u++)this._array[this._getCyclicIndex(u)]=this._array[this._getCyclicIndex(u+w)];this._length-=w,this.onDeleteEmitter.fire({index:S,amount:w})}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,w,v){if(!(w<=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 o=w-1;o>=0;o--)this.set(S+o+v,this.get(S+o));const u=S+w+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<w;u++)this.set(S+u+v,this.get(S+u))}}_getCyclicIndex(S){return(this._startIndex+S)%this._maxLength}}a.CircularList=d},1439:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.clone=void 0,a.clone=function c(f,g=5){if(typeof f!="object")return f;const d=Array.isArray(f)?[]:{};for(const _ in f)d[_]=g<=1?f[_]:f[_]&&c(f[_],g-1);return d}},8055:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.contrastRatio=a.toPaddedHex=a.rgba=a.rgb=a.css=a.color=a.channels=a.NULL_COLOR=void 0;let c=0,f=0,g=0,d=0;var _,S,w,v,u;function o(l){const p=l.toString(16);return p.length<2?"0"+p:p}function s(l,p){return l<p?(p+.05)/(l+.05):(l+.05)/(p+.05)}a.NULL_COLOR={css:"#00000000",rgba:0},function(l){l.toCss=function(p,C,x,k){return k!==void 0?`#${o(p)}${o(C)}${o(x)}${o(k)}`:`#${o(p)}${o(C)}${o(x)}`},l.toRgba=function(p,C,x,k=255){return(p<<24|C<<16|x<<8|k)>>>0},l.toColor=function(p,C,x,k){return{css:l.toCss(p,C,x,k),rgba:l.toRgba(p,C,x,k)}}}(_||(a.channels=_={})),function(l){function p(C,x){return d=Math.round(255*x),[c,f,g]=u.toChannels(C.rgba),{css:_.toCss(c,f,g,d),rgba:_.toRgba(c,f,g,d)}}l.blend=function(C,x){if(d=(255&x.rgba)/255,d===1)return{css:x.css,rgba:x.rgba};const k=x.rgba>>24&255,y=x.rgba>>16&255,b=x.rgba>>8&255,R=C.rgba>>24&255,M=C.rgba>>16&255,B=C.rgba>>8&255;return c=R+Math.round((k-R)*d),f=M+Math.round((y-M)*d),g=B+Math.round((b-B)*d),{css:_.toCss(c,f,g),rgba:_.toRgba(c,f,g)}},l.isOpaque=function(C){return(255&C.rgba)==255},l.ensureContrastRatio=function(C,x,k){const y=u.ensureContrastRatio(C.rgba,x.rgba,k);if(y)return _.toColor(y>>24&255,y>>16&255,y>>8&255)},l.opaque=function(C){const x=(255|C.rgba)>>>0;return[c,f,g]=u.toChannels(x),{css:_.toCss(c,f,g),rgba:x}},l.opacity=p,l.multiplyOpacity=function(C,x){return d=255&C.rgba,p(C,d*x/255)},l.toColorRGB=function(C){return[C.rgba>>24&255,C.rgba>>16&255,C.rgba>>8&255]}}(S||(a.color=S={})),function(l){let p,C;try{const x=document.createElement("canvas");x.width=1,x.height=1;const k=x.getContext("2d",{willReadFrequently:!0});k&&(p=k,p.globalCompositeOperation="copy",C=p.createLinearGradient(0,0,1,1))}catch{}l.toColor=function(x){if(x.match(/#[\da-f]{3,8}/i))switch(x.length){case 4:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),g=parseInt(x.slice(3,4).repeat(2),16),_.toColor(c,f,g);case 5:return c=parseInt(x.slice(1,2).repeat(2),16),f=parseInt(x.slice(2,3).repeat(2),16),g=parseInt(x.slice(3,4).repeat(2),16),d=parseInt(x.slice(4,5).repeat(2),16),_.toColor(c,f,g,d);case 7:return{css:x,rgba:(parseInt(x.slice(1),16)<<8|255)>>>0};case 9:return{css:x,rgba:parseInt(x.slice(1),16)>>>0}}const k=x.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]),g=parseInt(k[3]),d=Math.round(255*(k[5]===void 0?1:parseFloat(k[5]))),_.toColor(c,f,g,d);if(!p||!C)throw new Error("css.toColor: Unsupported css format");if(p.fillStyle=C,p.fillStyle=x,typeof p.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(p.fillRect(0,0,1,1),[c,f,g,d]=p.getImageData(0,0,1,1).data,d!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:_.toRgba(c,f,g,d),css:x}}}(w||(a.css=w={})),function(l){function p(C,x,k){const y=C/255,b=x/255,R=k/255;return .2126*(y<=.03928?y/12.92:Math.pow((y+.055)/1.055,2.4))+.7152*(b<=.03928?b/12.92:Math.pow((b+.055)/1.055,2.4))+.0722*(R<=.03928?R/12.92:Math.pow((R+.055)/1.055,2.4))}l.relativeLuminance=function(C){return p(C>>16&255,C>>8&255,255&C)},l.relativeLuminance2=p}(v||(a.rgb=v={})),function(l){function p(x,k,y){const b=x>>24&255,R=x>>16&255,M=x>>8&255;let B=k>>24&255,T=k>>16&255,N=k>>8&255,F=s(v.relativeLuminance2(B,T,N),v.relativeLuminance2(b,R,M));for(;F<y&&(B>0||T>0||N>0);)B-=Math.max(0,Math.ceil(.1*B)),T-=Math.max(0,Math.ceil(.1*T)),N-=Math.max(0,Math.ceil(.1*N)),F=s(v.relativeLuminance2(B,T,N),v.relativeLuminance2(b,R,M));return(B<<24|T<<16|N<<8|255)>>>0}function C(x,k,y){const b=x>>24&255,R=x>>16&255,M=x>>8&255;let B=k>>24&255,T=k>>16&255,N=k>>8&255,F=s(v.relativeLuminance2(B,T,N),v.relativeLuminance2(b,R,M));for(;F<y&&(B<255||T<255||N<255);)B=Math.min(255,B+Math.ceil(.1*(255-B))),T=Math.min(255,T+Math.ceil(.1*(255-T))),N=Math.min(255,N+Math.ceil(.1*(255-N))),F=s(v.relativeLuminance2(B,T,N),v.relativeLuminance2(b,R,M));return(B<<24|T<<16|N<<8|255)>>>0}l.blend=function(x,k){if(d=(255&k)/255,d===1)return k;const y=k>>24&255,b=k>>16&255,R=k>>8&255,M=x>>24&255,B=x>>16&255,T=x>>8&255;return c=M+Math.round((y-M)*d),f=B+Math.round((b-B)*d),g=T+Math.round((R-T)*d),_.toRgba(c,f,g)},l.ensureContrastRatio=function(x,k,y){const b=v.relativeLuminance(x>>8),R=v.relativeLuminance(k>>8);if(s(b,R)<y){if(R<b){const T=p(x,k,y),N=s(b,v.relativeLuminance(T>>8));if(N<y){const F=C(x,k,y);return N>s(b,v.relativeLuminance(F>>8))?T:F}return T}const M=C(x,k,y),B=s(b,v.relativeLuminance(M>>8));if(B<y){const T=p(x,k,y);return B>s(b,v.relativeLuminance(T>>8))?M:T}return M}},l.reduceLuminance=p,l.increaseLuminance=C,l.toChannels=function(x){return[x>>24&255,x>>16&255,x>>8&255,255&x]}}(u||(a.rgba=u={})),a.toPaddedHex=o,a.contrastRatio=s},8969:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CoreTerminal=void 0;const f=c(844),g=c(2585),d=c(4348),_=c(7866),S=c(744),w=c(7302),v=c(6975),u=c(8460),o=c(1753),s=c(1480),l=c(7994),p=c(9282),C=c(5435),x=c(5981),k=c(2660);let y=!1;class b extends f.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new u.EventEmitter),this._onScroll.event(M=>{var B;(B=this._onScrollApi)==null||B.fire(M.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(M){for(const B in M)this.optionsService.options[B]=M[B]}constructor(M){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 d.InstantiationService,this.optionsService=this.register(new w.OptionsService(M)),this._instantiationService.setService(g.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(S.BufferService)),this._instantiationService.setService(g.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(_.LogService)),this._instantiationService.setService(g.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(v.CoreService)),this._instantiationService.setService(g.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(o.CoreMouseService)),this._instantiationService.setService(g.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(s.UnicodeService)),this._instantiationService.setService(g.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(l.CharsetService),this._instantiationService.setService(g.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(k.OscLinkService),this._instantiationService.setService(g.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(B=>{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(B=>{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 x.WriteBuffer((B,T)=>this._inputHandler.parse(B,T))),this.register((0,u.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(M,B){this._writeBuffer.write(M,B)}writeSync(M,B){this._logService.logLevel<=g.LogLevelEnum.WARN&&!y&&(this._logService.warn("writeSync is unreliable and will be removed soon."),y=!0),this._writeBuffer.writeSync(M,B)}input(M,B=!0){this.coreService.triggerDataEvent(M,B)}resize(M,B){isNaN(M)||isNaN(B)||(M=Math.max(M,S.MINIMUM_COLS),B=Math.max(B,S.MINIMUM_ROWS),this._bufferService.resize(M,B))}scroll(M,B=!1){this._bufferService.scroll(M,B)}scrollLines(M,B,T){this._bufferService.scrollLines(M,B,T)}scrollPages(M){this.scrollLines(M*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(M){const B=M-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(M,B){return this._inputHandler.registerEscHandler(M,B)}registerDcsHandler(M,B){return this._inputHandler.registerDcsHandler(M,B)}registerCsiHandler(M,B){return this._inputHandler.registerCsiHandler(M,B)}registerOscHandler(M,B){return this._inputHandler.registerOscHandler(M,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let M=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?M=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(M=!0),M?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const M=[];M.push(this.onLineFeed(p.updateWindowsModeWrappedState.bind(null,this._bufferService))),M.push(this.registerCsiHandler({final:"H"},()=>((0,p.updateWindowsModeWrappedState)(this._bufferService),!1))),this._windowsWrappingHeuristics.value=(0,f.toDisposable)(()=>{for(const B of M)B.dispose()})}}}a.CoreTerminal=b},8460:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.runAndSubscribe=a.forwardEvent=a.EventEmitter=void 0,a.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 g=[];for(let d=0;d<this._listeners.length;d++)g.push(this._listeners[d]);for(let d=0;d<g.length;d++)g[d].call(void 0,c,f)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},a.forwardEvent=function(c,f){return c(g=>f.fire(g))},a.runAndSubscribe=function(c,f){return f(void 0),c(g=>f(g))}},5435:function(m,a,c){var f=this&&this.__decorate||function(j,E,D,P){var O,W=arguments.length,V=W<3?E:P===null?P=Object.getOwnPropertyDescriptor(E,D):P;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(j,E,D,P);else for(var J=j.length-1;J>=0;J--)(O=j[J])&&(V=(W<3?O(V):W>3?O(E,D,V):O(E,D))||V);return W>3&&V&&Object.defineProperty(E,D,V),V},g=this&&this.__param||function(j,E){return function(D,P){E(D,P,j)}};Object.defineProperty(a,"__esModule",{value:!0}),a.InputHandler=a.WindowsOptionsReportType=void 0;const d=c(2584),_=c(7116),S=c(2015),w=c(844),v=c(482),u=c(8437),o=c(8460),s=c(643),l=c(511),p=c(3734),C=c(2585),x=c(1480),k=c(6242),y=c(6351),b=c(5941),R={"(":0,")":1,"*":2,"+":3,"-":1,".":2},M=131072;function B(j,E){if(j>24)return E.setWinLines||!1;switch(j){case 1:return!!E.restoreWin;case 2:return!!E.minimizeWin;case 3:return!!E.setWinPosition;case 4:return!!E.setWinSizePixels;case 5:return!!E.raiseWin;case 6:return!!E.lowerWin;case 7:return!!E.refreshWin;case 8:return!!E.setWinSizeChars;case 9:return!!E.maximizeWin;case 10:return!!E.fullscreenWin;case 11:return!!E.getWinState;case 13:return!!E.getWinPosition;case 14:return!!E.getWinSizePixels;case 15:return!!E.getScreenSizePixels;case 16:return!!E.getCellSizePixels;case 18:return!!E.getWinSizeChars;case 19:return!!E.getScreenSizeChars;case 20:return!!E.getIconTitle;case 21:return!!E.getWinTitle;case 22:return!!E.pushTitle;case 23:return!!E.popTitle;case 24:return!!E.setWinLines}return!1}var T;(function(j){j[j.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",j[j.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(T||(a.WindowsOptionsReportType=T={}));let N=0;class F extends w.Disposable{getAttrData(){return this._curAttrData}constructor(E,D,P,O,W,V,J,Z,I=new S.EscapeSequenceParser){super(),this._bufferService=E,this._charsetService=D,this._coreService=P,this._logService=O,this._optionsService=W,this._oscLinkService=V,this._coreMouseService=J,this._unicodeService=Z,this._parser=I,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new v.StringToUtf32,this._utf8Decoder=new v.Utf8ToUtf32,this._workCell=new l.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 o.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new o.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new o.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new o.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new o.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new o.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new o.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new o.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new o.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new o.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new o.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new o.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new o.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new K(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate(L=>this._activeBuffer=L.activeBuffer)),this._parser.setCsiHandlerFallback((L,U)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(L),params:U.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,U,H)=>{this._logService.debug("Unknown OSC code: ",{identifier:L,action:U,data:H})}),this._parser.setDcsHandlerFallback((L,U,H)=>{U==="HOOK"&&(H=H.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(L),action:U,payload:H})}),this._parser.setPrintHandler((L,U,H)=>this.print(L,U,H)),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(d.C0.BEL,()=>this.bell()),this._parser.setExecuteHandler(d.C0.LF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.VT,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.FF,()=>this.lineFeed()),this._parser.setExecuteHandler(d.C0.CR,()=>this.carriageReturn()),this._parser.setExecuteHandler(d.C0.BS,()=>this.backspace()),this._parser.setExecuteHandler(d.C0.HT,()=>this.tab()),this._parser.setExecuteHandler(d.C0.SO,()=>this.shiftOut()),this._parser.setExecuteHandler(d.C0.SI,()=>this.shiftIn()),this._parser.setExecuteHandler(d.C1.IND,()=>this.index()),this._parser.setExecuteHandler(d.C1.NEL,()=>this.nextLine()),this._parser.setExecuteHandler(d.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 _.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 y.DcsHandler((L,U)=>this.requestStatusString(L,U)))}_preserveStack(E,D,P,O){this._parseStack.paused=!0,this._parseStack.cursorStartX=E,this._parseStack.cursorStartY=D,this._parseStack.decodedLength=P,this._parseStack.position=O}_logSlowResolvingAsync(E){this._logService.logLevel<=C.LogLevelEnum.WARN&&Promise.race([E,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(E,D){let P,O=this._activeBuffer.x,W=this._activeBuffer.y,V=0;const J=this._parseStack.paused;if(J){if(P=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,D))return this._logSlowResolvingAsync(P),P;O=this._parseStack.cursorStartX,W=this._parseStack.cursorStartY,this._parseStack.paused=!1,E.length>M&&(V=this._parseStack.position+M)}if(this._logService.logLevel<=C.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof E=="string"?` "${E}"`:` "${Array.prototype.map.call(E,L=>String.fromCharCode(L)).join("")}"`),typeof E=="string"?E.split("").map(L=>L.charCodeAt(0)):E),this._parseBuffer.length<E.length&&this._parseBuffer.length<M&&(this._parseBuffer=new Uint32Array(Math.min(E.length,M))),J||this._dirtyRowTracker.clearRange(),E.length>M)for(let L=V;L<E.length;L+=M){const U=L+M<E.length?L+M:E.length,H=typeof E=="string"?this._stringDecoder.decode(E.substring(L,U),this._parseBuffer):this._utf8Decoder.decode(E.subarray(L,U),this._parseBuffer);if(P=this._parser.parse(this._parseBuffer,H))return this._preserveStack(O,W,H,L),this._logSlowResolvingAsync(P),P}else if(!J){const L=typeof E=="string"?this._stringDecoder.decode(E,this._parseBuffer):this._utf8Decoder.decode(E,this._parseBuffer);if(P=this._parser.parse(this._parseBuffer,L))return this._preserveStack(O,W,L,0),this._logSlowResolvingAsync(P),P}this._activeBuffer.x===O&&this._activeBuffer.y===W||this._onCursorMove.fire();const Z=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),I=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);I<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(I,this._bufferService.rows-1),Math.min(Z,this._bufferService.rows-1))}print(E,D,P){let O,W;const V=this._charsetService.charset,J=this._optionsService.rawOptions.screenReaderMode,Z=this._bufferService.cols,I=this._coreService.decPrivateModes.wraparound,L=this._coreService.modes.insertMode,U=this._curAttrData;let H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&P-D>0&&H.getWidth(this._activeBuffer.x-1)===2&&H.setCellFromCodepoint(this._activeBuffer.x-1,0,1,U);let X=this._parser.precedingJoinState;for(let G=D;G<P;++G){if(O=E[G],O<127&&V){const ne=V[String.fromCharCode(O)];ne&&(O=ne.charCodeAt(0))}const se=this._unicodeService.charProperties(O,X);W=x.UnicodeService.extractWidth(se);const z=x.UnicodeService.extractShouldJoin(se),re=z?x.UnicodeService.extractWidth(X):0;if(X=se,J&&this._onA11yChar.fire((0,v.stringFromCodePoint)(O)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+W-re>Z){if(I){const ne=H;let ee=this._activeBuffer.x-re;for(this._activeBuffer.x=re,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),H=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),re>0&&H instanceof u.BufferLine&&H.copyCellsFrom(ne,ee,0,re,!1);ee<Z;)ne.setCellFromCodepoint(ee++,0,1,U)}else if(this._activeBuffer.x=Z-1,W===2)continue}if(z&&this._activeBuffer.x){const ne=H.getWidth(this._activeBuffer.x-1)?1:2;H.addCodepointToCell(this._activeBuffer.x-ne,O,W);for(let ee=W-re;--ee>=0;)H.setCellFromCodepoint(this._activeBuffer.x++,0,0,U)}else if(L&&(H.insertCells(this._activeBuffer.x,W-re,this._activeBuffer.getNullCell(U)),H.getWidth(Z-1)===2&&H.setCellFromCodepoint(Z-1,s.NULL_CELL_CODE,s.NULL_CELL_WIDTH,U)),H.setCellFromCodepoint(this._activeBuffer.x++,O,W,U),W>0)for(;--W;)H.setCellFromCodepoint(this._activeBuffer.x++,0,0,U)}this._parser.precedingJoinState=X,this._activeBuffer.x<Z&&P-D>0&&H.getWidth(this._activeBuffer.x)===0&&!H.hasContent(this._activeBuffer.x)&&H.setCellFromCodepoint(this._activeBuffer.x,0,1,U),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(E,D){return E.final!=="t"||E.prefix||E.intermediates?this._parser.registerCsiHandler(E,D):this._parser.registerCsiHandler(E,P=>!B(P.params[0],this._optionsService.rawOptions.windowOptions)||D(P))}registerDcsHandler(E,D){return this._parser.registerDcsHandler(E,new y.DcsHandler(D))}registerEscHandler(E,D){return this._parser.registerEscHandler(E,D)}registerOscHandler(E,D){return this._parser.registerOscHandler(E,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 E;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&&((E=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&E.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 E=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-E),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(E=this._bufferService.cols-1){this._activeBuffer.x=Math.min(E,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(E,D){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=E,this._activeBuffer.y=this._activeBuffer.scrollTop+D):(this._activeBuffer.x=E,this._activeBuffer.y=D),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(E,D){this._restrictCursor(),this._setCursor(this._activeBuffer.x+E,this._activeBuffer.y+D)}cursorUp(E){const D=this._activeBuffer.y-this._activeBuffer.scrollTop;return D>=0?this._moveCursor(0,-Math.min(D,E.params[0]||1)):this._moveCursor(0,-(E.params[0]||1)),!0}cursorDown(E){const D=this._activeBuffer.scrollBottom-this._activeBuffer.y;return D>=0?this._moveCursor(0,Math.min(D,E.params[0]||1)):this._moveCursor(0,E.params[0]||1),!0}cursorForward(E){return this._moveCursor(E.params[0]||1,0),!0}cursorBackward(E){return this._moveCursor(-(E.params[0]||1),0),!0}cursorNextLine(E){return this.cursorDown(E),this._activeBuffer.x=0,!0}cursorPrecedingLine(E){return this.cursorUp(E),this._activeBuffer.x=0,!0}cursorCharAbsolute(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(E){return this._setCursor(E.length>=2?(E.params[1]||1)-1:0,(E.params[0]||1)-1),!0}charPosAbsolute(E){return this._setCursor((E.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(E){return this._moveCursor(E.params[0]||1,0),!0}linePosAbsolute(E){return this._setCursor(this._activeBuffer.x,(E.params[0]||1)-1),!0}vPositionRelative(E){return this._moveCursor(0,E.params[0]||1),!0}hVPosition(E){return this.cursorPosition(E),!0}tabClear(E){const D=E.params[0];return D===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:D===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=E.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(E){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let D=E.params[0]||1;for(;D--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(E){const D=E.params[0];return D===1&&(this._curAttrData.bg|=536870912),D!==2&&D!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(E,D,P,O=!1,W=!1){const V=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);V.replaceCells(D,P,this._activeBuffer.getNullCell(this._eraseAttrData()),W),O&&(V.isWrapped=!1)}_resetBufferLine(E,D=!1){const P=this._activeBuffer.lines.get(this._activeBuffer.ybase+E);P&&(P.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),D),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+E),P.isWrapped=!1)}eraseInDisplay(E,D=!1){let P;switch(this._restrictCursor(this._bufferService.cols),E.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 O=this._activeBuffer.lines.length-this._bufferService.rows;O>0&&(this._activeBuffer.lines.trimStart(O),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-O,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-O,0),this._onScroll.fire(0))}return!0}eraseInLine(E,D=!1){switch(this._restrictCursor(this._bufferService.cols),E.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(E){this._restrictCursor();let D=E.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,O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,W=this._bufferService.rows-1+this._activeBuffer.ybase-O+1;for(;D--;)this._activeBuffer.lines.splice(W-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(E){this._restrictCursor();let D=E.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 O;for(O=this._bufferService.rows-1-this._activeBuffer.scrollBottom,O=this._bufferService.rows-1+this._activeBuffer.ybase-O;D--;)this._activeBuffer.lines.splice(P,1),this._activeBuffer.lines.splice(O,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(E){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.insertCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(E){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.deleteCells(this._activeBuffer.x,E.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(E){let D=E.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(E){let D=E.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(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=E.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);O.deleteCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=E.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);O.insertCells(0,D,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=E.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);O.insertCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(E){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const D=E.params[0]||1;for(let P=this._activeBuffer.scrollTop;P<=this._activeBuffer.scrollBottom;++P){const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+P);O.deleteCells(this._activeBuffer.x,D,this._activeBuffer.getNullCell(this._eraseAttrData())),O.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(E){this._restrictCursor();const D=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return D&&(D.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(E.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(E){const D=this._parser.precedingJoinState;if(!D)return!0;const P=E.params[0]||1,O=x.UnicodeService.extractWidth(D),W=this._activeBuffer.x-O,V=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(W),J=new Uint32Array(V.length*P);let Z=0;for(let L=0;L<V.length;){const U=V.codePointAt(L)||0;J[Z++]=U,L+=U>65535?2:1}let I=Z;for(let L=1;L<P;++L)J.copyWithin(I,0,Z),I+=Z;return this.print(J,0,I),!0}sendDeviceAttributesPrimary(E){return E.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(d.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(d.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(E){return E.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(d.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(d.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(E.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(d.C0.ESC+"[>83;40003;0c")),!0}_is(E){return(this._optionsService.rawOptions.termName+"").indexOf(E)===0}setMode(E){for(let D=0;D<E.length;D++)switch(E.params[D]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(E){for(let D=0;D<E.length;D++)switch(E.params[D]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,_.DEFAULT_CHARSET),this._charsetService.setgCharset(1,_.DEFAULT_CHARSET),this._charsetService.setgCharset(2,_.DEFAULT_CHARSET),this._charsetService.setgCharset(3,_.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(E){for(let D=0;D<E.length;D++)switch(E.params[D]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(E){for(let D=0;D<E.length;D++)switch(E.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(),E.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(E,D){const P=this._coreService.decPrivateModes,{activeProtocol:O,activeEncoding:W}=this._coreMouseService,V=this._coreService,{buffers:J,cols:Z}=this._bufferService,{active:I,alt:L}=J,U=this._optionsService.rawOptions,H=z=>z?1:2,X=E.params[0];return G=X,se=D?X===2?4:X===4?H(V.modes.insertMode):X===12?3:X===20?H(U.convertEol):0:X===1?H(P.applicationCursorKeys):X===3?U.windowOptions.setWinLines?Z===80?2:Z===132?1:0:0:X===6?H(P.origin):X===7?H(P.wraparound):X===8?3:X===9?H(O==="X10"):X===12?H(U.cursorBlink):X===25?H(!V.isCursorHidden):X===45?H(P.reverseWraparound):X===66?H(P.applicationKeypad):X===67?4:X===1e3?H(O==="VT200"):X===1002?H(O==="DRAG"):X===1003?H(O==="ANY"):X===1004?H(P.sendFocus):X===1005?4:X===1006?H(W==="SGR"):X===1015?4:X===1016?H(W==="SGR_PIXELS"):X===1048?1:X===47||X===1047||X===1049?H(I===L):X===2004?H(P.bracketedPasteMode):0,V.triggerDataEvent(`${d.C0.ESC}[${D?"":"?"}${G};${se}$y`),!0;var G,se}_updateAttrColor(E,D,P,O,W){return D===2?(E|=50331648,E&=-16777216,E|=p.AttributeData.fromColorRGB([P,O,W])):D===5&&(E&=-50331904,E|=33554432|255&P),E}_extractColor(E,D,P){const O=[0,0,-1,0,0,0];let W=0,V=0;do{if(O[V+W]=E.params[D+V],E.hasSubParams(D+V)){const J=E.getSubParams(D+V);let Z=0;do O[1]===5&&(W=1),O[V+Z+1+W]=J[Z];while(++Z<J.length&&Z+V+1+W<O.length);break}if(O[1]===5&&V+W>=2||O[1]===2&&V+W>=5)break;O[1]&&(W=1)}while(++V+D<E.length&&V+W<O.length);for(let J=2;J<O.length;++J)O[J]===-1&&(O[J]=0);switch(O[0]){case 38:P.fg=this._updateAttrColor(P.fg,O[1],O[3],O[4],O[5]);break;case 48:P.bg=this._updateAttrColor(P.bg,O[1],O[3],O[4],O[5]);break;case 58:P.extended=P.extended.clone(),P.extended.underlineColor=this._updateAttrColor(P.extended.underlineColor,O[1],O[3],O[4],O[5])}return V}_processUnderline(E,D){D.extended=D.extended.clone(),(!~E||E>5)&&(E=1),D.extended.underlineStyle=E,D.fg|=268435456,E===0&&(D.fg&=-268435457),D.updateExtended()}_processSGR0(E){E.fg=u.DEFAULT_ATTR_DATA.fg,E.bg=u.DEFAULT_ATTR_DATA.bg,E.extended=E.extended.clone(),E.extended.underlineStyle=0,E.extended.underlineColor&=-67108864,E.updateExtended()}charAttributes(E){if(E.length===1&&E.params[0]===0)return this._processSGR0(this._curAttrData),!0;const D=E.length;let P;const O=this._curAttrData;for(let W=0;W<D;W++)P=E.params[W],P>=30&&P<=37?(O.fg&=-50331904,O.fg|=16777216|P-30):P>=40&&P<=47?(O.bg&=-50331904,O.bg|=16777216|P-40):P>=90&&P<=97?(O.fg&=-50331904,O.fg|=16777224|P-90):P>=100&&P<=107?(O.bg&=-50331904,O.bg|=16777224|P-100):P===0?this._processSGR0(O):P===1?O.fg|=134217728:P===3?O.bg|=67108864:P===4?(O.fg|=268435456,this._processUnderline(E.hasSubParams(W)?E.getSubParams(W)[0]:1,O)):P===5?O.fg|=536870912:P===7?O.fg|=67108864:P===8?O.fg|=1073741824:P===9?O.fg|=2147483648:P===2?O.bg|=134217728:P===21?this._processUnderline(2,O):P===22?(O.fg&=-134217729,O.bg&=-134217729):P===23?O.bg&=-67108865:P===24?(O.fg&=-268435457,this._processUnderline(0,O)):P===25?O.fg&=-536870913:P===27?O.fg&=-67108865:P===28?O.fg&=-1073741825:P===29?O.fg&=2147483647:P===39?(O.fg&=-67108864,O.fg|=16777215&u.DEFAULT_ATTR_DATA.fg):P===49?(O.bg&=-67108864,O.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):P===38||P===48||P===58?W+=this._extractColor(E,W,O):P===53?O.bg|=1073741824:P===55?O.bg&=-1073741825:P===59?(O.extended=O.extended.clone(),O.extended.underlineColor=-1,O.updateExtended()):P===100?(O.fg&=-67108864,O.fg|=16777215&u.DEFAULT_ATTR_DATA.fg,O.bg&=-67108864,O.bg|=16777215&u.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",P);return!0}deviceStatus(E){switch(E.params[0]){case 5:this._coreService.triggerDataEvent(`${d.C0.ESC}[0n`);break;case 6:const D=this._activeBuffer.y+1,P=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[${D};${P}R`)}return!0}deviceStatusPrivate(E){if(E.params[0]===6){const D=this._activeBuffer.y+1,P=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${d.C0.ESC}[?${D};${P}R`)}return!0}softReset(E){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(E){const D=E.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(E){const D=E.params[0]||1;let P;return(E.length<2||(P=E.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(E){if(!B(E.params[0],this._optionsService.rawOptions.windowOptions))return!0;const D=E.length>1?E.params[1]:0;switch(E.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(`${d.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(E){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(E){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(E){return this._windowTitle=E,this._onTitleChange.fire(E),!0}setIconName(E){return this._iconName=E,!0}setOrReportIndexedColor(E){const D=[],P=E.split(";");for(;P.length>1;){const O=P.shift(),W=P.shift();if(/^\d+$/.exec(O)){const V=parseInt(O);if(q(V))if(W==="?")D.push({type:0,index:V});else{const J=(0,b.parseColor)(W);J&&D.push({type:1,index:V,color:J})}}}return D.length&&this._onColor.fire(D),!0}setHyperlink(E){const D=E.split(";");return!(D.length<2)&&(D[1]?this._createHyperlink(D[0],D[1]):!D[0]&&this._finishHyperlink())}_createHyperlink(E,D){this._getCurrentLinkId()&&this._finishHyperlink();const P=E.split(":");let O;const W=P.findIndex(V=>V.startsWith("id="));return W!==-1&&(O=P[W].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:O,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(E,D){const P=E.split(";");for(let O=0;O<P.length&&!(D>=this._specialColors.length);++O,++D)if(P[O]==="?")this._onColor.fire([{type:0,index:this._specialColors[D]}]);else{const W=(0,b.parseColor)(P[O]);W&&this._onColor.fire([{type:1,index:this._specialColors[D],color:W}])}return!0}setOrReportFgColor(E){return this._setOrReportSpecialColor(E,0)}setOrReportBgColor(E){return this._setOrReportSpecialColor(E,1)}setOrReportCursorColor(E){return this._setOrReportSpecialColor(E,2)}restoreIndexedColor(E){if(!E)return this._onColor.fire([{type:2}]),!0;const D=[],P=E.split(";");for(let O=0;O<P.length;++O)if(/^\d+$/.exec(P[O])){const W=parseInt(P[O]);q(W)&&D.push({type:2,index:W})}return D.length&&this._onColor.fire(D),!0}restoreFgColor(E){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(E){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(E){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,_.DEFAULT_CHARSET),!0}selectCharset(E){return E.length!==2?(this.selectDefaultCharset(),!0):(E[0]==="/"||this._charsetService.setgCharset(R[E[0]],_.CHARSETS[E[1]]||_.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 E=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,E,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(E){return this._charsetService.setgLevel(E),!0}screenAlignmentPattern(){const E=new l.CellData;E.content=4194373,E.fg=this._curAttrData.fg,E.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,O=this._activeBuffer.lines.get(P);O&&(O.fill(E),O.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(E,D){const P=this._bufferService.buffer,O=this._optionsService.rawOptions;return(W=>(this._coreService.triggerDataEvent(`${d.C0.ESC}${W}${d.C0.ESC}\\`),!0))(E==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:E==='"p'?'P1$r61;1"p':E==="r"?`P1$r${P.scrollTop+1};${P.scrollBottom+1}r`:E==="m"?"P1$r0m":E===" q"?`P1$r${{block:2,underline:4,bar:6}[O.cursorStyle]-(O.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(E,D){this._dirtyRowTracker.markRangeDirty(E,D)}}a.InputHandler=F;let K=class{constructor(j){this._bufferService=j,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(j){j<this.start?this.start=j:j>this.end&&(this.end=j)}markRangeDirty(j,E){j>E&&(N=j,j=E,E=N),j<this.start&&(this.start=j),E>this.end&&(this.end=E)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function q(j){return 0<=j&&j<256}K=f([g(0,C.IBufferService)],K)},844:(m,a)=>{function c(f){for(const g of f)g.dispose();f.length=0}Object.defineProperty(a,"__esModule",{value:!0}),a.getDisposeArrayDisposable=a.disposeArray=a.toDisposable=a.MutableDisposable=a.Disposable=void 0,a.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 g=this._disposables.indexOf(f);g!==-1&&this._disposables.splice(g,1)}},a.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(f){var g;this._isDisposed||f===this._value||((g=this._value)==null||g.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}},a.toDisposable=function(f){return{dispose:f}},a.disposeArray=c,a.getDisposeArrayDisposable=function(f){return{dispose:()=>c(f)}}},1505:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.FourKeyMap=a.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(g,d,_){this._data[g]||(this._data[g]={}),this._data[g][d]=_}get(g,d){return this._data[g]?this._data[g][d]:void 0}clear(){this._data={}}}a.TwoKeyMap=c,a.FourKeyMap=class{constructor(){this._data=new c}set(f,g,d,_,S){this._data.get(f,g)||this._data.set(f,g,new c),this._data.get(f,g).set(d,_,S)}get(f,g,d,_){var S;return(S=this._data.get(f,g))==null?void 0:S.get(d,_)}clear(){this._data.clear()}}},6114:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.isChromeOS=a.isLinux=a.isWindows=a.isIphone=a.isIpad=a.isMac=a.getSafariVersion=a.isSafari=a.isLegacyEdge=a.isFirefox=a.isNode=void 0,a.isNode=typeof process<"u"&&"title"in process;const c=a.isNode?"node":navigator.userAgent,f=a.isNode?"node":navigator.platform;a.isFirefox=c.includes("Firefox"),a.isLegacyEdge=c.includes("Edge"),a.isSafari=/^((?!chrome|android).)*safari/i.test(c),a.getSafariVersion=function(){if(!a.isSafari)return 0;const g=c.match(/Version\/(\d+)/);return g===null||g.length<2?0:parseInt(g[1])},a.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(f),a.isIpad=f==="iPad",a.isIphone=f==="iPhone",a.isWindows=["Windows","Win16","Win32","WinCE"].includes(f),a.isLinux=f.indexOf("Linux")>=0,a.isChromeOS=/\bCrOS\b/.test(c)},6106:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.SortedList=void 0;let c=0;a.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 g=this._getKey(f);if(g===void 0||(c=this._search(g),c===-1)||this._getKey(this._array[c])!==g)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])===g);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,g){if(this._array.length!==0&&(c=this._search(f),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===f))do g(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===f)}values(){return[...this._array].values()}_search(f){let g=0,d=this._array.length-1;for(;d>=g;){let _=g+d>>1;const S=this._getKey(this._array[_]);if(S>f)d=_-1;else{if(!(S<f)){for(;_>0&&this._getKey(this._array[_-1])===f;)_--;return _}g=_+1}}return g}}},7226:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DebouncedIdleTask=a.IdleTaskQueue=a.PriorityTaskQueue=void 0;const f=c(6114);class g{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 w=0,v=0,u=S.timeRemaining(),o=0;for(;this._i<this._tasks.length;){if(w=Date.now(),this._tasks[this._i]()||this._i++,w=Math.max(1,Date.now()-w),v=Math.max(w,v),o=S.timeRemaining(),1.5*v>o)return u-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(u-w))}ms`),void this._start();u=o}this.clear()}}class d extends g{_requestCallback(S){return setTimeout(()=>S(this._createDeadline(16)))}_cancelCallback(S){clearTimeout(S)}_createDeadline(S){const w=Date.now()+S;return{timeRemaining:()=>Math.max(0,w-Date.now())}}}a.PriorityTaskQueue=d,a.IdleTaskQueue=!f.isNode&&"requestIdleCallback"in window?class extends g{_requestCallback(_){return requestIdleCallback(_)}_cancelCallback(_){cancelIdleCallback(_)}}:d,a.DebouncedIdleTask=class{constructor(){this._queue=new a.IdleTaskQueue}set(_){this._queue.clear(),this._queue.enqueue(_)}flush(){this._queue.flush()}}},9282:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.updateWindowsModeWrappedState=void 0;const f=c(643);a.updateWindowsModeWrappedState=function(g){const d=g.buffer.lines.get(g.buffer.ybase+g.buffer.y-1),_=d==null?void 0:d.get(g.cols-1),S=g.buffer.lines.get(g.buffer.ybase+g.buffer.y);S&&_&&(S.isWrapped=_[f.CHAR_DATA_CODE_INDEX]!==f.NULL_CELL_CODE&&_[f.CHAR_DATA_CODE_INDEX]!==f.WHITESPACE_CELL_CODE)}},3734:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ExtendedAttrs=a.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new f}static toColorRGB(d){return[d>>>16&255,d>>>8&255,255&d]}static fromColorRGB(d){return(255&d[0])<<16|(255&d[1])<<8|255&d[2]}clone(){const d=new c;return d.fg=this.fg,d.bg=this.bg,d.extended=this.extended.clone(),d}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}}a.AttributeData=c;class f{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(d){this._ext=d}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(d){this._ext&=-469762049,this._ext|=d<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(d){this._ext&=-67108864,this._ext|=67108863&d}get urlId(){return this._urlId}set urlId(d){this._urlId=d}get underlineVariantOffset(){const d=(3758096384&this._ext)>>29;return d<0?4294967288^d:d}set underlineVariantOffset(d){this._ext&=536870911,this._ext|=d<<29&3758096384}constructor(d=0,_=0){this._ext=0,this._urlId=0,this._ext=d,this._urlId=_}clone(){return new f(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}a.ExtendedAttrs=f},9092:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Buffer=a.MAX_BUFFER_SIZE=void 0;const f=c(6349),g=c(7226),d=c(3734),_=c(8437),S=c(4634),w=c(511),v=c(643),u=c(4863),o=c(7116);a.MAX_BUFFER_SIZE=4294967295,a.Buffer=class{constructor(s,l,p){this._hasScrollback=s,this._optionsService=l,this._bufferService=p,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=_.DEFAULT_ATTR_DATA.clone(),this.savedCharset=o.DEFAULT_CHARSET,this.markers=[],this._nullCell=w.CellData.fromCharData([0,v.NULL_CELL_CHAR,v.NULL_CELL_WIDTH,v.NULL_CELL_CODE]),this._whitespaceCell=w.CellData.fromCharData([0,v.WHITESPACE_CELL_CHAR,v.WHITESPACE_CELL_WIDTH,v.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new g.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 d.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 d.ExtendedAttrs),this._whitespaceCell}getBlankLine(s,l){return new _.BufferLine(this._bufferService.cols,this.getNullCell(s),l)}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 l=s+this._optionsService.rawOptions.scrollback;return l>a.MAX_BUFFER_SIZE?a.MAX_BUFFER_SIZE:l}fillViewportRows(s){if(this.lines.length===0){s===void 0&&(s=_.DEFAULT_ATTR_DATA);let l=this._rows;for(;l--;)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,l){const p=this.getNullCell(_.DEFAULT_ATTR_DATA);let C=0;const x=this._getCorrectBufferLength(l);if(x>this.lines.maxLength&&(this.lines.maxLength=x),this.lines.length>0){if(this._cols<s)for(let y=0;y<this.lines.length;y++)C+=+this.lines.get(y).resize(s,p);let k=0;if(this._rows<l)for(let y=this._rows;y<l;y++)this.lines.length<l+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new _.BufferLine(s,p)):this.ybase>0&&this.lines.length<=this.ybase+this.y+k+1?(this.ybase--,k++,this.ydisp>0&&this.ydisp--):this.lines.push(new _.BufferLine(s,p)));else for(let y=this._rows;y>l;y--)this.lines.length>l+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(x<this.lines.maxLength){const y=this.lines.length-x;y>0&&(this.lines.trimStart(y),this.ybase=Math.max(this.ybase-y,0),this.ydisp=Math.max(this.ydisp-y,0),this.savedY=Math.max(this.savedY-y,0)),this.lines.maxLength=x}this.x=Math.min(this.x,s-1),this.y=Math.min(this.y,l-1),k&&(this.y+=k),this.savedX=Math.min(this.savedX,s-1),this.scrollTop=0}if(this.scrollBottom=l-1,this._isReflowEnabled&&(this._reflow(s,l),this._cols>s))for(let k=0;k<this.lines.length;k++)C+=+this.lines.get(k).resize(s,p);this._cols=s,this._rows=l,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 l=0;for(;this._memoryCleanupPosition<this.lines.length;)if(l+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),l>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,l){this._cols!==s&&(s>this._cols?this._reflowLarger(s,l):this._reflowSmaller(s,l))}_reflowLarger(s,l){const p=(0,S.reflowLargerGetLinesToRemove)(this.lines,this._cols,s,this.ybase+this.y,this.getNullCell(_.DEFAULT_ATTR_DATA));if(p.length>0){const C=(0,S.reflowLargerCreateNewLayout)(this.lines,p);(0,S.reflowLargerApplyNewLayout)(this.lines,C.layout),this._reflowLargerAdjustViewport(s,l,C.countRemoved)}}_reflowLargerAdjustViewport(s,l,p){const C=this.getNullCell(_.DEFAULT_ATTR_DATA);let x=p;for(;x-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<l&&this.lines.push(new _.BufferLine(s,C))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-p,0)}_reflowSmaller(s,l){const p=this.getNullCell(_.DEFAULT_ATTR_DATA),C=[];let x=0;for(let k=this.lines.length-1;k>=0;k--){let y=this.lines.get(k);if(!y||!y.isWrapped&&y.getTrimmedLength()<=s)continue;const b=[y];for(;y.isWrapped&&k>0;)y=this.lines.get(--k),b.unshift(y);const R=this.ybase+this.y;if(R>=k&&R<k+b.length)continue;const M=b[b.length-1].getTrimmedLength(),B=(0,S.reflowSmallerGetNewLineLengths)(b,this._cols,s),T=B.length-b.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 F=[];for(let P=0;P<T;P++){const O=this.getBlankLine(_.DEFAULT_ATTR_DATA,!0);F.push(O)}F.length>0&&(C.push({start:k+b.length+x,newLines:F}),x+=F.length),b.push(...F);let K=B.length-1,q=B[K];q===0&&(K--,q=B[K]);let j=b.length-T-1,E=M;for(;j>=0;){const P=Math.min(E,q);if(b[K]===void 0)break;if(b[K].copyCellsFrom(b[j],E-P,q-P,P,!0),q-=P,q===0&&(K--,q=B[K]),E-=P,E===0){j--;const O=Math.max(j,0);E=(0,S.getWrappedLineTrimmedLength)(b,O,this._cols)}}for(let P=0;P<b.length;P++)B[P]<s&&b[P].setCell(B[P],p);let D=T-N;for(;D-- >0;)this.ybase===0?this.y<l-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+x)-l&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+T,this.ybase+l-1)}if(C.length>0){const k=[],y=[];for(let K=0;K<this.lines.length;K++)y.push(this.lines.get(K));const b=this.lines.length;let R=b-1,M=0,B=C[M];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+x);let T=0;for(let K=Math.min(this.lines.maxLength-1,b+x-1);K>=0;K--)if(B&&B.start>R+T){for(let q=B.newLines.length-1;q>=0;q--)this.lines.set(K--,B.newLines[q]);K++,k.push({index:R+1,amount:B.newLines.length}),T+=B.newLines.length,B=C[++M]}else this.lines.set(K,y[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 F=Math.max(0,b+x-this.lines.maxLength);F>0&&this.lines.onTrimEmitter.fire(F)}}translateBufferLineToString(s,l,p=0,C){const x=this.lines.get(s);return x?x.translateToString(l,p,C):""}getWrappedRangeForLine(s){let l=s,p=s;for(;l>0&&this.lines.get(l).isWrapped;)l--;for(;p+1<this.lines.length&&this.lines.get(p+1).isWrapped;)p++;return{first:l,last:p}}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 l=0;l<this.markers.length;l++)this.markers[l].line===s&&(this.markers[l].dispose(),this.markers.splice(l--,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 l=new u.Marker(s);return this.markers.push(l),l.register(this.lines.onTrim(p=>{l.line-=p,l.line<0&&l.dispose()})),l.register(this.lines.onInsert(p=>{l.line>=p.index&&(l.line+=p.amount)})),l.register(this.lines.onDelete(p=>{l.line>=p.index&&l.line<p.index+p.amount&&l.dispose(),l.line>p.index&&(l.line-=p.amount)})),l.register(l.onDispose(()=>this._removeMarker(l))),l}_removeMarker(s){this._isClearing||this.markers.splice(this.markers.indexOf(s),1)}}},8437:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLine=a.DEFAULT_ATTR_DATA=void 0;const f=c(3734),g=c(511),d=c(643),_=c(482);a.DEFAULT_ATTR_DATA=Object.freeze(new f.AttributeData);let S=0;class w{constructor(u,o,s=!1){this.isWrapped=s,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*u);const l=o||g.CellData.fromCharData([0,d.NULL_CELL_CHAR,d.NULL_CELL_WIDTH,d.NULL_CELL_CODE]);for(let p=0;p<u;++p)this.setCell(p,l);this.length=u}get(u){const o=this._data[3*u+0],s=2097151&o;return[this._data[3*u+1],2097152&o?this._combined[u]:s?(0,_.stringFromCodePoint)(s):"",o>>22,2097152&o?this._combined[u].charCodeAt(this._combined[u].length-1):s]}set(u,o){this._data[3*u+1]=o[d.CHAR_DATA_ATTR_INDEX],o[d.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[u]=o[1],this._data[3*u+0]=2097152|u|o[d.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*u+0]=o[d.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|o[d.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 o=this._data[3*u+0];return 2097152&o?this._combined[u].charCodeAt(this._combined[u].length-1):2097151&o}isCombined(u){return 2097152&this._data[3*u+0]}getString(u){const o=this._data[3*u+0];return 2097152&o?this._combined[u]:2097151&o?(0,_.stringFromCodePoint)(2097151&o):""}isProtected(u){return 536870912&this._data[3*u+2]}loadCell(u,o){return S=3*u,o.content=this._data[S+0],o.fg=this._data[S+1],o.bg=this._data[S+2],2097152&o.content&&(o.combinedData=this._combined[u]),268435456&o.bg&&(o.extended=this._extendedAttrs[u]),o}setCell(u,o){2097152&o.content&&(this._combined[u]=o.combinedData),268435456&o.bg&&(this._extendedAttrs[u]=o.extended),this._data[3*u+0]=o.content,this._data[3*u+1]=o.fg,this._data[3*u+2]=o.bg}setCellFromCodepoint(u,o,s,l){268435456&l.bg&&(this._extendedAttrs[u]=l.extended),this._data[3*u+0]=o|s<<22,this._data[3*u+1]=l.fg,this._data[3*u+2]=l.bg}addCodepointToCell(u,o,s){let l=this._data[3*u+0];2097152&l?this._combined[u]+=(0,_.stringFromCodePoint)(o):2097151&l?(this._combined[u]=(0,_.stringFromCodePoint)(2097151&l)+(0,_.stringFromCodePoint)(o),l&=-2097152,l|=2097152):l=o|4194304,s&&(l&=-12582913,l|=s<<22),this._data[3*u+0]=l}insertCells(u,o,s){if((u%=this.length)&&this.getWidth(u-1)===2&&this.setCellFromCodepoint(u-1,0,1,s),o<this.length-u){const l=new g.CellData;for(let p=this.length-u-o-1;p>=0;--p)this.setCell(u+o+p,this.loadCell(u+p,l));for(let p=0;p<o;++p)this.setCell(u+p,s)}else for(let l=u;l<this.length;++l)this.setCell(l,s);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,s)}deleteCells(u,o,s){if(u%=this.length,o<this.length-u){const l=new g.CellData;for(let p=0;p<this.length-u-o;++p)this.setCell(u+p,this.loadCell(u+o+p,l));for(let p=this.length-o;p<this.length;++p)this.setCell(p,s)}else for(let l=u;l<this.length;++l)this.setCell(l,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,o,s,l=!1){if(l)for(u&&this.getWidth(u-1)===2&&!this.isProtected(u-1)&&this.setCellFromCodepoint(u-1,0,1,s),o<this.length&&this.getWidth(o-1)===2&&!this.isProtected(o)&&this.setCellFromCodepoint(o,0,1,s);u<o&&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),o<this.length&&this.getWidth(o-1)===2&&this.setCellFromCodepoint(o,0,1,s);u<o&&u<this.length;)this.setCell(u++,s)}resize(u,o){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 l=new Uint32Array(s);l.set(this._data),this._data=l}for(let l=this.length;l<u;++l)this.setCell(l,o)}else{this._data=this._data.subarray(0,s);const l=Object.keys(this._combined);for(let C=0;C<l.length;C++){const x=parseInt(l[C],10);x>=u&&delete this._combined[x]}const p=Object.keys(this._extendedAttrs);for(let C=0;C<p.length;C++){const x=parseInt(p[C],10);x>=u&&delete this._extendedAttrs[x]}}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,o=!1){if(o)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 o in u._combined)this._combined[o]=u._combined[o];this._extendedAttrs={};for(const o in u._extendedAttrs)this._extendedAttrs[o]=u._extendedAttrs[o];this.isWrapped=u.isWrapped}clone(){const u=new w(0);u._data=new Uint32Array(this._data),u.length=this.length;for(const o in this._combined)u._combined[o]=this._combined[o];for(const o in this._extendedAttrs)u._extendedAttrs[o]=this._extendedAttrs[o];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,o,s,l,p){const C=u._data;if(p)for(let k=l-1;k>=0;k--){for(let y=0;y<3;y++)this._data[3*(s+k)+y]=C[3*(o+k)+y];268435456&C[3*(o+k)+2]&&(this._extendedAttrs[s+k]=u._extendedAttrs[o+k])}else for(let k=0;k<l;k++){for(let y=0;y<3;y++)this._data[3*(s+k)+y]=C[3*(o+k)+y];268435456&C[3*(o+k)+2]&&(this._extendedAttrs[s+k]=u._extendedAttrs[o+k])}const x=Object.keys(u._combined);for(let k=0;k<x.length;k++){const y=parseInt(x[k],10);y>=o&&(this._combined[y-o+s]=u._combined[y])}}translateToString(u,o,s,l){o=o??0,s=s??this.length,u&&(s=Math.min(s,this.getTrimmedLength())),l&&(l.length=0);let p="";for(;o<s;){const C=this._data[3*o+0],x=2097151&C,k=2097152&C?this._combined[o]:x?(0,_.stringFromCodePoint)(x):d.WHITESPACE_CELL_CHAR;if(p+=k,l)for(let y=0;y<k.length;++y)l.push(o);o+=C>>22||1}return l&&l.push(o),p}}a.BufferLine=w},4841:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.getRangeLength=void 0,a.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:(m,a)=>{function c(f,g,d){if(g===f.length-1)return f[g].getTrimmedLength();const _=!f[g].hasContent(d-1)&&f[g].getWidth(d-1)===1,S=f[g+1].getWidth(0)===2;return _&&S?d-1:d}Object.defineProperty(a,"__esModule",{value:!0}),a.getWrappedLineTrimmedLength=a.reflowSmallerGetNewLineLengths=a.reflowLargerApplyNewLayout=a.reflowLargerCreateNewLayout=a.reflowLargerGetLinesToRemove=void 0,a.reflowLargerGetLinesToRemove=function(f,g,d,_,S){const w=[];for(let v=0;v<f.length-1;v++){let u=v,o=f.get(++u);if(!o.isWrapped)continue;const s=[f.get(v)];for(;u<f.length&&o.isWrapped;)s.push(o),o=f.get(++u);if(_>=v&&_<u){v+=s.length-1;continue}let l=0,p=c(s,l,g),C=1,x=0;for(;C<s.length;){const y=c(s,C,g),b=y-x,R=d-p,M=Math.min(b,R);s[l].copyCellsFrom(s[C],x,p,M,!1),p+=M,p===d&&(l++,p=0),x+=M,x===y&&(C++,x=0),p===0&&l!==0&&s[l-1].getWidth(d-1)===2&&(s[l].copyCellsFrom(s[l-1],d-1,p++,1,!1),s[l-1].setCell(d-1,S))}s[l].replaceCells(p,d,S);let k=0;for(let y=s.length-1;y>0&&(y>l||s[y].getTrimmedLength()===0);y--)k++;k>0&&(w.push(v+s.length-k),w.push(k)),v+=s.length-1}return w},a.reflowLargerCreateNewLayout=function(f,g){const d=[];let _=0,S=g[_],w=0;for(let v=0;v<f.length;v++)if(S===v){const u=g[++_];f.onDeleteEmitter.fire({index:v-w,amount:u}),v+=u-1,w+=u,S=g[++_]}else d.push(v);return{layout:d,countRemoved:w}},a.reflowLargerApplyNewLayout=function(f,g){const d=[];for(let _=0;_<g.length;_++)d.push(f.get(g[_]));for(let _=0;_<d.length;_++)f.set(_,d[_]);f.length=g.length},a.reflowSmallerGetNewLineLengths=function(f,g,d){const _=[],S=f.map((o,s)=>c(f,s,g)).reduce((o,s)=>o+s);let w=0,v=0,u=0;for(;u<S;){if(S-u<d){_.push(S-u);break}w+=d;const o=c(f,v,g);w>o&&(w-=o,v++);const s=f[v].getWidth(w-1)===2;s&&w--;const l=s?d-1:d;_.push(l),u+=l}return _},a.getWrappedLineTrimmedLength=c},5295:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferSet=void 0;const f=c(8460),g=c(844),d=c(9092);class _ extends g.Disposable{constructor(w,v){super(),this._optionsService=w,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 d.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new d.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(w){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(w),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(w,v){this._normal.resize(w,v),this._alt.resize(w,v),this.setupTabStops(w)}setupTabStops(w){this._normal.setupTabStops(w),this._alt.setupTabStops(w)}}a.BufferSet=_},511:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CellData=void 0;const f=c(482),g=c(643),d=c(3734);class _ extends d.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new d.ExtendedAttrs,this.combinedData=""}static fromCharData(w){const v=new _;return v.setFromCharData(w),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(w){this.fg=w[g.CHAR_DATA_ATTR_INDEX],this.bg=0;let v=!1;if(w[g.CHAR_DATA_CHAR_INDEX].length>2)v=!0;else if(w[g.CHAR_DATA_CHAR_INDEX].length===2){const u=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=u&&u<=56319){const o=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=o&&o<=57343?this.content=1024*(u-55296)+o-56320+65536|w[g.CHAR_DATA_WIDTH_INDEX]<<22:v=!0}else v=!0}else this.content=w[g.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[g.CHAR_DATA_WIDTH_INDEX]<<22;v&&(this.combinedData=w[g.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[g.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}a.CellData=_},643:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WHITESPACE_CELL_CODE=a.WHITESPACE_CELL_WIDTH=a.WHITESPACE_CELL_CHAR=a.NULL_CELL_CODE=a.NULL_CELL_WIDTH=a.NULL_CELL_CHAR=a.CHAR_DATA_CODE_INDEX=a.CHAR_DATA_WIDTH_INDEX=a.CHAR_DATA_CHAR_INDEX=a.CHAR_DATA_ATTR_INDEX=a.DEFAULT_EXT=a.DEFAULT_ATTR=a.DEFAULT_COLOR=void 0,a.DEFAULT_COLOR=0,a.DEFAULT_ATTR=256|a.DEFAULT_COLOR<<9,a.DEFAULT_EXT=0,a.CHAR_DATA_ATTR_INDEX=0,a.CHAR_DATA_CHAR_INDEX=1,a.CHAR_DATA_WIDTH_INDEX=2,a.CHAR_DATA_CODE_INDEX=3,a.NULL_CELL_CHAR="",a.NULL_CELL_WIDTH=1,a.NULL_CELL_CODE=0,a.WHITESPACE_CELL_CHAR=" ",a.WHITESPACE_CELL_WIDTH=1,a.WHITESPACE_CELL_CODE=32},4863:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Marker=void 0;const f=c(8460),g=c(844);class d{get id(){return this._id}constructor(S){this.line=S,this.isDisposed=!1,this._disposables=[],this._id=d._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,g.disposeArray)(this._disposables),this._disposables.length=0)}register(S){return this._disposables.push(S),S}}a.Marker=d,d._nextId=1},7116:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DEFAULT_CHARSET=a.CHARSETS=void 0,a.CHARSETS={},a.DEFAULT_CHARSET=a.CHARSETS.B,a.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:"≥","{":"π","|":"≠","}":"£","~":"·"},a.CHARSETS.A={"#":"£"},a.CHARSETS.B=void 0,a.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},a.CHARSETS.C=a.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},a.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},a.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},a.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},a.CHARSETS.E=a.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},a.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},a.CHARSETS.H=a.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},a.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(m,a)=>{var c,f,g;Object.defineProperty(a,"__esModule",{value:!0}),a.C1_ESCAPED=a.C1=a.C0=void 0,function(d){d.NUL="\0",d.SOH="",d.STX="",d.ETX="",d.EOT="",d.ENQ="",d.ACK="",d.BEL="\x07",d.BS="\b",d.HT=" ",d.LF=`
|
|
63
|
+
`,d.VT="\v",d.FF="\f",d.CR="\r",d.SO="",d.SI="",d.DLE="",d.DC1="",d.DC2="",d.DC3="",d.DC4="",d.NAK="",d.SYN="",d.ETB="",d.CAN="",d.EM="",d.SUB="",d.ESC="\x1B",d.FS="",d.GS="",d.RS="",d.US="",d.SP=" ",d.DEL=""}(c||(a.C0=c={})),function(d){d.PAD="",d.HOP="",d.BPH="",d.NBH="",d.IND="",d.NEL="
",d.SSA="",d.ESA="",d.HTS="",d.HTJ="",d.VTS="",d.PLD="",d.PLU="",d.RI="",d.SS2="",d.SS3="",d.DCS="",d.PU1="",d.PU2="",d.STS="",d.CCH="",d.MW="",d.SPA="",d.EPA="",d.SOS="",d.SGCI="",d.SCI="",d.CSI="",d.ST="",d.OSC="",d.PM="",d.APC=""}(f||(a.C1=f={})),function(d){d.ST=`${c.ESC}\\`}(g||(a.C1_ESCAPED=g={}))},7399:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.evaluateKeyboardEvent=void 0;const f=c(2584),g={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:["'",'"']};a.evaluateKeyboardEvent=function(d,_,S,w){const v={type:0,cancel:!1,key:void 0},u=(d.shiftKey?1:0)|(d.altKey?2:0)|(d.ctrlKey?4:0)|(d.metaKey?8:0);switch(d.keyCode){case 0:d.key==="UIKeyInputUpArrow"?v.key=_?f.C0.ESC+"OA":f.C0.ESC+"[A":d.key==="UIKeyInputLeftArrow"?v.key=_?f.C0.ESC+"OD":f.C0.ESC+"[D":d.key==="UIKeyInputRightArrow"?v.key=_?f.C0.ESC+"OC":f.C0.ESC+"[C":d.key==="UIKeyInputDownArrow"&&(v.key=_?f.C0.ESC+"OB":f.C0.ESC+"[B");break;case 8:v.key=d.ctrlKey?"\b":f.C0.DEL,d.altKey&&(v.key=f.C0.ESC+v.key);break;case 9:if(d.shiftKey){v.key=f.C0.ESC+"[Z";break}v.key=f.C0.HT,v.cancel=!0;break;case 13:v.key=d.altKey?f.C0.ESC+f.C0.CR:f.C0.CR,v.cancel=!0;break;case 27:v.key=f.C0.ESC,d.altKey&&(v.key=f.C0.ESC+f.C0.ESC),v.cancel=!0;break;case 37:if(d.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=_?f.C0.ESC+"OD":f.C0.ESC+"[D";break;case 39:if(d.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=_?f.C0.ESC+"OC":f.C0.ESC+"[C";break;case 38:if(d.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=_?f.C0.ESC+"OA":f.C0.ESC+"[A";break;case 40:if(d.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=_?f.C0.ESC+"OB":f.C0.ESC+"[B";break;case 45:d.shiftKey||d.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":_?f.C0.ESC+"OH":f.C0.ESC+"[H";break;case 35:v.key=u?f.C0.ESC+"[1;"+(u+1)+"F":_?f.C0.ESC+"OF":f.C0.ESC+"[F";break;case 33:d.shiftKey?v.type=2:d.ctrlKey?v.key=f.C0.ESC+"[5;"+(u+1)+"~":v.key=f.C0.ESC+"[5~";break;case 34:d.shiftKey?v.type=3:d.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(!d.ctrlKey||d.shiftKey||d.altKey||d.metaKey)if(S&&!w||!d.altKey||d.metaKey)!S||d.altKey||d.ctrlKey||d.shiftKey||!d.metaKey?d.key&&!d.ctrlKey&&!d.altKey&&!d.metaKey&&d.keyCode>=48&&d.key.length===1?v.key=d.key:d.key&&d.ctrlKey&&(d.key==="_"&&(v.key=f.C0.US),d.key==="@"&&(v.key=f.C0.NUL)):d.keyCode===65&&(v.type=1);else{const o=g[d.keyCode],s=o==null?void 0:o[d.shiftKey?1:0];if(s)v.key=f.C0.ESC+s;else if(d.keyCode>=65&&d.keyCode<=90){const l=d.ctrlKey?d.keyCode-64:d.keyCode+32;let p=String.fromCharCode(l);d.shiftKey&&(p=p.toUpperCase()),v.key=f.C0.ESC+p}else if(d.keyCode===32)v.key=f.C0.ESC+(d.ctrlKey?f.C0.NUL:" ");else if(d.key==="Dead"&&d.code.startsWith("Key")){let l=d.code.slice(3,4);d.shiftKey||(l=l.toLowerCase()),v.key=f.C0.ESC+l,v.cancel=!0}}else d.keyCode>=65&&d.keyCode<=90?v.key=String.fromCharCode(d.keyCode-64):d.keyCode===32?v.key=f.C0.NUL:d.keyCode>=51&&d.keyCode<=55?v.key=String.fromCharCode(d.keyCode-51+27):d.keyCode===56?v.key=f.C0.DEL:d.keyCode===219?v.key=f.C0.ESC:d.keyCode===220?v.key=f.C0.FS:d.keyCode===221&&(v.key=f.C0.GS)}return v}},482:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Utf8ToUtf32=a.StringToUtf32=a.utf32ToString=a.stringFromCodePoint=void 0,a.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},a.utf32ToString=function(c,f=0,g=c.length){let d="";for(let _=f;_<g;++_){let S=c[_];S>65535?(S-=65536,d+=String.fromCharCode(55296+(S>>10))+String.fromCharCode(S%1024+56320)):d+=String.fromCharCode(S)}return d},a.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,f){const g=c.length;if(!g)return 0;let d=0,_=0;if(this._interim){const S=c.charCodeAt(_++);56320<=S&&S<=57343?f[d++]=1024*(this._interim-55296)+S-56320+65536:(f[d++]=this._interim,f[d++]=S),this._interim=0}for(let S=_;S<g;++S){const w=c.charCodeAt(S);if(55296<=w&&w<=56319){if(++S>=g)return this._interim=w,d;const v=c.charCodeAt(S);56320<=v&&v<=57343?f[d++]=1024*(w-55296)+v-56320+65536:(f[d++]=w,f[d++]=v)}else w!==65279&&(f[d++]=w)}return d}},a.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,f){const g=c.length;if(!g)return 0;let d,_,S,w,v=0,u=0,o=0;if(this.interim[0]){let p=!1,C=this.interim[0];C&=(224&C)==192?31:(240&C)==224?15:7;let x,k=0;for(;(x=63&this.interim[++k])&&k<4;)C<<=6,C|=x;const y=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,b=y-k;for(;o<b;){if(o>=g)return 0;if(x=c[o++],(192&x)!=128){o--,p=!0;break}this.interim[k++]=x,C<<=6,C|=63&x}p||(y===2?C<128?o--:f[v++]=C:y===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=g-4;let l=o;for(;l<g;){for(;!(!(l<s)||128&(d=c[l])||128&(_=c[l+1])||128&(S=c[l+2])||128&(w=c[l+3]));)f[v++]=d,f[v++]=_,f[v++]=S,f[v++]=w,l+=4;if(d=c[l++],d<128)f[v++]=d;else if((224&d)==192){if(l>=g)return this.interim[0]=d,v;if(_=c[l++],(192&_)!=128){l--;continue}if(u=(31&d)<<6|63&_,u<128){l--;continue}f[v++]=u}else if((240&d)==224){if(l>=g)return this.interim[0]=d,v;if(_=c[l++],(192&_)!=128){l--;continue}if(l>=g)return this.interim[0]=d,this.interim[1]=_,v;if(S=c[l++],(192&S)!=128){l--;continue}if(u=(15&d)<<12|(63&_)<<6|63&S,u<2048||u>=55296&&u<=57343||u===65279)continue;f[v++]=u}else if((248&d)==240){if(l>=g)return this.interim[0]=d,v;if(_=c[l++],(192&_)!=128){l--;continue}if(l>=g)return this.interim[0]=d,this.interim[1]=_,v;if(S=c[l++],(192&S)!=128){l--;continue}if(l>=g)return this.interim[0]=d,this.interim[1]=_,this.interim[2]=S,v;if(w=c[l++],(192&w)!=128){l--;continue}if(u=(7&d)<<18|(63&_)<<12|(63&S)<<6|63&w,u<65536||u>1114111)continue;f[v++]=u}}return v}}},225:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeV6=void 0;const f=c(1480),g=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],d=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let _;a.UnicodeV6=class{constructor(){if(this.version="6",!_){_=new Uint8Array(65536),_.fill(1),_[0]=0,_.fill(0,1,32),_.fill(0,127,160),_.fill(2,4352,4448),_[9001]=2,_[9002]=2,_.fill(2,11904,42192),_[12351]=1,_.fill(2,44032,55204),_.fill(2,63744,64256),_.fill(2,65040,65050),_.fill(2,65072,65136),_.fill(2,65280,65377),_.fill(2,65504,65511);for(let S=0;S<g.length;++S)_.fill(0,g[S][0],g[S][1]+1)}}wcwidth(S){return S<32?0:S<127?1:S<65536?_[S]:function(w,v){let u,o=0,s=v.length-1;if(w<v[0][0]||w>v[s][1])return!1;for(;s>=o;)if(u=o+s>>1,w>v[u][1])o=u+1;else{if(!(w<v[u][0]))return!0;s=u-1}return!1}(S,d)?0:S>=131072&&S<=196605||S>=196608&&S<=262141?2:1}charProperties(S,w){let v=this.wcwidth(S),u=v===0&&w!==0;if(u){const o=f.UnicodeService.extractWidth(w);o===0?u=!1:o>v&&(v=o)}return f.UnicodeService.createPropertyValue(0,v,u)}}},5981:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.WriteBuffer=void 0;const f=c(8460),g=c(844);class d extends g.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,w){if(w!==void 0&&this._syncCalls>w)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,w){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(w),void this._innerWrite();setTimeout(()=>this._innerWrite())}this._pendingData+=S.length,this._writeBuffer.push(S),this._callbacks.push(w)}_innerWrite(S=0,w=!0){const v=S||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const u=this._writeBuffer[this._bufferOffset],o=this._action(u,w);if(o){const l=p=>Date.now()-v>=12?setTimeout(()=>this._innerWrite(0,p)):this._innerWrite(v,p);return void o.catch(p=>(queueMicrotask(()=>{throw p}),Promise.resolve(!1))).then(l)}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()}}a.WriteBuffer=d},5941:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.toRgbString=a.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 g(d,_){const S=d.toString(16),w=S.length<2?"0"+S:S;switch(_){case 4:return S[0];case 8:return w;case 12:return(w+w).slice(0,3);default:return w+w}}a.parseColor=function(d){if(!d)return;let _=d.toLowerCase();if(_.indexOf("rgb:")===0){_=_.slice(4);const S=c.exec(_);if(S){const w=S[1]?15:S[4]?255:S[7]?4095:65535;return[Math.round(parseInt(S[1]||S[4]||S[7]||S[10],16)/w*255),Math.round(parseInt(S[2]||S[5]||S[8]||S[11],16)/w*255),Math.round(parseInt(S[3]||S[6]||S[9]||S[12],16)/w*255)]}}else if(_.indexOf("#")===0&&(_=_.slice(1),f.exec(_)&&[3,6,9,12].includes(_.length))){const S=_.length/3,w=[0,0,0];for(let v=0;v<3;++v){const u=parseInt(_.slice(S*v,S*v+S),16);w[v]=S===1?u<<4:S===2?u:S===3?u>>4:u>>8}return w}},a.toRgbString=function(d,_=16){const[S,w,v]=d;return`rgb:${g(S,_)}/${g(w,_)}/${g(v,_)}`}},5770:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.PAYLOAD_LIMIT=void 0,a.PAYLOAD_LIMIT=1e7},6351:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DcsHandler=a.DcsParser=void 0;const f=c(482),g=c(8742),d=c(5770),_=[];a.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=_,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=_}registerHandler(w,v){this._handlers[w]===void 0&&(this._handlers[w]=[]);const u=this._handlers[w];return u.push(v),{dispose:()=>{const o=u.indexOf(v);o!==-1&&u.splice(o,1)}}}clearHandler(w){this._handlers[w]&&delete this._handlers[w]}setHandlerFallback(w){this._handlerFb=w}reset(){if(this._active.length)for(let w=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;w>=0;--w)this._active[w].unhook(!1);this._stack.paused=!1,this._active=_,this._ident=0}hook(w,v){if(this.reset(),this._ident=w,this._active=this._handlers[w]||_,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(w,v,u){if(this._active.length)for(let o=this._active.length-1;o>=0;o--)this._active[o].put(w,v,u);else this._handlerFb(this._ident,"PUT",(0,f.utf32ToString)(w,v,u))}unhook(w,v=!0){if(this._active.length){let u=!1,o=this._active.length-1,s=!1;if(this._stack.paused&&(o=this._stack.loopPosition-1,u=v,s=this._stack.fallThrough,this._stack.paused=!1),!s&&u===!1){for(;o>=0&&(u=this._active[o].unhook(w),u!==!0);o--)if(u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!1,u;o--}for(;o>=0;o--)if(u=this._active[o].unhook(!1),u instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=o,this._stack.fallThrough=!0,u}else this._handlerFb(this._ident,"UNHOOK",w);this._active=_,this._ident=0}};const S=new g.Params;S.addParam(0),a.DcsHandler=class{constructor(w){this._handler=w,this._data="",this._params=S,this._hitLimit=!1}hook(w){this._params=w.length>1||w.params[0]?w.clone():S,this._data="",this._hitLimit=!1}put(w,v,u){this._hitLimit||(this._data+=(0,f.utf32ToString)(w,v,u),this._data.length>d.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(w){let v=!1;if(this._hitLimit)v=!1;else if(w&&(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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.EscapeSequenceParser=a.VT500_TRANSITION_TABLE=a.TransitionTable=void 0;const f=c(844),g=c(8742),d=c(6242),_=c(6351);class S{constructor(o){this.table=new Uint8Array(o)}setDefault(o,s){this.table.fill(o<<4|s)}add(o,s,l,p){this.table[s<<8|o]=l<<4|p}addMany(o,s,l,p){for(let C=0;C<o.length;C++)this.table[s<<8|o[C]]=l<<4|p}}a.TransitionTable=S;const w=160;a.VT500_TRANSITION_TABLE=function(){const u=new S(4095),o=Array.apply(null,Array(256)).map((k,y)=>y),s=(k,y)=>o.slice(k,y),l=s(32,127),p=s(0,24);p.push(25),p.push.apply(p,s(28,32));const C=s(0,14);let x;for(x in u.setDefault(1,0),u.addMany(l,0,2,0),C)u.addMany([24,26,153,154],x,3,0),u.addMany(s(128,144),x,3,0),u.addMany(s(144,152),x,3,0),u.add(156,x,0,0),u.add(27,x,11,1),u.add(157,x,4,8),u.addMany([152,158,159],x,0,7),u.add(155,x,11,3),u.add(144,x,11,9);return u.addMany(p,0,3,0),u.addMany(p,1,3,1),u.add(127,1,0,1),u.addMany(p,8,0,8),u.addMany(p,3,3,3),u.add(127,3,0,3),u.addMany(p,4,3,4),u.add(127,4,0,4),u.addMany(p,6,3,6),u.addMany(p,5,3,5),u.add(127,5,0,5),u.addMany(p,2,3,2),u.add(127,2,0,2),u.add(93,1,4,8),u.addMany(l,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(l,7,0,7),u.addMany(p,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(p,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(p,11,0,11),u.addMany(s(32,128),11,0,11),u.addMany(s(28,32),11,0,11),u.addMany(p,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(p,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(p,13,13,13),u.addMany(l,13,13,13),u.add(127,13,0,13),u.addMany([27,156,24,26],13,14,0),u.add(w,0,2,0),u.add(w,8,5,8),u.add(w,6,0,6),u.add(w,11,0,11),u.add(w,13,13,13),u}();class v extends f.Disposable{constructor(o=a.VT500_TRANSITION_TABLE){super(),this._transitions=o,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new g.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(s,l,p)=>{},this._executeHandlerFb=s=>{},this._csiHandlerFb=(s,l)=>{},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 d.OscParser),this._dcsParser=this.register(new _.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},()=>!0)}_identifier(o,s=[64,126]){let l=0;if(o.prefix){if(o.prefix.length>1)throw new Error("only one byte as prefix supported");if(l=o.prefix.charCodeAt(0),l&&60>l||l>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(o.intermediates){if(o.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let C=0;C<o.intermediates.length;++C){const x=o.intermediates.charCodeAt(C);if(32>x||x>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");l<<=8,l|=x}}if(o.final.length!==1)throw new Error("final must be a single byte");const p=o.final.charCodeAt(0);if(s[0]>p||p>s[1])throw new Error(`final must be in range ${s[0]} .. ${s[1]}`);return l<<=8,l|=p,l}identToString(o){const s=[];for(;o;)s.push(String.fromCharCode(255&o)),o>>=8;return s.reverse().join("")}setPrintHandler(o){this._printHandler=o}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(o,s){const l=this._identifier(o,[48,126]);this._escHandlers[l]===void 0&&(this._escHandlers[l]=[]);const p=this._escHandlers[l];return p.push(s),{dispose:()=>{const C=p.indexOf(s);C!==-1&&p.splice(C,1)}}}clearEscHandler(o){this._escHandlers[this._identifier(o,[48,126])]&&delete this._escHandlers[this._identifier(o,[48,126])]}setEscHandlerFallback(o){this._escHandlerFb=o}setExecuteHandler(o,s){this._executeHandlers[o.charCodeAt(0)]=s}clearExecuteHandler(o){this._executeHandlers[o.charCodeAt(0)]&&delete this._executeHandlers[o.charCodeAt(0)]}setExecuteHandlerFallback(o){this._executeHandlerFb=o}registerCsiHandler(o,s){const l=this._identifier(o);this._csiHandlers[l]===void 0&&(this._csiHandlers[l]=[]);const p=this._csiHandlers[l];return p.push(s),{dispose:()=>{const C=p.indexOf(s);C!==-1&&p.splice(C,1)}}}clearCsiHandler(o){this._csiHandlers[this._identifier(o)]&&delete this._csiHandlers[this._identifier(o)]}setCsiHandlerFallback(o){this._csiHandlerFb=o}registerDcsHandler(o,s){return this._dcsParser.registerHandler(this._identifier(o),s)}clearDcsHandler(o){this._dcsParser.clearHandler(this._identifier(o))}setDcsHandlerFallback(o){this._dcsParser.setHandlerFallback(o)}registerOscHandler(o,s){return this._oscParser.registerHandler(o,s)}clearOscHandler(o){this._oscParser.clearHandler(o)}setOscHandlerFallback(o){this._oscParser.setHandlerFallback(o)}setErrorHandler(o){this._errorHandler=o}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(o,s,l,p,C){this._parseStack.state=o,this._parseStack.handlers=s,this._parseStack.handlerPos=l,this._parseStack.transition=p,this._parseStack.chunkPos=C}parse(o,s,l){let p,C=0,x=0,k=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,k=this._parseStack.chunkPos+1;else{if(l===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const y=this._parseStack.handlers;let b=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(l===!1&&b>-1){for(;b>=0&&(p=y[b](this._params),p!==!0);b--)if(p instanceof Promise)return this._parseStack.handlerPos=b,p}this._parseStack.handlers=[];break;case 4:if(l===!1&&b>-1){for(;b>=0&&(p=y[b](),p!==!0);b--)if(p instanceof Promise)return this._parseStack.handlerPos=b,p}this._parseStack.handlers=[];break;case 6:if(C=o[this._parseStack.chunkPos],p=this._dcsParser.unhook(C!==24&&C!==26,l),p)return p;C===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(C=o[this._parseStack.chunkPos],p=this._oscParser.end(C!==24&&C!==26,l),p)return p;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 y=k;y<s;++y){switch(C=o[y],x=this._transitions.table[this.currentState<<8|(C<160?C:w)],x>>4){case 2:for(let T=y+1;;++T){if(T>=s||(C=o[T])<32||C>126&&C<w){this._printHandler(o,y,T),y=T-1;break}if(++T>=s||(C=o[T])<32||C>126&&C<w){this._printHandler(o,y,T),y=T-1;break}if(++T>=s||(C=o[T])<32||C>126&&C<w){this._printHandler(o,y,T),y=T-1;break}if(++T>=s||(C=o[T])<32||C>126&&C<w){this._printHandler(o,y,T),y=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:y,code:C,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const b=this._csiHandlers[this._collect<<8|C];let R=b?b.length-1:-1;for(;R>=0&&(p=b[R](this._params),p!==!0);R--)if(p instanceof Promise)return this._preserveStack(3,b,R,x,y),p;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(++y<s&&(C=o[y])>47&&C<60);y--;break;case 9:this._collect<<=8,this._collect|=C;break;case 10:const M=this._escHandlers[this._collect<<8|C];let B=M?M.length-1:-1;for(;B>=0&&(p=M[B](),p!==!0);B--)if(p instanceof Promise)return this._preserveStack(4,M,B,x,y),p;B<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=y+1;;++T)if(T>=s||(C=o[T])===24||C===26||C===27||C>127&&C<w){this._dcsParser.put(o,y,T),y=T-1;break}break;case 14:if(p=this._dcsParser.unhook(C!==24&&C!==26),p)return this._preserveStack(6,[],0,x,y),p;C===27&&(x|=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=y+1;;T++)if(T>=s||(C=o[T])<32||C>127&&C<w){this._oscParser.put(o,y,T),y=T-1;break}break;case 6:if(p=this._oscParser.end(C!==24&&C!==26),p)return this._preserveStack(5,[],0,x,y),p;C===27&&(x|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&x}}}a.EscapeSequenceParser=v},6242:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OscHandler=a.OscParser=void 0;const f=c(5770),g=c(482),d=[];a.OscParser=class{constructor(){this._state=0,this._active=d,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(_,S){this._handlers[_]===void 0&&(this._handlers[_]=[]);const w=this._handlers[_];return w.push(S),{dispose:()=>{const v=w.indexOf(S);v!==-1&&w.splice(v,1)}}}clearHandler(_){this._handlers[_]&&delete this._handlers[_]}setHandlerFallback(_){this._handlerFb=_}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=d}reset(){if(this._state===2)for(let _=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;_>=0;--_)this._active[_].end(!1);this._stack.paused=!1,this._active=d,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||d,this._active.length)for(let _=this._active.length-1;_>=0;_--)this._active[_].start();else this._handlerFb(this._id,"START")}_put(_,S,w){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(_,S,w);else this._handlerFb(this._id,"PUT",(0,g.utf32ToString)(_,S,w))}start(){this.reset(),this._state=1}put(_,S,w){if(this._state!==3){if(this._state===1)for(;S<w;){const v=_[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&&w-S>0&&this._put(_,S,w)}}end(_,S=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let w=!1,v=this._active.length-1,u=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,w=S,u=this._stack.fallThrough,this._stack.paused=!1),!u&&w===!1){for(;v>=0&&(w=this._active[v].end(_),w!==!0);v--)if(w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,w;v--}for(;v>=0;v--)if(w=this._active[v].end(!1),w instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,w}else this._handlerFb(this._id,"END",_);this._active=d,this._id=-1,this._state=0}}},a.OscHandler=class{constructor(_){this._handler=_,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(_,S,w){this._hitLimit||(this._data+=(0,g.utf32ToString)(_,S,w),this._data.length>f.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(_){let S=!1;if(this._hitLimit)S=!1;else if(_&&(S=this._handler(this._data),S instanceof Promise))return S.then(w=>(this._data="",this._hitLimit=!1,w));return this._data="",this._hitLimit=!1,S}}},8742:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.Params=void 0;const c=2147483647;class f{static fromArray(d){const _=new f;if(!d.length)return _;for(let S=Array.isArray(d[0])?1:0;S<d.length;++S){const w=d[S];if(Array.isArray(w))for(let v=0;v<w.length;++v)_.addSubParam(w[v]);else _.addParam(w)}return _}constructor(d=32,_=32){if(this.maxLength=d,this.maxSubParamsLength=_,_>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(d),this.length=0,this._subParams=new Int32Array(_),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(d),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const d=new f(this.maxLength,this.maxSubParamsLength);return d.params.set(this.params),d.length=this.length,d._subParams.set(this._subParams),d._subParamsLength=this._subParamsLength,d._subParamsIdx.set(this._subParamsIdx),d._rejectDigits=this._rejectDigits,d._rejectSubDigits=this._rejectSubDigits,d._digitIsSub=this._digitIsSub,d}toArray(){const d=[];for(let _=0;_<this.length;++_){d.push(this.params[_]);const S=this._subParamsIdx[_]>>8,w=255&this._subParamsIdx[_];w-S>0&&d.push(Array.prototype.slice.call(this._subParams,S,w))}return d}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(d){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=d>c?c:d}}addSubParam(d){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(d<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=d>c?c:d,this._subParamsIdx[this.length-1]++}}hasSubParams(d){return(255&this._subParamsIdx[d])-(this._subParamsIdx[d]>>8)>0}getSubParams(d){const _=this._subParamsIdx[d]>>8,S=255&this._subParamsIdx[d];return S-_>0?this._subParams.subarray(_,S):null}getSubParamsAll(){const d={};for(let _=0;_<this.length;++_){const S=this._subParamsIdx[_]>>8,w=255&this._subParamsIdx[_];w-S>0&&(d[_]=this._subParams.slice(S,w))}return d}addDigit(d){let _;if(this._rejectDigits||!(_=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const S=this._digitIsSub?this._subParams:this.params,w=S[_-1];S[_-1]=~w?Math.min(10*w+d,c):d}}a.Params=f},5741:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.AddonManager=void 0,a.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 g={instance:f,dispose:f.dispose,isDisposed:!1};this._addons.push(g),f.dispose=()=>this._wrappedAddonDispose(g),f.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let f=-1;for(let g=0;g<this._addons.length;g++)if(this._addons[g]===c){f=g;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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferApiView=void 0;const f=c(3785),g=c(511);a.BufferApiView=class{constructor(d,_){this._buffer=d,this.type=_}init(d){return this._buffer=d,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(d){const _=this._buffer.lines.get(d);if(_)return new f.BufferLineApiView(_)}getNullCell(){return new g.CellData}}},3785:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferLineApiView=void 0;const f=c(511);a.BufferLineApiView=class{constructor(g){this._line=g}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(g,d){if(!(g<0||g>=this._line.length))return d?(this._line.loadCell(g,d),d):this._line.loadCell(g,new f.CellData)}translateToString(g,d,_){return this._line.translateToString(g,d,_)}}},8285:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.BufferNamespaceApi=void 0;const f=c(8771),g=c(8460),d=c(844);class _ extends d.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new g.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)}}a.BufferNamespaceApi=_},7975:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.ParserApi=void 0,a.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,f){return this._core.registerCsiHandler(c,g=>f(g.toArray()))}addCsiHandler(c,f){return this.registerCsiHandler(c,f)}registerDcsHandler(c,f){return this._core.registerDcsHandler(c,(g,d)=>f(g,d.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:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeApi=void 0,a.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(m,a,c){var f=this&&this.__decorate||function(u,o,s,l){var p,C=arguments.length,x=C<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(u,o,s,l);else for(var k=u.length-1;k>=0;k--)(p=u[k])&&(x=(C<3?p(x):C>3?p(o,s,x):p(o,s))||x);return C>3&&x&&Object.defineProperty(o,s,x),x},g=this&&this.__param||function(u,o){return function(s,l){o(s,l,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.BufferService=a.MINIMUM_ROWS=a.MINIMUM_COLS=void 0;const d=c(8460),_=c(844),S=c(5295),w=c(2585);a.MINIMUM_COLS=2,a.MINIMUM_ROWS=1;let v=a.BufferService=class extends _.Disposable{get buffer(){return this.buffers.active}constructor(u){super(),this.isUserScrolling=!1,this._onResize=this.register(new d.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new d.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(u.rawOptions.cols||0,a.MINIMUM_COLS),this.rows=Math.max(u.rawOptions.rows||0,a.MINIMUM_ROWS),this.buffers=this.register(new S.BufferSet(u,this))}resize(u,o){this.cols=u,this.rows=o,this.buffers.resize(u,o),this._onResize.fire({cols:u,rows:o})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(u,o=!1){const s=this.buffer;let l;l=this._cachedBlankLine,l&&l.length===this.cols&&l.getFg(0)===u.fg&&l.getBg(0)===u.bg||(l=s.getBlankLine(u,o),this._cachedBlankLine=l),l.isWrapped=o;const p=s.ybase+s.scrollTop,C=s.ybase+s.scrollBottom;if(s.scrollTop===0){const x=s.lines.isFull;C===s.lines.length-1?x?s.lines.recycle().copyFrom(l):s.lines.push(l.clone()):s.lines.splice(C+1,0,l.clone()),x?this.isUserScrolling&&(s.ydisp=Math.max(s.ydisp-1,0)):(s.ybase++,this.isUserScrolling||s.ydisp++)}else{const x=C-p+1;s.lines.shiftElements(p+1,x-1,-1),s.lines.set(C,l.clone())}this.isUserScrolling||(s.ydisp=s.ybase),this._onScroll.fire(s.ydisp)}scrollLines(u,o,s){const l=this.buffer;if(u<0){if(l.ydisp===0)return;this.isUserScrolling=!0}else u+l.ydisp>=l.ybase&&(this.isUserScrolling=!1);const p=l.ydisp;l.ydisp=Math.max(Math.min(l.ydisp+u,l.ybase),0),p!==l.ydisp&&(o||this._onScroll.fire(l.ydisp))}};a.BufferService=v=f([g(0,w.IOptionsService)],v)},7994:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.CharsetService=void 0,a.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(m,a,c){var f=this&&this.__decorate||function(l,p,C,x){var k,y=arguments.length,b=y<3?p:x===null?x=Object.getOwnPropertyDescriptor(p,C):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(l,p,C,x);else for(var R=l.length-1;R>=0;R--)(k=l[R])&&(b=(y<3?k(b):y>3?k(p,C,b):k(p,C))||b);return y>3&&b&&Object.defineProperty(p,C,b),b},g=this&&this.__param||function(l,p){return function(C,x){p(C,x,l)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreMouseService=void 0;const d=c(2585),_=c(8460),S=c(844),w={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:l=>l.button!==4&&l.action===1&&(l.ctrl=!1,l.alt=!1,l.shift=!1,!0)},VT200:{events:19,restrict:l=>l.action!==32},DRAG:{events:23,restrict:l=>l.action!==32||l.button!==3},ANY:{events:31,restrict:l=>!0}};function v(l,p){let C=(l.ctrl?16:0)|(l.shift?4:0)|(l.alt?8:0);return l.button===4?(C|=64,C|=l.action):(C|=3&l.button,4&l.button&&(C|=64),8&l.button&&(C|=128),l.action===32?C|=32:l.action!==0||p||(C|=3)),C}const u=String.fromCharCode,o={DEFAULT:l=>{const p=[v(l,!1)+32,l.col+32,l.row+32];return p[0]>255||p[1]>255||p[2]>255?"":`\x1B[M${u(p[0])}${u(p[1])}${u(p[2])}`},SGR:l=>{const p=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.col};${l.row}${p}`},SGR_PIXELS:l=>{const p=l.action===0&&l.button!==4?"m":"M";return`\x1B[<${v(l,!0)};${l.x};${l.y}${p}`}};let s=a.CoreMouseService=class extends S.Disposable{constructor(l,p){super(),this._bufferService=l,this._coreService=p,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new _.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const C of Object.keys(w))this.addProtocol(C,w[C]);for(const C of Object.keys(o))this.addEncoding(C,o[C]);this.reset()}addProtocol(l,p){this._protocols[l]=p}addEncoding(l,p){this._encodings[l]=p}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(l){if(!this._protocols[l])throw new Error(`unknown protocol "${l}"`);this._activeProtocol=l,this._onProtocolChange.fire(this._protocols[l].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(l){if(!this._encodings[l])throw new Error(`unknown encoding "${l}"`);this._activeEncoding=l}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(l){if(l.col<0||l.col>=this._bufferService.cols||l.row<0||l.row>=this._bufferService.rows||l.button===4&&l.action===32||l.button===3&&l.action!==32||l.button!==4&&(l.action===2||l.action===3)||(l.col++,l.row++,l.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,l,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(l))return!1;const p=this._encodings[this._activeEncoding](l);return p&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(p):this._coreService.triggerDataEvent(p,!0)),this._lastEvent=l,!0}explainEvents(l){return{down:!!(1&l),up:!!(2&l),drag:!!(4&l),move:!!(8&l),wheel:!!(16&l)}}_equalEvents(l,p,C){if(C){if(l.x!==p.x||l.y!==p.y)return!1}else if(l.col!==p.col||l.row!==p.row)return!1;return l.button===p.button&&l.action===p.action&&l.ctrl===p.ctrl&&l.alt===p.alt&&l.shift===p.shift}};a.CoreMouseService=s=f([g(0,d.IBufferService),g(1,d.ICoreService)],s)},6975:function(m,a,c){var f=this&&this.__decorate||function(s,l,p,C){var x,k=arguments.length,y=k<3?l:C===null?C=Object.getOwnPropertyDescriptor(l,p):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(s,l,p,C);else for(var b=s.length-1;b>=0;b--)(x=s[b])&&(y=(k<3?x(y):k>3?x(l,p,y):x(l,p))||y);return k>3&&y&&Object.defineProperty(l,p,y),y},g=this&&this.__param||function(s,l){return function(p,C){l(p,C,s)}};Object.defineProperty(a,"__esModule",{value:!0}),a.CoreService=void 0;const d=c(1439),_=c(8460),S=c(844),w=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 o=a.CoreService=class extends S.Disposable{constructor(s,l,p){super(),this._bufferService=s,this._logService=l,this._optionsService=p,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new _.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new _.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new _.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new _.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,d.clone)(v),this.decPrivateModes=(0,d.clone)(u)}reset(){this.modes=(0,d.clone)(v),this.decPrivateModes=(0,d.clone)(u)}triggerDataEvent(s,l=!1){if(this._optionsService.rawOptions.disableStdin)return;const p=this._bufferService.buffer;l&&this._optionsService.rawOptions.scrollOnUserInput&&p.ybase!==p.ydisp&&this._onRequestScrollToBottom.fire(),l&&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(l=>l.charCodeAt(0))),this._onBinary.fire(s))}};a.CoreService=o=f([g(0,w.IBufferService),g(1,w.ILogService),g(2,w.IOptionsService)],o)},9074:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.DecorationService=void 0;const f=c(8055),g=c(8460),d=c(844),_=c(6106);let S=0,w=0;class v extends d.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new _.SortedList(s=>s==null?void 0:s.marker.line),this._onDecorationRegistered=this.register(new g.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new g.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,d.toDisposable)(()=>this.reset()))}registerDecoration(s){if(s.marker.isDisposed)return;const l=new u(s);if(l){const p=l.marker.onDispose(()=>l.dispose());l.onDispose(()=>{l&&(this._decorations.delete(l)&&this._onDecorationRemoved.fire(l),p.dispose())}),this._decorations.insert(l),this._onDecorationRegistered.fire(l)}return l}reset(){for(const s of this._decorations.values())s.dispose();this._decorations.clear()}*getDecorationsAtCell(s,l,p){let C=0,x=0;for(const k of this._decorations.getKeyIterator(l))C=k.options.x??0,x=C+(k.options.width??1),s>=C&&s<x&&(!p||(k.options.layer??"bottom")===p)&&(yield k)}forEachDecorationAtCell(s,l,p,C){this._decorations.forEachByKey(l,x=>{S=x.options.x??0,w=S+(x.options.width??1),s>=S&&s<w&&(!p||(x.options.layer??"bottom")===p)&&C(x)})}}a.DecorationService=v;class u extends d.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 g.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new g.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:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.InstantiationService=a.ServiceCollection=void 0;const f=c(2585),g=c(8343);class d{constructor(...S){this._entries=new Map;for(const[w,v]of S)this.set(w,v)}set(S,w){const v=this._entries.get(S);return this._entries.set(S,w),v}forEach(S){for(const[w,v]of this._entries.entries())S(w,v)}has(S){return this._entries.has(S)}get(S){return this._entries.get(S)}}a.ServiceCollection=d,a.InstantiationService=class{constructor(){this._services=new d,this._services.set(f.IInstantiationService,this)}setService(_,S){this._services.set(_,S)}getService(_){return this._services.get(_)}createInstance(_,...S){const w=(0,g.getServiceDependencies)(_).sort((o,s)=>o.index-s.index),v=[];for(const o of w){const s=this._services.get(o.id);if(!s)throw new Error(`[createInstance] ${_.name} depends on UNKNOWN service ${o.id}.`);v.push(s)}const u=w.length>0?w[0].index:S.length;if(S.length!==u)throw new Error(`[createInstance] First service dependency of ${_.name} at position ${u+1} conflicts with ${S.length} static arguments`);return new _(...S,...v)}}},7866:function(m,a,c){var f=this&&this.__decorate||function(u,o,s,l){var p,C=arguments.length,x=C<3?o:l===null?l=Object.getOwnPropertyDescriptor(o,s):l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(u,o,s,l);else for(var k=u.length-1;k>=0;k--)(p=u[k])&&(x=(C<3?p(x):C>3?p(o,s,x):p(o,s))||x);return C>3&&x&&Object.defineProperty(o,s,x),x},g=this&&this.__param||function(u,o){return function(s,l){o(s,l,u)}};Object.defineProperty(a,"__esModule",{value:!0}),a.traceCall=a.setTraceLogger=a.LogService=void 0;const d=c(844),_=c(2585),S={trace:_.LogLevelEnum.TRACE,debug:_.LogLevelEnum.DEBUG,info:_.LogLevelEnum.INFO,warn:_.LogLevelEnum.WARN,error:_.LogLevelEnum.ERROR,off:_.LogLevelEnum.OFF};let w,v=a.LogService=class extends d.Disposable{get logLevel(){return this._logLevel}constructor(u){super(),this._optionsService=u,this._logLevel=_.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",()=>this._updateLogLevel())),w=this}_updateLogLevel(){this._logLevel=S[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(u){for(let o=0;o<u.length;o++)typeof u[o]=="function"&&(u[o]=u[o]())}_log(u,o,s){this._evalLazyOptionalParams(s),u.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+o,...s)}trace(u,...o){var s;this._logLevel<=_.LogLevelEnum.TRACE&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.trace.bind(this._optionsService.options.logger))??console.log,u,o)}debug(u,...o){var s;this._logLevel<=_.LogLevelEnum.DEBUG&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.debug.bind(this._optionsService.options.logger))??console.log,u,o)}info(u,...o){var s;this._logLevel<=_.LogLevelEnum.INFO&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.info.bind(this._optionsService.options.logger))??console.info,u,o)}warn(u,...o){var s;this._logLevel<=_.LogLevelEnum.WARN&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.warn.bind(this._optionsService.options.logger))??console.warn,u,o)}error(u,...o){var s;this._logLevel<=_.LogLevelEnum.ERROR&&this._log(((s=this._optionsService.options.logger)==null?void 0:s.error.bind(this._optionsService.options.logger))??console.error,u,o)}};a.LogService=v=f([g(0,_.IOptionsService)],v),a.setTraceLogger=function(u){w=u},a.traceCall=function(u,o,s){if(typeof s.value!="function")throw new Error("not supported");const l=s.value;s.value=function(...p){if(w.logLevel!==_.LogLevelEnum.TRACE)return l.apply(this,p);w.trace(`GlyphRenderer#${l.name}(${p.map(x=>JSON.stringify(x)).join(", ")})`);const C=l.apply(this,p);return w.trace(`GlyphRenderer#${l.name} return`,C),C}}},7302:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.OptionsService=a.DEFAULT_OPTIONS=void 0;const f=c(8460),g=c(844),d=c(6114);a.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:d.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const _=["normal","bold","100","200","300","400","500","600","700","800","900"];class S extends g.Disposable{constructor(v){super(),this._onOptionChange=this.register(new f.EventEmitter),this.onOptionChange=this._onOptionChange.event;const u={...a.DEFAULT_OPTIONS};for(const o in v)if(o in u)try{const s=v[o];u[o]=this._sanitizeAndValidateOption(o,s)}catch(s){console.error(s)}this.rawOptions=u,this.options={...u},this._setupOptions(),this.register((0,g.toDisposable)(()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null}))}onSpecificOptionChange(v,u){return this.onOptionChange(o=>{o===v&&u(this.rawOptions[v])})}onMultipleOptionChange(v,u){return this.onOptionChange(o=>{v.indexOf(o)!==-1&&u()})}_setupOptions(){const v=o=>{if(!(o in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);return this.rawOptions[o]},u=(o,s)=>{if(!(o in a.DEFAULT_OPTIONS))throw new Error(`No option with key "${o}"`);s=this._sanitizeAndValidateOption(o,s),this.rawOptions[o]!==s&&(this.rawOptions[o]=s,this._onOptionChange.fire(o))};for(const o in this.rawOptions){const s={get:v.bind(this,o),set:u.bind(this,o)};Object.defineProperty(this.options,o,s)}}_sanitizeAndValidateOption(v,u){switch(v){case"cursorStyle":if(u||(u=a.DEFAULT_OPTIONS[v]),!function(o){return o==="block"||o==="underline"||o==="bar"}(u))throw new Error(`"${u}" is not a valid value for ${v}`);break;case"wordSeparator":u||(u=a.DEFAULT_OPTIONS[v]);break;case"fontWeight":case"fontWeightBold":if(typeof u=="number"&&1<=u&&u<=1e3)break;u=_.includes(u)?u:a.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}}a.OptionsService=S},2660:function(m,a,c){var f=this&&this.__decorate||function(S,w,v,u){var o,s=arguments.length,l=s<3?w:u===null?u=Object.getOwnPropertyDescriptor(w,v):u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(S,w,v,u);else for(var p=S.length-1;p>=0;p--)(o=S[p])&&(l=(s<3?o(l):s>3?o(w,v,l):o(w,v))||l);return s>3&&l&&Object.defineProperty(w,v,l),l},g=this&&this.__param||function(S,w){return function(v,u){w(v,u,S)}};Object.defineProperty(a,"__esModule",{value:!0}),a.OscLinkService=void 0;const d=c(2585);let _=a.OscLinkService=class{constructor(S){this._bufferService=S,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(S){const w=this._bufferService.buffer;if(S.id===void 0){const p=w.addMarker(w.ybase+w.y),C={data:S,id:this._nextId++,lines:[p]};return p.onDispose(()=>this._removeMarkerFromLink(C,p)),this._dataByLinkId.set(C.id,C),C.id}const v=S,u=this._getEntryIdKey(v),o=this._entriesWithId.get(u);if(o)return this.addLineToLink(o.id,w.ybase+w.y),o.id;const s=w.addMarker(w.ybase+w.y),l={id:this._nextId++,key:this._getEntryIdKey(v),data:v,lines:[s]};return s.onDispose(()=>this._removeMarkerFromLink(l,s)),this._entriesWithId.set(l.key,l),this._dataByLinkId.set(l.id,l),l.id}addLineToLink(S,w){const v=this._dataByLinkId.get(S);if(v&&v.lines.every(u=>u.line!==w)){const u=this._bufferService.buffer.addMarker(w);v.lines.push(u),u.onDispose(()=>this._removeMarkerFromLink(v,u))}}getLinkData(S){var w;return(w=this._dataByLinkId.get(S))==null?void 0:w.data}_getEntryIdKey(S){return`${S.id};;${S.uri}`}_removeMarkerFromLink(S,w){const v=S.lines.indexOf(w);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)))}};a.OscLinkService=_=f([g(0,d.IBufferService)],_)},8343:(m,a)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.createDecorator=a.getServiceDependencies=a.serviceRegistry=void 0;const c="di$target",f="di$dependencies";a.serviceRegistry=new Map,a.getServiceDependencies=function(g){return g[f]||[]},a.createDecorator=function(g){if(a.serviceRegistry.has(g))return a.serviceRegistry.get(g);const d=function(_,S,w){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(v,u,o){u[c]===u?u[f].push({id:v,index:o}):(u[f]=[{id:v,index:o}],u[c]=u)})(d,_,w)};return d.toString=()=>g,a.serviceRegistry.set(g,d),d}},2585:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.IDecorationService=a.IUnicodeService=a.IOscLinkService=a.IOptionsService=a.ILogService=a.LogLevelEnum=a.IInstantiationService=a.ICharsetService=a.ICoreService=a.ICoreMouseService=a.IBufferService=void 0;const f=c(8343);var g;a.IBufferService=(0,f.createDecorator)("BufferService"),a.ICoreMouseService=(0,f.createDecorator)("CoreMouseService"),a.ICoreService=(0,f.createDecorator)("CoreService"),a.ICharsetService=(0,f.createDecorator)("CharsetService"),a.IInstantiationService=(0,f.createDecorator)("InstantiationService"),function(d){d[d.TRACE=0]="TRACE",d[d.DEBUG=1]="DEBUG",d[d.INFO=2]="INFO",d[d.WARN=3]="WARN",d[d.ERROR=4]="ERROR",d[d.OFF=5]="OFF"}(g||(a.LogLevelEnum=g={})),a.ILogService=(0,f.createDecorator)("LogService"),a.IOptionsService=(0,f.createDecorator)("OptionsService"),a.IOscLinkService=(0,f.createDecorator)("OscLinkService"),a.IUnicodeService=(0,f.createDecorator)("UnicodeService"),a.IDecorationService=(0,f.createDecorator)("DecorationService")},1480:(m,a,c)=>{Object.defineProperty(a,"__esModule",{value:!0}),a.UnicodeService=void 0;const f=c(8460),g=c(225);class d{static extractShouldJoin(S){return(1&S)!=0}static extractWidth(S){return S>>1&3}static extractCharKind(S){return S>>3}static createPropertyValue(S,w,v=!1){return(16777215&S)<<3|(3&w)<<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 g.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 w=0,v=0;const u=S.length;for(let o=0;o<u;++o){let s=S.charCodeAt(o);if(55296<=s&&s<=56319){if(++o>=u)return w+this.wcwidth(s);const C=S.charCodeAt(o);56320<=C&&C<=57343?s=1024*(s-55296)+C-56320+65536:w+=this.wcwidth(C)}const l=this.charProperties(s,v);let p=d.extractWidth(l);d.extractShouldJoin(l)&&(p-=d.extractWidth(v)),w+=p,v=l}return w}charProperties(S,w){return this._activeProvider.charProperties(S,w)}}a.UnicodeService=d}},i={};function n(m){var a=i[m];if(a!==void 0)return a.exports;var c=i[m]={exports:{}};return r[m].call(c.exports,c,c.exports,n),c.exports}var h={};return(()=>{var m=h;Object.defineProperty(m,"__esModule",{value:!0}),m.Terminal=void 0;const a=n(9042),c=n(3236),f=n(844),g=n(5741),d=n(8285),_=n(7975),S=n(7090),w=["cols","rows"];class v extends f.Disposable{constructor(o){super(),this._core=this.register(new c.Terminal(o)),this._addonManager=this.register(new g.AddonManager),this._publicOptions={...this._core.options};const s=p=>this._core.options[p],l=(p,C)=>{this._checkReadonlyOptions(p),this._core.options[p]=C};for(const p in this._core.options){const C={get:s.bind(this,p),set:l.bind(this,p)};Object.defineProperty(this._publicOptions,p,C)}}_checkReadonlyOptions(o){if(w.includes(o))throw new Error(`Option "${o}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new _.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 d.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const o=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:o.applicationCursorKeys,applicationKeypadMode:o.applicationKeypad,bracketedPasteMode:o.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:s,originMode:o.origin,reverseWraparoundMode:o.reverseWraparound,sendFocusMode:o.sendFocus,wraparoundMode:o.wraparound}}get options(){return this._publicOptions}set options(o){for(const s in o)this._publicOptions[s]=o[s]}blur(){this._core.blur()}focus(){this._core.focus()}input(o,s=!0){this._core.input(o,s)}resize(o,s){this._verifyIntegers(o,s),this._core.resize(o,s)}open(o){this._core.open(o)}attachCustomKeyEventHandler(o){this._core.attachCustomKeyEventHandler(o)}attachCustomWheelEventHandler(o){this._core.attachCustomWheelEventHandler(o)}registerLinkProvider(o){return this._core.registerLinkProvider(o)}registerCharacterJoiner(o){return this._checkProposedApi(),this._core.registerCharacterJoiner(o)}deregisterCharacterJoiner(o){this._checkProposedApi(),this._core.deregisterCharacterJoiner(o)}registerMarker(o=0){return this._verifyIntegers(o),this._core.registerMarker(o)}registerDecoration(o){return this._checkProposedApi(),this._verifyPositiveIntegers(o.x??0,o.width??0,o.height??0),this._core.registerDecoration(o)}hasSelection(){return this._core.hasSelection()}select(o,s,l){this._verifyIntegers(o,s,l),this._core.select(o,s,l)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(o,s){this._verifyIntegers(o,s),this._core.selectLines(o,s)}dispose(){super.dispose()}scrollLines(o){this._verifyIntegers(o),this._core.scrollLines(o)}scrollPages(o){this._verifyIntegers(o),this._core.scrollPages(o)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(o){this._verifyIntegers(o),this._core.scrollToLine(o)}clear(){this._core.clear()}write(o,s){this._core.write(o,s)}writeln(o,s){this._core.write(o),this._core.write(`\r
|
|
64
|
+
`,s)}paste(o){this._core.paste(o)}refresh(o,s){this._verifyIntegers(o,s),this._core.refresh(o,s)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(o){this._addonManager.loadAddon(this,o)}static get strings(){return a}_verifyIntegers(...o){for(const s of o)if(s===1/0||isNaN(s)||s%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...o){for(const s of o)if(s&&(s===1/0||isNaN(s)||s%1!=0||s<0))throw new Error("This API only accepts positive integers")}}m.Terminal=v})(),h})())})(Rh);var qp=Rh.exports,Ph={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(n){this._terminal=n}dispose(){}fit(){const n=this.proposeDimensions();if(!n||!this._terminal||isNaN(n.cols)||isNaN(n.rows))return;const h=this._terminal._core;this._terminal.rows===n.rows&&this._terminal.cols===n.cols||(h._renderService.clear(),this._terminal.resize(n.cols,n.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const n=this._terminal._core,h=n._renderService.dimensions;if(h.css.cell.width===0||h.css.cell.height===0)return;const m=this._terminal.options.scrollback===0?0:n.viewport.scrollBarWidth,a=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(a.getPropertyValue("height")),f=Math.max(0,parseInt(a.getPropertyValue("width"))),g=window.getComputedStyle(this._terminal.element),d=c-(parseInt(g.getPropertyValue("padding-top"))+parseInt(g.getPropertyValue("padding-bottom"))),_=f-(parseInt(g.getPropertyValue("padding-right"))+parseInt(g.getPropertyValue("padding-left")))-m;return{cols:Math.max(2,Math.floor(_/h.css.cell.width)),rows:Math.max(1,Math.floor(d/h.css.cell.height))}}}})(),r})())})(Ph);var nc=Ph.exports,Mh={exports:{}};(function(e,t){(function(r,i){e.exports=i()})(self,()=>(()=>{var r={6:(m,a)=>{function c(g){try{const d=new URL(g),_=d.password&&d.username?`${d.protocol}//${d.username}:${d.password}@${d.host}`:d.username?`${d.protocol}//${d.username}@${d.host}`:`${d.protocol}//${d.host}`;return g.toLocaleLowerCase().startsWith(_.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(a,"__esModule",{value:!0}),a.LinkComputer=a.WebLinkProvider=void 0,a.WebLinkProvider=class{constructor(g,d,_,S={}){this._terminal=g,this._regex=d,this._handler=_,this._options=S}provideLinks(g,d){const _=f.computeLink(g,this._regex,this._terminal,this._handler);d(this._addCallbacks(_))}_addCallbacks(g){return g.map(d=>(d.leave=this._options.leave,d.hover=(_,S)=>{if(this._options.hover){const{range:w}=d;this._options.hover(_,S,w)}},d))}};class f{static computeLink(d,_,S,w){const v=new RegExp(_.source,(_.flags||"")+"g"),[u,o]=f._getWindowedLineStrings(d-1,S),s=u.join("");let l;const p=[];for(;l=v.exec(s);){const C=l[0];if(!c(C))continue;const[x,k]=f._mapStrIdx(S,o,0,l.index),[y,b]=f._mapStrIdx(S,x,k,C.length);if(x===-1||k===-1||y===-1||b===-1)continue;const R={start:{x:k+1,y:x+1},end:{x:b,y:y+1}};p.push({range:R,text:C,activate:w})}return p}static _getWindowedLineStrings(d,_){let S,w=d,v=d,u=0,o="";const s=[];if(S=_.buffer.active.getLine(d)){const l=S.translateToString(!0);if(S.isWrapped&&l[0]!==" "){for(u=0;(S=_.buffer.active.getLine(--w))&&u<2048&&(o=S.translateToString(!0),u+=o.length,s.push(o),S.isWrapped&&o.indexOf(" ")===-1););s.reverse()}for(s.push(l),u=0;(S=_.buffer.active.getLine(++v))&&S.isWrapped&&u<2048&&(o=S.translateToString(!0),u+=o.length,s.push(o),o.indexOf(" ")===-1););}return[s,w]}static _mapStrIdx(d,_,S,w){const v=d.buffer.active,u=v.getNullCell();let o=S;for(;w;){const s=v.getLine(_);if(!s)return[-1,-1];for(let l=o;l<s.length;++l){s.getCell(l,u);const p=u.getChars();if(u.getWidth()&&(w-=p.length||1,l===s.length-1&&p==="")){const C=v.getLine(_+1);C&&C.isWrapped&&(C.getCell(0,u),u.getWidth()===2&&(w+=1))}if(w<0)return[_,l]}_++,o=0}return[_,o]}}a.LinkComputer=f}},i={};function n(m){var a=i[m];if(a!==void 0)return a.exports;var c=i[m]={exports:{}};return r[m](c,c.exports,n),c.exports}var h={};return(()=>{var m=h;Object.defineProperty(m,"__esModule",{value:!0}),m.WebLinksAddon=void 0;const a=n(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function f(g,d){const _=window.open();if(_){try{_.opener=null}catch{}_.location.href=d}else console.warn("Opening link blocked as opener could not be cleared")}m.WebLinksAddon=class{constructor(g=f,d={}){this._handler=g,this._options=d}activate(g){this._terminal=g;const d=this._options,_=d.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new a.WebLinkProvider(this._terminal,_,this._handler,d))}dispose(){var g;(g=this._linkProvider)==null||g.dispose()}}})(),h})())})(Mh);var Gp=Mh.exports;function oc(){const e=te.getState().theme;return zo(e)==="light"?Up:Wp}const Wo=new Set,Uo=new Map,$o=new Map;function Xp(e,t){$o.set(e,t)}function Qp(e){const t=$o.get(e);return t!==void 0?($o.delete(e),t):null}function Yp({terminalId:e,projectId:t,cwd:r}){const i=Q.useRef(null),n=Q.useRef(null),h=Q.useRef(null),m=Q.useRef(null),a=Re(_=>_.setTerminalInstance),c=Re(_=>_.createSession),f=te(_=>_.setFocusedTerminal);Q.useEffect(()=>{const _=i.current;if(!_)return;_.innerHTML="";const S=Re.getState().sessions[e],w=Uo.get(e);if(S!=null&&S.terminal&&w){const p=S.terminal;n.current=p,_.appendChild(w);const C=new nc.FitAddon;return p.loadAddon(C),h.current=C,requestAnimationFrame(()=>{try{C.fit(),p.scrollToBottom();const{cols:x,rows:k}=p;m.current={cols:x,rows:k},De({type:"pty:resize",terminalId:e,cols:x,rows:k})}catch{}}),()=>{}}const v=oc(),u=zo(te.getState().theme)==="light",o=new qp.Terminal({theme:v,fontFamily:"'JetBrains Mono', 'Fira Code', 'SF Mono', 'Menlo', monospace",fontSize:13,lineHeight:1.2,cursorBlink:!0,cursorStyle:"block",allowProposedApi:!0,scrollback:1e4,minimumContrastRatio:u?7:1}),s=new nc.FitAddon,l=new Gp.WebLinksAddon;return o.loadAddon(s),o.loadAddon(l),o.open(_),n.current=o,h.current=s,o.element&&Uo.set(e,o.element),c(e,t),a(e,o),o.attachCustomKeyEventHandler(p=>{if(p.key==="Enter"&&p.shiftKey)return p.type==="keydown"&&De({type:"pty:input",terminalId:e,data:`
|
|
65
|
+
`}),!1;if(p.metaKey&&!p.altKey&&!p.ctrlKey&&!p.shiftKey&&p.type==="keydown"){if(p.key==="ArrowLeft")return De({type:"pty:input",terminalId:e,data:""}),!1;if(p.key==="ArrowRight")return De({type:"pty:input",terminalId:e,data:""}),!1;if(p.key==="Backspace")return De({type:"pty:input",terminalId:e,data:""}),!1}return!(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(p.key)&&p.shiftKey&&!p.metaKey&&!p.altKey)}),o.onData(p=>{De({type:"pty:input",terminalId:e,data:p})}),o.onTitleChange(p=>{Re.getState().setTitle(e,p)}),Wo.has(e)||(Wo.add(e),requestAnimationFrame(()=>{try{s.fit()}catch{}De({type:"pty:spawn",terminalId:e,projectId:t,cwd:r}),De({type:"pty:resize",terminalId:e,cols:o.cols,rows:o.rows}),m.current={cols:o.cols,rows:o.rows},o.focus(),f(e)})),()=>{}},[e,t,r,c,a]),Q.useEffect(()=>{const _=()=>{const o=n.current;if(o){const s=zo(te.getState().theme)==="light";o.options.theme=oc(),o.options.minimumContrastRatio=s?7:1}};let S=te.getState().theme;const w=te.subscribe(o=>{o.theme!==S&&(S=o.theme,_())}),v=window.matchMedia("(prefers-color-scheme: light)"),u=()=>{te.getState().theme==="system"&&_()};return v.addEventListener("change",u),()=>{w(),v.removeEventListener("change",u)}},[]);const g=Q.useCallback(()=>{const _=h.current,S=n.current;if(!(!_||!S))try{_.fit(),S.scrollToBottom();const{cols:w,rows:v}=S,u=m.current;(!u||u.cols!==w||u.rows!==v)&&(m.current={cols:w,rows:v},De({type:"pty:resize",terminalId:e,cols:w,rows:v}))}catch{}},[e]),d=Q.useCallback(()=>{var _;(_=n.current)==null||_.focus(),f(e)},[e,f]);return{containerRef:i,fit:g,focus:d,terminalRef:n}}function hn(e){Wo.delete(e),Uo.delete(e)}let Ze=null;function Jp(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function De(e){(Ze==null?void 0:Ze.readyState)===WebSocket.OPEN&&Ze.send(JSON.stringify(e))}function Zp(){const e=te(h=>h.setConnectionStatus),t=de(h=>h.addProject),r=de(h=>h.setActiveProject),i=Q.useRef(),n=Q.useCallback(()=>{if((Ze==null?void 0:Ze.readyState)===WebSocket.OPEN||(Ze==null?void 0:Ze.readyState)===WebSocket.CONNECTING)return;e("connecting");const h=new WebSocket(Jp());Ze=h,h.onopen=()=>{e("connected")},h.onmessage=m=>{var a,c,f;try{const g=JSON.parse(m.data);if(g.type==="pty:output"){const d=Re.getState().sessions[g.terminalId];(a=d==null?void 0:d.terminal)==null||a.write(g.data);const _=Qp(g.terminalId);_&&De({type:"pty:input",terminalId:g.terminalId,data:_});return}if(g.type==="pty:exit"){const d=g.terminalId,_=Re.getState().sessions[d],S=_==null?void 0:_.projectId;if((c=_==null?void 0:_.terminal)==null||c.dispose(),Re.getState().removeSession(d),hn(d),S){oe.getState().removePaneFromProject(S,d),de.getState().removeTerminalFromProject(S,d);const w=ye(oe.getState().getLayout(S)),v=te.getState().focusedTerminalId;if(v===d&&w.length>0){const u=w[0];te.getState().setFocusedTerminal(u);const o=Re.getState().sessions[u];(f=o==null?void 0:o.terminal)==null||f.focus()}else v===d&&te.getState().setFocusedTerminal(null)}return}if(g.type==="project:spawned"){const d=Object.values(de.getState().projects).find(_=>_.cwd===g.cwd);d?r(d.id):(t({id:g.projectId,name:g.name,cwd:g.cwd,terminalIds:[]}),r(g.projectId));return}if(g.type==="editor:active"){if(!te.getState().editorSyncEnabled)return;const{projects:d,activeProjectId:_}=de.getState(),S=Object.values(d).find(w=>{const v=w.cwd.replace(/\/$/,"").split("/").pop();return w.name===g.projectName||v===g.projectName});S&&S.id!==_&&r(S.id)}}catch{}},h.onclose=()=>{e("disconnected"),Ze=null,i.current=setTimeout(n,2e3)},h.onerror=()=>{h.close()}},[e,t,r]);Q.useEffect(()=>(n(),()=>{clearTimeout(i.current)}),[n])}const e_=new Set(["n","w","t","d","r"]);function t_(){const e=te(r=>r.toggleSidebar),t=te(r=>r.setFocusedTerminal);Q.useEffect(()=>{const r=i=>{var _,S,w;const n=i.key.toLowerCase();if(i.ctrlKey&&i.shiftKey&&!i.metaKey&&!i.altKey&&["arrowleft","arrowright","arrowup","arrowdown"].includes(n)){i.preventDefault(),i.stopPropagation();const v=de.getState().activeProjectId;if(!v)return;const u=oe.getState().getLayout(v),o=te.getState().focusedTerminalId;if(!o||!u)return;const l=sc(u,o,n==="arrowleft"?"left":n==="arrowright"?"right":n==="arrowup"?"up":"down");if(l){t(l);const p=Re.getState().sessions[l];(_=p==null?void 0:p.terminal)==null||_.focus()}return}if(i.shiftKey&&!i.ctrlKey&&!i.metaKey&&!i.altKey&&["arrowleft","arrowright","arrowup","arrowdown"].includes(n)){i.preventDefault(),i.stopPropagation();const v=de.getState().activeProjectId;if(!v)return;const u=oe.getState().getLayout(v),o=te.getState().focusedTerminalId;if(!o||!u)return;const l=sc(u,o,n==="arrowleft"?"left":n==="arrowright"?"right":n==="arrowup"?"up":"down");l&&oe.getState().swapPanesInProject(v,o,l);return}if(!(navigator.platform.startsWith("Mac")?i.metaKey:i.ctrlKey))return;if((n==="="||n==="+"||n==="-"||n==="0")&&!i.shiftKey&&!("chrome"in window)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent)){i.preventDefault(),i.stopPropagation();const u=parseFloat(document.documentElement.style.zoom||"1");n==="="||n==="+"?document.documentElement.style.zoom=String(Math.min(u+.1,2)):n==="-"?document.documentElement.style.zoom=String(Math.max(u-.1,.5)):document.documentElement.style.zoom="1",window.dispatchEvent(new Event("resize"));return}(e_.has(n)||n>="1"&&n<="9")&&(i.preventDefault(),i.stopPropagation());const a=de.getState().activeProjectId;if(!a)return;const c=oe.getState().getLayout(a),f=te.getState().focusedTerminalId,g=de.getState().projects[a];if(n==="d"&&!i.shiftKey){e();return}if(n==="n"){if(!g)return;const v=crypto.randomUUID(),u=ye(c);if(u.length>0){const o=f??u[u.length-1],s=i.shiftKey?"horizontal":"vertical";oe.getState().addPaneToProject(a,o,v,s)}else oe.getState().setLayout(a,{type:"leaf",terminalId:v});de.getState().addTerminalToProject(a,v),t(v);return}if(n==="w"&&!i.shiftKey){if(!f||!c)return;De({type:"pty:kill",terminalId:f}),oe.getState().removePaneFromProject(a,f),de.getState().removeTerminalFromProject(a,f);const v=Re.getState().sessions[f];(S=v==null?void 0:v.terminal)==null||S.dispose(),Re.getState().removeSession(f),hn(f);const u=ye(oe.getState().getLayout(a));t(u[0]??null);return}if(n==="t"&&!i.shiftKey){if(!g)return;const v=ye(c);v.length>0&&oe.getState().cyclePreset(a,v);return}if(n==="r"&&!i.shiftKey){const v=ye(c);if(v.length===0)return;let u;v.length<=2?u="even-vertical":v.length===3?u="main-left":u="grid";const o=Oi(v,u);o&&oe.getState().setLayout(a,o);return}const d=parseInt(n);if(d>=1&&d<=9){const u=ye(c)[d-1];if(u){t(u);const o=Re.getState().sessions[u];(w=o==null?void 0:o.terminal)==null||w.focus()}return}};return window.addEventListener("keydown",r,{capture:!0}),()=>window.removeEventListener("keydown",r,{capture:!0})},[e,t])}const Er=Fi()((e,t)=>({favourites:{},addFavourite:r=>{e(i=>({favourites:{...i.favourites,[r.id]:r}})),_i({favourites:{...t().favourites}})},updateFavourite:(r,i)=>{e(n=>{const h=n.favourites[r];return h?{favourites:{...n.favourites,[r]:{...h,...i}}}:n}),_i({favourites:{...t().favourites}})},removeFavourite:r=>{e(i=>{const{[r]:n,...h}=i.favourites;return{favourites:h}}),_i({favourites:{...t().favourites}})},hydrateFromServer:async()=>{try{const i=await(await fetch("/api/settings")).json();i.favourites&&e({favourites:i.favourites})}catch{}}}));/**
|
|
66
66
|
* @license lucide-react v0.400.0 - ISC
|
|
67
67
|
*
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
|
-
*/const r_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),
|
|
70
|
+
*/const r_=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ah=(...e)=>e.filter((t,r,i)=>!!t&&i.indexOf(t)===r).join(" ");/**
|
|
71
71
|
* @license lucide-react v0.400.0 - ISC
|
|
72
72
|
*
|
|
73
73
|
* This source code is licensed under the ISC license.
|
|
@@ -77,12 +77,12 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
77
77
|
*
|
|
78
78
|
* This source code is licensed under the ISC license.
|
|
79
79
|
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const s_=Q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:n="",children:h,iconNode:m,...a},c)=>Q.createElement("svg",{ref:c,...i_,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:
|
|
80
|
+
*/const s_=Q.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:r=2,absoluteStrokeWidth:i,className:n="",children:h,iconNode:m,...a},c)=>Q.createElement("svg",{ref:c,...i_,width:t,height:t,stroke:e,strokeWidth:i?Number(r)*24/Number(t):r,className:Ah("lucide",n),...a},[...m.map(([f,g])=>Q.createElement(f,g)),...Array.isArray(h)?h:[h]]));/**
|
|
81
81
|
* @license lucide-react v0.400.0 - ISC
|
|
82
82
|
*
|
|
83
83
|
* This source code is licensed under the ISC license.
|
|
84
84
|
* See the LICENSE file in the root directory of this source tree.
|
|
85
|
-
*/const ce=(e,t)=>{const r=Q.forwardRef(({className:i,...n},h)=>Q.createElement(s_,{ref:h,iconNode:t,className:
|
|
85
|
+
*/const ce=(e,t)=>{const r=Q.forwardRef(({className:i,...n},h)=>Q.createElement(s_,{ref:h,iconNode:t,className:Ah(`lucide-${r_(e)}`,i),...n}));return r.displayName=`${e}`,r};/**
|
|
86
86
|
* @license lucide-react v0.400.0 - ISC
|
|
87
87
|
*
|
|
88
88
|
* This source code is licensed under the ISC license.
|
|
@@ -107,7 +107,7 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
107
107
|
*
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
|
-
*/const
|
|
110
|
+
*/const Fa=ce("Columns2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/**
|
|
111
111
|
* @license lucide-react v0.400.0 - ISC
|
|
112
112
|
*
|
|
113
113
|
* This source code is licensed under the ISC license.
|
|
@@ -117,7 +117,7 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
117
117
|
*
|
|
118
118
|
* This source code is licensed under the ISC license.
|
|
119
119
|
* See the LICENSE file in the root directory of this source tree.
|
|
120
|
-
*/const
|
|
120
|
+
*/const Oh=ce("Grid2x2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M12 3v18",key:"108xh3"}]]);/**
|
|
121
121
|
* @license lucide-react v0.400.0 - ISC
|
|
122
122
|
*
|
|
123
123
|
* This source code is licensed under the ISC license.
|
|
@@ -167,12 +167,12 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
167
167
|
*
|
|
168
168
|
* This source code is licensed under the ISC license.
|
|
169
169
|
* See the LICENSE file in the root directory of this source tree.
|
|
170
|
-
*/const
|
|
170
|
+
*/const Bh=ce("PanelLeft",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);/**
|
|
171
171
|
* @license lucide-react v0.400.0 - ISC
|
|
172
172
|
*
|
|
173
173
|
* This source code is licensed under the ISC license.
|
|
174
174
|
* See the LICENSE file in the root directory of this source tree.
|
|
175
|
-
*/const
|
|
175
|
+
*/const Ih=ce("PanelTop",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}]]);/**
|
|
176
176
|
* @license lucide-react v0.400.0 - ISC
|
|
177
177
|
*
|
|
178
178
|
* This source code is licensed under the ISC license.
|
|
@@ -187,17 +187,17 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
187
187
|
*
|
|
188
188
|
* This source code is licensed under the ISC license.
|
|
189
189
|
* See the LICENSE file in the root directory of this source tree.
|
|
190
|
-
*/const
|
|
190
|
+
*/const za=ce("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
191
191
|
* @license lucide-react v0.400.0 - ISC
|
|
192
192
|
*
|
|
193
193
|
* This source code is licensed under the ISC license.
|
|
194
194
|
* See the LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/const
|
|
195
|
+
*/const Wa=ce("Rows2",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 12h18",key:"1i2n21"}]]);/**
|
|
196
196
|
* @license lucide-react v0.400.0 - ISC
|
|
197
197
|
*
|
|
198
198
|
* This source code is licensed under the ISC license.
|
|
199
199
|
* See the LICENSE file in the root directory of this source tree.
|
|
200
|
-
*/const
|
|
200
|
+
*/const jh=ce("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
|
|
201
201
|
* @license lucide-react v0.400.0 - ISC
|
|
202
202
|
*
|
|
203
203
|
* This source code is licensed under the ISC license.
|
|
@@ -207,12 +207,12 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
207
207
|
*
|
|
208
208
|
* This source code is licensed under the ISC license.
|
|
209
209
|
* See the LICENSE file in the root directory of this source tree.
|
|
210
|
-
*/const
|
|
210
|
+
*/const Ua=ce("Terminal",[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]]);/**
|
|
211
211
|
* @license lucide-react v0.400.0 - ISC
|
|
212
212
|
*
|
|
213
213
|
* This source code is licensed under the ISC license.
|
|
214
214
|
* See the LICENSE file in the root directory of this source tree.
|
|
215
|
-
*/const
|
|
215
|
+
*/const $a=ce("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/**
|
|
216
216
|
* @license lucide-react v0.400.0 - ISC
|
|
217
217
|
*
|
|
218
218
|
* This source code is licensed under the ISC license.
|
|
@@ -222,11 +222,11 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
222
222
|
*
|
|
223
223
|
* This source code is licensed under the ISC license.
|
|
224
224
|
* See the LICENSE file in the root directory of this source tree.
|
|
225
|
-
*/const zi=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function
|
|
225
|
+
*/const zi=ce("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function ac(e){const t=oe.getState().getLayout(e);ye(t).forEach(i=>{var h;const n=Re.getState().sessions[i];(h=n==null?void 0:n.terminal)==null||h.dispose(),Re.getState().removeSession(i),hn(i)}),De({type:"project:kill",projectId:e}),oe.getState().setLayout(e,null),de.getState().clearProjectTerminals(e)}function x_({project:e,isActive:t,onClick:r,onKill:i,onRemove:n}){const h=e.terminalIds.length;return A.jsxs("div",{onClick:r,className:`
|
|
226
226
|
group flex items-center gap-2 px-3 py-2 mx-2 rounded-lg cursor-pointer
|
|
227
227
|
transition-colors duration-100
|
|
228
228
|
${t?"bg-accent/10 text-[var(--text-primary)]":"text-[var(--text-secondary)] hover:bg-[var(--surface-2)] hover:text-[var(--text-primary)]"}
|
|
229
|
-
`,children:[A.jsx(c_,{size:14,className:t?"text-accent":"text-[var(--text-muted)]"}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-xs font-medium truncate",children:e.name}),A.jsx("div",{className:"text-[10px] text-[var(--text-muted)] truncate font-mono",children:e.cwd})]}),h>0&&A.jsxs("span",{className:"text-[10px] tabular-nums px-1.5 py-0.5 rounded-full bg-[var(--surface-3)] text-[var(--text-muted)] flex items-center gap-0.5",children:[A.jsx(
|
|
229
|
+
`,children:[A.jsx(c_,{size:14,className:t?"text-accent":"text-[var(--text-muted)]"}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-xs font-medium truncate",children:e.name}),A.jsx("div",{className:"text-[10px] text-[var(--text-muted)] truncate font-mono",children:e.cwd})]}),h>0&&A.jsxs("span",{className:"text-[10px] tabular-nums px-1.5 py-0.5 rounded-full bg-[var(--surface-3)] text-[var(--text-muted)] flex items-center gap-0.5",children:[A.jsx(Ua,{size:8}),h]}),A.jsxs("div",{className:"hidden group-hover:flex items-center gap-0.5",children:[h>0&&A.jsx("button",{onClick:m=>{m.stopPropagation(),i()},title:"Kill all terminals",className:"p-0.5 rounded text-[var(--text-muted)] hover:text-[var(--danger)] hover:bg-[var(--danger-dim)] transition-colors",children:A.jsx(l_,{size:12})}),A.jsx("button",{onClick:m=>{m.stopPropagation(),n()},title:"Remove project",className:"p-0.5 rounded text-[var(--text-muted)] hover:text-[var(--danger)] hover:bg-[var(--danger-dim)] transition-colors",children:A.jsx($a,{size:12})})]})]})}function k_({open:e,onClose:t,onCreate:r,initialName:i,initialCwd:n}){const[h,m]=Q.useState(""),[a,c]=Q.useState("~"),[f,g]=Q.useState(null),[d,_]=Q.useState(!1),S=Q.useRef(null);Q.useEffect(()=>{e&&(m(i??""),c(n??"~"),g(null),setTimeout(()=>{var v;return(v=S.current)==null?void 0:v.focus()},50))},[e,i,n]);const w=Q.useCallback(async v=>{if(v.preventDefault(),!h.trim())return;const u=a.trim()||"~",s=Object.values(de.getState().projects).find(l=>l.cwd===u);if(s){g(`Project "${s.name}" already uses this directory`);return}_(!0),g(null);try{const l=await fetch("/api/validate-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:u})}),{valid:p}=await l.json();if(!p){g("Directory does not exist"),_(!1);return}}catch{g("Could not validate path"),_(!1);return}_(!1),r(h.trim(),u),t()},[h,a,r,t]);return e?A.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:A.jsxs("div",{className:"bg-[var(--surface-1)] border border-[var(--border)] rounded-xl w-[400px] shadow-2xl animate-fade-in",onClick:v=>v.stopPropagation(),children:[A.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[A.jsx("h3",{className:"text-sm font-medium text-[var(--text-primary)]",children:"New Project"}),A.jsx("button",{onClick:t,className:"p-1 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",children:A.jsx(zi,{size:14})})]}),A.jsxs("form",{onSubmit:w,className:"p-4 space-y-4",children:[A.jsxs("div",{children:[A.jsx("label",{className:"block text-xs text-[var(--text-secondary)] mb-1.5",children:"Project Name"}),A.jsx("input",{ref:S,value:h,onChange:v=>m(v.target.value),placeholder:"my-project",className:`
|
|
230
230
|
w-full px-3 py-2 text-sm
|
|
231
231
|
bg-[var(--surface-0)] border border-[var(--border)]
|
|
232
232
|
text-[var(--text-primary)] placeholder:text-[var(--text-muted)]
|
|
@@ -253,12 +253,12 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
253
253
|
group flex items-center gap-2 px-3 py-2 mx-2 rounded-lg cursor-pointer
|
|
254
254
|
text-[var(--text-secondary)] hover:bg-[var(--surface-2)] hover:text-[var(--text-primary)]
|
|
255
255
|
transition-colors duration-100
|
|
256
|
-
`,onClick:t,children:[A.jsx(
|
|
256
|
+
`,onClick:t,children:[A.jsx(jh,{size:14,className:"text-[var(--text-muted)] flex-shrink-0"}),A.jsxs("div",{className:"flex-1 min-w-0",children:[A.jsx("div",{className:"text-xs font-medium truncate",children:e.name}),A.jsxs("div",{className:"text-[10px] text-[var(--text-muted)] truncate flex items-center gap-0.5",children:[A.jsx(Ua,{size:8}),n]})]}),A.jsxs("div",{className:"hidden group-hover:flex items-center gap-0.5",children:[A.jsx("button",{onClick:h=>{h.stopPropagation(),t()},title:"Launch",className:"p-0.5 rounded text-[var(--text-muted)] hover:text-[var(--success)] hover:bg-green-500/10 transition-colors",children:A.jsx(y_,{size:12})}),A.jsx("button",{onClick:h=>{h.stopPropagation(),r()},title:"Edit",className:"p-0.5 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",children:A.jsx(S_,{size:12})}),A.jsx("button",{onClick:h=>{h.stopPropagation(),i()},title:"Delete",className:"p-0.5 rounded text-[var(--text-muted)] hover:text-[var(--danger)] hover:bg-[var(--danger-dim)] transition-colors",children:A.jsx($a,{size:12})})]})]})}function L_({favourites:e,onLaunch:t,onEdit:r,onDelete:i}){const[n,h]=Q.useState(!1);return e.length===0?null:A.jsxs("div",{children:[A.jsxs("button",{onClick:()=>h(!n),className:`
|
|
257
257
|
flex items-center gap-1 w-full px-4 py-1.5
|
|
258
258
|
text-[10px] font-semibold uppercase tracking-wider
|
|
259
259
|
text-[var(--text-muted)] hover:text-[var(--text-secondary)]
|
|
260
260
|
transition-colors
|
|
261
|
-
`,children:[n?A.jsx(o_,{size:10}):A.jsx(n_,{size:10}),"Favourites"]}),!n&&A.jsx("div",{children:e.map(m=>A.jsx(b_,{favourite:m,onLaunch:()=>t(m),onEdit:()=>r(m),onDelete:()=>i(m.id)},m.id))})]})}const D_={"even-horizontal":A.jsx(
|
|
261
|
+
`,children:[n?A.jsx(o_,{size:10}):A.jsx(n_,{size:10}),"Favourites"]}),!n&&A.jsx("div",{children:e.map(m=>A.jsx(b_,{favourite:m,onLaunch:()=>t(m),onEdit:()=>r(m),onDelete:()=>i(m.id)},m.id))})]})}const D_={"even-horizontal":A.jsx(Wa,{size:16}),"even-vertical":A.jsx(Fa,{size:16}),"main-left":A.jsx(Bh,{size:16}),"main-top":A.jsx(Ih,{size:16}),grid:A.jsx(Oh,{size:16})},lc={"even-horizontal":"Rows","even-vertical":"Columns","main-left":"Main + Stack","main-top":"Main + Row",grid:"Grid"};function Nh({open:e,onClose:t,onSave:r,editingFavourite:i,defaultPreset:n,defaultSlotCount:h}){const[m,a]=Q.useState(""),[c,f]=Q.useState("even-horizontal"),[g,d]=Q.useState([{label:"",command:""}]),_=Q.useRef(null);if(Q.useEffect(()=>{if(e){if(i)a(i.name),f(i.preset),d(i.slots.map(o=>({...o})));else{a(""),f(n??"even-horizontal");const o=h??1;d(Array.from({length:o},()=>({label:"",command:""})))}setTimeout(()=>{var o;return(o=_.current)==null?void 0:o.focus()},50)}},[e,i,n,h]),!e)return null;const S=o=>{o.preventDefault(),!(!m.trim()||g.length===0)&&(r(m.trim(),c,g),t())},w=()=>{d([...g,{label:"",command:""}])},v=o=>{g.length<=1||d(g.filter((s,l)=>l!==o))},u=(o,s,l)=>{d(g.map((p,C)=>C===o?{...p,[s]:l}:p))};return A.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:A.jsxs("div",{className:"bg-[var(--surface-1)] border border-[var(--border)] rounded-xl w-[440px] shadow-2xl animate-fade-in max-h-[80vh] flex flex-col",onClick:o=>o.stopPropagation(),children:[A.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[A.jsx("h3",{className:"text-sm font-medium text-[var(--text-primary)]",children:i?"Edit Favourite":"Save Favourite"}),A.jsx("button",{onClick:t,className:"p-1 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",children:A.jsx(zi,{size:14})})]}),A.jsxs("form",{onSubmit:S,className:"p-4 space-y-4 overflow-y-auto",children:[A.jsxs("div",{children:[A.jsx("label",{className:"block text-xs text-[var(--text-secondary)] mb-1.5",children:"Name"}),A.jsx("input",{ref:_,value:m,onChange:o=>a(o.target.value),placeholder:"My Workspace",className:`
|
|
262
262
|
w-full px-3 py-2 text-sm
|
|
263
263
|
bg-[var(--surface-0)] border border-[var(--border)]
|
|
264
264
|
text-[var(--text-primary)] placeholder:text-[var(--text-muted)]
|
|
@@ -268,7 +268,7 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
268
268
|
`})]}),A.jsxs("div",{children:[A.jsx("label",{className:"block text-xs text-[var(--text-secondary)] mb-1.5",children:"Layout"}),A.jsx("div",{className:"flex gap-1",children:vi.map(o=>A.jsxs("button",{type:"button",onClick:()=>f(o),className:`
|
|
269
269
|
flex items-center gap-1.5 px-2.5 py-1.5 rounded-lg text-xs transition-colors
|
|
270
270
|
${c===o?"bg-accent/15 text-accent border border-accent/30":"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] border border-transparent"}
|
|
271
|
-
`,title:
|
|
271
|
+
`,title:lc[o],children:[D_[o],A.jsx("span",{className:"hidden sm:inline",children:lc[o]})]},o))})]}),A.jsxs("div",{children:[A.jsxs("div",{className:"flex items-center justify-between mb-1.5",children:[A.jsx("label",{className:"text-xs text-[var(--text-secondary)]",children:"Terminal Slots"}),A.jsxs("button",{type:"button",onClick:w,className:"flex items-center gap-0.5 text-[10px] text-accent hover:text-accent/80 transition-colors",children:[A.jsx(za,{size:10}),"Add"]})]}),A.jsx("div",{className:"space-y-2",children:g.map((o,s)=>A.jsxs("div",{className:"flex items-start gap-2 p-2 rounded-lg bg-[var(--surface-0)] border border-[var(--border)]",children:[A.jsxs("div",{className:"flex-1 space-y-1.5",children:[A.jsx("input",{value:o.label,onChange:l=>u(s,"label",l.target.value),placeholder:`Terminal ${s+1}`,className:`
|
|
272
272
|
w-full px-2 py-1 text-xs
|
|
273
273
|
bg-transparent border border-[var(--border)]
|
|
274
274
|
text-[var(--text-primary)] placeholder:text-[var(--text-muted)]
|
|
@@ -282,7 +282,7 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
282
282
|
rounded outline-none
|
|
283
283
|
focus:border-accent focus:ring-1 focus:ring-accent/30
|
|
284
284
|
transition-colors
|
|
285
|
-
`})]}),g.length>1&&A.jsx("button",{type:"button",onClick:()=>v(s),className:"p-1 mt-0.5 rounded text-[var(--text-muted)] hover:text-[var(--danger)] hover:bg-[var(--danger-dim)] transition-colors",children:A.jsx(
|
|
285
|
+
`})]}),g.length>1&&A.jsx("button",{type:"button",onClick:()=>v(s),className:"p-1 mt-0.5 rounded text-[var(--text-muted)] hover:text-[var(--danger)] hover:bg-[var(--danger-dim)] transition-colors",children:A.jsx($a,{size:12})})]},s))})]}),A.jsxs("div",{className:"flex justify-end gap-2 pt-1",children:[A.jsx("button",{type:"button",onClick:t,className:`
|
|
286
286
|
px-3 py-1.5 text-xs text-[var(--text-secondary)]
|
|
287
287
|
hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)]
|
|
288
288
|
rounded-lg transition-colors
|
|
@@ -299,14 +299,14 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
299
299
|
px-3 py-1.5 text-xs font-medium
|
|
300
300
|
bg-accent hover:bg-accent/80
|
|
301
301
|
text-white rounded-lg transition-colors
|
|
302
|
-
`,children:"Launch"})]})]})]})}):null}function T_(){const[e,t]=Q.useState(!1),[r,i]=Q.useState(!1),[n,h]=Q.useState(!1),[m,a]=Q.useState(null),[c,f]=Q.useState(null),[g,d]=Q.useState(null),[
|
|
303
|
-
`)});const ee=Oi(ne,z.preset);oe.getState().setLayout(o,ee),ne.forEach(Fe=>{C(o,Fe)}),ne.length>0&&te.getState().setFocusedTerminal(ne[0])},W=z=>{if(!o)return;const re=oe.getState().getLayout(o);ye(re).length>0?(f(z),h(!0)):O(z)},V=z=>{a(z),i(!0)},J=(z,re,ne)=>{m&&q(m.id,{name:z,preset:re,slots:ne}),a(null)},Z=Q.useCallback(z=>{z.dataTransfer.types.includes("Files")&&(z.preventDefault(),z.dataTransfer.dropEffect="copy",S(!0))},[]),I=Q.useCallback(z=>{z.currentTarget.contains(z.relatedTarget)||S(!1)},[]),L=Q.useCallback(z=>{z.preventDefault(),M.current=!0;const re=ee=>{y(ee.clientX)},ne=()=>{M.current=!1,window.removeEventListener("mousemove",re),window.removeEventListener("mouseup",ne),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",re),window.addEventListener("mouseup",ne)},[y]),U=Q.useCallback(z=>{if(S(!1),!z.dataTransfer.types.includes("Files")||z.dataTransfer.files.length===0)return;z.preventDefault(),z.stopPropagation();const re=z.dataTransfer.files[0];fetch("/api/resolve-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:re.name,size:re.size,lastModified:re.lastModified})}).then(ne=>ne.json()).then(ne=>{if(!ne.path||!ne.isDirectory)return;const ee=ne.path,Fe=ee.split("/").pop()||re.name;d({name:Fe,cwd:ee}),t(!0)}).catch(()=>{})},[]);if(!x)return null;const H=Object.values(u),X=Object.values(K),se=(o?u[o]:null)?ye(oe.getState().getLayout(o)).length:0;return A.jsxs("div",{className:`relative flex-shrink-0 bg-[var(--surface-1)] border-r border-[var(--border)] flex flex-col h-full ${
|
|
302
|
+
`,children:"Launch"})]})]})]})}):null}function T_(){const[e,t]=Q.useState(!1),[r,i]=Q.useState(!1),[n,h]=Q.useState(!1),[m,a]=Q.useState(null),[c,f]=Q.useState(null),[g,d]=Q.useState(null),[_,S]=Q.useState(!1),[w,v]=Q.useState(null);Q.useEffect(()=>{fetch("/api/version").then(z=>z.json()).then(z=>{z.latest&&P_(z.latest,z.current)&&v({current:z.current,latest:z.latest})}).catch(()=>{})},[]);const u=de(z=>z.projects),o=de(z=>z.activeProjectId),s=de(z=>z.setActiveProject),l=de(z=>z.addProject),p=de(z=>z.removeProject),C=de(z=>z.addTerminalToProject),x=te(z=>z.sidebarOpen),k=te(z=>z.sidebarWidth),y=te(z=>z.setSidebarWidth),b=te(z=>z.toggleSidebar),R=te(z=>z.connectionStatus),M=Q.useRef(!1),B=te(z=>z.editorSyncEnabled),T=te(z=>z.toggleEditorSync),N=te(z=>z.theme),F=te(z=>z.cycleTheme),K=Er(z=>z.favourites);Er(z=>z.addFavourite);const q=Er(z=>z.updateFavourite),j=Er(z=>z.removeFavourite),E=(z,re)=>{const ne=Object.values(u).find(Fe=>Fe.cwd===re);if(ne){s(ne.id);return}const ee=crypto.randomUUID();l({id:ee,name:z,cwd:re,terminalIds:[]}),De({type:"project:create",projectId:ee,name:z,cwd:re}),s(ee)},D=z=>{ac(z)},P=z=>{D(z),De({type:"project:remove",projectId:z}),oe.getState().removeProjectLayout(z),p(z)},O=z=>{if(!o||!u[o])return;ac(o);const ne=z.slots.map(()=>crypto.randomUUID());z.slots.forEach((Fe,Ur)=>{Fe.command.trim()&&Xp(ne[Ur],Fe.command+`
|
|
303
|
+
`)});const ee=Oi(ne,z.preset);oe.getState().setLayout(o,ee),ne.forEach(Fe=>{C(o,Fe)}),ne.length>0&&te.getState().setFocusedTerminal(ne[0])},W=z=>{if(!o)return;const re=oe.getState().getLayout(o);ye(re).length>0?(f(z),h(!0)):O(z)},V=z=>{a(z),i(!0)},J=(z,re,ne)=>{m&&q(m.id,{name:z,preset:re,slots:ne}),a(null)},Z=Q.useCallback(z=>{z.dataTransfer.types.includes("Files")&&(z.preventDefault(),z.dataTransfer.dropEffect="copy",S(!0))},[]),I=Q.useCallback(z=>{z.currentTarget.contains(z.relatedTarget)||S(!1)},[]),L=Q.useCallback(z=>{z.preventDefault(),M.current=!0;const re=ee=>{y(ee.clientX)},ne=()=>{M.current=!1,window.removeEventListener("mousemove",re),window.removeEventListener("mouseup",ne),document.body.style.cursor="",document.body.style.userSelect=""};document.body.style.cursor="col-resize",document.body.style.userSelect="none",window.addEventListener("mousemove",re),window.addEventListener("mouseup",ne)},[y]),U=Q.useCallback(z=>{if(S(!1),!z.dataTransfer.types.includes("Files")||z.dataTransfer.files.length===0)return;z.preventDefault(),z.stopPropagation();const re=z.dataTransfer.files[0];fetch("/api/resolve-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:re.name,size:re.size,lastModified:re.lastModified})}).then(ne=>ne.json()).then(ne=>{if(!ne.path||!ne.isDirectory)return;const ee=ne.path,Fe=ee.split("/").pop()||re.name;d({name:Fe,cwd:ee}),t(!0)}).catch(()=>{})},[]);if(!x)return null;const H=Object.values(u),X=Object.values(K),se=(o?u[o]:null)?ye(oe.getState().getLayout(o)).length:0;return A.jsxs("div",{className:`relative flex-shrink-0 bg-[var(--surface-1)] border-r border-[var(--border)] flex flex-col h-full ${_?"ring-2 ring-inset ring-[var(--accent)]":""}`,style:{width:k},onDragOver:Z,onDragLeave:I,onDrop:U,children:[A.jsx("div",{className:"absolute top-0 right-0 w-1 h-full cursor-col-resize z-10 hover:bg-[var(--accent)] active:bg-[var(--accent)] opacity-0 hover:opacity-40 active:opacity-60 transition-opacity",onMouseDown:L}),A.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[A.jsxs("div",{className:"flex items-center gap-2",children:[A.jsx("span",{className:"text-sm font-semibold tracking-tight text-[var(--text-primary)]",children:"Paneful"}),A.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${R==="connected"?"bg-[var(--success)]":R==="connecting"?"bg-yellow-500 animate-pulse":"bg-[var(--danger)]"}`,title:R})]}),A.jsxs("div",{className:"flex items-center gap-1",children:[A.jsx("button",{onClick:F,className:"p-1 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",title:`Theme: ${N}. Click to cycle.`,children:N==="light"?A.jsx(w_,{size:14}):N==="dark"?A.jsx(v_,{size:14}):A.jsx(__,{size:14})}),A.jsx("button",{onClick:T,className:`p-1 rounded transition-colors ${B?"text-[var(--accent)] hover:bg-[var(--surface-3)]":"text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)]"}`,title:B?"Editor sync ON — auto-switches project based on your active editor. Click to disable.":"Editor sync OFF — click to enable. Requires: (1) Paneful (or Terminal, if running from CLI) in System Settings → Privacy & Security → Accessibility, (2) Editor window title includes folder name (default in VS Code/Cursor). Note: after updating paneful, you may need to remove and re-add it in Accessibility settings.",children:A.jsx(p_,{size:14})}),A.jsx("button",{onClick:b,className:"p-1 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",title:"Hide sidebar",children:A.jsx(g_,{size:14})})]})]}),A.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:H.length===0&&X.length===0?A.jsx("div",{className:"px-4 py-8 text-center",children:A.jsx("p",{className:"text-xs text-[var(--text-muted)]",children:"No projects yet"})}):A.jsxs(A.Fragment,{children:[H.map(z=>A.jsx(x_,{project:z,isActive:z.id===o,onClick:()=>s(z.id),onKill:()=>D(z.id),onRemove:()=>P(z.id)},z.id)),A.jsx(L_,{favourites:X,onLaunch:W,onEdit:V,onDelete:j})]})}),A.jsxs("div",{className:"mx-3 mb-2 px-3 py-2.5 rounded-lg bg-[var(--surface-2)] text-[10px] text-[var(--text-muted)] leading-relaxed flex flex-col items-center gap-1.5 text-center",children:[A.jsx(f_,{size:12,className:"text-yellow-500"}),"Drag a folder into this sidebar to create a project"]}),A.jsx("div",{className:"p-2 border-t border-[var(--border)]",children:A.jsxs("button",{onClick:()=>t(!0),className:`
|
|
304
304
|
w-full flex items-center justify-center gap-1.5
|
|
305
305
|
px-3 py-2 text-xs
|
|
306
306
|
text-[var(--text-secondary)] hover:text-[var(--text-primary)]
|
|
307
307
|
bg-[var(--surface-2)] hover:bg-[var(--surface-3)]
|
|
308
308
|
rounded-lg transition-colors
|
|
309
|
-
`,children:[A.jsx(
|
|
309
|
+
`,children:[A.jsx(za,{size:14}),"New Project"]})}),w&&A.jsxs("div",{className:"px-4 py-3 border-t border-[var(--border)]",children:[A.jsxs("a",{href:"https://www.npmjs.com/package/paneful",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-2 text-xs text-[var(--accent)] hover:underline",children:[A.jsx(a_,{size:14}),A.jsxs("span",{children:["v",w.latest," available (current: v",w.current,")"]})]}),A.jsx("p",{className:"text-[10px] text-[var(--text-muted)] mt-1",children:"paneful update"})]}),A.jsx(k_,{open:e,onClose:()=>{t(!1),d(null)},onCreate:E,initialName:g==null?void 0:g.name,initialCwd:g==null?void 0:g.cwd}),A.jsx(Nh,{open:r,onClose:()=>{i(!1),a(null)},onSave:J,editingFavourite:m}),A.jsx(R_,{open:n,onClose:()=>{h(!1),f(null)},onConfirm:()=>{c&&O(c)},terminalCount:se,favouriteName:(c==null?void 0:c.name)??""})]})}function P_(e,t){const r=e.split(".").map(Number),i=t.split(".").map(Number);for(let n=0;n<3;n++){if((r[n]||0)>(i[n]||0))return!0;if((r[n]||0)<(i[n]||0))return!1}return!1}const M_="border border-[var(--border)] rounded-md px-1.5 py-0.5 bg-[var(--surface-0)] text-[11px] font-mono min-w-[24px] text-center inline-flex items-center justify-center shadow-[0_1px_0_var(--border)]",A_=[{keys:["⌘","N"],action:"New pane (vertical)"},{keys:["⌘","⇧","N"],action:"New pane (horizontal)"},{keys:["⌘","W"],action:"Close pane"},{keys:["⌘","D"],action:"Toggle sidebar"},{keys:["⌘","T"],action:"Cycle layout"},{keys:["⌘","R"],action:"Auto reorganize"},{keys:["⌘","1-9"],action:"Focus pane by number"},{keys:["⌘","←→↑↓"],action:"Move focus"},{keys:["⌘","⇧","←→↑↓"],action:"Swap panes"},{keys:["⌥","←→↑↓"],action:"Swap panes"},{keys:["Shift","Enter"],action:"Insert new line"}];function O_({open:e,onClose:t}){return e?A.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",onClick:t,children:A.jsxs("div",{className:"bg-[var(--surface-1)] border border-[var(--border)] rounded-xl w-[440px] shadow-2xl animate-fade-in",onClick:r=>r.stopPropagation(),children:[A.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[A.jsx("h3",{className:"text-sm font-medium text-[var(--text-primary)]",children:"Keyboard Shortcuts"}),A.jsx("button",{onClick:t,className:"p-1 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",children:A.jsx(zi,{size:14})})]}),A.jsx("div",{className:"p-4 space-y-2",children:A_.map((r,i)=>A.jsxs("div",{className:"flex items-center justify-between py-1",children:[A.jsx("div",{className:"flex items-center gap-1",children:r.keys.map((n,h)=>A.jsx("kbd",{className:M_,children:n},h))}),A.jsx("span",{className:"text-xs text-[var(--text-secondary)]",children:r.action})]},i))})]})}):null}const B_={"even-horizontal":A.jsx(Wa,{size:14}),"even-vertical":A.jsx(Fa,{size:14}),"main-left":A.jsx(Bh,{size:14}),"main-top":A.jsx(Ih,{size:14}),grid:A.jsx(Oh,{size:14})},I_={"even-horizontal":"Rows","even-vertical":"Columns","main-left":"Main + Stack","main-top":"Main + Row",grid:"Grid"};function j_({onNewPane:e}){const[t,r]=Q.useState(!1),[i,n]=Q.useState(!1),h=te(u=>u.sidebarOpen),m=te(u=>u.toggleSidebar),a=de(u=>u.activeProjectId),c=oe(u=>u.currentPresetIndex),f=oe(u=>u.cyclePreset),g=Er(u=>u.addFavourite),d=()=>{if(!a)return;const u=oe.getState().getLayout(a),o=ye(u);o.length>0&&f(a,o)},_=()=>{if(!a)return;const u=oe.getState().getLayout(a),o=ye(u);if(o.length===0)return;let s;o.length<=2?s="even-vertical":o.length===3?s="main-left":s="grid";const l=Oi(o,s);l&&oe.getState().setLayout(a,l)},S=(u,o,s)=>{g({id:crypto.randomUUID(),name:u,preset:o,slots:s})},w=vi[c],v=a?ye(oe.getState().getLayout(a)).length:0;return A.jsxs("div",{className:"h-9 flex-shrink-0 flex items-center px-2 gap-1 bg-[var(--surface-1)] border-b border-[var(--border)]",children:[!h&&A.jsx("button",{onClick:m,className:"p-1.5 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",title:"Show sidebar (Cmd+D)",children:A.jsx(m_,{size:14})}),A.jsx("div",{className:"w-px h-4 bg-[var(--border)] mx-1"}),A.jsx("button",{onClick:()=>e("vertical"),className:"p-1.5 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",title:"Split vertical (Cmd+N)",children:A.jsx(Fa,{size:14})}),A.jsx("button",{onClick:()=>e("horizontal"),className:"p-1.5 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",title:"Split horizontal (Cmd+Shift+N)",children:A.jsx(Wa,{size:14})}),A.jsx("div",{className:"w-px h-4 bg-[var(--border)] mx-1"}),A.jsxs("button",{onClick:d,className:"flex items-center gap-1.5 px-2 py-1 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors text-xs",title:"Cycle layout (Cmd+T)",children:[B_[w],A.jsx("span",{className:"hidden sm:inline",children:I_[w]})]}),A.jsx("button",{onClick:_,className:"p-1.5 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",title:"Auto reorganize (Cmd+R)",children:A.jsx(d_,{size:14})}),A.jsx("div",{className:"w-px h-4 bg-[var(--border)] mx-1"}),A.jsx("button",{onClick:()=>r(!0),className:"p-1.5 rounded text-[var(--text-muted)] hover:text-yellow-400 hover:bg-[var(--surface-3)] transition-colors",title:"Save as favourite",children:A.jsx(jh,{size:14})}),A.jsx("div",{className:"flex-1"}),A.jsx("button",{onClick:()=>n(!0),className:"p-1.5 rounded text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--surface-3)] transition-colors",title:"Keyboard shortcuts",children:A.jsx(h_,{size:14})}),A.jsx(Nh,{open:t,onClose:()=>r(!1),onSave:S,defaultPreset:w,defaultSlotCount:Math.max(v,1)}),A.jsx(O_,{open:i,onClose:()=>n(!1)})]})}function N_(e,t){const r=Q.useRef();Q.useEffect(()=>{const i=e.current;if(!i)return;const n=new ResizeObserver(()=>{clearTimeout(r.current),r.current=setTimeout(t,zp)});return n.observe(i),()=>{n.disconnect(),clearTimeout(r.current)}},[e,t])}function H_(e,t){const r=te(_=>_.setDragging),i=te(_=>_.setDropTarget),n=te(_=>_.draggingTerminalId),h=oe(_=>_.movePaneInProject),m=oe(_=>_.swapPanesInProject),a=Q.useCallback(_=>{_.dataTransfer.setData("text/plain",e),_.dataTransfer.effectAllowed="move",r(e)},[e,r]),c=Q.useCallback(()=>{r(null),i(null)},[r,i]),f=Q.useCallback(_=>{if(_.preventDefault(),_.dataTransfer.dropEffect="move",!n||n===e){i(null);return}const S=_.currentTarget.getBoundingClientRect(),w=(_.clientX-S.left)/S.width,v=(_.clientY-S.top)/S.height;let u="center";const o=.2;w<o?u="left":w>1-o?u="right":v<o?u="top":v>1-o&&(u="bottom"),i({terminalId:e,edge:u})},[e,n,i]),g=Q.useCallback(()=>{i(null)},[i]),d=Q.useCallback(_=>{_.preventDefault();const S=_.dataTransfer.getData("text/plain");if(!S||S===e)return;const w=te.getState().dropTarget;w&&(w.edge==="center"?m(t,S,e):h(t,S,e,w.edge),r(null),i(null))},[e,t,h,m,r,i]);return{onDragStart:a,onDragEnd:c,onDragOver:f,onDragLeave:g,onDrop:d}}function F_({terminalId:e,projectId:t,isFocused:r,onClose:i,dragProps:n}){const h=Re(d=>d.sessions[e]),m=(h==null?void 0:h.title)??"Terminal",a=(h==null?void 0:h.alive)??!0,c=oe(d=>d.getLayout(t)),g=ye(c).indexOf(e)+1;return A.jsxs("div",{draggable:!0,onDragStart:n.onDragStart,onDragEnd:n.onDragEnd,className:`
|
|
310
310
|
flex items-center h-7 px-2 gap-1.5 flex-shrink-0
|
|
311
311
|
border-b transition-colors duration-100
|
|
312
312
|
select-none cursor-grab active:cursor-grabbing
|
|
@@ -320,12 +320,12 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
320
320
|
pointer-events-none z-20
|
|
321
321
|
${i?"bg-accent/15 border-2 border-accent/40":"bg-accent/20 border-2 border-accent/50"}
|
|
322
322
|
rounded-sm transition-all duration-100
|
|
323
|
-
`})}function W_({terminalId:e,projectId:t,cwd:r}){const i=te(w=>w.focusedTerminalId),n=te(w=>w.draggingTerminalId),h=i===e,m=n===e,{containerRef:a,fit:c,focus:f}=Yp({terminalId:e,projectId:t,cwd:r}),g=H_(e,t);N_(a,c);const d=Q.useCallback(()=>{var u;De({type:"pty:kill",terminalId:e}),oe.getState().removePaneFromProject(t,e),de.getState().removeTerminalFromProject(t,e);const w=Re.getState().sessions[e];(u=w==null?void 0:w.terminal)==null||u.dispose(),Re.getState().removeSession(e),hn(e);const v=ye(oe.getState().getLayout(t));te.getState().setFocusedTerminal(v[0]??null)},[e,t]),
|
|
324
|
-
`).map(l=>l.trim()).filter(Boolean))}if(o.length>0&&!w.dataTransfer.types.includes("Files")){w.preventDefault(),w.stopPropagation();const s=o.map(l=>/[ ()'"]/.test(l)?`'${l.replace(/'/g,"'\\''")}'`:l);De({type:"pty:input",terminalId:e,data:s.join(" ")}),f();return}}if(w.dataTransfer.types.includes("Files")&&w.dataTransfer.files.length>0){w.preventDefault(),w.stopPropagation();const u=Array.from(w.dataTransfer.files);Promise.all(u.map(o=>fetch("/api/resolve-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o.name,size:o.size,lastModified:o.lastModified})}).then(s=>s.json()).then(s=>s.path).catch(()=>null))).then(o=>{const s=o.filter(Boolean);if(s.length>0){const l=s.map(
|
|
323
|
+
`})}function W_({terminalId:e,projectId:t,cwd:r}){const i=te(w=>w.focusedTerminalId),n=te(w=>w.draggingTerminalId),h=i===e,m=n===e,{containerRef:a,fit:c,focus:f}=Yp({terminalId:e,projectId:t,cwd:r}),g=H_(e,t);N_(a,c);const d=Q.useCallback(()=>{var u;De({type:"pty:kill",terminalId:e}),oe.getState().removePaneFromProject(t,e),de.getState().removeTerminalFromProject(t,e);const w=Re.getState().sessions[e];(u=w==null?void 0:w.terminal)==null||u.dispose(),Re.getState().removeSession(e),hn(e);const v=ye(oe.getState().getLayout(t));te.getState().setFocusedTerminal(v[0]??null)},[e,t]),_=Q.useCallback(w=>{if(!(te.getState().draggingTerminalId!=null)&&(w.dataTransfer.types.includes("codefiles")||w.dataTransfer.types.includes("text/plain"))){const u=w.dataTransfer.getData("codefiles");let o=[];if(u)try{o=JSON.parse(u)}catch{}if(o.length===0){const s=w.dataTransfer.getData("text/plain").trim();s&&s.startsWith("/")&&(o=s.split(`
|
|
324
|
+
`).map(l=>l.trim()).filter(Boolean))}if(o.length>0&&!w.dataTransfer.types.includes("Files")){w.preventDefault(),w.stopPropagation();const s=o.map(l=>/[ ()'"]/.test(l)?`'${l.replace(/'/g,"'\\''")}'`:l);De({type:"pty:input",terminalId:e,data:s.join(" ")}),f();return}}if(w.dataTransfer.types.includes("Files")&&w.dataTransfer.files.length>0){w.preventDefault(),w.stopPropagation();const u=Array.from(w.dataTransfer.files);Promise.all(u.map(o=>fetch("/api/resolve-path",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:o.name,size:o.size,lastModified:o.lastModified})}).then(s=>s.json()).then(s=>s.path).catch(()=>null))).then(o=>{const s=o.filter(Boolean);if(s.length>0){const l=s.map(p=>/[ ()'"]/.test(p)?`'${p.replace(/'/g,"'\\''")}'`:p);De({type:"pty:input",terminalId:e,data:l.join(" ")}),f()}});return}g.onDrop(w)},[e,g,f]),S=Q.useCallback(w=>{if(te.getState().draggingTerminalId!=null){g.onDragOver(w);return}if(w.dataTransfer.types.includes("Files")||w.dataTransfer.types.includes("codefiles")||w.dataTransfer.types.includes("text/plain")){w.preventDefault(),w.dataTransfer.dropEffect="copy";return}g.onDragOver(w)},[g]);return A.jsxs("div",{style:{borderColor:h?"var(--accent)":"transparent"},className:`
|
|
325
325
|
flex flex-col h-full w-full relative border
|
|
326
326
|
${m?"opacity-40":""}
|
|
327
327
|
transition-colors duration-100
|
|
328
|
-
`,onClick:f,onDragOver:S,onDragLeave:g.onDragLeave,onDrop:
|
|
328
|
+
`,onClick:f,onDragOver:S,onDragLeave:g.onDragLeave,onDrop:_,children:[A.jsx(F_,{terminalId:e,projectId:t,isFocused:h,onClose:d,dragProps:{onDragStart:g.onDragStart,onDragEnd:g.onDragEnd}}),A.jsx("div",{ref:a,className:"flex-1 min-h-0 min-w-0 overflow-hidden"}),A.jsx(z_,{terminalId:e})]})}function U_({projectId:e,path:t,direction:r}){const i=oe(m=>m.resizePaneInProject),n=Q.useRef(null);return{onMouseDown:Q.useCallback(m=>{var _;m.preventDefault(),m.stopPropagation();const a=(_=n.current)==null?void 0:_.parentElement;if(!a)return;const c=a.getBoundingClientRect();r==="vertical"?m.clientX:m.clientY;const f=r==="vertical"?c.width:c.height,g=S=>{const w=r==="vertical"?S.clientX:S.clientY,v=r==="vertical"?c.left:c.top,u=(w-v)/f;i(e,t,u)},d=()=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",d),document.body.style.cursor="",document.body.style.userSelect=""};document.addEventListener("mousemove",g),document.addEventListener("mouseup",d),document.body.style.cursor=r==="vertical"?"col-resize":"row-resize",document.body.style.userSelect="none"},[e,t,r,i]),containerRef:n}}function $_({projectId:e,path:t,direction:r}){const{onMouseDown:i,containerRef:n}=U_({projectId:e,path:t,direction:r}),h=r==="vertical";return A.jsxs("div",{ref:n,className:`
|
|
329
329
|
relative z-10 flex-shrink-0
|
|
330
330
|
${h?"w-[4px] cursor-col-resize":"h-[4px] cursor-row-resize"}
|
|
331
331
|
group
|
|
@@ -341,9 +341,9 @@ WARNING: This link could potentially be dangerous`)){const o=window.open();if(o)
|
|
|
341
341
|
transition-colors duration-150
|
|
342
342
|
group-hover:bg-accent/60
|
|
343
343
|
group-active:bg-accent
|
|
344
|
-
`})]})}function
|
|
344
|
+
`})]})}function Ko({node:e,projectId:t,cwd:r,path:i=[]}){if(e.type==="leaf")return A.jsx(W_,{terminalId:e.terminalId,projectId:t,cwd:r});const n=e.direction==="vertical",h=`${e.ratio*100}%`,m=`${(1-e.ratio)*100}%`;return A.jsxs("div",{className:`flex ${n?"flex-row":"flex-col"} h-full w-full`,children:[A.jsx("div",{style:{flexBasis:h,minWidth:0,minHeight:0,overflow:"hidden"},className:"flex",children:A.jsx(Ko,{node:e.first,projectId:t,cwd:r,path:[...i,0]})}),A.jsx($_,{projectId:t,path:i,direction:e.direction}),A.jsx("div",{style:{flexBasis:m,minWidth:0,minHeight:0,overflow:"hidden"},className:"flex",children:A.jsx(Ko,{node:e.second,projectId:t,cwd:r,path:[...i,1]})})]})}function K_(){const[e,t]=Q.useState(null);return Q.useEffect(()=>{let r=!1;return Math.random()<.5?fetch("https://dummyjson.com/quotes/random").then(n=>n.json()).then(n=>{!r&&(n!=null&&n.quote)&&t({text:n.quote,attribution:n.author})}).catch(()=>{}):fetch("https://uselessfacts.jsph.pl/api/v2/facts/random?language=en").then(n=>n.json()).then(n=>{!r&&(n!=null&&n.text)&&t({text:n.text})}).catch(()=>{}),()=>{r=!0}},[]),e}function V_({onNewTerminal:e,projectName:t}){const r=K_();return A.jsx("div",{className:"h-full w-full flex items-center justify-center bg-[var(--surface-0)]",children:A.jsxs("div",{className:"flex flex-col items-center gap-6 text-center max-w-lg px-8",children:[A.jsx("div",{className:"w-16 h-16 rounded-2xl bg-[var(--surface-2)] border border-[var(--border)] flex items-center justify-center",children:A.jsx(Ua,{size:28,className:"text-[var(--text-muted)]"})}),A.jsxs("div",{children:[A.jsx("h2",{className:"text-lg font-medium text-[var(--text-primary)] mb-1",children:t??"No project selected"}),A.jsx("p",{className:"text-sm text-[var(--text-muted)]",children:t?"This project has no active terminals.":"Create a project to get started."})]}),t&&A.jsxs("button",{onClick:e,className:`
|
|
345
345
|
flex items-center gap-2 px-4 py-2
|
|
346
346
|
bg-accent hover:bg-accent/80
|
|
347
347
|
text-white text-sm font-medium
|
|
348
348
|
rounded-lg transition-colors
|
|
349
|
-
`,children:[A.jsx(
|
|
349
|
+
`,children:[A.jsx(za,{size:16}),"New Terminal"]}),r&&A.jsxs("div",{className:"mt-4 max-w-sm",children:[A.jsxs("p",{className:"text-sm italic text-[var(--text-muted)] leading-relaxed",children:['"',r.text,'"']}),r.attribution&&A.jsxs("p",{className:"text-xs text-[var(--text-muted)]/60 mt-2",children:["— ",r.attribution]})]})]})})}function q_(){Zp(),t_(),Q.useEffect(()=>{de.getState().hydrateFromServer(),Er.getState().hydrateFromServer(),te.getState().hydrateFromServer()},[]);const e=de(c=>c.activeProjectId),t=de(c=>c.activeProjectId?c.projects[c.activeProjectId]:null),r=oe(c=>e?c.getLayout(e):null),i=te(c=>c.focusedTerminalId),n=te(c=>c.setFocusedTerminal),h=de(c=>c.addTerminalToProject),m=Q.useCallback(c=>{if(!e||!t)return;const f=crypto.randomUUID(),g=ye(r),d=i??g[0];d?oe.getState().addPaneToProject(e,d,f,c):oe.getState().setLayout(e,{type:"leaf",terminalId:f}),h(e,f),n(f)},[e,t,r,i,h,n]),a=Q.useCallback(()=>{m("vertical")},[m]);return A.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-[var(--surface-0)]",children:[A.jsx(T_,{}),A.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[A.jsx(j_,{onNewPane:m}),A.jsx("div",{className:"flex-1 min-h-0 min-w-0",children:r?A.jsx(Ko,{node:r,projectId:e,cwd:(t==null?void 0:t.cwd)??"/"},e):A.jsx(V_,{onNewTerminal:a,projectName:t==null?void 0:t.name})})]})]})}Wn.createRoot(document.getElementById("root")).render(A.jsx(yc.StrictMode,{children:A.jsx(q_,{})}));
|